@knpkv/codecommit-web 0.2.0 → 0.3.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/dist/client/assets/index-B2Y18oI5.css +1 -0
- package/dist/client/assets/index-CuXt1AzC.js +348 -0
- package/dist/client/index.html +2 -2
- package/dist/server/Api.d.ts +47 -2
- package/dist/server/Api.d.ts.map +1 -1
- package/dist/server/Api.js +49 -2
- package/dist/server/Api.js.map +1 -1
- package/dist/server/Server.d.ts.map +1 -1
- package/dist/server/Server.js +9 -8
- package/dist/server/Server.js.map +1 -1
- package/dist/server/handlers/config-live.d.ts.map +1 -1
- package/dist/server/handlers/config-live.js +48 -4
- package/dist/server/handlers/config-live.js.map +1 -1
- package/dist/server/handlers/events-live.d.ts +2 -2
- package/dist/server/handlers/events-live.d.ts.map +1 -1
- package/dist/server/handlers/events-live.js +23 -5
- package/dist/server/handlers/events-live.js.map +1 -1
- package/dist/server/handlers/index.d.ts +1 -0
- package/dist/server/handlers/index.d.ts.map +1 -1
- package/dist/server/handlers/index.js +1 -0
- package/dist/server/handlers/index.js.map +1 -1
- package/dist/server/handlers/notifications-live.d.ts +3 -0
- package/dist/server/handlers/notifications-live.d.ts.map +1 -0
- package/dist/server/handlers/notifications-live.js +65 -0
- package/dist/server/handlers/notifications-live.js.map +1 -0
- package/package.json +2 -2
- package/dist/client/assets/index-9fIdCzWC.css +0 -1
- package/dist/client/assets/index-CR6OSddv.js +0 -263
|
@@ -0,0 +1,348 @@
|
|
|
1
|
+
var cH=Object.defineProperty;var lA=e=>{throw TypeError(e)};var uH=(e,t,n)=>t in e?cH(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var y=(e,t,n)=>uH(e,typeof t!="symbol"?t+"":t,n),cA=(e,t,n)=>t.has(e)||lA("Cannot "+n);var rp=(e,t,n)=>(cA(e,t,"read from private field"),n?n.call(e):t.get(e)),NS=(e,t,n)=>t.has(e)?lA("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ip=(e,t,n,r)=>(cA(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function fH(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const s=Object.getOwnPropertyDescriptor(r,i);s&&Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>r[i]})}}}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 i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const s of i)if(s.type==="childList")for(const a of s.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&&(s.integrity=i.integrity),i.referrerPolicy&&(s.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?s.credentials="include":i.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();var zg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function rm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Az={exports:{}},Rb={};/**
|
|
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 dH=Symbol.for("react.transitional.element"),hH=Symbol.for("react.fragment");function Oz(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 i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:dH,type:e,key:r,ref:t!==void 0?t:null,props:n}}Rb.Fragment=hH;Rb.jsx=Oz;Rb.jsxs=Oz;Az.exports=Rb;var p=Az.exports,Rz={exports:{}},ke={};/**
|
|
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 F_=Symbol.for("react.transitional.element"),mH=Symbol.for("react.portal"),pH=Symbol.for("react.fragment"),gH=Symbol.for("react.strict_mode"),yH=Symbol.for("react.profiler"),bH=Symbol.for("react.consumer"),vH=Symbol.for("react.context"),SH=Symbol.for("react.forward_ref"),xH=Symbol.for("react.suspense"),wH=Symbol.for("react.memo"),Nz=Symbol.for("react.lazy"),_H=Symbol.for("react.activity"),uA=Symbol.iterator;function kH(e){return e===null||typeof e!="object"?null:(e=uA&&e[uA]||e["@@iterator"],typeof e=="function"?e:null)}var Mz={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Dz=Object.assign,zz={};function tf(e,t,n){this.props=e,this.context=t,this.refs=zz,this.updater=n||Mz}tf.prototype.isReactComponent={};tf.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")};tf.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function jz(){}jz.prototype=tf.prototype;function P_(e,t,n){this.props=e,this.context=t,this.refs=zz,this.updater=n||Mz}var U_=P_.prototype=new jz;U_.constructor=P_;Dz(U_,tf.prototype);U_.isPureReactComponent=!0;var fA=Array.isArray;function Dx(){}var xt={H:null,A:null,T:null,S:null},Iz=Object.prototype.hasOwnProperty;function B_(e,t,n){var r=n.ref;return{$$typeof:F_,type:e,key:t,ref:r!==void 0?r:null,props:n}}function EH(e,t){return B_(e.type,t,e.props)}function H_(e){return typeof e=="object"&&e!==null&&e.$$typeof===F_}function CH(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var dA=/\/+/g;function MS(e,t){return typeof e=="object"&&e!==null&&e.key!=null?CH(""+e.key):t.toString(36)}function TH(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Dx,Dx):(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 bc(e,t,n,r,i){var s=typeof e;(s==="undefined"||s==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(s){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case F_:case mH:a=!0;break;case Nz:return a=e._init,bc(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+MS(e,0):r,fA(i)?(n="",a!=null&&(n=a.replace(dA,"$&/")+"/"),bc(i,t,n,"",function(c){return c})):i!=null&&(H_(i)&&(i=EH(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(dA,"$&/")+"/")+a)),t.push(i)),1;a=0;var o=r===""?".":r+":";if(fA(e))for(var l=0;l<e.length;l++)r=e[l],s=o+MS(r,l),a+=bc(r,t,n,s,i);else if(l=kH(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,s=o+MS(r,l++),a+=bc(r,t,n,s,i);else if(s==="object"){if(typeof e.then=="function")return bc(TH(e),t,n,r,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return a}function sp(e,t,n){if(e==null)return e;var r=[],i=0;return bc(e,r,"","",function(s){return t.call(n,s,i++)}),r}function AH(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 hA=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)},OH={map:sp,forEach:function(e,t,n){sp(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return sp(e,function(){t++}),t},toArray:function(e){return sp(e,function(t){return t})||[]},only:function(e){if(!H_(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Activity=_H;ke.Children=OH;ke.Component=tf;ke.Fragment=pH;ke.Profiler=yH;ke.PureComponent=P_;ke.StrictMode=gH;ke.Suspense=xH;ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=xt;ke.__COMPILER_RUNTIME={__proto__:null,c:function(e){return xt.H.useMemoCache(e)}};ke.cache=function(e){return function(){return e.apply(null,arguments)}};ke.cacheSignal=function(){return null};ke.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=Dz({},e.props),i=e.key;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)!Iz.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(r[s]=t[s]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var a=Array(s),o=0;o<s;o++)a[o]=arguments[o+2];r.children=a}return B_(e.type,i,r)};ke.createContext=function(e){return e={$$typeof:vH,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:bH,_context:e},e};ke.createElement=function(e,t,n){var r,i={},s=null;if(t!=null)for(r in t.key!==void 0&&(s=""+t.key),t)Iz.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),l=0;l<a;l++)o[l]=arguments[l+2];i.children=o}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return B_(e,s,i)};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:SH,render:e}};ke.isValidElement=H_;ke.lazy=function(e){return{$$typeof:Nz,_payload:{_status:-1,_result:e},_init:AH}};ke.memo=function(e,t){return{$$typeof:wH,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=xt.T,n={};xt.T=n;try{var r=e(),i=xt.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Dx,hA)}catch(s){hA(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),xt.T=t}};ke.unstable_useCacheRefresh=function(){return xt.H.useCacheRefresh()};ke.use=function(e){return xt.H.use(e)};ke.useActionState=function(e,t,n){return xt.H.useActionState(e,t,n)};ke.useCallback=function(e,t){return xt.H.useCallback(e,t)};ke.useContext=function(e){return xt.H.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e,t){return xt.H.useDeferredValue(e,t)};ke.useEffect=function(e,t){return xt.H.useEffect(e,t)};ke.useEffectEvent=function(e){return xt.H.useEffectEvent(e)};ke.useId=function(){return xt.H.useId()};ke.useImperativeHandle=function(e,t,n){return xt.H.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return xt.H.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return xt.H.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return xt.H.useMemo(e,t)};ke.useOptimistic=function(e,t){return xt.H.useOptimistic(e,t)};ke.useReducer=function(e,t,n){return xt.H.useReducer(e,t,n)};ke.useRef=function(e){return xt.H.useRef(e)};ke.useState=function(e){return xt.H.useState(e)};ke.useSyncExternalStore=function(e,t,n){return xt.H.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return xt.H.useTransition()};ke.version="19.2.4";Rz.exports=ke;var w=Rz.exports;const qt=rm(w),q_=fH({__proto__:null,default:qt},[w]);var $z={exports:{}},Nb={},Lz={exports:{}},Fz={};/**
|
|
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(z,L){var j=z.length;z.push(L);e:for(;0<j;){var ne=j-1>>>1,R=z[ne];if(0<i(R,L))z[ne]=L,z[j]=R,j=ne;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var L=z[0],j=z.pop();if(j!==L){z[0]=j;e:for(var ne=0,R=z.length,Re=R>>>1;ne<Re;){var U=2*(ne+1)-1,T=z[U],Z=U+1,ee=z[Z];if(0>i(T,j))Z<R&&0>i(ee,T)?(z[ne]=ee,z[Z]=j,ne=Z):(z[ne]=T,z[U]=j,ne=U);else if(Z<R&&0>i(ee,j))z[ne]=ee,z[Z]=j,ne=Z;else break e}}return L}function i(z,L){var j=z.sortIndex-L.sortIndex;return j!==0?j:z.id-L.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var a=Date,o=a.now();e.unstable_now=function(){return a.now()-o}}var l=[],c=[],f=1,u=null,d=3,h=!1,g=!1,v=!1,x=!1,m=typeof setTimeout=="function"?setTimeout:null,b=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function _(z){for(var L=n(c);L!==null;){if(L.callback===null)r(c);else if(L.startTime<=z)r(c),L.sortIndex=L.expirationTime,t(l,L);else break;L=n(c)}}function C(z){if(v=!1,_(z),!g)if(n(l)!==null)g=!0,E||(E=!0,$());else{var L=n(c);L!==null&&Y(C,L.startTime-z)}}var E=!1,A=-1,M=5,D=-1;function N(){return x?!0:!(e.unstable_now()-D<M)}function I(){if(x=!1,E){var z=e.unstable_now();D=z;var L=!0;try{e:{g=!1,v&&(v=!1,b(A),A=-1),h=!0;var j=d;try{t:{for(_(z),u=n(l);u!==null&&!(u.expirationTime>z&&N());){var ne=u.callback;if(typeof ne=="function"){u.callback=null,d=u.priorityLevel;var R=ne(u.expirationTime<=z);if(z=e.unstable_now(),typeof R=="function"){u.callback=R,_(z),L=!0;break t}u===n(l)&&r(l),_(z)}else r(l);u=n(l)}if(u!==null)L=!0;else{var Re=n(c);Re!==null&&Y(C,Re.startTime-z),L=!1}}break e}finally{u=null,d=j,h=!1}L=void 0}}finally{L?$():E=!1}}}var $;if(typeof S=="function")$=function(){S(I)};else if(typeof MessageChannel<"u"){var X=new MessageChannel,Q=X.port2;X.port1.onmessage=I,$=function(){Q.postMessage(null)}}else $=function(){m(I,0)};function Y(z,L){A=m(function(){z(e.unstable_now())},L)}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(z){z.callback=null},e.unstable_forceFrameRate=function(z){0>z||125<z?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<z?Math.floor(1e3/z):5},e.unstable_getCurrentPriorityLevel=function(){return d},e.unstable_next=function(z){switch(d){case 1:case 2:case 3:var L=3;break;default:L=d}var j=d;d=L;try{return z()}finally{d=j}},e.unstable_requestPaint=function(){x=!0},e.unstable_runWithPriority=function(z,L){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var j=d;d=z;try{return L()}finally{d=j}},e.unstable_scheduleCallback=function(z,L,j){var ne=e.unstable_now();switch(typeof j=="object"&&j!==null?(j=j.delay,j=typeof j=="number"&&0<j?ne+j:ne):j=ne,z){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=j+R,z={id:f++,callback:L,priorityLevel:z,startTime:j,expirationTime:R,sortIndex:-1},j>ne?(z.sortIndex=j,t(c,z),n(l)===null&&z===n(c)&&(v?(b(A),A=-1):v=!0,Y(C,j-ne))):(z.sortIndex=R,t(l,z),g||h||(g=!0,E||(E=!0,$()))),z},e.unstable_shouldYield=N,e.unstable_wrapCallback=function(z){var L=d;return function(){var j=d;d=L;try{return z.apply(this,arguments)}finally{d=j}}}})(Fz);Lz.exports=Fz;var zx=Lz.exports,Pz={exports:{}},Wn={};/**
|
|
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 RH=w;function Uz(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 ga(){}var Kn={d:{f:ga,r:function(){throw Error(Uz(522))},D:ga,C:ga,L:ga,m:ga,X:ga,S:ga,M:ga},p:0,findDOMNode:null},NH=Symbol.for("react.portal");function MH(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:NH,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var Nd=RH.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Mb(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Wn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Kn;Wn.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(Uz(299));return MH(e,t,null,n)};Wn.flushSync=function(e){var t=Nd.T,n=Kn.p;try{if(Nd.T=null,Kn.p=2,e)return e()}finally{Nd.T=t,Kn.p=n,Kn.d.f()}};Wn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Kn.d.C(e,t))};Wn.prefetchDNS=function(e){typeof e=="string"&&Kn.d.D(e)};Wn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Mb(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Kn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:s}):n==="script"&&Kn.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Wn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Mb(t.as,t.crossOrigin);Kn.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&&Kn.d.M(e)};Wn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Mb(n,t.crossOrigin);Kn.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})}};Wn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Mb(t.as,t.crossOrigin);Kn.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 Kn.d.m(e)};Wn.requestFormReset=function(e){Kn.d.r(e)};Wn.unstable_batchedUpdates=function(e,t){return e(t)};Wn.useFormState=function(e,t,n){return Nd.H.useFormState(e,t,n)};Wn.useFormStatus=function(){return Nd.H.useHostTransitionStatus()};Wn.version="19.2.4";function Bz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Bz)}catch(e){console.error(e)}}Bz(),Pz.exports=Wn;var nf=Pz.exports;const DH=rm(nf);/**
|
|
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 nn=zx,Hz=w,zH=nf;function P(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 qz(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function im(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 Vz(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 Kz(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 mA(e){if(im(e)!==e)throw Error(P(188))}function jH(e){var t=e.alternate;if(!t){if(t=im(e),t===null)throw Error(P(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return mA(i),e;if(s===r)return mA(i),t;s=s.sibling}throw Error(P(188))}if(n.return!==r.return)n=i,r=s;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,r=s;break}if(o===r){a=!0,r=i,n=s;break}o=o.sibling}if(!a){for(o=s.child;o;){if(o===n){a=!0,n=s,r=i;break}if(o===r){a=!0,r=s,n=i;break}o=o.sibling}if(!a)throw Error(P(189))}}if(n.alternate!==r)throw Error(P(190))}if(n.tag!==3)throw Error(P(188));return n.stateNode.current===n?e:t}function Gz(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Gz(e),t!==null)return t;e=e.sibling}return null}var wt=Object.assign,IH=Symbol.for("react.element"),ap=Symbol.for("react.transitional.element"),pd=Symbol.for("react.portal"),Rc=Symbol.for("react.fragment"),Yz=Symbol.for("react.strict_mode"),jx=Symbol.for("react.profiler"),Jz=Symbol.for("react.consumer"),Ms=Symbol.for("react.context"),V_=Symbol.for("react.forward_ref"),Ix=Symbol.for("react.suspense"),$x=Symbol.for("react.suspense_list"),K_=Symbol.for("react.memo"),_a=Symbol.for("react.lazy"),Lx=Symbol.for("react.activity"),$H=Symbol.for("react.memo_cache_sentinel"),pA=Symbol.iterator;function Gf(e){return e===null||typeof e!="object"?null:(e=pA&&e[pA]||e["@@iterator"],typeof e=="function"?e:null)}var LH=Symbol.for("react.client.reference");function Fx(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===LH?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Rc:return"Fragment";case jx:return"Profiler";case Yz:return"StrictMode";case Ix:return"Suspense";case $x:return"SuspenseList";case Lx:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case pd:return"Portal";case Ms:return e.displayName||"Context";case Jz:return(e._context.displayName||"Context")+".Consumer";case V_:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case K_:return t=e.displayName||null,t!==null?t:Fx(e.type)||"Memo";case _a:t=e._payload,e=e._init;try{return Fx(e(t))}catch{}}return null}var gd=Array.isArray,ye=Hz.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ye=zH.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,il={pending:!1,data:null,method:null,action:null},Px=[],Nc=-1;function ss(e){return{current:e}}function hn(e){0>Nc||(e.current=Px[Nc],Px[Nc]=null,Nc--)}function mt(e,t){Nc++,Px[Nc]=e.current,e.current=t}var Xi=ss(null),hh=ss(null),La=ss(null),jg=ss(null);function Ig(e,t){switch(mt(La,t),mt(hh,e),mt(Xi,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?xO(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=xO(t),e=p$(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}hn(Xi),mt(Xi,e)}function bu(){hn(Xi),hn(hh),hn(La)}function Ux(e){e.memoizedState!==null&&mt(jg,e);var t=Xi.current,n=p$(t,e.type);t!==n&&(mt(hh,e),mt(Xi,n))}function $g(e){hh.current===e&&(hn(Xi),hn(hh)),jg.current===e&&(hn(jg),kh._currentValue=il)}var DS,gA;function qo(e){if(DS===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);DS=t&&t[1]||"",gA=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+DS+e+gA}var zS=!1;function jS(e,t){if(!e||zS)return"";zS=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var u=function(){throw Error()};if(Object.defineProperty(u.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(u,[])}catch(h){var d=h}Reflect.construct(e,[],u)}else{try{u.call()}catch(h){d=h}e.call(u.prototype)}}else{try{throw Error()}catch(h){d=h}(u=e())&&typeof u.catch=="function"&&u.catch(function(){})}}catch(h){if(h&&d&&typeof h.stack=="string")return[h.stack,d.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=r.DetermineComponentFrameRoot(),a=s[0],o=s[1];if(a&&o){var l=a.split(`
|
|
44
|
+
`),c=o.split(`
|
|
45
|
+
`);for(i=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(r===l.length||i===c.length)for(r=l.length-1,i=c.length-1;1<=r&&0<=i&&l[r]!==c[i];)i--;for(;1<=r&&0<=i;r--,i--)if(l[r]!==c[i]){if(r!==1||i!==1)do if(r--,i--,0>i||l[r]!==c[i]){var f=`
|
|
46
|
+
`+l[r].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),f}while(1<=r&&0<=i);break}}}finally{zS=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?qo(n):""}function FH(e,t){switch(e.tag){case 26:case 27:case 5:return qo(e.type);case 16:return qo("Lazy");case 13:return e.child!==t&&t!==null?qo("Suspense Fallback"):qo("Suspense");case 19:return qo("SuspenseList");case 0:case 15:return jS(e.type,!1);case 11:return jS(e.type.render,!1);case 1:return jS(e.type,!0);case 31:return qo("Activity");default:return""}}function yA(e){try{var t="",n=null;do t+=FH(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var Bx=Object.prototype.hasOwnProperty,G_=nn.unstable_scheduleCallback,IS=nn.unstable_cancelCallback,PH=nn.unstable_shouldYield,UH=nn.unstable_requestPaint,Er=nn.unstable_now,BH=nn.unstable_getCurrentPriorityLevel,Qz=nn.unstable_ImmediatePriority,Xz=nn.unstable_UserBlockingPriority,Lg=nn.unstable_NormalPriority,HH=nn.unstable_LowPriority,Wz=nn.unstable_IdlePriority,qH=nn.log,VH=nn.unstable_setDisableYieldValue,sm=null,Cr=null;function Ra(e){if(typeof qH=="function"&&VH(e),Cr&&typeof Cr.setStrictMode=="function")try{Cr.setStrictMode(sm,e)}catch{}}var Tr=Math.clz32?Math.clz32:YH,KH=Math.log,GH=Math.LN2;function YH(e){return e>>>=0,e===0?32:31-(KH(e)/GH|0)|0}var op=256,lp=262144,cp=4194304;function Vo(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 Db(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,s=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~s,r!==0?i=Vo(r):(a&=o,a!==0?i=Vo(a):n||(n=o&~e,n!==0&&(i=Vo(n))))):(o=r&~s,o!==0?i=Vo(o):a!==0?i=Vo(a):n||(n=r&~e,n!==0&&(i=Vo(n)))),i===0?0:t!==0&&t!==i&&!(t&s)&&(s=i&-i,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:i}function am(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function JH(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 Zz(){var e=cp;return cp<<=1,!(cp&62914560)&&(cp=4194304),e}function $S(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function om(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function QH(e,t,n,r,i,s){var a=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,l=e.expirationTimes,c=e.hiddenUpdates;for(n=a&~n;0<n;){var f=31-Tr(n),u=1<<f;o[f]=0,l[f]=-1;var d=c[f];if(d!==null)for(c[f]=null,f=0;f<d.length;f++){var h=d[f];h!==null&&(h.lane&=-536870913)}n&=~u}r!==0&&ej(e,r,0),s!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=s&~(a&~t))}function ej(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Tr(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function tj(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Tr(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function nj(e,t){var n=t&-t;return n=n&42?1:Y_(n),n&(e.suspendedLanes|t)?0:n}function Y_(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 J_(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function rj(){var e=Ye.p;return e!==0?e:(e=window.event,e===void 0?32:C$(e.type))}function bA(e,t){var n=Ye.p;try{return Ye.p=e,t()}finally{Ye.p=n}}var wo=Math.random().toString(36).slice(2),_n="__reactFiber$"+wo,cr="__reactProps$"+wo,rf="__reactContainer$"+wo,Hx="__reactEvents$"+wo,XH="__reactListeners$"+wo,WH="__reactHandles$"+wo,vA="__reactResources$"+wo,lm="__reactMarker$"+wo;function Q_(e){delete e[_n],delete e[cr],delete e[Hx],delete e[XH],delete e[WH]}function Mc(e){var t=e[_n];if(t)return t;for(var n=e.parentNode;n;){if(t=n[rf]||n[_n]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=CO(e);e!==null;){if(n=e[_n])return n;e=CO(e)}return t}e=n,n=e.parentNode}return null}function sf(e){if(e=e[_n]||e[rf]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yd(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(P(33))}function Jc(e){var t=e[vA];return t||(t=e[vA]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function fn(e){e[lm]=!0}var ij=new Set,sj={};function Bl(e,t){vu(e,t),vu(e+"Capture",t)}function vu(e,t){for(sj[e]=t,e=0;e<t.length;e++)ij.add(t[e])}var ZH=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]*$"),SA={},xA={};function eq(e){return Bx.call(xA,e)?!0:Bx.call(SA,e)?!1:ZH.test(e)?xA[e]=!0:(SA[e]=!0,!1)}function Kp(e,t,n){if(eq(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 up(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 ps(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 Ur(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function aj(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tq(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 i=r.get,s=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,s.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qx(e){if(!e._valueTracker){var t=aj(e)?"checked":"value";e._valueTracker=tq(e,t,""+e[t])}}function oj(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=aj(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Fg(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 nq=/[\n"\\]/g;function Gr(e){return e.replace(nq,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Vx(e,t,n,r,i,s,a,o){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ur(t)):e.value!==""+Ur(t)&&(e.value=""+Ur(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?Kx(e,a,Ur(t)):n!=null?Kx(e,a,Ur(n)):r!=null&&e.removeAttribute("value"),i==null&&s!=null&&(e.defaultChecked=!!s),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Ur(o):e.removeAttribute("name")}function lj(e,t,n,r,i,s,a,o){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){qx(e);return}n=n!=null?""+Ur(n):"",t=t!=null?""+Ur(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??i,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),qx(e)}function Kx(e,t,n){t==="number"&&Fg(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Qc(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Ur(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function cj(e,t,n){if(t!=null&&(t=""+Ur(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ur(n):""}function uj(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(P(92));if(gd(r)){if(1<r.length)throw Error(P(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Ur(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),qx(e)}function Su(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rq=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 wA(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||rq.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function fj(e,t,n){if(t!=null&&typeof t!="object")throw Error(P(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 i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&wA(e,i,r)}else for(var s in t)t.hasOwnProperty(s)&&wA(e,s,t[s])}function X_(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 iq=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"]]),sq=/^[\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 Gp(e){return sq.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ds(){}var Gx=null;function W_(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Dc=null,Xc=null;function _A(e){var t=sf(e);if(t&&(e=t.stateNode)){var n=e[cr]||null;e:switch(e=t.stateNode,t.type){case"input":if(Vx(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="'+Gr(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[cr]||null;if(!i)throw Error(P(90));Vx(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&oj(r)}break e;case"textarea":cj(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Qc(e,!!n.multiple,t,!1)}}}var LS=!1;function dj(e,t,n){if(LS)return e(t,n);LS=!0;try{var r=e(t);return r}finally{if(LS=!1,(Dc!==null||Xc!==null)&&(Vb(),Dc&&(t=Dc,e=Xc,Xc=Dc=null,_A(t),e)))for(t=0;t<e.length;t++)_A(e[t])}}function mh(e,t){var n=e.stateNode;if(n===null)return null;var r=n[cr]||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(P(231,t,typeof n));return n}var Gs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yx=!1;if(Gs)try{var Yf={};Object.defineProperty(Yf,"passive",{get:function(){Yx=!0}}),window.addEventListener("test",Yf,Yf),window.removeEventListener("test",Yf,Yf)}catch{Yx=!1}var Na=null,Z_=null,Yp=null;function hj(){if(Yp)return Yp;var e,t=Z_,n=t.length,r,i="value"in Na?Na.value:Na.textContent,s=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[s-r];r++);return Yp=i.slice(e,1<r?1-r:void 0)}function Jp(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 fp(){return!0}function kA(){return!1}function fr(e){function t(n,r,i,s,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=a,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?fp:kA,this.isPropagationStopped=kA,this}return wt(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=fp)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=fp)},persist:function(){},isPersistent:fp}),t}var Hl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},zb=fr(Hl),cm=wt({},Hl,{view:0,detail:0}),aq=fr(cm),FS,PS,Jf,jb=wt({},cm,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ek,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!==Jf&&(Jf&&e.type==="mousemove"?(FS=e.screenX-Jf.screenX,PS=e.screenY-Jf.screenY):PS=FS=0,Jf=e),FS)},movementY:function(e){return"movementY"in e?e.movementY:PS}}),EA=fr(jb),oq=wt({},jb,{dataTransfer:0}),lq=fr(oq),cq=wt({},cm,{relatedTarget:0}),US=fr(cq),uq=wt({},Hl,{animationName:0,elapsedTime:0,pseudoElement:0}),fq=fr(uq),dq=wt({},Hl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hq=fr(dq),mq=wt({},Hl,{data:0}),CA=fr(mq),pq={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gq={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"},yq={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bq(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yq[e])?!!t[e]:!1}function ek(){return bq}var vq=wt({},cm,{key:function(e){if(e.key){var t=pq[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Jp(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gq[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ek,charCode:function(e){return e.type==="keypress"?Jp(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Jp(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Sq=fr(vq),xq=wt({},jb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),TA=fr(xq),wq=wt({},cm,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ek}),_q=fr(wq),kq=wt({},Hl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Eq=fr(kq),Cq=wt({},jb,{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}),Tq=fr(Cq),Aq=wt({},Hl,{newState:0,oldState:0}),Oq=fr(Aq),Rq=[9,13,27,32],tk=Gs&&"CompositionEvent"in window,Md=null;Gs&&"documentMode"in document&&(Md=document.documentMode);var Nq=Gs&&"TextEvent"in window&&!Md,mj=Gs&&(!tk||Md&&8<Md&&11>=Md),AA=" ",OA=!1;function pj(e,t){switch(e){case"keyup":return Rq.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function gj(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var zc=!1;function Mq(e,t){switch(e){case"compositionend":return gj(t);case"keypress":return t.which!==32?null:(OA=!0,AA);case"textInput":return e=t.data,e===AA&&OA?null:e;default:return null}}function Dq(e,t){if(zc)return e==="compositionend"||!tk&&pj(e,t)?(e=hj(),Yp=Z_=Na=null,zc=!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 mj&&t.locale!=="ko"?null:t.data;default:return null}}var zq={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 RA(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zq[e.type]:t==="textarea"}function yj(e,t,n,r){Dc?Xc?Xc.push(r):Xc=[r]:Dc=r,t=ry(t,"onChange"),0<t.length&&(n=new zb("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Dd=null,ph=null;function jq(e){d$(e,0)}function Ib(e){var t=yd(e);if(oj(t))return e}function NA(e,t){if(e==="change")return t}var bj=!1;if(Gs){var BS;if(Gs){var HS="oninput"in document;if(!HS){var MA=document.createElement("div");MA.setAttribute("oninput","return;"),HS=typeof MA.oninput=="function"}BS=HS}else BS=!1;bj=BS&&(!document.documentMode||9<document.documentMode)}function DA(){Dd&&(Dd.detachEvent("onpropertychange",vj),ph=Dd=null)}function vj(e){if(e.propertyName==="value"&&Ib(ph)){var t=[];yj(t,ph,e,W_(e)),dj(jq,t)}}function Iq(e,t,n){e==="focusin"?(DA(),Dd=t,ph=n,Dd.attachEvent("onpropertychange",vj)):e==="focusout"&&DA()}function $q(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ib(ph)}function Lq(e,t){if(e==="click")return Ib(t)}function Fq(e,t){if(e==="input"||e==="change")return Ib(t)}function Pq(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var zr=typeof Object.is=="function"?Object.is:Pq;function gh(e,t){if(zr(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 i=n[r];if(!Bx.call(t,i)||!zr(e[i],t[i]))return!1}return!0}function zA(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jA(e,t){var n=zA(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=zA(n)}}function Sj(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Sj(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xj(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Fg(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=Fg(e.document)}return t}function nk(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 Uq=Gs&&"documentMode"in document&&11>=document.documentMode,jc=null,Jx=null,zd=null,Qx=!1;function IA(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qx||jc==null||jc!==Fg(r)||(r=jc,"selectionStart"in r&&nk(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}),zd&&gh(zd,r)||(zd=r,r=ry(Jx,"onSelect"),0<r.length&&(t=new zb("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=jc)))}function Lo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ic={animationend:Lo("Animation","AnimationEnd"),animationiteration:Lo("Animation","AnimationIteration"),animationstart:Lo("Animation","AnimationStart"),transitionrun:Lo("Transition","TransitionRun"),transitionstart:Lo("Transition","TransitionStart"),transitioncancel:Lo("Transition","TransitionCancel"),transitionend:Lo("Transition","TransitionEnd")},qS={},wj={};Gs&&(wj=document.createElement("div").style,"AnimationEvent"in window||(delete Ic.animationend.animation,delete Ic.animationiteration.animation,delete Ic.animationstart.animation),"TransitionEvent"in window||delete Ic.transitionend.transition);function ql(e){if(qS[e])return qS[e];if(!Ic[e])return e;var t=Ic[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in wj)return qS[e]=t[n];return e}var _j=ql("animationend"),kj=ql("animationiteration"),Ej=ql("animationstart"),Bq=ql("transitionrun"),Hq=ql("transitionstart"),qq=ql("transitioncancel"),Cj=ql("transitionend"),Tj=new Map,Xx="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(" ");Xx.push("scrollEnd");function zi(e,t){Tj.set(e,t),Bl(t,[e])}var Pg=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)},Pr=[],$c=0,rk=0;function $b(){for(var e=$c,t=rk=$c=0;t<e;){var n=Pr[t];Pr[t++]=null;var r=Pr[t];Pr[t++]=null;var i=Pr[t];Pr[t++]=null;var s=Pr[t];if(Pr[t++]=null,r!==null&&i!==null){var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}s!==0&&Aj(n,i,s)}}function Lb(e,t,n,r){Pr[$c++]=e,Pr[$c++]=t,Pr[$c++]=n,Pr[$c++]=r,rk|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ik(e,t,n,r){return Lb(e,t,n,r),Ug(e)}function Vl(e,t){return Lb(e,null,null,t),Ug(e)}function Aj(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,s=e.return;s!==null;)s.childLanes|=n,r=s.alternate,r!==null&&(r.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(i=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,i&&t!==null&&(i=31-Tr(n),e=s.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),s):null}function Ug(e){if(50<Hd)throw Hd=0,b1=null,Error(P(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Lc={};function Vq(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 wr(e,t,n,r){return new Vq(e,t,n,r)}function sk(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bs(e,t){var n=e.alternate;return n===null?(n=wr(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 Oj(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 Qp(e,t,n,r,i,s){var a=0;if(r=e,typeof e=="function")sk(e)&&(a=1);else if(typeof e=="string")a=QV(e,n,Xi.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Lx:return e=wr(31,n,t,i),e.elementType=Lx,e.lanes=s,e;case Rc:return sl(n.children,i,s,t);case Yz:a=8,i|=24;break;case jx:return e=wr(12,n,t,i|2),e.elementType=jx,e.lanes=s,e;case Ix:return e=wr(13,n,t,i),e.elementType=Ix,e.lanes=s,e;case $x:return e=wr(19,n,t,i),e.elementType=$x,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ms:a=10;break e;case Jz:a=9;break e;case V_:a=11;break e;case K_:a=14;break e;case _a:a=16,r=null;break e}a=29,n=Error(P(130,e===null?"null":typeof e,"")),r=null}return t=wr(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function sl(e,t,n,r){return e=wr(7,e,r,t),e.lanes=n,e}function VS(e,t,n){return e=wr(6,e,null,t),e.lanes=n,e}function Rj(e){var t=wr(18,null,null,0);return t.stateNode=e,t}function KS(e,t,n){return t=wr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var $A=new WeakMap;function Yr(e,t){if(typeof e=="object"&&e!==null){var n=$A.get(e);return n!==void 0?n:(t={value:e,source:t,stack:yA(t)},$A.set(e,t),t)}return{value:e,source:t,stack:yA(t)}}var Fc=[],Pc=0,Bg=null,yh=0,Br=[],Hr=0,io=null,Bi=1,Hi="";function Ts(e,t){Fc[Pc++]=yh,Fc[Pc++]=Bg,Bg=e,yh=t}function Nj(e,t,n){Br[Hr++]=Bi,Br[Hr++]=Hi,Br[Hr++]=io,io=e;var r=Bi;e=Hi;var i=32-Tr(r)-1;r&=~(1<<i),n+=1;var s=32-Tr(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Bi=1<<32-Tr(t)+i|n<<i|r,Hi=s+e}else Bi=1<<s|n<<i|r,Hi=e}function ak(e){e.return!==null&&(Ts(e,1),Nj(e,1,0))}function ok(e){for(;e===Bg;)Bg=Fc[--Pc],Fc[Pc]=null,yh=Fc[--Pc],Fc[Pc]=null;for(;e===io;)io=Br[--Hr],Br[Hr]=null,Hi=Br[--Hr],Br[Hr]=null,Bi=Br[--Hr],Br[Hr]=null}function Mj(e,t){Br[Hr++]=Bi,Br[Hr++]=Hi,Br[Hr++]=io,Bi=t.id,Hi=t.overflow,io=e}var kn=null,bt=null,Pe=!1,Fa=null,Jr=!1,Wx=Error(P(519));function so(e){var t=Error(P(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bh(Yr(t,e)),Wx}function LA(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[_n]=e,t[cr]=r,n){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(n=0;n<wh.length;n++)Me(wh[n],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),lj(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),uj(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||m$(t.textContent,n)?(r.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),r.onScroll!=null&&Me("scroll",t),r.onScrollEnd!=null&&Me("scrollend",t),r.onClick!=null&&(t.onclick=Ds),t=!0):t=!1,t||so(e,!0)}function FA(e){for(kn=e.return;kn;)switch(kn.tag){case 5:case 31:case 13:Jr=!1;return;case 27:case 3:Jr=!0;return;default:kn=kn.return}}function sc(e){if(e!==kn)return!1;if(!Pe)return FA(e),Pe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||_1(e.type,e.memoizedProps)),n=!n),n&&bt&&so(e),FA(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));bt=EO(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));bt=EO(e)}else t===27?(t=bt,_o(e.type)?(e=T1,T1=null,bt=e):bt=t):bt=kn?Zr(e.stateNode.nextSibling):null;return!0}function gl(){bt=kn=null,Pe=!1}function GS(){var e=Fa;return e!==null&&(sr===null?sr=e:sr.push.apply(sr,e),Fa=null),e}function bh(e){Fa===null?Fa=[e]:Fa.push(e)}var Zx=ss(null),Kl=null,zs=null;function Ca(e,t,n){mt(Zx,t._currentValue),t._currentValue=n}function Hs(e){e._currentValue=Zx.current,hn(Zx)}function e1(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 t1(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var s=i.dependencies;if(s!==null){var a=i.child;s=s.firstContext;e:for(;s!==null;){var o=s;s=i;for(var l=0;l<t.length;l++)if(o.context===t[l]){s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),e1(s.return,n,e),r||(a=null);break e}s=o.next}}else if(i.tag===18){if(a=i.return,a===null)throw Error(P(341));a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),e1(a,n,e),a=null}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}}function af(e,t,n,r){e=null;for(var i=t,s=!1;i!==null;){if(!s){if(i.flags&524288)s=!0;else if(i.flags&262144)break}if(i.tag===10){var a=i.alternate;if(a===null)throw Error(P(387));if(a=a.memoizedProps,a!==null){var o=i.type;zr(i.pendingProps.value,a.value)||(e!==null?e.push(o):e=[o])}}else if(i===jg.current){if(a=i.alternate,a===null)throw Error(P(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(kh):e=[kh])}i=i.return}e!==null&&t1(t,e,n,r),t.flags|=262144}function Hg(e){for(e=e.firstContext;e!==null;){if(!zr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yl(e){Kl=e,zs=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Cn(e){return Dj(Kl,e)}function dp(e,t){return Kl===null&&yl(e),Dj(e,t)}function Dj(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},zs===null){if(e===null)throw Error(P(308));zs=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else zs=zs.next=t;return n}var Kq=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()})}},Gq=nn.unstable_scheduleCallback,Yq=nn.unstable_NormalPriority,Vt={$$typeof:Ms,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function lk(){return{controller:new Kq,data:new Map,refCount:0}}function um(e){e.refCount--,e.refCount===0&&Gq(Yq,function(){e.controller.abort()})}var jd=null,n1=0,xu=0,Wc=null;function Jq(e,t){if(jd===null){var n=jd=[];n1=0,xu=Dk(),Wc={status:"pending",value:void 0,then:function(r){n.push(r)}}}return n1++,t.then(PA,PA),t}function PA(){if(--n1===0&&jd!==null){Wc!==null&&(Wc.status="fulfilled");var e=jd;jd=null,xu=0,Wc=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Qq(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var UA=ye.S;ye.S=function(e,t){GI=Er(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Jq(e,t),UA!==null&&UA(e,t)};var al=ss(null);function ck(){var e=al.current;return e!==null?e:ct.pooledCache}function Xp(e,t){t===null?mt(al,al.current):mt(al,t.pool)}function zj(){var e=ck();return e===null?null:{parent:Vt._currentValue,pool:e}}var of=Error(P(460)),uk=Error(P(474)),Fb=Error(P(542)),qg={then:function(){}};function BA(e){return e=e.status,e==="fulfilled"||e==="rejected"}function jj(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ds,Ds),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,qA(e),e;default:if(typeof t.status=="string")t.then(Ds,Ds);else{if(e=ct,e!==null&&100<e.shellSuspendCounter)throw Error(P(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=r}},function(r){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,qA(e),e}throw ol=t,of}}function Ko(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(ol=n,of):n}}var ol=null;function HA(){if(ol===null)throw Error(P(459));var e=ol;return ol=null,e}function qA(e){if(e===of||e===Fb)throw Error(P(483))}var Zc=null,vh=0;function hp(e){var t=vh;return vh+=1,Zc===null&&(Zc=[]),jj(Zc,e,t)}function Qf(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function mp(e,t){throw t.$$typeof===IH?Error(P(525)):(e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ij(e){function t(m,b){if(e){var S=m.deletions;S===null?(m.deletions=[b],m.flags|=16):S.push(b)}}function n(m,b){if(!e)return null;for(;b!==null;)t(m,b),b=b.sibling;return null}function r(m){for(var b=new Map;m!==null;)m.key!==null?b.set(m.key,m):b.set(m.index,m),m=m.sibling;return b}function i(m,b){return m=Bs(m,b),m.index=0,m.sibling=null,m}function s(m,b,S){return m.index=S,e?(S=m.alternate,S!==null?(S=S.index,S<b?(m.flags|=67108866,b):S):(m.flags|=67108866,b)):(m.flags|=1048576,b)}function a(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function o(m,b,S,_){return b===null||b.tag!==6?(b=VS(S,m.mode,_),b.return=m,b):(b=i(b,S),b.return=m,b)}function l(m,b,S,_){var C=S.type;return C===Rc?f(m,b,S.props.children,_,S.key):b!==null&&(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===_a&&Ko(C)===b.type)?(b=i(b,S.props),Qf(b,S),b.return=m,b):(b=Qp(S.type,S.key,S.props,null,m.mode,_),Qf(b,S),b.return=m,b)}function c(m,b,S,_){return b===null||b.tag!==4||b.stateNode.containerInfo!==S.containerInfo||b.stateNode.implementation!==S.implementation?(b=KS(S,m.mode,_),b.return=m,b):(b=i(b,S.children||[]),b.return=m,b)}function f(m,b,S,_,C){return b===null||b.tag!==7?(b=sl(S,m.mode,_,C),b.return=m,b):(b=i(b,S),b.return=m,b)}function u(m,b,S){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return b=VS(""+b,m.mode,S),b.return=m,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ap:return S=Qp(b.type,b.key,b.props,null,m.mode,S),Qf(S,b),S.return=m,S;case pd:return b=KS(b,m.mode,S),b.return=m,b;case _a:return b=Ko(b),u(m,b,S)}if(gd(b)||Gf(b))return b=sl(b,m.mode,S,null),b.return=m,b;if(typeof b.then=="function")return u(m,hp(b),S);if(b.$$typeof===Ms)return u(m,dp(m,b),S);mp(m,b)}return null}function d(m,b,S,_){var C=b!==null?b.key:null;if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return C!==null?null:o(m,b,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case ap:return S.key===C?l(m,b,S,_):null;case pd:return S.key===C?c(m,b,S,_):null;case _a:return S=Ko(S),d(m,b,S,_)}if(gd(S)||Gf(S))return C!==null?null:f(m,b,S,_,null);if(typeof S.then=="function")return d(m,b,hp(S),_);if(S.$$typeof===Ms)return d(m,b,dp(m,S),_);mp(m,S)}return null}function h(m,b,S,_,C){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return m=m.get(S)||null,o(b,m,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case ap:return m=m.get(_.key===null?S:_.key)||null,l(b,m,_,C);case pd:return m=m.get(_.key===null?S:_.key)||null,c(b,m,_,C);case _a:return _=Ko(_),h(m,b,S,_,C)}if(gd(_)||Gf(_))return m=m.get(S)||null,f(b,m,_,C,null);if(typeof _.then=="function")return h(m,b,S,hp(_),C);if(_.$$typeof===Ms)return h(m,b,S,dp(b,_),C);mp(b,_)}return null}function g(m,b,S,_){for(var C=null,E=null,A=b,M=b=0,D=null;A!==null&&M<S.length;M++){A.index>M?(D=A,A=null):D=A.sibling;var N=d(m,A,S[M],_);if(N===null){A===null&&(A=D);break}e&&A&&N.alternate===null&&t(m,A),b=s(N,b,M),E===null?C=N:E.sibling=N,E=N,A=D}if(M===S.length)return n(m,A),Pe&&Ts(m,M),C;if(A===null){for(;M<S.length;M++)A=u(m,S[M],_),A!==null&&(b=s(A,b,M),E===null?C=A:E.sibling=A,E=A);return Pe&&Ts(m,M),C}for(A=r(A);M<S.length;M++)D=h(A,m,M,S[M],_),D!==null&&(e&&D.alternate!==null&&A.delete(D.key===null?M:D.key),b=s(D,b,M),E===null?C=D:E.sibling=D,E=D);return e&&A.forEach(function(I){return t(m,I)}),Pe&&Ts(m,M),C}function v(m,b,S,_){if(S==null)throw Error(P(151));for(var C=null,E=null,A=b,M=b=0,D=null,N=S.next();A!==null&&!N.done;M++,N=S.next()){A.index>M?(D=A,A=null):D=A.sibling;var I=d(m,A,N.value,_);if(I===null){A===null&&(A=D);break}e&&A&&I.alternate===null&&t(m,A),b=s(I,b,M),E===null?C=I:E.sibling=I,E=I,A=D}if(N.done)return n(m,A),Pe&&Ts(m,M),C;if(A===null){for(;!N.done;M++,N=S.next())N=u(m,N.value,_),N!==null&&(b=s(N,b,M),E===null?C=N:E.sibling=N,E=N);return Pe&&Ts(m,M),C}for(A=r(A);!N.done;M++,N=S.next())N=h(A,m,M,N.value,_),N!==null&&(e&&N.alternate!==null&&A.delete(N.key===null?M:N.key),b=s(N,b,M),E===null?C=N:E.sibling=N,E=N);return e&&A.forEach(function($){return t(m,$)}),Pe&&Ts(m,M),C}function x(m,b,S,_){if(typeof S=="object"&&S!==null&&S.type===Rc&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case ap:e:{for(var C=S.key;b!==null;){if(b.key===C){if(C=S.type,C===Rc){if(b.tag===7){n(m,b.sibling),_=i(b,S.props.children),_.return=m,m=_;break e}}else if(b.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===_a&&Ko(C)===b.type){n(m,b.sibling),_=i(b,S.props),Qf(_,S),_.return=m,m=_;break e}n(m,b);break}else t(m,b);b=b.sibling}S.type===Rc?(_=sl(S.props.children,m.mode,_,S.key),_.return=m,m=_):(_=Qp(S.type,S.key,S.props,null,m.mode,_),Qf(_,S),_.return=m,m=_)}return a(m);case pd:e:{for(C=S.key;b!==null;){if(b.key===C)if(b.tag===4&&b.stateNode.containerInfo===S.containerInfo&&b.stateNode.implementation===S.implementation){n(m,b.sibling),_=i(b,S.children||[]),_.return=m,m=_;break e}else{n(m,b);break}else t(m,b);b=b.sibling}_=KS(S,m.mode,_),_.return=m,m=_}return a(m);case _a:return S=Ko(S),x(m,b,S,_)}if(gd(S))return g(m,b,S,_);if(Gf(S)){if(C=Gf(S),typeof C!="function")throw Error(P(150));return S=C.call(S),v(m,b,S,_)}if(typeof S.then=="function")return x(m,b,hp(S),_);if(S.$$typeof===Ms)return x(m,b,dp(m,S),_);mp(m,S)}return typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint"?(S=""+S,b!==null&&b.tag===6?(n(m,b.sibling),_=i(b,S),_.return=m,m=_):(n(m,b),_=VS(S,m.mode,_),_.return=m,m=_),a(m)):n(m,b)}return function(m,b,S,_){try{vh=0;var C=x(m,b,S,_);return Zc=null,C}catch(A){if(A===of||A===Fb)throw A;var E=wr(29,A,null,m.mode);return E.lanes=_,E.return=m,E}finally{}}}var bl=Ij(!0),$j=Ij(!1),ka=!1;function fk(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function r1(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 Pa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ge&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ug(e),Aj(e,null,n),t}return Lb(e,r,t,n),Ug(e)}function Id(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,tj(e,n)}}function YS(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?i=s=a:s=s.next=a,n=n.next}while(n!==null);s===null?i=s=t:s=s.next=t}else i=s=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,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 i1=!1;function $d(){if(i1){var e=Wc;if(e!==null)throw e}}function Ld(e,t,n,r){i1=!1;var i=e.updateQueue;ka=!1;var s=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var l=o,c=l.next;l.next=null,a===null?s=c:a.next=c,a=l;var f=e.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=c:o.next=c,f.lastBaseUpdate=l))}if(s!==null){var u=i.baseState;a=0,f=c=l=null,o=s;do{var d=o.lane&-536870913,h=d!==o.lane;if(h?(je&d)===d:(r&d)===d){d!==0&&d===xu&&(i1=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var g=e,v=o;d=t;var x=n;switch(v.tag){case 1:if(g=v.payload,typeof g=="function"){u=g.call(x,u,d);break e}u=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=v.payload,d=typeof g=="function"?g.call(x,u,d):g,d==null)break e;u=wt({},u,d);break e;case 2:ka=!0}}d=o.callback,d!==null&&(e.flags|=64,h&&(e.flags|=8192),h=i.callbacks,h===null?i.callbacks=[d]:h.push(d))}else h={lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(c=f=h,l=u):f=f.next=h,a|=d;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;h=o,o=h.next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}while(!0);f===null&&(l=u),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=f,s===null&&(i.shared.lanes=0),oo|=a,e.lanes=a,e.memoizedState=u}}function Lj(e,t){if(typeof e!="function")throw Error(P(191,e));e.call(t)}function Fj(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Lj(n[e],t)}var wu=ss(null),Vg=ss(0);function VA(e,t){e=Xs,mt(Vg,e),mt(wu,t),Xs=e|t.baseLanes}function s1(){mt(Vg,Xs),mt(wu,wu.current)}function dk(){Xs=Vg.current,hn(wu),hn(Vg)}var jr=ss(null),Wr=null;function Ta(e){var t=e.alternate;mt(It,It.current&1),mt(jr,e),Wr===null&&(t===null||wu.current!==null||t.memoizedState!==null)&&(Wr=e)}function a1(e){mt(It,It.current),mt(jr,e),Wr===null&&(Wr=e)}function Pj(e){e.tag===22?(mt(It,It.current),mt(jr,e),Wr===null&&(Wr=e)):Aa()}function Aa(){mt(It,It.current),mt(jr,jr.current)}function vr(e){hn(jr),Wr===e&&(Wr=null),hn(It)}var It=ss(0);function Kg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||E1(n)||C1(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 Ys=0,Ee=null,st=null,Bt=null,Gg=!1,eu=!1,vl=!1,Yg=0,Sh=0,tu=null,Xq=0;function At(){throw Error(P(321))}function hk(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!zr(e[n],t[n]))return!1;return!0}function mk(e,t,n,r,i,s){return Ys=s,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ye.H=e===null||e.memoizedState===null?yI:Ek,vl=!1,s=n(r,i),vl=!1,eu&&(s=Bj(t,n,r,i)),Uj(e),s}function Uj(e){ye.H=xh;var t=st!==null&&st.next!==null;if(Ys=0,Bt=st=Ee=null,Gg=!1,Sh=0,tu=null,t)throw Error(P(300));e===null||Yt||(e=e.dependencies,e!==null&&Hg(e)&&(Yt=!0))}function Bj(e,t,n,r){Ee=e;var i=0;do{if(eu&&(tu=null),Sh=0,eu=!1,25<=i)throw Error(P(301));if(i+=1,Bt=st=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}ye.H=bI,s=t(n,r)}while(eu);return s}function Wq(){var e=ye.H,t=e.useState()[0];return t=typeof t.then=="function"?fm(t):t,e=e.useState()[0],(st!==null?st.memoizedState:null)!==e&&(Ee.flags|=1024),t}function pk(){var e=Yg!==0;return Yg=0,e}function gk(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function yk(e){if(Gg){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Gg=!1}Ys=0,Bt=st=Ee=null,eu=!1,Sh=Yg=0,tu=null}function Un(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?Ee.memoizedState=Bt=e:Bt=Bt.next=e,Bt}function $t(){if(st===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=st.next;var t=Bt===null?Ee.memoizedState:Bt.next;if(t!==null)Bt=t,st=e;else{if(e===null)throw Ee.alternate===null?Error(P(467)):Error(P(310));st=e,e={memoizedState:st.memoizedState,baseState:st.baseState,baseQueue:st.baseQueue,queue:st.queue,next:null},Bt===null?Ee.memoizedState=Bt=e:Bt=Bt.next=e}return Bt}function Pb(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fm(e){var t=Sh;return Sh+=1,tu===null&&(tu=[]),e=jj(tu,e,t),t=Ee,(Bt===null?t.memoizedState:Bt.next)===null&&(t=t.alternate,ye.H=t===null||t.memoizedState===null?yI:Ek),e}function Ub(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return fm(e);if(e.$$typeof===Ms)return Cn(e)}throw Error(P(438,String(e)))}function bk(e){var t=null,n=Ee.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Ee.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Pb(),Ee.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]=$H;return t.index++,n}function Js(e,t){return typeof t=="function"?t(e):t}function Wp(e){var t=$t();return vk(t,st,e)}function vk(e,t,n){var r=e.queue;if(r===null)throw Error(P(311));r.lastRenderedReducer=n;var i=e.baseQueue,s=r.pending;if(s!==null){if(i!==null){var a=i.next;i.next=s.next,s.next=a}t.baseQueue=i=s,r.pending=null}if(s=e.baseState,i===null)e.memoizedState=s;else{t=i.next;var o=a=null,l=null,c=t,f=!1;do{var u=c.lane&-536870913;if(u!==c.lane?(je&u)===u:(Ys&u)===u){var d=c.revertLane;if(d===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),u===xu&&(f=!0);else if((Ys&d)===d){c=c.next,d===xu&&(f=!0);continue}else u={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=u,a=s):l=l.next=u,Ee.lanes|=d,oo|=d;u=c.action,vl&&n(s,u),s=c.hasEagerState?c.eagerState:n(s,u)}else d={lane:u,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=d,a=s):l=l.next=d,Ee.lanes|=u,oo|=u;c=c.next}while(c!==null&&c!==t);if(l===null?a=s:l.next=o,!zr(s,e.memoizedState)&&(Yt=!0,f&&(n=Wc,n!==null)))throw n;e.memoizedState=s,e.baseState=a,e.baseQueue=l,r.lastRenderedState=s}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function JS(e){var t=$t(),n=t.queue;if(n===null)throw Error(P(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do s=e(s,a.action),a=a.next;while(a!==i);zr(s,t.memoizedState)||(Yt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Hj(e,t,n){var r=Ee,i=$t(),s=Pe;if(s){if(n===void 0)throw Error(P(407));n=n()}else n=t();var a=!zr((st||i).memoizedState,n);if(a&&(i.memoizedState=n,Yt=!0),i=i.queue,Sk(Kj.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||Bt!==null&&Bt.memoizedState.tag&1){if(r.flags|=2048,_u(9,{destroy:void 0},Vj.bind(null,r,i,n,t),null),ct===null)throw Error(P(349));s||Ys&127||qj(r,t,n)}return n}function qj(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t=Pb(),Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Vj(e,t,n,r){t.value=n,t.getSnapshot=r,Gj(t)&&Yj(e)}function Kj(e,t,n){return n(function(){Gj(t)&&Yj(e)})}function Gj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!zr(e,n)}catch{return!0}}function Yj(e){var t=Vl(e,2);t!==null&&lr(t,e,2)}function o1(e){var t=Un();if(typeof e=="function"){var n=e;if(e=n(),vl){Ra(!0);try{n()}finally{Ra(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Js,lastRenderedState:e},t}function Jj(e,t,n,r){return e.baseState=n,vk(e,st,typeof r=="function"?r:Js)}function Zq(e,t,n,r,i){if(Hb(e))throw Error(P(485));if(e=t.action,e!==null){var s={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){s.listeners.push(a)}};ye.T!==null?n(!0):s.isTransition=!1,r(s),n=t.pending,n===null?(s.next=t.pending=s,Qj(t,s)):(s.next=n.next,t.pending=n.next=s)}}function Qj(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var s=ye.T,a={};ye.T=a;try{var o=n(i,r),l=ye.S;l!==null&&l(a,o),KA(e,t,o)}catch(c){l1(e,t,c)}finally{s!==null&&a.types!==null&&(s.types=a.types),ye.T=s}}else try{s=n(i,r),KA(e,t,s)}catch(c){l1(e,t,c)}}function KA(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){GA(e,t,r)},function(r){return l1(e,t,r)}):GA(e,t,n)}function GA(e,t,n){t.status="fulfilled",t.value=n,Xj(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Qj(e,n)))}function l1(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,Xj(t),t=t.next;while(t!==r)}e.action=null}function Xj(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wj(e,t){return t}function YA(e,t){if(Pe){var n=ct.formState;if(n!==null){e:{var r=Ee;if(Pe){if(bt){t:{for(var i=bt,s=Jr;i.nodeType!==8;){if(!s){i=null;break t}if(i=Zr(i.nextSibling),i===null){i=null;break t}}s=i.data,i=s==="F!"||s==="F"?i:null}if(i){bt=Zr(i.nextSibling),r=i.data==="F!";break e}}so(r)}r=!1}r&&(t=n[0])}}return n=Un(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wj,lastRenderedState:t},n.queue=r,n=mI.bind(null,Ee,r),r.dispatch=n,r=o1(!1),s=kk.bind(null,Ee,!1,r.queue),r=Un(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Zq.bind(null,Ee,i,s,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function JA(e){var t=$t();return Zj(t,st,e)}function Zj(e,t,n){if(t=vk(e,t,Wj)[0],e=Wp(Js)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=fm(t)}catch(a){throw a===of?Fb:a}else r=t;t=$t();var i=t.queue,s=i.dispatch;return n!==t.memoizedState&&(Ee.flags|=2048,_u(9,{destroy:void 0},eV.bind(null,i,n),null)),[r,s,e]}function eV(e,t){e.action=t}function QA(e){var t=$t(),n=st;if(n!==null)return Zj(t,n,e);$t(),t=t.memoizedState,n=$t();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function _u(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Pb(),Ee.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 eI(){return $t().memoizedState}function Zp(e,t,n,r){var i=Un();Ee.flags|=e,i.memoizedState=_u(1|t,{destroy:void 0},n,r===void 0?null:r)}function Bb(e,t,n,r){var i=$t();r=r===void 0?null:r;var s=i.memoizedState.inst;st!==null&&r!==null&&hk(r,st.memoizedState.deps)?i.memoizedState=_u(t,s,n,r):(Ee.flags|=e,i.memoizedState=_u(1|t,s,n,r))}function XA(e,t){Zp(8390656,8,e,t)}function Sk(e,t){Bb(2048,8,e,t)}function tV(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Pb(),Ee.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function tI(e){var t=$t().memoizedState;return tV({ref:t,nextImpl:e}),function(){if(Ge&2)throw Error(P(440));return t.impl.apply(void 0,arguments)}}function nI(e,t){return Bb(4,2,e,t)}function rI(e,t){return Bb(4,4,e,t)}function iI(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 sI(e,t,n){n=n!=null?n.concat([e]):null,Bb(4,4,iI.bind(null,t,e),n)}function xk(){}function aI(e,t){var n=$t();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&hk(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function oI(e,t){var n=$t();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&hk(t,r[1]))return r[0];if(r=e(),vl){Ra(!0);try{e()}finally{Ra(!1)}}return n.memoizedState=[r,t],r}function wk(e,t,n){return n===void 0||Ys&1073741824&&!(je&261930)?e.memoizedState=t:(e.memoizedState=n,e=JI(),Ee.lanes|=e,oo|=e,n)}function lI(e,t,n,r){return zr(n,t)?n:wu.current!==null?(e=wk(e,n,r),zr(e,t)||(Yt=!0),e):!(Ys&42)||Ys&1073741824&&!(je&261930)?(Yt=!0,e.memoizedState=n):(e=JI(),Ee.lanes|=e,oo|=e,t)}function cI(e,t,n,r,i){var s=Ye.p;Ye.p=s!==0&&8>s?s:8;var a=ye.T,o={};ye.T=o,kk(e,!1,t,n);try{var l=i(),c=ye.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var f=Qq(l,r);Fd(e,t,f,Ar(e))}else Fd(e,t,r,Ar(e))}catch(u){Fd(e,t,{then:function(){},status:"rejected",reason:u},Ar())}finally{Ye.p=s,a!==null&&o.types!==null&&(a.types=o.types),ye.T=a}}function nV(){}function c1(e,t,n,r){if(e.tag!==5)throw Error(P(476));var i=uI(e).queue;cI(e,i,t,il,n===null?nV:function(){return fI(e),n(r)})}function uI(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:il,baseState:il,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Js,lastRenderedState:il},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Js,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function fI(e){var t=uI(e);t.next===null&&(t=e.alternate.memoizedState),Fd(e,t.next.queue,{},Ar())}function _k(){return Cn(kh)}function dI(){return $t().memoizedState}function hI(){return $t().memoizedState}function rV(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Ar();e=Pa(n);var r=Ua(t,e,n);r!==null&&(lr(r,t,n),Id(r,t,n)),t={cache:lk()},e.payload=t;return}t=t.return}}function iV(e,t,n){var r=Ar();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hb(e)?pI(t,n):(n=ik(e,t,n,r),n!==null&&(lr(n,e,r),gI(n,t,r)))}function mI(e,t,n){var r=Ar();Fd(e,t,n,r)}function Fd(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hb(e))pI(t,i);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var a=t.lastRenderedState,o=s(a,n);if(i.hasEagerState=!0,i.eagerState=o,zr(o,a))return Lb(e,t,i,0),ct===null&&$b(),!1}catch{}finally{}if(n=ik(e,t,i,r),n!==null)return lr(n,e,r),gI(n,t,r),!0}return!1}function kk(e,t,n,r){if(r={lane:2,revertLane:Dk(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Hb(e)){if(t)throw Error(P(479))}else t=ik(e,n,r,2),t!==null&&lr(t,e,2)}function Hb(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function pI(e,t){eu=Gg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function gI(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tj(e,n)}}var xh={readContext:Cn,use:Ub,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};xh.useEffectEvent=At;var yI={readContext:Cn,use:Ub,useCallback:function(e,t){return Un().memoizedState=[e,t===void 0?null:t],e},useContext:Cn,useEffect:XA,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Zp(4194308,4,iI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Zp(4194308,4,e,t)},useInsertionEffect:function(e,t){Zp(4,2,e,t)},useMemo:function(e,t){var n=Un();t=t===void 0?null:t;var r=e();if(vl){Ra(!0);try{e()}finally{Ra(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Un();if(n!==void 0){var i=n(t);if(vl){Ra(!0);try{n(t)}finally{Ra(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=iV.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=Un();return e={current:e},t.memoizedState=e},useState:function(e){e=o1(e);var t=e.queue,n=mI.bind(null,Ee,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:xk,useDeferredValue:function(e,t){var n=Un();return wk(n,e,t)},useTransition:function(){var e=o1(!1);return e=cI.bind(null,Ee,e.queue,!0,!1),Un().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ee,i=Un();if(Pe){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),ct===null)throw Error(P(349));je&127||qj(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,XA(Kj.bind(null,r,s,e),[e]),r.flags|=2048,_u(9,{destroy:void 0},Vj.bind(null,r,s,n,t),null),n},useId:function(){var e=Un(),t=ct.identifierPrefix;if(Pe){var n=Hi,r=Bi;n=(r&~(1<<32-Tr(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Yg++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Xq++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:_k,useFormState:YA,useActionState:YA,useOptimistic:function(e){var t=Un();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=kk.bind(null,Ee,!0,n),n.dispatch=t,[e,t]},useMemoCache:bk,useCacheRefresh:function(){return Un().memoizedState=rV.bind(null,Ee)},useEffectEvent:function(e){var t=Un(),n={impl:e};return t.memoizedState=n,function(){if(Ge&2)throw Error(P(440));return n.impl.apply(void 0,arguments)}}},Ek={readContext:Cn,use:Ub,useCallback:aI,useContext:Cn,useEffect:Sk,useImperativeHandle:sI,useInsertionEffect:nI,useLayoutEffect:rI,useMemo:oI,useReducer:Wp,useRef:eI,useState:function(){return Wp(Js)},useDebugValue:xk,useDeferredValue:function(e,t){var n=$t();return lI(n,st.memoizedState,e,t)},useTransition:function(){var e=Wp(Js)[0],t=$t().memoizedState;return[typeof e=="boolean"?e:fm(e),t]},useSyncExternalStore:Hj,useId:dI,useHostTransitionStatus:_k,useFormState:JA,useActionState:JA,useOptimistic:function(e,t){var n=$t();return Jj(n,st,e,t)},useMemoCache:bk,useCacheRefresh:hI};Ek.useEffectEvent=tI;var bI={readContext:Cn,use:Ub,useCallback:aI,useContext:Cn,useEffect:Sk,useImperativeHandle:sI,useInsertionEffect:nI,useLayoutEffect:rI,useMemo:oI,useReducer:JS,useRef:eI,useState:function(){return JS(Js)},useDebugValue:xk,useDeferredValue:function(e,t){var n=$t();return st===null?wk(n,e,t):lI(n,st.memoizedState,e,t)},useTransition:function(){var e=JS(Js)[0],t=$t().memoizedState;return[typeof e=="boolean"?e:fm(e),t]},useSyncExternalStore:Hj,useId:dI,useHostTransitionStatus:_k,useFormState:QA,useActionState:QA,useOptimistic:function(e,t){var n=$t();return st!==null?Jj(n,st,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:bk,useCacheRefresh:hI};bI.useEffectEvent=tI;function QS(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:wt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var u1={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ar(),i=Pa(r);i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(lr(t,e,r),Id(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ar(),i=Pa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ua(e,i,r),t!==null&&(lr(t,e,r),Id(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ar(),r=Pa(n);r.tag=2,t!=null&&(r.callback=t),t=Ua(e,r,n),t!==null&&(lr(t,e,n),Id(t,e,n))}};function WA(e,t,n,r,i,s,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,s,a):t.prototype&&t.prototype.isPureReactComponent?!gh(n,r)||!gh(i,s):!0}function ZA(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&&u1.enqueueReplaceState(t,t.state,null)}function Sl(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=wt({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function vI(e){Pg(e)}function SI(e){console.error(e)}function xI(e){Pg(e)}function Jg(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function eO(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function f1(e,t,n){return n=Pa(n),n.tag=3,n.payload={element:null},n.callback=function(){Jg(e,t)},n}function wI(e){return e=Pa(e),e.tag=3,e}function _I(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var s=r.value;e.payload=function(){return i(s)},e.callback=function(){eO(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){eO(t,n,r),typeof i!="function"&&(Ba===null?Ba=new Set([this]):Ba.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function sV(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&af(t,n,i,!0),n=jr.current,n!==null){switch(n.tag){case 31:case 13:return Wr===null?ey():n.alternate===null&&Rt===0&&(Rt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===qg?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),o0(e,r,i)),!1;case 22:return n.flags|=65536,r===qg?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)),o0(e,r,i)),!1}throw Error(P(435,n.tag))}return o0(e,r,i),ey(),!1}if(Pe)return t=jr.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Wx&&(e=Error(P(422),{cause:r}),bh(Yr(e,n)))):(r!==Wx&&(t=Error(P(423),{cause:r}),bh(Yr(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Yr(r,n),i=f1(e.stateNode,r,i),YS(e,i),Rt!==4&&(Rt=2)),!1;var s=Error(P(520),{cause:r});if(s=Yr(s,n),Bd===null?Bd=[s]:Bd.push(s),Rt!==4&&(Rt=2),t===null)return!0;r=Yr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=f1(n.stateNode,r,e),YS(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Ba===null||!Ba.has(s))))return n.flags|=65536,i&=-i,n.lanes|=i,i=wI(i),_I(i,e,n,r),YS(n,i),!1}n=n.return}while(n!==null);return!1}var Ck=Error(P(461)),Yt=!1;function bn(e,t,n,r){t.child=e===null?$j(t,null,n,r):bl(t,e.child,n,r)}function tO(e,t,n,r,i){n=n.render;var s=t.ref;if("ref"in r){var a={};for(var o in r)o!=="ref"&&(a[o]=r[o])}else a=r;return yl(t),r=mk(e,t,n,a,s,i),o=pk(),e!==null&&!Yt?(gk(e,t,i),Qs(e,t,i)):(Pe&&o&&ak(t),t.flags|=1,bn(e,t,r,i),t.child)}function nO(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!sk(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,kI(e,t,s,r,i)):(e=Qp(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Tk(e,i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:gh,n(a,r)&&e.ref===t.ref)return Qs(e,t,i)}return t.flags|=1,e=Bs(s,r),e.ref=t.ref,e.return=t,t.child=e}function kI(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(gh(s,r)&&e.ref===t.ref)if(Yt=!1,t.pendingProps=r=s,Tk(e,i))e.flags&131072&&(Yt=!0);else return t.lanes=e.lanes,Qs(e,t,i)}return d1(e,t,n,r,i)}function EI(e,t,n,r){var i=r.children,s=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(s=s!==null?s.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~s}else r=0,t.child=null;return rO(e,t,s,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xp(t,s!==null?s.cachePool:null),s!==null?VA(t,s):s1(),Pj(t);else return r=t.lanes=536870912,rO(e,t,s!==null?s.baseLanes|n:n,n,r)}else s!==null?(Xp(t,s.cachePool),VA(t,s),Aa(),t.memoizedState=null):(e!==null&&Xp(t,null),s1(),Aa());return bn(e,t,i,n),t.child}function bd(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function rO(e,t,n,r,i){var s=ck();return s=s===null?null:{parent:Vt._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&Xp(t,null),s1(),Pj(t),e!==null&&af(e,t,r,!0),t.childLanes=i,null}function eg(e,t){return t=Qg({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function iO(e,t,n){return bl(t,e.child,null,n),e=eg(t,t.pendingProps),e.flags|=2,vr(t),t.memoizedState=null,e}function aV(e,t,n){var r=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Pe){if(r.mode==="hidden")return e=eg(t,r),t.lanes=536870912,bd(null,e);if(a1(t),(e=bt)?(e=y$(e,Jr),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:io!==null?{id:Bi,overflow:Hi}:null,retryLane:536870912,hydrationErrors:null},n=Rj(e),n.return=t,t.child=n,kn=t,bt=null)):e=null,e===null)throw so(t);return t.lanes=536870912,null}return eg(t,r)}var s=e.memoizedState;if(s!==null){var a=s.dehydrated;if(a1(t),i)if(t.flags&256)t.flags&=-257,t=iO(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(P(558));else if(Yt||af(e,t,n,!1),i=(n&e.childLanes)!==0,Yt||i){if(r=ct,r!==null&&(a=nj(r,n),a!==0&&a!==s.retryLane))throw s.retryLane=a,Vl(e,a),lr(r,e,a),Ck;ey(),t=iO(e,t,n)}else e=s.treeContext,bt=Zr(a.nextSibling),kn=t,Pe=!0,Fa=null,Jr=!1,e!==null&&Mj(t,e),t=eg(t,r),t.flags|=4096;return t}return e=Bs(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function tg(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(P(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function d1(e,t,n,r,i){return yl(t),n=mk(e,t,n,r,void 0,i),r=pk(),e!==null&&!Yt?(gk(e,t,i),Qs(e,t,i)):(Pe&&r&&ak(t),t.flags|=1,bn(e,t,n,i),t.child)}function sO(e,t,n,r,i,s){return yl(t),t.updateQueue=null,n=Bj(t,r,n,i),Uj(e),r=pk(),e!==null&&!Yt?(gk(e,t,s),Qs(e,t,s)):(Pe&&r&&ak(t),t.flags|=1,bn(e,t,n,s),t.child)}function aO(e,t,n,r,i){if(yl(t),t.stateNode===null){var s=Lc,a=n.contextType;typeof a=="object"&&a!==null&&(s=Cn(a)),s=new n(r,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=u1,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=r,s.state=t.memoizedState,s.refs={},fk(t),a=n.contextType,s.context=typeof a=="object"&&a!==null?Cn(a):Lc,s.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(QS(t,n,a,r),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(a=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),a!==s.state&&u1.enqueueReplaceState(s,s.state,null),Ld(t,r,s,i),$d(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){s=t.stateNode;var o=t.memoizedProps,l=Sl(n,o);s.props=l;var c=s.context,f=n.contextType;a=Lc,typeof f=="object"&&f!==null&&(a=Cn(f));var u=n.getDerivedStateFromProps;f=typeof u=="function"||typeof s.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,f||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o||c!==a)&&ZA(t,s,r,a),ka=!1;var d=t.memoizedState;s.state=d,Ld(t,r,s,i),$d(),c=t.memoizedState,o||d!==c||ka?(typeof u=="function"&&(QS(t,n,u,r),c=t.memoizedState),(l=ka||WA(t,n,l,r,d,c,a))?(f||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),s.props=r,s.state=c,s.context=a,r=l):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,r1(e,t),a=t.memoizedProps,f=Sl(n,a),s.props=f,u=t.pendingProps,d=s.context,c=n.contextType,l=Lc,typeof c=="object"&&c!==null&&(l=Cn(c)),o=n.getDerivedStateFromProps,(c=typeof o=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==u||d!==l)&&ZA(t,s,r,l),ka=!1,d=t.memoizedState,s.state=d,Ld(t,r,s,i),$d();var h=t.memoizedState;a!==u||d!==h||ka||e!==null&&e.dependencies!==null&&Hg(e.dependencies)?(typeof o=="function"&&(QS(t,n,o,r),h=t.memoizedState),(f=ka||WA(t,n,f,r,d,h,l)||e!==null&&e.dependencies!==null&&Hg(e.dependencies))?(c||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(r,h,l),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(r,h,l)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),s.props=r,s.state=h,s.context=l,r=f):(typeof s.componentDidUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return s=r,tg(e,t),r=(t.flags&128)!==0,s||r?(s=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&r?(t.child=bl(t,e.child,null,i),t.child=bl(t,null,n,i)):bn(e,t,n,i),t.memoizedState=s.state,e=t.child):e=Qs(e,t,i),e}function oO(e,t,n,r){return gl(),t.flags|=256,bn(e,t,n,r),t.child}var XS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function WS(e){return{baseLanes:e,cachePool:zj()}}function ZS(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=kr),e}function CI(e,t,n){var r=t.pendingProps,i=!1,s=(t.flags&128)!==0,a;if((a=s)||(a=e!==null&&e.memoizedState===null?!1:(It.current&2)!==0),a&&(i=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(Pe){if(i?Ta(t):Aa(),(e=bt)?(e=y$(e,Jr),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:io!==null?{id:Bi,overflow:Hi}:null,retryLane:536870912,hydrationErrors:null},n=Rj(e),n.return=t,t.child=n,kn=t,bt=null)):e=null,e===null)throw so(t);return C1(e)?t.lanes=32:t.lanes=536870912,null}var o=r.children;return r=r.fallback,i?(Aa(),i=t.mode,o=Qg({mode:"hidden",children:o},i),r=sl(r,i,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,r=t.child,r.memoizedState=WS(n),r.childLanes=ZS(e,a,n),t.memoizedState=XS,bd(null,r)):(Ta(t),h1(t,o))}var l=e.memoizedState;if(l!==null&&(o=l.dehydrated,o!==null)){if(s)t.flags&256?(Ta(t),t.flags&=-257,t=e0(e,t,n)):t.memoizedState!==null?(Aa(),t.child=e.child,t.flags|=128,t=null):(Aa(),o=r.fallback,i=t.mode,r=Qg({mode:"visible",children:r.children},i),o=sl(o,i,n,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,bl(t,e.child,null,n),r=t.child,r.memoizedState=WS(n),r.childLanes=ZS(e,a,n),t.memoizedState=XS,t=bd(null,r));else if(Ta(t),C1(o)){if(a=o.nextSibling&&o.nextSibling.dataset,a)var c=a.dgst;a=c,r=Error(P(419)),r.stack="",r.digest=a,bh({value:r,source:null,stack:null}),t=e0(e,t,n)}else if(Yt||af(e,t,n,!1),a=(n&e.childLanes)!==0,Yt||a){if(a=ct,a!==null&&(r=nj(a,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Vl(e,r),lr(a,e,r),Ck;E1(o)||ey(),t=e0(e,t,n)}else E1(o)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,bt=Zr(o.nextSibling),kn=t,Pe=!0,Fa=null,Jr=!1,e!==null&&Mj(t,e),t=h1(t,r.children),t.flags|=4096);return t}return i?(Aa(),o=r.fallback,i=t.mode,l=e.child,c=l.sibling,r=Bs(l,{mode:"hidden",children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,c!==null?o=Bs(c,o):(o=sl(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,bd(null,r),r=t.child,o=e.child.memoizedState,o===null?o=WS(n):(i=o.cachePool,i!==null?(l=Vt._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=zj(),o={baseLanes:o.baseLanes|n,cachePool:i}),r.memoizedState=o,r.childLanes=ZS(e,a,n),t.memoizedState=XS,bd(e.child,r)):(Ta(t),n=e.child,e=n.sibling,n=Bs(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function h1(e,t){return t=Qg({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Qg(e,t){return e=wr(22,e,null,t),e.lanes=0,e}function e0(e,t,n){return bl(t,e.child,null,n),e=h1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function lO(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),e1(e.return,t,n)}function t0(e,t,n,r,i,s){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:s}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.treeForkCount=s)}function TI(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;r=r.children;var a=It.current,o=(a&2)!==0;if(o?(a=a&1|2,t.flags|=128):a&=1,mt(It,a),bn(e,t,r,n),r=Pe?yh:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lO(e,n,t);else if(e.tag===19)lO(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(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Kg(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),t0(t,!1,i,n,s,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Kg(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}t0(t,!0,n,null,s,r);break;case"together":t0(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Qs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),oo|=t.lanes,!(n&t.childLanes))if(e!==null){if(af(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(P(153));if(t.child!==null){for(e=t.child,n=Bs(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Bs(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Tk(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Hg(e)))}function oV(e,t,n){switch(t.tag){case 3:Ig(t,t.stateNode.containerInfo),Ca(t,Vt,e.memoizedState.cache),gl();break;case 27:case 5:Ux(t);break;case 4:Ig(t,t.stateNode.containerInfo);break;case 10:Ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,a1(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(Ta(t),t.flags|=128,null):n&t.child.childLanes?CI(e,t,n):(Ta(t),e=Qs(e,t,n),e!==null?e.sibling:null);Ta(t);break;case 19:var i=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(af(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return TI(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),mt(It,It.current),r)break;return null;case 22:return t.lanes=0,EI(e,t,n,t.pendingProps);case 24:Ca(t,Vt,e.memoizedState.cache)}return Qs(e,t,n)}function AI(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Yt=!0;else{if(!Tk(e,n)&&!(t.flags&128))return Yt=!1,oV(e,t,n);Yt=!!(e.flags&131072)}else Yt=!1,Pe&&t.flags&1048576&&Nj(t,yh,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=Ko(t.elementType),t.type=e,typeof e=="function")sk(e)?(r=Sl(e,r),t.tag=1,t=aO(null,t,e,r,n)):(t.tag=0,t=d1(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===V_){t.tag=11,t=tO(null,t,e,r,n);break e}else if(i===K_){t.tag=14,t=nO(null,t,e,r,n);break e}}throw t=Fx(e)||e,Error(P(306,t,""))}}return t;case 0:return d1(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Sl(r,t.pendingProps),aO(e,t,r,i,n);case 3:e:{if(Ig(t,t.stateNode.containerInfo),e===null)throw Error(P(387));r=t.pendingProps;var s=t.memoizedState;i=s.element,r1(e,t),Ld(t,r,null,n);var a=t.memoizedState;if(r=a.cache,Ca(t,Vt,r),r!==s.cache&&t1(t,[Vt],n,!0),$d(),r=a.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=oO(e,t,r,n);break e}else if(r!==i){i=Yr(Error(P(424)),t),bh(i),t=oO(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(bt=Zr(e.firstChild),kn=t,Pe=!0,Fa=null,Jr=!0,n=$j(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(gl(),r===i){t=Qs(e,t,n);break e}bn(e,t,r,n)}t=t.child}return t;case 26:return tg(e,t),e===null?(n=AO(t.type,null,t.pendingProps,null))?t.memoizedState=n:Pe||(n=t.type,e=t.pendingProps,r=iy(La.current).createElement(n),r[_n]=t,r[cr]=e,An(r,n,e),fn(r),t.stateNode=r):t.memoizedState=AO(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Ux(t),e===null&&Pe&&(r=t.stateNode=b$(t.type,t.pendingProps,La.current),kn=t,Jr=!0,i=bt,_o(t.type)?(T1=i,bt=Zr(r.firstChild)):bt=i),bn(e,t,t.pendingProps.children,n),tg(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Pe&&((i=r=bt)&&(r=$V(r,t.type,t.pendingProps,Jr),r!==null?(t.stateNode=r,kn=t,bt=Zr(r.firstChild),Jr=!1,i=!0):i=!1),i||so(t)),Ux(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,r=s.children,_1(i,s)?r=null:a!==null&&_1(i,a)&&(t.flags|=32),t.memoizedState!==null&&(i=mk(e,t,Wq,null,null,n),kh._currentValue=i),tg(e,t),bn(e,t,r,n),t.child;case 6:return e===null&&Pe&&((e=n=bt)&&(n=LV(n,t.pendingProps,Jr),n!==null?(t.stateNode=n,kn=t,bt=null,e=!0):e=!1),e||so(t)),null;case 13:return CI(e,t,n);case 4:return Ig(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=bl(t,null,r,n):bn(e,t,r,n),t.child;case 11:return tO(e,t,t.type,t.pendingProps,n);case 7:return bn(e,t,t.pendingProps,n),t.child;case 8:return bn(e,t,t.pendingProps.children,n),t.child;case 12:return bn(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ca(t,t.type,r.value),bn(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,yl(t),i=Cn(i),r=r(i),t.flags|=1,bn(e,t,r,n),t.child;case 14:return nO(e,t,t.type,t.pendingProps,n);case 15:return kI(e,t,t.type,t.pendingProps,n);case 19:return TI(e,t,n);case 31:return aV(e,t,n);case 22:return EI(e,t,n,t.pendingProps);case 24:return yl(t),r=Cn(Vt),e===null?(i=ck(),i===null&&(i=ct,s=lk(),i.pooledCache=s,s.refCount++,s!==null&&(i.pooledCacheLanes|=n),i=s),t.memoizedState={parent:r,cache:i},fk(t),Ca(t,Vt,i)):(e.lanes&n&&(r1(e,t),Ld(t,null,null,n),$d()),i=e.memoizedState,s=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ca(t,Vt,r)):(r=s.cache,Ca(t,Vt,r),r!==i.cache&&t1(t,[Vt],n,!0))),bn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(P(156,t.tag))}function gs(e){e.flags|=4}function n0(e,t,n,r,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(WI())e.flags|=8192;else throw ol=qg,uk}else e.flags&=-16777217}function cO(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!x$(t))if(WI())e.flags|=8192;else throw ol=qg,uk}function pp(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Zz():536870912,e.lanes|=t,ku|=t)}function Xf(e,t){if(!Pe)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 yt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function lV(e,t,n){var r=t.pendingProps;switch(ok(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return yt(t),null;case 1:return yt(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Hs(Vt),bu(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(sc(t)?gs(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,GS())),yt(t),null;case 26:var i=t.type,s=t.memoizedState;return e===null?(gs(t),s!==null?(yt(t),cO(t,s)):(yt(t),n0(t,i,null,r,n))):s?s!==e.memoizedState?(gs(t),yt(t),cO(t,s)):(yt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&gs(t),yt(t),n0(t,i,e,r,n)),null;case 27:if($g(t),n=La.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gs(t);else{if(!r){if(t.stateNode===null)throw Error(P(166));return yt(t),null}e=Xi.current,sc(t)?LA(t):(e=b$(i,r,n),t.stateNode=e,gs(t))}return yt(t),null;case 5:if($g(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&gs(t);else{if(!r){if(t.stateNode===null)throw Error(P(166));return yt(t),null}if(s=Xi.current,sc(t))LA(t);else{var a=iy(La.current);switch(s){case 1:s=a.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:s=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":s=a.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":s=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":s=a.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?s.multiple=!0:r.size&&(s.size=r.size);break;default:s=typeof r.is=="string"?a.createElement(i,{is:r.is}):a.createElement(i)}}s[_n]=t,s[cr]=r;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)s.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=s;e:switch(An(s,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&gs(t)}}return yt(t),n0(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&gs(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(e=La.current,sc(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=kn,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[_n]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||m$(e.nodeValue,n)),e||so(t,!0)}else e=iy(e).createTextNode(r),e[_n]=t,t.stateNode=e}return yt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=sc(t),n!==null){if(e===null){if(!r)throw Error(P(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(557));e[_n]=t}else gl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yt(t),e=!1}else n=GS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(vr(t),t):(vr(t),null);if(t.flags&128)throw Error(P(558))}return yt(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=sc(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(P(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(P(317));i[_n]=t}else gl(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;yt(t),i=!1}else i=GS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(vr(t),t):(vr(t),null)}return vr(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),s=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(s=r.memoizedState.cachePool.pool),s!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),pp(t,t.updateQueue),yt(t),null);case 4:return bu(),e===null&&zk(t.stateNode.containerInfo),yt(t),null;case 10:return Hs(t.type),yt(t),null;case 19:if(hn(It),r=t.memoizedState,r===null)return yt(t),null;if(i=(t.flags&128)!==0,s=r.rendering,s===null)if(i)Xf(r,!1);else{if(Rt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=Kg(e),s!==null){for(t.flags|=128,Xf(r,!1),e=s.updateQueue,t.updateQueue=e,pp(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Oj(n,e),n=n.sibling;return mt(It,It.current&1|2),Pe&&Ts(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Er()>Wg&&(t.flags|=128,i=!0,Xf(r,!1),t.lanes=4194304)}else{if(!i)if(e=Kg(s),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,pp(t,e),Xf(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!Pe)return yt(t),null}else 2*Er()-r.renderingStartTime>Wg&&n!==536870912&&(t.flags|=128,i=!0,Xf(r,!1),t.lanes=4194304);r.isBackwards?(s.sibling=t.child,t.child=s):(e=r.last,e!==null?e.sibling=s:t.child=s,r.last=s)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Er(),e.sibling=null,n=It.current,mt(It,i?n&1|2:n&1),Pe&&Ts(t,r.treeForkCount),e):(yt(t),null);case 22:case 23:return vr(t),dk(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(yt(t),t.subtreeFlags&6&&(t.flags|=8192)):yt(t),n=t.updateQueue,n!==null&&pp(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&&hn(al),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Hs(Vt),yt(t),null;case 25:return null;case 30:return null}throw Error(P(156,t.tag))}function cV(e,t){switch(ok(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Hs(Vt),bu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $g(t),null;case 31:if(t.memoizedState!==null){if(vr(t),t.alternate===null)throw Error(P(340));gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(vr(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));gl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return hn(It),null;case 4:return bu(),null;case 10:return Hs(t.type),null;case 22:case 23:return vr(t),dk(),e!==null&&hn(al),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Hs(Vt),null;case 25:return null;default:return null}}function OI(e,t){switch(ok(t),t.tag){case 3:Hs(Vt),bu();break;case 26:case 27:case 5:$g(t);break;case 4:bu();break;case 31:t.memoizedState!==null&&vr(t);break;case 13:vr(t);break;case 19:hn(It);break;case 10:Hs(t.type);break;case 22:case 23:vr(t),dk(),e!==null&&hn(al);break;case 24:Hs(Vt)}}function dm(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var s=n.create,a=n.inst;r=s(),a.destroy=r}n=n.next}while(n!==i)}}catch(o){et(t,t.return,o)}}function ao(e,t,n){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var s=i.next;r=s;do{if((r.tag&e)===e){var a=r.inst,o=a.destroy;if(o!==void 0){a.destroy=void 0,i=t;var l=n,c=o;try{c()}catch(f){et(i,l,f)}}}r=r.next}while(r!==s)}}catch(f){et(t,t.return,f)}}function RI(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Fj(t,n)}catch(r){et(e,e.return,r)}}}function NI(e,t,n){n.props=Sl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){et(e,t,r)}}function Pd(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(i){et(e,t,i)}}function qi(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){et(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){et(e,t,i)}else n.current=null}function MI(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(i){et(e,e.return,i)}}function r0(e,t,n){try{var r=e.stateNode;NV(r,e.type,n,t),r[cr]=t}catch(i){et(e,e.return,i)}}function DI(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_o(e.type)||e.tag===4}function i0(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||DI(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&&_o(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 m1(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=Ds));else if(r!==4&&(r===27&&_o(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(m1(e,t,n),e=e.sibling;e!==null;)m1(e,t,n),e=e.sibling}function Xg(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&&_o(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Xg(e,t,n),e=e.sibling;e!==null;)Xg(e,t,n),e=e.sibling}function zI(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);An(t,r,n),t[_n]=e,t[cr]=n}catch(s){et(e,e.return,s)}}var Os=!1,Ht=!1,s0=!1,uO=typeof WeakSet=="function"?WeakSet:Set,un=null;function uV(e,t){if(e=e.containerInfo,x1=ly,e=xj(e),nk(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 i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var a=0,o=-1,l=-1,c=0,f=0,u=e,d=null;t:for(;;){for(var h;u!==n||i!==0&&u.nodeType!==3||(o=a+i),u!==s||r!==0&&u.nodeType!==3||(l=a+r),u.nodeType===3&&(a+=u.nodeValue.length),(h=u.firstChild)!==null;)d=u,u=h;for(;;){if(u===e)break t;if(d===n&&++c===i&&(o=a),d===s&&++f===r&&(l=a),(h=u.nextSibling)!==null)break;u=d,d=u.parentNode}u=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(w1={focusedElem:e,selectionRange:n},ly=!1,un=t;un!==null;)if(t=un,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,un=e;else for(;un!==null;){switch(t=un,s=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++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&s!==null){e=void 0,n=t,i=s.memoizedProps,s=s.memoizedState,r=n.stateNode;try{var g=Sl(n.type,i);e=r.getSnapshotBeforeUpdate(g,s),r.__reactInternalSnapshotBeforeUpdate=e}catch(v){et(n,n.return,v)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)k1(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":k1(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(P(163))}if(e=t.sibling,e!==null){e.return=t.return,un=e;break}un=t.return}}function jI(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:bs(e,n),r&4&&dm(5,n);break;case 1:if(bs(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){et(n,n.return,a)}else{var i=Sl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){et(n,n.return,a)}}r&64&&RI(n),r&512&&Pd(n,n.return);break;case 3:if(bs(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{Fj(e,t)}catch(a){et(n,n.return,a)}}break;case 27:t===null&&r&4&&zI(n);case 26:case 5:bs(e,n),t===null&&r&4&&MI(n),r&512&&Pd(n,n.return);break;case 12:bs(e,n);break;case 31:bs(e,n),r&4&&LI(e,n);break;case 13:bs(e,n),r&4&&FI(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=vV.bind(null,n),FV(e,n))));break;case 22:if(r=n.memoizedState!==null||Os,!r){t=t!==null&&t.memoizedState!==null||Ht,i=Os;var s=Ht;Os=r,(Ht=t)&&!s?_s(e,n,(n.subtreeFlags&8772)!==0):bs(e,n),Os=i,Ht=s}break;case 30:break;default:bs(e,n)}}function II(e){var t=e.alternate;t!==null&&(e.alternate=null,II(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Q_(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 _t=null,ir=!1;function ys(e,t,n){for(n=n.child;n!==null;)$I(e,t,n),n=n.sibling}function $I(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(sm,n)}catch{}switch(n.tag){case 26:Ht||qi(n,t),ys(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ht||qi(n,t);var r=_t,i=ir;_o(n.type)&&(_t=n.stateNode,ir=!1),ys(e,t,n),qd(n.stateNode),_t=r,ir=i;break;case 5:Ht||qi(n,t);case 6:if(r=_t,i=ir,_t=null,ys(e,t,n),_t=r,ir=i,_t!==null)if(ir)try{(_t.nodeType===9?_t.body:_t.nodeName==="HTML"?_t.ownerDocument.body:_t).removeChild(n.stateNode)}catch(s){et(n,t,s)}else try{_t.removeChild(n.stateNode)}catch(s){et(n,t,s)}break;case 18:_t!==null&&(ir?(e=_t,_O(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Au(e)):_O(_t,n.stateNode));break;case 4:r=_t,i=ir,_t=n.stateNode.containerInfo,ir=!0,ys(e,t,n),_t=r,ir=i;break;case 0:case 11:case 14:case 15:ao(2,n,t),Ht||ao(4,n,t),ys(e,t,n);break;case 1:Ht||(qi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&NI(n,t,r)),ys(e,t,n);break;case 21:ys(e,t,n);break;case 22:Ht=(r=Ht)||n.memoizedState!==null,ys(e,t,n),Ht=r;break;default:ys(e,t,n)}}function LI(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Au(e)}catch(n){et(t,t.return,n)}}}function FI(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Au(e)}catch(n){et(t,t.return,n)}}function fV(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new uO),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new uO),t;default:throw Error(P(435,e.tag))}}function gp(e,t){var n=fV(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var i=SV.bind(null,e,r);r.then(i,i)}})}function tr(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],s=e,a=t,o=a;e:for(;o!==null;){switch(o.tag){case 27:if(_o(o.type)){_t=o.stateNode,ir=!1;break e}break;case 5:_t=o.stateNode,ir=!1;break e;case 3:case 4:_t=o.stateNode.containerInfo,ir=!0;break e}o=o.return}if(_t===null)throw Error(P(160));$I(s,a,i),_t=null,ir=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)PI(t,e),t=t.sibling}var hi=null;function PI(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tr(t,e),nr(e),r&4&&(ao(3,e,e.return),dm(3,e),ao(5,e,e.return));break;case 1:tr(t,e),nr(e),r&512&&(Ht||n===null||qi(n,n.return)),r&64&&Os&&(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 i=hi;if(tr(t,e),nr(e),r&512&&(Ht||n===null||qi(n,n.return)),r&4){var s=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,i=i.ownerDocument||i;t:switch(r){case"title":s=i.getElementsByTagName("title")[0],(!s||s[lm]||s[_n]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=i.createElement(r),i.head.insertBefore(s,i.querySelector("head > title"))),An(s,r,n),s[_n]=e,fn(s),r=s;break e;case"link":var a=RO("link","href",i).get(r+(n.href||""));if(a){for(var o=0;o<a.length;o++)if(s=a[o],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(o,1);break t}}s=i.createElement(r),An(s,r,n),i.head.appendChild(s);break;case"meta":if(a=RO("meta","content",i).get(r+(n.content||""))){for(o=0;o<a.length;o++)if(s=a[o],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(o,1);break t}}s=i.createElement(r),An(s,r,n),i.head.appendChild(s);break;default:throw Error(P(468,r))}s[_n]=e,fn(s),r=s}e.stateNode=r}else NO(i,e.type,e.stateNode);else e.stateNode=OO(i,r,e.memoizedProps);else s!==r?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,r===null?NO(i,e.type,e.stateNode):OO(i,r,e.memoizedProps)):r===null&&e.stateNode!==null&&r0(e,e.memoizedProps,n.memoizedProps)}break;case 27:tr(t,e),nr(e),r&512&&(Ht||n===null||qi(n,n.return)),n!==null&&r&4&&r0(e,e.memoizedProps,n.memoizedProps);break;case 5:if(tr(t,e),nr(e),r&512&&(Ht||n===null||qi(n,n.return)),e.flags&32){i=e.stateNode;try{Su(i,"")}catch(g){et(e,e.return,g)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,r0(e,i,n!==null?n.memoizedProps:i)),r&1024&&(s0=!0);break;case 6:if(tr(t,e),nr(e),r&4){if(e.stateNode===null)throw Error(P(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(g){et(e,e.return,g)}}break;case 3:if(ig=null,i=hi,hi=sy(t.containerInfo),tr(t,e),hi=i,nr(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Au(t.containerInfo)}catch(g){et(e,e.return,g)}s0&&(s0=!1,UI(e));break;case 4:r=hi,hi=sy(e.stateNode.containerInfo),tr(t,e),nr(e),hi=r;break;case 12:tr(t,e),nr(e);break;case 31:tr(t,e),nr(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gp(e,r)));break;case 13:tr(t,e),nr(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(qb=Er()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gp(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,c=Os,f=Ht;if(Os=c||i,Ht=f||l,tr(t,e),Ht=f,Os=c,nr(e),r&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||Os||Ht||Go(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(s=l.stateNode,i)a=s.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{o=l.stateNode;var u=l.memoizedProps.style,d=u!=null&&u.hasOwnProperty("display")?u.display:null;o.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(g){et(l,l.return,g)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(g){et(l,l.return,g)}}}else if(t.tag===18){if(n===null){l=t;try{var h=l.stateNode;i?kO(h,!0):kO(l.stateNode,!1)}catch(g){et(l,l.return,g)}}}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,gp(e,n))));break;case 19:tr(t,e),nr(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,gp(e,r)));break;case 30:break;case 21:break;default:tr(t,e),nr(e)}}function nr(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(DI(r)){n=r;break}r=r.return}if(n==null)throw Error(P(160));switch(n.tag){case 27:var i=n.stateNode,s=i0(e);Xg(e,s,i);break;case 5:var a=n.stateNode;n.flags&32&&(Su(a,""),n.flags&=-33);var o=i0(e);Xg(e,o,a);break;case 3:case 4:var l=n.stateNode.containerInfo,c=i0(e);m1(e,c,l);break;default:throw Error(P(161))}}catch(f){et(e,e.return,f)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function UI(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;UI(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function bs(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jI(e,t.alternate,t),t=t.sibling}function Go(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ao(4,t,t.return),Go(t);break;case 1:qi(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&NI(t,t.return,n),Go(t);break;case 27:qd(t.stateNode);case 26:case 5:qi(t,t.return),Go(t);break;case 22:t.memoizedState===null&&Go(t);break;case 30:Go(t);break;default:Go(t)}e=e.sibling}}function _s(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,i=e,s=t,a=s.flags;switch(s.tag){case 0:case 11:case 15:_s(i,s,n),dm(4,s);break;case 1:if(_s(i,s,n),r=s,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(c){et(r,r.return,c)}if(r=s,i=r.updateQueue,i!==null){var o=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)Lj(l[i],o)}catch(c){et(r,r.return,c)}}n&&a&64&&RI(s),Pd(s,s.return);break;case 27:zI(s);case 26:case 5:_s(i,s,n),n&&r===null&&a&4&&MI(s),Pd(s,s.return);break;case 12:_s(i,s,n);break;case 31:_s(i,s,n),n&&a&4&&LI(i,s);break;case 13:_s(i,s,n),n&&a&4&&FI(i,s);break;case 22:s.memoizedState===null&&_s(i,s,n),Pd(s,s.return);break;case 30:break;default:_s(i,s,n)}t=t.sibling}}function Ak(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&&um(n))}function Ok(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&um(e))}function ci(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)BI(e,t,n,r),t=t.sibling}function BI(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:ci(e,t,n,r),i&2048&&dm(9,t);break;case 1:ci(e,t,n,r);break;case 3:ci(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&um(e)));break;case 12:if(i&2048){ci(e,t,n,r),e=t.stateNode;try{var s=t.memoizedProps,a=s.id,o=s.onPostCommit;typeof o=="function"&&o(a,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(l){et(t,t.return,l)}}else ci(e,t,n,r);break;case 31:ci(e,t,n,r);break;case 13:ci(e,t,n,r);break;case 23:break;case 22:s=t.stateNode,a=t.alternate,t.memoizedState!==null?s._visibility&2?ci(e,t,n,r):Ud(e,t):s._visibility&2?ci(e,t,n,r):(s._visibility|=2,vc(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Ak(a,t);break;case 24:ci(e,t,n,r),i&2048&&Ok(t.alternate,t);break;default:ci(e,t,n,r)}}function vc(e,t,n,r,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,a=t,o=n,l=r,c=a.flags;switch(a.tag){case 0:case 11:case 15:vc(s,a,o,l,i),dm(8,a);break;case 23:break;case 22:var f=a.stateNode;a.memoizedState!==null?f._visibility&2?vc(s,a,o,l,i):Ud(s,a):(f._visibility|=2,vc(s,a,o,l,i)),i&&c&2048&&Ak(a.alternate,a);break;case 24:vc(s,a,o,l,i),i&&c&2048&&Ok(a.alternate,a);break;default:vc(s,a,o,l,i)}t=t.sibling}}function Ud(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Ud(n,r),i&2048&&Ak(r.alternate,r);break;case 24:Ud(n,r),i&2048&&Ok(r.alternate,r);break;default:Ud(n,r)}t=t.sibling}}var vd=8192;function ac(e,t,n){if(e.subtreeFlags&vd)for(e=e.child;e!==null;)HI(e,t,n),e=e.sibling}function HI(e,t,n){switch(e.tag){case 26:ac(e,t,n),e.flags&vd&&e.memoizedState!==null&&XV(n,hi,e.memoizedState,e.memoizedProps);break;case 5:ac(e,t,n);break;case 3:case 4:var r=hi;hi=sy(e.stateNode.containerInfo),ac(e,t,n),hi=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=vd,vd=16777216,ac(e,t,n),vd=r):ac(e,t,n));break;default:ac(e,t,n)}}function qI(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 Wf(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];un=r,KI(r,e)}qI(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)VI(e),e=e.sibling}function VI(e){switch(e.tag){case 0:case 11:case 15:Wf(e),e.flags&2048&&ao(9,e,e.return);break;case 3:Wf(e);break;case 12:Wf(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ng(e)):Wf(e);break;default:Wf(e)}}function ng(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];un=r,KI(r,e)}qI(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ao(8,t,t.return),ng(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ng(t));break;default:ng(t)}e=e.sibling}}function KI(e,t){for(;un!==null;){var n=un;switch(n.tag){case 0:case 11:case 15:ao(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:um(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,un=r;else e:for(n=e;un!==null;){r=un;var i=r.sibling,s=r.return;if(II(r),r===n){un=null;break e}if(i!==null){i.return=s,un=i;break e}un=s}}}var dV={getCacheForType:function(e){var t=Cn(Vt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Cn(Vt).controller.signal}},hV=typeof WeakMap=="function"?WeakMap:Map,Ge=0,ct=null,De=null,je=0,We=0,yr=null,Ma=!1,lf=!1,Rk=!1,Xs=0,Rt=0,oo=0,ll=0,Nk=0,kr=0,ku=0,Bd=null,sr=null,p1=!1,qb=0,GI=0,Wg=1/0,Zg=null,Ba=null,en=0,Ha=null,Eu=null,qs=0,g1=0,y1=null,YI=null,Hd=0,b1=null;function Ar(){return Ge&2&&je!==0?je&-je:ye.T!==null?Dk():rj()}function JI(){if(kr===0)if(!(je&536870912)||Pe){var e=lp;lp<<=1,!(lp&3932160)&&(lp=262144),kr=e}else kr=536870912;return e=jr.current,e!==null&&(e.flags|=32),kr}function lr(e,t,n){(e===ct&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Cu(e,0),Da(e,je,kr,!1)),om(e,n),(!(Ge&2)||e!==ct)&&(e===ct&&(!(Ge&2)&&(ll|=n),Rt===4&&Da(e,je,kr,!1)),as(e))}function QI(e,t,n){if(Ge&6)throw Error(P(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||am(e,t),i=r?gV(e,t):a0(e,t,!0),s=r;do{if(i===0){lf&&!r&&Da(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!mV(n)){i=a0(e,t,!1),s=!1;continue}if(i===2){if(s=t,e.errorRecoveryDisabledLanes&s)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var o=e;i=Bd;var l=o.current.memoizedState.isDehydrated;if(l&&(Cu(o,a).flags|=256),a=a0(o,a,!1),a!==2){if(Rk&&!l){o.errorRecoveryDisabledLanes|=s,ll|=s,i=4;break e}s=sr,sr=i,s!==null&&(sr===null?sr=s:sr.push.apply(sr,s))}i=a}if(s=!1,i!==2)continue}}if(i===1){Cu(e,0),Da(e,t,0,!0);break}e:{switch(r=e,s=i,s){case 0:case 1:throw Error(P(345));case 4:if((t&4194048)!==t)break;case 6:Da(r,t,kr,!Ma);break e;case 2:sr=null;break;case 3:case 5:break;default:throw Error(P(329))}if((t&62914560)===t&&(i=qb+300-Er(),10<i)){if(Da(r,t,kr,!Ma),Db(r,0,!0)!==0)break e;qs=t,r.timeoutHandle=g$(fO.bind(null,r,n,sr,Zg,p1,t,kr,ll,ku,Ma,s,"Throttled",-0,0),i);break e}fO(r,n,sr,Zg,p1,t,kr,ll,ku,Ma,s,null,-0,0)}}break}while(!0);as(e)}function fO(e,t,n,r,i,s,a,o,l,c,f,u,d,h){if(e.timeoutHandle=-1,u=t.subtreeFlags,u&8192||(u&16785408)===16785408){u={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ds},HI(t,s,u);var g=(s&62914560)===s?qb-Er():(s&4194048)===s?GI-Er():0;if(g=WV(u,g),g!==null){qs=s,e.cancelPendingCommit=g(hO.bind(null,e,t,s,n,r,i,a,o,l,f,u,null,d,h)),Da(e,s,a,!c);return}}hO(e,t,s,n,r,i,a,o,l)}function mV(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 i=n[r],s=i.getSnapshot;i=i.value;try{if(!zr(s(),i))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 Da(e,t,n,r){t&=~Nk,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var s=31-Tr(i),a=1<<s;r[s]=-1,i&=~a}n!==0&&ej(e,n,t)}function Vb(){return Ge&6?!0:(hm(0),!1)}function Mk(){if(De!==null){if(We===0)var e=De.return;else e=De,zs=Kl=null,yk(e),Zc=null,vh=0,e=De;for(;e!==null;)OI(e.alternate,e),e=e.return;De=null}}function Cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,zV(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),qs=0,Mk(),ct=e,De=n=Bs(e.current,null),je=t,We=0,yr=null,Ma=!1,lf=am(e,t),Rk=!1,ku=kr=Nk=ll=oo=Rt=0,sr=Bd=null,p1=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Tr(r),s=1<<i;t|=e[i],r&=~s}return Xs=t,$b(),n}function XI(e,t){Ee=null,ye.H=xh,t===of||t===Fb?(t=HA(),We=3):t===uk?(t=HA(),We=4):We=t===Ck?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yr=t,De===null&&(Rt=1,Jg(e,Yr(t,e.current)))}function WI(){var e=jr.current;return e===null?!0:(je&4194048)===je?Wr===null:(je&62914560)===je||je&536870912?e===Wr:!1}function ZI(){var e=ye.H;return ye.H=xh,e===null?xh:e}function e$(){var e=ye.A;return ye.A=dV,e}function ey(){Rt=4,Ma||(je&4194048)!==je&&jr.current!==null||(lf=!0),!(oo&134217727)&&!(ll&134217727)||ct===null||Da(ct,je,kr,!1)}function a0(e,t,n){var r=Ge;Ge|=2;var i=ZI(),s=e$();(ct!==e||je!==t)&&(Zg=null,Cu(e,t)),t=!1;var a=Rt;e:do try{if(We!==0&&De!==null){var o=De,l=yr;switch(We){case 8:Mk(),a=6;break e;case 3:case 2:case 9:case 6:jr.current===null&&(t=!0);var c=We;if(We=0,yr=null,Uc(e,o,l,c),n&&lf){a=0;break e}break;default:c=We,We=0,yr=null,Uc(e,o,l,c)}}pV(),a=Rt;break}catch(f){XI(e,f)}while(!0);return t&&e.shellSuspendCounter++,zs=Kl=null,Ge=r,ye.H=i,ye.A=s,De===null&&(ct=null,je=0,$b()),a}function pV(){for(;De!==null;)t$(De)}function gV(e,t){var n=Ge;Ge|=2;var r=ZI(),i=e$();ct!==e||je!==t?(Zg=null,Wg=Er()+500,Cu(e,t)):lf=am(e,t);e:do try{if(We!==0&&De!==null){t=De;var s=yr;t:switch(We){case 1:We=0,yr=null,Uc(e,t,s,1);break;case 2:case 9:if(BA(s)){We=0,yr=null,dO(t);break}t=function(){We!==2&&We!==9||ct!==e||(We=7),as(e)},s.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:BA(s)?(We=0,yr=null,dO(t)):(We=0,yr=null,Uc(e,t,s,7));break;case 5:var a=null;switch(De.tag){case 26:a=De.memoizedState;case 5:case 27:var o=De;if(a?x$(a):o.stateNode.complete){We=0,yr=null;var l=o.sibling;if(l!==null)De=l;else{var c=o.return;c!==null?(De=c,Kb(c)):De=null}break t}}We=0,yr=null,Uc(e,t,s,5);break;case 6:We=0,yr=null,Uc(e,t,s,6);break;case 8:Mk(),Rt=6;break e;default:throw Error(P(462))}}yV();break}catch(f){XI(e,f)}while(!0);return zs=Kl=null,ye.H=r,ye.A=i,Ge=n,De!==null?0:(ct=null,je=0,$b(),Rt)}function yV(){for(;De!==null&&!PH();)t$(De)}function t$(e){var t=AI(e.alternate,e,Xs);e.memoizedProps=e.pendingProps,t===null?Kb(e):De=t}function dO(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=sO(n,t,t.pendingProps,t.type,void 0,je);break;case 11:t=sO(n,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:yk(t);default:OI(n,t),t=De=Oj(t,Xs),t=AI(n,t,Xs)}e.memoizedProps=e.pendingProps,t===null?Kb(e):De=t}function Uc(e,t,n,r){zs=Kl=null,yk(t),Zc=null,vh=0;var i=t.return;try{if(sV(e,i,t,n,je)){Rt=1,Jg(e,Yr(n,e.current)),De=null;return}}catch(s){if(i!==null)throw De=i,s;Rt=1,Jg(e,Yr(n,e.current)),De=null;return}t.flags&32768?(Pe||r===1?e=!0:lf||je&536870912?e=!1:(Ma=e=!0,(r===2||r===9||r===3||r===6)&&(r=jr.current,r!==null&&r.tag===13&&(r.flags|=16384))),n$(t,e)):Kb(t)}function Kb(e){var t=e;do{if(t.flags&32768){n$(t,Ma);return}e=t.return;var n=lV(t.alternate,t,Xs);if(n!==null){De=n;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);Rt===0&&(Rt=5)}function n$(e,t){do{var n=cV(e.alternate,e);if(n!==null){n.flags&=32767,De=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=n}while(e!==null);Rt=6,De=null}function hO(e,t,n,r,i,s,a,o,l){e.cancelPendingCommit=null;do Gb();while(en!==0);if(Ge&6)throw Error(P(327));if(t!==null){if(t===e.current)throw Error(P(177));if(s=t.lanes|t.childLanes,s|=rk,QH(e,n,s,a,o,l),e===ct&&(De=ct=null,je=0),Eu=t,Ha=e,qs=n,g1=s,y1=i,YI=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,xV(Lg,function(){return o$(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=ye.T,ye.T=null,i=Ye.p,Ye.p=2,a=Ge,Ge|=4;try{uV(e,t,n)}finally{Ge=a,Ye.p=i,ye.T=r}}en=1,r$(),i$(),s$()}}function r$(){if(en===1){en=0;var e=Ha,t=Eu,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=ye.T,ye.T=null;var r=Ye.p;Ye.p=2;var i=Ge;Ge|=4;try{PI(t,e);var s=w1,a=xj(e.containerInfo),o=s.focusedElem,l=s.selectionRange;if(a!==o&&o&&o.ownerDocument&&Sj(o.ownerDocument.documentElement,o)){if(l!==null&&nk(o)){var c=l.start,f=l.end;if(f===void 0&&(f=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(f,o.value.length);else{var u=o.ownerDocument||document,d=u&&u.defaultView||window;if(d.getSelection){var h=d.getSelection(),g=o.textContent.length,v=Math.min(l.start,g),x=l.end===void 0?v:Math.min(l.end,g);!h.extend&&v>x&&(a=x,x=v,v=a);var m=jA(o,v),b=jA(o,x);if(m&&b&&(h.rangeCount!==1||h.anchorNode!==m.node||h.anchorOffset!==m.offset||h.focusNode!==b.node||h.focusOffset!==b.offset)){var S=u.createRange();S.setStart(m.node,m.offset),h.removeAllRanges(),v>x?(h.addRange(S),h.extend(b.node,b.offset)):(S.setEnd(b.node,b.offset),h.addRange(S))}}}}for(u=[],h=o;h=h.parentNode;)h.nodeType===1&&u.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<u.length;o++){var _=u[o];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}ly=!!x1,w1=x1=null}finally{Ge=i,Ye.p=r,ye.T=n}}e.current=t,en=2}}function i$(){if(en===2){en=0;var e=Ha,t=Eu,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ye.T,ye.T=null;var r=Ye.p;Ye.p=2;var i=Ge;Ge|=4;try{jI(e,t.alternate,t)}finally{Ge=i,Ye.p=r,ye.T=n}}en=3}}function s$(){if(en===4||en===3){en=0,UH();var e=Ha,t=Eu,n=qs,r=YI;t.subtreeFlags&10256||t.flags&10256?en=5:(en=0,Eu=Ha=null,a$(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ba=null),J_(n),t=t.stateNode,Cr&&typeof Cr.onCommitFiberRoot=="function")try{Cr.onCommitFiberRoot(sm,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=ye.T,i=Ye.p,Ye.p=2,ye.T=null;try{for(var s=e.onRecoverableError,a=0;a<r.length;a++){var o=r[a];s(o.value,{componentStack:o.stack})}}finally{ye.T=t,Ye.p=i}}qs&3&&Gb(),as(e),i=e.pendingLanes,n&261930&&i&42?e===b1?Hd++:(Hd=0,b1=e):Hd=0,hm(0)}}function a$(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,um(t)))}function Gb(){return r$(),i$(),s$(),o$()}function o$(){if(en!==5)return!1;var e=Ha,t=g1;g1=0;var n=J_(qs),r=ye.T,i=Ye.p;try{Ye.p=32>n?32:n,ye.T=null,n=y1,y1=null;var s=Ha,a=qs;if(en=0,Eu=Ha=null,qs=0,Ge&6)throw Error(P(331));var o=Ge;if(Ge|=4,VI(s.current),BI(s,s.current,a,n),Ge=o,hm(0,!1),Cr&&typeof Cr.onPostCommitFiberRoot=="function")try{Cr.onPostCommitFiberRoot(sm,s)}catch{}return!0}finally{Ye.p=i,ye.T=r,a$(e,t)}}function mO(e,t,n){t=Yr(n,t),t=f1(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(om(e,2),as(e))}function et(e,t,n){if(e.tag===3)mO(e,e,n);else for(;t!==null;){if(t.tag===3){mO(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ba===null||!Ba.has(r))){e=Yr(n,e),n=wI(2),r=Ua(t,n,2),r!==null&&(_I(n,r,t,e),om(r,2),as(r));break}}t=t.return}}function o0(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new hV;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Rk=!0,i.add(n),e=bV.bind(null,e,t,n),t.then(e,e))}function bV(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ct===e&&(je&n)===n&&(Rt===4||Rt===3&&(je&62914560)===je&&300>Er()-qb?!(Ge&2)&&Cu(e,0):Nk|=n,ku===je&&(ku=0)),as(e)}function l$(e,t){t===0&&(t=Zz()),e=Vl(e,t),e!==null&&(om(e,t),as(e))}function vV(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),l$(e,n)}function SV(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(P(314))}r!==null&&r.delete(t),l$(e,n)}function xV(e,t){return G_(e,t)}var ty=null,Sc=null,v1=!1,ny=!1,l0=!1,za=0;function as(e){e!==Sc&&e.next===null&&(Sc===null?ty=Sc=e:Sc=Sc.next=e),ny=!0,v1||(v1=!0,_V())}function hm(e,t){if(!l0&&ny){l0=!0;do for(var n=!1,r=ty;r!==null;){if(e!==0){var i=r.pendingLanes;if(i===0)var s=0;else{var a=r.suspendedLanes,o=r.pingedLanes;s=(1<<31-Tr(42|e)+1)-1,s&=i&~(a&~o),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,pO(r,s))}else s=je,s=Db(r,r===ct?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(s&3)||am(r,s)||(n=!0,pO(r,s));r=r.next}while(n);l0=!1}}function wV(){c$()}function c$(){ny=v1=!1;var e=0;za!==0&&DV()&&(e=za);for(var t=Er(),n=null,r=ty;r!==null;){var i=r.next,s=u$(r,t);s===0?(r.next=null,n===null?ty=i:n.next=i,i===null&&(Sc=n)):(n=r,(e!==0||s&3)&&(ny=!0)),r=i}en!==0&&en!==5||hm(e),za!==0&&(za=0)}function u$(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var a=31-Tr(s),o=1<<a,l=i[a];l===-1?(!(o&n)||o&r)&&(i[a]=JH(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}if(t=ct,n=je,n=Db(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&IS(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||am(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&IS(r),J_(n)){case 2:case 8:n=Xz;break;case 32:n=Lg;break;case 268435456:n=Wz;break;default:n=Lg}return r=f$.bind(null,e),n=G_(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&IS(r),e.callbackPriority=2,e.callbackNode=null,2}function f$(e,t){if(en!==0&&en!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Gb()&&e.callbackNode!==n)return null;var r=je;return r=Db(e,e===ct?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(QI(e,r,t),u$(e,Er()),e.callbackNode!=null&&e.callbackNode===n?f$.bind(null,e):null)}function pO(e,t){if(Gb())return null;QI(e,t,!0)}function _V(){jV(function(){Ge&6?G_(Qz,wV):c$()})}function Dk(){if(za===0){var e=xu;e===0&&(e=op,op<<=1,!(op&261888)&&(op=256)),za=e}return za}function gO(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gp(""+e)}function yO(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 kV(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var s=gO((i[cr]||null).action),a=r.submitter;a&&(t=(t=a[cr]||null)?gO(t.formAction):a.getAttribute("formAction"),t!==null&&(s=t,a=null));var o=new zb("action","action",null,r,i);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(za!==0){var l=a?yO(i,a):new FormData(i);c1(n,{pending:!0,data:l,method:i.method,action:s},null,l)}}else typeof s=="function"&&(o.preventDefault(),l=a?yO(i,a):new FormData(i),c1(n,{pending:!0,data:l,method:i.method,action:s},s,l))},currentTarget:i}]})}}for(var c0=0;c0<Xx.length;c0++){var u0=Xx[c0],EV=u0.toLowerCase(),CV=u0[0].toUpperCase()+u0.slice(1);zi(EV,"on"+CV)}zi(_j,"onAnimationEnd");zi(kj,"onAnimationIteration");zi(Ej,"onAnimationStart");zi("dblclick","onDoubleClick");zi("focusin","onFocus");zi("focusout","onBlur");zi(Bq,"onTransitionRun");zi(Hq,"onTransitionStart");zi(qq,"onTransitionCancel");zi(Cj,"onTransitionEnd");vu("onMouseEnter",["mouseout","mouseover"]);vu("onMouseLeave",["mouseout","mouseover"]);vu("onPointerEnter",["pointerout","pointerover"]);vu("onPointerLeave",["pointerout","pointerover"]);Bl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Bl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Bl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Bl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Bl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Bl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wh="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(" "),TV=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wh));function d$(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var s=void 0;if(t)for(var a=r.length-1;0<=a;a--){var o=r[a],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==s&&i.isPropagationStopped())break e;s=o,i.currentTarget=c;try{s(i)}catch(f){Pg(f)}i.currentTarget=null,s=l}else for(a=0;a<r.length;a++){if(o=r[a],l=o.instance,c=o.currentTarget,o=o.listener,l!==s&&i.isPropagationStopped())break e;s=o,i.currentTarget=c;try{s(i)}catch(f){Pg(f)}i.currentTarget=null,s=l}}}}function Me(e,t){var n=t[Hx];n===void 0&&(n=t[Hx]=new Set);var r=e+"__bubble";n.has(r)||(h$(t,e,2,!1),n.add(r))}function f0(e,t,n){var r=0;t&&(r|=4),h$(n,e,r,t)}var yp="_reactListening"+Math.random().toString(36).slice(2);function zk(e){if(!e[yp]){e[yp]=!0,ij.forEach(function(n){n!=="selectionchange"&&(TV.has(n)||f0(n,!1,e),f0(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[yp]||(t[yp]=!0,f0("selectionchange",!1,t))}}function h$(e,t,n,r){switch(C$(t)){case 2:var i=t7;break;case 8:i=n7;break;default:i=Lk}n=i.bind(null,t,n,e),i=void 0,!Yx||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function d0(e,t,n,r,i){var s=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var o=r.stateNode.containerInfo;if(o===i)break;if(a===4)for(a=r.return;a!==null;){var l=a.tag;if((l===3||l===4)&&a.stateNode.containerInfo===i)return;a=a.return}for(;o!==null;){if(a=Mc(o),a===null)return;if(l=a.tag,l===5||l===6||l===26||l===27){r=s=a;continue e}o=o.parentNode}}r=r.return}dj(function(){var c=s,f=W_(n),u=[];e:{var d=Tj.get(e);if(d!==void 0){var h=zb,g=e;switch(e){case"keypress":if(Jp(n)===0)break e;case"keydown":case"keyup":h=Sq;break;case"focusin":g="focus",h=US;break;case"focusout":g="blur",h=US;break;case"beforeblur":case"afterblur":h=US;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=EA;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=lq;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=_q;break;case _j:case kj:case Ej:h=fq;break;case Cj:h=Eq;break;case"scroll":case"scrollend":h=aq;break;case"wheel":h=Tq;break;case"copy":case"cut":case"paste":h=hq;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=TA;break;case"toggle":case"beforetoggle":h=Oq}var v=(t&4)!==0,x=!v&&(e==="scroll"||e==="scrollend"),m=v?d!==null?d+"Capture":null:d;v=[];for(var b=c,S;b!==null;){var _=b;if(S=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||S===null||m===null||(_=mh(b,m),_!=null&&v.push(_h(b,_,S))),x)break;b=b.return}0<v.length&&(d=new h(d,g,null,n,f),u.push({event:d,listeners:v}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==Gx&&(g=n.relatedTarget||n.fromElement)&&(Mc(g)||g[rf]))break e;if((h||d)&&(d=f.window===f?f:(d=f.ownerDocument)?d.defaultView||d.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=c,g=g?Mc(g):null,g!==null&&(x=im(g),v=g.tag,g!==x||v!==5&&v!==27&&v!==6)&&(g=null)):(h=null,g=c),h!==g)){if(v=EA,_="onMouseLeave",m="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(v=TA,_="onPointerLeave",m="onPointerEnter",b="pointer"),x=h==null?d:yd(h),S=g==null?d:yd(g),d=new v(_,b+"leave",h,n,f),d.target=x,d.relatedTarget=S,_=null,Mc(f)===c&&(v=new v(m,b+"enter",g,n,f),v.target=S,v.relatedTarget=x,_=v),x=_,h&&g)t:{for(v=AV,m=h,b=g,S=0,_=m;_;_=v(_))S++;_=0;for(var C=b;C;C=v(C))_++;for(;0<S-_;)m=v(m),S--;for(;0<_-S;)b=v(b),_--;for(;S--;){if(m===b||b!==null&&m===b.alternate){v=m;break t}m=v(m),b=v(b)}v=null}else v=null;h!==null&&bO(u,d,h,v,!1),g!==null&&x!==null&&bO(u,x,g,v,!0)}}e:{if(d=c?yd(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var E=NA;else if(RA(d))if(bj)E=Fq;else{E=$q;var A=Iq}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&X_(c.elementType)&&(E=NA):E=Lq;if(E&&(E=E(e,c))){yj(u,E,n,f);break e}A&&A(e,d,c),e==="focusout"&&c&&d.type==="number"&&c.memoizedProps.value!=null&&Kx(d,"number",d.value)}switch(A=c?yd(c):window,e){case"focusin":(RA(A)||A.contentEditable==="true")&&(jc=A,Jx=c,zd=null);break;case"focusout":zd=Jx=jc=null;break;case"mousedown":Qx=!0;break;case"contextmenu":case"mouseup":case"dragend":Qx=!1,IA(u,n,f);break;case"selectionchange":if(Uq)break;case"keydown":case"keyup":IA(u,n,f)}var M;if(tk)e:{switch(e){case"compositionstart":var D="onCompositionStart";break e;case"compositionend":D="onCompositionEnd";break e;case"compositionupdate":D="onCompositionUpdate";break e}D=void 0}else zc?pj(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(mj&&n.locale!=="ko"&&(zc||D!=="onCompositionStart"?D==="onCompositionEnd"&&zc&&(M=hj()):(Na=f,Z_="value"in Na?Na.value:Na.textContent,zc=!0)),A=ry(c,D),0<A.length&&(D=new CA(D,e,null,n,f),u.push({event:D,listeners:A}),M?D.data=M:(M=gj(n),M!==null&&(D.data=M)))),(M=Nq?Mq(e,n):Dq(e,n))&&(D=ry(c,"onBeforeInput"),0<D.length&&(A=new CA("onBeforeInput","beforeinput",null,n,f),u.push({event:A,listeners:D}),A.data=M)),kV(u,e,c,n,f)}d$(u,t)})}function _h(e,t,n){return{instance:e,listener:t,currentTarget:n}}function ry(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,s=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||s===null||(i=mh(e,n),i!=null&&r.unshift(_h(e,i,s)),i=mh(e,t),i!=null&&r.push(_h(e,i,s))),e.tag===3)return r;e=e.return}return[]}function AV(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bO(e,t,n,r,i){for(var s=t._reactName,a=[];n!==null&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(o=o.tag,l!==null&&l===r)break;o!==5&&o!==26&&o!==27||c===null||(l=c,i?(c=mh(n,s),c!=null&&a.unshift(_h(n,c,l))):i||(c=mh(n,s),c!=null&&a.push(_h(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var OV=/\r\n?/g,RV=/\u0000|\uFFFD/g;function vO(e){return(typeof e=="string"?e:""+e).replace(OV,`
|
|
49
|
+
`).replace(RV,"")}function m$(e,t){return t=vO(t),vO(e)===t}function it(e,t,n,r,i,s){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Su(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Su(e,""+r);break;case"className":up(e,"class",r);break;case"tabIndex":up(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":up(e,n,r);break;case"style":fj(e,r,s);break;case"data":if(t!=="object"){up(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=Gp(""+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 s=="function"&&(n==="formAction"?(t!=="input"&&it(e,t,"name",i.name,i,null),it(e,t,"formEncType",i.formEncType,i,null),it(e,t,"formMethod",i.formMethod,i,null),it(e,t,"formTarget",i.formTarget,i,null)):(it(e,t,"encType",i.encType,i,null),it(e,t,"method",i.method,i,null),it(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Gp(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=Ds);break;case"onScroll":r!=null&&Me("scroll",e);break;case"onScrollEnd":r!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(P(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(P(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=Gp(""+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":Me("beforetoggle",e),Me("toggle",e),Kp(e,"popover",r);break;case"xlinkActuate":ps(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":ps(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":ps(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":ps(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":ps(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":ps(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":ps(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":ps(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":ps(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Kp(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=iq.get(n)||n,Kp(e,n,r))}}function S1(e,t,n,r,i,s){switch(n){case"style":fj(e,r,s);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(P(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(P(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Su(e,r):(typeof r=="number"||typeof r=="bigint")&&Su(e,""+r);break;case"onScroll":r!=null&&Me("scroll",e);break;case"onScrollEnd":r!=null&&Me("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Ds);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!sj.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),s=e[cr]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,i),typeof r=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):Kp(e,n,r)}}}function An(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var r=!1,i=!1,s;for(s in n)if(n.hasOwnProperty(s)){var a=n[s];if(a!=null)switch(s){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:it(e,t,s,a,n,null)}}i&&it(e,t,"srcSet",n.srcSet,n,null),r&&it(e,t,"src",n.src,n,null);return;case"input":Me("invalid",e);var o=s=a=i=null,l=null,c=null;for(r in n)if(n.hasOwnProperty(r)){var f=n[r];if(f!=null)switch(r){case"name":i=f;break;case"type":a=f;break;case"checked":l=f;break;case"defaultChecked":c=f;break;case"value":s=f;break;case"defaultValue":o=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(P(137,t));break;default:it(e,t,r,f,n,null)}}lj(e,s,o,l,c,a,i,!1);return;case"select":Me("invalid",e),r=a=s=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":s=o;break;case"defaultValue":a=o;break;case"multiple":r=o;default:it(e,t,i,o,n,null)}t=s,n=a,e.multiple=!!r,t!=null?Qc(e,!!r,t,!1):n!=null&&Qc(e,!!r,n,!0);return;case"textarea":Me("invalid",e),s=i=r=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":r=o;break;case"defaultValue":i=o;break;case"children":s=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(P(91));break;default:it(e,t,a,o,n,null)}uj(e,r,i,s);return;case"option":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:it(e,t,l,r,n,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(r=0;r<wh.length;r++)Me(wh[r],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(P(137,t));default:it(e,t,c,r,n,null)}return;default:if(X_(t)){for(f in n)n.hasOwnProperty(f)&&(r=n[f],r!==void 0&&S1(e,t,f,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&it(e,t,o,r,n,null))}function NV(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 i=null,s=null,a=null,o=null,l=null,c=null,f=null;for(h in n){var u=n[h];if(n.hasOwnProperty(h)&&u!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=u;default:r.hasOwnProperty(h)||it(e,t,h,null,r,u)}}for(var d in r){var h=r[d];if(u=n[d],r.hasOwnProperty(d)&&(h!=null||u!=null))switch(d){case"type":s=h;break;case"name":i=h;break;case"checked":c=h;break;case"defaultChecked":f=h;break;case"value":a=h;break;case"defaultValue":o=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(P(137,t));break;default:h!==u&&it(e,t,d,h,r,u)}}Vx(e,a,o,l,c,f,s,i);return;case"select":h=a=o=d=null;for(s in n)if(l=n[s],n.hasOwnProperty(s)&&l!=null)switch(s){case"value":break;case"multiple":h=l;default:r.hasOwnProperty(s)||it(e,t,s,null,r,l)}for(i in r)if(s=r[i],l=n[i],r.hasOwnProperty(i)&&(s!=null||l!=null))switch(i){case"value":d=s;break;case"defaultValue":o=s;break;case"multiple":a=s;default:s!==l&&it(e,t,i,s,r,l)}t=o,n=a,r=h,d!=null?Qc(e,!!n,d,!1):!!r!=!!n&&(t!=null?Qc(e,!!n,t,!0):Qc(e,!!n,n?[]:"",!1));return;case"textarea":h=d=null;for(o in n)if(i=n[o],n.hasOwnProperty(o)&&i!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:it(e,t,o,null,r,i)}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":h=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(P(91));break;default:i!==s&&it(e,t,a,i,r,s)}cj(e,d,h);return;case"option":for(var g in n)if(d=n[g],n.hasOwnProperty(g)&&d!=null&&!r.hasOwnProperty(g))switch(g){case"selected":e.selected=!1;break;default:it(e,t,g,null,r,d)}for(l in r)if(d=r[l],h=n[l],r.hasOwnProperty(l)&&d!==h&&(d!=null||h!=null))switch(l){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:it(e,t,l,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 v in n)d=n[v],n.hasOwnProperty(v)&&d!=null&&!r.hasOwnProperty(v)&&it(e,t,v,null,r,d);for(c in r)if(d=r[c],h=n[c],r.hasOwnProperty(c)&&d!==h&&(d!=null||h!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(P(137,t));break;default:it(e,t,c,d,r,h)}return;default:if(X_(t)){for(var x in n)d=n[x],n.hasOwnProperty(x)&&d!==void 0&&!r.hasOwnProperty(x)&&S1(e,t,x,void 0,r,d);for(f in r)d=r[f],h=n[f],!r.hasOwnProperty(f)||d===h||d===void 0&&h===void 0||S1(e,t,f,d,r,h);return}}for(var m in n)d=n[m],n.hasOwnProperty(m)&&d!=null&&!r.hasOwnProperty(m)&&it(e,t,m,null,r,d);for(u in r)d=r[u],h=n[u],!r.hasOwnProperty(u)||d===h||d==null&&h==null||it(e,t,u,d,r,h)}function SO(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function MV(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],s=i.transferSize,a=i.initiatorType,o=i.duration;if(s&&o&&SO(a)){for(a=0,o=i.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>o)break;var f=l.transferSize,u=l.initiatorType;f&&SO(u)&&(l=l.responseEnd,a+=f*(l<o?1:(o-c)/(l-c)))}if(--r,t+=8*(s+a)/(i.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 x1=null,w1=null;function iy(e){return e.nodeType===9?e:e.ownerDocument}function xO(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 p$(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 _1(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 h0=null;function DV(){var e=window.event;return e&&e.type==="popstate"?e===h0?!1:(h0=e,!0):(h0=null,!1)}var g$=typeof setTimeout=="function"?setTimeout:void 0,zV=typeof clearTimeout=="function"?clearTimeout:void 0,wO=typeof Promise=="function"?Promise:void 0,jV=typeof queueMicrotask=="function"?queueMicrotask:typeof wO<"u"?function(e){return wO.resolve(null).then(e).catch(IV)}:g$;function IV(e){setTimeout(function(){throw e})}function _o(e){return e==="head"}function _O(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(i),Au(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")qd(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,qd(n);for(var s=n.firstChild;s;){var a=s.nextSibling,o=s.nodeName;s[lm]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=a}}else n==="body"&&qd(e.ownerDocument.body);n=i}while(n);Au(t)}function kO(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 k1(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":k1(n),Q_(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function $V(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[lm])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Zr(e.nextSibling),e===null)break}return null}function LV(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Zr(e.nextSibling),e===null))return null;return e}function y$(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Zr(e.nextSibling),e===null))return null;return e}function E1(e){return e.data==="$?"||e.data==="$~"}function C1(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function FV(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 Zr(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 T1=null;function EO(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Zr(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function CO(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 b$(e,t,n){switch(t=iy(n),e){case"html":if(e=t.documentElement,!e)throw Error(P(452));return e;case"head":if(e=t.head,!e)throw Error(P(453));return e;case"body":if(e=t.body,!e)throw Error(P(454));return e;default:throw Error(P(451))}}function qd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Q_(e)}var ni=new Map,TO=new Set;function sy(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ia=Ye.d;Ye.d={f:PV,r:UV,D:BV,C:HV,L:qV,m:VV,X:GV,S:KV,M:YV};function PV(){var e=ia.f(),t=Vb();return e||t}function UV(e){var t=sf(e);t!==null&&t.tag===5&&t.type==="form"?fI(t):ia.r(e)}var cf=typeof document>"u"?null:document;function v$(e,t,n){var r=cf;if(r&&typeof t=="string"&&t){var i=Gr(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),TO.has(i)||(TO.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),An(t,"link",e),fn(t),r.head.appendChild(t)))}}function BV(e){ia.D(e),v$("dns-prefetch",e,null)}function HV(e,t){ia.C(e,t),v$("preconnect",e,t)}function qV(e,t,n){ia.L(e,t,n);var r=cf;if(r&&e&&t){var i='link[rel="preload"][as="'+Gr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Gr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Gr(n.imageSizes)+'"]')):i+='[href="'+Gr(e)+'"]';var s=i;switch(t){case"style":s=Tu(e);break;case"script":s=uf(e)}ni.has(s)||(e=wt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),ni.set(s,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(mm(s))||t==="script"&&r.querySelector(pm(s))||(t=r.createElement("link"),An(t,"link",e),fn(t),r.head.appendChild(t)))}}function VV(e,t){ia.m(e,t);var n=cf;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Gr(r)+'"][href="'+Gr(e)+'"]',s=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=uf(e)}if(!ni.has(s)&&(e=wt({rel:"modulepreload",href:e},t),ni.set(s,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(pm(s)))return}r=n.createElement("link"),An(r,"link",e),fn(r),n.head.appendChild(r)}}}function KV(e,t,n){ia.S(e,t,n);var r=cf;if(r&&e){var i=Jc(r).hoistableStyles,s=Tu(e);t=t||"default";var a=i.get(s);if(!a){var o={loading:0,preload:null};if(a=r.querySelector(mm(s)))o.loading=5;else{e=wt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=ni.get(s))&&jk(e,n);var l=a=r.createElement("link");fn(l),An(l,"link",e),l._p=new Promise(function(c,f){l.onload=c,l.onerror=f}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,rg(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:o},i.set(s,a)}}}function GV(e,t){ia.X(e,t);var n=cf;if(n&&e){var r=Jc(n).hoistableScripts,i=uf(e),s=r.get(i);s||(s=n.querySelector(pm(i)),s||(e=wt({src:e,async:!0},t),(t=ni.get(i))&&Ik(e,t),s=n.createElement("script"),fn(s),An(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}function YV(e,t){ia.M(e,t);var n=cf;if(n&&e){var r=Jc(n).hoistableScripts,i=uf(e),s=r.get(i);s||(s=n.querySelector(pm(i)),s||(e=wt({src:e,async:!0,type:"module"},t),(t=ni.get(i))&&Ik(e,t),s=n.createElement("script"),fn(s),An(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}function AO(e,t,n,r){var i=(i=La.current)?sy(i):null;if(!i)throw Error(P(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Tu(n.href),n=Jc(i).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=Tu(n.href);var s=Jc(i).hoistableStyles,a=s.get(e);if(a||(i=i.ownerDocument||i,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,a),(s=i.querySelector(mm(e)))&&!s._p&&(a.instance=s,a.state.loading=5),ni.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},ni.set(e,n),s||JV(i,e,n,a.state))),t&&r===null)throw Error(P(528,""));return a}if(t&&r!==null)throw Error(P(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=uf(n),n=Jc(i).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(P(444,e))}}function Tu(e){return'href="'+Gr(e)+'"'}function mm(e){return'link[rel="stylesheet"]['+e+"]"}function S$(e){return wt({},e,{"data-precedence":e.precedence,precedence:null})}function JV(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}),An(t,"link",n),fn(t),e.head.appendChild(t))}function uf(e){return'[src="'+Gr(e)+'"]'}function pm(e){return"script[async]"+e}function OO(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Gr(n.href)+'"]');if(r)return t.instance=r,fn(r),r;var i=wt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),fn(r),An(r,"style",i),rg(r,n.precedence,e),t.instance=r;case"stylesheet":i=Tu(n.href);var s=e.querySelector(mm(i));if(s)return t.state.loading|=4,t.instance=s,fn(s),s;r=S$(n),(i=ni.get(i))&&jk(r,i),s=(e.ownerDocument||e).createElement("link"),fn(s);var a=s;return a._p=new Promise(function(o,l){a.onload=o,a.onerror=l}),An(s,"link",r),t.state.loading|=4,rg(s,n.precedence,e),t.instance=s;case"script":return s=uf(n.src),(i=e.querySelector(pm(s)))?(t.instance=i,fn(i),i):(r=n,(i=ni.get(s))&&(r=wt({},n),Ik(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),fn(i),An(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(P(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,rg(r,n.precedence,e));return t.instance}function rg(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,s=i,a=0;a<r.length;a++){var o=r[a];if(o.dataset.precedence===t)s=o;else if(s!==i)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jk(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ik(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ig=null;function RO(e,t,n){if(ig===null){var r=new Map,i=ig=new Map;i.set(n,r)}else i=ig,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var s=n[i];if(!(s[lm]||s[_n]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var a=s.getAttribute(t)||"";a=e+a;var o=r.get(a);o?o.push(s):r.set(a,[s])}}return r}function NO(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function QV(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 x$(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function XV(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 i=Tu(r.href),s=t.querySelector(mm(i));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ay.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,fn(s);return}s=t.ownerDocument||t,r=S$(r),(i=ni.get(i))&&jk(r,i),s=s.createElement("link"),fn(s);var a=s;a._p=new Promise(function(o,l){a.onload=o,a.onerror=l}),An(s,"link",r),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ay.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var m0=0;function WV(e,t){return e.stylesheets&&e.count===0&&sg(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&sg(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&m0===0&&(m0=62500*MV());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&sg(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>m0?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ay(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)sg(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oy=null;function sg(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oy=new Map,t.forEach(ZV,e),oy=null,ay.call(e))}function ZV(e,t){if(!(t.state.loading&4)){var n=oy.get(e);if(n)var r=n.get(null);else{n=new Map,oy.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<i.length;s++){var a=i[s];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}i=t.instance,a=i.getAttribute("data-precedence"),s=n.get(a)||r,s===r&&n.set(null,i),n.set(a,i),this.count++,r=ay.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),s?s.parentNode.insertBefore(i,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var kh={$$typeof:Ms,Provider:null,Consumer:null,_currentValue:il,_currentValue2:il,_threadCount:0};function e7(e,t,n,r,i,s,a,o,l){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=$S(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$S(0),this.hiddenUpdates=$S(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=s,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function w$(e,t,n,r,i,s,a,o,l,c,f,u){return e=new e7(e,t,n,a,l,c,f,u,o),t=1,s===!0&&(t|=24),s=wr(3,null,null,t),e.current=s,s.stateNode=e,t=lk(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:r,isDehydrated:n,cache:t},fk(s),e}function _$(e){return e?(e=Lc,e):Lc}function k$(e,t,n,r,i,s){i=_$(i),r.context===null?r.context=i:r.pendingContext=i,r=Pa(t),r.payload={element:n},s=s===void 0?null:s,s!==null&&(r.callback=s),n=Ua(e,r,t),n!==null&&(lr(n,e,t),Id(n,e,t))}function MO(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $k(e,t){MO(e,t),(e=e.alternate)&&MO(e,t)}function E$(e){if(e.tag===13||e.tag===31){var t=Vl(e,67108864);t!==null&&lr(t,e,67108864),$k(e,67108864)}}function DO(e){if(e.tag===13||e.tag===31){var t=Ar();t=Y_(t);var n=Vl(e,t);n!==null&&lr(n,e,t),$k(e,t)}}var ly=!0;function t7(e,t,n,r){var i=ye.T;ye.T=null;var s=Ye.p;try{Ye.p=2,Lk(e,t,n,r)}finally{Ye.p=s,ye.T=i}}function n7(e,t,n,r){var i=ye.T;ye.T=null;var s=Ye.p;try{Ye.p=8,Lk(e,t,n,r)}finally{Ye.p=s,ye.T=i}}function Lk(e,t,n,r){if(ly){var i=A1(r);if(i===null)d0(e,t,r,cy,n),zO(e,r);else if(i7(i,e,t,n,r))r.stopPropagation();else if(zO(e,r),t&4&&-1<r7.indexOf(e)){for(;i!==null;){var s=sf(i);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var a=Vo(s.pendingLanes);if(a!==0){var o=s;for(o.pendingLanes|=2,o.entangledLanes|=2;a;){var l=1<<31-Tr(a);o.entanglements[1]|=l,a&=~l}as(s),!(Ge&6)&&(Wg=Er()+500,hm(0))}}break;case 31:case 13:o=Vl(s,2),o!==null&&lr(o,s,2),Vb(),$k(s,2)}if(s=A1(r),s===null&&d0(e,t,r,cy,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else d0(e,t,r,null,n)}}function A1(e){return e=W_(e),Fk(e)}var cy=null;function Fk(e){if(cy=null,e=Mc(e),e!==null){var t=im(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Vz(t),e!==null)return e;e=null}else if(n===31){if(e=Kz(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 cy=e,null}function C$(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(BH()){case Qz:return 2;case Xz:return 8;case Lg:case HH:return 32;case Wz:return 268435456;default:return 32}default:return 32}}var O1=!1,qa=null,Va=null,Ka=null,Eh=new Map,Ch=new Map,Oa=[],r7="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 zO(e,t){switch(e){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":Va=null;break;case"mouseover":case"mouseout":Ka=null;break;case"pointerover":case"pointerout":Eh.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ch.delete(t.pointerId)}}function Zf(e,t,n,r,i,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},t!==null&&(t=sf(t),t!==null&&E$(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function i7(e,t,n,r,i){switch(t){case"focusin":return qa=Zf(qa,e,t,n,r,i),!0;case"dragenter":return Va=Zf(Va,e,t,n,r,i),!0;case"mouseover":return Ka=Zf(Ka,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return Eh.set(s,Zf(Eh.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,Ch.set(s,Zf(Ch.get(s)||null,e,t,n,r,i)),!0}return!1}function T$(e){var t=Mc(e.target);if(t!==null){var n=im(t);if(n!==null){if(t=n.tag,t===13){if(t=Vz(n),t!==null){e.blockedOn=t,bA(e.priority,function(){DO(n)});return}}else if(t===31){if(t=Kz(n),t!==null){e.blockedOn=t,bA(e.priority,function(){DO(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 ag(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=A1(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Gx=r,n.target.dispatchEvent(r),Gx=null}else return t=sf(n),t!==null&&E$(t),e.blockedOn=n,!1;t.shift()}return!0}function jO(e,t,n){ag(e)&&n.delete(t)}function s7(){O1=!1,qa!==null&&ag(qa)&&(qa=null),Va!==null&&ag(Va)&&(Va=null),Ka!==null&&ag(Ka)&&(Ka=null),Eh.forEach(jO),Ch.forEach(jO)}function bp(e,t){e.blockedOn===t&&(e.blockedOn=null,O1||(O1=!0,nn.unstable_scheduleCallback(nn.unstable_NormalPriority,s7)))}var vp=null;function IO(e){vp!==e&&(vp=e,nn.unstable_scheduleCallback(nn.unstable_NormalPriority,function(){vp===e&&(vp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!="function"){if(Fk(r||n)===null)continue;break}var s=sf(n);s!==null&&(e.splice(t,3),t-=3,c1(s,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Au(e){function t(l){return bp(l,e)}qa!==null&&bp(qa,e),Va!==null&&bp(Va,e),Ka!==null&&bp(Ka,e),Eh.forEach(t),Ch.forEach(t);for(var n=0;n<Oa.length;n++){var r=Oa[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Oa.length&&(n=Oa[0],n.blockedOn===null);)T$(n),n.blockedOn===null&&Oa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],s=n[r+1],a=i[cr]||null;if(typeof s=="function")a||IO(n);else if(a){var o=null;if(s&&s.hasAttribute("formAction")){if(i=s,a=s[cr]||null)o=a.formAction;else if(Fk(i)!==null)continue}else o=a.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),IO(n)}}}function A$(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(a){return i=a})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,i=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),i!==null&&(i(),i=null)}}}function Pk(e){this._internalRoot=e}Yb.prototype.render=Pk.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));var n=t.current,r=Ar();k$(n,r,e,t,null,null)};Yb.prototype.unmount=Pk.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;k$(e.current,2,null,e,null,null),Vb(),t[rf]=null}};function Yb(e){this._internalRoot=e}Yb.prototype.unstable_scheduleHydration=function(e){if(e){var t=rj();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Oa.length&&t!==0&&t<Oa[n].priority;n++);Oa.splice(n,0,e),n===0&&T$(e)}};var $O=Hz.version;if($O!=="19.2.4")throw Error(P(527,$O,"19.2.4"));Ye.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(P(188)):(e=Object.keys(e).join(","),Error(P(268,e)));return e=jH(t),e=e!==null?Gz(e):null,e=e===null?null:e.stateNode,e};var a7={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ye,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Sp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Sp.isDisabled&&Sp.supportsFiber)try{sm=Sp.inject(a7),Cr=Sp}catch{}}Nb.createRoot=function(e,t){if(!qz(e))throw Error(P(299));var n=!1,r="",i=vI,s=SI,a=xI;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=w$(e,1,!1,null,null,n,r,null,i,s,a,A$),e[rf]=t.current,zk(e),new Pk(t)};Nb.hydrateRoot=function(e,t,n){if(!qz(e))throw Error(P(299));var r=!1,i="",s=vI,a=SI,o=xI,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(l=n.formState)),t=w$(e,1,!0,t,n??null,r,i,l,s,a,o,A$),t.context=_$(null),n=t.current,r=Ar(),r=Y_(r),i=Pa(r),i.callback=null,Ua(n,i,r),n=r,t.current.lanes=n,om(t,n),as(t),e[rf]=t.current,zk(e),new Yb(t)};Nb.version="19.2.4";function O$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(O$)}catch(e){console.error(e)}}O$(),$z.exports=Nb;var o7=$z.exports;const l7=rm(o7),c7=e=>typeof e=="function",k=function(e,t){if(typeof e=="function")return function(){return e(arguments)?t.apply(this,arguments):n=>t(n,...arguments)};switch(e){case 0:case 1:throw new RangeError(`Invalid arity ${e}`);case 2:return function(n,r){return arguments.length>=2?t(n,r):function(i){return t(i,n)}};case 3:return function(n,r,i){return arguments.length>=3?t(n,r,i):function(s){return t(s,n,r)}};case 4:return function(n,r,i,s){return arguments.length>=4?t(n,r,i,s):function(a){return t(a,n,r,i)}};case 5:return function(n,r,i,s,a){return arguments.length>=5?t(n,r,i,s,a):function(o){return t(o,n,r,i,s)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);const n=arguments;return function(r){return t(r,...n)}}}},ce=e=>e,gm=e=>()=>e,R1=gm(!0),Ga=gm(!1),u7=gm(null),R$=gm(void 0),Ou=R$;function O(e,t,n,r,i,s,a,o,l){switch(arguments.length){case 1:return e;case 2:return t(e);case 3:return n(t(e));case 4:return r(n(t(e)));case 5:return i(r(n(t(e))));case 6:return s(i(r(n(t(e)))));case 7:return a(s(i(r(n(t(e))))));case 8:return o(a(s(i(r(n(t(e)))))));case 9:return l(o(a(s(i(r(n(t(e))))))));default:{let c=arguments[0];for(let f=1;f<arguments.length;f++)c=arguments[f](c);return c}}}const xp="effect/GlobalValue";let ed;const ge=(e,t)=>(ed||(globalThis[xp]??(globalThis[xp]=new Map),ed=globalThis[xp]),ed.has(e)||ed.set(e,t()),ed.get(e)),ri=e=>typeof e=="string",Ws=e=>typeof e=="number",Th=e=>typeof e=="boolean",Jb=e=>typeof e=="bigint",N1=e=>typeof e=="symbol",ff=c7,f7=e=>e===void 0,d7=e=>e!==void 0,p0=e=>e!==null,h7=e=>!1,Uk=e=>typeof e=="object"&&e!==null,Ci=e=>Uk(e)||ff(e),fe=k(2,(e,t)=>Ci(e)&&t in e),N$=k(2,(e,t)=>fe(e,"_tag")&&e._tag===t),oc=e=>e==null,m7=e=>e!=null,p7=e=>e instanceof Uint8Array,M$=e=>e instanceof Date,D$=e=>typeof e=="string"||fe(e,Symbol.iterator),g7=e=>Uk(e)&&!Array.isArray(e),y7=e=>fe(e,"then")&&ff(e.then),Qb=e=>`BUG: ${e} - please report an issue at https://github.com/Effect-TS/effect/issues`;let z$=class j${constructor(t){y(this,"self");y(this,"called",!1);this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new j$(this.self)}};const b7=335903614,v7=4150755663,S7=1481765933,x7=1284865837,w7=9007199254740992,_7=134217728;class k7{constructor(t,n,r,i){y(this,"_state");return oc(n)&&oc(t)?(n=Math.random()*4294967295>>>0,t=0):oc(n)&&(n=t,t=0),oc(i)&&oc(r)?(i=this._state?this._state[3]:v7,r=this._state?this._state[2]:b7):oc(i)&&(i=r,r=0),this._state=new Int32Array([0,0,r>>>0,((i||0)|1)>>>0]),this._next(),LO(this._state,this._state[0],this._state[1],t>>>0,n>>>0),this._next(),this}getState(){return[this._state[0],this._state[1],this._state[2],this._state[3]]}setState(t){this._state[0]=t[0],this._state[1]=t[1],this._state[2]=t[2],this._state[3]=t[3]|1}integer(t){return Math.round(this.number()*Number.MAX_SAFE_INTEGER)%t}number(){const t=(this._next()&67108863)*1,n=(this._next()&134217727)*1;return(t*_7+n)/w7}_next(){const t=this._state[0]>>>0,n=this._state[1]>>>0;E7(this._state,t,n,S7,x7),LO(this._state,this._state[0],this._state[1],this._state[2],this._state[3]);let r=t>>>18,i=(n>>>18|t<<14)>>>0;r=(r^t)>>>0,i=(i^n)>>>0;const s=(i>>>27|r<<5)>>>0,a=t>>>27,o=(-a>>>0&31)>>>0;return(s>>>a|s<<o)>>>0}}function E7(e,t,n,r,i){let s=(n>>>16)*(i&65535)>>>0,a=(n&65535)*(i>>>16)>>>0,o=(n&65535)*(i&65535)>>>0,l=(n>>>16)*(i>>>16)+((a>>>16)+(s>>>16))>>>0;a=a<<16>>>0,o=o+a>>>0,o>>>0<a>>>0&&(l=l+1>>>0),s=s<<16>>>0,o=o+s>>>0,o>>>0<s>>>0&&(l=l+1>>>0),l=l+Math.imul(n,r)>>>0,l=l+Math.imul(t,i)>>>0,e[0]=l,e[1]=o}function LO(e,t,n,r,i){let s=t+r>>>0;const a=n+i>>>0;a>>>0<n>>>0&&(s=s+1|0),e[0]=s,e[1]=a}const M1=Symbol.for("effect/Utils/YieldWrap");var nm;class ym{constructor(t){NS(this,nm);ip(this,nm,t)}[M1](){return rp(this,nm)}}nm=new WeakMap;function C7(e){if(typeof e=="object"&&e!==null&&M1 in e)return e[M1]();throw new Error(Qb("yieldWrapGet"))}const $r=ge("effect/Utils/isStructuralRegion",()=>({enabled:!1,tester:void 0})),I$={effect_internal_function:e=>e()},T7={effect_internal_function:e=>{try{return e()}finally{}}};var sD;const A7=((sD=I$.effect_internal_function(()=>new Error().stack))==null?void 0:sD.includes("effect_internal_function"))===!0,xn=A7?I$.effect_internal_function:T7.effect_internal_function,g0=ge(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),be=Symbol.for("effect/Hash"),re=e=>{if($r.enabled===!0)return 0;switch(typeof e){case"number":return Hk(e);case"bigint":return vt(e.toString(10));case"boolean":return vt(String(e));case"symbol":return vt(String(e));case"string":return vt(e);case"undefined":return vt("undefined");case"function":case"object":return e===null?vt("null"):e instanceof Date?Number.isNaN(e.getTime())?vt("Invalid Date"):re(e.toISOString()):e instanceof URL?re(e.href):O7(e)?e[be]():Bk(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},Bk=e=>(g0.has(e)||g0.set(e,Hk(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),g0.get(e)),Se=e=>t=>t*53^e,Xb=e=>e&3221225471|e>>>1&1073741824,O7=e=>fe(e,be),Hk=e=>{if(e!==e||e===1/0)return 0;let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return Xb(t)},vt=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return Xb(t)},R7=(e,t)=>{let n=12289;for(let r=0;r<t.length;r++)n^=O(vt(t[r]),Se(re(e[t[r]])));return Xb(n)},$$=e=>R7(e,Object.keys(e)),df=e=>{let t=6151;for(let n=0;n<e.length;n++)t=O(t,Se(re(e[n])));return Xb(t)},rt=function(){if(arguments.length===1){const n=arguments[0];return function(r){return Object.defineProperty(n,be,{value(){return r},enumerable:!1}),r}}const e=arguments[0],t=arguments[1];return Object.defineProperty(e,be,{value(){return t},enumerable:!1}),t},ve=Symbol.for("effect/Equal");function oe(){return arguments.length===1?e=>uy(e,arguments[0]):uy(arguments[0],arguments[1])}function uy(e,t){if(e===t)return!0;const n=typeof e;if(n!==typeof t)return!1;if(n==="object"||n==="function"){if(e!==null&&t!==null){if(Ah(e)&&Ah(t))return re(e)===re(t)&&e[ve](t)?!0:$r.enabled&&$r.tester?$r.tester(e,t):!1;if(e instanceof Date&&t instanceof Date){const r=e.getTime(),i=t.getTime();return r===i||Number.isNaN(r)&&Number.isNaN(i)}else if(e instanceof URL&&t instanceof URL)return e.href===t.href}if($r.enabled){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((r,i)=>uy(r,t[i]));if(Object.getPrototypeOf(e)===Object.prototype&&Object.getPrototypeOf(t)===Object.prototype){const r=Object.keys(e),i=Object.keys(t);if(r.length===i.length){for(const s of r)if(!(s in t&&uy(e[s],t[s])))return $r.tester?$r.tester(e,t):!1;return!0}}return $r.tester?$r.tester(e,t):!1}}return $r.enabled&&$r.tester?$r.tester(e,t):!1}const Ah=e=>fe(e,ve),qk=()=>oe,Ue=Symbol.for("nodejs.util.inspect.custom"),Et=e=>{try{if(fe(e,"toJSON")&&ff(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(Et)}catch{return{}}return Vk(e)},y0="[Circular]";function L$(e){try{return e.toISOString()}catch{return"Invalid Date"}}function N7(e){try{const t=e.toString();return typeof t=="string"?t:String(t)}catch{return"[toString threw]"}}function Wb(e){return ri(e)?JSON.stringify(e):String(e)}function sa(e,t){const n=new WeakSet,r=(a,o)=>{const l=a==null?void 0:a.constructor;return l&&l!==Object.prototype.constructor&&l.name?`${l.name}(${o})`:o},i=a=>{try{return Reflect.ownKeys(a)}catch{return["[ownKeys threw]"]}};function s(a,o=0){if(Array.isArray(a))return n.has(a)?y0:(n.add(a),`[${a.map(l=>s(l,o)).join(",")}]`);if(M$(a))return L$(a);if(fe(a,"toString")&&ff(a.toString)&&a.toString!==Object.prototype.toString&&a.toString!==Array.prototype.toString){const l=N7(a);return a instanceof Error&&a.cause?`${l} (cause: ${s(a.cause,o)})`:l}if(ri(a))return JSON.stringify(a);if(Ws(a)||a==null||Th(a)||N1(a))return String(a);if(Jb(a))return String(a)+"n";if(a instanceof Set||a instanceof Map)return n.has(a)?y0:(n.add(a),`${a.constructor.name}(${s(Array.from(a),o)})`);if(Ci(a)){if(n.has(a))return y0;n.add(a);const l=i(a);{const c=`{${l.map(f=>`${Wb(f)}:${s(a[f],o)}`).join(",")}}`;return r(a,c)}}return String(a)}return s(e,0)}const at=e=>JSON.stringify(e,null,2),Zb={toJSON(){return Et(this)},[Ue](){return this.toJSON()},toString(){return at(this.toJSON())}};let M7=class{[Ue](){return this.toJSON()}toString(){return at(this.toJSON())}};const Ru=(e,t=2)=>{if(typeof e=="string")return e;try{return typeof e=="object"?F$(e,t):String(e)}catch{return String(e)}},F$=(e,t)=>{let n=[];const r=JSON.stringify(e,(i,s)=>typeof s=="object"&&s!==null?n.includes(s)?void 0:n.push(s)&&(cl.fiberRefs!==void 0&&P$(s)?s[ev](cl.fiberRefs):s):s,t);return n=void 0,r},ev=Symbol.for("effect/Inspectable/Redactable"),P$=e=>typeof e=="object"&&e!==null&&ev in e,cl=ge("effect/Inspectable/redactableState",()=>({fiberRefs:void 0})),D7=(e,t)=>{const n=cl.fiberRefs;cl.fiberRefs=e;try{return t()}finally{cl.fiberRefs=n}},Vk=e=>P$(e)&&cl.fiberRefs!==void 0?e[ev](cl.fiberRefs):e,ie=(e,t)=>{switch(t.length){case 0:return e;case 1:return t[0](e);case 2:return t[1](t[0](e));case 3:return t[2](t[1](t[0](e)));case 4:return t[3](t[2](t[1](t[0](e))));case 5:return t[4](t[3](t[2](t[1](t[0](e)))));case 6:return t[5](t[4](t[3](t[2](t[1](t[0](e))))));case 7:return t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))));case 8:return t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e))))))));case 9:return t[8](t[7](t[6](t[5](t[4](t[3](t[2](t[1](t[0](e)))))))));default:{let n=e;for(let r=0,i=t.length;r<i;r++)n=t[r](n);return n}}},Vd="Async",tv="Commit",mn="Failure",og="OnFailure",fy="OnSuccess",dy="OnSuccessAndFailure",pn="Success",U$="Sync",z7="Tag",hf="UpdateRuntimeFlags",hy="While",Kd="Iterator",B$="WithRuntime",lg="Yield",Kk="RevertFlags";let j7="3.19.16";const Gk=()=>j7,I7=Symbol.for("effect/Effect"),$7=Symbol.for("effect/Stream"),L7=Symbol.for("effect/Sink"),F7=Symbol.for("effect/Channel"),Nu={_R:e=>e,_E:e=>e,_A:e=>e,_V:Gk()},P7={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e},U7={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},bm={[I7]:Nu,[$7]:Nu,[L7]:P7,[F7]:U7,[ve](e){return this===e},[be](){return rt(this,Bk(this))},[Symbol.iterator](){return new z$(new ym(this))},pipe(){return ie(this,arguments)}},nv={[be](){return rt(this,$$(this))},[ve](e){const t=Object.keys(this),n=Object.keys(e);if(t.length!==n.length)return!1;for(const r of t)if(!(r in e&&oe(this[r],e[r])))return!1;return!0}},vm={...bm,_op:tv},B7={...vm,...nv},H7=function(){function e(){}return e.prototype=vm,e}(),H$=Symbol.for("effect/Option"),q$={...bm,[H$]:{_A:e=>e},[Ue](){return this.toJSON()},toString(){return at(this.toJSON())}},q7=Object.assign(Object.create(q$),{_tag:"Some",_op:"Some",[ve](e){return Yk(e)&&K$(e)&&oe(this.value,e.value)},[be](){return rt(this,Se(re(this._tag))(re(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:Et(this.value)}}}),V7=re("None"),K7=Object.assign(Object.create(q$),{_tag:"None",_op:"None",[ve](e){return Yk(e)&&V$(e)},[be](){return V7},toJSON(){return{_id:"Option",_tag:this._tag}}}),Yk=e=>fe(e,H$),V$=e=>e._tag==="None",K$=e=>e._tag==="Some",Jk=Object.create(K7),my=e=>{const t=Object.create(q7);return t.value=e,t},G$=Symbol.for("effect/Context/Tag"),py=Symbol.for("effect/Context/Reference"),G7="effect/STM",Y7=Symbol.for(G7),Qk={...bm,_op:"Tag",[Y7]:Nu,[G$]:{_Service:e=>e,_Identifier:e=>e},toString(){return at(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[Ue](){return this.toJSON()},of(e){return e},context(e){return Q$(this,e)}},J7={...Qk,[py]:py},Q7=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;const r=Object.create(Qk);return Object.defineProperty(r,"stack",{get(){return n.stack}}),r.key=e,r},X7=e=>()=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;function r(){}return Object.setPrototypeOf(r,Qk),r.key=e,Object.defineProperty(r,"stack",{get(){return n.stack}}),r},W7=()=>(e,t)=>{const n=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=n;function i(){}return Object.setPrototypeOf(i,J7),i.key=e,i.defaultValue=t.defaultValue,Object.defineProperty(i,"stack",{get(){return r.stack}}),i},Y$=Symbol.for("effect/Context"),Z7={[Y$]:{_Services:e=>e},[ve](e){if(J$(e)&&this.unsafeMap.size===e.unsafeMap.size){for(const t of this.unsafeMap.keys())if(!e.unsafeMap.has(t)||!oe(this.unsafeMap.get(t),e.unsafeMap.get(t)))return!1;return!0}return!1},[be](){return rt(this,Hk(this.unsafeMap.size))},pipe(){return ie(this,arguments)},toString(){return at(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(Et)}},[Ue](){return this.toJSON()}},lo=e=>{const t=Object.create(Z7);return t.unsafeMap=e,t},eK=e=>{const t=new Error(`Service not found${e.key?`: ${String(e.key)}`:""}`);if(e.stack){const n=e.stack.split(`
|
|
50
|
+
`);if(n.length>2){const r=n[2].match(/at (.*)/);r&&(t.message=t.message+` (defined at ${r[1]})`)}}if(t.stack){const n=t.stack.split(`
|
|
51
|
+
`);n.splice(1,3),t.stack=n.join(`
|
|
52
|
+
`)}return t},J$=e=>fe(e,Y$),tK=e=>fe(e,G$),nK=e=>fe(e,py),rK=lo(new Map),iK=()=>rK,Q$=(e,t)=>lo(new Map([[e.key,t]])),sK=k(3,(e,t,n)=>{const r=new Map(e.unsafeMap);return r.set(t.key,n),lo(r)}),b0=ge("effect/Context/defaultValueCache",()=>new Map),Xk=e=>{if(b0.has(e.key))return b0.get(e.key);const t=e.defaultValue();return b0.set(e.key,t),t},aK=(e,t)=>e.unsafeMap.has(t.key)?e.unsafeMap.get(t.key):Xk(t),X$=k(2,(e,t)=>{if(!e.unsafeMap.has(t.key)){if(py in t)return Xk(t);throw eK(t)}return e.unsafeMap.get(t.key)}),oK=X$,lK=k(2,(e,t)=>e.unsafeMap.has(t.key)?my(e.unsafeMap.get(t.key)):nK(t)?my(Xk(t)):Jk),cK=k(2,(e,t)=>{const n=new Map(e.unsafeMap);for(const[r,i]of t.unsafeMap)n.set(r,i);return lo(n)}),uK=(...e)=>{const t=new Map;for(let n=0;n<e.length;n++)e[n].unsafeMap.forEach((r,i)=>{t.set(i,r)});return lo(t)},ko=Q7,fK=lo,dK=J$,W$=tK,ns=iK,Wk=Q$,Qr=sK,Vs=oK,Z$=X$,mf=lK,ur=cK,hK=uK,Zk=X7,pf=W7,rv=e=>(t,n)=>t===n||e(t,n),mK=(e,t)=>e===t,pK=()=>mK,gK=pK(),eL=k(2,(e,t)=>rv((n,r)=>e(t(n),t(r)))),yK=eL(gK,e=>e.getTime()),bK=e=>rv((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e(t[r],n[r]))return!1;return!0}),eE=Symbol.for("effect/Either"),tL={...bm,[eE]:{_R:e=>e},[Ue](){return this.toJSON()},toString(){return at(this.toJSON())}},vK=Object.assign(Object.create(tL),{_tag:"Right",_op:"Right",[ve](e){return tE(e)&&rL(e)&&oe(this.right,e.right)},[be](){return Se(re(this._tag))(re(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:Et(this.right)}}}),SK=Object.assign(Object.create(tL),{_tag:"Left",_op:"Left",[ve](e){return tE(e)&&nL(e)&&oe(this.left,e.left)},[be](){return Se(re(this._tag))(re(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:Et(this.left)}}}),tE=e=>fe(e,eE),nL=e=>e._tag==="Left",rL=e=>e._tag==="Right",xK=e=>{const t=Object.create(SK);return t.left=e,t},wK=e=>{const t=Object.create(vK);return t.right=e,t},_K=eE,he=wK,pe=xK,kK=e=>{if(ff(e))try{return he(e())}catch(t){return pe(t)}else try{return he(e.try())}catch(t){return pe(e.catch(t))}},iL=tE,cn=nL,Vi=rL,EK=k(2,(e,{onLeft:t,onRight:n})=>cn(e)?pe(t(e.left)):he(n(e.right))),CK=k(2,(e,t)=>cn(e)?pe(t(e.left)):he(e.right)),TK=k(2,(e,t)=>Vi(e)?he(t(e.right)):pe(e.left)),or=k(2,(e,{onLeft:t,onRight:n})=>cn(e)?t(e.left):n(e.right)),AK=or({onLeft:ce,onRight:ce}),sL=k(2,(e,t)=>{if(Vi(e))return e.right;throw t(e.left)}),aL=sL(()=>new Error("getOrThrow called on a Left")),oL=e=>e.length>0,lL=e=>(t,n)=>t===n?0:e(t,n),OK=lL((e,t)=>e<t?-1:1),cL=k(2,(e,t)=>lL((n,r)=>e(t(n),t(r)))),RK=e=>k(2,(t,n)=>e(t,n)===1),NK=Symbol.for("effect/Option"),q=()=>Jk,J=my,MK=Yk,Ct=V$,gt=K$,pt=k(2,(e,{onNone:t,onSome:n})=>Ct(e)?t():n(e.value)),ut=k(2,(e,t)=>Ct(e)?t():e.value),wi=k(2,(e,t)=>Ct(e)?t():e),DK=k(2,(e,t)=>Ct(e)?J(t()):e),gf=e=>e==null?q():J(e),zK=ut(u7),qr=ut(R$),jK=e=>(...t)=>{try{return J(e(...t))}catch{return q()}},uL=k(2,(e,t)=>{if(gt(e))return e.value;throw t()}),IK=uL(()=>new Error("getOrThrow called on a None")),Gn=k(2,(e,t)=>Ct(e)?q():J(t(e.value))),aa=k(2,(e,t)=>Ct(e)?q():t(e.value)),fL=k(2,(e,t)=>Ct(e)?q():gf(t(e.value))),$K=aa,xc=k(2,(e,t)=>$K(e,n=>t(n)?my(n):Jk)),LK=e=>rv((t,n)=>Ct(t)?Ct(n):Ct(n)?!1:e(t.value,n.value)),FK=e=>k(2,(t,n)=>Ct(t)?!1:e(t.value,n)),PK=qk(),UK=FK(PK),dL=k(2,(e,t)=>Ct(e)?!1:t(e.value)),BK=(...e)=>e,HK=()=>({}),qK=e=>hL(e).length===0,Bc=k(2,(e,t)=>{const n={...e};for(const r of hL(e))n[r]=t(e[r],r);return n}),hL=e=>Object.keys(e),VK=k(3,(e,t,n)=>({...e,[t]:n})),iv=e=>new Array(e),KK=k(2,(e,t)=>{const n=Math.max(1,Math.floor(e)),r=new Array(n);for(let i=0;i<n;i++)r[i]=t(i);return r}),Qe=e=>Array.isArray(e)?e:Array.from(e),GK=e=>Array.isArray(e)?e:[e],YK=k(2,(e,{onEmpty:t,onNonEmpty:n})=>rn(e)?n(Jn(e),xl(e)):t()),gy=k(2,(e,t)=>[t,...e]),JK=k(2,(e,t)=>[...e,t]),nE=k(2,(e,t)=>Qe(e).concat(Qe(t))),QK=Array.isArray,XK=e=>e.length===0,WK=XK,nu=oL,rn=oL,mL=(e,t)=>e<0||e>=t.length,ZK=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),eG=k(2,(e,t)=>{const n=Math.floor(t);return mL(n,e)?q():J(e[n])}),pL=k(2,(e,t)=>{const n=Math.floor(t);if(mL(n,e))throw new Error(`Index ${n} out of bounds`);return e[n]}),Gd=eG(0),Jn=pL(0),tG=e=>rn(e)?J(gL(e)):q(),gL=e=>e[e.length-1],xl=e=>e.slice(1),nG=(e,t)=>{let n=0;for(const r of e){if(!t(r,n))break;n++}return n},rG=k(2,(e,t)=>yL(e,nG(e,t))),iG=k(2,(e,t)=>{const n=Qe(e);return n.slice(ZK(t,n),n.length)}),FO=e=>Array.from(e).reverse(),Oh=k(2,(e,t)=>{const n=Array.from(e);return n.sort(t),n}),PO=k(2,(e,t)=>sG(e,t,BK)),sG=k(3,(e,t,n)=>{const r=Qe(e),i=Qe(t);if(rn(r)&&rn(i)){const s=[n(Jn(r),Jn(i))],a=Math.min(r.length,i.length);for(let o=1;o<a;o++)s[o]=n(r[o],i[o]);return s}return[]}),aG=qk(),yL=k(2,(e,t)=>{const n=Array.from(e),r=Math.floor(t);return rn(n)?r>=1?oG(n,r):[[],n]:[n,[]]}),oG=k(2,(e,t)=>{const n=Math.max(1,Math.floor(t));return n>=e.length?[Sd(e),[]]:[gy(e.slice(1,n),Jn(e)),e.slice(n)]}),Sd=e=>e.slice(),lG=k(3,(e,t,n)=>{const r=Qe(e),i=Qe(t);return rn(r)?rn(i)?vL(n)(nE(r,i)):r:i}),cg=k(2,(e,t)=>lG(e,t,aG)),co=()=>[],mi=e=>[e],ul=k(2,(e,t)=>e.map(t)),yy=k(2,(e,t)=>{if(WK(e))return[];const n=[];for(let r=0;r<e.length;r++){const i=t(e[r],r);for(let s=0;s<i.length;s++)n.push(i[s])}return n}),bL=yy(ce),cG=k(2,(e,t)=>{const n=Qe(e),r=[];for(let i=0;i<n.length;i++)t(n[i],i)&&r.push(n[i]);return r}),rE=k(3,(e,t,n)=>Qe(e).reduce((r,i,s)=>n(r,i,s),t)),UO=(e,t)=>{const n=[];let r=e,i;for(;gt(i=t(r));){const[s,a]=i.value;n.push(s),r=a}return n},sv=bK,vL=k(2,(e,t)=>{const n=Qe(e);if(rn(n)){const r=[Jn(n)],i=xl(n);for(const s of i)r.every(a=>!t(s,a))&&r.push(s);return r}return[]}),uG=e=>vL(e,qk()),yf=k(2,(e,t)=>Qe(e).join(t)),SL=Symbol.for("effect/Chunk");function fG(e,t,n,r,i){for(let s=t;s<Math.min(e.length,t+i);s++)n[r+s-t]=e[s];return n}const xL=[],wL=e=>rv((t,n)=>t.length===n.length&&Qn(t).every((r,i)=>e(r,Ya(n,i)))),dG=wL(oe),hG={[SL]:{_A:e=>e},toString(){return at(this.toJSON())},toJSON(){return{_id:"Chunk",values:Qn(this).map(Et)}},[Ue](){return this.toJSON()},[ve](e){return av(e)&&dG(this,e)},[be](){return rt(this,df(Qn(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return xL[Symbol.iterator]();default:return Qn(this)[Symbol.iterator]()}},pipe(){return ie(this,arguments)}},Ot=e=>{const t=Object.create(hG);switch(t.backing=e,e._tag){case"IEmpty":{t.length=0,t.depth=0,t.left=t,t.right=t;break}case"IConcat":{t.length=e.left.length+e.right.length,t.depth=1+Math.max(e.left.depth,e.right.depth),t.left=e.left,t.right=e.right;break}case"IArray":{t.length=e.array.length,t.depth=0,t.left=pi,t.right=pi;break}case"ISingleton":{t.length=1,t.depth=0,t.left=pi,t.right=pi;break}case"ISlice":{t.length=e.length,t.depth=e.chunk.depth+1,t.left=pi,t.right=pi;break}}return t},av=e=>fe(e,SL),pi=Ot({_tag:"IEmpty"}),sn=()=>pi,v0=(...e)=>gG(e),Jt=e=>Ot({_tag:"ISingleton",a:e}),Zs=e=>av(e)?e:Bn(Qe(e)),D1=(e,t,n)=>{switch(e.backing._tag){case"IArray":{fG(e.backing.array,0,t,n,e.length);break}case"IConcat":{D1(e.left,t,n),D1(e.right,t,n+e.left.length);break}case"ISingleton":{t[n]=e.backing.a;break}case"ISlice":{let r=0,i=n;for(;r<e.length;)t[i]=Ya(e,r),r+=1,i+=1;break}}},mG=e=>{switch(e.backing._tag){case"IEmpty":return xL;case"IArray":return e.backing.array;default:{const t=new Array(e.length);return D1(e,t,0),e.backing={_tag:"IArray",array:t},e.left=pi,e.right=pi,e.depth=0,t}}},Qn=mG,pG=e=>{switch(e.backing._tag){case"IEmpty":case"ISingleton":return e;case"IArray":return Ot({_tag:"IArray",array:FO(e.backing.array)});case"IConcat":return Ot({_tag:"IConcat",left:ea(e.backing.right),right:ea(e.backing.left)});case"ISlice":return Bn(FO(Qn(e)))}},ea=pG,_L=k(2,(e,t)=>t<0||t>=e.length?q():J(Ya(e,t))),Bn=e=>e.length===0?sn():e.length===1?Jt(e[0]):Ot({_tag:"IArray",array:e}),gG=e=>Bn(e),Ya=k(2,(e,t)=>{switch(e.backing._tag){case"IEmpty":throw new Error("Index out of bounds");case"ISingleton":{if(t!==0)throw new Error("Index out of bounds");return e.backing.a}case"IArray":{if(t>=e.length||t<0)throw new Error("Index out of bounds");return e.backing.array[t]}case"IConcat":return t<e.left.length?Ya(e.left,t):Ya(e.right,t-e.left.length);case"ISlice":return Ya(e.backing.chunk,t+e.backing.offset)}}),z1=k(2,(e,t)=>Kt(e,Jt(t))),In=k(2,(e,t)=>Kt(Jt(t),e)),by=k(2,(e,t)=>{if(t<=0)return pi;if(t>=e.length)return e;switch(e.backing._tag){case"ISlice":return Ot({_tag:"ISlice",chunk:e.backing.chunk,length:t,offset:e.backing.offset});case"IConcat":return t>e.left.length?Ot({_tag:"IConcat",left:e.left,right:by(e.right,t-e.left.length)}):by(e.left,t);default:return Ot({_tag:"ISlice",chunk:e,offset:0,length:t})}}),ja=k(2,(e,t)=>{if(t<=0)return e;if(t>=e.length)return pi;switch(e.backing._tag){case"ISlice":return Ot({_tag:"ISlice",chunk:e.backing.chunk,offset:e.backing.offset+t,length:e.backing.length-t});case"IConcat":return t>e.left.length?ja(e.right,t-e.left.length):Ot({_tag:"IConcat",left:ja(e.left,t),right:e.right});default:return Ot({_tag:"ISlice",chunk:e,offset:t,length:e.length-t})}}),Kt=k(2,(e,t)=>{if(e.backing._tag==="IEmpty")return t;if(t.backing._tag==="IEmpty")return e;const n=t.depth-e.depth;if(Math.abs(n)<=1)return Ot({_tag:"IConcat",left:e,right:t});if(n<-1)if(e.left.depth>=e.right.depth){const r=Kt(e.right,t);return Ot({_tag:"IConcat",left:e.left,right:r})}else{const r=Kt(e.right.right,t);if(r.depth===e.depth-3){const i=Ot({_tag:"IConcat",left:e.right.left,right:r});return Ot({_tag:"IConcat",left:e.left,right:i})}else{const i=Ot({_tag:"IConcat",left:e.left,right:e.right.left});return Ot({_tag:"IConcat",left:i,right:r})}}else if(t.right.depth>=t.left.depth){const r=Kt(e,t.left);return Ot({_tag:"IConcat",left:r,right:t.right})}else{const r=Kt(e,t.left.left);if(r.depth===t.depth-3){const i=Ot({_tag:"IConcat",left:r,right:t.left.right});return Ot({_tag:"IConcat",left:i,right:t.right})}else{const i=Ot({_tag:"IConcat",left:t.left.right,right:t.right});return Ot({_tag:"IConcat",left:r,right:i})}}}),iE=k(2,(e,t)=>Bn(cG(e,t))),ov=e=>e.length===0,ta=e=>e.length>0,sE=_L(0),aE=e=>Ya(e,0),Ki=aE,yG=e=>_L(e,e.length-1),bG=k(2,(e,t)=>e.backing._tag==="ISingleton"?Jt(t(e.backing.a,0)):Bn(O(Qn(e),ul((n,r)=>t(n,r))))),js=e=>ja(e,1),vG=k(2,(e,t)=>ja(e,e.length-t)),SG=rE,wl=5,oE=Math.pow(2,wl),xG=oE-1,wG=oE/2,_G=oE/4;function kG(e){return e-=e>>1&1431655765,e=(e&858993459)+(e>>2&858993459),e=e+(e>>4)&252645135,e+=e>>8,e+=e>>16,e&127}function Mu(e,t){return t>>>e&xG}function Hc(e){return 1<<e}function kL(e,t){return kG(e&t-1)}const EG=(e,t)=>({value:e,previous:t});function ru(e,t,n,r){let i=r;if(!e){const s=r.length;i=new Array(s);for(let a=0;a<s;++a)i[a]=r[a]}return i[t]=n,i}function EL(e,t,n){const r=n.length-1;let i=0,s=0,a=n;if(e)i=s=t;else for(a=new Array(r);i<t;)a[s++]=n[i++];for(++i;i<=r;)a[s++]=n[i++];return e&&(a.length=r),a}function CG(e,t,n,r){const i=r.length;if(e){let l=i;for(;l>=t;)r[l--]=r[l];return r[t]=n,r}let s=0,a=0;const o=new Array(i+1);for(;s<t;)o[a++]=r[s++];for(o[t]=n;s<i;)o[++a]=r[s++];return o}class uo{constructor(){y(this,"_tag","EmptyNode")}modify(t,n,r,i,s,a){const o=r(q());return Ct(o)?new uo:(++a.value,new fl(t,i,s,o))}}function Si(e){return N$(e,"EmptyNode")}function TG(e){return Si(e)||e._tag==="LeafNode"||e._tag==="CollisionNode"}function lv(e,t){return Si(e)?!1:t===e.edit}class fl{constructor(t,n,r,i){y(this,"edit");y(this,"hash");y(this,"key");y(this,"value");y(this,"_tag","LeafNode");this.edit=t,this.hash=n,this.key=r,this.value=i}modify(t,n,r,i,s,a){if(oe(s,this.key)){const l=r(this.value);return l===this.value?this:Ct(l)?(--a.value,new uo):lv(this,t)?(this.value=l,this):new fl(t,i,s,l)}const o=r(q());return Ct(o)?this:(++a.value,CL(t,n,this.hash,this,i,new fl(t,i,s,o)))}}class lE{constructor(t,n,r){y(this,"edit");y(this,"hash");y(this,"children");y(this,"_tag","CollisionNode");this.edit=t,this.hash=n,this.children=r}modify(t,n,r,i,s,a){if(i===this.hash){const l=lv(this,t),c=this.updateCollisionList(l,t,this.hash,this.children,r,s,a);return c===this.children?this:c.length>1?new lE(t,this.hash,c):c[0]}const o=r(q());return Ct(o)?this:(++a.value,CL(t,n,this.hash,this,i,new fl(t,i,s,o)))}updateCollisionList(t,n,r,i,s,a,o){const l=i.length;for(let f=0;f<l;++f){const u=i[f];if("key"in u&&oe(a,u.key)){const d=u.value,h=s(d);return h===d?i:Ct(h)?(--o.value,EL(t,f,i)):ru(t,f,new fl(n,r,a,h),i)}}const c=s(q());return Ct(c)?i:(++o.value,ru(t,l,new fl(n,r,a,c),i))}}class Du{constructor(t,n,r){y(this,"edit");y(this,"mask");y(this,"children");y(this,"_tag","IndexedNode");this.edit=t,this.mask=n,this.children=r}modify(t,n,r,i,s,a){const o=this.mask,l=this.children,c=Mu(n,i),f=Hc(c),u=kL(o,f),d=o&f,h=lv(this,t);if(!d){const b=new uo().modify(t,n+wl,r,i,s,a);return b?l.length>=wG?OG(t,c,b,o,l):new Du(t,o|f,CG(h,u,b,l)):this}const g=l[u],v=g.modify(t,n+wl,r,i,s,a);if(g===v)return this;let x=o,m;if(Si(v)){if(x&=~f,!x)return new uo;if(l.length<=2&&TG(l[u^1]))return l[u^1];m=EL(h,u,l)}else m=ru(h,u,v,l);return h?(this.mask=x,this.children=m,this):new Du(t,x,m)}}class cE{constructor(t,n,r){y(this,"edit");y(this,"size");y(this,"children");y(this,"_tag","ArrayNode");this.edit=t,this.size=n,this.children=r}modify(t,n,r,i,s,a){let o=this.size;const l=this.children,c=Mu(n,i),f=l[c],u=(f||new uo).modify(t,n+wl,r,i,s,a);if(f===u)return this;const d=lv(this,t);let h;if(Si(f)&&!Si(u))++o,h=ru(d,c,u,l);else if(!Si(f)&&Si(u)){if(--o,o<=_G)return AG(t,o,c,l);h=ru(d,c,new uo,l)}else h=ru(d,c,u,l);return d?(this.size=o,this.children=h,this):new cE(t,o,h)}}function AG(e,t,n,r){const i=new Array(t-1);let s=0,a=0;for(let o=0,l=r.length;o<l;++o)if(o!==n){const c=r[o];c&&!Si(c)&&(i[s++]=c,a|=1<<o)}return new Du(e,a,i)}function OG(e,t,n,r,i){const s=[];let a=r,o=0;for(let l=0;a;++l)a&1&&(s[l]=i[o++]),a>>>=1;return s[t]=n,new cE(e,o+1,s)}function RG(e,t,n,r,i,s){if(n===i)return new lE(e,n,[s,r]);const a=Mu(t,n),o=Mu(t,i);if(a===o)return l=>new Du(e,Hc(a)|Hc(o),[l]);{const l=a<o?[r,s]:[s,r];return new Du(e,Hc(a)|Hc(o),l)}}function CL(e,t,n,r,i,s){let a,o=t;for(;;){const l=RG(e,o,n,r,i,s);if(typeof l=="function")a=EG(l,a),o=o+wl;else{let c=l;for(;a!=null;)c=a.value(c),a=a.previous;return c}}}const TL="effect/HashMap",j1=Symbol.for(TL),NG={[j1]:j1,[Symbol.iterator](){return new cv(this,(e,t)=>[e,t])},[be](){let e=re(TL);for(const t of this)e^=O(re(t[0]),Se(re(t[1])));return rt(this,e)},[ve](e){if(zG(e)){if(e._size!==this._size)return!1;for(const t of this){const n=O(e,fE(t[0],re(t[0])));if(Ct(n))return!1;if(!oe(t[1],n.value))return!1}return!0}return!1},toString(){return at(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(Et)}},[Ue](){return this.toJSON()},pipe(){return ie(this,arguments)}},uE=(e,t,n,r)=>{const i=Object.create(NG);return i._editable=e,i._edit=t,i._root=n,i._size=r,i};class cv{constructor(t,n){y(this,"map");y(this,"f");y(this,"v");this.map=t,this.f=n,this.v=AL(this.map._root,this.f,void 0)}next(){if(Ct(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=vy(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new cv(this.map,this.f)}}const vy=e=>e?OL(e[0],e[1],e[2],e[3],e[4]):q(),AL=(e,t,n=void 0)=>{switch(e._tag){case"LeafNode":return gt(e.value)?J({value:t(e.key,e.value.value),cont:n}):vy(n);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const r=e.children;return OL(r.length,r,0,t,n)}default:return vy(n)}},OL=(e,t,n,r,i)=>{for(;n<e;){const s=t[n++];if(s&&!Si(s))return AL(s,r,[e,t,n,r,i])}return vy(i)},MG=uE(!1,0,new uo,0),uv=()=>MG,DG=e=>{const t=NL(uv());for(const n of e)Rh(t,n[0],n[1]);return FG(t)},zG=e=>fe(e,j1),jG=e=>e&&Si(e._root),IG=k(2,(e,t)=>fE(e,t,re(t))),fE=k(3,(e,t,n)=>{let r=e._root,i=0;for(;;)switch(r._tag){case"LeafNode":return oe(t,r.key)?r.value:q();case"CollisionNode":{if(n===r.hash){const s=r.children;for(let a=0,o=s.length;a<o;++a){const l=s[a];if("key"in l&&oe(t,l.key))return l.value}}return q()}case"IndexedNode":{const s=Mu(i,n),a=Hc(s);if(r.mask&a){r=r.children[kL(r.mask,a)],i+=wl;break}return q()}case"ArrayNode":{if(r=r.children[Mu(i,n)],r){i+=wl;break}return q()}default:return q()}}),$G=k(2,(e,t)=>gt(fE(e,t,re(t)))),Rh=k(3,(e,t,n)=>dE(e,t,()=>J(n))),LG=k(3,(e,t,n)=>e._editable?(e._root=t,e._size=n,e):t===e._root?e:uE(e._editable,e._edit,t,n)),RL=e=>new cv(e,t=>t),I1=e=>e._size,NL=e=>uE(!0,e._edit+1,e._root,e._size),FG=e=>(e._editable=!1,e),dE=k(3,(e,t,n)=>PG(e,t,re(t),n)),PG=k(4,(e,t,n,r)=>{const i={value:e._size},s=e._root.modify(e._editable?e._edit:NaN,0,r,n,t,i);return O(e,LG(s,i.value))}),BO=k(2,(e,t)=>dE(e,t,q)),UG=k(2,(e,t)=>fv(e,uv(),(n,r,i)=>Rh(n,i,t(r,i)))),ML=k(2,(e,t)=>fv(e,void 0,(n,r,i)=>t(r,i))),fv=k(3,(e,t,n)=>{const r=e._root;if(r._tag==="LeafNode")return gt(r.value)?n(t,r.value.value,r.key):t;if(r._tag==="EmptyNode")return t;const i=[r.children];let s;for(;s=i.pop();)for(let a=0,o=s.length;a<o;){const l=s[a++];l&&!Si(l)&&(l._tag==="LeafNode"?gt(l.value)&&(t=n(t,l.value.value,l.key)):i.push(l.children))}return t}),DL="effect/HashSet",$1=Symbol.for(DL),BG={[$1]:$1,[Symbol.iterator](){return RL(this._keyMap)},[be](){return rt(this,Se(re(this._keyMap))(re(DL)))},[ve](e){return HG(e)?I1(this._keyMap)===I1(e._keyMap)&&oe(this._keyMap,e._keyMap):!1},toString(){return at(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(Et)}},[Ue](){return this.toJSON()},pipe(){return ie(this,arguments)}},dv=e=>{const t=Object.create(BG);return t._keyMap=e,t},HG=e=>fe(e,$1),qG=dv(uv()),hv=()=>qG,VG=e=>{const t=hE(hv());for(const n of e)Nh(t,n);return mE(t)},KG=(...e)=>{const t=hE(hv());for(const n of e)Nh(t,n);return mE(t)},GG=k(2,(e,t)=>$G(e._keyMap,t)),YG=e=>I1(e._keyMap),hE=e=>dv(NL(e._keyMap)),mE=e=>(e._keyMap._editable=!1,e),zL=k(2,(e,t)=>{const n=hE(e);return t(n),mE(n)}),Nh=k(2,(e,t)=>e._keyMap._editable?(Rh(t,!0)(e._keyMap),e):dv(Rh(t,!0)(e._keyMap))),jL=k(2,(e,t)=>e._keyMap._editable?(BO(t)(e._keyMap),e):dv(BO(t)(e._keyMap))),JG=k(2,(e,t)=>zL(e,n=>{for(const r of t)jL(n,r)})),QG=k(2,(e,t)=>zL(hv(),n=>{XG(e,r=>Nh(n,r));for(const r of t)Nh(n,r)})),XG=k(2,(e,t)=>ML(e._keyMap,(n,r)=>t(r))),WG=k(3,(e,t,n)=>fv(e._keyMap,t,(r,i,s)=>n(r,s))),_l=hv,ZG=VG,pE=KG,IL=GG,gE=YG,Yd=Nh,$L=jL,HO=JG,Mh=QG,Dh=WG,Gl="Die",kl="Empty",Yl="Fail",bf="Interrupt",zu="Parallel",ju="Sequential",LL="effect/Cause",FL=Symbol.for(LL),eY={_E:e=>e},vf={[FL]:eY,[be](){return O(re(LL),Se(re(dY(this))),rt(this))},[ve](e){return tY(e)&&fY(this,e)},pipe(){return ie(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:Et(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:Et(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:Et(this.left),right:Et(this.right)}}},toString(){return Sf(this)},[Ue](){return this.toJSON()}},fo=(()=>{const e=Object.create(vf);return e._tag=kl,e})(),El=e=>{const t=Object.create(vf);return t._tag=Yl,t.error=e,t},ei=e=>{const t=Object.create(vf);return t._tag=Gl,t.defect=e,t},yi=e=>{const t=Object.create(vf);return t._tag=bf,t.fiberId=e,t},ho=(e,t)=>{const n=Object.create(vf);return n._tag=zu,n.left=e,n.right=t,n},Mn=(e,t)=>{const n=Object.create(vf);return n._tag=ju,n.left=e,n.right=t,n},tY=e=>fe(e,FL),nY=e=>e._tag===kl,rY=e=>e._tag===Yl,PL=e=>e._tag===Gl,iY=e=>e._tag===kl?!0:Iu(e,!0,(t,n)=>{switch(n._tag){case kl:return J(t);case Gl:case Yl:case bf:return J(!1);default:return q()}}),UL=e=>gt(oY(e)),mv=e=>gv(void 0,mY)(e),sY=e=>ea(Iu(e,sn(),(t,n)=>n._tag===Yl?J(O(t,In(n.error))):q())),BL=e=>ea(Iu(e,sn(),(t,n)=>n._tag===Gl?J(O(t,In(n.defect))):q())),yE=e=>Iu(e,_l(),(t,n)=>n._tag===bf?J(O(t,Yd(n.fiberId))):q()),bE=e=>pv(e,t=>t._tag===Yl?J(t.error):q()),HL=e=>{const t=bE(e);switch(t._tag){case"None":return he(e);case"Some":return pe(t.value)}},aY=e=>pv(e,t=>t._tag===Gl?J(t.defect):q()),oY=e=>pv(e,t=>t._tag===bf?J(t.fiberId):q()),qO=e=>vE(e,{onEmpty:fo,onFail:()=>fo,onDie:ei,onInterrupt:yi,onSequential:Mn,onParallel:ho}),lY=e=>vE(e,{onEmpty:fo,onFail:ei,onDie:ei,onInterrupt:yi,onSequential:Mn,onParallel:ho}),cY=k(2,(e,t)=>uY(e,n=>El(t(n)))),uY=k(2,(e,t)=>vE(e,{onEmpty:fo,onFail:n=>t(n),onDie:n=>ei(n),onInterrupt:n=>yi(n),onSequential:(n,r)=>Mn(n,r),onParallel:(n,r)=>ho(n,r)})),fY=(e,t)=>{let n=Jt(e),r=Jt(t);for(;ta(n)&&ta(r);){const[i,s]=O(Ki(n),Iu([_l(),sn()],([l,c],f)=>{const[u,d]=L1(f);return J([O(l,Mh(u)),O(c,Kt(d))])})),[a,o]=O(Ki(r),Iu([_l(),sn()],([l,c],f)=>{const[u,d]=L1(f);return J([O(l,Mh(u)),O(c,Kt(d))])}));if(!oe(i,a))return!1;n=s,r=o}return!0},dY=e=>hY(Jt(e),sn()),hY=(e,t)=>{for(;;){const[n,r]=O(e,rE([_l(),sn()],([s,a],o)=>{const[l,c]=L1(o);return[O(s,Mh(l)),O(a,Kt(c))]})),i=gE(n)>0?O(t,In(n)):t;if(ov(r))return ea(i);e=r,t=i}throw new Error(Qb("Cause.flattenCauseLoop"))},pv=k(2,(e,t)=>{const n=[e];for(;n.length>0;){const r=n.pop(),i=t(r);switch(i._tag){case"None":{switch(r._tag){case ju:case zu:{n.push(r.right),n.push(r.left);break}}break}case"Some":return i}}return q()}),L1=e=>{let t=e;const n=[];let r=_l(),i=sn();for(;t!==void 0;)switch(t._tag){case kl:{if(n.length===0)return[r,i];t=n.pop();break}case Yl:{if(r=Yd(r,v0(t._tag,t.error)),n.length===0)return[r,i];t=n.pop();break}case Gl:{if(r=Yd(r,v0(t._tag,t.defect)),n.length===0)return[r,i];t=n.pop();break}case bf:{if(r=Yd(r,v0(t._tag,t.fiberId)),n.length===0)return[r,i];t=n.pop();break}case ju:{switch(t.left._tag){case kl:{t=t.right;break}case ju:{t=Mn(t.left.left,Mn(t.left.right,t.right));break}case zu:{t=ho(Mn(t.left.left,t.right),Mn(t.left.right,t.right));break}default:{i=In(i,t.right),t=t.left;break}}break}case zu:{n.push(t.right),t=t.left;break}}throw new Error(Qb("Cause.evaluateCauseLoop"))},mY={emptyCase:R1,failCase:Ga,dieCase:Ga,interruptCase:R1,sequentialCase:(e,t,n)=>t&&n,parallelCase:(e,t,n)=>t&&n},VO="SequentialCase",KO="ParallelCase",vE=k(2,(e,{onDie:t,onEmpty:n,onFail:r,onInterrupt:i,onParallel:s,onSequential:a})=>gv(e,void 0,{emptyCase:()=>n,failCase:(o,l)=>r(l),dieCase:(o,l)=>t(l),interruptCase:(o,l)=>i(l),sequentialCase:(o,l,c)=>a(l,c),parallelCase:(o,l,c)=>s(l,c)})),Iu=k(3,(e,t,n)=>{let r=t,i=e;const s=[];for(;i!==void 0;){const a=n(r,i);switch(r=gt(a)?a.value:r,i._tag){case ju:{s.push(i.right),i=i.left;break}case zu:{s.push(i.right),i=i.left;break}default:{i=void 0;break}}i===void 0&&s.length>0&&(i=s.pop())}return r}),gv=k(3,(e,t,n)=>{const r=[e],i=[];for(;r.length>0;){const a=r.pop();switch(a._tag){case kl:{i.push(he(n.emptyCase(t)));break}case Yl:{i.push(he(n.failCase(t,a.error)));break}case Gl:{i.push(he(n.dieCase(t,a.defect)));break}case bf:{i.push(he(n.interruptCase(t,a.fiberId)));break}case ju:{r.push(a.right),r.push(a.left),i.push(pe({_tag:VO}));break}case zu:{r.push(a.right),r.push(a.left),i.push(pe({_tag:KO}));break}}}const s=[];for(;i.length>0;){const a=i.pop();switch(a._tag){case"Left":{switch(a.left._tag){case VO:{const o=s.pop(),l=s.pop(),c=n.sequentialCase(t,o,l);s.push(c);break}case KO:{const o=s.pop(),l=s.pop(),c=n.parallelCase(t,o,l);s.push(c);break}}break}case"Right":{s.push(a.right);break}}}if(s.length===0)throw new Error("BUG: Cause.reduceWithContext - please report an issue at https://github.com/Effect-TS/effect/issues");return s.pop()}),Sf=(e,t)=>mv(e)?"All fibers interrupted without errors.":VL(e).map(function(n){return(t==null?void 0:t.renderErrorCause)!==!0||n.cause===void 0?n.stack:`${n.stack} {
|
|
53
|
+
${qL(n.cause," ")}
|
|
54
|
+
}`}).join(`
|
|
55
|
+
`),qL=(e,t)=>{const n=e.stack.split(`
|
|
56
|
+
`);let r=`${t}[cause]: ${n[0]}`;for(let i=1,s=n.length;i<s;i++)r+=`
|
|
57
|
+
${t}${n[i]}`;return e.cause&&(r+=` {
|
|
58
|
+
${qL(e.cause,`${t} `)}
|
|
59
|
+
${t}}`),r};class Sy extends globalThis.Error{constructor(n){const r=typeof n=="object"&&n!==null,i=Error.stackTraceLimit;Error.stackTraceLimit=1;super(pY(n),r&&"cause"in n&&typeof n.cause<"u"?{cause:new Sy(n.cause)}:void 0);y(this,"span");this.message===""&&(this.message="An error has occurred"),Error.stackTraceLimit=i,this.name=n instanceof Error?n.name:"Error",r&&($u in n&&(this.span=n[$u]),Object.keys(n).forEach(s=>{s in this||(this[s]=n[s])})),this.stack=yY(`${this.name}: ${this.message}`,n instanceof Error&&n.stack?n.stack:"",this.span)}}const pY=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e!==null&&e instanceof Error)return e.message;try{if(fe(e,"toString")&&ff(e.toString)&&e.toString!==Object.prototype.toString&&e.toString!==globalThis.Array.prototype.toString)return e.toString()}catch{}return F$(e)},gY=/\((.*)\)/g,xy=ge("effect/Tracer/spanToTrace",()=>new WeakMap),yY=(e,t,n)=>{const r=[e],i=t.startsWith(e)?t.slice(e.length).split(`
|
|
60
|
+
`):t.split(`
|
|
61
|
+
`);for(let s=1;s<i.length;s++){if(i[s].includes(" at new BaseEffectError")||i[s].includes(" at new YieldableError")){s++;continue}if(i[s].includes("Generator.next")||i[s].includes("effect_internal_function"))break;r.push(i[s].replace(/at .*effect_instruction_i.*\((.*)\)/,"at $1").replace(/EffectPrimitive\.\w+/,"<anonymous>"))}if(n){let s=n,a=0;for(;s&&s._tag==="Span"&&a<10;){const o=xy.get(s);if(typeof o=="function"){const l=o();if(typeof l=="string"){const c=l.matchAll(gY);let f=!1;for(const[,u]of c)f=!0,r.push(` at ${s.name} (${u})`);f||r.push(` at ${s.name} (${l.replace(/^at /,"")})`)}else r.push(` at ${s.name}`)}else r.push(` at ${s.name}`);s=qr(s.parent),a++}}return r.join(`
|
|
62
|
+
`)},$u=Symbol.for("effect/SpanAnnotation"),VL=e=>gv(e,void 0,{emptyCase:()=>[],dieCase:(t,n)=>[new Sy(n)],failCase:(t,n)=>[new Sy(n)],interruptCase:()=>[],parallelCase:(t,n,r)=>[...n,...r],sequentialCase:(t,n,r)=>[...n,...r]}),F1=Symbol.for("effect/Duration"),KL=BigInt(0),GO=BigInt(24),wp=BigInt(60),P1=BigInt(1e3),YO=BigInt(1e6),JO=BigInt(1e9),bY=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,ii=e=>{if(GL(e))return e;if(Ws(e))return Fu(e);if(Jb(e))return S0(e);if(Array.isArray(e)&&e.length===2&&e.every(Ws))return e[0]===-1/0||e[1]===-1/0||Number.isNaN(e[0])||Number.isNaN(e[1])?Lu:e[0]===1/0||e[1]===1/0?wY:S0(BigInt(Math.round(e[0]*1e9))+BigInt(Math.round(e[1])));if(ri(e)){const t=bY.exec(e);if(t){const[n,r,i]=t,s=Number(r);switch(i){case"nano":case"nanos":return S0(BigInt(r));case"micro":case"micros":return _Y(BigInt(r));case"milli":case"millis":return Fu(s);case"second":case"seconds":return JL(s);case"minute":case"minutes":return kY(s);case"hour":case"hours":return EY(s);case"day":case"days":return CY(s);case"week":case"weeks":return TY(s)}}}throw new Error("Invalid DurationInput")},QO={_tag:"Millis",millis:0},vY={_tag:"Infinity"},SY={[F1]:F1,[be](){return rt(this,$$(this.value))},[ve](e){return GL(e)&&zY(this,e)},toString(){return`Duration(${IY(this)})`},toJSON(){switch(this.value._tag){case"Millis":return{_id:"Duration",_tag:"Millis",millis:this.value.millis};case"Nanos":return{_id:"Duration",_tag:"Nanos",hrtime:OY(this)};case"Infinity":return{_id:"Duration",_tag:"Infinity"}}},[Ue](){return this.toJSON()},pipe(){return ie(this,arguments)}},os=e=>{const t=Object.create(SY);return Ws(e)?isNaN(e)||e<=0?t.value=QO:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:"Millis",millis:e}:t.value={_tag:"Nanos",nanos:BigInt(Math.round(e*1e6))}:t.value=vY:e<=KL?t.value=QO:t.value={_tag:"Nanos",nanos:e},t},GL=e=>fe(e,F1),YL=e=>e.value._tag!=="Infinity",xY=e=>{switch(e.value._tag){case"Millis":return e.value.millis===0;case"Nanos":return e.value.nanos===KL;case"Infinity":return!1}},Lu=os(0),wY=os(1/0),S0=e=>os(e),_Y=e=>os(e*P1),Fu=e=>os(e),JL=e=>os(e*1e3),kY=e=>os(e*6e4),EY=e=>os(e*36e5),CY=e=>os(e*864e5),TY=e=>os(e*6048e5),wy=e=>RY(e,{onMillis:t=>t,onNanos:t=>Number(t)/1e6}),AY=e=>{const t=ii(e);switch(t.value._tag){case"Infinity":throw new Error("Cannot convert infinite duration to nanos");case"Nanos":return t.value.nanos;case"Millis":return BigInt(Math.round(t.value.millis*1e6))}},OY=e=>{const t=ii(e);switch(t.value._tag){case"Infinity":return[1/0,0];case"Nanos":return[Number(t.value.nanos/JO),Number(t.value.nanos%JO)];case"Millis":return[Math.floor(t.value.millis/1e3),Math.round(t.value.millis%1e3*1e6)]}},RY=k(2,(e,t)=>{const n=ii(e);switch(n.value._tag){case"Nanos":return t.onNanos(n.value.nanos);case"Infinity":return t.onMillis(1/0);case"Millis":return t.onMillis(n.value.millis)}}),SE=k(3,(e,t,n)=>{const r=ii(e),i=ii(t);if(r.value._tag==="Infinity"||i.value._tag==="Infinity")return n.onMillis(wy(r),wy(i));if(r.value._tag==="Nanos"||i.value._tag==="Nanos"){const s=r.value._tag==="Nanos"?r.value.nanos:BigInt(Math.round(r.value.millis*1e6)),a=i.value._tag==="Nanos"?i.value.nanos:BigInt(Math.round(i.value.millis*1e6));return n.onNanos(s,a)}return n.onMillis(r.value.millis,i.value.millis)}),NY=(e,t)=>SE(e,t,{onMillis:(n,r)=>n===r,onNanos:(n,r)=>n===r}),MY=k(2,(e,t)=>SE(e,t,{onMillis:(n,r)=>n<=r,onNanos:(n,r)=>n<=r})),DY=k(2,(e,t)=>SE(e,t,{onMillis:(n,r)=>n>=r,onNanos:(n,r)=>n>=r})),zY=k(2,(e,t)=>NY(ii(e),ii(t))),jY=e=>{const t=ii(e);if(t.value._tag==="Infinity")return{days:1/0,hours:1/0,minutes:1/0,seconds:1/0,millis:1/0,nanos:1/0};const n=AY(t),r=n/YO,i=r/P1,s=i/wp,a=s/wp,o=a/GO;return{days:Number(o),hours:Number(a%GO),minutes:Number(s%wp),seconds:Number(i%wp),millis:Number(r%P1),nanos:Number(n%YO)}},IY=e=>{const t=ii(e);if(t.value._tag==="Infinity")return"Infinity";if(xY(t))return"0";const n=jY(t),r=[];return n.days!==0&&r.push(`${n.days}d`),n.hours!==0&&r.push(`${n.hours}h`),n.minutes!==0&&r.push(`${n.minutes}m`),n.seconds!==0&&r.push(`${n.seconds}s`),n.millis!==0&&r.push(`${n.millis}ms`),n.nanos!==0&&r.push(`${n.nanos}ns`),r.join(" ")},XO=Symbol.for("effect/MutableRef"),$Y={[XO]:XO,toString(){return at(this.toJSON())},toJSON(){return{_id:"MutableRef",current:Et(this.current)}},[Ue](){return this.toJSON()},pipe(){return ie(this,arguments)}},Sm=e=>{const t=Object.create($Y);return t.current=e,t},LY=k(3,(e,t,n)=>oe(t,e.current)?(e.current=n,!0):!1),Wt=e=>e.current,xm=k(2,(e,t)=>(e.current=t,e)),yv="effect/FiberId",Cl=Symbol.for(yv),Pu="None",U1="Runtime",B1="Composite",FY=vt(`${yv}-${Pu}`);var aD;let PY=class{constructor(){y(this,aD,Cl);y(this,"_tag",Pu);y(this,"id",-1);y(this,"startTimeMillis",-1)}[(aD=Cl,be)](){return FY}[ve](t){return xE(t)&&t._tag===Pu}toString(){return at(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[Ue](){return this.toJSON()}};var oD;class QL{constructor(t,n){y(this,"id");y(this,"startTimeMillis");y(this,oD,Cl);y(this,"_tag",U1);this.id=t,this.startTimeMillis=n}[(oD=Cl,be)](){return rt(this,vt(`${yv}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[ve](t){return xE(t)&&t._tag===U1&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return at(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[Ue](){return this.toJSON()}}var lD;let UY=class{constructor(t,n){y(this,"left");y(this,"right");y(this,lD,Cl);y(this,"_tag",B1);y(this,"_hash");this.left=t,this.right=n}[(lD=Cl,be)](){return O(vt(`${yv}-${this._tag}`),Se(re(this.left)),Se(re(this.right)),rt(this))}[ve](t){return xE(t)&&t._tag===B1&&oe(this.left,t.left)&&oe(this.right,t.right)}toString(){return at(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,left:Et(this.left),right:Et(this.right)}}[Ue](){return this.toJSON()}};const XL=new PY,xE=e=>fe(e,Cl),WL=k(2,(e,t)=>e._tag===Pu?t:t._tag===Pu?e:new UY(e,t)),BY=e=>O(e,Dh(XL,(t,n)=>WL(n)(t))),_y=e=>{switch(e._tag){case Pu:return _l();case U1:return pE(e.id);case B1:return O(_y(e.left),Mh(_y(e.right)))}},WO=ge(Symbol.for("effect/Fiber/Id/_fiberCounter"),()=>Sm(0)),HY=(e,t)=>new QL(e,t),ZL=e=>Array.from(_y(e)).map(n=>`#${n}`).join(","),qY=()=>{const e=Wt(WO);return O(WO,xm(e+1)),new QL(e,Date.now())},Or=XL,Jd=WL,VY=BY,e3=_y,KY=HY,GY=ZL,t3=qY,bv=uv,YY=DG,JY=jG,n3=IG,r3=Rh,i3=RL,QY=dE,XY=UG,WY=ML,s3=fv,zh=Symbol.for("effect/List"),H1=e=>Qe(e),ZY=e=>eL(sv(e),H1),eJ=ZY(oe),tJ={[zh]:zh,_tag:"Cons",toString(){return at(this.toJSON())},toJSON(){return{_id:"List",_tag:"Cons",values:H1(this).map(Et)}},[Ue](){return this.toJSON()},[ve](e){return o3(e)&&this._tag===e._tag&&eJ(this,e)},[be](){return rt(this,df(H1(this)))},[Symbol.iterator](){let e=!1,t=this;return{next(){if(e)return this.return();if(t._tag==="Nil")return e=!0,this.return();const n=t.head;return t=t.tail,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},pipe(){return ie(this,arguments)}},ky=(e,t)=>{const n=Object.create(tJ);return n.head=e,n.tail=t,n},nJ=vt("Nil"),rJ={[zh]:zh,_tag:"Nil",toString(){return at(this.toJSON())},toJSON(){return{_id:"List",_tag:"Nil"}},[Ue](){return this.toJSON()},[be](){return nJ},[ve](e){return o3(e)&&this._tag===e._tag},[Symbol.iterator](){return{next(){return{done:!0,value:void 0}}}},pipe(){return ie(this,arguments)}},a3=Object.create(rJ),o3=e=>fe(e,zh),Ks=e=>e._tag==="Nil",iJ=e=>e._tag==="Cons",sJ=()=>a3,Tl=(e,t)=>ky(e,t),Uu=sJ,wE=e=>ky(e,a3),aJ=k(2,(e,t)=>lJ(t,e)),oJ=k(2,(e,t)=>Tl(t,e)),lJ=k(2,(e,t)=>{if(Ks(e))return t;if(Ks(t))return e;{const n=ky(t.head,e);let r=n,i=t.tail;for(;!Ks(i);){const s=ky(i.head,e);r.tail=s,r=s,i=i.tail}return n}}),cJ=k(3,(e,t,n)=>{let r=t,i=e;for(;!Ks(i);)r=n(r,i.head),i=i.tail;return r}),uJ=e=>{let t=Uu(),n=e;for(;!Ks(n);)t=oJ(t,n.head),n=n.tail;return t},fJ=Object.assign(Object.create(Array.prototype),{[be](){return rt(this,df(this))},[ve](e){return Array.isArray(e)&&this.length===e.length?this.every((t,n)=>oe(t,e[n])):!1}}),wm=function(){function e(t){t&&Object.assign(this,t)}return e.prototype=nv,e}(),dJ=e=>Object.assign(Object.create(nv),e),hJ=Symbol.for("effect/DifferContextPatch");function ZO(e){return e}const _m={...wm.prototype,[hJ]:{_Value:ZO,_Patch:ZO}},mJ=Object.assign(Object.create(_m),{_tag:"Empty"}),pJ=Object.create(mJ),l3=()=>pJ,gJ=Object.assign(Object.create(_m),{_tag:"AndThen"}),yJ=(e,t)=>{const n=Object.create(gJ);return n.first=e,n.second=t,n},bJ=Object.assign(Object.create(_m),{_tag:"AddService"}),vJ=(e,t)=>{const n=Object.create(bJ);return n.key=e,n.service=t,n},SJ=Object.assign(Object.create(_m),{_tag:"RemoveService"}),xJ=e=>{const t=Object.create(SJ);return t.key=e,t},wJ=Object.assign(Object.create(_m),{_tag:"UpdateService"}),_J=(e,t)=>{const n=Object.create(wJ);return n.key=e,n.update=t,n},kJ=(e,t)=>{const n=new Map(e.unsafeMap);let r=l3();for(const[i,s]of t.unsafeMap.entries())if(n.has(i)){const a=n.get(i);n.delete(i),oe(a,s)||(r=ug(_J(i,()=>s))(r))}else n.delete(i),r=ug(vJ(i,s))(r);for(const[i]of n.entries())r=ug(xJ(i))(r);return r},ug=k(2,(e,t)=>yJ(e,t)),EJ=k(2,(e,t)=>{if(e._tag==="Empty")return t;let n=!1,r=Jt(e);const i=new Map(t.unsafeMap);for(;ta(r);){const a=Ki(r),o=js(r);switch(a._tag){case"Empty":{r=o;break}case"AddService":{i.set(a.key,a.service),r=o;break}case"AndThen":{r=In(In(o,a.second),a.first);break}case"RemoveService":{i.delete(a.key),r=o;break}case"UpdateService":{i.set(a.key,a.update(i.get(a.key))),n=!0,r=o;break}}}if(!n)return lo(i);const s=new Map;for(const[a]of t.unsafeMap)i.has(a)&&(s.set(a,i.get(a)),i.delete(a));for(const[a,o]of i)s.set(a,o);return lo(s)}),CJ=Symbol.for("effect/DifferHashSetPatch");function x0(e){return e}const vv={...wm.prototype,[CJ]:{_Value:x0,_Key:x0,_Patch:x0}},TJ=Object.assign(Object.create(vv),{_tag:"Empty"}),AJ=Object.create(TJ),c3=()=>AJ,OJ=Object.assign(Object.create(vv),{_tag:"AndThen"}),RJ=(e,t)=>{const n=Object.create(OJ);return n.first=e,n.second=t,n},NJ=Object.assign(Object.create(vv),{_tag:"Add"}),MJ=e=>{const t=Object.create(NJ);return t.value=e,t},DJ=Object.assign(Object.create(vv),{_tag:"Remove"}),zJ=e=>{const t=Object.create(DJ);return t.value=e,t},jJ=(e,t)=>{const[n,r]=Dh([e,c3()],([i,s],a)=>IL(a)(i)?[$L(a)(i),s]:[i,q1(MJ(a))(s)])(t);return Dh(r,(i,s)=>q1(zJ(s))(i))(n)},q1=k(2,(e,t)=>RJ(e,t)),IJ=k(2,(e,t)=>{if(e._tag==="Empty")return t;let n=t,r=Jt(e);for(;ta(r);){const i=Ki(r),s=js(r);switch(i._tag){case"Empty":{r=s;break}case"AndThen":{r=In(i.first)(In(i.second)(s));break}case"Add":{n=Yd(i.value)(n),r=s;break}case"Remove":n=$L(i.value)(n),r=s}}return n}),$J=Symbol.for("effect/DifferReadonlyArrayPatch");function e2(e){return e}const km={...wm.prototype,[$J]:{_Value:e2,_Patch:e2}},LJ=Object.assign(Object.create(km),{_tag:"Empty"}),FJ=Object.create(LJ),u3=()=>FJ,PJ=Object.assign(Object.create(km),{_tag:"AndThen"}),UJ=(e,t)=>{const n=Object.create(PJ);return n.first=e,n.second=t,n},BJ=Object.assign(Object.create(km),{_tag:"Append"}),HJ=e=>{const t=Object.create(BJ);return t.values=e,t},qJ=Object.assign(Object.create(km),{_tag:"Slice"}),VJ=(e,t)=>{const n=Object.create(qJ);return n.from=e,n.until=t,n},KJ=Object.assign(Object.create(km),{_tag:"Update"}),GJ=(e,t)=>{const n=Object.create(KJ);return n.index=e,n.patch=t,n},YJ=e=>{let t=0,n=u3();for(;t<e.oldValue.length&&t<e.newValue.length;){const r=e.oldValue[t],i=e.newValue[t],s=e.differ.diff(r,i);oe(s,e.differ.empty)||(n=fg(n,GJ(t,s))),t=t+1}return t<e.oldValue.length&&(n=fg(n,VJ(0,t))),t<e.newValue.length&&(n=fg(n,HJ(iG(t)(e.newValue)))),n},fg=k(2,(e,t)=>UJ(e,t)),JJ=k(3,(e,t,n)=>{if(e._tag==="Empty")return t;let r=t.slice(),i=mi(e);for(;nu(i);){const s=Jn(i),a=xl(i);switch(s._tag){case"Empty":{i=a;break}case"AndThen":{a.unshift(s.first,s.second),i=a;break}case"Append":{for(const o of s.values)r.push(o);i=a;break}case"Slice":{r=r.slice(s.from,s.until),i=a;break}case"Update":{r[s.index]=n.patch(s.patch,r[s.index]),i=a;break}}}return r}),QJ=Symbol.for("effect/Differ"),XJ={[QJ]:{_P:ce,_V:ce},pipe(){return ie(this,arguments)}},xf=e=>{const t=Object.create(XJ);return t.empty=e.empty,t.diff=e.diff,t.combine=e.combine,t.patch=e.patch,t},WJ=()=>xf({empty:l3(),combine:(e,t)=>ug(t)(e),diff:(e,t)=>kJ(e,t),patch:(e,t)=>EJ(t)(e)}),ZJ=()=>xf({empty:c3(),combine:(e,t)=>q1(t)(e),diff:(e,t)=>jJ(e,t),patch:(e,t)=>IJ(t)(e)}),eQ=e=>xf({empty:u3(),combine:(t,n)=>fg(t,n),diff:(t,n)=>YJ({oldValue:t,newValue:n,differ:e}),patch:(t,n)=>JJ(t,n,e)}),f3=()=>tQ((e,t)=>t),tQ=e=>xf({empty:ce,combine:(t,n)=>t===ce?n:n===ce?t:r=>n(t(r)),diff:(t,n)=>oe(t,n)?ce:gm(n),patch:(t,n)=>e(n,t(n))}),jh=255,d3=8,V1=e=>e&jh,K1=e=>e>>d3&jh,Em=(e,t)=>(e&jh)+((t&e&jh)<<d3),nQ=Em(0,0),rQ=e=>Em(e,e),iQ=e=>Em(e,0),sQ=k(2,(e,t)=>Em(V1(e)&~t,K1(e))),aQ=k(2,(e,t)=>e|t),oQ=e=>~e>>>0&jh,lQ=0,Jl=1,cQ=2,h3=4,G1=16,m3=32,uQ=e=>Sv(e,m3),fQ=k(2,(e,t)=>e&~t),dQ=k(2,(e,t)=>e|t),Ea=e=>p3(e)&&!mQ(e),p3=e=>Sv(e,Jl),Sv=k(2,(e,t)=>(e&t)!==0),g3=(...e)=>e.reduce((t,n)=>t|n,0),hQ=g3(lQ),t2=e=>Sv(e,h3),mQ=e=>Sv(e,G1),Ja=k(2,(e,t)=>Em(e^t,t)),iu=k(2,(e,t)=>e&(oQ(V1(t))|K1(t))|V1(t)&K1(t)),n2=xf({empty:nQ,diff:(e,t)=>Ja(e,t),combine:(e,t)=>aQ(t)(e),patch:(e,t)=>iu(t,e)}),pQ=rQ,y3=iQ,r2=sQ,b3=(e,t)=>({_tag:"Par",left:e,right:t}),_p=(e,t)=>({_tag:"Seq",left:e,right:t}),gQ=e=>{let t=wE(e),n=Uu();for(;;){const[r,i]=cJ(t,[v3(),Uu()],([s,a],o)=>{const[l,c]=yQ(o);return[wQ(s,l),aJ(a,c)]});if(n=bQ(n,r),Ks(i))return uJ(n);t=i}throw new Error("BUG: BlockedRequests.flatten - please report an issue at https://github.com/Effect-TS/effect/issues")},yQ=e=>{let t=e,n=v3(),r=Uu(),i=Uu();for(;;)switch(t._tag){case"Empty":{if(Ks(r))return[n,i];t=r.head,r=r.tail;break}case"Par":{r=Tl(t.right,r),t=t.left;break}case"Seq":{const s=t.left,a=t.right;switch(s._tag){case"Empty":{t=a;break}case"Par":{const o=s.left,l=s.right;t=b3(_p(o,a),_p(l,a));break}case"Seq":{const o=s.left,l=s.right;t=_p(o,_p(l,a));break}case"Single":{t=s,i=Tl(a,i);break}}break}case"Single":{if(n=xQ(n,t),Ks(r))return[n,i];t=r.head,r=r.tail;break}}throw new Error("BUG: BlockedRequests.step - please report an issue at https://github.com/Effect-TS/effect/issues")},bQ=(e,t)=>{if(Ks(e))return wE(w0(t));if(_Q(t))return e;const n=OQ(e.head),r=kQ(t);return n.length===1&&r.length===1&&oe(n[0],r[0])?Tl(AQ(e.head,w0(t)),e.tail):Tl(w0(t),e)},vQ=Symbol.for("effect/RequestBlock/RequestBlockParallel"),SQ={_R:e=>e};var cD;cD=vQ;class _E{constructor(t){y(this,"map");y(this,cD,SQ);this.map=t}}const v3=()=>new _E(bv()),xQ=(e,t)=>new _E(QY(e.map,t.dataSource,n=>DK(Gn(n,z1(t.blockedRequest)),()=>Jt(t.blockedRequest)))),wQ=(e,t)=>new _E(s3(e.map,t.map,(n,r,i)=>r3(n,i,pt(n3(n,i),{onNone:()=>r,onSome:s=>Kt(r,s)})))),_Q=e=>JY(e.map),kQ=e=>Array.from(i3(e.map)),w0=e=>TQ(XY(e.map,t=>Jt(t))),EQ=Symbol.for("effect/RequestBlock/RequestBlockSequential"),CQ={_R:e=>e};var uD;uD=EQ;class S3{constructor(t){y(this,"map");y(this,uD,CQ);this.map=t}}const TQ=e=>new S3(e),AQ=(e,t)=>new S3(s3(t.map,e.map,(n,r,i)=>r3(n,i,pt(n3(n,i),{onNone:()=>sn(),onSome:s=>Kt(s,r)})))),OQ=e=>Array.from(i3(e.map)),RQ=e=>Array.from(e.map),Cm="Pending",xv="Done",NQ="effect/Deferred",MQ=Symbol.for(NQ),DQ={_E:e=>e,_A:e=>e},zQ=e=>({_tag:Cm,joiners:e}),x3=e=>({_tag:xv,effect:e});class Tm{constructor(t){y(this,"self");y(this,"called",!1);this.self=t}next(t){return this.called?{value:t,done:!0}:(this.called=!0,{value:this.self,done:!1})}return(t){return{value:t,done:!0}}throw(t){throw t}[Symbol.iterator](){return new Tm(this.self)}}const w3=(e,t)=>{const n=new Qt("Blocked");return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n},jQ=e=>{const t=new Qt("RunBlocked");return t.effect_instruction_i0=e,t},Al=Symbol.for("effect/Effect");class IQ{constructor(t,n){y(this,"patch");y(this,"op");y(this,"_op",Kk);this.patch=t,this.op=n}}var fD;class Qt{constructor(t){y(this,"_op");y(this,"effect_instruction_i0");y(this,"effect_instruction_i1");y(this,"effect_instruction_i2");y(this,"trace");y(this,fD,Nu);this._op=t}[(fD=Al,ve)](t){return this===t}[be](){return rt(this,Bk(this))}pipe(){return ie(this,arguments)}toJSON(){return{_id:"Effect",_op:this._op,effect_instruction_i0:Et(this.effect_instruction_i0),effect_instruction_i1:Et(this.effect_instruction_i1),effect_instruction_i2:Et(this.effect_instruction_i2)}}toString(){return at(this.toJSON())}[Ue](){return this.toJSON()}[Symbol.iterator](){return new Tm(new ym(this))}}var dD;class _3{constructor(t){y(this,"_op");y(this,"effect_instruction_i0");y(this,"effect_instruction_i1");y(this,"effect_instruction_i2");y(this,"trace");y(this,dD,Nu);this._op=t,this._tag=t}[(dD=Al,ve)](t){return Nv(t)&&t._op==="Failure"&&oe(this.effect_instruction_i0,t.effect_instruction_i0)}[be](){return O(vt(this._tag),Se(re(this.effect_instruction_i0)),rt(this))}get cause(){return this.effect_instruction_i0}pipe(){return ie(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,cause:this.cause.toJSON()}}toString(){return at(this.toJSON())}[Ue](){return this.toJSON()}[Symbol.iterator](){return new Tm(new ym(this))}}var hD;class k3{constructor(t){y(this,"_op");y(this,"effect_instruction_i0");y(this,"effect_instruction_i1");y(this,"effect_instruction_i2");y(this,"trace");y(this,hD,Nu);this._op=t,this._tag=t}[(hD=Al,ve)](t){return Nv(t)&&t._op==="Success"&&oe(this.effect_instruction_i0,t.effect_instruction_i0)}[be](){return O(vt(this._tag),Se(re(this.effect_instruction_i0)),rt(this))}get value(){return this.effect_instruction_i0}pipe(){return ie(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,value:Et(this.value)}}toString(){return at(this.toJSON())}[Ue](){return this.toJSON()}[Symbol.iterator](){return new Tm(new ym(this))}}const oa=e=>fe(e,Al),He=e=>{const t=new Qt(B$);return t.effect_instruction_i0=e,t},E3=k(3,(e,t,n)=>Ai(r=>B(e,i=>B(Qa(Te(()=>r(t(i)))),s=>Te(()=>n(i,s)).pipe(si({onFailure:a=>{switch(s._tag){case mn:return an(Mn(s.effect_instruction_i0,a));case pn:return an(a)}},onSuccess:()=>s})))))),Xn=k(2,(e,t)=>B(e,()=>te(t))),oi=e=>Xn(e,void 0),C3=function(){const e=new Qt(tv);switch(arguments.length){case 2:{e.effect_instruction_i0=arguments[0],e.commit=arguments[1];break}case 3:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.commit=arguments[2];break}case 4:{e.effect_instruction_i0=arguments[0],e.effect_instruction_i1=arguments[1],e.effect_instruction_i2=arguments[2],e.commit=arguments[3];break}default:throw new Error(Qb("you're not supposed to end up here"))}return e},Ey=(e,t=Or)=>{const n=new Qt(Vd);let r;return n.effect_instruction_i0=i=>{r=e(i)},n.effect_instruction_i1=t,Om(n,i=>oa(r)?r:nt)},Ia=(e,t=Or)=>Te(()=>Ey(e,t)),Ti=(e,t=Or)=>C3(e,function(){let n,r;function i(l){n?n(l):r===void 0&&(r=l)}const s=new Qt(Vd);s.effect_instruction_i0=l=>{n=l,r&&l(r)},s.effect_instruction_i1=t;let a,o;return this.effect_instruction_i0.length!==1?(o=new AbortController,a=xn(()=>this.effect_instruction_i0(i,o.signal))):a=xn(()=>this.effect_instruction_i0(i)),a||o?Om(s,l=>(o&&o.abort(),a??nt)):s}),T3=k(2,(e,t)=>{const n=new Qt(og);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),Ih=k(2,(e,t)=>mo(e,{onFailure:t,onSuccess:te})),i2=Symbol.for("effect/OriginalAnnotation"),kE=(e,t)=>gt(t)?new Proxy(e,{has(n,r){return r===$u||r===i2||r in n},get(n,r){return r===$u?t.value:r===i2?e:n[r]}}):e,$a=e=>Ci(e)&&!($u in e)?He(t=>an(ei(kE(e,PE(t))))):an(ei(e)),A3=e=>O3(()=>ei(new pX(e))),Bu=e=>mo(e,{onFailure:t=>te(pe(t)),onSuccess:t=>te(he(t))}),Qa=e=>R3(e,{onFailure:Ze,onSuccess:tt}),zt=e=>Ci(e)&&!($u in e)?He(t=>an(El(kE(e,PE(t))))):an(El(e)),wv=e=>B(K(e),zt),an=e=>{const t=new _3(mn);return t.effect_instruction_i0=e,t},O3=e=>B(K(e),an),_v=He(e=>te(e.id())),Am=e=>He(t=>e(t.id())),B=k(2,(e,t)=>{const n=new Qt(fy);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),$Q=e=>{const t=new Qt("OnStep");return t.effect_instruction_i0=e,t},kv=e=>B(e,ce),R3=k(2,(e,t)=>si(e,{onFailure:n=>te(t.onFailure(n)),onSuccess:n=>te(t.onSuccess(n))})),si=k(2,(e,t)=>{const n=new Qt(dy);return n.effect_instruction_i0=e,n.effect_instruction_i1=t.onFailure,n.effect_instruction_i2=t.onSuccess,n}),mo=k(2,(e,t)=>si(e,{onFailure:n=>{if(BL(n).length>0)return an(lY(n));const i=sY(n);return i.length>0?t.onFailure(aE(i)):an(n)},onSuccess:t.onSuccess})),Is=k(2,(e,t)=>Te(()=>{const n=Qe(e),r=iv(n.length);let i=0;return Xn(OE({while:()=>i<n.length,body:()=>t(n[i],i),step:s=>{r[i++]=s}}),r)})),Ev=k(2,(e,t)=>Te(()=>{const n=Qe(e);let r=0;return OE({while:()=>r<n.length,body:()=>t(n[r],r),step:()=>{r++}})})),Es=B(_v,e=>N3(e)),N3=e=>an(yi(e)),EE=e=>{const t=new Qt(hf);return t.effect_instruction_i0=pQ(Jl),t.effect_instruction_i1=()=>e,t},M3=k(2,(e,t)=>Ai(n=>B(Qa(n(e)),r=>Y3(t,r)))),Ae=k(2,(e,t)=>B(e,n=>K(()=>t(n)))),CE=k(2,(e,t)=>mo(e,{onFailure:n=>wv(()=>t.onFailure(n)),onSuccess:n=>K(()=>t.onSuccess(n))})),Cv=k(2,(e,t)=>si(e,{onFailure:n=>{const r=HL(n);switch(r._tag){case"Left":return wv(()=>t(r.left));case"Right":return an(r.right)}},onSuccess:te})),Ol=k(2,(e,t)=>Ai(n=>si(n(e),{onFailure:r=>{const i=Ze(r);return si(t(i),{onFailure:s=>Ze(Mn(r,s)),onSuccess:()=>i})},onSuccess:r=>{const i=tt(r);return Nt(t(i),i)}}))),Om=k(2,(e,t)=>Ol(e,Mv({onFailure:n=>mv(n)?oi(t(yE(n))):nt,onSuccess:()=>nt}))),LQ=e=>FQ(e,ce),FQ=k(2,(e,t)=>mo(e,{onFailure:n=>$a(t(n)),onSuccess:te})),PQ=He((e,t)=>te(t.runtimeFlags)),te=e=>{const t=new k3(pn);return t.effect_instruction_i0=e,t},Te=e=>{const t=new Qt(tv);return t.commit=e,t},K=e=>{const t=new Qt(U$);return t.effect_instruction_i0=e,t},TE=k(e=>e.length===3||e.length===2&&!(Ci(e[1])&&"onlyEffect"in e[1]),(e,t)=>B(e,n=>{const r=typeof t=="function"?t(n):t;return oa(r)?Xn(r,n):y7(r)?Ey(i=>{r.then(s=>i(te(n)),s=>i(zt(new jE(s,"An unknown error occurred in Effect.tap"))))}):te(n)})),UQ=e=>He(t=>{const n=t.getFiberRef(Q1),r=O(n,ut(()=>t.scope()));return e(wf(Q1,J(r)))}),Rm=e=>{const t=new Qt(hf);return t.effect_instruction_i0=y3(Jl),t.effect_instruction_i1=()=>e,t},Ai=e=>C3(e,function(){const t=new Qt(hf);return t.effect_instruction_i0=y3(Jl),t.effect_instruction_i1=n=>p3(n)?xn(()=>this.effect_instruction_i0(EE)):xn(()=>this.effect_instruction_i0(Rm)),t}),nt=te(void 0),D3=e=>{const t=new Qt(hf);return t.effect_instruction_i0=e,t.effect_instruction_i1=void 0,t},AE=k(2,(e,t)=>B(t,n=>n?O(e,Ae(J)):te(q()))),OE=e=>{const t=new Qt(hy);return t.effect_instruction_i0=e.while,t.effect_instruction_i1=e.body,t.effect_instruction_i2=e.step,t},Y1=e=>Te(()=>{const t=new Qt(Kd);return t.effect_instruction_i0=e(),t}),z3=function(){const e=arguments.length===1?arguments[0]:arguments[1].bind(arguments[0]);return Y1(()=>e(O))},j3=(e,...t)=>Object.defineProperty(t.length===0?function(...n){return Y1(()=>e.apply(this,n))}:function(...n){let r=Y1(()=>e.apply(this,n));for(const i of t)r=i(r,...n);return r},"length",{value:e.length,configurable:!0}),BQ=k(2,(e,t)=>{const n=new Qt(hf);return n.effect_instruction_i0=t,n.effect_instruction_i1=()=>e,n}),RE=e=>{const t=new Qt(lg);return typeof(e==null?void 0:e.priority)<"u"?aX(t,e.priority):t},Tv=k(2,(e,t)=>B(e,n=>Ae(t,r=>[n,r]))),Av=k(2,(e,t)=>B(e,n=>Xn(t,n))),Nt=k(2,(e,t)=>B(e,()=>t)),I3=k(3,(e,t,n)=>B(e,r=>Ae(t,i=>n(r,i)))),HQ=Ia(()=>{const e=setInterval(()=>{},2147483647);return K(()=>clearInterval(e))}),NE=e=>B(_v,t=>O(e,$h(t))),$h=k(2,(e,t)=>B(e.interruptAsFork(t),()=>e.await)),qQ={_tag:"All",syslog:0,label:"ALL",ordinal:Number.MIN_SAFE_INTEGER,pipe(){return ie(this,arguments)}},VQ={_tag:"Fatal",syslog:2,label:"FATAL",ordinal:5e4,pipe(){return ie(this,arguments)}},KQ={_tag:"Error",syslog:3,label:"ERROR",ordinal:4e4,pipe(){return ie(this,arguments)}},$3={_tag:"Warning",syslog:4,label:"WARN",ordinal:3e4,pipe(){return ie(this,arguments)}},L3={_tag:"Info",syslog:6,label:"INFO",ordinal:2e4,pipe(){return ie(this,arguments)}},F3={_tag:"Debug",syslog:7,label:"DEBUG",ordinal:1e4,pipe(){return ie(this,arguments)}},GQ={_tag:"Trace",syslog:7,label:"TRACE",ordinal:0,pipe(){return ie(this,arguments)}},YQ={_tag:"None",syslog:7,label:"OFF",ordinal:Number.MAX_SAFE_INTEGER,pipe(){return ie(this,arguments)}},JQ="effect/FiberRef",QQ=Symbol.for(JQ),XQ={_A:e=>e},ME=e=>He(t=>tt(t.getFiberRef(e))),Ov=k(2,(e,t)=>B(ME(e),t)),s2=k(2,(e,t)=>WQ(e,()=>[void 0,t])),WQ=k(2,(e,t)=>He(n=>{const[r,i]=t(n.getFiberRef(e));return n.setFiberRef(e,i),te(r)})),wf=k(3,(e,t,n)=>E3(Av(ME(t),s2(t,n)),()=>e,r=>s2(t,r))),ZQ=k(3,(e,t,n)=>Ov(t,r=>wf(e,t,n(r)))),on=(e,t)=>_f(e,{differ:f3(),fork:(t==null?void 0:t.fork)??ce,join:t==null?void 0:t.join}),eX=e=>{const t=ZJ();return _f(e,{differ:t,fork:t.empty})},tX=e=>{const t=eQ(f3());return _f(e,{differ:t,fork:t.empty})},P3=e=>{const t=WJ();return _f(e,{differ:t,fork:t.empty})},_f=(e,t)=>({...vm,[QQ]:XQ,initial:e,commit(){return ME(this)},diff:(r,i)=>t.differ.diff(r,i),combine:(r,i)=>t.differ.combine(r,i),patch:r=>i=>t.differ.patch(r,i),fork:t.fork,join:t.join??((r,i)=>i)}),nX=e=>_f(e,{differ:n2,fork:n2.empty}),ls=ge(Symbol.for("effect/FiberRef/currentContext"),()=>P3(ns())),kf=ge(Symbol.for("effect/FiberRef/currentSchedulingPriority"),()=>on(0)),U3=ge(Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"),()=>on(2048)),rX=ge(Symbol.for("effect/FiberRef/currentLogAnnotation"),()=>on(bv())),iX=ge(Symbol.for("effect/FiberRef/currentLogLevel"),()=>on(L3)),sX=ge(Symbol.for("effect/FiberRef/currentLogSpan"),()=>on(Uu())),aX=k(2,(e,t)=>wf(e,kf,t)),oX=ge(Symbol.for("effect/FiberRef/currentConcurrency"),()=>on("unbounded")),lX=ge(Symbol.for("effect/FiberRef/currentRequestBatching"),()=>on(!0)),cX=ge(Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"),()=>on(J(F3))),uX=ge(Symbol.for("effect/FiberRef/versionMismatchErrorLogLevel"),()=>on(J($3))),J1=ge(Symbol.for("effect/FiberRef/currentMetricLabels"),()=>tX(co())),Q1=ge(Symbol.for("effect/FiberRef/currentForkScopeOverride"),()=>on(q(),{fork:()=>q(),join:(e,t)=>e})),kp=ge(Symbol.for("effect/FiberRef/currentInterruptedCause"),()=>on(fo,{fork:()=>fo,join:(e,t)=>e})),B3=ge(Symbol.for("effect/FiberRef/currentTracerEnabled"),()=>on(!0)),H3=ge(Symbol.for("effect/FiberRef/currentTracerTiming"),()=>on(!0)),fX=ge(Symbol.for("effect/FiberRef/currentTracerSpanAnnotations"),()=>on(bv())),dX=ge(Symbol.for("effect/FiberRef/currentTracerSpanLinks"),()=>on(sn())),a2=Symbol.for("effect/Scope"),o2=Symbol.for("effect/CloseableScope"),q3=(e,t)=>e.addFinalizer(()=>oi(t)),Cy=(e,t)=>e.addFinalizer(t),X1=(e,t)=>e.close(t),Rs=(e,t)=>e.fork(t),hX=e=>mX(ce)(e),mX=k(2,(e,t)=>{const n=O(e,bE,Gn(t));switch(n._tag){case"None":return O(BL(e),sE,pt({onNone:()=>{const r=Qe(yE(e)).flatMap(i=>Qe(e3(i)).map(s=>`#${s}`));return new gX(r?`Interrupted by fibers: ${r.join(", ")}`:void 0)},onSome:ce}));case"Some":return n.value}}),DE=function(){class e extends globalThis.Error{commit(){return zt(this)}toJSON(){const n={...this};return this.message&&(n.message=this.message),this.cause&&(n.cause=this.cause),n}[Ue](){return this.toString!==globalThis.Error.prototype.toString?this.stack?`${this.toString()}
|
|
63
|
+
${this.stack.split(`
|
|
64
|
+
`).slice(1).join(`
|
|
65
|
+
`)}`:this.toString():"Bun"in globalThis?Sf(El(this),{renderErrorCause:!0}):this}}return Object.assign(e.prototype,B7),e}(),zE=(e,t)=>{class n extends DE{constructor(){super(...arguments);y(this,"_tag",t)}}return Object.assign(n.prototype,e),n.prototype.name=t,n},l2=Symbol.for("effect/Cause/errors/RuntimeException"),pX=zE({[l2]:l2},"RuntimeException"),W1=Symbol.for("effect/Cause/errors/InterruptedException"),gX=zE({[W1]:W1},"InterruptedException"),yX=e=>fe(e,W1),c2=Symbol.for("effect/Cause/errors/NoSuchElement"),Rv=zE({[c2]:c2},"NoSuchElementException"),u2=Symbol.for("effect/Cause/errors/UnknownException"),jE=function(){class e extends DE{constructor(r,i){super(i??"An unknown error occurred",{cause:r});y(this,"_tag","UnknownException");y(this,"error");this.error=r}}return Object.assign(e.prototype,{[u2]:u2,name:"UnknownException"}),e}(),Nv=e=>oa(e)&&"_tag"in e&&(e._tag==="Success"||e._tag==="Failure"),V3=e=>e._tag==="Failure",bX=e=>e._tag==="Success",dg=k(2,(e,t)=>{switch(e._tag){case mn:return Ze(e.effect_instruction_i0);case pn:return tt(t)}}),_0=e=>dg(e,void 0),su=(e,t)=>_X(e,t!=null&&t.parallel?ho:Mn),K3=e=>Ze(ei(e)),Lh=e=>Ze(El(e)),Ze=e=>{const t=new _3(mn);return t.effect_instruction_i0=e,t},vX=k(2,(e,t)=>{switch(e._tag){case mn:return Ze(e.effect_instruction_i0);case pn:return t(e.effect_instruction_i0)}}),SX=e=>O(e,vX(ce)),xX=e=>Ze(yi(e)),hg=k(2,(e,t)=>{switch(e._tag){case mn:return Ze(e.effect_instruction_i0);case pn:return tt(t(e.effect_instruction_i0))}}),Mv=k(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case mn:return t(e.effect_instruction_i0);case pn:return n(e.effect_instruction_i0)}}),Z1=k(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case mn:return t(e.effect_instruction_i0);case pn:return n(e.effect_instruction_i0)}}),tt=e=>{const t=new k3(pn);return t.effect_instruction_i0=e,t},Dn=tt(void 0),wX=k(2,(e,t)=>IE(e,t,{onSuccess:(n,r)=>[n,r],onFailure:Mn})),G3=k(2,(e,t)=>IE(e,t,{onSuccess:(n,r)=>r,onFailure:Mn})),IE=k(3,(e,t,{onFailure:n,onSuccess:r})=>{switch(e._tag){case mn:switch(t._tag){case pn:return Ze(e.effect_instruction_i0);case mn:return Ze(n(e.effect_instruction_i0,t.effect_instruction_i0))}case pn:switch(t._tag){case pn:return tt(r(e.effect_instruction_i0,t.effect_instruction_i0));case mn:return Ze(t.effect_instruction_i0)}}}),_X=(e,t)=>{const n=Zs(e);return ta(n)?O(js(n),rE(O(Ki(n),hg(Jt)),(r,i)=>O(r,IE(i,{onSuccess:(s,a)=>O(s,In(a)),onFailure:t}))),hg(ea),hg(r=>Qn(r)),J):q()},Dv=e=>({...vm,[MQ]:DQ,state:Sm(zQ([])),commit(){return po(this)},blockingOn:e}),zv=()=>B(_v,e=>kX(e)),kX=e=>K(()=>Dv(e)),po=e=>Ia(t=>{const n=Wt(e.state);switch(n._tag){case xv:return t(n.effect);case Cm:return n.joiners.push(t),CX(e,t)}},e.blockingOn),jv=k(2,(e,t)=>K(()=>{const n=Wt(e.state);switch(n._tag){case xv:return!1;case Cm:{xm(e.state,x3(t));for(let r=0,i=n.joiners.length;r<i;r++)n.joiners[r](t);return!0}}})),Y3=k(2,(e,t)=>jv(e,t)),J3=k(2,(e,t)=>jv(e,an(t))),Q3=k(2,(e,t)=>jv(e,N3(t))),EX=e=>K(()=>Wt(e.state)._tag===xv),$E=k(2,(e,t)=>jv(e,te(t))),Iv=(e,t)=>{const n=Wt(e.state);if(n._tag===Cm){xm(e.state,x3(t));for(let r=0,i=n.joiners.length;r<i;r++)n.joiners[r](t)}},CX=(e,t)=>K(()=>{const n=Wt(e.state);if(n._tag===Cm){const r=n.joiners.indexOf(t);r>=0&&n.joiners.splice(r,1)}}),TX=He(e=>tt(e.currentContext)),LE=()=>TX,Ql=e=>B(LE(),e),$v=k(2,(e,t)=>wf(ls,t)(e)),FE=k(2,(e,t)=>ZQ(ls,n=>ur(n,t))(e)),X3=k(2,(e,t)=>Ql(n=>$v(e,t(n)))),PE=e=>{const t=e.currentSpan;return t!==void 0&&t._tag==="Span"?J(t):q()},AX={_tag:"Span",spanId:"noop",traceId:"noop",sampled:!1,status:{_tag:"Ended",startTime:BigInt(0),endTime:BigInt(0),exit:Dn},attributes:new Map,links:[],kind:"internal",attribute(){},event(){},end(){},addLinks(){}},OX=e=>Object.assign(Object.create(AX),e),RX="effect/Clock",f2=Symbol.for(RX),Ef=ko("effect/Clock"),NX=2**31-1,d2={unsafeSchedule(e,t){const n=wy(t);if(n>NX)return Ga;let r=!1;const i=setTimeout(()=>{r=!0,e()},n);return()=>(clearTimeout(i),!r)}},h2=function(){const e=BigInt(1e6);if(typeof performance>"u"||typeof performance.now!="function")return()=>BigInt(Date.now())*e;let t;return()=>(t===void 0&&(t=BigInt(Date.now())*e-BigInt(Math.round(performance.now()*1e6))),t+BigInt(Math.round(performance.now()*1e6)))}(),MX=function(){const e=typeof process=="object"&&"hrtime"in process&&typeof process.hrtime.bigint=="function"?process.hrtime:void 0;if(!e)return h2;const t=h2()-e.bigint();return()=>t+e.bigint()}();var mD;mD=f2;class DX{constructor(){y(this,mD,f2);y(this,"currentTimeMillis",K(()=>this.unsafeCurrentTimeMillis()));y(this,"currentTimeNanos",K(()=>this.unsafeCurrentTimeNanos()))}unsafeCurrentTimeMillis(){return Date.now()}unsafeCurrentTimeNanos(){return MX()}scheduler(){return te(d2)}sleep(t){return Ti(n=>{const r=d2.unsafeSchedule(()=>n(nt),t);return oi(K(r))})}}const zX=()=>new DX,Hu=OK,Ty=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&"),W3="And",Z3="Or",eF="InvalidData",tF="MissingData",nF="SourceUnavailable",rF="Unsupported",jX="effect/ConfigError",m2=Symbol.for(jX),Cf={_tag:"ConfigError",[m2]:m2},iF=(e,t)=>{const n=Object.create(Cf);return n._op=W3,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} and ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},sF=(e,t)=>{const n=Object.create(Cf);return n._op=Z3,n.left=e,n.right=t,Object.defineProperty(n,"toString",{enumerable:!1,value(){return`${this.left} or ${this.right}`}}),Object.defineProperty(n,"message",{enumerable:!1,get(){return this.toString()}}),n},IX=(e,t,n={pathDelim:"."})=>{const r=Object.create(Cf);return r._op=eF,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Invalid data at ${O(this.path,yf(n.pathDelim))}: "${this.message}")`}}),r},Rl=(e,t,n={pathDelim:"."})=>{const r=Object.create(Cf);return r._op=tF,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Missing data at ${O(this.path,yf(n.pathDelim))}: "${this.message}")`}}),r},$X=(e,t,n,r={pathDelim:"."})=>{const i=Object.create(Cf);return i._op=nF,i.path=e,i.message=t,i.cause=n,Object.defineProperty(i,"toString",{enumerable:!1,value(){return`(Source unavailable at ${O(this.path,yf(r.pathDelim))}: "${this.message}")`}}),i},LX=(e,t,n={pathDelim:"."})=>{const r=Object.create(Cf);return r._op=rF,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Unsupported operation at ${O(this.path,yf(n.pathDelim))}: "${this.message}")`}}),r},Zo=k(2,(e,t)=>{switch(e._op){case W3:return iF(Zo(e.left,t),Zo(e.right,t));case Z3:return sF(Zo(e.left,t),Zo(e.right,t));case eF:return IX([...t,...e.path],e.message);case tF:return Rl([...t,...e.path],e.message);case nF:return $X([...t,...e.path],e.message,e.cause);case rF:return LX([...t,...e.path],e.message)}}),FX={_tag:"Empty"},k0=k(2,(e,t)=>{let n=wE(t),r=e;for(;iJ(n);){const i=n.head;switch(i._tag){case"Empty":{n=n.tail;break}case"AndThen":{n=Tl(i.first,Tl(i.second,n.tail));break}case"MapName":{r=ul(r,i.f),n=n.tail;break}case"Nested":{r=gy(r,i.name),n=n.tail;break}case"Unnested":{if(O(Gd(r),UK(i.name)))r=xl(r),n=n.tail;else return pe(Rl(r,`Expected ${i.name} to be in path in ConfigProvider#unnested`));break}}}return he(r)}),PX="Constant",UX="Fail",BX="Fallback",HX="Described",qX="Lazy",VX="MapOrFail",KX="Nested",GX="Primitive",YX="Sequence",JX="HashMap",QX="ZipWith";var p2={};const Ay=(e,t)=>[...e,...t],XX="effect/ConfigProvider",g2=Symbol.for(XX),WX=ko("effect/ConfigProvider"),ZX="effect/ConfigProviderFlat",y2=Symbol.for(ZX),eW=e=>({[g2]:g2,pipe(){return ie(this,arguments)},...e}),tW=e=>({[y2]:y2,patch:e.patch,load:(t,n,r=!0)=>e.load(t,n,r),enumerateChildren:e.enumerateChildren}),nW=e=>eW({load:t=>B(Lr(e,co(),t,!1),n=>pt(Gd(n),{onNone:()=>zt(Rl(co(),`Expected a single value having structure: ${t}`)),onSome:te})),flattened:e}),rW=e=>{const{pathDelim:t,seqDelim:n}=Object.assign({},{pathDelim:"_",seqDelim:","},e),r=l=>O(l,yf(t)),i=l=>l.split(t),s=()=>typeof process<"u"&&"env"in process&&typeof p2=="object"?p2:{};return nW(tW({load:(l,c,f=!0)=>{const u=r(l),d=s(),h=u in d?J(d[u]):q();return O(h,Cv(()=>Rl(l,`Expected ${u} to exist in the process context`)),B(g=>lW(g,l,c,n,f)))},enumerateChildren:l=>K(()=>{const c=s(),d=Object.keys(c).map(h=>i(h.toUpperCase())).filter(h=>{for(let g=0;g<l.length;g++){const v=O(l,pL(g)),x=h[g];if(x===void 0||v!==x)return!1}return!0}).flatMap(h=>h.slice(l.length,l.length+1));return ZG(d)}),patch:FX}))},iW=(e,t,n,r)=>{const i=UO(n.length,l=>l>=r.length?q():J([e(l),l+1])),s=UO(r.length,l=>l>=n.length?q():J([t(l),l+1])),a=Ay(n,i),o=Ay(r,s);return[a,o]},sW=(e,t)=>{let n=t;if(n._tag==="Nested"){const r=e.slice();for(;n._tag==="Nested";)r.push(n.name),n=n.config;return r}return e},Lr=(e,t,n,r)=>{const i=n;switch(i._tag){case PX:return te(mi(i.value));case HX:return Te(()=>Lr(e,t,i.config,r));case UX:return zt(Rl(t,i.message));case BX:return O(Te(()=>Lr(e,t,i.first,r)),Ih(s=>i.condition(s)?O(Lr(e,t,i.second,r),Ih(a=>zt(sF(s,a)))):zt(s)));case qX:return Te(()=>Lr(e,t,i.config(),r));case VX:return Te(()=>O(Lr(e,t,i.original,r),B(Is(s=>O(i.mapOrFail(s),Cv(Zo(sW(t,i.original))))))));case KX:return Te(()=>Lr(e,Ay(t,mi(i.name)),i.config,r));case GX:return O(k0(t,e.patch),B(s=>O(e.load(s,i,r),B(a=>{if(a.length===0){const o=O(tG(s),ut(()=>"<n/a>"));return zt(Rl([],`Expected ${i.description} with name ${o}`))}return te(a)}))));case YX:return O(k0(t,e.patch),B(s=>O(e.enumerateChildren(s),B(uW),B(a=>a.length===0?Te(()=>Ae(Lr(e,t,i.config,!0),mi)):O(Is(a,o=>Lr(e,JK(t,`[${o}]`),i.config,!0)),Ae(o=>{const l=bL(o);return l.length===0?mi(co()):mi(l)}))))));case JX:return Te(()=>O(k0(t,e.patch),B(s=>O(e.enumerateChildren(s),B(a=>O(a,Is(o=>Lr(e,Ay(s,mi(o)),i.valueConfig,r)),Ae(o=>o.length===0?mi(bv()):O(cW(o),ul(l=>YY(PO(Qe(a),l)))))))))));case QX:return Te(()=>O(Lr(e,t,i.left,r),Bu,B(s=>O(Lr(e,t,i.right,r),Bu,B(a=>{if(cn(s)&&cn(a))return zt(iF(s.left,a.left));if(cn(s)&&Vi(a))return zt(s.left);if(Vi(s)&&cn(a))return zt(a.left);if(Vi(s)&&Vi(a)){const o=O(t,yf(".")),l=aW(t,o),[c,f]=iW(l,l,O(s.right,ul(he)),O(a.right,ul(he)));return O(c,PO(f),Is(([u,d])=>O(Tv(u,d),Ae(([h,g])=>i.zip(h,g)))))}throw new Error("BUG: ConfigProvider.fromFlatLoop - please report an issue at https://github.com/Effect-TS/effect/issues")})))))}},aW=(e,t)=>n=>pe(Rl(e,`The element at index ${n} in a sequence at path "${t}" was missing`)),oW=(e,t)=>e.split(new RegExp(`\\s*${Ty(t)}\\s*`)),lW=(e,t,n,r,i)=>i?O(oW(e,r),Is(s=>n.parse(s.trim())),Cv(Zo(t))):O(n.parse(e),CE({onFailure:Zo(t),onSuccess:mi})),cW=e=>Object.keys(e[0]).map(t=>e.map(n=>n[t])),uW=e=>O(Is(e,dW),CE({onFailure:()=>co(),onSuccess:Oh(Hu)}),Bu,Ae(AK)),fW=/^(\[(\d+)\])$/,dW=e=>{const t=e.match(fW);if(t!==null){const n=t[2];return O(n!==void 0&&n.length>0?J(n):q(),aa(hW))}return q()},hW=e=>{const t=Number.parseInt(e);return Number.isNaN(t)?q():J(t)},b2=Symbol.for("effect/Console"),aF=ko("effect/Console"),mW={[b2]:b2,assert(e,...t){return K(()=>{console.assert(e,...t)})},clear:K(()=>{console.clear()}),count(e){return K(()=>{console.count(e)})},countReset(e){return K(()=>{console.countReset(e)})},debug(...e){return K(()=>{console.debug(...e)})},dir(e,t){return K(()=>{console.dir(e,t)})},dirxml(...e){return K(()=>{console.dirxml(...e)})},error(...e){return K(()=>{console.error(...e)})},group(e){return e!=null&&e.collapsed?K(()=>console.groupCollapsed(e==null?void 0:e.label)):K(()=>console.group(e==null?void 0:e.label))},groupEnd:K(()=>{console.groupEnd()}),info(...e){return K(()=>{console.info(...e)})},log(...e){return K(()=>{console.log(...e)})},table(e,t){return K(()=>{console.table(e,t)})},time(e){return K(()=>console.time(e))},timeEnd(e){return K(()=>console.timeEnd(e))},timeLog(e,...t){return K(()=>{console.timeLog(e,...t)})},trace(...e){return K(()=>{console.trace(...e)})},warn(...e){return K(()=>{console.warn(...e)})},unsafe:console},pW="effect/Random",v2=Symbol.for(pW),gW=ko("effect/Random");var pD;pD=v2;class yW{constructor(t){y(this,"seed");y(this,pD,v2);y(this,"PRNG");this.seed=t,this.PRNG=new k7(t)}get next(){return K(()=>this.PRNG.number())}get nextBoolean(){return Ae(this.next,t=>t>.5)}get nextInt(){return K(()=>this.PRNG.integer(Number.MAX_SAFE_INTEGER))}nextRange(t,n){return Ae(this.next,r=>(n-t)*r+t)}nextIntBetween(t,n){return K(()=>this.PRNG.integer(n-t)+t)}shuffle(t){return bW(t,n=>this.nextIntBetween(0,n))}}const bW=(e,t)=>Te(()=>O(K(()=>Array.from(e)),B(n=>{const r=[];for(let i=n.length;i>=2;i=i-1)r.push(i);return O(r,Ev(i=>O(t(i),Ae(s=>vW(n,i-1,s)))),Xn(Zs(n)))}))),vW=(e,t,n)=>{const r=e[t];return e[t]=e[n],e[n]=r,e},SW=e=>new yW(re(e)),S2=Symbol.for("effect/Tracer"),xW=e=>({[S2]:S2,...e}),UE=ko("effect/Tracer"),Lv=ko("effect/ParentSpan"),x2=function(){const e="abcdef0123456789",t=e.length;return function(n){let r="";for(let i=0;i<n;i++)r+=e.charAt(Math.floor(Math.random()*t));return r}}();class wW{constructor(t,n,r,i,s,a){y(this,"name");y(this,"parent");y(this,"context");y(this,"startTime");y(this,"kind");y(this,"_tag","Span");y(this,"spanId");y(this,"traceId","native");y(this,"sampled",!0);y(this,"status");y(this,"attributes");y(this,"events",[]);y(this,"links");this.name=t,this.parent=n,this.context=r,this.startTime=s,this.kind=a,this.status={_tag:"Started",startTime:s},this.attributes=new Map,this.traceId=n._tag==="Some"?n.value.traceId:x2(32),this.spanId=x2(16),this.links=Array.from(i)}end(t,n){this.status={_tag:"Ended",endTime:t,exit:n,startTime:this.status.startTime}}attribute(t,n){this.attributes.set(t,n)}event(t,n,r){this.events.push([t,n,r??{}])}addLinks(t){this.links.push(...t)}}const _W=xW({span:(e,t,n,r,i,s)=>new wW(e,t,n,r,i,s),context:e=>e()}),kW=e=>{if((e==null?void 0:e.captureStackTrace)===!1)return e;if((e==null?void 0:e.captureStackTrace)!==void 0&&typeof e.captureStackTrace!="boolean")return e;const t=Error.stackTraceLimit;Error.stackTraceLimit=3;const n=new Error;Error.stackTraceLimit=t;let r=!1;return{...e,captureStackTrace:()=>{if(r!==!1)return r;if(n.stack!==void 0){const i=n.stack.split(`
|
|
66
|
+
`);if(i[3]!==void 0)return r=i[3].trim(),r}}}},ew=pf()("effect/Tracer/DisablePropagation",{defaultValue:Ga}),EW=O(ns(),Qr(Ef,zX()),Qr(aF,mW),Qr(gW,SW(Math.random())),Qr(WX,rW()),Qr(UE,_W)),qu=ge(Symbol.for("effect/DefaultServices/currentServices"),()=>P3(EW)),CW=e=>{const t=ii(e);return oF(n=>n.sleep(t))},TW=e=>He(t=>e(t.currentDefaultServices)),oF=e=>TW(t=>e(t.unsafeMap.get(Ef.key))),AW=oF(e=>e.currentTimeMillis),OW=bm,RW=H7;let Tf=class extends RW{};const lF="Sequential",cF="Parallel",NW="ParallelN",dl={_tag:lF},tw={_tag:cF},MW=e=>({_tag:NW,parallelism:e}),DW=e=>e._tag===lF,zW=e=>e._tag===cF,Oy=dl,nw=tw,rw=MW;function jW(e){return new go(e)}function IW(){return jW(new Map)}const w2=Symbol.for("effect/FiberRefs");var gD;gD=w2;class go{constructor(t){y(this,"locals");y(this,gD,w2);this.locals=t}pipe(){return ie(this,arguments)}}const $W=(e,t,n,r=!1)=>{const i=e;let s=t,a=n,o=r,l;for(;l===void 0;)if(rn(s)&&rn(a)){const c=Jn(s)[0],f=xl(s),u=Jn(a)[0],d=Jn(a)[1],h=xl(a);c.startTimeMillis<u.startTimeMillis?(a=h,o=!0):c.startTimeMillis>u.startTimeMillis?s=f:c.id<u.id?(a=h,o=!0):c.id>u.id?s=f:l=[d,o]}else l=[i.initial,!0];return l},LW=k(3,(e,t,n)=>{const r=new Map(e.locals);return n.locals.forEach((i,s)=>{const a=i[0][1];if(!i[0][0][ve](t)){if(!r.has(s)){if(oe(a,s.initial))return;r.set(s,[[t,s.join(s.initial,a)]]);return}const o=r.get(s),[l,c]=$W(s,o,i);if(c){const f=s.diff(l,a),u=o[0][1],d=s.join(u,s.patch(f)(u));if(!oe(u,d)){let h;const g=o[0][0];g[ve](t)?h=[[g,d],...o.slice(1)]:h=[[t,d],...o],r.set(s,h)}}}}),new go(r)}),FW=k(2,(e,t)=>{const n=new Map;return uF(e,n,t),new go(n)}),uF=(e,t,n)=>{e.locals.forEach((r,i)=>{const s=r[0][1],a=i.patch(i.fork)(s);oe(s,a)?t.set(i,r):t.set(i,[[n,a],...r])})},fF=k(2,(e,t)=>{const n=new Map(e.locals);return n.delete(t),new go(n)}),dF=k(2,(e,t)=>e.locals.has(t)?J(Jn(e.locals.get(t))[1]):q()),Fh=k(2,(e,t)=>O(dF(e,t),ut(()=>t.initial))),iw=k(2,(e,{fiberId:t,fiberRef:n,value:r})=>{if(e.locals.size===0)return new go(new Map([[n,[[t,r]]]]));const i=new Map(e.locals);return sw(i,t,n,r),new go(i)}),sw=(e,t,n,r)=>{const i=e.get(n)??[];let s;if(rn(i)){const[a,o]=Jn(i);if(a[ve](t)){if(oe(o,r))return;s=[[t,r],...i.slice(1)]}else s=[[t,r],...i]}else s=[[t,r]];e.set(n,s)},PW=k(2,(e,{entries:t,forkAs:n})=>{if(e.locals.size===0)return new go(new Map(t));const r=new Map(e.locals);return n!==void 0&&uF(e,r,n),t.forEach(([i,s])=>{s.length===1?sw(r,s[0][0],i,s[0][1]):s.forEach(([a,o])=>{sw(r,a,i,o)})}),new go(r)}),_2=dF,hF=Fh,UW=PW,BW=IW,mF="Empty",pF="Add",gF="Remove",yF="Update",bF="AndThen",HW={_tag:mF},BE=(e,t)=>{const n=new Map(e.locals);let r=HW;for(const[i,s]of t.locals.entries()){const a=Jn(s)[1],o=n.get(i);if(o!==void 0){const l=Jn(o)[1];oe(l,a)||(r=E0({_tag:yF,fiberRef:i,patch:i.diff(l,a)})(r))}else r=E0({_tag:pF,fiberRef:i,value:a})(r);n.delete(i)}for(const[i]of n.entries())r=E0({_tag:gF,fiberRef:i})(r);return r},E0=k(2,(e,t)=>({_tag:bF,first:e,second:t})),vF=k(3,(e,t,n)=>{let r=n,i=mi(e);for(;rn(i);){const s=Jn(i),a=xl(i);switch(s._tag){case mF:{i=a;break}case pF:{r=iw(r,{fiberId:t,fiberRef:s.fiberRef,value:s.value}),i=a;break}case gF:{r=fF(r,s.fiberRef),i=a;break}case yF:{const o=Fh(r,s.fiberRef);r=iw(r,{fiberId:t,fiberRef:s.fiberRef,value:s.fiberRef.patch(s.patch)(o)}),i=a;break}case bF:{i=gy(s.first)(gy(s.second)(a));break}}}return r}),Ph=BE,Uh=vF,Fv="effect/FiberStatus",Nl=Symbol.for(Fv),Ry="Done",k2="Running",E2="Suspended",qW=vt(`${Fv}-${Ry}`);var yD;let VW=class{constructor(){y(this,yD,Nl);y(this,"_tag",Ry)}[(yD=Nl,be)](){return qW}[ve](t){return HE(t)&&t._tag===Ry}};var bD;class KW{constructor(t){y(this,"runtimeFlags");y(this,bD,Nl);y(this,"_tag",k2);this.runtimeFlags=t}[(bD=Nl,be)](){return O(re(Fv),Se(re(this._tag)),Se(re(this.runtimeFlags)),rt(this))}[ve](t){return HE(t)&&t._tag===k2&&this.runtimeFlags===t.runtimeFlags}}var vD;class GW{constructor(t,n){y(this,"runtimeFlags");y(this,"blockingOn");y(this,vD,Nl);y(this,"_tag",E2);this.runtimeFlags=t,this.blockingOn=n}[(vD=Nl,be)](){return O(re(Fv),Se(re(this._tag)),Se(re(this.runtimeFlags)),Se(re(this.blockingOn)),rt(this))}[ve](t){return HE(t)&&t._tag===E2&&this.runtimeFlags===t.runtimeFlags&&oe(this.blockingOn,t.blockingOn)}}const YW=new VW,JW=e=>new KW(e),QW=(e,t)=>new GW(e,t),HE=e=>fe(e,Nl),XW=e=>e._tag===Ry,WW=YW,SF=JW,ZW=QW,eZ=XW,tZ=qQ,nZ=VQ,rZ=KQ,iZ=$3,sZ=L3,aZ=F3,oZ=GQ,lZ=YQ,cZ=O(Hu,cL(e=>e.ordinal)),uZ=RK(cZ),fZ=e=>{switch(e){case"All":return tZ;case"Debug":return aZ;case"Error":return rZ;case"Fatal":return nZ;case"Info":return sZ;case"Trace":return oZ;case"None":return lZ;case"Warning":return iZ}},dZ=Symbol.for("effect/Micro"),Ny=Symbol.for("effect/Micro/MicroExit"),C2=Symbol.for("effect/Micro/MicroCause"),hZ={_E:ce};var SD;class xF extends globalThis.Error{constructor(n,r,i){const s=`MicroCause.${n}`;let a,o,l;if(r instanceof globalThis.Error){a=`(${s}) ${r.name}`,o=r.message;const c=o.split(`
|
|
67
|
+
`).length;l=r.stack?`(${s}) ${r.stack.split(`
|
|
68
|
+
`).slice(0,c+3).join(`
|
|
69
|
+
`)}`:`${a}: ${o}`}else a=s,o=Ru(r,0),l=`${a}: ${o}`;i.length>0&&(l+=`
|
|
70
|
+
${i.join(`
|
|
71
|
+
`)}`);super(o);y(this,"_tag");y(this,"traces");y(this,SD);this._tag=n,this.traces=i,this[C2]=hZ,this.name=a,this.stack=l}pipe(){return ie(this,arguments)}toString(){return this.stack}[(SD=C2,Ue)](){return this.stack}}class mZ extends xF{constructor(n,r=[]){super("Die",n,r);y(this,"defect");this.defect=n}}const pZ=(e,t=[])=>new mZ(e,t);let gZ=class extends xF{constructor(t=[]){super("Interrupt","interrupted",t)}};const yZ=(e=[])=>new gZ(e),bZ=e=>e._tag==="Interrupt",T2=Symbol.for("effect/Micro/MicroFiber"),vZ={_A:ce,_E:ce};var xD;xD=T2;class SZ{constructor(t,n=!0){y(this,"context");y(this,"interruptible");y(this,xD);y(this,"_stack",[]);y(this,"_observers",[]);y(this,"_exit");y(this,"_children");y(this,"currentOpCount",0);y(this,"_interrupted",!1);y(this,"_yielded");this.context=t,this.interruptible=n,this[T2]=vZ}getRef(t){return aK(this.context,t)}addObserver(t){return this._exit?(t(this._exit),Ou):(this._observers.push(t),()=>{const n=this._observers.indexOf(t);n>=0&&this._observers.splice(n,1)})}unsafeInterrupt(){this._exit||(this._interrupted=!0,this.interruptible&&this.evaluate(YE))}unsafePoll(){return this._exit}evaluate(t){if(this._exit)return;if(this._yielded!==void 0){const i=this._yielded;this._yielded=void 0,i()}const n=this.runLoop(t);if(n===Ep)return;const r=A2.interruptChildren&&A2.interruptChildren(this);if(r!==void 0)return this.evaluate(Dy(r,()=>n));this._exit=n;for(let i=0;i<this._observers.length;i++)this._observers[i](n);this._observers.length=0}runLoop(t){let n=!1,r=t;this.currentOpCount=0;try{for(;;){if(this.currentOpCount++,!n&&this.getRef(JE).shouldYield(this)){n=!0;const i=r;r=Dy(EZ,()=>i)}if(r=r[aw](this),r===Ep){const i=this._yielded;return Ny in i?(this._yielded=void 0,i):Ep}}}catch(i){return fe(r,aw)?ow(i):ow(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const n=this._stack.pop();if(!n)return;const r=n[My]&&n[My](this);if(r)return{[t]:r};if(n[t])return n}}yieldWith(t){return this._yielded=t,Ep}children(){return this._children??(this._children=new Set)}}const A2=ge("effect/Micro/fiberMiddleware",()=>({interruptChildren:void 0})),wF=Symbol.for("effect/Micro/identifier"),Zt=Symbol.for("effect/Micro/args"),aw=Symbol.for("effect/Micro/evaluate"),Vu=Symbol.for("effect/Micro/successCont"),au=Symbol.for("effect/Micro/failureCont"),My=Symbol.for("effect/Micro/ensureCont"),Ep=Symbol.for("effect/Micro/Yield"),xZ={_A:ce,_E:ce,_R:ce},wZ={...OW,_op:"Micro",[dZ]:xZ,pipe(){return ie(this,arguments)},[Symbol.iterator](){return new z$(new ym(this))},toJSON(){return{_id:"Micro",op:this[wF],...Zt in this?{args:this[Zt]}:void 0}},toString(){return at(this)},[Ue](){return at(this)}};function _Z(e){return ow("Micro.evaluate: Not implemented")}const Pv=e=>({...wZ,[wF]:e.op,[aw]:e.eval??_Z,[Vu]:e.contA,[au]:e.contE,[My]:e.ensure}),qE=e=>{const t=Pv(e);return function(){const n=Object.create(t);return n[Zt]=e.single===!1?arguments:arguments[0],n}},_F=e=>{const t={...Pv(e),[Ny]:Ny,_tag:e.op,get[e.prop](){return this[Zt]},toJSON(){return{_id:"MicroExit",_tag:e.op,[e.prop]:this[Zt]}},[ve](n){return AZ(n)&&n._tag===e.op&&oe(this[Zt],n[Zt])},[be](){return rt(this,Se(vt(e.op))(re(this[Zt])))}};return function(n){const r=Object.create(t);return r[Zt]=n,r[Vu]=void 0,r[au]=void 0,r[My]=void 0,r}},VE=_F({op:"Success",prop:"value",eval(e){const t=e.getCont(Vu);return t?t[Vu](this[Zt],e):e.yieldWith(this)}}),kF=_F({op:"Failure",prop:"cause",eval(e){let t=e.getCont(au);for(;bZ(this[Zt])&&t&&e.interruptible;)t=e.getCont(au);return t?t[au](this[Zt],e):e.yieldWith(this)}}),kZ=qE({op:"Yield",eval(e){let t=!1;return e.getRef(JE).scheduleTask(()=>{t||e.evaluate(OZ)},this[Zt]??0),e.yieldWith(()=>{t=!0})}}),EZ=kZ(0),CZ=VE(void 0),KE=qE({op:"WithMicroFiber",eval(e){return this[Zt](e)}}),Dy=k(2,(e,t)=>{const n=Object.create(TZ);return n[Zt]=e,n[Vu]=t,n}),TZ=Pv({op:"OnSuccess",eval(e){return e._stack.push(this),this[Zt]}}),AZ=e=>fe(e,Ny),EF=VE,GE=kF,YE=GE(yZ()),ow=e=>GE(pZ(e)),OZ=EF(void 0),RZ="setImmediate"in globalThis?globalThis.setImmediate:e=>setTimeout(e,0);class CF{constructor(){y(this,"tasks",[]);y(this,"running",!1);y(this,"afterScheduled",()=>{this.running=!1,this.runTasks()})}scheduleTask(t,n){this.tasks.push(t),this.running||(this.running=!0,RZ(this.afterScheduled))}runTasks(){const t=this.tasks;this.tasks=[];for(let n=0,r=t.length;n<r;n++)t[n]()}shouldYield(t){return t.currentOpCount>=t.getRef(DZ)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const NZ=k(2,(e,t)=>KE(n=>{const r=n.context;return n.context=t(r),IZ(e,()=>(n.context=r,CZ))})),MZ=k(2,(e,t)=>NZ(e,ur(t)));class DZ extends pf()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048}){}class JE extends pf()("effect/Micro/currentScheduler",{defaultValue:()=>new CF}){}const zZ=k(2,(e,t)=>{const n=Object.create(jZ);return n[Zt]=e,n[Vu]=t.onSuccess,n[au]=t.onFailure,n}),jZ=Pv({op:"OnSuccessAndFailure",eval(e){return e._stack.push(this),this[Zt]}}),IZ=k(2,(e,t)=>LZ(n=>zZ(n(e),{onFailure:r=>Dy(t(GE(r)),()=>kF(r)),onSuccess:r=>Dy(t(EF(r)),()=>VE(r))}))),TF=qE({op:"SetInterruptible",ensure(e){if(e.interruptible=this[Zt],e._interrupted&&e.interruptible)return()=>YE}}),$Z=e=>KE(t=>t.interruptible?e:(t.interruptible=!0,t._stack.push(TF(!1)),t._interrupted?YE:e)),LZ=e=>KE(t=>t.interruptible?(t.interruptible=!1,t._stack.push(TF(!0)),e($Z)):e(ce)),FZ=(e,t)=>{const n=new SZ(JE.context(new CF));return n.evaluate(e),n},zy=Symbol.for("effect/Readable"),AF=Symbol.for("effect/Ref"),OF={_A:e=>e};var wD,_D,kD;class PZ extends(kD=Tf,_D=AF,wD=zy,kD){constructor(n){super();y(this,"ref");y(this,_D,OF);y(this,wD,zy);y(this,"get");this.ref=n,this.get=K(()=>Wt(this.ref))}commit(){return this.get}modify(n){return K(()=>{const r=Wt(this.ref),[i,s]=n(r);return r!==s&&xm(s)(this.ref),i})}}const QE=e=>new PZ(Sm(e)),jy=e=>K(()=>QE(e)),Wi=e=>e.get,ou=k(2,(e,t)=>e.modify(()=>[void 0,t])),UZ=k(2,(e,t)=>e.modify(n=>[n,t])),RF=k(2,(e,t)=>e.modify(t)),Iy=k(2,(e,t)=>e.modify(n=>[void 0,t(n)])),XE=jy,BZ=Wi,HZ=UZ,td=RF,qZ=ou,VZ=Iy;class NF{constructor(){y(this,"buckets",[])}scheduleTask(t,n){const r=this.buckets.length;let i,s=0;for(;s<r&&this.buckets[s][0]<=n;s++)i=this.buckets[s];i&&i[0]===n?i[1].push(t):s===r?this.buckets.push([n,[t]]):this.buckets.splice(s,0,[n,[t]])}}class KZ{constructor(t){y(this,"maxNextTickBeforeTimer");y(this,"running",!1);y(this,"tasks",new NF);this.maxNextTickBeforeTimer=t}starveInternal(t){const n=this.tasks.buckets;this.tasks.buckets=[];for(const[r,i]of n)for(let s=0;s<i.length;s++)i[s]();this.tasks.buckets.length===0?this.running=!1:this.starve(t)}starve(t=0){t>=this.maxNextTickBeforeTimer?setTimeout(()=>this.starveInternal(0),0):Promise.resolve(void 0).then(()=>this.starveInternal(t+1))}shouldYield(t){return t.currentOpCount>t.getFiberRef(U3)?t.getFiberRef(kf):!1}scheduleTask(t,n){this.tasks.scheduleTask(t,n),this.running||(this.running=!0,this.starve())}}const MF=ge(Symbol.for("effect/Scheduler/defaultScheduler"),()=>new KZ(2048));class WE{constructor(){y(this,"tasks",new NF);y(this,"deferred",!1)}scheduleTask(t,n){this.deferred?MF.scheduleTask(t,n):this.tasks.scheduleTask(t,n)}shouldYield(t){return t.currentOpCount>t.getFiberRef(U3)?t.getFiberRef(kf):!1}flush(){for(;this.tasks.buckets.length>0;){const t=this.tasks.buckets;this.tasks.buckets=[];for(const[n,r]of t)for(let i=0;i<r.length;i++)r[i]()}this.deferred=!0}}const ZE=ge(Symbol.for("effect/FiberRef/currentScheduler"),()=>on(MF)),DF=ge(Symbol.for("effect/FiberRef/currentRequestMap"),()=>on(new Map)),O2=(e,t,n,r)=>{switch(e){case void 0:return t();case"unbounded":return n();case"inherit":return Ov(oX,i=>i==="unbounded"?n():i>1?r(i):t());default:return e>1?r(e):t()}},GZ=CW,YZ=AW,JZ=Ef,zF=e=>e.replace(/[\s="]/g,"_"),QZ=e=>t=>`${zF(t.label)}=${e-t.startTime}ms`,jF="effect/MetricLabel",lw=Symbol.for(jF);var ED;class XZ{constructor(t,n){y(this,"key");y(this,"value");y(this,ED,lw);y(this,"_hash");this.key=t,this.value=n,this._hash=vt(jF+this.key+this.value)}[(ED=lw,be)](){return this._hash}[ve](t){return ZZ(t)&&this.key===t.key&&this.value===t.value}pipe(){return ie(this,arguments)}}const WZ=(e,t)=>new XZ(e,t),ZZ=e=>fe(e,lw),eee=e=>Ae(e,J),IF=e=>{let t,n;return typeof e=="function"?t=e:(t=e.try,n=e.catch),Te(()=>{try{return te(xn(t))}catch(r){return zt(n?xn(()=>n(r)):new jE(r,"An unknown error occurred in Effect.try"))}})},tee=e=>UF(e,LF,BE),nee=e=>UF(e,Tv(LF,PQ),([t,n],[r,i])=>[BE(t,r),Ja(n,i)]),$F=k(2,(e,t)=>mo(e,{onFailure:n=>te(t.onFailure(n)),onSuccess:n=>te(t.onSuccess(n))})),LF=He(e=>te(e.getFiberRefs())),ree=e=>$F(e,{onFailure:Ou,onSuccess:Ou}),R2=k(2,(e,t)=>si(e,{onFailure:n=>O3(()=>t(n)),onSuccess:te})),iee=e=>O(zv(),B(t=>O(nee(e),M3(t),aee,Ae(n=>Nt(n,O(po(t),B(([r,i])=>Xn(Tv(FF(r[0]),D3(r[1])),i)))))))),see=e=>Ae(e,t=>!t),aee=e=>Ae(XE(!0),t=>oi(AE(e,HZ(t,!1)))),FF=e=>hee((t,n)=>O(e,vF(t,n))),oee=e=>e.length>=1?Ti((t,n)=>{try{e(n).then(r=>t(te(r)),r=>t($a(r)))}catch(r){t($a(r))}}):Ti(t=>{try{e().then(n=>t(te(n)),n=>t($a(n)))}catch(n){t($a(n))}}),PF=k(3,(e,t,n)=>Ql(r=>$v(e,Qr(r,t,n)))),N2=k(3,(e,t,n)=>Ql(r=>B(n,i=>$v(e,O(r,Qr(t,i)))))),lee=GZ,cee=te(q()),UF=k(3,(e,t,n)=>B(t,r=>B(e,i=>Ae(t,s=>[n(r,s),i])))),uee=k(2,(e,t)=>si(e,{onFailure:n=>Nt(t(n),an(n)),onSuccess:te})),fee=e=>{let t,n;typeof e=="function"?t=e:(t=e.try,n=e.catch);const r=i=>n?wv(()=>n(i)):zt(new jE(i,"An unknown error occurred in Effect.tryPromise"));return t.length>=1?Ti((i,s)=>{try{t(s).then(a=>i(te(a)),a=>i(r(a)))}catch(a){i(r(a))}}):Ti(i=>{try{t().then(s=>i(te(s)),s=>i(r(s)))}catch(s){i(r(s))}})},dee=k(2,(e,t)=>B(e,n=>IF({try:()=>t.try(n),catch:t.catch}))),hee=e=>He(t=>(t.setFiberRefs(e(t.id(),t.getFiberRefs())),nt)),mee=k(2,(e,t)=>Te(()=>t()?Ae(e,J):te(q()))),pee=e=>new Proxy({},{get(t,n,r){return(...i)=>B(e,s=>s[n](...i))}}),BF=BigInt(0),HF=aa(e=>Vs(e.context,ew)?e._tag==="Span"?HF(e.parent):q():J(e)),gee=(e,t,n)=>{const r=!e.getFiberRef(B3)||n.context&&Vs(n.context,ew),i=e.getFiberRef(ls),s=n.parent?J(n.parent):n.root?q():HF(mf(i,Lv));let a;if(r)a=OX({name:t,parent:s,context:Qr(n.context??ns(),ew,!0)});else{const o=e.getFiberRef(qu),l=Vs(o,UE),c=Vs(o,JZ),f=e.getFiberRef(H3),u=e.getFiberRefs(),d=_2(u,fX),h=_2(u,dX),g=h._tag==="Some"?n.links!==void 0?[...Qn(h.value),...n.links??[]]:Qn(h.value):n.links??co();a=l.span(t,s,n.context??ns(),g,f?c.unsafeCurrentTimeNanos():BF,n.kind??"internal",n),d._tag==="Some"&&WY(d.value,(v,x)=>a.attribute(x,v)),n.attributes!==void 0&&Object.entries(n.attributes).forEach(([v,x])=>a.attribute(v,x))}return typeof n.captureStackTrace=="function"&&xy.set(a,n.captureStackTrace),a},yee=(e,t,n,r)=>K(()=>{e.status._tag!=="Ended"&&(V3(t)&&xy.has(e)&&e.attribute("code.stacktrace",xy.get(e)()),e.end(r?n.unsafeCurrentTimeNanos():BF,t))}),bee=(e,...t)=>{const n=kW(t.length===1?void 0:t[0]),r=t[t.length-1];return He(i=>{const s=gee(i,e,n),a=i.getFiberRef(H3),o=Vs(i.getFiberRef(qu),Ef);return Ol(r(s),l=>yee(s,l,o,a))})},vee=k(2,(e,t)=>PF(e,Lv,t)),eC=V3,See=bX,xee=su,wee=K3,$y=Lh,zn=Ze,_ee=SX,kee=hg,$s=Mv,_r=tt,tC=Dn,M2=wX,Bh=G3,nC="InterruptSignal",rC="Stateful",iC="Resume",sC="YieldNow",C0=e=>({_tag:nC,cause:e}),mg=e=>({_tag:rC,onFiber:e}),lc=e=>({_tag:iC,effect:e}),Eee=()=>({_tag:sC}),Cee="effect/FiberScope",Ly=Symbol.for(Cee);var CD;CD=Ly;class Tee{constructor(){y(this,CD,Ly);y(this,"fiberId",Or);y(this,"roots",new Set)}add(t,n){this.roots.add(n),n.addObserver(()=>{this.roots.delete(n)})}}var TD;TD=Ly;class Aee{constructor(t,n){y(this,"fiberId");y(this,"parent");y(this,TD,Ly);this.fiberId=t,this.parent=n}add(t,n){this.parent.tell(mg(r=>{r.addChild(n),n.addObserver(()=>{r.removeChild(n)})}))}}const Oee=e=>new Aee(e.id(),e),Uv=ge(Symbol.for("effect/FiberScope/Global"),()=>new Tee),Ree="effect/Fiber",Nee=Symbol.for(Ree),Mee={_E:e=>e,_A:e=>e},Dee="effect/Fiber",zee=Symbol.for(Dee),jee=e=>e.await,Iee=e=>e.inheritAll,Hh=e=>Av(kv(e.await),e.inheritAll);({...vm});const Sa="effect/FiberCurrent",$ee=()=>gf(globalThis[Sa]),Lee="effect/Logger",Fee=Symbol.for(Lee),Pee={_Message:e=>e,_Output:e=>e},aC=e=>({[Fee]:Pee,log:e,pipe(){return ie(this,arguments)}}),Uee=/^[^\s"=]*$/,Bee=(e,t)=>({annotations:n,cause:r,date:i,fiberId:s,logLevel:a,message:o,spans:l})=>{const c=g=>g.match(Uee)?g:e(g),f=(g,v)=>`${zF(g)}=${c(v)}`,u=(g,v)=>" "+f(g,v);let d=f("timestamp",i.toISOString());d+=u("level",a.label),d+=u("fiber",ZL(s));const h=GK(o);for(let g=0;g<h.length;g++)d+=u("message",Ru(h[g],t));nY(r)||(d+=u("cause",Sf(r,{renderErrorCause:!0})));for(const g of l)d+=" "+QZ(i.getTime())(g);for(const[g,v]of n)d+=u(g,Ru(v,t));return d},Hee=e=>`"${e.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`,qee=aC(Bee(Hee)),Vee=typeof process=="object"&&process!==null&&typeof process.stdout=="object"&&process.stdout!==null;Vee&&process.stdout.isTTY;const qF="effect/MetricBoundaries",cw=Symbol.for(qF);var AD;class Kee{constructor(t){y(this,"values");y(this,AD,cw);y(this,"_hash");this.values=t,this._hash=O(vt(qF),Se(df(this.values)))}[(AD=cw,be)](){return this._hash}[ve](t){return Gee(t)&&oe(this.values,t.values)}pipe(){return ie(this,arguments)}}const Gee=e=>fe(e,cw),Yee=e=>{const t=O(e,nE(Jt(Number.POSITIVE_INFINITY)),uG);return new Kee(t)},Jee=e=>O(KK(e.count-1,t=>e.start*Math.pow(e.factor,t)),Bn,Yee),Qee="effect/MetricKeyType",VF=Symbol.for(Qee),KF="effect/MetricKeyType/Counter",uw=Symbol.for(KF),Xee="effect/MetricKeyType/Frequency",Wee=Symbol.for(Xee),Zee="effect/MetricKeyType/Gauge",ete=Symbol.for(Zee),GF="effect/MetricKeyType/Histogram",fw=Symbol.for(GF),tte="effect/MetricKeyType/Summary",nte=Symbol.for(tte),YF={_In:e=>e,_Out:e=>e};var OD,RD;class rte{constructor(t,n){y(this,"incremental");y(this,"bigint");y(this,RD,YF);y(this,OD,uw);y(this,"_hash");this.incremental=t,this.bigint=n,this._hash=vt(KF)}[(RD=VF,OD=uw,be)](){return this._hash}[ve](t){return JF(t)}pipe(){return ie(this,arguments)}}var ND,MD;class ite{constructor(t){y(this,"boundaries");y(this,MD,YF);y(this,ND,fw);y(this,"_hash");this.boundaries=t,this._hash=O(vt(GF),Se(re(this.boundaries)))}[(MD=VF,ND=fw,be)](){return this._hash}[ve](t){return QF(t)&&oe(this.boundaries,t.boundaries)}pipe(){return ie(this,arguments)}}const ste=e=>new rte((e==null?void 0:e.incremental)??!1,(e==null?void 0:e.bigint)??!1),ate=e=>new ite(e),JF=e=>fe(e,uw),ote=e=>fe(e,Wee),lte=e=>fe(e,ete),QF=e=>fe(e,fw),cte=e=>fe(e,nte),ute="effect/MetricKey",XF=Symbol.for(ute),fte={_Type:e=>e},dte=sv(oe);var DD;class oC{constructor(t,n,r,i=[]){y(this,"name");y(this,"keyType");y(this,"description");y(this,"tags");y(this,DD,fte);y(this,"_hash");this.name=t,this.keyType=n,this.description=r,this.tags=i,this._hash=O(vt(this.name+this.description),Se(re(this.keyType)),Se(df(this.tags)))}[(DD=XF,be)](){return this._hash}[ve](t){return hte(t)&&this.name===t.name&&oe(this.keyType,t.keyType)&&oe(this.description,t.description)&&dte(this.tags,t.tags)}pipe(){return ie(this,arguments)}}const hte=e=>fe(e,XF),mte=(e,t)=>new oC(e,ste(t),gf(t==null?void 0:t.description)),pte=(e,t,n)=>new oC(e,ate(t),gf(n)),gte=k(2,(e,t)=>t.length===0?e:new oC(e.name,e.keyType,e.description,cg(e.tags,t))),D2=Symbol.for("effect/MutableHashMap"),yte={[D2]:D2,[Symbol.iterator](){return new lC(this)},toString(){return at(this.toJSON())},toJSON(){return{_id:"MutableHashMap",values:Array.from(this).map(Et)}},[Ue](){return this.toJSON()},pipe(){return ie(this,arguments)}};class lC{constructor(t){y(this,"self");y(this,"referentialIterator");y(this,"bucketIterator");this.self=t,this.referentialIterator=t.referential[Symbol.iterator]()}next(){if(this.bucketIterator!==void 0)return this.bucketIterator.next();const t=this.referentialIterator.next();return t.done?(this.bucketIterator=new bte(this.self.buckets.values()),this.next()):t}[Symbol.iterator](){return new lC(this.self)}}class bte{constructor(t){y(this,"backing");y(this,"currentBucket");this.backing=t}next(){if(this.currentBucket===void 0){const n=this.backing.next();if(n.done)return n;this.currentBucket=n.value[Symbol.iterator]()}const t=this.currentBucket.next();return t.done?(this.currentBucket=void 0,this.next()):t}}const dw=()=>{const e=Object.create(yte);return e.referential=new Map,e.buckets=new Map,e.bucketsSize=0,e},As=k(2,(e,t)=>{if(Ah(t)===!1)return e.referential.has(t)?J(e.referential.get(t)):q();const n=t[be](),r=e.buckets.get(n);return r===void 0?q():vte(e,r,t)}),vte=(e,t,n,r=!1)=>{for(let i=0,s=t.length;i<s;i++)if(n[ve](t[i][0])){const a=t[i][1];return r&&(t.splice(i,1),e.bucketsSize--),J(a)}return q()},nd=k(2,(e,t)=>gt(As(e,t))),Jo=k(3,(e,t,n)=>{if(Ah(t)===!1)return e.referential.set(t,n),e;const r=t[be](),i=e.buckets.get(r);return i===void 0?(e.buckets.set(r,[[t,n]]),e.bucketsSize++,e):(WF(e,i,t),i.push([t,n]),e.bucketsSize++,e)}),WF=(e,t,n)=>{for(let r=0,i=t.length;r<i;r++)if(n[ve](t[r][0])){t.splice(r,1),e.bucketsSize--;return}},Ste=k(2,(e,t)=>{if(Ah(t)===!1)return e.referential.delete(t),e;const n=t[be](),r=e.buckets.get(n);return r===void 0||(WF(e,r,t),r.length===0&&e.buckets.delete(n)),e}),xte="effect/MetricState",Nm=Symbol.for(xte),ZF="effect/MetricState/Counter",hw=Symbol.for(ZF),e4="effect/MetricState/Frequency",mw=Symbol.for(e4),t4="effect/MetricState/Gauge",pw=Symbol.for(t4),n4="effect/MetricState/Histogram",gw=Symbol.for(n4),r4="effect/MetricState/Summary",yw=Symbol.for(r4),Mm={_A:e=>e};var zD,jD;class wte{constructor(t){y(this,"count");y(this,jD,Mm);y(this,zD,hw);this.count=t}[(jD=Nm,zD=hw,be)](){return O(re(ZF),Se(re(this.count)),rt(this))}[ve](t){return Dte(t)&&this.count===t.count}pipe(){return ie(this,arguments)}}const _te=sv(oe);var ID,$D;class kte{constructor(t){y(this,"occurrences");y(this,$D,Mm);y(this,ID,mw);y(this,"_hash");this.occurrences=t}[($D=Nm,ID=mw,be)](){return O(vt(e4),Se(df(Qe(this.occurrences.entries()))),rt(this))}[ve](t){return zte(t)&&_te(Qe(this.occurrences.entries()),Qe(t.occurrences.entries()))}pipe(){return ie(this,arguments)}}var LD,FD;class Ete{constructor(t){y(this,"value");y(this,FD,Mm);y(this,LD,pw);this.value=t}[(FD=Nm,LD=pw,be)](){return O(re(t4),Se(re(this.value)),rt(this))}[ve](t){return jte(t)&&this.value===t.value}pipe(){return ie(this,arguments)}}var PD,UD;class Cte{constructor(t,n,r,i,s){y(this,"buckets");y(this,"count");y(this,"min");y(this,"max");y(this,"sum");y(this,UD,Mm);y(this,PD,gw);this.buckets=t,this.count=n,this.min=r,this.max=i,this.sum=s}[(UD=Nm,PD=gw,be)](){return O(re(n4),Se(re(this.buckets)),Se(re(this.count)),Se(re(this.min)),Se(re(this.max)),Se(re(this.sum)),rt(this))}[ve](t){return Ite(t)&&oe(this.buckets,t.buckets)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return ie(this,arguments)}}var BD,HD;class Tte{constructor(t,n,r,i,s,a){y(this,"error");y(this,"quantiles");y(this,"count");y(this,"min");y(this,"max");y(this,"sum");y(this,HD,Mm);y(this,BD,yw);this.error=t,this.quantiles=n,this.count=r,this.min=i,this.max=s,this.sum=a}[(HD=Nm,BD=yw,be)](){return O(re(r4),Se(re(this.error)),Se(re(this.quantiles)),Se(re(this.count)),Se(re(this.min)),Se(re(this.max)),Se(re(this.sum)),rt(this))}[ve](t){return $te(t)&&this.error===t.error&&oe(this.quantiles,t.quantiles)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return ie(this,arguments)}}const Ate=e=>new wte(e),Ote=e=>new kte(e),Rte=e=>new Ete(e),Nte=e=>new Cte(e.buckets,e.count,e.min,e.max,e.sum),Mte=e=>new Tte(e.error,e.quantiles,e.count,e.min,e.max,e.sum),Dte=e=>fe(e,hw),zte=e=>fe(e,mw),jte=e=>fe(e,pw),Ite=e=>fe(e,gw),$te=e=>fe(e,yw),Lte="effect/MetricHook",Fte=Symbol.for(Lte),Pte={_In:e=>e,_Out:e=>e},Dm=e=>({[Fte]:Pte,pipe(){return ie(this,arguments)},...e}),z2=BigInt(0),Ute=e=>{let t=e.keyType.bigint?z2:0;const n=e.keyType.incremental?e.keyType.bigint?i=>i>=z2:i=>i>=0:i=>!0,r=i=>{n(i)&&(t=t+i)};return Dm({get:()=>Ate(t),update:r,modify:r})},Bte=e=>{const t=new Map;for(const r of e.keyType.preregisteredWords)t.set(r,0);const n=r=>{const i=t.get(r)??0;t.set(r,i+1)};return Dm({get:()=>Ote(t),update:n,modify:n})},Hte=(e,t)=>{let n=t;return Dm({get:()=>Rte(n),update:r=>{n=r},modify:r=>{n=n+r}})},qte=e=>{const t=e.keyType.boundaries.values,n=t.length,r=new Uint32Array(n+1),i=new Float64Array(n);let s=0,a=0,o=Number.MAX_VALUE,l=Number.MIN_VALUE;O(t,Oh(Hu),ul((u,d)=>{i[d]=u}));const c=u=>{let d=0,h=n;for(;d!==h;){const g=Math.floor(d+(h-d)/2),v=i[g];u<=v?h=g:d=g,h===d+1&&(u<=i[d]?h=d:d=h)}r[d]=r[d]+1,s=s+1,a=a+u,u<o&&(o=u),u>l&&(l=u)},f=()=>{const u=iv(n);let d=0;for(let h=0;h<n;h++){const g=i[h],v=r[h];d=d+v,u[h]=[g,d]}return u};return Dm({get:()=>Nte({buckets:f(),count:s,min:o,max:l,sum:a}),update:c,modify:c})},Vte=e=>{const{error:t,maxAge:n,maxSize:r,quantiles:i}=e.keyType,s=O(i,Oh(Hu)),a=iv(r);let o=0,l=0,c=0,f=0,u=0;const d=g=>{const v=[];let x=0;for(;x!==r-1;){const m=a[x];if(m!=null){const[b,S]=m,_=Fu(g-b);DY(_,Lu)&&MY(_,n)&&v.push(S)}x=x+1}return Kte(t,s,Oh(v,Hu))},h=(g,v)=>{if(r>0){o=o+1;const x=o%r;a[x]=[v,g]}f=l===0?g:Math.min(f,g),u=l===0?g:Math.max(u,g),l=l+1,c=c+g};return Dm({get:()=>Mte({error:t,quantiles:d(Date.now()),count:l,min:f,max:u,sum:c}),update:([g,v])=>h(g,v),modify:([g,v])=>h(g,v)})},Kte=(e,t,n)=>{const r=n.length;if(!rn(t))return co();const i=t[0],s=t.slice(1),a=j2(e,r,q(),0,i,n),o=mi(a);return s.forEach(l=>{o.push(j2(e,r,a.value,a.consumed,l,a.rest))}),ul(o,l=>[l.quantile,l.value])},j2=(e,t,n,r,i,s)=>{let a=e,o=t,l=n,c=r,f=i,u=s,d=e,h=t,g=n,v=r,x=i,m=s;for(;;){if(!rn(u))return{quantile:f,value:q(),consumed:c,rest:[]};if(f===1)return{quantile:f,value:J(gL(u)),consumed:c+u.length,rest:[]};const b=Jn(u),S=rG(u,M=>M===b),_=f*o,C=a/2*_,E=c+S[0].length,A=Math.abs(E-_);if(E<_-C){d=a,h=o,g=Gd(u),v=E,x=f,m=S[1],a=d,o=h,l=g,c=v,f=x,u=m;continue}if(E>_+C){const M=Ct(l)?J(b):l;return{quantile:f,value:M,consumed:c,rest:u}}switch(l._tag){case"None":{d=a,h=o,g=Gd(u),v=E,x=f,m=S[1],a=d,o=h,l=g,c=v,f=x,u=m;continue}case"Some":{const M=Math.abs(_-l.value);if(A<M){d=a,h=o,g=Gd(u),v=E,x=f,m=S[1],a=d,o=h,l=g,c=v,f=x,u=m;continue}return{quantile:f,value:J(l.value),consumed:c,rest:u}}}}throw new Error("BUG: MetricHook.resolveQuantiles - please report an issue at https://github.com/Effect-TS/effect/issues")},Gte="effect/MetricPair",Yte=Symbol.for(Gte),Jte={_Type:e=>e},Qte=(e,t)=>({[Yte]:Jte,metricKey:e,metricState:t,pipe(){return ie(this,arguments)}}),Xte="effect/MetricRegistry",I2=Symbol.for(Xte);var qD;qD=I2;class Wte{constructor(){y(this,qD,I2);y(this,"map",dw())}snapshot(){const t=[];for(const[n,r]of this.map)t.push(Qte(n,r.get()));return t}get(t){const n=O(this.map,As(t),qr);if(n==null){if(JF(t.keyType))return this.getCounter(t);if(lte(t.keyType))return this.getGauge(t);if(ote(t.keyType))return this.getFrequency(t);if(QF(t.keyType))return this.getHistogram(t);if(cte(t.keyType))return this.getSummary(t);throw new Error("BUG: MetricRegistry.get - unknown MetricKeyType - please report an issue at https://github.com/Effect-TS/effect/issues")}else return n}getCounter(t){let n=O(this.map,As(t),qr);if(n==null){const r=Ute(t);O(this.map,nd(t))||O(this.map,Jo(t,r)),n=r}return n}getFrequency(t){let n=O(this.map,As(t),qr);if(n==null){const r=Bte(t);O(this.map,nd(t))||O(this.map,Jo(t,r)),n=r}return n}getGauge(t){let n=O(this.map,As(t),qr);if(n==null){const r=Hte(t,t.keyType.bigint?BigInt(0):0);O(this.map,nd(t))||O(this.map,Jo(t,r)),n=r}return n}getHistogram(t){let n=O(this.map,As(t),qr);if(n==null){const r=qte(t);O(this.map,nd(t))||O(this.map,Jo(t,r)),n=r}return n}getSummary(t){let n=O(this.map,As(t),qr);if(n==null){const r=Vte(t);O(this.map,nd(t))||O(this.map,Jo(t,r)),n=r}return n}}const Zte=()=>new Wte,ene="effect/Metric",tne=Symbol.for(ene),nne={_Type:e=>e,_In:e=>e,_Out:e=>e},$2=ge(Symbol.for("effect/Metric/globalMetricRegistry"),()=>Zte()),i4=function(e,t,n,r){const i=Object.assign(s=>TE(s,a=>ane(i,a)),{[tne]:nne,keyType:e,unsafeUpdate:t,unsafeValue:n,unsafeModify:r,register(){return this.unsafeValue([]),this},pipe(){return ie(this,arguments)}});return i},Bv=(e,t)=>s4(mte(e,t)),s4=e=>{let t;const n=new WeakMap,r=i=>{if(i.length===0)return t!==void 0||(t=$2.get(e)),t;let s=n.get(i);return s!==void 0||(s=$2.get(gte(e,i)),n.set(i,s)),s};return i4(e.keyType,(i,s)=>r(s).update(i),i=>r(i).get(),(i,s)=>r(s).modify(i))},rne=(e,t,n)=>s4(pte(e,t,n)),ine=k(3,(e,t,n)=>sne(e,[WZ(t,n)])),sne=k(2,(e,t)=>i4(e.keyType,(n,r)=>e.unsafeUpdate(n,cg(t,r)),n=>e.unsafeValue(cg(t,n)),(n,r)=>e.unsafeModify(n,cg(t,r)))),ane=k(2,(e,t)=>Ov(J1,n=>K(()=>e.unsafeUpdate(t,n))));({...nv});const one=k(2,(e,t)=>Ov(DF,n=>K(()=>{if(n.has(e)){const r=n.get(e);r.state.completed||(r.state.completed=!0,Iv(r.result,t))}}))),lne="effect/Supervisor",Hv=Symbol.for(lne),cC={_T:e=>e};var VD;VD=Hv;const iA=class iA{constructor(t,n){y(this,"underlying");y(this,"value0");y(this,VD,cC);this.underlying=t,this.value0=n}get value(){return this.value0}onStart(t,n,r,i){this.underlying.onStart(t,n,r,i)}onEnd(t,n){this.underlying.onEnd(t,n)}onEffect(t,n){this.underlying.onEffect(t,n)}onSuspend(t){this.underlying.onSuspend(t)}onResume(t){this.underlying.onResume(t)}map(t){return new iA(this,O(this.value,Ae(t)))}zip(t){return new Py(this,t)}};let Fy=iA;var KD;KD=Hv;const sA=class sA{constructor(t,n){y(this,"left");y(this,"right");y(this,"_tag","Zip");y(this,KD,cC);this.left=t,this.right=n}get value(){return Tv(this.left.value,this.right.value)}onStart(t,n,r,i){this.left.onStart(t,n,r,i),this.right.onStart(t,n,r,i)}onEnd(t,n){this.left.onEnd(t,n),this.right.onEnd(t,n)}onEffect(t,n){this.left.onEffect(t,n),this.right.onEffect(t,n)}onSuspend(t){this.left.onSuspend(t),this.right.onSuspend(t)}onResume(t){this.left.onResume(t),this.right.onResume(t)}map(t){return new Fy(this,O(this.value,Ae(t)))}zip(t){return new sA(this,t)}};let Py=sA;const a4=e=>fe(e,Hv)&&N$(e,"Zip");var GD;GD=Hv;class cne{constructor(t){y(this,"effect");y(this,GD,cC);this.effect=t}get value(){return this.effect}onStart(t,n,r,i){}onEnd(t,n){}onEffect(t,n){}onSuspend(t){}onResume(t){}map(t){return new Fy(this,O(this.value,Ae(t)))}zip(t){return new Py(this,t)}onRun(t,n){return t()}}const une=e=>new cne(e),qv=ge("effect/Supervisor/none",()=>une(nt)),fne=xf,o4="Empty",l4="AddSupervisor",c4="RemoveSupervisor",u4="AndThen",Qd={_tag:o4},pg=(e,t)=>({_tag:u4,first:e,second:t}),dne=(e,t)=>hne(t,Jt(e)),hne=(e,t)=>{let n=e,r=t;for(;ta(r);){const i=Ki(r);switch(i._tag){case o4:{r=js(r);break}case l4:{n=n.zip(i.supervisor),r=js(r);break}case c4:{n=bw(n,i.supervisor),r=js(r);break}case u4:{r=In(i.first)(In(i.second)(js(r)));break}}}return n},bw=(e,t)=>oe(e,t)?qv:a4(e)?bw(e.left,t).zip(bw(e.right,t)):e,Uy=e=>oe(e,qv)?_l():a4(e)?O(Uy(e.left),Mh(Uy(e.right))):pE(e),mne=(e,t)=>{if(oe(e,t))return Qd;const n=Uy(e),r=Uy(t),i=O(r,HO(n),Dh(Qd,(a,o)=>pg(a,{_tag:l4,supervisor:o}))),s=O(n,HO(r),Dh(Qd,(a,o)=>pg(a,{_tag:c4,supervisor:o})));return pg(i,s)},pne=fne({empty:Qd,patch:dne,combine:pg,diff:mne}),gne=Bv("effect_fiber_started",{incremental:!0}),L2=Bv("effect_fiber_active"),yne=Bv("effect_fiber_successes",{incremental:!0}),bne=Bv("effect_fiber_failures",{incremental:!0}),vne=ine(rne("effect_fiber_lifetimes",Jee({start:.5,factor:2,count:35})),"time_unit","milliseconds"),rd="Continue",Sne="Done",F2="Yield",xne={_E:e=>e,_A:e=>e},Cp=e=>{throw new Error(`BUG: FiberRuntime - ${Ru(e)} - please report an issue at https://github.com/Effect-TS/effect/issues`)},vs=Symbol.for("effect/internal/fiberRuntime/YieldedOp"),Ss=ge("effect/internal/fiberRuntime/yieldedOpChannel",()=>({currentOp:null})),id={[fy]:(e,t,n)=>xn(()=>t.effect_instruction_i1(n)),OnStep:(e,t,n)=>tt(tt(n)),[dy]:(e,t,n)=>xn(()=>t.effect_instruction_i2(n)),[Kk]:(e,t,n)=>(e.patchRuntimeFlags(e.currentRuntimeFlags,t.patch),Ea(e.currentRuntimeFlags)&&e.isInterrupted()?Ze(e.getInterruptedCause()):tt(n)),[hy]:(e,t,n)=>(xn(()=>t.effect_instruction_i2(n)),xn(()=>t.effect_instruction_i0())?(e.pushStack(t),xn(()=>t.effect_instruction_i1())):nt),[Kd]:(e,t,n)=>{for(;;){const r=xn(()=>t.effect_instruction_i0.next(n));if(r.done)return tt(r.value);const i=C7(r.value);if(Nv(i)){if(i._tag==="Failure")return i}else return e.pushStack(t),i;n=i.value}}},wne={[nC]:(e,t,n,r)=>(e.processNewInterruptSignal(r.cause),Ea(t)?Ze(r.cause):n),[iC]:(e,t,n,r)=>{throw new Error("It is illegal to have multiple concurrent run loops in a single fiber")},[rC]:(e,t,n,r)=>(r.onFiber(e,SF(t)),n),[sC]:(e,t,n,r)=>B(RE(),()=>n)},_ne=e=>Ev(gQ(e),t=>Zi(RQ(t),([n,r])=>{const i=new Map,s=[];for(const o of r){s.push(Qn(o));for(const l of o)i.set(l.request,l)}const a=s.flat();return wf(Kne(n.runAll(s),a,()=>a.forEach(o=>{o.listeners.interrupted=!0})),DF,i)},!1,!1)),kne=Gk();var YD,JD;class f4 extends Tf{constructor(n,r,i){super();y(this,JD,Mee);y(this,YD,xne);y(this,"_fiberRefs");y(this,"_fiberId");y(this,"_queue",new Array);y(this,"_children",null);y(this,"_observers",new Array);y(this,"_running",!1);y(this,"_stack",[]);y(this,"_asyncInterruptor",null);y(this,"_asyncBlockingOn",null);y(this,"_exitValue",null);y(this,"_steps",[]);y(this,"_isYielding",!1);y(this,"currentRuntimeFlags");y(this,"currentOpCount",0);y(this,"currentSupervisor");y(this,"currentScheduler");y(this,"currentTracer");y(this,"currentSpan");y(this,"currentContext");y(this,"currentDefaultServices");y(this,"run",()=>{this.drainQueueOnCurrentThread()});if(this.currentRuntimeFlags=i,this._fiberId=n,this._fiberRefs=r,t2(i)){const s=this.getFiberRef(J1);gne.unsafeUpdate(1,s),L2.unsafeUpdate(1,s)}this.refreshRefCache()}commit(){return Hh(this)}id(){return this._fiberId}resume(n){this.tell(lc(n))}get status(){return this.ask((n,r)=>r)}get runtimeFlags(){return this.ask((n,r)=>eZ(r)?n.currentRuntimeFlags:r.runtimeFlags)}scope(){return Oee(this)}get children(){return this.ask(n=>Array.from(n.getChildren()))}getChildren(){return this._children===null&&(this._children=new Set),this._children}getInterruptedCause(){return this.getFiberRef(kp)}fiberRefs(){return this.ask(n=>n.getFiberRefs())}ask(n){return Te(()=>{const r=Dv(this._fiberId);return this.tell(mg((i,s)=>{Iv(r,K(()=>n(i,s)))})),po(r)})}tell(n){this._queue.push(n),this._running||(this._running=!0,this.drainQueueLaterOnExecutor())}get await(){return Ti(n=>{const r=i=>n(te(i));return this.tell(mg((i,s)=>{i._exitValue!==null?r(this._exitValue):i.addObserver(r)})),K(()=>this.tell(mg((i,s)=>{i.removeObserver(r)})))},this.id())}get inheritAll(){return He((n,r)=>{const i=n.id(),s=n.getFiberRefs(),a=r.runtimeFlags,o=this.getFiberRefs(),l=LW(s,i,o);n.setFiberRefs(l);const c=n.getFiberRef(H2),f=O(Ja(a,c),r2(Jl),r2(G1));return D3(f)})}get poll(){return K(()=>gf(this._exitValue))}unsafePoll(){return this._exitValue}interruptAsFork(n){return K(()=>this.tell(C0(yi(n))))}unsafeInterruptAsFork(n){this.tell(C0(yi(n)))}addObserver(n){this._exitValue!==null?n(this._exitValue):this._observers.push(n)}removeObserver(n){this._observers=this._observers.filter(r=>r!==n)}getFiberRefs(){return this.setFiberRef(H2,this.currentRuntimeFlags),this._fiberRefs}unsafeDeleteFiberRef(n){this._fiberRefs=fF(this._fiberRefs,n)}getFiberRef(n){return this._fiberRefs.locals.has(n)?this._fiberRefs.locals.get(n)[0][1]:n.initial}setFiberRef(n,r){this._fiberRefs=iw(this._fiberRefs,{fiberId:this._fiberId,fiberRef:n,value:r}),this.refreshRefCache()}refreshRefCache(){this.currentDefaultServices=this.getFiberRef(qu),this.currentTracer=this.currentDefaultServices.unsafeMap.get(UE.key),this.currentSupervisor=this.getFiberRef(Hne),this.currentScheduler=this.getFiberRef(ZE),this.currentContext=this.getFiberRef(ls),this.currentSpan=this.currentContext.unsafeMap.get(Lv.key)}setFiberRefs(n){this._fiberRefs=n,this.refreshRefCache()}addChild(n){this.getChildren().add(n)}removeChild(n){this.getChildren().delete(n)}transferChildren(n){const r=this._children;if(this._children=null,r!==null&&r.size>0)for(const i of r)i._exitValue===null&&n.add(this.currentRuntimeFlags,i)}drainQueueOnCurrentThread(){let n=!0;for(;n;){let r=rd;const i=globalThis[Sa];globalThis[Sa]=this;try{for(;r===rd;)r=this._queue.length===0?Sne:this.evaluateMessageWhileSuspended(this._queue.splice(0,1)[0])}finally{this._running=!1,globalThis[Sa]=i}this._queue.length>0&&!this._running?(this._running=!0,r===F2?(this.drainQueueLaterOnExecutor(),n=!1):n=!0):n=!1}}drainQueueLaterOnExecutor(){this.currentScheduler.scheduleTask(this.run,this.getFiberRef(kf))}drainQueueWhileRunning(n,r){let i=r;for(;this._queue.length>0;){const s=this._queue.splice(0,1)[0];i=wne[s._tag](this,n,i,s)}return i}isInterrupted(){return!iY(this.getFiberRef(kp))}addInterruptedCause(n){const r=this.getFiberRef(kp);this.setFiberRef(kp,Mn(r,n))}processNewInterruptSignal(n){this.addInterruptedCause(n),this.sendInterruptSignalToAllChildren()}sendInterruptSignalToAllChildren(){if(this._children===null||this._children.size===0)return!1;let n=!1;for(const r of this._children)r.tell(C0(yi(this.id()))),n=!0;return n}interruptAllChildren(){if(this.sendInterruptSignalToAllChildren()){const n=this._children.values();this._children=null;let r=!1;return OE({while:()=>!r,body:()=>{const s=n.next();return s.done?K(()=>{r=!0}):oi(s.value.await)},step:()=>{}})}return null}reportExitValue(n){if(t2(this.currentRuntimeFlags)){const r=this.getFiberRef(J1),i=this.id().startTimeMillis,s=Date.now();switch(vne.unsafeUpdate(s-i,r),L2.unsafeUpdate(-1,r),n._tag){case pn:{yne.unsafeUpdate(1,r);break}case mn:{bne.unsafeUpdate(1,r);break}}}if(n._tag==="Failure"){const r=this.getFiberRef(cX);!mv(n.cause)&&r._tag==="Some"&&this.log("Fiber terminated with an unhandled error",n.cause,r)}}setExitValue(n){this._exitValue=n,this.reportExitValue(n);for(let r=this._observers.length-1;r>=0;r--)this._observers[r](n);this._observers=[]}getLoggers(){return this.getFiberRef(One)}log(n,r,i){const s=gt(i)?i.value:this.getFiberRef(iX),a=this.getFiberRef(Ene);if(uZ(a,s))return;const o=this.getFiberRef(sX),l=this.getFiberRef(rX),c=this.getLoggers(),f=this.getFiberRefs();if(gE(c)>0){const u=Vs(this.getFiberRef(qu),Ef),d=new Date(u.unsafeCurrentTimeMillis());D7(f,()=>{for(const h of c)h.log({fiberId:this.id(),logLevel:s,message:n,cause:r,context:f,spans:o,annotations:l,date:d})})}}evaluateMessageWhileSuspended(n){switch(n._tag){case sC:return F2;case nC:return this.processNewInterruptSignal(n.cause),this._asyncInterruptor!==null&&(this._asyncInterruptor(Ze(n.cause)),this._asyncInterruptor=null),rd;case iC:return this._asyncInterruptor=null,this._asyncBlockingOn=null,this.evaluateEffect(n.effect),rd;case rC:return n.onFiber(this,this._exitValue!==null?WW:ZW(this.currentRuntimeFlags,this._asyncBlockingOn)),rd;default:return Cp(n)}}evaluateEffect(n){this.currentSupervisor.onResume(this);try{let r=Ea(this.currentRuntimeFlags)&&this.isInterrupted()?Ze(this.getInterruptedCause()):n;for(;r!==null;){const i=r,s=this.runLoop(i);if(s===vs){const a=Ss.currentOp;Ss.currentOp=null,a._op===lg?uQ(this.currentRuntimeFlags)?(this.tell(Eee()),this.tell(lc(Dn)),r=null):r=Dn:a._op===Vd&&(r=null)}else{this.currentRuntimeFlags=O(this.currentRuntimeFlags,dQ(G1));const a=this.interruptAllChildren();a!==null?r=B(a,()=>s):(this._queue.length===0?this.setExitValue(s):this.tell(lc(s)),r=null)}}}finally{this.currentSupervisor.onSuspend(this)}}start(n){if(this._running)this.tell(lc(n));else{this._running=!0;const r=globalThis[Sa];globalThis[Sa]=this;try{this.evaluateEffect(n)}finally{this._running=!1,globalThis[Sa]=r,this._queue.length>0&&this.drainQueueLaterOnExecutor()}}}startFork(n){this.tell(lc(n))}patchRuntimeFlags(n,r){const i=iu(n,r);return globalThis[Sa]=this,this.currentRuntimeFlags=i,i}initiateAsync(n,r){let i=!1;const s=a=>{i||(i=!0,this.tell(lc(a)))};Ea(n)&&(this._asyncInterruptor=s);try{r(s)}catch(a){s(an(ei(a)))}}pushStack(n){this._stack.push(n),n._op==="OnStep"&&this._steps.push({refs:this.getFiberRefs(),flags:this.currentRuntimeFlags})}popStack(){const n=this._stack.pop();if(n)return n._op==="OnStep"&&this._steps.pop(),n}getNextSuccessCont(){let n=this.popStack();for(;n;){if(n._op!==og)return n;n=this.popStack()}}getNextFailCont(){let n=this.popStack();for(;n;){if(n._op!==fy&&n._op!==hy&&n._op!==Kd)return n;n=this.popStack()}}[(JD=Nee,YD=zee,z7)](n){return K(()=>Z$(this.currentContext,n))}Left(n){return zt(n.left)}None(n){return zt(new Rv)}Right(n){return tt(n.right)}Some(n){return tt(n.value)}Micro(n){return Ey(r=>{let i=r;const s=FZ(MZ(n,this.currentContext));return s.addObserver(a=>{if(a._tag==="Success")return i(tt(a.value));switch(a.cause._tag){case"Interrupt":return i(Ze(yi(Or)));case"Fail":return i(zt(a.cause.error));case"Die":return i($a(a.cause.defect))}}),Ey(a=>{i=o=>{a(nt)},s.unsafeInterrupt()})})}[U$](n){const r=xn(()=>n.effect_instruction_i0()),i=this.getNextSuccessCont();return i!==void 0?(i._op in id||Cp(i),id[i._op](this,i,r)):(Ss.currentOp=tt(r),vs)}[pn](n){const r=n,i=this.getNextSuccessCont();return i!==void 0?(i._op in id||Cp(i),id[i._op](this,i,r.effect_instruction_i0)):(Ss.currentOp=r,vs)}[mn](n){const r=n.effect_instruction_i0,i=this.getNextFailCont();if(i!==void 0)switch(i._op){case og:case dy:return Ea(this.currentRuntimeFlags)&&this.isInterrupted()?Ze(qO(r)):xn(()=>i.effect_instruction_i1(r));case"OnStep":return Ea(this.currentRuntimeFlags)&&this.isInterrupted()?Ze(qO(r)):tt(Ze(r));case Kk:return this.patchRuntimeFlags(this.currentRuntimeFlags,i.patch),Ea(this.currentRuntimeFlags)&&this.isInterrupted()?Ze(Mn(r,this.getInterruptedCause())):Ze(r);default:Cp(i)}else return Ss.currentOp=Ze(r),vs}[B$](n){return xn(()=>n.effect_instruction_i0(this,SF(this.currentRuntimeFlags)))}Blocked(n){const r=this.getFiberRefs(),i=this.currentRuntimeFlags;if(this._steps.length>0){const s=[],a=this._steps[this._steps.length-1];let o=this.popStack();for(;o&&o._op!=="OnStep";)s.push(o),o=this.popStack();this.setFiberRefs(a.refs),this.currentRuntimeFlags=a.flags;const l=Ph(a.refs,r),c=Ja(a.flags,i);return tt(w3(n.effect_instruction_i0,He(f=>{for(;s.length>0;)f.pushStack(s.pop());return f.setFiberRefs(Uh(f.id(),f.getFiberRefs())(l)),f.currentRuntimeFlags=iu(c)(f.currentRuntimeFlags),n.effect_instruction_i1})))}return Ai(s=>B(uC(jQ(n.effect_instruction_i0)),()=>s(n.effect_instruction_i1)))}RunBlocked(n){return _ne(n.effect_instruction_i0)}[hf](n){const r=n.effect_instruction_i0,i=this.currentRuntimeFlags,s=iu(i,r);if(Ea(s)&&this.isInterrupted())return Ze(this.getInterruptedCause());if(this.patchRuntimeFlags(this.currentRuntimeFlags,r),n.effect_instruction_i1){const a=Ja(s,i);return this.pushStack(new IQ(a,n)),xn(()=>n.effect_instruction_i1(i))}else return Dn}[fy](n){return this.pushStack(n),n.effect_instruction_i0}OnStep(n){return this.pushStack(n),n.effect_instruction_i0}[og](n){return this.pushStack(n),n.effect_instruction_i0}[dy](n){return this.pushStack(n),n.effect_instruction_i0}[Vd](n){return this._asyncBlockingOn=n.effect_instruction_i1,this.initiateAsync(this.currentRuntimeFlags,n.effect_instruction_i0),Ss.currentOp=n,vs}[lg](n){return this._isYielding=!1,Ss.currentOp=n,vs}[hy](n){const r=n.effect_instruction_i0,i=n.effect_instruction_i1;return r()?(this.pushStack(n),i()):Dn}[Kd](n){return id[Kd](this,n,void 0)}[tv](n){return xn(()=>n.commit())}runLoop(n){let r=n;for(this.currentOpCount=0;;){if(this.currentRuntimeFlags&cQ&&this.currentSupervisor.onEffect(this,r),this._queue.length>0&&(r=this.drainQueueWhileRunning(this.currentRuntimeFlags,r)),!this._isYielding){this.currentOpCount+=1;const i=this.currentScheduler.shouldYield(this);if(i!==!1){this._isYielding=!0,this.currentOpCount=0;const s=r;r=B(RE({priority:i}),()=>s)}}try{if(r=this.currentTracer.context(()=>{if(kne!==r[Al]._V){const i=this.getFiberRef(uX);if(i._tag==="Some"){const s=r[Al]._V;this.log(`Executing an Effect versioned ${s} with a Runtime of version ${Gk()}, you may want to dedupe the effect dependencies, you can use the language service plugin to detect this at compile time: https://github.com/Effect-TS/language-service`,fo,i)}}return this[r._op](r)},this),r===vs){const i=Ss.currentOp;return i._op===lg||i._op===Vd?vs:(Ss.currentOp=null,i._op===pn||i._op===mn?i:Ze(ei(i)))}}catch(i){r!==vs&&!fe(r,"_op")||!(r._op in this)?r=A3(`Not a valid effect: ${Ru(r)}`):yX(i)?r=Ze(Mn(ei(i),yi(Or))):r=$a(i)}}}}const Ene=ge("effect/FiberRef/currentMinimumLogLevel",()=>on(fZ("Info"))),Cne=e=>aC(t=>{const n=hF(t.context,qu);Vs(n,aF).unsafe.log(e.log(t))}),Tne=ge(Symbol.for("effect/Logger/defaultLogger"),()=>Cne(qee)),Ane=ge(Symbol.for("effect/Logger/tracerLogger"),()=>aC(({annotations:e,cause:t,context:n,fiberId:r,logLevel:i,message:s})=>{const a=mf(Fh(n,ls),Lv);if(a._tag==="None"||a.value._tag==="ExternalSpan")return;const o=Z$(Fh(n,qu),Ef),l={};for(const[c,f]of e)l[c]=f;l["effect.fiberId"]=GY(r),l["effect.logLevel"]=i.label,t!==null&&t._tag!=="Empty"&&(l["effect.cause"]=Sf(t,{renderErrorCause:!0})),a.value.event(Ru(Array.isArray(s)&&s.length===1?s[0]:s),o.unsafeCurrentTimeNanos(),l)})),One=ge(Symbol.for("effect/FiberRef/currentLoggers"),()=>eX(pE(Tne,Ane))),Rne=k(e=>oa(e[0]),(e,t)=>Rm(TE(e,n=>Nne(r=>t(n,r))))),Nne=e=>He(t=>{const n=t.getFiberRefs(),r=fQ(t.currentRuntimeFlags,Jl);return B(y4,i=>Cy(i,s=>He(a=>{const o=a.getFiberRefs(),l=a.currentRuntimeFlags,c=Ph(o,n),f=Ja(l,r),u=Ph(n,o);return a.setFiberRefs(Uh(c,a.id(),n)),qh(BQ(e(s),f),K(()=>{a.setFiberRefs(Uh(u,a.id(),a.getFiberRefs()))}))})))}),Mne=e=>{if(Array.isArray(e)||D$(e))return[e,q()];const t=Object.keys(e),n=t.length;return[t.map(r=>e[r]),J(r=>{const i={};for(let s=0;s<n;s++)i[t[s]]=r[s];return i})]},Dne=(e,t,n)=>{const r=[];for(const i of e)r.push(Bu(i));return B(Ku(r,ce,{concurrency:n==null?void 0:n.concurrency,batching:n==null?void 0:n.batching,concurrentFinalizers:n==null?void 0:n.concurrentFinalizers}),i=>{const s=q(),a=i.length,o=new Array(a),l=new Array(a);let c=!1;for(let f=0;f<a;f++){const u=i[f];u._tag==="Left"?(o[f]=J(u.left),c=!0):(l[f]=u.right,o[f]=s)}return c?t._tag==="Some"?zt(t.value(o)):zt(o):n!=null&&n.discard?nt:t._tag==="Some"?te(t.value(l)):te(l)})},zne=(e,t,n)=>{const r=[];for(const i of e)r.push(Bu(i));return n!=null&&n.discard?Ku(r,ce,{concurrency:n==null?void 0:n.concurrency,batching:n==null?void 0:n.batching,discard:!0,concurrentFinalizers:n==null?void 0:n.concurrentFinalizers}):Ae(Ku(r,ce,{concurrency:n==null?void 0:n.concurrency,batching:n==null?void 0:n.batching,concurrentFinalizers:n==null?void 0:n.concurrentFinalizers}),i=>t._tag==="Some"?t.value(i):i)},d4=(e,t)=>{const[n,r]=Mne(e);return(t==null?void 0:t.mode)==="validate"?Dne(n,r,t):(t==null?void 0:t.mode)==="either"?zne(n,r,t):(t==null?void 0:t.discard)!==!0&&r._tag==="Some"?Ae(Ku(n,ce,t),r.value):Ku(n,ce,t)},Ku=k(e=>D$(e[0]),(e,t,n)=>He(r=>{const i=(n==null?void 0:n.batching)===!0||(n==null?void 0:n.batching)==="inherit"&&r.getFiberRef(lX);return n!=null&&n.discard?O2(n.concurrency,()=>cc(Oy,n==null?void 0:n.concurrentFinalizers)(s=>i?Zi(e,(a,o)=>s(t(a,o)),!0,!1,1):Ev(e,(a,o)=>s(t(a,o)))),()=>cc(nw,n==null?void 0:n.concurrentFinalizers)(s=>Zi(e,(a,o)=>s(t(a,o)),i,!1)),s=>cc(rw(s),n==null?void 0:n.concurrentFinalizers)(a=>Zi(e,(o,l)=>a(t(o,l)),i,!1,s))):O2(n==null?void 0:n.concurrency,()=>cc(Oy,n==null?void 0:n.concurrentFinalizers)(s=>i?vw(e,1,(a,o)=>s(t(a,o)),!0):Is(e,(a,o)=>s(t(a,o)))),()=>cc(nw,n==null?void 0:n.concurrentFinalizers)(s=>h4(e,(a,o)=>s(t(a,o)),i)),s=>cc(rw(s),n==null?void 0:n.concurrentFinalizers)(a=>vw(e,s,(o,l)=>a(t(o,l)),i)))})),h4=(e,t,n)=>Te(()=>{const r=Qe(e),i=new Array(r.length);return Nt(Zi(r,(a,o)=>B(t(a,o),l=>K(()=>i[o]=l)),n,!1),te(i))}),Zi=(e,t,n,r,i)=>Ai(s=>UQ(a=>He(o=>{let l=Array.from(e).reverse(),c=l.length;if(c===0)return nt;let f=0,u=!1;const d=i?Math.min(l.length,i):l.length,h=new Set,g=new Array,v=()=>h.forEach(M=>{M.currentScheduler.scheduleTask(()=>{M.unsafeInterruptAsFork(o.id())},0)}),x=new Array,m=new Array,b=new Array,S=()=>{const M=g.filter(({exit:D})=>D._tag==="Failure").sort((D,N)=>D.index<N.index?-1:D.index===N.index?0:1).map(({exit:D})=>D);return M.length===0&&M.push(Dn),M},_=(M,D=!1)=>{const N=Rm(a(M)),I=jne(N,o,o.currentRuntimeFlags,Uv);return o.currentScheduler.scheduleTask(()=>{D&&I.unsafeInterruptAsFork(o.id()),I.resume(N)},0),I},C=()=>{r||(c-=l.length,l=[]),u=!0,v()},E=n?$Q:Qa,A=_(Ti(M=>{const D=(I,$)=>{I._op==="Blocked"?b.push(I):(g.push({index:$,exit:I}),I._op==="Failure"&&!u&&C())},N=()=>{if(l.length>0){const I=l.pop();let $=f++;const X=()=>{const L=l.pop();return $=f++,B(RE(),()=>B(E(s(t(L,$))),Q))},Q=L=>l.length>0&&(D(L,$),l.length>0)?X():te(L),Y=B(E(s(t(I,$))),Q),z=_(Y);x.push(z),h.add(z),u&&z.currentScheduler.scheduleTask(()=>{z.unsafeInterruptAsFork(o.id())},0),z.addObserver(L=>{let j;if(L._op==="Failure"?j=L:j=L.effect_instruction_i0,m.push(z),h.delete(z),D(j,$),g.length===c)M(te(ut(su(S(),{parallel:!0}),()=>Dn)));else if(b.length+g.length===c){const ne=S(),R=b.map(Re=>Re.effect_instruction_i0).reduce(b3);M(te(w3(R,Zi([ut(su(ne,{parallel:!0}),()=>Dn),...b.map(Re=>Re.effect_instruction_i1)],Re=>Re,n,!0,i))))}else N()})}};for(let I=0;I<d;I++)N()}));return oi(Ol(kv(s(Hh(A))),Mv({onFailure:M=>{C();const D=b.length+1,N=Math.min(typeof i=="number"?i:b.length,b.length),I=Array.from(b);return Ti($=>{let X=0,Q=0;const Y=(L,j)=>ne=>{X++,X===D&&$(tt(Ze(M))),I.length>0&&j&&z()},z=()=>{_(I.pop(),!0).addObserver(Y(Q,!0)),Q++};A.addObserver(Y(Q,!1)),Q++;for(let L=0;L<N;L++)z()})},onSuccess:()=>Is(m,M=>M.inheritAll)})))}))),vw=(e,t,n,r)=>Te(()=>{const i=Qe(e),s=new Array(i.length);return Nt(Zi(i,(o,l)=>Ae(n(o,l),c=>s[l]=c),r,!1,t),te(s))}),uC=e=>Ine(e,Uv),m4=(e,t,n,r=null)=>{const i=By(e,t,n,r);return i.resume(e),i},jne=(e,t,n,r=null)=>By(e,t,n,r),By=(e,t,n,r=null)=>{const i=t3(),s=t.getFiberRefs(),a=FW(s,i),o=new f4(i,a,n),l=Fh(a,ls),c=o.currentSupervisor;return c.onStart(l,e,J(t),o),o.addObserver(u=>c.onEnd(u,o)),(r!==null?r:O(t.getFiberRef(Q1),ut(()=>t.scope()))).add(n,o),o},Ine=(e,t)=>He((n,r)=>te(m4(e,n,r.runtimeFlags,t))),P2=e=>Ql(t=>pt(mf(t,Eo),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Parallel":return e;case"Sequential":case"ParallelN":return B(Rs(n,nw),r=>jm(e,r))}}})),U2=e=>t=>Ql(n=>pt(mf(n,Eo),{onNone:()=>t,onSome:r=>r.strategy._tag==="ParallelN"&&r.strategy.parallelism===e?t:B(Rs(r,rw(e)),i=>jm(t,i))})),cc=(e,t)=>n=>Ql(r=>pt(mf(r,Eo),{onNone:()=>n(ce),onSome:i=>{if(t===!0){const s=e._tag==="Parallel"?P2:e._tag==="Sequential"?B2:U2(e.parallelism);switch(i.strategy._tag){case"Parallel":return s(n(P2));case"Sequential":return s(n(B2));case"ParallelN":return s(n(U2(i.strategy.parallelism)))}}else return n(ce)}})),p4=e=>B(Eo,e),g4=e=>B(fC(),t=>Ol(e(t),n=>t.close(n))),B2=e=>Ql(t=>pt(mf(t,Eo),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Sequential":return e;case"Parallel":case"ParallelN":return B(Rs(n,Oy),r=>jm(e,r))}}})),$ne=k(e=>oa(e[1]),(e,t,n)=>zm(e,t,(r,i)=>[r,i],n)),Lne=k(e=>oa(e[1]),(e,t,n)=>(n==null?void 0:n.concurrent)!==!0&&((n==null?void 0:n.batching)===void 0||n.batching===!1)?Av(e,t):zm(e,t,(r,i)=>r,n)),Fne=k(e=>oa(e[1]),(e,t,n)=>(n==null?void 0:n.concurrent)!==!0&&((n==null?void 0:n.batching)===void 0||n.batching===!1)?Nt(e,t):zm(e,t,(r,i)=>i,n)),zm=k(e=>oa(e[1]),(e,t,n,r)=>Ae(d4([e,t],{concurrency:r!=null&&r.concurrent?2:1,batching:r==null?void 0:r.batching,concurrentFinalizers:r==null?void 0:r.concurrentFinalizers}),([i,s])=>n(i,s))),Eo=ko("effect/Scope"),y4=Eo,Pne=(e,t)=>{e.state._tag==="Open"&&e.state.finalizers.set({},t)},Une={[a2]:a2,[o2]:o2,pipe(){return ie(this,arguments)},fork(e){return K(()=>{const t=b4(e);if(this.state._tag==="Closed")return t.state=this.state,t;const n={},r=i=>t.close(i);return this.state.finalizers.set(n,r),Pne(t,i=>K(()=>{this.state._tag==="Open"&&this.state.finalizers.delete(n)})),t})},close(e){return Te(()=>{if(this.state._tag==="Closed")return nt;const t=Array.from(this.state.finalizers.values()).reverse();return this.state={_tag:"Closed",exit:e},t.length===0?nt:DW(this.strategy)?O(Is(t,n=>Qa(n(e))),B(n=>O(su(n),Gn(_0),ut(()=>Dn)))):zW(this.strategy)?O(h4(t,n=>Qa(n(e)),!1),B(n=>O(su(n,{parallel:!0}),Gn(_0),ut(()=>Dn)))):O(vw(t,this.strategy.parallelism,n=>Qa(n(e)),!1),B(n=>O(su(n,{parallel:!0}),Gn(_0),ut(()=>Dn))))})},addFinalizer(e){return Te(()=>this.state._tag==="Closed"?e(this.state.exit):(this.state.finalizers.set({},e),nt))}},b4=(e=dl)=>{const t=Object.create(Une);return t.strategy=e,t.state={_tag:"Open",finalizers:new Map},t},fC=(e=dl)=>K(()=>b4(e)),jm=k(2,(e,t)=>X3(e,ur(Wk(Eo,t)))),Bne=e=>_f(e,{differ:pne,fork:Qd}),H2=nX(hQ),Hne=Bne(qv),v4=k(3,(e,t,n)=>Vne(e,t,{onSelfWin:(r,i)=>B(r.await,s=>{switch(s._tag){case pn:return B(r.inheritAll,()=>n.onSelfDone(s,i));case mn:return n.onSelfDone(s,i)}}),onOtherWin:(r,i)=>B(r.await,s=>{switch(s._tag){case pn:return B(r.inheritAll,()=>n.onOtherDone(s,i));case mn:return n.onOtherDone(s,i)}})})),qne=k(2,(e,t)=>Am(n=>v4(e,t,{onSelfDone:(r,i)=>Z1(r,{onFailure:s=>O(Hh(i),R2(a=>ho(s,a))),onSuccess:s=>O(i,$h(n),Xn(s))}),onOtherDone:(r,i)=>Z1(r,{onFailure:s=>O(Hh(i),R2(a=>ho(a,s))),onSuccess:s=>O(i,$h(n),Xn(s))})}))),Vne=k(3,(e,t,n)=>He((r,i)=>{const s=i.runtimeFlags,a=Sm(!0),o=By(e,r,s,n.selfScope),l=By(t,r,s,n.otherScope);return Ti(c=>{o.addObserver(()=>q2(o,l,n.onSelfWin,a,c)),l.addObserver(()=>q2(l,o,n.onOtherWin,a,c)),o.startFork(e),l.startFork(t)},Jd(o.id(),l.id()))})),q2=(e,t,n,r,i)=>{LY(!0,!1)(r)&&i(n(e,t))},qh=k(2,(e,t)=>Ai(n=>si(n(e),{onFailure:r=>si(t,{onFailure:i=>an(Mn(r,i)),onSuccess:()=>an(r)}),onSuccess:r=>Xn(t,r)}))),Kne=(e,t,n)=>Am(r=>B(B(uC(EE(e)),i=>Ti(s=>{const a=t.map(c=>c.listeners.count),o=()=>{a.every(c=>c===0)&&t.every(c=>c.result.state.current._tag==="Pending"?!0:!!(c.result.state.current._tag==="Done"&&Nv(c.result.state.current.effect)&&c.result.state.current.effect._tag==="Failure"&&UL(c.result.state.current.effect.cause)))&&(l.forEach(c=>c()),n==null||n(),s(NE(i)))};i.addObserver(c=>{l.forEach(f=>f()),s(c)});const l=t.map((c,f)=>{const u=d=>{a[f]=d,o()};return c.listeners.addObserver(u),()=>c.listeners.removeObserver(u)});return o(),K(()=>{l.forEach(c=>c())})})),()=>Te(()=>{const i=t.flatMap(s=>s.state.completed?[]:[s]);return Ev(i,s=>one(s.request,xX(r)))}))),Gne=fo,S4=El,Sw=ei,x4=yi,Yne=ho,Jne=rY,Qne=PL,Hy=UL,Xne=mv,Wne=yE,Zne=bE,ere=HL,tre=aY,nre=cY,w4=hX,rre=gv,Af=Rv,ire=Sf,sre="effect/ScheduleInterval",qy=Symbol.for(sre),_4={[qy]:qy,startMillis:0,endMillis:0},k4=(e,t)=>e>t?_4:{[qy]:qy,startMillis:e,endMillis:t},are=k(2,(e,t)=>ore(e,t)===e),ore=k(2,(e,t)=>e.endMillis<=t.startMillis?e:t.endMillis<=e.startMillis?t:e.startMillis<t.startMillis?e:t.startMillis<e.startMillis?t:e.endMillis<=t.endMillis?e:t),lre=e=>e.startMillis>=e.endMillis,cre=k(2,(e,t)=>{const n=Math.max(e.startMillis,t.startMillis),r=Math.min(e.endMillis,t.endMillis);return k4(n,r)}),ure=e=>k4(e,Number.POSITIVE_INFINITY),E4=_4,fre=are,dre=lre,hre=cre,mre=ure,pre="effect/ScheduleIntervals",V2=Symbol.for(pre),C4=e=>({[V2]:V2,intervals:e}),gre=k(2,(e,t)=>yre(e.intervals,t.intervals,sn())),yre=(e,t,n)=>{let r=e,i=t,s=n;for(;ta(r)&&ta(i);){const a=O(Ki(r),hre(Ki(i))),o=dre(a)?s:O(s,In(a));O(Ki(r),fre(Ki(i)))?r=js(r):i=js(i),s=o}return C4(ea(s))},xw=e=>O(e.intervals,sE,ut(()=>E4)).startMillis,bre=e=>O(e.intervals,sE,ut(()=>E4)).endMillis,vre=k(2,(e,t)=>xw(e)<xw(t)),Sre=e=>ta(e.intervals),xre=C4,wre=gre,_re=xw,K2=bre,kre=vre,Ere=Sre,dC="Continue",T4="Done",Cre=e=>({_tag:dC,intervals:e}),Tre=e=>({_tag:dC,intervals:xre(Jt(e))}),Are={_tag:T4},Ore=e=>e._tag===dC,Rre=e=>e._tag===T4,Nre=Cre,Mre=Tre,Vh=Are,G2=Ore,Vy=Rre,Dre=Eo,Ky=q3,zre=Cy,Gy=X1,jre=jm,A4=Rs,O4=fC;class Ire{constructor(t){y(this,"permits");y(this,"waiters",new Set);y(this,"taken",0);y(this,"take",t=>Ia(n=>{if(this.free<t){const r=()=>{this.free<t||(this.waiters.delete(r),this.taken+=t,n(te(t)))};return this.waiters.add(r),K(()=>{this.waiters.delete(r)})}return this.taken+=t,n(te(t))}));y(this,"resize",t=>oi(He(n=>(this.permits=t,this.free<0?nt:this.updateTakenUnsafe(n,r=>r)))));y(this,"release",t=>this.updateTaken(n=>n-t));y(this,"releaseAll",this.updateTaken(t=>0));y(this,"withPermits",t=>n=>Ai(r=>B(r(this.take(t)),i=>qh(r(n),this.release(i)))));y(this,"withPermitsIfAvailable",t=>n=>Ai(r=>Te(()=>this.free<t?cee:(this.taken+=t,qh(r(eee(n)),this.release(t))))));this.permits=t}get free(){return this.permits-this.taken}updateTakenUnsafe(t,n){return this.taken=n(this.taken),this.waiters.size>0&&t.getFiberRef(ZE).scheduleTask(()=>{const r=this.waiters.values();let i=r.next();for(;i.done===!1&&this.free>0;)i.value(),i=r.next()},t.getFiberRef(kf)),te(this.free)}updateTaken(t){return He(n=>this.updateTakenUnsafe(n,t))}}const hC=e=>new Ire(e),$re=e=>K(()=>hC(e));class Lre extends Tf{constructor(n){super();y(this,"isOpen");y(this,"waiters",[]);y(this,"scheduled",!1);y(this,"flushWaiters",()=>{this.scheduled=!1;const n=this.waiters;this.waiters=[];for(let r=0;r<n.length;r++)n[r](Dn)});y(this,"open",He(n=>this.isOpen?nt:(this.isOpen=!0,this.unsafeSchedule(n))));y(this,"release",He(n=>this.isOpen?nt:this.unsafeSchedule(n)));y(this,"await",Ia(n=>this.isOpen?n(nt):(this.waiters.push(n),K(()=>{const r=this.waiters.indexOf(n);r!==-1&&this.waiters.splice(r,1)}))));y(this,"close",K(()=>{this.isOpen=!1}));y(this,"whenOpen",n=>Nt(this.await,n));this.isOpen=n}commit(){return this.await}unsafeSchedule(n){return this.scheduled||this.waiters.length===0||(this.scheduled=!0,n.currentScheduler.scheduleTask(this.flushWaiters,n.getFiberRef(kf))),nt}unsafeOpen(){this.isOpen||(this.isOpen=!0,this.flushWaiters())}unsafeClose(){this.isOpen=!1}}const Fre=e=>new Lre(e??!1),Pre=k(2,(e,t)=>He((n,r)=>{const i=t,s=m4(e,n,r.runtimeFlags,Uv);if(i.state._tag==="Open"){const a=()=>Am(l=>oe(l,s.id())?nt:oi(NE(s))),o={};i.state.finalizers.set(o,a),s.addObserver(()=>{i.state._tag!=="Closed"&&i.state.finalizers.delete(o)})}else s.unsafeInterruptAsFork(n.id());return te(s)})),Ure="effect/Ref/SynchronizedRef",Bre=Symbol.for(Ure),Hre={_A:e=>e};var QD,XD,WD,ZD;class qre extends(ZD=Tf,WD=Bre,XD=AF,QD=zy,ZD){constructor(n,r){super();y(this,"ref");y(this,"withLock");y(this,WD,Hre);y(this,XD,OF);y(this,QD,zy);y(this,"get");this.ref=n,this.withLock=r,this.get=Wi(this.ref)}commit(){return this.get}modify(n){return this.modifyEffect(r=>te(n(r)))}modifyEffect(n){return this.withLock(O(B(Wi(this.ref),n),B(([r,i])=>Xn(ou(this.ref,i),r))))}}const Vre=e=>K(()=>R4(e)),R4=e=>{const t=QE(e),n=hC(1);return new qre(t,n.withPermits(1))},Kre=Symbol.for("effect/ManagedRuntime"),Gre="Fresh",Yre="FromEffect",Jre="Scoped",Qre="Suspend",Xre="Provide",N4="ProvideMerge",Wre="MergeAll",M4=jee,Zre=$ee,Y2=Iee,Xa=NE,mC=$h,J2=Hh,Of=e=>function(){if(arguments.length===1){const t=arguments[0];return(n,...r)=>e(t,n,...r)}return e.apply(this,arguments)},Im=Of((e,t,n)=>{const r=t3(),i=[[ls,[[r,e.context]]]];n!=null&&n.scheduler&&i.push([ZE,[[r,n.scheduler]]]);let s=UW(e.fiberRefs,{entries:i,forkAs:r});n!=null&&n.updateRefs&&(s=n.updateRefs(s,r));const a=new f4(r,s,e.runtimeFlags);let o=t;n!=null&&n.scope&&(o=B(A4(n.scope,dl),c=>Nt(q3(c,Am(f=>oe(f,a.id())?nt:$h(a,f))),Ol(t,f=>Gy(c,f)))));const l=a.currentSupervisor;return l!==qv&&(l.onStart(e.context,o,q(),a),a.addObserver(c=>l.onEnd(c,a))),Uv.add(e.runtimeFlags,a),(n==null?void 0:n.immediate)===!1?a.resume(o):a.start(o),a}),D4=Of((e,t,n={})=>{const r=Im(e,t,n);return n.onExit&&r.addObserver(i=>{n.onExit(i)}),(i,s)=>D4(e)(O(r,mC(i??Or)),{...s,onExit:s!=null&&s.onExit?a=>s.onExit(_ee(a)):void 0})}),z4=Of((e,t)=>{const n=rie(e)(t);if(n._tag==="Failure")throw j4(n.effect_instruction_i0);return n.effect_instruction_i0});class eie extends Error{constructor(n){super(`Fiber #${n.id().id} cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work`);y(this,"fiber");y(this,"_tag","AsyncFiberException");this.fiber=n,this.name=this._tag,this.stack=this.message}}const tie=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new eie(e);return Error.stackTraceLimit=t,n},T0=Symbol.for("effect/Runtime/FiberFailure"),Tp=Symbol.for("effect/Runtime/FiberFailure/Cause");var ez,tz;class nie extends Error{constructor(n){const r=VL(n)[0];super((r==null?void 0:r.message)||"An error has occurred");y(this,tz);y(this,ez);this[T0]=T0,this[Tp]=n,this.name=r?`(FiberFailure) ${r.name}`:"FiberFailure",r!=null&&r.stack&&(this.stack=r.stack)}toJSON(){return{_id:"FiberFailure",cause:this[Tp].toJSON()}}toString(){return"(FiberFailure) "+Sf(this[Tp],{renderErrorCause:!0})}[(tz=T0,ez=Tp,Ue)](){return this.toString()}}const j4=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new nie(e);return Error.stackTraceLimit=t,n},I4=e=>{const t=e;switch(t._op){case"Failure":case"Success":return t;case"Left":return Lh(t.left);case"Right":return tt(t.right);case"Some":return tt(t.value);case"None":return Lh(new Rv)}},rie=Of((e,t)=>{const n=I4(t);if(n)return n;const r=new WE,i=Im(e)(t,{scheduler:r});r.flush();const s=i.unsafePoll();return s||K3(kE(tie(i),PE(i)))}),iie=Of((e,t,n)=>sie(e,t,n).then(r=>{switch(r._tag){case pn:return r.effect_instruction_i0;case mn:throw j4(r.effect_instruction_i0)}})),sie=Of((e,t,n)=>new Promise(r=>{const i=I4(t);i&&r(i);const s=Im(e)(t);s.addObserver(a=>{r(a)}),(n==null?void 0:n.signal)!==void 0&&(n.signal.aborted?s.unsafeInterruptAsFork(s.id()):n.signal.addEventListener("abort",()=>{s.unsafeInterruptAsFork(s.id())},{once:!0}))}));class $4{constructor(t,n,r){y(this,"context");y(this,"runtimeFlags");y(this,"fiberRefs");this.context=t,this.runtimeFlags=n,this.fiberRefs=r}pipe(){return ie(this,arguments)}}const L4=e=>new $4(e.context,e.runtimeFlags,e.fiberRefs),aie=()=>He((e,t)=>te(new $4(e.getFiberRef(ls),t.runtimeFlags,e.getFiberRefs()))),oie=g3(Jl,m3,h3),Gu=L4({context:ns(),runtimeFlags:oie,fiberRefs:BW()}),lie=Im(Gu),cie=iie(Gu),uie=z4(Gu),fie=k(2,(e,t)=>e.modifyEffect(t)),die="effect/Layer",F4=Symbol.for(die),hie={_RIn:e=>e,_E:e=>e,_ROut:e=>e},Ml={[F4]:hie,pipe(){return ie(this,arguments)}},mie="effect/Layer/MemoMap",A0=Symbol.for(mie),pie=pf()("effect/Layer/CurrentMemoMap",{defaultValue:()=>bie()}),gie=e=>fe(e,F4),yie=e=>e._op_layer===Gre;var nz;nz=A0;class P4{constructor(t){y(this,"ref");y(this,nz);this.ref=t,this[A0]=A0}getOrElseMemoize(t,n){return O(fie(this.ref,r=>{const i=r.get(t);if(i!==void 0){const[s,a]=i,o=O(s,B(([l,c])=>O(FF(l),Xn(c))),Ol(Mv({onFailure:()=>nt,onSuccess:()=>Cy(n,a)})));return te([o,r])}return O(jy(0),B(s=>O(zv(),B(a=>O(jy(()=>nt),Ae(o=>{const l=Ai(f=>O(fC(),B(u=>O(f(B(q4(t,u,!0),d=>tee(d(this)))),Qa,B(d=>{switch(d._tag){case mn:return O(J3(a,d.effect_instruction_i0),Nt(X1(u,d)),Nt(an(d.effect_instruction_i0)));case pn:return O(ou(o,h=>O(X1(u,h),AE(RF(s,g=>[g===1,g-1])),oi)),Nt(Iy(s,h=>h+1)),Nt(Cy(n,h=>O(K(()=>r.delete(t)),Nt(Wi(o)),B(g=>g(h))))),Nt($E(a,d.effect_instruction_i0)),Xn(d.effect_instruction_i0[1]))}}))))),c=[O(po(a),Ol(Z1({onFailure:()=>nt,onSuccess:()=>Iy(s,f=>f+1)}))),f=>O(Wi(o),B(u=>u(f)))];return[l,yie(t)?r:r.set(t,c)]}))))))}),kv)}}const U4=Te(()=>Ae(Vre(new Map),e=>new P4(e))),bie=()=>new P4(R4(new Map)),B4=k(2,(e,t)=>B(U4,n=>H4(e,n,t))),H4=k(3,(e,t,n)=>B(q4(e,n),r=>PF(r(t),pie,t))),q4=(e,t,n=!1)=>{const r=e;switch(r._op_layer){case"Locally":return K(()=>i=>r.f(i.getOrElseMemoize(r.self,t)));case"ExtendScope":return K(()=>i=>p4(s=>i.getOrElseMemoize(r.layer,s)));case"Fold":return K(()=>i=>O(i.getOrElseMemoize(r.layer,t),si({onFailure:s=>i.getOrElseMemoize(r.failureK(s),t),onSuccess:s=>i.getOrElseMemoize(r.successK(s),t)})));case"Fresh":return K(()=>i=>O(r.layer,B4(t)));case"FromEffect":return K(n?()=>i=>r.effect:()=>i=>i.getOrElseMemoize(e,t));case"Provide":return K(()=>i=>O(i.getOrElseMemoize(r.first,t),B(s=>O(i.getOrElseMemoize(r.second,t),$v(s)))));case"Scoped":return K(n?()=>i=>jm(r.effect,t):()=>i=>i.getOrElseMemoize(e,t));case"Suspend":return K(()=>i=>i.getOrElseMemoize(r.evaluate(),t));case"ProvideMerge":return K(()=>i=>O(i.getOrElseMemoize(r.first,t),I3(i.getOrElseMemoize(r.second,t),r.zipK)));case"ZipWith":return z3(function*(){const i=yield*Rs(t,tw),s=yield*Rs(i,dl),a=yield*Rs(i,dl);return o=>O(o.getOrElseMemoize(r.first,s),zm(o.getOrElseMemoize(r.second,a),r.zipK,{concurrent:!0}))});case"MergeAll":{const i=r.layers;return Ae(Rs(t,tw),s=>a=>{const o=new Array(i.length);return Ae(Zi(i,j3(function*(l,c){const f=yield*Rs(s,dl),u=yield*a.getOrElseMemoize(l,f);o[c]=u}),!1,!1),()=>hK(...o))})}}},vie=()=>V4(LE()),Sie=k(2,(e,t)=>{const n=W$(e),r=n?e:t;return V4(Ae(n?t:e,s=>Wk(r,s)))});function V4(e){const t=Object.create(Ml);return t._op_layer=Yre,t.effect=e,t}const K4=(...e)=>{const t=Object.create(Ml);return t._op_layer=Wre,t.layers=e,t},xie=k(2,(e,t)=>{const n=W$(e),r=n?e:t;return wie(Ae(n?t:e,s=>Wk(r,s)))}),wie=e=>{const t=Object.create(Ml);return t._op_layer=Jre,t.effect=e,t},_ie=e=>{const t=Object.create(Ml);return t._op_layer=Qre,t.evaluate=e,t},G4=k(2,(e,t)=>_ie(()=>{const n=Object.create(Ml);return n._op_layer=Xre,n.first=Object.create(Ml,{_op_layer:{value:N4,enumerable:!0},first:{value:vie(),enumerable:!0},second:{value:Array.isArray(t)?K4(...t):t},zipK:{value:(r,i)=>O(r,ur(i))}}),n.second=e,n})),kie=k(2,(e,t)=>{const n=Object.create(Ml);return n._op_layer=N4,n.first=t,n.second=G4(e,t),n.zipK=(r,i)=>O(r,ur(i)),n}),Q2=k(2,(e,t)=>g4(n=>B(B4(t,n),r=>FE(e,r)))),X2=k(2,(e,t)=>{const n=Ph(Gu.fiberRefs,t.fiberRefs),r=Ja(Gu.runtimeFlags,t.runtimeFlags);return Ai(i=>He(s=>{const a=s.getFiberRef(ls),o=s.getFiberRefs(),l=Uh(s.id(),o)(n),c=s.currentRuntimeFlags,f=iu(r)(c),u=Ph(l,o),d=Ja(f,c);return s.setFiberRefs(l),s.currentRuntimeFlags=f,qh(FE(i(e),ur(a,t.context)),He(h=>(h.setFiberRefs(Uh(h.id(),h.getFiberRefs())(u)),h.currentRuntimeFlags=iu(d)(h.currentRuntimeFlags),nt)))}))}),Eie=k(2,(e,t)=>Array.isArray(t)?Q2(e,K4(...t)):gie(t)?Q2(e,t):dK(t)?FE(e,t):Kre in t?B(t.runtimeEffect,n=>X2(e,n)):X2(e,t)),Ap=dJ,W2=e=>Cie(e.slice(0)),Cie=e=>Object.setPrototypeOf(e,fJ),pC=wm,Tie=wm,gC=function(){const e=Symbol.for("effect/Data/Error/plainArgs");return{BaseEffectError:class extends DE{constructor(n){super(n==null?void 0:n.message,n!=null&&n.cause?{cause:n.cause}:void 0),n&&(Object.assign(this,n),Object.defineProperty(this,e,{value:n,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}.BaseEffectError}(),Aie=e=>{const t={BaseEffectError:class extends gC{constructor(){super(...arguments);y(this,"_tag",e)}}};return t.BaseEffectError.prototype.name=e,t.BaseEffectError},Oie="effect/Schedule",Y4=Symbol.for(Oie),Rie=e=>fe(e,Y4),Nie="effect/ScheduleDriver",Mie=Symbol.for(Nie),ww={start:0,now:0,input:void 0,output:void 0,elapsed:Lu,elapsedSincePrevious:Lu,recurrence:0},Z2=pf()("effect/Schedule/CurrentIterationMetadata",{defaultValue:()=>ww}),Die={_Out:e=>e,_In:e=>e,_R:e=>e},zie={_Out:e=>e,_In:e=>e,_R:e=>e};var rz;rz=Y4;class jie{constructor(t,n){y(this,"initial");y(this,"step");y(this,rz,Die);this.initial=t,this.step=n}pipe(){return ie(this,arguments)}}const eR=(e,t,n,r)=>Iy(e,i=>i.recurrence===0?{now:t,input:n,output:r,recurrence:i.recurrence+1,elapsed:Lu,elapsedSincePrevious:Lu,start:t}:{now:t,input:n,output:r,recurrence:i.recurrence+1,elapsed:Fu(t-i.start),elapsedSincePrevious:Fu(t-i.now),start:i.start});var iz;iz=Mie;class Iie{constructor(t,n){y(this,"schedule");y(this,"ref");y(this,iz,zie);y(this,"iterationMeta",QE(ww));this.schedule=t,this.ref=n}get state(){return Ae(Wi(this.ref),t=>t[1])}get last(){return B(Wi(this.ref),([t,n])=>{switch(t._tag){case"None":return wv(()=>new Rv);case"Some":return te(t.value)}})}get reset(){return ou(this.ref,[q(),this.schedule.initial]).pipe(Av(ou(this.iterationMeta,ww)))}next(t){return O(Ae(Wi(this.ref),n=>n[1]),B(n=>O(YZ,B(r=>O(Te(()=>this.schedule.step(r,t,n)),B(([i,s,a])=>{const o=ou(this.ref,[J(s),i]);if(Vy(a))return o.pipe(Nt(zt(q())));const l=_re(a.intervals)-r;if(l<=0)return o.pipe(Nt(eR(this.iterationMeta,r,t,s)),Xn(s));const c=Fu(l);return O(o,Nt(eR(this.iterationMeta,r,t,s)),Nt(lee(c)),Xn(s))}))))))}}const $m=(e,t)=>new jie(e,t),$ie=k(2,(e,t)=>yC(e,(n,r)=>K(()=>t(n,r)))),yC=k(2,(e,t)=>$m(e.initial,(n,r,i)=>B(e.step(n,r,i),([s,a,o])=>Vy(o)?te([s,a,Vh]):Ae(t(r,a),l=>l?[s,a,o]:[s,a,Vh])))),Lie=e=>O(jy([q(),e.initial]),Ae(t=>new Iie(e,t))),Fie=k(2,(e,t)=>Pie(e,t,wre)),Pie=k(3,(e,t,n)=>$m([e.initial,t.initial],(r,i,s)=>O(I3(e.step(r,i,s[0]),t.step(r,i,s[1]),(a,o)=>[a,o]),B(([[a,o,l],[c,f,u]])=>G2(l)&&G2(u)?_w(e,t,i,a,o,l.intervals,c,f,u.intervals,n):te([[a,c],[o,f],Vh]))))),_w=(e,t,n,r,i,s,a,o,l,c)=>{const f=c(s,l);return Ere(f)?te([[r,a],[i,o],Nre(f)]):O(s,kre(l))?B(e.step(K2(s),n,r),([u,d,h])=>Vy(h)?te([[u,a],[d,o],Vh]):_w(e,t,n,u,d,h.intervals,a,o,l,c)):B(t.step(K2(l),n,a),([u,d,h])=>Vy(h)?te([[r,u],[i,d],Vh]):_w(e,t,n,r,i,s,u,d,h.intervals,c))},Uie=k(2,(e,t)=>Bie(e,n=>K(()=>t(n)))),Bie=k(2,(e,t)=>$m(e.initial,(n,r,i)=>B(e.step(n,r,i),([s,a,o])=>Ae(t(a),l=>[s,l,o])))),Hie=e=>$m(e.initial,(t,n,r)=>O(e.step(t,n,r),Ae(([i,s,a])=>[i,n,a]))),qie=e=>Yie(Q4,t=>t<e),Vie=(e,t)=>$m(e,(n,r,i)=>K(()=>[t(i),i,Mre(mre(n))])),Kie=k(2,(e,t)=>yC(e,(n,r)=>see(t(n)))),Gie=k(2,(e,t)=>yC(e,(n,r)=>t(n))),Yie=k(2,(e,t)=>$ie(e,(n,r)=>t(r))),gg=Symbol.for("effect/Schedule/ScheduleDefect");var sz;sz=gg;class Jie{constructor(t){y(this,"error");y(this,sz);this.error=t,this[gg]=gg}}const Qie=e=>fe(e,gg),tR=e=>Ih(e,t=>$a(new Jie(t))),Xie=e=>pt(pv(e,t=>PL(t)&&Qie(t.defect)?J(t.defect):q()),{onNone:()=>e,onSome:t=>El(t.error)}),Wie=e=>T3(e,t=>an(Xie(t))),nR=k(2,(e,t)=>ese(e,t,(n,r)=>zt(n))),Zie=k(2,(e,t)=>{if(Rie(t))return nR(e,t);const n=t.schedule??Hie(Q4),r=t.while?Gie(n,a=>{const o=t.while(a);return typeof o=="boolean"?te(o):tR(o)}):n,i=t.until?Kie(r,a=>{const o=t.until(a);return typeof o=="boolean"?te(o):tR(o)}):r,s=t.times?Fie(i,qie(t.times)).pipe(Uie(a=>a[0])):i;return Wie(nR(e,s))}),ese=k(3,(e,t,n)=>B(Lie(t),r=>mo(e,{onFailure:i=>n(i,q()),onSuccess:i=>J4(N2(e,Z2,Wi(r.iterationMeta)),r,(s,a)=>N2(n(s,a),Z2,Wi(r.iterationMeta)),i)}))),J4=(e,t,n,r)=>mo(t.next(r),{onFailure:()=>LQ(t.last),onSuccess:i=>mo(e,{onFailure:s=>n(s,J(i)),onSuccess:s=>J4(e,t,n,s)})}),Q4=Vie(0,e=>e+1),Gi=zv,qn=po,tse=Y3,nse=J3,kw=EX,Ls=$E,rse=Iv,rR=Symbol.for("effect/MutableList"),ise={[rR]:rR,[Symbol.iterator](){let e=!1,t=this.head;return{next(){if(e)return this.return();if(t==null)return e=!0,this.return();const n=t.value;return t=t.next,{done:e,value:n}},return(n){return e||(e=!0),{done:!0,value:n}}}},toString(){return at(this.toJSON())},toJSON(){return{_id:"MutableList",values:Array.from(this).map(Et)}},[Ue](){return this.toJSON()},pipe(){return ie(this,arguments)}},sse=e=>({value:e,removed:!1,prev:void 0,next:void 0}),ase=()=>{const e=Object.create(ise);return e.head=void 0,e.tail=void 0,e._length=0,e},X4=e=>bC(e)===0,bC=e=>e._length,ose=k(2,(e,t)=>{const n=sse(t);return e.head===void 0&&(e.head=n),e.tail===void 0||(e.tail.next=n,n.prev=e.tail),e.tail=n,e._length+=1,e}),lse=e=>{const t=e.head;if(t!==void 0)return cse(e,t),t.value},cse=(e,t)=>{t.removed||(t.removed=!0,t.prev!==void 0&&t.next!==void 0?(t.prev.next=t.next,t.next.prev=t.prev):t.prev!==void 0?(e.tail=t.prev,t.prev.next=void 0):t.next!==void 0?(e.head=t.next,t.next.prev=void 0):(e.tail=void 0,e.head=void 0),e._length>0&&(e._length-=1))},iR=Symbol.for("effect/MutableQueue"),ar=Symbol.for("effect/mutable/MutableQueue/Empty"),use={[iR]:iR,[Symbol.iterator](){return Array.from(this.queue)[Symbol.iterator]()},toString(){return at(this.toJSON())},toJSON(){return{_id:"MutableQueue",values:Array.from(this).map(Et)}},[Ue](){return this.toJSON()},pipe(){return ie(this,arguments)}},W4=e=>{const t=Object.create(use);return t.queue=ase(),t.capacity=e,t},fse=e=>W4(e),vC=()=>W4(void 0),SC=e=>bC(e.queue),Ew=e=>X4(e.queue),dse=e=>e.capacity===void 0?1/0:e.capacity,Kh=k(2,(e,t)=>{const n=bC(e.queue);return e.capacity!==void 0&&n===e.capacity?!1:(ose(t)(e.queue),!0)}),Z4=k(2,(e,t)=>{const n=t[Symbol.iterator]();let r,i=sn(),s=!0;for(;s&&(r=n.next())&&!r.done;)s=Kh(r.value)(e);for(;r!=null&&!r.done;)i=In(r.value)(i),r=n.next();return ea(i)}),Wa=k(2,(e,t)=>X4(e.queue)?t:lse(e.queue)),xC=k(2,(e,t)=>{let n=sn(),r=0;for(;r<t;){const i=Wa(ar)(e);if(i===ar)break;n=In(i)(n),r+=1}return ea(n)}),Cw=Al,Co=oa,O0=iee,hse=d4,es=Ku,Tw=Ti,Yy=He,cs=zt,_i=an,mse=A3,lu=z3,R0=HQ,pse=oee,St=te,jt=Te,lt=K,Fe=nt,eP=Ih,wC=T3,gse=ree,yse=IF,bse=dee,Xd=fee,Yo=Es,bi=EE,vse=Om,xd=Rm,Jy=Ai,N0=Xn,_C=oi,Xe=Ae,Sse=CE,kC=Cv,Qy=Rne,xse=E3,qc=qh,Vv=y4,wse=p4,Aw=g4,_se=Am,kse=uC,hl=Pre,tP=LE,nP=X3,Xy=Eie,Ese=pee,uc=Bu,En=Qa,rP=M3,Cse=mee,ue=B,wc=kv,M0=qne,iP=v4,sP=TE,aP=uee,sR=Zie,Tse=wf,Ase=$F,Ow=R3,vi=si,Lm=aie,Ose=hC,Rse=$re,Nse=Fre,EC=lie,Mse=cie,ti=uie,Wy=$ne,CC=Lne,wn=Fne,Kv=zm,Dse=bee,zse=vee,oP=j3,Gv=Im,jse=z4,Ise=D4,Yv=Gu,TC=L4,Rw=Symbol.for("effect/FiberHandle"),$se=e=>fe(e,Rw),Lse={[Rw]:Rw,toString(){return at(this.toJSON())},toJSON(){return{_id:"FiberHandle",state:this.state}},[Ue](){return this.toJSON()},pipe(){return ie(this,arguments)}},Fse=e=>{const t=Object.create(Lse);return t.state={_tag:"Open",fiber:void 0},t.deferred=e,t},Pse=()=>Qy(Xe(Gi(),e=>Fse(e)),e=>Yy(t=>{const n=e.state;return n._tag==="Closed"?Fe:(e.state={_tag:"Closed"},n.fiber?rP(_C(mC(n.fiber,Jd(t.id(),yg))),e.deferred):tse(e.deferred,tC))})),Use=()=>ue(Pse(),e=>qse(e)()),lP=-1,yg=KY(lP,0),Bse=rre(void 0,{emptyCase:Ga,failCase:Ga,dieCase:Ga,interruptCase:(e,t)=>IL(e3(t),lP),sequentialCase:(e,t,n)=>t||n,parallelCase:(e,t,n)=>t||n}),Hse=k(e=>$se(e[0]),(e,t,n)=>{if(e.state._tag==="Closed"){t.unsafeInterruptAsFork(Jd((n==null?void 0:n.interruptAs)??Or,yg));return}else if(e.state.fiber!==void 0){if((n==null?void 0:n.onlyIfMissing)===!0){t.unsafeInterruptAsFork(Jd((n==null?void 0:n.interruptAs)??Or,yg));return}else if(e.state.fiber===t)return;e.state.fiber.unsafeInterruptAsFork(Jd((n==null?void 0:n.interruptAs)??Or,yg)),e.state.fiber=void 0}e.state.fiber=t,t.addObserver(r=>{e.state._tag==="Open"&&t===e.state.fiber&&(e.state.fiber=void 0),eC(r)&&((n==null?void 0:n.propagateInterruption)===!0?!Bse(r.cause):!Xne(r.cause))&&rse(e.deferred,r)})}),aR=function(){let e;return()=>(e===void 0&&(e=EC(Yo)),e)}(),qse=e=>()=>Xe(Lm(),t=>{const n=Gv(t);return(r,i)=>{if(e.state._tag==="Closed")return aR();if(e.state.fiber!==void 0&&(i==null?void 0:i.onlyIfMissing)===!0)return aR();const s=n(r,i);return Hse(e,s,i),s}}),Vse=Sie,cP=xie,uP=G4,D0=kie,Kse=U4,oR=H4,AC=on,fP=ls,Gse=B3,Yse="effect/QueueEnqueue",Jse=Symbol.for(Yse),Qse="effect/QueueDequeue",Xse=Symbol.for(Qse),Wse="effect/QueueStrategy",dP=Symbol.for(Wse),Zse="effect/BackingQueue",eae=Symbol.for(Zse),hP={_A:e=>e},tae={_A:e=>e},nae={_In:e=>e},rae={_Out:e=>e};var az,oz,lz;class iae extends(lz=Tf,oz=Jse,az=Xse,lz){constructor(n,r,i,s,a){super();y(this,"queue");y(this,"takers");y(this,"shutdownHook");y(this,"shutdownFlag");y(this,"strategy");y(this,oz,nae);y(this,az,rae);this.queue=n,this.takers=r,this.shutdownHook=i,this.shutdownFlag=s,this.strategy=a}pipe(){return ie(this,arguments)}commit(){return this.take}capacity(){return this.queue.capacity()}get size(){return Te(()=>Ih(this.unsafeSize(),()=>Es))}unsafeSize(){return Wt(this.shutdownFlag)?q():J(this.queue.length()-SC(this.takers)+this.strategy.surplusSize())}get isEmpty(){return Ae(this.size,n=>n<=0)}get isFull(){return Ae(this.size,n=>n>=this.capacity())}get shutdown(){return Rm(He(n=>(O(this.shutdownFlag,xm(!0)),O(Zi(cu(this.takers),r=>Q3(r,n.id()),!1,!1),Nt(this.strategy.shutdown),AE($E(this.shutdownHook,void 0)),oi))))}get isShutdown(){return K(()=>Wt(this.shutdownFlag))}get awaitShutdown(){return po(this.shutdownHook)}isActive(){return!Wt(this.shutdownFlag)}unsafeOffer(n){if(Wt(this.shutdownFlag))return!1;let r;if(this.queue.length()===0){const s=O(this.takers,Wa(ar));s!==ar?(ml(s,n),r=!0):r=!1}else r=!1;if(r)return!0;const i=this.queue.offer(n);return Vc(this.strategy,this.queue,this.takers),i}offer(n){return Te(()=>{if(Wt(this.shutdownFlag))return Es;let r;if(this.queue.length()===0){const s=O(this.takers,Wa(ar));s!==ar?(ml(s,n),r=!0):r=!1}else r=!1;if(r)return te(!0);const i=this.queue.offer(n);return Vc(this.strategy,this.queue,this.takers),i?te(!0):this.strategy.handleSurplus([n],this.queue,this.takers,this.shutdownFlag)})}offerAll(n){return Te(()=>{if(Wt(this.shutdownFlag))return Es;const r=Qe(n),i=this.queue.length()===0?Qe(Sae(this.takers,r.length)):co,[s,a]=O(r,yL(i.length));for(let l=0;l<i.length;l++){const c=i[l],f=s[l];ml(c,f)}if(a.length===0)return te(!0);const o=this.queue.offerAll(a);return Vc(this.strategy,this.queue,this.takers),ov(o)?te(!0):this.strategy.handleSurplus(o,this.queue,this.takers,this.shutdownFlag)})}get take(){return He(n=>{if(Wt(this.shutdownFlag))return Es;const r=this.queue.poll(ar);if(r!==ar)return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),te(r);{const i=Dv(n.id());return O(Te(()=>(O(this.takers,Kh(i)),Vc(this.strategy,this.queue,this.takers),Wt(this.shutdownFlag)?Es:po(i))),Om(()=>K(()=>xae(this.takers,i))))}})}get takeAll(){return Te(()=>Wt(this.shutdownFlag)?Es:K(()=>{const n=this.queue.pollUpTo(Number.POSITIVE_INFINITY);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),Zs(n)}))}takeUpTo(n){return Te(()=>Wt(this.shutdownFlag)?Es:K(()=>{const r=this.queue.pollUpTo(n);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),Zs(r)}))}takeBetween(n,r){return Te(()=>mP(this,n,r,sn()))}}const mP=(e,t,n,r)=>n<t?te(r):O(mae(e,n),B(i=>{const s=t-i.length;return s===1?O(Nw(e),Ae(a=>O(r,Kt(i),z1(a)))):s>1?O(Nw(e),B(a=>mP(e,s-1,n-i.length-1,O(r,Kt(i),z1(a))))):te(O(r,Kt(i)))})),sae=e=>O(K(()=>fse(e)),B(t=>pP(gP(t),gae()))),aae=()=>O(K(()=>vC()),B(e=>pP(gP(e),yae()))),oae=(e,t,n,r,i)=>new iae(e,t,n,r,i),pP=(e,t)=>O(zv(),Ae(n=>oae(e,vC(),n,Sm(!1),t)));var cz;cz=eae;class lae{constructor(t){y(this,"mutable");y(this,cz,tae);this.mutable=t}poll(t){return Wa(this.mutable,t)}pollUpTo(t){return xC(this.mutable,t)}offerAll(t){return Z4(this.mutable,t)}offer(t){return Kh(this.mutable,t)}capacity(){return dse(this.mutable)}length(){return SC(this.mutable)}}const gP=e=>new lae(e),cae=e=>e.size,uae=e=>e.isShutdown,fae=e=>e.shutdown,dae=k(2,(e,t)=>e.offer(t)),hae=k(2,(e,t)=>e.unsafeOffer(t)),Nw=e=>e.take,mae=k(2,(e,t)=>e.takeUpTo(t)),pae=k(3,(e,t,n)=>e.takeBetween(t,n)),gae=()=>new bae,yae=()=>new vae;var uz;uz=dP;class bae{constructor(){y(this,uz,hP);y(this,"putters",vC())}surplusSize(){return SC(this.putters)}onCompleteTakersWithEmptyQueue(t){for(;!Ew(this.putters)&&!Ew(t);){const n=Wa(t,void 0),r=Wa(this.putters,void 0);r[2]&&ml(r[1],!0),ml(n,r[0])}}get shutdown(){return O(_v,B(t=>O(K(()=>cu(this.putters)),B(n=>Zi(n,([r,i,s])=>s?O(Q3(i,t),oi):nt,!1,!1)))))}handleSurplus(t,n,r,i){return He(s=>{const a=Dv(s.id());return O(Te(()=>(this.unsafeOffer(t,a),this.unsafeOnQueueEmptySpace(n,r),Vc(this,n,r),Wt(i)?Es:po(a))),Om(()=>K(()=>this.unsafeRemove(a))))})}unsafeOnQueueEmptySpace(t,n){let r=!0;for(;r&&(t.capacity()===Number.POSITIVE_INFINITY||t.length()<t.capacity());){const i=O(this.putters,Wa(ar));if(i===ar)r=!1;else{const s=t.offer(i[0]);s&&i[2]?ml(i[1],!0):s||Zy(this.putters,O(cu(this.putters),In(i))),Vc(this,t,n)}}}unsafeOffer(t,n){const r=Qe(t);for(let i=0;i<r.length;i++){const s=r[i];i===r.length-1?O(this.putters,Kh([s,n,!0])):O(this.putters,Kh([s,n,!1]))}}unsafeRemove(t){Zy(this.putters,O(cu(this.putters),iE(([,n])=>n!==t)))}}var fz;fz=dP;class vae{constructor(){y(this,fz,hP)}surplusSize(){return 0}get shutdown(){return nt}onCompleteTakersWithEmptyQueue(){}handleSurplus(t,n,r,i){return te(!1)}unsafeOnQueueEmptySpace(t,n){}}const ml=(e,t)=>Iv(e,te(t)),Zy=(e,t)=>O(e,Z4(t)),cu=e=>O(e,xC(Number.POSITIVE_INFINITY)),Sae=(e,t)=>O(e,xC(t)),xae=(e,t)=>{Zy(e,O(cu(e),iE(n=>t!==n)))},Vc=(e,t,n)=>{let r=!0;for(;r&&t.length()!==0;){const i=O(n,Wa(ar));if(i!==ar){const s=t.poll(ar);s!==ar?(ml(i,s),e.unsafeOnQueueEmptySpace(t,n)):Zy(n,O(cu(n),In(i))),r=!0}else r=!1}r&&t.length()===0&&!Ew(n)&&e.onCompleteTakersWithEmptyQueue(n)},wae=k(2,(e,t)=>e.publish(t)),_ae=wae,yP=sae,kae=aae,Eae=cae,Cae=uae,eb=fae,fc=dae,Tae=hae,lR=Nw,Aae=pae,bP="Continue",Oae="Close",Rae="Yield",Nae="effect/ChannelChildExecutorDecision",cR=Symbol.for(Nae),Mae={[cR]:cR},vP=e=>{const t=Object.create(Mae);return t._tag=bP,t},bg="ContinuationK",Dae="ContinuationFinalizer",SP=Symbol.for("effect/ChannelContinuation"),xP={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutDone:e=>e,_OutErr2:e=>e,_OutElem:e=>e,_OutDone2:e=>e};var dz;dz=SP;class wP{constructor(t,n){y(this,"onSuccess");y(this,"onHalt");y(this,"_tag",bg);y(this,dz,xP);this.onSuccess=t,this.onHalt=n}onExit(t){return eC(t)?this.onHalt(t.cause):this.onSuccess(t.value)}}var hz;hz=SP;class zae{constructor(t){y(this,"finalizer");y(this,"_tag",Dae);y(this,hz,xP);this.finalizer=t}}const _P="PullAfterNext",jae="PullAfterAllEnqueued",Iae="effect/ChannelUpstreamPullStrategy",$ae=Symbol.for(Iae),Lae={_A:e=>e},Fae={[$ae]:Lae},kP=e=>{const t=Object.create(Fae);return t._tag=_P,t.emitSeparator=e,t},EP="BracketOut",CP="Bridge",OC="ConcatAll",TP="Emit",AP="Ensuring",OP="Fail",RP="Fold",NP="FromEffect",MP="PipeTo",Pae="Provide",DP="Read",zP="Succeed",jP="SucceedNow",IP="Suspend",Uae="effect/Channel",$P=Symbol.for(Uae),Bae={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},dr={[$P]:Bae,pipe(){return ie(this,arguments)}},LP=e=>fe(e,$P)||Co(e),Hae=k(2,(e,t)=>{const n=Object.create(dr);return n._tag=EP,n.acquire=()=>e,n.finalizer=t,n}),FP=(e,t,n)=>{const r=Object.create(dr);return r._tag=OC,r.combineInners=t,r.combineAll=n,r.onPull=()=>kP(q()),r.onEmit=()=>vP,r.value=()=>e,r.k=ce,r},qae=k(4,(e,t,n,r)=>{const i=Object.create(dr);return i._tag=OC,i.combineInners=n,i.combineAll=r,i.onPull=()=>kP(q()),i.onEmit=()=>vP,i.value=()=>e,i.k=t,i}),PP=k(2,(e,t)=>{const n=Object.create(dr);return n._tag=CP,n.input=t,n.channel=e,n}),Vae=k(2,(e,t)=>{const n=Object.create(dr);return n._tag=AP,n.channel=e,n.finalizer=t,n}),RC=e=>Rr(S4(e)),Rr=e=>Kae(()=>e),Kae=e=>{const t=Object.create(dr);return t._tag=OP,t.error=e,t},Gt=k(2,(e,t)=>{const n=Object.create(dr);return n._tag=RP,n.channel=e,n.k=new wP(t,Rr),n}),Hn=e=>{const t=Object.create(dr);return t._tag=NP,t.effect=()=>e,t},ki=k(2,(e,t)=>{const n=Object.create(dr);return n._tag=MP,n.left=()=>e,n.right=()=>t,n}),UP=e=>Rf({onInput:e.onInput,onFailure:t=>or(ere(t),{onLeft:e.onFailure,onRight:Rr}),onDone:e.onDone}),Rf=e=>{const t=Object.create(dr);return t._tag=DP,t.more=e.onInput,t.done=new wP(e.onDone,e.onFailure),t},BP=e=>MC(()=>e),Gh=e=>{const t=Object.create(dr);return t._tag=jP,t.terminal=e,t},NC=e=>{const t=Object.create(dr);return t._tag=IP,t.channel=e,t},MC=e=>{const t=Object.create(dr);return t._tag=zP,t.evaluate=e,t},la=Gh(void 0),Tn=e=>{const t=Object.create(dr);return t._tag=TP,t.out=e,t},Fm="Done",Pm="Emit",Nf="FromEffect",Um="Read",Gae=Symbol.for("effect/ChannelState"),Yae={_E:e=>e,_R:e=>e},Jv={[Gae]:Yae},dc=()=>{const e=Object.create(Jv);return e._tag=Fm,e},z0=()=>{const e=Object.create(Jv);return e._tag=Pm,e},sd=e=>{const t=Object.create(Jv);return t._tag=Nf,t.effect=e,t},j0=(e,t,n,r)=>{const i=Object.create(Jv);return i._tag=Um,i.upstream=e,i.onEffect=t,i.onEmit=n,i.onDone=r,i},tb=e=>e._tag===Nf,Jae=e=>tb(e)?e.effect:Fe,uR=e=>tb(e)?gse(e.effect):void 0,HP="PullFromChild",Mw="PullFromUpstream",Dw="DrainChildExecutors",qP="Emit";class Op{constructor(t,n,r){y(this,"childExecutor");y(this,"parentSubexecutor");y(this,"onEmit");y(this,"_tag",HP);this.childExecutor=t,this.parentSubexecutor=n,this.onEmit=r}close(t){const n=this.childExecutor.close(t),r=this.parentSubexecutor.close(t);return n!==void 0&&r!==void 0?Kv(En(n),En(r),(i,s)=>O(i,Bh(s))):n!==void 0?n:r!==void 0?r:void 0}enqueuePullFromChild(t){return this}}class Qo{constructor(t,n,r,i,s,a,o,l){y(this,"upstreamExecutor");y(this,"createChild");y(this,"lastDone");y(this,"activeChildExecutors");y(this,"combineChildResults");y(this,"combineWithChildResult");y(this,"onPull");y(this,"onEmit");y(this,"_tag",Mw);this.upstreamExecutor=t,this.createChild=n,this.lastDone=r,this.activeChildExecutors=i,this.combineChildResults=s,this.combineWithChildResult=a,this.onPull=o,this.onEmit=l}close(t){const n=this.upstreamExecutor.close(t),i=[...this.activeChildExecutors.map(s=>s!==void 0?s.childExecutor.close(t):void 0),n].reduce((s,a)=>s!==void 0&&a!==void 0?Kv(s,En(a),(o,l)=>Bh(o,l)):s!==void 0?s:a!==void 0?En(a):void 0,void 0);return i}enqueuePullFromChild(t){return new Qo(this.upstreamExecutor,this.createChild,this.lastDone,[...this.activeChildExecutors,t],this.combineChildResults,this.combineWithChildResult,this.onPull,this.onEmit)}}class Kc{constructor(t,n,r,i,s,a,o){y(this,"upstreamExecutor");y(this,"lastDone");y(this,"activeChildExecutors");y(this,"upstreamDone");y(this,"combineChildResults");y(this,"combineWithChildResult");y(this,"onPull");y(this,"_tag",Dw);this.upstreamExecutor=t,this.lastDone=n,this.activeChildExecutors=r,this.upstreamDone=i,this.combineChildResults=s,this.combineWithChildResult=a,this.onPull=o}close(t){const n=this.upstreamExecutor.close(t),i=[...this.activeChildExecutors.map(s=>s!==void 0?s.childExecutor.close(t):void 0),n].reduce((s,a)=>s!==void 0&&a!==void 0?Kv(s,En(a),(o,l)=>Bh(o,l)):s!==void 0?s:a!==void 0?En(a):void 0,void 0);return i}enqueuePullFromChild(t){return new Kc(this.upstreamExecutor,this.lastDone,[...this.activeChildExecutors,t],this.upstreamDone,this.combineChildResults,this.combineWithChildResult,this.onPull)}}class I0{constructor(t,n){y(this,"value");y(this,"next");y(this,"_tag",qP);this.value=t,this.next=n}close(t){const n=this.next.close(t);return n}enqueuePullFromChild(t){return this}}const Qae="Pulled",Xae="NoUpstream",Wae="effect/ChannelUpstreamPullRequest",Zae=Symbol.for(Wae),eoe={_A:e=>e},VP={[Zae]:eoe},fR=e=>{const t=Object.create(VP);return t._tag=Qae,t.value=e,t},toe=e=>{const t=Object.create(VP);return t._tag=Xae,t.activeDownstreamCount=e,t};class el{constructor(t,n,r){y(this,"_activeSubexecutor");y(this,"_cancelled");y(this,"_closeLastSubstream");y(this,"_currentChannel");y(this,"_done");y(this,"_doneStack",[]);y(this,"_emitted");y(this,"_executeCloseLastSubstream");y(this,"_input");y(this,"_inProgressFinalizer");y(this,"_providedEnv");this._currentChannel=t,this._executeCloseLastSubstream=r,this._providedEnv=n}run(){let t;for(;t===void 0;)if(this._cancelled!==void 0)t=this.processCancellation();else if(this._activeSubexecutor!==void 0)t=this.runSubexecutor();else try{if(this._currentChannel===void 0)t=dc();else switch(Co(this._currentChannel)&&(this._currentChannel=Hn(this._currentChannel)),this._currentChannel._tag){case EP:{t=this.runBracketOut(this._currentChannel);break}case CP:{const n=this._currentChannel.input;if(this._currentChannel=this._currentChannel.channel,this._input!==void 0){const r=this._input;this._input=void 0;const i=()=>ue(n.awaitRead(),()=>jt(()=>{const s=r.run();switch(s._tag){case Fm:return $s(r.getDone(),{onFailure:a=>n.error(a),onSuccess:a=>n.done(a)});case Pm:return ue(n.emit(r.getEmit()),()=>i());case Nf:return vi(s.effect,{onFailure:a=>n.error(a),onSuccess:()=>i()});case Um:return DC(s,()=>i(),a=>n.error(a))}}));t=sd(ue(kse(bi(i())),s=>lt(()=>this.addFinalizer(a=>ue(Xa(s),()=>jt(()=>{const o=this.restorePipe(a,r);return o!==void 0?o:Fe}))))))}break}case OC:{const n=new el(this._currentChannel.value(),this._providedEnv,i=>lt(()=>{const s=this._closeLastSubstream===void 0?Fe:this._closeLastSubstream;this._closeLastSubstream=O(s,wn(i))}));n._input=this._input;const r=this._currentChannel;this._activeSubexecutor=new Qo(n,i=>r.k(i),void 0,[],(i,s)=>r.combineInners(i,s),(i,s)=>r.combineAll(i,s),i=>r.onPull(i),i=>r.onEmit(i)),this._closeLastSubstream=void 0,this._currentChannel=void 0;break}case TP:{this._emitted=this._currentChannel.out,this._currentChannel=this._activeSubexecutor!==void 0?void 0:la,t=z0();break}case AP:{this.runEnsuring(this._currentChannel);break}case OP:{t=this.doneHalt(this._currentChannel.error());break}case RP:{this._doneStack.push(this._currentChannel.k),this._currentChannel=this._currentChannel.channel;break}case NP:{const n=this._providedEnv===void 0?this._currentChannel.effect():O(this._currentChannel.effect(),Xy(this._providedEnv));t=sd(vi(n,{onFailure:r=>{const i=this.doneHalt(r);return i!==void 0&&tb(i)?i.effect:Fe},onSuccess:r=>{const i=this.doneSucceed(r);return i!==void 0&&tb(i)?i.effect:Fe}}));break}case MP:{const n=this._input,r=new el(this._currentChannel.left(),this._providedEnv,i=>this._executeCloseLastSubstream(i));r._input=n,this._input=r,this.addFinalizer(i=>{const s=this.restorePipe(i,n);return s!==void 0?s:Fe}),this._currentChannel=this._currentChannel.right();break}case Pae:{const n=this._providedEnv;this._providedEnv=this._currentChannel.context(),this._currentChannel=this._currentChannel.inner,this.addFinalizer(()=>lt(()=>{this._providedEnv=n}));break}case DP:{const n=this._currentChannel;t=j0(this._input,ce,r=>{try{this._currentChannel=n.more(r)}catch(i){this._currentChannel=n.done.onExit(wee(i))}},r=>{const i=s=>n.done.onExit(s);this._currentChannel=i(r)});break}case zP:{t=this.doneSucceed(this._currentChannel.evaluate());break}case jP:{t=this.doneSucceed(this._currentChannel.terminal);break}case IP:{this._currentChannel=this._currentChannel.channel();break}}}catch(n){this._currentChannel=Rr(Sw(n))}return t}getDone(){return this._done}getEmit(){return this._emitted}cancelWith(t){this._cancelled=t}clearInProgressFinalizer(){this._inProgressFinalizer=void 0}storeInProgressFinalizer(t){this._inProgressFinalizer=t}popAllFinalizers(t){const n=[];let r=this._doneStack.pop();for(;r;)r._tag==="ContinuationFinalizer"&&n.push(r.finalizer),r=this._doneStack.pop();const i=n.length===0?Fe:L0(n,t);return this.storeInProgressFinalizer(i),i}popNextFinalizers(){const t=[];for(;this._doneStack.length!==0;){const n=this._doneStack[this._doneStack.length-1];if(n._tag===bg)return t;t.push(n),this._doneStack.pop()}return t}restorePipe(t,n){const r=this._input;return this._input=n,r!==void 0?r.close(t):Fe}close(t){let n;const r=this._inProgressFinalizer;r!==void 0&&(n=O(r,qc(lt(()=>this.clearInProgressFinalizer()))));let i;const s=this.popAllFinalizers(t);s!==void 0&&(i=O(s,qc(lt(()=>this.clearInProgressFinalizer()))));const a=this._activeSubexecutor===void 0?void 0:this._activeSubexecutor.close(t);if(!(a===void 0&&n===void 0&&i===void 0))return O(En($0(a)),Wy(En($0(n))),Wy(En($0(i))),Xe(([[o,l],c])=>O(o,Bh(l),Bh(c))),xd,ue(o=>jt(()=>o)))}doneSucceed(t){if(this._doneStack.length===0)return this._done=_r(t),this._currentChannel=void 0,dc();const n=this._doneStack[this._doneStack.length-1];if(n._tag===bg){this._doneStack.pop(),this._currentChannel=n.onSuccess(t);return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=_r(t),this._currentChannel=void 0,dc();const i=L0(r.map(a=>a.finalizer),_r(t));this.storeInProgressFinalizer(i);const s=O(i,qc(lt(()=>this.clearInProgressFinalizer())),xd,ue(()=>lt(()=>this.doneSucceed(t))));return sd(s)}doneHalt(t){if(this._doneStack.length===0)return this._done=zn(t),this._currentChannel=void 0,dc();const n=this._doneStack[this._doneStack.length-1];if(n._tag===bg){this._doneStack.pop();try{this._currentChannel=n.onHalt(t)}catch(a){this._currentChannel=Rr(Sw(a))}return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=zn(t),this._currentChannel=void 0,dc();const i=L0(r.map(a=>a.finalizer),zn(t));this.storeInProgressFinalizer(i);const s=O(i,qc(lt(()=>this.clearInProgressFinalizer())),xd,ue(()=>lt(()=>this.doneHalt(t))));return sd(s)}processCancellation(){return this._currentChannel=void 0,this._done=this._cancelled,this._cancelled=void 0,dc()}runBracketOut(t){const n=xd(vi(this.provide(t.acquire()),{onFailure:r=>lt(()=>{this._currentChannel=Rr(r)}),onSuccess:r=>lt(()=>{this.addFinalizer(i=>this.provide(t.finalizer(r,i))),this._currentChannel=Tn(r)})}));return sd(n)}provide(t){return this._providedEnv===void 0?t:O(t,Xy(this._providedEnv))}runEnsuring(t){this.addFinalizer(t.finalizer),this._currentChannel=t.channel}addFinalizer(t){this._doneStack.push(new zae(t))}runSubexecutor(){const t=this._activeSubexecutor;switch(t._tag){case HP:return this.pullFromChild(t.childExecutor,t.parentSubexecutor,t.onEmit,t);case Mw:return this.pullFromUpstream(t);case Dw:return this.drainChildExecutors(t);case qP:return this._emitted=t.value,this._activeSubexecutor=t.next,z0()}}replaceSubexecutor(t){this._currentChannel=void 0,this._activeSubexecutor=t}finishWithExit(t){const n=$s(t,{onFailure:r=>this.doneHalt(r),onSuccess:r=>this.doneSucceed(r)});return this._activeSubexecutor=void 0,n===void 0?Fe:Jae(n)}finishSubexecutorWithCloseEffect(t,...n){this.addFinalizer(()=>O(n,es(i=>O(lt(()=>i(t)),ue(s=>s!==void 0?s:Fe)),{discard:!0})));const r=O(t,$s({onFailure:i=>this.doneHalt(i),onSuccess:i=>this.doneSucceed(i)}));return this._activeSubexecutor=void 0,r}applyUpstreamPullStrategy(t,n,r){switch(r._tag){case _P:{const i=!t||n.some(s=>s!==void 0);return[r.emitSeparator,i?[void 0,...n]:n]}case jae:{const i=!t||n.some(s=>s!==void 0);return[r.emitSeparator,i?[...n,void 0]:n]}}}pullFromChild(t,n,r,i){return j0(t,ce,s=>{const a=r(s);switch(a._tag){case bP:break;case Oae:{this.finishWithDoneValue(t,n,a.value);break}case Rae:{const o=n.enqueuePullFromChild(i);this.replaceSubexecutor(o);break}}this._activeSubexecutor=new I0(s,this._activeSubexecutor)},$s({onFailure:s=>{const a=this.handleSubexecutorFailure(t,n,s);return a===void 0?void 0:uR(a)},onSuccess:s=>{this.finishWithDoneValue(t,n,s)}}))}finishWithDoneValue(t,n,r){const i=n;switch(i._tag){case Mw:{const s=new Qo(i.upstreamExecutor,i.createChild,i.lastDone!==void 0?i.combineChildResults(i.lastDone,r):r,i.activeChildExecutors,i.combineChildResults,i.combineWithChildResult,i.onPull,i.onEmit);this._closeLastSubstream=t.close(_r(r)),this.replaceSubexecutor(s);break}case Dw:{const s=new Kc(i.upstreamExecutor,i.lastDone!==void 0?i.combineChildResults(i.lastDone,r):r,i.activeChildExecutors,i.upstreamDone,i.combineChildResults,i.combineWithChildResult,i.onPull);this._closeLastSubstream=t.close(_r(r)),this.replaceSubexecutor(s);break}}}handleSubexecutorFailure(t,n,r){return this.finishSubexecutorWithCloseEffect(zn(r),i=>n.close(i),i=>t.close(i))}pullFromUpstream(t){if(t.activeChildExecutors.length===0)return this.performPullFromUpstream(t);const n=t.activeChildExecutors[0],r=new Qo(t.upstreamExecutor,t.createChild,t.lastDone,t.activeChildExecutors.slice(1),t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit);if(n===void 0)return this.performPullFromUpstream(r);this.replaceSubexecutor(new Op(n.childExecutor,r,n.onEmit))}performPullFromUpstream(t){return j0(t.upstreamExecutor,n=>{const r=this._closeLastSubstream===void 0?Fe:this._closeLastSubstream;return this._closeLastSubstream=void 0,O(this._executeCloseLastSubstream(r),wn(n))},n=>{if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,O(this._executeCloseLastSubstream(a),Xe(()=>{const o=new el(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);o._input=this._input;const[l,c]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(fR(n)));this._activeSubexecutor=new Op(o,new Qo(t.upstreamExecutor,t.createChild,t.lastDone,c,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),gt(l)&&(this._activeSubexecutor=new I0(l.value,this._activeSubexecutor))}))}const r=new el(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);r._input=this._input;const[i,s]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(fR(n)));this._activeSubexecutor=new Op(r,new Qo(t.upstreamExecutor,t.createChild,t.lastDone,s,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),gt(i)&&(this._activeSubexecutor=new I0(i.value,this._activeSubexecutor))},n=>{if(t.activeChildExecutors.some(s=>s!==void 0)){const s=new Kc(t.upstreamExecutor,t.lastDone,[void 0,...t.activeChildExecutors],t.upstreamExecutor.getDone(),t.combineChildResults,t.combineWithChildResult,t.onPull);if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,O(this._executeCloseLastSubstream(a),Xe(()=>this.replaceSubexecutor(s)))}this.replaceSubexecutor(s);return}const r=this._closeLastSubstream,i=this.finishSubexecutorWithCloseEffect(O(n,kee(s=>t.combineWithChildResult(t.lastDone,s))),()=>r,s=>t.upstreamExecutor.close(s));return i===void 0?void 0:uR(i)})}drainChildExecutors(t){if(t.activeChildExecutors.length===0){const s=this._closeLastSubstream;return s!==void 0&&this.addFinalizer(()=>St(s)),this.finishSubexecutorWithCloseEffect(t.upstreamDone,()=>s,a=>t.upstreamExecutor.close(a))}const n=t.activeChildExecutors[0],r=t.activeChildExecutors.slice(1);if(n===void 0){const[s,a]=this.applyUpstreamPullStrategy(!0,r,t.onPull(toe(r.reduce((o,l)=>l!==void 0?o+1:o,0))));return this.replaceSubexecutor(new Kc(t.upstreamExecutor,t.lastDone,a,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull)),gt(s)?(this._emitted=s.value,z0()):void 0}const i=new Kc(t.upstreamExecutor,t.lastDone,r,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull);this.replaceSubexecutor(new Op(n.childExecutor,i,n.onEmit))}}const $0=e=>e!==void 0?e:Fe,L0=(e,t)=>O(es(e,n=>En(n(t))),Xe(n=>O(xee(n),ut(()=>tC))),ue(n=>jt(()=>n))),DC=(e,t,n)=>{const r=[e],i=()=>{const s=r.pop();if(s===void 0||s.upstream===void 0)return mse("Unexpected end of input for channel execution");const a=s.upstream.run();switch(a._tag){case Pm:{const o=s.onEmit(s.upstream.getEmit());return r.length===0?o===void 0?jt(t):O(o,vi({onFailure:n,onSuccess:t})):o===void 0?jt(()=>i()):O(o,vi({onFailure:n,onSuccess:()=>i()}))}case Fm:{const o=s.onDone(s.upstream.getDone());return r.length===0?o===void 0?jt(t):O(o,vi({onFailure:n,onSuccess:t})):o===void 0?jt(()=>i()):O(o,vi({onFailure:n,onSuccess:()=>i()}))}case Nf:return r.push(s),O(s.onEffect(a.effect),wC(o=>jt(()=>{const l=s.onDone(zn(o));return l===void 0?Fe:l})),vi({onFailure:n,onSuccess:()=>i()}));case Um:return r.push(s),r.push(a),jt(()=>i())}};return i()},noe=k(2,(e,t)=>{const n=(r,i,s)=>xse(lt(()=>new el(e,void 0,ce)),a=>jt(()=>vg(a.run(),a).pipe(rP(r),wn(qn(r)),CC(qn(i)))),(a,o)=>{const l=a.close(o);return l===void 0?Fe:aP(l,c=>Ky(s,_i(c)))});return Jy(r=>hse([A4(t,Oy),Gi(),Gi()]).pipe(ue(([i,s,a])=>r(n(s,a,i)).pipe(hl(t),ue(o=>t.addFinalizer(l=>{const c=eC(l)?Wne(l.cause):void 0;return kw(s).pipe(ue(f=>f?Ls(a,void 0).pipe(wn(M4(o)),wn(Y2(o))):Ls(a,void 0).pipe(wn(c&&gE(c)>0?mC(o,VY(c)):Xa(o)),wn(Y2(o)))))}).pipe(wn(r(qn(s)))))))))}),vg=(e,t)=>{const n=e;switch(n._tag){case Nf:return O(n.effect,ue(()=>vg(t.run(),t)));case Pm:return vg(t.run(),t);case Fm:return jt(()=>t.getDone());case Um:return DC(n,()=>vg(t.run(),t),_i)}},roe="Done",ioe="Await",soe="effect/ChannelMergeDecision",aoe=Symbol.for(soe),ooe={[aoe]:{_R:e=>e,_E0:e=>e,_Z0:e=>e,_E:e=>e,_Z:e=>e}},dR=e=>{const t=Object.create(ooe);return t._tag=ioe,t.f=e,t},KP="BothRunning",GP="LeftDone",YP="RightDone",loe="effect/ChannelMergeState",hR=Symbol.for(loe),zC={[hR]:hR},F0=(e,t)=>{const n=Object.create(zC);return n._tag=KP,n.left=e,n.right=t,n},mR=e=>{const t=Object.create(zC);return t._tag=GP,t.f=e,t},pR=e=>{const t=Object.create(zC);return t._tag=YP,t.f=e,t},JP="BackPressure",QP="BufferSliding",coe="effect/ChannelMergeStrategy",gR=Symbol.for(coe),XP={[gR]:gR},uoe=e=>{const t=Object.create(XP);return t._tag=JP,t},foe=e=>{const t=Object.create(XP);return t._tag=QP,t},doe=k(2,(e,{onBackPressure:t,onBufferSliding:n})=>{switch(e._tag){case JP:return t();case QP:return n()}}),_c="Empty",wd="Emit",_d="Error",kd="Done",WP=e=>({_tag:_c,notifyProducer:e}),P0=e=>({_tag:wd,notifyConsumers:e}),hoe=e=>({_tag:_d,cause:e}),moe=e=>({_tag:kd,done:e});class poe{constructor(t){y(this,"ref");this.ref=t}awaitRead(){return wc(td(this.ref,t=>t._tag===_c?[qn(t.notifyProducer),t]:[Fe,t]))}get close(){return _se(t=>this.error(x4(t)))}done(t){return wc(td(this.ref,n=>{switch(n._tag){case _c:return[qn(n.notifyProducer),n];case wd:return[es(n.notifyConsumers,r=>Ls(r,pe(t)),{discard:!0}),moe(t)];case _d:return[Yo,n];case kd:return[Yo,n]}}))}emit(t){return ue(Gi(),n=>wc(td(this.ref,r=>{switch(r._tag){case _c:return[qn(r.notifyProducer),r];case wd:{const i=r.notifyConsumers[0],s=r.notifyConsumers.slice(1);if(i!==void 0)return[Ls(i,he(t)),s.length===0?WP(n):P0(s)];throw new Error("Bug: Channel.SingleProducerAsyncInput.emit - Queue was empty! please report an issue at https://github.com/Effect-TS/effect/issues")}case _d:return[Yo,r];case kd:return[Yo,r]}})))}error(t){return wc(td(this.ref,n=>{switch(n._tag){case _c:return[qn(n.notifyProducer),n];case wd:return[es(n.notifyConsumers,r=>nse(r,t),{discard:!0}),hoe(t)];case _d:return[Yo,n];case kd:return[Yo,n]}}))}get take(){return this.takeWith(t=>zn(nre(t,pe)),t=>_r(t),t=>$y(he(t)))}takeWith(t,n,r){return ue(Gi(),i=>wc(td(this.ref,s=>{switch(s._tag){case _c:return[wn(Ls(s.notifyProducer,void 0),Ow(qn(i),{onFailure:t,onSuccess:or({onLeft:r,onRight:n})})),P0([i])];case wd:return[Ow(qn(i),{onFailure:t,onSuccess:or({onLeft:r,onRight:n})}),P0([...s.notifyConsumers,i])];case _d:return[St(t(s.cause)),s];case kd:return[St(r(s.done)),s]}})))}}const ZP=()=>O(Gi(),ue(e=>XE(WP(e))),Xe(e=>new poe(e))),zw=k(2,(e,t)=>qae(e,t,()=>{},()=>{})),goe=e=>{const t=Rf({onInput:()=>t,onFailure:Rr,onDone:BP});return ki(e,t)},e5=k(2,(e,t)=>Vae(e,()=>t)),yoe=e=>Gt(e,ce),jC=e=>Za(e.takeWith(Rr,t=>Gt(Tn(t),()=>jC(e)),BP)),t5=k(2,(e,t)=>Gt(e,n=>MC(()=>t(n)))),n5=k(2,(e,t)=>{const n=UP({onInput:r=>Gt(Tn(t(r)),()=>n),onFailure:RC,onDone:Gh});return ki(e,n)}),boe=e=>t=>voe(e)(t,Ou),voe=({bufferSize:e=16,concurrency:t,mergeStrategy:n=uoe()})=>(r,i)=>a5(s=>lu(function*(){const a=t==="unbounded"?Number.MAX_SAFE_INTEGER:t,o=yield*ZP(),l=jC(o),c=yield*yP(e);yield*Ky(s,eb(c));const f=yield*kae();yield*Ky(s,eb(f));const u=yield*XE(q()),d=yield*Gi(),h=(yield*Rse(a)).withPermits,g=yield*uu(ki(l,r),s);function v(m){return m.pipe(ue(or({onLeft:b=>St(J(b)),onRight:b=>N0(fc(c,St(he(b))),q())})),sR({until:b=>gt(b)}),ue(b=>VZ(u,pt({onNone:()=>J(b.value),onSome:S=>J(i(S,b.value))}))),wC(b=>Hy(b)?_i(b):fc(c,_i(b)).pipe(wn(Ls(d,void 0)),_C)))}yield*g.pipe(vi({onFailure:m=>fc(c,_i(m)).pipe(wn(St(!1))),onSuccess:or({onLeft:m=>iP(bi(qn(d)),bi(h(a)(Fe)),{onSelfDone:(b,S)=>N0(Xa(S),!1),onOtherDone:(b,S)=>wn(Xa(S),BZ(u).pipe(ue(pt({onNone:()=>fc(c,St(pe(m))),onSome:_=>fc(c,St(pe(i(_,m))))})),N0(!1)))}),onRight:m=>doe(n,{onBackPressure:()=>lu(function*(){const b=yield*Gi(),S=Aw(C=>uu(ki(l,m),C).pipe(ue(E=>M0(En(v(E)),En(bi(qn(d))))),ue(ce)));return yield*Ls(b,void 0).pipe(wn(S),h(1),hl(s)),yield*qn(b),!(yield*kw(d))}),onBufferSliding:()=>lu(function*(){const b=yield*Gi(),S=yield*Gi(),_=yield*Eae(f);yield*lR(f).pipe(ue(A=>Ls(A,void 0)),Cse(()=>_>=a)),yield*fc(f,b);const C=Aw(A=>uu(ki(l,m),A).pipe(ue(M=>En(v(M)).pipe(M0(En(bi(qn(d)))),M0(En(bi(qn(b)))))),ue(ce)));return yield*Ls(S,void 0).pipe(wn(C),h(1),hl(s)),yield*qn(S),!(yield*kw(d))})})})}),sR({while:m=>m}),hl(s));const x=O(lR(c),wc,Ow({onFailure:Rr,onSuccess:or({onLeft:Gh,onRight:m=>Gt(Tn(m),()=>x)})}),Za);return PP(x,o)})),r5=k(3,(e,t,n)=>boe(n)(n5(e,t))),Soe=k(2,(e,t)=>{function n(r){return lu(function*(){const i=yield*ZP(),s=jC(i),a=yield*uu(ki(s,e),r),o=yield*uu(ki(s,t.other),r);function l(f,u,d){return(h,g,v)=>{function x(m){const b=m;return b._tag===roe?St(Hn(wn(Xa(u),b.effect))):Xe(M4(u),$s({onFailure:S=>Hn(b.f(zn(S))),onSuccess:or({onLeft:S=>Hn(b.f(_r(S))),onRight:S=>IC(Tn(S),c(v(b.f)))})}))}return $s(f,{onFailure:m=>x(h(zn(m))),onSuccess:or({onLeft:m=>x(h(_r(m))),onRight:m=>St(Gt(Tn(m),()=>Gt(Hn(hl(bi(d),r)),b=>c(g(b,u)))))})})}}function c(f){switch(f._tag){case KP:{const u=bi(J2(f.left)),d=bi(J2(f.right));return Za(iP(u,d,{onSelfDone:(h,g)=>wn(Xa(g),l(h,f.right,a)(t.onSelfDone,F0,v=>mR(v))),onOtherDone:(h,g)=>wn(Xa(g),l(h,f.left,o)(t.onOtherDone,(v,x)=>F0(x,v),v=>pR(v)))}))}case GP:return Za(Xe(En(o),$s({onFailure:u=>Hn(f.f(zn(u))),onSuccess:or({onLeft:u=>Hn(f.f(_r(u))),onRight:u=>Gt(Tn(u),()=>c(mR(f.f)))})})));case YP:return Za(Xe(En(a),$s({onFailure:u=>Hn(f.f(zn(u))),onSuccess:or({onLeft:u=>Hn(f.f(_r(u))),onRight:u=>Gt(Tn(u),()=>c(pR(f.f)))})})))}}return Hn(Yy(f=>{const u=Yy(g=>(g.transferChildren(f.scope()),Fe)),d=bi(a).pipe(qc(u),hl(r)),h=bi(o).pipe(qc(u),hl(r));return Kv(d,h,(g,v)=>F0(g,v))})).pipe(Gt(c),PP(i))})}return a5(n)}),xoe=k(2,(e,t)=>NC(()=>{let n;const r=UP({onInput:s=>Gt(Tn(s),()=>r),onFailure:s=>(n=Toe(s),Rr(Sw(n))),onDone:Gh}),i=Rf({onInput:s=>O(Tn(s),Gt(()=>i)),onFailure:s=>Qne(s)&&Aoe(s.defect)&&oe(s.defect,n)?RC(s.defect.error):Rr(s),onDone:Gh});return ki(ki(ki(e,r),t),i)})),woe=e=>Aw(t=>noe(e,t)),i5=e=>woe(goe(e)),s5=e=>Za(Jy(t=>Xe(O4(),n=>Hae(aP(t(jre(e,n)),r=>Gy(n,zn(r))),(r,i)=>Gy(n,i))))),_oe=e=>Eoe(Xe(Vv,t=>Gt(Hn(e(t)),Tn))),koe=e=>ue(Vv,t=>uu(e,t)),uu=k(2,(e,t)=>Wy(lt(()=>new el(e,void 0,ce)),Lm()).pipe(sP(([n,r])=>zre(t,i=>{const s=n.close(i);return s!==void 0?Xy(s,r):Fe})),xd,Xe(([n])=>jt(()=>jw(n.run(),n))))),jw=(e,t)=>{const n=e;switch(n._tag){case Fm:return $s(t.getDone(),{onFailure:_i,onSuccess:r=>St(pe(r))});case Pm:return St(he(t.getEmit()));case Nf:return O(n.effect,ue(()=>jw(t.run(),t)));case Um:return DC(n,()=>jw(t.run(),t),r=>_i(r))}},Za=e=>yoe(Hn(e)),Eoe=e=>FP(s5(e),(t,n)=>t,(t,n)=>t),a5=e=>FP(_oe(e),(t,n)=>t,(t,n)=>t),o5=e=>l5(0,e.length,e),l5=(e,t,n)=>e===t?la:O(Tn(O(n,Ya(e))),Gt(()=>l5(e+1,t,n))),Coe=k(e=>LP(e[1]),(e,t,n)=>n!=null&&n.concurrent?Soe(e,{other:t,onSelfDone:r=>dR(i=>jt(()=>M2(r,i))),onOtherDone:r=>dR(i=>jt(()=>M2(i,r)))}):Gt(e,r=>t5(t,i=>[r,i]))),IC=k(e=>LP(e[1]),(e,t,n)=>n!=null&&n.concurrent?t5(Coe(e,t,{concurrent:!0}),r=>r[1]):Gt(e,()=>t)),Iw=Symbol.for("effect/Channel/ChannelException"),Toe=e=>({_tag:"ChannelException",[Iw]:Iw,error:e}),Aoe=e=>fe(e,Iw),Ooe=Symbol.for("effect/Sink"),Roe={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e};var mz;mz=Ooe;class $C{constructor(t){y(this,"channel");y(this,mz,Roe);this.channel=t}pipe(){return ie(this,arguments)}}const Noe=e=>{const t=Rf({onInput:n=>O(Hn(es(n,r=>e(r),{discard:!0})),Gt(()=>t)),onFailure:Rr,onDone:()=>la});return new $C(t)},Moe=e=>{const t=Rf({onInput:n=>O(Hn(e(n)),Gt(()=>t)),onFailure:Rr,onDone:()=>la});return new $C(t)},Doe=e=>new $C(Hn(e)),c5=e=>Co(e)?c5(Doe(e)):e.channel,zoe=()=>cs(q()),joe=e=>kC(_i(e),J),Ioe="effect/Stream",LC=Symbol.for(Ioe),$oe={_R:e=>e,_E:e=>e,_A:e=>e};var pz;pz=LC;class Oi{constructor(t){y(this,"channel");y(this,pz,$oe);this.channel=t}pipe(){return ie(this,arguments)}}const Qv=e=>fe(e,LC)||Co(e),Loe=4096,u5=k(2,(e,t)=>new Oi(O(Xr(e),e5(t)))),Foe=e=>h5(cs(J(e))),Poe=e=>d5(_i(e)),Uoe=k(2,(e,t)=>Goe(e,iE(t))),f5=k(e=>Qv(e[0]),(e,t,n)=>{const r=(n==null?void 0:n.bufferSize)??16;return n!=null&&n.switch?yR(n==null?void 0:n.concurrency,()=>bR(e,1,r,t),i=>bR(e,i,r,t)):yR(n==null?void 0:n.concurrency,()=>new Oi(zw(Xr(e),i=>O(i,bG(s=>Xr(t(s))),SG(la,(s,a)=>O(s,IC(a)))))),i=>new Oi(O(Xr(e),zw(o5),r5(s=>Xr(t(s)),n))))}),yR=(e,t,n)=>{switch(e){case void 0:return t();case"unbounded":return n(Number.MAX_SAFE_INTEGER);default:return e>1?n(e):t()}},bR=k(4,(e,t,n,r)=>new Oi(O(Xr(e),zw(o5),r5(i=>Xr(r(i)),{concurrency:t,mergeStrategy:foe(),bufferSize:n})))),Boe=k(e=>Qv(e[0]),(e,t)=>f5(e,ce,t)),Hoe=e=>new Oi(e),Xr=e=>{if("channel"in e)return e.channel;if(Co(e))return Xr(d5(e));throw new TypeError("Expected a Stream.")},qoe=e=>new Oi(ov(e)?la:Tn(e)),d5=e=>O(e,kC(J),h5),h5=e=>new Oi(Za(Ase(e,{onFailure:pt({onNone:()=>la,onSome:RC}),onSuccess:t=>Tn(Jt(t))}))),Voe=(e,t)=>O(Aae(e,1,(t==null?void 0:t.maxChunkSize)??Loe),wC(n=>O(Cae(e),ue(r=>r&&Hy(n)?zoe():joe(n)))),m5,t!=null&&t.shutdown?u5(eb(e)):ce),Koe=(...e)=>{const t=e.length===1?e[0].evaluate:e[0],n=e.length===1?e[0].onError:e[1],r=e.length===1?e[0].releaseLockOnEnd===!0:!1;return y5(Xe(Qy(lt(()=>t().getReader()),i=>r?lt(()=>i.releaseLock()):pse(()=>i.cancel())),i=>Yoe(ue(Xd({try:()=>i.read(),catch:s=>J(n(s))}),({done:s,value:a})=>s?cs(q()):St(a)))))},Goe=k(2,(e,t)=>new Oi(O(Xr(e),n5(t)))),m5=e=>tle(e,t=>O(Xe(t,n=>J([n,t])),eP(pt({onNone:()=>St(q()),onSome:cs})))),Yoe=e=>m5(O(e,Xe(Jt))),p5=k(2,(e,t)=>Xr(e).pipe(xoe(c5(t)),i5)),Joe=k(2,(e,t)=>p5(e,Noe(t))),Qoe=k(2,(e,t)=>p5(e,Moe(t))),Xoe=e=>new Oi(e5(s5(O(e,Xe(Jt))),Fe)),Woe=e=>qoe(Jt(e)),g5=e=>new Oi(NC(()=>Xr(e()))),Zoe=k(e=>Qv(e[0]),(e,t)=>Xe(Lm(),n=>ele(e,n,t))),ele=k(e=>Qv(e[0]),(e,t,n)=>{const r=Gv(t);let i,s;const a=Nse(!1);return new ReadableStream({start(o){s=r(Qoe(e,l=>l.length===0?Fe:a.whenOpen(lt(()=>{a.unsafeClose();for(const c of l)o.enqueue(c);i(),i=void 0})))),s.addObserver(l=>{try{l._tag==="Failure"?o.error(w4(l.cause)):o.close()}catch{}})},pull(){return new Promise(o=>{i=o,ti(a.open)})},cancel(){if(s)return Mse(_C(Xa(s)))}},n==null?void 0:n.strategy)}),tle=(e,t)=>g5(()=>{const n=r=>Za(Xe(t(r),pt({onNone:()=>la,onSome:([i,s])=>Gt(Tn(i),()=>n(s))})));return new Oi(n(e))}),y5=e=>Boe(Xoe(e)),vR=Symbol.for("effect/Mailbox"),SR=Symbol.for("effect/Mailbox/ReadonlyMailbox"),Xo=sn(),xR=tt(Xo),Rp=tt(!1),Np=tt(!0),wR=[Xo,!0];var gz,yz;class nle extends Tf{constructor(n,r,i){super();y(this,"scheduler");y(this,"capacity");y(this,"strategy");y(this,yz,vR);y(this,gz,SR);y(this,"state",{_tag:"Open",takers:new Set,offers:new Set,awaiters:new Set});y(this,"messages",[]);y(this,"messagesChunk",sn());y(this,"shutdown",K(()=>{if(this.state._tag==="Done")return!0;this.messages=[],this.messagesChunk=Xo;const n=this.state.offers;if(this.finalize(this.state._tag==="Open"?Dn:this.state.exit),n.size>0){for(const r of n)r._tag==="Single"?r.resume(Rp):r.resume(tt(Bn(r.remaining.slice(r.offset))));n.clear()}return!0}));y(this,"end",this.done(Dn));y(this,"clear",Te(()=>{if(this.state._tag==="Done")return dg(this.state.exit,Xo);const n=this.unsafeTakeAll();return this.releaseCapacity(),te(n)}));y(this,"takeAll",Te(()=>{if(this.state._tag==="Done")return dg(this.state.exit,wR);const n=this.unsafeTakeAll();return n.length===0?Nt(this.awaitTake,this.takeAll):te([n,this.releaseCapacity()])}));y(this,"take",Te(()=>this.unsafeTake()??Nt(this.awaitTake,this.take)));y(this,"await",Ia(n=>this.state._tag==="Done"?n(this.state.exit):(this.state.awaiters.add(n),K(()=>{this.state._tag!=="Done"&&this.state.awaiters.delete(n)}))));y(this,"size",K(()=>this.unsafeSize()));y(this,"awaitTake",Ia(n=>this.state._tag==="Done"?n(this.state.exit):(this.state.takers.add(n),K(()=>{this.state._tag!=="Done"&&this.state.takers.delete(n)}))));y(this,"scheduleRunning",!1);y(this,"releaseTaker",()=>{if(this.scheduleRunning=!1,this.state._tag!=="Done"&&this.state.takers.size!==0){for(const n of this.state.takers)if(this.state.takers.delete(n),n(Dn),this.messages.length+this.messagesChunk.length===0)break}});this.scheduler=n,this.capacity=r,this.strategy=i}offer(n){return Te(()=>{if(this.state._tag!=="Open")return Rp;if(this.messages.length+this.messagesChunk.length>=this.capacity)switch(this.strategy){case"dropping":return Rp;case"suspend":return this.capacity<=0&&this.state.takers.size>0?(this.messages.push(n),this.releaseTaker(),Np):this.offerRemainingSingle(n);case"sliding":return this.unsafeTake(),this.messages.push(n),Np}return this.messages.push(n),this.scheduleReleaseTaker(),Np})}unsafeOffer(n){return this.state._tag!=="Open"?!1:this.messages.length+this.messagesChunk.length>=this.capacity?this.strategy==="sliding"?(this.unsafeTake(),this.messages.push(n),!0):this.capacity<=0&&this.state.takers.size>0?(this.messages.push(n),this.releaseTaker(),!0):!1:(this.messages.push(n),this.scheduleReleaseTaker(),!0)}offerAll(n){return Te(()=>{if(this.state._tag!=="Open")return te(Zs(n));const r=this.unsafeOfferAllArray(n);return r.length===0?xR:this.strategy==="dropping"?te(Bn(r)):this.offerRemainingArray(r)})}unsafeOfferAll(n){return Bn(this.unsafeOfferAllArray(n))}unsafeOfferAllArray(n){if(this.state._tag!=="Open")return Qe(n);if(this.capacity===Number.POSITIVE_INFINITY||this.strategy==="sliding")return this.messages.length>0&&(this.messagesChunk=Kt(this.messagesChunk,Bn(this.messages))),this.strategy==="sliding"?this.messagesChunk=this.messagesChunk.pipe(Kt(Zs(n)),vG(this.capacity)):av(n)?this.messagesChunk=Kt(this.messagesChunk,n):this.messages=Qe(n),this.scheduleReleaseTaker(),[];const r=this.capacity<=0?this.state.takers.size:this.capacity-this.messages.length-this.messagesChunk.length;if(r===0)return Qe(n);const i=[];let s=0;for(const a of n)s<r?this.messages.push(a):i.push(a),s++;return this.scheduleReleaseTaker(),i}fail(n){return this.done(Lh(n))}failCause(n){return this.done(Ze(n))}unsafeDone(n){return this.state._tag!=="Open"?!1:this.state.offers.size===0&&this.messages.length===0&&this.messagesChunk.length===0?(this.finalize(n),!0):(this.state={...this.state,_tag:"Closing",exit:n},!0)}done(n){return K(()=>this.unsafeDone(n))}takeN(n){return Te(()=>{if(this.state._tag==="Done")return dg(this.state.exit,wR);if(n<=0)return te([Xo,!1]);n=Math.min(n,this.capacity);let r;if(n<=this.messagesChunk.length)r=by(this.messagesChunk,n),this.messagesChunk=ja(this.messagesChunk,n);else if(n<=this.messages.length+this.messagesChunk.length)this.messagesChunk=Kt(this.messagesChunk,Bn(this.messages)),this.messages=[],r=by(this.messagesChunk,n),this.messagesChunk=ja(this.messagesChunk,n);else return Nt(this.awaitTake,this.takeN(n));return te([r,this.releaseCapacity()])})}unsafeTake(){if(this.state._tag==="Done")return G3(this.state.exit,Lh(new Af));let n;if(this.messagesChunk.length>0)n=aE(this.messagesChunk),this.messagesChunk=ja(this.messagesChunk,1);else if(this.messages.length>0)n=this.messages[0],this.messagesChunk=ja(Bn(this.messages),1),this.messages=[];else return this.capacity<=0&&this.state.offers.size>0?(this.capacity=1,this.releaseCapacity(),this.capacity=0,this.messages.length>0?tt(this.messages.pop()):void 0):void 0;return this.releaseCapacity(),tt(n)}unsafeSize(){const n=this.messages.length+this.messagesChunk.length;return this.state._tag==="Done"?q():J(n)}commit(){return this.takeAll}pipe(){return ie(this,arguments)}toJSON(){return{_id:"effect/Mailbox",state:this.state._tag,size:this.unsafeSize().toJSON()}}toString(){return at(this)}[(yz=vR,gz=SR,Ue)](){return at(this)}offerRemainingSingle(n){return Ia(r=>{if(this.state._tag!=="Open")return r(Rp);const i={_tag:"Single",message:n,resume:r};return this.state.offers.add(i),K(()=>{this.state._tag==="Open"&&this.state.offers.delete(i)})})}offerRemainingArray(n){return Ia(r=>{if(this.state._tag!=="Open")return r(tt(Bn(n)));const i={_tag:"Array",remaining:n,offset:0,resume:r};return this.state.offers.add(i),K(()=>{this.state._tag==="Open"&&this.state.offers.delete(i)})})}releaseCapacity(){if(this.state._tag==="Done")return this.state.exit._tag==="Success";if(this.state.offers.size===0)return this.state._tag==="Closing"&&this.messages.length===0&&this.messagesChunk.length===0?(this.finalize(this.state.exit),this.state.exit._tag==="Success"):!1;let n=this.capacity-this.messages.length-this.messagesChunk.length;for(const r of this.state.offers){if(n===0)return!1;if(r._tag==="Single")this.messages.push(r.message),n--,r.resume(Np),this.state.offers.delete(r);else{for(;r.offset<r.remaining.length;r.offset++){if(n===0)return!1;this.messages.push(r.remaining[r.offset]),n--}r.resume(xR),this.state.offers.delete(r)}}return!1}scheduleReleaseTaker(){this.scheduleRunning||(this.scheduleRunning=!0,this.scheduler.scheduleTask(this.releaseTaker,0))}unsafeTakeAll(){if(this.messagesChunk.length>0){const n=this.messages.length>0?Kt(this.messagesChunk,Bn(this.messages)):this.messagesChunk;return this.messagesChunk=Xo,this.messages=[],n}else if(this.messages.length>0){const n=Bn(this.messages);return this.messages=[],n}else if(this.state._tag!=="Done"&&this.state.offers.size>0)return this.capacity=1,this.releaseCapacity(),this.capacity=0,Jt(this.messages.pop());return Xo}finalize(n){if(this.state._tag==="Done")return;const r=this.state;this.state={_tag:"Done",exit:n};for(const i of r.takers)i(n);r.takers.clear();for(const i of r.awaiters)i(n);r.awaiters.clear()}}const rle=e=>He(t=>te(new nle(t.currentScheduler,typeof e=="number"?e:(e==null?void 0:e.capacity)??Number.POSITIVE_INFINITY,typeof e=="number"?"suspend":(e==null?void 0:e.strategy)??"suspend"))),ile=e=>{const t=Gt(e.takeAll,([n,r])=>r?n.length===0?la:Tn(n):IC(Tn(n),t));return t},sle=e=>Hoe(ile(e)),ale=rle,ole=sle,U0=LC,b5=u5,lle=Foe,cle=Poe,ule=Uoe,fle=f5,v5=Xr,dle=Voe,hle=Koe,mle=Joe,ple=Woe,gle=g5,yle=Zoe,S5=y5;class Bm extends Zk("@effect/experimental/Reactivity")(){}const ble=lt(()=>{const e=new Map,t=o=>{if(Array.isArray(o))for(let l=0;l<o.length;l++){const c=e.get($w(o[l]));if(c!==void 0)for(const f of c)f()}else{const l=o;for(const c in l){const f=w5(c,l[c]);for(let d=0;d<f.length;d++){const h=e.get(f[d]);if(h!==void 0)for(const g of h)g()}const u=e.get(c);if(u!==void 0)for(const d of u)d()}}},n=o=>lt(()=>t(o)),r=(o,l)=>CC(l,n(o)),i=(o,l)=>{const c=Array.isArray(o)?o.map($w):Sle(o);for(let f=0;f<c.length;f++){let u=e.get(c[f]);u===void 0&&(u=new Set,e.set(c[f],u)),u.add(l)}return()=>{for(let f=0;f<c.length;f++){const u=e.get(c[f]);u.delete(l),u.size===0&&e.delete(c[f])}}},s=(o,l)=>lu(function*(){const c=yield*Vv,f=yield*ale(),u=yield*Use();let d=!1,h=!1;const g=m=>{m._tag==="Failure"?f.unsafeDone(zn(m.cause)):f.unsafeOffer(m.value),h?(h=!1,u(l).addObserver(g)):d=!1};function v(){if(d){h=!0;return}d=!0,u(l).addObserver(g)}const x=i(o,v);return yield*Ky(c,lt(x)),v(),f}),a=(o,l)=>s(o,l).pipe(Xe(ole),S5);return Bm.of({mutation:r,query:s,stream:a,unsafeInvalidate:t,invalidate:n,unsafeRegister:i})}),x5=k(2,(e,t)=>ue(Bm,n=>n.mutation(t,e))),vle=e=>ue(Bm,t=>t.invalidate(e)),B0=cP(Bm,ble);function $w(e){return typeof e=="string"?e:re(e)}const w5=(e,t)=>{const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=`${e}:${$w(t[r])}`;return n},Sle=e=>{const t=[];for(const n in e){t.push(n);for(const r of w5(n,e[n]))t.push(r)}return t},_5="effect/Redacted",Sg=ge("effect/Redacted/redactedRegistry",()=>new WeakMap),k5=Symbol.for(_5),xle={[k5]:{_A:e=>e},pipe(){return ie(this,arguments)},toString(){return"<redacted>"},toJSON(){return"<redacted>"},[Ue](){return"<redacted>"},[be](){return O(re(_5),Se(re(Sg.get(this))),rt(this))},[ve](e){return wle(e)&&oe(Sg.get(this),Sg.get(e))}},wle=e=>fe(e,k5),_le=e=>{const t=Object.create(xle);return Sg.set(t,e),t},E5=(e,t)=>{switch(t._tag){case"StringKeyword":case"TemplateLiteral":return Object.keys(e);case"SymbolKeyword":return Object.getOwnPropertySymbols(e);case"Refinement":return E5(e,t.from)}},C5=e=>{let t=!1,n;return()=>(t||(n=e(),t=!0),n)},FC=e=>Array.isArray(e),_R=e=>`[${Wb(e)}]`,T5=e=>FC(e)?e.map(_R).join(""):_R(e),To=(e,t,n,r)=>{let i=e;return n&&rn(n)&&(i+=`
|
|
72
|
+
at path: ${T5(n)}`),t!==void 0&&(i+=`
|
|
73
|
+
details: ${t}`),r&&(i+=`
|
|
74
|
+
schema (${r._tag}): ${r}`),i},A5=(e,t,n)=>To("Unsupported schema or overlapping types",`cannot extend ${e} with ${t}`,n),kle=e=>To("Unsupported key schema",void 0,void 0,e),Ele=e=>To("Unsupported literal",`literal value: ${sa(e)}`),kR=e=>To("Duplicate index signature",`${e} index signature`),Cle=To("Unsupported index signature parameter","An index signature parameter type must be `string`, `symbol`, a template literal type or a refinement of the previous types"),Tle=To("Invalid element","A required element cannot follow an optional element. ts(1257)"),ER=e=>To("Duplicate property signature transformation",`Duplicate key ${sa(e)}`),O5=e=>To("Duplicate property signature",`Duplicate key ${sa(e)}`),Ale=Symbol.for("effect/SchemaId/DateFromSelf"),Ole=Symbol.for("effect/annotation/TypeConstructor"),R5=Symbol.for("effect/annotation/Brand"),Rle=Symbol.for("effect/annotation/SchemaId"),N5=Symbol.for("effect/annotation/Message"),PC=Symbol.for("effect/annotation/MissingMessage"),Hm=Symbol.for("effect/annotation/Identifier"),ji=Symbol.for("effect/annotation/Title"),fu=Symbol.for("effect/annotation/AutoTitle"),Xl=Symbol.for("effect/annotation/Description"),M5=Symbol.for("effect/annotation/Examples"),D5=Symbol.for("effect/annotation/Default"),z5=Symbol.for("effect/annotation/JSONSchema"),j5=Symbol.for("effect/annotation/Arbitrary"),I5=Symbol.for("effect/annotation/Pretty"),$5=Symbol.for("effect/annotation/Equivalence"),Nle=Symbol.for("effect/annotation/Documentation"),L5=Symbol.for("effect/annotation/Concurrency"),F5=Symbol.for("effect/annotation/Batching"),P5=Symbol.for("effect/annotation/ParseIssueTitle"),U5=Symbol.for("effect/annotation/ParseOptions"),B5=Symbol.for("effect/annotation/DecodingFallback"),nb=Symbol.for("effect/annotation/Surrogate"),Mle=Symbol.for("effect/annotation/StableFilter"),Zn=k(2,(e,t)=>Object.prototype.hasOwnProperty.call(e.annotations,t)?J(e.annotations[t]):q()),H5=Zn(R5),Dle=Zn(N5),zle=Zn(PC),q5=Zn(ji),V5=Zn(fu),Xv=Zn(Hm),K5=Zn(Xl),jle=Zn(L5),Ile=Zn(F5),$le=Zn(P5),Lle=Zn(U5),Fle=Zn(B5),G5=Zn(nb),Ple=Zn(Mle),Ule=e=>dL(Ple(e),t=>t===!0),Y5=Symbol.for("effect/annotation/JSONIdentifier"),Ble=Zn(Y5),Hle=e=>wi(Ble(e),()=>Xv(e)),qle=Symbol.for("effect/schema/ParseJson");class Wv{constructor(t,n,r,i={}){y(this,"typeParameters");y(this,"decodeUnknown");y(this,"encodeUnknown");y(this,"annotations");y(this,"_tag","Declaration");this.typeParameters=t,this.decodeUnknown=n,this.encodeUnknown=r,this.annotations=i}toString(){return ut(rs(this),()=>"<declaration schema>")}toJSON(){return{_tag:this._tag,typeParameters:this.typeParameters.map(t=>t.toJSON()),annotations:Lt(this.annotations)}}}const Ii=e=>t=>t._tag===e;let rb=class{constructor(t,n={}){y(this,"literal");y(this,"annotations");y(this,"_tag","Literal");this.literal=t,this.annotations=n}toString(){return ut(rs(this),()=>sa(this.literal))}toJSON(){return{_tag:this._tag,literal:Jb(this.literal)?String(this.literal):this.literal,annotations:Lt(this.annotations)}}};const Wd=Ii("Literal"),Vle=new rb(null);class Kle{constructor(t,n={}){y(this,"symbol");y(this,"annotations");y(this,"_tag","UniqueSymbol");this.symbol=t,this.annotations=n}toString(){return ut(rs(this),()=>sa(this.symbol))}toJSON(){return{_tag:this._tag,symbol:String(this.symbol),annotations:Lt(this.annotations)}}}class Gle{constructor(t={}){y(this,"annotations");y(this,"_tag","UndefinedKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const Lw=new Gle({[ji]:"undefined"});class Yle{constructor(t={}){y(this,"annotations");y(this,"_tag","VoidKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const Jle=new Yle({[ji]:"void"}),Qle=Ii("VoidKeyword");class Xle{constructor(t={}){y(this,"annotations");y(this,"_tag","NeverKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const UC=new Xle({[ji]:"never"}),Wle=Ii("NeverKeyword");class Zle{constructor(t={}){y(this,"annotations");y(this,"_tag","UnknownKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const J5=new Zle({[ji]:"unknown"});class ece{constructor(t={}){y(this,"annotations");y(this,"_tag","AnyKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const tce=new ece({[ji]:"any"});class nce{constructor(t={}){y(this,"annotations");y(this,"_tag","StringKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const Fw=new nce({[ji]:"string",[Xl]:"a string"}),Pw=Ii("StringKeyword");class rce{constructor(t={}){y(this,"annotations");y(this,"_tag","NumberKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const Uw=new rce({[ji]:"number",[Xl]:"a number"}),CR=Ii("NumberKeyword");class ice{constructor(t={}){y(this,"annotations");y(this,"_tag","BooleanKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const Bw=new ice({[ji]:"boolean",[Xl]:"a boolean"}),TR=Ii("BooleanKeyword");class sce{constructor(t={}){y(this,"annotations");y(this,"_tag","SymbolKeyword");this.annotations=t}toString(){return ca(this)}toJSON(){return{_tag:this._tag,annotations:Lt(this.annotations)}}}const ace=new sce({[ji]:"symbol",[Xl]:"a symbol"}),oce=Ii("SymbolKeyword");let Zv=class{constructor(t,n={}){y(this,"type");y(this,"annotations");this.type=t,this.annotations=n}toJSON(){return{type:this.type.toJSON(),annotations:Lt(this.annotations)}}toString(){return String(this.type)}};class Wl extends Zv{constructor(n,r,i={}){super(n,i);y(this,"isOptional");this.isOptional=r}toJSON(){return{type:this.type.toJSON(),isOptional:this.isOptional,annotations:Lt(this.annotations)}}toString(){return String(this.type)+(this.isOptional?"?":"")}}const Q5=e=>e.map(t=>t.type);class BC{constructor(t,n,r,i={}){y(this,"elements");y(this,"rest");y(this,"isReadonly");y(this,"annotations");y(this,"_tag","TupleType");this.elements=t,this.rest=n,this.isReadonly=r,this.annotations=i;let s=!1,a=!1;for(const o of t)if(o.isOptional)s=!0;else if(s){a=!0;break}if(a||s&&n.length>1)throw new Error(Tle)}toString(){return ut(rs(this),()=>lce(this))}toJSON(){return{_tag:this._tag,elements:this.elements.map(t=>t.toJSON()),rest:this.rest.map(t=>t.toJSON()),isReadonly:this.isReadonly,annotations:Lt(this.annotations)}}}const lce=e=>{const t=e.elements.map(String).join(", ");return YK(e.rest,{onEmpty:()=>`readonly [${t}]`,onNonEmpty:(n,r)=>{const i=String(n),s=i.includes(" | ")?`(${i})`:i;if(r.length>0){const a=r.map(String).join(", ");return e.elements.length>0?`readonly [${t}, ...${s}[], ${a}]`:`readonly [...${s}[], ${a}]`}else return e.elements.length>0?`readonly [${t}, ...${s}[]]`:`ReadonlyArray<${i}>`}})};class vn extends Wl{constructor(n,r,i,s,a){super(r,i,a);y(this,"name");y(this,"isReadonly");this.name=n,this.isReadonly=s}toString(){return(this.isReadonly?"readonly ":"")+String(this.name)+(this.isOptional?"?":"")+": "+this.type}toJSON(){return{name:String(this.name),type:this.type.toJSON(),isOptional:this.isOptional,isReadonly:this.isReadonly,annotations:Lt(this.annotations)}}}const X5=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return!0;case"Refinement":return X5(e.from)}return!1};class eS{constructor(t,n,r){y(this,"type");y(this,"isReadonly");y(this,"parameter");if(this.type=n,this.isReadonly=r,X5(t))this.parameter=t;else throw new Error(Cle)}toString(){return(this.isReadonly?"readonly ":"")+`[x: ${this.parameter}]: ${this.type}`}toJSON(){return{parameter:this.parameter.toJSON(),type:this.type.toJSON(),isReadonly:this.isReadonly}}}class eo{constructor(t,n,r={}){y(this,"annotations");y(this,"_tag","TypeLiteral");y(this,"propertySignatures");y(this,"indexSignatures");this.annotations=r;const i={};for(let a=0;a<t.length;a++){const o=t[a].name;if(Object.prototype.hasOwnProperty.call(i,o))throw new Error(O5(o));i[o]=null}const s={string:!1,symbol:!1};for(let a=0;a<n.length;a++){const o=sU(n[a].parameter);if(Pw(o)){if(s.string)throw new Error(kR("string"));s.string=!0}else if(oce(o)){if(s.symbol)throw new Error(kR("symbol"));s.symbol=!0}}this.propertySignatures=t,this.indexSignatures=n}toString(){return ut(rs(this),()=>cce(this))}toJSON(){return{_tag:this._tag,propertySignatures:this.propertySignatures.map(t=>t.toJSON()),indexSignatures:this.indexSignatures.map(t=>t.toJSON()),annotations:Lt(this.annotations)}}}const AR=e=>e.map(String).join("; "),cce=e=>{if(e.propertySignatures.length>0){const t=e.propertySignatures.map(String).join("; ");return e.indexSignatures.length>0?`{ ${t}; ${AR(e.indexSignatures)} }`:`{ ${t} }`}else return e.indexSignatures.length>0?`{ ${AR(e.indexSignatures)} }`:"{}"},OR=Ii("TypeLiteral"),uce=Oh(cL(Hu,e=>{switch(e._tag){case"AnyKeyword":return 0;case"UnknownKeyword":return 1;case"ObjectKeyword":return 2;case"StringKeyword":case"NumberKeyword":case"BooleanKeyword":case"BigIntKeyword":case"SymbolKeyword":return 3}return 4})),fce={string:"StringKeyword",number:"NumberKeyword",boolean:"BooleanKeyword",bigint:"BigIntKeyword"},W5=e=>yy(e,t=>tS(t)?W5(t.types):[t]),dce=e=>{const t=uce(e),n=[],r={},i=[];for(const s of t)switch(s._tag){case"NeverKeyword":break;case"AnyKeyword":return[tce];case"UnknownKeyword":return[J5];case"ObjectKeyword":case"UndefinedKeyword":case"VoidKeyword":case"StringKeyword":case"NumberKeyword":case"BooleanKeyword":case"BigIntKeyword":case"SymbolKeyword":{r[s._tag]||(r[s._tag]=s,n.push(s));break}case"Literal":{const a=typeof s.literal;switch(a){case"string":case"number":case"bigint":case"boolean":{const o=fce[a];!r[o]&&!i.includes(s.literal)&&(i.push(s.literal),n.push(s));break}case"object":{i.includes(s.literal)||(i.push(s.literal),n.push(s));break}}break}case"UniqueSymbol":{!r.SymbolKeyword&&!i.includes(s.symbol)&&(i.push(s.symbol),n.push(s));break}case"TupleType":{r.ObjectKeyword||n.push(s);break}case"TypeLiteral":{s.propertySignatures.length===0&&s.indexSignatures.length===0?r["{}"]||(r["{}"]=s,n.push(s)):r.ObjectKeyword||n.push(s);break}default:n.push(s)}return n};var Ns;let Sr=(Ns=class{constructor(t,n={}){y(this,"types");y(this,"annotations");y(this,"_tag","Union");this.types=t,this.annotations=n}toString(){return ut(rs(this),()=>this.types.map(String).join(" | "))}toJSON(){return{_tag:this._tag,types:this.types.map(t=>t.toJSON()),annotations:Lt(this.annotations)}}},y(Ns,"make",(t,n)=>HC(t)?new Ns(t,n):t.length===1?t[0]:UC),y(Ns,"unify",(t,n)=>Ns.make(dce(W5(t)),n)),Ns);const hce=(e,t)=>e.map(t),HC=e=>e.length>1,tS=Ii("Union"),H0=ge(Symbol.for("effect/Schema/AST/toJSONMemoMap"),()=>new WeakMap);class Yh{constructor(t,n={}){y(this,"f");y(this,"annotations");y(this,"_tag","Suspend");this.f=t,this.annotations=n,this.f=C5(t)}toString(){return rs(this).pipe(wi(()=>aa(jK(this.f)(),t=>rs(t))),ut(()=>"<suspended schema>"))}toJSON(){const t=this.f();let n=H0.get(t);return n||(H0.set(t,{_tag:this._tag}),n={_tag:this._tag,ast:t.toJSON(),annotations:Lt(this.annotations)},H0.set(t,n),n)}}let Z5=class{constructor(t,n,r={}){y(this,"from");y(this,"filter");y(this,"annotations");y(this,"_tag","Refinement");this.from=t,this.filter=n,this.annotations=r}toString(){return Xv(this).pipe(ut(()=>pt(aU(this),{onNone:()=>`{ ${this.from} | filter }`,onSome:t=>du(this.from)?String(this.from)+" & "+t:t})))}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),annotations:Lt(this.annotations)}}};const du=Ii("Refinement"),q0={};let tl=class{constructor(t,n,r,i={}){y(this,"from");y(this,"to");y(this,"transformation");y(this,"annotations");y(this,"_tag","Transformation");this.from=t,this.to=n,this.transformation=r,this.annotations=i}toString(){return ut(rs(this),()=>`(${String(this.from)} <-> ${String(this.to)})`)}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),to:this.to.toJSON(),annotations:Lt(this.annotations)}}};const mce=Ii("Transformation");class eU{constructor(t,n){y(this,"decode");y(this,"encode");y(this,"_tag","FinalTransformation");this.decode=t,this.encode=n}}const pce=e=>t=>t._tag===e;class gce{constructor(){y(this,"_tag","ComposeTransformation")}}const tU=new gce;let yce=class{constructor(t,n,r,i){y(this,"from");y(this,"to");y(this,"decode");y(this,"encode");this.from=t,this.to=n,this.decode=r,this.encode=i}};class Hw{constructor(t){y(this,"propertySignatureTransformations");y(this,"_tag","TypeLiteralTransformation");this.propertySignatureTransformations=t;const n={},r={};for(const i of t){const s=i.from;if(n[s])throw new Error(ER(s));n[s]=!0;const a=i.to;if(r[a])throw new Error(ER(a));r[a]=!0}}}const RR=pce("TypeLiteralTransformation"),Mf=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={...e.annotations};delete r[Hm];const i={...r,...t},s=G5(e);return gt(s)&&(i[nb]=Mf(s.value,t)),n.annotations.value=i,Object.create(Object.getPrototypeOf(e),n)},bce="[\\s\\S]*?",vce="[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?",nU=(e,t)=>{switch(e._tag){case"Literal":return Ty(String(e.literal));case"StringKeyword":return bce;case"NumberKeyword":return vce;case"TemplateLiteral":return rU(e);case"Union":return e.types.map(n=>nU(n)).join("|")}},Sce=(e,t,n,r)=>tS(e)?`(${t})`:t,rU=(e,t,n)=>{let r="";if(e.head!==""){const i=Ty(e.head);r+=i}for(const i of e.spans){const s=nU(i.type);if(r+=Sce(i.type,s),i.literal!==""){const a=Ty(i.literal);r+=a}}return r},xce=e=>new RegExp(`^${rU(e)}$`),NR=(e,t)=>{const n=[],r=[],i=s=>{switch(s._tag){case"NeverKeyword":break;case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":case"Refinement":r.push(new eS(s,t,!0));break;case"Literal":if(ri(s.literal)||Ws(s.literal))n.push(new vn(s.literal,t,!1,!0));else throw new Error(Ele(s.literal));break;case"Enums":{for(const[a,o]of s.enums)n.push(new vn(o,t,!1,!0));break}case"UniqueSymbol":n.push(new vn(s.symbol,t,!1,!0));break;case"Union":s.types.forEach(i);break;default:throw new Error(kle(s))}};return i(e),{propertySignatures:n,indexSignatures:r}},iU=e=>t=>{let n;for(const r of e)Object.prototype.hasOwnProperty.call(t.annotations,r)&&(n===void 0&&(n={}),n[r]=t.annotations[r]);return n},wce=e=>t=>{const n={...t.annotations};for(const r of e)delete n[r];return n},_ce=iU([M5,D5,z5,j5,I5,$5]),Ut=e=>{switch(e._tag){case"Declaration":{const t=Vr(e.typeParameters,Ut);return t===e.typeParameters?e:new Wv(t,e.decodeUnknown,e.encodeUnknown,e.annotations)}case"TupleType":{const t=Vr(e.elements,i=>{const s=Ut(i.type);return s===i.type?i:new Wl(s,i.isOptional)}),n=Q5(e.rest),r=Vr(n,Ut);return t===e.elements&&r===n?e:new BC(t,r.map(i=>new Zv(i)),e.isReadonly,e.annotations)}case"TypeLiteral":{const t=Vr(e.propertySignatures,r=>{const i=Ut(r.type);return i===r.type?r:new vn(r.name,i,r.isOptional,r.isReadonly)}),n=Vr(e.indexSignatures,r=>{const i=Ut(r.type);return i===r.type?r:new eS(r.parameter,i,r.isReadonly)});return t===e.propertySignatures&&n===e.indexSignatures?e:new eo(t,n,e.annotations)}case"Union":{const t=Vr(e.types,Ut);return t===e.types?e:Sr.make(t,e.annotations)}case"Suspend":return new Yh(()=>Ut(e.f()),e.annotations);case"Refinement":{const t=Ut(e.from);return t===e.from?e:new Z5(t,e.filter,e.annotations)}case"Transformation":{const t=_ce(e);return Ut(t!==void 0?Mf(e.to,t):e.to)}}return e};function Vr(e,t){let n=!1;const r=iv(e.length);for(let i=0;i<e.length;i++){const s=e[i],a=t(s);a!==s&&(n=!0),r[i]=a}return n?r:e}const Li=(e,t)=>{switch(e._tag){case"Declaration":{const n=Vr(e.typeParameters,r=>Li(r));return n===e.typeParameters?e:new Wv(n,e.decodeUnknown,e.encodeUnknown)}case"TupleType":{const n=Vr(e.elements,s=>{const a=Li(s.type);return a===s.type?s:new Wl(a,s.isOptional)}),r=Q5(e.rest),i=Vr(r,s=>Li(s));return n===e.elements&&i===r?e:new BC(n,i.map(s=>new Zv(s)),e.isReadonly)}case"TypeLiteral":{const n=Vr(e.propertySignatures,i=>{const s=Li(i.type);return s===i.type?i:new vn(i.name,s,i.isOptional,i.isReadonly)}),r=Vr(e.indexSignatures,i=>{const s=Li(i.type);return s===i.type?i:new eS(i.parameter,s,i.isReadonly)});return n===e.propertySignatures&&r===e.indexSignatures?e:new eo(n,r)}case"Union":{const n=Vr(e.types,r=>Li(r));return n===e.types?e:Sr.make(n)}case"Suspend":{let n;const r=Hle(e);if(gt(r)){const i="";n={[Y5]:`${r.value}Encoded${i}`}}return new Yh(()=>Li(e.f()),n)}case"Refinement":return Li(e.from);case"Transformation":return Li(e.from)}return e},ib=e=>Li(e),Lt=e=>{const t={};for(const n of Object.getOwnPropertySymbols(e))t[String(n)]=e[n];return t},sU=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return e;case"Refinement":return sU(e.from)}},kce=(e,t)=>new tl(e,t,tU),ca=e=>ut(rs(e),()=>e._tag);function Ece(e){return pt(H5(e),{onNone:()=>"",onSome:t=>t.map(n=>` & Brand<${sa(n)}>`).join("")})}const aU=e=>q5(e).pipe(wi(()=>K5(e)),wi(()=>V5(e)),Gn(t=>t+Ece(e))),rs=e=>wi(Xv(e),()=>aU(e));class Rn{constructor(t,n,r){y(this,"path");y(this,"actual");y(this,"issue");y(this,"_tag","Pointer");this.path=t,this.actual=n,this.issue=r}}class MR{constructor(t,n){y(this,"actual");y(this,"message");y(this,"_tag","Unexpected");this.actual=t,this.message=n}}class ad{constructor(t,n){y(this,"ast");y(this,"message");y(this,"_tag","Missing");y(this,"actual");this.ast=t,this.message=n}}class Dt{constructor(t,n,r,i){y(this,"ast");y(this,"actual");y(this,"issues");y(this,"output");y(this,"_tag","Composite");this.ast=t,this.actual=n,this.issues=r,this.output=i}}class V0{constructor(t,n,r,i){y(this,"ast");y(this,"actual");y(this,"kind");y(this,"issue");y(this,"_tag","Refinement");this.ast=t,this.actual=n,this.kind=r,this.issue=i}}class K0{constructor(t,n,r,i){y(this,"ast");y(this,"actual");y(this,"kind");y(this,"issue");y(this,"_tag","Transformation");this.ast=t,this.actual=n,this.kind=r,this.issue=i}}class dn{constructor(t,n,r){y(this,"ast");y(this,"actual");y(this,"message");y(this,"_tag","Type");this.ast=t,this.actual=n,this.message=r}}class qw{constructor(t,n,r){y(this,"ast");y(this,"actual");y(this,"message");y(this,"_tag","Forbidden");this.ast=t,this.actual=n,this.message=r}}const DR=Symbol.for("effect/Schema/ParseErrorTypeId");var bz;class Cce extends Aie("ParseError"){constructor(){super(...arguments);y(this,bz,DR)}get message(){return this.toString()}toString(){return eh.formatIssueSync(this.issue)}toJSON(){return{_id:"ParseError",message:this.toString()}}[(bz=DR,Ue)](){return this.toJSON()}}const qC=e=>new Cce({issue:e}),Yn=he,Fs=pe,sb=kK,Nn=iL,xi=k(2,(e,t)=>Nn(e)?or(e,{onLeft:pe,onRight:t}):ue(e,t)),Sn=k(2,(e,t)=>Nn(e)?TK(e,t):Xe(e,t)),Zd=k(2,(e,t)=>Nn(e)?CK(e,t):kC(e,t)),Tce=k(2,(e,t)=>Nn(e)?EK(e,{onLeft:t.onFailure,onRight:t.onSuccess}):Sse(e,t)),oU=k(2,(e,t)=>Nn(e)?or(e,{onLeft:t,onRight:he}):eP(e,t)),nS=(e,t)=>t===void 0||Ws(t)?e:e===void 0?t:{...e,...t},Ace=(e,t,n)=>{const r=ln(e,t);return(i,s)=>r(i,nS(n,s))},lU=(e,t,n)=>{const r=Ace(e,t,n);return(i,s)=>sL(r(i,s),qC)},cU=(e,t,n)=>{const r=ln(e,t);return(i,s)=>r(i,{...nS(n,s),isEffectAllowed:!0})},uU=(e,t)=>lU(e.ast,!0,t),VC=(e,t)=>cU(e.ast,!0,t),rS=(e,t)=>cU(e.ast,!1,t),Oce=uU,KC=(e,t)=>lU(Ut(e.ast),!0,t),Rce=(e,t)=>{const n=ln(Ut(e.ast),!0);return(r,i)=>Vi(n(r,{exact:!0,...nS(t,i)}))},Nce=ge(Symbol.for("effect/ParseResult/decodeMemoMap"),()=>new WeakMap),Mce=ge(Symbol.for("effect/ParseResult/encodeMemoMap"),()=>new WeakMap),ln=(e,t)=>{const n=t?Nce:Mce,r=n.get(e);if(r)return r;const i=Dce(e,t),s=Lle(e),a=gt(s)?(c,f)=>i(c,nS(f,s.value)):i,o=Fle(e),l=t&>(o)?(c,f)=>Cd(oU(a(c,f),o.value),e,c,f):a;return n.set(e,l),l},G0=e=>qr(jle(e)),Y0=e=>qr(Ile(e)),Dce=(e,t)=>{switch(e._tag){case"Refinement":if(t){const n=ln(e.from,!0);return(r,i)=>{i=i??q0;const s=(i==null?void 0:i.errors)==="all",a=xi(oU(n(r,i),o=>{const l=new V0(e,r,"From",o);return s&&Ule(e)&&mU(o)?pt(e.filter(r,i,e),{onNone:()=>pe(l),onSome:c=>pe(new Dt(e,r,[l,new V0(e,r,"Predicate",c)]))}):pe(l)}),o=>pt(e.filter(o,i,e),{onNone:()=>he(o),onSome:l=>pe(new V0(e,r,"Predicate",l))}));return Cd(a,e,r,i)}}else{const n=ln(Ut(e),!0),r=ln(fU(e.from),!1);return(i,s)=>Cd(xi(n(i,s),a=>r(a,s)),e,i,s)}case"Transformation":{const n=Ice(e.transformation,t),r=t?ln(e.from,!0):ln(e.to,!1),i=t?ln(e.to,!0):ln(e.from,!1);return(s,a)=>Cd(xi(Zd(r(s,a),o=>new K0(e,s,t?"Encoded":"Type",o)),o=>xi(Zd(n(o,a??q0,e,s),l=>new K0(e,s,"Transformation",l)),l=>Zd(i(l,a),c=>new K0(e,s,t?"Type":"Encoded",c)))),e,s,a)}case"Declaration":{const n=t?e.decodeUnknown(...e.typeParameters):e.encodeUnknown(...e.typeParameters);return(r,i)=>Cd(n(r,i??q0,e),e,r,i)}case"Literal":return pr(e,n=>n===e.literal);case"UniqueSymbol":return pr(e,n=>n===e.symbol);case"UndefinedKeyword":return pr(e,f7);case"NeverKeyword":return pr(e,h7);case"UnknownKeyword":case"AnyKeyword":case"VoidKeyword":return he;case"StringKeyword":return pr(e,ri);case"NumberKeyword":return pr(e,Ws);case"BooleanKeyword":return pr(e,Th);case"BigIntKeyword":return pr(e,Jb);case"SymbolKeyword":return pr(e,N1);case"ObjectKeyword":return pr(e,Ci);case"Enums":return pr(e,n=>e.enums.some(([r,i])=>i===n));case"TemplateLiteral":{const n=xce(e);return pr(e,r=>ri(r)&&n.test(r))}case"TupleType":{const n=e.elements.map(c=>ln(c.type,t)),r=e.rest.map(c=>ln(c.type,t));let i=e.elements.filter(c=>!c.isOptional);e.rest.length>0&&(i=i.concat(e.rest.slice(1)));const s=i.length,a=e.elements.length>0?e.elements.map((c,f)=>f).join(" | "):"never",o=G0(e),l=Y0(e);return(c,f)=>{if(!QK(c))return pe(new dn(e,c));const u=(f==null?void 0:f.errors)==="all",d=[];let h=0;const g=[],v=c.length;for(let S=v;S<=s-1;S++){const _=new Rn(S,c,new ad(i[S-v]));if(u){d.push([h++,_]);continue}else return pe(new Dt(e,c,_,g))}if(e.rest.length===0)for(let S=e.elements.length;S<=v-1;S++){const _=new Rn(S,c,new MR(c[S],`is unexpected, expected: ${a}`));if(u){d.push([h++,_]);continue}else return pe(new Dt(e,c,_,g))}let x=0,m;for(;x<n.length;x++)if(v<x+1){if(e.elements[x].isOptional)continue}else{const S=n[x],_=S(c[x],f);if(Nn(_)){if(cn(_)){const C=new Rn(x,c,_.left);if(u){d.push([h++,C]);continue}else return pe(new Dt(e,c,C,ui(g)))}g.push([h++,_.right])}else{const C=h++,E=x;m||(m=[]),m.push(({es:A,output:M})=>ue(uc(_),D=>{if(cn(D)){const N=new Rn(E,c,D.left);return u?(A.push([C,N]),Fe):pe(new Dt(e,c,N,ui(M)))}return M.push([C,D.right]),Fe}))}}if(rn(r)){const[S,..._]=r;for(;x<v-_.length;x++){const C=S(c[x],f);if(Nn(C))if(cn(C)){const E=new Rn(x,c,C.left);if(u){d.push([h++,E]);continue}else return pe(new Dt(e,c,E,ui(g)))}else g.push([h++,C.right]);else{const E=h++,A=x;m||(m=[]),m.push(({es:M,output:D})=>ue(uc(C),N=>{if(cn(N)){const I=new Rn(A,c,N.left);return u?(M.push([E,I]),Fe):pe(new Dt(e,c,I,ui(D)))}else return D.push([E,N.right]),Fe}))}}for(let C=0;C<_.length;C++)if(x+=C,!(v<x+1)){const E=_[C](c[x],f);if(Nn(E)){if(cn(E)){const A=new Rn(x,c,E.left);if(u){d.push([h++,A]);continue}else return pe(new Dt(e,c,A,ui(g)))}g.push([h++,E.right])}else{const A=h++,M=x;m||(m=[]),m.push(({es:D,output:N})=>ue(uc(E),I=>{if(cn(I)){const $=new Rn(M,c,I.left);return u?(D.push([A,$]),Fe):pe(new Dt(e,c,$,ui(N)))}return N.push([A,I.right]),Fe}))}}}const b=({es:S,output:_})=>nu(S)?pe(new Dt(e,c,ui(S),ui(_))):he(ui(_));if(m&&m.length>0){const S=m;return jt(()=>{const _={es:Sd(d),output:Sd(g)};return ue(es(S,C=>C(_),{concurrency:o,batching:l,discard:!0}),()=>b(_))})}return b({output:g,es:d})}}case"TypeLiteral":{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return pr(e,m7);const n=[],r={},i=[];for(const f of e.propertySignatures)n.push([ln(f.type,t),f]),r[f.name]=null,i.push(f.name);const s=e.indexSignatures.map(f=>[ln(f.parameter,t),ln(f.type,t),f.parameter]),a=Sr.make(e.indexSignatures.map(f=>f.parameter).concat(i.map(f=>N1(f)?new Kle(f):new rb(f)))),o=ln(a,t),l=G0(e),c=Y0(e);return(f,u)=>{if(!g7(f))return pe(new dn(e,f));const d=(u==null?void 0:u.errors)==="all",h=[];let g=0;const v=(u==null?void 0:u.onExcessProperty)==="error",x=(u==null?void 0:u.onExcessProperty)==="preserve",m={};let b;if(v||x){b=Reflect.ownKeys(f);for(const E of b){const A=o(E,u);if(Nn(A)&&cn(A))if(v){const M=new Rn(E,f,new MR(f[E],`is unexpected, expected: ${String(a)}`));if(d){h.push([g++,M]);continue}else return pe(new Dt(e,f,M,m))}else m[E]=f[E]}}let S;const _=(u==null?void 0:u.exact)===!0;for(let E=0;E<n.length;E++){const A=n[E][1],M=A.name,D=Object.prototype.hasOwnProperty.call(f,M);if(!D){if(A.isOptional)continue;if(_){const $=new Rn(M,f,new ad(A));if(d){h.push([g++,$]);continue}else return pe(new Dt(e,f,$,m))}}const N=n[E][0],I=N(f[M],u);if(Nn(I)){if(cn(I)){const $=new Rn(M,f,D?I.left:new ad(A));if(d){h.push([g++,$]);continue}else return pe(new Dt(e,f,$,m))}m[M]=I.right}else{const $=g++,X=M;S||(S=[]),S.push(({es:Q,output:Y})=>ue(uc(I),z=>{if(cn(z)){const L=new Rn(X,f,D?z.left:new ad(A));return d?(Q.push([$,L]),Fe):pe(new Dt(e,f,L,Y))}return Y[X]=z.right,Fe}))}}for(let E=0;E<s.length;E++){const A=s[E],M=A[0],D=A[1],N=E5(f,A[2]);for(const I of N){const $=M(I,u);if(Nn($)&&Vi($)){const X=D(f[I],u);if(Nn(X))if(cn(X)){const Q=new Rn(I,f,X.left);if(d){h.push([g++,Q]);continue}else return pe(new Dt(e,f,Q,m))}else Object.prototype.hasOwnProperty.call(r,I)||(m[I]=X.right);else{const Q=g++,Y=I;S||(S=[]),S.push(({es:z,output:L})=>ue(uc(X),j=>{if(cn(j)){const ne=new Rn(Y,f,j.left);return d?(z.push([Q,ne]),Fe):pe(new Dt(e,f,ne,L))}else return Object.prototype.hasOwnProperty.call(r,I)||(L[I]=j.right),Fe}))}}}}const C=({es:E,output:A})=>{if(nu(E))return pe(new Dt(e,f,ui(E),A));if((u==null?void 0:u.propertyOrder)==="original"){const M=b||Reflect.ownKeys(f);for(const N of i)M.indexOf(N)===-1&&M.push(N);const D={};for(const N of M)Object.prototype.hasOwnProperty.call(A,N)&&(D[N]=A[N]);return he(D)}return he(A)};if(S&&S.length>0){const E=S;return jt(()=>{const A={es:Sd(h),output:Object.assign({},m)};return ue(es(E,M=>M(A),{concurrency:l,batching:c,discard:!0}),()=>C(A))})}return C({es:h,output:m})}}case"Union":{const n=zce(e.types,t),r=Reflect.ownKeys(n.keys),i=r.length,s=e.types.length,a=new Map;for(let c=0;c<s;c++)a.set(e.types[c],ln(e.types[c],t));const o=G0(e)??1,l=Y0(e);return(c,f)=>{const u=[];let d=0,h=[];if(i>0)if(Uk(c))for(let x=0;x<i;x++){const m=r[x],b=n.keys[m].buckets;if(Object.prototype.hasOwnProperty.call(c,m)){const S=String(c[m]);if(Object.prototype.hasOwnProperty.call(b,S))h=h.concat(b[S]);else{const{candidates:_,literals:C}=n.keys[m],E=Sr.make(C),A=_.length===s?new eo([new vn(m,E,!1,!0)],[]):Sr.make(_);u.push([d++,new Dt(A,c,new Rn(m,c,new dn(E,c[m])))])}}else{const{candidates:S,literals:_}=n.keys[m],C=new vn(m,Sr.make(_),!1,!0),E=S.length===s?new eo([C],[]):Sr.make(S);u.push([d++,new Dt(E,c,new Rn(m,c,new ad(C)))])}}else{const x=n.candidates.length===s?e:Sr.make(n.candidates);u.push([d++,new dn(x,c)])}n.otherwise.length>0&&(h=h.concat(n.otherwise));let g;for(let x=0;x<h.length;x++){const m=h[x],b=a.get(m)(c,f);if(Nn(b)&&(!g||g.length===0)){if(Vi(b))return b;u.push([d++,b.left])}else{const S=d++;g||(g=[]),g.push(_=>jt(()=>"finalResult"in _?Fe:ue(uc(b),C=>(Vi(C)?_.finalResult=C:_.es.push([S,C.left]),Fe))))}}const v=x=>nu(x)?x.length===1&&x[0][1]._tag==="Type"?pe(x[0][1]):pe(new Dt(e,c,ui(x))):pe(new dn(e,c));if(g&&g.length>0){const x=g;return jt(()=>{const m={es:Sd(u)};return ue(es(x,b=>b(m),{concurrency:o,batching:l,discard:!0}),()=>"finalResult"in m?m.finalResult:v(m.es))})}return v(u)}}case"Suspend":{const n=C5(()=>ln(e.f(),t));return(r,i)=>n()(r,i)}}},pr=(e,t)=>n=>t(n)?he(n):pe(new dn(e,n)),Ed=(e,t)=>{switch(e._tag){case"Declaration":{const n=G5(e);if(gt(n))return Ed(n.value,t);break}case"TypeLiteral":{const n=[];for(let r=0;r<e.propertySignatures.length;r++){const i=e.propertySignatures[r],s=t?ib(i.type):Ut(i.type);Wd(s)&&!i.isOptional&&n.push([i.name,s])}return n}case"TupleType":{const n=[];for(let r=0;r<e.elements.length;r++){const i=e.elements[r],s=t?ib(i.type):Ut(i.type);Wd(s)&&!i.isOptional&&n.push([r,s])}return n}case"Refinement":return Ed(e.from,t);case"Suspend":return Ed(e.f(),t);case"Transformation":return Ed(t?e.from:e.to,t)}return[]},zce=(e,t)=>{const n={},r=[],i=[];for(let s=0;s<e.length;s++){const a=e[s],o=Ed(a,t);if(o.length>0){i.push(a);for(let l=0;l<o.length;l++){const[c,f]=o[l],u=String(f.literal);n[c]=n[c]||{buckets:{},literals:[],candidates:[]};const d=n[c].buckets;if(Object.prototype.hasOwnProperty.call(d,u)){if(l<o.length-1)continue;d[u].push(a),n[c].literals.push(f),n[c].candidates.push(a)}else{d[u]=[a],n[c].literals.push(f),n[c].candidates.push(a);break}}}else r.push(a)}return{keys:n,otherwise:r,candidates:i}},fU=e=>du(e)?fU(e.from):e,Cd=(e,t,n,r)=>{if((r==null?void 0:r.isEffectAllowed)===!0||Nn(e))return e;const i=new WE,s=EC(e,{scheduler:i});i.flush();const a=s.unsafePoll();if(a){if(See(a))return he(a.value);const o=a.cause;return Jne(o)?pe(o.error):pe(new qw(t,n,ire(o)))}return pe(new qw(t,n,"cannot be be resolved synchronously, this is caused by using runSync on an effect that performs async work"))},jce=([e],[t])=>e>t?1:e<t?-1:0;function ui(e){return e.sort(jce).map(t=>t[1])}const Ice=(e,t)=>{switch(e._tag){case"FinalTransformation":return t?e.decode:e.encode;case"ComposeTransformation":return he;case"TypeLiteralTransformation":return n=>{let r=he(n);for(const i of e.propertySignatureTransformations){const[s,a]=t?[i.from,i.to]:[i.to,i.from],o=t?i.decode:i.encode;r=Sn(r,c=>{const f=o(Object.prototype.hasOwnProperty.call(c,s)?J(c[s]):q());return delete c[s],gt(f)&&(c[a]=f.value),c})}return r}}},Pn=(e,t=[])=>({value:e,forest:t}),eh={formatIssue:e=>Sn(kc(e),$ce),formatIssueSync:e=>{const t=eh.formatIssue(e);return Nn(t)?aL(t):ti(t)},formatError:e=>eh.formatIssue(e.issue),formatErrorSync:e=>eh.formatIssueSync(e.issue)},$ce=e=>e.value+dU(`
|
|
75
|
+
`,e.forest),dU=(e,t)=>{let n="";const r=t.length;let i;for(let s=0;s<r;s++){i=t[s];const a=s===r-1;n+=e+(a?"└":"├")+"─ "+i.value,n+=dU(e+(r>1&&!a?"│ ":" "),i.forest)}return n},Lce=e=>{switch(e){case"Encoded":return"Encoded side transformation failure";case"Transformation":return"Transformation process failure";case"Type":return"Type side transformation failure"}},Fce=e=>{switch(e){case"From":return"From side refinement failure";case"Predicate":return"Predicate refinement failure"}},hU=e=>"ast"in e?J(e.ast):q(),Vw=he(void 0),Pce=e=>hU(e).pipe(aa(Dle),pt({onNone:()=>Vw,onSome:t=>{const n=t(e);return ri(n)?he({message:n,override:!1}):Co(n)?Xe(n,r=>({message:r,override:!1})):ri(n.message)?he({message:n.message,override:n.override}):Xe(n.message,r=>({message:r,override:n.override}))}})),GC=e=>t=>t._tag===e,mU=GC("Composite"),zR=GC("Refinement"),jR=GC("Transformation"),to=e=>xi(Pce(e),t=>t!==void 0?!t.override&&(mU(e)||zR(e)&&e.kind==="From"||jR(e)&&e.kind!=="Transformation")?jR(e)||zR(e)?to(e.issue):Vw:he(t.message):Vw),pU=e=>hU(e).pipe(aa($le),fL(t=>t(e)),qr);function Uce(e){return K5(e).pipe(wi(()=>q5(e)),wi(()=>V5(e)),wi(()=>Xv(e)),ut(()=>`{ ${e.from} | filter }`))}function Bce(e){return e.message!==void 0?e.message:`Expected ${du(e.ast)?Uce(e.ast):String(e.ast)}, actual ${sa(e.actual)}`}const gU=e=>Sn(to(e),t=>t??pU(e)??Bce(e)),Mp=e=>pU(e)??String(e.ast),yU=e=>e.message??"is forbidden",bU=e=>e.message??"is unexpected",vU=e=>{const t=zle(e.ast);if(gt(t)){const n=t.value();return ri(n)?he(n):n}return he(e.message??"is missing")},kc=e=>{switch(e._tag){case"Type":return Sn(gU(e),Pn);case"Forbidden":return he(Pn(Mp(e),[Pn(yU(e))]));case"Unexpected":return he(Pn(bU(e)));case"Missing":return Sn(vU(e),Pn);case"Transformation":return xi(to(e),t=>t!==void 0?he(Pn(t)):Sn(kc(e.issue),n=>Pn(Mp(e),[Pn(Lce(e.kind),[n])])));case"Refinement":return xi(to(e),t=>t!==void 0?he(Pn(t)):Sn(kc(e.issue),n=>Pn(Mp(e),[Pn(Fce(e.kind),[n])])));case"Pointer":return Sn(kc(e.issue),t=>Pn(T5(e.path),[t]));case"Composite":return xi(to(e),t=>{if(t!==void 0)return he(Pn(t));const n=Mp(e);return FC(e.issues)?Sn(es(e.issues,kc),r=>Pn(n,r)):Sn(kc(e.issues),r=>Pn(n,[r]))})}},Fo=(e,t,n)=>({_tag:e,path:t,message:n}),xg={formatIssue:e=>Ec(e,void 0,[]),formatIssueSync:e=>{const t=xg.formatIssue(e);return Nn(t)?aL(t):ti(t)},formatError:e=>xg.formatIssue(e.issue),formatErrorSync:e=>xg.formatIssueSync(e.issue)},Ec=(e,t,n)=>{const r=e._tag;switch(r){case"Type":return Sn(gU(e),i=>[Fo(t??r,n,i)]);case"Forbidden":return he([Fo(r,n,yU(e))]);case"Unexpected":return he([Fo(r,n,bU(e))]);case"Missing":return Sn(vU(e),i=>[Fo(r,n,i)]);case"Pointer":return Ec(e.issue,void 0,n.concat(e.path));case"Composite":return xi(to(e),i=>i!==void 0?he([Fo(r,n,i)]):FC(e.issues)?Sn(es(e.issues,s=>Ec(s,void 0,n)),bL):Ec(e.issues,void 0,n));case"Refinement":return xi(to(e),i=>i!==void 0?he([Fo(r,n,i)]):Ec(e.issue,e.kind==="Predicate"?r:void 0,n));case"Transformation":return xi(to(e),i=>i!==void 0?he([Fo(r,n,i)]):Ec(e.issue,e.kind==="Transformation"?r:void 0,n))}},IR=_le,Hce=k(e=>Ci(e[0]),(e,...t)=>{const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}),SU=k(e=>Ci(e[0]),(e,...t)=>{const n={...e};for(const r of t)delete n[r];return n}),Yu=Symbol.for("effect/Schema");function dt(e){var t,n,r;return n=Yu,t=Yu,r=class{constructor(){y(this,n,Kw)}static annotations(s){return dt(ua(this.ast,s))}static pipe(){return ie(this,arguments)}static toString(){return String(e)}},y(r,"ast",e),y(r,"Type"),y(r,"Encoded"),y(r,"Context"),y(r,t,Kw),r}const Kw={_A:e=>e,_I:e=>e,_R:e=>e},$R={typeConstructor:Ole,schemaId:Rle,message:N5,missingMessage:PC,identifier:Hm,title:ji,description:Xl,examples:M5,default:D5,documentation:Nle,jsonSchema:z5,arbitrary:j5,pretty:I5,equivalence:$5,concurrency:L5,batching:F5,parseIssueTitle:P5,parseOptions:U5,decodingFallback:B5},Df=e=>{if(!e)return{};const t={...e};for(const n in $R)if(n in e){const r=$R[n];t[r]=e[n],delete t[n]}return t},ua=(e,t)=>Mf(e,Df(t));const qce=e=>String(e.ast),Vce=e=>dt(ib(e.ast)),di=e=>dt(Ut(e.ast)),od=(e,t)=>{const n=rS(e,t);return(r,i)=>Zd(n(r,i),qC)},Kce=(e,t)=>{const n=VC(e,t);return(r,i)=>Zd(n(r,i),qC)},Gce=Kce,Ri=e=>fe(e,Yu)&&Ci(e[Yu]);function Yce(e){return HC(e)?Sr.make(hce(e,t=>new rb(t))):new rb(e[0])}function xU(e,t=Yce(e)){var n;return n=class extends dt(t){static annotations(i){return xU(this.literals,ua(this.ast,i))}},y(n,"literals",[...e]),n}function us(...e){return rn(e)?xU(e):Jh}const Jce=(e,t,n)=>YC(e,new Wv(e.map(r=>r.ast),(...r)=>t.decode(...r.map(dt)),(...r)=>t.encode(...r.map(dt)),Df(n))),Qce=(e,t)=>{const n=()=>(i,s,a)=>e(i)?Yn(i):Fs(new dn(a,i)),r=n;return YC([],new Wv([],n,r,Df(t)))};function YC(e,t){var n;return n=class extends dt(t){static annotations(i){return YC(this.typeParameters,ua(this.ast,i))}},y(n,"typeParameters",[...e]),n}const zf=function(){if(Array.isArray(arguments[0])){const n=arguments[0],r=arguments[1],i=arguments[2];return Jce(n,r,i)}const e=arguments[0],t=arguments[1];return Qce(e,t)};class wU extends dt(Lw){}class Xce extends dt(Jle){}class _U extends dt(Vle){}class Jh extends dt(UC){}class iS extends dt(J5){}class Wce extends dt(ace){}class G extends dt(Fw){}class qm extends dt(Uw){}class ai extends dt(Bw){}const Zce=e=>Sr.make(e.map(t=>t.ast));function kU(e,t=Zce(e)){var n;return n=class extends dt(t){static annotations(i){return kU(this.members,ua(this.ast,i))}},y(n,"members",[...e]),n}function jf(...e){return HC(e)?kU(e):rn(e)?e[0]:Jh}const J0=e=>jf(e,_U),Td=e=>jf(e,wU),Q0=e=>jf(e,_U,wU),eue=(e,t)=>new BC(e.map(n=>Ri(n)?new Wl(n.ast,!1):n.ast),t.map(n=>Ri(n)?new Zv(n.ast):n.ast),!0);function ab(e,t,n=eue(e,t)){var r;return r=class extends dt(n){static annotations(s){return ab(this.elements,this.rest,ua(this.ast,s))}},y(r,"elements",[...e]),y(r,"rest",[...t]),r}function tue(...e){return Array.isArray(e[0])?ab(e[0],e.slice(1)):ab(e,[])}function EU(e,t){var n;return n=class extends ab([],[e],t){static annotations(i){return EU(this.value,ua(this.ast,i))}},y(n,"value",e),n}const gn=e=>EU(e),Gw=e=>e?'"?:"':'":"';class Ju extends Wl{constructor(n,r,i,s,a){super(n,r,s);y(this,"isReadonly");y(this,"defaultValue");y(this,"_tag","PropertySignatureDeclaration");this.isReadonly=i,this.defaultValue=a}toString(){const n=Gw(this.isOptional),r=String(this.type);return`PropertySignature<${n}, ${r}, never, ${n}, ${r}>`}}class CU extends Wl{constructor(n,r,i,s,a){super(n,r,s);y(this,"isReadonly");y(this,"fromKey");this.isReadonly=i,this.fromKey=a}}class sS extends Wl{constructor(n,r,i,s,a){super(n,r,s);y(this,"isReadonly");y(this,"defaultValue");this.isReadonly=i,this.defaultValue=a}}const nue=e=>e===void 0?"never":ri(e)?JSON.stringify(e):String(e);class aS{constructor(t,n,r,i){y(this,"from");y(this,"to");y(this,"decode");y(this,"encode");y(this,"_tag","PropertySignatureTransformation");this.from=t,this.to=n,this.decode=r,this.encode=i}toString(){return`PropertySignature<${Gw(this.to.isOptional)}, ${this.to.type}, ${nue(this.from.fromKey)}, ${Gw(this.from.isOptional)}, ${this.from.type}>`}}const TU=(e,t)=>{switch(e._tag){case"PropertySignatureDeclaration":return new Ju(e.type,e.isOptional,e.isReadonly,{...e.annotations,...t},e.defaultValue);case"PropertySignatureTransformation":return new aS(e.from,new sS(e.to.type,e.to.isOptional,e.to.isReadonly,{...e.to.annotations,...t},e.to.defaultValue),e.decode,e.encode)}},AU=Symbol.for("effect/PropertySignature"),JC=e=>fe(e,AU);var vz,Sz;Sz=Yu,vz=AU;const aA=class aA{constructor(t){y(this,"ast");y(this,Sz);y(this,vz,null);y(this,"_TypeToken");y(this,"_Key");y(this,"_EncodedToken");y(this,"_HasDefault");this.ast=t}pipe(){return ie(this,arguments)}annotations(t){return new aA(TU(this.ast,Df(t)))}toString(){return String(this.ast)}};let ob=aA;const lb=e=>new ob(e);class Vm extends ob{constructor(n,r){super(n);y(this,"from");this.from=r}annotations(n){return new Vm(TU(this.ast,Df(n)),this.from)}}const th=e=>new Vm(new Ju(e.ast,!1,!0,{},void 0),e),Gc=k(2,(e,t)=>{const n=e.ast;switch(n._tag){case"PropertySignatureDeclaration":return lb(new Ju(n.type,n.isOptional,n.isReadonly,n.annotations,t));case"PropertySignatureTransformation":return lb(new aS(n.from,new sS(n.to.type,n.to.isOptional,n.to.isReadonly,n.to.annotations,t),n.decode,n.encode))}}),ya=(e,t,n)=>lb(new aS(new CU(e.ast,!0,!0,{},void 0),new sS(t.ast,!1,!0,{},void 0),r=>J(n.decode(r)),aa(n.encode))),LR=(e,t,n)=>lb(new aS(new CU(e.ast,!0,!0,{},void 0),new sS(t.ast,!0,!0,{},void 0),n.decode,n.encode)),rue=(e,t)=>{const n=t==null?void 0:t.exact,r=t==null?void 0:t.default,i=t==null?void 0:t.nullable,s=(t==null?void 0:t.as)=="Option",a=t!=null&&t.onNoneEncoding?wi(t.onNoneEncoding):ce;if(n){if(r)return i?Gc(ya(J0(e),di(e),{decode:pt({onNone:r,onSome:o=>o===null?r():o}),encode:J}),r).ast:Gc(ya(e,di(e),{decode:pt({onNone:r,onSome:ce}),encode:J}),r).ast;if(s){const o=BR(di(e));return i?ya(J0(e),o,{decode:xc(p0),encode:a}).ast:ya(e,o,{decode:ce,encode:ce}).ast}else return i?LR(J0(e),di(e),{decode:xc(p0),encode:ce}).ast:new Ju(e.ast,!0,!0,{},void 0)}else{if(r)return i?Gc(ya(Q0(e),di(e),{decode:pt({onNone:r,onSome:o=>o??r()}),encode:J}),r).ast:Gc(ya(Td(e),di(e),{decode:pt({onNone:r,onSome:o=>o===void 0?r():o}),encode:J}),r).ast;if(s){const o=BR(di(e));return i?ya(Q0(e),o,{decode:xc(l=>l!=null),encode:a}).ast:ya(Td(e),o,{decode:xc(d7),encode:a}).ast}else return i?LR(Q0(e),Td(di(e)),{decode:xc(p0),encode:ce}).ast:new Ju(Td(e).ast,!0,!0,{},void 0)}},Tt=e=>{const t=e.ast===Lw||e.ast===UC?Lw:Td(e).ast;return new Vm(new Ju(t,!0,!0,{},void 0),e)},iue=k(e=>Ri(e[0]),(e,t)=>new Vm(rue(e,t),e)),sue=iU([PC]),aue=(e,t)=>{const n=Reflect.ownKeys(e),r=[];if(n.length>0){const s=[],a=[],o=[];for(let l=0;l<n.length;l++){const c=n[l],f=e[c];if(JC(f)){const u=f.ast;switch(u._tag){case"PropertySignatureDeclaration":{const d=u.type,h=u.isOptional,g=u.annotations;s.push(new vn(c,d,h,!0,sue(u))),a.push(new vn(c,Ut(d),h,!0,g)),r.push(new vn(c,d,h,!0,g));break}case"PropertySignatureTransformation":{const d=u.from.fromKey??c;s.push(new vn(d,u.from.type,u.from.isOptional,!0,u.from.annotations)),a.push(new vn(c,u.to.type,u.to.isOptional,!0,u.to.annotations)),o.push(new yce(d,c,u.decode,u.encode));break}}}else s.push(new vn(c,f.ast,!1,!0)),a.push(new vn(c,Ut(f.ast),!1,!0)),r.push(new vn(c,f.ast,!1,!0))}if(rn(o)){const l=[],c=[];for(const f of t){const{indexSignatures:u,propertySignatures:d}=NR(f.key.ast,f.value.ast);d.forEach(h=>{s.push(h),a.push(new vn(h.name,Ut(h.type),h.isOptional,h.isReadonly,h.annotations))}),u.forEach(h=>{l.push(h),c.push(new eS(h.parameter,Ut(h.type),h.isReadonly))})}return new tl(new eo(s,l,{[fu]:"Struct (Encoded side)"}),new eo(a,c,{[fu]:"Struct (Type side)"}),new Hw(o))}}const i=[];for(const s of t){const{indexSignatures:a,propertySignatures:o}=NR(s.key.ast,s.value.ast);o.forEach(l=>r.push(l)),a.forEach(l=>i.push(l))}return new eo(r,i)},OU=(e,t)=>{const n=Reflect.ownKeys(e);for(const r of n){const i=e[r];if(t[r]===void 0&&JC(i)){const s=i.ast,a=s._tag==="PropertySignatureDeclaration"?s.defaultValue:s.to.defaultValue;a!==void 0&&(t[r]=a())}}return t};function RU(e,t,n=aue(e,t)){var r;return r=class extends dt(n){static annotations(s){return RU(this.fields,this.records,ua(this.ast,s))}static pick(...s){return Je(Hce(e,...s))}static omit(...s){return Je(SU(e,...s))}},y(r,"fields",{...e}),y(r,"records",[...t]),y(r,"make",(s,a)=>{const o=OU(e,{...s});return eT(a)?o:KC(r)(o)}),r}function Je(e,...t){return RU(e,t)}const oue=e=>us(e).pipe(th,Gc(()=>e)),lue=(e,t)=>Je({_tag:oue(e),...t});function NU(e,t){var n;return n=class extends dt(t){static annotations(i){return NU(this.from,ua(this.ast,i))}},y(n,"make",(i,s)=>eT(s)?i:KC(n)(i)),y(n,"from",e),n}const Km=(e,t)=>n=>{const r=pt(H5(n.ast),{onNone:()=>[e],onSome:s=>[...s,e]}),i=Mf(n.ast,Df({[R5]:r,...t}));return NU(n,i)},ld=(e,t,n)=>{if(OR(e)&&OR(t)){const r=[...e.propertySignatures];for(const i of t.propertySignatures){const s=i.name,a=r.findIndex(o=>o.name===s);if(a===-1)r.push(i);else{const{isOptional:o,type:l}=r[a];r[a]=new vn(s,cb(l,i.type,n.concat(s)),o,!0)}}return new eo(r,e.indexSignatures.concat(t.indexSignatures))}throw new Error(A5(e,t,n))},cue=wce([Hm]),cd=(e,t)=>t.map(n=>new Z5(n,e.filter,cue(e))),cb=(e,t,n)=>Sr.make(ks([e],[t],n)),Po=e=>tS(e)?e.types:[e],ks=(e,t,n)=>yy(e,r=>yy(t,i=>{switch(i._tag){case"Literal":{if(ri(i.literal)&&Pw(r)||Ws(i.literal)&&CR(r)||Th(i.literal)&&TR(r))return[i];break}case"StringKeyword":{if(i===Fw){if(Pw(r)||Wd(r)&&ri(r.literal))return[r];if(du(r))return cd(r,ks(Po(r.from),[i],n))}else if(r===Fw)return[i];break}case"NumberKeyword":{if(i===Uw){if(CR(r)||Wd(r)&&Ws(r.literal))return[r];if(du(r))return cd(r,ks(Po(r.from),[i],n))}else if(r===Uw)return[i];break}case"BooleanKeyword":{if(i===Bw){if(TR(r)||Wd(r)&&Th(r.literal))return[r];if(du(r))return cd(r,ks(Po(r.from),[i],n))}else if(r===Bw)return[i];break}case"Union":return ks(Po(r),i.types,n);case"Suspend":return[new Yh(()=>cb(r,i.f(),n))];case"Refinement":return cd(i,ks(Po(r),Po(i.from),n));case"TypeLiteral":{switch(r._tag){case"Union":return ks(r.types,[i],n);case"Suspend":return[new Yh(()=>cb(r.f(),i,n))];case"Refinement":return cd(r,ks(Po(r.from),[i],n));case"TypeLiteral":return[ld(r,i,n)];case"Transformation":{const s=r.transformation,a=ld(r.from,i,n),o=ld(r.to,Ut(i),n);switch(s._tag){case"TypeLiteralTransformation":return[new tl(a,o,new Hw(s.propertySignatureTransformations))];case"ComposeTransformation":return[new tl(a,o,tU)];case"FinalTransformation":return[new tl(a,o,new eU((l,c,f,u)=>Sn(s.decode(l,c,f,u),d=>({...l,...d})),(l,c,f,u)=>Sn(s.encode(l,c,f,u),d=>({...l,...d}))))]}}}break}case"Transformation":{if(mce(r)){if(RR(i.transformation)&&RR(r.transformation))return[new tl(ld(r.from,i.from,n),ld(r.to,i.to,n),new Hw(i.transformation.propertySignatureTransformations.concat(r.transformation.propertySignatureTransformations)))]}else return ks([i],[r],n);break}}throw new Error(A5(r,i,n))})),MU=k(2,(e,t)=>dt(cb(e.ast,t.ast,[]))),nl=k(e=>Ri(e[1]),(e,t)=>QC(e,t,kce(e.ast,t.ast))),uue=e=>dt(new Yh(()=>e().ast)),fue=Symbol.for("effect/SchemaId/Refine");function QC(e,t,n){var r;return r=class extends dt(n){static annotations(s){return QC(this.from,this.to,ua(this.ast,s))}},y(r,"from",e),y(r,"to",t),r}const Dl=k(e=>Ri(e[0])&&Ri(e[1]),(e,t,n)=>QC(e,t,new tl(e.ast,t.ast,new eU(n.decode,n.encode)))),Zl=k(e=>Ri(e[0])&&Ri(e[1]),(e,t,n)=>Dl(e,t,{strict:!0,decode:(r,i,s,a)=>Yn(n.decode(r,a)),encode:(r,i,s,a)=>Yn(n.encode(r,a))})),FR=e=>e instanceof Error?e.message:String(e),due=e=>Dl(G.annotations({description:"a string to be decoded into JSON"}),iS,{strict:!0,decode:(t,n,r)=>sb({try:()=>JSON.parse(t,e==null?void 0:e.reviver),catch:i=>new dn(r,t,FR(i))}),encode:(t,n,r)=>sb({try:()=>JSON.stringify(t,e==null?void 0:e.replacer,e==null?void 0:e.space),catch:i=>new dn(r,t,FR(i))})}).annotations({title:"parseJson",schemaId:qle}),DU=(e,t)=>Ri(e)?nl(DU(t),e):due(e),hue=(e,t)=>{const n=Symbol.keyFor(e);return n===void 0?Fs(new dn(t,e,`Unable to encode a unique symbol ${String(e)} into a string`)):Yn(n)},mue=e=>Yn(Symbol.for(e)),zU=(e,t,n,r)=>Tce(e,{onFailure:i=>new Dt(n,r,i),onSuccess:t});class pue extends zf(p7,{typeConstructor:{_tag:"Uint8Array"},identifier:"Uint8ArrayFromSelf",pretty:()=>t=>`new Uint8Array(${JSON.stringify(Array.from(t))})`,arbitrary:()=>t=>t.uint8Array(),equivalence:()=>sv(oe)}){}const PR=Ale;class Qh extends zf(M$,{typeConstructor:{_tag:"Date"},identifier:"DateFromSelf",schemaId:PR,[PR]:{noInvalidDate:!1},description:"a potentially invalid Date instance",pretty:()=>t=>`new Date(${JSON.stringify(t)})`,arbitrary:()=>t=>t.date({noInvalidDate:!1}),equivalence:()=>yK}){}class Yw extends Zl(G.annotations({description:"a string to be decoded into a Date"}),Qh,{strict:!0,decode:t=>new Date(t),encode:t=>L$(t)}).annotations({identifier:"DateFromString"}){}const gue=e=>e._tag==="None"?q():J(e.value),yue=(e,t)=>n=>n.oneof(t,n.record({_tag:n.constant("None")}),n.record({_tag:n.constant("Some"),value:e(n)})).map(gue),bue=e=>pt({onNone:()=>"none()",onSome:t=>`some(${e(t)})`}),UR=e=>(t,n,r)=>MK(t)?Ct(t)?Yn(q()):zU(e(t.value,n),J,r,t):Fs(new dn(r,t)),BR=e=>zf([e],{decode:t=>UR(VC(t)),encode:t=>UR(rS(t))},{typeConstructor:{_tag:"effect/Option"},pretty:bue,arbitrary:yue,equivalence:LK}),vue=(e,t)=>n=>{const r=n.array(e(n));return(t.depthIdentifier!==void 0?n.oneof(t,n.constant([]),r):r).map(Zs)},Sue=e=>t=>`Chunk(${Qn(t).map(e).join(", ")})`,HR=e=>(t,n,r)=>av(t)?ov(t)?Yn(sn()):zU(e(Qn(t),n),Zs,r,t):Fs(new dn(r,t)),xue=e=>zf([e],{decode:t=>HR(VC(gn(t))),encode:t=>HR(rS(gn(t)))},{typeConstructor:{_tag:"effect/Chunk"},description:`Chunk<${qce(e)}>`,pretty:Sue,arbitrary:vue,equivalence:wL});function jU(e){return Zl(gn(e),xue(di(e)),{strict:!0,decode:t=>t.length===0?sn():Zs(t),encode:t=>Qn(t)})}const wue=e=>Ri(e)||JC(e),IU=e=>Reflect.ownKeys(e).every(t=>wue(e[t])),XC=e=>"fields"in e?e.fields:XC(e[fue]),WC=e=>IU(e)?Je(e):Ri(e)?e:Je(XC(e)),ZC=e=>IU(e)?e:XC(e),oS=e=>(t,n)=>nh({kind:"Class",identifier:e,schema:WC(t),fields:ZC(t),Base:pC,annotations:n}),_ue=e=>Gc(th(us(e)),()=>e),$U=e=>(t,n,r)=>{class i extends gC{}i.prototype.name=t;const s=ZC(n),a=WC(n),o={_tag:_ue(t)},l=wg(o,s),c="message"in l;class f extends nh({kind:"TaggedError",identifier:t,schema:MU(a,Je(o)),fields:l,Base:i,annotations:r,disableToString:!0}){}return y(f,"_tag",t),c||Object.defineProperty(f.prototype,"message",{get(){return`{ ${Reflect.ownKeys(s).map(u=>`${Wb(u)}: ${sa(this[u])}`).join(", ")} }`},enumerable:!1,configurable:!0}),f},wg=(e,t)=>{const n={...e};for(const r of Reflect.ownKeys(t)){if(r in e)throw new Error(O5(r));n[r]=t[r]}return n};function eT(e){return Th(e)?e:(e==null?void 0:e.disableValidation)??!1}const qR=ge("effect/Schema/astCache",()=>new WeakMap),kue=e=>e===void 0?[]:Array.isArray(e)?e:[e],nh=({Base:e,annotations:t,disableToString:n,fields:r,identifier:i,kind:s,schema:a})=>{var S,_;const o=Symbol.for(`effect/Schema/${s}/${i}`),[l,c,f]=kue(t),u=di(a),d=u.annotations({identifier:i,...l}),h=u.annotations({[fu]:`${i} (Type side)`,...l}),g=a.annotations({[fu]:`${i} (Constructor)`,...l}),v=a.annotations({[fu]:`${i} (Encoded side)`,...f}),x=a.annotations({...f,...l,...c}),m=C=>fe(C,o)&&Rce(h)(C),b=(_=class extends e{constructor(C={},E=!1){C={...C},s!=="Class"&&delete C._tag,C=OU(r,C),eT(E)||(C=KC(g)(C)),super(C,!0)}static get ast(){let C=qR.get(this);if(C)return C;const E=zf([a],{decode:()=>(A,M,D)=>A instanceof this||m(A)?Yn(A):Fs(new dn(D,A)),encode:()=>(A,M)=>A instanceof this?Yn(A):Sn(rS(h)(A,M),D=>new this(D,!0))},{identifier:i,pretty:A=>M=>`${i}(${A(M)})`,arbitrary:A=>M=>A(M).map(D=>new this(D)),equivalence:ce,[nb]:d.ast,...l});return C=Zl(v,E,{strict:!0,decode:A=>new this(A,!0),encode:ce}).annotations({[nb]:x.ast,...c}).ast,qR.set(this,C),C}static pipe(){return ie(this,arguments)}static annotations(C){return dt(this.ast).annotations(C)}static toString(){return`(${String(v)} <-> ${i})`}static make(...C){return new this(...C)}static extend(C){return(E,A)=>{const M=ZC(E),D=WC(E),N=wg(r,M);return nh({kind:s,identifier:C,schema:MU(a,D),fields:N,Base:this,annotations:A})}}static transformOrFail(C){return(E,A,M)=>{const D=wg(r,E);return nh({kind:s,identifier:C,schema:Dl(a,di(Je(D)),A),fields:D,Base:this,annotations:M})}}static transformOrFailFrom(C){return(E,A,M)=>{const D=wg(r,E);return nh({kind:s,identifier:C,schema:Dl(Vce(a),Je(D),A),fields:D,Base:this,annotations:M})}}get[(S=Yu,o)](){return o}},y(_,S,Kw),y(_,"fields",{...r}),y(_,"identifier",i),_);return n!==!0&&Object.defineProperty(b.prototype,"toString",{value(){return`${i}({ ${Reflect.ownKeys(r).map(C=>`${Wb(C)}: ${sa(this[C])}`).join(", ")} })`},configurable:!0,writable:!0}),b},VR=lue("symbol",{key:G}).annotations({description:"an object to be decoded into a globally shared symbol"}),Eue=Dl(VR,Wce,{strict:!0,decode:e=>mue(e.key),encode:(e,t,n)=>Sn(hue(e,n),r=>VR.make({key:r}))});class Cue extends jf(G,qm,Eue).annotations({identifier:"PropertyKey"}){}class Tue extends Je({_tag:th(us("Pointer","Unexpected","Missing","Composite","Refinement","Transformation","Type","Forbidden")).annotations({description:"The tag identifying the type of parse issue"}),path:th(gn(Cue)).annotations({description:"The path to the property where the issue occurred"}),message:th(G).annotations({description:"A descriptive message explaining the issue"})}).annotations({identifier:"ArrayFormatterIssue",description:"Represents an issue returned by the ArrayFormatter formatter"}){}const LU=(e,t)=>{class n extends gC{constructor(){super(...arguments);y(this,"_tag",t)}}return n.prototype[e]=e,n.prototype.name=t,n},Aue=ki,Oue=Rf,Rue=i5,Nue=NC,KR=MC,Mue=koe,FU=Symbol.for("effect/Subscribable"),PU=e=>fe(e,FU),Due="effect/SubscriptionRef",zue=Symbol.for(Due),jue=k(2,(e,t)=>O(qZ(e.ref,t),CC(_ae(e.pubsub,t)),e.semaphore.withPermits(1))),Jw=zue,GR=jue,Iue="~effect-atom/atom/Result",lS={[Iue]:{E:ce,A:ce},pipe(){return ie(this,arguments)},[ve](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case"Initial":return!0;case"Success":return oe(this.value,e.value);case"Failure":return oe(this.cause,e.cause)}},[be](){const e=vt(`${this._tag}:${this.waiting}`);return this._tag==="Initial"?rt(this,e):rt(this,Se(e)(this._tag==="Success"?re(this.value):re(this.cause)))}},UU=(e,t)=>e._tag==="Success"?zl(e.value):Gm(e.cause,{previous:t}),tT=e=>e._tag==="None"?no(!0):cS(e.value),YR=e=>e._tag==="Initial",$ue=e=>e._tag!=="Initial",no=(e=!1)=>{const t=Object.create(lS);return t._tag="Initial",t.waiting=e,t},Qu=e=>e._tag==="Success",zl=(e,t)=>{const n=Object.create(lS);return n._tag="Success",n.value=e,n.waiting=(t==null?void 0:t.waiting)??!1,n.timestamp=(t==null?void 0:t.timestamp)??Date.now(),n},Ad=e=>e._tag==="Failure",Lue=(e,t)=>{const n=Object.create(lS);return n._tag="Failure",n.cause=e,n.previousSuccess=(t==null?void 0:t.previousSuccess)??q(),n.waiting=(t==null?void 0:t.waiting)??!1,n},Gm=(e,t)=>Lue(e,{previousSuccess:aa(t.previous,n=>Qu(n)?J(n):Ad(n)?n.previousSuccess:q()),waiting:t.waiting}),Fue=(e,t)=>Gm(S4(e),t),cS=(e,t)=>{if(e.waiting)return t!=null&&t.touch?Pue(e):e;const n=Object.assign(Object.create(lS),e);return n.waiting=!0,n},Pue=e=>Qu(e)?zl(e.value,{waiting:e.waiting}):e,Od=(e,t)=>e._tag==="Failure"?Gm(e.cause,{previous:t,waiting:e.waiting}):e,BU=e=>e._tag==="Success"?J(e.value):e._tag==="Failure"?Gn(e.previousSuccess,t=>t.value):q(),Qw=e=>uL(BU(e),()=>new Af("Result.getOrThrow: no value found")),JR=e=>{switch(e._tag){case"Success":return _r(e.value);case"Failure":return zn(e.cause);default:return $y(new Af)}},ub=e=>new Uue(e);class Uue{constructor(t){y(this,"result");y(this,"output",q());this.result=t}when(t,n){if(Ct(this.output)&&t(this.result)){const r=n(this.result);gt(r)&&(this.output=r)}return this}pipe(){return ie(this,arguments)}onWaiting(t){return this.when(n=>n.waiting,n=>J(t(n)))}onInitialOrWaiting(t){return this.when(n=>YR(n)||n.waiting,n=>J(t(n)))}onInitial(t){return this.when(YR,n=>J(t(n)))}onSuccess(t){return this.when(Qu,n=>J(t(n.value,n)))}onFailure(t){return this.when(Ad,n=>J(t(n.cause,n)))}onError(t){return this.onErrorIf(R1,t)}onErrorIf(t,n){return this.when(Ad,r=>Zne(r.cause).pipe(xc(t),Gn(i=>n(i,r))))}onErrorTag(t,n){return this.onErrorIf(r=>fe(r,"_tag")&&(Array.isArray(t)?t.includes(r._tag):r._tag===t),n)}onDefect(t){return this.when(Ad,n=>tre(n.cause).pipe(Gn(r=>t(r,n))))}orElse(t){return ut(this.output,t)}orNull(){return zK(this.output)}render(){if(gt(this.output))return this.output.value;if(Ad(this.result))throw w4(this.result.cause);return null}}const Bue={immediate:!0},X0="~effect-atom/atom/Registry",Hue=e=>new que(e==null?void 0:e.initialValues,e==null?void 0:e.scheduleTask,e==null?void 0:e.timeoutResolution,e==null?void 0:e.defaultIdleTTL),Xw="~effect-atom/atom/Atom/Serializable",ud=e=>Xw in e?e[Xw].key:e;var xz,rl;xz=X0;class que{constructor(t,n=s=>queueMicrotask(s),r,i){y(this,"scheduleTask");y(this,"defaultIdleTTL");y(this,xz);y(this,"timeoutResolution");y(this,"nodes",new Map);y(this,"preloadedSerializable",new Map);y(this,"timeoutBuckets",new Map);y(this,"nodeTimeoutBucket",new Map);y(this,"disposed",!1);y(this,"refresh",t=>{t.refresh!==void 0?t.refresh(this.refresh):this.invalidateAtom(t)});y(this,"invalidateAtom",t=>{this.ensureNode(t).invalidate()});NS(this,rl,null);if(this.scheduleTask=n,this.defaultIdleTTL=i,this[X0]=X0,r===void 0&&i!==void 0?this.timeoutResolution=Math.round(i/2):this.timeoutResolution=r??1e3,t!==void 0)for(const[s,a]of t)this.ensureNode(s).setValue(a)}getNodes(){return this.nodes}get(t){return this.ensureNode(t).value()}set(t,n){t.write(this.ensureNode(t).writeContext,n)}setSerializable(t,n){this.preloadedSerializable.set(t,n)}modify(t,n){const r=this.ensureNode(t),i=n(r.value());return t.write(r.writeContext,i[1]),i[0]}update(t,n){const r=this.ensureNode(t);t.write(r.writeContext,n(r.value()))}subscribe(t,n,r){const i=this.ensureNode(t);r!=null&&r.immediate&&n(i.value());const s=i.subscribe(function(){n(i._value)});return()=>{s(),i.canBeRemoved&&this.scheduleNodeRemoval(i)}}mount(t){return this.subscribe(t,Ou,Bue)}atomHasTtl(t){return!t.keepAlive&&t.idleTTL!==0&&(t.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(t){const n=ud(t);let r=this.nodes.get(n);if(r===void 0?(r=this.createNode(t),this.nodes.set(n,r)):this.atomHasTtl(t)&&this.removeNodeTimeout(r),typeof n=="string"&&this.preloadedSerializable.has(n)){const i=this.preloadedSerializable.get(n);this.preloadedSerializable.delete(n);const s=t[Xw].decode(i);r.setValue(s)}return r}createNode(t){if(this.disposed)throw new Error(`Cannot access Atom ${t}: registry is disposed`);return t.keepAlive||this.scheduleAtomRemoval(t),new Vue(this,t)}scheduleAtomRemoval(t){this.scheduleTask(()=>{const n=this.nodes.get(ud(t));n!==void 0&&n.canBeRemoved&&this.removeNode(n)})}scheduleNodeRemoval(t){this.scheduleTask(()=>{t.canBeRemoved&&this.removeNode(t)})}removeNode(t){this.atomHasTtl(t.atom)?this.setNodeTimeout(t):(this.nodes.delete(ud(t.atom)),t.remove())}setNodeTimeout(t){if(this.nodeTimeoutBucket.has(t))return;let n=t.atom.idleTTL??this.defaultIdleTTL;if(rp(this,rl)!==null&&(n-=rp(this,rl),n<=0)){this.nodes.delete(ud(t.atom)),t.remove();return}const r=Math.ceil(n/this.timeoutResolution)*this.timeoutResolution,i=Date.now()+r,s=i-i%this.timeoutResolution+this.timeoutResolution;let a=this.timeoutBuckets.get(s);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(s),s-Date.now())],this.timeoutBuckets.set(s,a)),a[0].add(t),this.nodeTimeoutBucket.set(t,s)}removeNodeTimeout(t){const n=this.nodeTimeoutBucket.get(t);if(n===void 0)return;this.nodeTimeoutBucket.delete(t),this.scheduleNodeRemoval(t);const[r,i]=this.timeoutBuckets.get(n);r.delete(t),r.size===0&&(clearTimeout(i),this.timeoutBuckets.delete(n))}sweepBucket(t){const n=this.timeoutBuckets.get(t)[0];this.timeoutBuckets.delete(t),n.forEach(r=>{r.canBeRemoved&&(this.nodeTimeoutBucket.delete(r),this.nodes.delete(ud(r.atom)),ip(this,rl,r.atom.idleTTL??this.defaultIdleTTL),r.remove(),ip(this,rl,null))})}reset(){this.timeoutBuckets.forEach(([,t])=>clearTimeout(t)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear(),this.nodes.forEach(t=>t.remove()),this.nodes.clear()}dispose(){this.disposed=!0,this.reset()}}rl=new WeakMap;var Yc;(function(e){e[e.alive=1]="alive",e[e.initialized=2]="initialized",e[e.waitingForValue=4]="waitingForValue"})(Yc||(Yc={}));var gi;(function(e){e[e.uninitialized=5]="uninitialized",e[e.stale=7]="stale",e[e.valid=3]="valid",e[e.removed=0]="removed"})(gi||(gi={}));let Vue=class{constructor(t,n){y(this,"registry");y(this,"atom");y(this,"state",gi.uninitialized);y(this,"lifetime");y(this,"writeContext");y(this,"parents",[]);y(this,"previousParents");y(this,"children",[]);y(this,"listeners",[]);y(this,"skipInvalidation",!1);y(this,"_value");this.registry=t,this.atom=n,this.writeContext=new Jue(t,this)}get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.length===0&&this.children.length===0&&this.state!==0}value(){if(this.state&Yc.waitingForValue){this.lifetime=Yue(this);const t=this.atom.read(this.lifetime);if(this.state&Yc.waitingForValue&&this.setValue(t),this.previousParents){const n=this.previousParents;this.previousParents=void 0;for(let r=0;r<n.length;r++)n[r].removeChild(this),n[r].canBeRemoved&&this.registry.scheduleNodeRemoval(n[r])}}return this._value}valueOption(){return this.state&Yc.initialized?J(this._value):q()}setValue(t){if(!(this.state&Yc.initialized)){this.state=gi.valid,this._value=t,Pt.phase===Yi.collect?Pt.notify.add(this):this.notify();return}this.state=gi.valid,!oe(this._value,t)&&(this._value=t,this.skipInvalidation?this.skipInvalidation=!1:this.invalidateChildren(),this.listeners.length>0&&(Pt.phase===Yi.collect?Pt.notify.add(this):this.notify()))}addParent(t){if(this.parents.push(t),this.previousParents!==void 0){const n=this.previousParents.indexOf(t);n!==-1&&(this.previousParents[n]=this.previousParents[this.previousParents.length-1],this.previousParents.pop()===void 0&&(this.previousParents=void 0))}t.children.indexOf(this)===-1&&(t.children.push(this),t.skipInvalidation&&(t.skipInvalidation=!1))}removeChild(t){const n=this.children.indexOf(t);n!==-1&&(this.children[n]=this.children[this.children.length-1],this.children.pop())}invalidate(){this.state===gi.valid&&(this.state=gi.stale,this.disposeLifetime()),Pt.phase===Yi.collect?Pt.stale.push(this):this.atom.lazy&&this.listeners.length===0&&!Kue(this.children)?(this.invalidateChildren(),this.skipInvalidation=!0):this.value()}invalidateChildren(){if(this.children.length===0)return;const t=this.children;this.children=[];for(let n=0;n<t.length;n++)t[n].invalidate()}notify(){for(let t=0;t<this.listeners.length;t++)this.listeners[t]();Pt.phase===Yi.commit&&Pt.notify.delete(this)}disposeLifetime(){this.lifetime!==void 0&&(this.lifetime.dispose(),this.lifetime=void 0),this.parents.length!==0&&(this.previousParents=this.parents,this.parents=[])}remove(){if(this.state=gi.removed,this.listeners=[],this.lifetime===void 0||(this.disposeLifetime(),this.previousParents===void 0))return;const t=this.previousParents;this.previousParents=void 0;for(let n=0;n<t.length;n++)t[n].removeChild(this),t[n].canBeRemoved&&this.registry.removeNode(t[n])}subscribe(t){return this.listeners.push(t),()=>{const n=this.listeners.indexOf(t);n!==-1&&(this.listeners[n]=this.listeners[this.listeners.length-1],this.listeners.pop())}}};function Kue(e){if(e.length===0)return!1;let t=e,n,r=0;for(;t!==void 0;){for(let i=0,s=t.length;i<s;i++){const a=t[i];if(!a.atom.lazy||a.listeners.length>0)return!0;a.children.length>0&&(n===void 0?n=[a.children]:n.push(a.children))}t=n==null?void 0:n[r++]}return!1}const yn=e=>new Error(`Cannot use context of disposed Atom: ${e}`),Gue={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)throw yn(this.node.atom);this.finalizers??(this.finalizers=[]),this.finalizers.push(e)},get(e){if(this.disposed)throw yn(this.node.atom);const t=this.node.registry.ensureNode(e);return this.node.addParent(t),t.value()},result(e,t){if(this.disposed)throw yn(this.node.atom);if(this.isFn)return this.resultOnce(e,t);const n=this.get(e);if(t!=null&&t.suspendOnWaiting&&n.waiting)return R0;switch(n._tag){case"Initial":return R0;case"Failure":return zn(n.cause);case"Success":return St(n.value)}},resultOnce(e,t){if(this.disposed)throw yn(this.node.atom);return Tw(n=>{const r=this.once(e);if(r._tag!=="Initial"&&!(t!=null&&t.suspendOnWaiting&&r.waiting))return n(JR(r));const i=this.node.registry.subscribe(e,s=>{s._tag==="Initial"||t!=null&&t.suspendOnWaiting&&s.waiting||(i(),n(JR(s)))},{immediate:!1});return lt(i)})},setResult(e,t){if(this.disposed)throw yn(this.node.atom);return this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0})},some(e){if(this.disposed)throw yn(this.node.atom);if(this.isFn)return this.someOnce(e);const t=this.get(e);return t._tag==="None"?R0:St(t.value)},someOnce(e){if(this.disposed)throw yn(this.node.atom);return Tw(t=>{const n=this.once(e);if(gt(n))return t(St(n.value));const r=this.node.registry.subscribe(e,i=>{Ct(i)||(r(),t(St(i.value)))},{immediate:!1});return lt(r)})},once(e){if(this.disposed)throw yn(this.node.atom);return this.node.registry.get(e)},self(){if(this.disposed)throw yn(this.node.atom);return this.node.valueOption()},refresh(e){if(this.disposed)throw yn(this.node.atom);this.node.registry.refresh(e)},refreshSelf(){if(this.disposed)throw yn(this.node.atom);this.node.invalidate()},mount(e){if(this.disposed)throw yn(this.node.atom);this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){if(this.disposed)throw yn(this.node.atom);this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){if(this.disposed)throw yn(this.node.atom);this.node.setValue(e)},set(e,t){if(this.disposed)throw yn(this.node.atom);this.node.registry.set(e,t)},stream(e,t){if(this.disposed)throw yn(this.node.atom);return O(Qy(yP((t==null?void 0:t.bufferSize)??16),eb),sP(n=>Qy(lt(()=>this.node.registry.subscribe(e,r=>{Tae(n,r)},{immediate:(t==null?void 0:t.withoutInitialValue)!==!0})),r=>lt(r))),Xe(n=>dle(n)),S5)},streamResult(e,t){return O(this.stream(e,t),ule($ue),fle(n=>n._tag==="Success"?ple(n.value):cle(n.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;const e=this.finalizers;this.finalizers=void 0;for(let t=e.length-1;t>=0;t--)e[t]()}},Yue=e=>{function t(n){if(t.disposed)throw yn(n);if(t.isFn)return e.registry.get(n);const r=e.registry.ensureNode(n),i=r.value();return e.addParent(r),i}return Object.setPrototypeOf(t,Gue),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t};class Jue{constructor(t,n){y(this,"registry");y(this,"node");this.registry=t,this.node=n}get(t){return this.registry.get(t)}set(t,n){return this.registry.set(t,n)}setSelf(t){return this.node.setValue(t)}refreshSelf(){return this.node.invalidate()}}var Yi;(function(e){e[e.disabled=0]="disabled",e[e.collect=1]="collect",e[e.commit=2]="commit"})(Yi||(Yi={}));const Pt=ge("@effect-atom/atom/Registry/batchState",()=>({phase:Yi.disabled,depth:0,stale:[],notify:new Set}));function Que(e){Pt.phase=Yi.collect,Pt.depth++;try{if(e(),Pt.depth===1){for(let t=0;t<Pt.stale.length;t++)HU(Pt.stale[t]);Pt.phase=Yi.commit;for(const t of Pt.notify)t.notify();Pt.notify.clear()}}finally{Pt.depth--,Pt.depth===0&&(Pt.phase=Yi.disabled,Pt.stale=[])}}function HU(e){if(e.state!==gi.valid){for(let t=0;t<e.parents.length;t++){const n=e.parents[t];n.state!==gi.valid&&HU(n)}e.state!==gi.valid&&e.value()}}const Xue=e=>{const t=e;switch(t._tag){case"Failure":case"Success":return t;case"Left":return $y(t.left);case"Right":return _r(t.right);case"Some":return _r(t.value);case"None":return $y(new Af)}},nT=e=>{const t=Gv(e);return(n,r,i=!1)=>{const s=Xue(n);if(s){r(s);return}const a=new WE,o=t(n,{scheduler:a});a.flush();const l=o.unsafePoll();if(l){r(l);return}o.addObserver(r);function c(){o.removeObserver(r),i||o.unsafeInterruptAsFork(Or)}return c}},Wue=Hue;class qU extends Zk("@effect/atom/Registry/CurrentRegistry")(){}const Ww="~effect-atom/atom/Atom",Zw="~effect-atom/atom/Atom/Writable",VU=k(2,(e,t)=>{const n=ii(t),r=YL(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?wy(n):void 0})}),Xh=VU(0),rT={[Ww]:Ww,pipe(){return ie(this,arguments)},toJSON(){return{_id:"Atom",keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}},toString(){return at(this)},[Ue](){return this.toJSON()}},Zue={...rT,atom(e,t){const n=KU(e,t);return Ji(r=>{const i=r.self(),s=r(this);return s._tag!=="Success"?Od(s,i):n(r,s.value)})},fn(e,t){return arguments.length===0?(n,r)=>QR(this,n,r):QR(this,e,t)},pull(e,t){const n=Xh(fb(0)),r=Ji(i=>{const s=i.self(),a=i(this);return a._tag!=="Success"?Od(a,s):rh(i,ufe(i,n,e,t),no(!0),a.value)});return ffe(n,r)},subscriptionRef(e){return sfe(Xh(Ji(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return Od(r,n);const i=typeof e=="function"?e(t):e;return Jw in i?i:rh(t,i,no(!0),r.value)})),(t,n)=>{const r=Qw(t(this));return ZR(t,n,r)})},subscribable(e){return afe(Ji(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return Od(r,n);const i=typeof e=="function"?e(t):e;return PU(i)?i:rh(t,i,no(!0),r.value)}),(t,n)=>{const r=Qw(t(this));return ZR(t,n,r)})}},QR=(e,t,n)=>{const[r,i,s]=lfe(n!=null&&n.reactivityKeys?(a,o)=>{const l=t(a,o);return Co(l)?x5(l,n.reactivityKeys):b5(l,vle(n.reactivityKeys))}:t,n);return Ym(a=>{a.get(s);const o=a.self(),l=a.get(e);return l._tag!=="Success"?Od(l,o):r(a,l.value)},i)},efe={...rT,[Zw]:Zw},tfe=e=>Zw in e,Ji=(e,t)=>{const n=Object.create(rT);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},Ym=(e,t,n)=>{const r=Object.create(efe);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function nfe(e,t){e.setSelf(t)}const Ao=(e,t)=>{const n=KU(e,t);return Ww in n?n:Ji(n)},XR=e=>NK in e||_K in e,KU=(e,t)=>{if(typeof e=="function"&&!Co(e)&&!(U0 in e)){const n=e;return function(r,i){const s=n(r);if(Ci(s)){if(XR(s))return s;if(Cw in s)return e_(r,s,t,i);if(U0 in s)return WR(r,s,t,i)}return s}}else if(Ci(e)){if(XR(e))return fb(e);if(Cw in e)return function(n,r){return e_(n,e,t,r)};if(U0 in e)return function(n,r){return WR(n,e,t,r)}}return fb(e)},fb=e=>Ym(function(t){return e},nfe),e_=(e,t,n,r)=>{const i=(n==null?void 0:n.initialValue)!==void 0?zl(n.initialValue):no();return rh(e,t,i,r,n==null?void 0:n.uninterruptible)};function rh(e,t,n,r=Yv,i=!1){const s=e.self(),a=ti(O4());e.addFinalizer(()=>{EC(Gy(a,tC))});const o=new Map(r.context.unsafeMap);o.set(Dre.key,a),o.set(qU.key,e.registry);const l=TC({context:fK(o),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags});let c,f=!1;const u=nT(l)(t,function(d){c=UU(d,s),f&&e.setSelf(c)},i);return f=!0,u!==void 0&&e.addFinalizer(u),c!==void 0?c:s._tag==="Some"?tT(s):cS(n)}const rfe=e=>{let t=B0;function n(i){const s=Object.create(Zue);s.keepAlive=!1,s.lazy=!0,s.refresh=void 0,s.factory=n;const a=fa(Ji(typeof i=="function"?o=>D0(i(o),t):()=>D0(i,t)));return s.layer=a,s.read=function(l){const c=l(a),f=ue(ue(Vv,u=>oR(c,e.memoMap,u)),u=>Xy(Lm(),u));return e_(l,f,{uninterruptible:!0})},s}n.memoMap=e.memoMap,n.addGlobalLayer=i=>{t=D0(t,uP(i,B0))};const r=Xh(Ao(wse(i=>oR(B0,e.memoMap,i)).pipe(Xe(Vs(Bm)))));return n.withReactivity=i=>s=>dfe(s,a=>{const o=Qw(a(r));return a.addFinalizer(o.unsafeRegister(i,()=>{a.refresh(s)})),a.subscribe(s,l=>a.setSelf(l)),a.once(s)}),n},ife=ge("@effect-atom/atom/Atom/defaultMemoMap",()=>ti(Kse)),iT=ge("@effect-atom/atom/Atom/defaultContext",()=>rfe({memoMap:ife}));iT.withReactivity;const WR=(e,t,n,r)=>{const i=(n==null?void 0:n.initialValue)!==void 0?zl(n.initialValue):no();return sT(e,t,i,r)};function sT(e,t,n,r=Yv){const i=e.self(),s=Oue({onInput(l){return Nue(()=>{const c=yG(l);return c._tag==="Some"&&e.setSelf(zl(c.value,{waiting:!0})),s})},onFailure(l){return KR(()=>{e.setSelf(Gm(l,{previous:e.self()}))})},onDone(l){return KR(()=>{O(e.self(),aa(BU),pt({onNone:()=>e.setSelf(Fue(new Af,{previous:e.self()})),onSome:c=>e.setSelf(zl(c))}))})}}),a=TC({context:Qr(r.context,qU,e.registry),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags}),o=nT(a)(Rue(Aue(v5(t),s)),Ou,!1);return o!==void 0&&e.addFinalizer(o),i._tag==="Some"?tT(i):cS(n)}const ZR=(e,t,n=Yv)=>FU in t?(e.addFinalizer(t.changes.pipe(mle(r=>(e.setSelf(r),Fe)),Ise(n))),jse(n)(t.get)):t._tag!=="Success"?t:sT(e,t.value.changes,no(!0),n),sfe=(e,t)=>{function n(r,i){const s=r.get(e);Jw in s?ti(GR(s,i)):Qu(s)&&ti(GR(s.value,i))}return Ym(r=>{const i=r(e);return Jw in i||Qu(i)?t(r,i):i},n)},afe=(e,t)=>Ji(n=>{const r=n(e);return PU(r)||Qu(r)?t(n,r):r}),ofe=Symbol.for("@effect-atom/atom/Atom/Reset"),W0=Symbol.for("@effect-atom/atom/Atom/Interrupt");function lfe(e,t){const n=Xh(fb([0,void 0])),r=(t==null?void 0:t.initialValue)!==void 0?zl(t.initialValue):no(),i=t!=null&&t.concurrent?Xh(Ji(o=>{const l=new Set;return o.addFinalizer(()=>l.forEach(c=>c.unsafeInterruptAsFork(Or))),l})):void 0;function s(o,l){const c=i?o(i):void 0;o.isFn=!0;const[f,u]=o.get(n);if(f===0)return r;if(u===W0)return Gm(x4(Or),{previous:o.self()});let d=e(u,o);if(Cw in d){if(c){const h=d;d=ue(Lm(),g=>{const v=Gv(g,h);c.add(v);const x=Array.from(c);return v.addObserver(()=>c.delete(v)),cfe(x)})}return rh(o,d,r,l,!1)}return sT(o,d,r,l)}function a(o,l){hfe(()=>{l===ofe?o.set(n,[0,void 0]):l===W0?o.set(n,[o.get(n)[0]+1,W0]):o.set(n,[o.get(n)[0]+1,l]),o.refreshSelf()})}return[s,a,n]}const cfe=e=>Tw(t=>{let n=0,r,i;function s(o,l=!1){o._tag==="Failure"?r=r?Yne(o.cause,r):o.cause:r||(i=o),n++,l||a()}function a(){for(;n<e.length;){const o=e[n],l=o.unsafePoll();if(!l)return o.addObserver(s);s(l,!0)}t(r?zn(r):i||zn(Gne))}return a(),lt(()=>{n<e.length&&e[n].removeObserver(s)})}),ufe=(e,t,n,r)=>ue(Mue(v5(typeof n=="function"?n(e):n)),i=>{const s=Ose(1),a=IK(Zre()),o=a.currentContext;let l=sn();const c=ue(Tse(jt(()=>i),fP,o),or({onLeft:()=>{const h=Qn(l);return nu(h)?St({done:!0,items:h}):cs(new Af("Atom.pull: no items"))},onRight(h){let g;r!=null&&r.disableAccumulation?g=h:(g=Kt(l,h),l=g);const v=Qn(g);return nu(v)?St({done:!1,items:v}):c}})),f=s.withPermits(1)(c),u=nT(TC({context:o,fiberRefs:a.getFiberRefs(),runtimeFlags:Yv.runtimeFlags})),d=new Set;return e.addFinalizer(()=>{for(const h of d)h()}),e.once(t),e.subscribe(t,()=>{e.setSelf(tT(e.self()));let h;h=u(f,g=>{h&&d.delete(h);const v=UU(g,e.self()),x=d.size>0;e.setSelf(x?cS(v):v)}),h&&d.add(h)}),c}),ffe=(e,t)=>Ym(t.read,function(n,r){n.set(e,n.get(e)+1)}),eN=typeof WeakRef>"u"||typeof FinalizationRegistry>"u"?e=>{const t=dw();return function(n){const r=As(t,n);if(r._tag==="Some")return r.value;const i=e(n);return Jo(t,n,i),i}}:e=>{const t=dw(),n=new FinalizationRegistry(r=>{Ste(t,r)});return function(r){const i=As(t,r).pipe(fL(a=>a.deref()));if(i._tag==="Some")return i.value;const s=e(r);return Jo(t,r,new WeakRef(s)),n.register(s,r),s}},fa=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),dfe=k(2,(e,t)=>tfe(e)?Ym(t,function(n,r){n.set(e,r)},e.refresh??function(n){n(e)}):Ji(t,e.refresh??function(n){n(e)})),hfe=Que,tN="~effect-atom/atom/Atom/ServerValue",mfe=k(2,(e,t)=>tN in e?e[tN](n=>t.get(n)):t.get(e)),_g=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipart"),kg=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipartStream"),ih=Symbol.for("@effect/platform/HttpApiSchema/AnnotationStatus"),Eg=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEmptyDecodeable"),Cg=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEncoding"),Tg=Symbol.for("@effect/platform/HttpApiSchema/AnnotationParam"),GU=e=>{const t={};return ih in e&&(t[ih]=e[ih]),Eg in e&&(t[Eg]=e[Eg]),Cg in e&&(t[Cg]=e[Cg]),Tg in e&&(t[Tg]=e[Tg]),_g in e&&(t[_g]=e[_g]),kg in e&&(t[kg]=e[kg]),t},pfe=e=>e._tag==="Transformation"?{...e.to.annotations,...e.annotations}:e.annotations,Jm=(e,t)=>pfe(e)[t],YU=(e,t)=>Jm(e,ih)??t,gfe=e=>Jm(e,Eg)??!1,yfe=e=>Jm(e,_g),bfe=e=>Jm(e,kg),vfe={kind:"Json",contentType:"application/json"},uS=(e,t=vfe)=>Jm(e,Cg)??t,Sfe=e=>{var n;return(n=(e._tag==="PropertySignatureTransformation"?e.to.annotations:e.annotations)[Tg])==null?void 0:n.name},Xu=e=>{const t=SU(e,"status");return e.status!==void 0&&(t[ih]=e.status),t},t_=e=>{switch(e._tag){case"VoidKeyword":return!0;case"Transformation":return t_(e.from);case"Suspend":return t_(e.f());default:return!1}},xfe=e=>YU(e,t_(e)?204:200),Z0=e=>YU(e,500),n_=e=>{function t(r){if(tS(r))for(const i of r.types)t(i);else n.push(r)}const n=[];return t(e),n},JU=(e,t)=>Sr.make(Array.from(new Set([...n_(e),...n_(t)]))),ro=(e,t)=>dt(JU(e.ast,t.ast)),wfe=e=>Xce.annotations(Xu({status:e})),r_=wfe(204);class _fe extends Tue.annotations({identifier:"Issue",description:"Represents an error encountered while parsing a value to match the schema"}){}class db extends $U()("HttpApiDecodeError",{issues:gn(_fe),message:G},Xu({status:400,description:"The request did not match the expected schema"})){static fromParseError(t){return xg.formatError(t).pipe(Wy(eh.formatError(t)),Xe(([n,r])=>new db({issues:n,message:r})))}static refailParseError(t){return ue(db.fromParseError(t),cs)}}const nN=Symbol.for("@effect/platform/HttpApi"),kfe={[nN]:nN,pipe(){return ie(this,arguments)},add(e){return xa({identifier:this.identifier,groups:VK(this.groups,e.identifier,e),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},addHttpApi(e){const t={...this.groups};for(const n in e.groups){const r=e.groups[n].annotateContext(ns());r.annotations=ur(e.annotations,r.annotations),r.middlewares=new Set([...e.middlewares,...r.middlewares]),t[n]=r}return xa({identifier:this.identifier,groups:t,errorSchema:ro(this.errorSchema,e.errorSchema),annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return xa({identifier:this.identifier,groups:this.groups,errorSchema:ro(this.errorSchema,t!=null&&t.status?e.annotations(Xu({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return xa({identifier:this.identifier,groups:Bc(this.groups,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return xa({identifier:this.identifier,groups:this.groups,errorSchema:ro(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return xa({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:Qr(this.annotations,e,t),middlewares:this.middlewares})},annotateContext(e){return xa({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:ur(this.annotations,e),middlewares:this.middlewares})}},xa=e=>{function t(){}return Object.setPrototypeOf(t,kfe),t.groups=e.groups,t.errorSchema=e.errorSchema,t.annotations=e.annotations,t.middlewares=e.middlewares,t},Efe=e=>xa({groups:new Map,errorSchema:db,annotations:ns(),middlewares:new Set}),Cfe=(e,t)=>{const n=Dp(e.errorSchema.ast,new Map,Z0),r=Object.values(e.groups);for(const i of r){const s=Dp(i.errorSchema.ast,n,Z0),a=ur(e.annotations,i.annotations);t.onGroup({group:i,mergedAnnotations:a});const o=Object.values(i.endpoints);for(const l of o){if(t.predicate&&!t.predicate({endpoint:l,group:i}))continue;const c=Dp(l.errorSchema.ast,s,Z0);t.onEndpoint({group:i,endpoint:l,middleware:new Set([...i.middlewares,...l.middlewares]),mergedAnnotations:ur(a,l.annotations),payloads:l.payloadSchema._tag==="Some"?Afe(l.payloadSchema.value.ast):Tfe,successes:Dp(l.successSchema.ast,new Map,xfe),errors:c})}}},Tfe=new Map,Dp=(e,t,n)=>{const r=new Map(t);function i(s){if(Wle(s))return;const a=GU(e.annotations);qK(a)||(s=Mf(s,{...a,...s.annotations}));const o=n(s),l=gfe(s),c=r.get(o);r.set(o,{description:(c?c.description:q()).pipe(wi(()=>Ofe(s))),ast:(c?c.ast:q()).pipe(Gn(f=>JU(f,s)),wi(()=>!l&&Qle(ib(s))?q():J(s)))})}return n_(e).forEach(i),r},Afe=e=>{const t=new Map;function n(r){if(r._tag==="NeverKeyword")return;r=Mf(r,{...GU(e.annotations),...r.annotations});const i=uS(r),s=yfe(r)||bfe(r)?"multipart/form-data":i.contentType,a=t.get(s);a===void 0?t.set(s,{encoding:i,ast:r}):a.ast=Sr.make([a.ast,r])}if(e._tag==="Union")for(const r of e.types)n(r);else n(e);return t},Ofe=e=>{const t="to"in e?{...e.to.annotations,...e.annotations}:e.annotations;return gf(t[Xl]??t[Hm])},ec=e=>{const t=QU(e),n=[];for(let r=0;r<t.length;r++)if(Array.isArray(t[r][0])){const[i,s]=t[r];n.push([`${i[0]}[${i.slice(1).join("][")}]`,s])}else n.push(t[r]);return n},QU=e=>{const t=Symbol.iterator in e?Qe(e):Object.entries(e),n=[];for(const[r,i]of t)if(Array.isArray(i))for(let s=0;s<i.length;s++)i[s]!==void 0&&n.push([r,String(i[s])]);else if(typeof i=="object"){const s=QU(i);for(const[a,o]of s)n.push([[r,...typeof a=="string"?[a]:a],o])}else i!==void 0&&n.push([r,String(i)]);return n},XU=gn(tue(G,G)).annotations({identifier:"UrlParams"}),Rfe=[],Nfe=k(2,(e,t)=>{const n=ec(t),r=new Set;for(let i=0;i<n.length;i++)r.add(n[i][0]);for(let i=0;i<e.length;i++)r.has(e[i][0])||n.push(e[i]);return n}),Mfe=k(2,(e,t)=>nE(e,ec(t))),Dfe=(e,t,n)=>{try{const r=new URL(e,zfe());for(let i=0;i<t.length;i++){const[s,a]=t[i];a!==void 0&&r.searchParams.append(s,a)}return n._tag==="Some"&&(r.hash=n.value),he(r)}catch(r){return pe(r)}},WU=e=>new URLSearchParams(e).toString(),zfe=()=>{if("location"in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},jfe=e=>{const t=Object.create(null);for(const[n,r]of e){const i=t[n];i===void 0?t[n]=r:typeof i=="string"?t[n]=[i,r]:i.push(r)}return{...t}},Ife=Zl(G,XU,{decode(e){return ec(new URLSearchParams(e))},encode(e){return WU(e)}}),$fe=e=>Zl(XU,e,{decode(t){return jfe(t)},encode(t){return ec(t)}}),Lfe=e=>nl(Ife,$fe(e)),Ag=Symbol.for("@effect/platform/HttpBody");var wz;class aT{constructor(){y(this,wz);this[Ag]=Ag}[(wz=Ag,Ue)](){return this.toJSON()}toString(){return at(this)}}class Ffe extends aT{constructor(){super(...arguments);y(this,"_tag","Empty")}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Empty"}}}const Pfe=new Ffe;class Ufe extends aT{constructor(n,r){super();y(this,"body");y(this,"contentType");y(this,"_tag","Uint8Array");this.body=n,this.contentType=r}get contentLength(){return this.body.length}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Uint8Array",body:this.contentType.startsWith("text/")||this.contentType.endsWith("json")?new TextDecoder().decode(this.body):`Uint8Array(${this.body.length})`,contentType:this.contentType,contentLength:this.contentLength}}}const ZU=(e,t)=>new Ufe(e,t??"application/octet-stream"),Bfe=new TextEncoder,e6=(e,t)=>ZU(Bfe.encode(e),t??"text/plain"),Hfe=e=>e6(WU(e),"application/x-www-form-urlencoded");class qfe extends aT{constructor(n){super();y(this,"formData");y(this,"_tag","FormData");this.formData=n}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"FormData",formData:this.formData}}}const Vfe=e=>new qfe(e),Kfe=Ag,Gfe=e=>fe(e,Kfe),Yfe=ZU,rN=e6,Jfe=Hfe,iN=Symbol.for("@effect/platform/Cookies"),sN=Symbol.for("@effect/platform/Cookies/Cookie"),Qfe={[iN]:iN,...Zb,toJSON(){return{_id:"@effect/platform/Cookies",cookies:Bc(this.cookies,e=>e.toJSON())}},pipe(){return ie(this,arguments)}},Xfe=e=>{const t=Object.create(Qfe);return t.cookies=e,t},Wfe=e=>{const t={};for(const n of e)t[n.name]=n;return Xfe(t)},Zfe=e=>{const t=typeof e=="string"?[e]:e,n=[];for(const r of t){const i=ede(r.trim());gt(i)&&n.push(i.value)}return Wfe(n)};function ede(e){const t=e.split(";").map(o=>o.trim()).filter(o=>o!=="");if(t.length===0)return q();const n=t[0].indexOf("=");if(n===-1)return q();const r=t[0].slice(0,n);if(!tde.test(r))return q();const i=t[0].slice(n+1),s=nde(i);if(t.length===1)return J(Object.assign(Object.create(aN),{name:r,value:s,valueEncoded:i}));const a={};for(let o=1;o<t.length;o++){const l=t[o],c=l.indexOf("="),f=c===-1?l:l.slice(0,c).trim(),u=c===-1?void 0:l.slice(c+1).trim();switch(f.toLowerCase()){case"domain":{if(u===void 0)break;const d=u.trim().replace(/^\./,"");d&&(a.domain=d);break}case"expires":{if(u===void 0)break;const d=new Date(u);isNaN(d.getTime())||(a.expires=d);break}case"max-age":{if(u===void 0)break;const d=parseInt(u,10);isNaN(d)||(a.maxAge=JL(d));break}case"path":{if(u===void 0)break;u[0]==="/"&&(a.path=u);break}case"priority":{if(u===void 0)break;switch(u.toLowerCase()){case"low":a.priority="low";break;case"medium":a.priority="medium";break;case"high":a.priority="high";break}break}case"httponly":{a.httpOnly=!0;break}case"secure":{a.secure=!0;break}case"partitioned":{a.partitioned=!0;break}case"samesite":{if(u===void 0)break;switch(u.toLowerCase()){case"lax":a.sameSite="lax";break;case"strict":a.sameSite="strict";break;case"none":a.sameSite="none";break}break}}}return J(Object.assign(Object.create(aN),{name:r,value:s,valueEncoded:i,options:Object.keys(a).length>0?a:void 0}))}const tde=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,aN={[sN]:sN,...Zb,toJSON(){return{_id:"@effect/platform/Cookies/Cookie",name:this.name,value:this.value,options:this.options}}},nde=e=>{try{return decodeURIComponent(e)}catch{return e}},oN=Symbol.for("@effect/platform/Headers"),Wh=Object.assign(Object.create(null),{[oN]:oN,[ev](e){return s_(this,hF(e,n6))}}),fS=e=>Object.assign(Object.create(Wh),e),t6=Object.create(Wh),oT=e=>{if(e===void 0)return t6;if(Symbol.iterator in e){const n=Object.create(Wh);for(const[r,i]of e)n[r.toLowerCase()]=i;return n}const t=Object.create(Wh);for(const[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(", "):r!==void 0&&(t[n.toLowerCase()]=r);return t},rde=e=>Object.setPrototypeOf(e,Wh),i_=k(3,(e,t,n)=>{const r=fS(e);return r[t.toLowerCase()]=n,r}),ide=k(2,(e,t)=>fS({...e,...oT(t)})),sde=k(2,(e,t)=>{const n=fS(e);return Object.assign(n,t),n}),ade=k(2,(e,t)=>{const n=fS(e),r=i=>{if(typeof i=="string"){const s=i.toLowerCase();s in e&&delete n[s]}else for(const s in e)i.test(s)&&delete n[s]};if(Array.isArray(t))for(let i=0;i<t.length;i++)r(t[i]);else r(t);return n}),s_=k(2,(e,t)=>{const n={...e},r=i=>{if(typeof i=="string"){const s=i.toLowerCase();s in e&&(n[s]=IR(e[s]))}else for(const s in e)i.test(s)&&(n[s]=IR(e[s]))};if(Array.isArray(t))for(let i=0;i<t.length;i++)r(t[i]);else r(t);return n}),n6=ge("@effect/platform/Headers/currentRedactedNames",()=>AC(["authorization","cookie","set-cookie","x-api-key"])),ode=Symbol.for("@effect/platform/HttpClientError"),r6=ode;class i6 extends LU(r6,"RequestError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return this.description?`${this.reason}: ${this.description} (${this.methodAndUrl})`:`${this.reason} error (${this.methodAndUrl})`}}class Cs extends LU(r6,"ResponseError"){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){const t=`${this.response.status} ${this.methodAndUrl}`;return this.description?`${this.reason}: ${this.description} (${t})`:`${this.reason} error (${t})`}}const sh=Symbol.for("@effect/platform/HttpIncomingMessage"),lde=(e,t)=>{const n=e.headers["content-type"]??"";let r;if(n.includes("application/json"))try{r=ti(e.json)}catch{}else if(n.includes("text/")||n.includes("urlencoded"))try{r=ti(e.text)}catch{}const i={...t,headers:Vk(e.headers),remoteAddress:e.remoteAddress.toJSON()};return r!==void 0&&(i.body=r),i},cde=e=>rde({b3:`${e.traceId}-${e.spanId}-${e.sampled?"1":"0"}${e.parent._tag==="Some"?`-${e.parent.value.spanId}`:""}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?"01":"00"}`}),lN=Symbol.for("@effect/platform/HttpClientRequest"),ude={[lN]:lN,...Zb,toJSON(){return{_id:"@effect/platform/HttpClientRequest",method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:Vk(this.headers),body:this.body.toJSON()}},pipe(){return ie(this,arguments)}};function Ni(e,t,n,r,i,s){const a=Object.create(ude);return a.method=e,a.url=t,a.urlParams=n,a.hash=r,a.headers=i,a.body=s,a}const fde=Ni("GET","",Rfe,q(),t6,Pfe),Oo=e=>(t,n)=>vde(fde,{method:e,url:t,...n??void 0}),dde=Oo("GET"),hde=Oo("POST"),mde=Oo("PUT"),pde=Oo("PATCH"),gde=Oo("DELETE"),yde=Oo("HEAD"),bde=Oo("OPTIONS"),vde=k(2,(e,t)=>{let n=e;return t.method&&(n=wde(n,t.method)),t.url&&(n=a6(n,t.url)),t.headers&&(n=lT(n,t.headers)),t.urlParams&&(n=o6(n,t.urlParams)),t.hash&&(n=Ede(n,t.hash)),t.body&&(n=cT(n,t.body)),t.accept&&(n=s6(n,t.accept)),t.acceptJson&&(n=xde(n)),n}),Sde=k(3,(e,t,n)=>Ni(e.method,e.url,e.urlParams,e.hash,i_(e.headers,t,n),e.body)),lT=k(2,(e,t)=>Ni(e.method,e.url,e.urlParams,e.hash,ide(e.headers,t),e.body)),s6=k(2,(e,t)=>Sde(e,"Accept",t)),xde=s6("application/json"),wde=k(2,(e,t)=>Ni(t,e.url,e.urlParams,e.hash,e.headers,e.body)),a6=k(2,(e,t)=>{if(typeof t=="string")return Ni(e.method,t,e.urlParams,e.hash,e.headers,e.body);const n=new URL(t.toString()),r=ec(n.searchParams),i=n.hash?J(n.hash.slice(1)):q();return n.search="",n.hash="",Ni(e.method,n.toString(),r,i,e.headers,e.body)}),_de=k(2,(e,t)=>Ni(e.method,t.endsWith("/")&&e.url.startsWith("/")?t+e.url.slice(1):t+e.url,e.urlParams,e.hash,e.headers,e.body)),kde=k(2,(e,t)=>Ni(e.method,e.url,Mfe(e.urlParams,t),e.hash,e.headers,e.body)),o6=k(2,(e,t)=>Ni(e.method,e.url,Nfe(e.urlParams,t),e.hash,e.headers,e.body)),Ede=k(2,(e,t)=>Ni(e.method,e.url,e.urlParams,J(t),e.headers,e.body)),cT=k(2,(e,t)=>{let n=e.headers;if(t._tag==="Empty"||t._tag==="FormData")n=ade(n,["Content-type","Content-length"]);else{const r=t.contentType;r&&(n=i_(n,"content-type",r));const i=t.contentLength;i&&(n=i_(n,"content-length",i.toString()))}return Ni(e.method,e.url,e.urlParams,e.hash,n,t)}),Cde=k(2,(e,t)=>cT(e,Vfe(t))),ah=Symbol.for("@effect/platform/HttpClientResponse"),Tde=(e,t)=>new Ade(e,t);var _z,kz,Ez;class Ade extends(Ez=M7,kz=sh,_z=ah,Ez){constructor(n,r){super();y(this,"request");y(this,"source");y(this,kz);y(this,_z);y(this,"cachedCookies");y(this,"textBody");y(this,"formDataBody");y(this,"arrayBufferBody");this.request=n,this.source=r,this[sh]=sh,this[ah]=ah}toJSON(){return lde(this,{_id:"@effect/platform/HttpClientResponse",request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return oT(this.source.headers)}get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=Zfe(this.source.headers.getSetCookie())}get remoteAddress(){return q()}get stream(){return this.source.body?hle(()=>this.source.body,n=>new Cs({request:this.request,response:this,reason:"Decode",cause:n})):lle(new Cs({request:this.request,response:this,reason:"EmptyBody",description:"can not create stream from empty body"}))}get json(){return bse(this.text,{try:n=>n===""?null:JSON.parse(n),catch:n=>new Cs({request:this.request,response:this,reason:"Decode",cause:n})})}get text(){return this.textBody??(this.textBody=Xd({try:()=>this.source.text(),catch:n=>new Cs({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(O0,ti))}get urlParamsBody(){return ue(this.text,n=>yse({try:()=>ec(new URLSearchParams(n)),catch:r=>new Cs({request:this.request,response:this,reason:"Decode",cause:r})}))}get formData(){return this.formDataBody??(this.formDataBody=Xd({try:()=>this.source.formData(),catch:n=>new Cs({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(O0,ti))}get arrayBuffer(){return this.arrayBufferBody??(this.arrayBufferBody=Xd({try:()=>this.source.arrayBuffer(),catch:n=>new Cs({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(O0,ti))}}const Ode=k(2,(e,t)=>{const n=e.status;return t[n]?t[n](e):n>=200&&n<300&&t["2xx"]?t["2xx"](e):n>=300&&n<400&&t["3xx"]?t["3xx"](e):n>=400&&n<500&&t["4xx"]?t["4xx"](e):n>=500&&n<600&&t["5xx"]?t["5xx"](e):t.orElse(e)}),Rde=e=>`http.request.header.${e}`,Nde="http.request.method",Mde=e=>`http.response.header.${e}`,Dde="http.response.status_code",zde="server.address",jde="server.port",Ide="url.full",$de="url.path",Lde="url.scheme",Fde="url.query",cN=Symbol.for("@effect/platform/HttpClient"),uT=ko("@effect/platform/HttpClient"),Pde=ge(Symbol.for("@effect/platform/HttpClient/tracerDisabledWhen"),()=>AC(Ga)),Ude=ge(Symbol.for("@effect/platform/HttpClient/currentTracerPropagation"),()=>AC(!0)),Bde=pf()("@effect/platform/HttpClient/SpanNameGenerator",{defaultValue:()=>e=>`http.client ${e.method}`}),Hde={[cN]:cN,pipe(){return ie(this,arguments)},...Zb,toJSON(){return{_id:"@effect/platform/HttpClient"}},get(e,t){return this.execute(dde(e,t))},head(e,t){return this.execute(yde(e,t))},post(e,t){return this.execute(hde(e,t))},put(e,t){return this.execute(mde(e,t))},patch(e,t){return this.execute(pde(e,t))},del(e,t){return this.execute(gde(e,t))},options(e,t){return this.execute(bde(e,t))}},fT=(e,t)=>{const n=Object.create(Hde);return n.preprocess=t,n.postprocess=e,n.execute=function(r){return e(t(r))},n},hb=ge("@effect/platform/HttpClient/responseRegistry",()=>{if("FinalizationRegistry"in globalThis&&globalThis.FinalizationRegistry){const t=new FinalizationRegistry(n=>{n.abort()});return{register(n,r){t.register(n,r,n)},unregister(n){t.unregister(n)}}}const e=new Map;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){const n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}}),qde=ge("@effect/platform/HttpClient/scopedRequests",()=>new WeakMap),Vde=e=>fT(t=>ue(t,n=>Yy(r=>{const i=qde.get(n),s=i??new AbortController,a=Dfe(n.url,n.urlParams,n.hash);if(a._tag==="Left")return cs(new i6({request:n,reason:"InvalidUrl",cause:a.left}));const o=a.right;if(!r.getFiberRef(Gse)||r.getFiberRef(Pde)(n)){const f=e(n,o,s.signal,r);return i?f:Jy(u=>vi(u(f),{onSuccess(d){return hb.register(d,s),St(new uN(d,s))},onFailure(d){return Hy(d)&&s.abort(),_i(d)}}))}const c=Vs(r.currentContext,Bde);return Dse(c(n),{kind:"client",captureStackTrace:!1},f=>{f.attribute(Nde,n.method),f.attribute(zde,o.origin),o.port!==""&&f.attribute(jde,+o.port),f.attribute(Ide,o.toString()),f.attribute($de,o.pathname),f.attribute(Lde,o.protocol.slice(0,-1));const u=o.search.slice(1);u!==""&&f.attribute(Fde,u);const d=r.getFiberRef(n6),h=s_(n.headers,d);for(const g in h)f.attribute(Rde(g),String(h[g]));return n=r.getFiberRef(Ude)?lT(n,cde(f)):n,Jy(g=>g(e(n,o,s.signal,r)).pipe(zse(f),vi({onSuccess:v=>{f.attribute(Dde,v.status);const x=s_(v.headers,d);for(const m in x)f.attribute(Mde(m),String(x[m]));return i?St(v):(hb.register(v,s),St(new uN(v,s)))},onFailure(v){return!i&&Hy(v)&&s.abort(),_i(v)}})))})})),St);var Cz,Tz;class uN{constructor(t,n){y(this,"original");y(this,"controller");y(this,Tz,ah);y(this,Cz,sh);this.original=t,this.controller=n}applyInterrupt(t){return jt(()=>(hb.unregister(this.original),vse(t,()=>lt(()=>{this.controller.abort()}))))}get request(){return this.original.request}get status(){return this.original.status}get headers(){return this.original.headers}get cookies(){return this.original.cookies}get remoteAddress(){return this.original.remoteAddress}get formData(){return this.applyInterrupt(this.original.formData)}get text(){return this.applyInterrupt(this.original.text)}get json(){return this.applyInterrupt(this.original.json)}get urlParamsBody(){return this.applyInterrupt(this.original.urlParamsBody)}get arrayBuffer(){return this.applyInterrupt(this.original.arrayBuffer)}get stream(){return gle(()=>(hb.unregister(this.original),b5(this.original.stream,lt(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[(Tz=ah,Cz=sh,Ue)](){return this.original[Ue]()}}const{del:yTe,execute:bTe,get:vTe,head:STe,options:xTe,patch:wTe,post:_Te,put:kTe}=Ese(uT),Kde=k(2,(e,t)=>{const n=e;return fT(r=>t(n.postprocess(r)),n.preprocess)}),Gde=k(2,(e,t)=>{const n=e;return fT(n.postprocess,r=>Xe(n.preprocess(r),t))}),Yde=e=>Vse(uT,ue(tP(),t=>Xe(e,n=>Kde(n,nP(r=>ur(t,r)))))),Jde=uT,Qde=Gde,Xde=Oo,Wde=lT,Zde=a6,ehe=_de,the=o6,nhe=kde,rhe=cT,ihe=Cde,she=Ode,fN=e=>e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS",ahe=(e,t)=>lu(function*(){const n=yield*tP(),r=t.httpClient.pipe((t==null?void 0:t.baseUrl)===void 0?ce:Qde(ehe(t.baseUrl.toString())));Cfe(e,{predicate:t==null?void 0:t.predicate,onGroup(i){var s;(s=t.onGroup)==null||s.call(t,i)},onEndpoint(i){const{endpoint:s,errors:a,successes:o}=i,l=uhe(s.path),c={orElse:mhe},f=she(c);a.forEach(({ast:x},m)=>{if(x._tag==="None"){c[m]=phe;return}const b=dN(x.value);c[m]=S=>ue(b(S),cs)}),o.forEach(({ast:x},m)=>{c[m]=x._tag==="None"?ghe:dN(x.value)});const u=s.pathSchema.pipe(Gn(od)),d=s.payloadSchema.pipe(Gn(x=>fN(s.method)?od(bhe(x)):od(x))),h=s.headersSchema.pipe(Gn(od)),g=s.urlParamsSchema.pipe(Gn(od)),v=oP(function*(x){let m=Xde(s.method)(s.path);if(x&&x.path){const _=u._tag==="Some"?yield*u.value(x.path):x.path;m=Zde(m,l(_))}if(x&&x.payload instanceof FormData)m=ihe(m,x.payload);else if(d._tag==="Some")if(fN(s.method)){const _=yield*d.value(x.payload);m=rhe(m,_)}else{const _=yield*d.value(x.payload);m=the(m,_)}h._tag==="Some"&&(m=Wde(m,yield*h.value(x.headers))),g._tag==="Some"&&(m=nhe(m,yield*g.value(x.urlParams)));const b=yield*r.execute(m),S=yield*t.transformResponse===void 0?f(b):t.transformResponse(f(b));return(x==null?void 0:x.withResponse)===!0?[S,b]:S},nP(x=>ur(n,x)));t.onEndpoint({...i,endpointFn:v})}})}),ohe=(e,t)=>ue(Jde,n=>lhe(e,{...t,httpClient:t!=null&&t.transformClient?t.transformClient(n):n})),lhe=(e,t)=>{const n={};return ahe(e,{...t,onGroup({group:r}){r.topLevel||(n[r.identifier]={})},onEndpoint({endpoint:r,endpointFn:i,group:s}){(s.topLevel?n:n[s.identifier])[r.name]=i}}).pipe(Xe(()=>n))},che=/:(\w+)\??/g,uhe=e=>{const t=e.split(che),n=t.length;return n===1?r=>e:r=>{let i=t[0];for(let s=1;s<n;s++)s%2===0?i+=t[s]:i+=r[t[s]];return i}},dN=e=>{const t=uS(e),n=Gce(l6(e,t));return r=>ue(r.arrayBuffer,n)},fhe=Zl(iS,pue,{decode(e){return new Uint8Array(e)},encode(e){return e.byteLength===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength)}}),a_=Zl(iS,G,{decode(e){return new TextDecoder().decode(e)},encode(e){const t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}),dhe=Dl(G,iS,{strict:!0,decode:(e,t,n)=>e===""?Yn(void 0):sb({try:()=>JSON.parse(e),catch:()=>new dn(n,e,"Could not parse JSON")}),encode:(e,t,n)=>e===void 0?Yn(""):sb({try:()=>JSON.stringify(e),catch:()=>new dn(n,e,"Could not encode as JSON")})}),hhe=nl(a_,dhe),l6=(e,t)=>{if(e._tag==="Union")return jf(...e.types.map(r=>l6(r,uS(r,t))));const n=dt(e);switch(t.kind){case"Json":return nl(hhe,n);case"UrlParams":return nl(a_,Lfe(n));case"Uint8Array":return nl(fhe,n);case"Text":return nl(a_,n)}},mhe=e=>cs(new Cs({reason:"Decode",request:e.request,response:e})),phe=e=>cs(new Cs({reason:"StatusCode",request:e.request,response:e})),ghe=e=>Fe,yhe=zf(Gfe),bhe=e=>{const t=e.ast._tag==="Union"?e.ast.types:[e.ast];return jf(...t.map(vhe))},ex=ge("@effect/platform/HttpApiClient/bodyFromPayloadCache",()=>new WeakMap),vhe=e=>{if(ex.has(e))return ex.get(e);const t=dt(e),n=uS(e),r=Dl(yhe,t,{decode(i,s,a){return Fs(new qw(a,i,"encode only schema"))},encode(i,s,a){switch(n.kind){case"Json":try{return Yn(rN(JSON.stringify(i),n.contentType))}catch{return Fs(new dn(a,i,"Could not encode as JSON"))}case"Text":return typeof i!="string"?Fs(new dn(a,i,"Expected a string")):Yn(rN(i,n.contentType));case"UrlParams":return Yn(Jfe(ec(i)));case"Uint8Array":return i instanceof Uint8Array?Yn(Yfe(i,n.contentType)):Fs(new dn(a,i,"Expected a Uint8Array"))}}});return ex.set(e,r),r},She=e=>{if(Array.isArray(e))return W2(e);const t=Object.create(Tie.prototype);for(const n in e){const r=e[n];Array.isArray(r)&&(t[n]=W2(r))}return t},xhe=()=>(e,t)=>{const n=Zk(e)();n.layer=cP(n,ohe(t.api,t)).pipe(uP(t.httpClient)),n.runtime=iT(n.layer);const r=eN(({endpoint:s,group:a,withResponse:o})=>n.runtime.fn()(oP(function*(l){const f=(yield*n)[a][s]({...l,withResponse:o});return yield*l.reactivityKeys?x5(f,l.reactivityKeys):f})));n.mutation=(s,a,o)=>r(new whe({group:s,endpoint:a,withResponse:(o==null?void 0:o.withResponse)??!1}));const i=eN(s=>{let a=n.runtime.atom(ue(n,o=>o[s.group][s.endpoint](s)));return s.timeToLive&&(a=YL(s.timeToLive)?VU(a,s.timeToLive):fa(a)),s.reactivityKeys?n.runtime.factory.withReactivity(s.reactivityKeys)(a):a});return n.query=(s,a,o)=>i(new _he({group:s,endpoint:a,path:o.path&&Ap(o.path),urlParams:o.urlParams&&Ap(o.urlParams),payload:o.payload&&Ap(o.payload),headers:o.headers&&Ap(o.headers),withResponse:o.withResponse??!1,reactivityKeys:o.reactivityKeys?She(o.reactivityKeys):void 0,timeToLive:o.timeToLive?ii(o.timeToLive):void 0})),n};class whe extends pC{[ve](t){return this.group===t.group&&this.endpoint===t.endpoint&&this.withResponse===t.withResponse}[be](){return O(vt(`${this.group}/${this.endpoint}/${this.withResponse}`),rt(this))}}class _he extends pC{[ve](t){return this.group===t.group&&this.endpoint===t.endpoint&&oe(this.path,t.path)&&oe(this.urlParams,t.urlParams)&&oe(this.payload,t.payload)&&oe(this.headers,t.headers)&&oe(this.withResponse,t.withResponse)&&oe(this.reactivityKeys,t.reactivityKeys)&&oe(this.timeToLive,t.timeToLive)}[be](){return O(vt(`${this.group}/${this.endpoint}`),Se(re(this.path)),Se(re(this.urlParams)),Se(re(this.payload)),Se(re(this.headers)),Se(re(this.withResponse)),Se(re(this.reactivityKeys)),Se(re(this.timeToLive)),rt(this))}}const khe=Symbol.for("@effect/matcher/Matcher"),Ehe={[khe]:{_input:ce,_filters:ce,_remaining:ce,_result:ce,_provided:ce,_return:ce},_tag:"ValueMatcher",add(e){return this.value._tag==="Right"?this:e._tag==="When"&&e.guard(this.provided)===!0?o_(this.provided,he(e.evaluate(this.provided))):e._tag==="Not"&&e.guard(this.provided)===!1?o_(this.provided,he(e.evaluate(this.provided))):this},pipe(){return ie(this,arguments)}};function o_(e,t){const n=Object.create(Ehe);return n.provided=e,n.value=t,n}const Che=(e,t)=>({_tag:"When",guard:e,evaluate:t}),l_=e=>{if(typeof e=="function")return e;if(Array.isArray(e)){const t=e.map(l_),n=t.length;return r=>{if(!Array.isArray(r))return!1;for(let i=0;i<n;i++)if(t[i](r[i])===!1)return!1;return!0}}else if(e!==null&&typeof e=="object"){const t=Object.entries(e).map(([r,i])=>[r,l_(i)]),n=t.length;return r=>{if(typeof r!="object"||r===null)return!1;for(let i=0;i<n;i++){const[s,a]=t[i];if(!(s in r)||a(r[s])===!1)return!1}return!0}}return t=>t===e},The=e=>o_(e,pe(e)),Ahe=(e,t)=>n=>n.add(Che(l_(e),t)),Ohe=e=>t=>{const n=Rhe(t);return iL(n)?n._tag==="Right"?n.right:e(n.left):r=>{const i=n(r);return i._tag==="Right"?i.right:e(i.left)}},Rhe=e=>{if(e._tag==="ValueMatcher")return e.value;const t=e.cases.length;if(t===1){const n=e.cases[0];return r=>n._tag==="When"&&n.guard(r)===!0||n._tag==="Not"&&n.guard(r)===!1?he(n.evaluate(r)):pe(r)}return n=>{for(let r=0;r<t;r++){const i=e.cases[r];if(i._tag==="When"&&i.guard(n)===!0)return he(i.evaluate(n));if(i._tag==="Not"&&i.guard(n)===!1)return he(i.evaluate(n))}return pe(n)}},c6=The,oh=Ahe,u6=Ohe;function Nhe(e){zx.unstable_scheduleCallback(zx.unstable_LowPriority,e)}const f6=w.createContext(Wue({scheduleTask:Nhe,defaultIdleTTL:400})),hN=ge("@effect-atom/atom-react/storeRegistry",()=>new WeakMap);function Mhe(e,t){let n=hN.get(e);n===void 0&&(n=new WeakMap,hN.set(e,n));const r=n.get(t);if(r!==void 0)return r;const i={subscribe(s){return e.subscribe(t,s)},snapshot(){return e.get(t)},getServerSnapshot(){return mfe(t,e)}};return n.set(t,i),i}function Dhe(e,t){const n=Mhe(e,t);return w.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}const On=(e,t)=>{const n=w.useContext(f6);return Dhe(n,e)};function zhe(e,t){w.useEffect(()=>e.mount(t),[t,e])}function jhe(e,t,n){return w.useCallback(r=>{e.set(t,typeof r=="function"?r(e.get(t)):r)},[e,t])}const kt=(e,t)=>{const n=w.useContext(f6);return zhe(n,e),jhe(n,e)},Ihe="@effect/platform/FetchHttpClient/Fetch",$he="@effect/platform/FetchHttpClient/FetchOptions",Lhe=Vde((e,t,n,r)=>{const i=r.getFiberRef(fP),s=i.unsafeMap.get(Ihe)??globalThis.fetch,a=i.unsafeMap.get($he)??{},o=a.headers?sde(oT(a.headers),e.headers):e.headers,l=c=>Xe(Xd({try:()=>s(t,{...a,method:e.method,headers:o,body:c,duplex:e.body._tag==="Stream"?"half":void 0,signal:n}),catch:f=>new i6({request:e,reason:"Transport",cause:f})}),f=>Tde(e,f));switch(e.body._tag){case"Raw":case"Uint8Array":return l(e.body.body);case"FormData":return l(e.body.formData);case"Stream":return ue(yle(e.body.stream),l)}return l(void 0)}),Fhe=Yde(St(Lhe)),Phe=Fhe,Uhe=e=>e.endsWith("/")?e.slice(0,-1):e,Bhe=k(2,(e,t)=>(t=Uhe(t),e==="/"?t:t+e)),Hhe=Bhe,mN=Symbol.for("@effect/platform/HttpApiEndpoint"),qhe={[mN]:mN,pipe(){return ie(this,arguments)},addSuccess(e,t){return e=t!=null&&t.status?e.annotations(Xu({status:t.status})):e,Fr({...this,successSchema:this.successSchema===r_?e:ro(this.successSchema,e)})},addError(e,t){return Fr({...this,errorSchema:ro(this.errorSchema,t!=null&&t.status?e.annotations(Xu({status:t.status})):e)})},setPayload(e){return Fr({...this,payloadSchema:J(e)})},setPath(e){return Fr({...this,pathSchema:J(e)})},setUrlParams(e){return Fr({...this,urlParamsSchema:J(e)})},setHeaders(e){return Fr({...this,headersSchema:J(e)})},prefix(e){return Fr({...this,path:Hhe(this.path,e)})},middleware(e){return Fr({...this,errorSchema:ro(this.errorSchema,e.failure),middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return Fr({...this,annotations:Qr(this.annotations,e,t)})},annotateContext(e){return Fr({...this,annotations:ur(this.annotations,e)})}},Fr=e=>Object.assign(Object.create(qhe),e),d6=e=>(t,...n)=>n.length===1?Fr({name:t,path:n[0],method:e,pathSchema:q(),urlParamsSchema:q(),payloadSchema:q(),headersSchema:q(),successSchema:r_,errorSchema:Jh,annotations:ns(),middlewares:new Set}):(r,...i)=>{let s=r[0].replace(":","::"),a=q();if(i.length>0){const o={};for(let l=0;l<i.length;l++){const c=i[l],f=Sfe(c.ast)??String(l),u=c.ast._tag==="PropertySignatureTransformation"&&c.ast.from.isOptional||c.ast._tag==="PropertySignatureDeclaration"&&c.ast.isOptional;o[f]=c,s+=`:${f}${u?"?":""}${r[l+1].replace(":","::")}`}a=J(Je(o))}return Fr({name:t,path:s,method:e,pathSchema:a,urlParamsSchema:q(),payloadSchema:q(),headersSchema:q(),successSchema:r_,errorSchema:Jh,annotations:ns(),middlewares:new Set})},pl=d6("GET"),Ps=d6("POST"),pN=Symbol.for("@effect/platform/HttpApiGroup"),Vhe={[pN]:pN,add(e){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:{...this.endpoints,[e.name]:e},errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:ro(this.errorSchema,t!=null&&t.status?e.annotations(Xu({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:Bc(this.endpoints,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:ro(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},middlewareEndpoints(e){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:Bc(this.endpoints,t=>t.middleware(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateContext(e){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:ur(this.annotations,e),middlewares:this.middlewares})},annotate(e,t){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:Qr(this.annotations,e,t),middlewares:this.middlewares})},annotateEndpointsContext(e){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:Bc(this.endpoints,t=>t.annotateContext(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateEndpoints(e,t){return Fi({identifier:this.identifier,topLevel:this.topLevel,endpoints:Bc(this.endpoints,n=>n.annotate(e,t)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},pipe(){return ie(this,arguments)}},Fi=e=>{function t(){}return Object.setPrototypeOf(t,Vhe),Object.assign(t,e)},Qm=(e,t)=>Fi({identifier:e,topLevel:!1,endpoints:HK(),errorSchema:Jh,annotations:ns(),middlewares:new Set}),Khe=G.pipe(Km("PullRequestId")),Ghe=G.pipe(Km("RepositoryName")),dT=G.pipe(Km("AwsProfileName")),Yhe=G.pipe(Km("AwsRegion")),gN=G.pipe(Km("CommentId")),Jhe=us("OPEN","CLOSED"),Qhe=us("error","info","warning","success"),Xhe=us("idle","loading","error");class mb extends oS("Account")({id:dT,region:Yhe}){}class Whe extends oS("PullRequest")({id:Khe,title:G,description:Tt(G),author:G,repositoryName:Ghe,creationDate:Qh,lastModifiedDate:Qh,link:G,account:mb,status:Jhe,sourceBranch:G,destinationBranch:G,isMergeable:ai,isApproved:ai,commentCount:Tt(qm)}){get consoleUrl(){return`https://${this.account.region}.console.aws.amazon.com/codesuite/codecommit/repositories/${this.repositoryName}/pull-requests/${this.id}?region=${this.account.region}`}}class ETe extends oS("PRComment")({id:gN,content:G,author:G,creationDate:Qh,inReplyTo:Tt(gN),deleted:ai,filePath:Tt(G),lineNumber:Tt(qm)}){}const Zhe=Je({id:G,content:G,author:G,creationDate:G,inReplyTo:Tt(G),deleted:ai,filePath:Tt(G),lineNumber:Tt(qm)}),h6=Je({root:Zhe,replies:gn(uue(()=>h6))}),eme=Je({filePath:Tt(G),beforeCommitId:Tt(G),afterCommitId:Tt(G),comments:gn(h6)});class CTe extends oS("NotificationItem")({type:Qhe,title:G,message:G,timestamp:Qh,profile:iue(G,{exact:!0})}){}class Us extends $U()("ApiError",{message:G}){}class tme extends Qm("prs").add(pl("list","/").addSuccess(jU(Whe))).add(Ps("refresh","/refresh").addSuccess(G)).add(Ps("create","/").setPayload(Je({repositoryName:G,title:G,description:Tt(G),sourceBranch:G,destinationBranch:G,account:mb})).addSuccess(G).addError(Us)).add(Ps("open","/open").setPayload(Je({profile:G,link:G})).addSuccess(G).addError(Us)).add(Ps("comments","/comments").setPayload(Je({pullRequestId:G,repositoryName:G,account:mb})).addSuccess(gn(eme)).addError(Us)).prefix("/api/prs"){}class nme extends Qm("events").add(pl("stream","/").addSuccess(G)).prefix("/api/events"){}const m6=Je({accounts:gn(Je({profile:G,regions:gn(G),enabled:ai})),autoDetect:ai,currentUser:Tt(G)}),rme=Je({path:G,exists:ai}),ime=Je({status:us("valid","missing","corrupted"),path:G,errors:gn(G)}),sme=Je({accounts:gn(Je({profile:G,regions:gn(G),enabled:ai})),autoDetect:ai}),ame=Je({backupPath:Tt(G),config:m6});class ome extends Qm("config").add(pl("list","/").addSuccess(m6)).add(pl("path","/path").addSuccess(rme).addError(Us)).add(pl("validate","/validate").addSuccess(ime).addError(Us)).add(Ps("save","/save").setPayload(sme).addSuccess(G).addError(Us)).add(Ps("reset","/reset").addSuccess(ame).addError(Us)).prefix("/api/config"){}class lme extends Qm("accounts").add(pl("list","/").addSuccess(jU(mb))).prefix("/api/accounts"){}const cme=Je({type:us("error","info","warning","success"),title:G,message:G,timestamp:G,profile:Tt(G)});class ume extends Qm("notifications").add(pl("list","/").addSuccess(gn(cme))).add(Ps("clear","/clear").addSuccess(G)).add(Ps("ssoLogin","/sso-login").setPayload(Je({profile:dT})).addSuccess(G).addError(Us)).add(Ps("ssoLogout","/sso-logout").setPayload(Je({profile:G})).addSuccess(G).addError(Us)).prefix("/api/notifications"){}class fme extends Efe().add(tme).add(nme).add(ome).add(lme).add(ume){}class er extends xhe()("ApiClient",{api:fme,baseUrl:"/",httpClient:Phe}){}iT(er.layer);const dme={pullRequests:[],accounts:[],status:"idle"};er.query("prs","list",{reactivityKeys:["prs"],timeToLive:"30 seconds"});const hme=er.query("config","list",{reactivityKeys:["config"],timeToLive:"60 seconds"});er.query("accounts","list",{reactivityKeys:["accounts"],timeToLive:"60 seconds"});const p6=er.mutation("prs","refresh"),mme=er.mutation("prs","open"),yN=er.mutation("prs","comments"),pme=er.query("config","path",{reactivityKeys:["config"],timeToLive:"60 seconds"}),gme=er.query("config","validate",{reactivityKeys:["config"],timeToLive:"60 seconds"}),yme=er.mutation("config","save"),bme=er.mutation("config","reset");er.query("notifications","list",{reactivityKeys:["notifications"],timeToLive:"10 seconds"});const vme=er.mutation("notifications","clear"),Sme=er.mutation("notifications","ssoLogin"),g6=er.mutation("notifications","ssoLogout"),If=Ao(dme).pipe(fa),tc=Ao("prs").pipe(fa),c_=Ao("").pipe(fa),y6=Ao(null).pipe(fa),pb=Ao({type:"all"}).pipe(fa),bN=Ao(!1).pipe(fa),xme=["accounts","theme","config","about"],u_=Ao("accounts").pipe(fa),wme=Je({id:G,title:G,description:Tt(G),author:G,repositoryName:G,creationDate:Yw,lastModifiedDate:Yw,link:G,account:Je({id:G,region:G}),status:us("OPEN","CLOSED"),sourceBranch:G,destinationBranch:G,isMergeable:ai,isApproved:ai,commentCount:Tt(qm)}),_me=Je({type:us("error","info","warning","success"),title:G,message:G,timestamp:G,profile:Tt(G)}),kme=Je({pullRequests:gn(wme),accounts:gn(Je({profile:G,region:G,enabled:ai})),status:Xhe,statusDetail:Tt(G),error:Tt(G),lastUpdated:Tt(Yw),currentUser:Tt(G),notifications:Tt(gn(_me))}),Eme=uU(DU(kme));function Cme(e){const t=w.useRef(e);t.current=e,w.useEffect(()=>{const n=new EventSource("/api/events/");return n.onmessage=r=>{try{t.current(Eme(r.data))}catch{}},()=>n.close()},[])}/**
|
|
76
|
+
* @license lucide-react v0.563.0 - ISC
|
|
77
|
+
*
|
|
78
|
+
* This source code is licensed under the ISC license.
|
|
79
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
+
*/const b6=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
81
|
+
* @license lucide-react v0.563.0 - ISC
|
|
82
|
+
*
|
|
83
|
+
* This source code is licensed under the ISC license.
|
|
84
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
+
*/const Tme=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
86
|
+
* @license lucide-react v0.563.0 - ISC
|
|
87
|
+
*
|
|
88
|
+
* This source code is licensed under the ISC license.
|
|
89
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
90
|
+
*/const Ame=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
91
|
+
* @license lucide-react v0.563.0 - ISC
|
|
92
|
+
*
|
|
93
|
+
* This source code is licensed under the ISC license.
|
|
94
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
95
|
+
*/const vN=e=>{const t=Ame(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
96
|
+
* @license lucide-react v0.563.0 - ISC
|
|
97
|
+
*
|
|
98
|
+
* This source code is licensed under the ISC license.
|
|
99
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
100
|
+
*/var Ome={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
101
|
+
* @license lucide-react v0.563.0 - ISC
|
|
102
|
+
*
|
|
103
|
+
* This source code is licensed under the ISC license.
|
|
104
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
105
|
+
*/const Rme=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
106
|
+
* @license lucide-react v0.563.0 - ISC
|
|
107
|
+
*
|
|
108
|
+
* This source code is licensed under the ISC license.
|
|
109
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
+
*/const Nme=w.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:s,iconNode:a,...o},l)=>w.createElement("svg",{ref:l,...Ome,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:b6("lucide",i),...!s&&!Rme(o)&&{"aria-hidden":"true"},...o},[...a.map(([c,f])=>w.createElement(c,f)),...Array.isArray(s)?s:[s]]));/**
|
|
111
|
+
* @license lucide-react v0.563.0 - ISC
|
|
112
|
+
*
|
|
113
|
+
* This source code is licensed under the ISC license.
|
|
114
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
115
|
+
*/const Ke=(e,t)=>{const n=w.forwardRef(({className:r,...i},s)=>w.createElement(Nme,{ref:s,iconNode:t,className:b6(`lucide-${Tme(vN(e))}`,`lucide-${e}`,r),...i}));return n.displayName=vN(e),n};/**
|
|
116
|
+
* @license lucide-react v0.563.0 - ISC
|
|
117
|
+
*
|
|
118
|
+
* This source code is licensed under the ISC license.
|
|
119
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
+
*/const Mme=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],v6=Ke("arrow-left",Mme);/**
|
|
121
|
+
* @license lucide-react v0.563.0 - ISC
|
|
122
|
+
*
|
|
123
|
+
* This source code is licensed under the ISC license.
|
|
124
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
125
|
+
*/const Dme=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],zme=Ke("arrow-right",Dme);/**
|
|
126
|
+
* @license lucide-react v0.563.0 - ISC
|
|
127
|
+
*
|
|
128
|
+
* This source code is licensed under the ISC license.
|
|
129
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
130
|
+
*/const jme=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],S6=Ke("bell",jme);/**
|
|
131
|
+
* @license lucide-react v0.563.0 - ISC
|
|
132
|
+
*
|
|
133
|
+
* This source code is licensed under the ISC license.
|
|
134
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
+
*/const Ime=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],$me=Ke("check",Ime);/**
|
|
136
|
+
* @license lucide-react v0.563.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* This source code is licensed under the ISC license.
|
|
139
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
140
|
+
*/const Lme=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],dS=Ke("chevron-down",Lme);/**
|
|
141
|
+
* @license lucide-react v0.563.0 - ISC
|
|
142
|
+
*
|
|
143
|
+
* This source code is licensed under the ISC license.
|
|
144
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
145
|
+
*/const Fme=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Pme=Ke("chevron-up",Fme);/**
|
|
146
|
+
* @license lucide-react v0.563.0 - ISC
|
|
147
|
+
*
|
|
148
|
+
* This source code is licensed under the ISC license.
|
|
149
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
+
*/const Ume=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Bme=Ke("circle-alert",Ume);/**
|
|
151
|
+
* @license lucide-react v0.563.0 - ISC
|
|
152
|
+
*
|
|
153
|
+
* This source code is licensed under the ISC license.
|
|
154
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
155
|
+
*/const Hme=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],f_=Ke("circle-check-big",Hme);/**
|
|
156
|
+
* @license lucide-react v0.563.0 - ISC
|
|
157
|
+
*
|
|
158
|
+
* This source code is licensed under the ISC license.
|
|
159
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
160
|
+
*/const qme=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Vme=Ke("circle-x",qme);/**
|
|
161
|
+
* @license lucide-react v0.563.0 - ISC
|
|
162
|
+
*
|
|
163
|
+
* This source code is licensed under the ISC license.
|
|
164
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
165
|
+
*/const Kme=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Gme=Ke("copy",Kme);/**
|
|
166
|
+
* @license lucide-react v0.563.0 - ISC
|
|
167
|
+
*
|
|
168
|
+
* This source code is licensed under the ISC license.
|
|
169
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
+
*/const Yme=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Jme=Ke("external-link",Yme);/**
|
|
171
|
+
* @license lucide-react v0.563.0 - ISC
|
|
172
|
+
*
|
|
173
|
+
* This source code is licensed under the ISC license.
|
|
174
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
+
*/const Qme=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Xme=Ke("file",Qme);/**
|
|
176
|
+
* @license lucide-react v0.563.0 - ISC
|
|
177
|
+
*
|
|
178
|
+
* This source code is licensed under the ISC license.
|
|
179
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
180
|
+
*/const Wme=[["path",{d:"M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4",key:"1slcih"}]],Zme=Ke("flame",Wme);/**
|
|
181
|
+
* @license lucide-react v0.563.0 - ISC
|
|
182
|
+
*
|
|
183
|
+
* This source code is licensed under the ISC license.
|
|
184
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
185
|
+
*/const epe=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],SN=Ke("funnel",epe);/**
|
|
186
|
+
* @license lucide-react v0.563.0 - ISC
|
|
187
|
+
*
|
|
188
|
+
* This source code is licensed under the ISC license.
|
|
189
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
+
*/const tpe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],hT=Ke("info",tpe);/**
|
|
191
|
+
* @license lucide-react v0.563.0 - ISC
|
|
192
|
+
*
|
|
193
|
+
* This source code is licensed under the ISC license.
|
|
194
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
+
*/const npe=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],rpe=Ke("keyboard",npe);/**
|
|
196
|
+
* @license lucide-react v0.563.0 - ISC
|
|
197
|
+
*
|
|
198
|
+
* This source code is licensed under the ISC license.
|
|
199
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
+
*/const ipe=[["path",{d:"M12 2v4",key:"3427ic"}],["path",{d:"m16.2 7.8 2.9-2.9",key:"r700ao"}],["path",{d:"M18 12h4",key:"wj9ykh"}],["path",{d:"m16.2 16.2 2.9 2.9",key:"1bxg5t"}],["path",{d:"M12 18v4",key:"jadmvz"}],["path",{d:"m4.9 19.1 2.9-2.9",key:"bwix9q"}],["path",{d:"M2 12h4",key:"j09sii"}],["path",{d:"m4.9 4.9 2.9 2.9",key:"giyufr"}]],xN=Ke("loader",ipe);/**
|
|
201
|
+
* @license lucide-react v0.563.0 - ISC
|
|
202
|
+
*
|
|
203
|
+
* This source code is licensed under the ISC license.
|
|
204
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
+
*/const spe=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],ape=Ke("log-out",spe);/**
|
|
206
|
+
* @license lucide-react v0.563.0 - ISC
|
|
207
|
+
*
|
|
208
|
+
* This source code is licensed under the ISC license.
|
|
209
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
+
*/const ope=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],lpe=Ke("message-square",ope);/**
|
|
211
|
+
* @license lucide-react v0.563.0 - ISC
|
|
212
|
+
*
|
|
213
|
+
* This source code is licensed under the ISC license.
|
|
214
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
+
*/const cpe=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],upe=Ke("monitor",cpe);/**
|
|
216
|
+
* @license lucide-react v0.563.0 - ISC
|
|
217
|
+
*
|
|
218
|
+
* This source code is licensed under the ISC license.
|
|
219
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
+
*/const fpe=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],x6=Ke("moon",fpe);/**
|
|
221
|
+
* @license lucide-react v0.563.0 - ISC
|
|
222
|
+
*
|
|
223
|
+
* This source code is licensed under the ISC license.
|
|
224
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
+
*/const dpe=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],hpe=Ke("palette",dpe);/**
|
|
226
|
+
* @license lucide-react v0.563.0 - ISC
|
|
227
|
+
*
|
|
228
|
+
* This source code is licensed under the ISC license.
|
|
229
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
+
*/const mpe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],w6=Ke("refresh-cw",mpe);/**
|
|
231
|
+
* @license lucide-react v0.563.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* This source code is licensed under the ISC license.
|
|
234
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
+
*/const ppe=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],gpe=Ke("rotate-ccw",ppe);/**
|
|
236
|
+
* @license lucide-react v0.563.0 - ISC
|
|
237
|
+
*
|
|
238
|
+
* This source code is licensed under the ISC license.
|
|
239
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
+
*/const ype=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],mT=Ke("search",ype);/**
|
|
241
|
+
* @license lucide-react v0.563.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/const bpe=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],vpe=Ke("server",bpe);/**
|
|
246
|
+
* @license lucide-react v0.563.0 - ISC
|
|
247
|
+
*
|
|
248
|
+
* This source code is licensed under the ISC license.
|
|
249
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
+
*/const Spe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Cc=Ke("settings",Spe);/**
|
|
251
|
+
* @license lucide-react v0.563.0 - ISC
|
|
252
|
+
*
|
|
253
|
+
* This source code is licensed under the ISC license.
|
|
254
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
+
*/const xpe=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],_6=Ke("sun",xpe);/**
|
|
256
|
+
* @license lucide-react v0.563.0 - ISC
|
|
257
|
+
*
|
|
258
|
+
* This source code is licensed under the ISC license.
|
|
259
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
+
*/const wpe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],_pe=Ke("trash-2",wpe);/**
|
|
261
|
+
* @license lucide-react v0.563.0 - ISC
|
|
262
|
+
*
|
|
263
|
+
* This source code is licensed under the ISC license.
|
|
264
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
+
*/const kpe=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Epe=Ke("triangle-alert",kpe);/**
|
|
266
|
+
* @license lucide-react v0.563.0 - ISC
|
|
267
|
+
*
|
|
268
|
+
* This source code is licensed under the ISC license.
|
|
269
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
+
*/const Cpe=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],k6=Ke("user",Cpe);/**
|
|
271
|
+
* @license lucide-react v0.563.0 - ISC
|
|
272
|
+
*
|
|
273
|
+
* This source code is licensed under the ISC license.
|
|
274
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
+
*/const Tpe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],E6=Ke("x",Tpe);var wN=1,Ape=.9,Ope=.8,Rpe=.17,tx=.1,nx=.999,Npe=.9999,Mpe=.99,Dpe=/[\\\/_+.#"@\[\(\{&]/,zpe=/[\\\/_+.#"@\[\(\{&]/g,jpe=/[\s-]/,C6=/[\s-]/g;function d_(e,t,n,r,i,s,a){if(s===t.length)return i===e.length?wN:Mpe;var o=`${i},${s}`;if(a[o]!==void 0)return a[o];for(var l=r.charAt(s),c=n.indexOf(l,i),f=0,u,d,h,g;c>=0;)u=d_(e,t,n,r,c+1,s+1,a),u>f&&(c===i?u*=wN:Dpe.test(e.charAt(c-1))?(u*=Ope,h=e.slice(i,c-1).match(zpe),h&&i>0&&(u*=Math.pow(nx,h.length))):jpe.test(e.charAt(c-1))?(u*=Ape,g=e.slice(i,c-1).match(C6),g&&i>0&&(u*=Math.pow(nx,g.length))):(u*=Rpe,i>0&&(u*=Math.pow(nx,c-i))),e.charAt(c)!==t.charAt(s)&&(u*=Npe)),(u<tx&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(d=d_(e,t,n,r,c+1,s+2,a),d*tx>u&&(u=d*tx)),u>f&&(f=u),c=n.indexOf(l,c+1);return a[o]=f,f}function _N(e){return e.toLowerCase().replace(C6," ")}function Ipe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,d_(e,t,_N(e),_N(t),0,0,{})}function qe(e,t,{checkForDefaultPrevented:n=!0}={}){return function(i){if(e==null||e(i),n===!1||!i.defaultPrevented)return t==null?void 0:t(i)}}function kN(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function yo(...e){return t=>{let n=!1;const r=e.map(i=>{const s=kN(i,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let i=0;i<r.length;i++){const s=r[i];typeof s=="function"?s():kN(e[i],null)}}}}function Mt(...e){return w.useCallback(yo(...e),e)}function $pe(e,t){const n=w.createContext(t),r=s=>{const{children:a,...o}=s,l=w.useMemo(()=>o,Object.values(o));return p.jsx(n.Provider,{value:l,children:a})};r.displayName=e+"Provider";function i(s){const a=w.useContext(n);if(a)return a;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,i]}function $f(e,t=[]){let n=[];function r(s,a){const o=w.createContext(a),l=n.length;n=[...n,a];const c=u=>{var m;const{scope:d,children:h,...g}=u,v=((m=d==null?void 0:d[e])==null?void 0:m[l])||o,x=w.useMemo(()=>g,Object.values(g));return p.jsx(v.Provider,{value:x,children:h})};c.displayName=s+"Provider";function f(u,d){var v;const h=((v=d==null?void 0:d[e])==null?void 0:v[l])||o,g=w.useContext(h);if(g)return g;if(a!==void 0)return a;throw new Error(`\`${u}\` must be used within \`${s}\``)}return[c,f]}const i=()=>{const s=n.map(a=>w.createContext(a));return function(o){const l=(o==null?void 0:o[e])||s;return w.useMemo(()=>({[`__scope${e}`]:{...o,[e]:l}}),[o,l])}};return i.scopeName=e,[r,Lpe(i,...t)]}function Lpe(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(s){const a=r.reduce((o,{useScope:l,scopeName:c})=>{const u=l(s)[`__scope${c}`];return{...o,...u}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var $n=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Fpe=q_[" useId ".trim().toString()]||(()=>{}),Ppe=0;function Nr(e){const[t,n]=w.useState(Fpe());return $n(()=>{n(r=>r??String(Ppe++))},[e]),e||(t?`radix-${t}`:"")}var Upe=q_[" useInsertionEffect ".trim().toString()]||$n;function jl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=Bpe({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const f=w.useRef(e!==void 0);w.useEffect(()=>{const u=f.current;u!==o&&console.warn(`${r} is changing from ${u?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=o},[o,r])}const c=w.useCallback(f=>{var u;if(o){const d=Hpe(f)?f(e):f;d!==e&&((u=a.current)==null||u.call(a,d))}else s(f)},[o,e,s,a]);return[l,c]}function Bpe({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),i=w.useRef(n),s=w.useRef(t);return Upe(()=>{s.current=t},[t]),w.useEffect(()=>{var a;i.current!==n&&((a=s.current)==null||a.call(s,n),i.current=n)},[n,i]),[n,r,s]}function Hpe(e){return typeof e=="function"}function Wu(e){const t=qpe(e),n=w.forwardRef((r,i)=>{const{children:s,...a}=r,o=w.Children.toArray(s),l=o.find(Kpe);if(l){const c=l.props.children,f=o.map(u=>u===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:u);return p.jsx(t,{...a,ref:i,children:w.isValidElement(c)?w.cloneElement(c,void 0,f):null})}return p.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var T6=Wu("Slot");function qpe(e){const t=w.forwardRef((n,r)=>{const{children:i,...s}=n;if(w.isValidElement(i)){const a=Ype(i),o=Gpe(s,i.props);return i.type!==w.Fragment&&(o.ref=r?yo(r,a):a),w.cloneElement(i,o)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Vpe=Symbol("radix.slottable");function Kpe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vpe}function Gpe(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function Ype(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Jpe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ve=Jpe.reduce((e,t)=>{const n=Wu(`Primitive.${t}`),r=w.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qpe(e,t){e&&nf.flushSync(()=>e.dispatchEvent(t))}function bo(e){const t=w.useRef(e);return w.useEffect(()=>{t.current=e}),w.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Xpe(e,t=globalThis==null?void 0:globalThis.document){const n=bo(e);w.useEffect(()=>{const r=i=>{i.key==="Escape"&&n(i)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var Wpe="DismissableLayer",h_="dismissableLayer.update",Zpe="dismissableLayer.pointerDownOutside",ege="dismissableLayer.focusOutside",EN,A6=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),pT=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,c=w.useContext(A6),[f,u]=w.useState(null),d=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=w.useState({}),g=Mt(t,A=>u(A)),v=Array.from(c.layers),[x]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=v.indexOf(x),b=f?v.indexOf(f):-1,S=c.layersWithOutsidePointerEventsDisabled.size>0,_=b>=m,C=rge(A=>{const M=A.target,D=[...c.branches].some(N=>N.contains(M));!_||D||(i==null||i(A),a==null||a(A),A.defaultPrevented||o==null||o())},d),E=ige(A=>{const M=A.target;[...c.branches].some(N=>N.contains(M))||(s==null||s(A),a==null||a(A),A.defaultPrevented||o==null||o())},d);return Xpe(A=>{b===c.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&o&&(A.preventDefault(),o()))},d),w.useEffect(()=>{if(f)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(EN=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(f)),c.layers.add(f),CN(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=EN)}},[f,d,n,c]),w.useEffect(()=>()=>{f&&(c.layers.delete(f),c.layersWithOutsidePointerEventsDisabled.delete(f),CN())},[f,c]),w.useEffect(()=>{const A=()=>h({});return document.addEventListener(h_,A),()=>document.removeEventListener(h_,A)},[]),p.jsx(Ve.div,{...l,ref:g,style:{pointerEvents:S?_?"auto":"none":void 0,...e.style},onFocusCapture:qe(e.onFocusCapture,E.onFocusCapture),onBlurCapture:qe(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:qe(e.onPointerDownCapture,C.onPointerDownCapture)})});pT.displayName=Wpe;var tge="DismissableLayerBranch",nge=w.forwardRef((e,t)=>{const n=w.useContext(A6),r=w.useRef(null),i=Mt(t,r);return w.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(Ve.div,{...e,ref:i})});nge.displayName=tge;function rge(e,t=globalThis==null?void 0:globalThis.document){const n=bo(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){O6(Zpe,n,c,{discrete:!0})};const c={originalEvent:o};o.pointerType==="touch"?(t.removeEventListener("click",i.current),i.current=l,t.addEventListener("click",i.current,{once:!0})):l()}else t.removeEventListener("click",i.current);r.current=!1},a=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(a),t.removeEventListener("pointerdown",s),t.removeEventListener("click",i.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ige(e,t=globalThis==null?void 0:globalThis.document){const n=bo(e),r=w.useRef(!1);return w.useEffect(()=>{const i=s=>{s.target&&!r.current&&O6(ege,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",i),()=>t.removeEventListener("focusin",i)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function CN(){const e=new CustomEvent(h_);document.dispatchEvent(e)}function O6(e,t,n,{discrete:r}){const i=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?Qpe(i,s):i.dispatchEvent(s)}var rx="focusScope.autoFocusOnMount",ix="focusScope.autoFocusOnUnmount",TN={bubbles:!1,cancelable:!0},sge="FocusScope",gT=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,l]=w.useState(null),c=bo(i),f=bo(s),u=w.useRef(null),d=Mt(t,v=>l(v)),h=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let v=function(S){if(h.paused||!o)return;const _=S.target;o.contains(_)?u.current=_:wa(u.current,{select:!0})},x=function(S){if(h.paused||!o)return;const _=S.relatedTarget;_!==null&&(o.contains(_)||wa(u.current,{select:!0}))},m=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&wa(o)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const b=new MutationObserver(m);return o&&b.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),b.disconnect()}}},[r,o,h.paused]),w.useEffect(()=>{if(o){ON.add(h);const v=document.activeElement;if(!o.contains(v)){const m=new CustomEvent(rx,TN);o.addEventListener(rx,c),o.dispatchEvent(m),m.defaultPrevented||(age(fge(R6(o)),{select:!0}),document.activeElement===v&&wa(o))}return()=>{o.removeEventListener(rx,c),setTimeout(()=>{const m=new CustomEvent(ix,TN);o.addEventListener(ix,f),o.dispatchEvent(m),m.defaultPrevented||wa(v??document.body,{select:!0}),o.removeEventListener(ix,f),ON.remove(h)},0)}}},[o,c,f,h]);const g=w.useCallback(v=>{if(!n&&!r||h.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,m=document.activeElement;if(x&&m){const b=v.currentTarget,[S,_]=oge(b);S&&_?!v.shiftKey&&m===_?(v.preventDefault(),n&&wa(S,{select:!0})):v.shiftKey&&m===S&&(v.preventDefault(),n&&wa(_,{select:!0})):m===b&&v.preventDefault()}},[n,r,h.paused]);return p.jsx(Ve.div,{tabIndex:-1,...a,ref:d,onKeyDown:g})});gT.displayName=sge;function age(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(wa(r,{select:t}),document.activeElement!==n)return}function oge(e){const t=R6(e),n=AN(t,e),r=AN(t.reverse(),e);return[n,r]}function R6(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const i=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||i?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function AN(e,t){for(const n of e)if(!lge(n,{upTo:t}))return n}function lge(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 cge(e){return e instanceof HTMLInputElement&&"select"in e}function wa(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&cge(e)&&t&&e.select()}}var ON=uge();function uge(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=RN(e,t),e.unshift(t)},remove(t){var n;e=RN(e,t),(n=e[0])==null||n.resume()}}}function RN(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function fge(e){return e.filter(t=>t.tagName!=="A")}var dge="Portal",yT=w.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,s]=w.useState(!1);$n(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?DH.createPortal(p.jsx(Ve.div,{...r,ref:t}),a):null});yT.displayName=dge;function hge(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var hS=e=>{const{present:t,children:n}=e,r=mge(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),s=Mt(r.ref,pge(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:s}):null};hS.displayName="Presence";function mge(e){const[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),s=w.useRef("none"),a=e?"mounted":"unmounted",[o,l]=hge(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=zp(r.current);s.current=o==="mounted"?c:"none"},[o]),$n(()=>{const c=r.current,f=i.current;if(f!==e){const d=s.current,h=zp(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(f&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),$n(()=>{if(t){let c;const f=t.ownerDocument.defaultView??window,u=h=>{const v=zp(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&v&&(l("ANIMATION_END"),!i.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",c=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},d=h=>{h.target===t&&(s.current=zp(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",u),t.addEventListener("animationend",u),()=>{f.clearTimeout(c),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",u),t.removeEventListener("animationend",u)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:w.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function zp(e){return(e==null?void 0:e.animationName)||"none"}function pge(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var sx=0;function N6(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??NN()),document.body.insertAdjacentElement("beforeend",e[1]??NN()),sx++,()=>{sx===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),sx--}},[])}function NN(){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 Ui=function(){return Ui=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ui.apply(this,arguments)};function M6(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 i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function gge(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}var Og="right-scroll-bar-position",Rg="width-before-scroll-bar",yge="with-scroll-bars-hidden",bge="--removed-body-scroll-bar-size";function ax(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function vge(e,t){var n=w.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var i=n.value;i!==r&&(n.value=r,n.callback(r,i))}}}})[0];return n.callback=t,n.facade}var Sge=typeof window<"u"?w.useLayoutEffect:w.useEffect,MN=new WeakMap;function xge(e,t){var n=vge(null,function(r){return e.forEach(function(i){return ax(i,r)})});return Sge(function(){var r=MN.get(n);if(r){var i=new Set(r),s=new Set(e),a=n.current;i.forEach(function(o){s.has(o)||ax(o,null)}),s.forEach(function(o){i.has(o)||ax(o,a)})}MN.set(n,e)},[e]),n}function wge(e){return e}function _ge(e,t){t===void 0&&(t=wge);var n=[],r=!1,i={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(s){var a=t(s,r);return n.push(a),function(){n=n.filter(function(o){return o!==a})}},assignSyncMedium:function(s){for(r=!0;n.length;){var a=n;n=[],a.forEach(s)}n={push:function(o){return s(o)},filter:function(){return n}}},assignMedium:function(s){r=!0;var a=[];if(n.length){var o=n;n=[],o.forEach(s),a=n}var l=function(){var f=a;a=[],f.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(f){a.push(f),c()},filter:function(f){return a=a.filter(f),n}}}};return i}function kge(e){e===void 0&&(e={});var t=_ge(null);return t.options=Ui({async:!0,ssr:!1},e),t}var D6=function(e){var t=e.sideCar,n=M6(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 w.createElement(r,Ui({},n))};D6.isSideCarExport=!0;function Ege(e,t){return e.useMedium(t),D6}var z6=kge(),ox=function(){},mS=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:ox,onWheelCapture:ox,onTouchMoveCapture:ox}),i=r[0],s=r[1],a=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,f=e.enabled,u=e.shards,d=e.sideCar,h=e.noRelative,g=e.noIsolation,v=e.inert,x=e.allowPinchZoom,m=e.as,b=m===void 0?"div":m,S=e.gapMode,_=M6(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=d,E=xge([n,t]),A=Ui(Ui({},_),i);return w.createElement(w.Fragment,null,f&&w.createElement(C,{sideCar:z6,removeScrollBar:c,shards:u,noRelative:h,noIsolation:g,inert:v,setCallbacks:s,allowPinchZoom:!!x,lockRef:n,gapMode:S}),a?w.cloneElement(w.Children.only(o),Ui(Ui({},A),{ref:E})):w.createElement(b,Ui({},A,{className:l,ref:E}),o))});mS.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};mS.classNames={fullWidth:Rg,zeroRight:Og};var Cge=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Tge(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Cge();return t&&e.setAttribute("nonce",t),e}function Age(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Oge(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Rge=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Tge())&&(Age(t,n),Oge(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Nge=function(){var e=Rge();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},j6=function(){var e=Nge(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},Mge={left:0,top:0,right:0,gap:0},lx=function(e){return parseInt(e||"",10)||0},Dge=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],i=t[e==="padding"?"paddingRight":"marginRight"];return[lx(n),lx(r),lx(i)]},zge=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Mge;var t=Dge(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])}},jge=j6(),hu="data-scroll-locked",Ige=function(e,t,n,r){var i=e.left,s=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
276
|
+
.`.concat(yge,` {
|
|
277
|
+
overflow: hidden `).concat(r,`;
|
|
278
|
+
padding-right: `).concat(o,"px ").concat(r,`;
|
|
279
|
+
}
|
|
280
|
+
body[`).concat(hu,`] {
|
|
281
|
+
overflow: hidden `).concat(r,`;
|
|
282
|
+
overscroll-behavior: contain;
|
|
283
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
284
|
+
padding-left: `.concat(i,`px;
|
|
285
|
+
padding-top: `).concat(s,`px;
|
|
286
|
+
padding-right: `).concat(a,`px;
|
|
287
|
+
margin-left:0;
|
|
288
|
+
margin-top:0;
|
|
289
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
290
|
+
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.`).concat(Og,` {
|
|
294
|
+
right: `).concat(o,"px ").concat(r,`;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.`).concat(Rg,` {
|
|
298
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.`).concat(Og," .").concat(Og,` {
|
|
302
|
+
right: 0 `).concat(r,`;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.`).concat(Rg," .").concat(Rg,` {
|
|
306
|
+
margin-right: 0 `).concat(r,`;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
body[`).concat(hu,`] {
|
|
310
|
+
`).concat(bge,": ").concat(o,`px;
|
|
311
|
+
}
|
|
312
|
+
`)},DN=function(){var e=parseInt(document.body.getAttribute(hu)||"0",10);return isFinite(e)?e:0},$ge=function(){w.useEffect(function(){return document.body.setAttribute(hu,(DN()+1).toString()),function(){var e=DN()-1;e<=0?document.body.removeAttribute(hu):document.body.setAttribute(hu,e.toString())}},[])},Lge=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;$ge();var s=w.useMemo(function(){return zge(i)},[i]);return w.createElement(jge,{styles:Ige(s,!t,i,n?"":"!important")})},m_=!1;if(typeof window<"u")try{var jp=Object.defineProperty({},"passive",{get:function(){return m_=!0,!0}});window.addEventListener("test",jp,jp),window.removeEventListener("test",jp,jp)}catch{m_=!1}var hc=m_?{passive:!1}:!1,Fge=function(e){return e.tagName==="TEXTAREA"},I6=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Fge(e)&&n[t]==="visible")},Pge=function(e){return I6(e,"overflowY")},Uge=function(e){return I6(e,"overflowX")},zN=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=$6(e,r);if(i){var s=L6(e,r),a=s[1],o=s[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Bge=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Hge=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},$6=function(e,t){return e==="v"?Pge(t):Uge(t)},L6=function(e,t){return e==="v"?Bge(t):Hge(t)},qge=function(e,t){return e==="h"&&t==="rtl"?-1:1},Vge=function(e,t,n,r,i){var s=qge(e,window.getComputedStyle(t).direction),a=s*r,o=n.target,l=t.contains(o),c=!1,f=a>0,u=0,d=0;do{if(!o)break;var h=L6(e,o),g=h[0],v=h[1],x=h[2],m=v-x-s*g;(g||m)&&$6(e,o)&&(u+=m,d+=g);var b=o.parentNode;o=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(f&&Math.abs(u)<1||!f&&Math.abs(d)<1)&&(c=!0),c},Ip=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jN=function(e){return[e.deltaX,e.deltaY]},IN=function(e){return e&&"current"in e?e.current:e},Kge=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Gge=function(e){return`
|
|
313
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
314
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
315
|
+
`)},Yge=0,mc=[];function Jge(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(Yge++)[0],s=w.useState(j6)[0],a=w.useRef(e);w.useEffect(function(){a.current=e},[e]),w.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(i));var v=gge([e.lockRef.current],(e.shards||[]).map(IN),!0).filter(Boolean);return v.forEach(function(x){return x.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),v.forEach(function(x){return x.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=w.useCallback(function(v,x){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!a.current.allowPinchZoom;var m=Ip(v),b=n.current,S="deltaX"in v?v.deltaX:b[0]-m[0],_="deltaY"in v?v.deltaY:b[1]-m[1],C,E=v.target,A=Math.abs(S)>Math.abs(_)?"h":"v";if("touches"in v&&A==="h"&&E.type==="range")return!1;var M=window.getSelection(),D=M&&M.anchorNode,N=D?D===E||D.contains(E):!1;if(N)return!1;var I=zN(A,E);if(!I)return!0;if(I?C=A:(C=A==="v"?"h":"v",I=zN(A,E)),!I)return!1;if(!r.current&&"changedTouches"in v&&(S||_)&&(r.current=C),!C)return!0;var $=r.current||C;return Vge($,x,v,$==="h"?S:_)},[]),l=w.useCallback(function(v){var x=v;if(!(!mc.length||mc[mc.length-1]!==s)){var m="deltaY"in x?jN(x):Ip(x),b=t.current.filter(function(C){return C.name===x.type&&(C.target===x.target||x.target===C.shadowParent)&&Kge(C.delta,m)})[0];if(b&&b.should){x.cancelable&&x.preventDefault();return}if(!b){var S=(a.current.shards||[]).map(IN).filter(Boolean).filter(function(C){return C.contains(x.target)}),_=S.length>0?o(x,S[0]):!a.current.noIsolation;_&&x.cancelable&&x.preventDefault()}}},[]),c=w.useCallback(function(v,x,m,b){var S={name:v,delta:x,target:m,should:b,shadowParent:Qge(m)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(_){return _!==S})},1)},[]),f=w.useCallback(function(v){n.current=Ip(v),r.current=void 0},[]),u=w.useCallback(function(v){c(v.type,jN(v),v.target,o(v,e.lockRef.current))},[]),d=w.useCallback(function(v){c(v.type,Ip(v),v.target,o(v,e.lockRef.current))},[]);w.useEffect(function(){return mc.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:d}),document.addEventListener("wheel",l,hc),document.addEventListener("touchmove",l,hc),document.addEventListener("touchstart",f,hc),function(){mc=mc.filter(function(v){return v!==s}),document.removeEventListener("wheel",l,hc),document.removeEventListener("touchmove",l,hc),document.removeEventListener("touchstart",f,hc)}},[]);var h=e.removeScrollBar,g=e.inert;return w.createElement(w.Fragment,null,g?w.createElement(s,{styles:Gge(i)}):null,h?w.createElement(Lge,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Qge(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xge=Ege(z6,Jge);var bT=w.forwardRef(function(e,t){return w.createElement(mS,Ui({},e,{ref:t,sideCar:Xge}))});bT.classNames=mS.classNames;var Wge=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},pc=new WeakMap,$p=new WeakMap,Lp={},cx=0,F6=function(e){return e&&(e.host||F6(e.parentNode))},Zge=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=F6(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})},eye=function(e,t,n,r){var i=Zge(t,Array.isArray(e)?e:[e]);Lp[n]||(Lp[n]=new WeakMap);var s=Lp[n],a=[],o=new Set,l=new Set(i),c=function(u){!u||o.has(u)||(o.add(u),c(u.parentNode))};i.forEach(c);var f=function(u){!u||l.has(u)||Array.prototype.forEach.call(u.children,function(d){if(o.has(d))f(d);else try{var h=d.getAttribute(r),g=h!==null&&h!=="false",v=(pc.get(d)||0)+1,x=(s.get(d)||0)+1;pc.set(d,v),s.set(d,x),a.push(d),v===1&&g&&$p.set(d,!0),x===1&&d.setAttribute(n,"true"),g||d.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",d,m)}})};return f(t),o.clear(),cx++,function(){a.forEach(function(u){var d=pc.get(u)-1,h=s.get(u)-1;pc.set(u,d),s.set(u,h),d||($p.has(u)||u.removeAttribute(r),$p.delete(u)),h||u.removeAttribute(n)}),cx--,cx||(pc=new WeakMap,pc=new WeakMap,$p=new WeakMap,Lp={})}},P6=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=Wge(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),eye(r,i,n,"aria-hidden")):function(){return null}},pS="Dialog",[U6]=$f(pS),[tye,$i]=U6(pS),B6=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:s,modal:a=!0}=e,o=w.useRef(null),l=w.useRef(null),[c,f]=jl({prop:r,defaultProp:i??!1,onChange:s,caller:pS});return p.jsx(tye,{scope:t,triggerRef:o,contentRef:l,contentId:Nr(),titleId:Nr(),descriptionId:Nr(),open:c,onOpenChange:f,onOpenToggle:w.useCallback(()=>f(u=>!u),[f]),modal:a,children:n})};B6.displayName=pS;var H6="DialogTrigger",nye=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(H6,n),s=Mt(t,i.triggerRef);return p.jsx(Ve.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":xT(i.open),...r,ref:s,onClick:qe(e.onClick,i.onOpenToggle)})});nye.displayName=H6;var vT="DialogPortal",[rye,q6]=U6(vT,{forceMount:void 0}),V6=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=$i(vT,t);return p.jsx(rye,{scope:t,forceMount:n,children:w.Children.map(r,a=>p.jsx(hS,{present:n||s.open,children:p.jsx(yT,{asChild:!0,container:i,children:a})}))})};V6.displayName=vT;var gb="DialogOverlay",K6=w.forwardRef((e,t)=>{const n=q6(gb,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=$i(gb,e.__scopeDialog);return s.modal?p.jsx(hS,{present:r||s.open,children:p.jsx(sye,{...i,ref:t})}):null});K6.displayName=gb;var iye=Wu("DialogOverlay.RemoveScroll"),sye=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(gb,n);return p.jsx(bT,{as:iye,allowPinchZoom:!0,shards:[i.contentRef],children:p.jsx(Ve.div,{"data-state":xT(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Il="DialogContent",G6=w.forwardRef((e,t)=>{const n=q6(Il,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=$i(Il,e.__scopeDialog);return p.jsx(hS,{present:r||s.open,children:s.modal?p.jsx(aye,{...i,ref:t}):p.jsx(oye,{...i,ref:t})})});G6.displayName=Il;var aye=w.forwardRef((e,t)=>{const n=$i(Il,e.__scopeDialog),r=w.useRef(null),i=Mt(t,n.contentRef,r);return w.useEffect(()=>{const s=r.current;if(s)return P6(s)},[]),p.jsx(Y6,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:qe(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:qe(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:qe(e.onFocusOutside,s=>s.preventDefault())})}),oye=w.forwardRef((e,t)=>{const n=$i(Il,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return p.jsx(Y6,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var a,o;(a=e.onCloseAutoFocus)==null||a.call(e,s),s.defaultPrevented||(r.current||(o=n.triggerRef.current)==null||o.focus(),s.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:s=>{var l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const a=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(a))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&i.current&&s.preventDefault()}})}),Y6=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=$i(Il,n),l=w.useRef(null),c=Mt(t,l);return N6(),p.jsxs(p.Fragment,{children:[p.jsx(gT,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:p.jsx(pT,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":xT(o.open),...a,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(lye,{titleId:o.titleId}),p.jsx(uye,{contentRef:l,descriptionId:o.descriptionId})]})]})}),ST="DialogTitle",J6=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(ST,n);return p.jsx(Ve.h2,{id:i.titleId,...r,ref:t})});J6.displayName=ST;var Q6="DialogDescription",X6=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(Q6,n);return p.jsx(Ve.p,{id:i.descriptionId,...r,ref:t})});X6.displayName=Q6;var W6="DialogClose",Z6=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=$i(W6,n);return p.jsx(Ve.button,{type:"button",...r,ref:t,onClick:qe(e.onClick,()=>i.onOpenChange(!1))})});Z6.displayName=W6;function xT(e){return e?"open":"closed"}var eB="DialogTitleWarning",[TTe,tB]=$pe(eB,{contentName:Il,titleName:ST,docsSlug:"dialog"}),lye=({titleId:e})=>{const t=tB(eB),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
316
|
+
|
|
317
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
318
|
+
|
|
319
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return w.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},cye="DialogDescriptionWarning",uye=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${tB(cye).contentName}}.`;return w.useEffect(()=>{var s;const i=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&i&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},nB=B6,rB=V6,iB=K6,sB=G6,fye=J6,dye=X6,hye=Z6,mye=Symbol.for("react.lazy"),yb=q_[" use ".trim().toString()];function pye(e){return typeof e=="object"&&e!==null&&"then"in e}function aB(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===mye&&"_payload"in e&&pye(e._payload)}function gye(e){const t=yye(e),n=w.forwardRef((r,i)=>{let{children:s,...a}=r;aB(s)&&typeof yb=="function"&&(s=yb(s._payload));const o=w.Children.toArray(s),l=o.find(vye);if(l){const c=l.props.children,f=o.map(u=>u===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:u);return p.jsx(t,{...a,ref:i,children:w.isValidElement(c)?w.cloneElement(c,void 0,f):null})}return p.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function yye(e){const t=w.forwardRef((n,r)=>{let{children:i,...s}=n;if(aB(i)&&typeof yb=="function"&&(i=yb(i._payload)),w.isValidElement(i)){const a=xye(i),o=Sye(s,i.props);return i.type!==w.Fragment&&(o.ref=r?yo(r,a):a),w.cloneElement(i,o)}return w.Children.count(i)>1?w.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var bye=Symbol("radix.slottable");function vye(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===bye}function Sye(e,t){const n={...t};for(const r in t){const i=e[r],s=t[r];/^on[A-Z]/.test(r)?i&&s?n[r]=(...o)=>{const l=s(...o);return i(...o),l}:i&&(n[r]=i):r==="style"?n[r]={...i,...s}:r==="className"&&(n[r]=[i,s].filter(Boolean).join(" "))}return{...e,...n}}function xye(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var wye=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Ro=wye.reduce((e,t)=>{const n=gye(`Primitive.${t}`),r=w.forwardRef((i,s)=>{const{asChild:a,...o}=i,l=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fd='[cmdk-group=""]',ux='[cmdk-group-items=""]',_ye='[cmdk-group-heading=""]',oB='[cmdk-item=""]',$N=`${oB}:not([aria-disabled="true"])`,p_="cmdk-item-select",Tc="data-value",kye=(e,t,n)=>Ipe(e,t,n),lB=w.createContext(void 0),Xm=()=>w.useContext(lB),cB=w.createContext(void 0),wT=()=>w.useContext(cB),uB=w.createContext(void 0),fB=w.forwardRef((e,t)=>{let n=Ac(()=>{var U,T;return{search:"",value:(T=(U=e.value)!=null?U:e.defaultValue)!=null?T:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Ac(()=>new Set),i=Ac(()=>new Map),s=Ac(()=>new Map),a=Ac(()=>new Set),o=dB(e),{label:l,children:c,value:f,onValueChange:u,filter:d,shouldFilter:h,loop:g,disablePointerSelection:v=!1,vimBindings:x=!0,...m}=e,b=Nr(),S=Nr(),_=Nr(),C=w.useRef(null),E=jye();$l(()=>{if(f!==void 0){let U=f.trim();n.current.value=U,A.emit()}},[f]),$l(()=>{E(6,X)},[]);let A=w.useMemo(()=>({subscribe:U=>(a.current.add(U),()=>a.current.delete(U)),snapshot:()=>n.current,setState:(U,T,Z)=>{var ee,le,H,me;if(!Object.is(n.current[U],T)){if(n.current[U]=T,U==="search")$(),N(),E(1,I);else if(U==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let xe=document.getElementById(_);xe?xe.focus():(ee=document.getElementById(b))==null||ee.focus()}if(E(7,()=>{var xe;n.current.selectedItemId=(xe=Q())==null?void 0:xe.id,A.emit()}),Z||E(5,X),((le=o.current)==null?void 0:le.value)!==void 0){let xe=T??"";(me=(H=o.current).onValueChange)==null||me.call(H,xe);return}}A.emit()}},emit:()=>{a.current.forEach(U=>U())}}),[]),M=w.useMemo(()=>({value:(U,T,Z)=>{var ee;T!==((ee=s.current.get(U))==null?void 0:ee.value)&&(s.current.set(U,{value:T,keywords:Z}),n.current.filtered.items.set(U,D(T,Z)),E(2,()=>{N(),A.emit()}))},item:(U,T)=>(r.current.add(U),T&&(i.current.has(T)?i.current.get(T).add(U):i.current.set(T,new Set([U]))),E(3,()=>{$(),N(),n.current.value||I(),A.emit()}),()=>{s.current.delete(U),r.current.delete(U),n.current.filtered.items.delete(U);let Z=Q();E(4,()=>{$(),(Z==null?void 0:Z.getAttribute("id"))===U&&I(),A.emit()})}),group:U=>(i.current.has(U)||i.current.set(U,new Set),()=>{s.current.delete(U),i.current.delete(U)}),filter:()=>o.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:b,inputId:_,labelId:S,listInnerRef:C}),[]);function D(U,T){var Z,ee;let le=(ee=(Z=o.current)==null?void 0:Z.filter)!=null?ee:kye;return U?le(U,n.current.search,T):0}function N(){if(!n.current.search||o.current.shouldFilter===!1)return;let U=n.current.filtered.items,T=[];n.current.filtered.groups.forEach(ee=>{let le=i.current.get(ee),H=0;le.forEach(me=>{let xe=U.get(me);H=Math.max(xe,H)}),T.push([ee,H])});let Z=C.current;Y().sort((ee,le)=>{var H,me;let xe=ee.getAttribute("id"),we=le.getAttribute("id");return((H=U.get(we))!=null?H:0)-((me=U.get(xe))!=null?me:0)}).forEach(ee=>{let le=ee.closest(ux);le?le.appendChild(ee.parentElement===le?ee:ee.closest(`${ux} > *`)):Z.appendChild(ee.parentElement===Z?ee:ee.closest(`${ux} > *`))}),T.sort((ee,le)=>le[1]-ee[1]).forEach(ee=>{var le;let H=(le=C.current)==null?void 0:le.querySelector(`${fd}[${Tc}="${encodeURIComponent(ee[0])}"]`);H==null||H.parentElement.appendChild(H)})}function I(){let U=Y().find(Z=>Z.getAttribute("aria-disabled")!=="true"),T=U==null?void 0:U.getAttribute(Tc);A.setState("value",T||void 0)}function $(){var U,T,Z,ee;if(!n.current.search||o.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let le=0;for(let H of r.current){let me=(T=(U=s.current.get(H))==null?void 0:U.value)!=null?T:"",xe=(ee=(Z=s.current.get(H))==null?void 0:Z.keywords)!=null?ee:[],we=D(me,xe);n.current.filtered.items.set(H,we),we>0&&le++}for(let[H,me]of i.current)for(let xe of me)if(n.current.filtered.items.get(xe)>0){n.current.filtered.groups.add(H);break}n.current.filtered.count=le}function X(){var U,T,Z;let ee=Q();ee&&(((U=ee.parentElement)==null?void 0:U.firstChild)===ee&&((Z=(T=ee.closest(fd))==null?void 0:T.querySelector(_ye))==null||Z.scrollIntoView({block:"nearest"})),ee.scrollIntoView({block:"nearest"}))}function Q(){var U;return(U=C.current)==null?void 0:U.querySelector(`${oB}[aria-selected="true"]`)}function Y(){var U;return Array.from(((U=C.current)==null?void 0:U.querySelectorAll($N))||[])}function z(U){let T=Y()[U];T&&A.setState("value",T.getAttribute(Tc))}function L(U){var T;let Z=Q(),ee=Y(),le=ee.findIndex(me=>me===Z),H=ee[le+U];(T=o.current)!=null&&T.loop&&(H=le+U<0?ee[ee.length-1]:le+U===ee.length?ee[0]:ee[le+U]),H&&A.setState("value",H.getAttribute(Tc))}function j(U){let T=Q(),Z=T==null?void 0:T.closest(fd),ee;for(;Z&&!ee;)Z=U>0?Dye(Z,fd):zye(Z,fd),ee=Z==null?void 0:Z.querySelector($N);ee?A.setState("value",ee.getAttribute(Tc)):L(U)}let ne=()=>z(Y().length-1),R=U=>{U.preventDefault(),U.metaKey?ne():U.altKey?j(1):L(1)},Re=U=>{U.preventDefault(),U.metaKey?z(0):U.altKey?j(-1):L(-1)};return w.createElement(Ro.div,{ref:t,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:U=>{var T;(T=m.onKeyDown)==null||T.call(m,U);let Z=U.nativeEvent.isComposing||U.keyCode===229;if(!(U.defaultPrevented||Z))switch(U.key){case"n":case"j":{x&&U.ctrlKey&&R(U);break}case"ArrowDown":{R(U);break}case"p":case"k":{x&&U.ctrlKey&&Re(U);break}case"ArrowUp":{Re(U);break}case"Home":{U.preventDefault(),z(0);break}case"End":{U.preventDefault(),ne();break}case"Enter":{U.preventDefault();let ee=Q();if(ee){let le=new Event(p_);ee.dispatchEvent(le)}}}}},w.createElement("label",{"cmdk-label":"",htmlFor:M.inputId,id:M.labelId,style:$ye},l),gS(e,U=>w.createElement(cB.Provider,{value:A},w.createElement(lB.Provider,{value:M},U))))}),Eye=w.forwardRef((e,t)=>{var n,r;let i=Nr(),s=w.useRef(null),a=w.useContext(uB),o=Xm(),l=dB(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;$l(()=>{if(!c)return o.item(i,a==null?void 0:a.id)},[c]);let f=hB(i,s,[e.value,e.children,s],e.keywords),u=wT(),d=vo(E=>E.value&&E.value===f.current),h=vo(E=>c||o.filter()===!1?!0:E.search?E.filtered.items.get(i)>0:!0);w.useEffect(()=>{let E=s.current;if(!(!E||e.disabled))return E.addEventListener(p_,g),()=>E.removeEventListener(p_,g)},[h,e.onSelect,e.disabled]);function g(){var E,A;v(),(A=(E=l.current).onSelect)==null||A.call(E,f.current)}function v(){u.setState("value",f.current,!0)}if(!h)return null;let{disabled:x,value:m,onSelect:b,forceMount:S,keywords:_,...C}=e;return w.createElement(Ro.div,{ref:yo(s,t),...C,id:i,"cmdk-item":"",role:"option","aria-disabled":!!x,"aria-selected":!!d,"data-disabled":!!x,"data-selected":!!d,onPointerMove:x||o.getDisablePointerSelection()?void 0:v,onClick:x?void 0:g},e.children)}),Cye=w.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...s}=e,a=Nr(),o=w.useRef(null),l=w.useRef(null),c=Nr(),f=Xm(),u=vo(h=>i||f.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);$l(()=>f.group(a),[]),hB(a,o,[e.value,e.heading,l]);let d=w.useMemo(()=>({id:a,forceMount:i}),[i]);return w.createElement(Ro.div,{ref:yo(o,t),...s,"cmdk-group":"",role:"presentation",hidden:u?void 0:!0},n&&w.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),gS(e,h=>w.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},w.createElement(uB.Provider,{value:d},h))))}),Tye=w.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=w.useRef(null),s=vo(a=>!a.search);return!n&&!s?null:w.createElement(Ro.div,{ref:yo(i,t),...r,"cmdk-separator":"",role:"separator"})}),Aye=w.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,s=wT(),a=vo(c=>c.search),o=vo(c=>c.selectedItemId),l=Xm();return w.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),w.createElement(Ro.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":o,id:l.inputId,type:"text",value:i?e.value:a,onChange:c=>{i||s.setState("search",c.target.value),n==null||n(c.target.value)}})}),Oye=w.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,s=w.useRef(null),a=w.useRef(null),o=vo(c=>c.selectedItemId),l=Xm();return w.useEffect(()=>{if(a.current&&s.current){let c=a.current,f=s.current,u,d=new ResizeObserver(()=>{u=requestAnimationFrame(()=>{let h=c.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(c),()=>{cancelAnimationFrame(u),d.unobserve(c)}}},[]),w.createElement(Ro.div,{ref:yo(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":r,id:l.listId},gS(e,c=>w.createElement("div",{ref:yo(a,l.listInnerRef),"cmdk-list-sizer":""},c)))}),Rye=w.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:s,container:a,...o}=e;return w.createElement(nB,{open:n,onOpenChange:r},w.createElement(rB,{container:a},w.createElement(iB,{"cmdk-overlay":"",className:i}),w.createElement(sB,{"aria-label":e.label,"cmdk-dialog":"",className:s},w.createElement(fB,{ref:t,...o}))))}),Nye=w.forwardRef((e,t)=>vo(n=>n.filtered.count===0)?w.createElement(Ro.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Mye=w.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...s}=e;return w.createElement(Ro.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},gS(e,a=>w.createElement("div",{"aria-hidden":!0},a)))}),nc=Object.assign(fB,{List:Oye,Item:Eye,Input:Aye,Group:Cye,Separator:Tye,Dialog:Rye,Empty:Nye,Loading:Mye});function Dye(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function zye(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function dB(e){let t=w.useRef(e);return $l(()=>{t.current=e}),t}var $l=typeof window>"u"?w.useEffect:w.useLayoutEffect;function Ac(e){let t=w.useRef();return t.current===void 0&&(t.current=e()),t}function vo(e){let t=wT(),n=()=>e(t.snapshot());return w.useSyncExternalStore(t.subscribe,n,n)}function hB(e,t,n,r=[]){let i=w.useRef(),s=Xm();return $l(()=>{var a;let o=(()=>{var c;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(c=f.current.textContent)==null?void 0:c.trim():i.current}})(),l=r.map(c=>c.trim());s.value(e,o,l),(a=t.current)==null||a.setAttribute(Tc,o),i.current=o}),i}var jye=()=>{let[e,t]=w.useState(),n=Ac(()=>new Map);return $l(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function Iye(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function gS({asChild:e,children:t},n){return e&&w.isValidElement(t)?w.cloneElement(Iye(t),{ref:t.ref},n(t.props.children)):n(t)}var $ye={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},mB=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Lye="VisuallyHidden",Fye=w.forwardRef((e,t)=>p.jsx(Ve.span,{...e,ref:t,style:{...mB,...e.style}}));Fye.displayName=Lye;function pB(e){const t=e+"CollectionProvider",[n,r]=$f(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=v=>{const{scope:x,children:m}=v,b=qt.useRef(null),S=qt.useRef(new Map).current;return p.jsx(i,{scope:x,itemMap:S,collectionRef:b,children:m})};a.displayName=t;const o=e+"CollectionSlot",l=Wu(o),c=qt.forwardRef((v,x)=>{const{scope:m,children:b}=v,S=s(o,m),_=Mt(x,S.collectionRef);return p.jsx(l,{ref:_,children:b})});c.displayName=o;const f=e+"CollectionItemSlot",u="data-radix-collection-item",d=Wu(f),h=qt.forwardRef((v,x)=>{const{scope:m,children:b,...S}=v,_=qt.useRef(null),C=Mt(x,_),E=s(f,m);return qt.useEffect(()=>(E.itemMap.set(_,{ref:_,...S}),()=>void E.itemMap.delete(_))),p.jsx(d,{[u]:"",ref:C,children:b})});h.displayName=f;function g(v){const x=s(e+"CollectionConsumer",v);return qt.useCallback(()=>{const b=x.collectionRef.current;if(!b)return[];const S=Array.from(b.querySelectorAll(`[${u}]`));return Array.from(x.itemMap.values()).sort((E,A)=>S.indexOf(E.ref.current)-S.indexOf(A.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:a,Slot:c,ItemSlot:h},g,r]}var Pye=w.createContext(void 0);function _T(e){const t=w.useContext(Pye);return e||t||"ltr"}function Uye(e){const t=w.useRef({value:e,previous:e});return w.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Bye(e){const[t,n]=w.useState(void 0);return $n(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const s=i[0];let a,o;if("borderBoxSize"in s){const l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;a=c.inlineSize,o=c.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}const Hye=["top","right","bottom","left"],So=Math.min,xr=Math.max,bb=Math.round,Fp=Math.floor,ts=e=>({x:e,y:e}),qye={left:"right",right:"left",bottom:"top",top:"bottom"},Vye={start:"end",end:"start"};function g_(e,t,n){return xr(e,So(t,n))}function na(e,t){return typeof e=="function"?e(t):e}function ra(e){return e.split("-")[0]}function Lf(e){return e.split("-")[1]}function kT(e){return e==="x"?"y":"x"}function ET(e){return e==="y"?"height":"width"}const Kye=new Set(["top","bottom"]);function Qi(e){return Kye.has(ra(e))?"y":"x"}function CT(e){return kT(Qi(e))}function Gye(e,t,n){n===void 0&&(n=!1);const r=Lf(e),i=CT(e),s=ET(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=vb(a)),[a,vb(a)]}function Yye(e){const t=vb(e);return[y_(e),t,y_(t)]}function y_(e){return e.replace(/start|end/g,t=>Vye[t])}const LN=["left","right"],FN=["right","left"],Jye=["top","bottom"],Qye=["bottom","top"];function Xye(e,t,n){switch(e){case"top":case"bottom":return n?t?FN:LN:t?LN:FN;case"left":case"right":return t?Jye:Qye;default:return[]}}function Wye(e,t,n,r){const i=Lf(e);let s=Xye(ra(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(y_)))),s}function vb(e){return e.replace(/left|right|bottom|top/g,t=>qye[t])}function Zye(e){return{top:0,right:0,bottom:0,left:0,...e}}function gB(e){return typeof e!="number"?Zye(e):{top:e,right:e,bottom:e,left:e}}function Sb(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function PN(e,t,n){let{reference:r,floating:i}=e;const s=Qi(t),a=CT(t),o=ET(a),l=ra(t),c=s==="y",f=r.x+r.width/2-i.width/2,u=r.y+r.height/2-i.height/2,d=r[o]/2-i[o]/2;let h;switch(l){case"top":h={x:f,y:r.y-i.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:u};break;case"left":h={x:r.x-i.width,y:u};break;default:h={x:r.x,y:r.y}}switch(Lf(t)){case"start":h[a]-=d*(n&&c?-1:1);break;case"end":h[a]+=d*(n&&c?-1:1);break}return h}async function ebe(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:a,elements:o,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:d=!1,padding:h=0}=na(t,e),g=gB(h),x=o[d?u==="floating"?"reference":"floating":u],m=Sb(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(x)))==null||n?x:x.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:f,strategy:l})),b=u==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,S=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),_=await(s.isElement==null?void 0:s.isElement(S))?await(s.getScale==null?void 0:s.getScale(S))||{x:1,y:1}:{x:1,y:1},C=Sb(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:b,offsetParent:S,strategy:l}):b);return{top:(m.top-C.top+g.top)/_.y,bottom:(C.bottom-m.bottom+g.bottom)/_.y,left:(m.left-C.left+g.left)/_.x,right:(C.right-m.right+g.right)/_.x}}const tbe=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:a}=n,o=s.filter(Boolean),l=await(a.isRTL==null?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:f,y:u}=PN(c,r,l),d=r,h={},g=0;for(let x=0;x<o.length;x++){var v;const{name:m,fn:b}=o[x],{x:S,y:_,data:C,reset:E}=await b({x:f,y:u,initialPlacement:r,placement:d,strategy:i,middlewareData:h,rects:c,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:ebe},elements:{reference:e,floating:t}});f=S??f,u=_??u,h={...h,[m]:{...h[m],...C}},E&&g<=50&&(g++,typeof E=="object"&&(E.placement&&(d=E.placement),E.rects&&(c=E.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):E.rects),{x:f,y:u}=PN(c,d,l)),x=-1)}return{x:f,y:u,placement:d,strategy:i,middlewareData:h}},nbe=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:i,rects:s,platform:a,elements:o,middlewareData:l}=t,{element:c,padding:f=0}=na(e,t)||{};if(c==null)return{};const u=gB(f),d={x:n,y:r},h=CT(i),g=ET(h),v=await a.getDimensions(c),x=h==="y",m=x?"top":"left",b=x?"bottom":"right",S=x?"clientHeight":"clientWidth",_=s.reference[g]+s.reference[h]-d[h]-s.floating[g],C=d[h]-s.reference[h],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let A=E?E[S]:0;(!A||!await(a.isElement==null?void 0:a.isElement(E)))&&(A=o.floating[S]||s.floating[g]);const M=_/2-C/2,D=A/2-v[g]/2-1,N=So(u[m],D),I=So(u[b],D),$=N,X=A-v[g]-I,Q=A/2-v[g]/2+M,Y=g_($,Q,X),z=!l.arrow&&Lf(i)!=null&&Q!==Y&&s.reference[g]/2-(Q<$?N:I)-v[g]/2<0,L=z?Q<$?Q-$:Q-X:0;return{[h]:d[h]+L,data:{[h]:Y,centerOffset:Q-Y-L,...z&&{alignmentOffset:L}},reset:z}}}),rbe=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:s,rects:a,initialPlacement:o,platform:l,elements:c}=t,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:v=!0,...x}=na(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=ra(i),b=Qi(o),S=ra(o)===o,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=d||(S||!v?[vb(o)]:Yye(o)),E=g!=="none";!d&&E&&C.push(...Wye(o,v,g,_));const A=[o,...C],M=await l.detectOverflow(t,x),D=[];let N=((r=s.flip)==null?void 0:r.overflows)||[];if(f&&D.push(M[m]),u){const Q=Gye(i,a,_);D.push(M[Q[0]],M[Q[1]])}if(N=[...N,{placement:i,overflows:D}],!D.every(Q=>Q<=0)){var I,$;const Q=(((I=s.flip)==null?void 0:I.index)||0)+1,Y=A[Q];if(Y&&(!(u==="alignment"?b!==Qi(Y):!1)||N.every(j=>Qi(j.placement)===b?j.overflows[0]>0:!0)))return{data:{index:Q,overflows:N},reset:{placement:Y}};let z=($=N.filter(L=>L.overflows[0]<=0).sort((L,j)=>L.overflows[1]-j.overflows[1])[0])==null?void 0:$.placement;if(!z)switch(h){case"bestFit":{var X;const L=(X=N.filter(j=>{if(E){const ne=Qi(j.placement);return ne===b||ne==="y"}return!0}).map(j=>[j.placement,j.overflows.filter(ne=>ne>0).reduce((ne,R)=>ne+R,0)]).sort((j,ne)=>j[1]-ne[1])[0])==null?void 0:X[0];L&&(z=L);break}case"initialPlacement":z=o;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function UN(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function BN(e){return Hye.some(t=>e[t]>=0)}const ibe=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=na(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),o=UN(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:BN(o)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),o=UN(a,n.floating);return{data:{escapedOffsets:o,escaped:BN(o)}}}default:return{}}}}},yB=new Set(["left","top"]);async function sbe(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=ra(n),o=Lf(n),l=Qi(n)==="y",c=yB.has(a)?-1:1,f=s&&l?-1:1,u=na(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return o&&typeof g=="number"&&(h=o==="end"?g*-1:g),l?{x:h*f,y:d*c}:{x:d*c,y:h*f}}const abe=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:s,placement:a,middlewareData:o}=t,l=await sbe(t,e);return a===((n=o.offset)==null?void 0:n.placement)&&(r=o.arrow)!=null&&r.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:a}}}}},obe=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:s}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:l={fn:m=>{let{x:b,y:S}=m;return{x:b,y:S}}},...c}=na(e,t),f={x:n,y:r},u=await s.detectOverflow(t,c),d=Qi(ra(i)),h=kT(d);let g=f[h],v=f[d];if(a){const m=h==="y"?"top":"left",b=h==="y"?"bottom":"right",S=g+u[m],_=g-u[b];g=g_(S,g,_)}if(o){const m=d==="y"?"top":"left",b=d==="y"?"bottom":"right",S=v+u[m],_=v-u[b];v=g_(S,v,_)}const x=l.fn({...t,[h]:g,[d]:v});return{...x,data:{x:x.x-n,y:x.y-r,enabled:{[h]:a,[d]:o}}}}}},lbe=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:s,middlewareData:a}=t,{offset:o=0,mainAxis:l=!0,crossAxis:c=!0}=na(e,t),f={x:n,y:r},u=Qi(i),d=kT(u);let h=f[d],g=f[u];const v=na(o,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const S=d==="y"?"height":"width",_=s.reference[d]-s.floating[S]+x.mainAxis,C=s.reference[d]+s.reference[S]-x.mainAxis;h<_?h=_:h>C&&(h=C)}if(c){var m,b;const S=d==="y"?"width":"height",_=yB.has(ra(i)),C=s.reference[u]-s.floating[S]+(_&&((m=a.offset)==null?void 0:m[u])||0)+(_?0:x.crossAxis),E=s.reference[u]+s.reference[S]+(_?0:((b=a.offset)==null?void 0:b[u])||0)-(_?x.crossAxis:0);g<C?g=C:g>E&&(g=E)}return{[d]:h,[u]:g}}}},cbe=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:s,platform:a,elements:o}=t,{apply:l=()=>{},...c}=na(e,t),f=await a.detectOverflow(t,c),u=ra(i),d=Lf(i),h=Qi(i)==="y",{width:g,height:v}=s.floating;let x,m;u==="top"||u==="bottom"?(x=u,m=d===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(m=u,x=d==="end"?"top":"bottom");const b=v-f.top-f.bottom,S=g-f.left-f.right,_=So(v-f[x],b),C=So(g-f[m],S),E=!t.middlewareData.shift;let A=_,M=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(M=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=b),E&&!d){const N=xr(f.left,0),I=xr(f.right,0),$=xr(f.top,0),X=xr(f.bottom,0);h?M=g-2*(N!==0||I!==0?N+I:xr(f.left,f.right)):A=v-2*($!==0||X!==0?$+X:xr(f.top,f.bottom))}await l({...t,availableWidth:M,availableHeight:A});const D=await a.getDimensions(o.floating);return g!==D.width||v!==D.height?{reset:{rects:!0}}:{}}}};function yS(){return typeof window<"u"}function Ff(e){return bB(e)?(e.nodeName||"").toLowerCase():"#document"}function Mr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function fs(e){var t;return(t=(bB(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bB(e){return yS()?e instanceof Node||e instanceof Mr(e).Node:!1}function Mi(e){return yS()?e instanceof Element||e instanceof Mr(e).Element:!1}function is(e){return yS()?e instanceof HTMLElement||e instanceof Mr(e).HTMLElement:!1}function HN(e){return!yS()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Mr(e).ShadowRoot}const ube=new Set(["inline","contents"]);function Wm(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Di(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ube.has(i)}const fbe=new Set(["table","td","th"]);function dbe(e){return fbe.has(Ff(e))}const hbe=[":popover-open",":modal"];function bS(e){return hbe.some(t=>{try{return e.matches(t)}catch{return!1}})}const mbe=["transform","translate","scale","rotate","perspective"],pbe=["transform","translate","scale","rotate","perspective","filter"],gbe=["paint","layout","strict","content"];function TT(e){const t=AT(),n=Mi(e)?Di(e):e;return mbe.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||pbe.some(r=>(n.willChange||"").includes(r))||gbe.some(r=>(n.contain||"").includes(r))}function ybe(e){let t=xo(e);for(;is(t)&&!Zu(t);){if(TT(t))return t;if(bS(t))return null;t=xo(t)}return null}function AT(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const bbe=new Set(["html","body","#document"]);function Zu(e){return bbe.has(Ff(e))}function Di(e){return Mr(e).getComputedStyle(e)}function vS(e){return Mi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xo(e){if(Ff(e)==="html")return e;const t=e.assignedSlot||e.parentNode||HN(e)&&e.host||fs(e);return HN(t)?t.host:t}function vB(e){const t=xo(e);return Zu(t)?e.ownerDocument?e.ownerDocument.body:e.body:is(t)&&Wm(t)?t:vB(t)}function Zh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=vB(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=Mr(i);if(s){const o=b_(a);return t.concat(a,a.visualViewport||[],Wm(i)?i:[],o&&n?Zh(o):[])}return t.concat(i,Zh(i,[],n))}function b_(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function SB(e){const t=Di(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=is(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=bb(n)!==s||bb(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function OT(e){return Mi(e)?e:e.contextElement}function mu(e){const t=OT(e);if(!is(t))return ts(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=SB(t);let a=(s?bb(n.width):n.width)/r,o=(s?bb(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const vbe=ts(0);function xB(e){const t=Mr(e);return!AT()||!t.visualViewport?vbe:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sbe(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mr(e)?!1:t}function Ll(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=OT(e);let a=ts(1);t&&(r?Mi(r)&&(a=mu(r)):a=mu(e));const o=Sbe(s,n,r)?xB(s):ts(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,f=i.width/a.x,u=i.height/a.y;if(s){const d=Mr(s),h=r&&Mi(r)?Mr(r):r;let g=d,v=b_(g);for(;v&&r&&h!==g;){const x=mu(v),m=v.getBoundingClientRect(),b=Di(v),S=m.left+(v.clientLeft+parseFloat(b.paddingLeft))*x.x,_=m.top+(v.clientTop+parseFloat(b.paddingTop))*x.y;l*=x.x,c*=x.y,f*=x.x,u*=x.y,l+=S,c+=_,g=Mr(v),v=b_(g)}}return Sb({width:f,height:u,x:l,y:c})}function SS(e,t){const n=vS(e).scrollLeft;return t?t.left+n:Ll(fs(e)).left+n}function wB(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-SS(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function xbe(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=fs(r),o=t?bS(t.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=ts(1);const f=ts(0),u=is(r);if((u||!u&&!s)&&((Ff(r)!=="body"||Wm(a))&&(l=vS(r)),is(r))){const h=Ll(r);c=mu(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const d=a&&!u&&!s?wB(a,l):ts(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+f.x+d.x,y:n.y*c.y-l.scrollTop*c.y+f.y+d.y}}function wbe(e){return Array.from(e.getClientRects())}function _be(e){const t=fs(e),n=vS(e),r=e.ownerDocument.body,i=xr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=xr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+SS(e);const o=-n.scrollTop;return Di(r).direction==="rtl"&&(a+=xr(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}const qN=25;function kbe(e,t){const n=Mr(e),r=fs(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const f=AT();(!f||f&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=SS(r);if(c<=0){const f=r.ownerDocument,u=f.body,d=getComputedStyle(u),h=f.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,g=Math.abs(r.clientWidth-u.clientWidth-h);g<=qN&&(s-=g)}else c<=qN&&(s+=c);return{width:s,height:a,x:o,y:l}}const Ebe=new Set(["absolute","fixed"]);function Cbe(e,t){const n=Ll(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=is(e)?mu(e):ts(1),a=e.clientWidth*s.x,o=e.clientHeight*s.y,l=i*s.x,c=r*s.y;return{width:a,height:o,x:l,y:c}}function VN(e,t,n){let r;if(t==="viewport")r=kbe(e,n);else if(t==="document")r=_be(fs(e));else if(Mi(t))r=Cbe(t,n);else{const i=xB(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Sb(r)}function _B(e,t){const n=xo(e);return n===t||!Mi(n)||Zu(n)?!1:Di(n).position==="fixed"||_B(n,t)}function Tbe(e,t){const n=t.get(e);if(n)return n;let r=Zh(e,[],!1).filter(o=>Mi(o)&&Ff(o)!=="body"),i=null;const s=Di(e).position==="fixed";let a=s?xo(e):e;for(;Mi(a)&&!Zu(a);){const o=Di(a),l=TT(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&Ebe.has(i.position)||Wm(a)&&!l&&_B(e,a))?r=r.filter(f=>f!==a):i=o,a=xo(a)}return t.set(e,r),r}function Abe(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?bS(t)?[]:Tbe(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((c,f)=>{const u=VN(t,f,i);return c.top=xr(u.top,c.top),c.right=So(u.right,c.right),c.bottom=So(u.bottom,c.bottom),c.left=xr(u.left,c.left),c},VN(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Obe(e){const{width:t,height:n}=SB(e);return{width:t,height:n}}function Rbe(e,t,n){const r=is(t),i=fs(t),s=n==="fixed",a=Ll(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=ts(0);function c(){l.x=SS(i)}if(r||!r&&!s)if((Ff(t)!=="body"||Wm(i))&&(o=vS(t)),r){const h=Ll(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();s&&!r&&i&&c();const f=i&&!r&&!s?wB(i,o):ts(0),u=a.left+o.scrollLeft-l.x-f.x,d=a.top+o.scrollTop-l.y-f.y;return{x:u,y:d,width:a.width,height:a.height}}function fx(e){return Di(e).position==="static"}function KN(e,t){if(!is(e)||Di(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return fs(e)===n&&(n=n.ownerDocument.body),n}function kB(e,t){const n=Mr(e);if(bS(e))return n;if(!is(e)){let i=xo(e);for(;i&&!Zu(i);){if(Mi(i)&&!fx(i))return i;i=xo(i)}return n}let r=KN(e,t);for(;r&&dbe(r)&&fx(r);)r=KN(r,t);return r&&Zu(r)&&fx(r)&&!TT(r)?n:r||ybe(e)||n}const Nbe=async function(e){const t=this.getOffsetParent||kB,n=this.getDimensions,r=await n(e.floating);return{reference:Rbe(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Mbe(e){return Di(e).direction==="rtl"}const Dbe={convertOffsetParentRelativeRectToViewportRelativeRect:xbe,getDocumentElement:fs,getClippingRect:Abe,getOffsetParent:kB,getElementRects:Nbe,getClientRects:wbe,getDimensions:Obe,getScale:mu,isElement:Mi,isRTL:Mbe};function EB(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function zbe(e,t){let n=null,r;const i=fs(e);function s(){var o;clearTimeout(r),(o=n)==null||o.disconnect(),n=null}function a(o,l){o===void 0&&(o=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:f,top:u,width:d,height:h}=c;if(o||t(),!d||!h)return;const g=Fp(u),v=Fp(i.clientWidth-(f+d)),x=Fp(i.clientHeight-(u+h)),m=Fp(f),S={rootMargin:-g+"px "+-v+"px "+-x+"px "+-m+"px",threshold:xr(0,So(1,l))||1};let _=!0;function C(E){const A=E[0].intersectionRatio;if(A!==l){if(!_)return a();A?a(!1,A):r=setTimeout(()=>{a(!1,1e-7)},1e3)}A===1&&!EB(c,e.getBoundingClientRect())&&a(),_=!1}try{n=new IntersectionObserver(C,{...S,root:i.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return a(!0),s}function jbe(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=OT(e),f=i||s?[...c?Zh(c):[],...Zh(t)]:[];f.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const u=c&&o?zbe(c,n):null;let d=-1,h=null;a&&(h=new ResizeObserver(m=>{let[b]=m;b&&b.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let g,v=l?Ll(e):null;l&&x();function x(){const m=Ll(e);v&&!EB(v,m)&&n(),v=m,g=requestAnimationFrame(x)}return n(),()=>{var m;f.forEach(b=>{i&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),u==null||u(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const Ibe=abe,$be=obe,Lbe=rbe,Fbe=cbe,Pbe=ibe,GN=nbe,Ube=lbe,Bbe=(e,t,n)=>{const r=new Map,i={platform:Dbe,...n},s={...i.platform,_c:r};return tbe(e,t,{...i,platform:s})};var Hbe=typeof document<"u",qbe=function(){},Ng=Hbe?w.useLayoutEffect:qbe;function xb(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!xb(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){const s=i[r];if(!(s==="_owner"&&e.$$typeof)&&!xb(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function CB(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YN(e,t){const n=CB(e);return Math.round(t*n)/n}function dx(e){const t=w.useRef(e);return Ng(()=>{t.current=e}),t}function Vbe(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:s,floating:a}={},transform:o=!0,whileElementsMounted:l,open:c}=e,[f,u]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=w.useState(r);xb(d,r)||h(r);const[g,v]=w.useState(null),[x,m]=w.useState(null),b=w.useCallback(j=>{j!==E.current&&(E.current=j,v(j))},[]),S=w.useCallback(j=>{j!==A.current&&(A.current=j,m(j))},[]),_=s||g,C=a||x,E=w.useRef(null),A=w.useRef(null),M=w.useRef(f),D=l!=null,N=dx(l),I=dx(i),$=dx(c),X=w.useCallback(()=>{if(!E.current||!A.current)return;const j={placement:t,strategy:n,middleware:d};I.current&&(j.platform=I.current),Bbe(E.current,A.current,j).then(ne=>{const R={...ne,isPositioned:$.current!==!1};Q.current&&!xb(M.current,R)&&(M.current=R,nf.flushSync(()=>{u(R)}))})},[d,t,n,I,$]);Ng(()=>{c===!1&&M.current.isPositioned&&(M.current.isPositioned=!1,u(j=>({...j,isPositioned:!1})))},[c]);const Q=w.useRef(!1);Ng(()=>(Q.current=!0,()=>{Q.current=!1}),[]),Ng(()=>{if(_&&(E.current=_),C&&(A.current=C),_&&C){if(N.current)return N.current(_,C,X);X()}},[_,C,X,N,D]);const Y=w.useMemo(()=>({reference:E,floating:A,setReference:b,setFloating:S}),[b,S]),z=w.useMemo(()=>({reference:_,floating:C}),[_,C]),L=w.useMemo(()=>{const j={position:n,left:0,top:0};if(!z.floating)return j;const ne=YN(z.floating,f.x),R=YN(z.floating,f.y);return o?{...j,transform:"translate("+ne+"px, "+R+"px)",...CB(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:ne,top:R}},[n,o,z.floating,f.x,f.y]);return w.useMemo(()=>({...f,update:X,refs:Y,elements:z,floatingStyles:L}),[f,X,Y,z,L])}const Kbe=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:i}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?GN({element:r.current,padding:i}).fn(n):{}:r?GN({element:r,padding:i}).fn(n):{}}}},Gbe=(e,t)=>({...Ibe(e),options:[e,t]}),Ybe=(e,t)=>({...$be(e),options:[e,t]}),Jbe=(e,t)=>({...Ube(e),options:[e,t]}),Qbe=(e,t)=>({...Lbe(e),options:[e,t]}),Xbe=(e,t)=>({...Fbe(e),options:[e,t]}),Wbe=(e,t)=>({...Pbe(e),options:[e,t]}),Zbe=(e,t)=>({...Kbe(e),options:[e,t]});var eve="Arrow",TB=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return p.jsx(Ve.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});TB.displayName=eve;var tve=TB,RT="Popper",[AB,OB]=$f(RT),[nve,RB]=AB(RT),NB=e=>{const{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return p.jsx(nve,{scope:t,anchor:r,onAnchorChange:i,children:n})};NB.displayName=RT;var MB="PopperAnchor",DB=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=RB(MB,n),a=w.useRef(null),o=Mt(t,a),l=w.useRef(null);return w.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||a.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:p.jsx(Ve.div,{...i,ref:o})});DB.displayName=MB;var NT="PopperContent",[rve,ive]=AB(NT),zB=w.forwardRef((e,t)=>{var H,me,xe,we,Ne,$e;const{__scopePopper:n,side:r="bottom",sideOffset:i=0,align:s="center",alignOffset:a=0,arrowPadding:o=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:f=0,sticky:u="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:g,...v}=e,x=RB(NT,n),[m,b]=w.useState(null),S=Mt(t,Fn=>b(Fn)),[_,C]=w.useState(null),E=Bye(_),A=(E==null?void 0:E.width)??0,M=(E==null?void 0:E.height)??0,D=r+(s!=="center"?"-"+s:""),N=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(c)?c:[c],$=I.length>0,X={padding:N,boundary:I.filter(ave),altBoundary:$},{refs:Q,floatingStyles:Y,placement:z,isPositioned:L,middlewareData:j}=Vbe({strategy:"fixed",placement:D,whileElementsMounted:(...Fn)=>jbe(...Fn,{animationFrame:h==="always"}),elements:{reference:x.anchor},middleware:[Gbe({mainAxis:i+M,alignmentAxis:a}),l&&Ybe({mainAxis:!0,crossAxis:!1,limiter:u==="partial"?Jbe():void 0,...X}),l&&Qbe({...X}),Xbe({...X,apply:({elements:Fn,rects:Ir,availableWidth:ha,availableHeight:ma})=>{const{width:pa,height:RS}=Ir.reference,Io=Fn.floating.style;Io.setProperty("--radix-popper-available-width",`${ha}px`),Io.setProperty("--radix-popper-available-height",`${ma}px`),Io.setProperty("--radix-popper-anchor-width",`${pa}px`),Io.setProperty("--radix-popper-anchor-height",`${RS}px`)}}),_&&Zbe({element:_,padding:o}),ove({arrowWidth:A,arrowHeight:M}),d&&Wbe({strategy:"referenceHidden",...X})]}),[ne,R]=$B(z),Re=bo(g);$n(()=>{L&&(Re==null||Re())},[L,Re]);const U=(H=j.arrow)==null?void 0:H.x,T=(me=j.arrow)==null?void 0:me.y,Z=((xe=j.arrow)==null?void 0:xe.centerOffset)!==0,[ee,le]=w.useState();return $n(()=>{m&&le(window.getComputedStyle(m).zIndex)},[m]),p.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:L?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ee,"--radix-popper-transform-origin":[(we=j.transformOrigin)==null?void 0:we.x,(Ne=j.transformOrigin)==null?void 0:Ne.y].join(" "),...(($e=j.hide)==null?void 0:$e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(rve,{scope:n,placedSide:ne,onArrowChange:C,arrowX:U,arrowY:T,shouldHideArrow:Z,children:p.jsx(Ve.div,{"data-side":ne,"data-align":R,...v,ref:S,style:{...v.style,animation:L?void 0:"none"}})})})});zB.displayName=NT;var jB="PopperArrow",sve={top:"bottom",right:"left",bottom:"top",left:"right"},IB=w.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=ive(jB,r),a=sve[s.placedSide];return p.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:p.jsx(tve,{...i,ref:n,style:{...i.style,display:"block"}})})});IB.displayName=jB;function ave(e){return e!==null}var ove=e=>({name:"transformOrigin",options:e,fn(t){var x,m,b;const{placement:n,rects:r,middlewareData:i}=t,a=((x=i.arrow)==null?void 0:x.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,f]=$B(n),u={start:"0%",center:"50%",end:"100%"}[f],d=(((m=i.arrow)==null?void 0:m.x)??0)+o/2,h=(((b=i.arrow)==null?void 0:b.y)??0)+l/2;let g="",v="";return c==="bottom"?(g=a?u:`${d}px`,v=`${-l}px`):c==="top"?(g=a?u:`${d}px`,v=`${r.floating.height+l}px`):c==="right"?(g=`${-l}px`,v=a?u:`${h}px`):c==="left"&&(g=`${r.floating.width+l}px`,v=a?u:`${h}px`),{data:{x:g,y:v}}}});function $B(e){const[t,n="center"]=e.split("-");return[t,n]}var lve=NB,cve=DB,uve=zB,fve=IB,hx="rovingFocusGroup.onEntryFocus",dve={bubbles:!1,cancelable:!0},Zm="RovingFocusGroup",[v_,LB,hve]=pB(Zm),[mve,FB]=$f(Zm,[hve]),[pve,gve]=mve(Zm),PB=w.forwardRef((e,t)=>p.jsx(v_.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(v_.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(yve,{...e,ref:t})})}));PB.displayName=Zm;var yve=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:f=!1,...u}=e,d=w.useRef(null),h=Mt(t,d),g=_T(s),[v,x]=jl({prop:a,defaultProp:o??null,onChange:l,caller:Zm}),[m,b]=w.useState(!1),S=bo(c),_=LB(n),C=w.useRef(!1),[E,A]=w.useState(0);return w.useEffect(()=>{const M=d.current;if(M)return M.addEventListener(hx,S),()=>M.removeEventListener(hx,S)},[S]),p.jsx(pve,{scope:n,orientation:r,dir:g,loop:i,currentTabStopId:v,onItemFocus:w.useCallback(M=>x(M),[x]),onItemShiftTab:w.useCallback(()=>b(!0),[]),onFocusableItemAdd:w.useCallback(()=>A(M=>M+1),[]),onFocusableItemRemove:w.useCallback(()=>A(M=>M-1),[]),children:p.jsx(Ve.div,{tabIndex:m||E===0?-1:0,"data-orientation":r,...u,ref:h,style:{outline:"none",...e.style},onMouseDown:qe(e.onMouseDown,()=>{C.current=!0}),onFocus:qe(e.onFocus,M=>{const D=!C.current;if(M.target===M.currentTarget&&D&&!m){const N=new CustomEvent(hx,dve);if(M.currentTarget.dispatchEvent(N),!N.defaultPrevented){const I=_().filter(z=>z.focusable),$=I.find(z=>z.active),X=I.find(z=>z.id===v),Y=[$,X,...I].filter(Boolean).map(z=>z.ref.current);HB(Y,f)}}C.current=!1}),onBlur:qe(e.onBlur,()=>b(!1))})})}),UB="RovingFocusGroupItem",BB=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:a,...o}=e,l=Nr(),c=s||l,f=gve(UB,n),u=f.currentTabStopId===c,d=LB(n),{onFocusableItemAdd:h,onFocusableItemRemove:g,currentTabStopId:v}=f;return w.useEffect(()=>{if(r)return h(),()=>g()},[r,h,g]),p.jsx(v_.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:p.jsx(Ve.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...o,ref:t,onMouseDown:qe(e.onMouseDown,x=>{r?f.onItemFocus(c):x.preventDefault()}),onFocus:qe(e.onFocus,()=>f.onItemFocus(c)),onKeyDown:qe(e.onKeyDown,x=>{if(x.key==="Tab"&&x.shiftKey){f.onItemShiftTab();return}if(x.target!==x.currentTarget)return;const m=Sve(x,f.orientation,f.dir);if(m!==void 0){if(x.metaKey||x.ctrlKey||x.altKey||x.shiftKey)return;x.preventDefault();let S=d().filter(_=>_.focusable).map(_=>_.ref.current);if(m==="last")S.reverse();else if(m==="prev"||m==="next"){m==="prev"&&S.reverse();const _=S.indexOf(x.currentTarget);S=f.loop?xve(S,_+1):S.slice(_+1)}setTimeout(()=>HB(S))}}),children:typeof a=="function"?a({isCurrentTabStop:u,hasTabStop:v!=null}):a})})});BB.displayName=UB;var bve={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vve(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Sve(e,t,n){const r=vve(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return bve[r]}function HB(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function xve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wve=PB,_ve=BB;function JN(e,[t,n]){return Math.min(n,Math.max(t,e))}var kve=[" ","Enter","ArrowUp","ArrowDown"],Eve=[" ","Enter"],Fl="Select",[xS,wS,Cve]=pB(Fl),[Pf]=$f(Fl,[Cve,OB]),_S=OB(),[Tve,No]=Pf(Fl),[Ave,Ove]=Pf(Fl),qB=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:a,defaultValue:o,onValueChange:l,dir:c,name:f,autoComplete:u,disabled:d,required:h,form:g}=e,v=_S(t),[x,m]=w.useState(null),[b,S]=w.useState(null),[_,C]=w.useState(!1),E=_T(c),[A,M]=jl({prop:r,defaultProp:i??!1,onChange:s,caller:Fl}),[D,N]=jl({prop:a,defaultProp:o,onChange:l,caller:Fl}),I=w.useRef(null),$=x?g||!!x.closest("form"):!0,[X,Q]=w.useState(new Set),Y=Array.from(X).map(z=>z.props.value).join(";");return p.jsx(lve,{...v,children:p.jsxs(Tve,{required:h,scope:t,trigger:x,onTriggerChange:m,valueNode:b,onValueNodeChange:S,valueNodeHasChildren:_,onValueNodeHasChildrenChange:C,contentId:Nr(),value:D,onValueChange:N,open:A,onOpenChange:M,dir:E,triggerPointerDownPosRef:I,disabled:d,children:[p.jsx(xS.Provider,{scope:t,children:p.jsx(Ave,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(z=>{Q(L=>new Set(L).add(z))},[]),onNativeOptionRemove:w.useCallback(z=>{Q(L=>{const j=new Set(L);return j.delete(z),j})},[]),children:n})}),$?p.jsxs(d8,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:u,value:D,onChange:z=>N(z.target.value),disabled:d,form:g,children:[D===void 0?p.jsx("option",{value:""}):null,Array.from(X)]},Y):null]})})};qB.displayName=Fl;var VB="SelectTrigger",KB=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=_S(n),a=No(VB,n),o=a.disabled||r,l=Mt(t,a.onTriggerChange),c=wS(n),f=w.useRef("touch"),[u,d,h]=m8(v=>{const x=c().filter(S=>!S.disabled),m=x.find(S=>S.value===a.value),b=p8(x,v,m);b!==void 0&&a.onValueChange(b.value)}),g=v=>{o||(a.onOpenChange(!0),h()),v&&(a.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return p.jsx(cve,{asChild:!0,...s,children:p.jsx(Ve.button,{type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:o,"data-disabled":o?"":void 0,"data-placeholder":h8(a.value)?"":void 0,...i,ref:l,onClick:qe(i.onClick,v=>{v.currentTarget.focus(),f.current!=="mouse"&&g(v)}),onPointerDown:qe(i.onPointerDown,v=>{f.current=v.pointerType;const x=v.target;x.hasPointerCapture(v.pointerId)&&x.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(g(v),v.preventDefault())}),onKeyDown:qe(i.onKeyDown,v=>{const x=u.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&d(v.key),!(x&&v.key===" ")&&kve.includes(v.key)&&(g(),v.preventDefault())})})})});KB.displayName=VB;var GB="SelectValue",YB=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:a="",...o}=e,l=No(GB,n),{onValueNodeHasChildrenChange:c}=l,f=s!==void 0,u=Mt(t,l.onValueNodeChange);return $n(()=>{c(f)},[c,f]),p.jsx(Ve.span,{...o,ref:u,style:{pointerEvents:"none"},children:h8(l.value)?p.jsx(p.Fragment,{children:a}):s})});YB.displayName=GB;var Rve="SelectIcon",JB=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return p.jsx(Ve.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});JB.displayName=Rve;var Nve="SelectPortal",QB=e=>p.jsx(yT,{asChild:!0,...e});QB.displayName=Nve;var Pl="SelectContent",XB=w.forwardRef((e,t)=>{const n=No(Pl,e.__scopeSelect),[r,i]=w.useState();if($n(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?nf.createPortal(p.jsx(WB,{scope:e.__scopeSelect,children:p.jsx(xS.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(ZB,{...e,ref:t})});XB.displayName=Pl;var fi=10,[WB,Mo]=Pf(Pl),Mve="SelectContentImpl",Dve=Wu("SelectContent.RemoveScroll"),ZB=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:o,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:x,...m}=e,b=No(Pl,n),[S,_]=w.useState(null),[C,E]=w.useState(null),A=Mt(t,H=>_(H)),[M,D]=w.useState(null),[N,I]=w.useState(null),$=wS(n),[X,Q]=w.useState(!1),Y=w.useRef(!1);w.useEffect(()=>{if(S)return P6(S)},[S]),N6();const z=w.useCallback(H=>{const[me,...xe]=$().map($e=>$e.ref.current),[we]=xe.slice(-1),Ne=document.activeElement;for(const $e of H)if($e===Ne||($e==null||$e.scrollIntoView({block:"nearest"}),$e===me&&C&&(C.scrollTop=0),$e===we&&C&&(C.scrollTop=C.scrollHeight),$e==null||$e.focus(),document.activeElement!==Ne))return},[$,C]),L=w.useCallback(()=>z([M,S]),[z,M,S]);w.useEffect(()=>{X&&L()},[X,L]);const{onOpenChange:j,triggerPointerDownPosRef:ne}=b;w.useEffect(()=>{if(S){let H={x:0,y:0};const me=we=>{var Ne,$e;H={x:Math.abs(Math.round(we.pageX)-(((Ne=ne.current)==null?void 0:Ne.x)??0)),y:Math.abs(Math.round(we.pageY)-((($e=ne.current)==null?void 0:$e.y)??0))}},xe=we=>{H.x<=10&&H.y<=10?we.preventDefault():S.contains(we.target)||j(!1),document.removeEventListener("pointermove",me),ne.current=null};return ne.current!==null&&(document.addEventListener("pointermove",me),document.addEventListener("pointerup",xe,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",me),document.removeEventListener("pointerup",xe,{capture:!0})}}},[S,j,ne]),w.useEffect(()=>{const H=()=>j(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[j]);const[R,Re]=m8(H=>{const me=$().filter(Ne=>!Ne.disabled),xe=me.find(Ne=>Ne.ref.current===document.activeElement),we=p8(me,H,xe);we&&setTimeout(()=>we.ref.current.focus())}),U=w.useCallback((H,me,xe)=>{const we=!Y.current&&!xe;(b.value!==void 0&&b.value===me||we)&&(D(H),we&&(Y.current=!0))},[b.value]),T=w.useCallback(()=>S==null?void 0:S.focus(),[S]),Z=w.useCallback((H,me,xe)=>{const we=!Y.current&&!xe;(b.value!==void 0&&b.value===me||we)&&I(H)},[b.value]),ee=r==="popper"?S_:e8,le=ee===S_?{side:o,sideOffset:l,align:c,alignOffset:f,arrowPadding:u,collisionBoundary:d,collisionPadding:h,sticky:g,hideWhenDetached:v,avoidCollisions:x}:{};return p.jsx(WB,{scope:n,content:S,viewport:C,onViewportChange:E,itemRefCallback:U,selectedItem:M,onItemLeave:T,itemTextRefCallback:Z,focusSelectedItem:L,selectedItemText:N,position:r,isPositioned:X,searchRef:R,children:p.jsx(bT,{as:Dve,allowPinchZoom:!0,children:p.jsx(gT,{asChild:!0,trapped:b.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:qe(i,H=>{var me;(me=b.trigger)==null||me.focus({preventScroll:!0}),H.preventDefault()}),children:p.jsx(pT,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:p.jsx(ee,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:H=>H.preventDefault(),...m,...le,onPlaced:()=>Q(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:qe(m.onKeyDown,H=>{const me=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!me&&H.key.length===1&&Re(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let we=$().filter(Ne=>!Ne.disabled).map(Ne=>Ne.ref.current);if(["ArrowUp","End"].includes(H.key)&&(we=we.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const Ne=H.target,$e=we.indexOf(Ne);we=we.slice($e+1)}setTimeout(()=>z(we)),H.preventDefault()}})})})})})})});ZB.displayName=Mve;var zve="SelectItemAlignedPosition",e8=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=No(Pl,n),a=Mo(Pl,n),[o,l]=w.useState(null),[c,f]=w.useState(null),u=Mt(t,A=>f(A)),d=wS(n),h=w.useRef(!1),g=w.useRef(!0),{viewport:v,selectedItem:x,selectedItemText:m,focusSelectedItem:b}=a,S=w.useCallback(()=>{if(s.trigger&&s.valueNode&&o&&c&&v&&x&&m){const A=s.trigger.getBoundingClientRect(),M=c.getBoundingClientRect(),D=s.valueNode.getBoundingClientRect(),N=m.getBoundingClientRect();if(s.dir!=="rtl"){const Ne=N.left-M.left,$e=D.left-Ne,Fn=A.left-$e,Ir=A.width+Fn,ha=Math.max(Ir,M.width),ma=window.innerWidth-fi,pa=JN($e,[fi,Math.max(fi,ma-ha)]);o.style.minWidth=Ir+"px",o.style.left=pa+"px"}else{const Ne=M.right-N.right,$e=window.innerWidth-D.right-Ne,Fn=window.innerWidth-A.right-$e,Ir=A.width+Fn,ha=Math.max(Ir,M.width),ma=window.innerWidth-fi,pa=JN($e,[fi,Math.max(fi,ma-ha)]);o.style.minWidth=Ir+"px",o.style.right=pa+"px"}const I=d(),$=window.innerHeight-fi*2,X=v.scrollHeight,Q=window.getComputedStyle(c),Y=parseInt(Q.borderTopWidth,10),z=parseInt(Q.paddingTop,10),L=parseInt(Q.borderBottomWidth,10),j=parseInt(Q.paddingBottom,10),ne=Y+z+X+j+L,R=Math.min(x.offsetHeight*5,ne),Re=window.getComputedStyle(v),U=parseInt(Re.paddingTop,10),T=parseInt(Re.paddingBottom,10),Z=A.top+A.height/2-fi,ee=$-Z,le=x.offsetHeight/2,H=x.offsetTop+le,me=Y+z+H,xe=ne-me;if(me<=Z){const Ne=I.length>0&&x===I[I.length-1].ref.current;o.style.bottom="0px";const $e=c.clientHeight-v.offsetTop-v.offsetHeight,Fn=Math.max(ee,le+(Ne?T:0)+$e+L),Ir=me+Fn;o.style.height=Ir+"px"}else{const Ne=I.length>0&&x===I[0].ref.current;o.style.top="0px";const Fn=Math.max(Z,Y+v.offsetTop+(Ne?U:0)+le)+xe;o.style.height=Fn+"px",v.scrollTop=me-Z+v.offsetTop}o.style.margin=`${fi}px 0`,o.style.minHeight=R+"px",o.style.maxHeight=$+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,o,c,v,x,m,s.dir,r]);$n(()=>S(),[S]);const[_,C]=w.useState();$n(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const E=w.useCallback(A=>{A&&g.current===!0&&(S(),b==null||b(),g.current=!1)},[S,b]);return p.jsx(Ive,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:h,onScrollButtonChange:E,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:p.jsx(Ve.div,{...i,ref:u,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});e8.displayName=zve;var jve="SelectPopperPosition",S_=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=fi,...s}=e,a=_S(n);return p.jsx(uve,{...a,...s,ref:t,align:r,collisionPadding:i,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});S_.displayName=jve;var[Ive,MT]=Pf(Pl,{}),x_="SelectViewport",t8=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=Mo(x_,n),a=MT(x_,n),o=Mt(t,s.onViewportChange),l=w.useRef(0);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),p.jsx(xS.Slot,{scope:n,children:p.jsx(Ve.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:qe(i.onScroll,c=>{const f=c.currentTarget,{contentWrapper:u,shouldExpandOnScrollRef:d}=a;if(d!=null&&d.current&&u){const h=Math.abs(l.current-f.scrollTop);if(h>0){const g=window.innerHeight-fi*2,v=parseFloat(u.style.minHeight),x=parseFloat(u.style.height),m=Math.max(v,x);if(m<g){const b=m+h,S=Math.min(g,b),_=b-S;u.style.height=S+"px",u.style.bottom==="0px"&&(f.scrollTop=_>0?_:0,u.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});t8.displayName=x_;var n8="SelectGroup",[$ve,Lve]=Pf(n8),Fve=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Nr();return p.jsx($ve,{scope:n,id:i,children:p.jsx(Ve.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Fve.displayName=n8;var r8="SelectLabel",Pve=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Lve(r8,n);return p.jsx(Ve.div,{id:i.id,...r,ref:t})});Pve.displayName=r8;var wb="SelectItem",[Uve,i8]=Pf(wb),s8=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...a}=e,o=No(wb,n),l=Mo(wb,n),c=o.value===r,[f,u]=w.useState(s??""),[d,h]=w.useState(!1),g=Mt(t,b=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,b,r,i)}),v=Nr(),x=w.useRef("touch"),m=()=>{i||(o.onValueChange(r),o.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return p.jsx(Uve,{scope:n,value:r,disabled:i,textId:v,isSelected:c,onItemTextChange:w.useCallback(b=>{u(S=>S||((b==null?void 0:b.textContent)??"").trim())},[]),children:p.jsx(xS.ItemSlot,{scope:n,value:r,disabled:i,textValue:f,children:p.jsx(Ve.div,{role:"option","aria-labelledby":v,"data-highlighted":d?"":void 0,"aria-selected":c&&d,"data-state":c?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...a,ref:g,onFocus:qe(a.onFocus,()=>h(!0)),onBlur:qe(a.onBlur,()=>h(!1)),onClick:qe(a.onClick,()=>{x.current!=="mouse"&&m()}),onPointerUp:qe(a.onPointerUp,()=>{x.current==="mouse"&&m()}),onPointerDown:qe(a.onPointerDown,b=>{x.current=b.pointerType}),onPointerMove:qe(a.onPointerMove,b=>{var S;x.current=b.pointerType,i?(S=l.onItemLeave)==null||S.call(l):x.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:qe(a.onPointerLeave,b=>{var S;b.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:qe(a.onKeyDown,b=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&b.key===" "||(Eve.includes(b.key)&&m(),b.key===" "&&b.preventDefault())})})})})});s8.displayName=wb;var Rd="SelectItemText",a8=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,a=No(Rd,n),o=Mo(Rd,n),l=i8(Rd,n),c=Ove(Rd,n),[f,u]=w.useState(null),d=Mt(t,m=>u(m),l.onItemTextChange,m=>{var b;return(b=o.itemTextRefCallback)==null?void 0:b.call(o,m,l.value,l.disabled)}),h=f==null?void 0:f.textContent,g=w.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:x}=c;return $n(()=>(v(g),()=>x(g)),[v,x,g]),p.jsxs(p.Fragment,{children:[p.jsx(Ve.span,{id:l.textId,...s,ref:d}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?nf.createPortal(s.children,a.valueNode):null]})});a8.displayName=Rd;var o8="SelectItemIndicator",l8=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return i8(o8,n).isSelected?p.jsx(Ve.span,{"aria-hidden":!0,...r,ref:t}):null});l8.displayName=o8;var w_="SelectScrollUpButton",c8=w.forwardRef((e,t)=>{const n=Mo(w_,e.__scopeSelect),r=MT(w_,e.__scopeSelect),[i,s]=w.useState(!1),a=Mt(t,r.onScrollButtonChange);return $n(()=>{if(n.viewport&&n.isPositioned){let o=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?p.jsx(f8,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});c8.displayName=w_;var __="SelectScrollDownButton",u8=w.forwardRef((e,t)=>{const n=Mo(__,e.__scopeSelect),r=MT(__,e.__scopeSelect),[i,s]=w.useState(!1),a=Mt(t,r.onScrollButtonChange);return $n(()=>{if(n.viewport&&n.isPositioned){let o=function(){const c=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<c;s(f)};const l=n.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?p.jsx(f8,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});u8.displayName=__;var f8=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=Mo("SelectScrollButton",n),a=w.useRef(null),o=wS(n),l=w.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),$n(()=>{var f;const c=o().find(u=>u.ref.current===document.activeElement);(f=c==null?void 0:c.ref.current)==null||f.scrollIntoView({block:"nearest"})},[o]),p.jsx(Ve.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:qe(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:qe(i.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:qe(i.onPointerLeave,()=>{l()})})}),Bve="SelectSeparator",Hve=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(Ve.div,{"aria-hidden":!0,...r,ref:t})});Hve.displayName=Bve;var k_="SelectArrow",qve=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=_S(n),s=No(k_,n),a=Mo(k_,n);return s.open&&a.position==="popper"?p.jsx(fve,{...i,...r,ref:t}):null});qve.displayName=k_;var Vve="SelectBubbleInput",d8=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=w.useRef(null),s=Mt(r,i),a=Uye(t);return w.useEffect(()=>{const o=i.current;if(!o)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&f){const u=new Event("change",{bubbles:!0});f.call(o,t),o.dispatchEvent(u)}},[a,t]),p.jsx(Ve.select,{...n,style:{...mB,...n.style},ref:s,defaultValue:t})});d8.displayName=Vve;function h8(e){return e===""||e===void 0}function m8(e){const t=bo(e),n=w.useRef(""),r=w.useRef(0),i=w.useCallback(a=>{const o=n.current+a;t(o),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(o)},[t]),s=w.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return w.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,s]}function p8(e,t,n){const i=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let a=Kve(e,Math.max(s,0));i.length===1&&(a=a.filter(c=>c!==n));const l=a.find(c=>c.textValue.toLowerCase().startsWith(i.toLowerCase()));return l!==n?l:void 0}function Kve(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Gve=qB,Yve=KB,Jve=YB,Qve=JB,Xve=QB,Wve=XB,Zve=t8,eSe=s8,tSe=a8,nSe=l8,rSe=c8,iSe=u8,sSe="Separator",QN="horizontal",aSe=["horizontal","vertical"],g8=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=QN,...i}=e,s=oSe(r)?r:QN,o=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(Ve.div,{"data-orientation":s,...o,...i,ref:t})});g8.displayName=sSe;function oSe(e){return aSe.includes(e)}var lSe=g8,y8="Toggle",b8=w.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...s}=e,[a,o]=jl({prop:n,onChange:i,defaultProp:r??!1,caller:y8});return p.jsx(Ve.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:qe(e.onClick,()=>{e.disabled||o(!a)})})});b8.displayName=y8;var Do="ToggleGroup",[v8]=$f(Do,[FB]),S8=FB(),DT=qt.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return p.jsx(cSe,{...i,ref:t})}if(n==="multiple"){const i=r;return p.jsx(uSe,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${Do}\``)});DT.displayName=Do;var[x8,w8]=v8(Do),cSe=qt.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=jl({prop:n,defaultProp:r??"",onChange:i,caller:Do});return p.jsx(x8,{scope:e.__scopeToggleGroup,type:"single",value:qt.useMemo(()=>a?[a]:[],[a]),onItemActivate:o,onItemDeactivate:qt.useCallback(()=>o(""),[o]),children:p.jsx(_8,{...s,ref:t})})}),uSe=qt.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=jl({prop:n,defaultProp:r??[],onChange:i,caller:Do}),l=qt.useCallback(f=>o((u=[])=>[...u,f]),[o]),c=qt.useCallback(f=>o((u=[])=>u.filter(d=>d!==f)),[o]);return p.jsx(x8,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:c,children:p.jsx(_8,{...s,ref:t})})});DT.displayName=Do;var[fSe,dSe]=v8(Do),_8=qt.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:s,dir:a,loop:o=!0,...l}=e,c=S8(n),f=_T(a),u={role:"group",dir:f,...l};return p.jsx(fSe,{scope:n,rovingFocus:i,disabled:r,children:i?p.jsx(wve,{asChild:!0,...c,orientation:s,dir:f,loop:o,children:p.jsx(Ve.div,{...u,ref:t})}):p.jsx(Ve.div,{...u,ref:t})})}),_b="ToggleGroupItem",k8=qt.forwardRef((e,t)=>{const n=w8(_b,e.__scopeToggleGroup),r=dSe(_b,e.__scopeToggleGroup),i=S8(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,o={...e,pressed:s,disabled:a},l=qt.useRef(null);return r.rovingFocus?p.jsx(_ve,{asChild:!0,...i,focusable:!a,active:s,ref:l,children:p.jsx(XN,{...o,ref:t})}):p.jsx(XN,{...o,ref:t})});k8.displayName=_b;var XN=qt.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,s=w8(_b,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},o=s.type==="single"?a:void 0;return p.jsx(b8,{...o,...i,ref:t,onPressedChange:l=>{l?s.onItemActivate(r):s.onItemDeactivate(r)}})}),hSe=DT,mSe=k8;function E8(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=E8(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function C8(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=E8(e))&&(r&&(r+=" "),r+=t);return r}const pSe=(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},gSe=(e,t)=>({classGroupId:e,validator:t}),T8=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),kb="-",WN=[],ySe="arbitrary..",bSe=e=>{const t=SSe(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return vSe(a);const o=a.split(kb),l=o[0]===""&&o.length>1?1:0;return A8(o,l,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=r[a],c=n[a];return l?c?pSe(c,l):l:c||WN}return n[a]||WN}}},A8=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const c=A8(e,t+1,s);if(c)return c}const a=n.validators;if(a===null)return;const o=t===0?e.join(kb):e.slice(t).join(kb),l=a.length;for(let c=0;c<l;c++){const f=a[c];if(f.validator(o))return f.classGroupId}},vSe=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?ySe+r:void 0})(),SSe=e=>{const{theme:t,classGroups:n}=e;return xSe(n,t)},xSe=(e,t)=>{const n=T8();for(const r in e){const i=e[r];zT(i,n,r,t)}return n},zT=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];wSe(a,t,n,r)}},wSe=(e,t,n,r)=>{if(typeof e=="string"){_Se(e,t,n);return}if(typeof e=="function"){kSe(e,t,n,r);return}ESe(e,t,n,r)},_Se=(e,t,n)=>{const r=e===""?t:O8(t,e);r.classGroupId=n},kSe=(e,t,n,r)=>{if(CSe(e)){zT(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(gSe(n,e))},ESe=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[o,l]=i[a];zT(l,O8(t,o),n,r)}},O8=(e,t)=>{let n=e;const r=t.split(kb),i=r.length;for(let s=0;s<i;s++){const a=r[s];let o=n.nextPart.get(a);o||(o=T8(),n.nextPart.set(a,o)),n=o}return n},CSe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,TSe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(s,a)=>{n[s]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(s){let a=n[s];if(a!==void 0)return a;if((a=r[s])!==void 0)return i(s,a),a},set(s,a){s in n?n[s]=a:i(s,a)}}},E_="!",ZN=":",ASe=[],eM=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),OSe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,o=0,l=0,c;const f=i.length;for(let v=0;v<f;v++){const x=i[v];if(a===0&&o===0){if(x===ZN){s.push(i.slice(l,v)),l=v+1;continue}if(x==="/"){c=v;continue}}x==="["?a++:x==="]"?a--:x==="("?o++:x===")"&&o--}const u=s.length===0?i:i.slice(l);let d=u,h=!1;u.endsWith(E_)?(d=u.slice(0,-1),h=!0):u.startsWith(E_)&&(d=u.slice(1),h=!0);const g=c&&c>l?c-l:void 0;return eM(s,h,d,g)};if(t){const i=t+ZN,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):eM(ASe,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},RSe=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let s=0;s<n.length;s++){const a=n[s],o=a[0]==="[",l=t.has(a);o||l?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},NSe=e=>({cache:TSe(e.cacheSize),parseClassName:OSe(e),sortModifiers:RSe(e),...bSe(e)}),MSe=/\s+/,DSe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(MSe);let l="";for(let c=o.length-1;c>=0;c-=1){const f=o[c],{isExternal:u,modifiers:d,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:v}=n(f);if(u){l=f+(l.length>0?" "+l:l);continue}let x=!!v,m=r(x?g.substring(0,v):g);if(!m){if(!x){l=f+(l.length>0?" "+l:l);continue}if(m=r(g),!m){l=f+(l.length>0?" "+l:l);continue}x=!1}const b=d.length===0?"":d.length===1?d[0]:s(d).join(":"),S=h?b+E_:b,_=S+m;if(a.indexOf(_)>-1)continue;a.push(_);const C=i(m,x);for(let E=0;E<C.length;++E){const A=C[E];a.push(S+A)}l=f+(l.length>0?" "+l:l)}return l},zSe=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=R8(n))&&(i&&(i+=" "),i+=r);return i},R8=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=R8(e[r]))&&(n&&(n+=" "),n+=t);return n},jSe=(e,...t)=>{let n,r,i,s;const a=l=>{const c=t.reduce((f,u)=>u(f),e());return n=NSe(c),r=n.cache.get,i=n.cache.set,s=o,o(l)},o=l=>{const c=r(l);if(c)return c;const f=DSe(l,n);return i(l,f),f};return s=a,(...l)=>s(zSe(...l))},ISe=[],Xt=e=>{const t=n=>n[e]||ISe;return t.isThemeGetter=!0,t},N8=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,M8=/^\((?:(\w[\w-]*):)?(.+)\)$/i,$Se=/^\d+\/\d+$/,LSe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,FSe=/\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$/,PSe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,USe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,BSe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,gc=e=>$Se.test(e),Oe=e=>!!e&&!Number.isNaN(Number(e)),ba=e=>!!e&&Number.isInteger(Number(e)),mx=e=>e.endsWith("%")&&Oe(e.slice(0,-1)),xs=e=>LSe.test(e),HSe=()=>!0,qSe=e=>FSe.test(e)&&!PSe.test(e),D8=()=>!1,VSe=e=>USe.test(e),KSe=e=>BSe.test(e),GSe=e=>!se(e)&&!ae(e),YSe=e=>Uf(e,I8,D8),se=e=>N8.test(e),Uo=e=>Uf(e,$8,qSe),px=e=>Uf(e,ZSe,Oe),tM=e=>Uf(e,z8,D8),JSe=e=>Uf(e,j8,KSe),Pp=e=>Uf(e,L8,VSe),ae=e=>M8.test(e),dd=e=>Bf(e,$8),QSe=e=>Bf(e,e0e),nM=e=>Bf(e,z8),XSe=e=>Bf(e,I8),WSe=e=>Bf(e,j8),Up=e=>Bf(e,L8,!0),Uf=(e,t,n)=>{const r=N8.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Bf=(e,t,n=!1)=>{const r=M8.exec(e);return r?r[1]?t(r[1]):n:!1},z8=e=>e==="position"||e==="percentage",j8=e=>e==="image"||e==="url",I8=e=>e==="length"||e==="size"||e==="bg-size",$8=e=>e==="length",ZSe=e=>e==="number",e0e=e=>e==="family-name",L8=e=>e==="shadow",t0e=()=>{const e=Xt("color"),t=Xt("font"),n=Xt("text"),r=Xt("font-weight"),i=Xt("tracking"),s=Xt("leading"),a=Xt("breakpoint"),o=Xt("container"),l=Xt("spacing"),c=Xt("radius"),f=Xt("shadow"),u=Xt("inset-shadow"),d=Xt("text-shadow"),h=Xt("drop-shadow"),g=Xt("blur"),v=Xt("perspective"),x=Xt("aspect"),m=Xt("ease"),b=Xt("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],_=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[..._(),ae,se],E=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],M=()=>[ae,se,l],D=()=>[gc,"full","auto",...M()],N=()=>[ba,"none","subgrid",ae,se],I=()=>["auto",{span:["full",ba,ae,se]},ba,ae,se],$=()=>[ba,"auto",ae,se],X=()=>["auto","min","max","fr",ae,se],Q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Y=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...M()],L=()=>[gc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],j=()=>[e,ae,se],ne=()=>[..._(),nM,tM,{position:[ae,se]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Re=()=>["auto","cover","contain",XSe,YSe,{size:[ae,se]}],U=()=>[mx,dd,Uo],T=()=>["","none","full",c,ae,se],Z=()=>["",Oe,dd,Uo],ee=()=>["solid","dashed","dotted","double"],le=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],H=()=>[Oe,mx,nM,tM],me=()=>["","none",g,ae,se],xe=()=>["none",Oe,ae,se],we=()=>["none",Oe,ae,se],Ne=()=>[Oe,ae,se],$e=()=>[gc,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[xs],breakpoint:[xs],color:[HSe],container:[xs],"drop-shadow":[xs],ease:["in","out","in-out"],font:[GSe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[xs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[xs],shadow:[xs],spacing:["px",Oe],text:[xs],"text-shadow":[xs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",gc,se,ae,x]}],container:["container"],columns:[{columns:[Oe,se,ae,o]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:C()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[ba,"auto",ae,se]}],basis:[{basis:[gc,"full","auto",o,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Oe,gc,"auto","initial","none",se]}],grow:[{grow:["",Oe,ae,se]}],shrink:[{shrink:["",Oe,ae,se]}],order:[{order:[ba,"first","last","none",ae,se]}],"grid-cols":[{"grid-cols":N()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":N()}],"row-start-end":[{row:I()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":X()}],"auto-rows":[{"auto-rows":X()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Q(),"normal"]}],"justify-items":[{"justify-items":[...Y(),"normal"]}],"justify-self":[{"justify-self":["auto",...Y()]}],"align-content":[{content:["normal",...Q()]}],"align-items":[{items:[...Y(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Y(),{baseline:["","last"]}]}],"place-content":[{"place-content":Q()}],"place-items":[{"place-items":[...Y(),"baseline"]}],"place-self":[{"place-self":["auto",...Y()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:z()}],mx:[{mx:z()}],my:[{my:z()}],ms:[{ms:z()}],me:[{me:z()}],mt:[{mt:z()}],mr:[{mr:z()}],mb:[{mb:z()}],ml:[{ml:z()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:L()}],w:[{w:[o,"screen",...L()]}],"min-w":[{"min-w":[o,"screen","none",...L()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...L()]}],h:[{h:["screen","lh",...L()]}],"min-h":[{"min-h":["screen","lh","none",...L()]}],"max-h":[{"max-h":["screen","lh",...L()]}],"font-size":[{text:["base",n,dd,Uo]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ae,px]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",mx,se]}],"font-family":[{font:[QSe,se,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,ae,se]}],"line-clamp":[{"line-clamp":[Oe,"none",ae,px]}],leading:[{leading:[s,...M()]}],"list-image":[{"list-image":["none",ae,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:j()}],"text-color":[{text:j()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ee(),"wavy"]}],"text-decoration-thickness":[{decoration:[Oe,"from-font","auto",ae,Uo]}],"text-decoration-color":[{decoration:j()}],"underline-offset":[{"underline-offset":[Oe,"auto",ae,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,se]}],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",ae,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:ne()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:Re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ba,ae,se],radial:["",ae,se],conic:[ba,ae,se]},WSe,JSe]}],"bg-color":[{bg:j()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:j()}],"gradient-via":[{via:j()}],"gradient-to":[{to:j()}],rounded:[{rounded:T()}],"rounded-s":[{"rounded-s":T()}],"rounded-e":[{"rounded-e":T()}],"rounded-t":[{"rounded-t":T()}],"rounded-r":[{"rounded-r":T()}],"rounded-b":[{"rounded-b":T()}],"rounded-l":[{"rounded-l":T()}],"rounded-ss":[{"rounded-ss":T()}],"rounded-se":[{"rounded-se":T()}],"rounded-ee":[{"rounded-ee":T()}],"rounded-es":[{"rounded-es":T()}],"rounded-tl":[{"rounded-tl":T()}],"rounded-tr":[{"rounded-tr":T()}],"rounded-br":[{"rounded-br":T()}],"rounded-bl":[{"rounded-bl":T()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ee(),"hidden","none"]}],"divide-style":[{divide:[...ee(),"hidden","none"]}],"border-color":[{border:j()}],"border-color-x":[{"border-x":j()}],"border-color-y":[{"border-y":j()}],"border-color-s":[{"border-s":j()}],"border-color-e":[{"border-e":j()}],"border-color-t":[{"border-t":j()}],"border-color-r":[{"border-r":j()}],"border-color-b":[{"border-b":j()}],"border-color-l":[{"border-l":j()}],"divide-color":[{divide:j()}],"outline-style":[{outline:[...ee(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Oe,ae,se]}],"outline-w":[{outline:["",Oe,dd,Uo]}],"outline-color":[{outline:j()}],shadow:[{shadow:["","none",f,Up,Pp]}],"shadow-color":[{shadow:j()}],"inset-shadow":[{"inset-shadow":["none",u,Up,Pp]}],"inset-shadow-color":[{"inset-shadow":j()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:j()}],"ring-offset-w":[{"ring-offset":[Oe,Uo]}],"ring-offset-color":[{"ring-offset":j()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":j()}],"text-shadow":[{"text-shadow":["none",d,Up,Pp]}],"text-shadow-color":[{"text-shadow":j()}],opacity:[{opacity:[Oe,ae,se]}],"mix-blend":[{"mix-blend":[...le(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":le()}],"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":[Oe]}],"mask-image-linear-from-pos":[{"mask-linear-from":H()}],"mask-image-linear-to-pos":[{"mask-linear-to":H()}],"mask-image-linear-from-color":[{"mask-linear-from":j()}],"mask-image-linear-to-color":[{"mask-linear-to":j()}],"mask-image-t-from-pos":[{"mask-t-from":H()}],"mask-image-t-to-pos":[{"mask-t-to":H()}],"mask-image-t-from-color":[{"mask-t-from":j()}],"mask-image-t-to-color":[{"mask-t-to":j()}],"mask-image-r-from-pos":[{"mask-r-from":H()}],"mask-image-r-to-pos":[{"mask-r-to":H()}],"mask-image-r-from-color":[{"mask-r-from":j()}],"mask-image-r-to-color":[{"mask-r-to":j()}],"mask-image-b-from-pos":[{"mask-b-from":H()}],"mask-image-b-to-pos":[{"mask-b-to":H()}],"mask-image-b-from-color":[{"mask-b-from":j()}],"mask-image-b-to-color":[{"mask-b-to":j()}],"mask-image-l-from-pos":[{"mask-l-from":H()}],"mask-image-l-to-pos":[{"mask-l-to":H()}],"mask-image-l-from-color":[{"mask-l-from":j()}],"mask-image-l-to-color":[{"mask-l-to":j()}],"mask-image-x-from-pos":[{"mask-x-from":H()}],"mask-image-x-to-pos":[{"mask-x-to":H()}],"mask-image-x-from-color":[{"mask-x-from":j()}],"mask-image-x-to-color":[{"mask-x-to":j()}],"mask-image-y-from-pos":[{"mask-y-from":H()}],"mask-image-y-to-pos":[{"mask-y-to":H()}],"mask-image-y-from-color":[{"mask-y-from":j()}],"mask-image-y-to-color":[{"mask-y-to":j()}],"mask-image-radial":[{"mask-radial":[ae,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":H()}],"mask-image-radial-to-pos":[{"mask-radial-to":H()}],"mask-image-radial-from-color":[{"mask-radial-from":j()}],"mask-image-radial-to-color":[{"mask-radial-to":j()}],"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":_()}],"mask-image-conic-pos":[{"mask-conic":[Oe]}],"mask-image-conic-from-pos":[{"mask-conic-from":H()}],"mask-image-conic-to-pos":[{"mask-conic-to":H()}],"mask-image-conic-from-color":[{"mask-conic-from":j()}],"mask-image-conic-to-color":[{"mask-conic-to":j()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:ne()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:Re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,se]}],filter:[{filter:["","none",ae,se]}],blur:[{blur:me()}],brightness:[{brightness:[Oe,ae,se]}],contrast:[{contrast:[Oe,ae,se]}],"drop-shadow":[{"drop-shadow":["","none",h,Up,Pp]}],"drop-shadow-color":[{"drop-shadow":j()}],grayscale:[{grayscale:["",Oe,ae,se]}],"hue-rotate":[{"hue-rotate":[Oe,ae,se]}],invert:[{invert:["",Oe,ae,se]}],saturate:[{saturate:[Oe,ae,se]}],sepia:[{sepia:["",Oe,ae,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,se]}],"backdrop-blur":[{"backdrop-blur":me()}],"backdrop-brightness":[{"backdrop-brightness":[Oe,ae,se]}],"backdrop-contrast":[{"backdrop-contrast":[Oe,ae,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Oe,ae,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Oe,ae,se]}],"backdrop-invert":[{"backdrop-invert":["",Oe,ae,se]}],"backdrop-opacity":[{"backdrop-opacity":[Oe,ae,se]}],"backdrop-saturate":[{"backdrop-saturate":[Oe,ae,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Oe,ae,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Oe,"initial",ae,se]}],ease:[{ease:["linear","initial",m,ae,se]}],delay:[{delay:[Oe,ae,se]}],animate:[{animate:["none",b,ae,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,ae,se]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:xe()}],"rotate-x":[{"rotate-x":xe()}],"rotate-y":[{"rotate-y":xe()}],"rotate-z":[{"rotate-z":xe()}],scale:[{scale:we()}],"scale-x":[{"scale-x":we()}],"scale-y":[{"scale-y":we()}],"scale-z":[{"scale-z":we()}],"scale-3d":["scale-3d"],skew:[{skew:Ne()}],"skew-x":[{"skew-x":Ne()}],"skew-y":[{"skew-y":Ne()}],transform:[{transform:[ae,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:$e()}],"translate-x":[{"translate-x":$e()}],"translate-y":[{"translate-y":$e()}],"translate-z":[{"translate-z":$e()}],"translate-none":["translate-none"],accent:[{accent:j()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:j()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,se]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,se]}],fill:[{fill:["none",...j()]}],"stroke-w":[{stroke:[Oe,dd,Uo,px]}],stroke:[{stroke:["none",...j()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},n0e=jSe(t0e);function Ie(...e){return n0e(C8(e))}function F8({...e}){return p.jsx(nB,{"data-slot":"dialog",...e})}function r0e({...e}){return p.jsx(rB,{"data-slot":"dialog-portal",...e})}function i0e({className:e,...t}){return p.jsx(iB,{"data-slot":"dialog-overlay",className:Ie("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function P8({children:e,className:t,showCloseButton:n=!0,...r}){return p.jsxs(r0e,{"data-slot":"dialog-portal",children:[p.jsx(i0e,{}),p.jsxs(sB,{"data-slot":"dialog-content",className:Ie("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 outline-none sm:max-w-lg",t),...r,children:[e,n&&p.jsxs(hye,{"data-slot":"dialog-close",className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[p.jsx(E6,{}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function U8({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-header",className:Ie("flex flex-col gap-2 text-center sm:text-left",e),...t})}function s0e({className:e,...t}){return p.jsx("div",{"data-slot":"dialog-footer",className:Ie("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function B8({className:e,...t}){return p.jsx(fye,{"data-slot":"dialog-title",className:Ie("text-lg leading-none font-semibold",e),...t})}function H8({className:e,...t}){return p.jsx(dye,{"data-slot":"dialog-description",className:Ie("text-muted-foreground text-sm",e),...t})}function a0e({className:e,...t}){return p.jsx(nc,{"data-slot":"command",className:Ie("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function o0e({children:e,className:t,description:n="Search for a command to run...",showCloseButton:r=!0,title:i="Command Palette",...s}){return p.jsxs(F8,{...s,children:[p.jsxs(U8,{className:"sr-only",children:[p.jsx(B8,{children:i}),p.jsx(H8,{children:n})]}),p.jsx(P8,{className:Ie("overflow-hidden p-0",t),showCloseButton:r,children:p.jsx(a0e,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})]})}function l0e({className:e,...t}){return p.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[p.jsx(mT,{className:"size-4 shrink-0 opacity-50"}),p.jsx(nc.Input,{"data-slot":"command-input",className:Ie("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",e),...t})]})}function c0e({className:e,...t}){return p.jsx(nc.List,{"data-slot":"command-list",className:Ie("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function u0e({...e}){return p.jsx(nc.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function gx({className:e,...t}){return p.jsx(nc.Group,{"data-slot":"command-group",className:Ie("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",e),...t})}function rM({className:e,...t}){return p.jsx(nc.Separator,{"data-slot":"command-separator",className:Ie("bg-border -mx-1 h-px",e),...t})}function ws({className:e,...t}){return p.jsx(nc.Item,{"data-slot":"command-item",className:Ie("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...t})}function yx({className:e,...t}){return p.jsx("span",{"data-slot":"command-shortcut",className:Ie("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}const f0e=[{key:"all",label:"All",shortcut:"1"},{key:"mine",label:"Mine",shortcut:"2"},{key:"account",label:"Account",shortcut:"3"},{key:"author",label:"Author",shortcut:"4"},{key:"scope",label:"Scope",shortcut:"5"},{key:"repo",label:"Repo",shortcut:"6"},{key:"status",label:"Status",shortcut:"7"}];function d0e(){const e=On(bN),t=kt(bN),n=kt(tc),r=kt(pb),i=kt(p6),s=kt(u_),a=o=>{n("settings"),o&&s(o),t(!1)};return w.useEffect(()=>{const o=l=>{l.key==="p"&&(l.metaKey||l.ctrlKey)&&(l.preventDefault(),t(c=>!c))};return document.addEventListener("keydown",o),()=>document.removeEventListener("keydown",o)},[t]),p.jsxs(o0e,{open:e,onOpenChange:t,showCloseButton:!1,children:[p.jsx(l0e,{placeholder:"Type a command..."}),p.jsxs(c0e,{children:[p.jsx(u0e,{children:"No results found."}),p.jsxs(gx,{heading:"Actions",children:[p.jsxs(ws,{onSelect:()=>{i({}),t(!1)},children:[p.jsx(w6,{}),"Refresh PRs",p.jsx(yx,{children:"R"})]}),p.jsxs(ws,{onSelect:()=>{n("prs"),t(!1)},children:[p.jsx(SN,{}),"View: PR List"]}),p.jsxs(ws,{onSelect:()=>{n("notifications"),t(!1)},children:[p.jsx(S6,{}),"View: Notifications",p.jsx(yx,{children:"N"})]})]}),p.jsx(rM,{}),p.jsxs(gx,{heading:"Settings",children:[p.jsxs(ws,{onSelect:()=>a(),children:[p.jsx(Cc,{}),"Open Settings"]}),p.jsxs(ws,{onSelect:()=>a("accounts"),children:[p.jsx(Cc,{}),"Settings: Accounts"]}),p.jsxs(ws,{onSelect:()=>a("theme"),children:[p.jsx(Cc,{}),"Settings: Theme"]}),p.jsxs(ws,{onSelect:()=>a("config"),children:[p.jsx(Cc,{}),"Settings: Config"]}),p.jsxs(ws,{onSelect:()=>a("about"),children:[p.jsx(Cc,{}),"Settings: About"]})]}),p.jsx(rM,{}),p.jsx(gx,{heading:"Filters",children:f0e.map(o=>p.jsxs(ws,{onSelect:()=>{o.key==="all"?r({type:"all"}):r({type:o.key}),t(!1)},children:[p.jsx(SN,{}),"Filter: ",o.label,p.jsx(yx,{children:o.shortcut})]},o.key))})]})]})}const C_=e=>{const t=e.match(/^\w+\(([^)]+)\):/);if(t!=null&&t[1])return t[1];const n=e.match(/^([A-Z]+-\d+):/);return n!=null&&n[1]?n[1]:null},iM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,sM=C8,jT=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return sM(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:i,defaultVariants:s}=t,a=Object.keys(i).map(c=>{const f=n==null?void 0:n[c],u=s==null?void 0:s[c];if(f===null)return null;const d=iM(f)||iM(u);return i[c][d]}),o=n&&Object.entries(n).reduce((c,f)=>{let[u,d]=f;return d===void 0||(c[u]=d),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,f)=>{let{class:u,className:d,...h}=f;return Object.entries(h).every(g=>{let[v,x]=g;return Array.isArray(x)?x.includes({...s,...o}[v]):{...s,...o}[v]===x})?[...c,u,d]:c},[]);return sM(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},h0e=jT("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-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",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",xs:"h-6 gap-1 rounded-md px-2 text-xs has-[>svg]:px-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-xs":"size-6 rounded-md [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function tn({asChild:e=!1,className:t,size:n="default",variant:r="default",...i}){const s=e?T6:"button";return p.jsx(s,{"data-slot":"button","data-variant":r,"data-size":n,className:Ie(h0e({variant:r,size:n,className:t})),...i})}function q8({className:e,type:t,...n}){return p.jsx("input",{type:t,"data-slot":"input",className:Ie("file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground dark:bg-input/30 border-input h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","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",e),...n})}function m0e({...e}){return p.jsx(Gve,{"data-slot":"select",...e})}function p0e({...e}){return p.jsx(Jve,{"data-slot":"select-value",...e})}function g0e({children:e,className:t,size:n="default",...r}){return p.jsxs(Yve,{"data-slot":"select-trigger","data-size":n,className:Ie("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...r,children:[e,p.jsx(Qve,{asChild:!0,children:p.jsx(dS,{className:"size-4 opacity-50"})})]})}function y0e({align:e="center",children:t,className:n,position:r="item-aligned",...i}){return p.jsx(Xve,{children:p.jsxs(Wve,{"data-slot":"select-content",className:Ie("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",n),position:r,align:e,...i,children:[p.jsx(v0e,{}),p.jsx(Zve,{className:Ie("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),p.jsx(S0e,{})]})})}function b0e({children:e,className:t,...n}){return p.jsxs(eSe,{"data-slot":"select-item",className:Ie("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",t),...n,children:[p.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:p.jsx(nSe,{children:p.jsx($me,{className:"size-4"})})}),p.jsx(tSe,{children:e})]})}function v0e({className:e,...t}){return p.jsx(rSe,{"data-slot":"select-scroll-up-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(Pme,{className:"size-4"})})}function S0e({className:e,...t}){return p.jsx(iSe,{"data-slot":"select-scroll-down-button",className:Ie("flex cursor-default items-center justify-center py-1",e),...t,children:p.jsx(dS,{className:"size-4"})})}const x0e=jT("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium hover:bg-muted hover:text-muted-foreground disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] outline-none transition-[color,box-shadow] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive whitespace-nowrap",{variants:{variant:{default:"bg-transparent",outline:"border border-input bg-transparent shadow-xs hover:bg-accent hover:text-accent-foreground"},size:{default:"h-9 px-2 min-w-9",sm:"h-8 px-1.5 min-w-8",lg:"h-10 px-2.5 min-w-10"}},defaultVariants:{variant:"default",size:"default"}}),V8=w.createContext({size:"default",variant:"default",spacing:0});function w0e({children:e,className:t,size:n,spacing:r=0,variant:i,...s}){return p.jsx(hSe,{"data-slot":"toggle-group","data-variant":i,"data-size":n,"data-spacing":r,className:Ie("group/toggle-group flex w-fit items-center rounded-md",t),...s,children:p.jsx(V8,{value:{variant:i,size:n,spacing:r},children:e})})}function _0e({children:e,className:t,size:n,variant:r,...i}){const s=w.useContext(V8);return p.jsx(mSe,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,"data-spacing":s.spacing,className:Ie(x0e({variant:s.variant||r,size:s.size||n}),"w-auto min-w-0 shrink-0 px-3 focus:z-10 focus-visible:z-10","data-[spacing=0]:rounded-none data-[spacing=0]:shadow-none data-[spacing=0]:first:rounded-l-md data-[spacing=0]:last:rounded-r-md data-[spacing=0]:data-[variant=outline]:border-l-0 data-[spacing=0]:data-[variant=outline]:first:border-l",t),...i,children:e})}const k0e=[{key:"all",label:"All"},{key:"hot",label:"Hot",icon:!0},{key:"mine",label:"Mine"},{key:"account",label:"Account"},{key:"author",label:"Author"},{key:"scope",label:"Scope"},{key:"repo",label:"Repo"},{key:"status",label:"Status"}];function E0e(){const e=On(If),t=On(pb),n=kt(pb),r=On(c_),i=kt(c_),s=e.pullRequests,a=e.currentUser,o=w.useMemo(()=>{var x;const u=new Set,d=new Set,h=new Set,g=new Set,v=new Set;for(const m of s){u.add(m.author),d.add(((x=m.account)==null?void 0:x.id)??"unknown"),v.add(m.repositoryName);const b=C_(m.title);b&&(h.add(b),a&&m.author===a&&g.add(b))}return{authors:Array.from(u).sort(),accounts:Array.from(d).sort(),scopes:Array.from(h).sort(),myScopes:Array.from(g).sort(),repos:Array.from(v).sort()}},[s,a]),l=u=>{const d=u;if(!d||d==="all"){n({type:"all"});return}if(d==="hot"){n({type:"hot"});return}const h=d==="mine"?o.myScopes:d==="author"?o.authors:d==="account"?o.accounts:d==="scope"?o.scopes:d==="repo"?o.repos:d==="status"?["approved","pending","mergeable","conflicts"]:[];h.length>0&&h[0]!==void 0&&n({type:d,value:h[0]})},c=u=>{t.type!=="all"&&n({type:t.type,value:u})},f=t.type==="mine"?o.myScopes:t.type==="author"?o.authors:t.type==="account"?o.accounts:t.type==="scope"?o.scopes:t.type==="repo"?o.repos:t.type==="status"?["approved","pending","mergeable","conflicts"]:[];return p.jsx("div",{className:"border-b bg-background",children:p.jsxs("div",{className:"mx-auto flex max-w-5xl items-center gap-3 px-4 py-2",children:[p.jsx(w0e,{type:"single",variant:"outline",size:"sm",value:t.type,onValueChange:l,children:k0e.map(u=>p.jsxs(_0e,{value:u.key,className:u.icon?"gap-1":void 0,children:[u.icon&&p.jsx(Zme,{className:"size-3.5"}),u.label]},u.key))}),f.length>0&&t.type!=="all"&&t.type!=="hot"&&t.value&&p.jsxs(m0e,{value:t.value,onValueChange:c,children:[p.jsx(g0e,{size:"sm",className:"w-[180px]",children:p.jsx(p0e,{})}),p.jsx(y0e,{children:f.map(u=>p.jsx(b0e,{value:u,children:u},u))})]}),p.jsxs("div",{className:"relative ml-auto w-64",children:[p.jsx(mT,{className:"absolute left-2.5 top-2.5 size-4 text-muted-foreground"}),p.jsx(q8,{placeholder:"Search...",className:"h-8 pl-8",value:r,onChange:u=>i(u.target.value)}),r&&p.jsx(tn,{variant:"ghost",size:"icon-xs",className:"absolute right-1 top-1",onClick:()=>i(""),children:p.jsx(E6,{className:"size-3"})})]})]})})}const IT=e=>{const t=e.getDate().toString().padStart(2,"0"),n=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getFullYear();return`${t}.${n}.${r}`},C0e=(e,t)=>{const n=Math.max(0,Math.floor((t.getTime()-e.getTime())/1e3));return c6(n).pipe(oh(r=>r<60,r=>`Updated ${r}s ago`),oh(r=>r<3600,r=>`Updated ${Math.floor(r/60)}m ago`),oh(r=>r<86400,r=>`Updated ${Math.floor(r/3600)}h ago`),u6(()=>`Updated on ${IT(e)}`))},$T={grantedDismissed:"codecommit-granted-dismissed",theme:"codecommit-theme"},K8=w.createContext({theme:"system",setTheme:()=>{}}),T0e=()=>{const e=localStorage.getItem($T.theme);return e==="dark"||e==="light"||e==="system"?e:"system"};function A0e({children:e}){const[t,n]=w.useState(T0e),r=w.useCallback(i=>{localStorage.setItem($T.theme,i),n(i)},[]);return w.useEffect(()=>{const i=document.documentElement,s=t==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t;i.classList.remove("dark","light"),i.classList.add(s)},[t]),w.useEffect(()=>{if(t!=="system")return;const i=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>{const a=document.documentElement;a.classList.remove("dark","light"),a.classList.add(i.matches?"dark":"light")};return i.addEventListener("change",s),()=>i.removeEventListener("change",s)},[t]),p.jsx(K8,{value:{theme:t,setTheme:r},children:e})}function G8(){return w.useContext(K8)}function O0e({className:e,...t}){return p.jsx("kbd",{"data-slot":"kbd",className:Ie("bg-muted text-muted-foreground pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-sm px-1 font-sans text-xs font-medium select-none","[&_svg:not([class*='size-'])]:size-3",e),...t})}function zo({className:e,decorative:t=!0,orientation:n="horizontal",...r}){return p.jsx(lSe,{"data-slot":"separator",decorative:t,orientation:n,className:Ie("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 R0e(){var l;const e=On(If),t=kt(p6),n=kt(tc),{setTheme:r,theme:i}=G8(),s=e.status==="loading",a=e.status==="error",o=((l=e.notifications)==null?void 0:l.length)??0;return p.jsx("header",{className:"sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:p.jsxs("div",{className:"mx-auto flex h-14 max-w-5xl items-center gap-4 px-4",children:[p.jsx("button",{className:"text-sm font-semibold tracking-tight hover:text-foreground/80",onClick:()=>n("prs"),children:"codecommit"}),p.jsx(zo,{orientation:"vertical",className:"h-4"}),p.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.pullRequests.length," PRs"]}),a&&p.jsx("span",{className:"text-sm text-destructive",children:e.error??"Error loading PRs"}),e.lastUpdated&&!a&&p.jsx("span",{className:"text-xs text-muted-foreground",children:C0e(e.lastUpdated,new Date)}),p.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[p.jsx(tn,{variant:"ghost",size:"icon-sm",onClick:()=>t({}),disabled:s,children:p.jsx(w6,{className:Ie("size-4",s&&"animate-spin")})}),p.jsxs(tn,{variant:"ghost",size:"icon-sm",className:"relative",onClick:()=>n("notifications"),children:[p.jsx(S6,{className:"size-4"}),o>0&&p.jsx("span",{className:"absolute -right-0.5 -top-0.5 flex size-4 items-center justify-center rounded-full bg-destructive text-[10px] font-medium text-destructive-foreground",children:o>9?"9+":o}),p.jsx("span",{className:"sr-only",children:"Notifications"})]}),p.jsxs(tn,{variant:"ghost",size:"icon-sm",onClick:()=>n("settings"),children:[p.jsx(Cc,{className:"size-4"}),p.jsx("span",{className:"sr-only",children:"Settings"})]}),p.jsx(O0e,{children:"⌘P"}),p.jsxs(tn,{variant:"ghost",size:"icon-sm",onClick:()=>r(i==="dark"?"light":i==="light"?"system":"dark"),children:[p.jsx(_6,{className:"size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),p.jsx(x6,{className:"absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),p.jsx("span",{className:"sr-only",children:"Toggle theme"})]})]})]})})}const N0e=e=>/ExpiredToken|Unauthorized|AuthFailure|SSO|token|credentials/i.test(e),M0e=e=>{switch(e){case"error":return p.jsx(Bme,{className:"size-4 text-destructive shrink-0"});case"warning":return p.jsx(Epe,{className:"size-4 text-yellow-500 shrink-0"});case"success":return p.jsx(f_,{className:"size-4 text-green-500 shrink-0"});default:return p.jsx(hT,{className:"size-4 text-blue-500 shrink-0"})}},D0e=e=>{const t=new Date(e),r=new Date().getTime()-t.getTime();return r<6e4?"just now":r<36e5?`${Math.floor(r/6e4)}m ago`:r<864e5?`${Math.floor(r/36e5)}h ago`:t.toLocaleDateString()};function z0e(){const t=On(If).notifications??[],n=kt(vme),r=kt(Sme),i=kt(g6),s=kt(tc),[a,o]=w.useState({}),l=w.useCallback(c=>{o(f=>({...f,[c]:!f[c]}))},[]);return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsxs("div",{children:[p.jsx("h1",{className:"text-lg font-semibold",children:"Notifications"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"System events and alerts"})]}),p.jsxs("div",{className:"flex gap-2",children:[p.jsxs(tn,{variant:"outline",size:"sm",onClick:()=>n({}),children:[p.jsx(_pe,{className:"size-3.5 mr-1"}),"Clear all"]}),p.jsx(tn,{variant:"ghost",size:"sm",onClick:()=>s("prs"),children:"Back"})]})]}),p.jsx(zo,{}),t.length===0?p.jsx("p",{className:"text-sm text-muted-foreground py-8 text-center",children:"No notifications"}):p.jsx("div",{className:"divide-y rounded-md border",children:t.map((c,f)=>{const u=a[f]??!1;return p.jsxs("div",{className:"px-3 py-2.5",children:[p.jsxs("button",{className:"flex w-full items-start gap-3 text-left",onClick:()=>l(f),children:[M0e(c.type),p.jsxs("div",{className:"min-w-0 flex-1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-sm font-medium",children:c.title}),p.jsx("span",{className:"text-xs text-muted-foreground",children:D0e(c.timestamp)})]}),p.jsx("p",{className:`text-sm text-muted-foreground ${u?"whitespace-pre-wrap break-words":"truncate"}`,children:c.message})]}),p.jsx(dS,{className:`size-4 text-muted-foreground shrink-0 mt-0.5 transition-transform ${u?"rotate-180":""}`})]}),u&&N0e(c.message)&&p.jsxs("div",{className:"flex gap-1 mt-2 ml-7",children:[p.jsx(tn,{variant:"default",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{const d=Oce(dT)(c.profile??c.title);r({payload:{profile:d}})},children:"Login"}),p.jsx(tn,{variant:"outline",size:"sm",className:"h-7 px-2.5 text-xs",onClick:()=>{i({payload:{profile:c.profile??c.title}})},children:"Logout"})]})]},f)})})]})}const j0e=864e5,Bo=e=>Math.round(e*10)/10,I0e=(e,t,n)=>Math.min(t,Math.max(e,n)),aM=(e,t)=>Math.max(0,(t.getTime()-e.getTime())/j0e),$0e=e=>/^\w+(\([^)]+\))?:/.test(e)||/^[A-Z]+-\d+:/.test(e),Eb=(e,t)=>{if(e.commentCount===void 0)return q();const n=aM(e.lastModifiedDate,t),r=aM(e.creationDate,t),i=e.commentCount,s=$0e(e.title),a=!!e.description&&e.description.trim().length>0,o=-(n*1),l=-(r*.5),c=i*1,f=e.isApproved?2:0,u=e.isMergeable?0:-3,d=s?.5:0,h=a?.5:0,g=10+o+l+c+f+u+d+h,v=Bo(I0e(0,10,g)),x=[{label:"Base",value:10},{label:"Time decay",value:Bo(o)},{label:"Age",value:Bo(l)},{label:"Comments",value:Bo(c)},{label:"Approval",value:f},{label:"Conflicts",value:u},{label:"Scope",value:d},{label:"Description",value:h}],m=[{label:"Activity",description:`-1 per day since last update (${Math.round(n)}d ago)`,value:Bo(o),...n<2?{status:"positive",statusLabel:"ACTIVE"}:n<=7?{status:"neutral",statusLabel:"SLOWING"}:{status:"negative",statusLabel:"STALE"}},{label:"Age",description:`-0.5 per day since creation (${Math.round(r)}d old)`,value:Bo(l),...r<3?{status:"positive",statusLabel:"FRESH"}:r<=14?{status:"neutral",statusLabel:"AGING"}:{status:"negative",statusLabel:"OLD"}},{label:"Engagement",description:`+1 per comment (${i} comments)`,value:Bo(c),...i>=3?{status:"positive",statusLabel:"ACTIVE"}:i>=1?{status:"neutral",statusLabel:"QUIET"}:{status:"negative",statusLabel:"SILENT"}},{label:"Approval",description:e.isApproved?"+2 bonus for approval":"No approval yet (+2 when approved)",value:f,...e.isApproved?{status:"positive",statusLabel:"APPROVED"}:{status:"neutral",statusLabel:"PENDING"}},{label:"Mergeable",description:e.isMergeable?"No merge conflicts":"-3 penalty for merge conflicts",value:u,...e.isMergeable?{status:"positive",statusLabel:"CLEAN"}:{status:"negative",statusLabel:"CONFLICT"}},{label:"Scope",description:s?"+0.5 bonus — conventional commit or ticket prefix detected":"No scope prefix found (e.g. feat(auth): or JIRA-123:)",value:d,...s?{status:"positive",statusLabel:"DETECTED"}:{status:"negative",statusLabel:"MISSING"}},{label:"Description",description:a?"+0.5 bonus — PR description provided":"No PR description provided",value:h,...a?{status:"positive",statusLabel:"PROVIDED"}:{status:"negative",statusLabel:"MISSING"}}];return J({total:v,breakdown:x,categories:m})},LT=e=>c6(e).pipe(oh(t=>t>=7,()=>"green"),oh(t=>t>=4,()=>"yellow"),u6(()=>"red"));function L0e(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const F0e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,P0e=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,U0e={};function oM(e,t){return(U0e.jsx?P0e:F0e).test(e)}const B0e=/[ \t\n\f\r]/g;function H0e(e){return typeof e=="object"?e.type==="text"?lM(e.value):!1:lM(e)}function lM(e){return e.replace(B0e,"")===""}class ep{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ep.prototype.normal={};ep.prototype.property={};ep.prototype.space=void 0;function Y8(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new ep(n,r,t)}function T_(e){return e.toLowerCase()}class hr{constructor(t,n){this.attribute=n,this.property=t}}hr.prototype.attribute="";hr.prototype.booleanish=!1;hr.prototype.boolean=!1;hr.prototype.commaOrSpaceSeparated=!1;hr.prototype.commaSeparated=!1;hr.prototype.defined=!1;hr.prototype.mustUseProperty=!1;hr.prototype.number=!1;hr.prototype.overloadedBoolean=!1;hr.prototype.property="";hr.prototype.spaceSeparated=!1;hr.prototype.space=void 0;let q0e=0;const Ce=rc(),Ft=rc(),A_=rc(),V=rc(),ht=rc(),pu=rc(),gr=rc();function rc(){return 2**++q0e}const O_=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ce,booleanish:Ft,commaOrSpaceSeparated:gr,commaSeparated:pu,number:V,overloadedBoolean:A_,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),bx=Object.keys(O_);class FT extends hr{constructor(t,n,r,i){let s=-1;if(super(t,n),cM(this,"space",i),typeof r=="number")for(;++s<bx.length;){const a=bx[s];cM(this,bx[s],(r&O_[a])===O_[a])}}}FT.prototype.defined=!0;function cM(e,t,n){n&&(e[t]=n)}function Hf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new FT(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[T_(r)]=r,n[T_(s.attribute)]=r}return new ep(t,n,e.space)}const J8=Hf({properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:ht,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:V,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:ht,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:Ft,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Q8(e,t){return t in e?e[t]:t}function X8(e,t){return Q8(e,t.toLowerCase())}const V0e=Hf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pu,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:Ce,allowPaymentRequest:Ce,allowUserMedia:Ce,alt:null,as:null,async:Ce,autoCapitalize:null,autoComplete:ht,autoFocus:Ce,autoPlay:Ce,blocking:ht,capture:null,charSet:null,checked:Ce,cite:null,className:ht,cols:V,colSpan:null,content:null,contentEditable:Ft,controls:Ce,controlsList:ht,coords:V|pu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ce,defer:Ce,dir:null,dirName:null,disabled:Ce,download:A_,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ce,formTarget:null,headers:ht,height:V,hidden:A_,high:V,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:Ce,inputMode:null,integrity:null,is:null,isMap:Ce,itemId:null,itemProp:ht,itemRef:ht,itemScope:Ce,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ce,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:Ce,muted:Ce,name:null,nonce:null,noModule:Ce,noValidate:Ce,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:Ce,optimum:V,pattern:null,ping:ht,placeholder:null,playsInline:Ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ce,referrerPolicy:null,rel:ht,required:Ce,reversed:Ce,rows:V,rowSpan:V,sandbox:ht,scope:null,scoped:Ce,seamless:Ce,selected:Ce,shadowRootClonable:Ce,shadowRootDelegatesFocus:Ce,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:Ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:Ce,useMap:null,value:Ft,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ce,declare:Ce,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:Ce,noHref:Ce,noShade:Ce,noWrap:Ce,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:Ft,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ce,disableRemotePlayback:Ce,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:X8}),K0e=Hf({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:gr,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:ht,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:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:Ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,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:pu,g2:pu,glyphName:pu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:gr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,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:V,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:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:gr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:gr,rev:gr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:gr,requiredFeatures:gr,requiredFonts:gr,requiredFormats:gr,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:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:gr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:gr,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:gr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Q8}),W8=Hf({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()}}),Z8=Hf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:X8}),e9=Hf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),G0e={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"},Y0e=/[A-Z]/g,uM=/-[a-z]/g,J0e=/^data[-\w.:]+$/i;function Q0e(e,t){const n=T_(t);let r=t,i=hr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&J0e.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(uM,W0e);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!uM.test(s)){let a=s.replace(Y0e,X0e);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=FT}return new i(r,t)}function X0e(e){return"-"+e.toLowerCase()}function W0e(e){return e.charAt(1).toUpperCase()}const Z0e=Y8([J8,V0e,W8,Z8,e9],"html"),PT=Y8([J8,K0e,W8,Z8,e9],"svg");function exe(e){return e.join(" ").trim()}var UT={},fM=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,txe=/\n/g,nxe=/^\s*/,rxe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,ixe=/^:\s*/,sxe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,axe=/^[;\s]*/,oxe=/^\s+|\s+$/g,lxe=`
|
|
320
|
+
`,dM="/",hM="*",Wo="",cxe="comment",uxe="declaration";function fxe(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 i(g){var v=g.match(txe);v&&(n+=v.length);var x=g.lastIndexOf(lxe);r=~x?g.length-x:r+g.length}function s(){var g={line:n,column:r};return function(v){return v.position=new a(g),c(),v}}function a(g){this.start=g,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(g){var v=new Error(t.source+":"+n+":"+r+": "+g);if(v.reason=g,v.filename=t.source,v.line=n,v.column=r,v.source=e,!t.silent)throw v}function l(g){var v=g.exec(e);if(v){var x=v[0];return i(x),e=e.slice(x.length),v}}function c(){l(nxe)}function f(g){var v;for(g=g||[];v=u();)v!==!1&&g.push(v);return g}function u(){var g=s();if(!(dM!=e.charAt(0)||hM!=e.charAt(1))){for(var v=2;Wo!=e.charAt(v)&&(hM!=e.charAt(v)||dM!=e.charAt(v+1));)++v;if(v+=2,Wo===e.charAt(v-1))return o("End of comment missing");var x=e.slice(2,v-2);return r+=2,i(x),e=e.slice(v),r+=2,g({type:cxe,comment:x})}}function d(){var g=s(),v=l(rxe);if(v){if(u(),!l(ixe))return o("property missing ':'");var x=l(sxe),m=g({type:uxe,property:mM(v[0].replace(fM,Wo)),value:x?mM(x[0].replace(fM,Wo)):Wo});return l(axe),m}}function h(){var g=[];f(g);for(var v;v=d();)v!==!1&&(g.push(v),f(g));return g}return c(),h()}function mM(e){return e?e.replace(oxe,Wo):Wo}var dxe=fxe,hxe=zg&&zg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(UT,"__esModule",{value:!0});UT.default=pxe;const mxe=hxe(dxe);function pxe(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,mxe.default)(e),i=typeof t=="function";return r.forEach(s=>{if(s.type!=="declaration")return;const{property:a,value:o}=s;i?t(a,o,s):o&&(n=n||{},n[a]=o)}),n}var kS={};Object.defineProperty(kS,"__esModule",{value:!0});kS.camelCase=void 0;var gxe=/^--[a-zA-Z0-9_-]+$/,yxe=/-([a-z])/g,bxe=/^[^-]+$/,vxe=/^-(webkit|moz|ms|o|khtml)-/,Sxe=/^-(ms)-/,xxe=function(e){return!e||bxe.test(e)||gxe.test(e)},wxe=function(e,t){return t.toUpperCase()},pM=function(e,t){return"".concat(t,"-")},_xe=function(e,t){return t===void 0&&(t={}),xxe(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Sxe,pM):e=e.replace(vxe,pM),e.replace(yxe,wxe))};kS.camelCase=_xe;var kxe=zg&&zg.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Exe=kxe(UT),Cxe=kS;function R_(e,t){var n={};return!e||typeof e!="string"||(0,Exe.default)(e,function(r,i){r&&i&&(n[(0,Cxe.camelCase)(r,t)]=i)}),n}R_.default=R_;var Txe=R_;const Axe=rm(Txe),t9=n9("end"),BT=n9("start");function n9(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 Oxe(e){const t=BT(e),n=t9(e);if(t&&n)return{start:t,end:n}}function lh(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?gM(e.position):"start"in e||"end"in e?gM(e):"line"in e||"column"in e?N_(e):""}function N_(e){return yM(e&&e.line)+":"+yM(e&&e.column)}function gM(e){return N_(e&&e.start)+"-"+N_(e&&e.end)}function yM(e){return e&&typeof e=="number"?e:1}class Ln extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},a=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof t=="string"?i=t:!s.cause&&t&&(a=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const l=r.indexOf(":");l===-1?s.ruleId=r:(s.source=r.slice(0,l),s.ruleId=r.slice(l+1))}if(!s.place&&s.ancestors&&s.ancestors){const l=s.ancestors[s.ancestors.length-1];l&&(s.place=l.position)}const o=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=lh(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=a&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Ln.prototype.file="";Ln.prototype.name="";Ln.prototype.reason="";Ln.prototype.message="";Ln.prototype.stack="";Ln.prototype.column=void 0;Ln.prototype.line=void 0;Ln.prototype.ancestors=void 0;Ln.prototype.cause=void 0;Ln.prototype.fatal=void 0;Ln.prototype.place=void 0;Ln.prototype.ruleId=void 0;Ln.prototype.source=void 0;const HT={}.hasOwnProperty,Rxe=new Map,Nxe=/[A-Z]/g,Mxe=new Set(["table","tbody","thead","tfoot","tr"]),Dxe=new Set(["td","th"]),r9="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function zxe(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=Bxe(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=Uxe(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?PT:Z0e,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=i9(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function i9(e,t,n){if(t.type==="element")return jxe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ixe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Lxe(e,t,n);if(t.type==="mdxjsEsm")return $xe(e,t);if(t.type==="root")return Fxe(e,t,n);if(t.type==="text")return Pxe(e,t)}function jxe(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=PT,e.schema=i),e.ancestors.push(t);const s=a9(e,t.tagName,!1),a=Hxe(e,t);let o=VT(e,t);return Mxe.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!H0e(l):!0})),s9(e,a,s,t),qT(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Ixe(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)}em(e,t.position)}function $xe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);em(e,t.position)}function Lxe(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=PT,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:a9(e,t.name,!0),a=qxe(e,t),o=VT(e,t);return s9(e,a,s,t),qT(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function Fxe(e,t,n){const r={};return qT(r,VT(e,t)),e.create(t,e.Fragment,r,n)}function Pxe(e,t){return t.value}function s9(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function qT(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Uxe(e,t,n){return r;function r(i,s,a,o){const c=Array.isArray(a.children)?n:t;return o?c(s,a,o):c(s,a)}}function Bxe(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=BT(r);return t(i,s,a,o,{columnNumber:l?l.column-1:void 0,fileName:e,lineNumber:l?l.line:void 0},void 0)}}function Hxe(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&HT.call(t.properties,i)){const s=Vxe(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&Dxe.has(t.tagName)?r=o:n[a]=o}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function qxe(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const a=s.expression;a.type;const o=a.properties[0];o.type,Object.assign(n,e.evaluater.evaluateExpression(o.argument))}else em(e,t.position);else{const i=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const o=r.value.data.estree.body[0];o.type,s=e.evaluater.evaluateExpression(o.expression)}else em(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function VT(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:Rxe;for(;++r<t.children.length;){const s=t.children[r];let a;if(e.passKeys){const l=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(l){const c=i.get(l)||0;a=l+"-"+c,i.set(l,c+1)}}const o=i9(e,s,a);o!==void 0&&n.push(o)}return n}function Vxe(e,t,n){const r=Q0e(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?L0e(n):exe(n)),r.property==="style"){let i=typeof n=="object"?n:Kxe(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Gxe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?G0e[r.property]||r.property:r.attribute,n]}}function Kxe(e,t){try{return Axe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Ln("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=r9+"#cannot-parse-style-attribute",i}}function a9(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,a;for(;++s<i.length;){const o=oM(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(s&&o.type==="Literal"),optional:!1}:o}r=a}else r=oM(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return HT.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);em(e)}function em(e,t){const n=new Ln("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=r9+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Gxe(e){const t={};let n;for(n in e)HT.call(e,n)&&(t[Yxe(n)]=e[n]);return t}function Yxe(e){let t=e.replace(Nxe,Jxe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Jxe(e){return"-"+e.toLowerCase()}const vx={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"]},Qxe={};function KT(e,t){const n=Qxe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return o9(e,r,i)}function o9(e,t,n){if(Xxe(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 bM(e.children,t,n)}return Array.isArray(e)?bM(e,t,n):""}function bM(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=o9(e[i],t,n);return r.join("")}function Xxe(e){return!!(e&&typeof e=="object")}const vM=document.createElement("i");function GT(e){const t="&"+e+";";vM.innerHTML=t;const n=vM.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Dr(e,t,n,r){const i=e.length;let s=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);s<r.length;)a=r.slice(s,s+1e4),a.unshift(t,0),e.splice(...a),s+=1e4,t+=1e4}function Kr(e,t){return e.length>0?(Dr(e,e.length,0,t),e):t}const SM={}.hasOwnProperty;function l9(e){const t={};let n=-1;for(;++n<e.length;)Wxe(t,e[n]);return t}function Wxe(e,t){let n;for(n in t){const i=(SM.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){SM.call(i,a)||(i[a]=[]);const o=s[a];Zxe(i[a],Array.isArray(o)?o:o?[o]:[])}}}function Zxe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Dr(e,0,0,r)}function c9(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 Ei(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Vn=jo(/[A-Za-z]/),jn=jo(/[\dA-Za-z]/),e1e=jo(/[#-'*+\--9=?A-Z^-~]/);function Cb(e){return e!==null&&(e<32||e===127)}const M_=jo(/\d/),t1e=jo(/[\dA-Fa-f]/),n1e=jo(/[!-/:-@[-`{-~]/);function de(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function ze(e){return e===-2||e===-1||e===32}const ES=jo(new RegExp("\\p{P}|\\p{S}","u")),Ul=jo(/\s/);function jo(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function qf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&jn(e.charCodeAt(n+1))&&jn(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(a=String.fromCharCode(s));else if(s>55295&&s<57344){const o=e.charCodeAt(n+1);s<56320&&o>56319&&o<57344?(a=String.fromCharCode(s,o),i=1):a="�"}else a=String.fromCharCode(s);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Be(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return a;function a(l){return ze(l)?(e.enter(n),o(l)):t(l)}function o(l){return ze(l)&&s++<i?(e.consume(l),o):(e.exit(n),t(l))}}const r1e={tokenize:i1e};function i1e(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),Be(e,t,"linePrefix")}function i(o){return e.enter("paragraph"),s(o)}function s(o){const l=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=l),n=l,a(o)}function a(o){if(o===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(o);return}return de(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const s1e={tokenize:a1e},xM={tokenize:o1e};function a1e(e){const t=this,n=[];let r=0,i,s,a;return o;function o(S){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,l,c)(S)}return c(S)}function l(S){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&b();const _=t.events.length;let C=_,E;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){E=t.events[C][1].end;break}m(r);let A=_;for(;A<t.events.length;)t.events[A][1].end={...E},A++;return Dr(t.events,C+1,0,t.events.slice(_)),t.events.length=A,c(S)}return o(S)}function c(S){if(r===n.length){if(!i)return d(S);if(i.currentConstruct&&i.currentConstruct.concrete)return g(S);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xM,f,u)(S)}function f(S){return i&&b(),m(r),d(S)}function u(S){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,g(S)}function d(S){return t.containerState={},e.attempt(xM,h,g)(S)}function h(S){return r++,n.push([t.currentConstruct,t.containerState]),d(S)}function g(S){if(S===null){i&&b(),m(0),e.consume(S);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),v(S)}function v(S){if(S===null){x(e.exit("chunkFlow"),!0),m(0),e.consume(S);return}return de(S)?(e.consume(S),x(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(S),v)}function x(S,_){const C=t.sliceStream(S);if(_&&C.push(null),S.previous=s,s&&(s.next=S),s=S,i.defineSkip(S.start),i.write(C),t.parser.lazy[S.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<a&&(!i.events[E][1].end||i.events[E][1].end.offset>a))return;const A=t.events.length;let M=A,D,N;for(;M--;)if(t.events[M][0]==="exit"&&t.events[M][1].type==="chunkFlow"){if(D){N=t.events[M][1].end;break}D=!0}for(m(r),E=A;E<t.events.length;)t.events[E][1].end={...N},E++;Dr(t.events,M+1,0,t.events.slice(A)),t.events.length=E}}function m(S){let _=n.length;for(;_-- >S;){const C=n[_];t.containerState=C[1],C[0].exit.call(t,e)}n.length=S}function b(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function o1e(e,t,n){return Be(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ef(e){if(e===null||ft(e)||Ul(e))return 1;if(ES(e))return 2}function CS(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const D_={name:"attention",resolveAll:l1e,tokenize:c1e};function l1e(e,t){let n=-1,r,i,s,a,o,l,c,f;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;l=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 u={...e[r][1].end},d={...e[n][1].start};wM(u,-l),wM(d,l),a={type:l>1?"strongSequence":"emphasisSequence",start:u,end:{...e[r][1].end}},o={type:l>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:d},s={type:l>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:l>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},e[r][1].end={...a.start},e[n][1].start={...o.end},c=[],e[r][1].end.offset-e[r][1].start.offset&&(c=Kr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Kr(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=Kr(c,CS(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Kr(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(f=2,c=Kr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):f=0,Dr(e,r-1,n-r+3,c),n=r+c.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function c1e(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=ef(r);let s;return a;function a(l){return s=l,e.enter("attentionSequence"),o(l)}function o(l){if(l===s)return e.consume(l),o;const c=e.exit("attentionSequence"),f=ef(l),u=!f||f===2&&i||n.includes(l),d=!i||i===2&&f||n.includes(r);return c._open=!!(s===42?u:u&&(i||!d)),c._close=!!(s===42?d:d&&(f||!u)),t(l)}}function wM(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const u1e={name:"autolink",tokenize:f1e};function f1e(e,t,n){let r=0;return i;function i(h){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(h){return Vn(h)?(e.consume(h),a):h===64?n(h):c(h)}function a(h){return h===43||h===45||h===46||jn(h)?(r=1,o(h)):c(h)}function o(h){return h===58?(e.consume(h),r=0,l):(h===43||h===45||h===46||jn(h))&&r++<32?(e.consume(h),o):(r=0,c(h))}function l(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||Cb(h)?n(h):(e.consume(h),l)}function c(h){return h===64?(e.consume(h),f):e1e(h)?(e.consume(h),c):n(h)}function f(h){return jn(h)?u(h):n(h)}function u(h){return h===46?(e.consume(h),r=0,f):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||jn(h))&&r++<63){const g=h===45?d:u;return e.consume(h),g}return n(h)}}const tp={partial:!0,tokenize:d1e};function d1e(e,t,n){return r;function r(s){return ze(s)?Be(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||de(s)?t(s):n(s)}}const u9={continuation:{tokenize:m1e},exit:p1e,name:"blockQuote",tokenize:h1e};function h1e(e,t,n){const r=this;return i;function i(a){if(a===62){const o=r.containerState;return o.open||(e.enter("blockQuote",{_container:!0}),o.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),s}return n(a)}function s(a){return ze(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function m1e(e,t,n){const r=this;return i;function i(a){return ze(a)?Be(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(u9,t,n)(a)}}function p1e(e){e.exit("blockQuote")}const f9={name:"characterEscape",tokenize:g1e};function g1e(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return n1e(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const d9={name:"characterReference",tokenize:y1e};function y1e(e,t,n){const r=this;let i=0,s,a;return o;function o(u){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),l}function l(u){return u===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(u),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=jn,f(u))}function c(u){return u===88||u===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(u),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=t1e,f):(e.enter("characterReferenceValue"),s=7,a=M_,f(u))}function f(u){if(u===59&&i){const d=e.exit("characterReferenceValue");return a===jn&&!GT(r.sliceSerialize(d))?n(u):(e.enter("characterReferenceMarker"),e.consume(u),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(u)&&i++<s?(e.consume(u),f):n(u)}}const _M={partial:!0,tokenize:v1e},kM={concrete:!0,name:"codeFenced",tokenize:b1e};function b1e(e,t,n){const r=this,i={partial:!0,tokenize:C};let s=0,a=0,o;return l;function l(E){return c(E)}function c(E){const A=r.events[r.events.length-1];return s=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,o=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),f(E)}function f(E){return E===o?(a++,e.consume(E),f):a<3?n(E):(e.exit("codeFencedFenceSequence"),ze(E)?Be(e,u,"whitespace")(E):u(E))}function u(E){return E===null||de(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(_M,v,_)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||de(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),u(E)):ze(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Be(e,h,"whitespace")(E)):E===96&&E===o?n(E):(e.consume(E),d)}function h(E){return E===null||de(E)?u(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===null||de(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),u(E)):E===96&&E===o?n(E):(e.consume(E),g)}function v(E){return e.attempt(i,_,x)(E)}function x(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m}function m(E){return s>0&&ze(E)?Be(e,b,"linePrefix",s+1)(E):b(E)}function b(E){return E===null||de(E)?e.check(_M,v,_)(E):(e.enter("codeFlowValue"),S(E))}function S(E){return E===null||de(E)?(e.exit("codeFlowValue"),b(E)):(e.consume(E),S)}function _(E){return e.exit("codeFenced"),t(E)}function C(E,A,M){let D=0;return N;function N(Y){return E.enter("lineEnding"),E.consume(Y),E.exit("lineEnding"),I}function I(Y){return E.enter("codeFencedFence"),ze(Y)?Be(E,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):$(Y)}function $(Y){return Y===o?(E.enter("codeFencedFenceSequence"),X(Y)):M(Y)}function X(Y){return Y===o?(D++,E.consume(Y),X):D>=a?(E.exit("codeFencedFenceSequence"),ze(Y)?Be(E,Q,"whitespace")(Y):Q(Y)):M(Y)}function Q(Y){return Y===null||de(Y)?(E.exit("codeFencedFence"),A(Y)):M(Y)}}}function v1e(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const Sx={name:"codeIndented",tokenize:x1e},S1e={partial:!0,tokenize:w1e};function x1e(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Be(e,s,"linePrefix",5)(c)}function s(c){const f=r.events[r.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):de(c)?e.attempt(S1e,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||de(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function w1e(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):de(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Be(e,s,"linePrefix",5)(a)}function s(a){const o=r.events[r.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?t(a):de(a)?i(a):n(a)}}const _1e={name:"codeText",previous:E1e,resolve:k1e,tokenize:C1e};function k1e(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function E1e(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function C1e(e,t,n){let r=0,i,s;return a;function a(u){return e.enter("codeText"),e.enter("codeTextSequence"),o(u)}function o(u){return u===96?(e.consume(u),r++,o):(e.exit("codeTextSequence"),l(u))}function l(u){return u===null?n(u):u===32?(e.enter("space"),e.consume(u),e.exit("space"),l):u===96?(s=e.enter("codeTextSequence"),i=0,f(u)):de(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(u))}function c(u){return u===null||u===32||u===96||de(u)?(e.exit("codeTextData"),l(u)):(e.consume(u),c)}function f(u){return u===96?(e.consume(u),i++,f):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(u)):(s.type="codeTextData",c(u))}}class T1e{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&hd(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),hd(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),hd(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);hd(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);hd(this.left,n.reverse())}}}function hd(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 h9(e){const t={};let n=-1,r,i,s,a,o,l,c;const f=new T1e(e);for(;++n<f.length;){for(;n in t;)n=t[n];if(r=f.get(n),n&&r[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(l=r[1]._tokenizer.events,s=0,s<l.length&&l[s][1].type==="lineEndingBlank"&&(s+=2),s<l.length&&l[s][1].type==="content"))for(;++s<l.length&&l[s][1].type!=="content";)l[s][1].type==="chunkText"&&(l[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,A1e(f,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=f.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=s);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...f.get(i)[1].start},o=f.slice(i,n),o.unshift(r),f.splice(i,n-i+1,o))}}return Dr(e,0,Number.POSITIVE_INFINITY,f.slice(0)),!c}function A1e(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const o=a.events,l=[],c={};let f,u,d=-1,h=n,g=0,v=0;const x=[v];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(f=r.sliceStream(h),h.next||f.push(null),u&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),u=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&&(v=d+1,x.push(v),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):x.pop(),d=x.length;d--;){const m=o.slice(x[d],x[d+1]),b=s.pop();l.push([b,b+m.length-1]),e.splice(b,2,m)}for(l.reverse(),d=-1;++d<l.length;)c[g+l[d][0]]=g+l[d][1],g+=l[d][1]-l[d][0]-1;return c}const O1e={resolve:N1e,tokenize:M1e},R1e={partial:!0,tokenize:D1e};function N1e(e){return h9(e),e}function M1e(e,t){let n;return r;function r(o){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?s(o):de(o)?e.check(R1e,a,s)(o):(e.consume(o),i)}function s(o){return e.exit("chunkContent"),e.exit("content"),t(o)}function a(o){return e.consume(o),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function D1e(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Be(e,s,"linePrefix")}function s(a){if(a===null||de(a))return n(a);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(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function m9(e,t,n,r,i,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let f=0;return u;function u(m){return m===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(m),e.exit(s),d):m===null||m===32||m===41||Cb(m)?n(m):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),v(m))}function d(m){return m===62?(e.enter(s),e.consume(m),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(o),e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===62?(e.exit("chunkString"),e.exit(o),d(m)):m===null||m===60||de(m)?n(m):(e.consume(m),m===92?g:h)}function g(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function v(m){return!f&&(m===null||m===41||ft(m))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(m)):f<c&&m===40?(e.consume(m),f++,v):m===41?(e.consume(m),f--,v):m===null||m===32||m===40||Cb(m)?n(m):(e.consume(m),m===92?x:v)}function x(m){return m===40||m===41||m===92?(e.consume(m),v):v(m)}}function p9(e,t,n,r,i,s){const a=this;let o=0,l;return c;function c(h){return e.enter(r),e.enter(i),e.consume(h),e.exit(i),e.enter(s),f}function f(h){return o>999||h===null||h===91||h===93&&!l||h===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(h):h===93?(e.exit(s),e.enter(i),e.consume(h),e.exit(i),e.exit(r),t):de(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),f):(e.enter("chunkString",{contentType:"string"}),u(h))}function u(h){return h===null||h===91||h===93||de(h)||o++>999?(e.exit("chunkString"),f(h)):(e.consume(h),l||(l=!ze(h)),h===92?d:u)}function d(h){return h===91||h===92||h===93?(e.consume(h),o++,u):u(h)}}function g9(e,t,n,r,i,s){let a;return o;function o(d){return d===34||d===39||d===40?(e.enter(r),e.enter(i),e.consume(d),e.exit(i),a=d===40?41:d,l):n(d)}function l(d){return d===a?(e.enter(i),e.consume(d),e.exit(i),e.exit(r),t):(e.enter(s),c(d))}function c(d){return d===a?(e.exit(s),l(a)):d===null?n(d):de(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Be(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),f(d))}function f(d){return d===a||d===null||de(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?u:f)}function u(d){return d===a||d===92?(e.consume(d),f):f(d)}}function ch(e,t){let n;return r;function r(i){return de(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ze(i)?Be(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const z1e={name:"definition",tokenize:I1e},j1e={partial:!0,tokenize:$1e};function I1e(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),a(h)}function a(h){return p9.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=Ei(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),h===58?(e.enter("definitionMarker"),e.consume(h),e.exit("definitionMarker"),l):n(h)}function l(h){return ft(h)?ch(e,c)(h):c(h)}function c(h){return m9(e,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function f(h){return e.attempt(j1e,u,u)(h)}function u(h){return ze(h)?Be(e,d,"whitespace")(h):d(h)}function d(h){return h===null||de(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function $1e(e,t,n){return r;function r(o){return ft(o)?ch(e,i)(o):n(o)}function i(o){return g9(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return ze(o)?Be(e,a,"whitespace")(o):a(o)}function a(o){return o===null||de(o)?t(o):n(o)}}const L1e={name:"hardBreakEscape",tokenize:F1e};function F1e(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return de(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const P1e={name:"headingAtx",resolve:U1e,tokenize:B1e};function U1e(e,t){let n=e.length-2,r=3,i,s;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Dr(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function B1e(e,t,n){let r=0;return i;function i(f){return e.enter("atxHeading"),s(f)}function s(f){return e.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&r++<6?(e.consume(f),a):f===null||ft(f)?(e.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(e.enter("atxHeadingSequence"),l(f)):f===null||de(f)?(e.exit("atxHeading"),t(f)):ze(f)?Be(e,o,"whitespace")(f):(e.enter("atxHeadingText"),c(f))}function l(f){return f===35?(e.consume(f),l):(e.exit("atxHeadingSequence"),o(f))}function c(f){return f===null||f===35||ft(f)?(e.exit("atxHeadingText"),o(f)):(e.consume(f),c)}}const H1e=["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"],EM=["pre","script","style","textarea"],q1e={concrete:!0,name:"htmlFlow",resolveTo:G1e,tokenize:Y1e},V1e={partial:!0,tokenize:Q1e},K1e={partial:!0,tokenize:J1e};function G1e(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 Y1e(e,t,n){const r=this;let i,s,a,o,l;return c;function c(T){return f(T)}function f(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),u}function u(T){return T===33?(e.consume(T),d):T===47?(e.consume(T),s=!0,v):T===63?(e.consume(T),i=3,r.interrupt?t:R):Vn(T)?(e.consume(T),a=String.fromCharCode(T),x):n(T)}function d(T){return T===45?(e.consume(T),i=2,h):T===91?(e.consume(T),i=5,o=0,g):Vn(T)?(e.consume(T),i=4,r.interrupt?t:R):n(T)}function h(T){return T===45?(e.consume(T),r.interrupt?t:R):n(T)}function g(T){const Z="CDATA[";return T===Z.charCodeAt(o++)?(e.consume(T),o===Z.length?r.interrupt?t:$:g):n(T)}function v(T){return Vn(T)?(e.consume(T),a=String.fromCharCode(T),x):n(T)}function x(T){if(T===null||T===47||T===62||ft(T)){const Z=T===47,ee=a.toLowerCase();return!Z&&!s&&EM.includes(ee)?(i=1,r.interrupt?t(T):$(T)):H1e.includes(a.toLowerCase())?(i=6,Z?(e.consume(T),m):r.interrupt?t(T):$(T)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(T):s?b(T):S(T))}return T===45||jn(T)?(e.consume(T),a+=String.fromCharCode(T),x):n(T)}function m(T){return T===62?(e.consume(T),r.interrupt?t:$):n(T)}function b(T){return ze(T)?(e.consume(T),b):N(T)}function S(T){return T===47?(e.consume(T),N):T===58||T===95||Vn(T)?(e.consume(T),_):ze(T)?(e.consume(T),S):N(T)}function _(T){return T===45||T===46||T===58||T===95||jn(T)?(e.consume(T),_):C(T)}function C(T){return T===61?(e.consume(T),E):ze(T)?(e.consume(T),C):S(T)}function E(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),l=T,A):ze(T)?(e.consume(T),E):M(T)}function A(T){return T===l?(e.consume(T),l=null,D):T===null||de(T)?n(T):(e.consume(T),A)}function M(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||ft(T)?C(T):(e.consume(T),M)}function D(T){return T===47||T===62||ze(T)?S(T):n(T)}function N(T){return T===62?(e.consume(T),I):n(T)}function I(T){return T===null||de(T)?$(T):ze(T)?(e.consume(T),I):n(T)}function $(T){return T===45&&i===2?(e.consume(T),z):T===60&&i===1?(e.consume(T),L):T===62&&i===4?(e.consume(T),Re):T===63&&i===3?(e.consume(T),R):T===93&&i===5?(e.consume(T),ne):de(T)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(V1e,U,X)(T)):T===null||de(T)?(e.exit("htmlFlowData"),X(T)):(e.consume(T),$)}function X(T){return e.check(K1e,Q,U)(T)}function Q(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Y}function Y(T){return T===null||de(T)?X(T):(e.enter("htmlFlowData"),$(T))}function z(T){return T===45?(e.consume(T),R):$(T)}function L(T){return T===47?(e.consume(T),a="",j):$(T)}function j(T){if(T===62){const Z=a.toLowerCase();return EM.includes(Z)?(e.consume(T),Re):$(T)}return Vn(T)&&a.length<8?(e.consume(T),a+=String.fromCharCode(T),j):$(T)}function ne(T){return T===93?(e.consume(T),R):$(T)}function R(T){return T===62?(e.consume(T),Re):T===45&&i===2?(e.consume(T),R):$(T)}function Re(T){return T===null||de(T)?(e.exit("htmlFlowData"),U(T)):(e.consume(T),Re)}function U(T){return e.exit("htmlFlow"),t(T)}}function J1e(e,t,n){const r=this;return i;function i(a){return de(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):n(a)}function s(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Q1e(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(tp,t,n)}}const X1e={name:"htmlText",tokenize:W1e};function W1e(e,t,n){const r=this;let i,s,a;return o;function o(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),l}function l(R){return R===33?(e.consume(R),c):R===47?(e.consume(R),C):R===63?(e.consume(R),S):Vn(R)?(e.consume(R),M):n(R)}function c(R){return R===45?(e.consume(R),f):R===91?(e.consume(R),s=0,g):Vn(R)?(e.consume(R),b):n(R)}function f(R){return R===45?(e.consume(R),h):n(R)}function u(R){return R===null?n(R):R===45?(e.consume(R),d):de(R)?(a=u,L(R)):(e.consume(R),u)}function d(R){return R===45?(e.consume(R),h):u(R)}function h(R){return R===62?z(R):R===45?d(R):u(R)}function g(R){const Re="CDATA[";return R===Re.charCodeAt(s++)?(e.consume(R),s===Re.length?v:g):n(R)}function v(R){return R===null?n(R):R===93?(e.consume(R),x):de(R)?(a=v,L(R)):(e.consume(R),v)}function x(R){return R===93?(e.consume(R),m):v(R)}function m(R){return R===62?z(R):R===93?(e.consume(R),m):v(R)}function b(R){return R===null||R===62?z(R):de(R)?(a=b,L(R)):(e.consume(R),b)}function S(R){return R===null?n(R):R===63?(e.consume(R),_):de(R)?(a=S,L(R)):(e.consume(R),S)}function _(R){return R===62?z(R):S(R)}function C(R){return Vn(R)?(e.consume(R),E):n(R)}function E(R){return R===45||jn(R)?(e.consume(R),E):A(R)}function A(R){return de(R)?(a=A,L(R)):ze(R)?(e.consume(R),A):z(R)}function M(R){return R===45||jn(R)?(e.consume(R),M):R===47||R===62||ft(R)?D(R):n(R)}function D(R){return R===47?(e.consume(R),z):R===58||R===95||Vn(R)?(e.consume(R),N):de(R)?(a=D,L(R)):ze(R)?(e.consume(R),D):z(R)}function N(R){return R===45||R===46||R===58||R===95||jn(R)?(e.consume(R),N):I(R)}function I(R){return R===61?(e.consume(R),$):de(R)?(a=I,L(R)):ze(R)?(e.consume(R),I):D(R)}function $(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,X):de(R)?(a=$,L(R)):ze(R)?(e.consume(R),$):(e.consume(R),Q)}function X(R){return R===i?(e.consume(R),i=void 0,Y):R===null?n(R):de(R)?(a=X,L(R)):(e.consume(R),X)}function Q(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||ft(R)?D(R):(e.consume(R),Q)}function Y(R){return R===47||R===62||ft(R)?D(R):n(R)}function z(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function L(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),j}function j(R){return ze(R)?Be(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ne(R)}function ne(R){return e.enter("htmlTextData"),a(R)}}const YT={name:"labelEnd",resolveAll:nwe,resolveTo:rwe,tokenize:iwe},Z1e={tokenize:swe},ewe={tokenize:awe},twe={tokenize:owe};function nwe(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Dr(e,0,e.length,n),e}function rwe(e,t){let n=e.length,r=0,i,s,a,o;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const l={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},c={type:"label",start:{...e[s][1].start},end:{...e[a][1].end}},f={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Kr(o,e.slice(s+1,s+r+3)),o=Kr(o,[["enter",f,t]]),o=Kr(o,CS(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=Kr(o,[["exit",f,t],e[a-2],e[a-1],["exit",c,t]]),o=Kr(o,e.slice(a+1)),o=Kr(o,[["exit",l,t]]),Dr(e,s,e.length,o),e}function iwe(e,t,n){const r=this;let i=r.events.length,s,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return o;function o(d){return s?s._inactive?u(d):(a=r.parser.defined.includes(Ei(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),l):n(d)}function l(d){return d===40?e.attempt(Z1e,f,a?f:u)(d):d===91?e.attempt(ewe,f,a?c:u)(d):a?f(d):u(d)}function c(d){return e.attempt(twe,f,u)(d)}function f(d){return t(d)}function u(d){return s._balanced=!0,n(d)}}function swe(e,t,n){return r;function r(u){return e.enter("resource"),e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),i}function i(u){return ft(u)?ch(e,s)(u):s(u)}function s(u){return u===41?f(u):m9(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function a(u){return ft(u)?ch(e,l)(u):f(u)}function o(u){return n(u)}function l(u){return u===34||u===39||u===40?g9(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):f(u)}function c(u){return ft(u)?ch(e,f)(u):f(u)}function f(u){return u===41?(e.enter("resourceMarker"),e.consume(u),e.exit("resourceMarker"),e.exit("resource"),t):n(u)}}function awe(e,t,n){const r=this;return i;function i(o){return p9.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(Ei(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function owe(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const lwe={name:"labelStartImage",resolveAll:YT.resolveAll,tokenize:cwe};function cwe(e,t,n){const r=this;return i;function i(o){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(o),e.exit("labelImageMarker"),s}function s(o){return o===91?(e.enter("labelMarker"),e.consume(o),e.exit("labelMarker"),e.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(o):t(o)}}const uwe={name:"labelStartLink",resolveAll:YT.resolveAll,tokenize:fwe};function fwe(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),s}function s(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const xx={name:"lineEnding",tokenize:dwe};function dwe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Be(e,t,"linePrefix")}}const Mg={name:"thematicBreak",tokenize:hwe};function hwe(e,t,n){let r=0,i;return s;function s(c){return e.enter("thematicBreak"),a(c)}function a(c){return i=c,o(c)}function o(c){return c===i?(e.enter("thematicBreakSequence"),l(c)):r>=3&&(c===null||de(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ze(c)?Be(e,o,"whitespace")(c):o(c))}}const rr={continuation:{tokenize:ywe},exit:vwe,name:"list",tokenize:gwe},mwe={partial:!0,tokenize:Swe},pwe={partial:!0,tokenize:bwe};function gwe(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(h){const g=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:M_(h)){if(r.containerState.type||(r.containerState.type=g,e.enter(g,{_container:!0})),g==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(Mg,n,c)(h):c(h);if(!r.interrupt||h===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),l(h)}return n(h)}function l(h){return M_(h)&&++a<10?(e.consume(h),l):(!r.interrupt||a<2)&&(r.containerState.marker?h===r.containerState.marker:h===41||h===46)?(e.exit("listItemValue"),c(h)):n(h)}function c(h){return e.enter("listItemMarker"),e.consume(h),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||h,e.check(tp,r.interrupt?n:f,e.attempt(mwe,d,u))}function f(h){return r.containerState.initialBlankLine=!0,s++,d(h)}function u(h){return ze(h)?(e.enter("listItemPrefixWhitespace"),e.consume(h),e.exit("listItemPrefixWhitespace"),d):n(h)}function d(h){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(h)}}function ywe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(tp,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Be(e,t,"listItemIndent",r.containerState.size+1)(o)}function s(o){return r.containerState.furtherBlankLines||!ze(o)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(o)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(pwe,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Be(e,e.attempt(rr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function bwe(e,t,n){const r=this;return Be(e,i,"listItemIndent",r.containerState.size+1);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(s):n(s)}}function vwe(e){e.exit(this.containerState.type)}function Swe(e,t,n){const r=this;return Be(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const a=r.events[r.events.length-1];return!ze(s)&&a&&a[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const CM={name:"setextUnderline",resolveTo:xwe,tokenize:wwe};function xwe(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",a,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end={...e[s][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function wwe(e,t,n){const r=this;let i;return s;function s(c){let f=r.events.length,u;for(;f--;)if(r.events[f][1].type!=="lineEnding"&&r.events[f][1].type!=="linePrefix"&&r.events[f][1].type!=="content"){u=r.events[f][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||u)?(e.enter("setextHeadingLine"),i=c,a(c)):n(c)}function a(c){return e.enter("setextHeadingLineSequence"),o(c)}function o(c){return c===i?(e.consume(c),o):(e.exit("setextHeadingLineSequence"),ze(c)?Be(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||de(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const _we={tokenize:kwe};function kwe(e){const t=this,n=e.attempt(tp,r,e.attempt(this.parser.constructs.flowInitial,i,Be(e,e.attempt(this.parser.constructs.flow,i,e.attempt(O1e,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Ewe={resolveAll:b9()},Cwe=y9("string"),Twe=y9("text");function y9(e){return{resolveAll:b9(e==="text"?Awe:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,a,o);return a;function a(f){return c(f)?s(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),l}function l(f){return c(f)?(n.exit("data"),s(f)):(n.consume(f),l)}function c(f){if(f===null)return!0;const u=i[f];let d=-1;if(u)for(;++d<u.length;){const h=u[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function b9(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function Awe(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let s=i.length,a=-1,o=0,l;for(;s--;){const c=i[s];if(typeof c=="string"){for(a=c.length;c.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(c===-2)l=!0,o++;else if(c!==-1){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(o=0),o){const c={type:n===e.length||l||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?a:r.start._bufferIndex+a,_index:r.start._index+s,line:r.end.line,column:r.end.column-o,offset:r.end.offset-o},end:{...r.end}};r.end={...c.start},r.start.offset===r.end.offset?Object.assign(r,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}const Owe={42:rr,43:rr,45:rr,48:rr,49:rr,50:rr,51:rr,52:rr,53:rr,54:rr,55:rr,56:rr,57:rr,62:u9},Rwe={91:z1e},Nwe={[-2]:Sx,[-1]:Sx,32:Sx},Mwe={35:P1e,42:Mg,45:[CM,Mg],60:q1e,61:CM,95:Mg,96:kM,126:kM},Dwe={38:d9,92:f9},zwe={[-5]:xx,[-4]:xx,[-3]:xx,33:lwe,38:d9,42:D_,60:[u1e,X1e],91:uwe,92:[L1e,f9],93:YT,95:D_,96:_1e},jwe={null:[D_,Ewe]},Iwe={null:[42,95]},$we={null:[]},Lwe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Iwe,contentInitial:Rwe,disable:$we,document:Owe,flow:Mwe,flowInitial:Nwe,insideSpan:jwe,string:Dwe,text:zwe},Symbol.toStringTag,{value:"Module"}));function Fwe(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},s=[];let a=[],o=[];const l={attempt:A(C),check:A(E),consume:b,enter:S,exit:_,interrupt:A(E,{interrupt:!0})},c={code:null,containerState:{},defineSkip:v,events:[],now:g,parser:e,previous:null,sliceSerialize:d,sliceStream:h,write:u};let f=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function u(I){return a=Kr(a,I),x(),a[a.length-1]!==null?[]:(M(t,0),c.events=CS(s,c.events,c),c.events)}function d(I,$){return Uwe(h(I),$)}function h(I){return Pwe(a,I)}function g(){const{_bufferIndex:I,_index:$,line:X,column:Q,offset:Y}=r;return{_bufferIndex:I,_index:$,line:X,column:Q,offset:Y}}function v(I){i[I.line]=I.column,N()}function x(){let I;for(;r._index<a.length;){const $=a[r._index];if(typeof $=="string")for(I=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===I&&r._bufferIndex<$.length;)m($.charCodeAt(r._bufferIndex));else m($)}}function m(I){f=f(I)}function b(I){de(I)?(r.line++,r.column=1,r.offset+=I===-3?2:1,N()):I!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),c.previous=I}function S(I,$){const X=$||{};return X.type=I,X.start=g(),c.events.push(["enter",X,c]),o.push(X),X}function _(I){const $=o.pop();return $.end=g(),c.events.push(["exit",$,c]),$}function C(I,$){M(I,$.from)}function E(I,$){$.restore()}function A(I,$){return X;function X(Q,Y,z){let L,j,ne,R;return Array.isArray(Q)?U(Q):"tokenize"in Q?U([Q]):Re(Q);function Re(le){return H;function H(me){const xe=me!==null&&le[me],we=me!==null&&le.null,Ne=[...Array.isArray(xe)?xe:xe?[xe]:[],...Array.isArray(we)?we:we?[we]:[]];return U(Ne)(me)}}function U(le){return L=le,j=0,le.length===0?z:T(le[j])}function T(le){return H;function H(me){return R=D(),ne=le,le.partial||(c.currentConstruct=le),le.name&&c.parser.constructs.disable.null.includes(le.name)?ee():le.tokenize.call($?Object.assign(Object.create(c),$):c,l,Z,ee)(me)}}function Z(le){return I(ne,R),Y}function ee(le){return R.restore(),++j<L.length?T(L[j]):z}}}function M(I,$){I.resolveAll&&!s.includes(I)&&s.push(I),I.resolve&&Dr(c.events,$,c.events.length-$,I.resolve(c.events.slice($),c)),I.resolveTo&&(c.events=I.resolveTo(c.events,c))}function D(){const I=g(),$=c.previous,X=c.currentConstruct,Q=c.events.length,Y=Array.from(o);return{from:Q,restore:z};function z(){r=I,c.previous=$,c.currentConstruct=X,c.events.length=Q,o=Y,N()}}function N(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Pwe(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,s)];else{if(a=e.slice(n,i),r>-1){const o=a[0];typeof o=="string"?a[0]=o.slice(r):a.shift()}s>0&&a.push(e[i].slice(0,s))}return a}function Uwe(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let a;if(typeof s=="string")a=s;else switch(s){case-5:{a="\r";break}case-4:{a=`
|
|
321
|
+
`;break}case-3:{a=`\r
|
|
322
|
+
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(s)}i=s===-2,r.push(a)}return r.join("")}function Bwe(e){const r={constructs:l9([Lwe,...(e||{}).extensions||[]]),content:i(r1e),defined:[],document:i(s1e),flow:i(_we),lazy:{},string:i(Cwe),text:i(Twe)};return r;function i(s){return a;function a(o){return Fwe(r,s,o)}}}function Hwe(e){for(;!h9(e););return e}const TM=/[\0\t\n\r]/g;function qwe(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let c,f,u,d,h;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),u=0,t="",n&&(s.charCodeAt(0)===65279&&u++,n=void 0);u<s.length;){if(TM.lastIndex=u,c=TM.exec(s),d=c&&c.index!==void 0?c.index:s.length,h=s.charCodeAt(d),!c){t=s.slice(u);break}if(h===10&&u===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),u<d&&(l.push(s.slice(u,d)),e+=d-u),h){case 0:{l.push(65533),e++;break}case 9:{for(f=Math.ceil(e/4)*4,l.push(-2);e++<f;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}u=d+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const Vwe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kwe(e){return e.replace(Vwe,Gwe)}function Gwe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return c9(n.slice(s?2:1),s?16:10)}return GT(n)||e}const v9={}.hasOwnProperty;function Ywe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Jwe(n)(Hwe(Bwe(n).document().write(qwe()(e,t,!0))))}function Jwe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Io),autolinkProtocol:D,autolinkEmail:D,atxHeading:s(ha),blockQuote:s(we),characterEscape:D,characterReference:D,codeFenced:s(Ne),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Ne,a),codeText:s($e,a),codeTextData:D,data:D,codeFlowValue:D,definition:s(Fn),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Ir),hardBreakEscape:s(ma),hardBreakTrailing:s(ma),htmlFlow:s(pa,a),htmlFlowData:D,htmlText:s(pa,a),htmlTextData:D,image:s(RS),label:a,link:s(Io),listItem:s(iH),listItemValue:d,listOrdered:s(oA,u),listUnordered:s(oA),paragraph:s(sH),reference:T,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(ha),strong:s(aH),thematicBreak:s(lH)},exit:{atxHeading:l(),atxHeadingSequence:C,autolink:l(),autolinkEmail:xe,autolinkProtocol:me,blockQuote:l(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:ee,characterReferenceMarkerNumeric:ee,characterReferenceValue:le,characterReference:H,codeFenced:l(x),codeFencedFence:v,codeFencedFenceInfo:h,codeFencedFenceMeta:g,codeFlowValue:N,codeIndented:l(m),codeText:l(Y),codeTextData:N,data:N,definition:l(),definitionDestinationString:_,definitionLabelString:b,definitionTitleString:S,emphasis:l(),hardBreakEscape:l($),hardBreakTrailing:l($),htmlFlow:l(X),htmlFlowData:N,htmlText:l(Q),htmlTextData:N,image:l(L),label:ne,labelText:j,lineEnding:I,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:Z,resourceDestinationString:R,resourceTitleString:Re,resource:U,setextHeading:l(M),setextHeadingLineSequence:A,setextHeadingText:E,strong:l(),thematicBreak:l()}};S9(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(F){let W={type:"root",children:[]};const _e={stack:[W],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:f,data:n},Le=[];let ot=-1;for(;++ot<F.length;)if(F[ot][1].type==="listOrdered"||F[ot][1].type==="listUnordered")if(F[ot][0]==="enter")Le.push(ot);else{const li=Le.pop();ot=i(F,li,ot)}for(ot=-1;++ot<F.length;){const li=t[F[ot][0]];v9.call(li,F[ot][1].type)&&li[F[ot][1].type].call(Object.assign({sliceSerialize:F[ot][2].sliceSerialize},_e),F[ot][1])}if(_e.tokenStack.length>0){const li=_e.tokenStack[_e.tokenStack.length-1];(li[1]||AM).call(_e,void 0,li[0])}for(W.position={start:va(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:va(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},ot=-1;++ot<t.transforms.length;)W=t.transforms[ot](W)||W;return W}function i(F,W,_e){let Le=W-1,ot=-1,li=!1,$o,hs,Vf,Kf;for(;++Le<=_e;){const mr=F[Le];switch(mr[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{mr[0]==="enter"?ot++:ot--,Kf=void 0;break}case"lineEndingBlank":{mr[0]==="enter"&&($o&&!Kf&&!ot&&!Vf&&(Vf=Le),Kf=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Kf=void 0}if(!ot&&mr[0]==="enter"&&mr[1].type==="listItemPrefix"||ot===-1&&mr[0]==="exit"&&(mr[1].type==="listUnordered"||mr[1].type==="listOrdered")){if($o){let ic=Le;for(hs=void 0;ic--;){const ms=F[ic];if(ms[1].type==="lineEnding"||ms[1].type==="lineEndingBlank"){if(ms[0]==="exit")continue;hs&&(F[hs][1].type="lineEndingBlank",li=!0),ms[1].type="lineEnding",hs=ic}else if(!(ms[1].type==="linePrefix"||ms[1].type==="blockQuotePrefix"||ms[1].type==="blockQuotePrefixWhitespace"||ms[1].type==="blockQuoteMarker"||ms[1].type==="listItemIndent"))break}Vf&&(!hs||Vf<hs)&&($o._spread=!0),$o.end=Object.assign({},hs?F[hs][1].start:mr[1].end),F.splice(hs||Le,0,["exit",$o,mr[2]]),Le++,_e++}if(mr[1].type==="listItemPrefix"){const ic={type:"listItem",_spread:!1,start:Object.assign({},mr[1].start),end:void 0};$o=ic,F.splice(Le,0,["enter",ic,mr[2]]),Le++,_e++,Vf=void 0,Kf=!0}}}return F[W][1]._spread=li,_e}function s(F,W){return _e;function _e(Le){o.call(this,F(Le),Le),W&&W.call(this,Le)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(F,W,_e){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([W,_e||void 0]),F.position={start:va(W.start),end:void 0}}function l(F){return W;function W(_e){F&&F.call(this,_e),c.call(this,_e)}}function c(F,W){const _e=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==F.type&&(W?W.call(this,F,Le[0]):(Le[1]||AM).call(this,F,Le[0]));else throw new Error("Cannot close `"+F.type+"` ("+lh({start:F.start,end:F.end})+"): it’s not open");_e.position.end=va(F.end)}function f(){return KT(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function d(F){if(this.data.expectingFirstListItemValue){const W=this.stack[this.stack.length-2];W.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function h(){const F=this.resume(),W=this.stack[this.stack.length-1];W.lang=F}function g(){const F=this.resume(),W=this.stack[this.stack.length-1];W.meta=F}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function x(){const F=this.resume(),W=this.stack[this.stack.length-1];W.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const F=this.resume(),W=this.stack[this.stack.length-1];W.value=F.replace(/(\r?\n|\r)$/g,"")}function b(F){const W=this.resume(),_e=this.stack[this.stack.length-1];_e.label=W,_e.identifier=Ei(this.sliceSerialize(F)).toLowerCase()}function S(){const F=this.resume(),W=this.stack[this.stack.length-1];W.title=F}function _(){const F=this.resume(),W=this.stack[this.stack.length-1];W.url=F}function C(F){const W=this.stack[this.stack.length-1];if(!W.depth){const _e=this.sliceSerialize(F).length;W.depth=_e}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function A(F){const W=this.stack[this.stack.length-1];W.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function M(){this.data.setextHeadingSlurpLineEnding=void 0}function D(F){const _e=this.stack[this.stack.length-1].children;let Le=_e[_e.length-1];(!Le||Le.type!=="text")&&(Le=oH(),Le.position={start:va(F.start),end:void 0},_e.push(Le)),this.stack.push(Le)}function N(F){const W=this.stack.pop();W.value+=this.sliceSerialize(F),W.position.end=va(F.end)}function I(F){const W=this.stack[this.stack.length-1];if(this.data.atHardBreak){const _e=W.children[W.children.length-1];_e.position.end=va(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(W.type)&&(D.call(this,F),N.call(this,F))}function $(){this.data.atHardBreak=!0}function X(){const F=this.resume(),W=this.stack[this.stack.length-1];W.value=F}function Q(){const F=this.resume(),W=this.stack[this.stack.length-1];W.value=F}function Y(){const F=this.resume(),W=this.stack[this.stack.length-1];W.value=F}function z(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=W,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function L(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const W=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=W,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function j(F){const W=this.sliceSerialize(F),_e=this.stack[this.stack.length-2];_e.label=Kwe(W),_e.identifier=Ei(W).toLowerCase()}function ne(){const F=this.stack[this.stack.length-1],W=this.resume(),_e=this.stack[this.stack.length-1];if(this.data.inReference=!0,_e.type==="link"){const Le=F.children;_e.children=Le}else _e.alt=W}function R(){const F=this.resume(),W=this.stack[this.stack.length-1];W.url=F}function Re(){const F=this.resume(),W=this.stack[this.stack.length-1];W.title=F}function U(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function Z(F){const W=this.resume(),_e=this.stack[this.stack.length-1];_e.label=W,_e.identifier=Ei(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function ee(F){this.data.characterReferenceType=F.type}function le(F){const W=this.sliceSerialize(F),_e=this.data.characterReferenceType;let Le;_e?(Le=c9(W,_e==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=GT(W);const ot=this.stack[this.stack.length-1];ot.value+=Le}function H(F){const W=this.stack.pop();W.position.end=va(F.end)}function me(F){N.call(this,F);const W=this.stack[this.stack.length-1];W.url=this.sliceSerialize(F)}function xe(F){N.call(this,F);const W=this.stack[this.stack.length-1];W.url="mailto:"+this.sliceSerialize(F)}function we(){return{type:"blockquote",children:[]}}function Ne(){return{type:"code",lang:null,meta:null,value:""}}function $e(){return{type:"inlineCode",value:""}}function Fn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ir(){return{type:"emphasis",children:[]}}function ha(){return{type:"heading",depth:0,children:[]}}function ma(){return{type:"break"}}function pa(){return{type:"html",value:""}}function RS(){return{type:"image",title:null,url:"",alt:null}}function Io(){return{type:"link",title:null,url:"",children:[]}}function oA(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function iH(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function sH(){return{type:"paragraph",children:[]}}function aH(){return{type:"strong",children:[]}}function oH(){return{type:"text",value:""}}function lH(){return{type:"thematicBreak"}}}function va(e){return{line:e.line,column:e.column,offset:e.offset}}function S9(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?S9(e,r):Qwe(e,r)}}function Qwe(e,t){let n;for(n in t)if(v9.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 AM(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+lh({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+lh({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+lh({start:t.start,end:t.end})+") is still open")}function Xwe(e){const t=this;t.parser=n;function n(r){return Ywe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Wwe(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 Zwe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
323
|
+
`}]}function e_e(e,t){const n=t.value?t.value+`
|
|
324
|
+
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(s.data={meta:t.meta}),e.patch(t,s),s=e.applyData(t,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(t,s),s}function t_e(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function n_e(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function r_e(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=qf(r.toLowerCase()),s=e.footnoteOrder.indexOf(r);let a,o=e.footnoteCounts.get(r);o===void 0?(o=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=s+1,o+=1,e.footnoteCounts.set(r,o);const l={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,l);const c={type:"element",tagName:"sup",properties:{},children:[l]};return e.patch(t,c),e.applyData(t,c)}function i_e(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 s_e(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function x9(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 i=e.all(t),s=i[0];s&&s.type==="text"?s.value="["+s.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function a_e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return x9(e,t);const i={src:qf(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,s),e.applyData(t,s)}function o_e(e,t){const n={src:qf(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 l_e(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 c_e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return x9(e,t);const i={href:qf(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const s={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,s),e.applyData(t,s)}function u_e(e,t){const n={href:qf(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 f_e(e,t,n){const r=e.all(t),i=n?d_e(n):w9(t),s={},a=[];if(typeof t.checked=="boolean"){const f=r[0];let u;f&&f.type==="element"&&f.tagName==="p"?u=f:(u={type:"element",tagName:"p",properties:{},children:[]},r.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const f=r[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
|
|
325
|
+
`}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
326
|
+
`});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function d_e(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=w9(n[r])}return t}function w9(e){const t=e.spread;return t??e.children.length>1}function h_e(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function m_e(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function p_e(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function g_e(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function y_e(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},o=BT(t.children[1]),l=t9(t.children[t.children.length-1]);o&&l&&(a.position={start:o,end:l}),i.push(a)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function b_e(e,t,n){const r=n?n.children:void 0,s=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:t.children.length;let l=-1;const c=[];for(;++l<o;){const u=t.children[l],d={},h=a?a[l]:void 0;h&&(d.align=h);let g={type:"element",tagName:s,properties:d,children:[]};u&&(g.children=e.all(u),e.patch(u,g),g=e.applyData(u,g)),c.push(g)}const f={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,f),e.applyData(t,f)}function v_e(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const OM=9,RM=32;function S_e(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(NM(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(NM(t.slice(i),i>0,!1)),s.join("")}function NM(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===OM||s===RM;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===OM||s===RM;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function x_e(e,t){const n={type:"text",value:S_e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function w_e(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const __e={blockquote:Wwe,break:Zwe,code:e_e,delete:t_e,emphasis:n_e,footnoteReference:r_e,heading:i_e,html:s_e,imageReference:a_e,image:o_e,inlineCode:l_e,linkReference:c_e,link:u_e,listItem:f_e,list:h_e,paragraph:m_e,root:p_e,strong:g_e,table:y_e,tableCell:v_e,tableRow:b_e,text:x_e,thematicBreak:w_e,toml:Bp,yaml:Bp,definition:Bp,footnoteDefinition:Bp};function Bp(){}const _9=-1,TS=0,uh=1,Tb=2,JT=3,QT=4,XT=5,WT=6,k9=7,E9=8,MM=typeof self=="object"?self:globalThis,k_e=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,a]=t[i];switch(s){case TS:case _9:return n(a,i);case uh:{const o=n([],i);for(const l of a)o.push(r(l));return o}case Tb:{const o=n({},i);for(const[l,c]of a)o[r(l)]=r(c);return o}case JT:return n(new Date(a),i);case QT:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case XT:{const o=n(new Map,i);for(const[l,c]of a)o.set(r(l),r(c));return o}case WT:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case k9:{const{name:o,message:l}=a;return n(new MM[o](l),i)}case E9:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new MM[s](a),i)};return r},DM=e=>k_e(new Map,e)(0),yc="",{toString:E_e}={},{keys:C_e}=Object,md=e=>{const t=typeof e;if(t!=="object"||!e)return[TS,t];const n=E_e.call(e).slice(8,-1);switch(n){case"Array":return[uh,yc];case"Object":return[Tb,yc];case"Date":return[JT,yc];case"RegExp":return[QT,yc];case"Map":return[XT,yc];case"Set":return[WT,yc];case"DataView":return[uh,n]}return n.includes("Array")?[uh,n]:n.includes("Error")?[k9,n]:[Tb,n]},Hp=([e,t])=>e===TS&&(t==="function"||t==="symbol"),T_e=(e,t,n,r)=>{const i=(a,o)=>{const l=r.push(a)-1;return n.set(o,l),l},s=a=>{if(n.has(a))return n.get(a);let[o,l]=md(a);switch(o){case TS:{let f=a;switch(l){case"bigint":o=E9,f=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);f=null;break;case"undefined":return i([_9],a)}return i([o,f],a)}case uh:{if(l){let d=a;return l==="DataView"?d=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(d=new Uint8Array(a)),i([l,[...d]],a)}const f=[],u=i([o,f],a);for(const d of a)f.push(s(d));return u}case Tb:{if(l)switch(l){case"BigInt":return i([l,a.toString()],a);case"Boolean":case"Number":case"String":return i([l,a.valueOf()],a)}if(t&&"toJSON"in a)return s(a.toJSON());const f=[],u=i([o,f],a);for(const d of C_e(a))(e||!Hp(md(a[d])))&&f.push([s(d),s(a[d])]);return u}case JT:return i([o,a.toISOString()],a);case QT:{const{source:f,flags:u}=a;return i([o,{source:f,flags:u}],a)}case XT:{const f=[],u=i([o,f],a);for(const[d,h]of a)(e||!(Hp(md(d))||Hp(md(h))))&&f.push([s(d),s(h)]);return u}case WT:{const f=[],u=i([o,f],a);for(const d of a)(e||!Hp(md(d)))&&f.push(s(d));return u}}const{message:c}=a;return i([o,{name:l,message:c}],a)};return s},zM=(e,{json:t,lossy:n}={})=>{const r=[];return T_e(!(t||n),!!t,new Map,r)(e),r},Ab=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?DM(zM(e,t)):structuredClone(e):(e,t)=>DM(zM(e,t));function A_e(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 O_e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function R_e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||A_e,r=e.options.footnoteBackLabel||O_e,i=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let l=-1;for(;++l<e.footnoteOrder.length;){const c=e.footnoteById.get(e.footnoteOrder[l]);if(!c)continue;const f=e.all(c),u=String(c.identifier).toUpperCase(),d=qf(u.toLowerCase());let h=0;const g=[],v=e.footnoteCounts.get(u);for(;v!==void 0&&++h<=v;){g.length>0&&g.push({type:"text",value:" "});let b=typeof n=="string"?n:n(l,h);typeof b=="string"&&(b={type:"text",value:b}),g.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(h>1?"-"+h:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(l,h),className:["data-footnote-backref"]},children:Array.isArray(b)?b:[b]})}const x=f[f.length-1];if(x&&x.type==="element"&&x.tagName==="p"){const b=x.children[x.children.length-1];b&&b.type==="text"?b.value+=" ":x.children.push({type:"text",value:" "}),x.children.push(...g)}else f.push(...g);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(f,!0)};e.patch(c,m),o.push(m)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...Ab(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
327
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
328
|
+
`}]}}const AS=function(e){if(e==null)return z_e;if(typeof e=="function")return OS(e);if(typeof e=="object")return Array.isArray(e)?N_e(e):M_e(e);if(typeof e=="string")return D_e(e);throw new Error("Expected function, string, or object as test")};function N_e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=AS(e[n]);return OS(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function M_e(e){const t=e;return OS(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function D_e(e){return OS(t);function t(n){return n&&n.type===e}}function OS(e){return t;function t(n,r,i){return!!(j_e(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function z_e(){return!0}function j_e(e){return e!==null&&typeof e=="object"&&"type"in e}const C9=[],I_e=!0,z_=!1,$_e="skip";function T9(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=AS(i),a=r?-1:1;o(e,void 0,[])();function o(l,c,f){const u=l&&typeof l=="object"?l:{};if(typeof u.type=="string"){const h=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=C9,g,v,x;if((!t||s(l,c,f[f.length-1]||void 0))&&(h=L_e(n(l,f)),h[0]===z_))return h;if("children"in l&&l.children){const m=l;if(m.children&&h[0]!==$_e)for(v=(r?m.children.length:-1)+a,x=f.concat(m);v>-1&&v<m.children.length;){const b=m.children[v];if(g=o(b,v,x)(),g[0]===z_)return g;v=typeof g[1]=="number"?g[1]:v+a}}return h}}}function L_e(e){return Array.isArray(e)?e:typeof e=="number"?[I_e,e]:e==null?C9:[e]}function ZT(e,t,n,r){let i,s,a;typeof t=="function"&&typeof n!="function"?(s=void 0,a=t,i=n):(s=t,a=n,i=r),T9(e,s,o,i);function o(l,c){const f=c[c.length-1],u=f?f.children.indexOf(l):void 0;return a(l,u,f)}}const j_={}.hasOwnProperty,F_e={};function P_e(e,t){const n=t||F_e,r=new Map,i=new Map,s=new Map,a={...__e,...n.handlers},o={all:c,applyData:B_e,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:U_e,wrap:q_e};return ZT(e,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){const u=f.type==="definition"?r:i,d=String(f.identifier).toUpperCase();u.has(d)||u.set(d,f)}}),o;function l(f,u){const d=f.type,h=o.handlers[d];if(j_.call(o.handlers,d)&&h)return h(o,f,u);if(o.options.passThrough&&o.options.passThrough.includes(d)){if("children"in f){const{children:v,...x}=f,m=Ab(x);return m.children=o.all(f),m}return Ab(f)}return(o.options.unknownHandler||H_e)(o,f,u)}function c(f){const u=[];if("children"in f){const d=f.children;let h=-1;for(;++h<d.length;){const g=o.one(d[h],f);if(g){if(h&&d[h-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=jM(g.value)),!Array.isArray(g)&&g.type==="element")){const v=g.children[0];v&&v.type==="text"&&(v.value=jM(v.value))}Array.isArray(g)?u.push(...g):u.push(g)}}}return u}}function U_e(e,t){e.position&&(t.position=Oxe(e))}function B_e(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&s&&Object.assign(n.properties,Ab(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function H_e(e,t){const n=t.data||{},r="value"in t&&!(j_.call(n,"hProperties")||j_.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 q_e(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
329
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
330
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
331
|
+
`}),n}function jM(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function IM(e,t){const n=P_e(e,t),r=n.one(e,void 0),i=R_e(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
332
|
+
`},i),s}function V_e(e,t){return e&&"run"in e?async function(n,r){const i=IM(n,{file:r,...t});await e.run(i,r)}:function(n,r){return IM(n,{file:r,...e||t})}}function $M(e){if(e)throw e}var Dg=Object.prototype.hasOwnProperty,A9=Object.prototype.toString,LM=Object.defineProperty,FM=Object.getOwnPropertyDescriptor,PM=function(t){return typeof Array.isArray=="function"?Array.isArray(t):A9.call(t)==="[object Array]"},UM=function(t){if(!t||A9.call(t)!=="[object Object]")return!1;var n=Dg.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&Dg.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||Dg.call(t,i)},BM=function(t,n){LM&&n.name==="__proto__"?LM(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},HM=function(t,n){if(n==="__proto__")if(Dg.call(t,n)){if(FM)return FM(t,n).value}else return;return t[n]},K_e=function e(){var t,n,r,i,s,a,o=arguments[0],l=1,c=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},l=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});l<c;++l)if(t=arguments[l],t!=null)for(n in t)r=HM(o,n),i=HM(t,n),o!==i&&(f&&i&&(UM(i)||(s=PM(i)))?(s?(s=!1,a=r&&PM(r)?r:[]):a=r&&UM(r)?r:{},BM(o,{name:n,newValue:e(f,a,i)})):typeof i<"u"&&BM(o,{name:n,newValue:i}));return o};const wx=rm(K_e);function I_(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 G_e(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(l,...c){const f=e[++s];let u=-1;if(l){a(l);return}for(;++u<i.length;)(c[u]===null||c[u]===void 0)&&(c[u]=i[u]);i=c,f?Y_e(f,o)(...c):a(null,...c)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Y_e(e,t){let n;return r;function r(...a){const o=e.length>a.length;let l;o&&a.push(i);try{l=e.apply(this,a)}catch(c){const f=c;if(o&&n)throw f;return i(f)}o||(l&&l.then&&typeof l.then=="function"?l.then(s,i):l instanceof Error?i(l):s(l))}function i(a,...o){n||(n=!0,t(a,...o))}function s(a){i(null,a)}}const Pi={basename:J_e,dirname:Q_e,extname:X_e,join:W_e,sep:"/"};function J_e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');np(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,o=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else a<0&&(s=!0,a=i+1),o>-1&&(e.codePointAt(i)===t.codePointAt(o--)?o<0&&(r=i):(o=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function Q_e(e){if(np(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 X_e(e){np(e);let t=e.length,n=-1,r=0,i=-1,s=0,a;for(;t--;){const o=e.codePointAt(t);if(o===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),o===46?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function W_e(...e){let t=-1,n;for(;++t<e.length;)np(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Z_e(n)}function Z_e(e){np(e);const t=e.codePointAt(0)===47;let n=eke(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function eke(e,t){let n="",r=0,i=-1,s=0,a=-1,o,l;for(;++a<=e.length;){if(a<e.length)o=e.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||s===1))if(i!==a-1&&s===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(l=n.lastIndexOf("/"),l!==n.length-1){l<0?(n="",r=0):(n=n.slice(0,l),r=n.length-1-n.lastIndexOf("/")),i=a,s=0;continue}}else if(n.length>0){n="",r=0,i=a,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,s=0}else o===46&&s>-1?s++:s=-1}return n}function np(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const tke={cwd:nke};function nke(){return"/"}function $_(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function rke(e){if(typeof e=="string")e=new URL(e);else if(!$_(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 ike(e)}function ike(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const _x=["history","path","basename","stem","extname","dirname"];class O9{constructor(t){let n;t?$_(t)?n={path:t}:typeof t=="string"||ske(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":tke.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<_x.length;){const s=_x[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)_x.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Pi.basename(this.path):void 0}set basename(t){Ex(t,"basename"),kx(t,"basename"),this.path=Pi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Pi.dirname(this.path):void 0}set dirname(t){qM(this.basename,"dirname"),this.path=Pi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Pi.extname(this.path):void 0}set extname(t){if(kx(t,"extname"),qM(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=Pi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){$_(t)&&(t=rke(t)),Ex(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Pi.basename(this.path,this.extname):void 0}set stem(t){Ex(t,"stem"),kx(t,"stem"),this.path=Pi.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new Ln(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function kx(e,t){if(e&&e.includes(Pi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Pi.sep+"`")}function Ex(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function qM(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function ske(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ake=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},oke={}.hasOwnProperty;class eA extends ake{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=G_e()}copy(){const t=new eA;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(wx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ax("data",this.frozen),this.namespace[t]=n,this):oke.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ax("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 i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=qp(t),r=this.parser||this.Parser;return Cx("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Cx("process",this.parser||this.Parser),Tx("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=qp(t),l=r.parse(o);r.run(l,o,function(f,u,d){if(f||!u||!d)return c(f);const h=u,g=r.stringify(h,d);uke(g)?d.value=g:d.result=g,c(f,d)});function c(f,u){f||!u?a(f):s?s(u):n(void 0,u)}}}processSync(t){let n=!1,r;return this.freeze(),Cx("processSync",this.parser||this.Parser),Tx("processSync",this.compiler||this.Compiler),this.process(t,i),KM("processSync","process",n),r;function i(s,a){n=!0,$M(s),r=a}}run(t,n,r){VM(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(a,o){const l=qp(n);i.run(t,l,c);function c(f,u,d){const h=u||t;f?o(f):a?a(h):r(void 0,h,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),KM("runSync","run",r),i;function s(a,o){$M(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=qp(n),i=this.compiler||this.Compiler;return Tx("stringify",i),VM(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Ax("use",this.frozen),t!=null)if(typeof t=="function")l(t,n);else if(typeof t=="object")Array.isArray(t)?o(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function s(c){if(typeof c=="function")l(c,[]);else if(typeof c=="object")if(Array.isArray(c)){const[f,...u]=c;l(f,u)}else a(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function a(c){if(!("plugins"in c)&&!("settings"in c))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(c.plugins),c.settings&&(i.settings=wx(!0,i.settings,c.settings))}function o(c){let f=-1;if(c!=null)if(Array.isArray(c))for(;++f<c.length;){const u=c[f];s(u)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,f){let u=-1,d=-1;for(;++u<r.length;)if(r[u][0]===c){d=u;break}if(d===-1)r.push([c,...f]);else if(f.length>0){let[h,...g]=f;const v=r[d][1];I_(v)&&I_(h)&&(h=wx(!0,v,h)),r[d]=[c,h,...g]}}}}const lke=new eA().freeze();function Cx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Tx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ax(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 VM(e){if(!I_(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function KM(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function qp(e){return cke(e)?e:new O9(e)}function cke(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function uke(e){return typeof e=="string"||fke(e)}function fke(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const dke="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",GM=[],YM={allowDangerousHtml:!0},hke=/^(https?|ircs?|mailto|xmpp)$/i,mke=[{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 R9(e){const t=pke(e),n=gke(e);return yke(t.runSync(t.parse(n),n),e)}function pke(e){const t=e.rehypePlugins||GM,n=e.remarkPlugins||GM,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...YM}:YM;return lke().use(Xwe).use(n).use(V_e,r).use(t)}function gke(e){const t=e.children||"",n=new O9;return typeof t=="string"&&(n.value=t),n}function yke(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||bke;for(const f of mke)Object.hasOwn(t,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+dke+f.id,void 0);return ZT(e,c),zxe(e,{Fragment:p.Fragment,components:i,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function c(f,u,d){if(f.type==="raw"&&d&&typeof u=="number")return a?d.children.splice(u,1):d.children[u]={type:"text",value:f.value},u;if(f.type==="element"){let h;for(h in vx)if(Object.hasOwn(vx,h)&&Object.hasOwn(f.properties,h)){const g=f.properties[h],v=vx[h];(v===null||v.includes(f.tagName))&&(f.properties[h]=l(String(g||""),h,f))}}if(f.type==="element"){let h=n?!n.includes(f.tagName):s?s.includes(f.tagName):!1;if(!h&&r&&typeof u=="number"&&(h=!r(f,u,d)),h&&d&&typeof u=="number")return o&&f.children?d.children.splice(u,1,...f.children):d.children.splice(u,1),u}}}function bke(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||hke.test(e.slice(0,t))?e:""}function JM(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function vke(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ske(e,t,n){const i=AS((n||{}).ignore||[]),s=xke(t);let a=-1;for(;++a<s.length;)T9(e,"text",o);function o(c,f){let u=-1,d;for(;++u<f.length;){const h=f[u],g=d?d.children:void 0;if(i(h,g?g.indexOf(h):void 0,d))return;d=h}if(d)return l(c,f)}function l(c,f){const u=f[f.length-1],d=s[a][0],h=s[a][1];let g=0;const x=u.children.indexOf(c);let m=!1,b=[];d.lastIndex=0;let S=d.exec(c.value);for(;S;){const _=S.index,C={index:S.index,input:S.input,stack:[...f,c]};let E=h(...S,C);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?d.lastIndex=_+1:(g!==_&&b.push({type:"text",value:c.value.slice(g,_)}),Array.isArray(E)?b.push(...E):E&&b.push(E),g=_+S[0].length,m=!0),!d.global)break;S=d.exec(c.value)}return m?(g<c.value.length&&b.push({type:"text",value:c.value.slice(g)}),u.children.splice(x,1,...b)):b=[c],x+b.length}}function xke(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([wke(i[0]),_ke(i[1])])}return t}function wke(e){return typeof e=="string"?new RegExp(vke(e),"g"):e}function _ke(e){return typeof e=="function"?e:function(){return e}}const Ox="phrasing",Rx=["autolink","link","image","label"];function kke(){return{transforms:[Nke],enter:{literalAutolink:Cke,literalAutolinkEmail:Nx,literalAutolinkHttp:Nx,literalAutolinkWww:Nx},exit:{literalAutolink:Rke,literalAutolinkEmail:Oke,literalAutolinkHttp:Tke,literalAutolinkWww:Ake}}}function Eke(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ox,notInConstruct:Rx},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ox,notInConstruct:Rx},{character:":",before:"[ps]",after:"\\/",inConstruct:Ox,notInConstruct:Rx}]}}function Cke(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Nx(e){this.config.enter.autolinkProtocol.call(this,e)}function Tke(e){this.config.exit.autolinkProtocol.call(this,e)}function Ake(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Oke(e){this.config.exit.autolinkEmail.call(this,e)}function Rke(e){this.exit(e)}function Nke(e){Ske(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Mke],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Dke]],{ignore:["link","linkReference"]})}function Mke(e,t,n,r,i){let s="";if(!N9(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!zke(n)))return!1;const a=jke(n+r);if(!a[0])return!1;const o={type:"link",title:null,url:s+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function Dke(e,t,n,r){return!N9(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function zke(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function jke(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=JM(e,"(");let s=JM(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function N9(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ul(n)||ES(n))&&(!t||n!==47)}M9.peek=qke;function Ike(){this.buffer()}function $ke(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Lke(){this.buffer()}function Fke(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function Pke(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ei(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Uke(e){this.exit(e)}function Bke(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ei(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Hke(e){this.exit(e)}function qke(){return"["}function M9(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const a=n.enter("footnoteReference"),o=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),o(),a(),s+=i.move("]"),s}function Vke(){return{enter:{gfmFootnoteCallString:Ike,gfmFootnoteCall:$ke,gfmFootnoteDefinitionLabelString:Lke,gfmFootnoteDefinition:Fke},exit:{gfmFootnoteCallString:Pke,gfmFootnoteCall:Uke,gfmFootnoteDefinitionLabelString:Bke,gfmFootnoteDefinition:Hke}}}function Kke(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:M9},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,a){const o=s.createTracker(a);let l=o.move("[^");const c=s.enter("footnoteDefinition"),f=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),f(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
|
|
333
|
+
`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?D9:Gke))),c(),l}}function Gke(e,t,n){return t===0?e:D9(e,t,n)}function D9(e,t,n){return(n?"":" ")+e}const Yke=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];z9.peek=Zke;function Jke(){return{canContainEols:["delete"],enter:{strikethrough:Xke},exit:{strikethrough:Wke}}}function Qke(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Yke}],handlers:{delete:z9}}}function Xke(e){this.enter({type:"delete",children:[]},e)}function Wke(e){this.exit(e)}function z9(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),s(),a}function Zke(){return"~"}function eEe(e){return e.length}function tEe(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||eEe,s=[],a=[],o=[],l=[];let c=0,f=-1;for(;++f<e.length;){const v=[],x=[];let m=-1;for(e[f].length>c&&(c=e[f].length);++m<e[f].length;){const b=nEe(e[f][m]);if(n.alignDelimiters!==!1){const S=i(b);x[m]=S,(l[m]===void 0||S>l[m])&&(l[m]=S)}v.push(b)}a[f]=v,o[f]=x}let u=-1;if(typeof r=="object"&&"length"in r)for(;++u<c;)s[u]=QM(r[u]);else{const v=QM(r);for(;++u<c;)s[u]=v}u=-1;const d=[],h=[];for(;++u<c;){const v=s[u];let x="",m="";v===99?(x=":",m=":"):v===108?x=":":v===114&&(m=":");let b=n.alignDelimiters===!1?1:Math.max(1,l[u]-x.length-m.length);const S=x+"-".repeat(b)+m;n.alignDelimiters!==!1&&(b=x.length+b+m.length,b>l[u]&&(l[u]=b),h[u]=b),d[u]=S}a.splice(1,0,d),o.splice(1,0,h),f=-1;const g=[];for(;++f<a.length;){const v=a[f],x=o[f];u=-1;const m=[];for(;++u<c;){const b=v[u]||"";let S="",_="";if(n.alignDelimiters!==!1){const C=l[u]-(x[u]||0),E=s[u];E===114?S=" ".repeat(C):E===99?C%2?(S=" ".repeat(C/2+.5),_=" ".repeat(C/2-.5)):(S=" ".repeat(C/2),_=S):_=" ".repeat(C)}n.delimiterStart!==!1&&!u&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&b==="")&&(n.delimiterStart!==!1||u)&&m.push(" "),n.alignDelimiters!==!1&&m.push(S),m.push(b),n.alignDelimiters!==!1&&m.push(_),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||u!==c-1)&&m.push("|")}g.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return g.join(`
|
|
334
|
+
`)}function nEe(e){return e==null?"":String(e)}function QM(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function rEe(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const a=n.indentLines(n.containerFlow(e,s.current()),iEe);return i(),a}function iEe(e,t,n){return">"+(n?"":" ")+e}function sEe(e,t){return XM(e,t.inConstruct,!0)&&!XM(e,t.notInConstruct,!1)}function XM(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function WM(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
335
|
+
`&&sEe(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
336
|
+
`}function aEe(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>a&&(a=s):s=1,i=r+t.length,r=n.indexOf(t,i);return a}function oEe(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function lEe(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function cEe(e,t,n,r){const i=lEe(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(oEe(e,n)){const u=n.enter("codeIndented"),d=n.indentLines(s,uEe);return u(),d}const o=n.createTracker(r),l=i.repeat(Math.max(aEe(s,i)+1,3)),c=n.enter("codeFenced");let f=o.move(l);if(e.lang){const u=n.enter(`codeFencedLang${a}`);f+=o.move(n.safe(e.lang,{before:f,after:" ",encode:["`"],...o.current()})),u()}if(e.lang&&e.meta){const u=n.enter(`codeFencedMeta${a}`);f+=o.move(" "),f+=o.move(n.safe(e.meta,{before:f,after:`
|
|
337
|
+
`,encode:["`"],...o.current()})),u()}return f+=o.move(`
|
|
338
|
+
`),s&&(f+=o.move(s+`
|
|
339
|
+
`)),f+=o.move(l),c(),f}function uEe(e,t,n){return(n?"":" ")+e}function tA(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function fEe(e,t,n,r){const i=tA(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("[");return c+=l.move(n.safe(n.associationId(e),{before:c,after:"]",...l.current()})),c+=l.move("]: "),o(),!e.url||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":`
|
|
340
|
+
`,...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),a(),c}function dEe(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function tm(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Ob(e,t,n){const r=ef(e),i=ef(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}j9.peek=hEe;function j9(e,t,n,r){const i=dEe(n),s=n.enter("emphasis"),a=n.createTracker(r),o=a.move(i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),f=Ob(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(l=tm(c)+l.slice(1));const u=l.charCodeAt(l.length-1),d=Ob(r.after.charCodeAt(0),u,i);d.inside&&(l=l.slice(0,-1)+tm(u));const h=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},o+l+h}function hEe(e,t,n){return n.options.emphasis||"*"}function mEe(e,t){let n=!1;return ZT(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,z_}),!!((!e.depth||e.depth<3)&&KT(e)&&(t.options.setext||n))}function pEe(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(mEe(e,n)){const f=n.enter("headingSetext"),u=n.enter("phrasing"),d=n.containerPhrasing(e,{...s.current(),before:`
|
|
341
|
+
`,after:`
|
|
342
|
+
`});return u(),f(),d+`
|
|
343
|
+
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
344
|
+
`))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
345
|
+
`,...s.current()});return/^[\t ]/.test(c)&&(c=tm(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),o(),c}I9.peek=gEe;function I9(e){return e.value||""}function gEe(){return"<"}$9.peek=yEe;function $9(e,t,n,r){const i=tA(n),s=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let o=n.enter("label");const l=n.createTracker(r);let c=l.move("![");return c+=l.move(n.safe(e.alt,{before:c,after:"]",...l.current()})),c+=l.move("]("),o(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(o=n.enter("destinationLiteral"),c+=l.move("<"),c+=l.move(n.safe(e.url,{before:c,after:">",...l.current()})),c+=l.move(">")):(o=n.enter("destinationRaw"),c+=l.move(n.safe(e.url,{before:c,after:e.title?" ":")",...l.current()}))),o(),e.title&&(o=n.enter(`title${s}`),c+=l.move(" "+i),c+=l.move(n.safe(e.title,{before:c,after:i,...l.current()})),c+=l.move(i),o()),c+=l.move(")"),a(),c}function yEe(){return"!"}L9.peek=bEe;function L9(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("![");const c=n.safe(e.alt,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,s(),i==="full"||!c||c!==u?l+=o.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function bEe(){return"!"}F9.peek=vEe;function F9(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const a=n.unsafe[s],o=n.compilePattern(a);let l;if(a.atBreak)for(;l=o.exec(r);){let c=l.index;r.charCodeAt(c)===10&&r.charCodeAt(c-1)===13&&c--,r=r.slice(0,c)+" "+r.slice(l.index+1)}}return i+r+i}function vEe(){return"`"}function P9(e,t){const n=KT(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}U9.peek=SEe;function U9(e,t,n,r){const i=tA(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(P9(e,n)){const f=n.stack;n.stack=[],o=n.enter("autolink");let u=a.move("<");return u+=a.move(n.containerPhrasing(e,{before:u,after:">",...a.current()})),u+=a.move(">"),o(),n.stack=f,u}o=n.enter("link"),l=n.enter("label");let c=a.move("[");return c+=a.move(n.containerPhrasing(e,{before:c,after:"](",...a.current()})),c+=a.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),c+=a.move("<"),c+=a.move(n.safe(e.url,{before:c,after:">",...a.current()})),c+=a.move(">")):(l=n.enter("destinationRaw"),c+=a.move(n.safe(e.url,{before:c,after:e.title?" ":")",...a.current()}))),l(),e.title&&(l=n.enter(`title${s}`),c+=a.move(" "+i),c+=a.move(n.safe(e.title,{before:c,after:i,...a.current()})),c+=a.move(i),l()),c+=a.move(")"),o(),c}function SEe(e,t,n){return P9(e,n)?"<":"["}B9.peek=xEe;function B9(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let a=n.enter("label");const o=n.createTracker(r);let l=o.move("[");const c=n.containerPhrasing(e,{before:l,after:"]",...o.current()});l+=o.move(c+"]["),a();const f=n.stack;n.stack=[],a=n.enter("reference");const u=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=f,s(),i==="full"||!c||c!==u?l+=o.move(u+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function xEe(){return"["}function nA(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function wEe(e){const t=nA(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function _Ee(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function H9(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function kEe(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?_Ee(n):nA(n);const o=e.ordered?a==="."?")":".":wEe(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const f=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(l=!0),H9(n)===a&&f){let u=-1;for(;++u<e.children.length;){const d=e.children[u];if(d&&d.type==="listItem"&&d.children&&d.children[0]&&d.children[0].type==="thematicBreak"){l=!0;break}}}}l&&(a=o),n.bulletCurrent=a;const c=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=s,i(),c}function EEe(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function CEe(e,t,n,r){const i=EEe(n);let s=n.bulletCurrent||nA(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let a=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const o=n.createTracker(r);o.move(s+" ".repeat(a-s.length)),o.shift(a);const l=n.enter("listItem"),c=n.indentLines(n.containerFlow(e,o.current()),f);return l(),c;function f(u,d,h){return d?(h?"":" ".repeat(a))+u:(h?s:s+" ".repeat(a-s.length))+u}}function TEe(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const AEe=AS(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function OEe(e,t,n,r){return(e.children.some(function(a){return AEe(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function REe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}q9.peek=NEe;function q9(e,t,n,r){const i=REe(n),s=n.enter("strong"),a=n.createTracker(r),o=a.move(i+i);let l=a.move(n.containerPhrasing(e,{after:i,before:o,...a.current()}));const c=l.charCodeAt(0),f=Ob(r.before.charCodeAt(r.before.length-1),c,i);f.inside&&(l=tm(c)+l.slice(1));const u=l.charCodeAt(l.length-1),d=Ob(r.after.charCodeAt(0),u,i);d.inside&&(l=l.slice(0,-1)+tm(u));const h=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:f.outside},o+l+h}function NEe(e,t,n){return n.options.strong||"*"}function MEe(e,t,n,r){return n.safe(e.value,r)}function DEe(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function zEe(e,t,n){const r=(H9(n)+(n.options.ruleSpaces?" ":"")).repeat(DEe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const V9={blockquote:rEe,break:WM,code:cEe,definition:fEe,emphasis:j9,hardBreak:WM,heading:pEe,html:I9,image:$9,imageReference:L9,inlineCode:F9,link:U9,linkReference:B9,list:kEe,listItem:CEe,paragraph:TEe,root:OEe,strong:q9,text:MEe,thematicBreak:zEe};function jEe(){return{enter:{table:IEe,tableData:ZM,tableHeader:ZM,tableRow:LEe},exit:{codeText:FEe,table:$Ee,tableData:Mx,tableHeader:Mx,tableRow:Mx}}}function IEe(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function $Ee(e){this.exit(e),this.data.inTable=void 0}function LEe(e){this.enter({type:"tableRow",children:[]},e)}function Mx(e){this.exit(e)}function ZM(e){this.enter({type:"tableCell",children:[]},e)}function FEe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,PEe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function PEe(e,t){return t==="|"?t:e}function UEe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
346
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:d,table:a,tableCell:l,tableRow:o}};function a(h,g,v,x){return c(f(h,v,x),h.align)}function o(h,g,v,x){const m=u(h,v,x),b=c([m]);return b.slice(0,b.indexOf(`
|
|
347
|
+
`))}function l(h,g,v,x){const m=v.enter("tableCell"),b=v.enter("phrasing"),S=v.containerPhrasing(h,{...x,before:s,after:s});return b(),m(),S}function c(h,g){return tEe(h,{align:g,alignDelimiters:r,padding:n,stringLength:i})}function f(h,g,v){const x=h.children;let m=-1;const b=[],S=g.enter("table");for(;++m<x.length;)b[m]=u(x[m],g,v);return S(),b}function u(h,g,v){const x=h.children;let m=-1;const b=[],S=g.enter("tableRow");for(;++m<x.length;)b[m]=l(x[m],h,g,v);return S(),b}function d(h,g,v){let x=V9.inlineCode(h,g,v);return v.stack.includes("tableCell")&&(x=x.replace(/\|/g,"\\$&")),x}}function BEe(){return{exit:{taskListCheckValueChecked:eD,taskListCheckValueUnchecked:eD,paragraph:qEe}}}function HEe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:VEe}}}function eD(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function qEe(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let s=-1,a;for(;++s<i.length;){const o=i[s];if(o.type==="paragraph"){a=o;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function VEe(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",o=n.createTracker(r);s&&o.move(a);let l=V9.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(f){return f+a}}function KEe(){return[kke(),Vke(),Jke(),jEe(),BEe()]}function GEe(e){return{extensions:[Eke(),Kke(e),Qke(),UEe(e),HEe()]}}const YEe={tokenize:eCe,partial:!0},K9={tokenize:tCe,partial:!0},G9={tokenize:nCe,partial:!0},Y9={tokenize:rCe,partial:!0},JEe={tokenize:iCe,partial:!0},J9={name:"wwwAutolink",tokenize:WEe,previous:X9},Q9={name:"protocolAutolink",tokenize:ZEe,previous:W9},da={name:"emailAutolink",tokenize:XEe,previous:Z9},ds={};function QEe(){return{text:ds}}let Ho=48;for(;Ho<123;)ds[Ho]=da,Ho++,Ho===58?Ho=65:Ho===91&&(Ho=97);ds[43]=da;ds[45]=da;ds[46]=da;ds[95]=da;ds[72]=[da,Q9];ds[104]=[da,Q9];ds[87]=[da,J9];ds[119]=[da,J9];function XEe(e,t,n){const r=this;let i,s;return a;function a(u){return!L_(u)||!Z9.call(r,r.previous)||rA(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(u))}function o(u){return L_(u)?(e.consume(u),o):u===64?(e.consume(u),l):n(u)}function l(u){return u===46?e.check(JEe,f,c)(u):u===45||u===95||jn(u)?(s=!0,e.consume(u),l):f(u)}function c(u){return e.consume(u),i=!0,l}function f(u){return s&&i&&Vn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(u)):n(u)}}function WEe(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!X9.call(r,r.previous)||rA(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(YEe,e.attempt(K9,e.attempt(G9,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function ZEe(e,t,n){const r=this;let i="",s=!1;return a;function a(u){return(u===72||u===104)&&W9.call(r,r.previous)&&!rA(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(u),e.consume(u),o):n(u)}function o(u){if(Vn(u)&&i.length<5)return i+=String.fromCodePoint(u),e.consume(u),o;if(u===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(u),l}return n(u)}function l(u){return u===47?(e.consume(u),s?c:(s=!0,l)):n(u)}function c(u){return u===null||Cb(u)||ft(u)||Ul(u)||ES(u)?n(u):e.attempt(K9,e.attempt(G9,f),n)(u)}function f(u){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(u)}}function eCe(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),s):n(a)}function s(a){return a===null?n(a):t(a)}}function tCe(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(Y9,l,o)(c):c===null||ft(c)||Ul(c)||c!==45&&ES(c)?l(c):(s=!0,e.consume(c),a)}function o(c){return c===95?r=!0:(i=r,r=void 0),e.consume(c),a}function l(c){return i||r||!s?n(c):t(c)}}function nCe(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?s(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(Y9,t,s)(a):a===null||ft(a)||Ul(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function rCe(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),s):o===93?(e.consume(o),i):o===60||o===null||ft(o)||Ul(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||ft(o)||Ul(o)?t(o):r(o)}function s(o){return Vn(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):Vn(o)?(e.consume(o),a):n(o)}}function iCe(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return jn(s)?n(s):t(s)}}function X9(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function W9(e){return!Vn(e)}function Z9(e){return!(e===47||L_(e))}function L_(e){return e===43||e===45||e===46||e===95||jn(e)}function rA(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const sCe={tokenize:hCe,partial:!0};function aCe(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:uCe,continuation:{tokenize:fCe},exit:dCe}},text:{91:{name:"gfmFootnoteCall",tokenize:cCe},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:oCe,resolveTo:lCe}}}}function oCe(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const l=r.events[i][1];if(l.type==="labelImage"){a=l;break}if(l.type==="gfmFootnoteCall"||l.type==="labelLink"||l.type==="label"||l.type==="image"||l.type==="link")break}return o;function o(l){if(!a||!a._balanced)return n(l);const c=Ei(r.sliceSerialize({start:a.end,end:r.now()}));return c.codePointAt(0)!==94||!s.includes(c.slice(1))?n(l):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(l),e.exit("gfmFootnoteCallLabelMarker"),t(l))}}function lCe(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},o=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...o),e}function cCe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(u){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),l}function l(u){return u!==94?n(u):(e.enter("gfmFootnoteCallMarker"),e.consume(u),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(u){if(s>999||u===93&&!a||u===null||u===91||ft(u))return n(u);if(u===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(Ei(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(u),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(u)}return ft(u)||(a=!0),s++,e.consume(u),u===92?f:c}function f(u){return u===91||u===92||u===93?(e.consume(u),s++,c):c(u)}}function uCe(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(g){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(g){return g===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",f):n(g)}function f(g){if(a>999||g===93&&!o||g===null||g===91||ft(g))return n(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return s=Ei(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(g),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return ft(g)||(o=!0),a++,e.consume(g),g===92?u:f}function u(g){return g===91||g===92||g===93?(e.consume(g),a++,f):f(g)}function d(g){return g===58?(e.enter("definitionMarker"),e.consume(g),e.exit("definitionMarker"),i.includes(s)||i.push(s),Be(e,h,"gfmFootnoteDefinitionWhitespace")):n(g)}function h(g){return t(g)}}function fCe(e,t,n){return e.check(tp,t,e.attempt(sCe,t,n))}function dCe(e){e.exit("gfmFootnoteDefinition")}function hCe(e,t,n){const r=this;return Be(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(s):n(s)}}function mCe(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,o){let l=-1;for(;++l<a.length;)if(a[l][0]==="enter"&&a[l][1].type==="strikethroughSequenceTemporary"&&a[l][1]._close){let c=l;for(;c--;)if(a[c][0]==="exit"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._open&&a[l][1].end.offset-a[l][1].start.offset===a[c][1].end.offset-a[c][1].start.offset){a[l][1].type="strikethroughSequence",a[c][1].type="strikethroughSequence";const f={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},u={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},d=[["enter",f,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",u,o]],h=o.parser.constructs.insideSpan.null;h&&Dr(d,d.length,0,CS(h,a.slice(c+1,l),o)),Dr(d,d.length,0,[["exit",u,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",f,o]]),Dr(a,c-1,l-c+3,d),l=c+d.length-2;break}}for(l=-1;++l<a.length;)a[l][1].type==="strikethroughSequenceTemporary"&&(a[l][1].type="data");return a}function s(a,o,l){const c=this.previous,f=this.events;let u=0;return d;function d(g){return c===126&&f[f.length-1][1].type!=="characterEscape"?l(g):(a.enter("strikethroughSequenceTemporary"),h(g))}function h(g){const v=ef(c);if(g===126)return u>1?l(g):(a.consume(g),u++,h);if(u<2&&!n)return l(g);const x=a.exit("strikethroughSequenceTemporary"),m=ef(g);return x._open=!m||m===2&&!!v,x._close=!v||v===2&&!!m,o(g)}}}class pCe{constructor(){this.map=[]}add(t,n,r){gCe(this,t,n,r)}consume(t){if(this.map.sort(function(s,a){return s[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function gCe(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function yCe(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function bCe(){return{flow:{null:{name:"table",tokenize:vCe,resolveAll:SCe}}}}function vCe(e,t,n){const r=this;let i=0,s=0,a;return o;function o(N){let I=r.events.length-1;for(;I>-1;){const Q=r.events[I][1].type;if(Q==="lineEnding"||Q==="linePrefix")I--;else break}const $=I>-1?r.events[I][1].type:null,X=$==="tableHead"||$==="tableRow"?E:l;return X===E&&r.parser.lazy[r.now().line]?n(N):X(N)}function l(N){return e.enter("tableHead"),e.enter("tableRow"),c(N)}function c(N){return N===124||(a=!0,s+=1),f(N)}function f(N){return N===null?n(N):de(N)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),h):n(N):ze(N)?Be(e,f,"whitespace")(N):(s+=1,a&&(a=!1,i+=1),N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),a=!0,f):(e.enter("data"),u(N)))}function u(N){return N===null||N===124||ft(N)?(e.exit("data"),f(N)):(e.consume(N),N===92?d:u)}function d(N){return N===92||N===124?(e.consume(N),u):u(N)}function h(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(N):(e.enter("tableDelimiterRow"),a=!1,ze(N)?Be(e,g,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):g(N))}function g(N){return N===45||N===58?x(N):N===124?(a=!0,e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),v):C(N)}function v(N){return ze(N)?Be(e,x,"whitespace")(N):x(N)}function x(N){return N===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),m):N===45?(s+=1,m(N)):N===null||de(N)?_(N):C(N)}function m(N){return N===45?(e.enter("tableDelimiterFiller"),b(N)):C(N)}function b(N){return N===45?(e.consume(N),b):N===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(N),e.exit("tableDelimiterMarker"),S):(e.exit("tableDelimiterFiller"),S(N))}function S(N){return ze(N)?Be(e,_,"whitespace")(N):_(N)}function _(N){return N===124?g(N):N===null||de(N)?!a||i!==s?C(N):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(N)):C(N)}function C(N){return n(N)}function E(N){return e.enter("tableRow"),A(N)}function A(N){return N===124?(e.enter("tableCellDivider"),e.consume(N),e.exit("tableCellDivider"),A):N===null||de(N)?(e.exit("tableRow"),t(N)):ze(N)?Be(e,A,"whitespace")(N):(e.enter("data"),M(N))}function M(N){return N===null||N===124||ft(N)?(e.exit("data"),A(N)):(e.consume(N),N===92?D:M)}function D(N){return N===92||N===124?(e.consume(N),M):M(N)}}function SCe(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,f,u;const d=new pCe;for(;++n<e.length;){const h=e[n],g=h[1];h[0]==="enter"?g.type==="tableHead"?(o=!1,l!==0&&(tD(d,t,l,c,f),f=void 0,l=0),c={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(n,0,[["enter",c,t]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(r=!0,u=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},d.add(n,0,[["enter",f,t]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],u=Vp(d,t,s,i,void 0,u),s=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],u=Vp(d,t,s,i,void 0,u)),s=a,a=[s[1],n,0,0])):g.type==="tableHead"?(o=!0,l=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],u=Vp(d,t,s,i,n,u)):a[1]!==0&&(u=Vp(d,t,a,i,n,u)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&tD(d,t,l,c,f),d.consume(t.events),n=-1;++n<t.events.length;){const h=t.events[n];h[0]==="enter"&&h[1].type==="table"&&(h[1]._align=yCe(t.events,n))}return e}function Vp(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},Oc(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=Oc(t.events,n[1]);if(s={type:a,start:Object.assign({},l),end:Object.assign({},l)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const c=Oc(t.events,n[2]),f=Oc(t.events,n[3]),u={type:o,start:Object.assign({},c),end:Object.assign({},f)};if(e.add(n[2],0,[["enter",u,t]]),r!==2){const d=t.events[n[2]],h=t.events[n[3]];if(d[1].end=Object.assign({},h[1].end),d[1].type="chunkText",d[1].contentType="text",n[3]>n[2]+1){const g=n[2]+1,v=n[3]-n[2]-1;e.add(g,v,[])}}e.add(n[3]+1,0,[["exit",u,t]])}return i!==void 0&&(s.end=Object.assign({},Oc(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function tD(e,t,n,r,i){const s=[],a=Oc(t.events,n);i&&(i.end=Object.assign({},a),s.push(["exit",i,t])),r.end=Object.assign({},a),s.push(["exit",r,t]),e.add(n+1,0,s)}function Oc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const xCe={name:"tasklistCheck",tokenize:_Ce};function wCe(){return{text:{91:xCe}}}function _Ce(e,t,n){const r=this;return i;function i(l){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(l):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),s)}function s(l){return ft(l)?(e.enter("taskListCheckValueUnchecked"),e.consume(l),e.exit("taskListCheckValueUnchecked"),a):l===88||l===120?(e.enter("taskListCheckValueChecked"),e.consume(l),e.exit("taskListCheckValueChecked"),a):n(l)}function a(l){return l===93?(e.enter("taskListCheckMarker"),e.consume(l),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),o):n(l)}function o(l){return de(l)?t(l):ze(l)?e.check({tokenize:kCe},t,n)(l):n(l)}}function kCe(e,t,n){return Be(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function ECe(e){return l9([QEe(),aCe(),mCe(e),bCe(),wCe()])}const CCe={};function eH(e){const t=this,n=e||CCe,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(ECe(n)),s.push(KEe()),a.push(GEe(n))}function TCe(e){const[t,n]=w.useState(!1),[r,i]=w.useState(!1),s=()=>localStorage.getItem(e)==="true",a=w.useCallback(()=>s()?!1:(n(!0),!0),[e]),o=w.useCallback(()=>{r&&localStorage.setItem(e,"true"),n(!1)},[r,e]);return{cancel:w.useCallback(()=>{n(!1)},[]),dismiss:o,dontRemind:r,isDismissed:s,setDontRemind:i,show:a,visible:t}}const ACe=jT("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",ghost:"[a&]:hover:bg-accent [a&]:hover:text-accent-foreground",link:"text-primary underline-offset-4 [a&]:hover:underline"}},defaultVariants:{variant:"default"}});function br({asChild:e=!1,className:t,variant:n="default",...r}){const i=e?T6:"span";return p.jsx(i,{"data-slot":"badge","data-variant":n,className:Ie(ACe({variant:n}),t),...r})}function gu({className:e,...t}){return p.jsx("div",{"data-slot":"card",className:Ie("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function fh({className:e,...t}){return p.jsx("div",{"data-slot":"card-header",className:Ie("@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 dh({className:e,...t}){return p.jsx("div",{"data-slot":"card-title",className:Ie("leading-none font-semibold",e),...t})}function OCe({className:e,...t}){return p.jsx("div",{"data-slot":"card-description",className:Ie("text-muted-foreground text-sm",e),...t})}function yu({className:e,...t}){return p.jsx("div",{"data-slot":"card-content",className:Ie("px-6",e),...t})}const tH=e=>e==="green"?"text-green-600 dark:text-green-400":e==="yellow"?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400",RCe=e=>e==="green"?"border-green-500/30":e==="yellow"?"border-yellow-500/30":"border-red-500/30",NCe=e=>e==="positive"?"outline":e==="neutral"?"secondary":"destructive",MCe=e=>e==="positive"?"border-green-500/30 text-green-600 dark:text-green-400":"",DCe=e=>{const t=new Date(e),n=t.toLocaleString(void 0,{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"}),r=Date.now()-t.getTime(),i=Math.floor(r/6e4);if(i<1)return`${n} · just now`;if(i<60)return`${n} · ${i}m ago`;const s=Math.floor(i/60);if(s<24)return`${n} · ${s}h ago`;const a=Math.floor(s/24);return`${n} · ${a}d ago`},nD=e=>e.comments.length===0?0:Math.min(...e.comments.map(t=>new Date(t.root.creationDate).getTime())),nH=e=>1+e.replies.reduce((t,n)=>t+nH(n),0);function zCe({score:e}){if(!e)return null;const t=LT(e.total);return p.jsx(br,{variant:"outline",className:`${RCe(t)} ${tH(t)} tabular-nums font-semibold`,children:e.total.toFixed(1)})}function jCe({score:e}){if(!e)return p.jsx("p",{className:"text-xs text-muted-foreground pt-2",children:"Waiting for comment count..."});const t=LT(e.total);return p.jsxs("div",{className:"space-y-3 pt-2",children:[p.jsxs("div",{className:"flex items-baseline gap-2",children:[p.jsx("span",{className:`text-lg font-bold tabular-nums ${tH(t)}`,children:e.total.toFixed(1)}),p.jsx("span",{className:"text-xs text-muted-foreground",children:"/ 10"}),p.jsx("div",{className:"ml-2 h-1.5 flex-1 overflow-hidden rounded-full bg-muted",children:p.jsx("div",{className:`h-full rounded-full ${t==="green"?"bg-green-500":t==="yellow"?"bg-yellow-500":"bg-red-500"}`,style:{width:`${e.total*10}%`}})})]}),p.jsx("div",{className:"space-y-2",children:e.categories.map(n=>p.jsxs("div",{className:"flex items-start gap-3 rounded border px-3 py-2",children:[p.jsx("span",{className:`w-8 text-right text-xs font-semibold tabular-nums ${n.value>0?"text-green-600 dark:text-green-400":n.value<0?"text-red-600 dark:text-red-400":"text-muted-foreground"}`,children:n.value>0?`+${n.value}`:n.value}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:"text-xs font-medium",children:n.label}),p.jsx(br,{variant:NCe(n.status),className:`text-[10px] px-1.5 py-0 ${MCe(n.status)}`,children:n.statusLabel})]}),p.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n.description})]})]},n.label))})]})}function rH({depth:e,thread:t}){return t.root.deleted?null:p.jsxs("div",{className:e>0?"ml-4 border-l-2 border-muted pl-3":"",children:[p.jsxs("div",{className:"space-y-1 py-2",children:[p.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[p.jsx("span",{className:"font-medium",children:t.root.author}),p.jsx("span",{children:"·"}),p.jsx("span",{children:DCe(t.root.creationDate)})]}),p.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none break-words [&_a]:text-primary [&_img]:inline [&_img]:h-5 [&_img]:w-auto",children:p.jsx(R9,{remarkPlugins:[eH],children:t.root.content})})]}),t.replies.map(n=>p.jsx(rH,{thread:n,depth:e+1},n.root.id))]})}function ICe({pr:e}){const t=kt(yN),n=On(yN),r=w.useRef(null);return w.useEffect(()=>{r.current!==e.id&&(r.current=e.id,t({payload:{pullRequestId:e.id,repositoryName:e.repositoryName,account:{id:e.account.id,region:e.account.region}}}))},[e.id,e.repositoryName,e.account.id,e.account.region,t]),ub(n).onInitialOrWaiting(()=>p.jsx("div",{className:"pt-2",children:p.jsx("p",{className:"text-xs text-muted-foreground",children:"Loading comments..."})})).onError(()=>p.jsx("div",{className:"pt-2",children:p.jsx("p",{className:"text-xs text-destructive",children:"Failed to load comments"})})).onDefect(()=>p.jsx("div",{className:"pt-2",children:p.jsx("p",{className:"text-xs text-destructive",children:"Failed to load comments"})})).onSuccess(i=>{const s=i.reduce((a,o)=>a+o.comments.reduce((l,c)=>l+nH(c),0),0);return p.jsxs("div",{className:"pt-2",children:[i.length===0&&p.jsx("p",{className:"text-xs text-muted-foreground",children:"No comments"}),s>0&&p.jsx("div",{className:"space-y-1",children:[...i].sort((a,o)=>nD(o)-nD(a)).map((a,o)=>p.jsxs("div",{children:[a.filePath&&p.jsx("p",{className:"font-mono text-xs text-muted-foreground",children:a.filePath}),a.comments.map(l=>p.jsx(rH,{thread:l,depth:0},l.root.id)),o<i.length-1&&p.jsx(zo,{className:"my-2"})]},o))})]})}).render()}function rD({children:e,count:t,title:n}){const[r,i]=w.useState(!1);return p.jsxs("div",{className:"rounded-lg border bg-card",children:[p.jsxs("button",{className:"flex w-full items-center gap-2 px-4 py-2.5 text-left text-sm font-medium hover:bg-accent/50",onClick:()=>i(!r),children:[p.jsx(dS,{className:`size-4 text-muted-foreground transition-transform ${r?"":"-rotate-90"}`}),n,t!==void 0&&p.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",t,")"]})]}),r&&p.jsx("div",{className:"border-t px-4 pb-3",children:e})]})}function $Ce(){const e=On(y6),t=On(If),n=w.useMemo(()=>e?t.pullRequests.find(d=>d.id===e)??null:null,[e,t.pullRequests]),r=w.useMemo(()=>n?qr(Eb(n,new Date)):void 0,[n]),i=kt(tc),s=kt(mme),a=TCe($T.grantedDismissed),o=w.useCallback(()=>{n&&s({payload:{profile:n.account.id,link:n.link}})},[s,n]),l=w.useCallback(()=>{n&&(a.show()||o())},[a,n,o]),c=()=>{a.dismiss(),o()};if(w.useEffect(()=>{const d=h=>{h.key==="Escape"?(h.preventDefault(),i("prs")):(h.key==="Enter"||h.key==="o")&&(n!=null&&n.link)&&l()};return window.addEventListener("keydown",d),()=>window.removeEventListener("keydown",d)},[l,n,i]),!n)return p.jsx("div",{className:"flex items-center justify-center py-20 text-muted-foreground",children:p.jsx("p",{className:"text-sm",children:"No PR selected"})});const f=n.isMergeable?p.jsx(br,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Mergeable"}):p.jsx(br,{variant:"destructive",children:"Conflict"}),u=n.isApproved?p.jsx(br,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Approved"}):p.jsx(br,{variant:"secondary",children:"Pending"});return p.jsxs("div",{className:"space-y-6",children:[p.jsxs("div",{className:"flex items-center gap-4",children:[p.jsxs(tn,{variant:"ghost",size:"sm",onClick:()=>i("prs"),children:[p.jsx(v6,{className:"size-4"}),"Back"]}),p.jsx("div",{className:"ml-auto",children:p.jsxs(tn,{size:"sm",onClick:l,children:[p.jsx(Jme,{className:"size-4"}),"Open in Console"]})})]}),p.jsxs("div",{children:[p.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:n.title}),p.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[f,u,p.jsx(br,{variant:"outline",children:n.status}),p.jsx(zCe,{score:r}),p.jsxs("span",{className:"text-sm text-muted-foreground",children:[n.author," · ",IT(n.creationDate)]})]})]}),p.jsx(zo,{}),p.jsx(gu,{children:p.jsxs(yu,{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 py-4 text-sm",children:[p.jsx("span",{className:"text-muted-foreground",children:"Repository"}),p.jsx("span",{className:"font-mono text-xs",children:n.repositoryName}),p.jsx("span",{className:"text-muted-foreground",children:"Branch"}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(br,{variant:"outline",className:"font-mono text-xs",children:n.sourceBranch}),p.jsx(zme,{className:"size-3 text-muted-foreground"}),p.jsx(br,{variant:"outline",className:"font-mono text-xs",children:n.destinationBranch})]}),p.jsx("span",{className:"text-muted-foreground",children:"ID"}),p.jsx("span",{className:"font-mono text-xs",children:n.id})]})}),p.jsx(rD,{title:"Health Score Breakdown",children:p.jsx(jCe,{score:r})}),n.description&&p.jsxs(gu,{children:[p.jsx(fh,{children:p.jsx(dh,{className:"text-sm",children:"Description"})}),p.jsx(yu,{children:p.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:p.jsx(R9,{remarkPlugins:[eH],children:n.description})})})]}),p.jsx(rD,{title:"Comments",...n.commentCount!==void 0?{count:n.commentCount}:{},children:p.jsx(ICe,{pr:n},n.id)}),p.jsx(F8,{open:a.visible,onOpenChange:a.cancel,children:p.jsxs(P8,{children:[p.jsxs(U8,{children:[p.jsx(B8,{children:"Granted CLI Required"}),p.jsxs(H8,{children:['"Open in Console" uses'," ",p.jsx("a",{href:"https://docs.commonfate.io/granted/introduction",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Granted"})," ","to assume the AWS role for this account. Make sure the"," ",p.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-xs",children:"assume"})," CLI is installed and configured before continuing."]})]}),p.jsxs(s0e,{children:[p.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground mr-auto",children:[p.jsx("input",{type:"checkbox",checked:a.dontRemind,onChange:d=>a.setDontRemind(d.target.checked),className:"accent-primary"}),"Don't remind again"]}),p.jsx(tn,{variant:"ghost",onClick:a.cancel,children:"Cancel"}),p.jsx(tn,{onClick:c,children:"Continue"})]})]})})]})}function LCe({onClick:e,pr:t}){const n=w.useMemo(()=>qr(Eb(t,new Date)),[t]),r=n?LT(n.total):void 0,i=r==="green"?"text-green-600 dark:text-green-400":r==="yellow"?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400",s=t.isMergeable?t.isApproved?p.jsx(br,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Approved"}):p.jsx(br,{variant:"secondary",children:"Pending"}):p.jsx(br,{variant:"destructive",children:"Conflict"});return p.jsxs("div",{className:"group flex cursor-pointer flex-col gap-1.5 px-4 py-3 transition-colors hover:bg-accent/50",onClick:e,children:[p.jsxs("div",{className:"flex items-center gap-2",children:[s,n&&p.jsx("span",{className:`text-xs font-semibold tabular-nums ${i}`,children:n.total.toFixed(1)}),p.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.author," · ",IT(t.creationDate)]}),t.commentCount!==void 0&&t.commentCount>0&&p.jsxs("span",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[p.jsx(lpe,{className:"size-3"}),t.commentCount]})]}),p.jsxs("div",{className:"flex items-baseline gap-1.5",children:[p.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:t.repositoryName}),p.jsx("span",{className:"text-muted-foreground/50",children:"›"}),p.jsx("span",{className:"text-sm font-medium",children:t.title})]}),t.description&&p.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.description.split(`
|
|
348
|
+
`).slice(0,2).join(" ")})]})}function FCe(){const e=On(If),t=On(c_),n=On(pb),r=kt(y6),i=kt(tc),s=e.status==="loading",a=e.pullRequests,o=e.currentUser,l=w.useMemo(()=>{var S;if(a.length===0)return[];const u=t.toLowerCase(),d=_=>{var C;return t?_.repositoryName.toLowerCase().includes(u)||_.title.toLowerCase().includes(u)||_.author.toLowerCase().includes(u)||_.sourceBranch.toLowerCase().includes(u)||(((C=_.description)==null?void 0:C.toLowerCase().includes(u))??!1):!0},h=new Date,g=_=>{var C;if(n.type==="all")return!0;if(n.type==="hot")return dL(Eb(_,h),E=>E.total>=7);if(n.type==="mine")return o&&_.author!==o?!1:C_(_.title)===n.value;if(n.type==="account")return((C=_.account)==null?void 0:C.id)===n.value;if(n.type==="author")return _.author===n.value;if(n.type==="scope")return C_(_.title)===n.value;if(n.type==="repo")return _.repositoryName===n.value;if(n.type==="status")switch(n.value){case"approved":return _.isApproved;case"pending":return!_.isApproved;case"mergeable":return _.isMergeable;case"conflicts":return!_.isMergeable;default:return!0}return!0},v=_=>d(_)&&g(_),x=new Map;for(const _ of a){const C=((S=_.account)==null?void 0:S.id)??"unknown";x.has(C)||x.set(C,[]),x.get(C).push(_)}const m=_=>{if(n.type!=="hot")return _;const C=new Map(_.map(E=>[E.id,ut(Eb(E,h).pipe(Gn(A=>A.total)),()=>-1)]));return[..._].sort((E,A)=>(C.get(A.id)??-1)-(C.get(E.id)??-1))},b=[];for(const[_,C]of x){const E=C.filter(v);E.length>0&&b.push([_,m(E)])}return b},[a,o,t,n]),c=u=>{r(u.id),i("details")},f=a.filter(u=>u.commentCount!==void 0).length;return l.length===0?s?p.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground",children:[p.jsx(xN,{className:"size-8 animate-spin opacity-40"}),p.jsx("p",{className:"text-sm font-medium",children:"Loading pull requests..."}),e.statusDetail&&p.jsx("p",{className:"font-mono text-xs opacity-60",children:e.statusDetail}),a.length>0&&p.jsxs("p",{className:"text-xs opacity-50",children:[a.length," PRs fetched (filter hides all)"]})]}):p.jsxs("div",{className:"flex flex-col items-center justify-center gap-3 py-20 text-muted-foreground",children:[p.jsxs("svg",{className:"size-16 opacity-30",viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[p.jsx("rect",{x:"8",y:"12",width:"48",height:"40",rx:"4",stroke:"currentColor",strokeWidth:"2"}),p.jsx("path",{d:"M8 24h48",stroke:"currentColor",strokeWidth:"2"}),p.jsx("circle",{cx:"16",cy:"18",r:"2",fill:"currentColor"}),p.jsx("circle",{cx:"22",cy:"18",r:"2",fill:"currentColor"}),p.jsx("circle",{cx:"28",cy:"18",r:"2",fill:"currentColor"}),p.jsx("path",{d:"M24 36h16M28 42h8",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),p.jsx("p",{className:"text-sm",children:"No pull requests found"}),a.length>0&&p.jsxs("p",{className:"text-xs opacity-50",children:[a.length," PRs loaded — try a different filter"]})]}):p.jsxs("div",{className:"space-y-6",children:[(s||f<a.length&&a.length>0)&&p.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[p.jsx(xN,{className:"size-3 animate-spin"}),s?p.jsxs("span",{children:["Loading... ",e.statusDetail&&p.jsx("span",{className:"font-mono opacity-60",children:e.statusDetail})]}):p.jsxs("span",{children:["Enriching details (",f,"/",a.length,")"]})]}),l.map(([u,d])=>p.jsxs("section",{children:[p.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[p.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:u}),p.jsx(br,{variant:"secondary",children:d.length})]}),p.jsx("div",{className:"divide-y rounded-lg border bg-card",children:d.map(h=>p.jsx(LCe,{pr:h,onClick:()=>c(h)},h.id))})]},u))]})}const PCe=[{key:"Esc",desc:"Back / Close"},{key:"R",desc:"Refresh PRs"},{key:"/",desc:"Filter PRs"},{key:"1-7",desc:"Quick filters"},{key:"Enter",desc:"Open PR details"},{key:"Cmd+P",desc:"Command palette"}];function UCe(){return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-lg font-semibold",children:"About"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Keyboard shortcuts and info"})]}),p.jsx(zo,{}),p.jsxs(gu,{children:[p.jsx(fh,{className:"py-3",children:p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(rpe,{className:"size-4"}),p.jsx(dh,{className:"text-sm",children:"Keyboard Shortcuts"})]})}),p.jsx(yu,{className:"pb-3",children:p.jsx("div",{className:"space-y-1",children:PCe.map(e=>p.jsxs("div",{className:"flex items-center justify-between text-sm",children:[p.jsx("span",{className:"text-muted-foreground",children:e.desc}),p.jsx("kbd",{className:"rounded border bg-muted px-1.5 py-0.5 font-mono text-xs",children:e.key})]},e.key))})})]})]})}function BCe(){const e=On(hme),t=kt(yme),n=kt(g6),[r,i]=w.useState(""),[s,a]=w.useState("all"),[o,l]=w.useState({}),c=w.useRef(null);w.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const f=w.useCallback((u,d,h)=>{var m;const v=!(o[u]??((m=d.find(b=>b.profile===u))==null?void 0:m.enabled)??!0),x={...o,[u]:v};l(x),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>{t({payload:{accounts:d.map(b=>({profile:b.profile,regions:[...b.regions],enabled:b.profile===u?v:x[b.profile]??b.enabled})),autoDetect:h}})},500)},[t,o]);return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-lg font-semibold",children:"Accounts"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"AWS profiles configured for CodeCommit"})]}),p.jsx(zo,{}),ub(e).onInitialOrWaiting(()=>p.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})).onError(()=>p.jsx("p",{className:"text-sm text-destructive",children:"Failed to load config"})).onDefect(()=>p.jsx("p",{className:"text-sm text-destructive",children:"Failed to load config"})).onSuccess(u=>p.jsx(HCe,{data:u,overrides:o,search:r,setSearch:i,statusFilter:s,setStatusFilter:a,toggleAccount:f,onSsoLogout:d=>n({payload:{profile:d}})})).render()]})}function HCe({data:e,onSsoLogout:t,overrides:n,search:r,setSearch:i,setStatusFilter:s,statusFilter:a,toggleAccount:o}){const l=w.useMemo(()=>e.accounts.map(u=>({...u,enabled:n[u.profile]??u.enabled})),[e.accounts,n]),c=w.useMemo(()=>{const u=r.toLowerCase();return l.filter(d=>!(a==="on"&&!d.enabled||a==="off"&&d.enabled||u&&!d.profile.toLowerCase().includes(u)&&!d.regions.some(h=>h.toLowerCase().includes(u))))},[l,r,a]),f=l.filter(u=>u.enabled).length;return p.jsxs(p.Fragment,{children:[e.currentUser&&p.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[p.jsx(k6,{className:"size-4 text-muted-foreground"}),p.jsx("span",{className:"text-muted-foreground",children:"Current user:"}),p.jsx("span",{className:"font-medium",children:e.currentUser}),p.jsx(tn,{variant:"ghost",size:"sm",className:"h-6 px-1.5 text-xs",title:"SSO Logout",onClick:()=>t(e.currentUser),children:p.jsx(ape,{className:"size-3"})})]}),l.length===0?p.jsx("p",{className:"text-sm text-muted-foreground py-4",children:"No accounts configured. Edit the config file to add AWS profiles."}):p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs("div",{className:"relative flex-1",children:[p.jsx(mT,{className:"absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"}),p.jsx(q8,{placeholder:"Search profiles...",value:r,onChange:u=>i(u.target.value),className:"h-8 pl-8 text-sm"})]}),p.jsx("div",{className:"flex gap-1",children:["all","on","off"].map(u=>p.jsx(tn,{variant:a===u?"default":"outline",size:"sm",className:"h-8 px-2.5 text-xs capitalize",onClick:()=>s(u),children:u},u))})]}),p.jsxs("div",{className:"text-xs text-muted-foreground",children:[f,"/",l.length," enabled",c.length!==l.length&&` · ${c.length} shown`]}),p.jsxs("div",{className:"divide-y rounded-md border",children:[c.map(u=>p.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx(vpe,{className:"size-3.5 text-muted-foreground shrink-0"}),p.jsx("span",{className:"text-sm font-medium truncate",children:u.profile}),p.jsx("span",{className:"text-xs text-muted-foreground truncate",children:u.regions.join(", ")||"default"})]}),p.jsx(tn,{variant:u.enabled?"default":"outline",size:"sm",className:"ml-2 h-6 px-2 text-xs shrink-0",onClick:()=>o(u.profile,e.accounts,e.autoDetect),children:u.enabled?"On":"Off"})]},u.profile)),c.length===0&&p.jsx("p",{className:"px-3 py-4 text-center text-sm text-muted-foreground",children:"No matching accounts"})]})]}),p.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[p.jsx(hT,{className:"size-3"}),"Auto-detect: ",e.autoDetect?"enabled":"disabled"]})]})}function qCe(){const e=On(pme),t=On(gme),n=kt(bme),[r,i]=w.useState(!1),[s,a]=w.useState(!1),o=w.useCallback(c=>{navigator.clipboard.writeText(c),i(!0),setTimeout(()=>i(!1),2e3)},[]),l=w.useCallback(async()=>{a(!0);try{await n({})}finally{a(!1)}},[n]);return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-lg font-semibold",children:"Configuration"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Config file location and status"})]}),p.jsx(zo,{}),p.jsxs(gu,{children:[p.jsx(fh,{className:"py-3",children:p.jsx(dh,{className:"text-sm",children:"Config File"})}),p.jsx(yu,{className:"pb-3",children:ub(e).onInitialOrWaiting(()=>p.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading..."})).onError(()=>p.jsx("span",{className:"text-sm text-destructive",children:"Failed to load config path"})).onDefect(()=>p.jsx("span",{className:"text-sm text-destructive",children:"Failed to load config path"})).onSuccess(c=>p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("code",{className:"flex-1 rounded bg-muted px-2 py-1 text-xs font-mono",children:c.path}),p.jsx(tn,{variant:"ghost",size:"icon-sm",onClick:()=>o(c.path),children:r?p.jsx(f_,{className:"size-4 text-green-500"}):p.jsx(Gme,{className:"size-4"})})]}),p.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:c.exists?"File exists":"File does not exist yet"})]})).render()})]}),p.jsxs(gu,{children:[p.jsx(fh,{className:"py-3",children:p.jsx(dh,{className:"text-sm",children:"Validation"})}),p.jsx(yu,{className:"pb-3",children:ub(t).onInitialOrWaiting(()=>p.jsx("span",{className:"text-sm text-muted-foreground",children:"Loading..."})).onError(()=>p.jsx("span",{className:"text-sm text-destructive",children:"Failed to validate config"})).onDefect(()=>p.jsx("span",{className:"text-sm text-destructive",children:"Failed to validate config"})).onSuccess(c=>p.jsxs("div",{className:"space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[c.status==="valid"?p.jsx(f_,{className:"size-4 text-green-500"}):p.jsx(Vme,{className:"size-4 text-destructive"}),p.jsx("span",{className:"text-sm capitalize",children:c.status})]}),c.errors.length>0&&p.jsx("div",{className:"rounded bg-destructive/10 p-2 text-xs text-destructive",children:c.errors.map((f,u)=>p.jsx("p",{children:f},u))})]})).render()})]}),p.jsxs(gu,{children:[p.jsxs(fh,{className:"py-3",children:[p.jsx(dh,{className:"text-sm",children:"Reset to Defaults"}),p.jsx(OCe,{className:"text-xs",children:"Creates a backup of current config, then re-detects AWS profiles"})]}),p.jsx(yu,{className:"pb-3",children:p.jsxs(tn,{variant:"outline",size:"sm",onClick:l,disabled:s,className:"gap-2",children:[p.jsx(gpe,{className:Ie("size-4",s&&"animate-spin")}),s?"Resetting...":"Reset Configuration"]})})]})]})}function VCe(){const{setTheme:e,theme:t}=G8(),n=[{id:"light",label:"Light",icon:p.jsx(_6,{className:"size-5"})},{id:"dark",label:"Dark",icon:p.jsx(x6,{className:"size-5"})},{id:"system",label:"System",icon:p.jsx(upe,{className:"size-5"})}];return p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("h2",{className:"text-lg font-semibold",children:"Theme"}),p.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose your preferred appearance"})]}),p.jsx(zo,{}),p.jsx("div",{className:"grid grid-cols-3 gap-3",children:n.map(r=>p.jsxs("button",{onClick:()=>e(r.id),className:Ie("flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors",t===r.id?"border-primary bg-primary/5":"border-border hover:border-primary/50"),children:[r.icon,p.jsx("span",{className:"text-sm font-medium",children:r.label})]},r.id))})]})}const KCe={accounts:p.jsx(k6,{className:"size-4"}),theme:p.jsx(hpe,{className:"size-4"}),config:p.jsx(Xme,{className:"size-4"}),about:p.jsx(hT,{className:"size-4"})},GCe={accounts:"Accounts",theme:"Theme",config:"Config",about:"About"};function YCe(){const e=On(u_),t=kt(u_),n=kt(tc);return p.jsxs("div",{className:"flex gap-6",children:[p.jsxs("nav",{className:"w-48 shrink-0",children:[p.jsxs(tn,{variant:"ghost",size:"sm",className:"mb-4 gap-2",onClick:()=>n("prs"),children:[p.jsx(v6,{className:"size-4"}),"Back to PRs"]}),p.jsx("div",{className:"flex flex-col gap-1",role:"tablist",children:xme.map(r=>p.jsxs("button",{role:"tab","aria-selected":e===r,onClick:()=>t(r),className:Ie("flex items-center gap-2 rounded-md px-3 py-2 text-sm text-left transition-colors",e===r?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[KCe[r],GCe[r]]},r))})]}),p.jsxs("div",{className:"flex-1 min-w-0",children:[e==="accounts"&&p.jsx(BCe,{}),e==="theme"&&p.jsx(VCe,{}),e==="config"&&p.jsx(qCe,{}),e==="about"&&p.jsx(UCe,{})]})]})}function JCe(){const e=On(tc),t=kt(If);return Cme(n=>t(n)),p.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[p.jsx(R0e,{}),e==="prs"&&p.jsx(E0e,{}),p.jsxs("main",{className:"mx-auto w-full max-w-5xl flex-1 px-4 py-6",children:[e==="prs"&&p.jsx(FCe,{}),e==="details"&&p.jsx($Ce,{}),e==="settings"&&p.jsx(YCe,{}),e==="notifications"&&p.jsx(z0e,{})]}),p.jsx(d0e,{})]})}function QCe(){return p.jsx(A0e,{children:p.jsx(JCe,{})})}const iD=document.getElementById("root");iD&&l7.createRoot(iD).render(p.jsx(qt.StrictMode,{children:p.jsx(QCe,{})}));
|