agent-message 0.1.4 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +51 -8
- package/npm/bin/agent-message.mjs +2 -45
- package/npm/runtime/bin/agent-message-cli-darwin-amd64 +0 -0
- package/npm/runtime/bin/agent-message-cli-darwin-arm64 +0 -0
- package/npm/runtime/bin/agent-message-server-darwin-amd64 +0 -0
- package/npm/runtime/bin/agent-message-server-darwin-arm64 +0 -0
- package/npm/runtime/web-dist/assets/index-BIXs-4JX.js +195 -0
- package/npm/runtime/web-dist/assets/index-BdQqmJ4R.css +1 -0
- package/npm/runtime/web-dist/index.html +2 -2
- package/npm/runtime/web-dist/sw.js +1 -1
- package/package.json +4 -5
- package/codex-message/Cargo.lock +0 -1867
- package/codex-message/Cargo.toml +0 -17
- package/codex-message/README.md +0 -29
- package/codex-message/src/agent_message.rs +0 -205
- package/codex-message/src/app.rs +0 -857
- package/codex-message/src/codex.rs +0 -278
- package/codex-message/src/main.rs +0 -101
- package/codex-message/src/render.rs +0 -125
- package/npm/bin/codex-message.mjs +0 -41
- package/npm/runtime/web-dist/assets/index-AfnEJAni.css +0 -1
- package/npm/runtime/web-dist/assets/index-QUUfdfoN.js +0 -182
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
var UE=Object.defineProperty;var ng=e=>{throw TypeError(e)};var PE=(e,t,n)=>t in e?UE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ja=(e,t,n)=>PE(e,typeof t!="symbol"?t+"":t,n),cf=(e,t,n)=>t.has(e)||ng("Cannot "+n);var C=(e,t,n)=>(cf(e,t,"read from private field"),n?n.call(e):t.get(e)),ee=(e,t,n)=>t.has(e)?ng("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),G=(e,t,n,r)=>(cf(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),se=(e,t,n)=>(cf(e,t,"access private method"),n);var zs=(e,t,n,r)=>({set _(a){G(e,t,a,n)},get _(){return C(e,t,r)}});function BE(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const a in r)if(a!=="default"&&!(a in e)){const i=Object.getOwnPropertyDescriptor(r,a);i&&Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}}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 a of document.querySelectorAll('link[rel="modulepreload"]'))r(a);new MutationObserver(a=>{for(const i of a)if(i.type==="childList")for(const l of i.addedNodes)l.tagName==="LINK"&&l.rel==="modulepreload"&&r(l)}).observe(document,{childList:!0,subtree:!0});function n(a){const i={};return a.integrity&&(i.integrity=a.integrity),a.referrerPolicy&&(i.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?i.credentials="include":a.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(a){if(a.ep)return;a.ep=!0;const i=n(a);fetch(a.href,i)}})();var Du=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ac(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var m0={exports:{}},kc={};/**
|
|
2
|
+
* @license React
|
|
3
|
+
* react-jsx-runtime.production.js
|
|
4
|
+
*
|
|
5
|
+
* Copyright (c) Meta Platforms, Inc. and 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 $E=Symbol.for("react.transitional.element"),IE=Symbol.for("react.fragment");function g0(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var a in t)a!=="key"&&(n[a]=t[a])}else n=t;return t=n.ref,{$$typeof:$E,type:e,key:r,ref:t!==void 0?t:null,props:n}}kc.Fragment=IE;kc.jsx=g0;kc.jsxs=g0;m0.exports=kc;var x=m0.exports,y0={exports:{}},le={};/**
|
|
10
|
+
* @license React
|
|
11
|
+
* react.production.js
|
|
12
|
+
*
|
|
13
|
+
* Copyright (c) Meta Platforms, Inc. and 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 sp=Symbol.for("react.transitional.element"),ZE=Symbol.for("react.portal"),HE=Symbol.for("react.fragment"),FE=Symbol.for("react.strict_mode"),qE=Symbol.for("react.profiler"),GE=Symbol.for("react.consumer"),VE=Symbol.for("react.context"),QE=Symbol.for("react.forward_ref"),YE=Symbol.for("react.suspense"),XE=Symbol.for("react.memo"),v0=Symbol.for("react.lazy"),JE=Symbol.for("react.activity"),rg=Symbol.iterator;function KE(e){return e===null||typeof e!="object"?null:(e=rg&&e[rg]||e["@@iterator"],typeof e=="function"?e:null)}var b0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S0=Object.assign,x0={};function Ul(e,t,n){this.props=e,this.context=t,this.refs=x0,this.updater=n||b0}Ul.prototype.isReactComponent={};Ul.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("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")};Ul.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _0(){}_0.prototype=Ul.prototype;function up(e,t,n){this.props=e,this.context=t,this.refs=x0,this.updater=n||b0}var cp=up.prototype=new _0;cp.constructor=up;S0(cp,Ul.prototype);cp.isPureReactComponent=!0;var ag=Array.isArray;function wd(){}var He={H:null,A:null,T:null,S:null},w0=Object.prototype.hasOwnProperty;function fp(e,t,n){var r=n.ref;return{$$typeof:sp,type:e,key:t,ref:r!==void 0?r:null,props:n}}function WE(e,t){return fp(e.type,t,e.props)}function dp(e){return typeof e=="object"&&e!==null&&e.$$typeof===sp}function eC(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var ig=/\/+/g;function ff(e,t){return typeof e=="object"&&e!==null&&e.key!=null?eC(""+e.key):t.toString(36)}function tC(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(wd,wd):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Ri(e,t,n,r,a){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(i){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case sp:case ZE:l=!0;break;case v0:return l=e._init,Ri(l(e._payload),t,n,r,a)}}if(l)return a=a(e),l=r===""?"."+ff(e,0):r,ag(a)?(n="",l!=null&&(n=l.replace(ig,"$&/")+"/"),Ri(a,t,n,"",function(u){return u})):a!=null&&(dp(a)&&(a=WE(a,n+(a.key==null||e&&e.key===a.key?"":(""+a.key).replace(ig,"$&/")+"/")+l)),t.push(a)),1;l=0;var o=r===""?".":r+":";if(ag(e))for(var s=0;s<e.length;s++)r=e[s],i=o+ff(r,s),l+=Ri(r,t,n,i,a);else if(s=KE(e),typeof s=="function")for(e=s.call(e),s=0;!(r=e.next()).done;)r=r.value,i=o+ff(r,s++),l+=Ri(r,t,n,i,a);else if(i==="object"){if(typeof e.then=="function")return Ri(tC(e),t,n,r,a);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 l}function Rs(e,t,n){if(e==null)return e;var r=[],a=0;return Ri(e,r,"","",function(i){return t.call(n,i,a++)}),r}function nC(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 lg=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},rC={map:Rs,forEach:function(e,t,n){Rs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Rs(e,function(){t++}),t},toArray:function(e){return Rs(e,function(t){return t})||[]},only:function(e){if(!dp(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};le.Activity=JE;le.Children=rC;le.Component=Ul;le.Fragment=HE;le.Profiler=qE;le.PureComponent=up;le.StrictMode=FE;le.Suspense=YE;le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=He;le.__COMPILER_RUNTIME={__proto__:null,c:function(e){return He.H.useMemoCache(e)}};le.cache=function(e){return function(){return e.apply(null,arguments)}};le.cacheSignal=function(){return null};le.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=S0({},e.props),a=e.key;if(t!=null)for(i in t.key!==void 0&&(a=""+t.key),t)!w0.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(r[i]=t[i]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var l=Array(i),o=0;o<i;o++)l[o]=arguments[o+2];r.children=l}return fp(e.type,a,r)};le.createContext=function(e){return e={$$typeof:VE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:GE,_context:e},e};le.createElement=function(e,t,n){var r,a={},i=null;if(t!=null)for(r in t.key!==void 0&&(i=""+t.key),t)w0.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(a[r]=t[r]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var o=Array(l),s=0;s<l;s++)o[s]=arguments[s+2];a.children=o}if(e&&e.defaultProps)for(r in l=e.defaultProps,l)a[r]===void 0&&(a[r]=l[r]);return fp(e,i,a)};le.createRef=function(){return{current:null}};le.forwardRef=function(e){return{$$typeof:QE,render:e}};le.isValidElement=dp;le.lazy=function(e){return{$$typeof:v0,_payload:{_status:-1,_result:e},_init:nC}};le.memo=function(e,t){return{$$typeof:XE,type:e,compare:t===void 0?null:t}};le.startTransition=function(e){var t=He.T,n={};He.T=n;try{var r=e(),a=He.S;a!==null&&a(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(wd,lg)}catch(i){lg(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),He.T=t}};le.unstable_useCacheRefresh=function(){return He.H.useCacheRefresh()};le.use=function(e){return He.H.use(e)};le.useActionState=function(e,t,n){return He.H.useActionState(e,t,n)};le.useCallback=function(e,t){return He.H.useCallback(e,t)};le.useContext=function(e){return He.H.useContext(e)};le.useDebugValue=function(){};le.useDeferredValue=function(e,t){return He.H.useDeferredValue(e,t)};le.useEffect=function(e,t){return He.H.useEffect(e,t)};le.useEffectEvent=function(e){return He.H.useEffectEvent(e)};le.useId=function(){return He.H.useId()};le.useImperativeHandle=function(e,t,n){return He.H.useImperativeHandle(e,t,n)};le.useInsertionEffect=function(e,t){return He.H.useInsertionEffect(e,t)};le.useLayoutEffect=function(e,t){return He.H.useLayoutEffect(e,t)};le.useMemo=function(e,t){return He.H.useMemo(e,t)};le.useOptimistic=function(e,t){return He.H.useOptimistic(e,t)};le.useReducer=function(e,t,n){return He.H.useReducer(e,t,n)};le.useRef=function(e){return He.H.useRef(e)};le.useState=function(e){return He.H.useState(e)};le.useSyncExternalStore=function(e,t,n){return He.H.useSyncExternalStore(e,t,n)};le.useTransition=function(){return He.H.useTransition()};le.version="19.2.4";y0.exports=le;var v=y0.exports;const Ze=Ac(v),aC=BE({__proto__:null,default:Ze},[v]);var E0={exports:{}},Oc={},C0={exports:{}},T0={};/**
|
|
18
|
+
* @license React
|
|
19
|
+
* scheduler.production.js
|
|
20
|
+
*
|
|
21
|
+
* Copyright (c) Meta Platforms, Inc. and 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(D,q){var V=D.length;D.push(q);e:for(;0<V;){var ae=V-1>>>1,w=D[ae];if(0<a(w,q))D[ae]=q,D[V]=w,V=ae;else break e}}function n(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var q=D[0],V=D.pop();if(V!==q){D[0]=V;e:for(var ae=0,w=D.length,Me=w>>>1;ae<Me;){var qe=2*(ae+1)-1,A=D[qe],Ce=qe+1,be=D[Ce];if(0>a(A,V))Ce<w&&0>a(be,A)?(D[ae]=be,D[Ce]=V,ae=Ce):(D[ae]=A,D[qe]=V,ae=qe);else if(Ce<w&&0>a(be,V))D[ae]=be,D[Ce]=V,ae=Ce;else break e}}return q}function a(D,q){var V=D.sortIndex-q.sortIndex;return V!==0?V:D.id-q.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var l=Date,o=l.now();e.unstable_now=function(){return l.now()-o}}var s=[],u=[],c=1,f=null,d=3,h=!1,b=!1,y=!1,_=!1,p=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;function S(D){for(var q=n(u);q!==null;){if(q.callback===null)r(u);else if(q.startTime<=D)r(u),q.sortIndex=q.expirationTime,t(s,q);else break;q=n(u)}}function k(D){if(y=!1,S(D),!b)if(n(s)!==null)b=!0,E||(E=!0,B());else{var q=n(u);q!==null&&F(k,q.startTime-D)}}var E=!1,T=-1,O=5,z=-1;function P(){return _?!0:!(e.unstable_now()-z<O)}function $(){if(_=!1,E){var D=e.unstable_now();z=D;var q=!0;try{e:{b=!1,y&&(y=!1,g(T),T=-1),h=!0;var V=d;try{t:{for(S(D),f=n(s);f!==null&&!(f.expirationTime>D&&P());){var ae=f.callback;if(typeof ae=="function"){f.callback=null,d=f.priorityLevel;var w=ae(f.expirationTime<=D);if(D=e.unstable_now(),typeof w=="function"){f.callback=w,S(D),q=!0;break t}f===n(s)&&r(s),S(D)}else r(s);f=n(s)}if(f!==null)q=!0;else{var Me=n(u);Me!==null&&F(k,Me.startTime-D),q=!1}}break e}finally{f=null,d=V,h=!1}q=void 0}}finally{q?B():E=!1}}}var B;if(typeof m=="function")B=function(){m($)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,H=U.port2;U.port1.onmessage=$,B=function(){H.postMessage(null)}}else B=function(){p($,0)};function F(D,q){T=p(function(){D(e.unstable_now())},q)}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(D){D.callback=null},e.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):O=0<D?Math.floor(1e3/D):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(D){switch(d){case 1:case 2:case 3:var q=3;break;default:q=d}var V=d;d=q;try{return D()}finally{d=V}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(D,q){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var V=d;d=D;try{return q()}finally{d=V}},e.unstable_scheduleCallback=function(D,q,V){var ae=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ae+V:ae):V=ae,D){case 1:var w=-1;break;case 2:w=250;break;case 5:w=1073741823;break;case 4:w=1e4;break;default:w=5e3}return w=V+w,D={id:c++,callback:q,priorityLevel:D,startTime:V,expirationTime:w,sortIndex:-1},V>ae?(D.sortIndex=V,t(u,D),n(s)===null&&D===n(u)&&(y?(g(T),T=-1):y=!0,F(k,V-ae))):(D.sortIndex=w,t(s,D),b||h||(b=!0,E||(E=!0,B()))),D},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(D){var q=d;return function(){var V=d;d=q;try{return D.apply(this,arguments)}finally{d=V}}}})(T0);C0.exports=T0;var iC=C0.exports,A0={exports:{}},jt={};/**
|
|
26
|
+
* @license React
|
|
27
|
+
* react-dom.production.js
|
|
28
|
+
*
|
|
29
|
+
* Copyright (c) Meta Platforms, Inc. and 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 lC=v;function k0(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function Rr(){}var Mt={d:{f:Rr,r:function(){throw Error(k0(522))},D:Rr,C:Rr,L:Rr,m:Rr,X:Rr,S:Rr,M:Rr},p:0,findDOMNode:null},oC=Symbol.for("react.portal");function sC(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:oC,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var xo=lC.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Nc(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Mt;jt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(k0(299));return sC(e,t,null,n)};jt.flushSync=function(e){var t=xo.T,n=Mt.p;try{if(xo.T=null,Mt.p=2,e)return e()}finally{xo.T=t,Mt.p=n,Mt.d.f()}};jt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Mt.d.C(e,t))};jt.prefetchDNS=function(e){typeof e=="string"&&Mt.d.D(e)};jt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Nc(n,t.crossOrigin),a=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Mt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:i}):n==="script"&&Mt.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};jt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Nc(t.as,t.crossOrigin);Mt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Mt.d.M(e)};jt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Nc(n,t.crossOrigin);Mt.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};jt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Nc(t.as,t.crossOrigin);Mt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Mt.d.m(e)};jt.requestFormReset=function(e){Mt.d.r(e)};jt.unstable_batchedUpdates=function(e,t){return e(t)};jt.useFormState=function(e,t,n){return xo.H.useFormState(e,t,n)};jt.useFormStatus=function(){return xo.H.useHostTransitionStatus()};jt.version="19.2.4";function O0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(O0)}catch(e){console.error(e)}}O0(),A0.exports=jt;var N0=A0.exports;/**
|
|
34
|
+
* @license React
|
|
35
|
+
* react-dom-client.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*/var pt=iC,z0=v,uC=N0;function L(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;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."}function R0(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function cs(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 M0(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 j0(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function og(e){if(cs(e)!==e)throw Error(L(188))}function cC(e){var t=e.alternate;if(!t){if(t=cs(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return og(a),e;if(i===r)return og(a),t;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=a,r=i;else{for(var l=!1,o=a.child;o;){if(o===n){l=!0,n=a,r=i;break}if(o===r){l=!0,r=a,n=i;break}o=o.sibling}if(!l){for(o=i.child;o;){if(o===n){l=!0,n=i,r=a;break}if(o===r){l=!0,r=i,n=a;break}o=o.sibling}if(!l)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function D0(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=D0(e),t!==null)return t;e=e.sibling}return null}var Fe=Object.assign,fC=Symbol.for("react.element"),Ms=Symbol.for("react.transitional.element"),po=Symbol.for("react.portal"),Li=Symbol.for("react.fragment"),L0=Symbol.for("react.strict_mode"),Ed=Symbol.for("react.profiler"),U0=Symbol.for("react.consumer"),gr=Symbol.for("react.context"),hp=Symbol.for("react.forward_ref"),Cd=Symbol.for("react.suspense"),Td=Symbol.for("react.suspense_list"),pp=Symbol.for("react.memo"),Br=Symbol.for("react.lazy"),Ad=Symbol.for("react.activity"),dC=Symbol.for("react.memo_cache_sentinel"),sg=Symbol.iterator;function eo(e){return e===null||typeof e!="object"?null:(e=sg&&e[sg]||e["@@iterator"],typeof e=="function"?e:null)}var hC=Symbol.for("react.client.reference");function kd(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===hC?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Li:return"Fragment";case Ed:return"Profiler";case L0:return"StrictMode";case Cd:return"Suspense";case Td:return"SuspenseList";case Ad:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case po:return"Portal";case gr:return e.displayName||"Context";case U0:return(e._context.displayName||"Context")+".Consumer";case hp:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case pp:return t=e.displayName||null,t!==null?t:kd(e.type)||"Memo";case Br:t=e._payload,e=e._init;try{return kd(e(t))}catch{}}return null}var mo=Array.isArray,re=z0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ee=uC.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ei={pending:!1,data:null,method:null,action:null},Od=[],Ui=-1;function Yn(e){return{current:e}}function vt(e){0>Ui||(e.current=Od[Ui],Od[Ui]=null,Ui--)}function Ue(e,t){Ui++,Od[Ui]=e.current,e.current=t}var Gn=Yn(null),Po=Yn(null),oa=Yn(null),Lu=Yn(null);function Uu(e,t){switch(Ue(oa,t),Ue(Po,e),Ue(Gn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?py(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=py(t),e=r1(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}vt(Gn),Ue(Gn,e)}function Sl(){vt(Gn),vt(Po),vt(oa)}function Nd(e){e.memoizedState!==null&&Ue(Lu,e);var t=Gn.current,n=r1(t,e.type);t!==n&&(Ue(Po,e),Ue(Gn,n))}function Pu(e){Po.current===e&&(vt(Gn),vt(Po)),Lu.current===e&&(vt(Lu),Yo._currentValue=ei)}var df,ug;function Ua(e){if(df===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);df=t&&t[1]||"",ug=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+df+e+ug}var hf=!1;function pf(e,t){if(!e||hf)return"";hf=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(h){var d=h}Reflect.construct(e,[],f)}else{try{f.call()}catch(h){d=h}e.call(f.prototype)}}else{try{throw Error()}catch(h){d=h}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(h){if(h&&d&&typeof h.stack=="string")return[h.stack,d.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=r.DetermineComponentFrameRoot(),l=i[0],o=i[1];if(l&&o){var s=l.split(`
|
|
44
|
+
`),u=o.split(`
|
|
45
|
+
`);for(a=r=0;r<s.length&&!s[r].includes("DetermineComponentFrameRoot");)r++;for(;a<u.length&&!u[a].includes("DetermineComponentFrameRoot");)a++;if(r===s.length||a===u.length)for(r=s.length-1,a=u.length-1;1<=r&&0<=a&&s[r]!==u[a];)a--;for(;1<=r&&0<=a;r--,a--)if(s[r]!==u[a]){if(r!==1||a!==1)do if(r--,a--,0>a||s[r]!==u[a]){var c=`
|
|
46
|
+
`+s[r].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=r&&0<=a);break}}}finally{hf=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ua(n):""}function pC(e,t){switch(e.tag){case 26:case 27:case 5:return Ua(e.type);case 16:return Ua("Lazy");case 13:return e.child!==t&&t!==null?Ua("Suspense Fallback"):Ua("Suspense");case 19:return Ua("SuspenseList");case 0:case 15:return pf(e.type,!1);case 11:return pf(e.type.render,!1);case 1:return pf(e.type,!0);case 31:return Ua("Activity");default:return""}}function cg(e){try{var t="",n=null;do t+=pC(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var zd=Object.prototype.hasOwnProperty,mp=pt.unstable_scheduleCallback,mf=pt.unstable_cancelCallback,mC=pt.unstable_shouldYield,gC=pt.unstable_requestPaint,sn=pt.unstable_now,yC=pt.unstable_getCurrentPriorityLevel,P0=pt.unstable_ImmediatePriority,B0=pt.unstable_UserBlockingPriority,Bu=pt.unstable_NormalPriority,vC=pt.unstable_LowPriority,$0=pt.unstable_IdlePriority,bC=pt.log,SC=pt.unstable_setDisableYieldValue,fs=null,un=null;function ea(e){if(typeof bC=="function"&&SC(e),un&&typeof un.setStrictMode=="function")try{un.setStrictMode(fs,e)}catch{}}var cn=Math.clz32?Math.clz32:wC,xC=Math.log,_C=Math.LN2;function wC(e){return e>>>=0,e===0?32:31-(xC(e)/_C|0)|0}var js=256,Ds=262144,Ls=4194304;function Pa(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function zc(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var a=0,i=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~i,r!==0?a=Pa(r):(l&=o,l!==0?a=Pa(l):n||(n=o&~e,n!==0&&(a=Pa(n))))):(o=r&~i,o!==0?a=Pa(o):l!==0?a=Pa(l):n||(n=r&~e,n!==0&&(a=Pa(n)))),a===0?0:t!==0&&t!==a&&!(t&i)&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function ds(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function EC(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function I0(){var e=Ls;return Ls<<=1,!(Ls&62914560)&&(Ls=4194304),e}function gf(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function hs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function CC(e,t,n,r,a,i){var l=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,s=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-cn(n),f=1<<c;o[c]=0,s[c]=-1;var d=u[c];if(d!==null)for(u[c]=null,c=0;c<d.length;c++){var h=d[c];h!==null&&(h.lane&=-536870913)}n&=~f}r!==0&&Z0(e,r,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(l&~t))}function Z0(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-cn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function H0(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-cn(n),a=1<<r;a&t|e[r]&t&&(e[r]|=t),n&=~a}}function F0(e,t){var n=t&-t;return n=n&42?1:gp(n),n&(e.suspendedLanes|t)?0:n}function gp(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function yp(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function q0(){var e=Ee.p;return e!==0?e:(e=window.event,e===void 0?32:p1(e.type))}function fg(e,t){var n=Ee.p;try{return Ee.p=e,t()}finally{Ee.p=n}}var Ta=Math.random().toString(36).slice(2),St="__reactFiber$"+Ta,Qt="__reactProps$"+Ta,Pl="__reactContainer$"+Ta,Rd="__reactEvents$"+Ta,TC="__reactListeners$"+Ta,AC="__reactHandles$"+Ta,dg="__reactResources$"+Ta,ps="__reactMarker$"+Ta;function vp(e){delete e[St],delete e[Qt],delete e[Rd],delete e[TC],delete e[AC]}function Pi(e){var t=e[St];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Pl]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=by(e);e!==null;){if(n=e[St])return n;e=by(e)}return t}e=n,n=e.parentNode}return null}function Bl(e){if(e=e[St]||e[Pl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function go(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(L(33))}function Ji(e){var t=e[dg];return t||(t=e[dg]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function yt(e){e[ps]=!0}var G0=new Set,V0={};function hi(e,t){xl(e,t),xl(e+"Capture",t)}function xl(e,t){for(V0[e]=t,e=0;e<t.length;e++)G0.add(t[e])}var kC=RegExp("^[: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]*$"),hg={},pg={};function OC(e){return zd.call(pg,e)?!0:zd.call(hg,e)?!1:kC.test(e)?pg[e]=!0:(hg[e]=!0,!1)}function hu(e,t,n){if(OC(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Us(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function nr(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function bn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Q0(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function NC(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(l){n=""+l,i.call(this,l)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(l){n=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Md(e){if(!e._valueTracker){var t=Q0(e)?"checked":"value";e._valueTracker=NC(e,t,""+e[t])}}function Y0(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Q0(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function $u(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}}var zC=/[\n"\\]/g;function wn(e){return e.replace(zC,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function jd(e,t,n,r,a,i,l,o){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+bn(t)):e.value!==""+bn(t)&&(e.value=""+bn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?Dd(e,l,bn(t)):n!=null?Dd(e,l,bn(n)):r!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+bn(o):e.removeAttribute("name")}function X0(e,t,n,r,a,i,l,o){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Md(e);return}n=n!=null?""+bn(n):"",t=t!=null?""+bn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??a,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l),Md(e)}function Dd(e,t,n){t==="number"&&$u(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ki(e,t,n,r){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&r&&(e[n].defaultSelected=!0)}else{for(n=""+bn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,r&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function J0(e,t,n){if(t!=null&&(t=""+bn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+bn(n):""}function K0(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(L(92));if(mo(r)){if(1<r.length)throw Error(L(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=bn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Md(e)}function _l(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var RC=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function mg(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||RC.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function W0(e,t,n){if(t!=null&&typeof t!="object")throw Error(L(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&mg(e,a,r)}else for(var i in t)t.hasOwnProperty(i)&&mg(e,i,t[i])}function bp(e){if(e.indexOf("-")===-1)return!1;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 MC=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),jC=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function pu(e){return jC.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yr(){}var Ld=null;function Sp(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bi=null,Wi=null;function gg(e){var t=Bl(e);if(t&&(e=t.stateNode)){var n=e[Qt]||null;e:switch(e=t.stateNode,t.type){case"input":if(jd(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+wn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Qt]||null;if(!a)throw Error(L(90));jd(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Y0(r)}break e;case"textarea":J0(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ki(e,!!n.multiple,t,!1)}}}var yf=!1;function eS(e,t,n){if(yf)return e(t,n);yf=!0;try{var r=e(t);return r}finally{if(yf=!1,(Bi!==null||Wi!==null)&&(Hc(),Bi&&(t=Bi,e=Wi,Wi=Bi=null,gg(t),e)))for(t=0;t<e.length;t++)gg(e[t])}}function Bo(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Qt]||null;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(L(231,t,typeof n));return n}var wr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ud=!1;if(wr)try{var to={};Object.defineProperty(to,"passive",{get:function(){Ud=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{Ud=!1}var ta=null,xp=null,mu=null;function tS(){if(mu)return mu;var e,t=xp,n=t.length,r,a="value"in ta?ta.value:ta.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var l=n-e;for(r=1;r<=l&&t[n-r]===a[i-r];r++);return mu=a.slice(e,1<r?1-r:void 0)}function gu(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 Ps(){return!0}function yg(){return!1}function Yt(e){function t(n,r,a,i,l){this._reactName=n,this._targetInst=a,this.type=r,this.nativeEvent=i,this.target=l,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ps:yg,this.isPropagationStopped=yg,this}return Fe(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=Ps)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ps)},persist:function(){},isPersistent:Ps}),t}var pi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rc=Yt(pi),ms=Fe({},pi,{view:0,detail:0}),DC=Yt(ms),vf,bf,no,Mc=Fe({},ms,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_p,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!==no&&(no&&e.type==="mousemove"?(vf=e.screenX-no.screenX,bf=e.screenY-no.screenY):bf=vf=0,no=e),vf)},movementY:function(e){return"movementY"in e?e.movementY:bf}}),vg=Yt(Mc),LC=Fe({},Mc,{dataTransfer:0}),UC=Yt(LC),PC=Fe({},ms,{relatedTarget:0}),Sf=Yt(PC),BC=Fe({},pi,{animationName:0,elapsedTime:0,pseudoElement:0}),$C=Yt(BC),IC=Fe({},pi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ZC=Yt(IC),HC=Fe({},pi,{data:0}),bg=Yt(HC),FC={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},qC={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"},GC={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function VC(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=GC[e])?!!t[e]:!1}function _p(){return VC}var QC=Fe({},ms,{key:function(e){if(e.key){var t=FC[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=gu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?qC[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_p,charCode:function(e){return e.type==="keypress"?gu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?gu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),YC=Yt(QC),XC=Fe({},Mc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sg=Yt(XC),JC=Fe({},ms,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_p}),KC=Yt(JC),WC=Fe({},pi,{propertyName:0,elapsedTime:0,pseudoElement:0}),eT=Yt(WC),tT=Fe({},Mc,{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}),nT=Yt(tT),rT=Fe({},pi,{newState:0,oldState:0}),aT=Yt(rT),iT=[9,13,27,32],wp=wr&&"CompositionEvent"in window,_o=null;wr&&"documentMode"in document&&(_o=document.documentMode);var lT=wr&&"TextEvent"in window&&!_o,nS=wr&&(!wp||_o&&8<_o&&11>=_o),xg=" ",_g=!1;function rS(e,t){switch(e){case"keyup":return iT.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function aS(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $i=!1;function oT(e,t){switch(e){case"compositionend":return aS(t);case"keypress":return t.which!==32?null:(_g=!0,xg);case"textInput":return e=t.data,e===xg&&_g?null:e;default:return null}}function sT(e,t){if($i)return e==="compositionend"||!wp&&rS(e,t)?(e=tS(),mu=xp=ta=null,$i=!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 nS&&t.locale!=="ko"?null:t.data;default:return null}}var uT={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 wg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!uT[e.type]:t==="textarea"}function iS(e,t,n,r){Bi?Wi?Wi.push(r):Wi=[r]:Bi=r,t=ac(t,"onChange"),0<t.length&&(n=new Rc("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var wo=null,$o=null;function cT(e){e1(e,0)}function jc(e){var t=go(e);if(Y0(t))return e}function Eg(e,t){if(e==="change")return t}var lS=!1;if(wr){var xf;if(wr){var _f="oninput"in document;if(!_f){var Cg=document.createElement("div");Cg.setAttribute("oninput","return;"),_f=typeof Cg.oninput=="function"}xf=_f}else xf=!1;lS=xf&&(!document.documentMode||9<document.documentMode)}function Tg(){wo&&(wo.detachEvent("onpropertychange",oS),$o=wo=null)}function oS(e){if(e.propertyName==="value"&&jc($o)){var t=[];iS(t,$o,e,Sp(e)),eS(cT,t)}}function fT(e,t,n){e==="focusin"?(Tg(),wo=t,$o=n,wo.attachEvent("onpropertychange",oS)):e==="focusout"&&Tg()}function dT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return jc($o)}function hT(e,t){if(e==="click")return jc(t)}function pT(e,t){if(e==="input"||e==="change")return jc(t)}function mT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dn=typeof Object.is=="function"?Object.is:mT;function Io(e,t){if(dn(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 a=n[r];if(!zd.call(t,a)||!dn(e[a],t[a]))return!1}return!0}function Ag(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function kg(e,t){var n=Ag(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=Ag(n)}}function sS(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?sS(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uS(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$u(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=$u(e.document)}return t}function Ep(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")}var gT=wr&&"documentMode"in document&&11>=document.documentMode,Ii=null,Pd=null,Eo=null,Bd=!1;function Og(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Bd||Ii==null||Ii!==$u(r)||(r=Ii,"selectionStart"in r&&Ep(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}),Eo&&Io(Eo,r)||(Eo=r,r=ac(Pd,"onSelect"),0<r.length&&(t=new Rc("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ii)))}function Da(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Zi={animationend:Da("Animation","AnimationEnd"),animationiteration:Da("Animation","AnimationIteration"),animationstart:Da("Animation","AnimationStart"),transitionrun:Da("Transition","TransitionRun"),transitionstart:Da("Transition","TransitionStart"),transitioncancel:Da("Transition","TransitionCancel"),transitionend:Da("Transition","TransitionEnd")},wf={},cS={};wr&&(cS=document.createElement("div").style,"AnimationEvent"in window||(delete Zi.animationend.animation,delete Zi.animationiteration.animation,delete Zi.animationstart.animation),"TransitionEvent"in window||delete Zi.transitionend.transition);function mi(e){if(wf[e])return wf[e];if(!Zi[e])return e;var t=Zi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in cS)return wf[e]=t[n];return e}var fS=mi("animationend"),dS=mi("animationiteration"),hS=mi("animationstart"),yT=mi("transitionrun"),vT=mi("transitionstart"),bT=mi("transitioncancel"),pS=mi("transitionend"),mS=new Map,$d="abort auxClick beforeToggle 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(" ");$d.push("scrollEnd");function Dn(e,t){mS.set(e,t),hi(t,[e])}var Iu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},gn=[],Hi=0,Cp=0;function Dc(){for(var e=Hi,t=Cp=Hi=0;t<e;){var n=gn[t];gn[t++]=null;var r=gn[t];gn[t++]=null;var a=gn[t];gn[t++]=null;var i=gn[t];if(gn[t++]=null,r!==null&&a!==null){var l=r.pending;l===null?a.next=a:(a.next=l.next,l.next=a),r.pending=a}i!==0&&gS(n,a,i)}}function Lc(e,t,n,r){gn[Hi++]=e,gn[Hi++]=t,gn[Hi++]=n,gn[Hi++]=r,Cp|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Tp(e,t,n,r){return Lc(e,t,n,r),Zu(e)}function gi(e,t){return Lc(e,null,null,t),Zu(e)}function gS(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,r=i.alternate,r!==null&&(r.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-cn(n),e=i.hiddenUpdates,r=e[a],r===null?e[a]=[t]:r.push(t),t.lane=n|536870912),i):null}function Zu(e){if(50<Mo)throw Mo=0,oh=null,Error(L(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Fi={};function ST(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.refCleanup=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 an(e,t,n,r){return new ST(e,t,n,r)}function Ap(e){return e=e.prototype,!(!e||!e.isReactComponent)}function br(e,t){var n=e.alternate;return n===null?(n=an(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&65011712,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.refCleanup=e.refCleanup,n}function yS(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function yu(e,t,n,r,a,i){var l=0;if(r=e,typeof e=="function")Ap(e)&&(l=1);else if(typeof e=="string")l=CA(e,n,Gn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Ad:return e=an(31,n,t,a),e.elementType=Ad,e.lanes=i,e;case Li:return ti(n.children,a,i,t);case L0:l=8,a|=24;break;case Ed:return e=an(12,n,t,a|2),e.elementType=Ed,e.lanes=i,e;case Cd:return e=an(13,n,t,a),e.elementType=Cd,e.lanes=i,e;case Td:return e=an(19,n,t,a),e.elementType=Td,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gr:l=10;break e;case U0:l=9;break e;case hp:l=11;break e;case pp:l=14;break e;case Br:l=16,r=null;break e}l=29,n=Error(L(130,e===null?"null":typeof e,"")),r=null}return t=an(l,n,t,a),t.elementType=e,t.type=r,t.lanes=i,t}function ti(e,t,n,r){return e=an(7,e,r,t),e.lanes=n,e}function Ef(e,t,n){return e=an(6,e,null,t),e.lanes=n,e}function vS(e){var t=an(18,null,null,0);return t.stateNode=e,t}function Cf(e,t,n){return t=an(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ng=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var n=Ng.get(e);return n!==void 0?n:(t={value:e,source:t,stack:cg(t)},Ng.set(e,t),t)}return{value:e,source:t,stack:cg(t)}}var qi=[],Gi=0,Hu=null,Zo=0,Sn=[],xn=0,Sa=null,Hn=1,Fn="";function ur(e,t){qi[Gi++]=Zo,qi[Gi++]=Hu,Hu=e,Zo=t}function bS(e,t,n){Sn[xn++]=Hn,Sn[xn++]=Fn,Sn[xn++]=Sa,Sa=e;var r=Hn;e=Fn;var a=32-cn(r)-1;r&=~(1<<a),n+=1;var i=32-cn(t)+a;if(30<i){var l=a-a%5;i=(r&(1<<l)-1).toString(32),r>>=l,a-=l,Hn=1<<32-cn(t)+a|n<<a|r,Fn=i+e}else Hn=1<<i|n<<a|r,Fn=e}function kp(e){e.return!==null&&(ur(e,1),bS(e,1,0))}function Op(e){for(;e===Hu;)Hu=qi[--Gi],qi[Gi]=null,Zo=qi[--Gi],qi[Gi]=null;for(;e===Sa;)Sa=Sn[--xn],Sn[xn]=null,Fn=Sn[--xn],Sn[xn]=null,Hn=Sn[--xn],Sn[xn]=null}function SS(e,t){Sn[xn++]=Hn,Sn[xn++]=Fn,Sn[xn++]=Sa,Hn=t.id,Fn=t.overflow,Sa=e}var xt=null,Ie=null,ye=!1,sa=null,Cn=!1,Id=Error(L(519));function xa(e){var t=Error(L(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ho(En(t,e)),Id}function zg(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[St]=e,t[Qt]=r,n){case"dialog":he("cancel",t),he("close",t);break;case"iframe":case"object":case"embed":he("load",t);break;case"video":case"audio":for(n=0;n<Vo.length;n++)he(Vo[n],t);break;case"source":he("error",t);break;case"img":case"image":case"link":he("error",t),he("load",t);break;case"details":he("toggle",t);break;case"input":he("invalid",t),X0(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":he("invalid",t);break;case"textarea":he("invalid",t),K0(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||n1(t.textContent,n)?(r.popover!=null&&(he("beforetoggle",t),he("toggle",t)),r.onScroll!=null&&he("scroll",t),r.onScrollEnd!=null&&he("scrollend",t),r.onClick!=null&&(t.onclick=yr),t=!0):t=!1,t||xa(e,!0)}function Rg(e){for(xt=e.return;xt;)switch(xt.tag){case 5:case 31:case 13:Cn=!1;return;case 27:case 3:Cn=!0;return;default:xt=xt.return}}function wi(e){if(e!==xt)return!1;if(!ye)return Rg(e),ye=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||dh(e.type,e.memoizedProps)),n=!n),n&&Ie&&xa(e),Rg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ie=vy(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));Ie=vy(e)}else t===27?(t=Ie,Aa(e.type)?(e=gh,gh=null,Ie=e):Ie=t):Ie=xt?An(e.stateNode.nextSibling):null;return!0}function ii(){Ie=xt=null,ye=!1}function Tf(){var e=sa;return e!==null&&(qt===null?qt=e:qt.push.apply(qt,e),sa=null),e}function Ho(e){sa===null?sa=[e]:sa.push(e)}var Zd=Yn(null),yi=null,vr=null;function Ir(e,t,n){Ue(Zd,t._currentValue),t._currentValue=n}function Sr(e){e._currentValue=Zd.current,vt(Zd)}function Hd(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 Fd(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var l=a.child;i=i.firstContext;e:for(;i!==null;){var o=i;i=a;for(var s=0;s<t.length;s++)if(o.context===t[s]){i.lanes|=n,o=i.alternate,o!==null&&(o.lanes|=n),Hd(i.return,n,e),r||(l=null);break e}i=o.next}}else if(a.tag===18){if(l=a.return,l===null)throw Error(L(341));l.lanes|=n,i=l.alternate,i!==null&&(i.lanes|=n),Hd(l,n,e),l=null}else l=a.child;if(l!==null)l.return=a;else for(l=a;l!==null;){if(l===e){l=null;break}if(a=l.sibling,a!==null){a.return=l.return,l=a;break}l=l.return}a=l}}function $l(e,t,n,r){e=null;for(var a=t,i=!1;a!==null;){if(!i){if(a.flags&524288)i=!0;else if(a.flags&262144)break}if(a.tag===10){var l=a.alternate;if(l===null)throw Error(L(387));if(l=l.memoizedProps,l!==null){var o=a.type;dn(a.pendingProps.value,l.value)||(e!==null?e.push(o):e=[o])}}else if(a===Lu.current){if(l=a.alternate,l===null)throw Error(L(387));l.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Yo):e=[Yo])}a=a.return}e!==null&&Fd(t,e,n,r),t.flags|=262144}function Fu(e){for(e=e.firstContext;e!==null;){if(!dn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function li(e){yi=e,vr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return xS(yi,e)}function Bs(e,t){return yi===null&&li(e),xS(e,t)}function xS(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},vr===null){if(e===null)throw Error(L(308));vr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vr=vr.next=t;return n}var xT=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},_T=pt.unstable_scheduleCallback,wT=pt.unstable_NormalPriority,st={$$typeof:gr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Np(){return{controller:new xT,data:new Map,refCount:0}}function gs(e){e.refCount--,e.refCount===0&&_T(wT,function(){e.controller.abort()})}var Co=null,qd=0,wl=0,el=null;function ET(e,t){if(Co===null){var n=Co=[];qd=0,wl=tm(),el={status:"pending",value:void 0,then:function(r){n.push(r)}}}return qd++,t.then(Mg,Mg),t}function Mg(){if(--qd===0&&Co!==null){el!==null&&(el.status="fulfilled");var e=Co;Co=null,wl=0,el=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function CT(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(r.status="rejected",r.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),r}var jg=re.S;re.S=function(e,t){Dx=sn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&ET(e,t),jg!==null&&jg(e,t)};var ni=Yn(null);function zp(){var e=ni.current;return e!==null?e:Re.pooledCache}function vu(e,t){t===null?Ue(ni,ni.current):Ue(ni,t.pool)}function _S(){var e=zp();return e===null?null:{parent:st._currentValue,pool:e}}var Il=Error(L(460)),Rp=Error(L(474)),Uc=Error(L(542)),qu={then:function(){}};function Dg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function wS(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(yr,yr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ug(e),e;default:if(typeof t.status=="string")t.then(yr,yr);else{if(e=Re,e!==null&&100<e.shellSuspendCounter)throw Error(L(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=r}},function(r){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Ug(e),e}throw ri=t,Il}}function Ba(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ri=n,Il):n}}var ri=null;function Lg(){if(ri===null)throw Error(L(459));var e=ri;return ri=null,e}function Ug(e){if(e===Il||e===Uc)throw Error(L(483))}var tl=null,Fo=0;function $s(e){var t=Fo;return Fo+=1,tl===null&&(tl=[]),wS(tl,e,t)}function ro(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Is(e,t){throw t.$$typeof===fC?Error(L(525)):(e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ES(e){function t(p,g){if(e){var m=p.deletions;m===null?(p.deletions=[g],p.flags|=16):m.push(g)}}function n(p,g){if(!e)return null;for(;g!==null;)t(p,g),g=g.sibling;return null}function r(p){for(var g=new Map;p!==null;)p.key!==null?g.set(p.key,p):g.set(p.index,p),p=p.sibling;return g}function a(p,g){return p=br(p,g),p.index=0,p.sibling=null,p}function i(p,g,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<g?(p.flags|=67108866,g):m):(p.flags|=67108866,g)):(p.flags|=1048576,g)}function l(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function o(p,g,m,S){return g===null||g.tag!==6?(g=Ef(m,p.mode,S),g.return=p,g):(g=a(g,m),g.return=p,g)}function s(p,g,m,S){var k=m.type;return k===Li?c(p,g,m.props.children,S,m.key):g!==null&&(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Br&&Ba(k)===g.type)?(g=a(g,m.props),ro(g,m),g.return=p,g):(g=yu(m.type,m.key,m.props,null,p.mode,S),ro(g,m),g.return=p,g)}function u(p,g,m,S){return g===null||g.tag!==4||g.stateNode.containerInfo!==m.containerInfo||g.stateNode.implementation!==m.implementation?(g=Cf(m,p.mode,S),g.return=p,g):(g=a(g,m.children||[]),g.return=p,g)}function c(p,g,m,S,k){return g===null||g.tag!==7?(g=ti(m,p.mode,S,k),g.return=p,g):(g=a(g,m),g.return=p,g)}function f(p,g,m){if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return g=Ef(""+g,p.mode,m),g.return=p,g;if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Ms:return m=yu(g.type,g.key,g.props,null,p.mode,m),ro(m,g),m.return=p,m;case po:return g=Cf(g,p.mode,m),g.return=p,g;case Br:return g=Ba(g),f(p,g,m)}if(mo(g)||eo(g))return g=ti(g,p.mode,m,null),g.return=p,g;if(typeof g.then=="function")return f(p,$s(g),m);if(g.$$typeof===gr)return f(p,Bs(p,g),m);Is(p,g)}return null}function d(p,g,m,S){var k=g!==null?g.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return k!==null?null:o(p,g,""+m,S);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ms:return m.key===k?s(p,g,m,S):null;case po:return m.key===k?u(p,g,m,S):null;case Br:return m=Ba(m),d(p,g,m,S)}if(mo(m)||eo(m))return k!==null?null:c(p,g,m,S,null);if(typeof m.then=="function")return d(p,g,$s(m),S);if(m.$$typeof===gr)return d(p,g,Bs(p,m),S);Is(p,m)}return null}function h(p,g,m,S,k){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return p=p.get(m)||null,o(g,p,""+S,k);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ms:return p=p.get(S.key===null?m:S.key)||null,s(g,p,S,k);case po:return p=p.get(S.key===null?m:S.key)||null,u(g,p,S,k);case Br:return S=Ba(S),h(p,g,m,S,k)}if(mo(S)||eo(S))return p=p.get(m)||null,c(g,p,S,k,null);if(typeof S.then=="function")return h(p,g,m,$s(S),k);if(S.$$typeof===gr)return h(p,g,m,Bs(g,S),k);Is(g,S)}return null}function b(p,g,m,S){for(var k=null,E=null,T=g,O=g=0,z=null;T!==null&&O<m.length;O++){T.index>O?(z=T,T=null):z=T.sibling;var P=d(p,T,m[O],S);if(P===null){T===null&&(T=z);break}e&&T&&P.alternate===null&&t(p,T),g=i(P,g,O),E===null?k=P:E.sibling=P,E=P,T=z}if(O===m.length)return n(p,T),ye&&ur(p,O),k;if(T===null){for(;O<m.length;O++)T=f(p,m[O],S),T!==null&&(g=i(T,g,O),E===null?k=T:E.sibling=T,E=T);return ye&&ur(p,O),k}for(T=r(T);O<m.length;O++)z=h(T,p,O,m[O],S),z!==null&&(e&&z.alternate!==null&&T.delete(z.key===null?O:z.key),g=i(z,g,O),E===null?k=z:E.sibling=z,E=z);return e&&T.forEach(function($){return t(p,$)}),ye&&ur(p,O),k}function y(p,g,m,S){if(m==null)throw Error(L(151));for(var k=null,E=null,T=g,O=g=0,z=null,P=m.next();T!==null&&!P.done;O++,P=m.next()){T.index>O?(z=T,T=null):z=T.sibling;var $=d(p,T,P.value,S);if($===null){T===null&&(T=z);break}e&&T&&$.alternate===null&&t(p,T),g=i($,g,O),E===null?k=$:E.sibling=$,E=$,T=z}if(P.done)return n(p,T),ye&&ur(p,O),k;if(T===null){for(;!P.done;O++,P=m.next())P=f(p,P.value,S),P!==null&&(g=i(P,g,O),E===null?k=P:E.sibling=P,E=P);return ye&&ur(p,O),k}for(T=r(T);!P.done;O++,P=m.next())P=h(T,p,O,P.value,S),P!==null&&(e&&P.alternate!==null&&T.delete(P.key===null?O:P.key),g=i(P,g,O),E===null?k=P:E.sibling=P,E=P);return e&&T.forEach(function(B){return t(p,B)}),ye&&ur(p,O),k}function _(p,g,m,S){if(typeof m=="object"&&m!==null&&m.type===Li&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Ms:e:{for(var k=m.key;g!==null;){if(g.key===k){if(k=m.type,k===Li){if(g.tag===7){n(p,g.sibling),S=a(g,m.props.children),S.return=p,p=S;break e}}else if(g.elementType===k||typeof k=="object"&&k!==null&&k.$$typeof===Br&&Ba(k)===g.type){n(p,g.sibling),S=a(g,m.props),ro(S,m),S.return=p,p=S;break e}n(p,g);break}else t(p,g);g=g.sibling}m.type===Li?(S=ti(m.props.children,p.mode,S,m.key),S.return=p,p=S):(S=yu(m.type,m.key,m.props,null,p.mode,S),ro(S,m),S.return=p,p=S)}return l(p);case po:e:{for(k=m.key;g!==null;){if(g.key===k)if(g.tag===4&&g.stateNode.containerInfo===m.containerInfo&&g.stateNode.implementation===m.implementation){n(p,g.sibling),S=a(g,m.children||[]),S.return=p,p=S;break e}else{n(p,g);break}else t(p,g);g=g.sibling}S=Cf(m,p.mode,S),S.return=p,p=S}return l(p);case Br:return m=Ba(m),_(p,g,m,S)}if(mo(m))return b(p,g,m,S);if(eo(m)){if(k=eo(m),typeof k!="function")throw Error(L(150));return m=k.call(m),y(p,g,m,S)}if(typeof m.then=="function")return _(p,g,$s(m),S);if(m.$$typeof===gr)return _(p,g,Bs(p,m),S);Is(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,g!==null&&g.tag===6?(n(p,g.sibling),S=a(g,m),S.return=p,p=S):(n(p,g),S=Ef(m,p.mode,S),S.return=p,p=S),l(p)):n(p,g)}return function(p,g,m,S){try{Fo=0;var k=_(p,g,m,S);return tl=null,k}catch(T){if(T===Il||T===Uc)throw T;var E=an(29,T,null,p.mode);return E.lanes=S,E.return=p,E}finally{}}}var oi=ES(!0),CS=ES(!1),$r=!1;function Mp(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Gd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ua(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ca(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,we&2){var a=r.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),r.pending=t,t=Zu(e),gS(e,null,n),t}return Lc(e,r,t,n),Zu(e)}function To(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,H0(e,n)}}function Af(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=l:i=i.next=l,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:r.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Vd=!1;function Ao(){if(Vd){var e=el;if(e!==null)throw e}}function ko(e,t,n,r){Vd=!1;var a=e.updateQueue;$r=!1;var i=a.firstBaseUpdate,l=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var s=o,u=s.next;s.next=null,l===null?i=u:l.next=u,l=s;var c=e.alternate;c!==null&&(c=c.updateQueue,o=c.lastBaseUpdate,o!==l&&(o===null?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=s))}if(i!==null){var f=a.baseState;l=0,c=u=s=null,o=i;do{var d=o.lane&-536870913,h=d!==o.lane;if(h?(me&d)===d:(r&d)===d){d!==0&&d===wl&&(Vd=!0),c!==null&&(c=c.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var b=e,y=o;d=t;var _=n;switch(y.tag){case 1:if(b=y.payload,typeof b=="function"){f=b.call(_,f,d);break e}f=b;break e;case 3:b.flags=b.flags&-65537|128;case 0:if(b=y.payload,d=typeof b=="function"?b.call(_,f,d):b,d==null)break e;f=Fe({},f,d);break e;case 2:$r=!0}}d=o.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=a.callbacks,h===null?a.callbacks=[d]:h.push(d))}else h={lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(u=c=h,s=f):c=c.next=h,l|=d;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;h=o,o=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);c===null&&(s=f),a.baseState=s,a.firstBaseUpdate=u,a.lastBaseUpdate=c,i===null&&(a.shared.lanes=0),wa|=l,e.lanes=l,e.memoizedState=f}}function TS(e,t){if(typeof e!="function")throw Error(L(191,e));e.call(t)}function AS(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)TS(n[e],t)}var El=Yn(null),Gu=Yn(0);function Pg(e,t){e=Ar,Ue(Gu,e),Ue(El,t),Ar=e|t.baseLanes}function Qd(){Ue(Gu,Ar),Ue(El,El.current)}function jp(){Ar=Gu.current,vt(El),vt(Gu)}var hn=Yn(null),Tn=null;function Zr(e){var t=e.alternate;Ue(tt,tt.current&1),Ue(hn,e),Tn===null&&(t===null||El.current!==null||t.memoizedState!==null)&&(Tn=e)}function Yd(e){Ue(tt,tt.current),Ue(hn,e),Tn===null&&(Tn=e)}function kS(e){e.tag===22?(Ue(tt,tt.current),Ue(hn,e),Tn===null&&(Tn=e)):Hr()}function Hr(){Ue(tt,tt.current),Ue(hn,hn.current)}function rn(e){vt(hn),Tn===e&&(Tn=null),vt(tt)}var tt=Yn(0);function Vu(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ph(n)||mh(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){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 Er=0,oe=null,Ne=null,it=null,Qu=!1,nl=!1,si=!1,Yu=0,qo=0,rl=null,TT=0;function Je(){throw Error(L(321))}function Dp(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!dn(e[n],t[n]))return!1;return!0}function Lp(e,t,n,r,a,i){return Er=i,oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,re.H=e===null||e.memoizedState===null?ix:Vp,si=!1,i=n(r,a),si=!1,nl&&(i=NS(t,n,r,a)),OS(e),i}function OS(e){re.H=Go;var t=Ne!==null&&Ne.next!==null;if(Er=0,it=Ne=oe=null,Qu=!1,qo=0,rl=null,t)throw Error(L(300));e===null||ut||(e=e.dependencies,e!==null&&Fu(e)&&(ut=!0))}function NS(e,t,n,r){oe=e;var a=0;do{if(nl&&(rl=null),qo=0,nl=!1,25<=a)throw Error(L(301));if(a+=1,it=Ne=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}re.H=lx,i=t(n,r)}while(nl);return i}function AT(){var e=re.H,t=e.useState()[0];return t=typeof t.then=="function"?ys(t):t,e=e.useState()[0],(Ne!==null?Ne.memoizedState:null)!==e&&(oe.flags|=1024),t}function Up(){var e=Yu!==0;return Yu=0,e}function Pp(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Bp(e){if(Qu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Qu=!1}Er=0,it=Ne=oe=null,nl=!1,qo=Yu=0,rl=null}function Nt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?oe.memoizedState=it=e:it=it.next=e,it}function nt(){if(Ne===null){var e=oe.alternate;e=e!==null?e.memoizedState:null}else e=Ne.next;var t=it===null?oe.memoizedState:it.next;if(t!==null)it=t,Ne=e;else{if(e===null)throw oe.alternate===null?Error(L(467)):Error(L(310));Ne=e,e={memoizedState:Ne.memoizedState,baseState:Ne.baseState,baseQueue:Ne.baseQueue,queue:Ne.queue,next:null},it===null?oe.memoizedState=it=e:it=it.next=e}return it}function Pc(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ys(e){var t=qo;return qo+=1,rl===null&&(rl=[]),e=wS(rl,e,t),t=oe,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,re.H=t===null||t.memoizedState===null?ix:Vp),e}function Bc(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ys(e);if(e.$$typeof===gr)return _t(e)}throw Error(L(438,String(e)))}function $p(e){var t=null,n=oe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=oe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Pc(),oe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=dC;return t.index++,n}function Cr(e,t){return typeof t=="function"?t(e):t}function bu(e){var t=nt();return Ip(t,Ne,e)}function Ip(e,t,n){var r=e.queue;if(r===null)throw Error(L(311));r.lastRenderedReducer=n;var a=e.baseQueue,i=r.pending;if(i!==null){if(a!==null){var l=a.next;a.next=i.next,i.next=l}t.baseQueue=a=i,r.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var o=l=null,s=null,u=t,c=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(me&f)===f:(Er&f)===f){var d=u.revertLane;if(d===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===wl&&(c=!0);else if((Er&d)===d){u=u.next,d===wl&&(c=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(o=s=f,l=i):s=s.next=f,oe.lanes|=d,wa|=d;f=u.action,si&&n(i,f),i=u.hasEagerState?u.eagerState:n(i,f)}else d={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(o=s=d,l=i):s=s.next=d,oe.lanes|=f,wa|=f;u=u.next}while(u!==null&&u!==t);if(s===null?l=i:s.next=o,!dn(i,e.memoizedState)&&(ut=!0,c&&(n=el,n!==null)))throw n;e.memoizedState=i,e.baseState=l,e.baseQueue=s,r.lastRenderedState=i}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function kf(e){var t=nt(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var l=a=a.next;do i=e(i,l.action),l=l.next;while(l!==a);dn(i,t.memoizedState)||(ut=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function zS(e,t,n){var r=oe,a=nt(),i=ye;if(i){if(n===void 0)throw Error(L(407));n=n()}else n=t();var l=!dn((Ne||a).memoizedState,n);if(l&&(a.memoizedState=n,ut=!0),a=a.queue,Zp(jS.bind(null,r,a,e),[e]),a.getSnapshot!==t||l||it!==null&&it.memoizedState.tag&1){if(r.flags|=2048,Cl(9,{destroy:void 0},MS.bind(null,r,a,n,t),null),Re===null)throw Error(L(349));i||Er&127||RS(r,t,n)}return n}function RS(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=oe.updateQueue,t===null?(t=Pc(),oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function MS(e,t,n,r){t.value=n,t.getSnapshot=r,DS(t)&&LS(e)}function jS(e,t,n){return n(function(){DS(t)&&LS(e)})}function DS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!dn(e,n)}catch{return!0}}function LS(e){var t=gi(e,2);t!==null&&Gt(t,e,2)}function Xd(e){var t=Nt();if(typeof e=="function"){var n=e;if(e=n(),si){ea(!0);try{n()}finally{ea(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cr,lastRenderedState:e},t}function US(e,t,n,r){return e.baseState=n,Ip(e,Ne,typeof r=="function"?r:Cr)}function kT(e,t,n,r,a){if(Ic(e))throw Error(L(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){i.listeners.push(l)}};re.T!==null?n(!0):i.isTransition=!1,r(i),n=t.pending,n===null?(i.next=t.pending=i,PS(t,i)):(i.next=n.next,t.pending=n.next=i)}}function PS(e,t){var n=t.action,r=t.payload,a=e.state;if(t.isTransition){var i=re.T,l={};re.T=l;try{var o=n(a,r),s=re.S;s!==null&&s(l,o),Bg(e,t,o)}catch(u){Jd(e,t,u)}finally{i!==null&&l.types!==null&&(i.types=l.types),re.T=i}}else try{i=n(a,r),Bg(e,t,i)}catch(u){Jd(e,t,u)}}function Bg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){$g(e,t,r)},function(r){return Jd(e,t,r)}):$g(e,t,n)}function $g(e,t,n){t.status="fulfilled",t.value=n,BS(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,PS(e,n)))}function Jd(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,BS(t),t=t.next;while(t!==r)}e.action=null}function BS(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function $S(e,t){return t}function Ig(e,t){if(ye){var n=Re.formState;if(n!==null){e:{var r=oe;if(ye){if(Ie){t:{for(var a=Ie,i=Cn;a.nodeType!==8;){if(!i){a=null;break t}if(a=An(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){Ie=An(a.nextSibling),r=a.data==="F!";break e}}xa(r)}r=!1}r&&(t=n[0])}}return n=Nt(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$S,lastRenderedState:t},n.queue=r,n=nx.bind(null,oe,r),r.dispatch=n,r=Xd(!1),i=Gp.bind(null,oe,!1,r.queue),r=Nt(),a={state:t,dispatch:null,action:e,pending:null},r.queue=a,n=kT.bind(null,oe,a,i,n),a.dispatch=n,r.memoizedState=e,[t,n,!1]}function Zg(e){var t=nt();return IS(t,Ne,e)}function IS(e,t,n){if(t=Ip(e,t,$S)[0],e=bu(Cr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=ys(t)}catch(l){throw l===Il?Uc:l}else r=t;t=nt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(oe.flags|=2048,Cl(9,{destroy:void 0},OT.bind(null,a,n),null)),[r,i,e]}function OT(e,t){e.action=t}function Hg(e){var t=nt(),n=Ne;if(n!==null)return IS(t,n,e);nt(),t=t.memoizedState,n=nt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Cl(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=oe.updateQueue,t===null&&(t=Pc(),oe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ZS(){return nt().memoizedState}function Su(e,t,n,r){var a=Nt();oe.flags|=e,a.memoizedState=Cl(1|t,{destroy:void 0},n,r===void 0?null:r)}function $c(e,t,n,r){var a=nt();r=r===void 0?null:r;var i=a.memoizedState.inst;Ne!==null&&r!==null&&Dp(r,Ne.memoizedState.deps)?a.memoizedState=Cl(t,i,n,r):(oe.flags|=e,a.memoizedState=Cl(1|t,i,n,r))}function Fg(e,t){Su(8390656,8,e,t)}function Zp(e,t){$c(2048,8,e,t)}function NT(e){oe.flags|=4;var t=oe.updateQueue;if(t===null)t=Pc(),oe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function HS(e){var t=nt().memoizedState;return NT({ref:t,nextImpl:e}),function(){if(we&2)throw Error(L(440));return t.impl.apply(void 0,arguments)}}function FS(e,t){return $c(4,2,e,t)}function qS(e,t){return $c(4,4,e,t)}function GS(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function VS(e,t,n){n=n!=null?n.concat([e]):null,$c(4,4,GS.bind(null,t,e),n)}function Hp(){}function QS(e,t){var n=nt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Dp(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function YS(e,t){var n=nt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Dp(t,r[1]))return r[0];if(r=e(),si){ea(!0);try{e()}finally{ea(!1)}}return n.memoizedState=[r,t],r}function Fp(e,t,n){return n===void 0||Er&1073741824&&!(me&261930)?e.memoizedState=t:(e.memoizedState=n,e=Ux(),oe.lanes|=e,wa|=e,n)}function XS(e,t,n,r){return dn(n,t)?n:El.current!==null?(e=Fp(e,n,r),dn(e,t)||(ut=!0),e):!(Er&42)||Er&1073741824&&!(me&261930)?(ut=!0,e.memoizedState=n):(e=Ux(),oe.lanes|=e,wa|=e,t)}function JS(e,t,n,r,a){var i=Ee.p;Ee.p=i!==0&&8>i?i:8;var l=re.T,o={};re.T=o,Gp(e,!1,t,n);try{var s=a(),u=re.S;if(u!==null&&u(o,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var c=CT(s,r);Oo(e,t,c,fn(e))}else Oo(e,t,r,fn(e))}catch(f){Oo(e,t,{then:function(){},status:"rejected",reason:f},fn())}finally{Ee.p=i,l!==null&&o.types!==null&&(l.types=o.types),re.T=l}}function zT(){}function Kd(e,t,n,r){if(e.tag!==5)throw Error(L(476));var a=KS(e).queue;JS(e,a,t,ei,n===null?zT:function(){return WS(e),n(r)})}function KS(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ei,baseState:ei,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cr,lastRenderedState:ei},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Cr,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function WS(e){var t=KS(e);t.next===null&&(t=e.alternate.memoizedState),Oo(e,t.next.queue,{},fn())}function qp(){return _t(Yo)}function ex(){return nt().memoizedState}function tx(){return nt().memoizedState}function RT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=fn();e=ua(n);var r=ca(t,e,n);r!==null&&(Gt(r,t,n),To(r,t,n)),t={cache:Np()},e.payload=t;return}t=t.return}}function MT(e,t,n){var r=fn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ic(e)?rx(t,n):(n=Tp(e,t,n,r),n!==null&&(Gt(n,e,r),ax(n,t,r)))}function nx(e,t,n){var r=fn();Oo(e,t,n,r)}function Oo(e,t,n,r){var a={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ic(e))rx(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var l=t.lastRenderedState,o=i(l,n);if(a.hasEagerState=!0,a.eagerState=o,dn(o,l))return Lc(e,t,a,0),Re===null&&Dc(),!1}catch{}finally{}if(n=Tp(e,t,a,r),n!==null)return Gt(n,e,r),ax(n,t,r),!0}return!1}function Gp(e,t,n,r){if(r={lane:2,revertLane:tm(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ic(e)){if(t)throw Error(L(479))}else t=Tp(e,n,r,2),t!==null&&Gt(t,e,2)}function Ic(e){var t=e.alternate;return e===oe||t!==null&&t===oe}function rx(e,t){nl=Qu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ax(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,H0(e,n)}}var Go={readContext:_t,use:Bc,useCallback:Je,useContext:Je,useEffect:Je,useImperativeHandle:Je,useLayoutEffect:Je,useInsertionEffect:Je,useMemo:Je,useReducer:Je,useRef:Je,useState:Je,useDebugValue:Je,useDeferredValue:Je,useTransition:Je,useSyncExternalStore:Je,useId:Je,useHostTransitionStatus:Je,useFormState:Je,useActionState:Je,useOptimistic:Je,useMemoCache:Je,useCacheRefresh:Je};Go.useEffectEvent=Je;var ix={readContext:_t,use:Bc,useCallback:function(e,t){return Nt().memoizedState=[e,t===void 0?null:t],e},useContext:_t,useEffect:Fg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Su(4194308,4,GS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Su(4194308,4,e,t)},useInsertionEffect:function(e,t){Su(4,2,e,t)},useMemo:function(e,t){var n=Nt();t=t===void 0?null:t;var r=e();if(si){ea(!0);try{e()}finally{ea(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Nt();if(n!==void 0){var a=n(t);if(si){ea(!0);try{n(t)}finally{ea(!1)}}}else a=t;return r.memoizedState=r.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},r.queue=e,e=e.dispatch=MT.bind(null,oe,e),[r.memoizedState,e]},useRef:function(e){var t=Nt();return e={current:e},t.memoizedState=e},useState:function(e){e=Xd(e);var t=e.queue,n=nx.bind(null,oe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Hp,useDeferredValue:function(e,t){var n=Nt();return Fp(n,e,t)},useTransition:function(){var e=Xd(!1);return e=JS.bind(null,oe,e.queue,!0,!1),Nt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=oe,a=Nt();if(ye){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),Re===null)throw Error(L(349));me&127||RS(r,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Fg(jS.bind(null,r,i,e),[e]),r.flags|=2048,Cl(9,{destroy:void 0},MS.bind(null,r,i,n,t),null),n},useId:function(){var e=Nt(),t=Re.identifierPrefix;if(ye){var n=Fn,r=Hn;n=(r&~(1<<32-cn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Yu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=TT++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qp,useFormState:Ig,useActionState:Ig,useOptimistic:function(e){var t=Nt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Gp.bind(null,oe,!0,n),n.dispatch=t,[e,t]},useMemoCache:$p,useCacheRefresh:function(){return Nt().memoizedState=RT.bind(null,oe)},useEffectEvent:function(e){var t=Nt(),n={impl:e};return t.memoizedState=n,function(){if(we&2)throw Error(L(440));return n.impl.apply(void 0,arguments)}}},Vp={readContext:_t,use:Bc,useCallback:QS,useContext:_t,useEffect:Zp,useImperativeHandle:VS,useInsertionEffect:FS,useLayoutEffect:qS,useMemo:YS,useReducer:bu,useRef:ZS,useState:function(){return bu(Cr)},useDebugValue:Hp,useDeferredValue:function(e,t){var n=nt();return XS(n,Ne.memoizedState,e,t)},useTransition:function(){var e=bu(Cr)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:ys(e),t]},useSyncExternalStore:zS,useId:ex,useHostTransitionStatus:qp,useFormState:Zg,useActionState:Zg,useOptimistic:function(e,t){var n=nt();return US(n,Ne,e,t)},useMemoCache:$p,useCacheRefresh:tx};Vp.useEffectEvent=HS;var lx={readContext:_t,use:Bc,useCallback:QS,useContext:_t,useEffect:Zp,useImperativeHandle:VS,useInsertionEffect:FS,useLayoutEffect:qS,useMemo:YS,useReducer:kf,useRef:ZS,useState:function(){return kf(Cr)},useDebugValue:Hp,useDeferredValue:function(e,t){var n=nt();return Ne===null?Fp(n,e,t):XS(n,Ne.memoizedState,e,t)},useTransition:function(){var e=kf(Cr)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:ys(e),t]},useSyncExternalStore:zS,useId:ex,useHostTransitionStatus:qp,useFormState:Hg,useActionState:Hg,useOptimistic:function(e,t){var n=nt();return Ne!==null?US(n,Ne,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:$p,useCacheRefresh:tx};lx.useEffectEvent=HS;function Of(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Fe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wd={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=fn(),a=ua(r);a.payload=t,n!=null&&(a.callback=n),t=ca(e,a,r),t!==null&&(Gt(t,e,r),To(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=fn(),a=ua(r);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=ca(e,a,r),t!==null&&(Gt(t,e,r),To(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=fn(),r=ua(n);r.tag=2,t!=null&&(r.callback=t),t=ca(e,r,n),t!==null&&(Gt(t,e,n),To(t,e,n))}};function qg(e,t,n,r,a,i,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,l):t.prototype&&t.prototype.isPureReactComponent?!Io(n,r)||!Io(a,i):!0}function Gg(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&&Wd.enqueueReplaceState(t,t.state,null)}function ui(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Fe({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function ox(e){Iu(e)}function sx(e){console.error(e)}function ux(e){Iu(e)}function Xu(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function Vg(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function eh(e,t,n){return n=ua(n),n.tag=3,n.payload={element:null},n.callback=function(){Xu(e,t)},n}function cx(e){return e=ua(e),e.tag=3,e}function fx(e,t,n,r){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=r.value;e.payload=function(){return a(i)},e.callback=function(){Vg(t,n,r)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Vg(t,n,r),typeof a!="function"&&(fa===null?fa=new Set([this]):fa.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function jT(e,t,n,r,a){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&$l(t,n,a,!0),n=hn.current,n!==null){switch(n.tag){case 31:case 13:return Tn===null?tc():n.alternate===null&&et===0&&(et=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===qu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),$f(e,r,a)),!1;case 22:return n.flags|=65536,r===qu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),$f(e,r,a)),!1}throw Error(L(435,n.tag))}return $f(e,r,a),tc(),!1}if(ye)return t=hn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Id&&(e=Error(L(422),{cause:r}),Ho(En(e,n)))):(r!==Id&&(t=Error(L(423),{cause:r}),Ho(En(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=En(r,n),a=eh(e.stateNode,r,a),Af(e,a),et!==4&&(et=2)),!1;var i=Error(L(520),{cause:r});if(i=En(i,n),Ro===null?Ro=[i]:Ro.push(i),et!==4&&(et=2),t===null)return!0;r=En(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=eh(n.stateNode,r,e),Af(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(fa===null||!fa.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=cx(a),fx(a,e,n,r),Af(n,a),!1}n=n.return}while(n!==null);return!1}var Qp=Error(L(461)),ut=!1;function bt(e,t,n,r){t.child=e===null?CS(t,null,n,r):oi(t,e.child,n,r)}function Qg(e,t,n,r,a){n=n.render;var i=t.ref;if("ref"in r){var l={};for(var o in r)o!=="ref"&&(l[o]=r[o])}else l=r;return li(t),r=Lp(e,t,n,l,i,a),o=Up(),e!==null&&!ut?(Pp(e,t,a),Tr(e,t,a)):(ye&&o&&kp(t),t.flags|=1,bt(e,t,r,a),t.child)}function Yg(e,t,n,r,a){if(e===null){var i=n.type;return typeof i=="function"&&!Ap(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,dx(e,t,i,r,a)):(e=yu(n.type,null,r,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Yp(e,a)){var l=i.memoizedProps;if(n=n.compare,n=n!==null?n:Io,n(l,r)&&e.ref===t.ref)return Tr(e,t,a)}return t.flags|=1,e=br(i,r),e.ref=t.ref,e.return=t,t.child=e}function dx(e,t,n,r,a){if(e!==null){var i=e.memoizedProps;if(Io(i,r)&&e.ref===t.ref)if(ut=!1,t.pendingProps=r=i,Yp(e,a))e.flags&131072&&(ut=!0);else return t.lanes=e.lanes,Tr(e,t,a)}return th(e,t,n,r,a)}function hx(e,t,n,r){var a=r.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,a=0;r!==null;)a=a|r.lanes|r.childLanes,r=r.sibling;r=a&~i}else r=0,t.child=null;return Xg(e,t,i,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vu(t,i!==null?i.cachePool:null),i!==null?Pg(t,i):Qd(),kS(t);else return r=t.lanes=536870912,Xg(e,t,i!==null?i.baseLanes|n:n,n,r)}else i!==null?(vu(t,i.cachePool),Pg(t,i),Hr(),t.memoizedState=null):(e!==null&&vu(t,null),Qd(),Hr());return bt(e,t,a,n),t.child}function yo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Xg(e,t,n,r,a){var i=zp();return i=i===null?null:{parent:st._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&vu(t,null),Qd(),kS(t),e!==null&&$l(e,t,r,!0),t.childLanes=a,null}function xu(e,t){return t=Ju({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Jg(e,t,n){return oi(t,e.child,null,n),e=xu(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function DT(e,t,n){var r=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ye){if(r.mode==="hidden")return e=xu(t,r),t.lanes=536870912,yo(null,e);if(Yd(t),(e=Ie)?(e=i1(e,Cn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sa!==null?{id:Hn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},n=vS(e),n.return=t,t.child=n,xt=t,Ie=null)):e=null,e===null)throw xa(t);return t.lanes=536870912,null}return xu(t,r)}var i=e.memoizedState;if(i!==null){var l=i.dehydrated;if(Yd(t),a)if(t.flags&256)t.flags&=-257,t=Jg(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(L(558));else if(ut||$l(e,t,n,!1),a=(n&e.childLanes)!==0,ut||a){if(r=Re,r!==null&&(l=F0(r,n),l!==0&&l!==i.retryLane))throw i.retryLane=l,gi(e,l),Gt(r,e,l),Qp;tc(),t=Jg(e,t,n)}else e=i.treeContext,Ie=An(l.nextSibling),xt=t,ye=!0,sa=null,Cn=!1,e!==null&&SS(t,e),t=xu(t,r),t.flags|=4096;return t}return e=br(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function _u(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(L(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function th(e,t,n,r,a){return li(t),n=Lp(e,t,n,r,void 0,a),r=Up(),e!==null&&!ut?(Pp(e,t,a),Tr(e,t,a)):(ye&&r&&kp(t),t.flags|=1,bt(e,t,n,a),t.child)}function Kg(e,t,n,r,a,i){return li(t),t.updateQueue=null,n=NS(t,r,n,a),OS(e),r=Up(),e!==null&&!ut?(Pp(e,t,i),Tr(e,t,i)):(ye&&r&&kp(t),t.flags|=1,bt(e,t,n,i),t.child)}function Wg(e,t,n,r,a){if(li(t),t.stateNode===null){var i=Fi,l=n.contextType;typeof l=="object"&&l!==null&&(i=_t(l)),i=new n(r,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Wd,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=r,i.state=t.memoizedState,i.refs={},Mp(t),l=n.contextType,i.context=typeof l=="object"&&l!==null?_t(l):Fi,i.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(Of(t,n,l,r),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(l=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),l!==i.state&&Wd.enqueueReplaceState(i,i.state,null),ko(t,r,i,a),Ao(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){i=t.stateNode;var o=t.memoizedProps,s=ui(n,o);i.props=s;var u=i.context,c=n.contextType;l=Fi,typeof c=="object"&&c!==null&&(l=_t(c));var f=n.getDerivedStateFromProps;c=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o||u!==l)&&Gg(t,i,r,l),$r=!1;var d=t.memoizedState;i.state=d,ko(t,r,i,a),Ao(),u=t.memoizedState,o||d!==u||$r?(typeof f=="function"&&(Of(t,n,f,r),u=t.memoizedState),(s=$r||qg(t,n,s,r,d,u,l))?(c||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=u),i.props=r,i.state=u,i.context=l,r=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Gd(e,t),l=t.memoizedProps,c=ui(n,l),i.props=c,f=t.pendingProps,d=i.context,u=n.contextType,s=Fi,typeof u=="object"&&u!==null&&(s=_t(u)),o=n.getDerivedStateFromProps,(u=typeof o=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l!==f||d!==s)&&Gg(t,i,r,s),$r=!1,d=t.memoizedState,i.state=d,ko(t,r,i,a),Ao();var h=t.memoizedState;l!==f||d!==h||$r||e!==null&&e.dependencies!==null&&Fu(e.dependencies)?(typeof o=="function"&&(Of(t,n,o,r),h=t.memoizedState),(c=$r||qg(t,n,c,r,d,h,s)||e!==null&&e.dependencies!==null&&Fu(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,h,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,h,s)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),i.props=r,i.state=h,i.context=s,r=c):(typeof i.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return i=r,_u(e,t),r=(t.flags&128)!==0,i||r?(i=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&r?(t.child=oi(t,e.child,null,a),t.child=oi(t,null,n,a)):bt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=Tr(e,t,a),e}function ey(e,t,n,r){return ii(),t.flags|=256,bt(e,t,n,r),t.child}var Nf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zf(e){return{baseLanes:e,cachePool:_S()}}function Rf(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=ln),e}function px(e,t,n){var r=t.pendingProps,a=!1,i=(t.flags&128)!==0,l;if((l=i)||(l=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),l&&(a=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(ye){if(a?Zr(t):Hr(),(e=Ie)?(e=i1(e,Cn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sa!==null?{id:Hn,overflow:Fn}:null,retryLane:536870912,hydrationErrors:null},n=vS(e),n.return=t,t.child=n,xt=t,Ie=null)):e=null,e===null)throw xa(t);return mh(e)?t.lanes=32:t.lanes=536870912,null}var o=r.children;return r=r.fallback,a?(Hr(),a=t.mode,o=Ju({mode:"hidden",children:o},a),r=ti(r,a,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,r=t.child,r.memoizedState=zf(n),r.childLanes=Rf(e,l,n),t.memoizedState=Nf,yo(null,r)):(Zr(t),nh(t,o))}var s=e.memoizedState;if(s!==null&&(o=s.dehydrated,o!==null)){if(i)t.flags&256?(Zr(t),t.flags&=-257,t=Mf(e,t,n)):t.memoizedState!==null?(Hr(),t.child=e.child,t.flags|=128,t=null):(Hr(),o=r.fallback,a=t.mode,r=Ju({mode:"visible",children:r.children},a),o=ti(o,a,n,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,oi(t,e.child,null,n),r=t.child,r.memoizedState=zf(n),r.childLanes=Rf(e,l,n),t.memoizedState=Nf,t=yo(null,r));else if(Zr(t),mh(o)){if(l=o.nextSibling&&o.nextSibling.dataset,l)var u=l.dgst;l=u,r=Error(L(419)),r.stack="",r.digest=l,Ho({value:r,source:null,stack:null}),t=Mf(e,t,n)}else if(ut||$l(e,t,n,!1),l=(n&e.childLanes)!==0,ut||l){if(l=Re,l!==null&&(r=F0(l,n),r!==0&&r!==s.retryLane))throw s.retryLane=r,gi(e,r),Gt(l,e,r),Qp;ph(o)||tc(),t=Mf(e,t,n)}else ph(o)?(t.flags|=192,t.child=e.child,t=null):(e=s.treeContext,Ie=An(o.nextSibling),xt=t,ye=!0,sa=null,Cn=!1,e!==null&&SS(t,e),t=nh(t,r.children),t.flags|=4096);return t}return a?(Hr(),o=r.fallback,a=t.mode,s=e.child,u=s.sibling,r=br(s,{mode:"hidden",children:r.children}),r.subtreeFlags=s.subtreeFlags&65011712,u!==null?o=br(u,o):(o=ti(o,a,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,yo(null,r),r=t.child,o=e.child.memoizedState,o===null?o=zf(n):(a=o.cachePool,a!==null?(s=st._currentValue,a=a.parent!==s?{parent:s,pool:s}:a):a=_S(),o={baseLanes:o.baseLanes|n,cachePool:a}),r.memoizedState=o,r.childLanes=Rf(e,l,n),t.memoizedState=Nf,yo(e.child,r)):(Zr(t),n=e.child,e=n.sibling,n=br(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function nh(e,t){return t=Ju({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ju(e,t){return e=an(22,e,null,t),e.lanes=0,e}function Mf(e,t,n){return oi(t,e.child,null,n),e=nh(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ty(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Hd(e.return,t,n)}function jf(e,t,n,r,a,i){var l=e.memoizedState;l===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:a,treeForkCount:i}:(l.isBackwards=t,l.rendering=null,l.renderingStartTime=0,l.last=r,l.tail=n,l.tailMode=a,l.treeForkCount=i)}function mx(e,t,n){var r=t.pendingProps,a=r.revealOrder,i=r.tail;r=r.children;var l=tt.current,o=(l&2)!==0;if(o?(l=l&1|2,t.flags|=128):l&=1,Ue(tt,l),bt(e,t,r,n),r=ye?Zo:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ty(e,n,t);else if(e.tag===19)ty(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}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Vu(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),jf(t,!1,a,n,i,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Vu(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}jf(t,!0,n,null,i,r);break;case"together":jf(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Tr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),wa|=t.lanes,!(n&t.childLanes))if(e!==null){if($l(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=br(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=br(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Yp(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Fu(e)))}function LT(e,t,n){switch(t.tag){case 3:Uu(t,t.stateNode.containerInfo),Ir(t,st,e.memoizedState.cache),ii();break;case 27:case 5:Nd(t);break;case 4:Uu(t,t.stateNode.containerInfo);break;case 10:Ir(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Yd(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Zr(t),t.flags|=128,null):n&t.child.childLanes?px(e,t,n):(Zr(t),e=Tr(e,t,n),e!==null?e.sibling:null);Zr(t);break;case 19:var a=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||($l(e,t,n,!1),r=(n&t.childLanes)!==0),a){if(r)return mx(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Ue(tt,tt.current),r)break;return null;case 22:return t.lanes=0,hx(e,t,n,t.pendingProps);case 24:Ir(t,st,e.memoizedState.cache)}return Tr(e,t,n)}function gx(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ut=!0;else{if(!Yp(e,n)&&!(t.flags&128))return ut=!1,LT(e,t,n);ut=!!(e.flags&131072)}else ut=!1,ye&&t.flags&1048576&&bS(t,Zo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Ba(t.elementType),t.type=e,typeof e=="function")Ap(e)?(r=ui(e,r),t.tag=1,t=Wg(null,t,e,r,n)):(t.tag=0,t=th(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===hp){t.tag=11,t=Qg(null,t,e,r,n);break e}else if(a===pp){t.tag=14,t=Yg(null,t,e,r,n);break e}}throw t=kd(e)||e,Error(L(306,t,""))}}return t;case 0:return th(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=ui(r,t.pendingProps),Wg(e,t,r,a,n);case 3:e:{if(Uu(t,t.stateNode.containerInfo),e===null)throw Error(L(387));r=t.pendingProps;var i=t.memoizedState;a=i.element,Gd(e,t),ko(t,r,null,n);var l=t.memoizedState;if(r=l.cache,Ir(t,st,r),r!==i.cache&&Fd(t,[st],n,!0),Ao(),r=l.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=ey(e,t,r,n);break e}else if(r!==a){a=En(Error(L(424)),t),Ho(a),t=ey(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ie=An(e.firstChild),xt=t,ye=!0,sa=null,Cn=!0,n=CS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ii(),r===a){t=Tr(e,t,n);break e}bt(e,t,r,n)}t=t.child}return t;case 26:return _u(e,t),e===null?(n=xy(t.type,null,t.pendingProps,null))?t.memoizedState=n:ye||(n=t.type,e=t.pendingProps,r=ic(oa.current).createElement(n),r[St]=t,r[Qt]=e,wt(r,n,e),yt(r),t.stateNode=r):t.memoizedState=xy(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Nd(t),e===null&&ye&&(r=t.stateNode=l1(t.type,t.pendingProps,oa.current),xt=t,Cn=!0,a=Ie,Aa(t.type)?(gh=a,Ie=An(r.firstChild)):Ie=a),bt(e,t,t.pendingProps.children,n),_u(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ye&&((a=r=Ie)&&(r=dA(r,t.type,t.pendingProps,Cn),r!==null?(t.stateNode=r,xt=t,Ie=An(r.firstChild),Cn=!1,a=!0):a=!1),a||xa(t)),Nd(t),a=t.type,i=t.pendingProps,l=e!==null?e.memoizedProps:null,r=i.children,dh(a,i)?r=null:l!==null&&dh(a,l)&&(t.flags|=32),t.memoizedState!==null&&(a=Lp(e,t,AT,null,null,n),Yo._currentValue=a),_u(e,t),bt(e,t,r,n),t.child;case 6:return e===null&&ye&&((e=n=Ie)&&(n=hA(n,t.pendingProps,Cn),n!==null?(t.stateNode=n,xt=t,Ie=null,e=!0):e=!1),e||xa(t)),null;case 13:return px(e,t,n);case 4:return Uu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=oi(t,null,r,n):bt(e,t,r,n),t.child;case 11:return Qg(e,t,t.type,t.pendingProps,n);case 7:return bt(e,t,t.pendingProps,n),t.child;case 8:return bt(e,t,t.pendingProps.children,n),t.child;case 12:return bt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ir(t,t.type,r.value),bt(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,li(t),a=_t(a),r=r(a),t.flags|=1,bt(e,t,r,n),t.child;case 14:return Yg(e,t,t.type,t.pendingProps,n);case 15:return dx(e,t,t.type,t.pendingProps,n);case 19:return mx(e,t,n);case 31:return DT(e,t,n);case 22:return hx(e,t,n,t.pendingProps);case 24:return li(t),r=_t(st),e===null?(a=zp(),a===null&&(a=Re,i=Np(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:r,cache:a},Mp(t),Ir(t,st,a)):(e.lanes&n&&(Gd(e,t),ko(t,null,null,n),Ao()),a=e.memoizedState,i=t.memoizedState,a.parent!==r?(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ir(t,st,r)):(r=i.cache,Ir(t,st,r),r!==a.cache&&Fd(t,[st],n,!0))),bt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(L(156,t.tag))}function rr(e){e.flags|=4}function Df(e,t,n,r,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if($x())e.flags|=8192;else throw ri=qu,Rp}else e.flags&=-16777217}function ny(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!u1(t))if($x())e.flags|=8192;else throw ri=qu,Rp}function Zs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?I0():536870912,e.lanes|=t,Tl|=t)}function ao(e,t){if(!ye)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 $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&65011712,r|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags,r|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function UT(e,t,n){var r=t.pendingProps;switch(Op(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Sr(st),Sl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(wi(t)?rr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Tf())),$e(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(rr(t),i!==null?($e(t),ny(t,i)):($e(t),Df(t,a,null,r,n))):i?i!==e.memoizedState?(rr(t),$e(t),ny(t,i)):($e(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&rr(t),$e(t),Df(t,a,e,r,n)),null;case 27:if(Pu(t),n=oa.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&rr(t);else{if(!r){if(t.stateNode===null)throw Error(L(166));return $e(t),null}e=Gn.current,wi(t)?zg(t):(e=l1(a,r,n),t.stateNode=e,rr(t))}return $e(t),null;case 5:if(Pu(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&rr(t);else{if(!r){if(t.stateNode===null)throw Error(L(166));return $e(t),null}if(i=Gn.current,wi(t))zg(t);else{var l=ic(oa.current);switch(i){case 1:i=l.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=l.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=l.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=l.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof r.is=="string"?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?i.multiple=!0:r.size&&(i.size=r.size);break;default:i=typeof r.is=="string"?l.createElement(a,{is:r.is}):l.createElement(a)}}i[St]=t,i[Qt]=r;e:for(l=t.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.tag!==27&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===t)break e;for(;l.sibling===null;){if(l.return===null||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}t.stateNode=i;e:switch(wt(i,a,r),a){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&rr(t)}}return $e(t),Df(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&rr(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(e=oa.current,wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=xt,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||n1(e.nodeValue,n)),e||xa(t,!0)}else e=ic(e).createTextNode(r),e[St]=t,t.stateNode=e}return $e(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=wi(t),n!==null){if(e===null){if(!r)throw Error(L(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(557));e[St]=t}else ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;$e(t),e=!1}else n=Tf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if(t.flags&128)throw Error(L(558))}return $e(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(L(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(L(317));a[St]=t}else ii(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;$e(t),a=!1}else a=Tf(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Zs(t,t.updateQueue),$e(t),null);case 4:return Sl(),e===null&&nm(t.stateNode.containerInfo),$e(t),null;case 10:return Sr(t.type),$e(t),null;case 19:if(vt(tt),r=t.memoizedState,r===null)return $e(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)ao(r,!1);else{if(et!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=Vu(e),i!==null){for(t.flags|=128,ao(r,!1),e=i.updateQueue,t.updateQueue=e,Zs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)yS(n,e),n=n.sibling;return Ue(tt,tt.current&1|2),ye&&ur(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&sn()>Wu&&(t.flags|=128,a=!0,ao(r,!1),t.lanes=4194304)}else{if(!a)if(e=Vu(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Zs(t,e),ao(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!ye)return $e(t),null}else 2*sn()-r.renderingStartTime>Wu&&n!==536870912&&(t.flags|=128,a=!0,ao(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=sn(),e.sibling=null,n=tt.current,Ue(tt,a?n&1|2:n&1),ye&&ur(t,r.treeForkCount),e):($e(t),null);case 22:case 23:return rn(t),jp(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),n=t.updateQueue,n!==null&&Zs(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&vt(ni),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Sr(st),$e(t),null;case 25:return null;case 30:return null}throw Error(L(156,t.tag))}function PT(e,t){switch(Op(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Sr(st),Sl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pu(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(L(340));ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return vt(tt),null;case 4:return Sl(),null;case 10:return Sr(t.type),null;case 22:case 23:return rn(t),jp(),e!==null&&vt(ni),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Sr(st),null;case 25:return null;default:return null}}function yx(e,t){switch(Op(t),t.tag){case 3:Sr(st),Sl();break;case 26:case 27:case 5:Pu(t);break;case 4:Sl();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:vt(tt);break;case 10:Sr(t.type);break;case 22:case 23:rn(t),jp(),e!==null&&vt(ni);break;case 24:Sr(st)}}function vs(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var a=r.next;n=a;do{if((n.tag&e)===e){r=void 0;var i=n.create,l=n.inst;r=i(),l.destroy=r}n=n.next}while(n!==a)}}catch(o){ke(t,t.return,o)}}function _a(e,t,n){try{var r=t.updateQueue,a=r!==null?r.lastEffect:null;if(a!==null){var i=a.next;r=i;do{if((r.tag&e)===e){var l=r.inst,o=l.destroy;if(o!==void 0){l.destroy=void 0,a=t;var s=n,u=o;try{u()}catch(c){ke(a,s,c)}}}r=r.next}while(r!==i)}}catch(c){ke(t,t.return,c)}}function vx(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{AS(t,n)}catch(r){ke(e,e.return,r)}}}function bx(e,t,n){n.props=ui(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){ke(e,t,r)}}function No(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(a){ke(e,t,a)}}function qn(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(a){ke(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){ke(e,t,a)}else n.current=null}function Sx(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(a){ke(e,e.return,a)}}function Lf(e,t,n){try{var r=e.stateNode;lA(r,e.type,n,t),r[Qt]=t}catch(a){ke(e,e.return,a)}}function xx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Aa(e.type)||e.tag===4}function Uf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||xx(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.tag===27&&Aa(e.type)||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 rh(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yr));else if(r!==4&&(r===27&&Aa(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rh(e,t,n),e=e.sibling;e!==null;)rh(e,t,n),e=e.sibling}function Ku(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&&(r===27&&Aa(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ku(e,t,n),e=e.sibling;e!==null;)Ku(e,t,n),e=e.sibling}function _x(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);wt(t,r,n),t[St]=e,t[Qt]=n}catch(i){ke(e,e.return,i)}}var pr=!1,lt=!1,Pf=!1,ry=typeof WeakSet=="function"?WeakSet:Set,gt=null;function BT(e,t){if(e=e.containerInfo,ch=uc,e=uS(e),Ep(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 a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var l=0,o=-1,s=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var h;f!==n||a!==0&&f.nodeType!==3||(o=l+a),f!==i||r!==0&&f.nodeType!==3||(s=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++u===a&&(o=l),d===i&&++c===r&&(s=l),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=o===-1||s===-1?null:{start:o,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(fh={focusedElem:e,selectionRange:n},uc=!1,gt=t;gt!==null;)if(t=gt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,gt=e;else for(;gt!==null;){switch(t=gt,i=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,r=n.stateNode;try{var b=ui(n.type,a);e=r.getSnapshotBeforeUpdate(b,i),r.__reactInternalSnapshotBeforeUpdate=e}catch(y){ke(n,n.return,y)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hh(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hh(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(L(163))}if(e=t.sibling,e!==null){e.return=t.return,gt=e;break}gt=t.return}}function wx(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ir(e,n),r&4&&vs(5,n);break;case 1:if(ir(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){ke(n,n.return,l)}else{var a=ui(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){ke(n,n.return,l)}}r&64&&vx(n),r&512&&No(n,n.return);break;case 3:if(ir(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{AS(e,t)}catch(l){ke(n,n.return,l)}}break;case 27:t===null&&r&4&&_x(n);case 26:case 5:ir(e,n),t===null&&r&4&&Sx(n),r&512&&No(n,n.return);break;case 12:ir(e,n);break;case 31:ir(e,n),r&4&&Tx(e,n);break;case 13:ir(e,n),r&4&&Ax(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=QT.bind(null,n),pA(e,n))));break;case 22:if(r=n.memoizedState!==null||pr,!r){t=t!==null&&t.memoizedState!==null||lt,a=pr;var i=lt;pr=r,(lt=t)&&!i?or(e,n,(n.subtreeFlags&8772)!==0):ir(e,n),pr=a,lt=i}break;case 30:break;default:ir(e,n)}}function Ex(e){var t=e.alternate;t!==null&&(e.alternate=null,Ex(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&vp(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ge=null,Ft=!1;function ar(e,t,n){for(n=n.child;n!==null;)Cx(e,t,n),n=n.sibling}function Cx(e,t,n){if(un&&typeof un.onCommitFiberUnmount=="function")try{un.onCommitFiberUnmount(fs,n)}catch{}switch(n.tag){case 26:lt||qn(n,t),ar(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:lt||qn(n,t);var r=Ge,a=Ft;Aa(n.type)&&(Ge=n.stateNode,Ft=!1),ar(e,t,n),jo(n.stateNode),Ge=r,Ft=a;break;case 5:lt||qn(n,t);case 6:if(r=Ge,a=Ft,Ge=null,ar(e,t,n),Ge=r,Ft=a,Ge!==null)if(Ft)try{(Ge.nodeType===9?Ge.body:Ge.nodeName==="HTML"?Ge.ownerDocument.body:Ge).removeChild(n.stateNode)}catch(i){ke(n,t,i)}else try{Ge.removeChild(n.stateNode)}catch(i){ke(n,t,i)}break;case 18:Ge!==null&&(Ft?(e=Ge,gy(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Nl(e)):gy(Ge,n.stateNode));break;case 4:r=Ge,a=Ft,Ge=n.stateNode.containerInfo,Ft=!0,ar(e,t,n),Ge=r,Ft=a;break;case 0:case 11:case 14:case 15:_a(2,n,t),lt||_a(4,n,t),ar(e,t,n);break;case 1:lt||(qn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&bx(n,t,r)),ar(e,t,n);break;case 21:ar(e,t,n);break;case 22:lt=(r=lt)||n.memoizedState!==null,ar(e,t,n),lt=r;break;default:ar(e,t,n)}}function Tx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Nl(e)}catch(n){ke(t,t.return,n)}}}function Ax(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Nl(e)}catch(n){ke(t,t.return,n)}}function $T(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ry),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ry),t;default:throw Error(L(435,e.tag))}}function Hs(e,t){var n=$T(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var a=YT.bind(null,e,r);r.then(a,a)}})}function Ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],i=e,l=t,o=l;e:for(;o!==null;){switch(o.tag){case 27:if(Aa(o.type)){Ge=o.stateNode,Ft=!1;break e}break;case 5:Ge=o.stateNode,Ft=!1;break e;case 3:case 4:Ge=o.stateNode.containerInfo,Ft=!0;break e}o=o.return}if(Ge===null)throw Error(L(160));Cx(i,l,a),Ge=null,Ft=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)kx(t,e),t=t.sibling}var jn=null;function kx(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ut(t,e),Pt(e),r&4&&(_a(3,e,e.return),vs(3,e),_a(5,e,e.return));break;case 1:Ut(t,e),Pt(e),r&512&&(lt||n===null||qn(n,n.return)),r&64&&pr&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=jn;if(Ut(t,e),Pt(e),r&512&&(lt||n===null||qn(n,n.return)),r&4){var i=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(r){case"title":i=a.getElementsByTagName("title")[0],(!i||i[ps]||i[St]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(r),a.head.insertBefore(i,a.querySelector("head > title"))),wt(i,r,n),i[St]=e,yt(i),r=i;break e;case"link":var l=wy("link","href",a).get(r+(n.href||""));if(l){for(var o=0;o<l.length;o++)if(i=l[o],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(o,1);break t}}i=a.createElement(r),wt(i,r,n),a.head.appendChild(i);break;case"meta":if(l=wy("meta","content",a).get(r+(n.content||""))){for(o=0;o<l.length;o++)if(i=l[o],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(o,1);break t}}i=a.createElement(r),wt(i,r,n),a.head.appendChild(i);break;default:throw Error(L(468,r))}i[St]=e,yt(i),r=i}e.stateNode=r}else Ey(a,e.type,e.stateNode);else e.stateNode=_y(a,r,e.memoizedProps);else i!==r?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,r===null?Ey(a,e.type,e.stateNode):_y(a,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Lf(e,e.memoizedProps,n.memoizedProps)}break;case 27:Ut(t,e),Pt(e),r&512&&(lt||n===null||qn(n,n.return)),n!==null&&r&4&&Lf(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Ut(t,e),Pt(e),r&512&&(lt||n===null||qn(n,n.return)),e.flags&32){a=e.stateNode;try{_l(a,"")}catch(b){ke(e,e.return,b)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Lf(e,a,n!==null?n.memoizedProps:a)),r&1024&&(Pf=!0);break;case 6:if(Ut(t,e),Pt(e),r&4){if(e.stateNode===null)throw Error(L(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(b){ke(e,e.return,b)}}break;case 3:if(Cu=null,a=jn,jn=lc(t.containerInfo),Ut(t,e),jn=a,Pt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Nl(t.containerInfo)}catch(b){ke(e,e.return,b)}Pf&&(Pf=!1,Ox(e));break;case 4:r=jn,jn=lc(e.stateNode.containerInfo),Ut(t,e),Pt(e),jn=r;break;case 12:Ut(t,e),Pt(e);break;case 31:Ut(t,e),Pt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hs(e,r)));break;case 13:Ut(t,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zc=sn()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hs(e,r)));break;case 22:a=e.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=pr,c=lt;if(pr=u||a,lt=c||s,Ut(t,e),lt=c,pr=u,Pt(e),r&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||s||pr||lt||$a(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){s=n=t;try{if(i=s.stateNode,a)l=i.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{o=s.stateNode;var f=s.memoizedProps.style,d=f!=null&&f.hasOwnProperty("display")?f.display:null;o.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(b){ke(s,s.return,b)}}}else if(t.tag===6){if(n===null){s=t;try{s.stateNode.nodeValue=a?"":s.memoizedProps}catch(b){ke(s,s.return,b)}}}else if(t.tag===18){if(n===null){s=t;try{var h=s.stateNode;a?yy(h,!0):yy(s.stateNode,!1)}catch(b){ke(s,s.return,b)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Hs(e,n))));break;case 19:Ut(t,e),Pt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hs(e,r)));break;case 30:break;case 21:break;default:Ut(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(xx(r)){n=r;break}r=r.return}if(n==null)throw Error(L(160));switch(n.tag){case 27:var a=n.stateNode,i=Uf(e);Ku(e,i,a);break;case 5:var l=n.stateNode;n.flags&32&&(_l(l,""),n.flags&=-33);var o=Uf(e);Ku(e,o,l);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Uf(e);rh(e,u,s);break;default:throw Error(L(161))}}catch(c){ke(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ox(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ox(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ir(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)wx(e,t.alternate,t),t=t.sibling}function $a(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_a(4,t,t.return),$a(t);break;case 1:qn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&bx(t,t.return,n),$a(t);break;case 27:jo(t.stateNode);case 26:case 5:qn(t,t.return),$a(t);break;case 22:t.memoizedState===null&&$a(t);break;case 30:$a(t);break;default:$a(t)}e=e.sibling}}function or(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,a=e,i=t,l=i.flags;switch(i.tag){case 0:case 11:case 15:or(a,i,n),vs(4,i);break;case 1:if(or(a,i,n),r=i,a=r.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(u){ke(r,r.return,u)}if(r=i,a=r.updateQueue,a!==null){var o=r.stateNode;try{var s=a.shared.hiddenCallbacks;if(s!==null)for(a.shared.hiddenCallbacks=null,a=0;a<s.length;a++)TS(s[a],o)}catch(u){ke(r,r.return,u)}}n&&l&64&&vx(i),No(i,i.return);break;case 27:_x(i);case 26:case 5:or(a,i,n),n&&r===null&&l&4&&Sx(i),No(i,i.return);break;case 12:or(a,i,n);break;case 31:or(a,i,n),n&&l&4&&Tx(a,i);break;case 13:or(a,i,n),n&&l&4&&Ax(a,i);break;case 22:i.memoizedState===null&&or(a,i,n),No(i,i.return);break;case 30:break;default:or(a,i,n)}t=t.sibling}}function Xp(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&gs(n))}function Jp(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gs(e))}function Rn(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nx(e,t,n,r),t=t.sibling}function Nx(e,t,n,r){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Rn(e,t,n,r),a&2048&&vs(9,t);break;case 1:Rn(e,t,n,r);break;case 3:Rn(e,t,n,r),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&gs(e)));break;case 12:if(a&2048){Rn(e,t,n,r),e=t.stateNode;try{var i=t.memoizedProps,l=i.id,o=i.onPostCommit;typeof o=="function"&&o(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(s){ke(t,t.return,s)}}else Rn(e,t,n,r);break;case 31:Rn(e,t,n,r);break;case 13:Rn(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,l=t.alternate,t.memoizedState!==null?i._visibility&2?Rn(e,t,n,r):zo(e,t):i._visibility&2?Rn(e,t,n,r):(i._visibility|=2,Mi(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Xp(l,t);break;case 24:Rn(e,t,n,r),a&2048&&Jp(t.alternate,t);break;default:Rn(e,t,n,r)}}function Mi(e,t,n,r,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,l=t,o=n,s=r,u=l.flags;switch(l.tag){case 0:case 11:case 15:Mi(i,l,o,s,a),vs(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?Mi(i,l,o,s,a):zo(i,l):(c._visibility|=2,Mi(i,l,o,s,a)),a&&u&2048&&Xp(l.alternate,l);break;case 24:Mi(i,l,o,s,a),a&&u&2048&&Jp(l.alternate,l);break;default:Mi(i,l,o,s,a)}t=t.sibling}}function zo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,a=r.flags;switch(r.tag){case 22:zo(n,r),a&2048&&Xp(r.alternate,r);break;case 24:zo(n,r),a&2048&&Jp(r.alternate,r);break;default:zo(n,r)}t=t.sibling}}var vo=8192;function Ei(e,t,n){if(e.subtreeFlags&vo)for(e=e.child;e!==null;)zx(e,t,n),e=e.sibling}function zx(e,t,n){switch(e.tag){case 26:Ei(e,t,n),e.flags&vo&&e.memoizedState!==null&&TA(n,jn,e.memoizedState,e.memoizedProps);break;case 5:Ei(e,t,n);break;case 3:case 4:var r=jn;jn=lc(e.stateNode.containerInfo),Ei(e,t,n),jn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=vo,vo=16777216,Ei(e,t,n),vo=r):Ei(e,t,n));break;default:Ei(e,t,n)}}function Rx(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function io(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];gt=r,jx(r,e)}Rx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mx(e),e=e.sibling}function Mx(e){switch(e.tag){case 0:case 11:case 15:io(e),e.flags&2048&&_a(9,e,e.return);break;case 3:io(e);break;case 12:io(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,wu(e)):io(e);break;default:io(e)}}function wu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];gt=r,jx(r,e)}Rx(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_a(8,t,t.return),wu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,wu(t));break;default:wu(t)}e=e.sibling}}function jx(e,t){for(;gt!==null;){var n=gt;switch(n.tag){case 0:case 11:case 15:_a(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:gs(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,gt=r;else e:for(n=e;gt!==null;){r=gt;var a=r.sibling,i=r.return;if(Ex(r),r===n){gt=null;break e}if(a!==null){a.return=i,gt=a;break e}gt=i}}}var IT={getCacheForType:function(e){var t=_t(st),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return _t(st).controller.signal}},ZT=typeof WeakMap=="function"?WeakMap:Map,we=0,Re=null,pe=null,me=0,Ae=0,tn=null,na=!1,Zl=!1,Kp=!1,Ar=0,et=0,wa=0,ai=0,Wp=0,ln=0,Tl=0,Ro=null,qt=null,ah=!1,Zc=0,Dx=0,Wu=1/0,ec=null,fa=null,ht=0,da=null,Al=null,xr=0,ih=0,lh=null,Lx=null,Mo=0,oh=null;function fn(){return we&2&&me!==0?me&-me:re.T!==null?tm():q0()}function Ux(){if(ln===0)if(!(me&536870912)||ye){var e=Ds;Ds<<=1,!(Ds&3932160)&&(Ds=262144),ln=e}else ln=536870912;return e=hn.current,e!==null&&(e.flags|=32),ln}function Gt(e,t,n){(e===Re&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(kl(e,0),ra(e,me,ln,!1)),hs(e,n),(!(we&2)||e!==Re)&&(e===Re&&(!(we&2)&&(ai|=n),et===4&&ra(e,me,ln,!1)),Xn(e))}function Px(e,t,n){if(we&6)throw Error(L(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||ds(e,t),a=r?qT(e,t):Bf(e,t,!0),i=r;do{if(a===0){Zl&&!r&&ra(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!HT(n)){a=Bf(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var o=e;a=Ro;var s=o.current.memoizedState.isDehydrated;if(s&&(kl(o,l).flags|=256),l=Bf(o,l,!1),l!==2){if(Kp&&!s){o.errorRecoveryDisabledLanes|=i,ai|=i,a=4;break e}i=qt,qt=a,i!==null&&(qt===null?qt=i:qt.push.apply(qt,i))}a=l}if(i=!1,a!==2)continue}}if(a===1){kl(e,0),ra(e,t,0,!0);break}e:{switch(r=e,i=a,i){case 0:case 1:throw Error(L(345));case 4:if((t&4194048)!==t)break;case 6:ra(r,t,ln,!na);break e;case 2:qt=null;break;case 3:case 5:break;default:throw Error(L(329))}if((t&62914560)===t&&(a=Zc+300-sn(),10<a)){if(ra(r,t,ln,!na),zc(r,0,!0)!==0)break e;xr=t,r.timeoutHandle=a1(ay.bind(null,r,n,qt,ec,ah,t,ln,ai,Tl,na,i,"Throttled",-0,0),a);break e}ay(r,n,qt,ec,ah,t,ln,ai,Tl,na,i,null,-0,0)}}break}while(!0);Xn(e)}function ay(e,t,n,r,a,i,l,o,s,u,c,f,d,h){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yr},zx(t,i,f);var b=(i&62914560)===i?Zc-sn():(i&4194048)===i?Dx-sn():0;if(b=AA(f,b),b!==null){xr=i,e.cancelPendingCommit=b(ly.bind(null,e,t,i,n,r,a,l,o,s,c,f,null,d,h)),ra(e,i,l,!u);return}}ly(e,t,i,n,r,a,l,o,s)}function HT(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var a=n[r],i=a.getSnapshot;a=a.value;try{if(!dn(i(),a))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 ra(e,t,n,r){t&=~Wp,t&=~ai,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var a=t;0<a;){var i=31-cn(a),l=1<<i;r[i]=-1,a&=~l}n!==0&&Z0(e,n,t)}function Hc(){return we&6?!0:(bs(0),!1)}function em(){if(pe!==null){if(Ae===0)var e=pe.return;else e=pe,vr=yi=null,Bp(e),tl=null,Fo=0,e=pe;for(;e!==null;)yx(e.alternate,e),e=e.return;pe=null}}function kl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,uA(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),xr=0,em(),Re=e,pe=n=br(e.current,null),me=t,Ae=0,tn=null,na=!1,Zl=ds(e,t),Kp=!1,Tl=ln=Wp=ai=wa=et=0,qt=Ro=null,ah=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var a=31-cn(r),i=1<<a;t|=e[a],r&=~i}return Ar=t,Dc(),n}function Bx(e,t){oe=null,re.H=Go,t===Il||t===Uc?(t=Lg(),Ae=3):t===Rp?(t=Lg(),Ae=4):Ae=t===Qp?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,tn=t,pe===null&&(et=1,Xu(e,En(t,e.current)))}function $x(){var e=hn.current;return e===null?!0:(me&4194048)===me?Tn===null:(me&62914560)===me||me&536870912?e===Tn:!1}function Ix(){var e=re.H;return re.H=Go,e===null?Go:e}function Zx(){var e=re.A;return re.A=IT,e}function tc(){et=4,na||(me&4194048)!==me&&hn.current!==null||(Zl=!0),!(wa&134217727)&&!(ai&134217727)||Re===null||ra(Re,me,ln,!1)}function Bf(e,t,n){var r=we;we|=2;var a=Ix(),i=Zx();(Re!==e||me!==t)&&(ec=null,kl(e,t)),t=!1;var l=et;e:do try{if(Ae!==0&&pe!==null){var o=pe,s=tn;switch(Ae){case 8:em(),l=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(t=!0);var u=Ae;if(Ae=0,tn=null,Vi(e,o,s,u),n&&Zl){l=0;break e}break;default:u=Ae,Ae=0,tn=null,Vi(e,o,s,u)}}FT(),l=et;break}catch(c){Bx(e,c)}while(!0);return t&&e.shellSuspendCounter++,vr=yi=null,we=r,re.H=a,re.A=i,pe===null&&(Re=null,me=0,Dc()),l}function FT(){for(;pe!==null;)Hx(pe)}function qT(e,t){var n=we;we|=2;var r=Ix(),a=Zx();Re!==e||me!==t?(ec=null,Wu=sn()+500,kl(e,t)):Zl=ds(e,t);e:do try{if(Ae!==0&&pe!==null){t=pe;var i=tn;t:switch(Ae){case 1:Ae=0,tn=null,Vi(e,t,i,1);break;case 2:case 9:if(Dg(i)){Ae=0,tn=null,iy(t);break}t=function(){Ae!==2&&Ae!==9||Re!==e||(Ae=7),Xn(e)},i.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:Dg(i)?(Ae=0,tn=null,iy(t)):(Ae=0,tn=null,Vi(e,t,i,7));break;case 5:var l=null;switch(pe.tag){case 26:l=pe.memoizedState;case 5:case 27:var o=pe;if(l?u1(l):o.stateNode.complete){Ae=0,tn=null;var s=o.sibling;if(s!==null)pe=s;else{var u=o.return;u!==null?(pe=u,Fc(u)):pe=null}break t}}Ae=0,tn=null,Vi(e,t,i,5);break;case 6:Ae=0,tn=null,Vi(e,t,i,6);break;case 8:em(),et=6;break e;default:throw Error(L(462))}}GT();break}catch(c){Bx(e,c)}while(!0);return vr=yi=null,re.H=r,re.A=a,we=n,pe!==null?0:(Re=null,me=0,Dc(),et)}function GT(){for(;pe!==null&&!mC();)Hx(pe)}function Hx(e){var t=gx(e.alternate,e,Ar);e.memoizedProps=e.pendingProps,t===null?Fc(e):pe=t}function iy(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Kg(n,t,t.pendingProps,t.type,void 0,me);break;case 11:t=Kg(n,t,t.pendingProps,t.type.render,t.ref,me);break;case 5:Bp(t);default:yx(n,t),t=pe=yS(t,Ar),t=gx(n,t,Ar)}e.memoizedProps=e.pendingProps,t===null?Fc(e):pe=t}function Vi(e,t,n,r){vr=yi=null,Bp(t),tl=null,Fo=0;var a=t.return;try{if(jT(e,a,t,n,me)){et=1,Xu(e,En(n,e.current)),pe=null;return}}catch(i){if(a!==null)throw pe=a,i;et=1,Xu(e,En(n,e.current)),pe=null;return}t.flags&32768?(ye||r===1?e=!0:Zl||me&536870912?e=!1:(na=e=!0,(r===2||r===9||r===3||r===6)&&(r=hn.current,r!==null&&r.tag===13&&(r.flags|=16384))),Fx(t,e)):Fc(t)}function Fc(e){var t=e;do{if(t.flags&32768){Fx(t,na);return}e=t.return;var n=UT(t.alternate,t,Ar);if(n!==null){pe=n;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);et===0&&(et=5)}function Fx(e,t){do{var n=PT(e.alternate,e);if(n!==null){n.flags&=32767,pe=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){pe=e;return}pe=e=n}while(e!==null);et=6,pe=null}function ly(e,t,n,r,a,i,l,o,s){e.cancelPendingCommit=null;do qc();while(ht!==0);if(we&6)throw Error(L(327));if(t!==null){if(t===e.current)throw Error(L(177));if(i=t.lanes|t.childLanes,i|=Cp,CC(e,n,i,l,o,s),e===Re&&(pe=Re=null,me=0),Al=t,da=e,xr=n,ih=i,lh=a,Lx=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,XT(Bu,function(){return Yx(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=re.T,re.T=null,a=Ee.p,Ee.p=2,l=we,we|=4;try{BT(e,t,n)}finally{we=l,Ee.p=a,re.T=r}}ht=1,qx(),Gx(),Vx()}}function qx(){if(ht===1){ht=0;var e=da,t=Al,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=re.T,re.T=null;var r=Ee.p;Ee.p=2;var a=we;we|=4;try{kx(t,e);var i=fh,l=uS(e.containerInfo),o=i.focusedElem,s=i.selectionRange;if(l!==o&&o&&o.ownerDocument&&sS(o.ownerDocument.documentElement,o)){if(s!==null&&Ep(o)){var u=s.start,c=s.end;if(c===void 0&&(c=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(c,o.value.length);else{var f=o.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var h=d.getSelection(),b=o.textContent.length,y=Math.min(s.start,b),_=s.end===void 0?y:Math.min(s.end,b);!h.extend&&y>_&&(l=_,_=y,y=l);var p=kg(o,y),g=kg(o,_);if(p&&g&&(h.rangeCount!==1||h.anchorNode!==p.node||h.anchorOffset!==p.offset||h.focusNode!==g.node||h.focusOffset!==g.offset)){var m=f.createRange();m.setStart(p.node,p.offset),h.removeAllRanges(),y>_?(h.addRange(m),h.extend(g.node,g.offset)):(m.setEnd(g.node,g.offset),h.addRange(m))}}}}for(f=[],h=o;h=h.parentNode;)h.nodeType===1&&f.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<f.length;o++){var S=f[o];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}uc=!!ch,fh=ch=null}finally{we=a,Ee.p=r,re.T=n}}e.current=t,ht=2}}function Gx(){if(ht===2){ht=0;var e=da,t=Al,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=re.T,re.T=null;var r=Ee.p;Ee.p=2;var a=we;we|=4;try{wx(e,t.alternate,t)}finally{we=a,Ee.p=r,re.T=n}}ht=3}}function Vx(){if(ht===4||ht===3){ht=0,gC();var e=da,t=Al,n=xr,r=Lx;t.subtreeFlags&10256||t.flags&10256?ht=5:(ht=0,Al=da=null,Qx(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(fa=null),yp(n),t=t.stateNode,un&&typeof un.onCommitFiberRoot=="function")try{un.onCommitFiberRoot(fs,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=re.T,a=Ee.p,Ee.p=2,re.T=null;try{for(var i=e.onRecoverableError,l=0;l<r.length;l++){var o=r[l];i(o.value,{componentStack:o.stack})}}finally{re.T=t,Ee.p=a}}xr&3&&qc(),Xn(e),a=e.pendingLanes,n&261930&&a&42?e===oh?Mo++:(Mo=0,oh=e):Mo=0,bs(0)}}function Qx(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,gs(t)))}function qc(){return qx(),Gx(),Vx(),Yx()}function Yx(){if(ht!==5)return!1;var e=da,t=ih;ih=0;var n=yp(xr),r=re.T,a=Ee.p;try{Ee.p=32>n?32:n,re.T=null,n=lh,lh=null;var i=da,l=xr;if(ht=0,Al=da=null,xr=0,we&6)throw Error(L(331));var o=we;if(we|=4,Mx(i.current),Nx(i,i.current,l,n),we=o,bs(0,!1),un&&typeof un.onPostCommitFiberRoot=="function")try{un.onPostCommitFiberRoot(fs,i)}catch{}return!0}finally{Ee.p=a,re.T=r,Qx(e,t)}}function oy(e,t,n){t=En(n,t),t=eh(e.stateNode,t,2),e=ca(e,t,2),e!==null&&(hs(e,2),Xn(e))}function ke(e,t,n){if(e.tag===3)oy(e,e,n);else for(;t!==null;){if(t.tag===3){oy(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(fa===null||!fa.has(r))){e=En(n,e),n=cx(2),r=ca(t,n,2),r!==null&&(fx(n,r,t,e),hs(r,2),Xn(r));break}}t=t.return}}function $f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ZT;var a=new Set;r.set(t,a)}else a=r.get(t),a===void 0&&(a=new Set,r.set(t,a));a.has(n)||(Kp=!0,a.add(n),e=VT.bind(null,e,t,n),t.then(e,e))}function VT(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Re===e&&(me&n)===n&&(et===4||et===3&&(me&62914560)===me&&300>sn()-Zc?!(we&2)&&kl(e,0):Wp|=n,Tl===me&&(Tl=0)),Xn(e)}function Xx(e,t){t===0&&(t=I0()),e=gi(e,t),e!==null&&(hs(e,t),Xn(e))}function QT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Xx(e,n)}function YT(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(L(314))}r!==null&&r.delete(t),Xx(e,n)}function XT(e,t){return mp(e,t)}var nc=null,ji=null,sh=!1,rc=!1,If=!1,aa=0;function Xn(e){e!==ji&&e.next===null&&(ji===null?nc=ji=e:ji=ji.next=e),rc=!0,sh||(sh=!0,KT())}function bs(e,t){if(!If&&rc){If=!0;do for(var n=!1,r=nc;r!==null;){if(e!==0){var a=r.pendingLanes;if(a===0)var i=0;else{var l=r.suspendedLanes,o=r.pingedLanes;i=(1<<31-cn(42|e)+1)-1,i&=a&~(l&~o),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,sy(r,i))}else i=me,i=zc(r,r===Re?i:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(i&3)||ds(r,i)||(n=!0,sy(r,i));r=r.next}while(n);If=!1}}function JT(){Jx()}function Jx(){rc=sh=!1;var e=0;aa!==0&&sA()&&(e=aa);for(var t=sn(),n=null,r=nc;r!==null;){var a=r.next,i=Kx(r,t);i===0?(r.next=null,n===null?nc=a:n.next=a,a===null&&(ji=n)):(n=r,(e!==0||i&3)&&(rc=!0)),r=a}ht!==0&&ht!==5||bs(e),aa!==0&&(aa=0)}function Kx(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var l=31-cn(i),o=1<<l,s=a[l];s===-1?(!(o&n)||o&r)&&(a[l]=EC(o,t)):s<=t&&(e.expiredLanes|=o),i&=~o}if(t=Re,n=me,n=zc(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&mf(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ds(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&mf(r),yp(n)){case 2:case 8:n=B0;break;case 32:n=Bu;break;case 268435456:n=$0;break;default:n=Bu}return r=Wx.bind(null,e),n=mp(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&mf(r),e.callbackPriority=2,e.callbackNode=null,2}function Wx(e,t){if(ht!==0&&ht!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(qc()&&e.callbackNode!==n)return null;var r=me;return r=zc(e,e===Re?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Px(e,r,t),Kx(e,sn()),e.callbackNode!=null&&e.callbackNode===n?Wx.bind(null,e):null)}function sy(e,t){if(qc())return null;Px(e,t,!0)}function KT(){cA(function(){we&6?mp(P0,JT):Jx()})}function tm(){if(aa===0){var e=wl;e===0&&(e=js,js<<=1,!(js&261888)&&(js=256)),aa=e}return aa}function uy(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:pu(""+e)}function cy(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function WT(e,t,n,r,a){if(t==="submit"&&n&&n.stateNode===a){var i=uy((a[Qt]||null).action),l=r.submitter;l&&(t=(t=l[Qt]||null)?uy(t.formAction):l.getAttribute("formAction"),t!==null&&(i=t,l=null));var o=new Rc("action","action",null,r,a);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(aa!==0){var s=l?cy(a,l):new FormData(a);Kd(n,{pending:!0,data:s,method:a.method,action:i},null,s)}}else typeof i=="function"&&(o.preventDefault(),s=l?cy(a,l):new FormData(a),Kd(n,{pending:!0,data:s,method:a.method,action:i},i,s))},currentTarget:a}]})}}for(var Zf=0;Zf<$d.length;Zf++){var Hf=$d[Zf],eA=Hf.toLowerCase(),tA=Hf[0].toUpperCase()+Hf.slice(1);Dn(eA,"on"+tA)}Dn(fS,"onAnimationEnd");Dn(dS,"onAnimationIteration");Dn(hS,"onAnimationStart");Dn("dblclick","onDoubleClick");Dn("focusin","onFocus");Dn("focusout","onBlur");Dn(yT,"onTransitionRun");Dn(vT,"onTransitionStart");Dn(bT,"onTransitionCancel");Dn(pS,"onTransitionEnd");xl("onMouseEnter",["mouseout","mouseover"]);xl("onMouseLeave",["mouseout","mouseover"]);xl("onPointerEnter",["pointerout","pointerover"]);xl("onPointerLeave",["pointerout","pointerover"]);hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hi("onBeforeInput",["compositionend","keypress","textInput","paste"]);hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vo="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(" "),nA=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vo));function e1(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],a=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var l=r.length-1;0<=l;l--){var o=r[l],s=o.instance,u=o.currentTarget;if(o=o.listener,s!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=u;try{i(a)}catch(c){Iu(c)}a.currentTarget=null,i=s}else for(l=0;l<r.length;l++){if(o=r[l],s=o.instance,u=o.currentTarget,o=o.listener,s!==i&&a.isPropagationStopped())break e;i=o,a.currentTarget=u;try{i(a)}catch(c){Iu(c)}a.currentTarget=null,i=s}}}}function he(e,t){var n=t[Rd];n===void 0&&(n=t[Rd]=new Set);var r=e+"__bubble";n.has(r)||(t1(t,e,2,!1),n.add(r))}function Ff(e,t,n){var r=0;t&&(r|=4),t1(n,e,r,t)}var Fs="_reactListening"+Math.random().toString(36).slice(2);function nm(e){if(!e[Fs]){e[Fs]=!0,G0.forEach(function(n){n!=="selectionchange"&&(nA.has(n)||Ff(n,!1,e),Ff(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fs]||(t[Fs]=!0,Ff("selectionchange",!1,t))}}function t1(e,t,n,r){switch(p1(t)){case 2:var a=NA;break;case 8:a=zA;break;default:a=lm}n=a.bind(null,t,n,e),a=void 0,!Ud||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),r?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function qf(e,t,n,r,a){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===a)break;if(l===4)for(l=r.return;l!==null;){var s=l.tag;if((s===3||s===4)&&l.stateNode.containerInfo===a)return;l=l.return}for(;o!==null;){if(l=Pi(o),l===null)return;if(s=l.tag,s===5||s===6||s===26||s===27){r=i=l;continue e}o=o.parentNode}}r=r.return}eS(function(){var u=i,c=Sp(n),f=[];e:{var d=mS.get(e);if(d!==void 0){var h=Rc,b=e;switch(e){case"keypress":if(gu(n)===0)break e;case"keydown":case"keyup":h=YC;break;case"focusin":b="focus",h=Sf;break;case"focusout":b="blur",h=Sf;break;case"beforeblur":case"afterblur":h=Sf;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":h=vg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=UC;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=KC;break;case fS:case dS:case hS:h=$C;break;case pS:h=eT;break;case"scroll":case"scrollend":h=DC;break;case"wheel":h=nT;break;case"copy":case"cut":case"paste":h=ZC;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Sg;break;case"toggle":case"beforetoggle":h=aT}var y=(t&4)!==0,_=!y&&(e==="scroll"||e==="scrollend"),p=y?d!==null?d+"Capture":null:d;y=[];for(var g=u,m;g!==null;){var S=g;if(m=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||m===null||p===null||(S=Bo(g,p),S!=null&&y.push(Qo(g,S,m))),_)break;g=g.return}0<y.length&&(d=new h(d,b,null,n,c),f.push({event:d,listeners:y}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Ld&&(b=n.relatedTarget||n.fromElement)&&(Pi(b)||b[Pl]))break e;if((h||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(b=n.relatedTarget||n.toElement,h=u,b=b?Pi(b):null,b!==null&&(_=cs(b),y=b.tag,b!==_||y!==5&&y!==27&&y!==6)&&(b=null)):(h=null,b=u),h!==b)){if(y=vg,S="onMouseLeave",p="onMouseEnter",g="mouse",(e==="pointerout"||e==="pointerover")&&(y=Sg,S="onPointerLeave",p="onPointerEnter",g="pointer"),_=h==null?d:go(h),m=b==null?d:go(b),d=new y(S,g+"leave",h,n,c),d.target=_,d.relatedTarget=m,S=null,Pi(c)===u&&(y=new y(p,g+"enter",b,n,c),y.target=m,y.relatedTarget=_,S=y),_=S,h&&b)t:{for(y=rA,p=h,g=b,m=0,S=p;S;S=y(S))m++;S=0;for(var k=g;k;k=y(k))S++;for(;0<m-S;)p=y(p),m--;for(;0<S-m;)g=y(g),S--;for(;m--;){if(p===g||g!==null&&p===g.alternate){y=p;break t}p=y(p),g=y(g)}y=null}else y=null;h!==null&&fy(f,d,h,y,!1),b!==null&&_!==null&&fy(f,_,b,y,!0)}}e:{if(d=u?go(u):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var E=Eg;else if(wg(d))if(lS)E=pT;else{E=dT;var T=fT}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&bp(u.elementType)&&(E=Eg):E=hT;if(E&&(E=E(e,u))){iS(f,E,n,c);break e}T&&T(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&Dd(d,"number",d.value)}switch(T=u?go(u):window,e){case"focusin":(wg(T)||T.contentEditable==="true")&&(Ii=T,Pd=u,Eo=null);break;case"focusout":Eo=Pd=Ii=null;break;case"mousedown":Bd=!0;break;case"contextmenu":case"mouseup":case"dragend":Bd=!1,Og(f,n,c);break;case"selectionchange":if(gT)break;case"keydown":case"keyup":Og(f,n,c)}var O;if(wp)e:{switch(e){case"compositionstart":var z="onCompositionStart";break e;case"compositionend":z="onCompositionEnd";break e;case"compositionupdate":z="onCompositionUpdate";break e}z=void 0}else $i?rS(e,n)&&(z="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(nS&&n.locale!=="ko"&&($i||z!=="onCompositionStart"?z==="onCompositionEnd"&&$i&&(O=tS()):(ta=c,xp="value"in ta?ta.value:ta.textContent,$i=!0)),T=ac(u,z),0<T.length&&(z=new bg(z,e,null,n,c),f.push({event:z,listeners:T}),O?z.data=O:(O=aS(n),O!==null&&(z.data=O)))),(O=lT?oT(e,n):sT(e,n))&&(z=ac(u,"onBeforeInput"),0<z.length&&(T=new bg("onBeforeInput","beforeinput",null,n,c),f.push({event:T,listeners:z}),T.data=O)),WT(f,e,u,n,c)}e1(f,t)})}function Qo(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ac(e,t){for(var n=t+"Capture",r=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Bo(e,n),a!=null&&r.unshift(Qo(e,a,i)),a=Bo(e,t),a!=null&&r.push(Qo(e,a,i))),e.tag===3)return r;e=e.return}return[]}function rA(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function fy(e,t,n,r,a){for(var i=t._reactName,l=[];n!==null&&n!==r;){var o=n,s=o.alternate,u=o.stateNode;if(o=o.tag,s!==null&&s===r)break;o!==5&&o!==26&&o!==27||u===null||(s=u,a?(u=Bo(n,i),u!=null&&l.unshift(Qo(n,u,s))):a||(u=Bo(n,i),u!=null&&l.push(Qo(n,u,s)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var aA=/\r\n?/g,iA=/\u0000|\uFFFD/g;function dy(e){return(typeof e=="string"?e:""+e).replace(aA,`
|
|
49
|
+
`).replace(iA,"")}function n1(e,t){return t=dy(t),dy(e)===t}function Oe(e,t,n,r,a,i){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||_l(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&_l(e,""+r);break;case"className":Us(e,"class",r);break;case"tabIndex":Us(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Us(e,n,r);break;case"style":W0(e,r,i);break;case"data":if(t!=="object"){Us(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=pu(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Oe(e,t,"name",a.name,a,null),Oe(e,t,"formEncType",a.formEncType,a,null),Oe(e,t,"formMethod",a.formMethod,a,null),Oe(e,t,"formTarget",a.formTarget,a,null)):(Oe(e,t,"encType",a.encType,a,null),Oe(e,t,"method",a.method,a,null),Oe(e,t,"target",a.target,a,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=pu(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=yr);break;case"onScroll":r!=null&&he("scroll",e);break;case"onScrollEnd":r!=null&&he("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(L(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(L(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=pu(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":he("beforetoggle",e),he("toggle",e),hu(e,"popover",r);break;case"xlinkActuate":nr(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":nr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":nr(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":nr(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":nr(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":nr(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":nr(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":nr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":nr(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":hu(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=MC.get(n)||n,hu(e,n,r))}}function uh(e,t,n,r,a,i){switch(n){case"style":W0(e,r,i);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(L(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(L(60));e.innerHTML=n}}break;case"children":typeof r=="string"?_l(e,r):(typeof r=="number"||typeof r=="bigint")&&_l(e,""+r);break;case"onScroll":r!=null&&he("scroll",e);break;case"onScrollEnd":r!=null&&he("scrollend",e);break;case"onClick":r!=null&&(e.onclick=yr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!V0.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[Qt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof r=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):hu(e,n,r)}}}function wt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":he("error",e),he("load",e);var r=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var l=n[i];if(l!=null)switch(i){case"src":r=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(L(137,t));default:Oe(e,t,i,l,n,null)}}a&&Oe(e,t,"srcSet",n.srcSet,n,null),r&&Oe(e,t,"src",n.src,n,null);return;case"input":he("invalid",e);var o=i=l=a=null,s=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var c=n[r];if(c!=null)switch(r){case"name":a=c;break;case"type":l=c;break;case"checked":s=c;break;case"defaultChecked":u=c;break;case"value":i=c;break;case"defaultValue":o=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(L(137,t));break;default:Oe(e,t,r,c,n,null)}}X0(e,i,o,s,u,l,a,!1);return;case"select":he("invalid",e),r=l=i=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":i=o;break;case"defaultValue":l=o;break;case"multiple":r=o;default:Oe(e,t,a,o,n,null)}t=i,n=l,e.multiple=!!r,t!=null?Ki(e,!!r,t,!1):n!=null&&Ki(e,!!r,n,!0);return;case"textarea":he("invalid",e),i=a=r=null;for(l in n)if(n.hasOwnProperty(l)&&(o=n[l],o!=null))switch(l){case"value":r=o;break;case"defaultValue":a=o;break;case"children":i=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(L(91));break;default:Oe(e,t,l,o,n,null)}K0(e,r,a,i);return;case"option":for(s in n)if(n.hasOwnProperty(s)&&(r=n[s],r!=null))switch(s){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Oe(e,t,s,r,n,null)}return;case"dialog":he("beforetoggle",e),he("toggle",e),he("cancel",e),he("close",e);break;case"iframe":case"object":he("load",e);break;case"video":case"audio":for(r=0;r<Vo.length;r++)he(Vo[r],e);break;case"image":he("error",e),he("load",e);break;case"details":he("toggle",e);break;case"embed":case"source":case"link":he("error",e),he("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(L(137,t));default:Oe(e,t,u,r,n,null)}return;default:if(bp(t)){for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!==void 0&&uh(e,t,c,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&Oe(e,t,o,r,n,null))}function lA(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,l=null,o=null,s=null,u=null,c=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&f!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=f;default:r.hasOwnProperty(h)||Oe(e,t,h,null,r,f)}}for(var d in r){var h=r[d];if(f=n[d],r.hasOwnProperty(d)&&(h!=null||f!=null))switch(d){case"type":i=h;break;case"name":a=h;break;case"checked":u=h;break;case"defaultChecked":c=h;break;case"value":l=h;break;case"defaultValue":o=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(L(137,t));break;default:h!==f&&Oe(e,t,d,h,r,f)}}jd(e,l,o,s,u,c,i,a);return;case"select":h=l=o=d=null;for(i in n)if(s=n[i],n.hasOwnProperty(i)&&s!=null)switch(i){case"value":break;case"multiple":h=s;default:r.hasOwnProperty(i)||Oe(e,t,i,null,r,s)}for(a in r)if(i=r[a],s=n[a],r.hasOwnProperty(a)&&(i!=null||s!=null))switch(a){case"value":d=i;break;case"defaultValue":o=i;break;case"multiple":l=i;default:i!==s&&Oe(e,t,a,i,r,s)}t=o,n=l,r=h,d!=null?Ki(e,!!n,d,!1):!!r!=!!n&&(t!=null?Ki(e,!!n,t,!0):Ki(e,!!n,n?[]:"",!1));return;case"textarea":h=d=null;for(o in n)if(a=n[o],n.hasOwnProperty(o)&&a!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Oe(e,t,o,null,r,a)}for(l in r)if(a=r[l],i=n[l],r.hasOwnProperty(l)&&(a!=null||i!=null))switch(l){case"value":d=a;break;case"defaultValue":h=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(L(91));break;default:a!==i&&Oe(e,t,l,a,r,i)}J0(e,d,h);return;case"option":for(var b in n)if(d=n[b],n.hasOwnProperty(b)&&d!=null&&!r.hasOwnProperty(b))switch(b){case"selected":e.selected=!1;break;default:Oe(e,t,b,null,r,d)}for(s in r)if(d=r[s],h=n[s],r.hasOwnProperty(s)&&d!==h&&(d!=null||h!=null))switch(s){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Oe(e,t,s,d,r,h)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var y in n)d=n[y],n.hasOwnProperty(y)&&d!=null&&!r.hasOwnProperty(y)&&Oe(e,t,y,null,r,d);for(u in r)if(d=r[u],h=n[u],r.hasOwnProperty(u)&&d!==h&&(d!=null||h!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(L(137,t));break;default:Oe(e,t,u,d,r,h)}return;default:if(bp(t)){for(var _ in n)d=n[_],n.hasOwnProperty(_)&&d!==void 0&&!r.hasOwnProperty(_)&&uh(e,t,_,void 0,r,d);for(c in r)d=r[c],h=n[c],!r.hasOwnProperty(c)||d===h||d===void 0&&h===void 0||uh(e,t,c,d,r,h);return}}for(var p in n)d=n[p],n.hasOwnProperty(p)&&d!=null&&!r.hasOwnProperty(p)&&Oe(e,t,p,null,r,d);for(f in r)d=r[f],h=n[f],!r.hasOwnProperty(f)||d===h||d==null&&h==null||Oe(e,t,f,d,r,h)}function hy(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function oA(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var a=n[r],i=a.transferSize,l=a.initiatorType,o=a.duration;if(i&&o&&hy(l)){for(l=0,o=a.responseEnd,r+=1;r<n.length;r++){var s=n[r],u=s.startTime;if(u>o)break;var c=s.transferSize,f=s.initiatorType;c&&hy(f)&&(s=s.responseEnd,l+=c*(s<o?1:(o-u)/(s-u)))}if(--r,t+=8*(i+l)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var ch=null,fh=null;function ic(e){return e.nodeType===9?e:e.ownerDocument}function py(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function r1(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function dh(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gf=null;function sA(){var e=window.event;return e&&e.type==="popstate"?e===Gf?!1:(Gf=e,!0):(Gf=null,!1)}var a1=typeof setTimeout=="function"?setTimeout:void 0,uA=typeof clearTimeout=="function"?clearTimeout:void 0,my=typeof Promise=="function"?Promise:void 0,cA=typeof queueMicrotask=="function"?queueMicrotask:typeof my<"u"?function(e){return my.resolve(null).then(e).catch(fA)}:a1;function fA(e){setTimeout(function(){throw e})}function Aa(e){return e==="head"}function gy(e,t){var n=t,r=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(a),Nl(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")jo(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,jo(n);for(var i=n.firstChild;i;){var l=i.nextSibling,o=i.nodeName;i[ps]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=l}}else n==="body"&&jo(e.ownerDocument.body);n=a}while(n);Nl(t)}function yy(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function hh(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":hh(n),vp(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function dA(e,t,n,r){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[ps])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=An(e.nextSibling),e===null)break}return null}function hA(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=An(e.nextSibling),e===null))return null;return e}function i1(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=An(e.nextSibling),e===null))return null;return e}function ph(e){return e.data==="$?"||e.data==="$~"}function mh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function pA(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function An(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==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var gh=null;function vy(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return An(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function by(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function l1(e,t,n){switch(t=ic(n),e){case"html":if(e=t.documentElement,!e)throw Error(L(452));return e;case"head":if(e=t.head,!e)throw Error(L(453));return e;case"body":if(e=t.body,!e)throw Error(L(454));return e;default:throw Error(L(451))}}function jo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);vp(e)}var kn=new Map,Sy=new Set;function lc(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kr=Ee.d;Ee.d={f:mA,r:gA,D:yA,C:vA,L:bA,m:SA,X:_A,S:xA,M:wA};function mA(){var e=kr.f(),t=Hc();return e||t}function gA(e){var t=Bl(e);t!==null&&t.tag===5&&t.type==="form"?WS(t):kr.r(e)}var Hl=typeof document>"u"?null:document;function o1(e,t,n){var r=Hl;if(r&&typeof t=="string"&&t){var a=wn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Sy.has(a)||(Sy.add(a),e={rel:e,crossOrigin:n,href:t},r.querySelector(a)===null&&(t=r.createElement("link"),wt(t,"link",e),yt(t),r.head.appendChild(t)))}}function yA(e){kr.D(e),o1("dns-prefetch",e,null)}function vA(e,t){kr.C(e,t),o1("preconnect",e,t)}function bA(e,t,n){kr.L(e,t,n);var r=Hl;if(r&&e&&t){var a='link[rel="preload"][as="'+wn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+wn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+wn(n.imageSizes)+'"]')):a+='[href="'+wn(e)+'"]';var i=a;switch(t){case"style":i=Ol(e);break;case"script":i=Fl(e)}kn.has(i)||(e=Fe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),kn.set(i,e),r.querySelector(a)!==null||t==="style"&&r.querySelector(Ss(i))||t==="script"&&r.querySelector(xs(i))||(t=r.createElement("link"),wt(t,"link",e),yt(t),r.head.appendChild(t)))}}function SA(e,t){kr.m(e,t);var n=Hl;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+wn(r)+'"][href="'+wn(e)+'"]',i=a;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Fl(e)}if(!kn.has(i)&&(e=Fe({rel:"modulepreload",href:e},t),kn.set(i,e),n.querySelector(a)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(xs(i)))return}r=n.createElement("link"),wt(r,"link",e),yt(r),n.head.appendChild(r)}}}function xA(e,t,n){kr.S(e,t,n);var r=Hl;if(r&&e){var a=Ji(r).hoistableStyles,i=Ol(e);t=t||"default";var l=a.get(i);if(!l){var o={loading:0,preload:null};if(l=r.querySelector(Ss(i)))o.loading=5;else{e=Fe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=kn.get(i))&&rm(e,n);var s=l=r.createElement("link");yt(s),wt(s,"link",e),s._p=new Promise(function(u,c){s.onload=u,s.onerror=c}),s.addEventListener("load",function(){o.loading|=1}),s.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Eu(l,t,r)}l={type:"stylesheet",instance:l,count:1,state:o},a.set(i,l)}}}function _A(e,t){kr.X(e,t);var n=Hl;if(n&&e){var r=Ji(n).hoistableScripts,a=Fl(e),i=r.get(a);i||(i=n.querySelector(xs(a)),i||(e=Fe({src:e,async:!0},t),(t=kn.get(a))&&am(e,t),i=n.createElement("script"),yt(i),wt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function wA(e,t){kr.M(e,t);var n=Hl;if(n&&e){var r=Ji(n).hoistableScripts,a=Fl(e),i=r.get(a);i||(i=n.querySelector(xs(a)),i||(e=Fe({src:e,async:!0,type:"module"},t),(t=kn.get(a))&&am(e,t),i=n.createElement("script"),yt(i),wt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},r.set(a,i))}}function xy(e,t,n,r){var a=(a=oa.current)?lc(a):null;if(!a)throw Error(L(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ol(n.href),n=Ji(a).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ol(n.href);var i=Ji(a).hoistableStyles,l=i.get(e);if(l||(a=a.ownerDocument||a,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,l),(i=a.querySelector(Ss(e)))&&!i._p&&(l.instance=i,l.state.loading=5),kn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},kn.set(e,n),i||EA(a,e,n,l.state))),t&&r===null)throw Error(L(528,""));return l}if(t&&r!==null)throw Error(L(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Fl(n),n=Ji(a).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(L(444,e))}}function Ol(e){return'href="'+wn(e)+'"'}function Ss(e){return'link[rel="stylesheet"]['+e+"]"}function s1(e){return Fe({},e,{"data-precedence":e.precedence,precedence:null})}function EA(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),wt(t,"link",n),yt(t),e.head.appendChild(t))}function Fl(e){return'[src="'+wn(e)+'"]'}function xs(e){return"script[async]"+e}function _y(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+wn(n.href)+'"]');if(r)return t.instance=r,yt(r),r;var a=Fe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),yt(r),wt(r,"style",a),Eu(r,n.precedence,e),t.instance=r;case"stylesheet":a=Ol(n.href);var i=e.querySelector(Ss(a));if(i)return t.state.loading|=4,t.instance=i,yt(i),i;r=s1(n),(a=kn.get(a))&&rm(r,a),i=(e.ownerDocument||e).createElement("link"),yt(i);var l=i;return l._p=new Promise(function(o,s){l.onload=o,l.onerror=s}),wt(i,"link",r),t.state.loading|=4,Eu(i,n.precedence,e),t.instance=i;case"script":return i=Fl(n.src),(a=e.querySelector(xs(i)))?(t.instance=a,yt(a),a):(r=n,(a=kn.get(i))&&(r=Fe({},n),am(r,a)),e=e.ownerDocument||e,a=e.createElement("script"),yt(a),wt(a,"link",r),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(L(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Eu(r,n.precedence,e));return t.instance}function Eu(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=r.length?r[r.length-1]:null,i=a,l=0;l<r.length;l++){var o=r[l];if(o.dataset.precedence===t)i=o;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function rm(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function am(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Cu=null;function wy(e,t,n){if(Cu===null){var r=new Map,a=Cu=new Map;a.set(n,r)}else a=Cu,r=a.get(n),r||(r=new Map,a.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[ps]||i[St]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var l=i.getAttribute(t)||"";l=e+l;var o=r.get(l);o?o.push(i):r.set(l,[i])}}return r}function Ey(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function CA(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function u1(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function TA(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=Ol(r.href),i=t.querySelector(Ss(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=oc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,yt(i);return}i=t.ownerDocument||t,r=s1(r),(a=kn.get(a))&&rm(r,a),i=i.createElement("link"),yt(i);var l=i;l._p=new Promise(function(o,s){l.onload=o,l.onerror=s}),wt(i,"link",r),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=oc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Vf=0;function AA(e,t){return e.stylesheets&&e.count===0&&Tu(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Tu(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Vf===0&&(Vf=62500*oA());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Tu(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Vf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(a)}}:null}function oc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Tu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sc=null;function Tu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sc=new Map,t.forEach(kA,e),sc=null,oc.call(e))}function kA(e,t){if(!(t.state.loading&4)){var n=sc.get(e);if(n)var r=n.get(null);else{n=new Map,sc.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var l=a[i];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),r=l)}r&&n.set(null,r)}a=t.instance,l=a.getAttribute("data-precedence"),i=n.get(l)||r,i===r&&n.set(null,a),n.set(l,a),this.count++,r=oc.bind(this),a.addEventListener("load",r),a.addEventListener("error",r),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Yo={$$typeof:gr,Provider:null,Consumer:null,_currentValue:ei,_currentValue2:ei,_threadCount:0};function OA(e,t,n,r,a,i,l,o,s){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=gf(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gf(0),this.hiddenUpdates=gf(null),this.identifierPrefix=r,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function c1(e,t,n,r,a,i,l,o,s,u,c,f){return e=new OA(e,t,n,l,s,u,c,f,o),t=1,i===!0&&(t|=24),i=an(3,null,null,t),e.current=i,i.stateNode=e,t=Np(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:r,isDehydrated:n,cache:t},Mp(i),e}function f1(e){return e?(e=Fi,e):Fi}function d1(e,t,n,r,a,i){a=f1(a),r.context===null?r.context=a:r.pendingContext=a,r=ua(t),r.payload={element:n},i=i===void 0?null:i,i!==null&&(r.callback=i),n=ca(e,r,t),n!==null&&(Gt(n,e,t),To(n,e,t))}function Cy(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function im(e,t){Cy(e,t),(e=e.alternate)&&Cy(e,t)}function h1(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Gt(t,e,67108864),im(e,67108864)}}function Ty(e){if(e.tag===13||e.tag===31){var t=fn();t=gp(t);var n=gi(e,t);n!==null&&Gt(n,e,t),im(e,t)}}var uc=!0;function NA(e,t,n,r){var a=re.T;re.T=null;var i=Ee.p;try{Ee.p=2,lm(e,t,n,r)}finally{Ee.p=i,re.T=a}}function zA(e,t,n,r){var a=re.T;re.T=null;var i=Ee.p;try{Ee.p=8,lm(e,t,n,r)}finally{Ee.p=i,re.T=a}}function lm(e,t,n,r){if(uc){var a=yh(r);if(a===null)qf(e,t,r,cc,n),Ay(e,r);else if(MA(a,e,t,n,r))r.stopPropagation();else if(Ay(e,r),t&4&&-1<RA.indexOf(e)){for(;a!==null;){var i=Bl(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var l=Pa(i.pendingLanes);if(l!==0){var o=i;for(o.pendingLanes|=2,o.entangledLanes|=2;l;){var s=1<<31-cn(l);o.entanglements[1]|=s,l&=~s}Xn(i),!(we&6)&&(Wu=sn()+500,bs(0))}}break;case 31:case 13:o=gi(i,2),o!==null&&Gt(o,i,2),Hc(),im(i,2)}if(i=yh(r),i===null&&qf(e,t,r,cc,n),i===a)break;a=i}a!==null&&r.stopPropagation()}else qf(e,t,r,null,n)}}function yh(e){return e=Sp(e),om(e)}var cc=null;function om(e){if(cc=null,e=Pi(e),e!==null){var t=cs(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=M0(t),e!==null)return e;e=null}else if(n===31){if(e=j0(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 cc=e,null}function p1(e){switch(e){case"beforetoggle":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"toggle":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 2;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"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(yC()){case P0:return 2;case B0:return 8;case Bu:case vC:return 32;case $0:return 268435456;default:return 32}default:return 32}}var vh=!1,ha=null,pa=null,ma=null,Xo=new Map,Jo=new Map,Fr=[],RA="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".split(" ");function Ay(e,t){switch(e){case"focusin":case"focusout":ha=null;break;case"dragenter":case"dragleave":pa=null;break;case"mouseover":case"mouseout":ma=null;break;case"pointerover":case"pointerout":Xo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Jo.delete(t.pointerId)}}function lo(e,t,n,r,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Bl(t),t!==null&&h1(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function MA(e,t,n,r,a){switch(t){case"focusin":return ha=lo(ha,e,t,n,r,a),!0;case"dragenter":return pa=lo(pa,e,t,n,r,a),!0;case"mouseover":return ma=lo(ma,e,t,n,r,a),!0;case"pointerover":var i=a.pointerId;return Xo.set(i,lo(Xo.get(i)||null,e,t,n,r,a)),!0;case"gotpointercapture":return i=a.pointerId,Jo.set(i,lo(Jo.get(i)||null,e,t,n,r,a)),!0}return!1}function m1(e){var t=Pi(e.target);if(t!==null){var n=cs(t);if(n!==null){if(t=n.tag,t===13){if(t=M0(n),t!==null){e.blockedOn=t,fg(e.priority,function(){Ty(n)});return}}else if(t===31){if(t=j0(n),t!==null){e.blockedOn=t,fg(e.priority,function(){Ty(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 Au(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=yh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ld=r,n.target.dispatchEvent(r),Ld=null}else return t=Bl(n),t!==null&&h1(t),e.blockedOn=n,!1;t.shift()}return!0}function ky(e,t,n){Au(e)&&n.delete(t)}function jA(){vh=!1,ha!==null&&Au(ha)&&(ha=null),pa!==null&&Au(pa)&&(pa=null),ma!==null&&Au(ma)&&(ma=null),Xo.forEach(ky),Jo.forEach(ky)}function qs(e,t){e.blockedOn===t&&(e.blockedOn=null,vh||(vh=!0,pt.unstable_scheduleCallback(pt.unstable_NormalPriority,jA)))}var Gs=null;function Oy(e){Gs!==e&&(Gs=e,pt.unstable_scheduleCallback(pt.unstable_NormalPriority,function(){Gs===e&&(Gs=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],a=e[t+2];if(typeof r!="function"){if(om(r||n)===null)continue;break}var i=Bl(n);i!==null&&(e.splice(t,3),t-=3,Kd(i,{pending:!0,data:a,method:n.method,action:r},r,a))}}))}function Nl(e){function t(s){return qs(s,e)}ha!==null&&qs(ha,e),pa!==null&&qs(pa,e),ma!==null&&qs(ma,e),Xo.forEach(t),Jo.forEach(t);for(var n=0;n<Fr.length;n++){var r=Fr[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Fr.length&&(n=Fr[0],n.blockedOn===null);)m1(n),n.blockedOn===null&&Fr.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var a=n[r],i=n[r+1],l=a[Qt]||null;if(typeof i=="function")l||Oy(n);else if(l){var o=null;if(i&&i.hasAttribute("formAction")){if(a=i,l=i[Qt]||null)o=l.formAction;else if(om(a)!==null)continue}else o=l.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),Oy(n)}}}function g1(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(l){return a=l})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function sm(e){this._internalRoot=e}Gc.prototype.render=sm.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));var n=t.current,r=fn();d1(n,r,e,t,null,null)};Gc.prototype.unmount=sm.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;d1(e.current,2,null,e,null,null),Hc(),t[Pl]=null}};function Gc(e){this._internalRoot=e}Gc.prototype.unstable_scheduleHydration=function(e){if(e){var t=q0();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Fr.length&&t!==0&&t<Fr[n].priority;n++);Fr.splice(n,0,e),n===0&&m1(e)}};var Ny=z0.version;if(Ny!=="19.2.4")throw Error(L(527,Ny,"19.2.4"));Ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=cC(t),e=e!==null?D0(e):null,e=e===null?null:e.stateNode,e};var DA={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:re,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Vs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vs.isDisabled&&Vs.supportsFiber)try{fs=Vs.inject(DA),un=Vs}catch{}}Oc.createRoot=function(e,t){if(!R0(e))throw Error(L(299));var n=!1,r="",a=ox,i=sx,l=ux;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError)),t=c1(e,1,!1,null,null,n,r,null,a,i,l,g1),e[Pl]=t.current,nm(e),new sm(t)};Oc.hydrateRoot=function(e,t,n){if(!R0(e))throw Error(L(299));var r=!1,a="",i=ox,l=sx,o=ux,s=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),t=c1(e,1,!0,t,n??null,r,a,s,i,l,o,g1),t.context=f1(null),n=t.current,r=fn(),r=gp(r),a=ua(r),a.callback=null,ca(n,a,r),n=r,t.current.lanes=n,hs(t,n),Xn(t),e[Pl]=t.current,nm(e),new Gc(t)};Oc.version="19.2.4";function y1(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y1)}catch(e){console.error(e)}}y1(),E0.exports=Oc;var LA=E0.exports;const UA=Ac(LA);var ql=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,qr,sl,a0,PA=(a0=class extends ql{constructor(){super();ee(this,qa);ee(this,qr);ee(this,sl);G(this,sl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){C(this,qr)||this.setEventListener(C(this,sl))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,qr))==null||t.call(this),G(this,qr,void 0))}setEventListener(t){var n;G(this,sl,t),(n=C(this,qr))==null||n.call(this),G(this,qr,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){C(this,qa)!==t&&(G(this,qa,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof C(this,qa)=="boolean"?C(this,qa):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},qa=new WeakMap,qr=new WeakMap,sl=new WeakMap,a0),um=new PA,BA={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Gr,op,i0,$A=(i0=class{constructor(){ee(this,Gr,BA);ee(this,op,!1)}setTimeoutProvider(e){G(this,Gr,e)}setTimeout(e,t){return C(this,Gr).setTimeout(e,t)}clearTimeout(e){C(this,Gr).clearTimeout(e)}setInterval(e,t){return C(this,Gr).setInterval(e,t)}clearInterval(e){C(this,Gr).clearInterval(e)}},Gr=new WeakMap,op=new WeakMap,i0),Za=new $A;function IA(e){setTimeout(e,0)}var ZA=typeof window>"u"||"Deno"in globalThis;function zt(){}function HA(e,t){return typeof e=="function"?e(t):e}function bh(e){return typeof e=="number"&&e>=0&&e!==1/0}function v1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ga(e,t){return typeof e=="function"?e(t):e}function yn(e,t){return typeof e=="function"?e(t):e}function zy(e,t){const{type:n="all",exact:r,fetchStatus:a,predicate:i,queryKey:l,stale:o}=e;if(l){if(r){if(t.queryHash!==cm(l,t.options))return!1}else if(!Ko(t.queryKey,l))return!1}if(n!=="all"){const s=t.isActive();if(n==="active"&&!s||n==="inactive"&&s)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||a&&a!==t.state.fetchStatus||i&&!i(t))}function Ry(e,t){const{exact:n,status:r,predicate:a,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(ci(t.options.mutationKey)!==ci(i))return!1}else if(!Ko(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||a&&!a(t))}function cm(e,t){return((t==null?void 0:t.queryKeyHashFn)||ci)(e)}function ci(e){return JSON.stringify(e,(t,n)=>Sh(n)?Object.keys(n).sort().reduce((r,a)=>(r[a]=n[a],r),{}):n)}function Ko(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ko(e[n],t[n])):!1}var FA=Object.prototype.hasOwnProperty;function b1(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=My(e)&&My(t);if(!r&&!(Sh(e)&&Sh(t)))return t;const i=(r?e:Object.keys(e)).length,l=r?t:Object.keys(t),o=l.length,s=r?new Array(o):{};let u=0;for(let c=0;c<o;c++){const f=r?c:l[c],d=e[f],h=t[f];if(d===h){s[f]=d,(r?c<i:FA.call(e,f))&&u++;continue}if(d===null||h===null||typeof d!="object"||typeof h!="object"){s[f]=h;continue}const b=b1(d,h,n+1);s[f]=b,b===d&&u++}return i===o&&u===i?e:s}function fc(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function My(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Sh(e){if(!jy(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!jy(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function jy(e){return Object.prototype.toString.call(e)==="[object Object]"}function qA(e){return new Promise(t=>{Za.setTimeout(t,e)})}function xh(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?b1(e,t):t}function GA(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function VA(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var fm=Symbol();function S1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===fm?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function dm(e,t){return typeof e=="function"?e(...t):!!e}function QA(e,t,n){let r=!1,a;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(a??(a=t()),r||(r=!0,a.aborted?n():a.addEventListener("abort",n,{once:!0})),a)}),e}var Wo=(()=>{let e=()=>ZA;return{isServer(){return e()},setIsServer(t){e=t}}})();function _h(){let e,t;const n=new Promise((a,i)=>{e=a,t=i});n.status="pending",n.catch(()=>{});function r(a){Object.assign(n,a),delete n.resolve,delete n.reject}return n.resolve=a=>{r({status:"fulfilled",value:a}),e(a)},n.reject=a=>{r({status:"rejected",reason:a}),t(a)},n}var YA=IA;function XA(){let e=[],t=0,n=o=>{o()},r=o=>{o()},a=YA;const i=o=>{t?e.push(o):a(()=>{n(o)})},l=()=>{const o=e;e=[],o.length&&a(()=>{r(()=>{o.forEach(s=>{n(s)})})})};return{batch:o=>{let s;t++;try{s=o()}finally{t--,t||l()}return s},batchCalls:o=>(...s)=>{i(()=>{o(...s)})},schedule:i,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{a=o}}}var dt=XA(),ul,Vr,cl,l0,JA=(l0=class extends ql{constructor(){super();ee(this,ul,!0);ee(this,Vr);ee(this,cl);G(this,cl,t=>{if(typeof window<"u"&&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(){C(this,Vr)||this.setEventListener(C(this,cl))}onUnsubscribe(){var t;this.hasListeners()||((t=C(this,Vr))==null||t.call(this),G(this,Vr,void 0))}setEventListener(t){var n;G(this,cl,t),(n=C(this,Vr))==null||n.call(this),G(this,Vr,t(this.setOnline.bind(this)))}setOnline(t){C(this,ul)!==t&&(G(this,ul,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return C(this,ul)}},ul=new WeakMap,Vr=new WeakMap,cl=new WeakMap,l0),dc=new JA;function KA(e){return Math.min(1e3*2**e,3e4)}function x1(e){return(e??"online")==="online"?dc.isOnline():!0}var wh=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function _1(e){let t=!1,n=0,r;const a=_h(),i=()=>a.status!=="pending",l=y=>{var _;if(!i()){const p=new wh(y);d(p),(_=e.onCancel)==null||_.call(e,p)}},o=()=>{t=!0},s=()=>{t=!1},u=()=>um.isFocused()&&(e.networkMode==="always"||dc.isOnline())&&e.canRun(),c=()=>x1(e.networkMode)&&e.canRun(),f=y=>{i()||(r==null||r(),a.resolve(y))},d=y=>{i()||(r==null||r(),a.reject(y))},h=()=>new Promise(y=>{var _;r=p=>{(i()||u())&&y(p)},(_=e.onPause)==null||_.call(e)}).then(()=>{var y;r=void 0,i()||(y=e.onContinue)==null||y.call(e)}),b=()=>{if(i())return;let y;const _=n===0?e.initialPromise:void 0;try{y=_??e.fn()}catch(p){y=Promise.reject(p)}Promise.resolve(y).then(f).catch(p=>{var E;if(i())return;const g=e.retry??(Wo.isServer()?0:3),m=e.retryDelay??KA,S=typeof m=="function"?m(n,p):m,k=g===!0||typeof g=="number"&&n<g||typeof g=="function"&&g(n,p);if(t||!k){d(p);return}n++,(E=e.onFail)==null||E.call(e,n,p),qA(S).then(()=>u()?void 0:h()).then(()=>{t?d(p):b()})})};return{promise:a,status:()=>a.status,cancel:l,continue:()=>(r==null||r(),a),cancelRetry:o,continueRetry:s,canStart:c,start:()=>(c()?b():h().then(b),a)}}var Ga,o0,w1=(o0=class{constructor(){ee(this,Ga)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),bh(this.gcTime)&&G(this,Ga,Za.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Wo.isServer()?1/0:5*60*1e3))}clearGcTimeout(){C(this,Ga)&&(Za.clearTimeout(C(this,Ga)),G(this,Ga,void 0))}},Ga=new WeakMap,o0),Va,fl,mn,Qa,mt,is,Ya,nn,E1,sr,s0,WA=(s0=class extends w1{constructor(t){super();ee(this,nn);ee(this,Va);ee(this,fl);ee(this,mn);ee(this,Qa);ee(this,mt);ee(this,is);ee(this,Ya);G(this,Ya,!1),G(this,is,t.defaultOptions),this.setOptions(t.options),this.observers=[],G(this,Qa,t.client),G(this,mn,C(this,Qa).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,G(this,Va,Ly(this.options)),this.state=t.state??C(this,Va),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=C(this,mt))==null?void 0:t.promise}setOptions(t){if(this.options={...C(this,is),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Ly(this.options);n.data!==void 0&&(this.setState(Dy(n.data,n.dataUpdatedAt)),G(this,Va,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&C(this,mn).remove(this)}setData(t,n){const r=xh(this.state.data,t,this.options);return se(this,nn,sr).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){se(this,nn,sr).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,a;const n=(r=C(this,mt))==null?void 0:r.promise;return(a=C(this,mt))==null||a.cancel(t),n?n.then(zt).catch(zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return C(this,Va)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yn(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===fm||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ga(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:!v1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,mt))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=C(this,mt))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),C(this,mn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(C(this,mt)&&(C(this,Ya)||se(this,nn,E1).call(this)?C(this,mt).cancel({revert:!0}):C(this,mt).cancelRetry()),this.scheduleGc()),C(this,mn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||se(this,nn,sr).call(this,{type:"invalidate"})}async fetch(t,n){var s,u,c,f,d,h,b,y,_,p,g,m;if(this.state.fetchStatus!=="idle"&&((s=C(this,mt))==null?void 0:s.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(C(this,mt))return C(this,mt).continueRetry(),C(this,mt).promise}if(t&&this.setOptions(t),!this.options.queryFn){const S=this.observers.find(k=>k.options.queryFn);S&&this.setOptions(S.options)}const r=new AbortController,a=S=>{Object.defineProperty(S,"signal",{enumerable:!0,get:()=>(G(this,Ya,!0),r.signal)})},i=()=>{const S=S1(this.options,n),E=(()=>{const T={client:C(this,Qa),queryKey:this.queryKey,meta:this.meta};return a(T),T})();return G(this,Ya,!1),this.options.persister?this.options.persister(S,E,this):S(E)},o=(()=>{const S={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:C(this,Qa),state:this.state,fetchFn:i};return a(S),S})();(u=this.options.behavior)==null||u.onFetch(o,this),G(this,fl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((c=o.fetchOptions)==null?void 0:c.meta))&&se(this,nn,sr).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta}),G(this,mt,_1({initialPromise:n==null?void 0:n.initialPromise,fn:o.fetchFn,onCancel:S=>{S instanceof wh&&S.revert&&this.setState({...C(this,fl),fetchStatus:"idle"}),r.abort()},onFail:(S,k)=>{se(this,nn,sr).call(this,{type:"failed",failureCount:S,error:k})},onPause:()=>{se(this,nn,sr).call(this,{type:"pause"})},onContinue:()=>{se(this,nn,sr).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}));try{const S=await C(this,mt).start();if(S===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(S),(h=(d=C(this,mn).config).onSuccess)==null||h.call(d,S,this),(y=(b=C(this,mn).config).onSettled)==null||y.call(b,S,this.state.error,this),S}catch(S){if(S instanceof wh){if(S.silent)return C(this,mt).promise;if(S.revert){if(this.state.data===void 0)throw S;return this.state.data}}throw se(this,nn,sr).call(this,{type:"error",error:S}),(p=(_=C(this,mn).config).onError)==null||p.call(_,S,this),(m=(g=C(this,mn).config).onSettled)==null||m.call(g,this.state.data,S,this),S}finally{this.scheduleGc()}}},Va=new WeakMap,fl=new WeakMap,mn=new WeakMap,Qa=new WeakMap,mt=new WeakMap,is=new WeakMap,Ya=new WeakMap,nn=new WeakSet,E1=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},sr=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,...C1(r.data,this.options),fetchMeta:t.meta??null};case"success":const a={...r,...Dy(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return G(this,fl,t.manual?a:void 0),a;case"error":const i=t.error;return{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),dt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),C(this,mn).notify({query:this,type:"updated",action:t})})},s0);function C1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:x1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Dy(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Ly(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 Zt,ge,ls,Ot,Xa,dl,cr,Qr,os,hl,pl,Ja,Ka,Yr,ml,Te,bo,Eh,Ch,Th,Ah,kh,Oh,Nh,A1,u0,T1=(u0=class extends ql{constructor(t,n){super();ee(this,Te);ee(this,Zt);ee(this,ge);ee(this,ls);ee(this,Ot);ee(this,Xa);ee(this,dl);ee(this,cr);ee(this,Qr);ee(this,os);ee(this,hl);ee(this,pl);ee(this,Ja);ee(this,Ka);ee(this,Yr);ee(this,ml,new Set);this.options=n,G(this,Zt,t),G(this,Qr,null),G(this,cr,_h()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(C(this,ge).addObserver(this),Uy(C(this,ge),this.options)?se(this,Te,bo).call(this):this.updateResult(),se(this,Te,Ah).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return zh(C(this,ge),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return zh(C(this,ge),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,se(this,Te,kh).call(this),se(this,Te,Oh).call(this),C(this,ge).removeObserver(this)}setOptions(t){const n=this.options,r=C(this,ge);if(this.options=C(this,Zt).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yn(this.options.enabled,C(this,ge))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");se(this,Te,Nh).call(this),C(this,ge).setOptions(this.options),n._defaulted&&!fc(this.options,n)&&C(this,Zt).getQueryCache().notify({type:"observerOptionsUpdated",query:C(this,ge),observer:this});const a=this.hasListeners();a&&Py(C(this,ge),r,this.options,n)&&se(this,Te,bo).call(this),this.updateResult(),a&&(C(this,ge)!==r||yn(this.options.enabled,C(this,ge))!==yn(n.enabled,C(this,ge))||ga(this.options.staleTime,C(this,ge))!==ga(n.staleTime,C(this,ge)))&&se(this,Te,Eh).call(this);const i=se(this,Te,Ch).call(this);a&&(C(this,ge)!==r||yn(this.options.enabled,C(this,ge))!==yn(n.enabled,C(this,ge))||i!==C(this,Yr))&&se(this,Te,Th).call(this,i)}getOptimisticResult(t){const n=C(this,Zt).getQueryCache().build(C(this,Zt),t),r=this.createResult(n,t);return tk(this,r)&&(G(this,Ot,r),G(this,dl,this.options),G(this,Xa,C(this,ge).state)),r}getCurrentResult(){return C(this,Ot)}trackResult(t,n){return new Proxy(t,{get:(r,a)=>(this.trackProp(a),n==null||n(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&C(this,cr).status==="pending"&&C(this,cr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,a))})}trackProp(t){C(this,ml).add(t)}getCurrentQuery(){return C(this,ge)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=C(this,Zt).defaultQueryOptions(t),r=C(this,Zt).getQueryCache().build(C(this,Zt),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return se(this,Te,bo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),C(this,Ot)))}createResult(t,n){var z;const r=C(this,ge),a=this.options,i=C(this,Ot),l=C(this,Xa),o=C(this,dl),u=t!==r?t.state:C(this,ls),{state:c}=t;let f={...c},d=!1,h;if(n._optimisticResults){const P=this.hasListeners(),$=!P&&Uy(t,n),B=P&&Py(t,r,n,a);($||B)&&(f={...f,...C1(c.data,t.options)}),n._optimisticResults==="isRestoring"&&(f.fetchStatus="idle")}let{error:b,errorUpdatedAt:y,status:_}=f;h=f.data;let p=!1;if(n.placeholderData!==void 0&&h===void 0&&_==="pending"){let P;i!=null&&i.isPlaceholderData&&n.placeholderData===(o==null?void 0:o.placeholderData)?(P=i.data,p=!0):P=typeof n.placeholderData=="function"?n.placeholderData((z=C(this,pl))==null?void 0:z.state.data,C(this,pl)):n.placeholderData,P!==void 0&&(_="success",h=xh(i==null?void 0:i.data,P,n),d=!0)}if(n.select&&h!==void 0&&!p)if(i&&h===(l==null?void 0:l.data)&&n.select===C(this,os))h=C(this,hl);else try{G(this,os,n.select),h=n.select(h),h=xh(i==null?void 0:i.data,h,n),G(this,hl,h),G(this,Qr,null)}catch(P){G(this,Qr,P)}C(this,Qr)&&(b=C(this,Qr),h=C(this,hl),y=Date.now(),_="error");const g=f.fetchStatus==="fetching",m=_==="pending",S=_==="error",k=m&&g,E=h!==void 0,O={status:_,fetchStatus:f.fetchStatus,isPending:m,isSuccess:_==="success",isError:S,isInitialLoading:k,isLoading:k,data:h,dataUpdatedAt:f.dataUpdatedAt,error:b,errorUpdatedAt:y,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:g,isRefetching:g&&!m,isLoadingError:S&&!E,isPaused:f.fetchStatus==="paused",isPlaceholderData:d,isRefetchError:S&&E,isStale:hm(t,n),refetch:this.refetch,promise:C(this,cr),isEnabled:yn(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const P=O.data!==void 0,$=O.status==="error"&&!P,B=F=>{$?F.reject(O.error):P&&F.resolve(O.data)},U=()=>{const F=G(this,cr,O.promise=_h());B(F)},H=C(this,cr);switch(H.status){case"pending":t.queryHash===r.queryHash&&B(H);break;case"fulfilled":($||O.data!==H.value)&&U();break;case"rejected":(!$||O.error!==H.reason)&&U();break}}return O}updateResult(){const t=C(this,Ot),n=this.createResult(C(this,ge),this.options);if(G(this,Xa,C(this,ge).state),G(this,dl,this.options),C(this,Xa).data!==void 0&&G(this,pl,C(this,ge)),fc(n,t))return;G(this,Ot,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,i=typeof a=="function"?a():a;if(i==="all"||!i&&!C(this,ml).size)return!0;const l=new Set(i??C(this,ml));return this.options.throwOnError&&l.add("error"),Object.keys(C(this,Ot)).some(o=>{const s=o;return C(this,Ot)[s]!==t[s]&&l.has(s)})};se(this,Te,A1).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&se(this,Te,Ah).call(this)}},Zt=new WeakMap,ge=new WeakMap,ls=new WeakMap,Ot=new WeakMap,Xa=new WeakMap,dl=new WeakMap,cr=new WeakMap,Qr=new WeakMap,os=new WeakMap,hl=new WeakMap,pl=new WeakMap,Ja=new WeakMap,Ka=new WeakMap,Yr=new WeakMap,ml=new WeakMap,Te=new WeakSet,bo=function(t){se(this,Te,Nh).call(this);let n=C(this,ge).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(zt)),n},Eh=function(){se(this,Te,kh).call(this);const t=ga(this.options.staleTime,C(this,ge));if(Wo.isServer()||C(this,Ot).isStale||!bh(t))return;const r=v1(C(this,Ot).dataUpdatedAt,t)+1;G(this,Ja,Za.setTimeout(()=>{C(this,Ot).isStale||this.updateResult()},r))},Ch=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(C(this,ge)):this.options.refetchInterval)??!1},Th=function(t){se(this,Te,Oh).call(this),G(this,Yr,t),!(Wo.isServer()||yn(this.options.enabled,C(this,ge))===!1||!bh(C(this,Yr))||C(this,Yr)===0)&&G(this,Ka,Za.setInterval(()=>{(this.options.refetchIntervalInBackground||um.isFocused())&&se(this,Te,bo).call(this)},C(this,Yr)))},Ah=function(){se(this,Te,Eh).call(this),se(this,Te,Th).call(this,se(this,Te,Ch).call(this))},kh=function(){C(this,Ja)&&(Za.clearTimeout(C(this,Ja)),G(this,Ja,void 0))},Oh=function(){C(this,Ka)&&(Za.clearInterval(C(this,Ka)),G(this,Ka,void 0))},Nh=function(){const t=C(this,Zt).getQueryCache().build(C(this,Zt),this.options);if(t===C(this,ge))return;const n=C(this,ge);G(this,ge,t),G(this,ls,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},A1=function(t){dt.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(C(this,Ot))}),C(this,Zt).getQueryCache().notify({query:C(this,ge),type:"observerResultsUpdated"})})},u0);function ek(e,t){return yn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Uy(e,t){return ek(e,t)||e.state.data!==void 0&&zh(e,t,t.refetchOnMount)}function zh(e,t,n){if(yn(t.enabled,e)!==!1&&ga(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&hm(e,t)}return!1}function Py(e,t,n,r){return(e!==t||yn(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&hm(e,n)}function hm(e,t){return yn(t.enabled,e)!==!1&&e.isStaleByTime(ga(t.staleTime,e))}function tk(e,t){return!fc(e.getCurrentResult(),t)}function hc(e){return{onFetch:(t,n)=>{var c,f,d,h,b;const r=t.options,a=(d=(f=(c=t.fetchOptions)==null?void 0:c.meta)==null?void 0:f.fetchMore)==null?void 0:d.direction,i=((h=t.state.data)==null?void 0:h.pages)||[],l=((b=t.state.data)==null?void 0:b.pageParams)||[];let o={pages:[],pageParams:[]},s=0;const u=async()=>{let y=!1;const _=m=>{QA(m,()=>t.signal,()=>y=!0)},p=S1(t.options,t.fetchOptions),g=async(m,S,k)=>{if(y)return Promise.reject();if(S==null&&m.pages.length)return Promise.resolve(m);const T=(()=>{const $={client:t.client,queryKey:t.queryKey,pageParam:S,direction:k?"backward":"forward",meta:t.options.meta};return _($),$})(),O=await p(T),{maxPages:z}=t.options,P=k?VA:GA;return{pages:P(m.pages,O,z),pageParams:P(m.pageParams,S,z)}};if(a&&i.length){const m=a==="backward",S=m?k1:Rh,k={pages:i,pageParams:l},E=S(r,k);o=await g(k,E,m)}else{const m=e??i.length;do{const S=s===0?l[0]??r.initialPageParam:Rh(r,o);if(s>0&&S==null)break;o=await g(o,S),s++}while(s<m)}return o};t.options.persister?t.fetchFn=()=>{var y,_;return(_=(y=t.options).persister)==null?void 0:_.call(y,u,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=u}}}function Rh(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 k1(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}function nk(e,t){return t?Rh(e,t)!=null:!1}function rk(e,t){return!t||!e.getPreviousPageParam?!1:k1(e,t)!=null}var ak=class extends T1{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){super.setOptions({...e,behavior:hc()})}getOptimisticResult(e){return e.behavior=hc(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var b,y;const{state:n}=e,r=super.createResult(e,t),{isFetching:a,isRefetching:i,isError:l,isRefetchError:o}=r,s=(y=(b=n.fetchMeta)==null?void 0:b.fetchMore)==null?void 0:y.direction,u=l&&s==="forward",c=a&&s==="forward",f=l&&s==="backward",d=a&&s==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:nk(t,n.data),hasPreviousPage:rk(t,n.data),isFetchNextPageError:u,isFetchingNextPage:c,isFetchPreviousPageError:f,isFetchingPreviousPage:d,isRefetchError:o&&!u&&!f,isRefetching:i&&!c&&!d}}},ss,Pn,Tt,Wa,Bn,Lr,c0,ik=(c0=class extends w1{constructor(t){super();ee(this,Bn);ee(this,ss);ee(this,Pn);ee(this,Tt);ee(this,Wa);G(this,ss,t.client),this.mutationId=t.mutationId,G(this,Tt,t.mutationCache),G(this,Pn,[]),this.state=t.state||O1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){C(this,Pn).includes(t)||(C(this,Pn).push(t),this.clearGcTimeout(),C(this,Tt).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){G(this,Pn,C(this,Pn).filter(n=>n!==t)),this.scheduleGc(),C(this,Tt).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){C(this,Pn).length||(this.state.status==="pending"?this.scheduleGc():C(this,Tt).remove(this))}continue(){var t;return((t=C(this,Wa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var l,o,s,u,c,f,d,h,b,y,_,p,g,m,S,k,E,T;const n=()=>{se(this,Bn,Lr).call(this,{type:"continue"})},r={client:C(this,ss),meta:this.options.meta,mutationKey:this.options.mutationKey};G(this,Wa,_1({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:(O,z)=>{se(this,Bn,Lr).call(this,{type:"failed",failureCount:O,error:z})},onPause:()=>{se(this,Bn,Lr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>C(this,Tt).canRun(this)}));const a=this.state.status==="pending",i=!C(this,Wa).canStart();try{if(a)n();else{se(this,Bn,Lr).call(this,{type:"pending",variables:t,isPaused:i}),C(this,Tt).config.onMutate&&await C(this,Tt).config.onMutate(t,this,r);const z=await((o=(l=this.options).onMutate)==null?void 0:o.call(l,t,r));z!==this.state.context&&se(this,Bn,Lr).call(this,{type:"pending",context:z,variables:t,isPaused:i})}const O=await C(this,Wa).start();return await((u=(s=C(this,Tt).config).onSuccess)==null?void 0:u.call(s,O,t,this.state.context,this,r)),await((f=(c=this.options).onSuccess)==null?void 0:f.call(c,O,t,this.state.context,r)),await((h=(d=C(this,Tt).config).onSettled)==null?void 0:h.call(d,O,null,this.state.variables,this.state.context,this,r)),await((y=(b=this.options).onSettled)==null?void 0:y.call(b,O,null,t,this.state.context,r)),se(this,Bn,Lr).call(this,{type:"success",data:O}),O}catch(O){try{await((p=(_=C(this,Tt).config).onError)==null?void 0:p.call(_,O,t,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((m=(g=this.options).onError)==null?void 0:m.call(g,O,t,this.state.context,r))}catch(z){Promise.reject(z)}try{await((k=(S=C(this,Tt).config).onSettled)==null?void 0:k.call(S,void 0,O,this.state.variables,this.state.context,this,r))}catch(z){Promise.reject(z)}try{await((T=(E=this.options).onSettled)==null?void 0:T.call(E,void 0,O,t,this.state.context,r))}catch(z){Promise.reject(z)}throw se(this,Bn,Lr).call(this,{type:"error",error:O}),O}finally{C(this,Tt).runNext(this)}}},ss=new WeakMap,Pn=new WeakMap,Tt=new WeakMap,Wa=new WeakMap,Bn=new WeakSet,Lr=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),dt.batch(()=>{C(this,Pn).forEach(r=>{r.onMutationUpdate(t)}),C(this,Tt).notify({mutation:this,type:"updated",action:t})})},c0);function O1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var fr,Mn,us,f0,lk=(f0=class extends ql{constructor(t={}){super();ee(this,fr);ee(this,Mn);ee(this,us);this.config=t,G(this,fr,new Set),G(this,Mn,new Map),G(this,us,0)}build(t,n,r){const a=new ik({client:t,mutationCache:this,mutationId:++zs(this,us)._,options:t.defaultMutationOptions(n),state:r});return this.add(a),a}add(t){C(this,fr).add(t);const n=Qs(t);if(typeof n=="string"){const r=C(this,Mn).get(n);r?r.push(t):C(this,Mn).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(C(this,fr).delete(t)){const n=Qs(t);if(typeof n=="string"){const r=C(this,Mn).get(n);if(r)if(r.length>1){const a=r.indexOf(t);a!==-1&&r.splice(a,1)}else r[0]===t&&C(this,Mn).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Qs(t);if(typeof n=="string"){const r=C(this,Mn).get(n),a=r==null?void 0:r.find(i=>i.state.status==="pending");return!a||a===t}else return!0}runNext(t){var r;const n=Qs(t);if(typeof n=="string"){const a=(r=C(this,Mn).get(n))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(a==null?void 0:a.continue())??Promise.resolve()}else return Promise.resolve()}clear(){dt.batch(()=>{C(this,fr).forEach(t=>{this.notify({type:"removed",mutation:t})}),C(this,fr).clear(),C(this,Mn).clear()})}getAll(){return Array.from(C(this,fr))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>Ry(n,r))}findAll(t={}){return this.getAll().filter(n=>Ry(t,n))}notify(t){dt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return dt.batch(()=>Promise.all(t.map(n=>n.continue().catch(zt))))}},fr=new WeakMap,Mn=new WeakMap,us=new WeakMap,f0);function Qs(e){var t;return(t=e.options.scope)==null?void 0:t.id}var dr,Xr,Ht,hr,_r,ku,Mh,d0,ok=(d0=class extends ql{constructor(n,r){super();ee(this,_r);ee(this,dr);ee(this,Xr);ee(this,Ht);ee(this,hr);G(this,dr,n),this.setOptions(r),this.bindMethods(),se(this,_r,ku).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var a;const r=this.options;this.options=C(this,dr).defaultMutationOptions(n),fc(this.options,r)||C(this,dr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:C(this,Ht),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&ci(r.mutationKey)!==ci(this.options.mutationKey)?this.reset():((a=C(this,Ht))==null?void 0:a.state.status)==="pending"&&C(this,Ht).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=C(this,Ht))==null||n.removeObserver(this)}onMutationUpdate(n){se(this,_r,ku).call(this),se(this,_r,Mh).call(this,n)}getCurrentResult(){return C(this,Xr)}reset(){var n;(n=C(this,Ht))==null||n.removeObserver(this),G(this,Ht,void 0),se(this,_r,ku).call(this),se(this,_r,Mh).call(this)}mutate(n,r){var a;return G(this,hr,r),(a=C(this,Ht))==null||a.removeObserver(this),G(this,Ht,C(this,dr).getMutationCache().build(C(this,dr),this.options)),C(this,Ht).addObserver(this),C(this,Ht).execute(n)}},dr=new WeakMap,Xr=new WeakMap,Ht=new WeakMap,hr=new WeakMap,_r=new WeakSet,ku=function(){var r;const n=((r=C(this,Ht))==null?void 0:r.state)??O1();G(this,Xr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Mh=function(n){dt.batch(()=>{var r,a,i,l,o,s,u,c;if(C(this,hr)&&this.hasListeners()){const f=C(this,Xr).variables,d=C(this,Xr).context,h={client:C(this,dr),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(a=(r=C(this,hr)).onSuccess)==null||a.call(r,n.data,f,d,h)}catch(b){Promise.reject(b)}try{(l=(i=C(this,hr)).onSettled)==null||l.call(i,n.data,null,f,d,h)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(s=(o=C(this,hr)).onError)==null||s.call(o,n.error,f,d,h)}catch(b){Promise.reject(b)}try{(c=(u=C(this,hr)).onSettled)==null||c.call(u,void 0,n.error,f,d,h)}catch(b){Promise.reject(b)}}}this.listeners.forEach(f=>{f(C(this,Xr))})})},d0),$n,h0,sk=(h0=class extends ql{constructor(t={}){super();ee(this,$n);this.config=t,G(this,$n,new Map)}build(t,n,r){const a=n.queryKey,i=n.queryHash??cm(a,n);let l=this.get(i);return l||(l=new WA({client:t,queryKey:a,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(a)}),this.add(l)),l}add(t){C(this,$n).has(t.queryHash)||(C(this,$n).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=C(this,$n).get(t.queryHash);n&&(t.destroy(),n===t&&C(this,$n).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){dt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return C(this,$n).get(t)}getAll(){return[...C(this,$n).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>zy(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>zy(t,r)):n}notify(t){dt.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){dt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){dt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},$n=new WeakMap,h0),Ke,Jr,Kr,gl,yl,Wr,vl,bl,p0,uk=(p0=class{constructor(e={}){ee(this,Ke);ee(this,Jr);ee(this,Kr);ee(this,gl);ee(this,yl);ee(this,Wr);ee(this,vl);ee(this,bl);G(this,Ke,e.queryCache||new sk),G(this,Jr,e.mutationCache||new lk),G(this,Kr,e.defaultOptions||{}),G(this,gl,new Map),G(this,yl,new Map),G(this,Wr,0)}mount(){zs(this,Wr)._++,C(this,Wr)===1&&(G(this,vl,um.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Ke).onFocus())})),G(this,bl,dc.subscribe(async e=>{e&&(await this.resumePausedMutations(),C(this,Ke).onOnline())})))}unmount(){var e,t;zs(this,Wr)._--,C(this,Wr)===0&&((e=C(this,vl))==null||e.call(this),G(this,vl,void 0),(t=C(this,bl))==null||t.call(this),G(this,bl,void 0))}isFetching(e){return C(this,Ke).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return C(this,Jr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Ke).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=C(this,Ke).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ga(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return C(this,Ke).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),a=C(this,Ke).get(r.queryHash),i=a==null?void 0:a.state.data,l=HA(t,i);if(l!==void 0)return C(this,Ke).build(this,r).setData(l,{...n,manual:!0})}setQueriesData(e,t,n){return dt.batch(()=>C(this,Ke).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=C(this,Ke).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=C(this,Ke);dt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=C(this,Ke);return dt.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=dt.batch(()=>C(this,Ke).findAll(e).map(a=>a.cancel(n)));return Promise.all(r).then(zt).catch(zt)}invalidateQueries(e,t={}){return dt.batch(()=>(C(this,Ke).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=dt.batch(()=>C(this,Ke).findAll(e).filter(a=>!a.isDisabled()&&!a.isStatic()).map(a=>{let i=a.fetch(void 0,n);return n.throwOnError||(i=i.catch(zt)),a.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(zt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=C(this,Ke).build(this,t);return n.isStaleByTime(ga(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=hc(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(zt).catch(zt)}ensureInfiniteQueryData(e){return e.behavior=hc(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return dc.isOnline()?C(this,Jr).resumePausedMutations():Promise.resolve()}getQueryCache(){return C(this,Ke)}getMutationCache(){return C(this,Jr)}getDefaultOptions(){return C(this,Kr)}setDefaultOptions(e){G(this,Kr,e)}setQueryDefaults(e,t){C(this,gl).set(ci(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...C(this,gl).values()],n={};return t.forEach(r=>{Ko(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){C(this,yl).set(ci(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...C(this,yl).values()],n={};return t.forEach(r=>{Ko(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...C(this,Kr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=cm(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===fm&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...C(this,Kr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){C(this,Ke).clear(),C(this,Jr).clear()}},Ke=new WeakMap,Jr=new WeakMap,Kr=new WeakMap,gl=new WeakMap,yl=new WeakMap,Wr=new WeakMap,vl=new WeakMap,bl=new WeakMap,p0),N1=v.createContext(void 0),Vc=e=>{const t=v.useContext(N1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ck=({client:e,children:t})=>(v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.jsx(N1.Provider,{value:e,children:t})),z1=v.createContext(!1),fk=()=>v.useContext(z1);z1.Provider;function dk(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hk=v.createContext(dk()),pk=()=>v.useContext(hk),mk=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?dm(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},gk=e=>{v.useEffect(()=>{e.clearReset()},[e])},yk=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:a})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(a&&e.data===void 0||dm(n,[e.error,r])),vk=e=>{if(e.suspense){const n=a=>a==="static"?a:Math.max(a??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...a)=>n(r(...a)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},bk=(e,t)=>e.isLoading&&e.isFetching&&!t,Sk=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,By=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function R1(e,t,n){var d,h,b,y;const r=fk(),a=pk(),i=Vc(),l=i.defaultQueryOptions(e);(h=(d=i.getDefaultOptions().queries)==null?void 0:d._experimental_beforeQuery)==null||h.call(d,l);const o=i.getQueryCache().get(l.queryHash);l._optimisticResults=r?"isRestoring":"optimistic",vk(l),mk(l,a,o),gk(a);const s=!i.getQueryCache().get(l.queryHash),[u]=v.useState(()=>new t(i,l)),c=u.getOptimisticResult(l),f=!r&&e.subscribed!==!1;if(v.useSyncExternalStore(v.useCallback(_=>{const p=f?u.subscribe(dt.batchCalls(_)):zt;return u.updateResult(),p},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),v.useEffect(()=>{u.setOptions(l)},[l,u]),Sk(l,c))throw By(l,u,a);if(yk({result:c,errorResetBoundary:a,throwOnError:l.throwOnError,query:o,suspense:l.suspense}))throw c.error;if((y=(b=i.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||y.call(b,l,c),l.experimental_prefetchInRender&&!Wo.isServer()&&bk(c,r)){const _=s?By(l,u,a):o==null?void 0:o.promise;_==null||_.catch(zt).finally(()=>{u.updateResult()})}return l.notifyOnChangeProps?c:u.trackResult(c)}function M1(e,t){return R1(e,T1)}function Qi(e,t){const n=Vc(),[r]=v.useState(()=>new ok(n,e));v.useEffect(()=>{r.setOptions(e)},[r,e]);const a=v.useSyncExternalStore(v.useCallback(l=>r.subscribe(dt.batchCalls(l)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=v.useCallback((l,o)=>{r.mutate(l,o).catch(zt)},[r]);if(a.error&&dm(r.options.throwOnError,[a.error]))throw a.error;return{...a,mutate:i,mutateAsync:a.mutate}}function xk(e,t){return R1(e,ak)}/**
|
|
50
|
+
* @remix-run/router v1.23.2
|
|
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 es(){return es=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},es.apply(this,arguments)}var ia;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(ia||(ia={}));const $y="popstate";function _k(e){e===void 0&&(e={});function t(r,a){let{pathname:i,search:l,hash:o}=r.location;return jh("",{pathname:i,search:l,hash:o},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}function n(r,a){return typeof a=="string"?a:pc(a)}return Ek(t,n,null,e)}function Qe(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function pm(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function wk(){return Math.random().toString(36).substr(2,8)}function Iy(e,t){return{usr:e.state,key:e.key,idx:t}}function jh(e,t,n,r){return n===void 0&&(n=null),es({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Gl(t):t,{state:n,key:t&&t.key||r||wk()})}function pc(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 Gl(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 Ek(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,l=a.history,o=ia.Pop,s=null,u=c();u==null&&(u=0,l.replaceState(es({},l.state,{idx:u}),""));function c(){return(l.state||{idx:null}).idx}function f(){o=ia.Pop;let _=c(),p=_==null?null:_-u;u=_,s&&s({action:o,location:y.location,delta:p})}function d(_,p){o=ia.Push;let g=jh(y.location,_,p);u=c()+1;let m=Iy(g,u),S=y.createHref(g);try{l.pushState(m,"",S)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(S)}i&&s&&s({action:o,location:y.location,delta:1})}function h(_,p){o=ia.Replace;let g=jh(y.location,_,p);u=c();let m=Iy(g,u),S=y.createHref(g);l.replaceState(m,"",S),i&&s&&s({action:o,location:y.location,delta:0})}function b(_){let p=a.location.origin!=="null"?a.location.origin:a.location.href,g=typeof _=="string"?_:pc(_);return g=g.replace(/ $/,"%20"),Qe(p,"No window.location.(origin|href) available to create URL for href: "+g),new URL(g,p)}let y={get action(){return o},get location(){return e(a,l)},listen(_){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener($y,f),s=_,()=>{a.removeEventListener($y,f),s=null}},createHref(_){return t(a,_)},createURL:b,encodeLocation(_){let p=b(_);return{pathname:p.pathname,search:p.search,hash:p.hash}},push:d,replace:h,go(_){return l.go(_)}};return y}var Zy;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Zy||(Zy={}));function Ck(e,t,n){return n===void 0&&(n="/"),Tk(e,t,n)}function Tk(e,t,n,r){let a=typeof t=="string"?Gl(t):t,i=zl(a.pathname||"/",n);if(i==null)return null;let l=j1(e);Ak(l);let o=null;for(let s=0;o==null&&s<l.length;++s){let u=Pk(i);o=Lk(l[s],u)}return o}function j1(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let a=(i,l,o)=>{let s={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:l,route:i};s.relativePath.startsWith("/")&&(Qe(s.relativePath.startsWith(r),'Absolute route path "'+s.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),s.relativePath=s.relativePath.slice(r.length));let u=ya([r,s.relativePath]),c=n.concat(s);i.children&&i.children.length>0&&(Qe(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+u+'".')),j1(i.children,t,c,u)),!(i.path==null&&!i.index)&&t.push({path:u,score:jk(u,i.index),routesMeta:c})};return e.forEach((i,l)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,l);else for(let s of D1(i.path))a(i,l,s)}),t}function D1(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let l=D1(r.join("/")),o=[];return o.push(...l.map(s=>s===""?i:[i,s].join("/"))),a&&o.push(...l),o.map(s=>e.startsWith("/")&&s===""?"/":s)}function Ak(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Dk(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const kk=/^:[\w-]+$/,Ok=3,Nk=2,zk=1,Rk=10,Mk=-2,Hy=e=>e==="*";function jk(e,t){let n=e.split("/"),r=n.length;return n.some(Hy)&&(r+=Mk),t&&(r+=Nk),n.filter(a=>!Hy(a)).reduce((a,i)=>a+(kk.test(i)?Ok:i===""?zk:Rk),r)}function Dk(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Lk(e,t,n){let{routesMeta:r}=e,a={},i="/",l=[];for(let o=0;o<r.length;++o){let s=r[o],u=o===r.length-1,c=i==="/"?t:t.slice(i.length)||"/",f=Dh({path:s.relativePath,caseSensitive:s.caseSensitive,end:u},c),d=s.route;if(!f)return null;Object.assign(a,f.params),l.push({params:a,pathname:ya([i,f.pathname]),pathnameBase:Hk(ya([i,f.pathnameBase])),route:d}),f.pathnameBase!=="/"&&(i=ya([i,f.pathnameBase]))}return l}function Dh(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Uk(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],l=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((u,c,f)=>{let{paramName:d,isOptional:h}=c;if(d==="*"){let y=o[f]||"";l=i.slice(0,i.length-y.length).replace(/(.)\/+$/,"$1")}const b=o[f];return h&&!b?u[d]=void 0:u[d]=(b||"").replace(/%2F/g,"/"),u},{}),pathname:i,pathnameBase:l,pattern:e}}function Uk(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),pm(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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(l,o,s)=>(r.push({paramName:o,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Pk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return pm(!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 zl(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 Bk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$k=e=>Bk.test(e);function Ik(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Gl(e):e,i;if(n)if($k(n))i=n;else{if(n.includes("//")){let l=n;n=n.replace(/\/\/+/g,"/"),pm(!1,"Pathnames cannot have embedded double slashes - normalizing "+(l+" -> "+n))}n.startsWith("/")?i=Fy(n.substring(1),"/"):i=Fy(n,t)}else i=t;return{pathname:i,search:Fk(r),hash:qk(a)}}function Fy(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function Qf(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in <Link to="..."> and the router will parse it for you.'}function Zk(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function mm(e,t){let n=Zk(e);return t?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function gm(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=Gl(e):(a=es({},e),Qe(!a.pathname||!a.pathname.includes("?"),Qf("?","pathname","search",a)),Qe(!a.pathname||!a.pathname.includes("#"),Qf("#","pathname","hash",a)),Qe(!a.search||!a.search.includes("#"),Qf("#","search","hash",a)));let i=e===""||a.pathname==="",l=i?"/":a.pathname,o;if(l==null)o=n;else{let f=t.length-1;if(!r&&l.startsWith("..")){let d=l.split("/");for(;d[0]==="..";)d.shift(),f-=1;a.pathname=d.join("/")}o=f>=0?t[f]:"/"}let s=Ik(a,o),u=l&&l!=="/"&&l.endsWith("/"),c=(i||l===".")&&n.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}const ya=e=>e.join("/").replace(/\/\/+/g,"/"),Hk=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Fk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,qk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Gk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const L1=["post","put","patch","delete"];new Set(L1);const Vk=["get",...L1];new Set(Vk);/**
|
|
59
|
+
* React Router v6.30.3
|
|
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
|
+
*/function ts(){return ts=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},ts.apply(this,arguments)}const Qc=v.createContext(null),U1=v.createContext(null),Or=v.createContext(null),Yc=v.createContext(null),Jn=v.createContext({outlet:null,matches:[],isDataRoute:!1}),P1=v.createContext(null);function Qk(e,t){let{relative:n}=t===void 0?{}:t;Vl()||Qe(!1);let{basename:r,navigator:a}=v.useContext(Or),{hash:i,pathname:l,search:o}=Xc(e,{relative:n}),s=l;return r!=="/"&&(s=l==="/"?r:ya([r,l])),a.createHref({pathname:s,search:o,hash:i})}function Vl(){return v.useContext(Yc)!=null}function ka(){return Vl()||Qe(!1),v.useContext(Yc).location}function B1(e){v.useContext(Or).static||v.useLayoutEffect(e)}function _s(){let{isDataRoute:e}=v.useContext(Jn);return e?cO():Yk()}function Yk(){Vl()||Qe(!1);let e=v.useContext(Qc),{basename:t,future:n,navigator:r}=v.useContext(Or),{matches:a}=v.useContext(Jn),{pathname:i}=ka(),l=JSON.stringify(mm(a,n.v7_relativeSplatPath)),o=v.useRef(!1);return B1(()=>{o.current=!0}),v.useCallback(function(u,c){if(c===void 0&&(c={}),!o.current)return;if(typeof u=="number"){r.go(u);return}let f=gm(u,JSON.parse(l),i,c.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:ya([t,f.pathname])),(c.replace?r.replace:r.push)(f,c.state,c)},[t,r,l,i,e])}const Xk=v.createContext(null);function Jk(e){let t=v.useContext(Jn).outlet;return t&&v.createElement(Xk.Provider,{value:e},t)}function Kk(){let{matches:e}=v.useContext(Jn),t=e[e.length-1];return t?t.params:{}}function Xc(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=v.useContext(Or),{matches:a}=v.useContext(Jn),{pathname:i}=ka(),l=JSON.stringify(mm(a,r.v7_relativeSplatPath));return v.useMemo(()=>gm(e,JSON.parse(l),i,n==="path"),[e,l,i,n])}function Wk(e,t){return eO(e,t)}function eO(e,t,n,r){Vl()||Qe(!1);let{navigator:a}=v.useContext(Or),{matches:i}=v.useContext(Jn),l=i[i.length-1],o=l?l.params:{};l&&l.pathname;let s=l?l.pathnameBase:"/";l&&l.route;let u=ka(),c;if(t){var f;let _=typeof t=="string"?Gl(t):t;s==="/"||(f=_.pathname)!=null&&f.startsWith(s)||Qe(!1),c=_}else c=u;let d=c.pathname||"/",h=d;if(s!=="/"){let _=s.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(_.length).join("/")}let b=Ck(e,{pathname:h}),y=iO(b&&b.map(_=>Object.assign({},_,{params:Object.assign({},o,_.params),pathname:ya([s,a.encodeLocation?a.encodeLocation(_.pathname).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?s:ya([s,a.encodeLocation?a.encodeLocation(_.pathnameBase).pathname:_.pathnameBase])})),i,n,r);return t&&y?v.createElement(Yc.Provider,{value:{location:ts({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:ia.Pop}},y):y}function tO(){let e=uO(),t=Gk(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:a},n):null,null)}const nO=v.createElement(tO,null);class rO extends v.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?v.createElement(Jn.Provider,{value:this.props.routeContext},v.createElement(P1.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function aO(e){let{routeContext:t,match:n,children:r}=e,a=v.useContext(Qc);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Jn.Provider,{value:t},r)}function iO(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let l=e,o=(a=n)==null?void 0:a.errors;if(o!=null){let c=l.findIndex(f=>f.route.id&&(o==null?void 0:o[f.route.id])!==void 0);c>=0||Qe(!1),l=l.slice(0,Math.min(l.length,c+1))}let s=!1,u=-1;if(n&&r&&r.v7_partialHydration)for(let c=0;c<l.length;c++){let f=l[c];if((f.route.HydrateFallback||f.route.hydrateFallbackElement)&&(u=c),f.route.id){let{loaderData:d,errors:h}=n,b=f.route.loader&&d[f.route.id]===void 0&&(!h||h[f.route.id]===void 0);if(f.route.lazy||b){s=!0,u>=0?l=l.slice(0,u+1):l=[l[0]];break}}}return l.reduceRight((c,f,d)=>{let h,b=!1,y=null,_=null;n&&(h=o&&f.route.id?o[f.route.id]:void 0,y=f.route.errorElement||nO,s&&(u<0&&d===0?(fO("route-fallback"),b=!0,_=null):u===d&&(b=!0,_=f.route.hydrateFallbackElement||null)));let p=t.concat(l.slice(0,d+1)),g=()=>{let m;return h?m=y:b?m=_:f.route.Component?m=v.createElement(f.route.Component,null):f.route.element?m=f.route.element:m=c,v.createElement(aO,{match:f,routeContext:{outlet:c,matches:p,isDataRoute:n!=null},children:m})};return n&&(f.route.ErrorBoundary||f.route.errorElement||d===0)?v.createElement(rO,{location:n.location,revalidation:n.revalidation,component:y,error:h,children:g(),routeContext:{outlet:null,matches:p,isDataRoute:!0}}):g()},null)}var $1=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}($1||{}),I1=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}(I1||{});function lO(e){let t=v.useContext(Qc);return t||Qe(!1),t}function oO(e){let t=v.useContext(U1);return t||Qe(!1),t}function sO(e){let t=v.useContext(Jn);return t||Qe(!1),t}function Z1(e){let t=sO(),n=t.matches[t.matches.length-1];return n.route.id||Qe(!1),n.route.id}function uO(){var e;let t=v.useContext(P1),n=oO(),r=Z1();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function cO(){let{router:e}=lO($1.UseNavigateStable),t=Z1(I1.UseNavigateStable),n=v.useRef(!1);return B1(()=>{n.current=!0}),v.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ts({fromRouteId:t},i)))},[e,t])}const qy={};function fO(e,t,n){qy[e]||(qy[e]=!0)}function dO(e,t){e==null||e.v7_startTransition,e==null||e.v7_relativeSplatPath}function hO(e){let{to:t,replace:n,state:r,relative:a}=e;Vl()||Qe(!1);let{future:i,static:l}=v.useContext(Or),{matches:o}=v.useContext(Jn),{pathname:s}=ka(),u=_s(),c=gm(t,mm(o,i.v7_relativeSplatPath),s,a==="path"),f=JSON.stringify(c);return v.useEffect(()=>u(JSON.parse(f),{replace:n,state:r,relative:a}),[u,f,a,n,r]),null}function pO(e){return Jk(e.context)}function Di(e){Qe(!1)}function mO(e){let{basename:t="/",children:n=null,location:r,navigationType:a=ia.Pop,navigator:i,static:l=!1,future:o}=e;Vl()&&Qe(!1);let s=t.replace(/^\/*/,"/"),u=v.useMemo(()=>({basename:s,navigator:i,static:l,future:ts({v7_relativeSplatPath:!1},o)}),[s,o,i,l]);typeof r=="string"&&(r=Gl(r));let{pathname:c="/",search:f="",hash:d="",state:h=null,key:b="default"}=r,y=v.useMemo(()=>{let _=zl(c,s);return _==null?null:{location:{pathname:_,search:f,hash:d,state:h,key:b},navigationType:a}},[s,c,f,d,h,b,a]);return y==null?null:v.createElement(Or.Provider,{value:u},v.createElement(Yc.Provider,{children:n,value:y}))}function gO(e){let{children:t,location:n}=e;return Wk(Lh(t),n)}new Promise(()=>{});function Lh(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,a)=>{if(!v.isValidElement(r))return;let i=[...t,a];if(r.type===v.Fragment){n.push.apply(n,Lh(r.props.children,i));return}r.type!==Di&&Qe(!1),!r.props.index||!r.props.children||Qe(!1);let l={id:r.props.id||i.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&&(l.children=Lh(r.props.children,i)),n.push(l)}),n}/**
|
|
68
|
+
* React Router DOM v6.30.3
|
|
69
|
+
*
|
|
70
|
+
* Copyright (c) Remix Software Inc.
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the MIT license found in the
|
|
73
|
+
* LICENSE.md file in the root directory of this source tree.
|
|
74
|
+
*
|
|
75
|
+
* @license MIT
|
|
76
|
+
*/function mc(){return mc=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},mc.apply(this,arguments)}function H1(e,t){if(e==null)return{};var n={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(t.indexOf(a)>=0)&&(n[a]=e[a]);return n}function yO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function vO(e,t){return e.button===0&&(!t||t==="_self")&&!yO(e)}const bO=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],SO=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],xO="6";try{window.__reactRouterVersion=xO}catch{}const _O=v.createContext({isTransitioning:!1}),wO="startTransition",Gy=aC[wO];function EO(e){let{basename:t,children:n,future:r,window:a}=e,i=v.useRef();i.current==null&&(i.current=_k({window:a,v5Compat:!0}));let l=i.current,[o,s]=v.useState({action:l.action,location:l.location}),{v7_startTransition:u}=r||{},c=v.useCallback(f=>{u&&Gy?Gy(()=>s(f)):s(f)},[s,u]);return v.useLayoutEffect(()=>l.listen(c),[l,c]),v.useEffect(()=>dO(r),[r]),v.createElement(mO,{basename:t,children:n,location:o.location,navigationType:o.action,navigator:l,future:r})}const CO=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",TO=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,F1=v.forwardRef(function(t,n){let{onClick:r,relative:a,reloadDocument:i,replace:l,state:o,target:s,to:u,preventScrollReset:c,viewTransition:f}=t,d=H1(t,bO),{basename:h}=v.useContext(Or),b,y=!1;if(typeof u=="string"&&TO.test(u)&&(b=u,CO))try{let m=new URL(window.location.href),S=u.startsWith("//")?new URL(m.protocol+u):new URL(u),k=zl(S.pathname,h);S.origin===m.origin&&k!=null?u=k+S.search+S.hash:y=!0}catch{}let _=Qk(u,{relative:a}),p=OO(u,{replace:l,state:o,target:s,preventScrollReset:c,relative:a,viewTransition:f});function g(m){r&&r(m),m.defaultPrevented||p(m)}return v.createElement("a",mc({},d,{href:b||_,onClick:y||i?r:g,ref:n,target:s}))}),AO=v.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:a=!1,className:i="",end:l=!1,style:o,to:s,viewTransition:u,children:c}=t,f=H1(t,SO),d=Xc(s,{relative:f.relative}),h=ka(),b=v.useContext(U1),{navigator:y,basename:_}=v.useContext(Or),p=b!=null&&NO(d)&&u===!0,g=y.encodeLocation?y.encodeLocation(d).pathname:d.pathname,m=h.pathname,S=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;a||(m=m.toLowerCase(),S=S?S.toLowerCase():null,g=g.toLowerCase()),S&&_&&(S=zl(S,_)||S);const k=g!=="/"&&g.endsWith("/")?g.length-1:g.length;let E=m===g||!l&&m.startsWith(g)&&m.charAt(k)==="/",T=S!=null&&(S===g||!l&&S.startsWith(g)&&S.charAt(g.length)==="/"),O={isActive:E,isPending:T,isTransitioning:p},z=E?r:void 0,P;typeof i=="function"?P=i(O):P=[i,E?"active":null,T?"pending":null,p?"transitioning":null].filter(Boolean).join(" ");let $=typeof o=="function"?o(O):o;return v.createElement(F1,mc({},f,{"aria-current":z,className:P,ref:n,style:$,to:s,viewTransition:u}),typeof c=="function"?c(O):c)});var Uh;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(Uh||(Uh={}));var Vy;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Vy||(Vy={}));function kO(e){let t=v.useContext(Qc);return t||Qe(!1),t}function OO(e,t){let{target:n,replace:r,state:a,preventScrollReset:i,relative:l,viewTransition:o}=t===void 0?{}:t,s=_s(),u=ka(),c=Xc(e,{relative:l});return v.useCallback(f=>{if(vO(f,n)){f.preventDefault();let d=r!==void 0?r:pc(u)===pc(c);s(e,{replace:d,state:a,preventScrollReset:i,relative:l,viewTransition:o})}},[u,s,c,r,a,n,e,i,l,o])}function NO(e,t){t===void 0&&(t={});let n=v.useContext(_O);n==null&&Qe(!1);let{basename:r}=kO(Uh.useViewTransitionState),a=Xc(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=zl(n.currentLocation.pathname,r)||n.currentLocation.pathname,l=zl(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Dh(a.pathname,l)!=null||Dh(a.pathname,i)!=null}const zO="modulepreload",RO=function(e){return"/"+e},Qy={},MO=function(t,n,r){let a=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),o=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));a=Promise.allSettled(n.map(s=>{if(s=RO(s),s in Qy)return;Qy[s]=!0;const u=s.endsWith(".css"),c=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${c}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":zO,u||(f.as="script"),f.crossOrigin="",f.href=s,o&&f.setAttribute("nonce",o),document.head.appendChild(f),u)return new Promise((d,h)=>{f.addEventListener("load",d),f.addEventListener("error",()=>h(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(l){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l}return a.then(l=>{for(const o of l||[])o.status==="rejected"&&i(o.reason);return t().catch(i)})};function jO(e={}){const{immediate:t=!1,onNeedRefresh:n,onOfflineReady:r,onRegistered:a,onRegisteredSW:i,onRegisterError:l}=e;let o,s;const u=async(f=!0)=>{await s};async function c(){if("serviceWorker"in navigator){if(o=await MO(async()=>{const{Workbox:f}=await import("./workbox-window.prod.es5-vqzQaGvo.js");return{Workbox:f}},[]).then(({Workbox:f})=>new f("/sw.js",{scope:"/",type:"classic"})).catch(f=>{l==null||l(f)}),!o)return;o.addEventListener("activated",f=>{(f.isUpdate||f.isExternal)&&window.location.reload()}),o.addEventListener("installed",f=>{f.isUpdate||r==null||r()}),o.register({immediate:t}).then(f=>{i?i("/sw.js",f):a==null||a(f)}).catch(f=>{l==null||l(f)})}}return s=c(),u}const DO="text";function q1(e){return e.kind==="json_render"?"json_render":DO}function LO(e){return e.json_render_spec??null}function mr(e){return{...e,kind:q1(e)}}function ym(e){return q1(e)==="json_render"?{kind:"json_render",textContent:null,jsonRenderSpec:LO(e)}:{kind:"text",textContent:e.content??null,jsonRenderSpec:null}}function UO(e){return{...e,message:mr(e.message)}}function PO(e){return{...e,last_message:e.last_message?mr(e.last_message):void 0}}class la extends Error{constructor(n,r,a){super(n);ja(this,"status");ja(this,"path");this.name="ApiError",this.status=r,this.path=a}}const BO="";function $O(e){return e.replace(/\/+$/,"")}function IO(e,t){const n=t.startsWith("/")?t:`/${t}`;return e===""?n:`${e}${n}`}function ZO(e,t){if(!t)return e;const n=new URLSearchParams;for(const[a,i]of Object.entries(t))i!==void 0&&n.set(a,String(i));const r=n.toString();return r===""?e:`${e}?${r}`}function HO(e){return typeof e=="object"&&e!==null}function FO(e){return"attachment"in e}function qO(e){return"attachmentUrl"in e}class GO{constructor(t={}){ja(this,"baseUrl");ja(this,"getToken");ja(this,"onUnauthorized");ja(this,"token",null);const n=t.baseUrl??BO;this.baseUrl=$O(n),this.getToken=t.getToken,this.onUnauthorized=t.onUnauthorized}setAuthToken(t){this.token=t}getAuthToken(){return this.getToken?this.getToken()??this.token:this.token}async register(t){return this.requestJSON({method:"POST",path:"/api/auth/register",auth:!1,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async login(t){return this.requestJSON({method:"POST",path:"/api/auth/login",auth:!1,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async logout(){await this.requestVoid({method:"DELETE",path:"/api/auth/logout"})}async getMe(){return this.requestJSON({method:"GET",path:"/api/users/me"})}async searchUsers(t){return this.requestJSON({method:"GET",path:"/api/users",query:{username:t.username,limit:t.limit}})}async listConversations(t={}){return(await this.requestJSON({method:"GET",path:"/api/conversations",query:{limit:t.limit}})).map(PO)}async startConversation(t){return this.requestJSON({method:"POST",path:"/api/conversations",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async getConversation(t){return this.requestJSON({method:"GET",path:`/api/conversations/${encodeURIComponent(t)}`})}async listMessages(t,n={}){return(await this.requestJSON({method:"GET",path:`/api/conversations/${encodeURIComponent(t)}/messages`,query:{before:n.before,limit:n.limit}})).map(UO)}async sendMessage(t,n){const r=`/api/conversations/${encodeURIComponent(t)}/messages`;if(FO(n)){const a=new FormData;return n.content&&n.content.trim()!==""&&a.set("content",n.content),a.set("attachment",n.attachment),this.requestJSON({method:"POST",path:r,body:a}).then(mr)}if(qO(n)){const a=new FormData;return n.content&&n.content.trim()!==""&&a.set("content",n.content),a.set("attachment_url",n.attachmentUrl),n.attachmentType&&a.set("attachment_type",n.attachmentType),this.requestJSON({method:"POST",path:r,body:a}).then(mr)}return this.requestJSON({method:"POST",path:r,headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n.content})}).then(mr)}async editMessage(t,n){return this.requestJSON({method:"PATCH",path:`/api/messages/${encodeURIComponent(t)}`,headers:{"Content-Type":"application/json"},body:JSON.stringify(n)}).then(mr)}async deleteMessage(t){return this.requestJSON({method:"DELETE",path:`/api/messages/${encodeURIComponent(t)}`}).then(mr)}async toggleReaction(t,n){return this.requestJSON({method:"POST",path:`/api/messages/${encodeURIComponent(t)}/reactions`,headers:{"Content-Type":"application/json"},body:JSON.stringify(n)})}async removeReaction(t,n){return this.requestJSON({method:"DELETE",path:`/api/messages/${encodeURIComponent(t)}/reactions/${encodeURIComponent(n)}`})}async uploadFile(t,n="file"){const r=new FormData;return r.set(n,t),this.requestJSON({method:"POST",path:"/api/upload",body:r})}async getPushConfig(){return this.requestJSON({method:"GET",path:"/api/push/config"})}async savePushSubscription(t){await this.requestVoid({method:"POST",path:"/api/push/subscriptions",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async deletePushSubscription(t){await this.requestVoid({method:"DELETE",path:"/api/push/subscriptions",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}async requestJSON(t){return await(await this.request(t)).json()}async requestVoid(t){await this.request(t)}async request(t){const n=ZO(IO(this.baseUrl,t.path),t.query),r=new Headers(t.headers??{});if(t.auth??!0){const l=this.getAuthToken();l&&r.set("Authorization",`Bearer ${l}`)}const i=await fetch(n,{method:t.method,headers:r,body:t.body});if(i.ok)return i;throw i.status===401&&this.onUnauthorized&&this.onUnauthorized(),await this.toApiError(i,t.path)}async toApiError(t,n){const r=t.headers.get("Content-Type")??"";let a=`Request failed with status ${t.status}`;if(r.includes("application/json"))try{const i=await t.json();HO(i)&&typeof i.error=="string"&&i.error.trim()!==""&&(a=i.error)}catch{}else try{const i=(await t.text()).trim();i!==""&&(a=i)}catch{}return new la(a,t.status,n)}}function VO(e={}){return new GO(e)}const ot=VO();function vm(){return typeof window<"u"&&"serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window}async function Yy(){if(!vm())return{supported:!1,configured:!1,enabled:!1,permission:"unsupported"};const e=await ot.getPushConfig(),n=await(await navigator.serviceWorker.ready).pushManager.getSubscription();return{supported:!0,configured:e.enabled,enabled:n!==null,permission:Notification.permission}}async function QO(){if(!vm())throw new Error("Push notifications are not supported on this device.");const e=await ot.getPushConfig();if(!e.enabled||!e.vapid_public_key)return{supported:!0,configured:!1,enabled:!1,permission:Notification.permission};const t=await Notification.requestPermission();if(t!=="granted")return{supported:!0,configured:!0,enabled:!1,permission:t};const n=await navigator.serviceWorker.ready;let r=await n.pushManager.getSubscription();return r||(r=await n.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:XO(e.vapid_public_key)})),await ot.savePushSubscription(YO(r)),{supported:!0,configured:!0,enabled:!0,permission:t}}async function G1(){if(!vm())return;const t=await(await navigator.serviceWorker.ready).pushManager.getSubscription();if(t){try{await ot.deletePushSubscription({endpoint:t.endpoint})}catch{}await t.unsubscribe()}}function YO(e){var i,l,o,s,u;const t=e.toJSON(),n=(l=(i=t.keys)==null?void 0:i.p256dh)==null?void 0:l.trim(),r=(s=(o=t.keys)==null?void 0:o.auth)==null?void 0:s.trim(),a=(u=t.endpoint)==null?void 0:u.trim();if(!a||!n||!r)throw new Error("Push subscription is missing required keys.");return{endpoint:a,keys:{p256dh:n,auth:r}}}function XO(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"="),r=window.atob(n),a=new Uint8Array(r.length);for(let i=0;i<r.length;i+=1)a[i]=r.charCodeAt(i);return a}const Ph="agent_message.auth_token",V1=v.createContext(void 0);function JO(){try{return window.localStorage.getItem(Ph)}catch{return null}}function Xy(e){try{if(e===null){window.localStorage.removeItem(Ph);return}window.localStorage.setItem(Ph,e)}catch{}}function KO({children:e}){const[t,n]=v.useState("loading"),[r,a]=v.useState(null),[i,l]=v.useState(null),o=v.useCallback(d=>{ot.setAuthToken(d.token),Xy(d.token),a(d.token),l(d.user),n("authenticated")},[]),s=v.useCallback(()=>{ot.setAuthToken(null),Xy(null),a(null),l(null),n("unauthenticated")},[]);v.useEffect(()=>{const d=JO();if(!d){n("unauthenticated");return}let h=!1;return ot.setAuthToken(d),a(d),ot.getMe().then(b=>{h||(l(b),n("authenticated"))}).catch(()=>{h||s()}),()=>{h=!0}},[s]);const u=v.useCallback(async d=>{const h={username:d.username.trim(),password:d.password};try{const b=await ot.login(h);return o(b),{mode:"login"}}catch(b){if(!(b instanceof la)||b.status!==401)throw b;try{const y=await ot.register(h);return o(y),{mode:"register"}}catch(y){throw y instanceof la&&y.status===409?new la("invalid credentials",401,"/api/auth/login"):y}}},[o]),c=v.useCallback(async()=>{try{await G1(),await ot.logout()}catch(d){if(!(d instanceof la)||d.status!==401)throw d}finally{s()}},[s]),f=v.useMemo(()=>({status:t,isAuthenticated:t==="authenticated",token:r,user:i,loginWithAutoRegister:u,logout:c}),[u,c,t,r,i]);return x.jsx(V1.Provider,{value:f,children:e})}function ws(){const e=v.useContext(V1);if(!e)throw new Error("useAuth must be used within AuthProvider");return e}const Jy="Start a conversation",Q1="This message was deleted",Ky="[json-render]";function WO(e){if(e.attachment_type==="image")return"[image]";if(e.attachment_type==="file")return"[file]"}function eN(e){var a;if(!e)return Jy;if(e.deleted)return Q1;const t=ym(e),n=WO(e);if(t.kind==="json_render")return n?`${n} ${Ky}`:Ky;const r=(a=t.textContent)==null?void 0:a.trim();return n&&r?`${n} ${r}`:r||n||Jy}function Ou(e,t){return e.sender_id===t&&!e.deleted}function Yf(e,t){return Ou(e,t)?ym(e).kind==="text":!1}function tN(e){var r;if(e.deleted)return{variant:"deleted",textContent:null,jsonRenderSpec:null};const t=ym(e);if(t.kind==="json_render")return{variant:"json_render",textContent:null,jsonRenderSpec:t.jsonRenderSpec};const n=(r=t.textContent)==null?void 0:r.trim();return n?{variant:"text",textContent:n,jsonRenderSpec:null}:{variant:"empty",textContent:null,jsonRenderSpec:null}}const nN=rN();function rN(){return"/api/events"}function aN(e){return typeof e=="object"&&e!==null}function iN(e){return e==="message.new"||e==="message.edited"||e==="message.deleted"||e==="reaction.added"||e==="reaction.removed"}function lN(e){let t;try{t=JSON.parse(e)}catch{return null}if(!aN(t))return null;const n=t.type;if(typeof n!="string"||n.trim()==="")return null;const r=t.data;if(!iN(n))return{type:n,data:r};switch(n){case"message.new":return{type:n,data:mr(r)};case"message.edited":return{type:n,data:mr(r)};case"message.deleted":return{type:n,data:r};case"reaction.added":return{type:n,data:r};case"reaction.removed":return{type:n,data:r}}}function oN(e){const{token:t,enabled:n=!0,eventURL:r=nN,onOpen:a,onError:i,onEvent:l,onMessageNew:o,onMessageEdited:s,onMessageDeleted:u,onReactionAdded:c,onReactionRemoved:f}=e,[d,h]=v.useState("idle"),[b,y]=v.useState(null),_=v.useRef(null);return v.useEffect(()=>{var E;if(!n||!t){(E=_.current)==null||E.close(),_.current=null,h("idle"),y(null);return}const p=t.trim();if(p===""){h("idle"),y(null);return}const g=r.includes("?")?`${r}&token=${encodeURIComponent(p)}`:`${r}?token=${encodeURIComponent(p)}`;h("connecting");const m=new EventSource(g);_.current=m;const S=()=>_.current===m,k=T=>O=>{if(!S())return;const z=lN(O.data);z&&(y(z),l==null||l(z),T==null||T(z))};return m.onopen=()=>{S()&&(h("open"),a==null||a())},m.onerror=()=>{S()&&(h(m.readyState===EventSource.CLOSED?"closed":"connecting"),i==null||i())},m.addEventListener("message.new",k(o)),m.addEventListener("message.edited",k(s)),m.addEventListener("message.deleted",k(u)),m.addEventListener("reaction.added",k(c)),m.addEventListener("reaction.removed",k(f)),()=>{m.onopen=null,m.onerror=null,m.close(),_.current===m&&(_.current=null)}},[n,r,i,l,u,s,o,a,c,f,t]),v.useMemo(()=>({status:d,lastEvent:b}),[b,d])}function Y1(e){return{id:e.sender_id,username:"me",created_at:e.created_at}}function X1(e,t){return!e||e.pages.length===0?{pageParams:[void 0],pages:[[t]]}:e.pages.some(r=>r.some(a=>a.message.id===t.message.id))?e:{...e,pages:[[t,...e.pages[0]],...e.pages.slice(1)]}}function sN(e,t){if(!e)return e;let n=!1;const r=e.pages.map(a=>a.map(i=>i.message.id!==t?i:(n=!0,{...i,message:{...i.message,deleted:!0,content:void 0,attachment_url:void 0,attachment_type:void 0}})));return n?{...e,pages:r}:e}function Bh(e,t){if(!e)return e;let n=!1;const r=e.pages.map(a=>a.map(i=>i.message.id!==t.id?i:(n=!0,{...i,message:t})));return n?{...e,pages:r}:e}function uN(e,t,n){return t&&e.sender_id===t.id?t:(n==null?void 0:n.participant_a.id)===e.sender_id?n.participant_a:(n==null?void 0:n.participant_b.id)===e.sender_id?n.participant_b:Y1(e)}function cN(e,t){const n=e[t.message_id]??[];return n.some(a=>a.emoji===t.emoji&&a.user_id===t.user_id)?e:{...e,[t.message_id]:[...n,t]}}function fN(e,t){const n=e[t.message_id]??[],r=n.filter(a=>!(a.emoji===t.emoji&&a.user_id===t.user_id));if(r.length===n.length)return e;if(r.length===0){const{[t.message_id]:a,...i}=e;return i}return{...e,[t.message_id]:r}}const J1=v.createContext(void 0);function dN({children:e}){const t=Vc(),{isAuthenticated:n,token:r,user:a}=ws(),[i,l]=v.useState({}),o=v.useCallback(()=>{t.invalidateQueries({queryKey:["conversations"]})},[t]),s=v.useCallback(S=>{const k=["messages",S.conversation_id];if(t.getQueryData(k)!==void 0){const T=t.getQueryData(["conversation",S.conversation_id]);t.setQueryData(k,O=>X1(O,{message:S,sender:uN(S,a,T)}))}o()},[o,t,a]),u=v.useCallback(S=>{t.setQueryData(["messages",S.conversation_id],k=>Bh(k,S)),o()},[o,t]),c=v.useCallback(S=>{t.setQueriesData({queryKey:["messages"]},k=>sN(k,S)),o()},[o,t]),f=v.useCallback(S=>{l(k=>cN(k,S))},[]),d=v.useCallback(S=>{l(k=>fN(k,S))},[]),h=v.useCallback(({data:S})=>{s(S)},[s]),b=v.useCallback(({data:S})=>{u(S)},[u]),y=v.useCallback(({data:S})=>{c(S.id)},[c]),_=v.useCallback(({data:S})=>{f(S)},[f]),p=v.useCallback(({data:S})=>{d(S)},[d]);v.useEffect(()=>{r||l({})},[r]);const g=oN({token:r,enabled:!!(n&&r),onMessageNew:h,onMessageEdited:b,onMessageDeleted:y,onReactionAdded:_,onReactionRemoved:p}),m=v.useMemo(()=>({status:g.status,messageReactions:i,applyReactionAdded:f,applyReactionRemoved:d}),[f,d,g.status,i]);return x.jsx(J1.Provider,{value:m,children:e})}function K1(){const e=v.useContext(J1);if(!e)throw new Error("useRealtime must be used within RealtimeProvider");return e}function W1(e){return e==="open"?"Live":e==="connecting"?"Connecting":"Offline"}const hN="_page_ymysk_1",pN="_shell_ymysk_11",mN="_header_ymysk_22",gN="_headerTop_ymysk_30",yN="_eyebrow_ymysk_37",vN="_brand_ymysk_45",bN="_headerMeta_ymysk_51",SN="_currentUser_ymysk_59",xN="_statusBadge_ymysk_65",_N="_logoutButton_ymysk_78",wN="_listSection_ymysk_94",EN="_sectionHeading_ymysk_110",CN="_sectionTitle_ymysk_114",TN="_sectionCopy_ymysk_120",AN="_conversationList_ymysk_126",kN="_conversationItem_ymysk_137",ON="_conversationItemActive_ymysk_153",NN="_conversationMeta_ymysk_159",zN="_conversationName_ymysk_166",RN="_conversationTime_ymysk_171",MN="_conversationPreview_ymysk_176",jN="_conversationId_ymysk_185",DN="_statusText_ymysk_189",LN="_errorMessage_ymysk_195",UN="_emptyState_ymysk_201",PN="_emptyTitle_ymysk_206",BN="_emptyCopy_ymysk_212",Se={page:hN,shell:pN,header:mN,headerTop:gN,eyebrow:yN,brand:vN,headerMeta:bN,currentUser:SN,statusBadge:xN,logoutButton:_N,listSection:wN,sectionHeading:EN,sectionTitle:CN,sectionCopy:TN,conversationList:AN,conversationItem:kN,conversationItemActive:ON,conversationMeta:NN,conversationName:zN,conversationTime:RN,conversationPreview:MN,conversationId:jN,statusText:DN,errorMessage:LN,emptyState:UN,emptyTitle:PN,emptyCopy:BN},$N=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function Ys(e,t){return e instanceof la||e instanceof Error&&e.message.trim()!==""?e.message:t}function IN(e){if(!e)return"";const t=Date.parse(e.created_at);return Number.isNaN(t)?"":$N.format(new Date(t))}function ZN(){const e=_s(),{user:t,logout:n}=ws(),r=K1(),[a,i]=v.useState(null),[l,o]=v.useState({supported:!1,configured:!1,enabled:!1,permission:"unsupported"}),[s,u]=v.useState(null),[c,f]=v.useState(!0),d=M1({queryKey:["conversations"],queryFn:()=>ot.listConversations()}),h=Qi({mutationFn:()=>n(),onSuccess:()=>{e("/login",{replace:!0})},onError:m=>{i(Ys(m,"Failed to sign out."))}}),b=Qi({mutationFn:async()=>l.enabled?(await G1(),Yy()):QO(),onSuccess:m=>{i(null),u(null),o(m)},onError:m=>{u(Ys(m,"Failed to update notification settings."))}});v.useEffect(()=>{let m=!1;return Yy().then(S=>{m||(o(S),f(!1))}).catch(S=>{m||(u(Ys(S,"Failed to load notification settings.")),f(!1))}),()=>{m=!0}},[]);function y(){return b.isPending||c?"Checking...":l.enabled?"Disable notifications":!l.supported||!l.configured?"Notifications unavailable":l.permission==="denied"?"Notifications blocked":"Enable notifications"}function _(){return l.enabled?"Installed device notifications are active.":l.supported?l.configured?l.permission==="denied"?"Browser permission is blocked for this app.":"Enable push alerts for new messages.":"Push notifications are not configured on the server.":"This browser does not support push notifications."}function p(m){const S=eN(m.last_message),k=IN(m.last_message),E=m.conversation.id;return x.jsxs(AO,{className:({isActive:T})=>`${Se.conversationItem}${T?` ${Se.conversationItemActive}`:""}`,to:`/dm/${m.conversation.id}`,children:[x.jsxs("div",{className:Se.conversationMeta,children:[x.jsx("span",{className:Se.conversationName,children:m.other_user.username}),x.jsx("span",{className:Se.conversationTime,children:k})]}),x.jsx("p",{className:Se.conversationPreview,title:S,children:S}),x.jsx("span",{className:Se.conversationId,children:E})]},m.conversation.id)}const g=d.data??[];return x.jsx("main",{className:Se.page,children:x.jsxs("section",{className:Se.shell,children:[x.jsxs("header",{className:Se.header,children:[x.jsxs("div",{className:Se.headerTop,children:[x.jsxs("div",{children:[x.jsx("p",{className:Se.eyebrow,children:"Messages"}),x.jsx("h1",{className:Se.brand,children:"Agent Message"})]}),x.jsx("button",{className:Se.logoutButton,disabled:h.isPending,onClick:()=>h.mutate(),type:"button",children:h.isPending?"Signing out...":"Logout"})]}),x.jsxs("div",{className:Se.headerMeta,children:[x.jsx("p",{className:Se.currentUser,children:t?`@${t.username}`:"Unknown user"}),x.jsx("span",{className:Se.statusBadge,children:W1(r.status)})]}),x.jsxs("div",{className:Se.headerMeta,children:[x.jsx("button",{className:Se.logoutButton,disabled:c||b.isPending||!l.supported||!l.configured||l.permission==="denied"&&!l.enabled,onClick:()=>b.mutate(),type:"button",children:y()}),x.jsx("p",{className:Se.currentUser,children:_()})]}),a?x.jsx("p",{className:Se.errorMessage,children:a}):null,s?x.jsx("p",{className:Se.errorMessage,children:s}):null]}),x.jsxs("section",{className:Se.listSection,children:[x.jsxs("div",{className:Se.sectionHeading,children:[x.jsx("h2",{className:Se.sectionTitle,children:"Conversations"}),x.jsx("p",{className:Se.sectionCopy,children:g.length>0?`${g.length} conversation${g.length===1?"":"s"}`:"No open conversations yet."})]}),d.isLoading?x.jsx("p",{className:Se.statusText,children:"Loading conversations..."}):null,d.isError?x.jsx("p",{className:Se.errorMessage,children:Ys(d.error,"Failed to load conversations.")}):null,d.isSuccess&&g.length===0?x.jsxs("div",{className:Se.emptyState,children:[x.jsx("p",{className:Se.emptyTitle,children:"No reports yet"}),x.jsx("p",{className:Se.emptyCopy,children:"Agent work updates will appear here when a conversation is created."})]}):null,d.isSuccess&&g.length>0?x.jsx("nav",{"aria-label":"Conversation list",className:Se.conversationList,children:g.map(p)}):null]})]})})}function R(e,t,n){function r(o,s){if(o._zod||Object.defineProperty(o,"_zod",{value:{def:s,constr:l,traits:new Set},enumerable:!1}),o._zod.traits.has(e))return;o._zod.traits.add(e),t(o,s);const u=l.prototype,c=Object.keys(u);for(let f=0;f<c.length;f++){const d=c[f];d in o||(o[d]=u[d].bind(o))}}const a=(n==null?void 0:n.Parent)??Object;class i extends a{}Object.defineProperty(i,"name",{value:e});function l(o){var s;const u=n!=null&&n.Parent?new i:this;r(u,o),(s=u._zod).deferred??(s.deferred=[]);for(const c of u._zod.deferred)c();return u}return Object.defineProperty(l,"init",{value:r}),Object.defineProperty(l,Symbol.hasInstance,{value:o=>{var s,u;return n!=null&&n.Parent&&o instanceof n.Parent?!0:(u=(s=o==null?void 0:o._zod)==null?void 0:s.traits)==null?void 0:u.has(e)}}),Object.defineProperty(l,"name",{value:e}),l}class al extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class e_ extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}}const t_={};function Ea(e){return t_}function n_(e){const t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,a])=>t.indexOf(+r)===-1).map(([r,a])=>a)}function $h(e,t){return typeof t=="bigint"?t.toString():t}function bm(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Sm(e){return e==null}function xm(e){const t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function HN(e,t){const n=(e.toString().split(".")[1]||"").length,r=t.toString();let a=(r.split(".")[1]||"").length;if(a===0&&/\d?e-\d?/.test(r)){const s=r.match(/\d?e-(\d?)/);s!=null&&s[1]&&(a=Number.parseInt(s[1]))}const i=n>a?n:a,l=Number.parseInt(e.toFixed(i).replace(".","")),o=Number.parseInt(t.toFixed(i).replace(".",""));return l%o/10**i}const Wy=Symbol("evaluating");function ve(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==Wy)return r===void 0&&(r=Wy,r=n()),r},set(a){Object.defineProperty(e,t,{value:a})},configurable:!0})}function vi(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Oa(...e){const t={};for(const n of e){const r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function ev(e){return JSON.stringify(e)}function FN(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const r_="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function gc(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}const qN=bm(()=>{var e;if(typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)!=null&&e.includes("Cloudflare")))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function Rl(e){if(gc(e)===!1)return!1;const t=e.constructor;if(t===void 0||typeof t!="function")return!0;const n=t.prototype;return!(gc(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function a_(e){return Rl(e)?{...e}:Array.isArray(e)?[...e]:e}const GN=new Set(["string","number","symbol"]);function Ml(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Na(e,t,n){const r=new e._zod.constr(t??e._zod.def);return(!t||n!=null&&n.parent)&&(r._zod.parent=e),r}function W(e){const t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if((t==null?void 0:t.message)!==void 0){if((t==null?void 0:t.error)!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function VN(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}const QN={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function YN(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=Oa(e._zod.def,{get shape(){const l={};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(l[o]=n.shape[o])}return vi(this,"shape",l),l},checks:[]});return Na(e,i)}function XN(e,t){const n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=Oa(e._zod.def,{get shape(){const l={...e._zod.def.shape};for(const o in t){if(!(o in n.shape))throw new Error(`Unrecognized key: "${o}"`);t[o]&&delete l[o]}return vi(this,"shape",l),l},checks:[]});return Na(e,i)}function JN(e,t){if(!Rl(t))throw new Error("Invalid input to extend: expected a plain object");const n=e._zod.def.checks;if(n&&n.length>0){const i=e._zod.def.shape;for(const l in t)if(Object.getOwnPropertyDescriptor(i,l)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=Oa(e._zod.def,{get shape(){const i={...e._zod.def.shape,...t};return vi(this,"shape",i),i}});return Na(e,a)}function KN(e,t){if(!Rl(t))throw new Error("Invalid input to safeExtend: expected a plain object");const n=Oa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t};return vi(this,"shape",r),r}});return Na(e,n)}function WN(e,t){const n=Oa(e._zod.def,{get shape(){const r={...e._zod.def.shape,...t._zod.def.shape};return vi(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:[]});return Na(e,n)}function ez(e,t,n){const a=t._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const l=Oa(t._zod.def,{get shape(){const o=t._zod.def.shape,s={...o};if(n)for(const u in n){if(!(u in o))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(s[u]=e?new e({type:"optional",innerType:o[u]}):o[u])}else for(const u in o)s[u]=e?new e({type:"optional",innerType:o[u]}):o[u];return vi(this,"shape",s),s},checks:[]});return Na(t,l)}function tz(e,t,n){const r=Oa(t._zod.def,{get shape(){const a=t._zod.def.shape,i={...a};if(n)for(const l in n){if(!(l in i))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(i[l]=new e({type:"nonoptional",innerType:a[l]}))}else for(const l in a)i[l]=new e({type:"nonoptional",innerType:a[l]});return vi(this,"shape",i),i}});return Na(t,r)}function Yi(e,t=0){var n;if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(((n=e.issues[r])==null?void 0:n.continue)!==!0)return!0;return!1}function Xi(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function Xs(e){return typeof e=="string"?e:e==null?void 0:e.message}function Ca(e,t,n){var a,i,l,o,s,u;const r={...e,path:e.path??[]};if(!e.message){const c=Xs((l=(i=(a=e.inst)==null?void 0:a._zod.def)==null?void 0:i.error)==null?void 0:l.call(i,e))??Xs((o=t==null?void 0:t.error)==null?void 0:o.call(t,e))??Xs((s=n.customError)==null?void 0:s.call(n,e))??Xs((u=n.localeError)==null?void 0:u.call(n,e))??"Invalid input";r.message=c}return delete r.inst,delete r.continue,t!=null&&t.reportInput||delete r.input,r}function _m(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function ns(...e){const[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}const i_=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,$h,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},l_=R("$ZodError",i_),o_=R("$ZodError",i_,{Parent:Error});function nz(e,t=n=>n.message){const n={},r=[];for(const a of e.issues)a.path.length>0?(n[a.path[0]]=n[a.path[0]]||[],n[a.path[0]].push(t(a))):r.push(t(a));return{formErrors:r,fieldErrors:n}}function rz(e,t=n=>n.message){const n={_errors:[]},r=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(l=>r({issues:l}));else if(i.code==="invalid_key")r({issues:i.issues});else if(i.code==="invalid_element")r({issues:i.issues});else if(i.path.length===0)n._errors.push(t(i));else{let l=n,o=0;for(;o<i.path.length;){const s=i.path[o];o===i.path.length-1?(l[s]=l[s]||{_errors:[]},l[s]._errors.push(t(i))):l[s]=l[s]||{_errors:[]},l=l[s],o++}}};return r(e),n}const wm=e=>(t,n,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw new al;if(l.issues.length){const o=new((a==null?void 0:a.Err)??e)(l.issues.map(s=>Ca(s,i,Ea())));throw r_(o,a==null?void 0:a.callee),o}return l.value},Em=e=>async(t,n,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let l=t._zod.run({value:n,issues:[]},i);if(l instanceof Promise&&(l=await l),l.issues.length){const o=new((a==null?void 0:a.Err)??e)(l.issues.map(s=>Ca(s,i,Ea())));throw r_(o,a==null?void 0:a.callee),o}return l.value},Jc=e=>(t,n,r)=>{const a=r?{...r,async:!1}:{async:!1},i=t._zod.run({value:n,issues:[]},a);if(i instanceof Promise)throw new al;return i.issues.length?{success:!1,error:new(e??l_)(i.issues.map(l=>Ca(l,a,Ea())))}:{success:!0,data:i.value}},az=Jc(o_),Kc=e=>async(t,n,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:n,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(l=>Ca(l,a,Ea())))}:{success:!0,data:i.value}},iz=Kc(o_),lz=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return wm(e)(t,n,a)},oz=e=>(t,n,r)=>wm(e)(t,n,r),sz=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Em(e)(t,n,a)},uz=e=>async(t,n,r)=>Em(e)(t,n,r),cz=e=>(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Jc(e)(t,n,a)},fz=e=>(t,n,r)=>Jc(e)(t,n,r),dz=e=>async(t,n,r)=>{const a=r?Object.assign(r,{direction:"backward"}):{direction:"backward"};return Kc(e)(t,n,a)},hz=e=>async(t,n,r)=>Kc(e)(t,n,r),pz=/^[cC][^\s-]{8,}$/,mz=/^[0-9a-z]+$/,gz=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,yz=/^[0-9a-vA-V]{20}$/,vz=/^[A-Za-z0-9]{27}$/,bz=/^[a-zA-Z0-9_-]{21}$/,Sz=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xz=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,tv=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,_z=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,wz="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Ez(){return new RegExp(wz,"u")}const Cz=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Tz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Az=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,kz=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Oz=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,s_=/^[A-Za-z0-9_-]*$/,Nz=/^\+[1-9]\d{6,14}$/,u_="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",zz=new RegExp(`^${u_}$`);function c_(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Rz(e){return new RegExp(`^${c_(e)}$`)}function Mz(e){const t=c_({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const r=`${t}(?:${n.join("|")})`;return new RegExp(`^${u_}T(?:${r})$`)}const jz=e=>{const t=e?`[\\s\\S]{${(e==null?void 0:e.minimum)??0},${(e==null?void 0:e.maximum)??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Dz=/^-?\d+$/,f_=/^-?\d+(?:\.\d+)?$/,Lz=/^(?:true|false)$/i,Uz=/^null$/i,Pz=/^[^A-Z]*$/,Bz=/^[^a-z]*$/,Xt=R("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),d_={number:"number",bigint:"bigint",object:"date"},h_=R("$ZodCheckLessThan",(e,t)=>{Xt.init(e,t);const n=d_[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<i&&(t.inclusive?a.maximum=t.value:a.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),p_=R("$ZodCheckGreaterThan",(e,t)=>{Xt.init(e,t);const n=d_[typeof t.value];e._zod.onattach.push(r=>{const a=r._zod.bag,i=(t.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>i&&(t.inclusive?a.minimum=t.value:a.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),$z=R("$ZodCheckMultipleOf",(e,t)=>{Xt.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):HN(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Iz=R("$ZodCheckNumberFormat",(e,t)=>{var l;Xt.init(e,t),t.format=t.format||"float64";const n=(l=t.format)==null?void 0:l.includes("int"),r=n?"int":"number",[a,i]=QN[t.format];e._zod.onattach.push(o=>{const s=o._zod.bag;s.format=t.format,s.minimum=a,s.maximum=i,n&&(s.pattern=Dz)}),e._zod.check=o=>{const s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<a&&o.issues.push({origin:"number",input:s,code:"too_small",minimum:a,inclusive:!0,inst:e,continue:!t.abort}),s>i&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),Zz=R("$ZodCheckMaxLength",(e,t)=>{var n;Xt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!Sm(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<a&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{const a=r.value;if(a.length<=t.maximum)return;const l=_m(a);r.issues.push({origin:l,code:"too_big",maximum:t.maximum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),Hz=R("$ZodCheckMinLength",(e,t)=>{var n;Xt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!Sm(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>a&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{const a=r.value;if(a.length>=t.minimum)return;const l=_m(a);r.issues.push({origin:l,code:"too_small",minimum:t.minimum,inclusive:!0,input:a,inst:e,continue:!t.abort})}}),Fz=R("$ZodCheckLengthEquals",(e,t)=>{var n;Xt.init(e,t),(n=e._zod.def).when??(n.when=r=>{const a=r.value;return!Sm(a)&&a.length!==void 0}),e._zod.onattach.push(r=>{const a=r._zod.bag;a.minimum=t.length,a.maximum=t.length,a.length=t.length}),e._zod.check=r=>{const a=r.value,i=a.length;if(i===t.length)return;const l=_m(a),o=i>t.length;r.issues.push({origin:l,...o?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),Wc=R("$ZodCheckStringFormat",(e,t)=>{var n,r;Xt.init(e,t),e._zod.onattach.push(a=>{const i=a._zod.bag;i.format=t.format,t.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=a=>{t.pattern.lastIndex=0,!t.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:t.format,input:a.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),qz=R("$ZodCheckRegex",(e,t)=>{Wc.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Gz=R("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Pz),Wc.init(e,t)}),Vz=R("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Bz),Wc.init(e,t)}),Qz=R("$ZodCheckIncludes",(e,t)=>{Xt.init(e,t);const n=Ml(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(r)}),e._zod.check=a=>{a.value.includes(t.includes,t.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:a.value,inst:e,continue:!t.abort})}}),Yz=R("$ZodCheckStartsWith",(e,t)=>{Xt.init(e,t);const n=new RegExp(`^${Ml(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),Xz=R("$ZodCheckEndsWith",(e,t)=>{Xt.init(e,t);const n=new RegExp(`.*${Ml(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{const a=r._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}}),Jz=R("$ZodCheckOverwrite",(e,t)=>{Xt.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});class Kz{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}const r=t.split(`
|
|
77
|
+
`).filter(l=>l),a=Math.min(...r.map(l=>l.length-l.trimStart().length)),i=r.map(l=>l.slice(a)).map(l=>" ".repeat(this.indent*2)+l);for(const l of i)this.content.push(l)}compile(){const t=Function,n=this==null?void 0:this.args,a=[...((this==null?void 0:this.content)??[""]).map(i=>` ${i}`)];return new t(...n,a.join(`
|
|
78
|
+
`))}}const Wz={major:4,minor:3,patch:6},Pe=R("$ZodType",(e,t)=>{var a;var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Wz;const r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(const i of r)for(const l of i._zod.onattach)l(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),(a=e._zod.deferred)==null||a.push(()=>{e._zod.run=e._zod.parse});else{const i=(o,s,u)=>{let c=Yi(o),f;for(const d of s){if(d._zod.def.when){if(!d._zod.def.when(o))continue}else if(c)continue;const h=o.issues.length,b=d._zod.check(o);if(b instanceof Promise&&(u==null?void 0:u.async)===!1)throw new al;if(f||b instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await b,o.issues.length!==h&&(c||(c=Yi(o,h)))});else{if(o.issues.length===h)continue;c||(c=Yi(o,h))}}return f?f.then(()=>o):o},l=(o,s,u)=>{if(Yi(o))return o.aborted=!0,o;const c=i(s,r,u);if(c instanceof Promise){if(u.async===!1)throw new al;return c.then(f=>e._zod.parse(f,u))}return e._zod.parse(c,u)};e._zod.run=(o,s)=>{if(s.skipChecks)return e._zod.parse(o,s);if(s.direction==="backward"){const c=e._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return c instanceof Promise?c.then(f=>l(f,o,s)):l(c,o,s)}const u=e._zod.parse(o,s);if(u instanceof Promise){if(s.async===!1)throw new al;return u.then(c=>i(c,r,s))}return i(u,r,s)}}ve(e,"~standard",()=>({validate:i=>{var l;try{const o=az(e,i);return o.success?{value:o.data}:{issues:(l=o.error)==null?void 0:l.issues}}catch{return iz(e,i).then(s=>{var u;return s.success?{value:s.data}:{issues:(u=s.error)==null?void 0:u.issues}})}},vendor:"zod",version:1}))}),Cm=R("$ZodString",(e,t)=>{var n;Pe.init(e,t),e._zod.pattern=[...((n=e==null?void 0:e._zod.bag)==null?void 0:n.patterns)??[]].pop()??jz(e._zod.bag),e._zod.parse=(r,a)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ve=R("$ZodStringFormat",(e,t)=>{Wc.init(e,t),Cm.init(e,t)}),e2=R("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=xz),Ve.init(e,t)}),t2=R("$ZodUUID",(e,t)=>{if(t.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=tv(r))}else t.pattern??(t.pattern=tv());Ve.init(e,t)}),n2=R("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=_z),Ve.init(e,t)}),r2=R("$ZodURL",(e,t)=>{Ve.init(e,t),e._zod.check=n=>{try{const r=n.value.trim(),a=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(a.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=a.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),a2=R("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Ez()),Ve.init(e,t)}),i2=R("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=bz),Ve.init(e,t)}),l2=R("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=pz),Ve.init(e,t)}),o2=R("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=mz),Ve.init(e,t)}),s2=R("$ZodULID",(e,t)=>{t.pattern??(t.pattern=gz),Ve.init(e,t)}),u2=R("$ZodXID",(e,t)=>{t.pattern??(t.pattern=yz),Ve.init(e,t)}),c2=R("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=vz),Ve.init(e,t)}),f2=R("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Mz(t)),Ve.init(e,t)}),d2=R("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=zz),Ve.init(e,t)}),h2=R("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Rz(t)),Ve.init(e,t)}),p2=R("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Sz),Ve.init(e,t)}),m2=R("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Cz),Ve.init(e,t),e._zod.bag.format="ipv4"}),g2=R("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Tz),Ve.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),y2=R("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Az),Ve.init(e,t)}),v2=R("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=kz),Ve.init(e,t),e._zod.check=n=>{const r=n.value.split("/");try{if(r.length!==2)throw new Error;const[a,i]=r;if(!i)throw new Error;const l=Number(i);if(`${l}`!==i)throw new Error;if(l<0||l>128)throw new Error;new URL(`http://[${a}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function m_(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}const b2=R("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Oz),Ve.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{m_(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function S2(e){if(!s_.test(e))return!1;const t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return m_(n)}const x2=R("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=s_),Ve.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{S2(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),_2=R("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Nz),Ve.init(e,t)});function w2(e,t=null){try{const n=e.split(".");if(n.length!==3)return!1;const[r]=n;if(!r)return!1;const a=JSON.parse(atob(r));return!("typ"in a&&(a==null?void 0:a.typ)!=="JWT"||!a.alg||t&&(!("alg"in a)||a.alg!==t))}catch{return!1}}const E2=R("$ZodJWT",(e,t)=>{Ve.init(e,t),e._zod.check=n=>{w2(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),g_=R("$ZodNumber",(e,t)=>{Pe.init(e,t),e._zod.pattern=e._zod.bag.pattern??f_,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}const a=n.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return n;const i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:a,inst:e,...i?{received:i}:{}}),n}}),C2=R("$ZodNumberFormat",(e,t)=>{Iz.init(e,t),g_.init(e,t)}),T2=R("$ZodBoolean",(e,t)=>{Pe.init(e,t),e._zod.pattern=Lz,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}const a=n.value;return typeof a=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:a,inst:e}),n}}),A2=R("$ZodNull",(e,t)=>{Pe.init(e,t),e._zod.pattern=Uz,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{const a=n.value;return a===null||n.issues.push({expected:"null",code:"invalid_type",input:a,inst:e}),n}}),k2=R("$ZodAny",(e,t)=>{Pe.init(e,t),e._zod.parse=n=>n}),O2=R("$ZodUnknown",(e,t)=>{Pe.init(e,t),e._zod.parse=n=>n}),N2=R("$ZodNever",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)});function nv(e,t,n){e.issues.length&&t.issues.push(...Xi(n,e.issues)),t.value[n]=e.value}const z2=R("$ZodArray",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Array.isArray(a))return n.issues.push({expected:"array",code:"invalid_type",input:a,inst:e}),n;n.value=Array(a.length);const i=[];for(let l=0;l<a.length;l++){const o=a[l],s=t.element._zod.run({value:o,issues:[]},r);s instanceof Promise?i.push(s.then(u=>nv(u,n,l))):nv(s,n,l)}return i.length?Promise.all(i).then(()=>n):n}});function yc(e,t,n,r,a){if(e.issues.length){if(a&&!(n in r))return;t.issues.push(...Xi(n,e.issues))}e.value===void 0?n in r&&(t.value[n]=void 0):t.value[n]=e.value}function y_(e){var r,a,i,l;const t=Object.keys(e.shape);for(const o of t)if(!((l=(i=(a=(r=e.shape)==null?void 0:r[o])==null?void 0:a._zod)==null?void 0:i.traits)!=null&&l.has("$ZodType")))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const n=VN(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function v_(e,t,n,r,a,i){const l=[],o=a.keySet,s=a.catchall._zod,u=s.def.type,c=s.optout==="optional";for(const f in t){if(o.has(f))continue;if(u==="never"){l.push(f);continue}const d=s.run({value:t[f],issues:[]},r);d instanceof Promise?e.push(d.then(h=>yc(h,n,f,t,c))):yc(d,n,f,t,c)}return l.length&&n.issues.push({code:"unrecognized_keys",keys:l,input:t,inst:i}),e.length?Promise.all(e).then(()=>n):n}const R2=R("$ZodObject",(e,t)=>{Pe.init(e,t);const n=Object.getOwnPropertyDescriptor(t,"shape");if(!(n!=null&&n.get)){const o=t.shape;Object.defineProperty(t,"shape",{get:()=>{const s={...o};return Object.defineProperty(t,"shape",{value:s}),s}})}const r=bm(()=>y_(t));ve(e._zod,"propValues",()=>{const o=t.shape,s={};for(const u in o){const c=o[u]._zod;if(c.values){s[u]??(s[u]=new Set);for(const f of c.values)s[u].add(f)}}return s});const a=gc,i=t.catchall;let l;e._zod.parse=(o,s)=>{l??(l=r.value);const u=o.value;if(!a(u))return o.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),o;o.value={};const c=[],f=l.shape;for(const d of l.keys){const h=f[d],b=h._zod.optout==="optional",y=h._zod.run({value:u[d],issues:[]},s);y instanceof Promise?c.push(y.then(_=>yc(_,o,d,u,b))):yc(y,o,d,u,b)}return i?v_(c,u,o,s,r.value,e):c.length?Promise.all(c).then(()=>o):o}}),M2=R("$ZodObjectJIT",(e,t)=>{R2.init(e,t);const n=e._zod.parse,r=bm(()=>y_(t)),a=d=>{var m;const h=new Kz(["shape","payload","ctx"]),b=r.value,y=S=>{const k=ev(S);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};h.write("const input = payload.value;");const _=Object.create(null);let p=0;for(const S of b.keys)_[S]=`key_${p++}`;h.write("const newResult = {};");for(const S of b.keys){const k=_[S],E=ev(S),T=d[S],O=((m=T==null?void 0:T._zod)==null?void 0:m.optout)==="optional";h.write(`const ${k} = ${y(S)};`),O?h.write(`
|
|
79
|
+
if (${k}.issues.length) {
|
|
80
|
+
if (${E} in input) {
|
|
81
|
+
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
82
|
+
...iss,
|
|
83
|
+
path: iss.path ? [${E}, ...iss.path] : [${E}]
|
|
84
|
+
})));
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (${k}.value === undefined) {
|
|
89
|
+
if (${E} in input) {
|
|
90
|
+
newResult[${E}] = undefined;
|
|
91
|
+
}
|
|
92
|
+
} else {
|
|
93
|
+
newResult[${E}] = ${k}.value;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
`):h.write(`
|
|
97
|
+
if (${k}.issues.length) {
|
|
98
|
+
payload.issues = payload.issues.concat(${k}.issues.map(iss => ({
|
|
99
|
+
...iss,
|
|
100
|
+
path: iss.path ? [${E}, ...iss.path] : [${E}]
|
|
101
|
+
})));
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
if (${k}.value === undefined) {
|
|
105
|
+
if (${E} in input) {
|
|
106
|
+
newResult[${E}] = undefined;
|
|
107
|
+
}
|
|
108
|
+
} else {
|
|
109
|
+
newResult[${E}] = ${k}.value;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
`)}h.write("payload.value = newResult;"),h.write("return payload;");const g=h.compile();return(S,k)=>g(d,S,k)};let i;const l=gc,o=!t_.jitless,u=o&&qN.value,c=t.catchall;let f;e._zod.parse=(d,h)=>{f??(f=r.value);const b=d.value;return l(b)?o&&u&&(h==null?void 0:h.async)===!1&&h.jitless!==!0?(i||(i=a(t.shape)),d=i(d,h),c?v_([],b,d,h,f,e):d):n(d,h):(d.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),d)}});function rv(e,t,n,r){for(const i of e)if(i.issues.length===0)return t.value=i.value,t;const a=e.filter(i=>!Yi(i));return a.length===1?(t.value=a[0].value,a[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(i=>i.issues.map(l=>Ca(l,r,Ea())))}),t)}const j2=R("$ZodUnion",(e,t)=>{Pe.init(e,t),ve(e._zod,"optin",()=>t.options.some(a=>a._zod.optin==="optional")?"optional":void 0),ve(e._zod,"optout",()=>t.options.some(a=>a._zod.optout==="optional")?"optional":void 0),ve(e._zod,"values",()=>{if(t.options.every(a=>a._zod.values))return new Set(t.options.flatMap(a=>Array.from(a._zod.values)))}),ve(e._zod,"pattern",()=>{if(t.options.every(a=>a._zod.pattern)){const a=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${a.map(i=>xm(i.source)).join("|")})$`)}});const n=t.options.length===1,r=t.options[0]._zod.run;e._zod.parse=(a,i)=>{if(n)return r(a,i);let l=!1;const o=[];for(const s of t.options){const u=s._zod.run({value:a.value,issues:[]},i);if(u instanceof Promise)o.push(u),l=!0;else{if(u.issues.length===0)return u;o.push(u)}}return l?Promise.all(o).then(s=>rv(s,a,e,i)):rv(o,a,e,i)}}),D2=R("$ZodIntersection",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,r)=>{const a=n.value,i=t.left._zod.run({value:a,issues:[]},r),l=t.right._zod.run({value:a,issues:[]},r);return i instanceof Promise||l instanceof Promise?Promise.all([i,l]).then(([s,u])=>av(n,s,u)):av(n,i,l)}});function Ih(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Rl(e)&&Rl(t)){const n=Object.keys(t),r=Object.keys(e).filter(i=>n.indexOf(i)!==-1),a={...e,...t};for(const i of r){const l=Ih(e[i],t[i]);if(!l.valid)return{valid:!1,mergeErrorPath:[i,...l.mergeErrorPath]};a[i]=l.data}return{valid:!0,data:a}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const n=[];for(let r=0;r<e.length;r++){const a=e[r],i=t[r],l=Ih(a,i);if(!l.valid)return{valid:!1,mergeErrorPath:[r,...l.mergeErrorPath]};n.push(l.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function av(e,t,n){const r=new Map;let a;for(const o of t.issues)if(o.code==="unrecognized_keys"){a??(a=o);for(const s of o.keys)r.has(s)||r.set(s,{}),r.get(s).l=!0}else e.issues.push(o);for(const o of n.issues)if(o.code==="unrecognized_keys")for(const s of o.keys)r.has(s)||r.set(s,{}),r.get(s).r=!0;else e.issues.push(o);const i=[...r].filter(([,o])=>o.l&&o.r).map(([o])=>o);if(i.length&&a&&e.issues.push({...a,keys:i}),Yi(e))return e;const l=Ih(t.value,n.value);if(!l.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);return e.value=l.data,e}const L2=R("$ZodRecord",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,r)=>{const a=n.value;if(!Rl(a))return n.issues.push({expected:"record",code:"invalid_type",input:a,inst:e}),n;const i=[],l=t.keyType._zod.values;if(l){n.value={};const o=new Set;for(const u of l)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){o.add(typeof u=="number"?u.toString():u);const c=t.valueType._zod.run({value:a[u],issues:[]},r);c instanceof Promise?i.push(c.then(f=>{f.issues.length&&n.issues.push(...Xi(u,f.issues)),n.value[u]=f.value})):(c.issues.length&&n.issues.push(...Xi(u,c.issues)),n.value[u]=c.value)}let s;for(const u in a)o.has(u)||(s=s??[],s.push(u));s&&s.length>0&&n.issues.push({code:"unrecognized_keys",input:a,inst:e,keys:s})}else{n.value={};for(const o of Reflect.ownKeys(a)){if(o==="__proto__")continue;let s=t.keyType._zod.run({value:o,issues:[]},r);if(s instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof o=="string"&&f_.test(o)&&s.issues.length){const f=t.keyType._zod.run({value:Number(o),issues:[]},r);if(f instanceof Promise)throw new Error("Async schemas not supported in object keys currently");f.issues.length===0&&(s=f)}if(s.issues.length){t.mode==="loose"?n.value[o]=a[o]:n.issues.push({code:"invalid_key",origin:"record",issues:s.issues.map(f=>Ca(f,r,Ea())),input:o,path:[o],inst:e});continue}const c=t.valueType._zod.run({value:a[o],issues:[]},r);c instanceof Promise?i.push(c.then(f=>{f.issues.length&&n.issues.push(...Xi(o,f.issues)),n.value[s.value]=f.value})):(c.issues.length&&n.issues.push(...Xi(o,c.issues)),n.value[s.value]=c.value)}}return i.length?Promise.all(i).then(()=>n):n}}),U2=R("$ZodEnum",(e,t)=>{Pe.init(e,t);const n=n_(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(a=>GN.has(typeof a)).map(a=>typeof a=="string"?Ml(a):a.toString()).join("|")})$`),e._zod.parse=(a,i)=>{const l=a.value;return r.has(l)||a.issues.push({code:"invalid_value",values:n,input:l,inst:e}),a}}),P2=R("$ZodLiteral",(e,t)=>{if(Pe.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");const n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Ml(r):r?Ml(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,a)=>{const i=r.value;return n.has(i)||r.issues.push({code:"invalid_value",values:t.values,input:i,inst:e}),r}}),B2=R("$ZodTransform",(e,t)=>{Pe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new e_(e.constructor.name);const a=t.transform(n.value,n);if(r.async)return(a instanceof Promise?a:Promise.resolve(a)).then(l=>(n.value=l,n));if(a instanceof Promise)throw new al;return n.value=a,n}});function iv(e,t){return e.issues.length&&t===void 0?{issues:[],value:void 0}:e}const b_=R("$ZodOptional",(e,t)=>{Pe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),ve(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xm(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>iv(i,n.value)):iv(a,n.value)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),$2=R("$ZodExactOptional",(e,t)=>{b_.init(e,t),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),I2=R("$ZodNullable",(e,t)=>{Pe.init(e,t),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"pattern",()=>{const n=t.innerType._zod.pattern;return n?new RegExp(`^(${xm(n.source)}|null)$`):void 0}),ve(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Z2=R("$ZodDefault",(e,t)=>{Pe.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>lv(i,t)):lv(a,t)}});function lv(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}const H2=R("$ZodPrefault",(e,t)=>{Pe.init(e,t),e._zod.optin="optional",ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),F2=R("$ZodNonOptional",(e,t)=>{Pe.init(e,t),ve(e._zod,"values",()=>{const n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>ov(i,e)):ov(a,e)}});function ov(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const q2=R("$ZodCatch",(e,t)=>{Pe.init(e,t),ve(e._zod,"optin",()=>t.innerType._zod.optin),ve(e._zod,"optout",()=>t.innerType._zod.optout),ve(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(i=>(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(l=>Ca(l,r,Ea()))},input:n.value}),n.issues=[]),n)):(n.value=a.value,a.issues.length&&(n.value=t.catchValue({...n,error:{issues:a.issues.map(i=>Ca(i,r,Ea()))},input:n.value}),n.issues=[]),n)}}),G2=R("$ZodPipe",(e,t)=>{Pe.init(e,t),ve(e._zod,"values",()=>t.in._zod.values),ve(e._zod,"optin",()=>t.in._zod.optin),ve(e._zod,"optout",()=>t.out._zod.optout),ve(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){const i=t.out._zod.run(n,r);return i instanceof Promise?i.then(l=>Js(l,t.in,r)):Js(i,t.in,r)}const a=t.in._zod.run(n,r);return a instanceof Promise?a.then(i=>Js(i,t.out,r)):Js(a,t.out,r)}});function Js(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}const V2=R("$ZodReadonly",(e,t)=>{Pe.init(e,t),ve(e._zod,"propValues",()=>t.innerType._zod.propValues),ve(e._zod,"values",()=>t.innerType._zod.values),ve(e._zod,"optin",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optin}),ve(e._zod,"optout",()=>{var n,r;return(r=(n=t.innerType)==null?void 0:n._zod)==null?void 0:r.optout}),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);const a=t.innerType._zod.run(n,r);return a instanceof Promise?a.then(sv):sv(a)}});function sv(e){return e.value=Object.freeze(e.value),e}const Q2=R("$ZodLazy",(e,t)=>{Pe.init(e,t),ve(e._zod,"innerType",()=>t.getter()),ve(e._zod,"pattern",()=>{var n,r;return(r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.pattern}),ve(e._zod,"propValues",()=>{var n,r;return(r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.propValues}),ve(e._zod,"optin",()=>{var n,r;return((r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.optin)??void 0}),ve(e._zod,"optout",()=>{var n,r;return((r=(n=e._zod.innerType)==null?void 0:n._zod)==null?void 0:r.optout)??void 0}),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),Y2=R("$ZodCustom",(e,t)=>{Xt.init(e,t),Pe.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{const r=n.value,a=t.fn(r);if(a instanceof Promise)return a.then(i=>uv(i,n,r,e));uv(a,n,r,e)}});function uv(e,t,n,r){if(!e){const a={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(a.params=r._zod.def.params),t.issues.push(ns(a))}}var cv;class X2{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){const r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){const n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){const n=t._zod.parent;if(n){const r={...this.get(n)??{}};delete r.id;const a={...r,...this._map.get(t)};return Object.keys(a).length?a:void 0}return this._map.get(t)}has(t){return this._map.has(t)}}function J2(){return new X2}(cv=globalThis).__zod_globalRegistry??(cv.__zod_globalRegistry=J2());const So=globalThis.__zod_globalRegistry;function K2(e,t){return new e({type:"string",...W(t)})}function W2(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...W(t)})}function fv(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...W(t)})}function eR(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...W(t)})}function tR(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...W(t)})}function nR(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...W(t)})}function rR(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...W(t)})}function aR(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...W(t)})}function iR(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...W(t)})}function lR(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...W(t)})}function oR(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...W(t)})}function sR(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...W(t)})}function uR(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...W(t)})}function cR(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...W(t)})}function fR(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...W(t)})}function dR(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...W(t)})}function hR(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...W(t)})}function pR(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...W(t)})}function mR(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...W(t)})}function gR(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...W(t)})}function yR(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...W(t)})}function vR(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...W(t)})}function bR(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...W(t)})}function SR(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...W(t)})}function xR(e,t){return new e({type:"string",format:"date",check:"string_format",...W(t)})}function _R(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...W(t)})}function wR(e,t){return new e({type:"string",format:"duration",check:"string_format",...W(t)})}function ER(e,t){return new e({type:"number",checks:[],...W(t)})}function CR(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...W(t)})}function TR(e,t){return new e({type:"boolean",...W(t)})}function AR(e,t){return new e({type:"null",...W(t)})}function kR(e){return new e({type:"any"})}function OR(e){return new e({type:"unknown"})}function NR(e,t){return new e({type:"never",...W(t)})}function dv(e,t){return new h_({check:"less_than",...W(t),value:e,inclusive:!1})}function Xf(e,t){return new h_({check:"less_than",...W(t),value:e,inclusive:!0})}function hv(e,t){return new p_({check:"greater_than",...W(t),value:e,inclusive:!1})}function Jf(e,t){return new p_({check:"greater_than",...W(t),value:e,inclusive:!0})}function pv(e,t){return new $z({check:"multiple_of",...W(t),value:e})}function S_(e,t){return new Zz({check:"max_length",...W(t),maximum:e})}function vc(e,t){return new Hz({check:"min_length",...W(t),minimum:e})}function x_(e,t){return new Fz({check:"length_equals",...W(t),length:e})}function zR(e,t){return new qz({check:"string_format",format:"regex",...W(t),pattern:e})}function RR(e){return new Gz({check:"string_format",format:"lowercase",...W(e)})}function MR(e){return new Vz({check:"string_format",format:"uppercase",...W(e)})}function jR(e,t){return new Qz({check:"string_format",format:"includes",...W(t),includes:e})}function DR(e,t){return new Yz({check:"string_format",format:"starts_with",...W(t),prefix:e})}function LR(e,t){return new Xz({check:"string_format",format:"ends_with",...W(t),suffix:e})}function Ql(e){return new Jz({check:"overwrite",tx:e})}function UR(e){return Ql(t=>t.normalize(e))}function PR(){return Ql(e=>e.trim())}function BR(){return Ql(e=>e.toLowerCase())}function $R(){return Ql(e=>e.toUpperCase())}function IR(){return Ql(e=>FN(e))}function ZR(e,t,n){return new e({type:"array",element:t,...W(n)})}function HR(e,t,n){return new e({type:"custom",check:"custom",fn:t,...W(n)})}function FR(e){const t=qR(n=>(n.addIssue=r=>{if(typeof r=="string")n.issues.push(ns(r,n.value,t._zod.def));else{const a=r;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=t),a.continue??(a.continue=!t._zod.def.abort),n.issues.push(ns(a))}},e(n.value,n)));return t}function qR(e,t){const n=new Xt({check:"custom",...W(t)});return n._zod.check=e,n}function __(e){let t=(e==null?void 0:e.target)??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:(e==null?void 0:e.metadata)??So,target:t,unrepresentable:(e==null?void 0:e.unrepresentable)??"throw",override:(e==null?void 0:e.override)??(()=>{}),io:(e==null?void 0:e.io)??"output",counter:0,seen:new Map,cycles:(e==null?void 0:e.cycles)??"ref",reused:(e==null?void 0:e.reused)??"inline",external:(e==null?void 0:e.external)??void 0}}function rt(e,t,n={path:[],schemaPath:[]}){var c,f;var r;const a=e._zod.def,i=t.seen.get(e);if(i)return i.count++,n.schemaPath.includes(e)&&(i.cycle=n.path),i.schema;const l={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,l);const o=(f=(c=e._zod).toJSONSchema)==null?void 0:f.call(c);if(o)l.schema=o;else{const d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,l.schema,d);else{const b=l.schema,y=t.processors[a.type];if(!y)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);y(e,t,b,d)}const h=e._zod.parent;h&&(l.ref||(l.ref=h),rt(h,t,d),t.seen.get(h).isParent=!0)}const s=t.metadataRegistry.get(e);return s&&Object.assign(l.schema,s),t.io==="input"&&kt(e)&&(delete l.schema.examples,delete l.schema.default),t.io==="input"&&l.schema._prefault&&((r=l.schema).default??(r.default=l.schema._prefault)),delete l.schema._prefault,t.seen.get(e).schema}function w_(e,t){var l,o,s,u;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=new Map;for(const c of e.seen.entries()){const f=(l=e.metadataRegistry.get(c[0]))==null?void 0:l.id;if(f){const d=r.get(f);if(d&&d!==c[0])throw new Error(`Duplicate schema id "${f}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(f,c[0])}}const a=c=>{var y;const f=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){const _=(y=e.external.registry.get(c[0]))==null?void 0:y.id,p=e.external.uri??(m=>m);if(_)return{ref:p(_)};const g=c[1].defId??c[1].schema.id??`schema${e.counter++}`;return c[1].defId=g,{defId:g,ref:`${p("__shared")}#/${f}/${g}`}}if(c[1]===n)return{ref:"#"};const h=`#/${f}/`,b=c[1].schema.id??`__schema${e.counter++}`;return{defId:b,ref:h+b}},i=c=>{if(c[1].schema.$ref)return;const f=c[1],{ref:d,defId:h}=a(c);f.def={...f.schema},h&&(f.defId=h);const b=f.schema;for(const y in b)delete b[y];b.$ref=d};if(e.cycles==="throw")for(const c of e.seen.entries()){const f=c[1];if(f.cycle)throw new Error(`Cycle detected: #/${(o=f.cycle)==null?void 0:o.join("/")}/<root>
|
|
113
|
+
|
|
114
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const c of e.seen.entries()){const f=c[1];if(t===c[0]){i(c);continue}if(e.external){const h=(s=e.external.registry.get(c[0]))==null?void 0:s.id;if(t!==c[0]&&h){i(c);continue}}if((u=e.metadataRegistry.get(c[0]))==null?void 0:u.id){i(c);continue}if(f.cycle){i(c);continue}if(f.count>1&&e.reused==="ref"){i(c);continue}}}function E_(e,t){var l,o,s;const n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=u=>{const c=e.seen.get(u);if(c.ref===null)return;const f=c.def??c.schema,d={...f},h=c.ref;if(c.ref=null,h){r(h);const y=e.seen.get(h),_=y.schema;if(_.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(f.allOf=f.allOf??[],f.allOf.push(_)):Object.assign(f,_),Object.assign(f,d),u._zod.parent===h)for(const g in f)g==="$ref"||g==="allOf"||g in d||delete f[g];if(_.$ref&&y.def)for(const g in f)g==="$ref"||g==="allOf"||g in y.def&&JSON.stringify(f[g])===JSON.stringify(y.def[g])&&delete f[g]}const b=u._zod.parent;if(b&&b!==h){r(b);const y=e.seen.get(b);if(y!=null&&y.schema.$ref&&(f.$ref=y.schema.$ref,y.def))for(const _ in f)_==="$ref"||_==="allOf"||_ in y.def&&JSON.stringify(f[_])===JSON.stringify(y.def[_])&&delete f[_]}e.override({zodSchema:u,jsonSchema:f,path:c.path??[]})};for(const u of[...e.seen.entries()].reverse())r(u[0]);const a={};if(e.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":e.target,(l=e.external)!=null&&l.uri){const u=(o=e.external.registry.get(t))==null?void 0:o.id;if(!u)throw new Error("Schema is missing an `id` property");a.$id=e.external.uri(u)}Object.assign(a,n.def??n.schema);const i=((s=e.external)==null?void 0:s.defs)??{};for(const u of e.seen.entries()){const c=u[1];c.def&&c.defId&&(i[c.defId]=c.def)}e.external||Object.keys(i).length>0&&(e.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{const u=JSON.parse(JSON.stringify(a));return Object.defineProperty(u,"~standard",{value:{...t["~standard"],jsonSchema:{input:bc(t,"input",e.processors),output:bc(t,"output",e.processors)}},enumerable:!1,writable:!1}),u}catch{throw new Error("Error converting schema to JSON.")}}function kt(e,t){const n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);const r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return kt(r.element,n);if(r.type==="set")return kt(r.valueType,n);if(r.type==="lazy")return kt(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return kt(r.innerType,n);if(r.type==="intersection")return kt(r.left,n)||kt(r.right,n);if(r.type==="record"||r.type==="map")return kt(r.keyType,n)||kt(r.valueType,n);if(r.type==="pipe")return kt(r.in,n)||kt(r.out,n);if(r.type==="object"){for(const a in r.shape)if(kt(r.shape[a],n))return!0;return!1}if(r.type==="union"){for(const a of r.options)if(kt(a,n))return!0;return!1}if(r.type==="tuple"){for(const a of r.items)if(kt(a,n))return!0;return!!(r.rest&&kt(r.rest,n))}return!1}const GR=(e,t={})=>n=>{const r=__({...n,processors:t});return rt(e,r),w_(r,e),E_(r,e)},bc=(e,t,n={})=>r=>{const{libraryOptions:a,target:i}=r??{},l=__({...a??{},target:i,io:t,processors:n});return rt(e,l),w_(l,e),E_(l,e)},VR={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},QR=(e,t,n,r)=>{const a=n;a.type="string";const{minimum:i,maximum:l,format:o,patterns:s,contentEncoding:u}=e._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof l=="number"&&(a.maxLength=l),o&&(a.format=VR[o]??o,a.format===""&&delete a.format,o==="time"&&delete a.format),u&&(a.contentEncoding=u),s&&s.size>0){const c=[...s];c.length===1?a.pattern=c[0].source:c.length>1&&(a.allOf=[...c.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},YR=(e,t,n,r)=>{const a=n,{minimum:i,maximum:l,format:o,multipleOf:s,exclusiveMaximum:u,exclusiveMinimum:c}=e._zod.bag;typeof o=="string"&&o.includes("int")?a.type="integer":a.type="number",typeof c=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.minimum=c,a.exclusiveMinimum=!0):a.exclusiveMinimum=c),typeof i=="number"&&(a.minimum=i,typeof c=="number"&&t.target!=="draft-04"&&(c>=i?delete a.minimum:delete a.exclusiveMinimum)),typeof u=="number"&&(t.target==="draft-04"||t.target==="openapi-3.0"?(a.maximum=u,a.exclusiveMaximum=!0):a.exclusiveMaximum=u),typeof l=="number"&&(a.maximum=l,typeof u=="number"&&t.target!=="draft-04"&&(u<=l?delete a.maximum:delete a.exclusiveMaximum)),typeof s=="number"&&(a.multipleOf=s)},XR=(e,t,n,r)=>{n.type="boolean"},JR=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},KR=(e,t,n,r)=>{n.not={}},WR=(e,t,n,r)=>{},eM=(e,t,n,r)=>{},tM=(e,t,n,r)=>{const a=e._zod.def,i=n_(a.entries);i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),n.enum=i},nM=(e,t,n,r)=>{const a=e._zod.def,i=[];for(const l of a.values)if(l===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof l=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");i.push(Number(l))}else i.push(l);if(i.length!==0)if(i.length===1){const l=i[0];n.type=l===null?"null":typeof l,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[l]:n.const=l}else i.every(l=>typeof l=="number")&&(n.type="number"),i.every(l=>typeof l=="string")&&(n.type="string"),i.every(l=>typeof l=="boolean")&&(n.type="boolean"),i.every(l=>l===null)&&(n.type="null"),n.enum=i},rM=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},aM=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},iM=(e,t,n,r)=>{const a=n,i=e._zod.def,{minimum:l,maximum:o}=e._zod.bag;typeof l=="number"&&(a.minItems=l),typeof o=="number"&&(a.maxItems=o),a.type="array",a.items=rt(i.element,t,{...r,path:[...r.path,"items"]})},lM=(e,t,n,r)=>{var u;const a=n,i=e._zod.def;a.type="object",a.properties={};const l=i.shape;for(const c in l)a.properties[c]=rt(l[c],t,{...r,path:[...r.path,"properties",c]});const o=new Set(Object.keys(l)),s=new Set([...o].filter(c=>{const f=i.shape[c]._zod;return t.io==="input"?f.optin===void 0:f.optout===void 0}));s.size>0&&(a.required=Array.from(s)),((u=i.catchall)==null?void 0:u._zod.def.type)==="never"?a.additionalProperties=!1:i.catchall?i.catchall&&(a.additionalProperties=rt(i.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(a.additionalProperties=!1)},oM=(e,t,n,r)=>{const a=e._zod.def,i=a.inclusive===!1,l=a.options.map((o,s)=>rt(o,t,{...r,path:[...r.path,i?"oneOf":"anyOf",s]}));i?n.oneOf=l:n.anyOf=l},sM=(e,t,n,r)=>{const a=e._zod.def,i=rt(a.left,t,{...r,path:[...r.path,"allOf",0]}),l=rt(a.right,t,{...r,path:[...r.path,"allOf",1]}),o=u=>"allOf"in u&&Object.keys(u).length===1,s=[...o(i)?i.allOf:[i],...o(l)?l.allOf:[l]];n.allOf=s},uM=(e,t,n,r)=>{const a=n,i=e._zod.def;a.type="object";const l=i.keyType,o=l._zod.bag,s=o==null?void 0:o.patterns;if(i.mode==="loose"&&s&&s.size>0){const c=rt(i.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});a.patternProperties={};for(const f of s)a.patternProperties[f.source]=c}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(a.propertyNames=rt(i.keyType,t,{...r,path:[...r.path,"propertyNames"]})),a.additionalProperties=rt(i.valueType,t,{...r,path:[...r.path,"additionalProperties"]});const u=l._zod.values;if(u){const c=[...u].filter(f=>typeof f=="string"||typeof f=="number");c.length>0&&(a.required=c)}},cM=(e,t,n,r)=>{const a=e._zod.def,i=rt(a.innerType,t,r),l=t.seen.get(e);t.target==="openapi-3.0"?(l.ref=a.innerType,n.nullable=!0):n.anyOf=[i,{type:"null"}]},fM=(e,t,n,r)=>{const a=e._zod.def;rt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},dM=(e,t,n,r)=>{const a=e._zod.def;rt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.default=JSON.parse(JSON.stringify(a.defaultValue))},hM=(e,t,n,r)=>{const a=e._zod.def;rt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},pM=(e,t,n,r)=>{const a=e._zod.def;rt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType;let l;try{l=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=l},mM=(e,t,n,r)=>{const a=e._zod.def,i=t.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;rt(i,t,r);const l=t.seen.get(e);l.ref=i},gM=(e,t,n,r)=>{const a=e._zod.def;rt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType,n.readOnly=!0},C_=(e,t,n,r)=>{const a=e._zod.def;rt(a.innerType,t,r);const i=t.seen.get(e);i.ref=a.innerType},yM=(e,t,n,r)=>{const a=e._zod.innerType;rt(a,t,r);const i=t.seen.get(e);i.ref=a},vM=R("ZodISODateTime",(e,t)=>{f2.init(e,t),Xe.init(e,t)});function bM(e){return SR(vM,e)}const SM=R("ZodISODate",(e,t)=>{d2.init(e,t),Xe.init(e,t)});function xM(e){return xR(SM,e)}const _M=R("ZodISOTime",(e,t)=>{h2.init(e,t),Xe.init(e,t)});function wM(e){return _R(_M,e)}const EM=R("ZodISODuration",(e,t)=>{p2.init(e,t),Xe.init(e,t)});function CM(e){return wR(EM,e)}const TM=(e,t)=>{l_.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>rz(e,n)},flatten:{value:n=>nz(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,$h,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,$h,2)}},isEmpty:{get(){return e.issues.length===0}}})},On=R("ZodError",TM,{Parent:Error}),AM=wm(On),kM=Em(On),OM=Jc(On),NM=Kc(On),zM=lz(On),RM=oz(On),MM=sz(On),jM=uz(On),DM=cz(On),LM=fz(On),UM=dz(On),PM=hz(On),Be=R("ZodType",(e,t)=>(Pe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:bc(e,"input"),output:bc(e,"output")}}),e.toJSONSchema=GR(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.check=(...n)=>e.clone(Oa(t,{checks:[...t.checks??[],...n.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0}),e.with=e.check,e.clone=(n,r)=>Na(e,n,r),e.brand=()=>e,e.register=(n,r)=>(n.add(e,r),e),e.parse=(n,r)=>AM(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>OM(e,n,r),e.parseAsync=async(n,r)=>kM(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>NM(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>zM(e,n,r),e.decode=(n,r)=>RM(e,n,r),e.encodeAsync=async(n,r)=>MM(e,n,r),e.decodeAsync=async(n,r)=>jM(e,n,r),e.safeEncode=(n,r)=>DM(e,n,r),e.safeDecode=(n,r)=>LM(e,n,r),e.safeEncodeAsync=async(n,r)=>UM(e,n,r),e.safeDecodeAsync=async(n,r)=>PM(e,n,r),e.refine=(n,r)=>e.check(Uj(n,r)),e.superRefine=n=>e.check(Pj(n)),e.overwrite=n=>e.check(Ql(n)),e.optional=()=>yv(e),e.exactOptional=()=>_j(e),e.nullable=()=>vv(e),e.nullish=()=>yv(vv(e)),e.nonoptional=n=>kj(e,n),e.array=()=>We(e),e.or=n=>Kn([e,n]),e.and=n=>gj(e,n),e.transform=n=>bv(e,Sj(n)),e.default=n=>Cj(e,n),e.prefault=n=>Aj(e,n),e.catch=n=>Nj(e,n),e.pipe=n=>bv(e,n),e.readonly=()=>Mj(e),e.describe=n=>{const r=e.clone();return So.add(r,{description:n}),r},Object.defineProperty(e,"description",{get(){var n;return(n=So.get(e))==null?void 0:n.description},configurable:!0}),e.meta=(...n)=>{if(n.length===0)return So.get(e);const r=e.clone();return So.add(r,n[0]),r},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=n=>n(e),e)),T_=R("_ZodString",(e,t)=>{Cm.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(r,a,i)=>QR(e,r,a);const n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,e.regex=(...r)=>e.check(zR(...r)),e.includes=(...r)=>e.check(jR(...r)),e.startsWith=(...r)=>e.check(DR(...r)),e.endsWith=(...r)=>e.check(LR(...r)),e.min=(...r)=>e.check(vc(...r)),e.max=(...r)=>e.check(S_(...r)),e.length=(...r)=>e.check(x_(...r)),e.nonempty=(...r)=>e.check(vc(1,...r)),e.lowercase=r=>e.check(RR(r)),e.uppercase=r=>e.check(MR(r)),e.trim=()=>e.check(PR()),e.normalize=(...r)=>e.check(UR(...r)),e.toLowerCase=()=>e.check(BR()),e.toUpperCase=()=>e.check($R()),e.slugify=()=>e.check(IR())}),BM=R("ZodString",(e,t)=>{Cm.init(e,t),T_.init(e,t),e.email=n=>e.check(W2($M,n)),e.url=n=>e.check(aR(IM,n)),e.jwt=n=>e.check(bR(nj,n)),e.emoji=n=>e.check(iR(ZM,n)),e.guid=n=>e.check(fv(mv,n)),e.uuid=n=>e.check(eR(Ks,n)),e.uuidv4=n=>e.check(tR(Ks,n)),e.uuidv6=n=>e.check(nR(Ks,n)),e.uuidv7=n=>e.check(rR(Ks,n)),e.nanoid=n=>e.check(lR(HM,n)),e.guid=n=>e.check(fv(mv,n)),e.cuid=n=>e.check(oR(FM,n)),e.cuid2=n=>e.check(sR(qM,n)),e.ulid=n=>e.check(uR(GM,n)),e.base64=n=>e.check(gR(WM,n)),e.base64url=n=>e.check(yR(ej,n)),e.xid=n=>e.check(cR(VM,n)),e.ksuid=n=>e.check(fR(QM,n)),e.ipv4=n=>e.check(dR(YM,n)),e.ipv6=n=>e.check(hR(XM,n)),e.cidrv4=n=>e.check(pR(JM,n)),e.cidrv6=n=>e.check(mR(KM,n)),e.e164=n=>e.check(vR(tj,n)),e.datetime=n=>e.check(bM(n)),e.date=n=>e.check(xM(n)),e.time=n=>e.check(wM(n)),e.duration=n=>e.check(CM(n))});function M(e){return K2(BM,e)}const Xe=R("ZodStringFormat",(e,t)=>{Ve.init(e,t),T_.init(e,t)}),$M=R("ZodEmail",(e,t)=>{n2.init(e,t),Xe.init(e,t)}),mv=R("ZodGUID",(e,t)=>{e2.init(e,t),Xe.init(e,t)}),Ks=R("ZodUUID",(e,t)=>{t2.init(e,t),Xe.init(e,t)}),IM=R("ZodURL",(e,t)=>{r2.init(e,t),Xe.init(e,t)}),ZM=R("ZodEmoji",(e,t)=>{a2.init(e,t),Xe.init(e,t)}),HM=R("ZodNanoID",(e,t)=>{i2.init(e,t),Xe.init(e,t)}),FM=R("ZodCUID",(e,t)=>{l2.init(e,t),Xe.init(e,t)}),qM=R("ZodCUID2",(e,t)=>{o2.init(e,t),Xe.init(e,t)}),GM=R("ZodULID",(e,t)=>{s2.init(e,t),Xe.init(e,t)}),VM=R("ZodXID",(e,t)=>{u2.init(e,t),Xe.init(e,t)}),QM=R("ZodKSUID",(e,t)=>{c2.init(e,t),Xe.init(e,t)}),YM=R("ZodIPv4",(e,t)=>{m2.init(e,t),Xe.init(e,t)}),XM=R("ZodIPv6",(e,t)=>{g2.init(e,t),Xe.init(e,t)}),JM=R("ZodCIDRv4",(e,t)=>{y2.init(e,t),Xe.init(e,t)}),KM=R("ZodCIDRv6",(e,t)=>{v2.init(e,t),Xe.init(e,t)}),WM=R("ZodBase64",(e,t)=>{b2.init(e,t),Xe.init(e,t)}),ej=R("ZodBase64URL",(e,t)=>{x2.init(e,t),Xe.init(e,t)}),tj=R("ZodE164",(e,t)=>{_2.init(e,t),Xe.init(e,t)}),nj=R("ZodJWT",(e,t)=>{E2.init(e,t),Xe.init(e,t)}),A_=R("ZodNumber",(e,t)=>{g_.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(r,a,i)=>YR(e,r,a),e.gt=(r,a)=>e.check(hv(r,a)),e.gte=(r,a)=>e.check(Jf(r,a)),e.min=(r,a)=>e.check(Jf(r,a)),e.lt=(r,a)=>e.check(dv(r,a)),e.lte=(r,a)=>e.check(Xf(r,a)),e.max=(r,a)=>e.check(Xf(r,a)),e.int=r=>e.check(gv(r)),e.safe=r=>e.check(gv(r)),e.positive=r=>e.check(hv(0,r)),e.nonnegative=r=>e.check(Jf(0,r)),e.negative=r=>e.check(dv(0,r)),e.nonpositive=r=>e.check(Xf(0,r)),e.multipleOf=(r,a)=>e.check(pv(r,a)),e.step=(r,a)=>e.check(pv(r,a)),e.finite=()=>e;const n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function ft(e){return ER(A_,e)}const rj=R("ZodNumberFormat",(e,t)=>{C2.init(e,t),A_.init(e,t)});function gv(e){return CR(rj,e)}const aj=R("ZodBoolean",(e,t)=>{T2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>XR(e,n,r)});function vn(e){return TR(aj,e)}const ij=R("ZodNull",(e,t)=>{A2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>JR(e,n,r)});function lj(e){return AR(ij,e)}const oj=R("ZodAny",(e,t)=>{k2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>WR()});function sj(){return kR(oj)}const uj=R("ZodUnknown",(e,t)=>{O2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>eM()});function Vn(){return OR(uj)}const cj=R("ZodNever",(e,t)=>{N2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>KR(e,n,r)});function fj(e){return NR(cj,e)}const dj=R("ZodArray",(e,t)=>{z2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>iM(e,n,r,a),e.element=t.element,e.min=(n,r)=>e.check(vc(n,r)),e.nonempty=n=>e.check(vc(1,n)),e.max=(n,r)=>e.check(S_(n,r)),e.length=(n,r)=>e.check(x_(n,r)),e.unwrap=()=>e.element});function We(e,t){return ZR(dj,e,t)}const hj=R("ZodObject",(e,t)=>{M2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>lM(e,n,r,a),ve(e,"shape",()=>t.shape),e.keyof=()=>je(Object.keys(e._zod.def.shape)),e.catchall=n=>e.clone({...e._zod.def,catchall:n}),e.passthrough=()=>e.clone({...e._zod.def,catchall:Vn()}),e.loose=()=>e.clone({...e._zod.def,catchall:Vn()}),e.strict=()=>e.clone({...e._zod.def,catchall:fj()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=n=>JN(e,n),e.safeExtend=n=>KN(e,n),e.merge=n=>WN(e,n),e.pick=n=>YN(e,n),e.omit=n=>XN(e,n),e.partial=(...n)=>ez(k_,e,n[0]),e.required=(...n)=>tz(O_,e,n[0])});function Y(e,t){const n={type:"object",shape:e??{},...W(t)};return new hj(n)}const pj=R("ZodUnion",(e,t)=>{j2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>oM(e,n,r,a),e.options=t.options});function Kn(e,t){return new pj({type:"union",options:e,...W(t)})}const mj=R("ZodIntersection",(e,t)=>{D2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>sM(e,n,r,a)});function gj(e,t){return new mj({type:"intersection",left:e,right:t})}const yj=R("ZodRecord",(e,t)=>{L2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>uM(e,n,r,a),e.keyType=t.keyType,e.valueType=t.valueType});function va(e,t,n){return new yj({type:"record",keyType:e,valueType:t,...W(n)})}const Zh=R("ZodEnum",(e,t)=>{U2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(r,a,i)=>tM(e,r,a),e.enum=t.entries,e.options=Object.values(t.entries);const n=new Set(Object.keys(t.entries));e.extract=(r,a)=>{const i={};for(const l of r)if(n.has(l))i[l]=t.entries[l];else throw new Error(`Key ${l} not found in enum`);return new Zh({...t,checks:[],...W(a),entries:i})},e.exclude=(r,a)=>{const i={...t.entries};for(const l of r)if(n.has(l))delete i[l];else throw new Error(`Key ${l} not found in enum`);return new Zh({...t,checks:[],...W(a),entries:i})}});function je(e,t){const n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Zh({type:"enum",entries:n,...W(t)})}const vj=R("ZodLiteral",(e,t)=>{P2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>nM(e,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function Tm(e,t){return new vj({type:"literal",values:Array.isArray(e)?e:[e],...W(t)})}const bj=R("ZodTransform",(e,t)=>{B2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>aM(e,n),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new e_(e.constructor.name);n.addIssue=i=>{if(typeof i=="string")n.issues.push(ns(i,n.value,t));else{const l=i;l.fatal&&(l.continue=!1),l.code??(l.code="custom"),l.input??(l.input=n.value),l.inst??(l.inst=e),n.issues.push(ns(l))}};const a=t.transform(n.value,n);return a instanceof Promise?a.then(i=>(n.value=i,n)):(n.value=a,n)}});function Sj(e){return new bj({type:"transform",transform:e})}const k_=R("ZodOptional",(e,t)=>{b_.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>C_(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function yv(e){return new k_({type:"optional",innerType:e})}const xj=R("ZodExactOptional",(e,t)=>{$2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>C_(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function _j(e){return new xj({type:"optional",innerType:e})}const wj=R("ZodNullable",(e,t)=>{I2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>cM(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function vv(e){return new wj({type:"nullable",innerType:e})}const Ej=R("ZodDefault",(e,t)=>{Z2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>dM(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Cj(e,t){return new Ej({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():a_(t)}})}const Tj=R("ZodPrefault",(e,t)=>{H2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>hM(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Aj(e,t){return new Tj({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():a_(t)}})}const O_=R("ZodNonOptional",(e,t)=>{F2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>fM(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function kj(e,t){return new O_({type:"nonoptional",innerType:e,...W(t)})}const Oj=R("ZodCatch",(e,t)=>{q2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>pM(e,n,r,a),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Nj(e,t){return new Oj({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}const zj=R("ZodPipe",(e,t)=>{G2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>mM(e,n,r,a),e.in=t.in,e.out=t.out});function bv(e,t){return new zj({type:"pipe",in:e,out:t})}const Rj=R("ZodReadonly",(e,t)=>{V2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>gM(e,n,r,a),e.unwrap=()=>e._zod.def.innerType});function Mj(e){return new Rj({type:"readonly",innerType:e})}const jj=R("ZodLazy",(e,t)=>{Q2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>yM(e,n,r,a),e.unwrap=()=>e._zod.def.getter()});function Dj(e){return new jj({type:"lazy",getter:e})}const Lj=R("ZodCustom",(e,t)=>{Y2.init(e,t),Be.init(e,t),e._zod.processJSONSchema=(n,r,a)=>rM(e,n)});function Uj(e,t={}){return HR(Lj,e,t)}function Pj(e){return FR(e)}var N_=Kn([M(),ft(),vn(),lj(),Y({$state:M()})]);Kn([M(),Y({$state:M()})]);Kn([ft(),Y({$state:M()})]);Kn([vn(),Y({$state:M()})]);function z_(e,t){if(e!=null)return typeof e=="object"&&"$state"in e?Rt(t,e.$state):e}function Bj(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function R_(e){return(e.startsWith("/")?e.slice(1).split("/"):e.split("/")).map(Bj)}function Rt(e,t){if(!t||t==="/")return e;const n=R_(t);let r=e;for(const a of n){if(r==null)return;if(Array.isArray(r)){const i=parseInt(a,10);r=r[i]}else if(typeof r=="object")r=r[a];else return}return r}function Sv(e,t,n){const r=R_(t);if(r.length===0)return e;const a={...e};let i=a;for(let o=0;o<r.length-1;o++){const s=r[o],u=i[s];if(Array.isArray(u))i[s]=[...u];else if(u!==null&&typeof u=="object")i[s]={...u};else{const c=r[o+1];i[s]=c!==void 0&&/^\d+$/.test(c)?[]:{}}i=i[s]}const l=r[r.length-1];return Array.isArray(i)?l==="-"?i.push(n):i[parseInt(l,10)]=n:i[l]=n,a}function $j(e={}){let t={...e};const n=new Set;function r(){for(const a of n)a()}return{get(a){return Rt(t,a)},set(a,i){Rt(t,a)!==i&&(t=Sv(t,a,i),r())},update(a){let i=!1,l=t;for(const[o,s]of Object.entries(a))Rt(l,o)!==s&&(l=Sv(l,o,s),i=!0);i&&(t=l,r())},getSnapshot(){return t},getServerSnapshot(){return t},subscribe(a){return n.add(a),()=>{n.delete(a)}}}}var Ij=20;function Am(e,t="",n=0,r,a){const i=r??new Set,l={};for(const[o,s]of Object.entries(e)){const u=`${t}/${o}`;n<Ij&&s!==null&&typeof s=="object"&&!Array.isArray(s)&&Object.getPrototypeOf(s)===Object.prototype&&!i.has(s)?(i.add(s),Object.assign(l,Am(s,u,n+1,i))):l[u]=s}return l}var Ws=Kn([ft(),Y({$state:M()})]),km={eq:Vn().optional(),neq:Vn().optional(),gt:Ws.optional(),gte:Ws.optional(),lt:Ws.optional(),lte:Ws.optional(),not:Tm(!0).optional()},Zj=Y({$state:M(),...km}),Hj=Y({$item:M(),...km}),Fj=Y({$index:Tm(!0),...km}),xv=Kn([Zj,Hj,Fj]),Hh=Dj(()=>Kn([vn(),xv,We(xv),Y({$and:We(Hh)}),Y({$or:We(Hh)})]));function Ci(e,t){return typeof e=="object"&&e!==null&&"$state"in e&&typeof e.$state=="string"?Rt(t.stateModel,e.$state):e}function qj(e){return"$item"in e}function Gj(e){return"$index"in e}function Vj(e,t){return Gj(e)?t.repeatIndex:qj(e)?t.repeatItem===void 0?void 0:e.$item===""?t.repeatItem:Rt(t.repeatItem,e.$item):Rt(t.stateModel,e.$state)}function _v(e,t){const n=Vj(e,t);let r;if(e.eq!==void 0){const a=Ci(e.eq,t);r=n===a}else if(e.neq!==void 0){const a=Ci(e.neq,t);r=n!==a}else if(e.gt!==void 0){const a=Ci(e.gt,t);r=typeof n=="number"&&typeof a=="number"?n>a:!1}else if(e.gte!==void 0){const a=Ci(e.gte,t);r=typeof n=="number"&&typeof a=="number"?n>=a:!1}else if(e.lt!==void 0){const a=Ci(e.lt,t);r=typeof n=="number"&&typeof a=="number"?n<a:!1}else if(e.lte!==void 0){const a=Ci(e.lte,t);r=typeof n=="number"&&typeof a=="number"?n<=a:!1}else r=!!n;return e.not===!0?!r:r}function Qj(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&"$and"in e}function Yj(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)&&"$or"in e}function jl(e,t){return e===void 0?!0:typeof e=="boolean"?e:Array.isArray(e)?e.every(n=>_v(n,t)):Qj(e)?e.$and.every(n=>jl(n,t)):Yj(e)?e.$or.some(n=>jl(n,t)):_v(e,t)}function Xj(e){return typeof e=="object"&&e!==null&&"$state"in e&&typeof e.$state=="string"}function M_(e){return typeof e=="object"&&e!==null&&"$item"in e&&typeof e.$item=="string"}function j_(e){return typeof e=="object"&&e!==null&&"$index"in e&&e.$index===!0}function D_(e){return typeof e=="object"&&e!==null&&"$bindState"in e&&typeof e.$bindState=="string"}function L_(e){return typeof e=="object"&&e!==null&&"$bindItem"in e&&typeof e.$bindItem=="string"}function Jj(e){return typeof e=="object"&&e!==null&&"$cond"in e&&"$then"in e&&"$else"in e}function Kj(e){return typeof e=="object"&&e!==null&&"$computed"in e&&typeof e.$computed=="string"}function Wj(e){return typeof e=="object"&&e!==null&&"$template"in e&&typeof e.$template=="string"}var eD=100,Kf=new Set,tD=100,Wf=new Set;function Om(e,t){if(t.repeatBasePath==null){console.warn(`$bindItem used outside repeat scope: "${e}"`);return}return e===""?t.repeatBasePath:t.repeatBasePath+"/"+e}function Ha(e,t){var n;if(e==null)return e;if(Xj(e))return Rt(t.stateModel,e.$state);if(M_(e))return t.repeatItem===void 0?void 0:e.$item===""?t.repeatItem:Rt(t.repeatItem,e.$item);if(j_(e))return t.repeatIndex;if(D_(e))return Rt(t.stateModel,e.$bindState);if(L_(e)){const r=Om(e.$bindItem,t);return r===void 0?void 0:Rt(t.stateModel,r)}if(Jj(e)){const r=jl(e.$cond,t);return Ha(r?e.$then:e.$else,t)}if(Kj(e)){const r=(n=t.functions)==null?void 0:n[e.$computed];if(!r){Kf.has(e.$computed)||(Kf.size<eD&&Kf.add(e.$computed),console.warn(`Unknown $computed function: "${e.$computed}"`));return}const a={};if(e.args)for(const[i,l]of Object.entries(e.args))a[i]=Ha(l,t);return r(a)}if(Wj(e))return e.$template.replace(/\$\{([^}]+)\}/g,(r,a)=>{let i=a;i.startsWith("/")||(Wf.has(i)||(Wf.size<tD&&Wf.add(i),console.warn(`$template path "${i}" should be a JSON Pointer starting with "/". Automatically resolving as "/${i}".`)),i="/"+i);const l=Rt(t.stateModel,i);return l!=null?String(l):""});if(Array.isArray(e))return e.map(r=>Ha(r,t));if(typeof e=="object"){const r={};for(const[a,i]of Object.entries(e))r[a]=Ha(i,t);return r}return e}function nD(e,t){const n={};for(const[r,a]of Object.entries(e))n[r]=Ha(a,t);return n}function rD(e,t){let n;for(const[r,a]of Object.entries(e))if(D_(a))n||(n={}),n[r]=a.$bindState;else if(L_(a)){const i=Om(a.$bindItem,t);i!==void 0&&(n||(n={}),n[r]=i)}return n}function wv(e,t){return M_(e)?Om(e.$item,t):j_(e)?t.repeatIndex:Ha(e,t)}var aD=Y({title:M(),message:M(),confirmLabel:M().optional(),cancelLabel:M().optional(),variant:je(["default","danger"]).optional()}),iD=Kn([Y({navigate:M()}),Y({set:va(M(),Vn())}),Y({action:M()})]),lD=Kn([Y({set:va(M(),Vn())}),Y({action:M()})]);Y({action:M(),params:va(M(),N_).optional(),confirm:aD.optional(),onSuccess:iD.optional(),onError:lD.optional(),preventDefault:vn().optional()});function oD(e,t){const n={};if(e.params)for(const[a,i]of Object.entries(e.params))n[a]=z_(i,t);let r=e.confirm;return r&&(r={...r,message:Ev(r.message,t),title:Ev(r.title,t)}),{action:e.action,params:n,confirm:r,onSuccess:e.onSuccess,onError:e.onError}}function Ev(e,t){return e.replace(/\$\{([^}]+)\}/g,(n,r)=>{const a=z_({$state:r},t);return String(a??"")})}async function Cv(e){const{action:t,handler:n,setState:r,navigate:a,executeAction:i}=e;try{if(await n(t.params),t.onSuccess)if("navigate"in t.onSuccess&&a)a(t.onSuccess.navigate);else if("set"in t.onSuccess)for(const[l,o]of Object.entries(t.onSuccess.set))r(l,o);else"action"in t.onSuccess&&i&&await i(t.onSuccess.action)}catch(l){if(t.onError)if("set"in t.onError)for(const[o,s]of Object.entries(t.onError.set)){const u=typeof s=="string"&&s==="$error.message"?l.message:s;r(o,u)}else"action"in t.onError&&i&&await i(t.onError.action);else throw l}}var sD=Y({type:M(),args:va(M(),N_).optional(),message:M()});Y({checks:We(sD).optional(),validateOn:je(["change","blur","submit"]).optional(),enabled:Hh.optional()});var Tv=(e,t)=>{const n=t==null?void 0:t.other;return e===n},uD={required:e=>e==null?!1:typeof e=="string"?e.trim().length>0:Array.isArray(e)?e.length>0:!0,email:e=>typeof e!="string"?!1:/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),minLength:(e,t)=>{if(typeof e!="string")return!1;const n=t==null?void 0:t.min;return typeof n!="number"?!1:e.length>=n},maxLength:(e,t)=>{if(typeof e!="string")return!1;const n=t==null?void 0:t.max;return typeof n!="number"?!1:e.length<=n},pattern:(e,t)=>{if(typeof e!="string")return!1;const n=t==null?void 0:t.pattern;if(typeof n!="string")return!1;try{return new RegExp(n).test(e)}catch{return!1}},min:(e,t)=>{if(typeof e!="number")return!1;const n=t==null?void 0:t.min;return typeof n!="number"?!1:e>=n},max:(e,t)=>{if(typeof e!="number")return!1;const n=t==null?void 0:t.max;return typeof n!="number"?!1:e<=n},numeric:e=>typeof e=="number"?!isNaN(e):typeof e=="string"?!isNaN(parseFloat(e)):!1,url:e=>{if(typeof e!="string")return!1;try{return new URL(e),!0}catch{return!1}},matches:Tv,equalTo:Tv,lessThan:(e,t)=>{const n=t==null?void 0:t.other;if(e==null||n==null||e===""||n==="")return!1;if(typeof e=="number"&&typeof n=="number"||typeof e=="string"&&typeof n=="string")return e<n;const r=Number(e),a=Number(n);return!isNaN(r)&&!isNaN(a)?r<a:!1},greaterThan:(e,t)=>{const n=t==null?void 0:t.other;if(e==null||n==null||e===""||n==="")return!1;if(typeof e=="number"&&typeof n=="number"||typeof e=="string"&&typeof n=="string")return e>n;const r=Number(e),a=Number(n);return!isNaN(r)&&!isNaN(a)?r>a:!1},requiredIf:(e,t)=>(t==null?void 0:t.field)?e==null?!1:typeof e=="string"?e.trim().length>0:Array.isArray(e)?e.length>0:!0:!0};function cD(e,t){const{value:n,stateModel:r,customFunctions:a}=t,i={};if(e.args)for(const[s,u]of Object.entries(e.args))i[s]=Ha(u,{stateModel:r});const l=uD[e.type]??(a==null?void 0:a[e.type]);if(!l)return console.warn(`Unknown validation function: ${e.type}`),{type:e.type,valid:!0,message:e.message};const o=l(n,i);return{type:e.type,valid:o,message:e.message}}function fD(e,t){const n=[],r=[];if(e.enabled&&!jl(e.enabled,{stateModel:t.stateModel}))return{valid:!0,errors:[],checks:[]};if(e.checks)for(const a of e.checks){const i=cD(a,t);n.push(i),i.valid||r.push(i.message)}return{valid:r.length===0,errors:r,checks:n}}var dD=["patch"];function hD(e){var t;return(t=e==null?void 0:e.modes)!=null&&t.length?e.modes:dD}function pD(){return["PATCH MODE (RFC 6902 JSON Patch):","Output one JSON object per line. Each line is a patch operation.",'- Add: {"op":"add","path":"/elements/new-key","value":{...}}','- Replace: {"op":"replace","path":"/elements/existing-key","value":{...}}','- Remove: {"op":"remove","path":"/elements/old-key"}',"Only output patches for what needs to change."].join(`
|
|
115
|
+
`)}function mD(){return["MERGE MODE (RFC 7396 JSON Merge Patch):","Output a single JSON object on one line with __json_edit set to true.","Include only the keys that changed. Unmentioned keys are preserved.","Set a key to null to delete it.","","Example (update a title and add an element):",'{"__json_edit":true,"elements":{"main":{"props":{"title":"New Title"}},"new-el":{"type":"Card","props":{},"children":[]}}}',"","Example (delete an element):",'{"__json_edit":true,"elements":{"old-widget":null}}'].join(`
|
|
116
|
+
`)}function gD(){return["DIFF MODE (unified diff):","Output a unified diff inside a ```diff code fence.","The diff applies against the JSON-serialized current spec.","","Example:","```diff","--- a/spec.json","+++ b/spec.json","@@ -3,1 +3,1 @@",'- "title": "Login"','+ "title": "Welcome Back"',"```"].join(`
|
|
117
|
+
`)}function yD(e){if(e.length===1)return"";const t=["Choose the best edit strategy for the requested change:"];return e.includes("patch")&&t.push("- PATCH: best for precise, targeted single-field updates"),e.includes("merge")&&t.push("- MERGE: best for structural changes (add/remove elements, reparent children, update multiple props at once)"),e.includes("diff")&&t.push("- DIFF: best for small text-level changes when you can see the exact lines to change"),t.join(`
|
|
118
|
+
`)}function vD(e,t){const n=hD(e),r=[];r.push("EDITING EXISTING SPECS:"),r.push("");const a=yD(n);a&&(r.push(a),r.push(""));for(const i of n){switch(i){case"patch":r.push(pD());break;case"merge":r.push(mD());break;case"diff":r.push(gD());break}r.push("")}return r.join(`
|
|
119
|
+
`)}function bD(){return{string:()=>({kind:"string"}),number:()=>({kind:"number"}),boolean:()=>({kind:"boolean"}),array:e=>({kind:"array",inner:e}),object:e=>({kind:"object",inner:e}),record:e=>({kind:"record",inner:e}),any:()=>({kind:"any"}),zod:()=>({kind:"zod"}),ref:e=>({kind:"ref",inner:e}),propsOf:e=>({kind:"propsOf",inner:e}),map:e=>({kind:"map",inner:e}),optional:()=>({optional:!0})}}function SD(e,t){const n=bD();return{definition:e(n),promptTemplate:t==null?void 0:t.promptTemplate,defaultRules:t==null?void 0:t.defaultRules,builtInActions:t==null?void 0:t.builtInActions,createCatalog(a){return xD(this,a)}}}function xD(e,t){const n=t.components,r=t.actions,a=n?Object.keys(n):[],i=r?Object.keys(r):[],l=_D(e.definition,t);return{schema:e,data:t,componentNames:a,actionNames:i,prompt(o={}){return CD(this,o)},jsonSchema(o={}){return Ur(l,o.strict??!1)},validate(o){const s=l.safeParse(o);return s.success?{success:!0,data:s.data}:{success:!1,error:s.error}},zodSchema(){return l},get _specType(){throw new Error("_specType is only for type inference")}}}function _D(e,t){return Nu(e.spec,t)}function Nu(e,t){switch(e.kind){case"string":return M();case"number":return ft();case"boolean":return vn();case"any":return sj();case"array":{const n=Nu(e.inner,t);return We(n)}case"object":{const n=e.inner,r={};for(const[a,i]of Object.entries(n)){let l=Nu(i,t);i.optional&&(l=l.optional()),r[a]=l}return Y(r)}case"record":{const n=Nu(e.inner,t);return va(M(),n)}case"ref":{const n=e.inner,r=wD(n,t);return r.length===0?M():r.length===1?Tm(r[0]):je(r)}case"propsOf":{const n=e.inner,r=ED(n,t);return r.length===0?va(M(),Vn()):r.length===1?r[0]:va(M(),Vn())}default:return Vn()}}function wD(e,t){const n=e.split(".");let r={catalog:t};for(const a of n)if(r&&typeof r=="object")r=r[a];else return[];return r&&typeof r=="object"?Object.keys(r):[]}function ED(e,t){const n=e.split(".");let r={catalog:t};for(const a of n)if(r&&typeof r=="object")r=r[a];else return[];return r&&typeof r=="object"?Object.values(r).map(a=>a.props).filter(a=>a!==void 0):[]}function CD(e,t){if(e.schema.promptTemplate){const U={catalog:e.data,componentNames:e.componentNames,actionNames:e.actionNames,options:t,formatZodType:Fa};return e.schema.promptTemplate(U)}const{system:n="You are a UI generator that outputs JSON.",customRules:r=[],mode:a="standalone"}=t,i=a==="chat"?(console.warn('[json-render] mode "chat" is deprecated, use "inline" instead'),"inline"):a==="generate"?(console.warn('[json-render] mode "generate" is deprecated, use "standalone" instead'),"standalone"):a,l=[];l.push(n),l.push(""),i==="inline"?(l.push("OUTPUT FORMAT (text + JSONL, RFC 6902 JSON Patch):"),l.push("You respond conversationally. When generating UI, first write a brief explanation (1-3 sentences), then output JSONL patch lines wrapped in a ```spec code fence."),l.push("The JSONL lines use RFC 6902 JSON Patch operations to build a UI tree. Always wrap them in a ```spec fence block:"),l.push(" ```spec"),l.push(' {"op":"add","path":"/root","value":"main"}'),l.push(' {"op":"add","path":"/elements/main","value":{"type":"Card","props":{"title":"Hello"},"children":[]}}'),l.push(" ```"),l.push("If the user's message does not require a UI (e.g. a greeting or clarifying question), respond with text only — no JSONL.")):(l.push("OUTPUT FORMAT (JSONL, RFC 6902 JSON Patch):"),l.push("Output JSONL (one JSON object per line) using RFC 6902 JSON Patch operations to build a UI tree.")),l.push("Each line is a JSON patch operation (add, remove, replace). Start with /root, then stream /elements and /state patches interleaved so the UI fills in progressively as it streams."),l.push(""),l.push("Example output (each line is a separate JSON object):"),l.push("");const o=e.data.components,s=e.componentNames,u=s[0]||"Component",c=s.length>1?s[1]:u,f=o==null?void 0:o[u],d=o==null?void 0:o[c],h=f?Av(f):{},b=d?Av(d):{},y=d!=null&&d.props?TD(d.props):null,_=y?{...b,[y]:{$item:"title"}}:b,p=[JSON.stringify({op:"add",path:"/root",value:"main"}),JSON.stringify({op:"add",path:"/elements/main",value:{type:u,props:h,children:["child-1","list"]}}),JSON.stringify({op:"add",path:"/elements/child-1",value:{type:c,props:b,children:[]}}),JSON.stringify({op:"add",path:"/elements/list",value:{type:u,props:h,repeat:{statePath:"/items",key:"id"},children:["item"]}}),JSON.stringify({op:"add",path:"/elements/item",value:{type:c,props:_,children:[]}}),JSON.stringify({op:"add",path:"/state/items",value:[]}),JSON.stringify({op:"add",path:"/state/items/0",value:{id:"1",title:"First Item"}}),JSON.stringify({op:"add",path:"/state/items/1",value:{id:"2",title:"Second Item"}})].join(`
|
|
120
|
+
`);l.push(`${p}
|
|
121
|
+
|
|
122
|
+
Note: state patches appear right after the elements that use them, so the UI fills in as it streams. ONLY use component types from the AVAILABLE COMPONENTS list below.`),l.push(""),l.push("INITIAL STATE:"),l.push("Specs include a /state field to seed the state model. Components with { $bindState } or { $bindItem } read from and write to this state, and $state expressions read from it."),l.push("CRITICAL: You MUST include state patches whenever your UI displays data via $state, $bindState, $bindItem, $item, or $index expressions, or uses repeat to iterate over arrays. Without state, these references resolve to nothing and repeat lists render zero items."),l.push("Output state patches right after the elements that reference them, so the UI fills in progressively as it streams."),l.push("Stream state progressively - output one patch per array item instead of one giant blob:"),l.push(' For arrays: {"op":"add","path":"/state/posts/0","value":{"id":"1","title":"First Post",...}} then /state/posts/1, /state/posts/2, etc.'),l.push(' For scalars: {"op":"add","path":"/state/newTodoText","value":""}'),l.push(' Initialize the array first if needed: {"op":"add","path":"/state/posts","value":[]}'),l.push('When content comes from the state model, use { "$state": "/some/path" } dynamic props to display it instead of hardcoding the same value in both state and props. The state model is the single source of truth.'),l.push("Include realistic sample data in state. For blogs: 3-4 posts with titles, excerpts, authors, dates. For product lists: 3-5 items with names, prices, descriptions. Never leave arrays empty."),l.push(""),l.push("DYNAMIC LISTS (repeat field):"),l.push('Any element can have a top-level "repeat" field to render its children once per item in a state array: { "repeat": { "statePath": "/arrayPath", "key": "id" } }.'),l.push('The element itself renders once (as the container), and its children are expanded once per array item. "statePath" is the state array path. "key" is an optional field name on each item for stable React keys.'),l.push(`Example: ${JSON.stringify({type:u,props:h,repeat:{statePath:"/todos",key:"id"},children:["todo-item"]})}`),l.push('Inside children of a repeated element, use { "$item": "field" } to read a field from the current item, and { "$index": true } to get the current array index. For two-way binding to an item field use { "$bindItem": "completed" } on the appropriate prop.'),l.push("ALWAYS use the repeat field for lists backed by state arrays. NEVER hardcode individual elements for each array item."),l.push('IMPORTANT: "repeat" is a top-level field on the element (sibling of type/props/children), NOT inside props.'),l.push(""),l.push("ARRAY STATE ACTIONS:"),l.push('Use action "pushState" to append items to arrays. Params: { statePath: "/arrayPath", value: { ...item }, clearStatePath: "/inputPath" }.'),l.push('Values inside pushState can contain { "$state": "/statePath" } references to read current state (e.g. the text from an input field).'),l.push('Use "$id" inside a pushState value to auto-generate a unique ID.'),l.push('Example: on: { "press": { "action": "pushState", "params": { "statePath": "/todos", "value": { "id": "$id", "title": { "$state": "/newTodoText" }, "completed": false }, "clearStatePath": "/newTodoText" } } }'),l.push(`Use action "removeState" to remove items from arrays by index. Params: { statePath: "/arrayPath", index: N }. Inside a repeated element's children, use { "$index": true } for the current item index. Action params support the same expressions as props: { "$item": "field" } resolves to the absolute state path, { "$index": true } resolves to the index number, and { "$state": "/path" } reads a value from state.`),l.push("For lists where users can add/remove items (todos, carts, etc.), use pushState and removeState instead of hardcoding with setState."),l.push(""),l.push('IMPORTANT: State paths use RFC 6901 JSON Pointer syntax (e.g. "/todos/0/title"). Do NOT use JavaScript-style dot notation (e.g. "/todos.length" is WRONG). To generate unique IDs for new items, use "$id" instead of trying to read array length.'),l.push("");const g=o;if(g){l.push(`AVAILABLE COMPONENTS (${e.componentNames.length}):`),l.push("");for(const[U,H]of Object.entries(g)){const F=H.props?Fa(H.props):"{}",q=H.slots&&H.slots.length>0?" [accepts children]":"",V=H.events&&H.events.length>0?` [events: ${H.events.join(", ")}]`:"",ae=H.description?` - ${H.description}`:"";l.push(`- ${U}: ${F}${ae}${q}${V}`)}l.push("")}const m=e.data.actions,S=e.schema.builtInActions??[],k=m&&e.actionNames.length>0,E=S.length>0;if(k||E){l.push("AVAILABLE ACTIONS:"),l.push("");for(const U of S)l.push(`- ${U.name}: ${U.description} [built-in]`);if(k)for(const[U,H]of Object.entries(m))l.push(`- ${U}${H.description?`: ${H.description}`:""}`);l.push("")}l.push("EVENTS (the `on` field):"),l.push("Elements can have an optional `on` field to bind events to actions. The `on` field is a top-level field on the element (sibling of type/props/children), NOT inside props."),l.push('Each key in `on` is an event name (from the component\'s supported events), and the value is an action binding: `{ "action": "<actionName>", "params": { ... } }`.'),l.push(""),l.push("Example:"),l.push(` ${JSON.stringify({type:u,props:h,on:{press:{action:"setState",params:{statePath:"/saved",value:!0}}},children:[]})}`),l.push(""),l.push('Action params can use dynamic references to read from state: { "$state": "/statePath" }.'),l.push("IMPORTANT: Do NOT put action/actionParams inside props. Always use the `on` field for event bindings."),l.push(""),l.push("VISIBILITY CONDITIONS:"),l.push("Elements can have an optional `visible` field to conditionally show/hide based on state. IMPORTANT: `visible` is a top-level field on the element object (sibling of type/props/children), NOT inside props."),l.push(`Correct: ${JSON.stringify({type:u,props:h,visible:{$state:"/activeTab",eq:"home"},children:["..."]})}`),l.push('- `{ "$state": "/path" }` - visible when state at path is truthy'),l.push('- `{ "$state": "/path", "not": true }` - visible when state at path is falsy'),l.push('- `{ "$state": "/path", "eq": "value" }` - visible when state equals value'),l.push('- `{ "$state": "/path", "neq": "value" }` - visible when state does not equal value'),l.push('- `{ "$state": "/path", "gt": N }` / `gte` / `lt` / `lte` - numeric comparisons'),l.push("- Use ONE operator per condition (eq, neq, gt, gte, lt, lte). Do not combine multiple operators."),l.push('- Any condition can add `"not": true` to invert its result'),l.push("- `[condition, condition]` - all conditions must be true (implicit AND)"),l.push('- `{ "$and": [condition, condition] }` - explicit AND (use when nesting inside $or)'),l.push('- `{ "$or": [condition, condition] }` - at least one must be true (OR)'),l.push("- `true` / `false` - always visible/hidden"),l.push(""),l.push("Use a component with on.press bound to setState to update state and drive visibility."),l.push(`Example: A ${u} with on: { "press": { "action": "setState", "params": { "statePath": "/activeTab", "value": "home" } } } sets state, then a container with visible: { "$state": "/activeTab", "eq": "home" } shows only when that tab is active.`),l.push(""),l.push('For tab patterns where the first/default tab should be visible when no tab is selected yet, use $or to handle both cases: visible: { "$or": [{ "$state": "/activeTab", "eq": "home" }, { "$state": "/activeTab", "not": true }] }. This ensures the first tab is visible both when explicitly selected AND when /activeTab is not yet set.'),l.push(""),l.push("DYNAMIC PROPS:"),l.push("Any prop value can be a dynamic expression that resolves based on state. Three forms are supported:"),l.push(""),l.push('1. Read-only state: `{ "$state": "/statePath" }` - resolves to the value at that state path (one-way read).'),l.push(' Example: `"color": { "$state": "/theme/primary" }` reads the color from state.'),l.push(""),l.push('2. Two-way binding: `{ "$bindState": "/statePath" }` - resolves to the value at the state path AND enables write-back. Use on form input props (value, checked, pressed, etc.).'),l.push(' Example: `"value": { "$bindState": "/form/email" }` binds the input value to /form/email.'),l.push(' Inside repeat scopes: `"checked": { "$bindItem": "completed" }` binds to the current item\'s completed field.'),l.push(""),l.push('3. Conditional: `{ "$cond": <condition>, "$then": <value>, "$else": <value> }` - evaluates the condition (same syntax as visibility conditions) and picks the matching value.'),l.push(' Example: `"color": { "$cond": { "$state": "/activeTab", "eq": "home" }, "$then": "#007AFF", "$else": "#8E8E93" }`'),l.push(""),l.push("Use $bindState for form inputs (text fields, checkboxes, selects, sliders, etc.) and $state for read-only data display. Inside repeat scopes, use $bindItem for form inputs bound to the current item. Use dynamic props instead of duplicating elements with opposing visible conditions when only prop values differ."),l.push(""),l.push('4. Template: `{ "$template": "Hello, ${/name}!" }` - interpolates `${/path}` references in the string with values from the state model.'),l.push(' Example: `"label": { "$template": "Items: ${/cart/count} | Total: ${/cart/total}" }` renders "Items: 3 | Total: 42.00" when /cart/count is 3 and /cart/total is 42.00.'),l.push("");const T=e.data.functions;if(T&&Object.keys(T).length>0){l.push('5. Computed: `{ "$computed": "<functionName>", "args": { "key": <expression> } }` - calls a registered function with resolved args and returns the result.'),l.push(' Example: `"value": { "$computed": "fullName", "args": { "first": { "$state": "/form/firstName" }, "last": { "$state": "/form/lastName" } } }`'),l.push(" Available functions:");for(const U of Object.keys(T))l.push(` - ${U}`);l.push("")}(o?Object.entries(o).some(([,U])=>U.props?Fa(U.props).includes("checks"):!1):!1)&&(l.push("VALIDATION:"),l.push("Form components that accept a `checks` prop support client-side validation."),l.push('Each check is an object: { "type": "<name>", "message": "...", "args": { ... } }'),l.push(""),l.push("Built-in validation types:"),l.push(" - required — value must be non-empty"),l.push(" - email — valid email format"),l.push(' - minLength — minimum string length (args: { "min": N })'),l.push(' - maxLength — maximum string length (args: { "max": N })'),l.push(' - pattern — match a regex (args: { "pattern": "regex" })'),l.push(' - min — minimum numeric value (args: { "min": N })'),l.push(' - max — maximum numeric value (args: { "max": N })'),l.push(" - numeric — value must be a number"),l.push(" - url — valid URL format"),l.push(' - matches — must equal another field (args: { "other": { "$state": "/path" } })'),l.push(' - equalTo — alias for matches (args: { "other": { "$state": "/path" } })'),l.push(' - lessThan — value must be less than another field (args: { "other": { "$state": "/path" } })'),l.push(' - greaterThan — value must be greater than another field (args: { "other": { "$state": "/path" } })'),l.push(' - requiredIf — required only when another field is truthy (args: { "field": { "$state": "/path" } })'),l.push(""),l.push("Example:"),l.push(' "checks": [{ "type": "required", "message": "Email is required" }, { "type": "email", "message": "Invalid email" }]'),l.push(""),l.push("IMPORTANT: When using checks, the component must also have a { $bindState } or { $bindItem } on its value/checked prop for two-way binding."),l.push("Always include validation checks on form inputs for a good user experience (e.g. required, email, minLength)."),l.push("")),(k||E)&&(l.push("STATE WATCHERS:"),l.push("Elements can have an optional `watch` field to react to state changes and trigger actions. The `watch` field is a top-level field on the element (sibling of type/props/children), NOT inside props."),l.push("Maps state paths (JSON Pointers) to action bindings. When the value at a watched path changes, the bound actions fire automatically."),l.push(""),l.push("Example (cascading select — country changes trigger city loading):"),l.push(` ${JSON.stringify({type:"Select",props:{value:{$bindState:"/form/country"},options:["US","Canada","UK"]},watch:{"/form/country":{action:"loadCities",params:{country:{$state:"/form/country"}}}},children:[]})}`),l.push(""),l.push("Use `watch` for cascading dependencies where changing one field should trigger side effects (loading data, resetting dependent fields, computing derived values)."),l.push("IMPORTANT: `watch` is a top-level field on the element (sibling of type/props/children), NOT inside props. Watchers only fire when the value changes, not on initial render."),l.push(""));const z=t.editModes;z&&z.length>0&&l.push(vD({modes:z})),l.push("RULES:");const P=i==="inline"?["When generating UI, wrap all JSONL patches in a ```spec code fence - one JSON object per line inside the fence","Write a brief conversational response before any JSONL output",'First set root: {"op":"add","path":"/root","value":"<root-key>"}','Then add each element: {"op":"add","path":"/elements/<key>","value":{...}}',"Output /state patches right after the elements that use them, one per array item for progressive loading. REQUIRED whenever using $state, $bindState, $bindItem, $item, $index, or repeat.","ONLY use components listed above","Each element value needs: type, props, children (array of child keys)","Use unique keys for the element map entries (e.g., 'header', 'metric-1', 'chart-revenue')"]:["Output ONLY JSONL patches - one JSON object per line, no markdown, no code fences",'First set root: {"op":"add","path":"/root","value":"<root-key>"}','Then add each element: {"op":"add","path":"/elements/<key>","value":{...}}',"Output /state patches right after the elements that use them, one per array item for progressive loading. REQUIRED whenever using $state, $bindState, $bindItem, $item, $index, or repeat.","ONLY use components listed above","Each element value needs: type, props, children (array of child keys)","Use unique keys for the element map entries (e.g., 'header', 'metric-1', 'chart-revenue')"],$=e.schema.defaultRules??[];return[...P,...$,...r].forEach((U,H)=>{l.push(`${H+1}. ${U}`)}),l.join(`
|
|
123
|
+
`)}function Av(e){return e.example&&Object.keys(e.example).length>0?e.example:e.props?U_(e.props):{}}function U_(e){if(!e||!e._def)return{};const t=e._def,n=fi(e);if(n!=="ZodObject"&&n!=="object")return{};const r=typeof t.shape=="function"?t.shape():t.shape;if(!r)return{};const a={};for(const[i,l]of Object.entries(r)){const o=fi(l);o==="ZodOptional"||o==="optional"||o==="ZodNullable"||o==="nullable"||(a[i]=Fh(l))}return a}function Fh(e){if(!e||!e._def)return"...";const t=e._def;switch(fi(e)){case"ZodString":case"string":return"example";case"ZodNumber":case"number":return 0;case"ZodBoolean":case"boolean":return!0;case"ZodLiteral":case"literal":return t.value;case"ZodEnum":case"enum":{if(Array.isArray(t.values)&&t.values.length>0)return t.values[0];if(t.entries&&typeof t.entries=="object"){const r=Object.values(t.entries);return r.length>0?r[0]:"example"}return"example"}case"ZodOptional":case"optional":case"ZodNullable":case"nullable":case"ZodDefault":case"default":{const r=t.innerType??t.wrapped;return r?Fh(r):null}case"ZodArray":case"array":return[];case"ZodObject":case"object":return U_(e);case"ZodUnion":case"union":{const r=t.options;return r&&r.length>0?Fh(r[0]):"..."}default:return"..."}}function TD(e){if(!e||!e._def)return null;const t=e._def,n=fi(e);if(n!=="ZodObject"&&n!=="object")return null;const r=typeof t.shape=="function"?t.shape():t.shape;if(!r)return null;for(const[a,i]of Object.entries(r)){const l=fi(i);if(!(l==="ZodOptional"||l==="optional"||l==="ZodNullable"||l==="nullable")&&(l==="ZodString"||l==="string"))return a}return null}function fi(e){if(!e||!e._def)return"";const t=e._def;return t.typeName??t.type??""}function Fa(e){if(!e||!e._def)return"unknown";const t=e._def;switch(fi(e)){case"ZodString":case"string":return"string";case"ZodNumber":case"number":return"number";case"ZodBoolean":case"boolean":return"boolean";case"ZodLiteral":case"literal":return JSON.stringify(t.value);case"ZodEnum":case"enum":{let r;if(Array.isArray(t.values))r=t.values;else if(t.entries&&typeof t.entries=="object")r=Object.values(t.entries);else return"enum";return r.map(a=>`"${a}"`).join(" | ")}case"ZodArray":case"array":{const r=typeof t.element=="object"?t.element:typeof t.type=="object"?t.type:void 0;return r?`Array<${Fa(r)}>`:"Array<unknown>"}case"ZodObject":case"object":{const r=typeof t.shape=="function"?t.shape():t.shape;return r?`{ ${Object.entries(r).map(([i,l])=>{const o=fi(l);return`${i}${o==="ZodOptional"||o==="ZodNullable"||o==="optional"||o==="nullable"?"?":""}: ${Fa(l)}`}).join(", ")} }`:"object"}case"ZodOptional":case"optional":case"ZodNullable":case"nullable":{const r=t.innerType??t.wrapped;return r?Fa(r):"unknown"}case"ZodUnion":case"union":{const r=t.options;return r?r.map(a=>Fa(a)).join(" | "):"unknown"}default:return"unknown"}}function kv(e){return typeof e.type=="string"?e.type:typeof e.typeName=="string"?e.typeName:""}function Ov(e){return e.startsWith("Zod")?e.slice(3).toLowerCase():e.toLowerCase()}function Ur(e,t=!1){const n=e._def;switch(Ov(kv(n))){case"string":return{type:"string"};case"number":return{type:"number"};case"boolean":return{type:"boolean"};case"literal":{const a=n.values;return{const:a?a[0]:n.value}}case"enum":{const a=n.entries;return{enum:(a?Object.values(a):n.values)??[]}}case"array":{const a=n.element??n.type;return{type:"array",items:a?Ur(a,t):{}}}case"object":{const a=n.shape,i=typeof a=="function"?a():a;if(!i)return t?{type:"object",properties:{},required:[],additionalProperties:!1}:{type:"object"};const l={},o=[];for(const[s,u]of Object.entries(i)){const c=u._def,f=Ov(kv(c)),d=f==="optional"||f==="nullable";if(t)if(o.push(s),d){const h=Ur(u,t);l[s]={anyOf:[h,{type:"null"}]}}else l[s]=Ur(u,t);else l[s]=Ur(u),d||o.push(s)}return{type:"object",properties:l,required:o.length>0?o:void 0,additionalProperties:!1}}case"record":{const a=n.valueType;return t?{type:"object",properties:{},required:[],additionalProperties:!1}:{type:"object",additionalProperties:a?Ur(a):!0}}case"optional":case"nullable":{const a=n.innerType;return a?Ur(a,t):{}}case"union":{const a=n.options;return a?{anyOf:a.map(i=>Ur(i,t))}:{}}case"any":case"unknown":return t?{type:"object",properties:{},required:[],additionalProperties:!1}:{};default:return{}}}function AD(e,t){return e.createCatalog(t)}var kD=SD(e=>({spec:e.object({root:e.string(),elements:e.record(e.object({type:e.ref("catalog.components"),props:e.propsOf("catalog.components"),children:e.array(e.string()),visible:e.any()}))}),catalog:e.object({components:e.map({props:e.zod(),slots:e.array(e.string()),description:e.string(),example:e.any()}),actions:e.map({params:e.zod(),description:e.string()})})}),{builtInActions:[{name:"setState",description:"Update a value in the state model at the given statePath. Params: { statePath: string, value: any }"},{name:"pushState",description:'Append an item to an array in state. Params: { statePath: string, value: any, clearStatePath?: string }. Value can contain {"$state":"/path"} refs and "$id" for auto IDs.'},{name:"removeState",description:"Remove an item from an array in state by index. Params: { statePath: string, index: number }"},{name:"validateForm",description:"Validate all registered form fields and write the result to state. Params: { statePath?: string }. Defaults to /formValidation. Result: { valid: boolean, errors: Record<string, string[]> }."}],defaultRules:["CRITICAL INTEGRITY CHECK: Before outputting ANY element that references children, you MUST have already output (or will output) each child as its own element. If an element has children: ['a', 'b'], then elements 'a' and 'b' MUST exist. A missing child element causes that entire branch of the UI to be invisible.","SELF-CHECK: After generating all elements, mentally walk the tree from root. Every key in every children array must resolve to a defined element. If you find a gap, output the missing element immediately.",'CRITICAL: The "visible" field goes on the ELEMENT object, NOT inside "props". Correct: {"type":"<ComponentName>","props":{},"visible":{"$state":"/tab","eq":"home"},"children":[...]}.','CRITICAL: The "on" field goes on the ELEMENT object, NOT inside "props". Use on.press, on.change, on.submit etc. NEVER put action/actionParams inside props.',"When the user asks for a UI that displays data (e.g. blog posts, products, users), ALWAYS include a state field with realistic sample data. The state field is a top-level field on the spec (sibling of root/elements).",'When building repeating content backed by a state array (e.g. posts, products, items), use the "repeat" field on a container element. Example: { "type": "<ContainerComponent>", "props": {}, "repeat": { "statePath": "/posts", "key": "id" }, "children": ["post-card"] }. Replace <ContainerComponent> with an appropriate component from the AVAILABLE COMPONENTS list. Inside repeated children, use { "$item": "field" } to read a field from the current item, and { "$index": true } for the current array index. For two-way binding to an item field use { "$bindItem": "completed" }. Do NOT hardcode individual elements for each array item.',"Design with visual hierarchy: use container components to group content, heading components for section titles, proper spacing, and status indicators. ONLY use components from the AVAILABLE COMPONENTS list.","For data-rich UIs, use multi-column layout components if available. For forms and single-column content, use vertical layout components. ONLY use components from the AVAILABLE COMPONENTS list.","Always include realistic, professional-looking sample data. For blogs include 3-4 posts with varied titles, authors, dates, categories. For products include names, prices, images. Never leave data empty."]}),P_=v.createContext(null);function OD(e,t){return e?null:Object.keys(t).length===0?{}:Am(t)}function ND({store:e,initialState:t={},onStateChange:n,children:r}){const a=v.useRef(void 0);!e&&!a.current&&(a.current=$j(t));const i=e??a.current,l=v.useRef(i);l.current=i;const o=v.useRef(!!e);o.current=!!e,v.useRef(e?"controlled":"uncontrolled"),v.useRef(!1);const s=v.useRef(t),u=v.useRef(OD(!!e,t));v.useEffect(()=>{if(e||t===s.current)return;s.current=t;const p=t&&Object.keys(t).length>0?Am(t):{},g=u.current??{},m=new Set([...Object.keys(g),...Object.keys(p)]),S={};for(const k of m)g[k]!==p[k]&&(S[k]=k in p?p[k]:void 0);u.current=p,Object.keys(S).length>0&&i.update(S)},[e,t,i]);const c=v.useSyncExternalStore(i.subscribe,i.getSnapshot,i.getServerSnapshot??i.getSnapshot),f=v.useRef(n);f.current=n;const d=v.useCallback((p,g)=>{var k;const m=l.current,S=m.getSnapshot();m.set(p,g),!o.current&&m.getSnapshot()!==S&&((k=f.current)==null||k.call(f,[{path:p,value:g}]))},[]),h=v.useCallback(p=>{var S;const g=l.current,m=g.getSnapshot();if(g.update(p),!o.current&&g.getSnapshot()!==m){const k=[];for(const[E,T]of Object.entries(p))Rt(m,E)!==T&&k.push({path:E,value:T});k.length>0&&((S=f.current)==null||S.call(f,k))}},[]),b=v.useCallback(p=>l.current.get(p),[]),y=v.useCallback(()=>l.current.getSnapshot(),[]),_=v.useMemo(()=>({state:c,get:b,set:d,update:h,getSnapshot:y}),[c,b,d,h,y]);return x.jsx(P_.Provider,{value:_,children:r})}function Es(){const e=v.useContext(P_);if(!e)throw new Error("useStateStore must be used within a StateProvider");return e}var B_=v.createContext(null);function zD({children:e}){const{state:t}=Es(),n=v.useMemo(()=>({stateModel:t}),[t]),r=v.useMemo(()=>i=>jl(i,n),[n]),a=v.useMemo(()=>({isVisible:r,ctx:n}),[r,n]);return x.jsx(B_.Provider,{value:a,children:e})}function RD(){const e=v.useContext(B_);if(!e)throw new Error("useVisibility must be used within a VisibilityProvider");return e}var $_=v.createContext(null);function MD(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const i=e[a],l=t[a];if(i!==l){if(typeof i=="object"&&i!==null&&typeof l=="object"&&l!==null){const o=i.$state,s=l.$state;if(typeof o=="string"&&o===s)continue}return!1}}return!0}function jD(e,t){if(e===t)return!0;if(e.validateOn!==t.validateOn)return!1;const n=e.checks??[],r=t.checks??[];if(n.length!==r.length)return!1;for(let a=0;a<n.length;a++){const i=n[a],l=r[a];if(i.type!==l.type||i.message!==l.message||!MD(i.args,l.args))return!1}return!0}function DD({customFunctions:e={},children:t}){const{state:n,getSnapshot:r}=Es(),[a,i]=v.useState({}),l=v.useRef({}),[o,s]=v.useState({}),u=v.useCallback((y,_)=>{s(p=>{const g=p[y];return g&&jD(g,_)?p:{...p,[y]:_}})},[]),c=v.useCallback((y,_)=>{var E;const p=r(),g=y.split("/").filter(Boolean);let m=p;for(const T of g)if(m!=null&&typeof m=="object")m=m[T];else{m=void 0;break}const S=fD(_,{value:m,stateModel:p,customFunctions:e}),k={touched:((E=l.current[y])==null?void 0:E.touched)??!0,validated:!0,result:S};return l.current={...l.current,[y]:k},i(l.current),S},[e,r]),f=v.useCallback(y=>{var _,p;l.current={...l.current,[y]:{...l.current[y],touched:!0,validated:((_=l.current[y])==null?void 0:_.validated)??!1,result:((p=l.current[y])==null?void 0:p.result)??null}},i(l.current)},[]),d=v.useCallback(y=>{const{[y]:_,...p}=l.current;l.current=p,i(p)},[]),h=v.useCallback(()=>{let y=!0;for(const[_,p]of Object.entries(o))c(_,p).valid||(y=!1);return y},[o,c]),b=v.useMemo(()=>({customFunctions:e,get fieldStates(){return l.current},validate:c,touch:f,clear:d,validateAll:h,registerField:u}),[e,a,c,f,d,h,u]);return x.jsx($_.Provider,{value:b,children:t})}function LD(){return v.useContext($_)}var Nv=0;function zv(){return Nv+=1,`${Date.now()}-${Nv}`}function qh(e,t){if(e==null)return e;if(e==="$id")return zv();if(typeof e=="object"&&!Array.isArray(e)){const n=e,r=Object.keys(n);if(r.length===1&&typeof n.$state=="string")return t(n.$state);if(r.length===1&&"$id"in n)return zv()}if(Array.isArray(e))return e.map(n=>qh(n,t));if(typeof e=="object"){const n={};for(const[r,a]of Object.entries(e))n[r]=qh(a,t);return n}return e}var I_=v.createContext(null);function UD({handlers:e={},navigate:t,children:n}){const{get:r,set:a,getSnapshot:i}=Es(),l=LD(),[o,s]=v.useState(e),[u,c]=v.useState(new Set),[f,d]=v.useState(null),h=v.useCallback((g,m)=>{s(S=>({...S,[g]:m}))},[]),b=v.useCallback(async g=>{var k;const m=oD(g,i());if(m.action==="setState"&&m.params){const E=m.params.statePath,T=m.params.value;E&&a(E,T);return}if(m.action==="pushState"&&m.params){const E=m.params.statePath,T=m.params.value;if(E){const O=qh(T,r),z=r(E)??[];a(E,[...z,O]);const P=m.params.clearStatePath;P&&a(P,"")}return}if(m.action==="removeState"&&m.params){const E=m.params.statePath,T=m.params.index;if(E!==void 0&&T!==void 0){const O=r(E)??[];a(E,O.filter((z,P)=>P!==T))}return}if(m.action==="push"&&m.params){const E=m.params.screen;if(E){const T=r("/currentScreen"),O=r("/navStack")??[];T?a("/navStack",[...O,T]):a("/navStack",[...O,""]),a("/currentScreen",E)}return}if(m.action==="pop"){const E=r("/navStack")??[];if(E.length>0){const T=E[E.length-1];a("/navStack",E.slice(0,-1)),T?a("/currentScreen",T):a("/currentScreen",void 0)}return}if(m.action==="validateForm"){const E=l==null?void 0:l.validateAll;if(!E){console.warn("validateForm action was dispatched but no ValidationProvider is connected. Ensure ValidationProvider is rendered inside the provider tree.");return}const T=E(),O={};for(const[P,$]of Object.entries(l.fieldStates))$.result&&!$.result.valid&&(O[P]=$.result.errors);const z=((k=m.params)==null?void 0:k.statePath)||"/formValidation";a(z,{valid:T,errors:O});return}const S=o[m.action];if(!S){console.warn(`No handler registered for action: ${m.action}`);return}if(m.confirm)return new Promise((E,T)=>{d({action:m,handler:S,resolve:()=>{d(null),E()},reject:()=>{d(null),T(new Error("Action cancelled"))}})}).then(async()=>{c(E=>new Set(E).add(m.action));try{await Cv({action:m,handler:S,setState:a,navigate:t,executeAction:async E=>{await b({action:E})}})}finally{c(E=>{const T=new Set(E);return T.delete(m.action),T})}});c(E=>new Set(E).add(m.action));try{await Cv({action:m,handler:S,setState:a,navigate:t,executeAction:async E=>{await b({action:E})}})}finally{c(E=>{const T=new Set(E);return T.delete(m.action),T})}},[o,r,a,i,t,l]),y=v.useCallback(()=>{f==null||f.resolve()},[f]),_=v.useCallback(()=>{f==null||f.reject()},[f]),p=v.useMemo(()=>({handlers:o,loadingActions:u,pendingConfirmation:f,execute:b,confirm:y,cancel:_,registerHandler:h}),[o,u,f,b,y,_,h]);return x.jsx(I_.Provider,{value:p,children:n})}function Z_(){const e=v.useContext(I_);if(!e)throw new Error("useActions must be used within an ActionProvider");return e}function PD({confirm:e,onConfirm:t,onCancel:n}){const r=e.variant==="danger";return x.jsx("div",{style:{position:"fixed",inset:0,backgroundColor:"rgba(0, 0, 0, 0.5)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:50},onClick:n,children:x.jsxs("div",{style:{backgroundColor:"white",borderRadius:"8px",padding:"24px",maxWidth:"400px",width:"100%",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1)"},onClick:a=>a.stopPropagation(),children:[x.jsx("h3",{style:{margin:"0 0 8px 0",fontSize:"18px",fontWeight:600},children:e.title}),x.jsx("p",{style:{margin:"0 0 24px 0",color:"#6b7280"},children:e.message}),x.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[x.jsx("button",{onClick:n,style:{padding:"8px 16px",borderRadius:"6px",border:"1px solid #d1d5db",backgroundColor:"white",cursor:"pointer"},children:e.cancelLabel??"Cancel"}),x.jsx("button",{onClick:t,style:{padding:"8px 16px",borderRadius:"6px",border:"none",backgroundColor:r?"#dc2626":"#3b82f6",color:"white",cursor:"pointer"},children:e.confirmLabel??"Confirm"})]})]})})}var H_=v.createContext(null);function BD({item:e,index:t,basePath:n,children:r}){return x.jsx(H_.Provider,{value:{item:e,index:t,basePath:n},children:r})}function $D(){return v.useContext(H_)}var ID=class extends Ze.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e,t){console.error(`[json-render] Rendering error in <${this.props.elementType}>:`,e,t.componentStack)}render(){return this.state.hasError?null:this.props.children}},F_={},q_=Ze.createContext(F_);function ZD(){return Ze.useContext(q_)}var G_=Ze.memo(function e({element:t,spec:n,registry:r,loading:a,fallback:i}){var $;const l=$D(),{ctx:o}=RD(),{execute:s}=Z_(),{getSnapshot:u,state:c}=Es(),f=ZD(),d=v.useMemo(()=>{const B=l?{...o,repeatItem:l.item,repeatIndex:l.index,repeatBasePath:l.basePath}:{...o};return B.functions=f,B},[o,l,f]),h=t.visible===void 0?!0:jl(t.visible,d),b=t.on,y=v.useCallback(async B=>{const U=b==null?void 0:b[B];if(!U)return;const H=Array.isArray(U)?U:[U];for(const F of H){if(!F.params){await s(F);continue}const D={...d,stateModel:u()},q={};for(const[V,ae]of Object.entries(F.params))q[V]=wv(ae,D);await s({...F,params:q})}},[b,s,d,u]),_=v.useCallback(B=>{const U=b==null?void 0:b[B];if(!U)return{emit:()=>{},shouldPreventDefault:!1,bound:!1};const F=(Array.isArray(U)?U:[U]).some(D=>D.preventDefault);return{emit:()=>y(B),shouldPreventDefault:F,bound:!0}},[b,y]),p=t.watch,g=v.useRef(null),m=v.useRef(void 0),S=v.useMemo(()=>{if(!p)return;const B={};for(const H of Object.keys(p))B[H]=Rt(c,H);const U=m.current;if(U){const H=Object.keys(B);if(H.length===Object.keys(U).length&&H.every(F=>B[F]===U[F]))return U}return m.current=B,B},[p,c]);if(v.useEffect(()=>{if(!p||!S)return;const B=Object.keys(p);if(B.length===0)return;const U=g.current;if(g.current=S,U===null)return;let H=!1;return(async()=>{for(const F of B){if(H)break;if(S[F]!==U[F]){const D=p[F];if(!D)continue;const q=Array.isArray(D)?D:[D];for(const V of q){if(H)break;if(!V.params){if(await s(V),H)break;continue}const ae={...d,stateModel:u()},w={};for(const[Me,qe]of Object.entries(V.params))w[Me]=wv(qe,ae);if(await s({...V,params:w}),H)break}}}})().catch(console.error),()=>{H=!0}},[p,S,s,d,u]),!h)return null;const k=t.props,E=rD(k,d),T=nD(k,d),O=T!==t.props?{...t,props:T}:t,z=r[O.type]??i;if(!z)return console.warn(`No renderer for component type: ${O.type}`),null;const P=O.repeat?x.jsx(HD,{element:O,spec:n,registry:r,loading:a,fallback:i}):($=O.children)==null?void 0:$.map(B=>{const U=n.elements[B];return U?x.jsx(e,{element:U,spec:n,registry:r,loading:a,fallback:i},B):(a||console.warn(`[json-render] Missing element "${B}" referenced as child of "${O.type}". This element will not render.`),null)});return x.jsx(ID,{elementType:O.type,children:x.jsx(z,{element:O,emit:y,on:_,bindings:E,loading:a,children:P})})});function HD({element:e,spec:t,registry:n,loading:r,fallback:a}){const{state:i}=Es(),l=e.repeat,o=l.statePath,s=Rt(i,o)??[];return x.jsx(x.Fragment,{children:s.map((u,c)=>{var d;const f=l.key&&typeof u=="object"&&u!==null?String(u[l.key]??c):String(c);return x.jsx(BD,{item:u,index:c,basePath:`${o}/${c}`,children:(d=e.children)==null?void 0:d.map(h=>{const b=t.elements[h];return b?x.jsx(G_,{element:b,spec:t,registry:n,loading:r,fallback:a},h):(r||console.warn(`[json-render] Missing element "${h}" referenced as child of "${e.type}" (repeat). This element will not render.`),null)})},f)})})}function FD({spec:e,registry:t,loading:n,fallback:r}){if(!e||!e.root)return null;const a=e.elements[e.root];return a?x.jsx(G_,{element:a,spec:e,registry:t,loading:n,fallback:r}):null}function qD({registry:e,store:t,initialState:n,handlers:r,navigate:a,validationFunctions:i,functions:l,onStateChange:o,children:s}){return x.jsx(ND,{store:t,initialState:n,onStateChange:o,children:x.jsx(zD,{children:x.jsx(DD,{customFunctions:i,children:x.jsx(UD,{handlers:r,navigate:a,children:x.jsxs(q_.Provider,{value:l??F_,children:[s,x.jsx(GD,{})]})})})})})}function GD(){const{pendingConfirmation:e,confirm:t,cancel:n}=Z_();return e!=null&&e.action.confirm?x.jsx(PD,{confirm:e.action.confirm,onConfirm:t,onCancel:n}):null}function VD(e,t){const n={};if(t.components)for(const[l,o]of Object.entries(t.components))n[l]=({element:s,children:u,emit:c,on:f,bindings:d,loading:h})=>o({props:s.props,children:u,emit:c,on:f,bindings:d,loading:h});const r=t.actions?Object.entries(t.actions):[];return{registry:n,handlers:(l,o)=>{const s={};for(const[u,c]of r)s[u]=async f=>{const d=l(),h=o();d&&await c(f,d,h)};return s},executeAction:async(l,o,s,u={})=>{const c=r.find(([f])=>f===l);c?await c[1](o,s,u):console.warn(`Unknown action: ${l}`)}}}const QD="_root_vtr7f_1",YD="_fallback_vtr7f_63",XD="_markdown_vtr7f_69",JD="_approvalCard_vtr7f_156",KD="_approvalBadge_vtr7f_168",WD="_approvalTitle_vtr7f_177",e3="_approvalDetails_vtr7f_185",t3="_approvalHint_vtr7f_197",n3="_approvalStatus_vtr7f_198",r3="_approvalError_vtr7f_199",a3="_approvalActions_vtr7f_219",i3="_approvalAction_vtr7f_219",l3="_approvalActionPrimary_vtr7f_256",o3="_approvalActionSecondary_vtr7f_262",s3="_approvalActionDestructive_vtr7f_268",u3="_alertCard_vtr7f_274",c3="_alertTitle_vtr7f_289",f3="_alertMessage_vtr7f_297",d3="_alertInfo_vtr7f_302",h3="_alertSuccess_vtr7f_310",p3="_alertWarning_vtr7f_325",m3="_alertError_vtr7f_340",g3="_graphCard_vtr7f_355",y3="_graphHeader_vtr7f_370",v3="_graphTitle_vtr7f_375",b3="_graphDescription_vtr7f_383",S3="_graphEmpty_vtr7f_388",x3="_barGraph_vtr7f_393",_3="_lineGraph_vtr7f_394",w3="_barGraphPlot_vtr7f_401",E3="_barGraphColumn_vtr7f_415",C3="_barGraphTrack_vtr7f_421",T3="_barGraphBar_vtr7f_457",A3="_graphLabel_vtr7f_467",k3="_graphValue_vtr7f_468",O3="_lineGraphSvg_vtr7f_483",N3="_lineGraphGrid_vtr7f_491",z3="_lineGraphPath_vtr7f_496",R3="_lineGraphPoint_vtr7f_504",M3="_lineGraphLegend_vtr7f_509",j3="_lineGraphLegendItem_vtr7f_516",D3="_lineGraphLegendSwatch_vtr7f_523",ne={root:QD,fallback:YD,markdown:XD,approvalCard:JD,approvalBadge:KD,approvalTitle:WD,approvalDetails:e3,approvalHint:t3,approvalStatus:n3,approvalError:r3,approvalActions:a3,approvalAction:i3,approvalActionPrimary:l3,approvalActionSecondary:o3,approvalActionDestructive:s3,alertCard:u3,alertTitle:c3,alertMessage:f3,alertInfo:d3,alertSuccess:h3,alertWarning:p3,alertError:m3,graphCard:g3,graphHeader:y3,graphTitle:v3,graphDescription:b3,graphEmpty:S3,barGraph:x3,lineGraph:_3,barGraphPlot:w3,barGraphColumn:E3,barGraphTrack:C3,barGraphBar:T3,graphLabel:A3,graphValue:k3,lineGraphSvg:O3,lineGraphGrid:N3,lineGraphPath:z3,lineGraphPoint:R3,lineGraphLegend:M3,lineGraphLegendItem:j3,lineGraphLegendSwatch:D3};var Ti=We(Y({type:M(),message:M(),args:va(M(),Vn()).optional()})).nullable(),Ai=je(["change","blur","submit"]).nullable(),Bt={Card:{props:Y({title:M().nullable(),description:M().nullable(),maxWidth:je(["sm","md","lg","full"]).nullable(),centered:vn().nullable(),className:M().nullable().describe("Additional CSS classes")}),slots:["default"],description:"Container card for content sections. Use for forms/content boxes, NOT for page headers.",example:{title:"Overview",description:"Your account summary"}},Stack:{props:Y({direction:je(["horizontal","vertical"]).nullable(),gap:je(["none","sm","md","lg","xl"]).nullable(),align:je(["start","center","end","stretch"]).nullable(),justify:je(["start","center","end","between","around"]).nullable(),className:M().nullable().describe("Additional CSS classes")}),slots:["default"],description:"Flex container for layouts",example:{direction:"vertical",gap:"md"}},Grid:{props:Y({columns:ft().nullable(),gap:je(["sm","md","lg","xl"]).nullable(),className:M().nullable().describe("Additional CSS classes")}),slots:["default"],description:"Grid layout (1-6 columns)",example:{columns:3,gap:"md"}},Separator:{props:Y({orientation:je(["horizontal","vertical"]).nullable()}),description:"Visual separator line"},Tabs:{props:Y({tabs:We(Y({label:M(),value:M()})),defaultValue:M().nullable(),value:M().nullable()})},Accordion:{props:Y({items:We(Y({title:M(),content:M()})),type:je(["single","multiple"]).nullable()})},Collapsible:{props:Y({title:M(),defaultOpen:vn().nullable()})},Dialog:{props:Y({title:M(),description:M().nullable(),openPath:M()})},Drawer:{props:Y({title:M(),description:M().nullable(),openPath:M()})},Carousel:{props:Y({items:We(Y({title:M().nullable(),description:M().nullable()}))})},Table:{props:Y({columns:We(M()),rows:We(We(M())),caption:M().nullable()}),description:'Data table. columns: header labels. rows: 2D array of cell strings, e.g. [["Alice","admin"],["Bob","user"]].',example:{columns:["Name","Role"],rows:[["Alice","Admin"],["Bob","User"]]}},Heading:{props:Y({text:M(),level:je(["h1","h2","h3","h4"]).nullable()}),description:"Heading text (h1-h4)",example:{text:"Welcome",level:"h1"}},Text:{props:Y({text:M(),variant:je(["body","caption","muted","lead","code"]).nullable()}),description:"Paragraph text",example:{text:"Hello, world!"}},Image:{props:Y({src:M().nullable(),alt:M(),width:ft().nullable(),height:ft().nullable()}),description:"Image component. Renders an img tag when src is provided, otherwise a placeholder."},Avatar:{props:Y({src:M().nullable(),name:M(),size:je(["sm","md","lg"]).nullable()}),description:"User avatar with fallback initials",example:{name:"Jane Doe",size:"md"}},Badge:{props:Y({text:M(),variant:je(["default","secondary","destructive","outline"]).nullable()}),description:"Status badge",example:{text:"Active",variant:"default"}},Alert:{props:Y({title:M(),message:M().nullable(),type:je(["info","success","warning","error"]).nullable()}),description:"Alert banner",example:{title:"Note",message:"Your changes have been saved.",type:"success"}},Progress:{props:Y({value:ft(),max:ft().nullable(),label:M().nullable()}),description:"Progress bar (value 0-100)",example:{value:65,max:100,label:"Upload progress"}},Skeleton:{props:Y({width:M().nullable(),height:M().nullable(),rounded:vn().nullable()}),description:"Loading placeholder skeleton"},Spinner:{props:Y({size:je(["sm","md","lg"]).nullable(),label:M().nullable()}),description:"Loading spinner indicator"},Tooltip:{props:Y({content:M(),text:M()})},Popover:{props:Y({trigger:M(),content:M()})},Input:{props:Y({label:M(),name:M(),type:je(["text","email","password","number"]).nullable(),placeholder:M().nullable(),value:M().nullable(),checks:Ti,validateOn:Ai})},Textarea:{props:Y({label:M(),name:M(),placeholder:M().nullable(),rows:ft().nullable(),value:M().nullable(),checks:Ti,validateOn:Ai})},Select:{props:Y({label:M(),name:M(),options:We(M()),placeholder:M().nullable(),value:M().nullable(),checks:Ti,validateOn:Ai})},Checkbox:{props:Y({label:M(),name:M(),checked:vn().nullable(),checks:Ti,validateOn:Ai})},Radio:{props:Y({label:M(),name:M(),options:We(M()),value:M().nullable(),checks:Ti,validateOn:Ai})},Switch:{props:Y({label:M(),name:M(),checked:vn().nullable(),checks:Ti,validateOn:Ai})},Slider:{props:Y({label:M().nullable(),min:ft().nullable(),max:ft().nullable(),step:ft().nullable(),value:ft().nullable()})},Button:{props:Y({label:M(),variant:je(["primary","secondary","danger"]).nullable(),disabled:vn().nullable()})},Link:{props:Y({label:M(),href:M()})},DropdownMenu:{props:Y({label:M(),items:We(Y({label:M(),value:M()})),value:M().nullable()})},Toggle:{props:Y({label:M(),pressed:vn().nullable(),variant:je(["default","outline"]).nullable()})},ToggleGroup:{props:Y({items:We(Y({label:M(),value:M()})),type:je(["single","multiple"]).nullable(),value:M().nullable()})},ButtonGroup:{props:Y({buttons:We(Y({label:M(),value:M()})),selected:M().nullable()})},Pagination:{props:Y({totalPages:ft(),page:ft().nullable()})}};function V_(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(n=V_(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Q_(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=V_(e))&&(r&&(r+=" "),r+=t);return r}const Rv=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Mv=Q_,L3=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Mv(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:a,defaultVariants:i}=t,l=Object.keys(a).map(u=>{const c=n==null?void 0:n[u],f=i==null?void 0:i[u];if(c===null)return null;const d=Rv(c)||Rv(f);return a[u][d]}),o=n&&Object.entries(n).reduce((u,c)=>{let[f,d]=c;return d===void 0||(u[f]=d),u},{}),s=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,c)=>{let{class:f,className:d,...h}=c;return Object.entries(h).every(b=>{let[y,_]=b;return Array.isArray(_)?_.includes({...i,...o}[y]):{...i,...o}[y]===_})?[...u,f,d]:u},[]);return Mv(e,l,s,n==null?void 0:n.class,n==null?void 0:n.className)};function jv(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Y_(...e){return t=>{let n=!1;const r=e.map(a=>{const i=jv(a,t);return!n&&typeof i=="function"&&(n=!0),i});if(n)return()=>{for(let a=0;a<r.length;a++){const i=r[a];typeof i=="function"?i():jv(e[a],null)}}}}function bi(...e){return v.useCallback(Y_(...e),e)}function Nm(e){const t=P3(e),n=v.forwardRef((r,a)=>{const{children:i,...l}=r,o=v.Children.toArray(i),s=o.find($3);if(s){const u=s.props.children,c=o.map(f=>f===s?v.Children.count(u)>1?v.Children.only(null):v.isValidElement(u)?u.props.children:null:f);return x.jsx(t,{...l,ref:a,children:v.isValidElement(u)?v.cloneElement(u,void 0,c):null})}return x.jsx(t,{...l,ref:a,children:i})});return n.displayName=`${e}.Slot`,n}var U3=Nm("Slot");function P3(e){const t=v.forwardRef((n,r)=>{const{children:a,...i}=n;if(v.isValidElement(a)){const l=Z3(a),o=I3(i,a.props);return a.type!==v.Fragment&&(o.ref=r?Y_(r,l):l),v.cloneElement(a,o)}return v.Children.count(a)>1?v.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var B3=Symbol("radix.slottable");function $3(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===B3}function I3(e,t){const n={...t};for(const r in t){const a=e[r],i=t[r];/^on[A-Z]/.test(r)?a&&i?n[r]=(...o)=>{const s=i(...o);return a(...o),s}:a&&(n[r]=a):r==="style"?n[r]={...a,...i}:r==="className"&&(n[r]=[a,i].filter(Boolean).join(" "))}return{...e,...n}}function Z3(e){var r,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var H3=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Dt=H3.reduce((e,t)=>{const n=Nm(`Primitive.${t}`),r=v.forwardRef((a,i)=>{const{asChild:l,...o}=a,s=l?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(s,{...o,ref:i})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function F3(e,t){e&&N0.flushSync(()=>e.dispatchEvent(t))}function q3(e,t){const n=v.createContext(t),r=i=>{const{children:l,...o}=i,s=v.useMemo(()=>o,Object.values(o));return x.jsx(n.Provider,{value:s,children:l})};r.displayName=e+"Provider";function a(i){const l=v.useContext(n);if(l)return l;if(t!==void 0)return t;throw new Error(`\`${i}\` must be used within \`${e}\``)}return[r,a]}function zm(e,t=[]){let n=[];function r(i,l){const o=v.createContext(l),s=n.length;n=[...n,l];const u=f=>{var p;const{scope:d,children:h,...b}=f,y=((p=d==null?void 0:d[e])==null?void 0:p[s])||o,_=v.useMemo(()=>b,Object.values(b));return x.jsx(y.Provider,{value:_,children:h})};u.displayName=i+"Provider";function c(f,d){var y;const h=((y=d==null?void 0:d[e])==null?void 0:y[s])||o,b=v.useContext(h);if(b)return b;if(l!==void 0)return l;throw new Error(`\`${f}\` must be used within \`${i}\``)}return[u,c]}const a=()=>{const i=n.map(l=>v.createContext(l));return function(o){const s=(o==null?void 0:o[e])||i;return v.useMemo(()=>({[`__scope${e}`]:{...o,[e]:s}}),[o,s])}};return a.scopeName=e,[r,G3(a,...t)]}function G3(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(a=>({useScope:a(),scopeName:a.scopeName}));return function(i){const l=r.reduce((o,{useScope:s,scopeName:u})=>{const f=s(i)[`__scope${u}`];return{...o,...f}},{});return v.useMemo(()=>({[`__scope${t.scopeName}`]:l}),[l])}};return n.scopeName=t.scopeName,n}function ba(e,t,{checkForDefaultPrevented:n=!0}={}){return function(a){if(e==null||e(a),n===!1||!a.defaultPrevented)return t==null?void 0:t(a)}}var rs=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{};function V3(e,t){return v.useReducer((n,r)=>t[n][r]??n,e)}var Rm=e=>{const{present:t,children:n}=e,r=Q3(t),a=typeof n=="function"?n({present:r.isPresent}):v.Children.only(n),i=bi(r.ref,Y3(a));return typeof n=="function"||r.isPresent?v.cloneElement(a,{ref:i}):null};Rm.displayName="Presence";function Q3(e){const[t,n]=v.useState(),r=v.useRef(null),a=v.useRef(e),i=v.useRef("none"),l=e?"mounted":"unmounted",[o,s]=V3(l,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const u=eu(r.current);i.current=o==="mounted"?u:"none"},[o]),rs(()=>{const u=r.current,c=a.current;if(c!==e){const d=i.current,h=eu(u);e?s("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?s("UNMOUNT"):s(c&&d!==h?"ANIMATION_OUT":"UNMOUNT"),a.current=e}},[e,s]),rs(()=>{if(t){let u;const c=t.ownerDocument.defaultView??window,f=h=>{const y=eu(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&y&&(s("ANIMATION_END"),!a.current)){const _=t.style.animationFillMode;t.style.animationFillMode="forwards",u=c.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=_)})}},d=h=>{h.target===t&&(i.current=eu(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{c.clearTimeout(u),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else s("ANIMATION_END")},[t,s]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:v.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function eu(e){return(e==null?void 0:e.animationName)||"none"}function Y3(e){var r,a;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=(a=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:a.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Dl(e){const t=v.useRef(e);return v.useEffect(()=>{t.current=e}),v.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function X3(e,t=globalThis==null?void 0:globalThis.document){const n=Dl(e);v.useEffect(()=>{const r=a=>{a.key==="Escape"&&n(a)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var J3="DismissableLayer",Gh="dismissableLayer.update",K3="dismissableLayer.pointerDownOutside",W3="dismissableLayer.focusOutside",Dv,X_=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),J_=v.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:i,onInteractOutside:l,onDismiss:o,...s}=e,u=v.useContext(X_),[c,f]=v.useState(null),d=(c==null?void 0:c.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=v.useState({}),b=bi(t,T=>f(T)),y=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),p=y.indexOf(_),g=c?y.indexOf(c):-1,m=u.layersWithOutsidePointerEventsDisabled.size>0,S=g>=p,k=n4(T=>{const O=T.target,z=[...u.branches].some(P=>P.contains(O));!S||z||(a==null||a(T),l==null||l(T),T.defaultPrevented||o==null||o())},d),E=r4(T=>{const O=T.target;[...u.branches].some(P=>P.contains(O))||(i==null||i(T),l==null||l(T),T.defaultPrevented||o==null||o())},d);return X3(T=>{g===u.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&o&&(T.preventDefault(),o()))},d),v.useEffect(()=>{if(c)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Dv=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(c)),u.layers.add(c),Lv(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=Dv)}},[c,d,n,u]),v.useEffect(()=>()=>{c&&(u.layers.delete(c),u.layersWithOutsidePointerEventsDisabled.delete(c),Lv())},[c,u]),v.useEffect(()=>{const T=()=>h({});return document.addEventListener(Gh,T),()=>document.removeEventListener(Gh,T)},[]),x.jsx(Dt.div,{...s,ref:b,style:{pointerEvents:m?S?"auto":"none":void 0,...e.style},onFocusCapture:ba(e.onFocusCapture,E.onFocusCapture),onBlurCapture:ba(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:ba(e.onPointerDownCapture,k.onPointerDownCapture)})});J_.displayName=J3;var e4="DismissableLayerBranch",t4=v.forwardRef((e,t)=>{const n=v.useContext(X_),r=v.useRef(null),a=bi(t,r);return v.useEffect(()=>{const i=r.current;if(i)return n.branches.add(i),()=>{n.branches.delete(i)}},[n.branches]),x.jsx(Dt.div,{...e,ref:a})});t4.displayName=e4;function n4(e,t=globalThis==null?void 0:globalThis.document){const n=Dl(e),r=v.useRef(!1),a=v.useRef(()=>{});return v.useEffect(()=>{const i=o=>{if(o.target&&!r.current){let s=function(){K_(K3,n,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",a.current),a.current=s,t.addEventListener("click",a.current,{once:!0})):s()}else t.removeEventListener("click",a.current);r.current=!1},l=window.setTimeout(()=>{t.addEventListener("pointerdown",i)},0);return()=>{window.clearTimeout(l),t.removeEventListener("pointerdown",i),t.removeEventListener("click",a.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function r4(e,t=globalThis==null?void 0:globalThis.document){const n=Dl(e),r=v.useRef(!1);return v.useEffect(()=>{const a=i=>{i.target&&!r.current&&K_(W3,n,{originalEvent:i},{discrete:!1})};return t.addEventListener("focusin",a),()=>t.removeEventListener("focusin",a)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function Lv(){const e=new CustomEvent(Gh);document.dispatchEvent(e)}function K_(e,t,n,{discrete:r}){const a=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?F3(a,i):a.dispatchEvent(i)}var ed="focusScope.autoFocusOnMount",td="focusScope.autoFocusOnUnmount",Uv={bubbles:!1,cancelable:!0},a4="FocusScope",W_=v.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:i,...l}=e,[o,s]=v.useState(null),u=Dl(a),c=Dl(i),f=v.useRef(null),d=bi(t,y=>s(y)),h=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(r){let y=function(m){if(h.paused||!o)return;const S=m.target;o.contains(S)?f.current=S:Pr(f.current,{select:!0})},_=function(m){if(h.paused||!o)return;const S=m.relatedTarget;S!==null&&(o.contains(S)||Pr(f.current,{select:!0}))},p=function(m){if(document.activeElement===document.body)for(const k of m)k.removedNodes.length>0&&Pr(o)};document.addEventListener("focusin",y),document.addEventListener("focusout",_);const g=new MutationObserver(p);return o&&g.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",y),document.removeEventListener("focusout",_),g.disconnect()}}},[r,o,h.paused]),v.useEffect(()=>{if(o){Bv.add(h);const y=document.activeElement;if(!o.contains(y)){const p=new CustomEvent(ed,Uv);o.addEventListener(ed,u),o.dispatchEvent(p),p.defaultPrevented||(i4(c4(ew(o)),{select:!0}),document.activeElement===y&&Pr(o))}return()=>{o.removeEventListener(ed,u),setTimeout(()=>{const p=new CustomEvent(td,Uv);o.addEventListener(td,c),o.dispatchEvent(p),p.defaultPrevented||Pr(y??document.body,{select:!0}),o.removeEventListener(td,c),Bv.remove(h)},0)}}},[o,u,c,h]);const b=v.useCallback(y=>{if(!n&&!r||h.paused)return;const _=y.key==="Tab"&&!y.altKey&&!y.ctrlKey&&!y.metaKey,p=document.activeElement;if(_&&p){const g=y.currentTarget,[m,S]=l4(g);m&&S?!y.shiftKey&&p===S?(y.preventDefault(),n&&Pr(m,{select:!0})):y.shiftKey&&p===m&&(y.preventDefault(),n&&Pr(S,{select:!0})):p===g&&y.preventDefault()}},[n,r,h.paused]);return x.jsx(Dt.div,{tabIndex:-1,...l,ref:d,onKeyDown:b})});W_.displayName=a4;function i4(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Pr(r,{select:t}),document.activeElement!==n)return}function l4(e){const t=ew(e),n=Pv(t,e),r=Pv(t.reverse(),e);return[n,r]}function ew(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Pv(e,t){for(const n of e)if(!o4(n,{upTo:t}))return n}function o4(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 s4(e){return e instanceof HTMLInputElement&&"select"in e}function Pr(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&s4(e)&&t&&e.select()}}var Bv=u4();function u4(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=$v(e,t),e.unshift(t)},remove(t){var n;e=$v(e,t),(n=e[0])==null||n.resume()}}}function $v(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function c4(e){return e.filter(t=>t.tagName!=="A")}var nd=0;function f4(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Iv()),document.body.insertAdjacentElement("beforeend",e[1]??Iv()),nd++,()=>{nd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),nd--}},[])}function Iv(){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 In=function(){return In=Object.assign||function(t){for(var n,r=1,a=arguments.length;r<a;r++){n=arguments[r];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},In.apply(this,arguments)};function tw(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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n}function d4(e,t,n){if(n||arguments.length===2)for(var r=0,a=t.length,i;r<a;r++)(i||!(r in t))&&(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))}var zu="right-scroll-bar-position",Ru="width-before-scroll-bar",h4="with-scroll-bars-hidden",p4="--removed-body-scroll-bar-size";function rd(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function m4(e,t){var n=v.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var g4=typeof window<"u"?v.useLayoutEffect:v.useEffect,Zv=new WeakMap;function y4(e,t){var n=m4(null,function(r){return e.forEach(function(a){return rd(a,r)})});return g4(function(){var r=Zv.get(n);if(r){var a=new Set(r),i=new Set(e),l=n.current;a.forEach(function(o){i.has(o)||rd(o,null)}),i.forEach(function(o){a.has(o)||rd(o,l)})}Zv.set(n,e)},[e]),n}function v4(e){return e}function b4(e,t){t===void 0&&(t=v4);var n=[],r=!1,a={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(i){var l=t(i,r);return n.push(l),function(){n=n.filter(function(o){return o!==l})}},assignSyncMedium:function(i){for(r=!0;n.length;){var l=n;n=[],l.forEach(i)}n={push:function(o){return i(o)},filter:function(){return n}}},assignMedium:function(i){r=!0;var l=[];if(n.length){var o=n;n=[],o.forEach(i),l=n}var s=function(){var c=l;l=[],c.forEach(i)},u=function(){return Promise.resolve().then(s)};u(),n={push:function(c){l.push(c),u()},filter:function(c){return l=l.filter(c),n}}}};return a}function S4(e){e===void 0&&(e={});var t=b4(null);return t.options=In({async:!0,ssr:!1},e),t}var nw=function(e){var t=e.sideCar,n=tw(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 v.createElement(r,In({},n))};nw.isSideCarExport=!0;function x4(e,t){return e.useMedium(t),nw}var rw=S4(),ad=function(){},ef=v.forwardRef(function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:ad,onWheelCapture:ad,onTouchMoveCapture:ad}),a=r[0],i=r[1],l=e.forwardProps,o=e.children,s=e.className,u=e.removeScrollBar,c=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,b=e.noIsolation,y=e.inert,_=e.allowPinchZoom,p=e.as,g=p===void 0?"div":p,m=e.gapMode,S=tw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),k=d,E=y4([n,t]),T=In(In({},S),a);return v.createElement(v.Fragment,null,c&&v.createElement(k,{sideCar:rw,removeScrollBar:u,shards:f,noRelative:h,noIsolation:b,inert:y,setCallbacks:i,allowPinchZoom:!!_,lockRef:n,gapMode:m}),l?v.cloneElement(v.Children.only(o),In(In({},T),{ref:E})):v.createElement(g,In({},T,{className:s,ref:E}),o))});ef.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ef.classNames={fullWidth:Ru,zeroRight:zu};var _4=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function w4(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_4();return t&&e.setAttribute("nonce",t),e}function E4(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function C4(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var T4=function(){var e=0,t=null;return{add:function(n){e==0&&(t=w4())&&(E4(t,n),C4(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},A4=function(){var e=T4();return function(t,n){v.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},aw=function(){var e=A4(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},k4={left:0,top:0,right:0,gap:0},id=function(e){return parseInt(e||"",10)||0},O4=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[id(n),id(r),id(a)]},N4=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return k4;var t=O4(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])}},z4=aw(),il="data-scroll-locked",R4=function(e,t,n,r){var a=e.left,i=e.top,l=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
124
|
+
.`.concat(h4,` {
|
|
125
|
+
overflow: hidden `).concat(r,`;
|
|
126
|
+
padding-right: `).concat(o,"px ").concat(r,`;
|
|
127
|
+
}
|
|
128
|
+
body[`).concat(il,`] {
|
|
129
|
+
overflow: hidden `).concat(r,`;
|
|
130
|
+
overscroll-behavior: contain;
|
|
131
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
132
|
+
padding-left: `.concat(a,`px;
|
|
133
|
+
padding-top: `).concat(i,`px;
|
|
134
|
+
padding-right: `).concat(l,`px;
|
|
135
|
+
margin-left:0;
|
|
136
|
+
margin-top:0;
|
|
137
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
138
|
+
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.`).concat(zu,` {
|
|
142
|
+
right: `).concat(o,"px ").concat(r,`;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.`).concat(Ru,` {
|
|
146
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.`).concat(zu," .").concat(zu,` {
|
|
150
|
+
right: 0 `).concat(r,`;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.`).concat(Ru," .").concat(Ru,` {
|
|
154
|
+
margin-right: 0 `).concat(r,`;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
body[`).concat(il,`] {
|
|
158
|
+
`).concat(p4,": ").concat(o,`px;
|
|
159
|
+
}
|
|
160
|
+
`)},Hv=function(){var e=parseInt(document.body.getAttribute(il)||"0",10);return isFinite(e)?e:0},M4=function(){v.useEffect(function(){return document.body.setAttribute(il,(Hv()+1).toString()),function(){var e=Hv()-1;e<=0?document.body.removeAttribute(il):document.body.setAttribute(il,e.toString())}},[])},j4=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;M4();var i=v.useMemo(function(){return N4(a)},[a]);return v.createElement(z4,{styles:R4(i,!t,a,n?"":"!important")})},Vh=!1;if(typeof window<"u")try{var tu=Object.defineProperty({},"passive",{get:function(){return Vh=!0,!0}});window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch{Vh=!1}var ki=Vh?{passive:!1}:!1,D4=function(e){return e.tagName==="TEXTAREA"},iw=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!D4(e)&&n[t]==="visible")},L4=function(e){return iw(e,"overflowY")},U4=function(e){return iw(e,"overflowX")},Fv=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=lw(e,r);if(a){var i=ow(e,r),l=i[1],o=i[2];if(l>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},P4=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},B4=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},lw=function(e,t){return e==="v"?L4(t):U4(t)},ow=function(e,t){return e==="v"?P4(t):B4(t)},$4=function(e,t){return e==="h"&&t==="rtl"?-1:1},I4=function(e,t,n,r,a){var i=$4(e,window.getComputedStyle(t).direction),l=i*r,o=n.target,s=t.contains(o),u=!1,c=l>0,f=0,d=0;do{if(!o)break;var h=ow(e,o),b=h[0],y=h[1],_=h[2],p=y-_-i*b;(b||p)&&lw(e,o)&&(f+=p,d+=b);var g=o.parentNode;o=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!s&&o!==document.body||s&&(t.contains(o)||t===o));return(c&&Math.abs(f)<1||!c&&Math.abs(d)<1)&&(u=!0),u},nu=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qv=function(e){return[e.deltaX,e.deltaY]},Gv=function(e){return e&&"current"in e?e.current:e},Z4=function(e,t){return e[0]===t[0]&&e[1]===t[1]},H4=function(e){return`
|
|
161
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
162
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
163
|
+
`)},F4=0,Oi=[];function q4(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),a=v.useState(F4++)[0],i=v.useState(aw)[0],l=v.useRef(e);v.useEffect(function(){l.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var y=d4([e.lockRef.current],(e.shards||[]).map(Gv),!0).filter(Boolean);return y.forEach(function(_){return _.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),y.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var o=v.useCallback(function(y,_){if("touches"in y&&y.touches.length===2||y.type==="wheel"&&y.ctrlKey)return!l.current.allowPinchZoom;var p=nu(y),g=n.current,m="deltaX"in y?y.deltaX:g[0]-p[0],S="deltaY"in y?y.deltaY:g[1]-p[1],k,E=y.target,T=Math.abs(m)>Math.abs(S)?"h":"v";if("touches"in y&&T==="h"&&E.type==="range")return!1;var O=window.getSelection(),z=O&&O.anchorNode,P=z?z===E||z.contains(E):!1;if(P)return!1;var $=Fv(T,E);if(!$)return!0;if($?k=T:(k=T==="v"?"h":"v",$=Fv(T,E)),!$)return!1;if(!r.current&&"changedTouches"in y&&(m||S)&&(r.current=k),!k)return!0;var B=r.current||k;return I4(B,_,y,B==="h"?m:S)},[]),s=v.useCallback(function(y){var _=y;if(!(!Oi.length||Oi[Oi.length-1]!==i)){var p="deltaY"in _?qv(_):nu(_),g=t.current.filter(function(k){return k.name===_.type&&(k.target===_.target||_.target===k.shadowParent)&&Z4(k.delta,p)})[0];if(g&&g.should){_.cancelable&&_.preventDefault();return}if(!g){var m=(l.current.shards||[]).map(Gv).filter(Boolean).filter(function(k){return k.contains(_.target)}),S=m.length>0?o(_,m[0]):!l.current.noIsolation;S&&_.cancelable&&_.preventDefault()}}},[]),u=v.useCallback(function(y,_,p,g){var m={name:y,delta:_,target:p,should:g,shadowParent:G4(p)};t.current.push(m),setTimeout(function(){t.current=t.current.filter(function(S){return S!==m})},1)},[]),c=v.useCallback(function(y){n.current=nu(y),r.current=void 0},[]),f=v.useCallback(function(y){u(y.type,qv(y),y.target,o(y,e.lockRef.current))},[]),d=v.useCallback(function(y){u(y.type,nu(y),y.target,o(y,e.lockRef.current))},[]);v.useEffect(function(){return Oi.push(i),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",s,ki),document.addEventListener("touchmove",s,ki),document.addEventListener("touchstart",c,ki),function(){Oi=Oi.filter(function(y){return y!==i}),document.removeEventListener("wheel",s,ki),document.removeEventListener("touchmove",s,ki),document.removeEventListener("touchstart",c,ki)}},[]);var h=e.removeScrollBar,b=e.inert;return v.createElement(v.Fragment,null,b?v.createElement(i,{styles:H4(a)}):null,h?v.createElement(j4,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function G4(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const V4=x4(rw,q4);var sw=v.forwardRef(function(e,t){return v.createElement(ef,In({},e,{ref:t,sideCar:V4}))});sw.classNames=ef.classNames;var Q4=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Ni=new WeakMap,ru=new WeakMap,au={},ld=0,uw=function(e){return e&&(e.host||uw(e.parentNode))},Y4=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=uw(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})},X4=function(e,t,n,r){var a=Y4(t,Array.isArray(e)?e:[e]);au[n]||(au[n]=new WeakMap);var i=au[n],l=[],o=new Set,s=new Set(a),u=function(f){!f||o.has(f)||(o.add(f),u(f.parentNode))};a.forEach(u);var c=function(f){!f||s.has(f)||Array.prototype.forEach.call(f.children,function(d){if(o.has(d))c(d);else try{var h=d.getAttribute(r),b=h!==null&&h!=="false",y=(Ni.get(d)||0)+1,_=(i.get(d)||0)+1;Ni.set(d,y),i.set(d,_),l.push(d),y===1&&b&&ru.set(d,!0),_===1&&d.setAttribute(n,"true"),b||d.setAttribute(r,"true")}catch(p){console.error("aria-hidden: cannot operate on ",d,p)}})};return c(t),o.clear(),ld++,function(){l.forEach(function(f){var d=Ni.get(f)-1,h=i.get(f)-1;Ni.set(f,d),i.set(f,h),d||(ru.has(f)||f.removeAttribute(r),ru.delete(f)),h||f.removeAttribute(n)}),ld--,ld||(Ni=new WeakMap,Ni=new WeakMap,ru=new WeakMap,au={})}},J4=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Q4(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),X4(r,a,n,"aria-hidden")):function(){return null}},cw="Dialog",[fw]=zm(cw),[t8,Wn]=fw(cw),dw="DialogTrigger",K4=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wn(dw,n),i=bi(t,a.triggerRef);return x.jsx(Dt.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":jm(a.open),...r,ref:i,onClick:ba(e.onClick,a.onOpenToggle)})});K4.displayName=dw;var W4="DialogPortal",[n8,hw]=fw(W4,{forceMount:void 0}),Sc="DialogOverlay",pw=v.forwardRef((e,t)=>{const n=hw(Sc,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Wn(Sc,e.__scopeDialog);return i.modal?x.jsx(Rm,{present:r||i.open,children:x.jsx(t6,{...a,ref:t})}):null});pw.displayName=Sc;var e6=Nm("DialogOverlay.RemoveScroll"),t6=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wn(Sc,n);return x.jsx(sw,{as:e6,allowPinchZoom:!0,shards:[a.contentRef],children:x.jsx(Dt.div,{"data-state":jm(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),di="DialogContent",mw=v.forwardRef((e,t)=>{const n=hw(di,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,i=Wn(di,e.__scopeDialog);return x.jsx(Rm,{present:r||i.open,children:i.modal?x.jsx(n6,{...a,ref:t}):x.jsx(r6,{...a,ref:t})})});mw.displayName=di;var n6=v.forwardRef((e,t)=>{const n=Wn(di,e.__scopeDialog),r=v.useRef(null),a=bi(t,n.contentRef,r);return v.useEffect(()=>{const i=r.current;if(i)return J4(i)},[]),x.jsx(gw,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:ba(e.onCloseAutoFocus,i=>{var l;i.preventDefault(),(l=n.triggerRef.current)==null||l.focus()}),onPointerDownOutside:ba(e.onPointerDownOutside,i=>{const l=i.detail.originalEvent,o=l.button===0&&l.ctrlKey===!0;(l.button===2||o)&&i.preventDefault()}),onFocusOutside:ba(e.onFocusOutside,i=>i.preventDefault())})}),r6=v.forwardRef((e,t)=>{const n=Wn(di,e.__scopeDialog),r=v.useRef(!1),a=v.useRef(!1);return x.jsx(gw,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:i=>{var l,o;(l=e.onCloseAutoFocus)==null||l.call(e,i),i.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),i.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:i=>{var s,u;(s=e.onInteractOutside)==null||s.call(e,i),i.defaultPrevented||(r.current=!0,i.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const l=i.target;((u=n.triggerRef.current)==null?void 0:u.contains(l))&&i.preventDefault(),i.detail.originalEvent.type==="focusin"&&a.current&&i.preventDefault()}})}),gw=v.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:i,...l}=e,o=Wn(di,n),s=v.useRef(null),u=bi(t,s);return f4(),x.jsxs(x.Fragment,{children:[x.jsx(W_,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:i,children:x.jsx(J_,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":jm(o.open),...l,ref:u,onDismiss:()=>o.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(o6,{titleId:o.titleId}),x.jsx(u6,{contentRef:s,descriptionId:o.descriptionId})]})]})}),Mm="DialogTitle",a6=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wn(Mm,n);return x.jsx(Dt.h2,{id:a.titleId,...r,ref:t})});a6.displayName=Mm;var yw="DialogDescription",i6=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wn(yw,n);return x.jsx(Dt.p,{id:a.descriptionId,...r,ref:t})});i6.displayName=yw;var vw="DialogClose",l6=v.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,a=Wn(vw,n);return x.jsx(Dt.button,{type:"button",...r,ref:t,onClick:ba(e.onClick,()=>a.onOpenChange(!1))})});l6.displayName=vw;function jm(e){return e?"open":"closed"}var bw="DialogTitleWarning",[r8,Sw]=q3(bw,{contentName:di,titleName:Mm,docsSlug:"dialog"}),o6=({titleId:e})=>{const t=Sw(bw),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
164
|
+
|
|
165
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
166
|
+
|
|
167
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},s6="DialogDescriptionWarning",u6=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Sw(s6).contentName}}.`;return v.useEffect(()=>{var i;const a=(i=e.current)==null?void 0:i.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},c6=pw,f6=mw,xw={exports:{}},_w={};/**
|
|
168
|
+
* @license React
|
|
169
|
+
* use-sync-external-store-shim.production.js
|
|
170
|
+
*
|
|
171
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the MIT license found in the
|
|
174
|
+
* LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/var Ll=v;function d6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var h6=typeof Object.is=="function"?Object.is:d6,p6=Ll.useState,m6=Ll.useEffect,g6=Ll.useLayoutEffect,y6=Ll.useDebugValue;function v6(e,t){var n=t(),r=p6({inst:{value:n,getSnapshot:t}}),a=r[0].inst,i=r[1];return g6(function(){a.value=n,a.getSnapshot=t,od(a)&&i({inst:a})},[e,n,t]),m6(function(){return od(a)&&i({inst:a}),e(function(){od(a)&&i({inst:a})})},[e]),y6(n),n}function od(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!h6(e,n)}catch{return!0}}function b6(e,t){return t()}var S6=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?b6:v6;_w.useSyncExternalStore=Ll.useSyncExternalStore!==void 0?Ll.useSyncExternalStore:S6;xw.exports=_w;var x6=xw.exports;function _6(){return x6.useSyncExternalStore(w6,()=>!0,()=>!1)}function w6(){return()=>{}}var Dm="Avatar",[E6]=zm(Dm),[C6,ww]=E6(Dm),Ew=v.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[a,i]=v.useState("idle");return x.jsx(C6,{scope:n,imageLoadingStatus:a,onImageLoadingStatusChange:i,children:x.jsx(Dt.span,{...r,ref:t})})});Ew.displayName=Dm;var Cw="AvatarImage",Tw=v.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:a=()=>{},...i}=e,l=ww(Cw,n),o=T6(r,i),s=Dl(u=>{a(u),l.onImageLoadingStatusChange(u)});return rs(()=>{o!=="idle"&&s(o)},[o,s]),o==="loaded"?x.jsx(Dt.img,{...i,ref:t,src:r}):null});Tw.displayName=Cw;var Aw="AvatarFallback",kw=v.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...a}=e,i=ww(Aw,n),[l,o]=v.useState(r===void 0);return v.useEffect(()=>{if(r!==void 0){const s=window.setTimeout(()=>o(!0),r);return()=>window.clearTimeout(s)}},[r]),l&&i.imageLoadingStatus!=="loaded"?x.jsx(Dt.span,{...a,ref:t}):null});kw.displayName=Aw;function Vv(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function T6(e,{referrerPolicy:t,crossOrigin:n}){const r=_6(),a=v.useRef(null),i=r?(a.current||(a.current=new window.Image),a.current):null,[l,o]=v.useState(()=>Vv(i,e));return rs(()=>{o(Vv(i,e))},[i,e]),rs(()=>{const s=f=>()=>{o(f)};if(!i)return;const u=s("loaded"),c=s("error");return i.addEventListener("load",u),i.addEventListener("error",c),t&&(i.referrerPolicy=t),typeof n=="string"&&(i.crossOrigin=n),()=>{i.removeEventListener("load",u),i.removeEventListener("error",c)}},[i,n,t]),l}var A6=Ew,k6=Tw,O6=kw,N6="Label",Ow=v.forwardRef((e,t)=>x.jsx(Dt.label,{...e,ref:t,onMouseDown:n=>{var a;n.target.closest("button, input, select, textarea")||((a=e.onMouseDown)==null||a.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ow.displayName=N6;var z6=Ow,Lm="Progress",Um=100,[R6]=zm(Lm),[M6,j6]=R6(Lm),Nw=v.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:a,getValueLabel:i=D6,...l}=e;(a||a===0)&&!Qv(a)&&console.error(L6(`${a}`,"Progress"));const o=Qv(a)?a:Um;r!==null&&!Yv(r,o)&&console.error(U6(`${r}`,"Progress"));const s=Yv(r,o)?r:null,u=xc(s)?i(s,o):void 0;return x.jsx(M6,{scope:n,value:s,max:o,children:x.jsx(Dt.div,{"aria-valuemax":o,"aria-valuemin":0,"aria-valuenow":xc(s)?s:void 0,"aria-valuetext":u,role:"progressbar","data-state":Mw(s,o),"data-value":s??void 0,"data-max":o,...l,ref:t})})});Nw.displayName=Lm;var zw="ProgressIndicator",Rw=v.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,a=j6(zw,n);return x.jsx(Dt.div,{"data-state":Mw(a.value,a.max),"data-value":a.value??void 0,"data-max":a.max,...r,ref:t})});Rw.displayName=zw;function D6(e,t){return`${Math.round(e/t*100)}%`}function Mw(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function xc(e){return typeof e=="number"}function Qv(e){return xc(e)&&!isNaN(e)&&e>0}function Yv(e,t){return xc(e)&&!isNaN(e)&&e<=t&&e>=0}function L6(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Um}\`.`}function U6(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
|
|
176
|
+
- a positive number
|
|
177
|
+
- less than the value passed to \`max\` (or ${Um} if no \`max\` prop is set)
|
|
178
|
+
- \`null\` or \`undefined\` if the progress is indeterminate.
|
|
179
|
+
|
|
180
|
+
Defaulting to \`null\`.`}var P6=Nw,B6=Rw,$6="Separator",Xv="horizontal",I6=["horizontal","vertical"],jw=v.forwardRef((e,t)=>{const{decorative:n,orientation:r=Xv,...a}=e,i=Z6(r)?r:Xv,o=n?{role:"none"}:{"aria-orientation":i==="vertical"?i:void 0,role:"separator"};return x.jsx(Dt.div,{"data-orientation":i,...o,...a,ref:t})});jw.displayName=$6;function Z6(e){return I6.includes(e)}var H6=jw;const F6=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},q6=(e,t)=>({classGroupId:e,validator:t}),Dw=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),_c="-",Jv=[],G6="arbitrary..",V6=e=>{const t=Y6(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:l=>{if(l.startsWith("[")&&l.endsWith("]"))return Q6(l);const o=l.split(_c),s=o[0]===""&&o.length>1?1:0;return Lw(o,s,t)},getConflictingClassGroupIds:(l,o)=>{if(o){const s=r[l],u=n[l];return s?u?F6(u,s):s:u||Jv}return n[l]||Jv}}},Lw=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const a=e[t],i=n.nextPart.get(a);if(i){const u=Lw(e,t+1,i);if(u)return u}const l=n.validators;if(l===null)return;const o=t===0?e.join(_c):e.slice(t).join(_c),s=l.length;for(let u=0;u<s;u++){const c=l[u];if(c.validator(o))return c.classGroupId}},Q6=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?G6+r:void 0})(),Y6=e=>{const{theme:t,classGroups:n}=e;return X6(n,t)},X6=(e,t)=>{const n=Dw();for(const r in e){const a=e[r];Pm(a,n,r,t)}return n},Pm=(e,t,n,r)=>{const a=e.length;for(let i=0;i<a;i++){const l=e[i];J6(l,t,n,r)}},J6=(e,t,n,r)=>{if(typeof e=="string"){K6(e,t,n);return}if(typeof e=="function"){W6(e,t,n,r);return}eL(e,t,n,r)},K6=(e,t,n)=>{const r=e===""?t:Uw(t,e);r.classGroupId=n},W6=(e,t,n,r)=>{if(tL(e)){Pm(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(q6(n,e))},eL=(e,t,n,r)=>{const a=Object.entries(e),i=a.length;for(let l=0;l<i;l++){const[o,s]=a[l];Pm(s,Uw(t,o),n,r)}},Uw=(e,t)=>{let n=e;const r=t.split(_c),a=r.length;for(let i=0;i<a;i++){const l=r[i];let o=n.nextPart.get(l);o||(o=Dw(),n.nextPart.set(l,o)),n=o}return n},tL=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,nL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const a=(i,l)=>{n[i]=l,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(i){let l=n[i];if(l!==void 0)return l;if((l=r[i])!==void 0)return a(i,l),l},set(i,l){i in n?n[i]=l:a(i,l)}}},Qh="!",Kv=":",rL=[],Wv=(e,t,n,r,a)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:a}),aL=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=a=>{const i=[];let l=0,o=0,s=0,u;const c=a.length;for(let y=0;y<c;y++){const _=a[y];if(l===0&&o===0){if(_===Kv){i.push(a.slice(s,y)),s=y+1;continue}if(_==="/"){u=y;continue}}_==="["?l++:_==="]"?l--:_==="("?o++:_===")"&&o--}const f=i.length===0?a:a.slice(s);let d=f,h=!1;f.endsWith(Qh)?(d=f.slice(0,-1),h=!0):f.startsWith(Qh)&&(d=f.slice(1),h=!0);const b=u&&u>s?u-s:void 0;return Wv(i,h,d,b)};if(t){const a=t+Kv,i=r;r=l=>l.startsWith(a)?i(l.slice(a.length)):Wv(rL,!1,l,void 0,!0)}if(n){const a=r;r=i=>n({className:i,parseClassName:a})}return r},iL=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let a=[];for(let i=0;i<n.length;i++){const l=n[i],o=l[0]==="[",s=t.has(l);o||s?(a.length>0&&(a.sort(),r.push(...a),a=[]),r.push(l)):a.push(l)}return a.length>0&&(a.sort(),r.push(...a)),r}},lL=e=>({cache:nL(e.cacheSize),parseClassName:aL(e),sortModifiers:iL(e),...V6(e)}),oL=/\s+/,sL=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:a,sortModifiers:i}=t,l=[],o=e.trim().split(oL);let s="";for(let u=o.length-1;u>=0;u-=1){const c=o[u],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:y}=n(c);if(f){s=c+(s.length>0?" "+s:s);continue}let _=!!y,p=r(_?b.substring(0,y):b);if(!p){if(!_){s=c+(s.length>0?" "+s:s);continue}if(p=r(b),!p){s=c+(s.length>0?" "+s:s);continue}_=!1}const g=d.length===0?"":d.length===1?d[0]:i(d).join(":"),m=h?g+Qh:g,S=m+p;if(l.indexOf(S)>-1)continue;l.push(S);const k=a(p,_);for(let E=0;E<k.length;++E){const T=k[E];l.push(m+T)}s=c+(s.length>0?" "+s:s)}return s},uL=(...e)=>{let t=0,n,r,a="";for(;t<e.length;)(n=e[t++])&&(r=Pw(n))&&(a&&(a+=" "),a+=r);return a},Pw=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Pw(e[r]))&&(n&&(n+=" "),n+=t);return n},cL=(e,...t)=>{let n,r,a,i;const l=s=>{const u=t.reduce((c,f)=>f(c),e());return n=lL(u),r=n.cache.get,a=n.cache.set,i=o,o(s)},o=s=>{const u=r(s);if(u)return u;const c=sL(s,n);return a(s,c),c};return i=l,(...s)=>i(uL(...s))},fL=[],ct=e=>{const t=n=>n[e]||fL;return t.isThemeGetter=!0,t},Bw=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,$w=/^\((?:(\w[\w-]*):)?(.+)\)$/i,dL=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,hL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,pL=/\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$/,mL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,gL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,yL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mr=e=>dL.test(e),ce=e=>!!e&&!Number.isNaN(Number(e)),jr=e=>!!e&&Number.isInteger(Number(e)),sd=e=>e.endsWith("%")&&ce(e.slice(0,-1)),lr=e=>hL.test(e),Iw=()=>!0,vL=e=>pL.test(e)&&!mL.test(e),Bm=()=>!1,bL=e=>gL.test(e),SL=e=>yL.test(e),xL=e=>!J(e)&&!K(e),_L=e=>za(e,Fw,Bm),J=e=>Bw.test(e),La=e=>za(e,qw,vL),eb=e=>za(e,NL,ce),wL=e=>za(e,Vw,Iw),EL=e=>za(e,Gw,Bm),tb=e=>za(e,Zw,Bm),CL=e=>za(e,Hw,SL),iu=e=>za(e,Qw,bL),K=e=>$w.test(e),oo=e=>Si(e,qw),TL=e=>Si(e,Gw),nb=e=>Si(e,Zw),AL=e=>Si(e,Fw),kL=e=>Si(e,Hw),lu=e=>Si(e,Qw,!0),OL=e=>Si(e,Vw,!0),za=(e,t,n)=>{const r=Bw.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Si=(e,t,n=!1)=>{const r=$w.exec(e);return r?r[1]?t(r[1]):n:!1},Zw=e=>e==="position"||e==="percentage",Hw=e=>e==="image"||e==="url",Fw=e=>e==="length"||e==="size"||e==="bg-size",qw=e=>e==="length",NL=e=>e==="number",Gw=e=>e==="family-name",Vw=e=>e==="number"||e==="weight",Qw=e=>e==="shadow",zL=()=>{const e=ct("color"),t=ct("font"),n=ct("text"),r=ct("font-weight"),a=ct("tracking"),i=ct("leading"),l=ct("breakpoint"),o=ct("container"),s=ct("spacing"),u=ct("radius"),c=ct("shadow"),f=ct("inset-shadow"),d=ct("text-shadow"),h=ct("drop-shadow"),b=ct("blur"),y=ct("perspective"),_=ct("aspect"),p=ct("ease"),g=ct("animate"),m=()=>["auto","avoid","all","avoid-page","page","left","right","column"],S=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],k=()=>[...S(),K,J],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],O=()=>[K,J,s],z=()=>[Mr,"full","auto",...O()],P=()=>[jr,"none","subgrid",K,J],$=()=>["auto",{span:["full",jr,K,J]},jr,K,J],B=()=>[jr,"auto",K,J],U=()=>["auto","min","max","fr",K,J],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...O()],q=()=>[Mr,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...O()],V=()=>[Mr,"screen","full","dvw","lvw","svw","min","max","fit",...O()],ae=()=>[Mr,"screen","full","lh","dvh","lvh","svh","min","max","fit",...O()],w=()=>[e,K,J],Me=()=>[...S(),nb,tb,{position:[K,J]}],qe=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",AL,_L,{size:[K,J]}],Ce=()=>[sd,oo,La],be=()=>["","none","full",u,K,J],de=()=>["",ce,oo,La],pn=()=>["solid","dashed","dotted","double"],Lt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ze=()=>[ce,sd,nb,tb],Nn=()=>["","none",b,K,J],zn=()=>["none",ce,K,J],Nr=()=>["none",ce,K,J],Ma=()=>[ce,K,J],zr=()=>[Mr,"full",...O()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[lr],breakpoint:[lr],color:[Iw],container:[lr],"drop-shadow":[lr],ease:["in","out","in-out"],font:[xL],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[lr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[lr],shadow:[lr],spacing:["px",ce],text:[lr],"text-shadow":[lr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Mr,J,K,_]}],container:["container"],columns:[{columns:[ce,J,K,o]}],"break-after":[{"break-after":m()}],"break-before":[{"break-before":m()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:k()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:z()}],"inset-x":[{"inset-x":z()}],"inset-y":[{"inset-y":z()}],start:[{"inset-s":z(),start:z()}],end:[{"inset-e":z(),end:z()}],"inset-bs":[{"inset-bs":z()}],"inset-be":[{"inset-be":z()}],top:[{top:z()}],right:[{right:z()}],bottom:[{bottom:z()}],left:[{left:z()}],visibility:["visible","invisible","collapse"],z:[{z:[jr,"auto",K,J]}],basis:[{basis:[Mr,"full","auto",o,...O()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[ce,Mr,"auto","initial","none",J]}],grow:[{grow:["",ce,K,J]}],shrink:[{shrink:["",ce,K,J]}],order:[{order:[jr,"first","last","none",K,J]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":B()}],"row-end":[{"row-end":B()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:O()}],"gap-x":[{"gap-x":O()}],"gap-y":[{"gap-y":O()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:O()}],px:[{px:O()}],py:[{py:O()}],ps:[{ps:O()}],pe:[{pe:O()}],pbs:[{pbs:O()}],pbe:[{pbe:O()}],pt:[{pt:O()}],pr:[{pr:O()}],pb:[{pb:O()}],pl:[{pl:O()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":O()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":O()}],"space-y-reverse":["space-y-reverse"],size:[{size:q()}],"inline-size":[{inline:["auto",...V()]}],"min-inline-size":[{"min-inline":["auto",...V()]}],"max-inline-size":[{"max-inline":["none",...V()]}],"block-size":[{block:["auto",...ae()]}],"min-block-size":[{"min-block":["auto",...ae()]}],"max-block-size":[{"max-block":["none",...ae()]}],w:[{w:[o,"screen",...q()]}],"min-w":[{"min-w":[o,"screen","none",...q()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[l]},...q()]}],h:[{h:["screen","lh",...q()]}],"min-h":[{"min-h":["screen","lh","none",...q()]}],"max-h":[{"max-h":["screen","lh",...q()]}],"font-size":[{text:["base",n,oo,La]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,OL,wL]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",sd,J]}],"font-family":[{font:[TL,EL,t]}],"font-features":[{"font-features":[J]}],"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:[a,K,J]}],"line-clamp":[{"line-clamp":[ce,"none",K,eb]}],leading:[{leading:[i,...O()]}],"list-image":[{"list-image":["none",K,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",K,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:w()}],"text-color":[{text:w()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...pn(),"wavy"]}],"text-decoration-thickness":[{decoration:[ce,"from-font","auto",K,La]}],"text-decoration-color":[{decoration:w()}],"underline-offset":[{"underline-offset":[ce,"auto",K,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:O()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",K,J]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",K,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Me()}],"bg-repeat":[{bg:qe()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jr,K,J],radial:["",K,J],conic:[jr,K,J]},kL,CL]}],"bg-color":[{bg:w()}],"gradient-from-pos":[{from:Ce()}],"gradient-via-pos":[{via:Ce()}],"gradient-to-pos":[{to:Ce()}],"gradient-from":[{from:w()}],"gradient-via":[{via:w()}],"gradient-to":[{to:w()}],rounded:[{rounded:be()}],"rounded-s":[{"rounded-s":be()}],"rounded-e":[{"rounded-e":be()}],"rounded-t":[{"rounded-t":be()}],"rounded-r":[{"rounded-r":be()}],"rounded-b":[{"rounded-b":be()}],"rounded-l":[{"rounded-l":be()}],"rounded-ss":[{"rounded-ss":be()}],"rounded-se":[{"rounded-se":be()}],"rounded-ee":[{"rounded-ee":be()}],"rounded-es":[{"rounded-es":be()}],"rounded-tl":[{"rounded-tl":be()}],"rounded-tr":[{"rounded-tr":be()}],"rounded-br":[{"rounded-br":be()}],"rounded-bl":[{"rounded-bl":be()}],"border-w":[{border:de()}],"border-w-x":[{"border-x":de()}],"border-w-y":[{"border-y":de()}],"border-w-s":[{"border-s":de()}],"border-w-e":[{"border-e":de()}],"border-w-bs":[{"border-bs":de()}],"border-w-be":[{"border-be":de()}],"border-w-t":[{"border-t":de()}],"border-w-r":[{"border-r":de()}],"border-w-b":[{"border-b":de()}],"border-w-l":[{"border-l":de()}],"divide-x":[{"divide-x":de()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":de()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...pn(),"hidden","none"]}],"divide-style":[{divide:[...pn(),"hidden","none"]}],"border-color":[{border:w()}],"border-color-x":[{"border-x":w()}],"border-color-y":[{"border-y":w()}],"border-color-s":[{"border-s":w()}],"border-color-e":[{"border-e":w()}],"border-color-bs":[{"border-bs":w()}],"border-color-be":[{"border-be":w()}],"border-color-t":[{"border-t":w()}],"border-color-r":[{"border-r":w()}],"border-color-b":[{"border-b":w()}],"border-color-l":[{"border-l":w()}],"divide-color":[{divide:w()}],"outline-style":[{outline:[...pn(),"none","hidden"]}],"outline-offset":[{"outline-offset":[ce,K,J]}],"outline-w":[{outline:["",ce,oo,La]}],"outline-color":[{outline:w()}],shadow:[{shadow:["","none",c,lu,iu]}],"shadow-color":[{shadow:w()}],"inset-shadow":[{"inset-shadow":["none",f,lu,iu]}],"inset-shadow-color":[{"inset-shadow":w()}],"ring-w":[{ring:de()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:w()}],"ring-offset-w":[{"ring-offset":[ce,La]}],"ring-offset-color":[{"ring-offset":w()}],"inset-ring-w":[{"inset-ring":de()}],"inset-ring-color":[{"inset-ring":w()}],"text-shadow":[{"text-shadow":["none",d,lu,iu]}],"text-shadow-color":[{"text-shadow":w()}],opacity:[{opacity:[ce,K,J]}],"mix-blend":[{"mix-blend":[...Lt(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Lt()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[ce]}],"mask-image-linear-from-pos":[{"mask-linear-from":ze()}],"mask-image-linear-to-pos":[{"mask-linear-to":ze()}],"mask-image-linear-from-color":[{"mask-linear-from":w()}],"mask-image-linear-to-color":[{"mask-linear-to":w()}],"mask-image-t-from-pos":[{"mask-t-from":ze()}],"mask-image-t-to-pos":[{"mask-t-to":ze()}],"mask-image-t-from-color":[{"mask-t-from":w()}],"mask-image-t-to-color":[{"mask-t-to":w()}],"mask-image-r-from-pos":[{"mask-r-from":ze()}],"mask-image-r-to-pos":[{"mask-r-to":ze()}],"mask-image-r-from-color":[{"mask-r-from":w()}],"mask-image-r-to-color":[{"mask-r-to":w()}],"mask-image-b-from-pos":[{"mask-b-from":ze()}],"mask-image-b-to-pos":[{"mask-b-to":ze()}],"mask-image-b-from-color":[{"mask-b-from":w()}],"mask-image-b-to-color":[{"mask-b-to":w()}],"mask-image-l-from-pos":[{"mask-l-from":ze()}],"mask-image-l-to-pos":[{"mask-l-to":ze()}],"mask-image-l-from-color":[{"mask-l-from":w()}],"mask-image-l-to-color":[{"mask-l-to":w()}],"mask-image-x-from-pos":[{"mask-x-from":ze()}],"mask-image-x-to-pos":[{"mask-x-to":ze()}],"mask-image-x-from-color":[{"mask-x-from":w()}],"mask-image-x-to-color":[{"mask-x-to":w()}],"mask-image-y-from-pos":[{"mask-y-from":ze()}],"mask-image-y-to-pos":[{"mask-y-to":ze()}],"mask-image-y-from-color":[{"mask-y-from":w()}],"mask-image-y-to-color":[{"mask-y-to":w()}],"mask-image-radial":[{"mask-radial":[K,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":ze()}],"mask-image-radial-to-pos":[{"mask-radial-to":ze()}],"mask-image-radial-from-color":[{"mask-radial-from":w()}],"mask-image-radial-to-color":[{"mask-radial-to":w()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":S()}],"mask-image-conic-pos":[{"mask-conic":[ce]}],"mask-image-conic-from-pos":[{"mask-conic-from":ze()}],"mask-image-conic-to-pos":[{"mask-conic-to":ze()}],"mask-image-conic-from-color":[{"mask-conic-from":w()}],"mask-image-conic-to-color":[{"mask-conic-to":w()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Me()}],"mask-repeat":[{mask:qe()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",K,J]}],filter:[{filter:["","none",K,J]}],blur:[{blur:Nn()}],brightness:[{brightness:[ce,K,J]}],contrast:[{contrast:[ce,K,J]}],"drop-shadow":[{"drop-shadow":["","none",h,lu,iu]}],"drop-shadow-color":[{"drop-shadow":w()}],grayscale:[{grayscale:["",ce,K,J]}],"hue-rotate":[{"hue-rotate":[ce,K,J]}],invert:[{invert:["",ce,K,J]}],saturate:[{saturate:[ce,K,J]}],sepia:[{sepia:["",ce,K,J]}],"backdrop-filter":[{"backdrop-filter":["","none",K,J]}],"backdrop-blur":[{"backdrop-blur":Nn()}],"backdrop-brightness":[{"backdrop-brightness":[ce,K,J]}],"backdrop-contrast":[{"backdrop-contrast":[ce,K,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",ce,K,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[ce,K,J]}],"backdrop-invert":[{"backdrop-invert":["",ce,K,J]}],"backdrop-opacity":[{"backdrop-opacity":[ce,K,J]}],"backdrop-saturate":[{"backdrop-saturate":[ce,K,J]}],"backdrop-sepia":[{"backdrop-sepia":["",ce,K,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":O()}],"border-spacing-x":[{"border-spacing-x":O()}],"border-spacing-y":[{"border-spacing-y":O()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",K,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[ce,"initial",K,J]}],ease:[{ease:["linear","initial",p,K,J]}],delay:[{delay:[ce,K,J]}],animate:[{animate:["none",g,K,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,K,J]}],"perspective-origin":[{"perspective-origin":k()}],rotate:[{rotate:zn()}],"rotate-x":[{"rotate-x":zn()}],"rotate-y":[{"rotate-y":zn()}],"rotate-z":[{"rotate-z":zn()}],scale:[{scale:Nr()}],"scale-x":[{"scale-x":Nr()}],"scale-y":[{"scale-y":Nr()}],"scale-z":[{"scale-z":Nr()}],"scale-3d":["scale-3d"],skew:[{skew:Ma()}],"skew-x":[{"skew-x":Ma()}],"skew-y":[{"skew-y":Ma()}],transform:[{transform:[K,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:k()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:zr()}],"translate-x":[{"translate-x":zr()}],"translate-y":[{"translate-y":zr()}],"translate-z":[{"translate-z":zr()}],"translate-none":["translate-none"],accent:[{accent:w()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:w()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",K,J]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":O()}],"scroll-mx":[{"scroll-mx":O()}],"scroll-my":[{"scroll-my":O()}],"scroll-ms":[{"scroll-ms":O()}],"scroll-me":[{"scroll-me":O()}],"scroll-mbs":[{"scroll-mbs":O()}],"scroll-mbe":[{"scroll-mbe":O()}],"scroll-mt":[{"scroll-mt":O()}],"scroll-mr":[{"scroll-mr":O()}],"scroll-mb":[{"scroll-mb":O()}],"scroll-ml":[{"scroll-ml":O()}],"scroll-p":[{"scroll-p":O()}],"scroll-px":[{"scroll-px":O()}],"scroll-py":[{"scroll-py":O()}],"scroll-ps":[{"scroll-ps":O()}],"scroll-pe":[{"scroll-pe":O()}],"scroll-pbs":[{"scroll-pbs":O()}],"scroll-pbe":[{"scroll-pbe":O()}],"scroll-pt":[{"scroll-pt":O()}],"scroll-pr":[{"scroll-pr":O()}],"scroll-pb":[{"scroll-pb":O()}],"scroll-pl":[{"scroll-pl":O()}],"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",K,J]}],fill:[{fill:["none",...w()]}],"stroke-w":[{stroke:[ce,oo,La,eb]}],stroke:[{stroke:["none",...w()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},RL=cL(zL);function ML(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const jL=Ze.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),tf=()=>{const e=Ze.useContext(jL);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};ML(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
|
|
181
|
+
[data-state=closed]
|
|
182
|
+
){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function DL(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function LL(...e){return t=>e.forEach(n=>DL(n,t))}function Yw(...e){return v.useCallback(LL(...e),e)}const rb=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function ud(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function UL(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const cd={DURATION:.5,EASE:[.32,.72,0,1]},PL=8,BL=26,$L=()=>()=>{};function IL(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=tf(),i=Ze.useRef(null),l=v.useMemo(()=>document.body.style.backgroundColor,[]);function o(){return(window.innerWidth-BL)/window.innerWidth}Ze.useEffect(()=>{if(t&&n){i.current&&clearTimeout(i.current);const s=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!s)return;UL(r&&!a?ud(document.body,{background:"black"}):$L,ud(s,{transformOrigin:rb(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${cd.DURATION}s`,transitionTimingFunction:`cubic-bezier(${cd.EASE.join(",")})`}));const u=ud(s,{borderRadius:`${PL}px`,overflow:"hidden",...rb(e)?{transform:`scale(${o()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${o()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),i.current=window.setTimeout(()=>{l?document.body.style.background=l:document.body.style.removeProperty("background")},cd.DURATION*1e3)}}},[t,n,l])}const ZL=Ze.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:i,isOpen:l,modal:o,shouldAnimate:s}=tf(),u=Yw(t,n),c=r&&r.length>0;if(!o)return null;const f=Ze.useCallback(d=>a(d),[a]);return Ze.createElement(c6,{onMouseUp:f,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":l&&c?"true":"false","data-vaul-snap-points-overlay":l&&i?"true":"false","data-vaul-animate":s!=null&&s.current?"true":"false",...e})});ZL.displayName="Drawer.Overlay";const HL=Ze.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:i,onPress:l,onRelease:o,onDrag:s,keyboardIsOpen:u,snapPointsOffset:c,activeSnapPointIndex:f,modal:d,isOpen:h,direction:b,snapPoints:y,container:_,handleOnly:p,shouldAnimate:g,autoFocus:m}=tf(),[S,k]=Ze.useState(!1),E=Yw(a,i),T=Ze.useRef(null),O=Ze.useRef(null),z=Ze.useRef(!1),P=y&&y.length>0;IL();const $=(U,H,F=0)=>{if(z.current)return!0;const D=Math.abs(U.y),q=Math.abs(U.x),V=q>D,ae=["bottom","right"].includes(H)?1:-1;if(H==="left"||H==="right"){if(!(U.x*ae<0)&&q>=0&&q<=F)return V}else if(!(U.y*ae<0)&&D>=0&&D<=F)return!V;return z.current=!0,!0};Ze.useEffect(()=>{P&&window.requestAnimationFrame(()=>{k(!0)})},[]);function B(U){T.current=null,z.current=!1,o(U)}return Ze.createElement(f6,{"data-vaul-drawer-direction":b,"data-vaul-drawer":"","data-vaul-delayed-snap-points":S?"true":"false","data-vaul-snap-points":h&&P?"true":"false","data-vaul-custom-container":_?"true":"false","data-vaul-animate":g!=null&&g.current?"true":"false",...r,ref:E,style:c&&c.length>0?{"--snap-point-height":`${c[f??0]}px`,...t}:t,onPointerDown:U=>{p||(r.onPointerDown==null||r.onPointerDown.call(r,U),T.current={x:U.pageX,y:U.pageY},l(U))},onOpenAutoFocus:U=>{n==null||n(U),m||U.preventDefault()},onPointerDownOutside:U=>{if(e==null||e(U),!d||U.defaultPrevented){U.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:U=>{if(!d){U.preventDefault();return}},onPointerMove:U=>{if(O.current=U,p||(r.onPointerMove==null||r.onPointerMove.call(r,U),!T.current))return;const H=U.pageY-T.current.y,F=U.pageX-T.current.x,D=U.pointerType==="touch"?10:2;$({x:F,y:H},b,D)?s(U):(Math.abs(F)>D||Math.abs(H)>D)&&(T.current=null)},onPointerUp:U=>{r.onPointerUp==null||r.onPointerUp.call(r,U),T.current=null,z.current=!1,o(U)},onPointerOut:U=>{r.onPointerOut==null||r.onPointerOut.call(r,U),B(O.current)},onContextMenu:U=>{r.onContextMenu==null||r.onContextMenu.call(r,U),O.current&&B(O.current)}})});HL.displayName="Drawer.Content";const FL=250,qL=120,GL=Ze.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:i,snapPoints:l,activeSnapPoint:o,setActiveSnapPoint:s,dismissible:u,handleOnly:c,isOpen:f,onPress:d,onDrag:h}=tf(),b=Ze.useRef(null),y=Ze.useRef(!1);function _(){if(y.current){m();return}window.setTimeout(()=>{p()},qL)}function p(){if(i||e||y.current){m();return}if(m(),!l||l.length===0){u||a();return}if(o===l[l.length-1]&&u){a();return}const k=l.findIndex(T=>T===o);if(k===-1)return;const E=l[k+1];s(E)}function g(){b.current=window.setTimeout(()=>{y.current=!0},FL)}function m(){b.current&&window.clearTimeout(b.current),y.current=!1}return Ze.createElement("div",{onClick:_,onPointerCancel:m,onPointerDown:S=>{c&&d(S),g()},onPointerMove:S=>{c&&h(S)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},Ze.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});GL.displayName="Drawer.Handle";function Ye(...e){return RL(Q_(e))}function VL({className:e,...t}){return x.jsx("div",{"data-slot":"card",className:Ye("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function QL({className:e,...t}){return x.jsx("div",{"data-slot":"card-header",className:Ye("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-2 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",e),...t})}function YL({className:e,...t}){return x.jsx("div",{"data-slot":"card-title",className:Ye("leading-none font-semibold",e),...t})}function XL({className:e,...t}){return x.jsx("div",{"data-slot":"card-description",className:Ye("text-muted-foreground text-sm",e),...t})}function JL({className:e,...t}){return x.jsx("div",{"data-slot":"card-content",className:Ye("px-6",e),...t})}function KL({className:e,...t}){return x.jsx(z6,{"data-slot":"label",className:Ye("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...t})}function WL({className:e,value:t,...n}){return x.jsx(P6,{"data-slot":"progress",className:Ye("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full",e),...n,children:x.jsx(B6,{"data-slot":"progress-indicator",className:"bg-primary h-full w-full flex-1 transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})})}function eU({className:e,orientation:t="horizontal",decorative:n=!0,...r}){return x.jsx(H6,{"data-slot":"separator",decorative:n,orientation:t,className:Ye("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",e),...r})}function tU({className:e,...t}){return x.jsx(A6,{"data-slot":"avatar",className:Ye("relative flex size-10 shrink-0 overflow-hidden rounded-full",e),...t})}function nU({className:e,...t}){return x.jsx(k6,{"data-slot":"avatar-image",className:Ye("aspect-square size-full",e),...t})}function rU({className:e,...t}){return x.jsx(O6,{"data-slot":"avatar-fallback",className:Ye("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var aU=L3("inline-flex items-center justify-center rounded-full border border-transparent px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border-border text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function iU({className:e,variant:t="default",asChild:n=!1,...r}){const a=n?U3:"span";return x.jsx(a,{"data-slot":"badge","data-variant":t,className:Ye(aU({variant:t}),e),...r})}v.createContext(null);function lU({className:e,...t}){return x.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:x.jsx("table",{"data-slot":"table",className:Ye("w-full caption-bottom text-sm",e),...t})})}function oU({className:e,...t}){return x.jsx("thead",{"data-slot":"table-header",className:Ye("[&_tr]:border-b",e),...t})}function sU({className:e,...t}){return x.jsx("tbody",{"data-slot":"table-body",className:Ye("[&_tr:last-child]:border-0",e),...t})}function ab({className:e,...t}){return x.jsx("tr",{"data-slot":"table-row",className:Ye("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",e),...t})}function uU({className:e,...t}){return x.jsx("th",{"data-slot":"table-head",className:Ye("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function cU({className:e,...t}){return x.jsx("td",{"data-slot":"table-cell",className:Ye("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",e),...t})}function fU({className:e,...t}){return x.jsx("caption",{"data-slot":"table-caption",className:Ye("text-muted-foreground mt-4 text-sm",e),...t})}function dU({className:e,...t}){return x.jsx("div",{"data-slot":"skeleton",className:Ye("bg-accent animate-pulse rounded-md",e),...t})}v.createContext({size:"default",variant:"default",spacing:0});var Wt={Card:({props:e,children:t})=>{const n=e.maxWidth==="sm"?"max-w-xs sm:min-w-[280px]":e.maxWidth==="md"?"max-w-sm sm:min-w-[320px]":e.maxWidth==="lg"?"max-w-md sm:min-w-[360px]":"w-full",r=e.centered?"mx-auto":"";return x.jsxs(VL,{className:Ye(n,r,e.className),children:[(e.title||e.description)&&x.jsxs(QL,{children:[e.title&&x.jsx(YL,{children:e.title}),e.description&&x.jsx(XL,{children:e.description})]}),x.jsx(JL,{className:"flex flex-col gap-3",children:t})]})},Stack:({props:e,children:t})=>{const n=e.direction==="horizontal",r={none:"gap-0",sm:"gap-2",md:"gap-3",lg:"gap-4",xl:"gap-6"},a={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},i={start:"",center:"justify-center",end:"justify-end",between:"justify-between",around:"justify-around"},l=r[e.gap??"md"]??"gap-3",o=a[e.align??"start"]??"items-start",s=i[e.justify??""]??"";return x.jsx("div",{className:Ye("flex",n?"flex-row flex-wrap":"flex-col",l,o,s,e.className),children:t})},Grid:({props:e,children:t})=>{const n={1:"grid-cols-1",2:"grid-cols-2",3:"grid-cols-3",4:"grid-cols-4",5:"grid-cols-5",6:"grid-cols-6"},r={sm:"gap-2",md:"gap-3",lg:"gap-4",xl:"gap-6"},a=Math.max(1,Math.min(6,e.columns??1)),i=n[a]??"grid-cols-1",l=r[e.gap??"md"]??"gap-3";return x.jsx("div",{className:Ye("grid",i,l,e.className),children:t})},Separator:({props:e})=>x.jsx(eU,{orientation:e.orientation??"horizontal",className:e.orientation==="vertical"?"h-full mx-2":"my-3"}),Table:({props:e})=>{const t=e.columns??[],n=(e.rows??[]).map(r=>r.map(String));return x.jsx("div",{className:"rounded-md border border-border overflow-hidden",children:x.jsxs(lU,{children:[e.caption&&x.jsx(fU,{children:e.caption}),x.jsx(oU,{children:x.jsx(ab,{children:t.map(r=>x.jsx(uU,{children:r},r))})}),x.jsx(sU,{children:n.map((r,a)=>x.jsx(ab,{children:r.map((i,l)=>x.jsx(cU,{children:i},l))},a))})]})})},Heading:({props:e})=>{const t=e.level??"h2",n=t==="h1"?"text-2xl font-bold":t==="h3"?"text-base font-semibold":t==="h4"?"text-sm font-semibold":"text-lg font-semibold";return t==="h1"?x.jsx("h1",{className:`${n} text-left`,children:e.text}):t==="h3"?x.jsx("h3",{className:`${n} text-left`,children:e.text}):t==="h4"?x.jsx("h4",{className:`${n} text-left`,children:e.text}):x.jsx("h2",{className:`${n} text-left`,children:e.text})},Text:({props:e})=>{const t=e.variant==="caption"?"text-xs":e.variant==="muted"?"text-sm text-muted-foreground":e.variant==="lead"?"text-xl text-muted-foreground":e.variant==="code"?"font-mono text-sm bg-muted px-1.5 py-0.5 rounded":"text-sm";return e.variant==="code"?x.jsx("code",{className:`${t} text-left`,children:e.text}):x.jsx("p",{className:`${t} text-left`,children:e.text})},Image:({props:e})=>e.src?x.jsx("img",{src:e.src,alt:e.alt??"",width:e.width??void 0,height:e.height??void 0,className:"rounded max-w-full"}):x.jsx("div",{className:"bg-muted border border-border rounded flex items-center justify-center text-xs text-muted-foreground",style:{width:e.width??80,height:e.height??60},children:e.alt||"img"}),Avatar:({props:e})=>{const t=e.name||"?",n=t.split(" ").map(a=>a[0]).join("").slice(0,2).toUpperCase(),r=e.size==="lg"?"h-12 w-12":e.size==="sm"?"h-8 w-8":"h-10 w-10";return x.jsxs(tU,{className:r,children:[e.src&&x.jsx(nU,{src:e.src,alt:t}),x.jsx(rU,{children:n})]})},Badge:({props:e})=>x.jsx(iU,{variant:e.variant??"default",children:e.text}),Progress:({props:e})=>{const t=Math.min(100,Math.max(0,e.value||0));return x.jsxs("div",{className:"space-y-2",children:[e.label&&x.jsx(KL,{className:"text-sm text-muted-foreground",children:e.label}),x.jsx(WL,{value:t})]})},Skeleton:({props:e})=>x.jsx(dU,{className:e.rounded?"rounded-full":"rounded-md",style:{width:e.width??"100%",height:e.height??"1.25rem"}}),Spinner:({props:e})=>{const t=e.size==="lg"?"h-8 w-8":e.size==="sm"?"h-4 w-4":"h-6 w-6";return x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsxs("svg",{className:`${t} animate-spin text-muted-foreground`,viewBox:"0 0 24 24",fill:"none",children:[x.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),x.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),e.label&&x.jsx("span",{className:"text-sm text-muted-foreground",children:e.label})]})}};function ib(e){if(typeof e!="string")return null;const t=e.trim();return t===""?null:t}function hU(e){switch(e){case"success":return ne.alertSuccess;case"warning":return ne.alertWarning;case"error":return ne.alertError;case"info":default:return ne.alertInfo}}function pU({props:e}){const t=ib(e.title),n=ib(e.message);return!t&&!n?null:x.jsxs("section",{className:`${ne.alertCard} ${hU(e.type)}`,role:"alert",children:[t?x.jsx("p",{className:ne.alertTitle,children:t}):null,n?x.jsx("p",{className:ne.alertMessage,children:n}):null]})}const Xw=v.createContext({approvalDisabled:!1});function mU(){return v.useContext(Xw)}function gU(e){return e instanceof Error&&e.message.trim()!==""?e.message:"Failed to send approval response."}function yU(e){return Array.isArray(e)?e.filter(t=>typeof(t==null?void 0:t.label)=="string"&&t.label.trim()!==""&&typeof t.value=="string"&&t.value.trim()!==""):[]}function vU(e){switch(e){case"destructive":return ne.approvalActionDestructive;case"secondary":return ne.approvalActionSecondary;default:return ne.approvalActionPrimary}}function bU({props:e}){const{approvalDisabled:t,onApprovalAction:n}=mU(),[r,a]=v.useState(null),[i,l]=v.useState(null),[o,s]=v.useState(null),u=yU(e.actions),c=Array.isArray(e.details)?e.details.filter(_=>typeof _=="string"&&_.trim()!==""):[],f=typeof e.replyHint=="string"?e.replyHint.trim():"",d=typeof e.title=="string"&&e.title.trim()!==""?e.title:"Approval requested",h=typeof e.badge=="string"&&e.badge.trim()!==""?e.badge:null,b=t||r!==null||i!==null;async function y(_){if(!(!n||b)){a(_),s(null);try{await n(_),l(_)}catch(p){s(gU(p))}finally{a(null)}}}return x.jsxs("section",{className:ne.approvalCard,children:[h?x.jsx("p",{className:ne.approvalBadge,children:h}):null,x.jsx("p",{className:ne.approvalTitle,children:d}),c.length>0?x.jsx("ul",{className:ne.approvalDetails,children:c.map(_=>x.jsx("li",{children:_},_))}):null,f!==""?x.jsxs("p",{className:ne.approvalHint,children:["Fallback reply: ",f]}):null,u.length>0?x.jsx("div",{className:ne.approvalActions,children:u.map(_=>x.jsx("button",{className:`${ne.approvalAction} ${vU(_.variant)}`,disabled:b||!n,onClick:()=>{y(_.value)},type:"button",children:r===_.value?"Sending...":_.label},`${_.value}:${_.label}`))}):null,i?x.jsxs("p",{className:ne.approvalStatus,children:["Sent response: ",i]}):null,o?x.jsx("p",{className:ne.approvalError,children:o}):null,!n&&u.length>0?x.jsx("p",{className:ne.approvalHint,children:"Buttons are unavailable in this view."}):null]})}const lb=["#2563eb","#0f766e","#d97706","#9333ea","#dc2626","#0891b2"],ou=140,fd=320,so=22,su=16,ob=4;function SU(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.label=="string"&&typeof t.value=="number"}function Jw(e){return Array.isArray(e)?e.flatMap(t=>{if(!SU(t))return[];const n=t.label.trim();return n===""||!Number.isFinite(t.value)?[]:[{color:typeof t.color=="string"&&t.color.trim()!==""?t.color:void 0,label:n,value:Math.max(0,t.value)}]}):[]}function Yh(e,t){return e.color??lb[t%lb.length]}function Kw(e,t){const n=typeof t=="number"&&Number.isFinite(t)&&t>0?t:0,r=e.reduce((a,i)=>Math.max(a,i.value),0);return Math.max(n,r,1)}function wc(e){if(typeof e!="string")return null;const t=e.trim();return t===""?null:t}function $m(e,t){switch(t.format){case"currency":return new Intl.NumberFormat("en-US",{currency:t.currency??"USD",maximumFractionDigits:e>=100?0:2,style:"currency"}).format(e);case"percent":return`${Number.isInteger(e)?e:e.toFixed(1)}%`;default:return new Intl.NumberFormat("en-US",{maximumFractionDigits:e>=100?0:2}).format(e)}}function Ww(e,t,n,r){const a=t??(e==="bar"?"Bar graph":"Line graph"),i=n.map(l=>`${l.label}: ${$m(l.value,r)}`).join(", ");return`${a}. ${i}`}function Ec(e,t){return!e&&!t?null:x.jsxs("div",{className:ne.graphHeader,children:[e?x.jsx("p",{className:ne.graphTitle,children:e}):null,t?x.jsx("p",{className:ne.graphDescription,children:t}):null]})}function eE(){return x.jsx("p",{className:ne.graphEmpty,children:"No graph data provided."})}function xU({props:e}){const t=wc(e.title),n=wc(e.description),r=Jw(e.data);if(r.length===0)return x.jsxs("section",{className:ne.graphCard,children:[Ec(t,n),eE()]});const a=Kw(r,e.maxValue);return x.jsxs("section",{className:ne.graphCard,children:[Ec(t,n),x.jsx("div",{"aria-label":Ww("bar",t,r,e),className:ne.barGraph,role:"img",children:x.jsx("div",{className:ne.barGraphPlot,children:r.map((i,l)=>{const o=`${Math.max(i.value/a*100,6)}%`;return x.jsxs("div",{className:ne.barGraphColumn,children:[x.jsx("span",{className:ne.graphValue,children:$m(i.value,e)}),x.jsx("div",{className:ne.barGraphTrack,children:x.jsx("div",{className:ne.barGraphBar,style:{background:Yh(i,l),height:o}})}),x.jsx("span",{className:ne.graphLabel,children:i.label})]},`${i.label}:${l}`)})})})]})}function _U({props:e}){const t=wc(e.title),n=wc(e.description),r=Jw(e.data);if(r.length===0)return x.jsxs("section",{className:ne.graphCard,children:[Ec(t,n),eE()]});const a=Kw(r,e.maxValue),i=fd-so*2,l=ou-su*2,o=r.length>1?i/(r.length-1):0,s=r.map((u,c)=>{const f=so+o*c,d=ou-su-u.value/a*l;return`${f},${d}`}).join(" ");return x.jsxs("section",{className:ne.graphCard,children:[Ec(t,n),x.jsxs("div",{"aria-label":Ww("line",t,r,e),className:ne.lineGraph,role:"img",children:[x.jsxs("svg",{"aria-hidden":"true",className:ne.lineGraphSvg,viewBox:`0 0 ${fd} ${ou}`,xmlns:"http://www.w3.org/2000/svg",children:[Array.from({length:ob+1},(u,c)=>{const f=su+l/ob*c;return x.jsx("line",{className:ne.lineGraphGrid,x1:so,x2:fd-so,y1:f,y2:f},c)}),x.jsx("polyline",{className:ne.lineGraphPath,points:s}),r.map((u,c)=>{const f=so+o*c,d=ou-su-u.value/a*l;return x.jsx("g",{children:x.jsx("circle",{className:ne.lineGraphPoint,cx:f,cy:d,r:"4",style:{fill:Yh(u,c)}})},`${u.label}:${c}`)})]}),x.jsx("div",{className:ne.lineGraphLegend,children:r.map((u,c)=>x.jsxs("div",{className:ne.lineGraphLegendItem,children:[x.jsx("span",{"aria-hidden":"true",className:ne.lineGraphLegendSwatch,style:{background:Yh(u,c)}}),x.jsx("span",{className:ne.graphLabel,children:u.label}),x.jsx("span",{className:ne.graphValue,children:$m(u.value,e)})]},`${u.label}:${c}`))})]})]})}function wU(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const EU=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,CU=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,TU={};function sb(e,t){return(TU.jsx?CU:EU).test(e)}const AU=/[ \t\n\f\r]/g;function kU(e){return typeof e=="object"?e.type==="text"?ub(e.value):!1:ub(e)}function ub(e){return e.replace(AU,"")===""}class Cs{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Cs.prototype.normal={};Cs.prototype.property={};Cs.prototype.space=void 0;function tE(e,t){const n={},r={};for(const a of e)Object.assign(n,a.property),Object.assign(r,a.normal);return new Cs(n,r,t)}function Xh(e){return e.toLowerCase()}class Jt{constructor(t,n){this.attribute=n,this.property=t}}Jt.prototype.attribute="";Jt.prototype.booleanish=!1;Jt.prototype.boolean=!1;Jt.prototype.commaOrSpaceSeparated=!1;Jt.prototype.commaSeparated=!1;Jt.prototype.defined=!1;Jt.prototype.mustUseProperty=!1;Jt.prototype.number=!1;Jt.prototype.overloadedBoolean=!1;Jt.prototype.property="";Jt.prototype.spaceSeparated=!1;Jt.prototype.space=void 0;let OU=0;const ue=xi(),at=xi(),Jh=xi(),Z=xi(),De=xi(),ll=xi(),en=xi();function xi(){return 2**++OU}const Kh=Object.freeze(Object.defineProperty({__proto__:null,boolean:ue,booleanish:at,commaOrSpaceSeparated:en,commaSeparated:ll,number:Z,overloadedBoolean:Jh,spaceSeparated:De},Symbol.toStringTag,{value:"Module"})),dd=Object.keys(Kh);class Im extends Jt{constructor(t,n,r,a){let i=-1;if(super(t,n),cb(this,"space",a),typeof r=="number")for(;++i<dd.length;){const l=dd[i];cb(this,dd[i],(r&Kh[l])===Kh[l])}}}Im.prototype.defined=!0;function cb(e,t,n){n&&(e[t]=n)}function Yl(e){const t={},n={};for(const[r,a]of Object.entries(e.properties)){const i=new Im(r,e.transform(e.attributes||{},r),a,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(i.mustUseProperty=!0),t[r]=i,n[Xh(r)]=r,n[Xh(i.attribute)]=r}return new Cs(t,n,e.space)}const nE=Yl({properties:{ariaActiveDescendant:null,ariaAtomic:at,ariaAutoComplete:null,ariaBusy:at,ariaChecked:at,ariaColCount:Z,ariaColIndex:Z,ariaColSpan:Z,ariaControls:De,ariaCurrent:null,ariaDescribedBy:De,ariaDetails:null,ariaDisabled:at,ariaDropEffect:De,ariaErrorMessage:null,ariaExpanded:at,ariaFlowTo:De,ariaGrabbed:at,ariaHasPopup:null,ariaHidden:at,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:De,ariaLevel:Z,ariaLive:null,ariaModal:at,ariaMultiLine:at,ariaMultiSelectable:at,ariaOrientation:null,ariaOwns:De,ariaPlaceholder:null,ariaPosInSet:Z,ariaPressed:at,ariaReadOnly:at,ariaRelevant:null,ariaRequired:at,ariaRoleDescription:De,ariaRowCount:Z,ariaRowIndex:Z,ariaRowSpan:Z,ariaSelected:at,ariaSetSize:Z,ariaSort:null,ariaValueMax:Z,ariaValueMin:Z,ariaValueNow:Z,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function rE(e,t){return t in e?e[t]:t}function aE(e,t){return rE(e,t.toLowerCase())}const NU=Yl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ll,acceptCharset:De,accessKey:De,action:null,allow:null,allowFullScreen:ue,allowPaymentRequest:ue,allowUserMedia:ue,alt:null,as:null,async:ue,autoCapitalize:null,autoComplete:De,autoFocus:ue,autoPlay:ue,blocking:De,capture:null,charSet:null,checked:ue,cite:null,className:De,cols:Z,colSpan:null,content:null,contentEditable:at,controls:ue,controlsList:De,coords:Z|ll,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ue,defer:ue,dir:null,dirName:null,disabled:ue,download:Jh,draggable:at,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ue,formTarget:null,headers:De,height:Z,hidden:Jh,high:Z,href:null,hrefLang:null,htmlFor:De,httpEquiv:De,id:null,imageSizes:null,imageSrcSet:null,inert:ue,inputMode:null,integrity:null,is:null,isMap:ue,itemId:null,itemProp:De,itemRef:De,itemScope:ue,itemType:De,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ue,low:Z,manifest:null,max:null,maxLength:Z,media:null,method:null,min:null,minLength:Z,multiple:ue,muted:ue,name:null,nonce:null,noModule:ue,noValidate:ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:ue,optimum:Z,pattern:null,ping:De,placeholder:null,playsInline:ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ue,referrerPolicy:null,rel:De,required:ue,reversed:ue,rows:Z,rowSpan:Z,sandbox:De,scope:null,scoped:ue,seamless:ue,selected:ue,shadowRootClonable:ue,shadowRootDelegatesFocus:ue,shadowRootMode:null,shape:null,size:Z,sizes:null,slot:null,span:Z,spellCheck:at,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Z,step:null,style:null,tabIndex:Z,target:null,title:null,translate:null,type:null,typeMustMatch:ue,useMap:null,value:at,width:Z,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:De,axis:null,background:null,bgColor:null,border:Z,borderColor:null,bottomMargin:Z,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ue,declare:ue,event:null,face:null,frame:null,frameBorder:null,hSpace:Z,leftMargin:Z,link:null,longDesc:null,lowSrc:null,marginHeight:Z,marginWidth:Z,noResize:ue,noHref:ue,noShade:ue,noWrap:ue,object:null,profile:null,prompt:null,rev:null,rightMargin:Z,rules:null,scheme:null,scrolling:at,standby:null,summary:null,text:null,topMargin:Z,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Z,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ue,disableRemotePlayback:ue,prefix:null,property:null,results:Z,security:null,unselectable:null},space:"html",transform:aE}),zU=Yl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:en,accentHeight:Z,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Z,amplitude:Z,arabicForm:null,ascent:Z,attributeName:null,attributeType:null,azimuth:Z,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Z,by:null,calcMode:null,capHeight:Z,className:De,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Z,diffuseConstant:Z,direction:null,display:null,dur:null,divisor:Z,dominantBaseline:null,download:ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:Z,enableBackground:null,end:null,event:null,exponent:Z,externalResourcesRequired:null,fill:null,fillOpacity:Z,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:ll,g2:ll,glyphName:ll,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Z,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Z,horizOriginX:Z,horizOriginY:Z,id:null,ideographic:Z,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Z,k:Z,k1:Z,k2:Z,k3:Z,k4:Z,kernelMatrix:en,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Z,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Z,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Z,overlineThickness:Z,paintOrder:null,panose1:null,path:null,pathLength:Z,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:De,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Z,pointsAtY:Z,pointsAtZ:Z,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:en,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:en,rev:en,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:en,requiredFeatures:en,requiredFonts:en,requiredFormats:en,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Z,specularExponent:Z,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Z,strikethroughThickness:Z,string:null,stroke:null,strokeDashArray:en,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Z,strokeOpacity:Z,strokeWidth:null,style:null,surfaceScale:Z,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:en,tabIndex:Z,tableValues:null,target:null,targetX:Z,targetY:Z,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:en,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Z,underlineThickness:Z,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Z,values:null,vAlphabetic:Z,vMathematical:Z,vectorEffect:null,vHanging:Z,vIdeographic:Z,version:null,vertAdvY:Z,vertOriginX:Z,vertOriginY:Z,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Z,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:rE}),iE=Yl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),lE=Yl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:aE}),oE=Yl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),RU={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},MU=/[A-Z]/g,fb=/-[a-z]/g,jU=/^data[-\w.:]+$/i;function DU(e,t){const n=Xh(t);let r=t,a=Jt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&jU.test(t)){if(t.charAt(4)==="-"){const i=t.slice(5).replace(fb,UU);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=t.slice(4);if(!fb.test(i)){let l=i.replace(MU,LU);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}a=Im}return new a(r,t)}function LU(e){return"-"+e.toLowerCase()}function UU(e){return e.charAt(1).toUpperCase()}const PU=tE([nE,NU,iE,lE,oE],"html"),Zm=tE([nE,zU,iE,lE,oE],"svg");function BU(e){return e.join(" ").trim()}var Hm={},db=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,$U=/\n/g,IU=/^\s*/,ZU=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,HU=/^:\s*/,FU=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,qU=/^[;\s]*/,GU=/^\s+|\s+$/g,VU=`
|
|
183
|
+
`,hb="/",pb="*",Ia="",QU="comment",YU="declaration";function XU(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,r=1;function a(b){var y=b.match($U);y&&(n+=y.length);var _=b.lastIndexOf(VU);r=~_?b.length-_:r+b.length}function i(){var b={line:n,column:r};return function(y){return y.position=new l(b),u(),y}}function l(b){this.start=b,this.end={line:n,column:r},this.source=t.source}l.prototype.content=e;function o(b){var y=new Error(t.source+":"+n+":"+r+": "+b);if(y.reason=b,y.filename=t.source,y.line=n,y.column=r,y.source=e,!t.silent)throw y}function s(b){var y=b.exec(e);if(y){var _=y[0];return a(_),e=e.slice(_.length),y}}function u(){s(IU)}function c(b){var y;for(b=b||[];y=f();)y!==!1&&b.push(y);return b}function f(){var b=i();if(!(hb!=e.charAt(0)||pb!=e.charAt(1))){for(var y=2;Ia!=e.charAt(y)&&(pb!=e.charAt(y)||hb!=e.charAt(y+1));)++y;if(y+=2,Ia===e.charAt(y-1))return o("End of comment missing");var _=e.slice(2,y-2);return r+=2,a(_),e=e.slice(y),r+=2,b({type:QU,comment:_})}}function d(){var b=i(),y=s(ZU);if(y){if(f(),!s(HU))return o("property missing ':'");var _=s(FU),p=b({type:YU,property:mb(y[0].replace(db,Ia)),value:_?mb(_[0].replace(db,Ia)):Ia});return s(qU),p}}function h(){var b=[];c(b);for(var y;y=d();)y!==!1&&(b.push(y),c(b));return b}return u(),h()}function mb(e){return e?e.replace(GU,Ia):Ia}var JU=XU,KU=Du&&Du.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Hm,"__esModule",{value:!0});Hm.default=eP;const WU=KU(JU);function eP(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,WU.default)(e),a=typeof t=="function";return r.forEach(i=>{if(i.type!=="declaration")return;const{property:l,value:o}=i;a?t(l,o,i):o&&(n=n||{},n[l]=o)}),n}var nf={};Object.defineProperty(nf,"__esModule",{value:!0});nf.camelCase=void 0;var tP=/^--[a-zA-Z0-9_-]+$/,nP=/-([a-z])/g,rP=/^[^-]+$/,aP=/^-(webkit|moz|ms|o|khtml)-/,iP=/^-(ms)-/,lP=function(e){return!e||rP.test(e)||tP.test(e)},oP=function(e,t){return t.toUpperCase()},gb=function(e,t){return"".concat(t,"-")},sP=function(e,t){return t===void 0&&(t={}),lP(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(iP,gb):e=e.replace(aP,gb),e.replace(nP,oP))};nf.camelCase=sP;var uP=Du&&Du.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},cP=uP(Hm),fP=nf;function Wh(e,t){var n={};return!e||typeof e!="string"||(0,cP.default)(e,function(r,a){r&&a&&(n[(0,fP.camelCase)(r,t)]=a)}),n}Wh.default=Wh;var dP=Wh;const hP=Ac(dP),sE=uE("end"),Fm=uE("start");function uE(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function pP(e){const t=Fm(e),n=sE(e);if(t&&n)return{start:t,end:n}}function Do(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?yb(e.position):"start"in e||"end"in e?yb(e):"line"in e||"column"in e?ep(e):""}function ep(e){return vb(e&&e.line)+":"+vb(e&&e.column)}function yb(e){return ep(e&&e.start)+"-"+ep(e&&e.end)}function vb(e){return e&&typeof e=="number"?e:1}class At extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let a="",i={},l=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i={...n}),typeof t=="string"?a=t:!i.cause&&t&&(l=!0,a=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof r=="string"){const s=r.indexOf(":");s===-1?i.ruleId=r:(i.source=r.slice(0,s),i.ruleId=r.slice(s+1))}if(!i.place&&i.ancestors&&i.ancestors){const s=i.ancestors[i.ancestors.length-1];s&&(i.place=s.position)}const o=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=a,this.line=o?o.line:void 0,this.name=Do(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=l&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}At.prototype.file="";At.prototype.name="";At.prototype.reason="";At.prototype.message="";At.prototype.stack="";At.prototype.column=void 0;At.prototype.line=void 0;At.prototype.ancestors=void 0;At.prototype.cause=void 0;At.prototype.fatal=void 0;At.prototype.place=void 0;At.prototype.ruleId=void 0;At.prototype.source=void 0;const qm={}.hasOwnProperty,mP=new Map,gP=/[A-Z]/g,yP=new Set(["table","tbody","thead","tfoot","tr"]),vP=new Set(["td","th"]),cE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=AP(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=TP(n,t.jsx,t.jsxs)}const a={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Zm:PU,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=fE(a,e,void 0);return i&&typeof i!="string"?i:a.create(e,a.Fragment,{children:i||void 0},void 0)}function fE(e,t,n){if(t.type==="element")return SP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return xP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return wP(e,t,n);if(t.type==="mdxjsEsm")return _P(e,t);if(t.type==="root")return EP(e,t,n);if(t.type==="text")return CP(e,t)}function SP(e,t,n){const r=e.schema;let a=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(a=Zm,e.schema=a),e.ancestors.push(t);const i=hE(e,t.tagName,!1),l=kP(e,t);let o=Vm(e,t);return yP.has(t.tagName)&&(o=o.filter(function(s){return typeof s=="string"?!kU(s):!0})),dE(e,l,i,t),Gm(l,o),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}function xP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}as(e,t.position)}function _P(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);as(e,t.position)}function wP(e,t,n){const r=e.schema;let a=r;t.name==="svg"&&r.space==="html"&&(a=Zm,e.schema=a),e.ancestors.push(t);const i=t.name===null?e.Fragment:hE(e,t.name,!0),l=OP(e,t),o=Vm(e,t);return dE(e,l,i,t),Gm(l,o),e.ancestors.pop(),e.schema=r,e.create(t,i,l,n)}function EP(e,t,n){const r={};return Gm(r,Vm(e,t)),e.create(t,e.Fragment,r,n)}function CP(e,t){return t.value}function dE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Gm(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function TP(e,t,n){return r;function r(a,i,l,o){const u=Array.isArray(l.children)?n:t;return o?u(i,l,o):u(i,l)}}function AP(e,t){return n;function n(r,a,i,l){const o=Array.isArray(i.children),s=Fm(r);return t(a,i,l,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function kP(e,t){const n={};let r,a;for(a in t.properties)if(a!=="children"&&qm.call(t.properties,a)){const i=NP(e,a,t.properties[a]);if(i){const[l,o]=i;e.tableCellAlignToStyle&&l==="align"&&typeof o=="string"&&vP.has(t.tagName)?r=o:n[l]=o}}if(r){const i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function OP(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const i=r.data.estree.body[0];i.type;const l=i.expression;l.type;const o=l.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else as(e,t.position);else{const a=r.name;let i;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,i=e.evaluater.evaluateExpression(o.expression)}else as(e,t.position);else i=r.value===null?!0:r.value;n[a]=i}return n}function Vm(e,t){const n=[];let r=-1;const a=e.passKeys?new Map:mP;for(;++r<t.children.length;){const i=t.children[r];let l;if(e.passKeys){const s=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(s){const u=a.get(s)||0;l=s+"-"+u,a.set(s,u+1)}}const o=fE(e,i,l);o!==void 0&&n.push(o)}return n}function NP(e,t,n){const r=DU(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?wU(n):BU(n)),r.property==="style"){let a=typeof n=="object"?n:zP(e,String(n));return e.stylePropertyNameCase==="css"&&(a=RP(a)),["style",a]}return[e.elementAttributeNameCase==="react"&&r.space?RU[r.property]||r.property:r.attribute,n]}}function zP(e,t){try{return hP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,a=new At("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw a.file=e.filePath||void 0,a.url=cE+"#cannot-parse-style-attribute",a}}function hE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const a=t.split(".");let i=-1,l;for(;++i<a.length;){const o=sb(a[i])?{type:"Identifier",name:a[i]}:{type:"Literal",value:a[i]};l=l?{type:"MemberExpression",object:l,property:o,computed:!!(i&&o.type==="Literal"),optional:!1}:o}r=l}else r=sb(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const a=r.value;return qm.call(e.components,a)?e.components[a]:a}if(e.evaluater)return e.evaluater.evaluateExpression(r);as(e)}function as(e,t){const n=new At("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=cE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function RP(e){const t={};let n;for(n in e)qm.call(e,n)&&(t[MP(n)]=e[n]);return t}function MP(e){let t=e.replace(gP,jP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jP(e){return"-"+e.toLowerCase()}const hd={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},DP={};function LP(e,t){const n=DP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,a=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return pE(e,r,a)}function pE(e,t,n){if(UP(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return bb(e.children,t,n)}return Array.isArray(e)?bb(e,t,n):""}function bb(e,t,n){const r=[];let a=-1;for(;++a<e.length;)r[a]=pE(e[a],t,n);return r.join("")}function UP(e){return!!(e&&typeof e=="object")}const Sb=document.createElement("i");function Qm(e){const t="&"+e+";";Sb.innerHTML=t;const n=Sb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qn(e,t,n,r){const a=e.length;let i=0,l;if(t<0?t=-t>a?0:a+t:t=t>a?a:t,n=n>0?n:0,r.length<1e4)l=Array.from(r),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);i<r.length;)l=r.slice(i,i+1e4),l.unshift(t,0),e.splice(...l),i+=1e4,t+=1e4}function _n(e,t){return e.length>0?(Qn(e,e.length,0,t),e):t}const xb={}.hasOwnProperty;function PP(e){const t={};let n=-1;for(;++n<e.length;)BP(t,e[n]);return t}function BP(e,t){let n;for(n in t){const a=(xb.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n];let l;if(i)for(l in i){xb.call(a,l)||(a[l]=[]);const o=i[l];$P(a[l],Array.isArray(o)?o:o?[o]:[])}}}function $P(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qn(e,0,0,r)}function mE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ol(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Zn=Ra(/[A-Za-z]/),on=Ra(/[\dA-Za-z]/),IP=Ra(/[#-'*+\--9=?A-Z^-~]/);function tp(e){return e!==null&&(e<32||e===127)}const np=Ra(/\d/),ZP=Ra(/[\dA-Fa-f]/),HP=Ra(/[!-/:-@[-`{-~]/);function ie(e){return e!==null&&e<-2}function Vt(e){return e!==null&&(e<0||e===32)}function _e(e){return e===-2||e===-1||e===32}const FP=Ra(new RegExp("\\p{P}|\\p{S}","u")),qP=Ra(/\s/);function Ra(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Xl(e){const t=[];let n=-1,r=0,a=0;for(;++n<e.length;){const i=e.charCodeAt(n);let l="";if(i===37&&on(e.charCodeAt(n+1))&&on(e.charCodeAt(n+2)))a=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(l=String.fromCharCode(i));else if(i>55295&&i<57344){const o=e.charCodeAt(n+1);i<56320&&o>56319&&o<57344?(l=String.fromCharCode(i,o),a=1):l="�"}else l=String.fromCharCode(i);l&&(t.push(e.slice(r,n),encodeURIComponent(l)),r=n+a+1,l=""),a&&(n+=a,a=0)}return t.join("")+e.slice(r)}function Le(e,t,n,r){const a=r?r-1:Number.POSITIVE_INFINITY;let i=0;return l;function l(s){return _e(s)?(e.enter(n),o(s)):t(s)}function o(s){return _e(s)&&i++<a?(e.consume(s),o):(e.exit(n),t(s))}}const GP={tokenize:VP};function VP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,a);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Le(e,t,"linePrefix")}function a(o){return e.enter("paragraph"),i(o)}function i(o){const s=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,l(o)}function l(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return ie(o)?(e.consume(o),e.exit("chunkText"),i):(e.consume(o),l)}}const QP={tokenize:YP},_b={tokenize:XP};function YP(e){const t=this,n=[];let r=0,a,i,l;return o;function o(m){if(r<n.length){const S=n[r];return t.containerState=S[1],e.attempt(S[0].continuation,s,u)(m)}return u(m)}function s(m){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,a&&g();const S=t.events.length;let k=S,E;for(;k--;)if(t.events[k][0]==="exit"&&t.events[k][1].type==="chunkFlow"){E=t.events[k][1].end;break}p(r);let T=S;for(;T<t.events.length;)t.events[T][1].end={...E},T++;return Qn(t.events,k+1,0,t.events.slice(S)),t.events.length=T,u(m)}return o(m)}function u(m){if(r===n.length){if(!a)return d(m);if(a.currentConstruct&&a.currentConstruct.concrete)return b(m);t.interrupt=!!(a.currentConstruct&&!a._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(_b,c,f)(m)}function c(m){return a&&g(),p(r),d(m)}function f(m){return t.parser.lazy[t.now().line]=r!==n.length,l=t.now().offset,b(m)}function d(m){return t.containerState={},e.attempt(_b,h,b)(m)}function h(m){return r++,n.push([t.currentConstruct,t.containerState]),d(m)}function b(m){if(m===null){a&&g(),p(0),e.consume(m);return}return a=a||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:a,contentType:"flow",previous:i}),y(m)}function y(m){if(m===null){_(e.exit("chunkFlow"),!0),p(0),e.consume(m);return}return ie(m)?(e.consume(m),_(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(m),y)}function _(m,S){const k=t.sliceStream(m);if(S&&k.push(null),m.previous=i,i&&(i.next=m),i=m,a.defineSkip(m.start),a.write(k),t.parser.lazy[m.start.line]){let E=a.events.length;for(;E--;)if(a.events[E][1].start.offset<l&&(!a.events[E][1].end||a.events[E][1].end.offset>l))return;const T=t.events.length;let O=T,z,P;for(;O--;)if(t.events[O][0]==="exit"&&t.events[O][1].type==="chunkFlow"){if(z){P=t.events[O][1].end;break}z=!0}for(p(r),E=T;E<t.events.length;)t.events[E][1].end={...P},E++;Qn(t.events,O+1,0,t.events.slice(T)),t.events.length=E}}function p(m){let S=n.length;for(;S-- >m;){const k=n[S];t.containerState=k[1],k[0].exit.call(t,e)}n.length=m}function g(){a.write([null]),i=void 0,a=void 0,t.containerState._closeFlow=void 0}}function XP(e,t,n){return Le(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function wb(e){if(e===null||Vt(e)||qP(e))return 1;if(FP(e))return 2}function Ym(e,t,n){const r=[];let a=-1;for(;++a<e.length;){const i=e[a].resolveAll;i&&!r.includes(i)&&(t=i(t,n),r.push(i))}return t}const rp={name:"attention",resolveAll:JP,tokenize:KP};function JP(e,t){let n=-1,r,a,i,l,o,s,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;s=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const f={...e[r][1].end},d={...e[n][1].start};Eb(f,-s),Eb(d,s),l={type:s>1?"strongSequence":"emphasisSequence",start:f,end:{...e[r][1].end}},o={type:s>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},i={type:s>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},a={type:s>1?"strong":"emphasis",start:{...l.start},end:{...o.end}},e[r][1].end={...l.start},e[n][1].start={...o.end},u=[],e[r][1].end.offset-e[r][1].start.offset&&(u=_n(u,[["enter",e[r][1],t],["exit",e[r][1],t]])),u=_n(u,[["enter",a,t],["enter",l,t],["exit",l,t],["enter",i,t]]),u=_n(u,Ym(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),u=_n(u,[["exit",i,t],["enter",o,t],["exit",o,t],["exit",a,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=_n(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Qn(e,r-1,n-r+3,u),n=r+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function KP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,a=wb(r);let i;return l;function l(s){return i=s,e.enter("attentionSequence"),o(s)}function o(s){if(s===i)return e.consume(s),o;const u=e.exit("attentionSequence"),c=wb(s),f=!c||c===2&&a||n.includes(s),d=!a||a===2&&c||n.includes(r);return u._open=!!(i===42?f:f&&(a||!d)),u._close=!!(i===42?d:d&&(c||!f)),t(s)}}function Eb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const WP={name:"autolink",tokenize:eB};function eB(e,t,n){let r=0;return a;function a(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(h){return Zn(h)?(e.consume(h),l):h===64?n(h):u(h)}function l(h){return h===43||h===45||h===46||on(h)?(r=1,o(h)):u(h)}function o(h){return h===58?(e.consume(h),r=0,s):(h===43||h===45||h===46||on(h))&&r++<32?(e.consume(h),o):(r=0,u(h))}function s(h){return h===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):h===null||h===32||h===60||tp(h)?n(h):(e.consume(h),s)}function u(h){return h===64?(e.consume(h),c):IP(h)?(e.consume(h),u):n(h)}function c(h){return on(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,c):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):d(h)}function d(h){if((h===45||on(h))&&r++<63){const b=h===45?d:f;return e.consume(h),b}return n(h)}}const rf={partial:!0,tokenize:tB};function tB(e,t,n){return r;function r(i){return _e(i)?Le(e,a,"linePrefix")(i):a(i)}function a(i){return i===null||ie(i)?t(i):n(i)}}const gE={continuation:{tokenize:rB},exit:aB,name:"blockQuote",tokenize:nB};function nB(e,t,n){const r=this;return a;function a(l){if(l===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),i}return n(l)}function i(l){return _e(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function rB(e,t,n){const r=this;return a;function a(l){return _e(l)?Le(e,i,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):i(l)}function i(l){return e.attempt(gE,t,n)(l)}}function aB(e){e.exit("blockQuote")}const yE={name:"characterEscape",tokenize:iB};function iB(e,t,n){return r;function r(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),a}function a(i){return HP(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}const vE={name:"characterReference",tokenize:lB};function lB(e,t,n){const r=this;let a=0,i,l;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),s}function s(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),i=31,l=on,c(f))}function u(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,l=ZP,c):(e.enter("characterReferenceValue"),i=7,l=np,c(f))}function c(f){if(f===59&&a){const d=e.exit("characterReferenceValue");return l===on&&!Qm(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(f)&&a++<i?(e.consume(f),c):n(f)}}const Cb={partial:!0,tokenize:sB},Tb={concrete:!0,name:"codeFenced",tokenize:oB};function oB(e,t,n){const r=this,a={partial:!0,tokenize:k};let i=0,l=0,o;return s;function s(E){return u(E)}function u(E){const T=r.events[r.events.length-1];return i=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,o=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(E)}function c(E){return E===o?(l++,e.consume(E),c):l<3?n(E):(e.exit("codeFencedFenceSequence"),_e(E)?Le(e,f,"whitespace")(E):f(E))}function f(E){return E===null||ie(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(Cb,y,S)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||ie(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):_e(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Le(e,h,"whitespace")(E)):E===96&&E===o?n(E):(e.consume(E),d)}function h(E){return E===null||ie(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(E))}function b(E){return E===null||ie(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===o?n(E):(e.consume(E),b)}function y(E){return e.attempt(a,S,_)(E)}function _(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),p}function p(E){return i>0&&_e(E)?Le(e,g,"linePrefix",i+1)(E):g(E)}function g(E){return E===null||ie(E)?e.check(Cb,y,S)(E):(e.enter("codeFlowValue"),m(E))}function m(E){return E===null||ie(E)?(e.exit("codeFlowValue"),g(E)):(e.consume(E),m)}function S(E){return e.exit("codeFenced"),t(E)}function k(E,T,O){let z=0;return P;function P(F){return E.enter("lineEnding"),E.consume(F),E.exit("lineEnding"),$}function $(F){return E.enter("codeFencedFence"),_e(F)?Le(E,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(F):B(F)}function B(F){return F===o?(E.enter("codeFencedFenceSequence"),U(F)):O(F)}function U(F){return F===o?(z++,E.consume(F),U):z>=l?(E.exit("codeFencedFenceSequence"),_e(F)?Le(E,H,"whitespace")(F):H(F)):O(F)}function H(F){return F===null||ie(F)?(E.exit("codeFencedFence"),T(F)):O(F)}}}function sB(e,t,n){const r=this;return a;function a(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i)}function i(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}const pd={name:"codeIndented",tokenize:cB},uB={partial:!0,tokenize:fB};function cB(e,t,n){const r=this;return a;function a(u){return e.enter("codeIndented"),Le(e,i,"linePrefix",5)(u)}function i(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?s(u):ie(u)?e.attempt(uB,l,s)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||ie(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),o)}function s(u){return e.exit("codeIndented"),t(u)}}function fB(e,t,n){const r=this;return a;function a(l){return r.parser.lazy[r.now().line]?n(l):ie(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),a):Le(e,i,"linePrefix",5)(l)}function i(l){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(l):ie(l)?a(l):n(l)}}const dB={name:"codeText",previous:pB,resolve:hB,tokenize:mB};function hB(e){let t=e.length-4,n=3,r,a;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)a===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(a=r):(r===t||e[r][1].type==="lineEnding")&&(e[a][1].type="codeTextData",r!==a+2&&(e[a][1].end=e[r-1][1].end,e.splice(a+2,r-a-2),t-=r-a-2,r=a+2),a=void 0);return e}function pB(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mB(e,t,n){let r=0,a,i;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),s(f))}function s(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),s):f===96?(i=e.enter("codeTextSequence"),a=0,c(f)):ie(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),s):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||ie(f)?(e.exit("codeTextData"),s(f)):(e.consume(f),u)}function c(f){return f===96?(e.consume(f),a++,c):a===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(i.type="codeTextData",u(f))}}class gB{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const a=n||0;this.setCursor(Math.trunc(t));const i=this.right.splice(this.right.length-a,Number.POSITIVE_INFINITY);return r&&uo(this.left,r),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),uo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),uo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);uo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);uo(this.left,n.reverse())}}}function uo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function bE(e){const t={};let n=-1,r,a,i,l,o,s,u;const c=new gB(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(r=c.get(n),n&&r[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(s=r[1]._tokenizer.events,i=0,i<s.length&&s[i][1].type==="lineEndingBlank"&&(i+=2),i<s.length&&s[i][1].type==="content"))for(;++i<s.length&&s[i][1].type!=="content";)s[i][1].type==="chunkText"&&(s[i][1]._isInFirstContentOfListItem=!0,i++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,yB(c,n)),n=t[n],u=!0);else if(r[1]._container){for(i=n,a=void 0;i--;)if(l=c.get(i),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(a&&(c.get(a)[1].type="lineEndingBlank"),l[1].type="lineEnding",a=i);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;a&&(r[1].end={...c.get(a)[1].start},o=c.slice(a,n),o.unshift(r),c.splice(a,n-a+1,o))}}return Qn(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function yB(e,t){const n=e.get(t)[1],r=e.get(t)[2];let a=t-1;const i=[];let l=n._tokenizer;l||(l=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));const o=l.events,s=[],u={};let c,f,d=-1,h=n,b=0,y=0;const _=[y];for(;h;){for(;e.get(++a)[1]!==h;);i.push(a),h._tokenizer||(c=r.sliceStream(h),h.next||c.push(null),f&&l.defineSkip(h.start),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),h._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++d<o.length;)o[d][0]==="exit"&&o[d-1][0]==="enter"&&o[d][1].type===o[d-1][1].type&&o[d][1].start.line!==o[d][1].end.line&&(y=d+1,_.push(y),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(l.events=[],h?(h._tokenizer=void 0,h.previous=void 0):_.pop(),d=_.length;d--;){const p=o.slice(_[d],_[d+1]),g=i.pop();s.push([g,g+p.length-1]),e.splice(g,2,p)}for(s.reverse(),d=-1;++d<s.length;)u[b+s[d][0]]=b+s[d][1],b+=s[d][1]-s[d][0]-1;return u}const vB={resolve:SB,tokenize:xB},bB={partial:!0,tokenize:_B};function SB(e){return bE(e),e}function xB(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),a(o)}function a(o){return o===null?i(o):ie(o)?e.check(bB,l,i)(o):(e.consume(o),a)}function i(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function l(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,a}}function _B(e,t,n){const r=this;return a;function a(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),Le(e,i,"linePrefix")}function i(l){if(l===null||ie(l))return n(l);const o=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(l):e.interrupt(r.parser.constructs.flow,n,t)(l)}}function SE(e,t,n,r,a,i,l,o,s){const u=s||Number.POSITIVE_INFINITY;let c=0;return f;function f(p){return p===60?(e.enter(r),e.enter(a),e.enter(i),e.consume(p),e.exit(i),d):p===null||p===32||p===41||tp(p)?n(p):(e.enter(r),e.enter(l),e.enter(o),e.enter("chunkString",{contentType:"string"}),y(p))}function d(p){return p===62?(e.enter(i),e.consume(p),e.exit(i),e.exit(a),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===62?(e.exit("chunkString"),e.exit(o),d(p)):p===null||p===60||ie(p)?n(p):(e.consume(p),p===92?b:h)}function b(p){return p===60||p===62||p===92?(e.consume(p),h):h(p)}function y(p){return!c&&(p===null||p===41||Vt(p))?(e.exit("chunkString"),e.exit(o),e.exit(l),e.exit(r),t(p)):c<u&&p===40?(e.consume(p),c++,y):p===41?(e.consume(p),c--,y):p===null||p===32||p===40||tp(p)?n(p):(e.consume(p),p===92?_:y)}function _(p){return p===40||p===41||p===92?(e.consume(p),y):y(p)}}function xE(e,t,n,r,a,i){const l=this;let o=0,s;return u;function u(h){return e.enter(r),e.enter(a),e.consume(h),e.exit(a),e.enter(i),c}function c(h){return o>999||h===null||h===91||h===93&&!s||h===94&&!o&&"_hiddenFootnoteSupport"in l.parser.constructs?n(h):h===93?(e.exit(i),e.enter(a),e.consume(h),e.exit(a),e.exit(r),t):ie(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||ie(h)||o++>999?(e.exit("chunkString"),c(h)):(e.consume(h),s||(s=!_e(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function _E(e,t,n,r,a,i){let l;return o;function o(d){return d===34||d===39||d===40?(e.enter(r),e.enter(a),e.consume(d),e.exit(a),l=d===40?41:d,s):n(d)}function s(d){return d===l?(e.enter(a),e.consume(d),e.exit(a),e.exit(r),t):(e.enter(i),u(d))}function u(d){return d===l?(e.exit(i),s(l)):d===null?n(d):ie(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Le(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===l||d===null||ie(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?f:c)}function f(d){return d===l||d===92?(e.consume(d),c):c(d)}}function Lo(e,t){let n;return r;function r(a){return ie(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),n=!0,r):_e(a)?Le(e,r,n?"linePrefix":"lineSuffix")(a):t(a)}}const wB={name:"definition",tokenize:CB},EB={partial:!0,tokenize:TB};function CB(e,t,n){const r=this;let a;return i;function i(h){return e.enter("definition"),l(h)}function l(h){return xE.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return a=ol(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),s):n(h)}function s(h){return Vt(h)?Lo(e,u)(h):u(h)}function u(h){return SE(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function c(h){return e.attempt(EB,f,f)(h)}function f(h){return _e(h)?Le(e,d,"whitespace")(h):d(h)}function d(h){return h===null||ie(h)?(e.exit("definition"),r.parser.defined.push(a),t(h)):n(h)}}function TB(e,t,n){return r;function r(o){return Vt(o)?Lo(e,a)(o):n(o)}function a(o){return _E(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return _e(o)?Le(e,l,"whitespace")(o):l(o)}function l(o){return o===null||ie(o)?t(o):n(o)}}const AB={name:"hardBreakEscape",tokenize:kB};function kB(e,t,n){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),a}function a(i){return ie(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}const OB={name:"headingAtx",resolve:NB,tokenize:zB};function NB(e,t){let n=e.length-2,r=3,a,i;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(a={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},i={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Qn(e,r,n-r+1,[["enter",a,t],["enter",i,t],["exit",i,t],["exit",a,t]])),e}function zB(e,t,n){let r=0;return a;function a(c){return e.enter("atxHeading"),i(c)}function i(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&r++<6?(e.consume(c),l):c===null||Vt(c)?(e.exit("atxHeadingSequence"),o(c)):n(c)}function o(c){return c===35?(e.enter("atxHeadingSequence"),s(c)):c===null||ie(c)?(e.exit("atxHeading"),t(c)):_e(c)?Le(e,o,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function s(c){return c===35?(e.consume(c),s):(e.exit("atxHeadingSequence"),o(c))}function u(c){return c===null||c===35||Vt(c)?(e.exit("atxHeadingText"),o(c)):(e.consume(c),u)}}const RB=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Ab=["pre","script","style","textarea"],MB={concrete:!0,name:"htmlFlow",resolveTo:LB,tokenize:UB},jB={partial:!0,tokenize:BB},DB={partial:!0,tokenize:PB};function LB(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function UB(e,t,n){const r=this;let a,i,l,o,s;return u;function u(A){return c(A)}function c(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),f}function f(A){return A===33?(e.consume(A),d):A===47?(e.consume(A),i=!0,y):A===63?(e.consume(A),a=3,r.interrupt?t:w):Zn(A)?(e.consume(A),l=String.fromCharCode(A),_):n(A)}function d(A){return A===45?(e.consume(A),a=2,h):A===91?(e.consume(A),a=5,o=0,b):Zn(A)?(e.consume(A),a=4,r.interrupt?t:w):n(A)}function h(A){return A===45?(e.consume(A),r.interrupt?t:w):n(A)}function b(A){const Ce="CDATA[";return A===Ce.charCodeAt(o++)?(e.consume(A),o===Ce.length?r.interrupt?t:B:b):n(A)}function y(A){return Zn(A)?(e.consume(A),l=String.fromCharCode(A),_):n(A)}function _(A){if(A===null||A===47||A===62||Vt(A)){const Ce=A===47,be=l.toLowerCase();return!Ce&&!i&&Ab.includes(be)?(a=1,r.interrupt?t(A):B(A)):RB.includes(l.toLowerCase())?(a=6,Ce?(e.consume(A),p):r.interrupt?t(A):B(A)):(a=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(A):i?g(A):m(A))}return A===45||on(A)?(e.consume(A),l+=String.fromCharCode(A),_):n(A)}function p(A){return A===62?(e.consume(A),r.interrupt?t:B):n(A)}function g(A){return _e(A)?(e.consume(A),g):P(A)}function m(A){return A===47?(e.consume(A),P):A===58||A===95||Zn(A)?(e.consume(A),S):_e(A)?(e.consume(A),m):P(A)}function S(A){return A===45||A===46||A===58||A===95||on(A)?(e.consume(A),S):k(A)}function k(A){return A===61?(e.consume(A),E):_e(A)?(e.consume(A),k):m(A)}function E(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),s=A,T):_e(A)?(e.consume(A),E):O(A)}function T(A){return A===s?(e.consume(A),s=null,z):A===null||ie(A)?n(A):(e.consume(A),T)}function O(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||Vt(A)?k(A):(e.consume(A),O)}function z(A){return A===47||A===62||_e(A)?m(A):n(A)}function P(A){return A===62?(e.consume(A),$):n(A)}function $(A){return A===null||ie(A)?B(A):_e(A)?(e.consume(A),$):n(A)}function B(A){return A===45&&a===2?(e.consume(A),D):A===60&&a===1?(e.consume(A),q):A===62&&a===4?(e.consume(A),Me):A===63&&a===3?(e.consume(A),w):A===93&&a===5?(e.consume(A),ae):ie(A)&&(a===6||a===7)?(e.exit("htmlFlowData"),e.check(jB,qe,U)(A)):A===null||ie(A)?(e.exit("htmlFlowData"),U(A)):(e.consume(A),B)}function U(A){return e.check(DB,H,qe)(A)}function H(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),F}function F(A){return A===null||ie(A)?U(A):(e.enter("htmlFlowData"),B(A))}function D(A){return A===45?(e.consume(A),w):B(A)}function q(A){return A===47?(e.consume(A),l="",V):B(A)}function V(A){if(A===62){const Ce=l.toLowerCase();return Ab.includes(Ce)?(e.consume(A),Me):B(A)}return Zn(A)&&l.length<8?(e.consume(A),l+=String.fromCharCode(A),V):B(A)}function ae(A){return A===93?(e.consume(A),w):B(A)}function w(A){return A===62?(e.consume(A),Me):A===45&&a===2?(e.consume(A),w):B(A)}function Me(A){return A===null||ie(A)?(e.exit("htmlFlowData"),qe(A)):(e.consume(A),Me)}function qe(A){return e.exit("htmlFlow"),t(A)}}function PB(e,t,n){const r=this;return a;function a(l){return ie(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):n(l)}function i(l){return r.parser.lazy[r.now().line]?n(l):t(l)}}function BB(e,t,n){return r;function r(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),e.attempt(rf,t,n)}}const $B={name:"htmlText",tokenize:IB};function IB(e,t,n){const r=this;let a,i,l;return o;function o(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),s}function s(w){return w===33?(e.consume(w),u):w===47?(e.consume(w),k):w===63?(e.consume(w),m):Zn(w)?(e.consume(w),O):n(w)}function u(w){return w===45?(e.consume(w),c):w===91?(e.consume(w),i=0,b):Zn(w)?(e.consume(w),g):n(w)}function c(w){return w===45?(e.consume(w),h):n(w)}function f(w){return w===null?n(w):w===45?(e.consume(w),d):ie(w)?(l=f,q(w)):(e.consume(w),f)}function d(w){return w===45?(e.consume(w),h):f(w)}function h(w){return w===62?D(w):w===45?d(w):f(w)}function b(w){const Me="CDATA[";return w===Me.charCodeAt(i++)?(e.consume(w),i===Me.length?y:b):n(w)}function y(w){return w===null?n(w):w===93?(e.consume(w),_):ie(w)?(l=y,q(w)):(e.consume(w),y)}function _(w){return w===93?(e.consume(w),p):y(w)}function p(w){return w===62?D(w):w===93?(e.consume(w),p):y(w)}function g(w){return w===null||w===62?D(w):ie(w)?(l=g,q(w)):(e.consume(w),g)}function m(w){return w===null?n(w):w===63?(e.consume(w),S):ie(w)?(l=m,q(w)):(e.consume(w),m)}function S(w){return w===62?D(w):m(w)}function k(w){return Zn(w)?(e.consume(w),E):n(w)}function E(w){return w===45||on(w)?(e.consume(w),E):T(w)}function T(w){return ie(w)?(l=T,q(w)):_e(w)?(e.consume(w),T):D(w)}function O(w){return w===45||on(w)?(e.consume(w),O):w===47||w===62||Vt(w)?z(w):n(w)}function z(w){return w===47?(e.consume(w),D):w===58||w===95||Zn(w)?(e.consume(w),P):ie(w)?(l=z,q(w)):_e(w)?(e.consume(w),z):D(w)}function P(w){return w===45||w===46||w===58||w===95||on(w)?(e.consume(w),P):$(w)}function $(w){return w===61?(e.consume(w),B):ie(w)?(l=$,q(w)):_e(w)?(e.consume(w),$):z(w)}function B(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),a=w,U):ie(w)?(l=B,q(w)):_e(w)?(e.consume(w),B):(e.consume(w),H)}function U(w){return w===a?(e.consume(w),a=void 0,F):w===null?n(w):ie(w)?(l=U,q(w)):(e.consume(w),U)}function H(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||Vt(w)?z(w):(e.consume(w),H)}function F(w){return w===47||w===62||Vt(w)?z(w):n(w)}function D(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function q(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),V}function V(w){return _e(w)?Le(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):ae(w)}function ae(w){return e.enter("htmlTextData"),l(w)}}const Xm={name:"labelEnd",resolveAll:qB,resolveTo:GB,tokenize:VB},ZB={tokenize:QB},HB={tokenize:YB},FB={tokenize:XB};function qB(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const a=r.type==="labelImage"?4:2;r.type="data",t+=a}}return e.length!==n.length&&Qn(e,0,e.length,n),e}function GB(e,t){let n=e.length,r=0,a,i,l,o;for(;n--;)if(a=e[n][1],i){if(a.type==="link"||a.type==="labelLink"&&a._inactive)break;e[n][0]==="enter"&&a.type==="labelLink"&&(a._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(a.type==="labelImage"||a.type==="labelLink")&&!a._balanced&&(i=n,a.type!=="labelLink")){r=2;break}}else a.type==="labelEnd"&&(l=n);const s={type:e[i][1].type==="labelLink"?"link":"image",start:{...e[i][1].start},end:{...e[e.length-1][1].end}},u={type:"label",start:{...e[i][1].start},end:{...e[l][1].end}},c={type:"labelText",start:{...e[i+r+2][1].end},end:{...e[l-2][1].start}};return o=[["enter",s,t],["enter",u,t]],o=_n(o,e.slice(i+1,i+r+3)),o=_n(o,[["enter",c,t]]),o=_n(o,Ym(t.parser.constructs.insideSpan.null,e.slice(i+r+4,l-3),t)),o=_n(o,[["exit",c,t],e[l-2],e[l-1],["exit",u,t]]),o=_n(o,e.slice(l+1)),o=_n(o,[["exit",s,t]]),Qn(e,i,e.length,o),e}function VB(e,t,n){const r=this;let a=r.events.length,i,l;for(;a--;)if((r.events[a][1].type==="labelImage"||r.events[a][1].type==="labelLink")&&!r.events[a][1]._balanced){i=r.events[a][1];break}return o;function o(d){return i?i._inactive?f(d):(l=r.parser.defined.includes(ol(r.sliceSerialize({start:i.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),s):n(d)}function s(d){return d===40?e.attempt(ZB,c,l?c:f)(d):d===91?e.attempt(HB,c,l?u:f)(d):l?c(d):f(d)}function u(d){return e.attempt(FB,c,f)(d)}function c(d){return t(d)}function f(d){return i._balanced=!0,n(d)}}function QB(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),a}function a(f){return Vt(f)?Lo(e,i)(f):i(f)}function i(f){return f===41?c(f):SE(e,l,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function l(f){return Vt(f)?Lo(e,s)(f):c(f)}function o(f){return n(f)}function s(f){return f===34||f===39||f===40?_E(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):c(f)}function u(f){return Vt(f)?Lo(e,c)(f):c(f)}function c(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function YB(e,t,n){const r=this;return a;function a(o){return xE.call(r,e,i,l,"reference","referenceMarker","referenceString")(o)}function i(o){return r.parser.defined.includes(ol(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function l(o){return n(o)}}function XB(e,t,n){return r;function r(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),a}function a(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}const JB={name:"labelStartImage",resolveAll:Xm.resolveAll,tokenize:KB};function KB(e,t,n){const r=this;return a;function a(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),i}function i(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),l):n(o)}function l(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const WB={name:"labelStartLink",resolveAll:Xm.resolveAll,tokenize:e5};function e5(e,t,n){const r=this;return a;function a(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),i}function i(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const md={name:"lineEnding",tokenize:t5};function t5(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Le(e,t,"linePrefix")}}const Mu={name:"thematicBreak",tokenize:n5};function n5(e,t,n){let r=0,a;return i;function i(u){return e.enter("thematicBreak"),l(u)}function l(u){return a=u,o(u)}function o(u){return u===a?(e.enter("thematicBreakSequence"),s(u)):r>=3&&(u===null||ie(u))?(e.exit("thematicBreak"),t(u)):n(u)}function s(u){return u===a?(e.consume(u),r++,s):(e.exit("thematicBreakSequence"),_e(u)?Le(e,o,"whitespace")(u):o(u))}}const It={continuation:{tokenize:l5},exit:s5,name:"list",tokenize:i5},r5={partial:!0,tokenize:u5},a5={partial:!0,tokenize:o5};function i5(e,t,n){const r=this,a=r.events[r.events.length-1];let i=a&&a[1].type==="linePrefix"?a[2].sliceSerialize(a[1],!0).length:0,l=0;return o;function o(h){const b=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:np(h)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Mu,n,u)(h):u(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),s(h)}return n(h)}function s(h){return np(h)&&++l<10?(e.consume(h),s):(!r.interrupt||l<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),u(h)):n(h)}function u(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(rf,r.interrupt?n:c,e.attempt(r5,d,f))}function c(h){return r.containerState.initialBlankLine=!0,i++,d(h)}function f(h){return _e(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=i+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function l5(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(rf,a,i);function a(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Le(e,t,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!_e(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,l(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(a5,t,l)(o))}function l(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Le(e,e.attempt(It,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function o5(e,t,n){const r=this;return Le(e,a,"listItemIndent",r.containerState.size+1);function a(i){const l=r.events[r.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===r.containerState.size?t(i):n(i)}}function s5(e){e.exit(this.containerState.type)}function u5(e,t,n){const r=this;return Le(e,a,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function a(i){const l=r.events[r.events.length-1];return!_e(i)&&l&&l[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}const kb={name:"setextUnderline",resolveTo:c5,tokenize:f5};function c5(e,t){let n=e.length,r,a,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(a=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);const l={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type="setextHeadingText",i?(e.splice(a,0,["enter",l,t]),e.splice(i+1,0,["exit",e[r][1],t]),e[r][1].end={...e[i][1].end}):e[r][1]=l,e.push(["exit",l,t]),e}function f5(e,t,n){const r=this;let a;return i;function i(u){let c=r.events.length,f;for(;c--;)if(r.events[c][1].type!=="lineEnding"&&r.events[c][1].type!=="linePrefix"&&r.events[c][1].type!=="content"){f=r.events[c][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(e.enter("setextHeadingLine"),a=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===a?(e.consume(u),o):(e.exit("setextHeadingLineSequence"),_e(u)?Le(e,s,"lineSuffix")(u):s(u))}function s(u){return u===null||ie(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}const d5={tokenize:h5};function h5(e){const t=this,n=e.attempt(rf,r,e.attempt(this.parser.constructs.flowInitial,a,Le(e,e.attempt(this.parser.constructs.flow,a,e.attempt(vB,a)),"linePrefix")));return n;function r(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function a(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const p5={resolveAll:EE()},m5=wE("string"),g5=wE("text");function wE(e){return{resolveAll:EE(e==="text"?y5:void 0),tokenize:t};function t(n){const r=this,a=this.parser.constructs[e],i=n.attempt(a,l,o);return l;function l(c){return u(c)?i(c):o(c)}function o(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),s}function s(c){return u(c)?(n.exit("data"),i(c)):(n.consume(c),s)}function u(c){if(c===null)return!0;const f=a[c];let d=-1;if(f)for(;++d<f.length;){const h=f[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function EE(e){return t;function t(n,r){let a=-1,i;for(;++a<=n.length;)i===void 0?n[a]&&n[a][1].type==="data"&&(i=a,a++):(!n[a]||n[a][1].type!=="data")&&(a!==i+2&&(n[i][1].end=n[a-1][1].end,n.splice(i+2,a-i-2),a=i+2),i=void 0);return e?e(n,r):n}}function y5(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],a=t.sliceStream(r);let i=a.length,l=-1,o=0,s;for(;i--;){const u=a[i];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)o++,l--;if(l)break;l=-1}else if(u===-2)s=!0,o++;else if(u!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const u={type:n===e.length||s||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?l:r.start._bufferIndex+l,_index:r.start._index+i,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...u.start},r.start.offset===r.end.offset?Object.assign(r,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}const v5={42:It,43:It,45:It,48:It,49:It,50:It,51:It,52:It,53:It,54:It,55:It,56:It,57:It,62:gE},b5={91:wB},S5={[-2]:pd,[-1]:pd,32:pd},x5={35:OB,42:Mu,45:[kb,Mu],60:MB,61:kb,95:Mu,96:Tb,126:Tb},_5={38:vE,92:yE},w5={[-5]:md,[-4]:md,[-3]:md,33:JB,38:vE,42:rp,60:[WP,$B],91:WB,92:[AB,yE],93:Xm,95:rp,96:dB},E5={null:[rp,p5]},C5={null:[42,95]},T5={null:[]},A5=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:C5,contentInitial:b5,disable:T5,document:v5,flow:x5,flowInitial:S5,insideSpan:E5,string:_5,text:w5},Symbol.toStringTag,{value:"Module"}));function k5(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const a={},i=[];let l=[],o=[];const s={attempt:T(k),check:T(E),consume:g,enter:m,exit:S,interrupt:T(E,{interrupt:!0})},u={code:null,containerState:{},defineSkip:y,events:[],now:b,parser:e,previous:null,sliceSerialize:d,sliceStream:h,write:f};let c=t.tokenize.call(u,s);return t.resolveAll&&i.push(t),u;function f($){return l=_n(l,$),_(),l[l.length-1]!==null?[]:(O(t,0),u.events=Ym(i,u.events,u),u.events)}function d($,B){return N5(h($),B)}function h($){return O5(l,$)}function b(){const{_bufferIndex:$,_index:B,line:U,column:H,offset:F}=r;return{_bufferIndex:$,_index:B,line:U,column:H,offset:F}}function y($){a[$.line]=$.column,P()}function _(){let $;for(;r._index<l.length;){const B=l[r._index];if(typeof B=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<B.length;)p(B.charCodeAt(r._bufferIndex));else p(B)}}function p($){c=c($)}function g($){ie($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,P()):$!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===l[r._index].length&&(r._bufferIndex=-1,r._index++)),u.previous=$}function m($,B){const U=B||{};return U.type=$,U.start=b(),u.events.push(["enter",U,u]),o.push(U),U}function S($){const B=o.pop();return B.end=b(),u.events.push(["exit",B,u]),B}function k($,B){O($,B.from)}function E($,B){B.restore()}function T($,B){return U;function U(H,F,D){let q,V,ae,w;return Array.isArray(H)?qe(H):"tokenize"in H?qe([H]):Me(H);function Me(de){return pn;function pn(Lt){const ze=Lt!==null&&de[Lt],Nn=Lt!==null&&de.null,zn=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(Nn)?Nn:Nn?[Nn]:[]];return qe(zn)(Lt)}}function qe(de){return q=de,V=0,de.length===0?D:A(de[V])}function A(de){return pn;function pn(Lt){return w=z(),ae=de,de.partial||(u.currentConstruct=de),de.name&&u.parser.constructs.disable.null.includes(de.name)?be():de.tokenize.call(B?Object.assign(Object.create(u),B):u,s,Ce,be)(Lt)}}function Ce(de){return $(ae,w),F}function be(de){return w.restore(),++V<q.length?A(q[V]):D}}}function O($,B){$.resolveAll&&!i.includes($)&&i.push($),$.resolve&&Qn(u.events,B,u.events.length-B,$.resolve(u.events.slice(B),u)),$.resolveTo&&(u.events=$.resolveTo(u.events,u))}function z(){const $=b(),B=u.previous,U=u.currentConstruct,H=u.events.length,F=Array.from(o);return{from:H,restore:D};function D(){r=$,u.previous=B,u.currentConstruct=U,u.events.length=H,o=F,P()}}function P(){r.line in a&&r.column<2&&(r.column=a[r.line],r.offset+=a[r.line]-1)}}function O5(e,t){const n=t.start._index,r=t.start._bufferIndex,a=t.end._index,i=t.end._bufferIndex;let l;if(n===a)l=[e[n].slice(r,i)];else{if(l=e.slice(n,a),r>-1){const o=l[0];typeof o=="string"?l[0]=o.slice(r):l.shift()}i>0&&l.push(e[a].slice(0,i))}return l}function N5(e,t){let n=-1;const r=[];let a;for(;++n<e.length;){const i=e[n];let l;if(typeof i=="string")l=i;else switch(i){case-5:{l="\r";break}case-4:{l=`
|
|
184
|
+
`;break}case-3:{l=`\r
|
|
185
|
+
`;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&a)continue;l=" ";break}default:l=String.fromCharCode(i)}a=i===-2,r.push(l)}return r.join("")}function z5(e){const r={constructs:PP([A5,...(e||{}).extensions||[]]),content:a(GP),defined:[],document:a(QP),flow:a(d5),lazy:{},string:a(m5),text:a(g5)};return r;function a(i){return l;function l(o){return k5(r,i,o)}}}function R5(e){for(;!bE(e););return e}const Ob=/[\0\t\n\r]/g;function M5(){let e=1,t="",n=!0,r;return a;function a(i,l,o){const s=[];let u,c,f,d,h;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(l||void 0).decode(i)),f=0,t="",n&&(i.charCodeAt(0)===65279&&f++,n=void 0);f<i.length;){if(Ob.lastIndex=f,u=Ob.exec(i),d=u&&u.index!==void 0?u.index:i.length,h=i.charCodeAt(d),!u){t=i.slice(f);break}if(h===10&&f===d&&r)s.push(-3),r=void 0;else switch(r&&(s.push(-5),r=void 0),f<d&&(s.push(i.slice(f,d)),e+=d-f),h){case 0:{s.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,s.push(-2);e++<c;)s.push(-1);break}case 10:{s.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}const j5=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function D5(e){return e.replace(j5,L5)}function L5(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const a=n.charCodeAt(1),i=a===120||a===88;return mE(n.slice(i?2:1),i?16:10)}return Qm(n)||e}const CE={}.hasOwnProperty;function U5(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),P5(n)(R5(z5(n).document().write(M5()(e,t,!0))))}function P5(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(Jl),autolinkProtocol:z,autolinkEmail:z,atxHeading:i(As),blockQuote:i(Nn),characterEscape:z,characterReference:z,codeFenced:i(zn),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:i(zn,l),codeText:i(Nr,l),codeTextData:z,data:z,codeFlowValue:z,definition:i(Ma),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:i(zr),hardBreakEscape:i(ks),hardBreakTrailing:i(ks),htmlFlow:i(Os,l),htmlFlowData:z,htmlText:i(Os,l),htmlTextData:z,image:i(of),label:l,link:i(Jl),listItem:i(Ln),listItemValue:d,listOrdered:i(Ns,f),listUnordered:i(Ns),paragraph:i(sf),reference:A,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:i(As),strong:i(uf),thematicBreak:i(X)},exit:{atxHeading:s(),atxHeadingSequence:k,autolink:s(),autolinkEmail:ze,autolinkProtocol:Lt,blockQuote:s(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:de,characterReference:pn,codeFenced:s(_),codeFencedFence:y,codeFencedFenceInfo:h,codeFencedFenceMeta:b,codeFlowValue:P,codeIndented:s(p),codeText:s(F),codeTextData:P,data:P,definition:s(),definitionDestinationString:S,definitionLabelString:g,definitionTitleString:m,emphasis:s(),hardBreakEscape:s(B),hardBreakTrailing:s(B),htmlFlow:s(U),htmlFlowData:P,htmlText:s(H),htmlTextData:P,image:s(q),label:ae,labelText:V,lineEnding:$,link:s(D),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:Ce,resourceDestinationString:w,resourceTitleString:Me,resource:qe,setextHeading:s(O),setextHeadingLineSequence:T,setextHeadingText:E,strong:s(),thematicBreak:s()}};TE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(N){let I={type:"root",children:[]};const te={stack:[I],tokenStack:[],config:t,enter:o,exit:u,buffer:l,resume:c,data:n},fe=[];let xe=-1;for(;++xe<N.length;)if(N[xe][1].type==="listOrdered"||N[xe][1].type==="listUnordered")if(N[xe][0]==="enter")fe.push(xe);else{const Et=fe.pop();xe=a(N,Et,xe)}for(xe=-1;++xe<N.length;){const Et=t[N[xe][0]];CE.call(Et,N[xe][1].type)&&Et[N[xe][1].type].call(Object.assign({sliceSerialize:N[xe][2].sliceSerialize},te),N[xe][1])}if(te.tokenStack.length>0){const Et=te.tokenStack[te.tokenStack.length-1];(Et[1]||Nb).call(te,void 0,Et[0])}for(I.position={start:Dr(N.length>0?N[0][1].start:{line:1,column:1,offset:0}),end:Dr(N.length>0?N[N.length-2][1].end:{line:1,column:1,offset:0})},xe=-1;++xe<t.transforms.length;)I=t.transforms[xe](I)||I;return I}function a(N,I,te){let fe=I-1,xe=-1,Et=!1,Ct,er,Kl,Wl;for(;++fe<=te;){const Kt=N[fe];switch(Kt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Kt[0]==="enter"?xe++:xe--,Wl=void 0;break}case"lineEndingBlank":{Kt[0]==="enter"&&(Ct&&!Wl&&!xe&&!Kl&&(Kl=fe),Wl=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wl=void 0}if(!xe&&Kt[0]==="enter"&&Kt[1].type==="listItemPrefix"||xe===-1&&Kt[0]==="exit"&&(Kt[1].type==="listUnordered"||Kt[1].type==="listOrdered")){if(Ct){let _i=fe;for(er=void 0;_i--;){const tr=N[_i];if(tr[1].type==="lineEnding"||tr[1].type==="lineEndingBlank"){if(tr[0]==="exit")continue;er&&(N[er][1].type="lineEndingBlank",Et=!0),tr[1].type="lineEnding",er=_i}else if(!(tr[1].type==="linePrefix"||tr[1].type==="blockQuotePrefix"||tr[1].type==="blockQuotePrefixWhitespace"||tr[1].type==="blockQuoteMarker"||tr[1].type==="listItemIndent"))break}Kl&&(!er||Kl<er)&&(Ct._spread=!0),Ct.end=Object.assign({},er?N[er][1].start:Kt[1].end),N.splice(er||fe,0,["exit",Ct,Kt[2]]),fe++,te++}if(Kt[1].type==="listItemPrefix"){const _i={type:"listItem",_spread:!1,start:Object.assign({},Kt[1].start),end:void 0};Ct=_i,N.splice(fe,0,["enter",_i,Kt[2]]),fe++,te++,Kl=void 0,Wl=!0}}}return N[I][1]._spread=Et,te}function i(N,I){return te;function te(fe){o.call(this,N(fe),fe),I&&I.call(this,fe)}}function l(){this.stack.push({type:"fragment",children:[]})}function o(N,I,te){this.stack[this.stack.length-1].children.push(N),this.stack.push(N),this.tokenStack.push([I,te||void 0]),N.position={start:Dr(I.start),end:void 0}}function s(N){return I;function I(te){N&&N.call(this,te),u.call(this,te)}}function u(N,I){const te=this.stack.pop(),fe=this.tokenStack.pop();if(fe)fe[0].type!==N.type&&(I?I.call(this,N,fe[0]):(fe[1]||Nb).call(this,N,fe[0]));else throw new Error("Cannot close `"+N.type+"` ("+Do({start:N.start,end:N.end})+"): it’s not open");te.position.end=Dr(N.end)}function c(){return LP(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(N){if(this.data.expectingFirstListItemValue){const I=this.stack[this.stack.length-2];I.start=Number.parseInt(this.sliceSerialize(N),10),this.data.expectingFirstListItemValue=void 0}}function h(){const N=this.resume(),I=this.stack[this.stack.length-1];I.lang=N}function b(){const N=this.resume(),I=this.stack[this.stack.length-1];I.meta=N}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const N=this.resume(),I=this.stack[this.stack.length-1];I.value=N.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function p(){const N=this.resume(),I=this.stack[this.stack.length-1];I.value=N.replace(/(\r?\n|\r)$/g,"")}function g(N){const I=this.resume(),te=this.stack[this.stack.length-1];te.label=I,te.identifier=ol(this.sliceSerialize(N)).toLowerCase()}function m(){const N=this.resume(),I=this.stack[this.stack.length-1];I.title=N}function S(){const N=this.resume(),I=this.stack[this.stack.length-1];I.url=N}function k(N){const I=this.stack[this.stack.length-1];if(!I.depth){const te=this.sliceSerialize(N).length;I.depth=te}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(N){const I=this.stack[this.stack.length-1];I.depth=this.sliceSerialize(N).codePointAt(0)===61?1:2}function O(){this.data.setextHeadingSlurpLineEnding=void 0}function z(N){const te=this.stack[this.stack.length-1].children;let fe=te[te.length-1];(!fe||fe.type!=="text")&&(fe=j(),fe.position={start:Dr(N.start),end:void 0},te.push(fe)),this.stack.push(fe)}function P(N){const I=this.stack.pop();I.value+=this.sliceSerialize(N),I.position.end=Dr(N.end)}function $(N){const I=this.stack[this.stack.length-1];if(this.data.atHardBreak){const te=I.children[I.children.length-1];te.position.end=Dr(N.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(I.type)&&(z.call(this,N),P.call(this,N))}function B(){this.data.atHardBreak=!0}function U(){const N=this.resume(),I=this.stack[this.stack.length-1];I.value=N}function H(){const N=this.resume(),I=this.stack[this.stack.length-1];I.value=N}function F(){const N=this.resume(),I=this.stack[this.stack.length-1];I.value=N}function D(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=I,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function q(){const N=this.stack[this.stack.length-1];if(this.data.inReference){const I=this.data.referenceType||"shortcut";N.type+="Reference",N.referenceType=I,delete N.url,delete N.title}else delete N.identifier,delete N.label;this.data.referenceType=void 0}function V(N){const I=this.sliceSerialize(N),te=this.stack[this.stack.length-2];te.label=D5(I),te.identifier=ol(I).toLowerCase()}function ae(){const N=this.stack[this.stack.length-1],I=this.resume(),te=this.stack[this.stack.length-1];if(this.data.inReference=!0,te.type==="link"){const fe=N.children;te.children=fe}else te.alt=I}function w(){const N=this.resume(),I=this.stack[this.stack.length-1];I.url=N}function Me(){const N=this.resume(),I=this.stack[this.stack.length-1];I.title=N}function qe(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function Ce(N){const I=this.resume(),te=this.stack[this.stack.length-1];te.label=I,te.identifier=ol(this.sliceSerialize(N)).toLowerCase(),this.data.referenceType="full"}function be(N){this.data.characterReferenceType=N.type}function de(N){const I=this.sliceSerialize(N),te=this.data.characterReferenceType;let fe;te?(fe=mE(I,te==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):fe=Qm(I);const xe=this.stack[this.stack.length-1];xe.value+=fe}function pn(N){const I=this.stack.pop();I.position.end=Dr(N.end)}function Lt(N){P.call(this,N);const I=this.stack[this.stack.length-1];I.url=this.sliceSerialize(N)}function ze(N){P.call(this,N);const I=this.stack[this.stack.length-1];I.url="mailto:"+this.sliceSerialize(N)}function Nn(){return{type:"blockquote",children:[]}}function zn(){return{type:"code",lang:null,meta:null,value:""}}function Nr(){return{type:"inlineCode",value:""}}function Ma(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function zr(){return{type:"emphasis",children:[]}}function As(){return{type:"heading",depth:0,children:[]}}function ks(){return{type:"break"}}function Os(){return{type:"html",value:""}}function of(){return{type:"image",title:null,url:"",alt:null}}function Jl(){return{type:"link",title:null,url:"",children:[]}}function Ns(N){return{type:"list",ordered:N.type==="listOrdered",start:null,spread:N._spread,children:[]}}function Ln(N){return{type:"listItem",spread:N._spread,checked:null,children:[]}}function sf(){return{type:"paragraph",children:[]}}function uf(){return{type:"strong",children:[]}}function j(){return{type:"text",value:""}}function X(){return{type:"thematicBreak"}}}function Dr(e){return{line:e.line,column:e.column,offset:e.offset}}function TE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?TE(e,r):B5(e,r)}}function B5(e,t){let n;for(n in t)if(CE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function Nb(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Do({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Do({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Do({start:t.start,end:t.end})+") is still open")}function $5(e){const t=this;t.parser=n;function n(r){return U5(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function I5(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Z5(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
186
|
+
`}]}function H5(e,t){const n=t.value?t.value+`
|
|
187
|
+
`:"",r={},a=t.lang?t.lang.split(/\s+/):[];a.length>0&&(r.className=["language-"+a[0]]);let i={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}function F5(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function q5(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function G5(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),a=Xl(r.toLowerCase()),i=e.footnoteOrder.indexOf(r);let l,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),l=e.footnoteOrder.length):l=i+1,o+=1,e.footnoteCounts.set(r,o);const s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+a,id:n+"fnref-"+a+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,s);const u={type:"element",tagName:"sup",properties:{},children:[s]};return e.patch(t,u),e.applyData(t,u)}function V5(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Q5(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function AE(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const a=e.all(t),i=a[0];i&&i.type==="text"?i.value="["+i.value:a.unshift({type:"text",value:"["});const l=a[a.length-1];return l&&l.type==="text"?l.value+=r:a.push({type:"text",value:r}),a}function Y5(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return AE(e,t);const a={src:Xl(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"img",properties:a,children:[]};return e.patch(t,i),e.applyData(t,i)}function X5(e,t){const n={src:Xl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function J5(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function K5(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return AE(e,t);const a={href:Xl(r.url||"")};r.title!==null&&r.title!==void 0&&(a.title=r.title);const i={type:"element",tagName:"a",properties:a,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function W5(e,t){const n={href:Xl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function e9(e,t,n){const r=e.all(t),a=n?t9(n):kE(t),i={},l=[];if(typeof t.checked=="boolean"){const c=r[0];let f;c&&c.type==="element"&&c.tagName==="p"?f=c:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const c=r[o];(a||o!==0||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
|
|
188
|
+
`}),c.type==="element"&&c.tagName==="p"&&!a?l.push(...c.children):l.push(c)}const s=r[r.length-1];s&&(a||s.type!=="element"||s.tagName!=="p")&&l.push({type:"text",value:`
|
|
189
|
+
`});const u={type:"element",tagName:"li",properties:i,children:l};return e.patch(t,u),e.applyData(t,u)}function t9(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=kE(n[r])}return t}function kE(e){const t=e.spread;return t??e.children.length>1}function n9(e,t){const n={},r=e.all(t);let a=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++a<r.length;){const l=r[a];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}function r9(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function a9(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function i9(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function l9(e,t){const n=e.all(t),r=n.shift(),a=[];if(r){const l={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],l),a.push(l)}if(n.length>0){const l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=Fm(t.children[1]),s=sE(t.children[t.children.length-1]);o&&s&&(l.position={start:o,end:s}),a.push(l)}const i={type:"element",tagName:"table",properties:{},children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}function o9(e,t,n){const r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,o=l?l.length:t.children.length;let s=-1;const u=[];for(;++s<o;){const f=t.children[s],d={},h=l?l[s]:void 0;h&&(d.align=h);let b={type:"element",tagName:i,properties:d,children:[]};f&&(b.children=e.all(f),e.patch(f,b),b=e.applyData(f,b)),u.push(b)}const c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}function s9(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const zb=9,Rb=32;function u9(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),a=0;const i=[];for(;r;)i.push(Mb(t.slice(a,r.index),a>0,!0),r[0]),a=r.index+r[0].length,r=n.exec(t);return i.push(Mb(t.slice(a),a>0,!1)),i.join("")}function Mb(e,t,n){let r=0,a=e.length;if(t){let i=e.codePointAt(r);for(;i===zb||i===Rb;)r++,i=e.codePointAt(r)}if(n){let i=e.codePointAt(a-1);for(;i===zb||i===Rb;)a--,i=e.codePointAt(a-1)}return a>r?e.slice(r,a):""}function c9(e,t){const n={type:"text",value:u9(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function f9(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const d9={blockquote:I5,break:Z5,code:H5,delete:F5,emphasis:q5,footnoteReference:G5,heading:V5,html:Q5,imageReference:Y5,image:X5,inlineCode:J5,linkReference:K5,link:W5,listItem:e9,list:n9,paragraph:r9,root:a9,strong:i9,table:l9,tableCell:s9,tableRow:o9,text:c9,thematicBreak:f9,toml:uu,yaml:uu,definition:uu,footnoteDefinition:uu};function uu(){}const OE=-1,af=0,Uo=1,Cc=2,Jm=3,Km=4,Wm=5,eg=6,NE=7,zE=8,jb=typeof self=="object"?self:globalThis,h9=(e,t)=>{const n=(a,i)=>(e.set(i,a),a),r=a=>{if(e.has(a))return e.get(a);const[i,l]=t[a];switch(i){case af:case OE:return n(l,a);case Uo:{const o=n([],a);for(const s of l)o.push(r(s));return o}case Cc:{const o=n({},a);for(const[s,u]of l)o[r(s)]=r(u);return o}case Jm:return n(new Date(l),a);case Km:{const{source:o,flags:s}=l;return n(new RegExp(o,s),a)}case Wm:{const o=n(new Map,a);for(const[s,u]of l)o.set(r(s),r(u));return o}case eg:{const o=n(new Set,a);for(const s of l)o.add(r(s));return o}case NE:{const{name:o,message:s}=l;return n(new jb[o](s),a)}case zE:return n(BigInt(l),a);case"BigInt":return n(Object(BigInt(l)),a);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{const{buffer:o}=new Uint8Array(l);return n(new DataView(o),l)}}return n(new jb[i](l),a)};return r},Db=e=>h9(new Map,e)(0),zi="",{toString:p9}={},{keys:m9}=Object,co=e=>{const t=typeof e;if(t!=="object"||!e)return[af,t];const n=p9.call(e).slice(8,-1);switch(n){case"Array":return[Uo,zi];case"Object":return[Cc,zi];case"Date":return[Jm,zi];case"RegExp":return[Km,zi];case"Map":return[Wm,zi];case"Set":return[eg,zi];case"DataView":return[Uo,n]}return n.includes("Array")?[Uo,n]:n.includes("Error")?[NE,n]:[Cc,n]},cu=([e,t])=>e===af&&(t==="function"||t==="symbol"),g9=(e,t,n,r)=>{const a=(l,o)=>{const s=r.push(l)-1;return n.set(o,s),s},i=l=>{if(n.has(l))return n.get(l);let[o,s]=co(l);switch(o){case af:{let c=l;switch(s){case"bigint":o=zE,c=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+s);c=null;break;case"undefined":return a([OE],l)}return a([o,c],l)}case Uo:{if(s){let d=l;return s==="DataView"?d=new Uint8Array(l.buffer):s==="ArrayBuffer"&&(d=new Uint8Array(l)),a([s,[...d]],l)}const c=[],f=a([o,c],l);for(const d of l)c.push(i(d));return f}case Cc:{if(s)switch(s){case"BigInt":return a([s,l.toString()],l);case"Boolean":case"Number":case"String":return a([s,l.valueOf()],l)}if(t&&"toJSON"in l)return i(l.toJSON());const c=[],f=a([o,c],l);for(const d of m9(l))(e||!cu(co(l[d])))&&c.push([i(d),i(l[d])]);return f}case Jm:return a([o,l.toISOString()],l);case Km:{const{source:c,flags:f}=l;return a([o,{source:c,flags:f}],l)}case Wm:{const c=[],f=a([o,c],l);for(const[d,h]of l)(e||!(cu(co(d))||cu(co(h))))&&c.push([i(d),i(h)]);return f}case eg:{const c=[],f=a([o,c],l);for(const d of l)(e||!cu(co(d)))&&c.push(i(d));return f}}const{message:u}=l;return a([o,{name:s,message:u}],l)};return i},Lb=(e,{json:t,lossy:n}={})=>{const r=[];return g9(!(t||n),!!t,new Map,r)(e),r},Tc=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Db(Lb(e,t)):structuredClone(e):(e,t)=>Db(Lb(e,t));function y9(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function v9(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function b9(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||y9,r=e.options.footnoteBackLabel||v9,a=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let s=-1;for(;++s<e.footnoteOrder.length;){const u=e.footnoteById.get(e.footnoteOrder[s]);if(!u)continue;const c=e.all(u),f=String(u.identifier).toUpperCase(),d=Xl(f.toLowerCase());let h=0;const b=[],y=e.footnoteCounts.get(f);for(;y!==void 0&&++h<=y;){b.length>0&&b.push({type:"text",value:" "});let g=typeof n=="string"?n:n(s,h);typeof g=="string"&&(g={type:"text",value:g}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(s,h),className:["data-footnote-backref"]},children:Array.isArray(g)?g:[g]})}const _=c[c.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const g=_.children[_.children.length-1];g&&g.type==="text"?g.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...b)}else c.push(...b);const p={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(u,p),o.push(p)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...Tc(l),id:"footnote-label"},children:[{type:"text",value:a}]},{type:"text",value:`
|
|
190
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
191
|
+
`}]}}const RE=function(e){if(e==null)return w9;if(typeof e=="function")return lf(e);if(typeof e=="object")return Array.isArray(e)?S9(e):x9(e);if(typeof e=="string")return _9(e);throw new Error("Expected function, string, or object as test")};function S9(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=RE(e[n]);return lf(r);function r(...a){let i=-1;for(;++i<t.length;)if(t[i].apply(this,a))return!0;return!1}}function x9(e){const t=e;return lf(n);function n(r){const a=r;let i;for(i in e)if(a[i]!==t[i])return!1;return!0}}function _9(e){return lf(t);function t(n){return n&&n.type===e}}function lf(e){return t;function t(n,r,a){return!!(E9(n)&&e.call(this,n,typeof r=="number"?r:void 0,a||void 0))}}function w9(){return!0}function E9(e){return e!==null&&typeof e=="object"&&"type"in e}const ME=[],C9=!0,Ub=!1,T9="skip";function A9(e,t,n,r){let a;typeof t=="function"&&typeof n!="function"?(r=n,n=t):a=t;const i=RE(a),l=r?-1:1;o(e,void 0,[])();function o(s,u,c){const f=s&&typeof s=="object"?s:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(s.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=ME,b,y,_;if((!t||i(s,u,c[c.length-1]||void 0))&&(h=k9(n(s,c)),h[0]===Ub))return h;if("children"in s&&s.children){const p=s;if(p.children&&h[0]!==T9)for(y=(r?p.children.length:-1)+l,_=c.concat(p);y>-1&&y<p.children.length;){const g=p.children[y];if(b=o(g,y,_)(),b[0]===Ub)return b;y=typeof b[1]=="number"?b[1]:y+l}}return h}}}function k9(e){return Array.isArray(e)?e:typeof e=="number"?[C9,e]:e==null?ME:[e]}function jE(e,t,n,r){let a,i,l;typeof t=="function"&&typeof n!="function"?(i=void 0,l=t,a=n):(i=t,l=n,a=r),A9(e,i,o,a);function o(s,u){const c=u[u.length-1],f=c?c.children.indexOf(s):void 0;return l(s,f,c)}}const ap={}.hasOwnProperty,O9={};function N9(e,t){const n=t||O9,r=new Map,a=new Map,i=new Map,l={...d9,...n.handlers},o={all:u,applyData:R9,definitionById:r,footnoteById:a,footnoteCounts:i,footnoteOrder:[],handlers:l,one:s,options:n,patch:z9,wrap:j9};return jE(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){const f=c.type==="definition"?r:a,d=String(c.identifier).toUpperCase();f.has(d)||f.set(d,c)}}),o;function s(c,f){const d=c.type,h=o.handlers[d];if(ap.call(o.handlers,d)&&h)return h(o,c,f);if(o.options.passThrough&&o.options.passThrough.includes(d)){if("children"in c){const{children:y,..._}=c,p=Tc(_);return p.children=o.all(c),p}return Tc(c)}return(o.options.unknownHandler||M9)(o,c,f)}function u(c){const f=[];if("children"in c){const d=c.children;let h=-1;for(;++h<d.length;){const b=o.one(d[h],c);if(b){if(h&&d[h-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Pb(b.value)),!Array.isArray(b)&&b.type==="element")){const y=b.children[0];y&&y.type==="text"&&(y.value=Pb(y.value))}Array.isArray(b)?f.push(...b):f.push(b)}}}return f}}function z9(e,t){e.position&&(t.position=pP(e))}function R9(e,t){let n=t;if(e&&e.data){const r=e.data.hName,a=e.data.hChildren,i=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const l="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:l}}n.type==="element"&&i&&Object.assign(n.properties,Tc(i)),"children"in n&&n.children&&a!==null&&a!==void 0&&(n.children=a)}return n}function M9(e,t){const n=t.data||{},r="value"in t&&!(ap.call(n,"hProperties")||ap.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function j9(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
192
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
193
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
194
|
+
`}),n}function Pb(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Bb(e,t){const n=N9(e,t),r=n.one(e,void 0),a=b9(n),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return a&&i.children.push({type:"text",value:`
|
|
195
|
+
`},a),i}function D9(e,t){return e&&"run"in e?async function(n,r){const a=Bb(n,{file:r,...t});await e.run(a,r)}:function(n,r){return Bb(n,{file:r,...e||t})}}function $b(e){if(e)throw e}var ju=Object.prototype.hasOwnProperty,DE=Object.prototype.toString,Ib=Object.defineProperty,Zb=Object.getOwnPropertyDescriptor,Hb=function(t){return typeof Array.isArray=="function"?Array.isArray(t):DE.call(t)==="[object Array]"},Fb=function(t){if(!t||DE.call(t)!=="[object Object]")return!1;var n=ju.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ju.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var a;for(a in t);return typeof a>"u"||ju.call(t,a)},qb=function(t,n){Ib&&n.name==="__proto__"?Ib(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},Gb=function(t,n){if(n==="__proto__")if(ju.call(t,n)){if(Zb)return Zb(t,n).value}else return;return t[n]},L9=function e(){var t,n,r,a,i,l,o=arguments[0],s=1,u=arguments.length,c=!1;for(typeof o=="boolean"&&(c=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s<u;++s)if(t=arguments[s],t!=null)for(n in t)r=Gb(o,n),a=Gb(t,n),o!==a&&(c&&a&&(Fb(a)||(i=Hb(a)))?(i?(i=!1,l=r&&Hb(r)?r:[]):l=r&&Fb(r)?r:{},qb(o,{name:n,newValue:e(c,l,a)})):typeof a<"u"&&qb(o,{name:n,newValue:a}));return o};const gd=Ac(L9);function ip(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function U9(){const e=[],t={run:n,use:r};return t;function n(...a){let i=-1;const l=a.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);o(null,...a);function o(s,...u){const c=e[++i];let f=-1;if(s){l(s);return}for(;++f<a.length;)(u[f]===null||u[f]===void 0)&&(u[f]=a[f]);a=u,c?P9(c,o)(...u):l(null,...u)}}function r(a){if(typeof a!="function")throw new TypeError("Expected `middelware` to be a function, not "+a);return e.push(a),t}}function P9(e,t){let n;return r;function r(...l){const o=e.length>l.length;let s;o&&l.push(a);try{s=e.apply(this,l)}catch(u){const c=u;if(o&&n)throw c;return a(c)}o||(s&&s.then&&typeof s.then=="function"?s.then(i,a):s instanceof Error?a(s):i(s))}function a(l,...o){n||(n=!0,t(l,...o))}function i(l){a(null,l)}}const Un={basename:B9,dirname:$9,extname:I9,join:Z9,sep:"/"};function B9(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ts(e);let n=0,r=-1,a=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else r<0&&(i=!0,r=a+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let l=-1,o=t.length-1;for(;a--;)if(e.codePointAt(a)===47){if(i){n=a+1;break}}else l<0&&(i=!0,l=a+1),o>-1&&(e.codePointAt(a)===t.codePointAt(o--)?o<0&&(r=a):(o=-1,r=l));return n===r?r=l:r<0&&(r=e.length),e.slice(n,r)}function $9(e){if(Ts(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function I9(e){Ts(e);let t=e.length,n=-1,r=0,a=-1,i=0,l;for(;t--;){const o=e.codePointAt(t);if(o===47){if(l){r=t+1;break}continue}n<0&&(l=!0,n=t+1),o===46?a<0?a=t:i!==1&&(i=1):a>-1&&(i=-1)}return a<0||n<0||i===0||i===1&&a===n-1&&a===r+1?"":e.slice(a,n)}function Z9(...e){let t=-1,n;for(;++t<e.length;)Ts(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":H9(n)}function H9(e){Ts(e);const t=e.codePointAt(0)===47;let n=F9(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function F9(e,t){let n="",r=0,a=-1,i=0,l=-1,o,s;for(;++l<=e.length;){if(l<e.length)o=e.codePointAt(l);else{if(o===47)break;o=47}if(o===47){if(!(a===l-1||i===1))if(a!==l-1&&i===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",r=0):(n=n.slice(0,s),r=n.length-1-n.lastIndexOf("/")),a=l,i=0;continue}}else if(n.length>0){n="",r=0,a=l,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(a+1,l):n=e.slice(a+1,l),r=l-a-1;a=l,i=0}else o===46&&i>-1?i++:i=-1}return n}function Ts(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const q9={cwd:G9};function G9(){return"/"}function lp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function V9(e){if(typeof e=="string")e=new URL(e);else if(!lp(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return Q9(e)}function Q9(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const a=new TypeError("File URL path must not include encoded / characters");throw a.code="ERR_INVALID_FILE_URL_PATH",a}}return decodeURIComponent(t)}const yd=["history","path","basename","stem","extname","dirname"];class LE{constructor(t){let n;t?lp(t)?n={path:t}:typeof t=="string"||Y9(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":q9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<yd.length;){const i=yd[r];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let a;for(a in n)yd.includes(a)||(this[a]=n[a])}get basename(){return typeof this.path=="string"?Un.basename(this.path):void 0}set basename(t){bd(t,"basename"),vd(t,"basename"),this.path=Un.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Un.dirname(this.path):void 0}set dirname(t){Vb(this.basename,"dirname"),this.path=Un.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Un.extname(this.path):void 0}set extname(t){if(vd(t,"extname"),Vb(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Un.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){lp(t)&&(t=V9(t)),bd(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Un.basename(this.path,this.extname):void 0}set stem(t){bd(t,"stem"),vd(t,"stem"),this.path=Un.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const a=this.message(t,n,r);throw a.fatal=!0,a}info(t,n,r){const a=this.message(t,n,r);return a.fatal=void 0,a}message(t,n,r){const a=new At(t,n,r);return this.path&&(a.name=this.path+":"+a.name,a.file=this.path),a.fatal=!1,this.messages.push(a),a}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function vd(e,t){if(e&&e.includes(Un.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Un.sep+"`")}function bd(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Vb(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function Y9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const X9=function(e){const r=this.constructor.prototype,a=r[e],i=function(){return a.apply(i,arguments)};return Object.setPrototypeOf(i,r),i},J9={}.hasOwnProperty;class tg extends X9{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=U9()}copy(){const t=new tg;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(gd(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(_d("data",this.frozen),this.namespace[t]=n,this):J9.call(this.namespace,t)&&this.namespace[t]||void 0:t?(_d("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const a=n.call(t,...r);typeof a=="function"&&this.transformers.use(a)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=fu(t),r=this.parser||this.Parser;return Sd("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Sd("process",this.parser||this.Parser),xd("process",this.compiler||this.Compiler),n?a(void 0,n):new Promise(a);function a(i,l){const o=fu(t),s=r.parse(o);r.run(s,o,function(c,f,d){if(c||!f||!d)return u(c);const h=f,b=r.stringify(h,d);e$(b)?d.value=b:d.result=b,u(c,d)});function u(c,f){c||!f?l(c):i?i(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Sd("processSync",this.parser||this.Parser),xd("processSync",this.compiler||this.Compiler),this.process(t,a),Yb("processSync","process",n),r;function a(i,l){n=!0,$b(i),r=l}}run(t,n,r){Qb(t),this.freeze();const a=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?i(void 0,r):new Promise(i);function i(l,o){const s=fu(n);a.run(t,s,u);function u(c,f,d){const h=f||t;c?o(c):l?l(h):r(void 0,h,d)}}}runSync(t,n){let r=!1,a;return this.run(t,n,i),Yb("runSync","run",r),a;function i(l,o){$b(l),a=o,r=!0}}stringify(t,n){this.freeze();const r=fu(n),a=this.compiler||this.Compiler;return xd("stringify",a),Qb(t),a(t,r)}use(t,...n){const r=this.attachers,a=this.namespace;if(_d("use",this.frozen),t!=null)if(typeof t=="function")s(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){const[c,...f]=u;s(c,f)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(u.plugins),u.settings&&(a.settings=gd(!0,a.settings,u.settings))}function o(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){const f=u[c];i(f)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,c){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===u){d=f;break}if(d===-1)r.push([u,...c]);else if(c.length>0){let[h,...b]=c;const y=r[d][1];ip(y)&&ip(h)&&(h=gd(!0,y,h)),r[d]=[u,h,...b]}}}}const K9=new tg().freeze();function Sd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xd(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function _d(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qb(e){if(!ip(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Yb(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function fu(e){return W9(e)?e:new LE(e)}function W9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function e$(e){return typeof e=="string"||t$(e)}function t$(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const n$="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Xb=[],Jb={allowDangerousHtml:!0},r$=/^(https?|ircs?|mailto|xmpp)$/i,a$=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function i$(e){const t=l$(e),n=o$(e);return s$(t.runSync(t.parse(n),n),e)}function l$(e){const t=e.rehypePlugins||Xb,n=e.remarkPlugins||Xb,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Jb}:Jb;return K9().use($5).use(n).use(D9,r).use(t)}function o$(e){const t=e.children||"",n=new LE;return typeof t=="string"&&(n.value=t),n}function s$(e,t){const n=t.allowedElements,r=t.allowElement,a=t.components,i=t.disallowedElements,l=t.skipHtml,o=t.unwrapDisallowed,s=t.urlTransform||u$;for(const c of a$)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+n$+c.id,void 0);return jE(e,u),bP(e,{Fragment:x.Fragment,components:a,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function u(c,f,d){if(c.type==="raw"&&d&&typeof f=="number")return l?d.children.splice(f,1):d.children[f]={type:"text",value:c.value},f;if(c.type==="element"){let h;for(h in hd)if(Object.hasOwn(hd,h)&&Object.hasOwn(c.properties,h)){const b=c.properties[h],y=hd[h];(y===null||y.includes(c.tagName))&&(c.properties[h]=s(String(b||""),h,c))}}if(c.type==="element"){let h=n?!n.includes(c.tagName):i?i.includes(c.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(c,f,d)),h&&d&&typeof f=="number")return o&&c.children?d.children.splice(f,1,...c.children):d.children.splice(f,1),f}}}function u$(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),a=e.indexOf("/");return t===-1||a!==-1&&t>a||n!==-1&&t>n||r!==-1&&t>r||r$.test(e.slice(0,t))?e:""}function c$(e){const t=[e.content,e.markdown,e.text];for(const n of t)if(typeof n=="string"&&n.trim()!=="")return n;return""}function f$({props:e}){const t=c$(e);return t===""?null:x.jsx("div",{className:ne.markdown,children:x.jsx(i$,{children:t})})}const Kb=Y({color:M().optional(),label:M(),value:ft()}),d$=AD(kD,{components:{ApprovalCard:{description:"Approval request card with quick response buttons",props:Y({badge:M().optional(),title:M(),details:We(M()).optional(),replyHint:M().optional(),actions:We(Y({label:M(),value:M(),variant:je(["primary","secondary","destructive"]).optional()})).optional()})},Alert:Bt.Alert,Avatar:Bt.Avatar,Badge:Bt.Badge,BarGraph:{description:"Compact bar chart for labeled numeric series",props:Y({currency:M().optional(),data:We(Kb),description:M().optional(),format:je(["currency","number","percent"]).optional(),maxValue:ft().optional(),title:M().optional()})},Card:Bt.Card,Grid:Bt.Grid,Heading:Bt.Heading,Image:Bt.Image,LineGraph:{description:"Compact line chart for labeled numeric series",props:Y({currency:M().optional(),data:We(Kb),description:M().optional(),format:je(["currency","number","percent"]).optional(),maxValue:ft().optional(),title:M().optional()})},Markdown:{description:"Markdown content rendered with react-markdown",props:Y({content:M()})},Progress:Bt.Progress,Separator:Bt.Separator,Skeleton:Bt.Skeleton,Spinner:Bt.Spinner,Stack:Bt.Stack,Table:Bt.Table,Text:Bt.Text},actions:{}}),{registry:Wb}=VD(d$,{components:{ApprovalCard:bU,Alert:pU,Avatar:Wt.Avatar,Badge:Wt.Badge,BarGraph:xU,Card:Wt.Card,Grid:Wt.Grid,Heading:Wt.Heading,Image:Wt.Image,LineGraph:_U,Markdown:f$,Progress:Wt.Progress,Separator:Wt.Separator,Skeleton:Wt.Skeleton,Spinner:Wt.Spinner,Stack:Wt.Stack,Table:Wt.Table,Text:Wt.Text}});function fo(e){return typeof e=="object"&&e!==null}function h$(e){if(!fo(e))return null;const t=e.root,n=e.elements;if(typeof t!="string"||t.trim()===""||!fo(n))return null;const r={};for(const[a,i]of Object.entries(n)){if(!fo(i)||typeof i.type!="string"||i.type.trim()==="")return null;const l={...i,type:i.type,props:fo(i.props)?i.props:{}};Array.isArray(i.children)&&(l.children=i.children.filter(o=>typeof o=="string"&&o.trim()!=="")),r[a]=l}return{...e,root:t,elements:r,state:fo(e.state)?e.state:void 0}}const p$=({element:e})=>{const t=e;return x.jsxs("p",{className:ne.fallback,children:["Unsupported component: ",t.type]})};function m$({approvalDisabled:e=!1,onApprovalAction:t,spec:n}){const r=h$(n);return r?x.jsx("div",{className:ne.root,children:x.jsx(Xw.Provider,{value:{approvalDisabled:e,onApprovalAction:t},children:x.jsx(qD,{initialState:r.state,registry:Wb,children:x.jsx(FD,{fallback:p$,registry:Wb,spec:r})})})}):x.jsx("p",{className:ne.fallback,children:"[json-render message]"})}const g$="_page_6miy9_1",y$="_panel_6miy9_13",v$="_header_6miy9_21",b$="_headerBar_6miy9_31",S$="_backButton_6miy9_38",x$="_title_6miy9_50",_$="_headerStatusBadge_6miy9_61",w$="_headerStatusBadgeError_6miy9_73",E$="_muted_6miy9_79",C$="_error_6miy9_85",T$="_timelineSection_6miy9_91",A$="_timelineViewport_6miy9_101",k$="_timelineContent_6miy9_115",O$="_timelinePullStatus_6miy9_120",N$="_timelineList_6miy9_127",z$="_timelineItem_6miy9_135",R$="_timelineItemFullWidth_6miy9_140",M$="_timelineItemOwn_6miy9_144",j$="_timelineItemOther_6miy9_148",D$="_timelineItemAgent_6miy9_152",L$="_messageBubble_6miy9_156",U$="_messageBubbleOwnFull_6miy9_166",P$="_messageBubbleAgent_6miy9_175",B$="_timelineMeta_6miy9_184",$$="_timelineMetaAgent_6miy9_191",I$="_timelineMetaOwn_6miy9_197",Z$="_timelineMetaRight_6miy9_203",H$="_sender_6miy9_209",F$="_timestamp_6miy9_215",q$="_editedBadge_6miy9_220",G$="_messageActionsTrigger_6miy9_225",V$="_messageText_6miy9_240",Q$="_messageTextAgent_6miy9_248",Y$="_messageTextOwn_6miy9_255",X$="_messageTextDeleted_6miy9_262",J$="_imageAttachmentLink_6miy9_267",K$="_imageAttachment_6miy9_267",W$="_fileAttachmentLink_6miy9_281",eI="_reactionSection_6miy9_299",tI="_reactionGroups_6miy9_305",nI="_reactionChip_6miy9_312",rI="_reactionChipOwn_6miy9_324",aI="_unreadBanner_6miy9_330",iI="_composerForm_6miy9_364",lI="_composerFormKeyboardOpen_6miy9_377",oI="_editingBanner_6miy9_381",sI="_editingCancelButton_6miy9_391",uI="_composerDock_6miy9_401",cI="_iconButton_6miy9_408",fI="_attachButton_6miy9_419",dI="_submitButton_6miy9_428",hI="_attachButtonDisabled_6miy9_432",pI="_composerField_6miy9_443",mI="_composerInput_6miy9_462",gI="_attachInput_6miy9_486",yI="_attachmentChip_6miy9_490",vI="_attachmentName_6miy9_503",bI="_attachmentRemove_6miy9_512",SI="_contextMenu_6miy9_550",xI="_contextMenuAction_6miy9_563",_I="_contextMenuActionDanger_6miy9_578",wI="_card_6miy9_587",Q={page:g$,panel:y$,header:v$,headerBar:b$,backButton:S$,title:x$,headerStatusBadge:_$,headerStatusBadgeError:w$,muted:E$,error:C$,timelineSection:T$,timelineViewport:A$,timelineContent:k$,timelinePullStatus:O$,timelineList:N$,timelineItem:z$,timelineItemFullWidth:R$,timelineItemOwn:M$,timelineItemOther:j$,timelineItemAgent:D$,messageBubble:L$,messageBubbleOwnFull:U$,messageBubbleAgent:P$,timelineMeta:B$,timelineMetaAgent:$$,timelineMetaOwn:I$,timelineMetaRight:Z$,sender:H$,timestamp:F$,editedBadge:q$,messageActionsTrigger:G$,messageText:V$,messageTextAgent:Q$,messageTextOwn:Y$,messageTextDeleted:X$,imageAttachmentLink:J$,imageAttachment:K$,fileAttachmentLink:W$,reactionSection:eI,reactionGroups:tI,reactionChip:nI,reactionChipOwn:rI,unreadBanner:aI,composerForm:iI,composerFormKeyboardOpen:lI,editingBanner:oI,editingCancelButton:sI,composerDock:uI,iconButton:cI,attachButton:fI,submitButton:dI,attachButtonDisabled:hI,composerField:pI,composerInput:mI,attachInput:gI,attachmentChip:yI,attachmentName:vI,attachmentRemove:bI,contextMenu:SI,contextMenuAction:xI,contextMenuActionDanger:_I,card:wI},e0=20,t0=32,EI=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});function ho(e,t){return e instanceof la||e instanceof Error&&e.message.trim()!==""?e.message:t}function CI(e,t){return t?e.participant_a.id===t.id?e.participant_b:(e.participant_b.id===t.id,e.participant_a):e.participant_a}function TI(e){const t=Date.parse(e.created_at);return Number.isNaN(t)?e.created_at:EI.format(new Date(t))}function AI(e){return e.type.startsWith("image/")?"image":"file"}function kI(){return x.jsx("svg",{"aria-hidden":"true",fill:"none",height:"14",viewBox:"0 0 22 22",width:"14",children:x.jsx("path",{d:"M11 4.75v12.5M4.75 11h12.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"2.2"})})}function OI(){return x.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"16",viewBox:"0 0 26 26",width:"16",children:[x.jsx("path",{d:"M5.8 13.2 19.9 6.6c.77-.36 1.54.4 1.18 1.18l-6.6 14.1c-.39.83-1.61.73-1.86-.16l-1.4-5.02a1.2 1.2 0 0 0-.84-.84l-5.02-1.4c-.89-.25-.99-1.47-.16-1.86Z",fill:"currentColor"}),x.jsx("path",{d:"m11.2 14.8 4.8-4.8",stroke:"#ffffff",strokeLinecap:"round",strokeWidth:"1.8"})]})}function du(e){e&&(e.scrollTop=e.scrollHeight)}function NI(e,t=48){return e.scrollHeight-e.clientHeight-e.scrollTop<=t}function zI(e,t){if(!e||e.length===0)return[];const n=new Map;for(const r of e){const a=n.get(r.emoji);if(!a){n.set(r.emoji,{emoji:r.emoji,count:1,reactedByMe:t===r.user_id});continue}a.count+=1,t===r.user_id&&(a.reactedByMe=!0)}return Array.from(n.values())}function RI(){const e=_s(),{conversationId:t}=Kk(),{user:n}=ws(),r=K1(),{messageReactions:a}=r,i=Vc(),l=v.useRef(null),o=v.useRef(null),s=v.useRef(null),u=v.useRef(null),c=v.useRef(!0),f=v.useRef(null),d=v.useRef(null),h=v.useRef(null),[b,y]=v.useState(""),[_,p]=v.useState(null),[g,m]=v.useState(null),[S,k]=v.useState(null),[E,T]=v.useState(null),[O,z]=v.useState(!1),[P,$]=v.useState(0),B=v.useRef(0),U=M1({queryKey:["conversation",t],queryFn:()=>ot.getConversation(t),enabled:!!t}),H=xk({queryKey:["messages",t],queryFn:({pageParam:j})=>ot.listMessages(t,{before:typeof j=="string"?j:void 0,limit:e0}),initialPageParam:void 0,getNextPageParam:j=>{if(j.length<e0)return;const X=j[j.length-1];return X==null?void 0:X.message.id},enabled:!!t}),F=v.useMemo(()=>{var X;return[...(((X=H.data)==null?void 0:X.pages)??[]).flatMap(N=>N)].reverse()},[H.data]),D=v.useMemo(()=>U.data?CI(U.data,n):null,[U.data,n]),q=!!H.hasNextPage,V=H.isFetchingNextPage,ae=v.useCallback(async(j,X)=>{if(!t)return;m(null),((X==null?void 0:X.resetComposer)??!1)&&(k(null),y(""),p(null),f.current&&(f.current.value=""));const N={message:j,sender:n??Y1(j)};i.setQueryData(["messages",t],I=>X1(I,N)),await i.invalidateQueries({queryKey:["conversations"]}),c.current=!0,du(l.current)},[t,i,n]),w=Qi({mutationFn:async j=>{if(!t)throw new Error("Conversation id is missing.");const X=j.content.trim();if(j.attachment){const N=await ot.uploadFile(j.attachment,"file");return ot.sendMessage(t,{content:X===""?void 0:X,attachmentUrl:N.url,attachmentType:AI(j.attachment)})}return ot.sendMessage(t,{content:X})},onSuccess:async j=>{await ae(j,{resetComposer:!0})},onError:j=>{m(ho(j,"Failed to send the message."))}}),Me=Qi({mutationFn:async j=>{if(!t)throw new Error("Conversation id is missing.");return ot.sendMessage(t,{content:j.trim()})},onSuccess:async j=>{await ae(j)}}),qe=Qi({mutationFn:async j=>ot.editMessage(j.messageId,{content:j.content}),onSuccess:async j=>{t&&(m(null),k(null),y(""),i.setQueryData(["messages",t],X=>Bh(X,j)),await i.invalidateQueries({queryKey:["conversations"]}))},onError:j=>{m(ho(j,"Failed to edit the message."))}}),A=Qi({mutationFn:async j=>ot.deleteMessage(j),onSuccess:async j=>{t&&((S==null?void 0:S.messageId)===j.id&&(k(null),y("")),m(null),T(null),i.setQueryData(["messages",t],X=>Bh(X,j)),await i.invalidateQueries({queryKey:["conversations"]}))},onError:j=>{m(ho(j,"Failed to delete the message."))}}),Ce=v.useMemo(()=>E?F.find(j=>j.message.id===E.messageId)??null:null,[E,F]),be=v.useCallback(()=>{if(!t||!q||H.isFetchingNextPage)return;const j=l.current;j&&(u.current={conversationId:t,scrollHeight:j.scrollHeight,scrollTop:j.scrollTop}),c.current=!1,H.fetchNextPage()},[t,q,H]),de=v.useCallback(j=>{j&&(j.style.height="0px",j.style.height=`${j.scrollHeight}px`)},[]);v.useLayoutEffect(()=>{const j=l.current;if(!j||!t)return;const X=u.current;if(X&&X.conversationId===t&&!H.isFetchingNextPage){const N=j.scrollHeight-X.scrollHeight+X.scrollTop;j.scrollTop=N,u.current=null;return}F.length!==0&&s.current!==t&&(c.current=!0,du(j),s.current=t)},[t,H.isFetchingNextPage,F.length]),v.useLayoutEffect(()=>{de(h.current)},[b,de]),v.useEffect(()=>{c.current=!0,u.current=null,$(0),B.current=0},[t]),v.useEffect(()=>{const j=B.current,X=F.length;j>0&&X>j&&!c.current&&$(N=>N+(X-j)),B.current=X},[F.length]),v.useEffect(()=>{const j=l.current;if(!j)return;const X=()=>{const N=NI(j);c.current=N,N&&$(0),j.scrollTop<=t0&&be()};return X(),j.addEventListener("scroll",X),()=>{j.removeEventListener("scroll",X)}},[t,be]),v.useEffect(()=>{const j=l.current;j&&j.scrollHeight<=j.clientHeight+t0&&be()},[t,be,F.length]),v.useEffect(()=>{const j=l.current,X=o.current;if(!j||!X||typeof ResizeObserver>"u")return;const N=new ResizeObserver(()=>{c.current&&du(j)});return N.observe(X),()=>{N.disconnect()}},[t,F.length]),v.useEffect(()=>{if(!E)return;const j=N=>{var te;const I=N.target;I&&((te=d.current)!=null&&te.contains(I))||T(null)},X=N=>{N.key==="Escape"&&T(null)};return window.addEventListener("mousedown",j),window.addEventListener("keydown",X),()=>{window.removeEventListener("mousedown",j),window.removeEventListener("keydown",X)}},[E]),v.useEffect(()=>{Ce||T(null)},[Ce]);function pn(){c.current=!0,$(0),du(l.current)}function Lt(j,X,N){const xe=Math.min(X,window.innerWidth-200-8),Et=Math.min(N,window.innerHeight-90-8);T({messageId:j,x:Math.max(8,xe),y:Math.max(8,Et)})}function ze(j,X){Ou(X.message,n==null?void 0:n.id)&&(j.preventDefault(),Lt(X.message.id,j.clientX,j.clientY))}function Nn(j,X){if(!Ou(X.message,n==null?void 0:n.id))return;if((E==null?void 0:E.messageId)===X.message.id){T(null);return}const N=j.getBoundingClientRect();Lt(X.message.id,N.right,N.bottom+4)}function zn(j){var X;if(!Yf(j.message,n==null?void 0:n.id)){m("json-render messages cannot be edited."),T(null);return}k({messageId:j.message.id}),y(((X=j.message.content)==null?void 0:X.trim())??""),p(null),f.current&&(f.current.value=""),m(null),T(null)}function Nr(){k(null),y(""),m(null)}function Ma(j){var N;const X=((N=j.target.files)==null?void 0:N[0])??null;p(X)}function zr(){p(null),f.current&&(f.current.value="")}function As(){var j;Ln||S||(j=f.current)==null||j.click()}function ks(j){j.preventDefault(),m(null);const X=b.trim();if(S){const N=F.find(I=>I.message.id===S.messageId);if(!N||!Yf(N.message,n==null?void 0:n.id)){k(null),y(""),m("json-render messages cannot be edited.");return}if(X===""){m("Edited messages cannot be empty.");return}qe.mutate({messageId:S.messageId,content:X});return}X===""&&!_||w.mutate({content:b,attachment:_})}function Os(j){de(j.target),y(j.target.value)}const of=v.useCallback(async j=>{await Me.mutateAsync(j)},[Me]);if(!t)return x.jsx("section",{className:Q.page,children:x.jsxs("div",{className:Q.card,children:[x.jsx("h2",{className:Q.title,children:"Invalid conversation route"}),x.jsx("p",{className:Q.muted,children:"Conversation id is missing."})]})});const Jl=H.isError?ho(H.error,"Failed to load messages."):null,Ns=b.trim()!==""||!!_,Ln=w.isPending||Me.isPending||qe.isPending||A.isPending||V,sf=U.isLoading?"Loading conversation...":U.isError?"Conversation unavailable":D?`@${D.username}`:"Conversation",uf=U.isError?ho(U.error,"Failed to load conversation."):W1(r.status);return x.jsxs("section",{className:Q.page,children:[x.jsxs("div",{className:Q.panel,children:[x.jsx("header",{className:Q.header,children:x.jsxs("div",{className:Q.headerBar,children:[x.jsx("button",{"aria-label":"Back to conversations",className:Q.backButton,onClick:()=>e("/"),type:"button",children:"←"}),x.jsx("h2",{className:Q.title,children:sf}),x.jsx("span",{className:`${Q.headerStatusBadge}${U.isError?` ${Q.headerStatusBadgeError}`:""}`,children:uf})]})}),x.jsxs("section",{className:Q.timelineSection,children:[x.jsx("div",{className:Q.timelineViewport,ref:l,children:x.jsxs("div",{className:Q.timelineContent,ref:o,children:[H.isFetchingNextPage?x.jsx("p",{className:Q.timelinePullStatus,children:"Loading older messages..."}):null,Jl?x.jsx("p",{className:Q.error,children:Jl}):null,H.isLoading?x.jsx("p",{className:Q.muted,children:"Loading messages..."}):null,H.isSuccess&&F.length===0?x.jsx("p",{className:Q.muted,children:"No messages yet in this conversation."}):null,F.length>0?x.jsx("ol",{className:Q.timelineList,children:F.map(j=>{const X=tN(j.message),N=zI(a[j.message.id],n==null?void 0:n.id),I=j.message.sender_id===(n==null?void 0:n.id),te=!I,fe=I?Q.messageBubbleOwnFull:Q.messageBubbleAgent,xe=I?Q.timelineMetaOwn:Q.timelineMetaAgent,Et=I?Q.messageTextOwn:Q.messageTextAgent;return x.jsx("li",{className:`${Q.timelineItem} ${I?Q.timelineItemOwn:Q.timelineItemOther} ${Q.timelineItemFullWidth}${te?` ${Q.timelineItemAgent}`:""}`,onContextMenu:Ct=>ze(Ct,j),children:x.jsxs("div",{className:`${Q.messageBubble} ${fe}`,children:[x.jsxs("div",{className:`${Q.timelineMeta} ${xe}`,children:[x.jsx("span",{className:Q.sender,children:j.sender.username}),x.jsxs("span",{className:Q.timelineMetaRight,children:[x.jsx("span",{className:Q.timestamp,children:TI(j.message)}),!j.message.deleted&&j.message.edited?x.jsx("span",{className:Q.editedBadge,children:"[edited]"}):null,Ou(j.message,n==null?void 0:n.id)?x.jsx("button",{"aria-label":"Message actions",className:Q.messageActionsTrigger,onClick:Ct=>{Nn(Ct.currentTarget,j)},type:"button",children:"⋯"}):null]})]}),X.variant==="deleted"?x.jsx("p",{className:`${Q.messageText} ${Q.messageTextDeleted}${` ${Et}`}`,children:Q1}):null,X.variant==="text"&&X.textContent?x.jsx("p",{className:`${Q.messageText} ${Et}`,children:X.textContent}):null,X.variant==="json_render"?x.jsx(m$,{approvalDisabled:Me.isPending||w.isPending,onApprovalAction:of,spec:X.jsonRenderSpec}):null,!j.message.deleted&&j.message.attachment_type==="image"&&j.message.attachment_url?x.jsx("a",{className:Q.imageAttachmentLink,href:j.message.attachment_url,rel:"noreferrer",target:"_blank",children:x.jsx("img",{alt:"Message attachment",className:Q.imageAttachment,loading:"lazy",src:j.message.attachment_url})}):null,!j.message.deleted&&j.message.attachment_type==="file"&&j.message.attachment_url?x.jsx("a",{className:Q.fileAttachmentLink,download:!0,href:j.message.attachment_url,rel:"noreferrer",target:"_blank",children:"Download attachment"}):null,!j.message.deleted&&N.length>0?x.jsx("div",{className:Q.reactionSection,children:x.jsx("div",{className:Q.reactionGroups,children:N.map(Ct=>x.jsxs("span",{className:`${Q.reactionChip}${Ct.reactedByMe?` ${Q.reactionChipOwn}`:""}`,children:[x.jsx("span",{children:Ct.emoji}),x.jsx("span",{children:Ct.count})]},Ct.emoji))})}):null]})},j.message.id)})}):null]})}),x.jsxs("form",{className:`${Q.composerForm}${O?` ${Q.composerFormKeyboardOpen}`:""}`,onSubmit:ks,children:[P>0?x.jsx("button",{className:Q.unreadBanner,onClick:pn,type:"button",children:P===1?"1 unread message":`${P} unread messages`}):null,S?x.jsxs("div",{className:Q.editingBanner,children:[x.jsx("span",{children:"Editing message"}),x.jsx("button",{className:Q.editingCancelButton,onClick:Nr,type:"button",children:"Cancel"})]}):null,_?x.jsxs("div",{className:Q.attachmentChip,children:[x.jsx("span",{className:Q.attachmentName,children:_.name}),x.jsx("button",{className:Q.attachmentRemove,disabled:Ln,onClick:zr,type:"button",children:"Remove"})]}):null,x.jsxs("div",{className:Q.composerDock,children:[x.jsx("input",{className:Q.attachInput,disabled:Ln||!!S,onChange:Ma,ref:f,type:"file"}),x.jsx("button",{"aria-label":"Attach file",className:`${Q.iconButton} ${Q.attachButton}${S?` ${Q.attachButtonDisabled}`:""}`,disabled:Ln||!!S,onClick:As,title:S?"Attachments are unavailable while editing.":"Attach file",type:"button",children:x.jsx(kI,{})}),x.jsx("div",{className:Q.composerField,children:x.jsx("textarea",{className:Q.composerInput,disabled:Ln,onChange:Os,onBlur:()=>z(!1),onFocus:()=>z(!0),placeholder:S?"Edit message...":"Message",ref:h,rows:1,value:b})}),x.jsx("button",{"aria-label":qe.isPending?"Saving message":w.isPending?"Sending message":S?"Save edit":"Send message",className:Q.submitButton,disabled:Ln||!Ns,title:S?qe.isPending?"Saving...":"Save edit":w.isPending?"Sending...":"Send message",type:"submit",children:x.jsx(OI,{})})]}),g?x.jsx("p",{className:Q.error,children:g}):null]})]})]}),E&&Ce?x.jsxs("div",{className:Q.contextMenu,ref:d,style:{left:`${E.x}px`,top:`${E.y}px`},children:[Yf(Ce.message,n==null?void 0:n.id)?x.jsx("button",{className:Q.contextMenuAction,disabled:Ln,onClick:()=>zn(Ce),type:"button",children:"Edit"}):null,x.jsx("button",{className:`${Q.contextMenuAction} ${Q.contextMenuActionDanger}`,disabled:Ln,onClick:()=>A.mutate(Ce.message.id),type:"button",children:"Delete"})]}):null]})}const MI="_wrapper_36fc3_1",jI="_title_36fc3_11",DI="_subtitle_36fc3_15",LI="_form_36fc3_20",UI="_field_36fc3_25",PI="_label_36fc3_30",BI="_input_36fc3_35",$I="_submit_36fc3_47",II="_hint_36fc3_62",ZI="_error_36fc3_68",HI="_success_36fc3_74",$t={wrapper:MI,title:jI,subtitle:DI,form:LI,field:UI,label:PI,input:BI,submit:$I,hint:II,error:ZI,success:HI};function FI(){const e=_s(),t=ka(),{status:n,loginWithAutoRegister:r}=ws(),[a,i]=v.useState(""),[l,o]=v.useState(""),[s,u]=v.useState(null),[c,f]=v.useState(null),[d,h]=v.useState(!1),b=v.useMemo(()=>{var m;const p=t.state,g=(m=p==null?void 0:p.from)==null?void 0:m.pathname;return!g||g==="/login"?"/":g},[t.state]);v.useEffect(()=>{n==="authenticated"&&e(b,{replace:!0})},[e,b,n]);async function y(p){p.preventDefault(),u(null),f(null),h(!0);try{(await r({username:a,password:l})).mode==="register"&&f("Account created and signed in.")}catch(g){g instanceof la||g instanceof Error?u(g.message):u("Failed to sign in.")}finally{h(!1)}}const _=n==="loading";return x.jsxs("section",{className:$t.wrapper,children:[x.jsx("h2",{className:$t.title,children:"Sign in"}),x.jsx("p",{className:$t.subtitle,children:"Enter your username and password."}),x.jsxs("form",{className:$t.form,onSubmit:y,children:[x.jsxs("label",{className:$t.field,children:[x.jsx("span",{className:$t.label,children:"Username"}),x.jsx("input",{autoComplete:"username",className:$t.input,disabled:d||_,onChange:p=>i(p.target.value),placeholder:"alice",required:!0,value:a})]}),x.jsxs("label",{className:$t.field,children:[x.jsx("span",{className:$t.label,children:"Password"}),x.jsx("input",{autoComplete:"current-password",className:$t.input,disabled:d||_,minLength:4,onChange:p=>o(p.target.value),placeholder:"password",required:!0,type:"password",value:l})]}),x.jsx("button",{className:$t.submit,disabled:d||_,type:"submit",children:d?"Signing in...":"Continue"})]}),x.jsx("p",{className:$t.hint,children:"If no account exists, one will be created automatically."}),s?x.jsx("p",{className:$t.error,children:s}):null,c?x.jsx("p",{className:$t.success,children:c}):null]})}const qI="_card_1jmko_1",GI="_link_1jmko_21",n0={card:qI,link:GI};function VI(){return x.jsxs("section",{className:n0.card,children:[x.jsx("h2",{children:"Page not found"}),x.jsx("p",{children:"The requested route does not exist."}),x.jsx(F1,{className:n0.link,to:"/",children:"Back to home"})]})}function QI(){const e=ka(),{status:t,isAuthenticated:n}=ws();return t==="loading"?x.jsx("p",{children:"Checking session..."}):n?x.jsx(pO,{}):x.jsx(hO,{replace:!0,state:{from:e},to:"/login"})}const YI="_app_19urc_1",XI={app:YI};function JI(){return x.jsx("div",{className:XI.app,children:x.jsx(dN,{children:x.jsxs(gO,{children:[x.jsx(Di,{element:x.jsx(FI,{}),path:"/login"}),x.jsxs(Di,{element:x.jsx(QI,{}),children:[x.jsx(Di,{element:x.jsx(ZN,{}),path:"/"}),x.jsx(Di,{element:x.jsx(RI,{}),path:"/dm/:conversationId"})]}),x.jsx(Di,{element:x.jsx(VI,{}),path:"*"})]})})})}const KI=new uk({defaultOptions:{queries:{retry:1,refetchOnWindowFocus:!1}}});let r0=!1;"serviceWorker"in navigator&&navigator.serviceWorker.addEventListener("controllerchange",()=>{r0||(r0=!0,window.location.reload())});jO({immediate:!0});UA.createRoot(document.getElementById("root")).render(x.jsx(Ze.StrictMode,{children:x.jsx(ck,{client:KI,children:x.jsx(KO,{children:x.jsx(EO,{children:x.jsx(JI,{})})})})}));
|