@knpkv/codecommit-web 0.1.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/geist-cyrillic-wght-normal-CHSlOQsW.woff2 +0 -0
- package/dist/client/assets/geist-latin-ext-wght-normal-DMtmJ5ZE.woff2 +0 -0
- package/dist/client/assets/geist-latin-wght-normal-Dm3htQBi.woff2 +0 -0
- package/dist/client/assets/geist-mono-cyrillic-wght-normal-BZdD_g9V.woff2 +0 -0
- package/dist/client/assets/geist-mono-latin-ext-wght-normal-b6lpi8_2.woff2 +0 -0
- package/dist/client/assets/geist-mono-latin-wght-normal-Cjtb1TV-.woff2 +0 -0
- package/dist/client/assets/index-CdJp2tFb.js +253 -0
- package/dist/client/assets/index-D-_sDJhr.css +1 -0
- package/dist/client/index.html +13 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +8 -0
- package/dist/main.js.map +1 -0
- package/dist/server/Api.d.ts +45 -0
- package/dist/server/Api.d.ts.map +1 -0
- package/dist/server/Api.js +64 -0
- package/dist/server/Api.js.map +1 -0
- package/dist/server/Server.d.ts +8 -0
- package/dist/server/Server.d.ts.map +1 -0
- package/dist/server/Server.js +97 -0
- package/dist/server/Server.js.map +1 -0
- package/dist/server/handlers/accounts-live.d.ts +3 -0
- package/dist/server/handlers/accounts-live.d.ts.map +1 -0
- package/dist/server/handlers/accounts-live.js +18 -0
- package/dist/server/handlers/accounts-live.js.map +1 -0
- package/dist/server/handlers/config-live.d.ts +3 -0
- package/dist/server/handlers/config-live.d.ts.map +1 -0
- package/dist/server/handlers/config-live.js +22 -0
- package/dist/server/handlers/config-live.js.map +1 -0
- package/dist/server/handlers/events-live.d.ts +3 -0
- package/dist/server/handlers/events-live.d.ts.map +1 -0
- package/dist/server/handlers/events-live.js +35 -0
- package/dist/server/handlers/events-live.js.map +1 -0
- package/dist/server/handlers/index.d.ts +5 -0
- package/dist/server/handlers/index.d.ts.map +1 -0
- package/dist/server/handlers/index.js +5 -0
- package/dist/server/handlers/index.js.map +1 -0
- package/dist/server/handlers/prs-live.d.ts +3 -0
- package/dist/server/handlers/prs-live.d.ts.map +1 -0
- package/dist/server/handlers/prs-live.js +46 -0
- package/dist/server/handlers/prs-live.js.map +1 -0
- package/package.json +60 -0
- package/src/index.ts +2 -0
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
var u9=Object.defineProperty;var ET=e=>{throw TypeError(e)};var f9=(e,t,n)=>t in e?u9(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var g=(e,t,n)=>f9(e,typeof t!="symbol"?t+"":t,n),CT=(e,t,n)=>t.has(e)||ET("Cannot "+n);var Rm=(e,t,n)=>(CT(e,t,"read from private field"),n?n.call(e):t.get(e)),tS=(e,t,n)=>t.has(e)?ET("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),Mm=(e,t,n,r)=>(CT(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);function d9(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 og=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Dh(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var BD={exports:{}},Wy={};/**
|
|
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 h9=Symbol.for("react.transitional.element"),m9=Symbol.for("react.fragment");function HD(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:h9,type:e,key:r,ref:t!==void 0?t:null,props:n}}Wy.Fragment=m9;Wy.jsx=HD;Wy.jsxs=HD;BD.exports=Wy;var k=BD.exports,qD={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 ox=Symbol.for("react.transitional.element"),p9=Symbol.for("react.portal"),g9=Symbol.for("react.fragment"),y9=Symbol.for("react.strict_mode"),b9=Symbol.for("react.profiler"),v9=Symbol.for("react.consumer"),S9=Symbol.for("react.context"),w9=Symbol.for("react.forward_ref"),_9=Symbol.for("react.suspense"),x9=Symbol.for("react.memo"),VD=Symbol.for("react.lazy"),k9=Symbol.for("react.activity"),TT=Symbol.iterator;function E9(e){return e===null||typeof e!="object"?null:(e=TT&&e[TT]||e["@@iterator"],typeof e=="function"?e:null)}var KD={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},GD=Object.assign,YD={};function $u(e,t,n){this.props=e,this.context=t,this.refs=YD,this.updater=n||KD}$u.prototype.isReactComponent={};$u.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")};$u.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function JD(){}JD.prototype=$u.prototype;function lx(e,t,n){this.props=e,this.context=t,this.refs=YD,this.updater=n||KD}var cx=lx.prototype=new JD;cx.constructor=lx;GD(cx,$u.prototype);cx.isPureReactComponent=!0;var AT=Array.isArray;function tw(){}var pt={H:null,A:null,T:null,S:null},QD=Object.prototype.hasOwnProperty;function ux(e,t,n){var r=n.ref;return{$$typeof:ox,type:e,key:t,ref:r!==void 0?r:null,props:n}}function C9(e,t){return ux(e.type,t,e.props)}function fx(e){return typeof e=="object"&&e!==null&&e.$$typeof===ox}function T9(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var OT=/\/+/g;function nS(e,t){return typeof e=="object"&&e!==null&&e.key!=null?T9(""+e.key):t.toString(36)}function A9(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(tw,tw):(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 ac(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 ox:case p9:a=!0;break;case VD:return a=e._init,ac(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+nS(e,0):r,AT(i)?(n="",a!=null&&(n=a.replace(OT,"$&/")+"/"),ac(i,t,n,"",function(c){return c})):i!=null&&(fx(i)&&(i=C9(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(OT,"$&/")+"/")+a)),t.push(i)),1;a=0;var o=r===""?".":r+":";if(AT(e))for(var l=0;l<e.length;l++)r=e[l],s=o+nS(r,l),a+=ac(r,t,n,s,i);else if(l=E9(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,s=o+nS(r,l++),a+=ac(r,t,n,s,i);else if(s==="object"){if(typeof e.then=="function")return ac(A9(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 Nm(e,t,n){if(e==null)return e;var r=[],i=0;return ac(e,r,"","",function(s){return t.call(n,s,i++)}),r}function O9(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 RT=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)},R9={map:Nm,forEach:function(e,t,n){Nm(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Nm(e,function(){t++}),t},toArray:function(e){return Nm(e,function(t){return t})||[]},only:function(e){if(!fx(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Activity=k9;ke.Children=R9;ke.Component=$u;ke.Fragment=g9;ke.Profiler=b9;ke.PureComponent=lx;ke.StrictMode=y9;ke.Suspense=_9;ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=pt;ke.__COMPILER_RUNTIME={__proto__:null,c:function(e){return pt.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=GD({},e.props),i=e.key;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)!QD.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 ux(e.type,i,r)};ke.createContext=function(e){return e={$$typeof:S9,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:v9,_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)QD.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 ux(e,s,i)};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:w9,render:e}};ke.isValidElement=fx;ke.lazy=function(e){return{$$typeof:VD,_payload:{_status:-1,_result:e},_init:O9}};ke.memo=function(e,t){return{$$typeof:x9,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=pt.T,n={};pt.T=n;try{var r=e(),i=pt.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(tw,RT)}catch(s){RT(s)}finally{t!==null&&n.types!==null&&(t.types=n.types),pt.T=t}};ke.unstable_useCacheRefresh=function(){return pt.H.useCacheRefresh()};ke.use=function(e){return pt.H.use(e)};ke.useActionState=function(e,t,n){return pt.H.useActionState(e,t,n)};ke.useCallback=function(e,t){return pt.H.useCallback(e,t)};ke.useContext=function(e){return pt.H.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e,t){return pt.H.useDeferredValue(e,t)};ke.useEffect=function(e,t){return pt.H.useEffect(e,t)};ke.useEffectEvent=function(e){return pt.H.useEffectEvent(e)};ke.useId=function(){return pt.H.useId()};ke.useImperativeHandle=function(e,t,n){return pt.H.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return pt.H.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return pt.H.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return pt.H.useMemo(e,t)};ke.useOptimistic=function(e,t){return pt.H.useOptimistic(e,t)};ke.useReducer=function(e,t,n){return pt.H.useReducer(e,t,n)};ke.useRef=function(e){return pt.H.useRef(e)};ke.useState=function(e){return pt.H.useState(e)};ke.useSyncExternalStore=function(e,t,n){return pt.H.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return pt.H.useTransition()};ke.version="19.2.4";qD.exports=ke;var w=qD.exports;const jt=Dh(w),dx=d9({__proto__:null,default:jt},[w]);var XD={exports:{}},Zy={},WD={exports:{}},ZD={};/**
|
|
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,F){var I=z.length;z.push(F);e:for(;0<I;){var te=I-1>>>1,R=z[te];if(0<i(R,F))z[te]=F,z[I]=R,I=te;else break e}}function n(z){return z.length===0?null:z[0]}function r(z){if(z.length===0)return null;var F=z[0],I=z.pop();if(I!==F){z[0]=I;e:for(var te=0,R=z.length,Re=R>>>1;te<Re;){var U=2*(te+1)-1,C=z[U],X=U+1,W=z[X];if(0>i(C,I))X<R&&0>i(W,C)?(z[te]=W,z[X]=I,te=X):(z[te]=C,z[U]=I,te=U);else if(X<R&&0>i(W,I))z[te]=W,z[X]=I,te=X;else break e}}return F}function i(z,F){var I=z.sortIndex-F.sortIndex;return I!==0?I:z.id-F.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=[],u=1,f=null,d=3,h=!1,p=!1,b=!1,S=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function _(z){for(var F=n(c);F!==null;){if(F.callback===null)r(c);else if(F.startTime<=z)r(c),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(c)}}function A(z){if(b=!1,_(z),!p)if(n(l)!==null)p=!0,E||(E=!0,L());else{var F=n(c);F!==null&&G(A,F.startTime-z)}}var E=!1,T=-1,N=5,D=-1;function M(){return S?!0:!(e.unstable_now()-D<N)}function $(){if(S=!1,E){var z=e.unstable_now();D=z;var F=!0;try{e:{p=!1,b&&(b=!1,y(T),T=-1),h=!0;var I=d;try{t:{for(_(z),f=n(l);f!==null&&!(f.expirationTime>z&&M());){var te=f.callback;if(typeof te=="function"){f.callback=null,d=f.priorityLevel;var R=te(f.expirationTime<=z);if(z=e.unstable_now(),typeof R=="function"){f.callback=R,_(z),F=!0;break t}f===n(l)&&r(l),_(z)}else r(l);f=n(l)}if(f!==null)F=!0;else{var Re=n(c);Re!==null&&G(A,Re.startTime-z),F=!1}}break e}finally{f=null,d=I,h=!1}F=void 0}}finally{F?L():E=!1}}}var L;if(typeof v=="function")L=function(){v($)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,Y=J.port2;J.port1.onmessage=$,L=function(){Y.postMessage(null)}}else L=function(){m($,0)};function G(z,F){T=m(function(){z(e.unstable_now())},F)}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"):N=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 F=3;break;default:F=d}var I=d;d=F;try{return z()}finally{d=I}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(z,F){switch(z){case 1:case 2:case 3:case 4:case 5:break;default:z=3}var I=d;d=z;try{return F()}finally{d=I}},e.unstable_scheduleCallback=function(z,F,I){var te=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?te+I:te):I=te,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=I+R,z={id:u++,callback:F,priorityLevel:z,startTime:I,expirationTime:R,sortIndex:-1},I>te?(z.sortIndex=I,t(c,z),n(l)===null&&z===n(c)&&(b?(y(T),T=-1):b=!0,G(A,I-te))):(z.sortIndex=R,t(l,z),p||h||(p=!0,E||(E=!0,L()))),z},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(z){var F=d;return function(){var I=d;d=F;try{return z.apply(this,arguments)}finally{d=I}}}})(ZD);WD.exports=ZD;var nw=WD.exports,ez={exports:{}},qn={};/**
|
|
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 M9=w;function tz(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 sa(){}var Pn={d:{f:sa,r:function(){throw Error(tz(522))},D:sa,C:sa,L:sa,m:sa,X:sa,S:sa,M:sa},p:0,findDOMNode:null},N9=Symbol.for("react.portal");function D9(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:N9,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var ud=M9.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function eb(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}qn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Pn;qn.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(tz(299));return D9(e,t,null,n)};qn.flushSync=function(e){var t=ud.T,n=Pn.p;try{if(ud.T=null,Pn.p=2,e)return e()}finally{ud.T=t,Pn.p=n,Pn.d.f()}};qn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Pn.d.C(e,t))};qn.prefetchDNS=function(e){typeof e=="string"&&Pn.d.D(e)};qn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=eb(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,s=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Pn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:s}):n==="script"&&Pn.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:s,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};qn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=eb(t.as,t.crossOrigin);Pn.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&&Pn.d.M(e)};qn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=eb(n,t.crossOrigin);Pn.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})}};qn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=eb(t.as,t.crossOrigin);Pn.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 Pn.d.m(e)};qn.requestFormReset=function(e){Pn.d.r(e)};qn.unstable_batchedUpdates=function(e,t){return e(t)};qn.useFormState=function(e,t,n){return ud.H.useFormState(e,t,n)};qn.useFormStatus=function(){return ud.H.useHostTransitionStatus()};qn.version="19.2.4";function nz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(nz)}catch(e){console.error(e)}}nz(),ez.exports=qn;var Lu=ez.exports;const z9=Dh(Lu);/**
|
|
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 Xt=nw,rz=w,I9=Lu;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 iz(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function zh(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 sz(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 az(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 MT(e){if(zh(e)!==e)throw Error(P(188))}function $9(e){var t=e.alternate;if(!t){if(t=zh(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 MT(i),e;if(s===r)return MT(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 oz(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=oz(e),t!==null)return t;e=e.sibling}return null}var gt=Object.assign,L9=Symbol.for("react.element"),Dm=Symbol.for("react.transitional.element"),Qf=Symbol.for("react.portal"),gc=Symbol.for("react.fragment"),lz=Symbol.for("react.strict_mode"),rw=Symbol.for("react.profiler"),cz=Symbol.for("react.consumer"),Cs=Symbol.for("react.context"),hx=Symbol.for("react.forward_ref"),iw=Symbol.for("react.suspense"),sw=Symbol.for("react.suspense_list"),mx=Symbol.for("react.memo"),fa=Symbol.for("react.lazy"),aw=Symbol.for("react.activity"),F9=Symbol.for("react.memo_cache_sentinel"),NT=Symbol.iterator;function Af(e){return e===null||typeof e!="object"?null:(e=NT&&e[NT]||e["@@iterator"],typeof e=="function"?e:null)}var j9=Symbol.for("react.client.reference");function ow(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===j9?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case gc:return"Fragment";case rw:return"Profiler";case lz:return"StrictMode";case iw:return"Suspense";case sw:return"SuspenseList";case aw:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Qf:return"Portal";case Cs:return e.displayName||"Context";case cz:return(e._context.displayName||"Context")+".Consumer";case hx:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case mx:return t=e.displayName||null,t!==null?t:ow(e.type)||"Memo";case fa:t=e._payload,e=e._init;try{return ow(e(t))}catch{}}return null}var Xf=Array.isArray,ye=rz.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ge=I9.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Go={pending:!1,data:null,method:null,action:null},lw=[],yc=-1;function ts(e){return{current:e}}function on(e){0>yc||(e.current=lw[yc],lw[yc]=null,yc--)}function ut(e,t){yc++,lw[yc]=e.current,e.current=t}var Hi=ts(null),Hd=ts(null),Ta=ts(null),lg=ts(null);function cg(e,t){switch(ut(Ta,t),ut(Hd,e),ut(Hi,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?FA(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=FA(t),e=O$(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}on(Hi),ut(Hi,e)}function tu(){on(Hi),on(Hd),on(Ta)}function cw(e){e.memoizedState!==null&&ut(lg,e);var t=Hi.current,n=O$(t,e.type);t!==n&&(ut(Hd,e),ut(Hi,n))}function ug(e){Hd.current===e&&(on(Hi),on(Hd)),lg.current===e&&(on(lg),eh._currentValue=Go)}var rS,DT;function No(e){if(rS===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);rS=t&&t[1]||"",DT=-1<n.stack.indexOf(`
|
|
42
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
+
`+rS+e+DT}var iS=!1;function sS(e,t){if(!e||iS)return"";iS=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(h){var d=h}Reflect.construct(e,[],f)}else{try{f.call()}catch(h){d=h}e.call(f.prototype)}}else{try{throw Error()}catch(h){d=h}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(h){if(h&&d&&typeof h.stack=="string")return[h.stack,d.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var 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 u=`
|
|
46
|
+
`+l[r].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=r&&0<=i);break}}}finally{iS=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?No(n):""}function P9(e,t){switch(e.tag){case 26:case 27:case 5:return No(e.type);case 16:return No("Lazy");case 13:return e.child!==t&&t!==null?No("Suspense Fallback"):No("Suspense");case 19:return No("SuspenseList");case 0:case 15:return sS(e.type,!1);case 11:return sS(e.type.render,!1);case 1:return sS(e.type,!0);case 31:return No("Activity");default:return""}}function zT(e){try{var t="",n=null;do t+=P9(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
47
|
+
Error generating stack: `+r.message+`
|
|
48
|
+
`+r.stack}}var uw=Object.prototype.hasOwnProperty,px=Xt.unstable_scheduleCallback,aS=Xt.unstable_cancelCallback,U9=Xt.unstable_shouldYield,B9=Xt.unstable_requestPaint,gr=Xt.unstable_now,H9=Xt.unstable_getCurrentPriorityLevel,uz=Xt.unstable_ImmediatePriority,fz=Xt.unstable_UserBlockingPriority,fg=Xt.unstable_NormalPriority,q9=Xt.unstable_LowPriority,dz=Xt.unstable_IdlePriority,V9=Xt.log,K9=Xt.unstable_setDisableYieldValue,Ih=null,yr=null;function ba(e){if(typeof V9=="function"&&K9(e),yr&&typeof yr.setStrictMode=="function")try{yr.setStrictMode(Ih,e)}catch{}}var br=Math.clz32?Math.clz32:J9,G9=Math.log,Y9=Math.LN2;function J9(e){return e>>>=0,e===0?32:31-(G9(e)/Y9|0)|0}var zm=256,Im=262144,$m=4194304;function Do(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 tb(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=Do(r):(a&=o,a!==0?i=Do(a):n||(n=o&~e,n!==0&&(i=Do(n))))):(o=r&~s,o!==0?i=Do(o):a!==0?i=Do(a):n||(n=r&~e,n!==0&&(i=Do(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 $h(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Q9(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 hz(){var e=$m;return $m<<=1,!($m&62914560)&&($m=4194304),e}function oS(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Lh(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function X9(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 u=31-br(n),f=1<<u;o[u]=0,l[u]=-1;var d=c[u];if(d!==null)for(c[u]=null,u=0;u<d.length;u++){var h=d[u];h!==null&&(h.lane&=-536870913)}n&=~f}r!==0&&mz(e,r,0),s!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=s&~(a&~t))}function mz(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-br(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function pz(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-br(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function gz(e,t){var n=t&-t;return n=n&42?1:gx(n),n&(e.suspendedLanes|t)?0:n}function gx(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 yx(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function yz(){var e=Ge.p;return e!==0?e:(e=window.event,e===void 0?32:P$(e.type))}function IT(e,t){var n=Ge.p;try{return Ge.p=e,t()}finally{Ge.p=n}}var fo=Math.random().toString(36).slice(2),yn="__reactFiber$"+fo,tr="__reactProps$"+fo,Fu="__reactContainer$"+fo,fw="__reactEvents$"+fo,W9="__reactListeners$"+fo,Z9="__reactHandles$"+fo,$T="__reactResources$"+fo,Fh="__reactMarker$"+fo;function bx(e){delete e[yn],delete e[tr],delete e[fw],delete e[W9],delete e[Z9]}function bc(e){var t=e[yn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Fu]||n[yn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=HA(e);e!==null;){if(n=e[yn])return n;e=HA(e)}return t}e=n,n=e.parentNode}return null}function ju(e){if(e=e[yn]||e[Fu]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Wf(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(P(33))}function zc(e){var t=e[$T];return t||(t=e[$T]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function an(e){e[Fh]=!0}var bz=new Set,vz={};function Rl(e,t){nu(e,t),nu(e+"Capture",t)}function nu(e,t){for(vz[e]=t,e=0;e<t.length;e++)bz.add(t[e])}var e8=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]*$"),LT={},FT={};function t8(e){return uw.call(FT,e)?!0:uw.call(LT,e)?!1:e8.test(e)?FT[e]=!0:(LT[e]=!0,!1)}function vp(e,t,n){if(t8(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 Lm(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 us(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 Dr(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Sz(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function n8(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 dw(e){if(!e._valueTracker){var t=Sz(e)?"checked":"value";e._valueTracker=n8(e,t,""+e[t])}}function wz(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Sz(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function dg(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 r8=/[\n"\\]/g;function Fr(e){return e.replace(r8,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function hw(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=""+Dr(t)):e.value!==""+Dr(t)&&(e.value=""+Dr(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?mw(e,a,Dr(t)):n!=null?mw(e,a,Dr(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=""+Dr(o):e.removeAttribute("name")}function _z(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)){dw(e);return}n=n!=null?""+Dr(n):"",t=t!=null?""+Dr(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),dw(e)}function mw(e,t,n){t==="number"&&dg(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Ic(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=""+Dr(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 xz(e,t,n){if(t!=null&&(t=""+Dr(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Dr(n):""}function kz(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(P(92));if(Xf(r)){if(1<r.length)throw Error(P(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Dr(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),dw(e)}function ru(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var i8=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 jT(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||i8.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Ez(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&&jT(e,i,r)}else for(var s in t)t.hasOwnProperty(s)&&jT(e,s,t[s])}function vx(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 s8=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"]]),a8=/^[\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 Sp(e){return a8.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ts(){}var pw=null;function Sx(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var vc=null,$c=null;function PT(e){var t=ju(e);if(t&&(e=t.stateNode)){var n=e[tr]||null;e:switch(e=t.stateNode,t.type){case"input":if(hw(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="'+Fr(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[tr]||null;if(!i)throw Error(P(90));hw(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&&wz(r)}break e;case"textarea":xz(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ic(e,!!n.multiple,t,!1)}}}var lS=!1;function Cz(e,t,n){if(lS)return e(t,n);lS=!0;try{var r=e(t);return r}finally{if(lS=!1,(vc!==null||$c!==null)&&(hb(),vc&&(t=vc,e=$c,$c=vc=null,PT(t),e)))for(t=0;t<e.length;t++)PT(e[t])}}function qd(e,t){var n=e.stateNode;if(n===null)return null;var r=n[tr]||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 Fs=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),gw=!1;if(Fs)try{var Of={};Object.defineProperty(Of,"passive",{get:function(){gw=!0}}),window.addEventListener("test",Of,Of),window.removeEventListener("test",Of,Of)}catch{gw=!1}var va=null,wx=null,wp=null;function Tz(){if(wp)return wp;var e,t=wx,n=t.length,r,i="value"in va?va.value:va.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 wp=i.slice(e,1<r?1-r:void 0)}function _p(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 Fm(){return!0}function UT(){return!1}function rr(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)?Fm:UT,this.isPropagationStopped=UT,this}return gt(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=Fm)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Fm)},persist:function(){},isPersistent:Fm}),t}var Ml={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},nb=rr(Ml),jh=gt({},Ml,{view:0,detail:0}),o8=rr(jh),cS,uS,Rf,rb=gt({},jh,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_x,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!==Rf&&(Rf&&e.type==="mousemove"?(cS=e.screenX-Rf.screenX,uS=e.screenY-Rf.screenY):uS=cS=0,Rf=e),cS)},movementY:function(e){return"movementY"in e?e.movementY:uS}}),BT=rr(rb),l8=gt({},rb,{dataTransfer:0}),c8=rr(l8),u8=gt({},jh,{relatedTarget:0}),fS=rr(u8),f8=gt({},Ml,{animationName:0,elapsedTime:0,pseudoElement:0}),d8=rr(f8),h8=gt({},Ml,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),m8=rr(h8),p8=gt({},Ml,{data:0}),HT=rr(p8),g8={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},y8={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"},b8={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function v8(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=b8[e])?!!t[e]:!1}function _x(){return v8}var S8=gt({},jh,{key:function(e){if(e.key){var t=g8[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_p(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?y8[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_x,charCode:function(e){return e.type==="keypress"?_p(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_p(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),w8=rr(S8),_8=gt({},rb,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qT=rr(_8),x8=gt({},jh,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_x}),k8=rr(x8),E8=gt({},Ml,{propertyName:0,elapsedTime:0,pseudoElement:0}),C8=rr(E8),T8=gt({},rb,{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}),A8=rr(T8),O8=gt({},Ml,{newState:0,oldState:0}),R8=rr(O8),M8=[9,13,27,32],xx=Fs&&"CompositionEvent"in window,fd=null;Fs&&"documentMode"in document&&(fd=document.documentMode);var N8=Fs&&"TextEvent"in window&&!fd,Az=Fs&&(!xx||fd&&8<fd&&11>=fd),VT=" ",KT=!1;function Oz(e,t){switch(e){case"keyup":return M8.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rz(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sc=!1;function D8(e,t){switch(e){case"compositionend":return Rz(t);case"keypress":return t.which!==32?null:(KT=!0,VT);case"textInput":return e=t.data,e===VT&&KT?null:e;default:return null}}function z8(e,t){if(Sc)return e==="compositionend"||!xx&&Oz(e,t)?(e=Tz(),wp=wx=va=null,Sc=!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 Az&&t.locale!=="ko"?null:t.data;default:return null}}var I8={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 GT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!I8[e.type]:t==="textarea"}function Mz(e,t,n,r){vc?$c?$c.push(r):$c=[r]:vc=r,t=Rg(t,"onChange"),0<t.length&&(n=new nb("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var dd=null,Vd=null;function $8(e){C$(e,0)}function ib(e){var t=Wf(e);if(wz(t))return e}function YT(e,t){if(e==="change")return t}var Nz=!1;if(Fs){var dS;if(Fs){var hS="oninput"in document;if(!hS){var JT=document.createElement("div");JT.setAttribute("oninput","return;"),hS=typeof JT.oninput=="function"}dS=hS}else dS=!1;Nz=dS&&(!document.documentMode||9<document.documentMode)}function QT(){dd&&(dd.detachEvent("onpropertychange",Dz),Vd=dd=null)}function Dz(e){if(e.propertyName==="value"&&ib(Vd)){var t=[];Mz(t,Vd,e,Sx(e)),Cz($8,t)}}function L8(e,t,n){e==="focusin"?(QT(),dd=t,Vd=n,dd.attachEvent("onpropertychange",Dz)):e==="focusout"&&QT()}function F8(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ib(Vd)}function j8(e,t){if(e==="click")return ib(t)}function P8(e,t){if(e==="input"||e==="change")return ib(t)}function U8(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Er=typeof Object.is=="function"?Object.is:U8;function Kd(e,t){if(Er(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(!uw.call(t,i)||!Er(e[i],t[i]))return!1}return!0}function XT(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function WT(e,t){var n=XT(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=XT(n)}}function zz(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zz(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Iz(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=dg(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=dg(e.document)}return t}function kx(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 B8=Fs&&"documentMode"in document&&11>=document.documentMode,wc=null,yw=null,hd=null,bw=!1;function ZT(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;bw||wc==null||wc!==dg(r)||(r=wc,"selectionStart"in r&&kx(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}),hd&&Kd(hd,r)||(hd=r,r=Rg(yw,"onSelect"),0<r.length&&(t=new nb("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=wc)))}function To(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var _c={animationend:To("Animation","AnimationEnd"),animationiteration:To("Animation","AnimationIteration"),animationstart:To("Animation","AnimationStart"),transitionrun:To("Transition","TransitionRun"),transitionstart:To("Transition","TransitionStart"),transitioncancel:To("Transition","TransitionCancel"),transitionend:To("Transition","TransitionEnd")},mS={},$z={};Fs&&($z=document.createElement("div").style,"AnimationEvent"in window||(delete _c.animationend.animation,delete _c.animationiteration.animation,delete _c.animationstart.animation),"TransitionEvent"in window||delete _c.transitionend.transition);function Nl(e){if(mS[e])return mS[e];if(!_c[e])return e;var t=_c[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $z)return mS[e]=t[n];return e}var Lz=Nl("animationend"),Fz=Nl("animationiteration"),jz=Nl("animationstart"),H8=Nl("transitionrun"),q8=Nl("transitionstart"),V8=Nl("transitioncancel"),Pz=Nl("transitionend"),Uz=new Map,vw="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(" ");vw.push("scrollEnd");function Ei(e,t){Uz.set(e,t),Rl(t,[e])}var hg=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)},Nr=[],xc=0,Ex=0;function sb(){for(var e=xc,t=Ex=xc=0;t<e;){var n=Nr[t];Nr[t++]=null;var r=Nr[t];Nr[t++]=null;var i=Nr[t];Nr[t++]=null;var s=Nr[t];if(Nr[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&&Bz(n,i,s)}}function ab(e,t,n,r){Nr[xc++]=e,Nr[xc++]=t,Nr[xc++]=n,Nr[xc++]=r,Ex|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Cx(e,t,n,r){return ab(e,t,n,r),mg(e)}function Dl(e,t){return ab(e,null,null,t),mg(e)}function Bz(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-br(n),e=s.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),s):null}function mg(e){if(50<_d)throw _d=0,Pw=null,Error(P(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var kc={};function K8(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 hr(e,t,n,r){return new K8(e,t,n,r)}function Tx(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ds(e,t){var n=e.alternate;return n===null?(n=hr(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 Hz(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 xp(e,t,n,r,i,s){var a=0;if(r=e,typeof e=="function")Tx(e)&&(a=1);else if(typeof e=="string")a=Xq(e,n,Hi.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case aw:return e=hr(31,n,t,i),e.elementType=aw,e.lanes=s,e;case gc:return Yo(n.children,i,s,t);case lz:a=8,i|=24;break;case rw:return e=hr(12,n,t,i|2),e.elementType=rw,e.lanes=s,e;case iw:return e=hr(13,n,t,i),e.elementType=iw,e.lanes=s,e;case sw:return e=hr(19,n,t,i),e.elementType=sw,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Cs:a=10;break e;case cz:a=9;break e;case hx:a=11;break e;case mx:a=14;break e;case fa:a=16,r=null;break e}a=29,n=Error(P(130,e===null?"null":typeof e,"")),r=null}return t=hr(a,n,t,i),t.elementType=e,t.type=r,t.lanes=s,t}function Yo(e,t,n,r){return e=hr(7,e,r,t),e.lanes=n,e}function pS(e,t,n){return e=hr(6,e,null,t),e.lanes=n,e}function qz(e){var t=hr(18,null,null,0);return t.stateNode=e,t}function gS(e,t,n){return t=hr(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var eA=new WeakMap;function jr(e,t){if(typeof e=="object"&&e!==null){var n=eA.get(e);return n!==void 0?n:(t={value:e,source:t,stack:zT(t)},eA.set(e,t),t)}return{value:e,source:t,stack:zT(t)}}var Ec=[],Cc=0,pg=null,Gd=0,zr=[],Ir=0,Ga=null,zi=1,Ii="";function ws(e,t){Ec[Cc++]=Gd,Ec[Cc++]=pg,pg=e,Gd=t}function Vz(e,t,n){zr[Ir++]=zi,zr[Ir++]=Ii,zr[Ir++]=Ga,Ga=e;var r=zi;e=Ii;var i=32-br(r)-1;r&=~(1<<i),n+=1;var s=32-br(t)+i;if(30<s){var a=i-i%5;s=(r&(1<<a)-1).toString(32),r>>=a,i-=a,zi=1<<32-br(t)+i|n<<i|r,Ii=s+e}else zi=1<<s|n<<i|r,Ii=e}function Ax(e){e.return!==null&&(ws(e,1),Vz(e,1,0))}function Ox(e){for(;e===pg;)pg=Ec[--Cc],Ec[Cc]=null,Gd=Ec[--Cc],Ec[Cc]=null;for(;e===Ga;)Ga=zr[--Ir],zr[Ir]=null,Ii=zr[--Ir],zr[Ir]=null,zi=zr[--Ir],zr[Ir]=null}function Kz(e,t){zr[Ir++]=zi,zr[Ir++]=Ii,zr[Ir++]=Ga,zi=t.id,Ii=t.overflow,Ga=e}var bn=null,dt=null,je=!1,Aa=null,Pr=!1,Sw=Error(P(519));function Ya(e){var t=Error(P(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Yd(jr(t,e)),Sw}function tA(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yn]=e,t[tr]=r,n){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(n=0;n<Wd.length;n++)Ne(Wd[n],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),_z(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),kz(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||A$(t.textContent,n)?(r.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),r.onScroll!=null&&Ne("scroll",t),r.onScrollEnd!=null&&Ne("scrollend",t),r.onClick!=null&&(t.onclick=Ts),t=!0):t=!1,t||Ya(e,!0)}function nA(e){for(bn=e.return;bn;)switch(bn.tag){case 5:case 31:case 13:Pr=!1;return;case 27:case 3:Pr=!0;return;default:bn=bn.return}}function Gl(e){if(e!==bn)return!1;if(!je)return nA(e),je=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Vw(e.type,e.memoizedProps)),n=!n),n&&dt&&Ya(e),nA(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));dt=BA(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(P(317));dt=BA(e)}else t===27?(t=dt,ho(e.type)?(e=Jw,Jw=null,dt=e):dt=t):dt=bn?Kr(e.stateNode.nextSibling):null;return!0}function il(){dt=bn=null,je=!1}function yS(){var e=Aa;return e!==null&&(Qn===null?Qn=e:Qn.push.apply(Qn,e),Aa=null),e}function Yd(e){Aa===null?Aa=[e]:Aa.push(e)}var ww=ts(null),zl=null,As=null;function ma(e,t,n){ut(ww,t._currentValue),t._currentValue=n}function zs(e){e._currentValue=ww.current,on(ww)}function _w(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 xw(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),_w(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),_w(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 Pu(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;Er(i.pendingProps.value,a.value)||(e!==null?e.push(o):e=[o])}}else if(i===lg.current){if(a=i.alternate,a===null)throw Error(P(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(eh):e=[eh])}i=i.return}e!==null&&xw(t,e,n,r),t.flags|=262144}function gg(e){for(e=e.firstContext;e!==null;){if(!Er(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function sl(e){zl=e,As=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function wn(e){return Gz(zl,e)}function jm(e,t){return zl===null&&sl(e),Gz(e,t)}function Gz(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},As===null){if(e===null)throw Error(P(308));As=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else As=As.next=t;return n}var G8=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()})}},Y8=Xt.unstable_scheduleCallback,J8=Xt.unstable_NormalPriority,Pt={$$typeof:Cs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rx(){return{controller:new G8,data:new Map,refCount:0}}function Ph(e){e.refCount--,e.refCount===0&&Y8(J8,function(){e.controller.abort()})}var md=null,kw=0,iu=0,Lc=null;function Q8(e,t){if(md===null){var n=md=[];kw=0,iu=tk(),Lc={status:"pending",value:void 0,then:function(r){n.push(r)}}}return kw++,t.then(rA,rA),t}function rA(){if(--kw===0&&md!==null){Lc!==null&&(Lc.status="fulfilled");var e=md;md=null,iu=0,Lc=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function X8(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 iA=ye.S;ye.S=function(e,t){o$=gr(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Q8(e,t),iA!==null&&iA(e,t)};var Jo=ts(null);function Mx(){var e=Jo.current;return e!==null?e:ot.pooledCache}function kp(e,t){t===null?ut(Jo,Jo.current):ut(Jo,t.pool)}function Yz(){var e=Mx();return e===null?null:{parent:Pt._currentValue,pool:e}}var Uu=Error(P(460)),Nx=Error(P(474)),ob=Error(P(542)),yg={then:function(){}};function sA(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jz(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ts,Ts),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,oA(e),e;default:if(typeof t.status=="string")t.then(Ts,Ts);else{if(e=ot,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,oA(e),e}throw Qo=t,Uu}}function zo(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Qo=n,Uu):n}}var Qo=null;function aA(){if(Qo===null)throw Error(P(459));var e=Qo;return Qo=null,e}function oA(e){if(e===Uu||e===ob)throw Error(P(483))}var Fc=null,Jd=0;function Pm(e){var t=Jd;return Jd+=1,Fc===null&&(Fc=[]),Jz(Fc,e,t)}function Mf(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Um(e,t){throw t.$$typeof===L9?Error(P(525)):(e=Object.prototype.toString.call(t),Error(P(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Qz(e){function t(m,y){if(e){var v=m.deletions;v===null?(m.deletions=[y],m.flags|=16):v.push(y)}}function n(m,y){if(!e)return null;for(;y!==null;)t(m,y),y=y.sibling;return null}function r(m){for(var y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function i(m,y){return m=Ds(m,y),m.index=0,m.sibling=null,m}function s(m,y,v){return m.index=v,e?(v=m.alternate,v!==null?(v=v.index,v<y?(m.flags|=67108866,y):v):(m.flags|=67108866,y)):(m.flags|=1048576,y)}function a(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function o(m,y,v,_){return y===null||y.tag!==6?(y=pS(v,m.mode,_),y.return=m,y):(y=i(y,v),y.return=m,y)}function l(m,y,v,_){var A=v.type;return A===gc?u(m,y,v.props.children,_,v.key):y!==null&&(y.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===fa&&zo(A)===y.type)?(y=i(y,v.props),Mf(y,v),y.return=m,y):(y=xp(v.type,v.key,v.props,null,m.mode,_),Mf(y,v),y.return=m,y)}function c(m,y,v,_){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=gS(v,m.mode,_),y.return=m,y):(y=i(y,v.children||[]),y.return=m,y)}function u(m,y,v,_,A){return y===null||y.tag!==7?(y=Yo(v,m.mode,_,A),y.return=m,y):(y=i(y,v),y.return=m,y)}function f(m,y,v){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=pS(""+y,m.mode,v),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Dm:return v=xp(y.type,y.key,y.props,null,m.mode,v),Mf(v,y),v.return=m,v;case Qf:return y=gS(y,m.mode,v),y.return=m,y;case fa:return y=zo(y),f(m,y,v)}if(Xf(y)||Af(y))return y=Yo(y,m.mode,v,null),y.return=m,y;if(typeof y.then=="function")return f(m,Pm(y),v);if(y.$$typeof===Cs)return f(m,jm(m,y),v);Um(m,y)}return null}function d(m,y,v,_){var A=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return A!==null?null:o(m,y,""+v,_);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Dm:return v.key===A?l(m,y,v,_):null;case Qf:return v.key===A?c(m,y,v,_):null;case fa:return v=zo(v),d(m,y,v,_)}if(Xf(v)||Af(v))return A!==null?null:u(m,y,v,_,null);if(typeof v.then=="function")return d(m,y,Pm(v),_);if(v.$$typeof===Cs)return d(m,y,jm(m,v),_);Um(m,v)}return null}function h(m,y,v,_,A){if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return m=m.get(v)||null,o(y,m,""+_,A);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Dm:return m=m.get(_.key===null?v:_.key)||null,l(y,m,_,A);case Qf:return m=m.get(_.key===null?v:_.key)||null,c(y,m,_,A);case fa:return _=zo(_),h(m,y,v,_,A)}if(Xf(_)||Af(_))return m=m.get(v)||null,u(y,m,_,A,null);if(typeof _.then=="function")return h(m,y,v,Pm(_),A);if(_.$$typeof===Cs)return h(m,y,v,jm(y,_),A);Um(y,_)}return null}function p(m,y,v,_){for(var A=null,E=null,T=y,N=y=0,D=null;T!==null&&N<v.length;N++){T.index>N?(D=T,T=null):D=T.sibling;var M=d(m,T,v[N],_);if(M===null){T===null&&(T=D);break}e&&T&&M.alternate===null&&t(m,T),y=s(M,y,N),E===null?A=M:E.sibling=M,E=M,T=D}if(N===v.length)return n(m,T),je&&ws(m,N),A;if(T===null){for(;N<v.length;N++)T=f(m,v[N],_),T!==null&&(y=s(T,y,N),E===null?A=T:E.sibling=T,E=T);return je&&ws(m,N),A}for(T=r(T);N<v.length;N++)D=h(T,m,N,v[N],_),D!==null&&(e&&D.alternate!==null&&T.delete(D.key===null?N:D.key),y=s(D,y,N),E===null?A=D:E.sibling=D,E=D);return e&&T.forEach(function($){return t(m,$)}),je&&ws(m,N),A}function b(m,y,v,_){if(v==null)throw Error(P(151));for(var A=null,E=null,T=y,N=y=0,D=null,M=v.next();T!==null&&!M.done;N++,M=v.next()){T.index>N?(D=T,T=null):D=T.sibling;var $=d(m,T,M.value,_);if($===null){T===null&&(T=D);break}e&&T&&$.alternate===null&&t(m,T),y=s($,y,N),E===null?A=$:E.sibling=$,E=$,T=D}if(M.done)return n(m,T),je&&ws(m,N),A;if(T===null){for(;!M.done;N++,M=v.next())M=f(m,M.value,_),M!==null&&(y=s(M,y,N),E===null?A=M:E.sibling=M,E=M);return je&&ws(m,N),A}for(T=r(T);!M.done;N++,M=v.next())M=h(T,m,N,M.value,_),M!==null&&(e&&M.alternate!==null&&T.delete(M.key===null?N:M.key),y=s(M,y,N),E===null?A=M:E.sibling=M,E=M);return e&&T.forEach(function(L){return t(m,L)}),je&&ws(m,N),A}function S(m,y,v,_){if(typeof v=="object"&&v!==null&&v.type===gc&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Dm:e:{for(var A=v.key;y!==null;){if(y.key===A){if(A=v.type,A===gc){if(y.tag===7){n(m,y.sibling),_=i(y,v.props.children),_.return=m,m=_;break e}}else if(y.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===fa&&zo(A)===y.type){n(m,y.sibling),_=i(y,v.props),Mf(_,v),_.return=m,m=_;break e}n(m,y);break}else t(m,y);y=y.sibling}v.type===gc?(_=Yo(v.props.children,m.mode,_,v.key),_.return=m,m=_):(_=xp(v.type,v.key,v.props,null,m.mode,_),Mf(_,v),_.return=m,m=_)}return a(m);case Qf:e:{for(A=v.key;y!==null;){if(y.key===A)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(m,y.sibling),_=i(y,v.children||[]),_.return=m,m=_;break e}else{n(m,y);break}else t(m,y);y=y.sibling}_=gS(v,m.mode,_),_.return=m,m=_}return a(m);case fa:return v=zo(v),S(m,y,v,_)}if(Xf(v))return p(m,y,v,_);if(Af(v)){if(A=Af(v),typeof A!="function")throw Error(P(150));return v=A.call(v),b(m,y,v,_)}if(typeof v.then=="function")return S(m,y,Pm(v),_);if(v.$$typeof===Cs)return S(m,y,jm(m,v),_);Um(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,y!==null&&y.tag===6?(n(m,y.sibling),_=i(y,v),_.return=m,m=_):(n(m,y),_=pS(v,m.mode,_),_.return=m,m=_),a(m)):n(m,y)}return function(m,y,v,_){try{Jd=0;var A=S(m,y,v,_);return Fc=null,A}catch(T){if(T===Uu||T===ob)throw T;var E=hr(29,T,null,m.mode);return E.lanes=_,E.return=m,E}finally{}}}var al=Qz(!0),Xz=Qz(!1),da=!1;function Dx(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ew(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 Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ra(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ke&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=mg(e),Bz(e,null,n),t}return ab(e,r,t,n),mg(e)}function pd(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,pz(e,n)}}function bS(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 Cw=!1;function gd(){if(Cw){var e=Lc;if(e!==null)throw e}}function yd(e,t,n,r){Cw=!1;var i=e.updateQueue;da=!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 u=e.alternate;u!==null&&(u=u.updateQueue,o=u.lastBaseUpdate,o!==a&&(o===null?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l))}if(s!==null){var f=i.baseState;a=0,u=c=l=null,o=s;do{var d=o.lane&-536870913,h=d!==o.lane;if(h?(Ie&d)===d:(r&d)===d){d!==0&&d===iu&&(Cw=!0),u!==null&&(u=u.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var p=e,b=o;d=t;var S=n;switch(b.tag){case 1:if(p=b.payload,typeof p=="function"){f=p.call(S,f,d);break e}f=p;break e;case 3:p.flags=p.flags&-65537|128;case 0:if(p=b.payload,d=typeof p=="function"?p.call(S,f,d):p,d==null)break e;f=gt({},f,d);break e;case 2:da=!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},u===null?(c=u=h,l=f):u=u.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);u===null&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,s===null&&(i.shared.lanes=0),Qa|=a,e.lanes=a,e.memoizedState=f}}function Wz(e,t){if(typeof e!="function")throw Error(P(191,e));e.call(t)}function Zz(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Wz(n[e],t)}var su=ts(null),bg=ts(0);function lA(e,t){e=Bs,ut(bg,e),ut(su,t),Bs=e|t.baseLanes}function Tw(){ut(bg,Bs),ut(su,su.current)}function zx(){Bs=bg.current,on(su),on(bg)}var Cr=ts(null),Vr=null;function pa(e){var t=e.alternate;ut(Rt,Rt.current&1),ut(Cr,e),Vr===null&&(t===null||su.current!==null||t.memoizedState!==null)&&(Vr=e)}function Aw(e){ut(Rt,Rt.current),ut(Cr,e),Vr===null&&(Vr=e)}function eI(e){e.tag===22?(ut(Rt,Rt.current),ut(Cr,e),Vr===null&&(Vr=e)):ga()}function ga(){ut(Rt,Rt.current),ut(Cr,Cr.current)}function ur(e){on(Cr),Vr===e&&(Vr=null),on(Rt)}var Rt=ts(0);function vg(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Gw(n)||Yw(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 js=0,Ee=null,rt=null,Lt=null,Sg=!1,jc=!1,ol=!1,wg=0,Qd=0,Pc=null,W8=0;function _t(){throw Error(P(321))}function Ix(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Er(e[n],t[n]))return!1;return!0}function $x(e,t,n,r,i,s){return js=s,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ye.H=e===null||e.memoizedState===null?MI:Gx,ol=!1,s=n(r,i),ol=!1,jc&&(s=nI(t,n,r,i)),tI(e),s}function tI(e){ye.H=Xd;var t=rt!==null&&rt.next!==null;if(js=0,Lt=rt=Ee=null,Sg=!1,Qd=0,Pc=null,t)throw Error(P(300));e===null||Ht||(e=e.dependencies,e!==null&&gg(e)&&(Ht=!0))}function nI(e,t,n,r){Ee=e;var i=0;do{if(jc&&(Pc=null),Qd=0,jc=!1,25<=i)throw Error(P(301));if(i+=1,Lt=rt=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=NI,s=t(n,r)}while(jc);return s}function Z8(){var e=ye.H,t=e.useState()[0];return t=typeof t.then=="function"?Uh(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Ee.flags|=1024),t}function Lx(){var e=wg!==0;return wg=0,e}function Fx(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function jx(e){if(Sg){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Sg=!1}js=0,Lt=rt=Ee=null,jc=!1,Qd=wg=0,Pc=null}function In(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Lt===null?Ee.memoizedState=Lt=e:Lt=Lt.next=e,Lt}function Mt(){if(rt===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Lt===null?Ee.memoizedState:Lt.next;if(t!==null)Lt=t,rt=e;else{if(e===null)throw Ee.alternate===null?Error(P(467)):Error(P(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Lt===null?Ee.memoizedState=Lt=e:Lt=Lt.next=e}return Lt}function lb(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Uh(e){var t=Qd;return Qd+=1,Pc===null&&(Pc=[]),e=Jz(Pc,e,t),t=Ee,(Lt===null?t.memoizedState:Lt.next)===null&&(t=t.alternate,ye.H=t===null||t.memoizedState===null?MI:Gx),e}function cb(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Uh(e);if(e.$$typeof===Cs)return wn(e)}throw Error(P(438,String(e)))}function Px(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=lb(),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]=F9;return t.index++,n}function Ps(e,t){return typeof t=="function"?t(e):t}function Ep(e){var t=Mt();return Ux(t,rt,e)}function Ux(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,u=!1;do{var f=c.lane&-536870913;if(f!==c.lane?(Ie&f)===f:(js&f)===f){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}),f===iu&&(u=!0);else if((js&d)===d){c=c.next,d===iu&&(u=!0);continue}else f={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=f,a=s):l=l.next=f,Ee.lanes|=d,Qa|=d;f=c.action,ol&&n(s,f),s=c.hasEagerState?c.eagerState:n(s,f)}else d={lane:f,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|=f,Qa|=f;c=c.next}while(c!==null&&c!==t);if(l===null?a=s:l.next=o,!Er(s,e.memoizedState)&&(Ht=!0,u&&(n=Lc,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 vS(e){var t=Mt(),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);Er(s,t.memoizedState)||(Ht=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function rI(e,t,n){var r=Ee,i=Mt(),s=je;if(s){if(n===void 0)throw Error(P(407));n=n()}else n=t();var a=!Er((rt||i).memoizedState,n);if(a&&(i.memoizedState=n,Ht=!0),i=i.queue,Bx(aI.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||Lt!==null&&Lt.memoizedState.tag&1){if(r.flags|=2048,au(9,{destroy:void 0},sI.bind(null,r,i,n,t),null),ot===null)throw Error(P(349));s||js&127||iI(r,t,n)}return n}function iI(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t=lb(),Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function sI(e,t,n,r){t.value=n,t.getSnapshot=r,oI(t)&&lI(e)}function aI(e,t,n){return n(function(){oI(t)&&lI(e)})}function oI(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Er(e,n)}catch{return!0}}function lI(e){var t=Dl(e,2);t!==null&&er(t,e,2)}function Ow(e){var t=In();if(typeof e=="function"){var n=e;if(e=n(),ol){ba(!0);try{n()}finally{ba(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:e},t}function cI(e,t,n,r){return e.baseState=n,Ux(e,rt,typeof r=="function"?r:Ps)}function eq(e,t,n,r,i){if(fb(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,uI(t,s)):(s.next=n.next,t.pending=n.next=s)}}function uI(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),cA(e,t,o)}catch(c){Rw(e,t,c)}finally{s!==null&&a.types!==null&&(s.types=a.types),ye.T=s}}else try{s=n(i,r),cA(e,t,s)}catch(c){Rw(e,t,c)}}function cA(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){uA(e,t,r)},function(r){return Rw(e,t,r)}):uA(e,t,n)}function uA(e,t,n){t.status="fulfilled",t.value=n,fI(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,uI(e,n)))}function Rw(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,fI(t),t=t.next;while(t!==r)}e.action=null}function fI(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function dI(e,t){return t}function fA(e,t){if(je){var n=ot.formState;if(n!==null){e:{var r=Ee;if(je){if(dt){t:{for(var i=dt,s=Pr;i.nodeType!==8;){if(!s){i=null;break t}if(i=Kr(i.nextSibling),i===null){i=null;break t}}s=i.data,i=s==="F!"||s==="F"?i:null}if(i){dt=Kr(i.nextSibling),r=i.data==="F!";break e}}Ya(r)}r=!1}r&&(t=n[0])}}return n=In(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:dI,lastRenderedState:t},n.queue=r,n=AI.bind(null,Ee,r),r.dispatch=n,r=Ow(!1),s=Kx.bind(null,Ee,!1,r.queue),r=In(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=eq.bind(null,Ee,i,s,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function dA(e){var t=Mt();return hI(t,rt,e)}function hI(e,t,n){if(t=Ux(e,t,dI)[0],e=Ep(Ps)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Uh(t)}catch(a){throw a===Uu?ob:a}else r=t;t=Mt();var i=t.queue,s=i.dispatch;return n!==t.memoizedState&&(Ee.flags|=2048,au(9,{destroy:void 0},tq.bind(null,i,n),null)),[r,s,e]}function tq(e,t){e.action=t}function hA(e){var t=Mt(),n=rt;if(n!==null)return hI(t,n,e);Mt(),t=t.memoizedState,n=Mt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function au(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=lb(),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 mI(){return Mt().memoizedState}function Cp(e,t,n,r){var i=In();Ee.flags|=e,i.memoizedState=au(1|t,{destroy:void 0},n,r===void 0?null:r)}function ub(e,t,n,r){var i=Mt();r=r===void 0?null:r;var s=i.memoizedState.inst;rt!==null&&r!==null&&Ix(r,rt.memoizedState.deps)?i.memoizedState=au(t,s,n,r):(Ee.flags|=e,i.memoizedState=au(1|t,s,n,r))}function mA(e,t){Cp(8390656,8,e,t)}function Bx(e,t){ub(2048,8,e,t)}function nq(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=lb(),Ee.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function pI(e){var t=Mt().memoizedState;return nq({ref:t,nextImpl:e}),function(){if(Ke&2)throw Error(P(440));return t.impl.apply(void 0,arguments)}}function gI(e,t){return ub(4,2,e,t)}function yI(e,t){return ub(4,4,e,t)}function bI(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 vI(e,t,n){n=n!=null?n.concat([e]):null,ub(4,4,bI.bind(null,t,e),n)}function Hx(){}function SI(e,t){var n=Mt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ix(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function wI(e,t){var n=Mt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ix(t,r[1]))return r[0];if(r=e(),ol){ba(!0);try{e()}finally{ba(!1)}}return n.memoizedState=[r,t],r}function qx(e,t,n){return n===void 0||js&1073741824&&!(Ie&261930)?e.memoizedState=t:(e.memoizedState=n,e=c$(),Ee.lanes|=e,Qa|=e,n)}function _I(e,t,n,r){return Er(n,t)?n:su.current!==null?(e=qx(e,n,r),Er(e,t)||(Ht=!0),e):!(js&42)||js&1073741824&&!(Ie&261930)?(Ht=!0,e.memoizedState=n):(e=c$(),Ee.lanes|=e,Qa|=e,t)}function xI(e,t,n,r,i){var s=Ge.p;Ge.p=s!==0&&8>s?s:8;var a=ye.T,o={};ye.T=o,Kx(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 u=X8(l,r);bd(e,t,u,vr(e))}else bd(e,t,r,vr(e))}catch(f){bd(e,t,{then:function(){},status:"rejected",reason:f},vr())}finally{Ge.p=s,a!==null&&o.types!==null&&(a.types=o.types),ye.T=a}}function rq(){}function Mw(e,t,n,r){if(e.tag!==5)throw Error(P(476));var i=kI(e).queue;xI(e,i,t,Go,n===null?rq:function(){return EI(e),n(r)})}function kI(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Go,baseState:Go,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:Go},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ps,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function EI(e){var t=kI(e);t.next===null&&(t=e.alternate.memoizedState),bd(e,t.next.queue,{},vr())}function Vx(){return wn(eh)}function CI(){return Mt().memoizedState}function TI(){return Mt().memoizedState}function iq(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vr();e=Oa(n);var r=Ra(t,e,n);r!==null&&(er(r,t,n),pd(r,t,n)),t={cache:Rx()},e.payload=t;return}t=t.return}}function sq(e,t,n){var r=vr();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},fb(e)?OI(t,n):(n=Cx(e,t,n,r),n!==null&&(er(n,e,r),RI(n,t,r)))}function AI(e,t,n){var r=vr();bd(e,t,n,r)}function bd(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(fb(e))OI(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,Er(o,a))return ab(e,t,i,0),ot===null&&sb(),!1}catch{}finally{}if(n=Cx(e,t,i,r),n!==null)return er(n,e,r),RI(n,t,r),!0}return!1}function Kx(e,t,n,r){if(r={lane:2,revertLane:tk(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},fb(e)){if(t)throw Error(P(479))}else t=Cx(e,n,r,2),t!==null&&er(t,e,2)}function fb(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function OI(e,t){jc=Sg=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function RI(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pz(e,n)}}var Xd={readContext:wn,use:cb,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useLayoutEffect:_t,useInsertionEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useSyncExternalStore:_t,useId:_t,useHostTransitionStatus:_t,useFormState:_t,useActionState:_t,useOptimistic:_t,useMemoCache:_t,useCacheRefresh:_t};Xd.useEffectEvent=_t;var MI={readContext:wn,use:cb,useCallback:function(e,t){return In().memoizedState=[e,t===void 0?null:t],e},useContext:wn,useEffect:mA,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Cp(4194308,4,bI.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Cp(4194308,4,e,t)},useInsertionEffect:function(e,t){Cp(4,2,e,t)},useMemo:function(e,t){var n=In();t=t===void 0?null:t;var r=e();if(ol){ba(!0);try{e()}finally{ba(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=In();if(n!==void 0){var i=n(t);if(ol){ba(!0);try{n(t)}finally{ba(!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=sq.bind(null,Ee,e),[r.memoizedState,e]},useRef:function(e){var t=In();return e={current:e},t.memoizedState=e},useState:function(e){e=Ow(e);var t=e.queue,n=AI.bind(null,Ee,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Hx,useDeferredValue:function(e,t){var n=In();return qx(n,e,t)},useTransition:function(){var e=Ow(!1);return e=xI.bind(null,Ee,e.queue,!0,!1),In().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Ee,i=In();if(je){if(n===void 0)throw Error(P(407));n=n()}else{if(n=t(),ot===null)throw Error(P(349));Ie&127||iI(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,mA(aI.bind(null,r,s,e),[e]),r.flags|=2048,au(9,{destroy:void 0},sI.bind(null,r,s,n,t),null),n},useId:function(){var e=In(),t=ot.identifierPrefix;if(je){var n=Ii,r=zi;n=(r&~(1<<32-br(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=wg++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=W8++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vx,useFormState:fA,useActionState:fA,useOptimistic:function(e){var t=In();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Kx.bind(null,Ee,!0,n),n.dispatch=t,[e,t]},useMemoCache:Px,useCacheRefresh:function(){return In().memoizedState=iq.bind(null,Ee)},useEffectEvent:function(e){var t=In(),n={impl:e};return t.memoizedState=n,function(){if(Ke&2)throw Error(P(440));return n.impl.apply(void 0,arguments)}}},Gx={readContext:wn,use:cb,useCallback:SI,useContext:wn,useEffect:Bx,useImperativeHandle:vI,useInsertionEffect:gI,useLayoutEffect:yI,useMemo:wI,useReducer:Ep,useRef:mI,useState:function(){return Ep(Ps)},useDebugValue:Hx,useDeferredValue:function(e,t){var n=Mt();return _I(n,rt.memoizedState,e,t)},useTransition:function(){var e=Ep(Ps)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:Uh(e),t]},useSyncExternalStore:rI,useId:CI,useHostTransitionStatus:Vx,useFormState:dA,useActionState:dA,useOptimistic:function(e,t){var n=Mt();return cI(n,rt,e,t)},useMemoCache:Px,useCacheRefresh:TI};Gx.useEffectEvent=pI;var NI={readContext:wn,use:cb,useCallback:SI,useContext:wn,useEffect:Bx,useImperativeHandle:vI,useInsertionEffect:gI,useLayoutEffect:yI,useMemo:wI,useReducer:vS,useRef:mI,useState:function(){return vS(Ps)},useDebugValue:Hx,useDeferredValue:function(e,t){var n=Mt();return rt===null?qx(n,e,t):_I(n,rt.memoizedState,e,t)},useTransition:function(){var e=vS(Ps)[0],t=Mt().memoizedState;return[typeof e=="boolean"?e:Uh(e),t]},useSyncExternalStore:rI,useId:CI,useHostTransitionStatus:Vx,useFormState:hA,useActionState:hA,useOptimistic:function(e,t){var n=Mt();return rt!==null?cI(n,rt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Px,useCacheRefresh:TI};NI.useEffectEvent=pI;function SS(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:gt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Nw={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=vr(),i=Oa(r);i.payload=t,n!=null&&(i.callback=n),t=Ra(e,i,r),t!==null&&(er(t,e,r),pd(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=vr(),i=Oa(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ra(e,i,r),t!==null&&(er(t,e,r),pd(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vr(),r=Oa(n);r.tag=2,t!=null&&(r.callback=t),t=Ra(e,r,n),t!==null&&(er(t,e,n),pd(t,e,n))}};function pA(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?!Kd(n,r)||!Kd(i,s):!0}function gA(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&&Nw.enqueueReplaceState(t,t.state,null)}function ll(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=gt({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function DI(e){hg(e)}function zI(e){console.error(e)}function II(e){hg(e)}function _g(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function yA(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 Dw(e,t,n){return n=Oa(n),n.tag=3,n.payload={element:null},n.callback=function(){_g(e,t)},n}function $I(e){return e=Oa(e),e.tag=3,e}function LI(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(){yA(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){yA(t,n,r),typeof i!="function"&&(Ma===null?Ma=new Set([this]):Ma.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function aq(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Pu(t,n,i,!0),n=Cr.current,n!==null){switch(n.tag){case 31:case 13:return Vr===null?Tg():n.alternate===null&&kt===0&&(kt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===yg?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),MS(e,r,i)),!1;case 22:return n.flags|=65536,r===yg?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)),MS(e,r,i)),!1}throw Error(P(435,n.tag))}return MS(e,r,i),Tg(),!1}if(je)return t=Cr.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==Sw&&(e=Error(P(422),{cause:r}),Yd(jr(e,n)))):(r!==Sw&&(t=Error(P(423),{cause:r}),Yd(jr(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=jr(r,n),i=Dw(e.stateNode,r,i),bS(e,i),kt!==4&&(kt=2)),!1;var s=Error(P(520),{cause:r});if(s=jr(s,n),wd===null?wd=[s]:wd.push(s),kt!==4&&(kt=2),t===null)return!0;r=jr(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=Dw(n.stateNode,r,e),bS(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"&&(Ma===null||!Ma.has(s))))return n.flags|=65536,i&=-i,n.lanes|=i,i=$I(i),LI(i,e,n,r),bS(n,i),!1}n=n.return}while(n!==null);return!1}var Yx=Error(P(461)),Ht=!1;function dn(e,t,n,r){t.child=e===null?Xz(t,null,n,r):al(t,e.child,n,r)}function bA(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 sl(t),r=$x(e,t,n,a,s,i),o=Lx(),e!==null&&!Ht?(Fx(e,t,i),Us(e,t,i)):(je&&o&&Ax(t),t.flags|=1,dn(e,t,r,i),t.child)}function vA(e,t,n,r,i){if(e===null){var s=n.type;return typeof s=="function"&&!Tx(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,FI(e,t,s,r,i)):(e=xp(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!Jx(e,i)){var a=s.memoizedProps;if(n=n.compare,n=n!==null?n:Kd,n(a,r)&&e.ref===t.ref)return Us(e,t,i)}return t.flags|=1,e=Ds(s,r),e.ref=t.ref,e.return=t,t.child=e}function FI(e,t,n,r,i){if(e!==null){var s=e.memoizedProps;if(Kd(s,r)&&e.ref===t.ref)if(Ht=!1,t.pendingProps=r=s,Jx(e,i))e.flags&131072&&(Ht=!0);else return t.lanes=e.lanes,Us(e,t,i)}return zw(e,t,n,r,i)}function jI(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 SA(e,t,s,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&kp(t,s!==null?s.cachePool:null),s!==null?lA(t,s):Tw(),eI(t);else return r=t.lanes=536870912,SA(e,t,s!==null?s.baseLanes|n:n,n,r)}else s!==null?(kp(t,s.cachePool),lA(t,s),ga(),t.memoizedState=null):(e!==null&&kp(t,null),Tw(),ga());return dn(e,t,i,n),t.child}function Zf(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function SA(e,t,n,r,i){var s=Mx();return s=s===null?null:{parent:Pt._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&kp(t,null),Tw(),eI(t),e!==null&&Pu(e,t,r,!0),t.childLanes=i,null}function Tp(e,t){return t=xg({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function wA(e,t,n){return al(t,e.child,null,n),e=Tp(t,t.pendingProps),e.flags|=2,ur(t),t.memoizedState=null,e}function oq(e,t,n){var r=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(je){if(r.mode==="hidden")return e=Tp(t,r),t.lanes=536870912,Zf(null,e);if(Aw(t),(e=dt)?(e=M$(e,Pr),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:zi,overflow:Ii}:null,retryLane:536870912,hydrationErrors:null},n=qz(e),n.return=t,t.child=n,bn=t,dt=null)):e=null,e===null)throw Ya(t);return t.lanes=536870912,null}return Tp(t,r)}var s=e.memoizedState;if(s!==null){var a=s.dehydrated;if(Aw(t),i)if(t.flags&256)t.flags&=-257,t=wA(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(P(558));else if(Ht||Pu(e,t,n,!1),i=(n&e.childLanes)!==0,Ht||i){if(r=ot,r!==null&&(a=gz(r,n),a!==0&&a!==s.retryLane))throw s.retryLane=a,Dl(e,a),er(r,e,a),Yx;Tg(),t=wA(e,t,n)}else e=s.treeContext,dt=Kr(a.nextSibling),bn=t,je=!0,Aa=null,Pr=!1,e!==null&&Kz(t,e),t=Tp(t,r),t.flags|=4096;return t}return e=Ds(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ap(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 zw(e,t,n,r,i){return sl(t),n=$x(e,t,n,r,void 0,i),r=Lx(),e!==null&&!Ht?(Fx(e,t,i),Us(e,t,i)):(je&&r&&Ax(t),t.flags|=1,dn(e,t,n,i),t.child)}function _A(e,t,n,r,i,s){return sl(t),t.updateQueue=null,n=nI(t,r,n,i),tI(e),r=Lx(),e!==null&&!Ht?(Fx(e,t,s),Us(e,t,s)):(je&&r&&Ax(t),t.flags|=1,dn(e,t,n,s),t.child)}function xA(e,t,n,r,i){if(sl(t),t.stateNode===null){var s=kc,a=n.contextType;typeof a=="object"&&a!==null&&(s=wn(a)),s=new n(r,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Nw,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=r,s.state=t.memoizedState,s.refs={},Dx(t),a=n.contextType,s.context=typeof a=="object"&&a!==null?wn(a):kc,s.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(SS(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&&Nw.enqueueReplaceState(s,s.state,null),yd(t,r,s,i),gd(),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=ll(n,o);s.props=l;var c=s.context,u=n.contextType;a=kc,typeof u=="object"&&u!==null&&(a=wn(u));var f=n.getDerivedStateFromProps;u=typeof f=="function"||typeof s.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,u||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(o||c!==a)&&gA(t,s,r,a),da=!1;var d=t.memoizedState;s.state=d,yd(t,r,s,i),gd(),c=t.memoizedState,o||d!==c||da?(typeof f=="function"&&(SS(t,n,f,r),c=t.memoizedState),(l=da||pA(t,n,l,r,d,c,a))?(u||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,Ew(e,t),a=t.memoizedProps,u=ll(n,a),s.props=u,f=t.pendingProps,d=s.context,c=n.contextType,l=kc,typeof c=="object"&&c!==null&&(l=wn(c)),o=n.getDerivedStateFromProps,(c=typeof o=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(a!==f||d!==l)&&gA(t,s,r,l),da=!1,d=t.memoizedState,s.state=d,yd(t,r,s,i),gd();var h=t.memoizedState;a!==f||d!==h||da||e!==null&&e.dependencies!==null&&gg(e.dependencies)?(typeof o=="function"&&(SS(t,n,o,r),h=t.memoizedState),(u=da||pA(t,n,u,r,d,h,l)||e!==null&&e.dependencies!==null&&gg(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=u):(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,Ap(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=al(t,e.child,null,i),t.child=al(t,null,n,i)):dn(e,t,n,i),t.memoizedState=s.state,e=t.child):e=Us(e,t,i),e}function kA(e,t,n,r){return il(),t.flags|=256,dn(e,t,n,r),t.child}var wS={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _S(e){return{baseLanes:e,cachePool:Yz()}}function xS(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=pr),e}function PI(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:(Rt.current&2)!==0),a&&(i=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(je){if(i?pa(t):ga(),(e=dt)?(e=M$(e,Pr),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ga!==null?{id:zi,overflow:Ii}:null,retryLane:536870912,hydrationErrors:null},n=qz(e),n.return=t,t.child=n,bn=t,dt=null)):e=null,e===null)throw Ya(t);return Yw(e)?t.lanes=32:t.lanes=536870912,null}var o=r.children;return r=r.fallback,i?(ga(),i=t.mode,o=xg({mode:"hidden",children:o},i),r=Yo(r,i,n,null),o.return=t,r.return=t,o.sibling=r,t.child=o,r=t.child,r.memoizedState=_S(n),r.childLanes=xS(e,a,n),t.memoizedState=wS,Zf(null,r)):(pa(t),Iw(t,o))}var l=e.memoizedState;if(l!==null&&(o=l.dehydrated,o!==null)){if(s)t.flags&256?(pa(t),t.flags&=-257,t=kS(e,t,n)):t.memoizedState!==null?(ga(),t.child=e.child,t.flags|=128,t=null):(ga(),o=r.fallback,i=t.mode,r=xg({mode:"visible",children:r.children},i),o=Yo(o,i,n,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,al(t,e.child,null,n),r=t.child,r.memoizedState=_S(n),r.childLanes=xS(e,a,n),t.memoizedState=wS,t=Zf(null,r));else if(pa(t),Yw(o)){if(a=o.nextSibling&&o.nextSibling.dataset,a)var c=a.dgst;a=c,r=Error(P(419)),r.stack="",r.digest=a,Yd({value:r,source:null,stack:null}),t=kS(e,t,n)}else if(Ht||Pu(e,t,n,!1),a=(n&e.childLanes)!==0,Ht||a){if(a=ot,a!==null&&(r=gz(a,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,Dl(e,r),er(a,e,r),Yx;Gw(o)||Tg(),t=kS(e,t,n)}else Gw(o)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,dt=Kr(o.nextSibling),bn=t,je=!0,Aa=null,Pr=!1,e!==null&&Kz(t,e),t=Iw(t,r.children),t.flags|=4096);return t}return i?(ga(),o=r.fallback,i=t.mode,l=e.child,c=l.sibling,r=Ds(l,{mode:"hidden",children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,c!==null?o=Ds(c,o):(o=Yo(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,Zf(null,r),r=t.child,o=e.child.memoizedState,o===null?o=_S(n):(i=o.cachePool,i!==null?(l=Pt._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=Yz(),o={baseLanes:o.baseLanes|n,cachePool:i}),r.memoizedState=o,r.childLanes=xS(e,a,n),t.memoizedState=wS,Zf(e.child,r)):(pa(t),n=e.child,e=n.sibling,n=Ds(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 Iw(e,t){return t=xg({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function xg(e,t){return e=hr(22,e,null,t),e.lanes=0,e}function kS(e,t,n){return al(t,e.child,null,n),e=Iw(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function EA(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_w(e.return,t,n)}function ES(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 UI(e,t,n){var r=t.pendingProps,i=r.revealOrder,s=r.tail;r=r.children;var a=Rt.current,o=(a&2)!==0;if(o?(a=a&1|2,t.flags|=128):a&=1,ut(Rt,a),dn(e,t,r,n),r=je?Gd:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&EA(e,n,t);else if(e.tag===19)EA(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&&vg(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ES(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&&vg(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ES(t,!0,n,null,s,r);break;case"together":ES(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Us(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qa|=t.lanes,!(n&t.childLanes))if(e!==null){if(Pu(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=Ds(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ds(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Jx(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&gg(e)))}function lq(e,t,n){switch(t.tag){case 3:cg(t,t.stateNode.containerInfo),ma(t,Pt,e.memoizedState.cache),il();break;case 27:case 5:cw(t);break;case 4:cg(t,t.stateNode.containerInfo);break;case 10:ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Aw(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(pa(t),t.flags|=128,null):n&t.child.childLanes?PI(e,t,n):(pa(t),e=Us(e,t,n),e!==null?e.sibling:null);pa(t);break;case 19:var i=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Pu(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return UI(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),ut(Rt,Rt.current),r)break;return null;case 22:return t.lanes=0,jI(e,t,n,t.pendingProps);case 24:ma(t,Pt,e.memoizedState.cache)}return Us(e,t,n)}function BI(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ht=!0;else{if(!Jx(e,n)&&!(t.flags&128))return Ht=!1,lq(e,t,n);Ht=!!(e.flags&131072)}else Ht=!1,je&&t.flags&1048576&&Vz(t,Gd,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=zo(t.elementType),t.type=e,typeof e=="function")Tx(e)?(r=ll(e,r),t.tag=1,t=xA(null,t,e,r,n)):(t.tag=0,t=zw(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===hx){t.tag=11,t=bA(null,t,e,r,n);break e}else if(i===mx){t.tag=14,t=vA(null,t,e,r,n);break e}}throw t=ow(e)||e,Error(P(306,t,""))}}return t;case 0:return zw(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=ll(r,t.pendingProps),xA(e,t,r,i,n);case 3:e:{if(cg(t,t.stateNode.containerInfo),e===null)throw Error(P(387));r=t.pendingProps;var s=t.memoizedState;i=s.element,Ew(e,t),yd(t,r,null,n);var a=t.memoizedState;if(r=a.cache,ma(t,Pt,r),r!==s.cache&&xw(t,[Pt],n,!0),gd(),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=kA(e,t,r,n);break e}else if(r!==i){i=jr(Error(P(424)),t),Yd(i),t=kA(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(dt=Kr(e.firstChild),bn=t,je=!0,Aa=null,Pr=!0,n=Xz(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(il(),r===i){t=Us(e,t,n);break e}dn(e,t,r,n)}t=t.child}return t;case 26:return Ap(e,t),e===null?(n=VA(t.type,null,t.pendingProps,null))?t.memoizedState=n:je||(n=t.type,e=t.pendingProps,r=Mg(Ta.current).createElement(n),r[yn]=t,r[tr]=e,xn(r,n,e),an(r),t.stateNode=r):t.memoizedState=VA(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return cw(t),e===null&&je&&(r=t.stateNode=N$(t.type,t.pendingProps,Ta.current),bn=t,Pr=!0,i=dt,ho(t.type)?(Jw=i,dt=Kr(r.firstChild)):dt=i),dn(e,t,t.pendingProps.children,n),Ap(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&je&&((i=r=dt)&&(r=Fq(r,t.type,t.pendingProps,Pr),r!==null?(t.stateNode=r,bn=t,dt=Kr(r.firstChild),Pr=!1,i=!0):i=!1),i||Ya(t)),cw(t),i=t.type,s=t.pendingProps,a=e!==null?e.memoizedProps:null,r=s.children,Vw(i,s)?r=null:a!==null&&Vw(i,a)&&(t.flags|=32),t.memoizedState!==null&&(i=$x(e,t,Z8,null,null,n),eh._currentValue=i),Ap(e,t),dn(e,t,r,n),t.child;case 6:return e===null&&je&&((e=n=dt)&&(n=jq(n,t.pendingProps,Pr),n!==null?(t.stateNode=n,bn=t,dt=null,e=!0):e=!1),e||Ya(t)),null;case 13:return PI(e,t,n);case 4:return cg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=al(t,null,r,n):dn(e,t,r,n),t.child;case 11:return bA(e,t,t.type,t.pendingProps,n);case 7:return dn(e,t,t.pendingProps,n),t.child;case 8:return dn(e,t,t.pendingProps.children,n),t.child;case 12:return dn(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ma(t,t.type,r.value),dn(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,sl(t),i=wn(i),r=r(i),t.flags|=1,dn(e,t,r,n),t.child;case 14:return vA(e,t,t.type,t.pendingProps,n);case 15:return FI(e,t,t.type,t.pendingProps,n);case 19:return UI(e,t,n);case 31:return oq(e,t,n);case 22:return jI(e,t,n,t.pendingProps);case 24:return sl(t),r=wn(Pt),e===null?(i=Mx(),i===null&&(i=ot,s=Rx(),i.pooledCache=s,s.refCount++,s!==null&&(i.pooledCacheLanes|=n),i=s),t.memoizedState={parent:r,cache:i},Dx(t),ma(t,Pt,i)):(e.lanes&n&&(Ew(e,t),yd(t,null,null,n),gd()),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),ma(t,Pt,r)):(r=s.cache,ma(t,Pt,r),r!==i.cache&&xw(t,[Pt],n,!0))),dn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(P(156,t.tag))}function fs(e){e.flags|=4}function CS(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(d$())e.flags|=8192;else throw Qo=yg,Nx}else e.flags&=-16777217}function CA(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!I$(t))if(d$())e.flags|=8192;else throw Qo=yg,Nx}function Bm(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hz():536870912,e.lanes|=t,ou|=t)}function Nf(e,t){if(!je)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 ft(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 cq(e,t,n){var r=t.pendingProps;switch(Ox(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return ft(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),zs(Pt),tu(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Gl(t)?fs(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,yS())),ft(t),null;case 26:var i=t.type,s=t.memoizedState;return e===null?(fs(t),s!==null?(ft(t),CA(t,s)):(ft(t),CS(t,i,null,r,n))):s?s!==e.memoizedState?(fs(t),ft(t),CA(t,s)):(ft(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&fs(t),ft(t),CS(t,i,e,r,n)),null;case 27:if(ug(t),n=Ta.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&fs(t);else{if(!r){if(t.stateNode===null)throw Error(P(166));return ft(t),null}e=Hi.current,Gl(t)?tA(t):(e=N$(i,r,n),t.stateNode=e,fs(t))}return ft(t),null;case 5:if(ug(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&fs(t);else{if(!r){if(t.stateNode===null)throw Error(P(166));return ft(t),null}if(s=Hi.current,Gl(t))tA(t);else{var a=Mg(Ta.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[yn]=t,s[tr]=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(xn(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&&fs(t)}}return ft(t),CS(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&fs(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(P(166));if(e=Ta.current,Gl(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=bn,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[yn]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||A$(e.nodeValue,n)),e||Ya(t,!0)}else e=Mg(e).createTextNode(r),e[yn]=t,t.stateNode=e}return ft(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gl(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[yn]=t}else il(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ft(t),e=!1}else n=yS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ur(t),t):(ur(t),null);if(t.flags&128)throw Error(P(558))}return ft(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Gl(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[yn]=t}else il(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ft(t),i=!1}else i=yS(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ur(t),t):(ur(t),null)}return ur(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),Bm(t,t.updateQueue),ft(t),null);case 4:return tu(),e===null&&nk(t.stateNode.containerInfo),ft(t),null;case 10:return zs(t.type),ft(t),null;case 19:if(on(Rt),r=t.memoizedState,r===null)return ft(t),null;if(i=(t.flags&128)!==0,s=r.rendering,s===null)if(i)Nf(r,!1);else{if(kt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(s=vg(e),s!==null){for(t.flags|=128,Nf(r,!1),e=s.updateQueue,t.updateQueue=e,Bm(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Hz(n,e),n=n.sibling;return ut(Rt,Rt.current&1|2),je&&ws(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&gr()>Eg&&(t.flags|=128,i=!0,Nf(r,!1),t.lanes=4194304)}else{if(!i)if(e=vg(s),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bm(t,e),Nf(r,!0),r.tail===null&&r.tailMode==="hidden"&&!s.alternate&&!je)return ft(t),null}else 2*gr()-r.renderingStartTime>Eg&&n!==536870912&&(t.flags|=128,i=!0,Nf(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=gr(),e.sibling=null,n=Rt.current,ut(Rt,i?n&1|2:n&1),je&&ws(t,r.treeForkCount),e):(ft(t),null);case 22:case 23:return ur(t),zx(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),n=t.updateQueue,n!==null&&Bm(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&&on(Jo),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zs(Pt),ft(t),null;case 25:return null;case 30:return null}throw Error(P(156,t.tag))}function uq(e,t){switch(Ox(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zs(Pt),tu(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ug(t),null;case 31:if(t.memoizedState!==null){if(ur(t),t.alternate===null)throw Error(P(340));il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ur(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(P(340));il()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return on(Rt),null;case 4:return tu(),null;case 10:return zs(t.type),null;case 22:case 23:return ur(t),zx(),e!==null&&on(Jo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zs(Pt),null;case 25:return null;default:return null}}function HI(e,t){switch(Ox(t),t.tag){case 3:zs(Pt),tu();break;case 26:case 27:case 5:ug(t);break;case 4:tu();break;case 31:t.memoizedState!==null&&ur(t);break;case 13:ur(t);break;case 19:on(Rt);break;case 10:zs(t.type);break;case 22:case 23:ur(t),zx(),e!==null&&on(Jo);break;case 24:zs(Pt)}}function Bh(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){We(t,t.return,o)}}function Ja(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(u){We(i,l,u)}}}r=r.next}while(r!==s)}}catch(u){We(t,t.return,u)}}function qI(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Zz(t,n)}catch(r){We(e,e.return,r)}}}function VI(e,t,n){n.props=ll(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){We(e,t,r)}}function vd(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){We(e,t,i)}}function $i(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){We(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){We(e,t,i)}else n.current=null}function KI(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){We(e,e.return,i)}}function TS(e,t,n){try{var r=e.stateNode;Nq(r,e.type,n,t),r[tr]=t}catch(i){We(e,e.return,i)}}function GI(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ho(e.type)||e.tag===4}function AS(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||GI(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&&ho(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 $w(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=Ts));else if(r!==4&&(r===27&&ho(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for($w(e,t,n),e=e.sibling;e!==null;)$w(e,t,n),e=e.sibling}function kg(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&&ho(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(kg(e,t,n),e=e.sibling;e!==null;)kg(e,t,n),e=e.sibling}function YI(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);xn(t,r,n),t[yn]=e,t[tr]=n}catch(s){We(e,e.return,s)}}var xs=!1,Ft=!1,OS=!1,TA=typeof WeakSet=="function"?WeakSet:Set,sn=null;function fq(e,t){if(e=e.containerInfo,Hw=Ig,e=Iz(e),kx(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,u=0,f=e,d=null;t:for(;;){for(var h;f!==n||i!==0&&f.nodeType!==3||(o=a+i),f!==s||r!==0&&f.nodeType!==3||(l=a+r),f.nodeType===3&&(a+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===e)break t;if(d===n&&++c===i&&(o=a),d===s&&++u===r&&(l=a),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=o===-1||l===-1?null:{start:o,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(qw={focusedElem:e,selectionRange:n},Ig=!1,sn=t;sn!==null;)if(t=sn,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,sn=e;else for(;sn!==null;){switch(t=sn,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 p=ll(n.type,i);e=r.getSnapshotBeforeUpdate(p,s),r.__reactInternalSnapshotBeforeUpdate=e}catch(b){We(n,n.return,b)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Kw(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Kw(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,sn=e;break}sn=t.return}}function JI(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:hs(e,n),r&4&&Bh(5,n);break;case 1:if(hs(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){We(n,n.return,a)}else{var i=ll(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){We(n,n.return,a)}}r&64&&qI(n),r&512&&vd(n,n.return);break;case 3:if(hs(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{Zz(e,t)}catch(a){We(n,n.return,a)}}break;case 27:t===null&&r&4&&YI(n);case 26:case 5:hs(e,n),t===null&&r&4&&KI(n),r&512&&vd(n,n.return);break;case 12:hs(e,n);break;case 31:hs(e,n),r&4&&WI(e,n);break;case 13:hs(e,n),r&4&&ZI(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Sq.bind(null,n),Pq(e,n))));break;case 22:if(r=n.memoizedState!==null||xs,!r){t=t!==null&&t.memoizedState!==null||Ft,i=xs;var s=Ft;xs=r,(Ft=t)&&!s?ys(e,n,(n.subtreeFlags&8772)!==0):hs(e,n),xs=i,Ft=s}break;case 30:break;default:hs(e,n)}}function QI(e){var t=e.alternate;t!==null&&(e.alternate=null,QI(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&bx(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 bt=null,Jn=!1;function ds(e,t,n){for(n=n.child;n!==null;)XI(e,t,n),n=n.sibling}function XI(e,t,n){if(yr&&typeof yr.onCommitFiberUnmount=="function")try{yr.onCommitFiberUnmount(Ih,n)}catch{}switch(n.tag){case 26:Ft||$i(n,t),ds(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ft||$i(n,t);var r=bt,i=Jn;ho(n.type)&&(bt=n.stateNode,Jn=!1),ds(e,t,n),xd(n.stateNode),bt=r,Jn=i;break;case 5:Ft||$i(n,t);case 6:if(r=bt,i=Jn,bt=null,ds(e,t,n),bt=r,Jn=i,bt!==null)if(Jn)try{(bt.nodeType===9?bt.body:bt.nodeName==="HTML"?bt.ownerDocument.body:bt).removeChild(n.stateNode)}catch(s){We(n,t,s)}else try{bt.removeChild(n.stateNode)}catch(s){We(n,t,s)}break;case 18:bt!==null&&(Jn?(e=bt,PA(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),fu(e)):PA(bt,n.stateNode));break;case 4:r=bt,i=Jn,bt=n.stateNode.containerInfo,Jn=!0,ds(e,t,n),bt=r,Jn=i;break;case 0:case 11:case 14:case 15:Ja(2,n,t),Ft||Ja(4,n,t),ds(e,t,n);break;case 1:Ft||($i(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&VI(n,t,r)),ds(e,t,n);break;case 21:ds(e,t,n);break;case 22:Ft=(r=Ft)||n.memoizedState!==null,ds(e,t,n),Ft=r;break;default:ds(e,t,n)}}function WI(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{fu(e)}catch(n){We(t,t.return,n)}}}function ZI(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{fu(e)}catch(n){We(t,t.return,n)}}function dq(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new TA),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new TA),t;default:throw Error(P(435,e.tag))}}function Hm(e,t){var n=dq(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var i=wq.bind(null,e,r);r.then(i,i)}})}function Kn(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(ho(o.type)){bt=o.stateNode,Jn=!1;break e}break;case 5:bt=o.stateNode,Jn=!1;break e;case 3:case 4:bt=o.stateNode.containerInfo,Jn=!0;break e}o=o.return}if(bt===null)throw Error(P(160));XI(s,a,i),bt=null,Jn=!1,s=i.alternate,s!==null&&(s.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)e$(t,e),t=t.sibling}var ii=null;function e$(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Kn(t,e),Gn(e),r&4&&(Ja(3,e,e.return),Bh(3,e),Ja(5,e,e.return));break;case 1:Kn(t,e),Gn(e),r&512&&(Ft||n===null||$i(n,n.return)),r&64&&xs&&(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=ii;if(Kn(t,e),Gn(e),r&512&&(Ft||n===null||$i(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[Fh]||s[yn]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=i.createElement(r),i.head.insertBefore(s,i.querySelector("head > title"))),xn(s,r,n),s[yn]=e,an(s),r=s;break e;case"link":var a=GA("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),xn(s,r,n),i.head.appendChild(s);break;case"meta":if(a=GA("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),xn(s,r,n),i.head.appendChild(s);break;default:throw Error(P(468,r))}s[yn]=e,an(s),r=s}e.stateNode=r}else YA(i,e.type,e.stateNode);else e.stateNode=KA(i,r,e.memoizedProps);else s!==r?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,r===null?YA(i,e.type,e.stateNode):KA(i,r,e.memoizedProps)):r===null&&e.stateNode!==null&&TS(e,e.memoizedProps,n.memoizedProps)}break;case 27:Kn(t,e),Gn(e),r&512&&(Ft||n===null||$i(n,n.return)),n!==null&&r&4&&TS(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Kn(t,e),Gn(e),r&512&&(Ft||n===null||$i(n,n.return)),e.flags&32){i=e.stateNode;try{ru(i,"")}catch(p){We(e,e.return,p)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,TS(e,i,n!==null?n.memoizedProps:i)),r&1024&&(OS=!0);break;case 6:if(Kn(t,e),Gn(e),r&4){if(e.stateNode===null)throw Error(P(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(p){We(e,e.return,p)}}break;case 3:if(Mp=null,i=ii,ii=Ng(t.containerInfo),Kn(t,e),ii=i,Gn(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{fu(t.containerInfo)}catch(p){We(e,e.return,p)}OS&&(OS=!1,t$(e));break;case 4:r=ii,ii=Ng(e.stateNode.containerInfo),Kn(t,e),Gn(e),ii=r;break;case 12:Kn(t,e),Gn(e);break;case 31:Kn(t,e),Gn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hm(e,r)));break;case 13:Kn(t,e),Gn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(db=gr()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hm(e,r)));break;case 22:i=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,c=xs,u=Ft;if(xs=c||i,Ft=u||l,Kn(t,e),Ft=u,xs=c,Gn(e),r&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||l||xs||Ft||Io(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 f=l.memoizedProps.style,d=f!=null&&f.hasOwnProperty("display")?f.display:null;o.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(p){We(l,l.return,p)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=i?"":l.memoizedProps}catch(p){We(l,l.return,p)}}}else if(t.tag===18){if(n===null){l=t;try{var h=l.stateNode;i?UA(h,!0):UA(l.stateNode,!1)}catch(p){We(l,l.return,p)}}}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,Hm(e,n))));break;case 19:Kn(t,e),Gn(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Hm(e,r)));break;case 30:break;case 21:break;default:Kn(t,e),Gn(e)}}function Gn(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(GI(r)){n=r;break}r=r.return}if(n==null)throw Error(P(160));switch(n.tag){case 27:var i=n.stateNode,s=AS(e);kg(e,s,i);break;case 5:var a=n.stateNode;n.flags&32&&(ru(a,""),n.flags&=-33);var o=AS(e);kg(e,o,a);break;case 3:case 4:var l=n.stateNode.containerInfo,c=AS(e);$w(e,c,l);break;default:throw Error(P(161))}}catch(u){We(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function t$(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;t$(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function hs(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)JI(e,t.alternate,t),t=t.sibling}function Io(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ja(4,t,t.return),Io(t);break;case 1:$i(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&VI(t,t.return,n),Io(t);break;case 27:xd(t.stateNode);case 26:case 5:$i(t,t.return),Io(t);break;case 22:t.memoizedState===null&&Io(t);break;case 30:Io(t);break;default:Io(t)}e=e.sibling}}function ys(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:ys(i,s,n),Bh(4,s);break;case 1:if(ys(i,s,n),r=s,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(c){We(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++)Wz(l[i],o)}catch(c){We(r,r.return,c)}}n&&a&64&&qI(s),vd(s,s.return);break;case 27:YI(s);case 26:case 5:ys(i,s,n),n&&r===null&&a&4&&KI(s),vd(s,s.return);break;case 12:ys(i,s,n);break;case 31:ys(i,s,n),n&&a&4&&WI(i,s);break;case 13:ys(i,s,n),n&&a&4&&ZI(i,s);break;case 22:s.memoizedState===null&&ys(i,s,n),vd(s,s.return);break;case 30:break;default:ys(i,s,n)}t=t.sibling}}function Qx(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&&Ph(n))}function Xx(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ph(e))}function ti(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)n$(e,t,n,r),t=t.sibling}function n$(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:ti(e,t,n,r),i&2048&&Bh(9,t);break;case 1:ti(e,t,n,r);break;case 3:ti(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&&Ph(e)));break;case 12:if(i&2048){ti(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){We(t,t.return,l)}}else ti(e,t,n,r);break;case 31:ti(e,t,n,r);break;case 13:ti(e,t,n,r);break;case 23:break;case 22:s=t.stateNode,a=t.alternate,t.memoizedState!==null?s._visibility&2?ti(e,t,n,r):Sd(e,t):s._visibility&2?ti(e,t,n,r):(s._visibility|=2,oc(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),i&2048&&Qx(a,t);break;case 24:ti(e,t,n,r),i&2048&&Xx(t.alternate,t);break;default:ti(e,t,n,r)}}function oc(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:oc(s,a,o,l,i),Bh(8,a);break;case 23:break;case 22:var u=a.stateNode;a.memoizedState!==null?u._visibility&2?oc(s,a,o,l,i):Sd(s,a):(u._visibility|=2,oc(s,a,o,l,i)),i&&c&2048&&Qx(a.alternate,a);break;case 24:oc(s,a,o,l,i),i&&c&2048&&Xx(a.alternate,a);break;default:oc(s,a,o,l,i)}t=t.sibling}}function Sd(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:Sd(n,r),i&2048&&Qx(r.alternate,r);break;case 24:Sd(n,r),i&2048&&Xx(r.alternate,r);break;default:Sd(n,r)}t=t.sibling}}var ed=8192;function Yl(e,t,n){if(e.subtreeFlags&ed)for(e=e.child;e!==null;)r$(e,t,n),e=e.sibling}function r$(e,t,n){switch(e.tag){case 26:Yl(e,t,n),e.flags&ed&&e.memoizedState!==null&&Wq(n,ii,e.memoizedState,e.memoizedProps);break;case 5:Yl(e,t,n);break;case 3:case 4:var r=ii;ii=Ng(e.stateNode.containerInfo),Yl(e,t,n),ii=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=ed,ed=16777216,Yl(e,t,n),ed=r):Yl(e,t,n));break;default:Yl(e,t,n)}}function i$(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 Df(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sn=r,a$(r,e)}i$(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)s$(e),e=e.sibling}function s$(e){switch(e.tag){case 0:case 11:case 15:Df(e),e.flags&2048&&Ja(9,e,e.return);break;case 3:Df(e);break;case 12:Df(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Op(e)):Df(e);break;default:Df(e)}}function Op(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];sn=r,a$(r,e)}i$(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ja(8,t,t.return),Op(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Op(t));break;default:Op(t)}e=e.sibling}}function a$(e,t){for(;sn!==null;){var n=sn;switch(n.tag){case 0:case 11:case 15:Ja(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:Ph(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,sn=r;else e:for(n=e;sn!==null;){r=sn;var i=r.sibling,s=r.return;if(QI(r),r===n){sn=null;break e}if(i!==null){i.return=s,sn=i;break e}sn=s}}}var hq={getCacheForType:function(e){var t=wn(Pt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return wn(Pt).controller.signal}},mq=typeof WeakMap=="function"?WeakMap:Map,Ke=0,ot=null,De=null,Ie=0,Qe=0,cr=null,Sa=!1,Bu=!1,Wx=!1,Bs=0,kt=0,Qa=0,Xo=0,Zx=0,pr=0,ou=0,wd=null,Qn=null,Lw=!1,db=0,o$=0,Eg=1/0,Cg=null,Ma=null,Jt=0,Na=null,lu=null,Is=0,Fw=0,jw=null,l$=null,_d=0,Pw=null;function vr(){return Ke&2&&Ie!==0?Ie&-Ie:ye.T!==null?tk():yz()}function c$(){if(pr===0)if(!(Ie&536870912)||je){var e=Im;Im<<=1,!(Im&3932160)&&(Im=262144),pr=e}else pr=536870912;return e=Cr.current,e!==null&&(e.flags|=32),pr}function er(e,t,n){(e===ot&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)&&(cu(e,0),wa(e,Ie,pr,!1)),Lh(e,n),(!(Ke&2)||e!==ot)&&(e===ot&&(!(Ke&2)&&(Xo|=n),kt===4&&wa(e,Ie,pr,!1)),ns(e))}function u$(e,t,n){if(Ke&6)throw Error(P(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||$h(e,t),i=r?yq(e,t):RS(e,t,!0),s=r;do{if(i===0){Bu&&!r&&wa(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!pq(n)){i=RS(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=wd;var l=o.current.memoizedState.isDehydrated;if(l&&(cu(o,a).flags|=256),a=RS(o,a,!1),a!==2){if(Wx&&!l){o.errorRecoveryDisabledLanes|=s,Xo|=s,i=4;break e}s=Qn,Qn=i,s!==null&&(Qn===null?Qn=s:Qn.push.apply(Qn,s))}i=a}if(s=!1,i!==2)continue}}if(i===1){cu(e,0),wa(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:wa(r,t,pr,!Sa);break e;case 2:Qn=null;break;case 3:case 5:break;default:throw Error(P(329))}if((t&62914560)===t&&(i=db+300-gr(),10<i)){if(wa(r,t,pr,!Sa),tb(r,0,!0)!==0)break e;Is=t,r.timeoutHandle=R$(AA.bind(null,r,n,Qn,Cg,Lw,t,pr,Xo,ou,Sa,s,"Throttled",-0,0),i);break e}AA(r,n,Qn,Cg,Lw,t,pr,Xo,ou,Sa,s,null,-0,0)}}break}while(!0);ns(e)}function AA(e,t,n,r,i,s,a,o,l,c,u,f,d,h){if(e.timeoutHandle=-1,f=t.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ts},r$(t,s,f);var p=(s&62914560)===s?db-gr():(s&4194048)===s?o$-gr():0;if(p=Zq(f,p),p!==null){Is=s,e.cancelPendingCommit=p(RA.bind(null,e,t,s,n,r,i,a,o,l,u,f,null,d,h)),wa(e,s,a,!c);return}}RA(e,t,s,n,r,i,a,o,l)}function pq(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(!Er(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 wa(e,t,n,r){t&=~Zx,t&=~Xo,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var s=31-br(i),a=1<<s;r[s]=-1,i&=~a}n!==0&&mz(e,n,t)}function hb(){return Ke&6?!0:(Hh(0),!1)}function ek(){if(De!==null){if(Qe===0)var e=De.return;else e=De,As=zl=null,jx(e),Fc=null,Jd=0,e=De;for(;e!==null;)HI(e.alternate,e),e=e.return;De=null}}function cu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Iq(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Is=0,ek(),ot=e,De=n=Ds(e.current,null),Ie=t,Qe=0,cr=null,Sa=!1,Bu=$h(e,t),Wx=!1,ou=pr=Zx=Xo=Qa=kt=0,Qn=wd=null,Lw=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-br(r),s=1<<i;t|=e[i],r&=~s}return Bs=t,sb(),n}function f$(e,t){Ee=null,ye.H=Xd,t===Uu||t===ob?(t=aA(),Qe=3):t===Nx?(t=aA(),Qe=4):Qe=t===Yx?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,cr=t,De===null&&(kt=1,_g(e,jr(t,e.current)))}function d$(){var e=Cr.current;return e===null?!0:(Ie&4194048)===Ie?Vr===null:(Ie&62914560)===Ie||Ie&536870912?e===Vr:!1}function h$(){var e=ye.H;return ye.H=Xd,e===null?Xd:e}function m$(){var e=ye.A;return ye.A=hq,e}function Tg(){kt=4,Sa||(Ie&4194048)!==Ie&&Cr.current!==null||(Bu=!0),!(Qa&134217727)&&!(Xo&134217727)||ot===null||wa(ot,Ie,pr,!1)}function RS(e,t,n){var r=Ke;Ke|=2;var i=h$(),s=m$();(ot!==e||Ie!==t)&&(Cg=null,cu(e,t)),t=!1;var a=kt;e:do try{if(Qe!==0&&De!==null){var o=De,l=cr;switch(Qe){case 8:ek(),a=6;break e;case 3:case 2:case 9:case 6:Cr.current===null&&(t=!0);var c=Qe;if(Qe=0,cr=null,Tc(e,o,l,c),n&&Bu){a=0;break e}break;default:c=Qe,Qe=0,cr=null,Tc(e,o,l,c)}}gq(),a=kt;break}catch(u){f$(e,u)}while(!0);return t&&e.shellSuspendCounter++,As=zl=null,Ke=r,ye.H=i,ye.A=s,De===null&&(ot=null,Ie=0,sb()),a}function gq(){for(;De!==null;)p$(De)}function yq(e,t){var n=Ke;Ke|=2;var r=h$(),i=m$();ot!==e||Ie!==t?(Cg=null,Eg=gr()+500,cu(e,t)):Bu=$h(e,t);e:do try{if(Qe!==0&&De!==null){t=De;var s=cr;t:switch(Qe){case 1:Qe=0,cr=null,Tc(e,t,s,1);break;case 2:case 9:if(sA(s)){Qe=0,cr=null,OA(t);break}t=function(){Qe!==2&&Qe!==9||ot!==e||(Qe=7),ns(e)},s.then(t,t);break e;case 3:Qe=7;break e;case 4:Qe=5;break e;case 7:sA(s)?(Qe=0,cr=null,OA(t)):(Qe=0,cr=null,Tc(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?I$(a):o.stateNode.complete){Qe=0,cr=null;var l=o.sibling;if(l!==null)De=l;else{var c=o.return;c!==null?(De=c,mb(c)):De=null}break t}}Qe=0,cr=null,Tc(e,t,s,5);break;case 6:Qe=0,cr=null,Tc(e,t,s,6);break;case 8:ek(),kt=6;break e;default:throw Error(P(462))}}bq();break}catch(u){f$(e,u)}while(!0);return As=zl=null,ye.H=r,ye.A=i,Ke=n,De!==null?0:(ot=null,Ie=0,sb(),kt)}function bq(){for(;De!==null&&!U9();)p$(De)}function p$(e){var t=BI(e.alternate,e,Bs);e.memoizedProps=e.pendingProps,t===null?mb(e):De=t}function OA(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=_A(n,t,t.pendingProps,t.type,void 0,Ie);break;case 11:t=_A(n,t,t.pendingProps,t.type.render,t.ref,Ie);break;case 5:jx(t);default:HI(n,t),t=De=Hz(t,Bs),t=BI(n,t,Bs)}e.memoizedProps=e.pendingProps,t===null?mb(e):De=t}function Tc(e,t,n,r){As=zl=null,jx(t),Fc=null,Jd=0;var i=t.return;try{if(aq(e,i,t,n,Ie)){kt=1,_g(e,jr(n,e.current)),De=null;return}}catch(s){if(i!==null)throw De=i,s;kt=1,_g(e,jr(n,e.current)),De=null;return}t.flags&32768?(je||r===1?e=!0:Bu||Ie&536870912?e=!1:(Sa=e=!0,(r===2||r===9||r===3||r===6)&&(r=Cr.current,r!==null&&r.tag===13&&(r.flags|=16384))),g$(t,e)):mb(t)}function mb(e){var t=e;do{if(t.flags&32768){g$(t,Sa);return}e=t.return;var n=cq(t.alternate,t,Bs);if(n!==null){De=n;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);kt===0&&(kt=5)}function g$(e,t){do{var n=uq(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);kt=6,De=null}function RA(e,t,n,r,i,s,a,o,l){e.cancelPendingCommit=null;do pb();while(Jt!==0);if(Ke&6)throw Error(P(327));if(t!==null){if(t===e.current)throw Error(P(177));if(s=t.lanes|t.childLanes,s|=Ex,X9(e,n,s,a,o,l),e===ot&&(De=ot=null,Ie=0),lu=t,Na=e,Is=n,Fw=s,jw=i,l$=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,_q(fg,function(){return w$(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=ye.T,ye.T=null,i=Ge.p,Ge.p=2,a=Ke,Ke|=4;try{fq(e,t,n)}finally{Ke=a,Ge.p=i,ye.T=r}}Jt=1,y$(),b$(),v$()}}function y$(){if(Jt===1){Jt=0;var e=Na,t=lu,n=(t.flags&13878)!==0;if(t.subtreeFlags&13878||n){n=ye.T,ye.T=null;var r=Ge.p;Ge.p=2;var i=Ke;Ke|=4;try{e$(t,e);var s=qw,a=Iz(e.containerInfo),o=s.focusedElem,l=s.selectionRange;if(a!==o&&o&&o.ownerDocument&&zz(o.ownerDocument.documentElement,o)){if(l!==null&&kx(o)){var c=l.start,u=l.end;if(u===void 0&&(u=c),"selectionStart"in o)o.selectionStart=c,o.selectionEnd=Math.min(u,o.value.length);else{var f=o.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var h=d.getSelection(),p=o.textContent.length,b=Math.min(l.start,p),S=l.end===void 0?b:Math.min(l.end,p);!h.extend&&b>S&&(a=S,S=b,b=a);var m=WT(o,b),y=WT(o,S);if(m&&y&&(h.rangeCount!==1||h.anchorNode!==m.node||h.anchorOffset!==m.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var v=f.createRange();v.setStart(m.node,m.offset),h.removeAllRanges(),b>S?(h.addRange(v),h.extend(y.node,y.offset)):(v.setEnd(y.node,y.offset),h.addRange(v))}}}}for(f=[],h=o;h=h.parentNode;)h.nodeType===1&&f.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<f.length;o++){var _=f[o];_.element.scrollLeft=_.left,_.element.scrollTop=_.top}}Ig=!!Hw,qw=Hw=null}finally{Ke=i,Ge.p=r,ye.T=n}}e.current=t,Jt=2}}function b$(){if(Jt===2){Jt=0;var e=Na,t=lu,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ye.T,ye.T=null;var r=Ge.p;Ge.p=2;var i=Ke;Ke|=4;try{JI(e,t.alternate,t)}finally{Ke=i,Ge.p=r,ye.T=n}}Jt=3}}function v$(){if(Jt===4||Jt===3){Jt=0,B9();var e=Na,t=lu,n=Is,r=l$;t.subtreeFlags&10256||t.flags&10256?Jt=5:(Jt=0,lu=Na=null,S$(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ma=null),yx(n),t=t.stateNode,yr&&typeof yr.onCommitFiberRoot=="function")try{yr.onCommitFiberRoot(Ih,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=ye.T,i=Ge.p,Ge.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,Ge.p=i}}Is&3&&pb(),ns(e),i=e.pendingLanes,n&261930&&i&42?e===Pw?_d++:(_d=0,Pw=e):_d=0,Hh(0)}}function S$(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ph(t)))}function pb(){return y$(),b$(),v$(),w$()}function w$(){if(Jt!==5)return!1;var e=Na,t=Fw;Fw=0;var n=yx(Is),r=ye.T,i=Ge.p;try{Ge.p=32>n?32:n,ye.T=null,n=jw,jw=null;var s=Na,a=Is;if(Jt=0,lu=Na=null,Is=0,Ke&6)throw Error(P(331));var o=Ke;if(Ke|=4,s$(s.current),n$(s,s.current,a,n),Ke=o,Hh(0,!1),yr&&typeof yr.onPostCommitFiberRoot=="function")try{yr.onPostCommitFiberRoot(Ih,s)}catch{}return!0}finally{Ge.p=i,ye.T=r,S$(e,t)}}function MA(e,t,n){t=jr(n,t),t=Dw(e.stateNode,t,2),e=Ra(e,t,2),e!==null&&(Lh(e,2),ns(e))}function We(e,t,n){if(e.tag===3)MA(e,e,n);else for(;t!==null;){if(t.tag===3){MA(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Ma===null||!Ma.has(r))){e=jr(n,e),n=$I(2),r=Ra(t,n,2),r!==null&&(LI(n,r,t,e),Lh(r,2),ns(r));break}}t=t.return}}function MS(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new mq;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)||(Wx=!0,i.add(n),e=vq.bind(null,e,t,n),t.then(e,e))}function vq(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ot===e&&(Ie&n)===n&&(kt===4||kt===3&&(Ie&62914560)===Ie&&300>gr()-db?!(Ke&2)&&cu(e,0):Zx|=n,ou===Ie&&(ou=0)),ns(e)}function _$(e,t){t===0&&(t=hz()),e=Dl(e,t),e!==null&&(Lh(e,t),ns(e))}function Sq(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),_$(e,n)}function wq(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),_$(e,n)}function _q(e,t){return px(e,t)}var Ag=null,lc=null,Uw=!1,Og=!1,NS=!1,_a=0;function ns(e){e!==lc&&e.next===null&&(lc===null?Ag=lc=e:lc=lc.next=e),Og=!0,Uw||(Uw=!0,kq())}function Hh(e,t){if(!NS&&Og){NS=!0;do for(var n=!1,r=Ag;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-br(42|e)+1)-1,s&=i&~(a&~o),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,NA(r,s))}else s=Ie,s=tb(r,r===ot?s:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(s&3)||$h(r,s)||(n=!0,NA(r,s));r=r.next}while(n);NS=!1}}function xq(){x$()}function x$(){Og=Uw=!1;var e=0;_a!==0&&zq()&&(e=_a);for(var t=gr(),n=null,r=Ag;r!==null;){var i=r.next,s=k$(r,t);s===0?(r.next=null,n===null?Ag=i:n.next=i,i===null&&(lc=n)):(n=r,(e!==0||s&3)&&(Og=!0)),r=i}Jt!==0&&Jt!==5||Hh(e),_a!==0&&(_a=0)}function k$(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var a=31-br(s),o=1<<a,l=i[a];l===-1?(!(o&n)||o&r)&&(i[a]=Q9(o,t)):l<=t&&(e.expiredLanes|=o),s&=~o}if(t=ot,n=Ie,n=tb(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Qe===2||Qe===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&aS(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||$h(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&aS(r),yx(n)){case 2:case 8:n=fz;break;case 32:n=fg;break;case 268435456:n=dz;break;default:n=fg}return r=E$.bind(null,e),n=px(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&aS(r),e.callbackPriority=2,e.callbackNode=null,2}function E$(e,t){if(Jt!==0&&Jt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pb()&&e.callbackNode!==n)return null;var r=Ie;return r=tb(e,e===ot?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(u$(e,r,t),k$(e,gr()),e.callbackNode!=null&&e.callbackNode===n?E$.bind(null,e):null)}function NA(e,t){if(pb())return null;u$(e,t,!0)}function kq(){$q(function(){Ke&6?px(uz,xq):x$()})}function tk(){if(_a===0){var e=iu;e===0&&(e=zm,zm<<=1,!(zm&261888)&&(zm=256)),_a=e}return _a}function DA(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Sp(""+e)}function zA(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 Eq(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var s=DA((i[tr]||null).action),a=r.submitter;a&&(t=(t=a[tr]||null)?DA(t.formAction):a.getAttribute("formAction"),t!==null&&(s=t,a=null));var o=new nb("action","action",null,r,i);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(_a!==0){var l=a?zA(i,a):new FormData(i);Mw(n,{pending:!0,data:l,method:i.method,action:s},null,l)}}else typeof s=="function"&&(o.preventDefault(),l=a?zA(i,a):new FormData(i),Mw(n,{pending:!0,data:l,method:i.method,action:s},s,l))},currentTarget:i}]})}}for(var DS=0;DS<vw.length;DS++){var zS=vw[DS],Cq=zS.toLowerCase(),Tq=zS[0].toUpperCase()+zS.slice(1);Ei(Cq,"on"+Tq)}Ei(Lz,"onAnimationEnd");Ei(Fz,"onAnimationIteration");Ei(jz,"onAnimationStart");Ei("dblclick","onDoubleClick");Ei("focusin","onFocus");Ei("focusout","onBlur");Ei(H8,"onTransitionRun");Ei(q8,"onTransitionStart");Ei(V8,"onTransitionCancel");Ei(Pz,"onTransitionEnd");nu("onMouseEnter",["mouseout","mouseover"]);nu("onMouseLeave",["mouseout","mouseover"]);nu("onPointerEnter",["pointerout","pointerover"]);nu("onPointerLeave",["pointerout","pointerover"]);Rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Rl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wd="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(" "),Aq=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wd));function C$(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(u){hg(u)}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(u){hg(u)}i.currentTarget=null,s=l}}}}function Ne(e,t){var n=t[fw];n===void 0&&(n=t[fw]=new Set);var r=e+"__bubble";n.has(r)||(T$(t,e,2,!1),n.add(r))}function IS(e,t,n){var r=0;t&&(r|=4),T$(n,e,r,t)}var qm="_reactListening"+Math.random().toString(36).slice(2);function nk(e){if(!e[qm]){e[qm]=!0,bz.forEach(function(n){n!=="selectionchange"&&(Aq.has(n)||IS(n,!1,e),IS(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[qm]||(t[qm]=!0,IS("selectionchange",!1,t))}}function T$(e,t,n,r){switch(P$(t)){case 2:var i=nV;break;case 8:i=rV;break;default:i=ak}n=i.bind(null,t,n,e),i=void 0,!gw||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 $S(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=bc(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}Cz(function(){var c=s,u=Sx(n),f=[];e:{var d=Uz.get(e);if(d!==void 0){var h=nb,p=e;switch(e){case"keypress":if(_p(n)===0)break e;case"keydown":case"keyup":h=w8;break;case"focusin":p="focus",h=fS;break;case"focusout":p="blur",h=fS;break;case"beforeblur":case"afterblur":h=fS;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=BT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=c8;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=k8;break;case Lz:case Fz:case jz:h=d8;break;case Pz:h=C8;break;case"scroll":case"scrollend":h=o8;break;case"wheel":h=A8;break;case"copy":case"cut":case"paste":h=m8;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=qT;break;case"toggle":case"beforetoggle":h=R8}var b=(t&4)!==0,S=!b&&(e==="scroll"||e==="scrollend"),m=b?d!==null?d+"Capture":null:d;b=[];for(var y=c,v;y!==null;){var _=y;if(v=_.stateNode,_=_.tag,_!==5&&_!==26&&_!==27||v===null||m===null||(_=qd(y,m),_!=null&&b.push(Zd(y,_,v))),S)break;y=y.return}0<b.length&&(d=new h(d,p,null,n,u),f.push({event:d,listeners:b}))}}if(!(t&7)){e:{if(d=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",d&&n!==pw&&(p=n.relatedTarget||n.fromElement)&&(bc(p)||p[Fu]))break e;if((h||d)&&(d=u.window===u?u:(d=u.ownerDocument)?d.defaultView||d.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?bc(p):null,p!==null&&(S=zh(p),b=p.tag,p!==S||b!==5&&b!==27&&b!==6)&&(p=null)):(h=null,p=c),h!==p)){if(b=BT,_="onMouseLeave",m="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(b=qT,_="onPointerLeave",m="onPointerEnter",y="pointer"),S=h==null?d:Wf(h),v=p==null?d:Wf(p),d=new b(_,y+"leave",h,n,u),d.target=S,d.relatedTarget=v,_=null,bc(u)===c&&(b=new b(m,y+"enter",p,n,u),b.target=v,b.relatedTarget=S,_=b),S=_,h&&p)t:{for(b=Oq,m=h,y=p,v=0,_=m;_;_=b(_))v++;_=0;for(var A=y;A;A=b(A))_++;for(;0<v-_;)m=b(m),v--;for(;0<_-v;)y=b(y),_--;for(;v--;){if(m===y||y!==null&&m===y.alternate){b=m;break t}m=b(m),y=b(y)}b=null}else b=null;h!==null&&IA(f,d,h,b,!1),p!==null&&S!==null&&IA(f,S,p,b,!0)}}e:{if(d=c?Wf(c):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var E=YT;else if(GT(d))if(Nz)E=P8;else{E=F8;var T=L8}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?c&&vx(c.elementType)&&(E=YT):E=j8;if(E&&(E=E(e,c))){Mz(f,E,n,u);break e}T&&T(e,d,c),e==="focusout"&&c&&d.type==="number"&&c.memoizedProps.value!=null&&mw(d,"number",d.value)}switch(T=c?Wf(c):window,e){case"focusin":(GT(T)||T.contentEditable==="true")&&(wc=T,yw=c,hd=null);break;case"focusout":hd=yw=wc=null;break;case"mousedown":bw=!0;break;case"contextmenu":case"mouseup":case"dragend":bw=!1,ZT(f,n,u);break;case"selectionchange":if(B8)break;case"keydown":case"keyup":ZT(f,n,u)}var N;if(xx)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 Sc?Oz(e,n)&&(D="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(D="onCompositionStart");D&&(Az&&n.locale!=="ko"&&(Sc||D!=="onCompositionStart"?D==="onCompositionEnd"&&Sc&&(N=Tz()):(va=u,wx="value"in va?va.value:va.textContent,Sc=!0)),T=Rg(c,D),0<T.length&&(D=new HT(D,e,null,n,u),f.push({event:D,listeners:T}),N?D.data=N:(N=Rz(n),N!==null&&(D.data=N)))),(N=N8?D8(e,n):z8(e,n))&&(D=Rg(c,"onBeforeInput"),0<D.length&&(T=new HT("onBeforeInput","beforeinput",null,n,u),f.push({event:T,listeners:D}),T.data=N)),Eq(f,e,c,n,u)}C$(f,t)})}function Zd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Rg(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=qd(e,n),i!=null&&r.unshift(Zd(e,i,s)),i=qd(e,t),i!=null&&r.push(Zd(e,i,s))),e.tag===3)return r;e=e.return}return[]}function Oq(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function IA(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=qd(n,s),c!=null&&a.unshift(Zd(n,c,l))):i||(c=qd(n,s),c!=null&&a.push(Zd(n,c,l)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var Rq=/\r\n?/g,Mq=/\u0000|\uFFFD/g;function $A(e){return(typeof e=="string"?e:""+e).replace(Rq,`
|
|
49
|
+
`).replace(Mq,"")}function A$(e,t){return t=$A(t),$A(e)===t}function nt(e,t,n,r,i,s){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||ru(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&ru(e,""+r);break;case"className":Lm(e,"class",r);break;case"tabIndex":Lm(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Lm(e,n,r);break;case"style":Ez(e,r,s);break;case"data":if(t!=="object"){Lm(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=Sp(""+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"&&nt(e,t,"name",i.name,i,null),nt(e,t,"formEncType",i.formEncType,i,null),nt(e,t,"formMethod",i.formMethod,i,null),nt(e,t,"formTarget",i.formTarget,i,null)):(nt(e,t,"encType",i.encType,i,null),nt(e,t,"method",i.method,i,null),nt(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Sp(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=Ts);break;case"onScroll":r!=null&&Ne("scroll",e);break;case"onScrollEnd":r!=null&&Ne("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=Sp(""+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":Ne("beforetoggle",e),Ne("toggle",e),vp(e,"popover",r);break;case"xlinkActuate":us(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":us(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":us(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":us(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":us(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":us(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":us(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":us(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":us(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":vp(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=s8.get(n)||n,vp(e,n,r))}}function Bw(e,t,n,r,i,s){switch(n){case"style":Ez(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"?ru(e,r):(typeof r=="number"||typeof r=="bigint")&&ru(e,""+r);break;case"onScroll":r!=null&&Ne("scroll",e);break;case"onScrollEnd":r!=null&&Ne("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Ts);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vz.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[tr]||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,""):vp(e,n,r)}}}function xn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("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:nt(e,t,s,a,n,null)}}i&&nt(e,t,"srcSet",n.srcSet,n,null),r&&nt(e,t,"src",n.src,n,null);return;case"input":Ne("invalid",e);var o=s=a=i=null,l=null,c=null;for(r in n)if(n.hasOwnProperty(r)){var u=n[r];if(u!=null)switch(r){case"name":i=u;break;case"type":a=u;break;case"checked":l=u;break;case"defaultChecked":c=u;break;case"value":s=u;break;case"defaultValue":o=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(P(137,t));break;default:nt(e,t,r,u,n,null)}}_z(e,s,o,l,c,a,i,!1);return;case"select":Ne("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:nt(e,t,i,o,n,null)}t=s,n=a,e.multiple=!!r,t!=null?Ic(e,!!r,t,!1):n!=null&&Ic(e,!!r,n,!0);return;case"textarea":Ne("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:nt(e,t,a,o,n,null)}kz(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:nt(e,t,l,r,n,null)}return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(r=0;r<Wd.length;r++)Ne(Wd[r],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("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:nt(e,t,c,r,n,null)}return;default:if(vx(t)){for(u in n)n.hasOwnProperty(u)&&(r=n[u],r!==void 0&&Bw(e,t,u,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&nt(e,t,o,r,n,null))}function Nq(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,u=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&f!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":l=f;default:r.hasOwnProperty(h)||nt(e,t,h,null,r,f)}}for(var d in r){var h=r[d];if(f=n[d],r.hasOwnProperty(d)&&(h!=null||f!=null))switch(d){case"type":s=h;break;case"name":i=h;break;case"checked":c=h;break;case"defaultChecked":u=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!==f&&nt(e,t,d,h,r,f)}}hw(e,a,o,l,c,u,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)||nt(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&&nt(e,t,i,s,r,l)}t=o,n=a,r=h,d!=null?Ic(e,!!n,d,!1):!!r!=!!n&&(t!=null?Ic(e,!!n,t,!0):Ic(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:nt(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&&nt(e,t,a,i,r,s)}xz(e,d,h);return;case"option":for(var p in n)if(d=n[p],n.hasOwnProperty(p)&&d!=null&&!r.hasOwnProperty(p))switch(p){case"selected":e.selected=!1;break;default:nt(e,t,p,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:nt(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 b in n)d=n[b],n.hasOwnProperty(b)&&d!=null&&!r.hasOwnProperty(b)&&nt(e,t,b,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:nt(e,t,c,d,r,h)}return;default:if(vx(t)){for(var S in n)d=n[S],n.hasOwnProperty(S)&&d!==void 0&&!r.hasOwnProperty(S)&&Bw(e,t,S,void 0,r,d);for(u in r)d=r[u],h=n[u],!r.hasOwnProperty(u)||d===h||d===void 0&&h===void 0||Bw(e,t,u,d,r,h);return}}for(var m in n)d=n[m],n.hasOwnProperty(m)&&d!=null&&!r.hasOwnProperty(m)&&nt(e,t,m,null,r,d);for(f in r)d=r[f],h=n[f],!r.hasOwnProperty(f)||d===h||d==null&&h==null||nt(e,t,f,d,r,h)}function LA(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Dq(){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&&LA(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 u=l.transferSize,f=l.initiatorType;u&&LA(f)&&(l=l.responseEnd,a+=u*(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 Hw=null,qw=null;function Mg(e){return e.nodeType===9?e:e.ownerDocument}function FA(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 O$(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 Vw(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 LS=null;function zq(){var e=window.event;return e&&e.type==="popstate"?e===LS?!1:(LS=e,!0):(LS=null,!1)}var R$=typeof setTimeout=="function"?setTimeout:void 0,Iq=typeof clearTimeout=="function"?clearTimeout:void 0,jA=typeof Promise=="function"?Promise:void 0,$q=typeof queueMicrotask=="function"?queueMicrotask:typeof jA<"u"?function(e){return jA.resolve(null).then(e).catch(Lq)}:R$;function Lq(e){setTimeout(function(){throw e})}function ho(e){return e==="head"}function PA(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),fu(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")xd(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,xd(n);for(var s=n.firstChild;s;){var a=s.nextSibling,o=s.nodeName;s[Fh]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=a}}else n==="body"&&xd(e.ownerDocument.body);n=i}while(n);fu(t)}function UA(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 Kw(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":Kw(n),bx(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Fq(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[Fh])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=Kr(e.nextSibling),e===null)break}return null}function jq(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Kr(e.nextSibling),e===null))return null;return e}function M$(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Kr(e.nextSibling),e===null))return null;return e}function Gw(e){return e.data==="$?"||e.data==="$~"}function Yw(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Pq(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 Kr(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 Jw=null;function BA(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Kr(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function HA(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 N$(e,t,n){switch(t=Mg(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 xd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);bx(e)}var Jr=new Map,qA=new Set;function Ng(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Js=Ge.d;Ge.d={f:Uq,r:Bq,D:Hq,C:qq,L:Vq,m:Kq,X:Yq,S:Gq,M:Jq};function Uq(){var e=Js.f(),t=hb();return e||t}function Bq(e){var t=ju(e);t!==null&&t.tag===5&&t.type==="form"?EI(t):Js.r(e)}var Hu=typeof document>"u"?null:document;function D$(e,t,n){var r=Hu;if(r&&typeof t=="string"&&t){var i=Fr(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),qA.has(i)||(qA.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),xn(t,"link",e),an(t),r.head.appendChild(t)))}}function Hq(e){Js.D(e),D$("dns-prefetch",e,null)}function qq(e,t){Js.C(e,t),D$("preconnect",e,t)}function Vq(e,t,n){Js.L(e,t,n);var r=Hu;if(r&&e&&t){var i='link[rel="preload"][as="'+Fr(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Fr(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Fr(n.imageSizes)+'"]')):i+='[href="'+Fr(e)+'"]';var s=i;switch(t){case"style":s=uu(e);break;case"script":s=qu(e)}Jr.has(s)||(e=gt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Jr.set(s,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(qh(s))||t==="script"&&r.querySelector(Vh(s))||(t=r.createElement("link"),xn(t,"link",e),an(t),r.head.appendChild(t)))}}function Kq(e,t){Js.m(e,t);var n=Hu;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Fr(r)+'"][href="'+Fr(e)+'"]',s=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=qu(e)}if(!Jr.has(s)&&(e=gt({rel:"modulepreload",href:e},t),Jr.set(s,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Vh(s)))return}r=n.createElement("link"),xn(r,"link",e),an(r),n.head.appendChild(r)}}}function Gq(e,t,n){Js.S(e,t,n);var r=Hu;if(r&&e){var i=zc(r).hoistableStyles,s=uu(e);t=t||"default";var a=i.get(s);if(!a){var o={loading:0,preload:null};if(a=r.querySelector(qh(s)))o.loading=5;else{e=gt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Jr.get(s))&&rk(e,n);var l=a=r.createElement("link");an(l),xn(l,"link",e),l._p=new Promise(function(c,u){l.onload=c,l.onerror=u}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,Rp(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:o},i.set(s,a)}}}function Yq(e,t){Js.X(e,t);var n=Hu;if(n&&e){var r=zc(n).hoistableScripts,i=qu(e),s=r.get(i);s||(s=n.querySelector(Vh(i)),s||(e=gt({src:e,async:!0},t),(t=Jr.get(i))&&ik(e,t),s=n.createElement("script"),an(s),xn(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}function Jq(e,t){Js.M(e,t);var n=Hu;if(n&&e){var r=zc(n).hoistableScripts,i=qu(e),s=r.get(i);s||(s=n.querySelector(Vh(i)),s||(e=gt({src:e,async:!0,type:"module"},t),(t=Jr.get(i))&&ik(e,t),s=n.createElement("script"),an(s),xn(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},r.set(i,s))}}function VA(e,t,n,r){var i=(i=Ta.current)?Ng(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=uu(n.href),n=zc(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=uu(n.href);var s=zc(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(qh(e)))&&!s._p&&(a.instance=s,a.state.loading=5),Jr.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},Jr.set(e,n),s||Qq(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=qu(n),n=zc(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 uu(e){return'href="'+Fr(e)+'"'}function qh(e){return'link[rel="stylesheet"]['+e+"]"}function z$(e){return gt({},e,{"data-precedence":e.precedence,precedence:null})}function Qq(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}),xn(t,"link",n),an(t),e.head.appendChild(t))}function qu(e){return'[src="'+Fr(e)+'"]'}function Vh(e){return"script[async]"+e}function KA(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Fr(n.href)+'"]');if(r)return t.instance=r,an(r),r;var i=gt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),an(r),xn(r,"style",i),Rp(r,n.precedence,e),t.instance=r;case"stylesheet":i=uu(n.href);var s=e.querySelector(qh(i));if(s)return t.state.loading|=4,t.instance=s,an(s),s;r=z$(n),(i=Jr.get(i))&&rk(r,i),s=(e.ownerDocument||e).createElement("link"),an(s);var a=s;return a._p=new Promise(function(o,l){a.onload=o,a.onerror=l}),xn(s,"link",r),t.state.loading|=4,Rp(s,n.precedence,e),t.instance=s;case"script":return s=qu(n.src),(i=e.querySelector(Vh(s)))?(t.instance=i,an(i),i):(r=n,(i=Jr.get(s))&&(r=gt({},n),ik(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),an(i),xn(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,Rp(r,n.precedence,e));return t.instance}function Rp(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 rk(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 Mp=null;function GA(e,t,n){if(Mp===null){var r=new Map,i=Mp=new Map;i.set(n,r)}else i=Mp,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[Fh]||s[yn]||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 YA(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Xq(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 I$(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function Wq(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=uu(r.href),s=t.querySelector(qh(i));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Dg.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,an(s);return}s=t.ownerDocument||t,r=z$(r),(i=Jr.get(i))&&rk(r,i),s=s.createElement("link"),an(s);var a=s;a._p=new Promise(function(o,l){a.onload=o,a.onerror=l}),xn(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=Dg.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var FS=0;function Zq(e,t){return e.stylesheets&&e.count===0&&Np(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Np(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&FS===0&&(FS=62500*Dq());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Np(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>FS?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Dg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Np(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var zg=null;function Np(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,zg=new Map,t.forEach(eV,e),zg=null,Dg.call(e))}function eV(e,t){if(!(t.state.loading&4)){var n=zg.get(e);if(n)var r=n.get(null);else{n=new Map,zg.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=Dg.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 eh={$$typeof:Cs,Provider:null,Consumer:null,_currentValue:Go,_currentValue2:Go,_threadCount:0};function tV(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=oS(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oS(0),this.hiddenUpdates=oS(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 $$(e,t,n,r,i,s,a,o,l,c,u,f){return e=new tV(e,t,n,a,l,c,u,f,o),t=1,s===!0&&(t|=24),s=hr(3,null,null,t),e.current=s,s.stateNode=e,t=Rx(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:r,isDehydrated:n,cache:t},Dx(s),e}function L$(e){return e?(e=kc,e):kc}function F$(e,t,n,r,i,s){i=L$(i),r.context===null?r.context=i:r.pendingContext=i,r=Oa(t),r.payload={element:n},s=s===void 0?null:s,s!==null&&(r.callback=s),n=Ra(e,r,t),n!==null&&(er(n,e,t),pd(n,e,t))}function JA(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function sk(e,t){JA(e,t),(e=e.alternate)&&JA(e,t)}function j$(e){if(e.tag===13||e.tag===31){var t=Dl(e,67108864);t!==null&&er(t,e,67108864),sk(e,67108864)}}function QA(e){if(e.tag===13||e.tag===31){var t=vr();t=gx(t);var n=Dl(e,t);n!==null&&er(n,e,t),sk(e,t)}}var Ig=!0;function nV(e,t,n,r){var i=ye.T;ye.T=null;var s=Ge.p;try{Ge.p=2,ak(e,t,n,r)}finally{Ge.p=s,ye.T=i}}function rV(e,t,n,r){var i=ye.T;ye.T=null;var s=Ge.p;try{Ge.p=8,ak(e,t,n,r)}finally{Ge.p=s,ye.T=i}}function ak(e,t,n,r){if(Ig){var i=Qw(r);if(i===null)$S(e,t,r,$g,n),XA(e,r);else if(sV(i,e,t,n,r))r.stopPropagation();else if(XA(e,r),t&4&&-1<iV.indexOf(e)){for(;i!==null;){var s=ju(i);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var a=Do(s.pendingLanes);if(a!==0){var o=s;for(o.pendingLanes|=2,o.entangledLanes|=2;a;){var l=1<<31-br(a);o.entanglements[1]|=l,a&=~l}ns(s),!(Ke&6)&&(Eg=gr()+500,Hh(0))}}break;case 31:case 13:o=Dl(s,2),o!==null&&er(o,s,2),hb(),sk(s,2)}if(s=Qw(r),s===null&&$S(e,t,r,$g,n),s===i)break;i=s}i!==null&&r.stopPropagation()}else $S(e,t,r,null,n)}}function Qw(e){return e=Sx(e),ok(e)}var $g=null;function ok(e){if($g=null,e=bc(e),e!==null){var t=zh(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=sz(t),e!==null)return e;e=null}else if(n===31){if(e=az(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 $g=e,null}function P$(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(H9()){case uz:return 2;case fz:return 8;case fg:case q9:return 32;case dz:return 268435456;default:return 32}default:return 32}}var Xw=!1,Da=null,za=null,Ia=null,th=new Map,nh=new Map,ya=[],iV="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 XA(e,t){switch(e){case"focusin":case"focusout":Da=null;break;case"dragenter":case"dragleave":za=null;break;case"mouseover":case"mouseout":Ia=null;break;case"pointerover":case"pointerout":th.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":nh.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=ju(t),t!==null&&j$(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function sV(e,t,n,r,i){switch(t){case"focusin":return Da=zf(Da,e,t,n,r,i),!0;case"dragenter":return za=zf(za,e,t,n,r,i),!0;case"mouseover":return Ia=zf(Ia,e,t,n,r,i),!0;case"pointerover":var s=i.pointerId;return th.set(s,zf(th.get(s)||null,e,t,n,r,i)),!0;case"gotpointercapture":return s=i.pointerId,nh.set(s,zf(nh.get(s)||null,e,t,n,r,i)),!0}return!1}function U$(e){var t=bc(e.target);if(t!==null){var n=zh(t);if(n!==null){if(t=n.tag,t===13){if(t=sz(n),t!==null){e.blockedOn=t,IT(e.priority,function(){QA(n)});return}}else if(t===31){if(t=az(n),t!==null){e.blockedOn=t,IT(e.priority,function(){QA(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 Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qw(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pw=r,n.target.dispatchEvent(r),pw=null}else return t=ju(n),t!==null&&j$(t),e.blockedOn=n,!1;t.shift()}return!0}function WA(e,t,n){Dp(e)&&n.delete(t)}function aV(){Xw=!1,Da!==null&&Dp(Da)&&(Da=null),za!==null&&Dp(za)&&(za=null),Ia!==null&&Dp(Ia)&&(Ia=null),th.forEach(WA),nh.forEach(WA)}function Vm(e,t){e.blockedOn===t&&(e.blockedOn=null,Xw||(Xw=!0,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,aV)))}var Km=null;function ZA(e){Km!==e&&(Km=e,Xt.unstable_scheduleCallback(Xt.unstable_NormalPriority,function(){Km===e&&(Km=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(ok(r||n)===null)continue;break}var s=ju(n);s!==null&&(e.splice(t,3),t-=3,Mw(s,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function fu(e){function t(l){return Vm(l,e)}Da!==null&&Vm(Da,e),za!==null&&Vm(za,e),Ia!==null&&Vm(Ia,e),th.forEach(t),nh.forEach(t);for(var n=0;n<ya.length;n++){var r=ya[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ya.length&&(n=ya[0],n.blockedOn===null);)U$(n),n.blockedOn===null&&ya.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[tr]||null;if(typeof s=="function")a||ZA(n);else if(a){var o=null;if(s&&s.hasAttribute("formAction")){if(i=s,a=s[tr]||null)o=a.formAction;else if(ok(i)!==null)continue}else o=a.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),ZA(n)}}}function B$(){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 lk(e){this._internalRoot=e}gb.prototype.render=lk.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(P(409));var n=t.current,r=vr();F$(n,r,e,t,null,null)};gb.prototype.unmount=lk.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;F$(e.current,2,null,e,null,null),hb(),t[Fu]=null}};function gb(e){this._internalRoot=e}gb.prototype.unstable_scheduleHydration=function(e){if(e){var t=yz();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ya.length&&t!==0&&t<ya[n].priority;n++);ya.splice(n,0,e),n===0&&U$(e)}};var eO=rz.version;if(eO!=="19.2.4")throw Error(P(527,eO,"19.2.4"));Ge.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=$9(t),e=e!==null?oz(e):null,e=e===null?null:e.stateNode,e};var oV={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:ye,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Gm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gm.isDisabled&&Gm.supportsFiber)try{Ih=Gm.inject(oV),yr=Gm}catch{}}Zy.createRoot=function(e,t){if(!iz(e))throw Error(P(299));var n=!1,r="",i=DI,s=zI,a=II;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=$$(e,1,!1,null,null,n,r,null,i,s,a,B$),e[Fu]=t.current,nk(e),new lk(t)};Zy.hydrateRoot=function(e,t,n){if(!iz(e))throw Error(P(299));var r=!1,i="",s=DI,a=zI,o=II,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=$$(e,1,!0,t,n??null,r,i,l,s,a,o,B$),t.context=L$(null),n=t.current,r=vr(),r=gx(r),i=Oa(r),i.callback=null,Ra(n,i,r),n=r,t.current.lanes=n,Lh(t,n),ns(t),e[Fu]=t.current,nk(e),new gb(t)};Zy.version="19.2.4";function H$(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H$)}catch(e){console.error(e)}}H$(),XD.exports=Zy;var lV=XD.exports;const cV=Dh(lV),uV=e=>typeof e=="function",x=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)}}}},ge=e=>e,yb=e=>()=>e,tO=yb(!0),$a=yb(!1),q$=yb(void 0),du=q$;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 u=1;u<arguments.length;u++)c=arguments[u](c);return c}}}const Ym="effect/GlobalValue";let If;const pe=(e,t)=>(If||(globalThis[Ym]??(globalThis[Ym]=new Map),If=globalThis[Ym]),If.has(e)||If.set(e,t()),If.get(e)),Qr=e=>typeof e=="string",Hs=e=>typeof e=="number",rh=e=>typeof e=="boolean",bb=e=>typeof e=="bigint",Ww=e=>typeof e=="symbol",Vu=uV,fV=e=>e===void 0,dV=e=>!1,ck=e=>typeof e=="object"&&e!==null,bi=e=>ck(e)||Vu(e),ue=x(2,(e,t)=>bi(e)&&t in e),V$=x(2,(e,t)=>ue(e,"_tag")&&e._tag===t),Jl=e=>e==null,hV=e=>e!=null,mV=e=>e instanceof Uint8Array,K$=e=>e instanceof Date,G$=e=>typeof e=="string"||ue(e,Symbol.iterator),pV=e=>ck(e)&&!Array.isArray(e),gV=e=>ue(e,"then")&&Vu(e.then),vb=e=>`BUG: ${e} - please report an issue at https://github.com/Effect-TS/effect/issues`;let Y$=class J${constructor(t){g(this,"self");g(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 yV=335903614,bV=4150755663,vV=1481765933,SV=1284865837,wV=9007199254740992,_V=134217728;class xV{constructor(t,n,r,i){g(this,"_state");return Jl(n)&&Jl(t)?(n=Math.random()*4294967295>>>0,t=0):Jl(n)&&(n=t,t=0),Jl(i)&&Jl(r)?(i=this._state?this._state[3]:bV,r=this._state?this._state[2]:yV):Jl(i)&&(i=r,r=0),this._state=new Int32Array([0,0,r>>>0,((i||0)|1)>>>0]),this._next(),nO(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*_V+n)/wV}_next(){const t=this._state[0]>>>0,n=this._state[1]>>>0;kV(this._state,t,n,vV,SV),nO(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 kV(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 nO(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 Zw=Symbol.for("effect/Utils/YieldWrap");var Nh;class Kh{constructor(t){tS(this,Nh);Mm(this,Nh,t)}[Zw](){return Rm(this,Nh)}}Nh=new WeakMap;function EV(e){if(typeof e=="object"&&e!==null&&Zw in e)return e[Zw]();throw new Error(vb("yieldWrapGet"))}const Or=pe("effect/Utils/isStructuralRegion",()=>({enabled:!1,tester:void 0})),Q$={effect_internal_function:e=>e()},CV={effect_internal_function:e=>{try{return e()}finally{}}};var vN;const TV=((vN=Q$.effect_internal_function(()=>new Error().stack))==null?void 0:vN.includes("effect_internal_function"))===!0,pn=TV?Q$.effect_internal_function:CV.effect_internal_function,jS=pe(Symbol.for("effect/Hash/randomHashCache"),()=>new WeakMap),be=Symbol.for("effect/Hash"),ne=e=>{if(Or.enabled===!0)return 0;switch(typeof e){case"number":return fk(e);case"bigint":return ht(e.toString(10));case"boolean":return ht(String(e));case"symbol":return ht(String(e));case"string":return ht(e);case"undefined":return ht("undefined");case"function":case"object":return e===null?ht("null"):e instanceof Date?Number.isNaN(e.getTime())?ht("Invalid Date"):ne(e.toISOString()):e instanceof URL?ne(e.href):AV(e)?e[be]():uk(e);default:throw new Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},uk=e=>(jS.has(e)||jS.set(e,fk(Math.floor(Math.random()*Number.MAX_SAFE_INTEGER))),jS.get(e)),Se=e=>t=>t*53^e,Sb=e=>e&3221225471|e>>>1&1073741824,AV=e=>ue(e,be),fk=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 Sb(t)},ht=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return Sb(t)},OV=(e,t)=>{let n=12289;for(let r=0;r<t.length;r++)n^=O(ht(t[r]),Se(ne(e[t[r]])));return Sb(n)},X$=e=>OV(e,Object.keys(e)),Ku=e=>{let t=6151;for(let n=0;n<e.length;n++)t=O(t,Se(ne(e[n])));return Sb(t)},tt=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 ae(){return arguments.length===1?e=>Lg(e,arguments[0]):Lg(arguments[0],arguments[1])}function Lg(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(ih(e)&&ih(t))return ne(e)===ne(t)&&e[ve](t)?!0:Or.enabled&&Or.tester?Or.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(Or.enabled){if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((r,i)=>Lg(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&&Lg(e[s],t[s])))return Or.tester?Or.tester(e,t):!1;return!0}}return Or.tester?Or.tester(e,t):!1}}return Or.enabled&&Or.tester?Or.tester(e,t):!1}const ih=e=>ue(e,ve),dk=()=>ae,Pe=Symbol.for("nodejs.util.inspect.custom"),vt=e=>{try{if(ue(e,"toJSON")&&Vu(e.toJSON)&&e.toJSON.length===0)return e.toJSON();if(Array.isArray(e))return e.map(vt)}catch{return{}}return hk(e)},PS="[Circular]";function W$(e){try{return e.toISOString()}catch{return"Invalid Date"}}function RV(e){try{const t=e.toString();return typeof t=="string"?t:String(t)}catch{return"[toString threw]"}}function wb(e){return Qr(e)?JSON.stringify(e):String(e)}function Qs(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)?PS:(n.add(a),`[${a.map(l=>s(l,o)).join(",")}]`);if(K$(a))return W$(a);if(ue(a,"toString")&&Vu(a.toString)&&a.toString!==Object.prototype.toString&&a.toString!==Array.prototype.toString){const l=RV(a);return a instanceof Error&&a.cause?`${l} (cause: ${s(a.cause,o)})`:l}if(Qr(a))return JSON.stringify(a);if(Hs(a)||a==null||rh(a)||Ww(a))return String(a);if(bb(a))return String(a)+"n";if(a instanceof Set||a instanceof Map)return n.has(a)?PS:(n.add(a),`${a.constructor.name}(${s(Array.from(a),o)})`);if(bi(a)){if(n.has(a))return PS;n.add(a);const l=i(a);{const c=`{${l.map(u=>`${wb(u)}:${s(a[u],o)}`).join(",")}}`;return r(a,c)}}return String(a)}return s(e,0)}const it=e=>JSON.stringify(e,null,2),_b={toJSON(){return vt(this)},[Pe](){return this.toJSON()},toString(){return it(this.toJSON())}};let MV=class{[Pe](){return this.toJSON()}toString(){return it(this.toJSON())}};const hu=(e,t=2)=>{if(typeof e=="string")return e;try{return typeof e=="object"?Z$(e,t):String(e)}catch{return String(e)}},Z$=(e,t)=>{let n=[];const r=JSON.stringify(e,(i,s)=>typeof s=="object"&&s!==null?n.includes(s)?void 0:n.push(s)&&(Wo.fiberRefs!==void 0&&eL(s)?s[xb](Wo.fiberRefs):s):s,t);return n=void 0,r},xb=Symbol.for("effect/Inspectable/Redactable"),eL=e=>typeof e=="object"&&e!==null&&xb in e,Wo=pe("effect/Inspectable/redactableState",()=>({fiberRefs:void 0})),NV=(e,t)=>{const n=Wo.fiberRefs;Wo.fiberRefs=e;try{return t()}finally{Wo.fiberRefs=n}},hk=e=>eL(e)&&Wo.fiberRefs!==void 0?e[xb](Wo.fiberRefs):e,re=(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}}},kd="Async",kb="Commit",ln="Failure",zp="OnFailure",Fg="OnSuccess",jg="OnSuccessAndFailure",cn="Success",tL="Sync",DV="Tag",Gu="UpdateRuntimeFlags",Pg="While",Ed="Iterator",nL="WithRuntime",Ip="Yield",mk="RevertFlags";let zV="3.19.16";const pk=()=>zV,IV=Symbol.for("effect/Effect"),$V=Symbol.for("effect/Stream"),LV=Symbol.for("effect/Sink"),FV=Symbol.for("effect/Channel"),mu={_R:e=>e,_E:e=>e,_A:e=>e,_V:pk()},jV={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e},PV={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},Gh={[IV]:mu,[$V]:mu,[LV]:jV,[FV]:PV,[ve](e){return this===e},[be](){return tt(this,uk(this))},[Symbol.iterator](){return new Y$(new Kh(this))},pipe(){return re(this,arguments)}},Eb={[be](){return tt(this,X$(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&&ae(this[r],e[r])))return!1;return!0}},Yh={...Gh,_op:kb},UV={...Yh,...Eb},BV=function(){function e(){}return e.prototype=Yh,e}(),rL=Symbol.for("effect/Option"),iL={...Gh,[rL]:{_A:e=>e},[Pe](){return this.toJSON()},toString(){return it(this.toJSON())}},HV=Object.assign(Object.create(iL),{_tag:"Some",_op:"Some",[ve](e){return sL(e)&&oL(e)&&ae(this.value,e.value)},[be](){return tt(this,Se(ne(this._tag))(ne(this.value)))},toJSON(){return{_id:"Option",_tag:this._tag,value:vt(this.value)}}}),qV=ne("None"),VV=Object.assign(Object.create(iL),{_tag:"None",_op:"None",[ve](e){return sL(e)&&aL(e)},[be](){return qV},toJSON(){return{_id:"Option",_tag:this._tag}}}),sL=e=>ue(e,rL),aL=e=>e._tag==="None",oL=e=>e._tag==="Some",lL=Object.create(VV),e_=e=>{const t=Object.create(HV);return t.value=e,t},cL=Symbol.for("effect/Context/Tag"),Ug=Symbol.for("effect/Context/Reference"),KV="effect/STM",GV=Symbol.for(KV),gk={...Gh,_op:"Tag",[GV]:mu,[cL]:{_Service:e=>e,_Identifier:e=>e},toString(){return it(this.toJSON())},toJSON(){return{_id:"Tag",key:this.key,stack:this.stack}},[Pe](){return this.toJSON()},of(e){return e},context(e){return dL(this,e)}},YV={...gk,[Ug]:Ug},JV=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;const r=Object.create(gk);return Object.defineProperty(r,"stack",{get(){return n.stack}}),r.key=e,r},QV=e=>()=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=2;const n=new Error;Error.stackTraceLimit=t;function r(){}return Object.setPrototypeOf(r,gk),r.key=e,Object.defineProperty(r,"stack",{get(){return n.stack}}),r},XV=()=>(e,t)=>{const n=Error.stackTraceLimit;Error.stackTraceLimit=2;const r=new Error;Error.stackTraceLimit=n;function i(){}return Object.setPrototypeOf(i,YV),i.key=e,i.defaultValue=t.defaultValue,Object.defineProperty(i,"stack",{get(){return r.stack}}),i},uL=Symbol.for("effect/Context"),WV={[uL]:{_Services:e=>e},[ve](e){if(fL(e)&&this.unsafeMap.size===e.unsafeMap.size){for(const t of this.unsafeMap.keys())if(!e.unsafeMap.has(t)||!ae(this.unsafeMap.get(t),e.unsafeMap.get(t)))return!1;return!0}return!1},[be](){return tt(this,fk(this.unsafeMap.size))},pipe(){return re(this,arguments)},toString(){return it(this.toJSON())},toJSON(){return{_id:"Context",services:Array.from(this.unsafeMap).map(vt)}},[Pe](){return this.toJSON()}},Xa=e=>{const t=Object.create(WV);return t.unsafeMap=e,t},ZV=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},fL=e=>ue(e,uL),e7=e=>ue(e,cL),t7=e=>ue(e,Ug),n7=Xa(new Map),r7=()=>n7,dL=(e,t)=>Xa(new Map([[e.key,t]])),i7=x(3,(e,t,n)=>{const r=new Map(e.unsafeMap);return r.set(t.key,n),Xa(r)}),US=pe("effect/Context/defaultValueCache",()=>new Map),yk=e=>{if(US.has(e.key))return US.get(e.key);const t=e.defaultValue();return US.set(e.key,t),t},s7=(e,t)=>e.unsafeMap.has(t.key)?e.unsafeMap.get(t.key):yk(t),hL=x(2,(e,t)=>{if(!e.unsafeMap.has(t.key)){if(Ug in t)return yk(t);throw ZV(t)}return e.unsafeMap.get(t.key)}),a7=hL,o7=x(2,(e,t)=>e.unsafeMap.has(t.key)?e_(e.unsafeMap.get(t.key)):t7(t)?e_(yk(t)):lL),l7=x(2,(e,t)=>{const n=new Map(e.unsafeMap);for(const[r,i]of t.unsafeMap)n.set(r,i);return Xa(n)}),c7=(...e)=>{const t=new Map;for(let n=0;n<e.length;n++)e[n].unsafeMap.forEach((r,i)=>{t.set(i,r)});return Xa(t)},mo=JV,u7=Xa,f7=fL,mL=e7,Qi=r7,bk=dL,Ur=i7,$s=a7,pL=hL,Yu=o7,nr=l7,d7=c7,vk=QV,Ju=XV,Sk=e=>(t,n)=>t===n||e(t,n),h7=(e,t)=>e===t,m7=()=>h7,p7=m7(),gL=x(2,(e,t)=>Sk((n,r)=>e(t(n),t(r)))),g7=gL(p7,e=>e.getTime()),y7=e=>Sk((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}),wk=Symbol.for("effect/Either"),yL={...Gh,[wk]:{_R:e=>e},[Pe](){return this.toJSON()},toString(){return it(this.toJSON())}},b7=Object.assign(Object.create(yL),{_tag:"Right",_op:"Right",[ve](e){return _k(e)&&vL(e)&&ae(this.right,e.right)},[be](){return Se(ne(this._tag))(ne(this.right))},toJSON(){return{_id:"Either",_tag:this._tag,right:vt(this.right)}}}),v7=Object.assign(Object.create(yL),{_tag:"Left",_op:"Left",[ve](e){return _k(e)&&bL(e)&&ae(this.left,e.left)},[be](){return Se(ne(this._tag))(ne(this.left))},toJSON(){return{_id:"Either",_tag:this._tag,left:vt(this.left)}}}),_k=e=>ue(e,wk),bL=e=>e._tag==="Left",vL=e=>e._tag==="Right",S7=e=>{const t=Object.create(v7);return t.left=e,t},w7=e=>{const t=Object.create(b7);return t.right=e,t},_7=wk,de=w7,me=S7,x7=e=>{if(Vu(e))try{return de(e())}catch(t){return me(t)}else try{return de(e.try())}catch(t){return me(e.catch(t))}},SL=_k,rn=bL,Li=vL,k7=x(2,(e,{onLeft:t,onRight:n})=>rn(e)?me(t(e.left)):de(n(e.right))),E7=x(2,(e,t)=>rn(e)?me(t(e.left)):de(e.right)),C7=x(2,(e,t)=>Li(e)?de(t(e.right)):me(e.left)),Wn=x(2,(e,{onLeft:t,onRight:n})=>rn(e)?t(e.left):n(e.right)),T7=Wn({onLeft:ge,onRight:ge}),wL=x(2,(e,t)=>{if(Li(e))return e.right;throw t(e.left)}),_L=wL(()=>new Error("getOrThrow called on a Left")),xL=e=>e.length>0,kL=e=>(t,n)=>t===n?0:e(t,n),A7=kL((e,t)=>e<t?-1:1),EL=x(2,(e,t)=>kL((n,r)=>e(t(n),t(r)))),O7=e=>x(2,(t,n)=>e(t,n)===1),R7=Symbol.for("effect/Option"),K=()=>lL,ee=e_,Qt=aL,St=oL,Nt=x(2,(e,{onNone:t,onSome:n})=>Qt(e)?t():n(e.value)),wt=x(2,(e,t)=>Qt(e)?t():e.value),qi=x(2,(e,t)=>Qt(e)?t():e),M7=x(2,(e,t)=>Qt(e)?ee(t()):e),Qu=e=>e==null?K():ee(e),Ni=wt(q$),N7=e=>(...t)=>{try{return ee(e(...t))}catch{return K()}},CL=x(2,(e,t)=>{if(St(e))return e.value;throw t()}),D7=CL(()=>new Error("getOrThrow called on a None")),Br=x(2,(e,t)=>Qt(e)?K():ee(t(e.value))),Il=x(2,(e,t)=>Qt(e)?K():t(e.value)),TL=x(2,(e,t)=>Qt(e)?K():Qu(t(e.value))),z7=e=>x(2,(t,n)=>Qt(t)?!1:e(t.value,n)),I7=dk(),$7=z7(I7),L7=x(2,(e,t)=>Qt(e)?!1:t(e.value)),F7=(...e)=>e,j7=()=>({}),P7=e=>AL(e).length===0,Ac=x(2,(e,t)=>{const n={...e};for(const r of AL(e))n[r]=t(e[r],r);return n}),AL=e=>Object.keys(e),U7=x(3,(e,t,n)=>({...e,[t]:n})),Cb=e=>new Array(e),B7=x(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}),Ye=e=>Array.isArray(e)?e:Array.from(e),H7=e=>Array.isArray(e)?e:[e],q7=x(2,(e,{onEmpty:t,onNonEmpty:n})=>Wt(e)?n(Un(e),cl(e)):t()),Bg=x(2,(e,t)=>[t,...e]),V7=x(2,(e,t)=>[...e,t]),xk=x(2,(e,t)=>Ye(e).concat(Ye(t))),K7=Array.isArray,G7=e=>e.length===0,Y7=G7,Uc=xL,Wt=xL,OL=(e,t)=>e<0||e>=t.length,J7=(e,t)=>Math.floor(Math.min(Math.max(0,e),t.length)),Q7=x(2,(e,t)=>{const n=Math.floor(t);return OL(n,e)?K():ee(e[n])}),RL=x(2,(e,t)=>{const n=Math.floor(t);if(OL(n,e))throw new Error(`Index ${n} out of bounds`);return e[n]}),Cd=Q7(0),Un=RL(0),X7=e=>Wt(e)?ee(ML(e)):K(),ML=e=>e[e.length-1],cl=e=>e.slice(1),W7=(e,t)=>{let n=0;for(const r of e){if(!t(r,n))break;n++}return n},Z7=x(2,(e,t)=>NL(e,W7(e,t))),eK=x(2,(e,t)=>{const n=Ye(e);return n.slice(J7(t,n),n.length)}),rO=e=>Array.from(e).reverse(),sh=x(2,(e,t)=>{const n=Array.from(e);return n.sort(t),n}),iO=x(2,(e,t)=>tK(e,t,F7)),tK=x(3,(e,t,n)=>{const r=Ye(e),i=Ye(t);if(Wt(r)&&Wt(i)){const s=[n(Un(r),Un(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[]}),nK=dk(),NL=x(2,(e,t)=>{const n=Array.from(e),r=Math.floor(t);return Wt(n)?r>=1?rK(n,r):[[],n]:[n,[]]}),rK=x(2,(e,t)=>{const n=Math.max(1,Math.floor(t));return n>=e.length?[td(e),[]]:[Bg(e.slice(1,n),Un(e)),e.slice(n)]}),td=e=>e.slice(),iK=x(3,(e,t,n)=>{const r=Ye(e),i=Ye(t);return Wt(r)?Wt(i)?zL(n)(xk(r,i)):r:i}),$p=x(2,(e,t)=>iK(e,t,nK)),Wa=()=>[],si=e=>[e],Zo=x(2,(e,t)=>e.map(t)),Hg=x(2,(e,t)=>{if(Y7(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}),DL=Hg(ge),sK=x(2,(e,t)=>{const n=Ye(e),r=[];for(let i=0;i<n.length;i++)t(n[i],i)&&r.push(n[i]);return r}),kk=x(3,(e,t,n)=>Ye(e).reduce((r,i,s)=>n(r,i,s),t)),sO=(e,t)=>{const n=[];let r=e,i;for(;St(i=t(r));){const[s,a]=i.value;n.push(s),r=a}return n},Tb=y7,zL=x(2,(e,t)=>{const n=Ye(e);if(Wt(n)){const r=[Un(n)],i=cl(n);for(const s of i)r.every(a=>!t(s,a))&&r.push(s);return r}return[]}),aK=e=>zL(e,dk()),Xu=x(2,(e,t)=>Ye(e).join(t)),IL=Symbol.for("effect/Chunk");function oK(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 $L=[],LL=e=>Sk((t,n)=>t.length===n.length&&Bn(t).every((r,i)=>e(r,La(n,i)))),lK=LL(ae),cK={[IL]:{_A:e=>e},toString(){return it(this.toJSON())},toJSON(){return{_id:"Chunk",values:Bn(this).map(vt)}},[Pe](){return this.toJSON()},[ve](e){return Ab(e)&&lK(this,e)},[be](){return tt(this,Ku(Bn(this)))},[Symbol.iterator](){switch(this.backing._tag){case"IArray":return this.backing.array[Symbol.iterator]();case"IEmpty":return $L[Symbol.iterator]();default:return Bn(this)[Symbol.iterator]()}},pipe(){return re(this,arguments)}},xt=e=>{const t=Object.create(cK);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=oi,t.right=oi;break}case"ISingleton":{t.length=1,t.depth=0,t.left=oi,t.right=oi;break}case"ISlice":{t.length=e.length,t.depth=e.chunk.depth+1,t.left=oi,t.right=oi;break}}return t},Ab=e=>ue(e,IL),oi=xt({_tag:"IEmpty"}),Zt=()=>oi,BS=(...e)=>dK(e),qt=e=>xt({_tag:"ISingleton",a:e}),qs=e=>Ab(e)?e:$n(Ye(e)),t_=(e,t,n)=>{switch(e.backing._tag){case"IArray":{oK(e.backing.array,0,t,n,e.length);break}case"IConcat":{t_(e.left,t,n),t_(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]=La(e,r),r+=1,i+=1;break}}},uK=e=>{switch(e.backing._tag){case"IEmpty":return $L;case"IArray":return e.backing.array;default:{const t=new Array(e.length);return t_(e,t,0),e.backing={_tag:"IArray",array:t},e.left=oi,e.right=oi,e.depth=0,t}}},Bn=uK,fK=e=>{switch(e.backing._tag){case"IEmpty":case"ISingleton":return e;case"IArray":return xt({_tag:"IArray",array:rO(e.backing.array)});case"IConcat":return xt({_tag:"IConcat",left:Vs(e.backing.right),right:Vs(e.backing.left)});case"ISlice":return $n(rO(Bn(e)))}},Vs=fK,FL=x(2,(e,t)=>t<0||t>=e.length?K():ee(La(e,t))),$n=e=>e.length===0?Zt():e.length===1?qt(e[0]):xt({_tag:"IArray",array:e}),dK=e=>$n(e),La=x(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?La(e.left,t):La(e.right,t-e.left.length);case"ISlice":return La(e.backing.chunk,t+e.backing.offset)}}),n_=x(2,(e,t)=>Ut(e,qt(t))),Rn=x(2,(e,t)=>Ut(qt(t),e)),qg=x(2,(e,t)=>{if(t<=0)return oi;if(t>=e.length)return e;switch(e.backing._tag){case"ISlice":return xt({_tag:"ISlice",chunk:e.backing.chunk,length:t,offset:e.backing.offset});case"IConcat":return t>e.left.length?xt({_tag:"IConcat",left:e.left,right:qg(e.right,t-e.left.length)}):qg(e.left,t);default:return xt({_tag:"ISlice",chunk:e,offset:0,length:t})}}),xa=x(2,(e,t)=>{if(t<=0)return e;if(t>=e.length)return oi;switch(e.backing._tag){case"ISlice":return xt({_tag:"ISlice",chunk:e.backing.chunk,offset:e.backing.offset+t,length:e.backing.length-t});case"IConcat":return t>e.left.length?xa(e.right,t-e.left.length):xt({_tag:"IConcat",left:xa(e.left,t),right:e.right});default:return xt({_tag:"ISlice",chunk:e,offset:t,length:e.length-t})}}),Ut=x(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 xt({_tag:"IConcat",left:e,right:t});if(n<-1)if(e.left.depth>=e.right.depth){const r=Ut(e.right,t);return xt({_tag:"IConcat",left:e.left,right:r})}else{const r=Ut(e.right.right,t);if(r.depth===e.depth-3){const i=xt({_tag:"IConcat",left:e.right.left,right:r});return xt({_tag:"IConcat",left:e.left,right:i})}else{const i=xt({_tag:"IConcat",left:e.left,right:e.right.left});return xt({_tag:"IConcat",left:i,right:r})}}else if(t.right.depth>=t.left.depth){const r=Ut(e,t.left);return xt({_tag:"IConcat",left:r,right:t.right})}else{const r=Ut(e,t.left.left);if(r.depth===t.depth-3){const i=xt({_tag:"IConcat",left:r,right:t.left.right});return xt({_tag:"IConcat",left:i,right:t.right})}else{const i=xt({_tag:"IConcat",left:t.left.right,right:t.right});return xt({_tag:"IConcat",left:r,right:i})}}}),Ek=x(2,(e,t)=>$n(sK(e,t))),Ob=e=>e.length===0,Ks=e=>e.length>0,Ck=FL(0),Tk=e=>La(e,0),Fi=Tk,hK=e=>FL(e,e.length-1),mK=x(2,(e,t)=>e.backing._tag==="ISingleton"?qt(t(e.backing.a,0)):$n(O(Bn(e),Zo((n,r)=>t(n,r))))),Os=e=>xa(e,1),pK=x(2,(e,t)=>xa(e,e.length-t)),gK=kk,ul=5,Ak=Math.pow(2,ul),yK=Ak-1,bK=Ak/2,vK=Ak/4;function SK(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 pu(e,t){return t>>>e&yK}function Oc(e){return 1<<e}function jL(e,t){return SK(e&t-1)}const wK=(e,t)=>({value:e,previous:t});function Bc(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 PL(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 _K(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 Za{constructor(){g(this,"_tag","EmptyNode")}modify(t,n,r,i,s,a){const o=r(K());return Qt(o)?new Za:(++a.value,new el(t,i,s,o))}}function di(e){return V$(e,"EmptyNode")}function xK(e){return di(e)||e._tag==="LeafNode"||e._tag==="CollisionNode"}function Rb(e,t){return di(e)?!1:t===e.edit}class el{constructor(t,n,r,i){g(this,"edit");g(this,"hash");g(this,"key");g(this,"value");g(this,"_tag","LeafNode");this.edit=t,this.hash=n,this.key=r,this.value=i}modify(t,n,r,i,s,a){if(ae(s,this.key)){const l=r(this.value);return l===this.value?this:Qt(l)?(--a.value,new Za):Rb(this,t)?(this.value=l,this):new el(t,i,s,l)}const o=r(K());return Qt(o)?this:(++a.value,UL(t,n,this.hash,this,i,new el(t,i,s,o)))}}class Ok{constructor(t,n,r){g(this,"edit");g(this,"hash");g(this,"children");g(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=Rb(this,t),c=this.updateCollisionList(l,t,this.hash,this.children,r,s,a);return c===this.children?this:c.length>1?new Ok(t,this.hash,c):c[0]}const o=r(K());return Qt(o)?this:(++a.value,UL(t,n,this.hash,this,i,new el(t,i,s,o)))}updateCollisionList(t,n,r,i,s,a,o){const l=i.length;for(let u=0;u<l;++u){const f=i[u];if("key"in f&&ae(a,f.key)){const d=f.value,h=s(d);return h===d?i:Qt(h)?(--o.value,PL(t,u,i)):Bc(t,u,new el(n,r,a,h),i)}}const c=s(K());return Qt(c)?i:(++o.value,Bc(t,l,new el(n,r,a,c),i))}}class gu{constructor(t,n,r){g(this,"edit");g(this,"mask");g(this,"children");g(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=pu(n,i),u=Oc(c),f=jL(o,u),d=o&u,h=Rb(this,t);if(!d){const y=new Za().modify(t,n+ul,r,i,s,a);return y?l.length>=bK?EK(t,c,y,o,l):new gu(t,o|u,_K(h,f,y,l)):this}const p=l[f],b=p.modify(t,n+ul,r,i,s,a);if(p===b)return this;let S=o,m;if(di(b)){if(S&=~u,!S)return new Za;if(l.length<=2&&xK(l[f^1]))return l[f^1];m=PL(h,f,l)}else m=Bc(h,f,b,l);return h?(this.mask=S,this.children=m,this):new gu(t,S,m)}}class Rk{constructor(t,n,r){g(this,"edit");g(this,"size");g(this,"children");g(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=pu(n,i),u=l[c],f=(u||new Za).modify(t,n+ul,r,i,s,a);if(u===f)return this;const d=Rb(this,t);let h;if(di(u)&&!di(f))++o,h=Bc(d,c,f,l);else if(!di(u)&&di(f)){if(--o,o<=vK)return kK(t,o,c,l);h=Bc(d,c,new Za,l)}else h=Bc(d,c,f,l);return d?(this.size=o,this.children=h,this):new Rk(t,o,h)}}function kK(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&&!di(c)&&(i[s++]=c,a|=1<<o)}return new gu(e,a,i)}function EK(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 Rk(e,o+1,s)}function CK(e,t,n,r,i,s){if(n===i)return new Ok(e,n,[s,r]);const a=pu(t,n),o=pu(t,i);if(a===o)return l=>new gu(e,Oc(a)|Oc(o),[l]);{const l=a<o?[r,s]:[s,r];return new gu(e,Oc(a)|Oc(o),l)}}function UL(e,t,n,r,i,s){let a,o=t;for(;;){const l=CK(e,o,n,r,i,s);if(typeof l=="function")a=wK(l,a),o=o+ul;else{let c=l;for(;a!=null;)c=a.value(c),a=a.previous;return c}}}const BL="effect/HashMap",r_=Symbol.for(BL),TK={[r_]:r_,[Symbol.iterator](){return new Mb(this,(e,t)=>[e,t])},[be](){let e=ne(BL);for(const t of this)e^=O(ne(t[0]),Se(ne(t[1])));return tt(this,e)},[ve](e){if(RK(e)){if(e._size!==this._size)return!1;for(const t of this){const n=O(e,Nk(t[0],ne(t[0])));if(Qt(n))return!1;if(!ae(t[1],n.value))return!1}return!0}return!1},toString(){return it(this.toJSON())},toJSON(){return{_id:"HashMap",values:Array.from(this).map(vt)}},[Pe](){return this.toJSON()},pipe(){return re(this,arguments)}},Mk=(e,t,n,r)=>{const i=Object.create(TK);return i._editable=e,i._edit=t,i._root=n,i._size=r,i};class Mb{constructor(t,n){g(this,"map");g(this,"f");g(this,"v");this.map=t,this.f=n,this.v=HL(this.map._root,this.f,void 0)}next(){if(Qt(this.v))return{done:!0,value:void 0};const t=this.v.value;return this.v=Vg(t.cont),{done:!1,value:t.value}}[Symbol.iterator](){return new Mb(this.map,this.f)}}const Vg=e=>e?qL(e[0],e[1],e[2],e[3],e[4]):K(),HL=(e,t,n=void 0)=>{switch(e._tag){case"LeafNode":return St(e.value)?ee({value:t(e.key,e.value.value),cont:n}):Vg(n);case"CollisionNode":case"ArrayNode":case"IndexedNode":{const r=e.children;return qL(r.length,r,0,t,n)}default:return Vg(n)}},qL=(e,t,n,r,i)=>{for(;n<e;){const s=t[n++];if(s&&!di(s))return HL(s,r,[e,t,n,r,i])}return Vg(i)},AK=Mk(!1,0,new Za,0),Nb=()=>AK,OK=e=>{const t=KL(Nb());for(const n of e)ah(t,n[0],n[1]);return IK(t)},RK=e=>ue(e,r_),MK=e=>e&&di(e._root),NK=x(2,(e,t)=>Nk(e,t,ne(t))),Nk=x(3,(e,t,n)=>{let r=e._root,i=0;for(;;)switch(r._tag){case"LeafNode":return ae(t,r.key)?r.value:K();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&&ae(t,l.key))return l.value}}return K()}case"IndexedNode":{const s=pu(i,n),a=Oc(s);if(r.mask&a){r=r.children[jL(r.mask,a)],i+=ul;break}return K()}case"ArrayNode":{if(r=r.children[pu(i,n)],r){i+=ul;break}return K()}default:return K()}}),DK=x(2,(e,t)=>St(Nk(e,t,ne(t)))),ah=x(3,(e,t,n)=>Dk(e,t,()=>ee(n))),zK=x(3,(e,t,n)=>e._editable?(e._root=t,e._size=n,e):t===e._root?e:Mk(e._editable,e._edit,t,n)),VL=e=>new Mb(e,t=>t),i_=e=>e._size,KL=e=>Mk(!0,e._edit+1,e._root,e._size),IK=e=>(e._editable=!1,e),Dk=x(3,(e,t,n)=>$K(e,t,ne(t),n)),$K=x(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,zK(s,i.value))}),aO=x(2,(e,t)=>Dk(e,t,K)),LK=x(2,(e,t)=>Db(e,Nb(),(n,r,i)=>ah(n,i,t(r,i)))),GL=x(2,(e,t)=>Db(e,void 0,(n,r,i)=>t(r,i))),Db=x(3,(e,t,n)=>{const r=e._root;if(r._tag==="LeafNode")return St(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&&!di(l)&&(l._tag==="LeafNode"?St(l.value)&&(t=n(t,l.value.value,l.key)):i.push(l.children))}return t}),YL="effect/HashSet",s_=Symbol.for(YL),FK={[s_]:s_,[Symbol.iterator](){return VL(this._keyMap)},[be](){return tt(this,Se(ne(this._keyMap))(ne(YL)))},[ve](e){return jK(e)?i_(this._keyMap)===i_(e._keyMap)&&ae(this._keyMap,e._keyMap):!1},toString(){return it(this.toJSON())},toJSON(){return{_id:"HashSet",values:Array.from(this).map(vt)}},[Pe](){return this.toJSON()},pipe(){return re(this,arguments)}},zb=e=>{const t=Object.create(FK);return t._keyMap=e,t},jK=e=>ue(e,s_),PK=zb(Nb()),Ib=()=>PK,UK=e=>{const t=zk(Ib());for(const n of e)oh(t,n);return Ik(t)},BK=(...e)=>{const t=zk(Ib());for(const n of e)oh(t,n);return Ik(t)},HK=x(2,(e,t)=>DK(e._keyMap,t)),qK=e=>i_(e._keyMap),zk=e=>zb(KL(e._keyMap)),Ik=e=>(e._keyMap._editable=!1,e),JL=x(2,(e,t)=>{const n=zk(e);return t(n),Ik(n)}),oh=x(2,(e,t)=>e._keyMap._editable?(ah(t,!0)(e._keyMap),e):zb(ah(t,!0)(e._keyMap))),QL=x(2,(e,t)=>e._keyMap._editable?(aO(t)(e._keyMap),e):zb(aO(t)(e._keyMap))),VK=x(2,(e,t)=>JL(e,n=>{for(const r of t)QL(n,r)})),KK=x(2,(e,t)=>JL(Ib(),n=>{GK(e,r=>oh(n,r));for(const r of t)oh(n,r)})),GK=x(2,(e,t)=>GL(e._keyMap,(n,r)=>t(r))),YK=x(3,(e,t,n)=>Db(e._keyMap,t,(r,i,s)=>n(r,s))),fl=Ib,JK=UK,$k=BK,XL=HK,Lk=qK,Td=oh,WL=QL,oO=VK,lh=KK,ch=YK,Wu="Die",dl="Empty",$l="Fail",Zu="Interrupt",yu="Parallel",bu="Sequential",ZL="effect/Cause",eF=Symbol.for(ZL),QK={_E:e=>e},ef={[eF]:QK,[be](){return O(ne(ZL),Se(ne(oG(this))),tt(this))},[ve](e){return XK(e)&&aG(this,e)},pipe(){return re(this,arguments)},toJSON(){switch(this._tag){case"Empty":return{_id:"Cause",_tag:this._tag};case"Die":return{_id:"Cause",_tag:this._tag,defect:vt(this.defect)};case"Interrupt":return{_id:"Cause",_tag:this._tag,fiberId:this.fiberId.toJSON()};case"Fail":return{_id:"Cause",_tag:this._tag,failure:vt(this.error)};case"Sequential":case"Parallel":return{_id:"Cause",_tag:this._tag,left:vt(this.left),right:vt(this.right)}}},toString(){return tf(this)},[Pe](){return this.toJSON()}},eo=(()=>{const e=Object.create(ef);return e._tag=dl,e})(),hl=e=>{const t=Object.create(ef);return t._tag=$l,t.error=e,t},Gr=e=>{const t=Object.create(ef);return t._tag=Wu,t.defect=e,t},ci=e=>{const t=Object.create(ef);return t._tag=Zu,t.fiberId=e,t},to=(e,t)=>{const n=Object.create(ef);return n._tag=yu,n.left=e,n.right=t,n},Cn=(e,t)=>{const n=Object.create(ef);return n._tag=bu,n.left=e,n.right=t,n},XK=e=>ue(e,eF),WK=e=>e._tag===dl,ZK=e=>e._tag===$l,tF=e=>e._tag===Wu,eG=e=>e._tag===dl?!0:vu(e,!0,(t,n)=>{switch(n._tag){case dl:return ee(t);case Wu:case $l:case Zu:return ee(!1);default:return K()}}),nF=e=>St(nG(e)),$b=e=>Lb(void 0,cG)(e),tG=e=>Vs(vu(e,Zt(),(t,n)=>n._tag===$l?ee(O(t,Rn(n.error))):K())),rF=e=>Vs(vu(e,Zt(),(t,n)=>n._tag===Wu?ee(O(t,Rn(n.defect))):K())),Fk=e=>vu(e,fl(),(t,n)=>n._tag===Zu?ee(O(t,Td(n.fiberId))):K()),iF=e=>jk(e,t=>t._tag===$l?ee(t.error):K()),sF=e=>{const t=iF(e);switch(t._tag){case"None":return de(e);case"Some":return me(t.value)}},nG=e=>jk(e,t=>t._tag===Zu?ee(t.fiberId):K()),lO=e=>Pk(e,{onEmpty:eo,onFail:()=>eo,onDie:Gr,onInterrupt:ci,onSequential:Cn,onParallel:to}),rG=e=>Pk(e,{onEmpty:eo,onFail:Gr,onDie:Gr,onInterrupt:ci,onSequential:Cn,onParallel:to}),iG=x(2,(e,t)=>sG(e,n=>hl(t(n)))),sG=x(2,(e,t)=>Pk(e,{onEmpty:eo,onFail:n=>t(n),onDie:n=>Gr(n),onInterrupt:n=>ci(n),onSequential:(n,r)=>Cn(n,r),onParallel:(n,r)=>to(n,r)})),aG=(e,t)=>{let n=qt(e),r=qt(t);for(;Ks(n)&&Ks(r);){const[i,s]=O(Fi(n),vu([fl(),Zt()],([l,c],u)=>{const[f,d]=a_(u);return ee([O(l,lh(f)),O(c,Ut(d))])})),[a,o]=O(Fi(r),vu([fl(),Zt()],([l,c],u)=>{const[f,d]=a_(u);return ee([O(l,lh(f)),O(c,Ut(d))])}));if(!ae(i,a))return!1;n=s,r=o}return!0},oG=e=>lG(qt(e),Zt()),lG=(e,t)=>{for(;;){const[n,r]=O(e,kk([fl(),Zt()],([s,a],o)=>{const[l,c]=a_(o);return[O(s,lh(l)),O(a,Ut(c))]})),i=Lk(n)>0?O(t,Rn(n)):t;if(Ob(r))return Vs(i);e=r,t=i}throw new Error(vb("Cause.flattenCauseLoop"))},jk=x(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 bu:case yu:{n.push(r.right),n.push(r.left);break}}break}case"Some":return i}}return K()}),a_=e=>{let t=e;const n=[];let r=fl(),i=Zt();for(;t!==void 0;)switch(t._tag){case dl:{if(n.length===0)return[r,i];t=n.pop();break}case $l:{if(r=Td(r,BS(t._tag,t.error)),n.length===0)return[r,i];t=n.pop();break}case Wu:{if(r=Td(r,BS(t._tag,t.defect)),n.length===0)return[r,i];t=n.pop();break}case Zu:{if(r=Td(r,BS(t._tag,t.fiberId)),n.length===0)return[r,i];t=n.pop();break}case bu:{switch(t.left._tag){case dl:{t=t.right;break}case bu:{t=Cn(t.left.left,Cn(t.left.right,t.right));break}case yu:{t=to(Cn(t.left.left,t.right),Cn(t.left.right,t.right));break}default:{i=Rn(i,t.right),t=t.left;break}}break}case yu:{n.push(t.right),t=t.left;break}}throw new Error(vb("Cause.evaluateCauseLoop"))},cG={emptyCase:tO,failCase:$a,dieCase:$a,interruptCase:tO,sequentialCase:(e,t,n)=>t&&n,parallelCase:(e,t,n)=>t&&n},cO="SequentialCase",uO="ParallelCase",Pk=x(2,(e,{onDie:t,onEmpty:n,onFail:r,onInterrupt:i,onParallel:s,onSequential:a})=>Lb(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)})),vu=x(3,(e,t,n)=>{let r=t,i=e;const s=[];for(;i!==void 0;){const a=n(r,i);switch(r=St(a)?a.value:r,i._tag){case bu:{s.push(i.right),i=i.left;break}case yu:{s.push(i.right),i=i.left;break}default:{i=void 0;break}}i===void 0&&s.length>0&&(i=s.pop())}return r}),Lb=x(3,(e,t,n)=>{const r=[e],i=[];for(;r.length>0;){const a=r.pop();switch(a._tag){case dl:{i.push(de(n.emptyCase(t)));break}case $l:{i.push(de(n.failCase(t,a.error)));break}case Wu:{i.push(de(n.dieCase(t,a.defect)));break}case Zu:{i.push(de(n.interruptCase(t,a.fiberId)));break}case bu:{r.push(a.right),r.push(a.left),i.push(me({_tag:cO}));break}case yu:{r.push(a.right),r.push(a.left),i.push(me({_tag:uO}));break}}}const s=[];for(;i.length>0;){const a=i.pop();switch(a._tag){case"Left":{switch(a.left._tag){case cO:{const o=s.pop(),l=s.pop(),c=n.sequentialCase(t,o,l);s.push(c);break}case uO:{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()}),tf=(e,t)=>$b(e)?"All fibers interrupted without errors.":oF(e).map(function(n){return(t==null?void 0:t.renderErrorCause)!==!0||n.cause===void 0?n.stack:`${n.stack} {
|
|
53
|
+
${aF(n.cause," ")}
|
|
54
|
+
}`}).join(`
|
|
55
|
+
`),aF=(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
|
+
${aF(e.cause,`${t} `)}
|
|
59
|
+
${t}}`),r};class Kg extends globalThis.Error{constructor(n){const r=typeof n=="object"&&n!==null,i=Error.stackTraceLimit;Error.stackTraceLimit=1;super(uG(n),r&&"cause"in n&&typeof n.cause<"u"?{cause:new Kg(n.cause)}:void 0);g(this,"span");this.message===""&&(this.message="An error has occurred"),Error.stackTraceLimit=i,this.name=n instanceof Error?n.name:"Error",r&&(Su in n&&(this.span=n[Su]),Object.keys(n).forEach(s=>{s in this||(this[s]=n[s])})),this.stack=dG(`${this.name}: ${this.message}`,n instanceof Error&&n.stack?n.stack:"",this.span)}}const uG=e=>{if(typeof e=="string")return e;if(typeof e=="object"&&e!==null&&e instanceof Error)return e.message;try{if(ue(e,"toString")&&Vu(e.toString)&&e.toString!==Object.prototype.toString&&e.toString!==globalThis.Array.prototype.toString)return e.toString()}catch{}return Z$(e)},fG=/\((.*)\)/g,Gg=pe("effect/Tracer/spanToTrace",()=>new WeakMap),dG=(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=Gg.get(s);if(typeof o=="function"){const l=o();if(typeof l=="string"){const c=l.matchAll(fG);let u=!1;for(const[,f]of c)u=!0,r.push(` at ${s.name} (${f})`);u||r.push(` at ${s.name} (${l.replace(/^at /,"")})`)}else r.push(` at ${s.name}`)}else r.push(` at ${s.name}`);s=Ni(s.parent),a++}}return r.join(`
|
|
62
|
+
`)},Su=Symbol.for("effect/SpanAnnotation"),oF=e=>Lb(e,void 0,{emptyCase:()=>[],dieCase:(t,n)=>[new Kg(n)],failCase:(t,n)=>[new Kg(n)],interruptCase:()=>[],parallelCase:(t,n,r)=>[...n,...r],sequentialCase:(t,n,r)=>[...n,...r]}),o_=Symbol.for("effect/Duration"),lF=BigInt(0),fO=BigInt(24),Jm=BigInt(60),l_=BigInt(1e3),dO=BigInt(1e6),hO=BigInt(1e9),hG=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,Xr=e=>{if(cF(e))return e;if(Hs(e))return _u(e);if(bb(e))return HS(e);if(Array.isArray(e)&&e.length===2&&e.every(Hs))return e[0]===-1/0||e[1]===-1/0||Number.isNaN(e[0])||Number.isNaN(e[1])?wu:e[0]===1/0||e[1]===1/0?yG:HS(BigInt(Math.round(e[0]*1e9))+BigInt(Math.round(e[1])));if(Qr(e)){const t=hG.exec(e);if(t){const[n,r,i]=t,s=Number(r);switch(i){case"nano":case"nanos":return HS(BigInt(r));case"micro":case"micros":return bG(BigInt(r));case"milli":case"millis":return _u(s);case"second":case"seconds":return fF(s);case"minute":case"minutes":return vG(s);case"hour":case"hours":return SG(s);case"day":case"days":return wG(s);case"week":case"weeks":return _G(s)}}}throw new Error("Invalid DurationInput")},mO={_tag:"Millis",millis:0},mG={_tag:"Infinity"},pG={[o_]:o_,[be](){return tt(this,X$(this.value))},[ve](e){return cF(e)&&OG(this,e)},toString(){return`Duration(${MG(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:kG(this)};case"Infinity":return{_id:"Duration",_tag:"Infinity"}}},[Pe](){return this.toJSON()},pipe(){return re(this,arguments)}},rs=e=>{const t=Object.create(pG);return Hs(e)?isNaN(e)||e<=0?t.value=mO:Number.isFinite(e)?Number.isInteger(e)?t.value={_tag:"Millis",millis:e}:t.value={_tag:"Nanos",nanos:BigInt(Math.round(e*1e6))}:t.value=mG:e<=lF?t.value=mO:t.value={_tag:"Nanos",nanos:e},t},cF=e=>ue(e,o_),uF=e=>e.value._tag!=="Infinity",gG=e=>{switch(e.value._tag){case"Millis":return e.value.millis===0;case"Nanos":return e.value.nanos===lF;case"Infinity":return!1}},wu=rs(0),yG=rs(1/0),HS=e=>rs(e),bG=e=>rs(e*l_),_u=e=>rs(e),fF=e=>rs(e*1e3),vG=e=>rs(e*6e4),SG=e=>rs(e*36e5),wG=e=>rs(e*864e5),_G=e=>rs(e*6048e5),Yg=e=>EG(e,{onMillis:t=>t,onNanos:t=>Number(t)/1e6}),xG=e=>{const t=Xr(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))}},kG=e=>{const t=Xr(e);switch(t.value._tag){case"Infinity":return[1/0,0];case"Nanos":return[Number(t.value.nanos/hO),Number(t.value.nanos%hO)];case"Millis":return[Math.floor(t.value.millis/1e3),Math.round(t.value.millis%1e3*1e6)]}},EG=x(2,(e,t)=>{const n=Xr(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)}}),Uk=x(3,(e,t,n)=>{const r=Xr(e),i=Xr(t);if(r.value._tag==="Infinity"||i.value._tag==="Infinity")return n.onMillis(Yg(r),Yg(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)}),CG=(e,t)=>Uk(e,t,{onMillis:(n,r)=>n===r,onNanos:(n,r)=>n===r}),TG=x(2,(e,t)=>Uk(e,t,{onMillis:(n,r)=>n<=r,onNanos:(n,r)=>n<=r})),AG=x(2,(e,t)=>Uk(e,t,{onMillis:(n,r)=>n>=r,onNanos:(n,r)=>n>=r})),OG=x(2,(e,t)=>CG(Xr(e),Xr(t))),RG=e=>{const t=Xr(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=xG(t),r=n/dO,i=r/l_,s=i/Jm,a=s/Jm,o=a/fO;return{days:Number(o),hours:Number(a%fO),minutes:Number(s%Jm),seconds:Number(i%Jm),millis:Number(r%l_),nanos:Number(n%dO)}},MG=e=>{const t=Xr(e);if(t.value._tag==="Infinity")return"Infinity";if(gG(t))return"0";const n=RG(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(" ")},pO=Symbol.for("effect/MutableRef"),NG={[pO]:pO,toString(){return it(this.toJSON())},toJSON(){return{_id:"MutableRef",current:vt(this.current)}},[Pe](){return this.toJSON()},pipe(){return re(this,arguments)}},Jh=e=>{const t=Object.create(NG);return t.current=e,t},DG=x(3,(e,t,n)=>ae(t,e.current)?(e.current=n,!0):!1),Gt=e=>e.current,Qh=x(2,(e,t)=>(e.current=t,e)),Fb="effect/FiberId",ml=Symbol.for(Fb),xu="None",c_="Runtime",u_="Composite",zG=ht(`${Fb}-${xu}`);var SN;let IG=class{constructor(){g(this,SN,ml);g(this,"_tag",xu);g(this,"id",-1);g(this,"startTimeMillis",-1)}[(SN=ml,be)](){return zG}[ve](t){return Bk(t)&&t._tag===xu}toString(){return it(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag}}[Pe](){return this.toJSON()}};var wN;class dF{constructor(t,n){g(this,"id");g(this,"startTimeMillis");g(this,wN,ml);g(this,"_tag",c_);this.id=t,this.startTimeMillis=n}[(wN=ml,be)](){return tt(this,ht(`${Fb}-${this._tag}-${this.id}-${this.startTimeMillis}`))}[ve](t){return Bk(t)&&t._tag===c_&&this.id===t.id&&this.startTimeMillis===t.startTimeMillis}toString(){return it(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,id:this.id,startTimeMillis:this.startTimeMillis}}[Pe](){return this.toJSON()}}var _N;let $G=class{constructor(t,n){g(this,"left");g(this,"right");g(this,_N,ml);g(this,"_tag",u_);g(this,"_hash");this.left=t,this.right=n}[(_N=ml,be)](){return O(ht(`${Fb}-${this._tag}`),Se(ne(this.left)),Se(ne(this.right)),tt(this))}[ve](t){return Bk(t)&&t._tag===u_&&ae(this.left,t.left)&&ae(this.right,t.right)}toString(){return it(this.toJSON())}toJSON(){return{_id:"FiberId",_tag:this._tag,left:vt(this.left),right:vt(this.right)}}[Pe](){return this.toJSON()}};const hF=new IG,Bk=e=>ue(e,ml),mF=x(2,(e,t)=>e._tag===xu?t:t._tag===xu?e:new $G(e,t)),LG=e=>O(e,ch(hF,(t,n)=>mF(n)(t))),Jg=e=>{switch(e._tag){case xu:return fl();case c_:return $k(e.id);case u_:return O(Jg(e.left),lh(Jg(e.right)))}},gO=pe(Symbol.for("effect/Fiber/Id/_fiberCounter"),()=>Jh(0)),FG=(e,t)=>new dF(e,t),pF=e=>Array.from(Jg(e)).map(n=>`#${n}`).join(","),jG=()=>{const e=Gt(gO);return O(gO,Qh(e+1)),new dF(e,Date.now())},Sr=hF,Ad=mF,PG=LG,gF=Jg,UG=FG,BG=pF,yF=jG,jb=Nb,HG=OK,qG=MK,bF=NK,vF=ah,SF=VL,VG=Dk,KG=LK,GG=GL,wF=Db,uh=Symbol.for("effect/List"),f_=e=>Ye(e),YG=e=>gL(Tb(e),f_),JG=YG(ae),QG={[uh]:uh,_tag:"Cons",toString(){return it(this.toJSON())},toJSON(){return{_id:"List",_tag:"Cons",values:f_(this).map(vt)}},[Pe](){return this.toJSON()},[ve](e){return xF(e)&&this._tag===e._tag&&JG(this,e)},[be](){return tt(this,Ku(f_(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 re(this,arguments)}},Qg=(e,t)=>{const n=Object.create(QG);return n.head=e,n.tail=t,n},XG=ht("Nil"),WG={[uh]:uh,_tag:"Nil",toString(){return it(this.toJSON())},toJSON(){return{_id:"List",_tag:"Nil"}},[Pe](){return this.toJSON()},[be](){return XG},[ve](e){return xF(e)&&this._tag===e._tag},[Symbol.iterator](){return{next(){return{done:!0,value:void 0}}}},pipe(){return re(this,arguments)}},_F=Object.create(WG),xF=e=>ue(e,uh),Ls=e=>e._tag==="Nil",ZG=e=>e._tag==="Cons",eY=()=>_F,pl=(e,t)=>Qg(e,t),ku=eY,Hk=e=>Qg(e,_F),tY=x(2,(e,t)=>rY(t,e)),nY=x(2,(e,t)=>pl(t,e)),rY=x(2,(e,t)=>{if(Ls(e))return t;if(Ls(t))return e;{const n=Qg(t.head,e);let r=n,i=t.tail;for(;!Ls(i);){const s=Qg(i.head,e);r.tail=s,r=s,i=i.tail}return n}}),iY=x(3,(e,t,n)=>{let r=t,i=e;for(;!Ls(i);)r=n(r,i.head),i=i.tail;return r}),sY=e=>{let t=ku(),n=e;for(;!Ls(n);)t=nY(t,n.head),n=n.tail;return t},aY=Object.assign(Object.create(Array.prototype),{[be](){return tt(this,Ku(this))},[ve](e){return Array.isArray(e)&&this.length===e.length?this.every((t,n)=>ae(t,e[n])):!1}}),Xh=function(){function e(t){t&&Object.assign(this,t)}return e.prototype=Eb,e}(),oY=e=>Object.assign(Object.create(Eb),e),lY=Symbol.for("effect/DifferContextPatch");function yO(e){return e}const Wh={...Xh.prototype,[lY]:{_Value:yO,_Patch:yO}},cY=Object.assign(Object.create(Wh),{_tag:"Empty"}),uY=Object.create(cY),kF=()=>uY,fY=Object.assign(Object.create(Wh),{_tag:"AndThen"}),dY=(e,t)=>{const n=Object.create(fY);return n.first=e,n.second=t,n},hY=Object.assign(Object.create(Wh),{_tag:"AddService"}),mY=(e,t)=>{const n=Object.create(hY);return n.key=e,n.service=t,n},pY=Object.assign(Object.create(Wh),{_tag:"RemoveService"}),gY=e=>{const t=Object.create(pY);return t.key=e,t},yY=Object.assign(Object.create(Wh),{_tag:"UpdateService"}),bY=(e,t)=>{const n=Object.create(yY);return n.key=e,n.update=t,n},vY=(e,t)=>{const n=new Map(e.unsafeMap);let r=kF();for(const[i,s]of t.unsafeMap.entries())if(n.has(i)){const a=n.get(i);n.delete(i),ae(a,s)||(r=Lp(bY(i,()=>s))(r))}else n.delete(i),r=Lp(mY(i,s))(r);for(const[i]of n.entries())r=Lp(gY(i))(r);return r},Lp=x(2,(e,t)=>dY(e,t)),SY=x(2,(e,t)=>{if(e._tag==="Empty")return t;let n=!1,r=qt(e);const i=new Map(t.unsafeMap);for(;Ks(r);){const a=Fi(r),o=Os(r);switch(a._tag){case"Empty":{r=o;break}case"AddService":{i.set(a.key,a.service),r=o;break}case"AndThen":{r=Rn(Rn(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 Xa(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 Xa(s)}),wY=Symbol.for("effect/DifferHashSetPatch");function qS(e){return e}const Pb={...Xh.prototype,[wY]:{_Value:qS,_Key:qS,_Patch:qS}},_Y=Object.assign(Object.create(Pb),{_tag:"Empty"}),xY=Object.create(_Y),EF=()=>xY,kY=Object.assign(Object.create(Pb),{_tag:"AndThen"}),EY=(e,t)=>{const n=Object.create(kY);return n.first=e,n.second=t,n},CY=Object.assign(Object.create(Pb),{_tag:"Add"}),TY=e=>{const t=Object.create(CY);return t.value=e,t},AY=Object.assign(Object.create(Pb),{_tag:"Remove"}),OY=e=>{const t=Object.create(AY);return t.value=e,t},RY=(e,t)=>{const[n,r]=ch([e,EF()],([i,s],a)=>XL(a)(i)?[WL(a)(i),s]:[i,d_(TY(a))(s)])(t);return ch(r,(i,s)=>d_(OY(s))(i))(n)},d_=x(2,(e,t)=>EY(e,t)),MY=x(2,(e,t)=>{if(e._tag==="Empty")return t;let n=t,r=qt(e);for(;Ks(r);){const i=Fi(r),s=Os(r);switch(i._tag){case"Empty":{r=s;break}case"AndThen":{r=Rn(i.first)(Rn(i.second)(s));break}case"Add":{n=Td(i.value)(n),r=s;break}case"Remove":n=WL(i.value)(n),r=s}}return n}),NY=Symbol.for("effect/DifferReadonlyArrayPatch");function bO(e){return e}const Zh={...Xh.prototype,[NY]:{_Value:bO,_Patch:bO}},DY=Object.assign(Object.create(Zh),{_tag:"Empty"}),zY=Object.create(DY),CF=()=>zY,IY=Object.assign(Object.create(Zh),{_tag:"AndThen"}),$Y=(e,t)=>{const n=Object.create(IY);return n.first=e,n.second=t,n},LY=Object.assign(Object.create(Zh),{_tag:"Append"}),FY=e=>{const t=Object.create(LY);return t.values=e,t},jY=Object.assign(Object.create(Zh),{_tag:"Slice"}),PY=(e,t)=>{const n=Object.create(jY);return n.from=e,n.until=t,n},UY=Object.assign(Object.create(Zh),{_tag:"Update"}),BY=(e,t)=>{const n=Object.create(UY);return n.index=e,n.patch=t,n},HY=e=>{let t=0,n=CF();for(;t<e.oldValue.length&&t<e.newValue.length;){const r=e.oldValue[t],i=e.newValue[t],s=e.differ.diff(r,i);ae(s,e.differ.empty)||(n=Fp(n,BY(t,s))),t=t+1}return t<e.oldValue.length&&(n=Fp(n,PY(0,t))),t<e.newValue.length&&(n=Fp(n,FY(eK(t)(e.newValue)))),n},Fp=x(2,(e,t)=>$Y(e,t)),qY=x(3,(e,t,n)=>{if(e._tag==="Empty")return t;let r=t.slice(),i=si(e);for(;Uc(i);){const s=Un(i),a=cl(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}),VY=Symbol.for("effect/Differ"),KY={[VY]:{_P:ge,_V:ge},pipe(){return re(this,arguments)}},nf=e=>{const t=Object.create(KY);return t.empty=e.empty,t.diff=e.diff,t.combine=e.combine,t.patch=e.patch,t},GY=()=>nf({empty:kF(),combine:(e,t)=>Lp(t)(e),diff:(e,t)=>vY(e,t),patch:(e,t)=>SY(t)(e)}),YY=()=>nf({empty:EF(),combine:(e,t)=>d_(t)(e),diff:(e,t)=>RY(e,t),patch:(e,t)=>MY(t)(e)}),JY=e=>nf({empty:CF(),combine:(t,n)=>Fp(t,n),diff:(t,n)=>HY({oldValue:t,newValue:n,differ:e}),patch:(t,n)=>qY(t,n,e)}),TF=()=>QY((e,t)=>t),QY=e=>nf({empty:ge,combine:(t,n)=>t===ge?n:n===ge?t:r=>n(t(r)),diff:(t,n)=>ae(t,n)?ge:yb(n),patch:(t,n)=>e(n,t(n))}),fh=255,AF=8,h_=e=>e&fh,m_=e=>e>>AF&fh,em=(e,t)=>(e&fh)+((t&e&fh)<<AF),XY=em(0,0),WY=e=>em(e,e),ZY=e=>em(e,0),eJ=x(2,(e,t)=>em(h_(e)&~t,m_(e))),tJ=x(2,(e,t)=>e|t),nJ=e=>~e>>>0&fh,rJ=0,Ll=1,iJ=2,OF=4,p_=16,RF=32,sJ=e=>Ub(e,RF),aJ=x(2,(e,t)=>e&~t),oJ=x(2,(e,t)=>e|t),ha=e=>MF(e)&&!cJ(e),MF=e=>Ub(e,Ll),Ub=x(2,(e,t)=>(e&t)!==0),NF=(...e)=>e.reduce((t,n)=>t|n,0),lJ=NF(rJ),vO=e=>Ub(e,OF),cJ=e=>Ub(e,p_),Fa=x(2,(e,t)=>em(e^t,t)),Hc=x(2,(e,t)=>e&(nJ(h_(t))|m_(t))|h_(t)&m_(t)),SO=nf({empty:XY,diff:(e,t)=>Fa(e,t),combine:(e,t)=>tJ(t)(e),patch:(e,t)=>Hc(t,e)}),uJ=WY,DF=ZY,wO=eJ,zF=(e,t)=>({_tag:"Par",left:e,right:t}),Qm=(e,t)=>({_tag:"Seq",left:e,right:t}),fJ=e=>{let t=Hk(e),n=ku();for(;;){const[r,i]=iY(t,[IF(),ku()],([s,a],o)=>{const[l,c]=dJ(o);return[yJ(s,l),tY(a,c)]});if(n=hJ(n,r),Ls(i))return sY(n);t=i}throw new Error("BUG: BlockedRequests.flatten - please report an issue at https://github.com/Effect-TS/effect/issues")},dJ=e=>{let t=e,n=IF(),r=ku(),i=ku();for(;;)switch(t._tag){case"Empty":{if(Ls(r))return[n,i];t=r.head,r=r.tail;break}case"Par":{r=pl(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=zF(Qm(o,a),Qm(l,a));break}case"Seq":{const o=s.left,l=s.right;t=Qm(o,Qm(l,a));break}case"Single":{t=s,i=pl(a,i);break}}break}case"Single":{if(n=gJ(n,t),Ls(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")},hJ=(e,t)=>{if(Ls(e))return Hk(VS(t));if(bJ(t))return e;const n=kJ(e.head),r=vJ(t);return n.length===1&&r.length===1&&ae(n[0],r[0])?pl(xJ(e.head,VS(t)),e.tail):pl(VS(t),e)},mJ=Symbol.for("effect/RequestBlock/RequestBlockParallel"),pJ={_R:e=>e};var xN;xN=mJ;class qk{constructor(t){g(this,"map");g(this,xN,pJ);this.map=t}}const IF=()=>new qk(jb()),gJ=(e,t)=>new qk(VG(e.map,t.dataSource,n=>M7(Br(n,n_(t.blockedRequest)),()=>qt(t.blockedRequest)))),yJ=(e,t)=>new qk(wF(e.map,t.map,(n,r,i)=>vF(n,i,Nt(bF(n,i),{onNone:()=>r,onSome:s=>Ut(r,s)})))),bJ=e=>qG(e.map),vJ=e=>Array.from(SF(e.map)),VS=e=>_J(KG(e.map,t=>qt(t))),SJ=Symbol.for("effect/RequestBlock/RequestBlockSequential"),wJ={_R:e=>e};var kN;kN=SJ;class $F{constructor(t){g(this,"map");g(this,kN,wJ);this.map=t}}const _J=e=>new $F(e),xJ=(e,t)=>new $F(wF(t.map,e.map,(n,r,i)=>vF(n,i,Nt(bF(n,i),{onNone:()=>Zt(),onSome:s=>Ut(s,r)})))),kJ=e=>Array.from(SF(e.map)),EJ=e=>Array.from(e.map),tm="Pending",Bb="Done",CJ="effect/Deferred",TJ=Symbol.for(CJ),AJ={_E:e=>e,_A:e=>e},OJ=e=>({_tag:tm,joiners:e}),LF=e=>({_tag:Bb,effect:e});class nm{constructor(t){g(this,"self");g(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 nm(this.self)}}const FF=(e,t)=>{const n=new Vt("Blocked");return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n},RJ=e=>{const t=new Vt("RunBlocked");return t.effect_instruction_i0=e,t},gl=Symbol.for("effect/Effect");class MJ{constructor(t,n){g(this,"patch");g(this,"op");g(this,"_op",mk);this.patch=t,this.op=n}}var EN;class Vt{constructor(t){g(this,"_op");g(this,"effect_instruction_i0");g(this,"effect_instruction_i1");g(this,"effect_instruction_i2");g(this,"trace");g(this,EN,mu);this._op=t}[(EN=gl,ve)](t){return this===t}[be](){return tt(this,uk(this))}pipe(){return re(this,arguments)}toJSON(){return{_id:"Effect",_op:this._op,effect_instruction_i0:vt(this.effect_instruction_i0),effect_instruction_i1:vt(this.effect_instruction_i1),effect_instruction_i2:vt(this.effect_instruction_i2)}}toString(){return it(this.toJSON())}[Pe](){return this.toJSON()}[Symbol.iterator](){return new nm(new Kh(this))}}var CN;class jF{constructor(t){g(this,"_op");g(this,"effect_instruction_i0");g(this,"effect_instruction_i1");g(this,"effect_instruction_i2");g(this,"trace");g(this,CN,mu);this._op=t,this._tag=t}[(CN=gl,ve)](t){return Wb(t)&&t._op==="Failure"&&ae(this.effect_instruction_i0,t.effect_instruction_i0)}[be](){return O(ht(this._tag),Se(ne(this.effect_instruction_i0)),tt(this))}get cause(){return this.effect_instruction_i0}pipe(){return re(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,cause:this.cause.toJSON()}}toString(){return it(this.toJSON())}[Pe](){return this.toJSON()}[Symbol.iterator](){return new nm(new Kh(this))}}var TN;class PF{constructor(t){g(this,"_op");g(this,"effect_instruction_i0");g(this,"effect_instruction_i1");g(this,"effect_instruction_i2");g(this,"trace");g(this,TN,mu);this._op=t,this._tag=t}[(TN=gl,ve)](t){return Wb(t)&&t._op==="Success"&&ae(this.effect_instruction_i0,t.effect_instruction_i0)}[be](){return O(ht(this._tag),Se(ne(this.effect_instruction_i0)),tt(this))}get value(){return this.effect_instruction_i0}pipe(){return re(this,arguments)}toJSON(){return{_id:"Exit",_tag:this._op,value:vt(this.value)}}toString(){return it(this.toJSON())}[Pe](){return this.toJSON()}[Symbol.iterator](){return new nm(new Kh(this))}}const Xs=e=>ue(e,gl),Be=e=>{const t=new Vt(nL);return t.effect_instruction_i0=e,t},UF=x(3,(e,t,n)=>Si(r=>B(e,i=>B(ja(Te(()=>r(t(i)))),s=>Te(()=>n(i,s)).pipe(Wr({onFailure:a=>{switch(s._tag){case ln:return en(Cn(s.effect_instruction_i0,a));case cn:return en(a)}},onSuccess:()=>s})))))),Hn=x(2,(e,t)=>B(e,()=>Z(t))),Zr=e=>Hn(e,void 0),BF=function(){const e=new Vt(kb);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(vb("you're not supposed to end up here"))}return e},Xg=(e,t=Sr)=>{const n=new Vt(kd);let r;return n.effect_instruction_i0=i=>{r=e(i)},n.effect_instruction_i1=t,im(n,i=>Xs(r)?r:et)},ka=(e,t=Sr)=>Te(()=>Xg(e,t)),vi=(e,t=Sr)=>BF(e,function(){let n,r;function i(l){n?n(l):r===void 0&&(r=l)}const s=new Vt(kd);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=pn(()=>this.effect_instruction_i0(i,o.signal))):a=pn(()=>this.effect_instruction_i0(i)),a||o?im(s,l=>(o&&o.abort(),a??et)):s}),HF=x(2,(e,t)=>{const n=new Vt(zp);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),dh=x(2,(e,t)=>no(e,{onFailure:t,onSuccess:Z})),_O=Symbol.for("effect/OriginalAnnotation"),Vk=(e,t)=>St(t)?new Proxy(e,{has(n,r){return r===Su||r===_O||r in n},get(n,r){return r===Su?t.value:r===_O?e:n[r]}}):e,Ea=e=>bi(e)&&!(Su in e)?Be(t=>en(Gr(Vk(e,oE(t))))):en(Gr(e)),qF=e=>VF(()=>Gr(new uQ(e))),Eu=e=>no(e,{onFailure:t=>Z(me(t)),onSuccess:t=>Z(de(t))}),ja=e=>KF(e,{onFailure:Xe,onSuccess:Ze}),At=e=>bi(e)&&!(Su in e)?Be(t=>en(hl(Vk(e,oE(t))))):en(hl(e)),Hb=e=>B(V(e),At),en=e=>{const t=new jF(ln);return t.effect_instruction_i0=e,t},VF=e=>B(V(e),en),qb=Be(e=>Z(e.id())),rm=e=>Be(t=>e(t.id())),B=x(2,(e,t)=>{const n=new Vt(Fg);return n.effect_instruction_i0=e,n.effect_instruction_i1=t,n}),NJ=e=>{const t=new Vt("OnStep");return t.effect_instruction_i0=e,t},Vb=e=>B(e,ge),KF=x(2,(e,t)=>Wr(e,{onFailure:n=>Z(t.onFailure(n)),onSuccess:n=>Z(t.onSuccess(n))})),Wr=x(2,(e,t)=>{const n=new Vt(jg);return n.effect_instruction_i0=e,n.effect_instruction_i1=t.onFailure,n.effect_instruction_i2=t.onSuccess,n}),no=x(2,(e,t)=>Wr(e,{onFailure:n=>{if(rF(n).length>0)return en(rG(n));const i=tG(n);return i.length>0?t.onFailure(Tk(i)):en(n)},onSuccess:t.onSuccess})),Rs=x(2,(e,t)=>Te(()=>{const n=Ye(e),r=Cb(n.length);let i=0;return Hn(Qk({while:()=>i<n.length,body:()=>t(n[i],i),step:s=>{r[i++]=s}}),r)})),Kb=x(2,(e,t)=>Te(()=>{const n=Ye(e);let r=0;return Qk({while:()=>r<n.length,body:()=>t(n[r],r),step:()=>{r++}})})),vs=B(qb,e=>GF(e)),GF=e=>en(ci(e)),Kk=e=>{const t=new Vt(Gu);return t.effect_instruction_i0=uJ(Ll),t.effect_instruction_i1=()=>e,t},YF=x(2,(e,t)=>Si(n=>B(ja(n(e)),r=>uj(t,r)))),Ae=x(2,(e,t)=>B(e,n=>V(()=>t(n)))),Gk=x(2,(e,t)=>no(e,{onFailure:n=>Hb(()=>t.onFailure(n)),onSuccess:n=>V(()=>t.onSuccess(n))})),Gb=x(2,(e,t)=>Wr(e,{onFailure:n=>{const r=sF(n);switch(r._tag){case"Left":return Hb(()=>t(r.left));case"Right":return en(r.right)}},onSuccess:Z})),yl=x(2,(e,t)=>Si(n=>Wr(n(e),{onFailure:r=>{const i=Xe(r);return Wr(t(i),{onFailure:s=>Xe(Cn(r,s)),onSuccess:()=>i})},onSuccess:r=>{const i=Ze(r);return Et(t(i),i)}}))),im=x(2,(e,t)=>yl(e,Zb({onFailure:n=>$b(n)?Zr(t(Fk(n))):et,onSuccess:()=>et}))),DJ=e=>zJ(e,ge),zJ=x(2,(e,t)=>no(e,{onFailure:n=>Ea(t(n)),onSuccess:Z})),IJ=Be((e,t)=>Z(t.runtimeFlags)),Z=e=>{const t=new PF(cn);return t.effect_instruction_i0=e,t},Te=e=>{const t=new Vt(kb);return t.commit=e,t},V=e=>{const t=new Vt(tL);return t.effect_instruction_i0=e,t},Yk=x(e=>e.length===3||e.length===2&&!(bi(e[1])&&"onlyEffect"in e[1]),(e,t)=>B(e,n=>{const r=typeof t=="function"?t(n):t;return Xs(r)?Hn(r,n):gV(r)?Xg(i=>{r.then(s=>i(Z(n)),s=>i(At(new nE(s,"An unknown error occurred in Effect.tap"))))}):Z(n)})),$J=e=>Be(t=>{const n=t.getFiberRef(b_),r=O(n,wt(()=>t.scope()));return e(rf(b_,ee(r)))}),sm=e=>{const t=new Vt(Gu);return t.effect_instruction_i0=DF(Ll),t.effect_instruction_i1=()=>e,t},Si=e=>BF(e,function(){const t=new Vt(Gu);return t.effect_instruction_i0=DF(Ll),t.effect_instruction_i1=n=>MF(n)?pn(()=>this.effect_instruction_i0(Kk)):pn(()=>this.effect_instruction_i0(sm)),t}),et=Z(void 0),JF=e=>{const t=new Vt(Gu);return t.effect_instruction_i0=e,t.effect_instruction_i1=void 0,t},Jk=x(2,(e,t)=>B(t,n=>n?O(e,Ae(ee)):Z(K()))),Qk=e=>{const t=new Vt(Pg);return t.effect_instruction_i0=e.while,t.effect_instruction_i1=e.body,t.effect_instruction_i2=e.step,t},g_=e=>Te(()=>{const t=new Vt(Ed);return t.effect_instruction_i0=e(),t}),QF=function(){const e=arguments.length===1?arguments[0]:arguments[1].bind(arguments[0]);return g_(()=>e(O))},XF=(e,...t)=>Object.defineProperty(t.length===0?function(...n){return g_(()=>e.apply(this,n))}:function(...n){let r=g_(()=>e.apply(this,n));for(const i of t)r=i(r,...n);return r},"length",{value:e.length,configurable:!0}),LJ=x(2,(e,t)=>{const n=new Vt(Gu);return n.effect_instruction_i0=t,n.effect_instruction_i1=()=>e,n}),Xk=e=>{const t=new Vt(Ip);return typeof(e==null?void 0:e.priority)<"u"?tQ(t,e.priority):t},Yb=x(2,(e,t)=>B(e,n=>Ae(t,r=>[n,r]))),Jb=x(2,(e,t)=>B(e,n=>Hn(t,n))),Et=x(2,(e,t)=>B(e,()=>t)),WF=x(3,(e,t,n)=>B(e,r=>Ae(t,i=>n(r,i)))),FJ=ka(()=>{const e=setInterval(()=>{},2147483647);return V(()=>clearInterval(e))}),Wk=e=>B(qb,t=>O(e,hh(t))),hh=x(2,(e,t)=>B(e.interruptAsFork(t),()=>e.await)),jJ={_tag:"All",syslog:0,label:"ALL",ordinal:Number.MIN_SAFE_INTEGER,pipe(){return re(this,arguments)}},PJ={_tag:"Fatal",syslog:2,label:"FATAL",ordinal:5e4,pipe(){return re(this,arguments)}},UJ={_tag:"Error",syslog:3,label:"ERROR",ordinal:4e4,pipe(){return re(this,arguments)}},ZF={_tag:"Warning",syslog:4,label:"WARN",ordinal:3e4,pipe(){return re(this,arguments)}},ej={_tag:"Info",syslog:6,label:"INFO",ordinal:2e4,pipe(){return re(this,arguments)}},tj={_tag:"Debug",syslog:7,label:"DEBUG",ordinal:1e4,pipe(){return re(this,arguments)}},BJ={_tag:"Trace",syslog:7,label:"TRACE",ordinal:0,pipe(){return re(this,arguments)}},HJ={_tag:"None",syslog:7,label:"OFF",ordinal:Number.MAX_SAFE_INTEGER,pipe(){return re(this,arguments)}},qJ="effect/FiberRef",VJ=Symbol.for(qJ),KJ={_A:e=>e},Zk=e=>Be(t=>Ze(t.getFiberRef(e))),Qb=x(2,(e,t)=>B(Zk(e),t)),xO=x(2,(e,t)=>GJ(e,()=>[void 0,t])),GJ=x(2,(e,t)=>Be(n=>{const[r,i]=t(n.getFiberRef(e));return n.setFiberRef(e,i),Z(r)})),rf=x(3,(e,t,n)=>UF(Jb(Zk(t),xO(t,n)),()=>e,r=>xO(t,r))),YJ=x(3,(e,t,n)=>Qb(t,r=>rf(e,t,n(r)))),tn=(e,t)=>sf(e,{differ:TF(),fork:(t==null?void 0:t.fork)??ge,join:t==null?void 0:t.join}),JJ=e=>{const t=YY();return sf(e,{differ:t,fork:t.empty})},QJ=e=>{const t=JY(TF());return sf(e,{differ:t,fork:t.empty})},nj=e=>{const t=GY();return sf(e,{differ:t,fork:t.empty})},sf=(e,t)=>({...Yh,[VJ]:KJ,initial:e,commit(){return Zk(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)}),XJ=e=>sf(e,{differ:SO,fork:SO.empty}),is=pe(Symbol.for("effect/FiberRef/currentContext"),()=>nj(Qi())),af=pe(Symbol.for("effect/FiberRef/currentSchedulingPriority"),()=>tn(0)),rj=pe(Symbol.for("effect/FiberRef/currentMaxOpsBeforeYield"),()=>tn(2048)),WJ=pe(Symbol.for("effect/FiberRef/currentLogAnnotation"),()=>tn(jb())),ZJ=pe(Symbol.for("effect/FiberRef/currentLogLevel"),()=>tn(ej)),eQ=pe(Symbol.for("effect/FiberRef/currentLogSpan"),()=>tn(ku())),tQ=x(2,(e,t)=>rf(e,af,t)),nQ=pe(Symbol.for("effect/FiberRef/currentConcurrency"),()=>tn("unbounded")),rQ=pe(Symbol.for("effect/FiberRef/currentRequestBatching"),()=>tn(!0)),iQ=pe(Symbol.for("effect/FiberRef/currentUnhandledErrorLogLevel"),()=>tn(ee(tj))),sQ=pe(Symbol.for("effect/FiberRef/versionMismatchErrorLogLevel"),()=>tn(ee(ZF))),y_=pe(Symbol.for("effect/FiberRef/currentMetricLabels"),()=>QJ(Wa())),b_=pe(Symbol.for("effect/FiberRef/currentForkScopeOverride"),()=>tn(K(),{fork:()=>K(),join:(e,t)=>e})),Xm=pe(Symbol.for("effect/FiberRef/currentInterruptedCause"),()=>tn(eo,{fork:()=>eo,join:(e,t)=>e})),ij=pe(Symbol.for("effect/FiberRef/currentTracerEnabled"),()=>tn(!0)),sj=pe(Symbol.for("effect/FiberRef/currentTracerTiming"),()=>tn(!0)),aQ=pe(Symbol.for("effect/FiberRef/currentTracerSpanAnnotations"),()=>tn(jb())),oQ=pe(Symbol.for("effect/FiberRef/currentTracerSpanLinks"),()=>tn(Zt())),kO=Symbol.for("effect/Scope"),EO=Symbol.for("effect/CloseableScope"),aj=(e,t)=>e.addFinalizer(()=>Zr(t)),Wg=(e,t)=>e.addFinalizer(t),v_=(e,t)=>e.close(t),ks=(e,t)=>e.fork(t),lQ=e=>cQ(ge)(e),cQ=x(2,(e,t)=>{const n=O(e,iF,Br(t));switch(n._tag){case"None":return O(rF(e),Ck,Nt({onNone:()=>{const r=Ye(Fk(e)).flatMap(i=>Ye(gF(i)).map(s=>`#${s}`));return new fQ(r?`Interrupted by fibers: ${r.join(", ")}`:void 0)},onSome:ge}));case"Some":return n.value}}),eE=function(){class e extends globalThis.Error{commit(){return At(this)}toJSON(){const n={...this};return this.message&&(n.message=this.message),this.cause&&(n.cause=this.cause),n}[Pe](){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?tf(hl(this),{renderErrorCause:!0}):this}}return Object.assign(e.prototype,UV),e}(),tE=(e,t)=>{class n extends eE{constructor(){super(...arguments);g(this,"_tag",t)}}return Object.assign(n.prototype,e),n.prototype.name=t,n},CO=Symbol.for("effect/Cause/errors/RuntimeException"),uQ=tE({[CO]:CO},"RuntimeException"),S_=Symbol.for("effect/Cause/errors/InterruptedException"),fQ=tE({[S_]:S_},"InterruptedException"),dQ=e=>ue(e,S_),TO=Symbol.for("effect/Cause/errors/NoSuchElement"),Xb=tE({[TO]:TO},"NoSuchElementException"),AO=Symbol.for("effect/Cause/errors/UnknownException"),nE=function(){class e extends eE{constructor(r,i){super(i??"An unknown error occurred",{cause:r});g(this,"_tag","UnknownException");g(this,"error");this.error=r}}return Object.assign(e.prototype,{[AO]:AO,name:"UnknownException"}),e}(),Wb=e=>Xs(e)&&"_tag"in e&&(e._tag==="Success"||e._tag==="Failure"),oj=e=>e._tag==="Failure",hQ=e=>e._tag==="Success",jp=x(2,(e,t)=>{switch(e._tag){case ln:return Xe(e.effect_instruction_i0);case cn:return Ze(t)}}),KS=e=>jp(e,void 0),qc=(e,t)=>bQ(e,t!=null&&t.parallel?to:Cn),lj=e=>Xe(Gr(e)),mh=e=>Xe(hl(e)),Xe=e=>{const t=new jF(ln);return t.effect_instruction_i0=e,t},mQ=x(2,(e,t)=>{switch(e._tag){case ln:return Xe(e.effect_instruction_i0);case cn:return t(e.effect_instruction_i0)}}),pQ=e=>O(e,mQ(ge)),gQ=e=>Xe(ci(e)),Pp=x(2,(e,t)=>{switch(e._tag){case ln:return Xe(e.effect_instruction_i0);case cn:return Ze(t(e.effect_instruction_i0))}}),Zb=x(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case ln:return t(e.effect_instruction_i0);case cn:return n(e.effect_instruction_i0)}}),w_=x(2,(e,{onFailure:t,onSuccess:n})=>{switch(e._tag){case ln:return t(e.effect_instruction_i0);case cn:return n(e.effect_instruction_i0)}}),Ze=e=>{const t=new PF(cn);return t.effect_instruction_i0=e,t},Tn=Ze(void 0),yQ=x(2,(e,t)=>rE(e,t,{onSuccess:(n,r)=>[n,r],onFailure:Cn})),cj=x(2,(e,t)=>rE(e,t,{onSuccess:(n,r)=>r,onFailure:Cn})),rE=x(3,(e,t,{onFailure:n,onSuccess:r})=>{switch(e._tag){case ln:switch(t._tag){case cn:return Xe(e.effect_instruction_i0);case ln:return Xe(n(e.effect_instruction_i0,t.effect_instruction_i0))}case cn:switch(t._tag){case cn:return Ze(r(e.effect_instruction_i0,t.effect_instruction_i0));case ln:return Xe(t.effect_instruction_i0)}}}),bQ=(e,t)=>{const n=qs(e);return Ks(n)?O(Os(n),kk(O(Fi(n),Pp(qt)),(r,i)=>O(r,rE(i,{onSuccess:(s,a)=>O(s,Rn(a)),onFailure:t}))),Pp(Vs),Pp(r=>Bn(r)),ee):K()},ev=e=>({...Yh,[TJ]:AJ,state:Jh(OJ([])),commit(){return ro(this)},blockingOn:e}),tv=()=>B(qb,e=>vQ(e)),vQ=e=>V(()=>ev(e)),ro=e=>ka(t=>{const n=Gt(e.state);switch(n._tag){case Bb:return t(n.effect);case tm:return n.joiners.push(t),wQ(e,t)}},e.blockingOn),nv=x(2,(e,t)=>V(()=>{const n=Gt(e.state);switch(n._tag){case Bb:return!1;case tm:{Qh(e.state,LF(t));for(let r=0,i=n.joiners.length;r<i;r++)n.joiners[r](t);return!0}}})),uj=x(2,(e,t)=>nv(e,t)),fj=x(2,(e,t)=>nv(e,en(t))),dj=x(2,(e,t)=>nv(e,GF(t))),SQ=e=>V(()=>Gt(e.state)._tag===Bb),iE=x(2,(e,t)=>nv(e,Z(t))),rv=(e,t)=>{const n=Gt(e.state);if(n._tag===tm){Qh(e.state,LF(t));for(let r=0,i=n.joiners.length;r<i;r++)n.joiners[r](t)}},wQ=(e,t)=>V(()=>{const n=Gt(e.state);if(n._tag===tm){const r=n.joiners.indexOf(t);r>=0&&n.joiners.splice(r,1)}}),_Q=Be(e=>Ze(e.currentContext)),sE=()=>_Q,Fl=e=>B(sE(),e),iv=x(2,(e,t)=>rf(is,t)(e)),aE=x(2,(e,t)=>YJ(is,n=>nr(n,t))(e)),hj=x(2,(e,t)=>Fl(n=>iv(e,t(n)))),oE=e=>{const t=e.currentSpan;return t!==void 0&&t._tag==="Span"?ee(t):K()},xQ={_tag:"Span",spanId:"noop",traceId:"noop",sampled:!1,status:{_tag:"Ended",startTime:BigInt(0),endTime:BigInt(0),exit:Tn},attributes:new Map,links:[],kind:"internal",attribute(){},event(){},end(){},addLinks(){}},kQ=e=>Object.assign(Object.create(xQ),e),EQ="effect/Clock",OO=Symbol.for(EQ),of=mo("effect/Clock"),CQ=2**31-1,RO={unsafeSchedule(e,t){const n=Yg(t);if(n>CQ)return $a;let r=!1;const i=setTimeout(()=>{r=!0,e()},n);return()=>(clearTimeout(i),!r)}},MO=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)))}(),TQ=function(){const e=typeof process=="object"&&"hrtime"in process&&typeof process.hrtime.bigint=="function"?process.hrtime:void 0;if(!e)return MO;const t=MO()-e.bigint();return()=>t+e.bigint()}();var AN;AN=OO;class AQ{constructor(){g(this,AN,OO);g(this,"currentTimeMillis",V(()=>this.unsafeCurrentTimeMillis()));g(this,"currentTimeNanos",V(()=>this.unsafeCurrentTimeNanos()))}unsafeCurrentTimeMillis(){return Date.now()}unsafeCurrentTimeNanos(){return TQ()}scheduler(){return Z(RO)}sleep(t){return vi(n=>{const r=RO.unsafeSchedule(()=>n(et),t);return Zr(V(r))})}}const OQ=()=>new AQ,Cu=A7,Zg=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,"\\$&"),mj="And",pj="Or",gj="InvalidData",yj="MissingData",bj="SourceUnavailable",vj="Unsupported",RQ="effect/ConfigError",NO=Symbol.for(RQ),lf={_tag:"ConfigError",[NO]:NO},Sj=(e,t)=>{const n=Object.create(lf);return n._op=mj,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},wj=(e,t)=>{const n=Object.create(lf);return n._op=pj,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},MQ=(e,t,n={pathDelim:"."})=>{const r=Object.create(lf);return r._op=gj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Invalid data at ${O(this.path,Xu(n.pathDelim))}: "${this.message}")`}}),r},bl=(e,t,n={pathDelim:"."})=>{const r=Object.create(lf);return r._op=yj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Missing data at ${O(this.path,Xu(n.pathDelim))}: "${this.message}")`}}),r},NQ=(e,t,n,r={pathDelim:"."})=>{const i=Object.create(lf);return i._op=bj,i.path=e,i.message=t,i.cause=n,Object.defineProperty(i,"toString",{enumerable:!1,value(){return`(Source unavailable at ${O(this.path,Xu(r.pathDelim))}: "${this.message}")`}}),i},DQ=(e,t,n={pathDelim:"."})=>{const r=Object.create(lf);return r._op=vj,r.path=e,r.message=t,Object.defineProperty(r,"toString",{enumerable:!1,value(){return`(Unsupported operation at ${O(this.path,Xu(n.pathDelim))}: "${this.message}")`}}),r},Uo=x(2,(e,t)=>{switch(e._op){case mj:return Sj(Uo(e.left,t),Uo(e.right,t));case pj:return wj(Uo(e.left,t),Uo(e.right,t));case gj:return MQ([...t,...e.path],e.message);case yj:return bl([...t,...e.path],e.message);case bj:return NQ([...t,...e.path],e.message,e.cause);case vj:return DQ([...t,...e.path],e.message)}}),zQ={_tag:"Empty"},GS=x(2,(e,t)=>{let n=Hk(t),r=e;for(;ZG(n);){const i=n.head;switch(i._tag){case"Empty":{n=n.tail;break}case"AndThen":{n=pl(i.first,pl(i.second,n.tail));break}case"MapName":{r=Zo(r,i.f),n=n.tail;break}case"Nested":{r=Bg(r,i.name),n=n.tail;break}case"Unnested":{if(O(Cd(r),$7(i.name)))r=cl(r),n=n.tail;else return me(bl(r,`Expected ${i.name} to be in path in ConfigProvider#unnested`));break}}}return de(r)}),IQ="Constant",$Q="Fail",LQ="Fallback",FQ="Described",jQ="Lazy",PQ="MapOrFail",UQ="Nested",BQ="Primitive",HQ="Sequence",qQ="HashMap",VQ="ZipWith";var DO={};const ey=(e,t)=>[...e,...t],KQ="effect/ConfigProvider",zO=Symbol.for(KQ),GQ=mo("effect/ConfigProvider"),YQ="effect/ConfigProviderFlat",IO=Symbol.for(YQ),JQ=e=>({[zO]:zO,pipe(){return re(this,arguments)},...e}),QQ=e=>({[IO]:IO,patch:e.patch,load:(t,n,r=!0)=>e.load(t,n,r),enumerateChildren:e.enumerateChildren}),XQ=e=>JQ({load:t=>B(Rr(e,Wa(),t,!1),n=>Nt(Cd(n),{onNone:()=>At(bl(Wa(),`Expected a single value having structure: ${t}`)),onSome:Z})),flattened:e}),WQ=e=>{const{pathDelim:t,seqDelim:n}=Object.assign({},{pathDelim:"_",seqDelim:","},e),r=l=>O(l,Xu(t)),i=l=>l.split(t),s=()=>typeof process<"u"&&"env"in process&&typeof DO=="object"?DO:{};return XQ(QQ({load:(l,c,u=!0)=>{const f=r(l),d=s(),h=f in d?ee(d[f]):K();return O(h,Gb(()=>bl(l,`Expected ${f} to exist in the process context`)),B(p=>rX(p,l,c,n,u)))},enumerateChildren:l=>V(()=>{const c=s(),d=Object.keys(c).map(h=>i(h.toUpperCase())).filter(h=>{for(let p=0;p<l.length;p++){const b=O(l,RL(p)),S=h[p];if(S===void 0||b!==S)return!1}return!0}).flatMap(h=>h.slice(l.length,l.length+1));return JK(d)}),patch:zQ}))},ZQ=(e,t,n,r)=>{const i=sO(n.length,l=>l>=r.length?K():ee([e(l),l+1])),s=sO(r.length,l=>l>=n.length?K():ee([t(l),l+1])),a=ey(n,i),o=ey(r,s);return[a,o]},eX=(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},Rr=(e,t,n,r)=>{const i=n;switch(i._tag){case IQ:return Z(si(i.value));case FQ:return Te(()=>Rr(e,t,i.config,r));case $Q:return At(bl(t,i.message));case LQ:return O(Te(()=>Rr(e,t,i.first,r)),dh(s=>i.condition(s)?O(Rr(e,t,i.second,r),dh(a=>At(wj(s,a)))):At(s)));case jQ:return Te(()=>Rr(e,t,i.config(),r));case PQ:return Te(()=>O(Rr(e,t,i.original,r),B(Rs(s=>O(i.mapOrFail(s),Gb(Uo(eX(t,i.original))))))));case UQ:return Te(()=>Rr(e,ey(t,si(i.name)),i.config,r));case BQ:return O(GS(t,e.patch),B(s=>O(e.load(s,i,r),B(a=>{if(a.length===0){const o=O(X7(s),wt(()=>"<n/a>"));return At(bl([],`Expected ${i.description} with name ${o}`))}return Z(a)}))));case HQ:return O(GS(t,e.patch),B(s=>O(e.enumerateChildren(s),B(sX),B(a=>a.length===0?Te(()=>Ae(Rr(e,t,i.config,!0),si)):O(Rs(a,o=>Rr(e,V7(t,`[${o}]`),i.config,!0)),Ae(o=>{const l=DL(o);return l.length===0?si(Wa()):si(l)}))))));case qQ:return Te(()=>O(GS(t,e.patch),B(s=>O(e.enumerateChildren(s),B(a=>O(a,Rs(o=>Rr(e,ey(s,si(o)),i.valueConfig,r)),Ae(o=>o.length===0?si(jb()):O(iX(o),Zo(l=>HG(iO(Ye(a),l)))))))))));case VQ:return Te(()=>O(Rr(e,t,i.left,r),Eu,B(s=>O(Rr(e,t,i.right,r),Eu,B(a=>{if(rn(s)&&rn(a))return At(Sj(s.left,a.left));if(rn(s)&&Li(a))return At(s.left);if(Li(s)&&rn(a))return At(a.left);if(Li(s)&&Li(a)){const o=O(t,Xu(".")),l=tX(t,o),[c,u]=ZQ(l,l,O(s.right,Zo(de)),O(a.right,Zo(de)));return O(c,iO(u),Rs(([f,d])=>O(Yb(f,d),Ae(([h,p])=>i.zip(h,p)))))}throw new Error("BUG: ConfigProvider.fromFlatLoop - please report an issue at https://github.com/Effect-TS/effect/issues")})))))}},tX=(e,t)=>n=>me(bl(e,`The element at index ${n} in a sequence at path "${t}" was missing`)),nX=(e,t)=>e.split(new RegExp(`\\s*${Zg(t)}\\s*`)),rX=(e,t,n,r,i)=>i?O(nX(e,r),Rs(s=>n.parse(s.trim())),Gb(Uo(t))):O(n.parse(e),Gk({onFailure:Uo(t),onSuccess:si})),iX=e=>Object.keys(e[0]).map(t=>e.map(n=>n[t])),sX=e=>O(Rs(e,oX),Gk({onFailure:()=>Wa(),onSuccess:sh(Cu)}),Eu,Ae(T7)),aX=/^(\[(\d+)\])$/,oX=e=>{const t=e.match(aX);if(t!==null){const n=t[2];return O(n!==void 0&&n.length>0?ee(n):K(),Il(lX))}return K()},lX=e=>{const t=Number.parseInt(e);return Number.isNaN(t)?K():ee(t)},$O=Symbol.for("effect/Console"),_j=mo("effect/Console"),cX={[$O]:$O,assert(e,...t){return V(()=>{console.assert(e,...t)})},clear:V(()=>{console.clear()}),count(e){return V(()=>{console.count(e)})},countReset(e){return V(()=>{console.countReset(e)})},debug(...e){return V(()=>{console.debug(...e)})},dir(e,t){return V(()=>{console.dir(e,t)})},dirxml(...e){return V(()=>{console.dirxml(...e)})},error(...e){return V(()=>{console.error(...e)})},group(e){return e!=null&&e.collapsed?V(()=>console.groupCollapsed(e==null?void 0:e.label)):V(()=>console.group(e==null?void 0:e.label))},groupEnd:V(()=>{console.groupEnd()}),info(...e){return V(()=>{console.info(...e)})},log(...e){return V(()=>{console.log(...e)})},table(e,t){return V(()=>{console.table(e,t)})},time(e){return V(()=>console.time(e))},timeEnd(e){return V(()=>console.timeEnd(e))},timeLog(e,...t){return V(()=>{console.timeLog(e,...t)})},trace(...e){return V(()=>{console.trace(...e)})},warn(...e){return V(()=>{console.warn(...e)})},unsafe:console},uX="effect/Random",LO=Symbol.for(uX),fX=mo("effect/Random");var ON;ON=LO;class dX{constructor(t){g(this,"seed");g(this,ON,LO);g(this,"PRNG");this.seed=t,this.PRNG=new xV(t)}get next(){return V(()=>this.PRNG.number())}get nextBoolean(){return Ae(this.next,t=>t>.5)}get nextInt(){return V(()=>this.PRNG.integer(Number.MAX_SAFE_INTEGER))}nextRange(t,n){return Ae(this.next,r=>(n-t)*r+t)}nextIntBetween(t,n){return V(()=>this.PRNG.integer(n-t)+t)}shuffle(t){return hX(t,n=>this.nextIntBetween(0,n))}}const hX=(e,t)=>Te(()=>O(V(()=>Array.from(e)),B(n=>{const r=[];for(let i=n.length;i>=2;i=i-1)r.push(i);return O(r,Kb(i=>O(t(i),Ae(s=>mX(n,i-1,s)))),Hn(qs(n)))}))),mX=(e,t,n)=>{const r=e[t];return e[t]=e[n],e[n]=r,e},pX=e=>new dX(ne(e)),FO=Symbol.for("effect/Tracer"),gX=e=>({[FO]:FO,...e}),lE=mo("effect/Tracer"),sv=mo("effect/ParentSpan"),jO=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 yX{constructor(t,n,r,i,s,a){g(this,"name");g(this,"parent");g(this,"context");g(this,"startTime");g(this,"kind");g(this,"_tag","Span");g(this,"spanId");g(this,"traceId","native");g(this,"sampled",!0);g(this,"status");g(this,"attributes");g(this,"events",[]);g(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:jO(32),this.spanId=jO(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 bX=gX({span:(e,t,n,r,i,s)=>new yX(e,t,n,r,i,s),context:e=>e()}),vX=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}}}},__=Ju()("effect/Tracer/DisablePropagation",{defaultValue:$a}),SX=O(Qi(),Ur(of,OQ()),Ur(_j,cX),Ur(fX,pX(Math.random())),Ur(GQ,WQ()),Ur(lE,bX)),Tu=pe(Symbol.for("effect/DefaultServices/currentServices"),()=>nj(SX)),wX=e=>{const t=Xr(e);return xj(n=>n.sleep(t))},_X=e=>Be(t=>e(t.currentDefaultServices)),xj=e=>_X(t=>e(t.unsafeMap.get(of.key))),xX=xj(e=>e.currentTimeMillis),kX=Gh,EX=BV;let cf=class extends EX{};const kj="Sequential",Ej="Parallel",CX="ParallelN",tl={_tag:kj},x_={_tag:Ej},TX=e=>({_tag:CX,parallelism:e}),AX=e=>e._tag===kj,OX=e=>e._tag===Ej,ty=tl,k_=x_,E_=TX;function RX(e){return new io(e)}function MX(){return RX(new Map)}const PO=Symbol.for("effect/FiberRefs");var RN;RN=PO;class io{constructor(t){g(this,"locals");g(this,RN,PO);this.locals=t}pipe(){return re(this,arguments)}}const NX=(e,t,n,r=!1)=>{const i=e;let s=t,a=n,o=r,l;for(;l===void 0;)if(Wt(s)&&Wt(a)){const c=Un(s)[0],u=cl(s),f=Un(a)[0],d=Un(a)[1],h=cl(a);c.startTimeMillis<f.startTimeMillis?(a=h,o=!0):c.startTimeMillis>f.startTimeMillis?s=u:c.id<f.id?(a=h,o=!0):c.id>f.id?s=u:l=[d,o]}else l=[i.initial,!0];return l},DX=x(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(ae(a,s.initial))return;r.set(s,[[t,s.join(s.initial,a)]]);return}const o=r.get(s),[l,c]=NX(s,o,i);if(c){const u=s.diff(l,a),f=o[0][1],d=s.join(f,s.patch(u)(f));if(!ae(f,d)){let h;const p=o[0][0];p[ve](t)?h=[[p,d],...o.slice(1)]:h=[[t,d],...o],r.set(s,h)}}}}),new io(r)}),zX=x(2,(e,t)=>{const n=new Map;return Cj(e,n,t),new io(n)}),Cj=(e,t,n)=>{e.locals.forEach((r,i)=>{const s=r[0][1],a=i.patch(i.fork)(s);ae(s,a)?t.set(i,r):t.set(i,[[n,a],...r])})},Tj=x(2,(e,t)=>{const n=new Map(e.locals);return n.delete(t),new io(n)}),Aj=x(2,(e,t)=>e.locals.has(t)?ee(Un(e.locals.get(t))[1]):K()),ph=x(2,(e,t)=>O(Aj(e,t),wt(()=>t.initial))),C_=x(2,(e,{fiberId:t,fiberRef:n,value:r})=>{if(e.locals.size===0)return new io(new Map([[n,[[t,r]]]]));const i=new Map(e.locals);return T_(i,t,n,r),new io(i)}),T_=(e,t,n,r)=>{const i=e.get(n)??[];let s;if(Wt(i)){const[a,o]=Un(i);if(a[ve](t)){if(ae(o,r))return;s=[[t,r],...i.slice(1)]}else s=[[t,r],...i]}else s=[[t,r]];e.set(n,s)},IX=x(2,(e,{entries:t,forkAs:n})=>{if(e.locals.size===0)return new io(new Map(t));const r=new Map(e.locals);return n!==void 0&&Cj(e,r,n),t.forEach(([i,s])=>{s.length===1?T_(r,s[0][0],i,s[0][1]):s.forEach(([a,o])=>{T_(r,a,i,o)})}),new io(r)}),UO=Aj,Oj=ph,$X=IX,LX=MX,Rj="Empty",Mj="Add",Nj="Remove",Dj="Update",zj="AndThen",FX={_tag:Rj},cE=(e,t)=>{const n=new Map(e.locals);let r=FX;for(const[i,s]of t.locals.entries()){const a=Un(s)[1],o=n.get(i);if(o!==void 0){const l=Un(o)[1];ae(l,a)||(r=YS({_tag:Dj,fiberRef:i,patch:i.diff(l,a)})(r))}else r=YS({_tag:Mj,fiberRef:i,value:a})(r);n.delete(i)}for(const[i]of n.entries())r=YS({_tag:Nj,fiberRef:i})(r);return r},YS=x(2,(e,t)=>({_tag:zj,first:e,second:t})),Ij=x(3,(e,t,n)=>{let r=n,i=si(e);for(;Wt(i);){const s=Un(i),a=cl(i);switch(s._tag){case Rj:{i=a;break}case Mj:{r=C_(r,{fiberId:t,fiberRef:s.fiberRef,value:s.value}),i=a;break}case Nj:{r=Tj(r,s.fiberRef),i=a;break}case Dj:{const o=ph(r,s.fiberRef);r=C_(r,{fiberId:t,fiberRef:s.fiberRef,value:s.fiberRef.patch(s.patch)(o)}),i=a;break}case zj:{i=Bg(s.first)(Bg(s.second)(a));break}}}return r}),gh=cE,yh=Ij,av="effect/FiberStatus",vl=Symbol.for(av),ny="Done",BO="Running",HO="Suspended",jX=ht(`${av}-${ny}`);var MN;let PX=class{constructor(){g(this,MN,vl);g(this,"_tag",ny)}[(MN=vl,be)](){return jX}[ve](t){return uE(t)&&t._tag===ny}};var NN;class UX{constructor(t){g(this,"runtimeFlags");g(this,NN,vl);g(this,"_tag",BO);this.runtimeFlags=t}[(NN=vl,be)](){return O(ne(av),Se(ne(this._tag)),Se(ne(this.runtimeFlags)),tt(this))}[ve](t){return uE(t)&&t._tag===BO&&this.runtimeFlags===t.runtimeFlags}}var DN;class BX{constructor(t,n){g(this,"runtimeFlags");g(this,"blockingOn");g(this,DN,vl);g(this,"_tag",HO);this.runtimeFlags=t,this.blockingOn=n}[(DN=vl,be)](){return O(ne(av),Se(ne(this._tag)),Se(ne(this.runtimeFlags)),Se(ne(this.blockingOn)),tt(this))}[ve](t){return uE(t)&&t._tag===HO&&this.runtimeFlags===t.runtimeFlags&&ae(this.blockingOn,t.blockingOn)}}const HX=new PX,qX=e=>new UX(e),VX=(e,t)=>new BX(e,t),uE=e=>ue(e,vl),KX=e=>e._tag===ny,GX=HX,$j=qX,YX=VX,JX=KX,QX=jJ,XX=PJ,WX=UJ,ZX=ZF,eW=ej,tW=tj,nW=BJ,rW=HJ,iW=O(Cu,EL(e=>e.ordinal)),sW=O7(iW),aW=e=>{switch(e){case"All":return QX;case"Debug":return tW;case"Error":return WX;case"Fatal":return XX;case"Info":return eW;case"Trace":return nW;case"None":return rW;case"Warning":return ZX}},oW=Symbol.for("effect/Micro"),ry=Symbol.for("effect/Micro/MicroExit"),qO=Symbol.for("effect/Micro/MicroCause"),lW={_E:ge};var zN;class Lj 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=hu(r,0),l=`${a}: ${o}`;i.length>0&&(l+=`
|
|
70
|
+
${i.join(`
|
|
71
|
+
`)}`);super(o);g(this,"_tag");g(this,"traces");g(this,zN);this._tag=n,this.traces=i,this[qO]=lW,this.name=a,this.stack=l}pipe(){return re(this,arguments)}toString(){return this.stack}[(zN=qO,Pe)](){return this.stack}}class cW extends Lj{constructor(n,r=[]){super("Die",n,r);g(this,"defect");this.defect=n}}const uW=(e,t=[])=>new cW(e,t);let fW=class extends Lj{constructor(t=[]){super("Interrupt","interrupted",t)}};const dW=(e=[])=>new fW(e),hW=e=>e._tag==="Interrupt",VO=Symbol.for("effect/Micro/MicroFiber"),mW={_A:ge,_E:ge};var IN;IN=VO;class pW{constructor(t,n=!0){g(this,"context");g(this,"interruptible");g(this,IN);g(this,"_stack",[]);g(this,"_observers",[]);g(this,"_exit");g(this,"_children");g(this,"currentOpCount",0);g(this,"_interrupted",!1);g(this,"_yielded");this.context=t,this.interruptible=n,this[VO]=mW}getRef(t){return s7(this.context,t)}addObserver(t){return this._exit?(t(this._exit),du):(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(pE))}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===Wm)return;const r=KO.interruptChildren&&KO.interruptChildren(this);if(r!==void 0)return this.evaluate(sy(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(gE).shouldYield(this)){n=!0;const i=r;r=sy(SW,()=>i)}if(r=r[A_](this),r===Wm){const i=this._yielded;return ry in i?(this._yielded=void 0,i):Wm}}}catch(i){return ue(r,A_)?O_(i):O_(`MicroFiber.runLoop: Not a valid effect: ${String(r)}`)}}getCont(t){for(;;){const n=this._stack.pop();if(!n)return;const r=n[iy]&&n[iy](this);if(r)return{[t]:r};if(n[t])return n}}yieldWith(t){return this._yielded=t,Wm}children(){return this._children??(this._children=new Set)}}const KO=pe("effect/Micro/fiberMiddleware",()=>({interruptChildren:void 0})),Fj=Symbol.for("effect/Micro/identifier"),Yt=Symbol.for("effect/Micro/args"),A_=Symbol.for("effect/Micro/evaluate"),Au=Symbol.for("effect/Micro/successCont"),Vc=Symbol.for("effect/Micro/failureCont"),iy=Symbol.for("effect/Micro/ensureCont"),Wm=Symbol.for("effect/Micro/Yield"),gW={_A:ge,_E:ge,_R:ge},yW={...kX,_op:"Micro",[oW]:gW,pipe(){return re(this,arguments)},[Symbol.iterator](){return new Y$(new Kh(this))},toJSON(){return{_id:"Micro",op:this[Fj],...Yt in this?{args:this[Yt]}:void 0}},toString(){return it(this)},[Pe](){return it(this)}};function bW(e){return O_("Micro.evaluate: Not implemented")}const ov=e=>({...yW,[Fj]:e.op,[A_]:e.eval??bW,[Au]:e.contA,[Vc]:e.contE,[iy]:e.ensure}),fE=e=>{const t=ov(e);return function(){const n=Object.create(t);return n[Yt]=e.single===!1?arguments:arguments[0],n}},jj=e=>{const t={...ov(e),[ry]:ry,_tag:e.op,get[e.prop](){return this[Yt]},toJSON(){return{_id:"MicroExit",_tag:e.op,[e.prop]:this[Yt]}},[ve](n){return xW(n)&&n._tag===e.op&&ae(this[Yt],n[Yt])},[be](){return tt(this,Se(ht(e.op))(ne(this[Yt])))}};return function(n){const r=Object.create(t);return r[Yt]=n,r[Au]=void 0,r[Vc]=void 0,r[iy]=void 0,r}},dE=jj({op:"Success",prop:"value",eval(e){const t=e.getCont(Au);return t?t[Au](this[Yt],e):e.yieldWith(this)}}),Pj=jj({op:"Failure",prop:"cause",eval(e){let t=e.getCont(Vc);for(;hW(this[Yt])&&t&&e.interruptible;)t=e.getCont(Vc);return t?t[Vc](this[Yt],e):e.yieldWith(this)}}),vW=fE({op:"Yield",eval(e){let t=!1;return e.getRef(gE).scheduleTask(()=>{t||e.evaluate(kW)},this[Yt]??0),e.yieldWith(()=>{t=!0})}}),SW=vW(0),wW=dE(void 0),hE=fE({op:"WithMicroFiber",eval(e){return this[Yt](e)}}),sy=x(2,(e,t)=>{const n=Object.create(_W);return n[Yt]=e,n[Au]=t,n}),_W=ov({op:"OnSuccess",eval(e){return e._stack.push(this),this[Yt]}}),xW=e=>ue(e,ry),Uj=dE,mE=Pj,pE=mE(dW()),O_=e=>mE(uW(e)),kW=Uj(void 0),EW="setImmediate"in globalThis?globalThis.setImmediate:e=>setTimeout(e,0);class Bj{constructor(){g(this,"tasks",[]);g(this,"running",!1);g(this,"afterScheduled",()=>{this.running=!1,this.runTasks()})}scheduleTask(t,n){this.tasks.push(t),this.running||(this.running=!0,EW(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(AW)}flush(){for(;this.tasks.length>0;)this.runTasks()}}const CW=x(2,(e,t)=>hE(n=>{const r=n.context;return n.context=t(r),MW(e,()=>(n.context=r,wW))})),TW=x(2,(e,t)=>CW(e,nr(t)));class AW extends Ju()("effect/Micro/currentMaxOpsBeforeYield",{defaultValue:()=>2048}){}class gE extends Ju()("effect/Micro/currentScheduler",{defaultValue:()=>new Bj}){}const OW=x(2,(e,t)=>{const n=Object.create(RW);return n[Yt]=e,n[Au]=t.onSuccess,n[Vc]=t.onFailure,n}),RW=ov({op:"OnSuccessAndFailure",eval(e){return e._stack.push(this),this[Yt]}}),MW=x(2,(e,t)=>DW(n=>OW(n(e),{onFailure:r=>sy(t(mE(r)),()=>Pj(r)),onSuccess:r=>sy(t(Uj(r)),()=>dE(r))}))),Hj=fE({op:"SetInterruptible",ensure(e){if(e.interruptible=this[Yt],e._interrupted&&e.interruptible)return()=>pE}}),NW=e=>hE(t=>t.interruptible?e:(t.interruptible=!0,t._stack.push(Hj(!1)),t._interrupted?pE:e)),DW=e=>hE(t=>t.interruptible?(t.interruptible=!1,t._stack.push(Hj(!0)),e(NW)):e(ge)),zW=(e,t)=>{const n=new pW(gE.context(new Bj));return n.evaluate(e),n},ay=Symbol.for("effect/Readable"),qj=Symbol.for("effect/Ref"),Vj={_A:e=>e};var $N,LN,FN;class IW extends(FN=cf,LN=qj,$N=ay,FN){constructor(n){super();g(this,"ref");g(this,LN,Vj);g(this,$N,ay);g(this,"get");this.ref=n,this.get=V(()=>Gt(this.ref))}commit(){return this.get}modify(n){return V(()=>{const r=Gt(this.ref),[i,s]=n(r);return r!==s&&Qh(s)(this.ref),i})}}const yE=e=>new IW(Jh(e)),oy=e=>V(()=>yE(e)),Vi=e=>e.get,Kc=x(2,(e,t)=>e.modify(()=>[void 0,t])),$W=x(2,(e,t)=>e.modify(n=>[n,t])),Kj=x(2,(e,t)=>e.modify(t)),ly=x(2,(e,t)=>e.modify(n=>[void 0,t(n)])),bE=oy,LW=Vi,FW=$W,$f=Kj,jW=Kc,PW=ly;class Gj{constructor(){g(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 UW{constructor(t){g(this,"maxNextTickBeforeTimer");g(this,"running",!1);g(this,"tasks",new Gj);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(rj)?t.getFiberRef(af):!1}scheduleTask(t,n){this.tasks.scheduleTask(t,n),this.running||(this.running=!0,this.starve())}}const Yj=pe(Symbol.for("effect/Scheduler/defaultScheduler"),()=>new UW(2048));class vE{constructor(){g(this,"tasks",new Gj);g(this,"deferred",!1)}scheduleTask(t,n){this.deferred?Yj.scheduleTask(t,n):this.tasks.scheduleTask(t,n)}shouldYield(t){return t.currentOpCount>t.getFiberRef(rj)?t.getFiberRef(af):!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 SE=pe(Symbol.for("effect/FiberRef/currentScheduler"),()=>tn(Yj)),Jj=pe(Symbol.for("effect/FiberRef/currentRequestMap"),()=>tn(new Map)),GO=(e,t,n,r)=>{switch(e){case void 0:return t();case"unbounded":return n();case"inherit":return Qb(nQ,i=>i==="unbounded"?n():i>1?r(i):t());default:return e>1?r(e):t()}},BW=wX,HW=xX,qW=of,Qj=e=>e.replace(/[\s="]/g,"_"),VW=e=>t=>`${Qj(t.label)}=${e-t.startTime}ms`,Xj="effect/MetricLabel",R_=Symbol.for(Xj);var jN;class KW{constructor(t,n){g(this,"key");g(this,"value");g(this,jN,R_);g(this,"_hash");this.key=t,this.value=n,this._hash=ht(Xj+this.key+this.value)}[(jN=R_,be)](){return this._hash}[ve](t){return YW(t)&&this.key===t.key&&this.value===t.value}pipe(){return re(this,arguments)}}const GW=(e,t)=>new KW(e,t),YW=e=>ue(e,R_),JW=e=>Ae(e,ee),Wj=e=>{let t,n;return typeof e=="function"?t=e:(t=e.try,n=e.catch),Te(()=>{try{return Z(pn(t))}catch(r){return At(n?pn(()=>n(r)):new nE(r,"An unknown error occurred in Effect.try"))}})},QW=e=>r3(e,e3,cE),XW=e=>r3(e,Yb(e3,IJ),([t,n],[r,i])=>[cE(t,r),Fa(n,i)]),Zj=x(2,(e,t)=>no(e,{onFailure:n=>Z(t.onFailure(n)),onSuccess:n=>Z(t.onSuccess(n))})),e3=Be(e=>Z(e.getFiberRefs())),WW=e=>Zj(e,{onFailure:du,onSuccess:du}),YO=x(2,(e,t)=>Wr(e,{onFailure:n=>VF(()=>t(n)),onSuccess:Z})),ZW=e=>O(tv(),B(t=>O(XW(e),YF(t),tZ,Ae(n=>Et(n,O(ro(t),B(([r,i])=>Hn(Yb(t3(r[0]),JF(r[1])),i)))))))),eZ=e=>Ae(e,t=>!t),tZ=e=>Ae(bE(!0),t=>Zr(Jk(e,FW(t,!1)))),t3=e=>lZ((t,n)=>O(e,Ij(t,n))),nZ=e=>e.length>=1?vi((t,n)=>{try{e(n).then(r=>t(Z(r)),r=>t(Ea(r)))}catch(r){t(Ea(r))}}):vi(t=>{try{e().then(n=>t(Z(n)),n=>t(Ea(n)))}catch(n){t(Ea(n))}}),n3=x(3,(e,t,n)=>Fl(r=>iv(e,Ur(r,t,n)))),JO=x(3,(e,t,n)=>Fl(r=>B(n,i=>iv(e,O(r,Ur(t,i)))))),rZ=BW,iZ=Z(K()),r3=x(3,(e,t,n)=>B(t,r=>B(e,i=>Ae(t,s=>[n(r,s),i])))),sZ=x(2,(e,t)=>Wr(e,{onFailure:n=>Et(t(n),en(n)),onSuccess:Z})),aZ=e=>{let t,n;typeof e=="function"?t=e:(t=e.try,n=e.catch);const r=i=>n?Hb(()=>n(i)):At(new nE(i,"An unknown error occurred in Effect.tryPromise"));return t.length>=1?vi((i,s)=>{try{t(s).then(a=>i(Z(a)),a=>i(r(a)))}catch(a){i(r(a))}}):vi(i=>{try{t().then(s=>i(Z(s)),s=>i(r(s)))}catch(s){i(r(s))}})},oZ=x(2,(e,t)=>B(e,n=>Wj({try:()=>t.try(n),catch:t.catch}))),lZ=e=>Be(t=>(t.setFiberRefs(e(t.id(),t.getFiberRefs())),et)),cZ=x(2,(e,t)=>Te(()=>t()?Ae(e,ee):Z(K()))),uZ=e=>new Proxy({},{get(t,n,r){return(...i)=>B(e,s=>s[n](...i))}}),i3=BigInt(0),s3=Il(e=>$s(e.context,__)?e._tag==="Span"?s3(e.parent):K():ee(e)),fZ=(e,t,n)=>{const r=!e.getFiberRef(ij)||n.context&&$s(n.context,__),i=e.getFiberRef(is),s=n.parent?ee(n.parent):n.root?K():s3(Yu(i,sv));let a;if(r)a=kQ({name:t,parent:s,context:Ur(n.context??Qi(),__,!0)});else{const o=e.getFiberRef(Tu),l=$s(o,lE),c=$s(o,qW),u=e.getFiberRef(sj),f=e.getFiberRefs(),d=UO(f,aQ),h=UO(f,oQ),p=h._tag==="Some"?n.links!==void 0?[...Bn(h.value),...n.links??[]]:Bn(h.value):n.links??Wa();a=l.span(t,s,n.context??Qi(),p,u?c.unsafeCurrentTimeNanos():i3,n.kind??"internal",n),d._tag==="Some"&&GG(d.value,(b,S)=>a.attribute(S,b)),n.attributes!==void 0&&Object.entries(n.attributes).forEach(([b,S])=>a.attribute(b,S))}return typeof n.captureStackTrace=="function"&&Gg.set(a,n.captureStackTrace),a},dZ=(e,t,n,r)=>V(()=>{e.status._tag!=="Ended"&&(oj(t)&&Gg.has(e)&&e.attribute("code.stacktrace",Gg.get(e)()),e.end(r?n.unsafeCurrentTimeNanos():i3,t))}),hZ=(e,...t)=>{const n=vX(t.length===1?void 0:t[0]),r=t[t.length-1];return Be(i=>{const s=fZ(i,e,n),a=i.getFiberRef(sj),o=$s(i.getFiberRef(Tu),of);return yl(r(s),l=>dZ(s,l,o,a))})},mZ=x(2,(e,t)=>n3(e,sv,t)),wE=oj,pZ=hQ,gZ=qc,yZ=lj,cy=mh,An=Xe,bZ=pQ,vZ=Pp,Ms=Zb,mr=Ze,_E=Tn,QO=yQ,bh=cj,xE="InterruptSignal",kE="Stateful",EE="Resume",CE="YieldNow",JS=e=>({_tag:xE,cause:e}),Up=e=>({_tag:kE,onFiber:e}),Ql=e=>({_tag:EE,effect:e}),SZ=()=>({_tag:CE}),wZ="effect/FiberScope",uy=Symbol.for(wZ);var PN;PN=uy;class _Z{constructor(){g(this,PN,uy);g(this,"fiberId",Sr);g(this,"roots",new Set)}add(t,n){this.roots.add(n),n.addObserver(()=>{this.roots.delete(n)})}}var UN;UN=uy;class xZ{constructor(t,n){g(this,"fiberId");g(this,"parent");g(this,UN,uy);this.fiberId=t,this.parent=n}add(t,n){this.parent.tell(Up(r=>{r.addChild(n),n.addObserver(()=>{r.removeChild(n)})}))}}const kZ=e=>new xZ(e.id(),e),lv=pe(Symbol.for("effect/FiberScope/Global"),()=>new _Z),EZ="effect/Fiber",CZ=Symbol.for(EZ),TZ={_E:e=>e,_A:e=>e},AZ="effect/Fiber",OZ=Symbol.for(AZ),RZ=e=>e.await,MZ=e=>e.inheritAll,vh=e=>Jb(Vb(e.await),e.inheritAll);({...Yh});const la="effect/FiberCurrent",NZ=()=>Qu(globalThis[la]),DZ="effect/Logger",zZ=Symbol.for(DZ),IZ={_Message:e=>e,_Output:e=>e},TE=e=>({[zZ]:IZ,log:e,pipe(){return re(this,arguments)}}),$Z=/^[^\s"=]*$/,LZ=(e,t)=>({annotations:n,cause:r,date:i,fiberId:s,logLevel:a,message:o,spans:l})=>{const c=p=>p.match($Z)?p:e(p),u=(p,b)=>`${Qj(p)}=${c(b)}`,f=(p,b)=>" "+u(p,b);let d=u("timestamp",i.toISOString());d+=f("level",a.label),d+=f("fiber",pF(s));const h=H7(o);for(let p=0;p<h.length;p++)d+=f("message",hu(h[p],t));WK(r)||(d+=f("cause",tf(r,{renderErrorCause:!0})));for(const p of l)d+=" "+VW(i.getTime())(p);for(const[p,b]of n)d+=f(p,hu(b,t));return d},FZ=e=>`"${e.replace(/\\([\s\S])|(")/g,"\\$1$2")}"`,jZ=TE(LZ(FZ)),PZ=typeof process=="object"&&process!==null&&typeof process.stdout=="object"&&process.stdout!==null;PZ&&process.stdout.isTTY;const a3="effect/MetricBoundaries",M_=Symbol.for(a3);var BN;class UZ{constructor(t){g(this,"values");g(this,BN,M_);g(this,"_hash");this.values=t,this._hash=O(ht(a3),Se(Ku(this.values)))}[(BN=M_,be)](){return this._hash}[ve](t){return BZ(t)&&ae(this.values,t.values)}pipe(){return re(this,arguments)}}const BZ=e=>ue(e,M_),HZ=e=>{const t=O(e,xk(qt(Number.POSITIVE_INFINITY)),aK);return new UZ(t)},qZ=e=>O(B7(e.count-1,t=>e.start*Math.pow(e.factor,t)),$n,HZ),VZ="effect/MetricKeyType",o3=Symbol.for(VZ),l3="effect/MetricKeyType/Counter",N_=Symbol.for(l3),KZ="effect/MetricKeyType/Frequency",GZ=Symbol.for(KZ),YZ="effect/MetricKeyType/Gauge",JZ=Symbol.for(YZ),c3="effect/MetricKeyType/Histogram",D_=Symbol.for(c3),QZ="effect/MetricKeyType/Summary",XZ=Symbol.for(QZ),u3={_In:e=>e,_Out:e=>e};var HN,qN;class WZ{constructor(t,n){g(this,"incremental");g(this,"bigint");g(this,qN,u3);g(this,HN,N_);g(this,"_hash");this.incremental=t,this.bigint=n,this._hash=ht(l3)}[(qN=o3,HN=N_,be)](){return this._hash}[ve](t){return f3(t)}pipe(){return re(this,arguments)}}var VN,KN;class ZZ{constructor(t){g(this,"boundaries");g(this,KN,u3);g(this,VN,D_);g(this,"_hash");this.boundaries=t,this._hash=O(ht(c3),Se(ne(this.boundaries)))}[(KN=o3,VN=D_,be)](){return this._hash}[ve](t){return d3(t)&&ae(this.boundaries,t.boundaries)}pipe(){return re(this,arguments)}}const eee=e=>new WZ((e==null?void 0:e.incremental)??!1,(e==null?void 0:e.bigint)??!1),tee=e=>new ZZ(e),f3=e=>ue(e,N_),nee=e=>ue(e,GZ),ree=e=>ue(e,JZ),d3=e=>ue(e,D_),iee=e=>ue(e,XZ),see="effect/MetricKey",h3=Symbol.for(see),aee={_Type:e=>e},oee=Tb(ae);var GN;class AE{constructor(t,n,r,i=[]){g(this,"name");g(this,"keyType");g(this,"description");g(this,"tags");g(this,GN,aee);g(this,"_hash");this.name=t,this.keyType=n,this.description=r,this.tags=i,this._hash=O(ht(this.name+this.description),Se(ne(this.keyType)),Se(Ku(this.tags)))}[(GN=h3,be)](){return this._hash}[ve](t){return lee(t)&&this.name===t.name&&ae(this.keyType,t.keyType)&&ae(this.description,t.description)&&oee(this.tags,t.tags)}pipe(){return re(this,arguments)}}const lee=e=>ue(e,h3),cee=(e,t)=>new AE(e,eee(t),Qu(t==null?void 0:t.description)),uee=(e,t,n)=>new AE(e,tee(t),Qu(n)),fee=x(2,(e,t)=>t.length===0?e:new AE(e.name,e.keyType,e.description,$p(e.tags,t))),XO=Symbol.for("effect/MutableHashMap"),dee={[XO]:XO,[Symbol.iterator](){return new OE(this)},toString(){return it(this.toJSON())},toJSON(){return{_id:"MutableHashMap",values:Array.from(this).map(vt)}},[Pe](){return this.toJSON()},pipe(){return re(this,arguments)}};class OE{constructor(t){g(this,"self");g(this,"referentialIterator");g(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 hee(this.self.buckets.values()),this.next()):t}[Symbol.iterator](){return new OE(this.self)}}class hee{constructor(t){g(this,"backing");g(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 z_=()=>{const e=Object.create(dee);return e.referential=new Map,e.buckets=new Map,e.bucketsSize=0,e},_s=x(2,(e,t)=>{if(ih(t)===!1)return e.referential.has(t)?ee(e.referential.get(t)):K();const n=t[be](),r=e.buckets.get(n);return r===void 0?K():mee(e,r,t)}),mee=(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--),ee(a)}return K()},Lf=x(2,(e,t)=>St(_s(e,t))),Lo=x(3,(e,t,n)=>{if(ih(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):(m3(e,i,t),i.push([t,n]),e.bucketsSize++,e)}),m3=(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}},pee=x(2,(e,t)=>{if(ih(t)===!1)return e.referential.delete(t),e;const n=t[be](),r=e.buckets.get(n);return r===void 0||(m3(e,r,t),r.length===0&&e.buckets.delete(n)),e}),gee="effect/MetricState",am=Symbol.for(gee),p3="effect/MetricState/Counter",I_=Symbol.for(p3),g3="effect/MetricState/Frequency",$_=Symbol.for(g3),y3="effect/MetricState/Gauge",L_=Symbol.for(y3),b3="effect/MetricState/Histogram",F_=Symbol.for(b3),v3="effect/MetricState/Summary",j_=Symbol.for(v3),om={_A:e=>e};var YN,JN;class yee{constructor(t){g(this,"count");g(this,JN,om);g(this,YN,I_);this.count=t}[(JN=am,YN=I_,be)](){return O(ne(p3),Se(ne(this.count)),tt(this))}[ve](t){return Aee(t)&&this.count===t.count}pipe(){return re(this,arguments)}}const bee=Tb(ae);var QN,XN;class vee{constructor(t){g(this,"occurrences");g(this,XN,om);g(this,QN,$_);g(this,"_hash");this.occurrences=t}[(XN=am,QN=$_,be)](){return O(ht(g3),Se(Ku(Ye(this.occurrences.entries()))),tt(this))}[ve](t){return Oee(t)&&bee(Ye(this.occurrences.entries()),Ye(t.occurrences.entries()))}pipe(){return re(this,arguments)}}var WN,ZN;class See{constructor(t){g(this,"value");g(this,ZN,om);g(this,WN,L_);this.value=t}[(ZN=am,WN=L_,be)](){return O(ne(y3),Se(ne(this.value)),tt(this))}[ve](t){return Ree(t)&&this.value===t.value}pipe(){return re(this,arguments)}}var eD,tD;class wee{constructor(t,n,r,i,s){g(this,"buckets");g(this,"count");g(this,"min");g(this,"max");g(this,"sum");g(this,tD,om);g(this,eD,F_);this.buckets=t,this.count=n,this.min=r,this.max=i,this.sum=s}[(tD=am,eD=F_,be)](){return O(ne(b3),Se(ne(this.buckets)),Se(ne(this.count)),Se(ne(this.min)),Se(ne(this.max)),Se(ne(this.sum)),tt(this))}[ve](t){return Mee(t)&&ae(this.buckets,t.buckets)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return re(this,arguments)}}var nD,rD;class _ee{constructor(t,n,r,i,s,a){g(this,"error");g(this,"quantiles");g(this,"count");g(this,"min");g(this,"max");g(this,"sum");g(this,rD,om);g(this,nD,j_);this.error=t,this.quantiles=n,this.count=r,this.min=i,this.max=s,this.sum=a}[(rD=am,nD=j_,be)](){return O(ne(v3),Se(ne(this.error)),Se(ne(this.quantiles)),Se(ne(this.count)),Se(ne(this.min)),Se(ne(this.max)),Se(ne(this.sum)),tt(this))}[ve](t){return Nee(t)&&this.error===t.error&&ae(this.quantiles,t.quantiles)&&this.count===t.count&&this.min===t.min&&this.max===t.max&&this.sum===t.sum}pipe(){return re(this,arguments)}}const xee=e=>new yee(e),kee=e=>new vee(e),Eee=e=>new See(e),Cee=e=>new wee(e.buckets,e.count,e.min,e.max,e.sum),Tee=e=>new _ee(e.error,e.quantiles,e.count,e.min,e.max,e.sum),Aee=e=>ue(e,I_),Oee=e=>ue(e,$_),Ree=e=>ue(e,L_),Mee=e=>ue(e,F_),Nee=e=>ue(e,j_),Dee="effect/MetricHook",zee=Symbol.for(Dee),Iee={_In:e=>e,_Out:e=>e},lm=e=>({[zee]:Iee,pipe(){return re(this,arguments)},...e}),WO=BigInt(0),$ee=e=>{let t=e.keyType.bigint?WO:0;const n=e.keyType.incremental?e.keyType.bigint?i=>i>=WO:i=>i>=0:i=>!0,r=i=>{n(i)&&(t=t+i)};return lm({get:()=>xee(t),update:r,modify:r})},Lee=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 lm({get:()=>kee(t),update:n,modify:n})},Fee=(e,t)=>{let n=t;return lm({get:()=>Eee(n),update:r=>{n=r},modify:r=>{n=n+r}})},jee=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,sh(Cu),Zo((f,d)=>{i[d]=f}));const c=f=>{let d=0,h=n;for(;d!==h;){const p=Math.floor(d+(h-d)/2),b=i[p];f<=b?h=p:d=p,h===d+1&&(f<=i[d]?h=d:d=h)}r[d]=r[d]+1,s=s+1,a=a+f,f<o&&(o=f),f>l&&(l=f)},u=()=>{const f=Cb(n);let d=0;for(let h=0;h<n;h++){const p=i[h],b=r[h];d=d+b,f[h]=[p,d]}return f};return lm({get:()=>Cee({buckets:u(),count:s,min:o,max:l,sum:a}),update:c,modify:c})},Pee=e=>{const{error:t,maxAge:n,maxSize:r,quantiles:i}=e.keyType,s=O(i,sh(Cu)),a=Cb(r);let o=0,l=0,c=0,u=0,f=0;const d=p=>{const b=[];let S=0;for(;S!==r-1;){const m=a[S];if(m!=null){const[y,v]=m,_=_u(p-y);AG(_,wu)&&TG(_,n)&&b.push(v)}S=S+1}return Uee(t,s,sh(b,Cu))},h=(p,b)=>{if(r>0){o=o+1;const S=o%r;a[S]=[b,p]}u=l===0?p:Math.min(u,p),f=l===0?p:Math.max(f,p),l=l+1,c=c+p};return lm({get:()=>Tee({error:t,quantiles:d(Date.now()),count:l,min:u,max:f,sum:c}),update:([p,b])=>h(p,b),modify:([p,b])=>h(p,b)})},Uee=(e,t,n)=>{const r=n.length;if(!Wt(t))return Wa();const i=t[0],s=t.slice(1),a=ZO(e,r,K(),0,i,n),o=si(a);return s.forEach(l=>{o.push(ZO(e,r,a.value,a.consumed,l,a.rest))}),Zo(o,l=>[l.quantile,l.value])},ZO=(e,t,n,r,i,s)=>{let a=e,o=t,l=n,c=r,u=i,f=s,d=e,h=t,p=n,b=r,S=i,m=s;for(;;){if(!Wt(f))return{quantile:u,value:K(),consumed:c,rest:[]};if(u===1)return{quantile:u,value:ee(ML(f)),consumed:c+f.length,rest:[]};const y=Un(f),v=Z7(f,N=>N===y),_=u*o,A=a/2*_,E=c+v[0].length,T=Math.abs(E-_);if(E<_-A){d=a,h=o,p=Cd(f),b=E,S=u,m=v[1],a=d,o=h,l=p,c=b,u=S,f=m;continue}if(E>_+A){const N=Qt(l)?ee(y):l;return{quantile:u,value:N,consumed:c,rest:f}}switch(l._tag){case"None":{d=a,h=o,p=Cd(f),b=E,S=u,m=v[1],a=d,o=h,l=p,c=b,u=S,f=m;continue}case"Some":{const N=Math.abs(_-l.value);if(T<N){d=a,h=o,p=Cd(f),b=E,S=u,m=v[1],a=d,o=h,l=p,c=b,u=S,f=m;continue}return{quantile:u,value:ee(l.value),consumed:c,rest:f}}}}throw new Error("BUG: MetricHook.resolveQuantiles - please report an issue at https://github.com/Effect-TS/effect/issues")},Bee="effect/MetricPair",Hee=Symbol.for(Bee),qee={_Type:e=>e},Vee=(e,t)=>({[Hee]:qee,metricKey:e,metricState:t,pipe(){return re(this,arguments)}}),Kee="effect/MetricRegistry",eR=Symbol.for(Kee);var iD;iD=eR;class Gee{constructor(){g(this,iD,eR);g(this,"map",z_())}snapshot(){const t=[];for(const[n,r]of this.map)t.push(Vee(n,r.get()));return t}get(t){const n=O(this.map,_s(t),Ni);if(n==null){if(f3(t.keyType))return this.getCounter(t);if(ree(t.keyType))return this.getGauge(t);if(nee(t.keyType))return this.getFrequency(t);if(d3(t.keyType))return this.getHistogram(t);if(iee(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,_s(t),Ni);if(n==null){const r=$ee(t);O(this.map,Lf(t))||O(this.map,Lo(t,r)),n=r}return n}getFrequency(t){let n=O(this.map,_s(t),Ni);if(n==null){const r=Lee(t);O(this.map,Lf(t))||O(this.map,Lo(t,r)),n=r}return n}getGauge(t){let n=O(this.map,_s(t),Ni);if(n==null){const r=Fee(t,t.keyType.bigint?BigInt(0):0);O(this.map,Lf(t))||O(this.map,Lo(t,r)),n=r}return n}getHistogram(t){let n=O(this.map,_s(t),Ni);if(n==null){const r=jee(t);O(this.map,Lf(t))||O(this.map,Lo(t,r)),n=r}return n}getSummary(t){let n=O(this.map,_s(t),Ni);if(n==null){const r=Pee(t);O(this.map,Lf(t))||O(this.map,Lo(t,r)),n=r}return n}}const Yee=()=>new Gee,Jee="effect/Metric",Qee=Symbol.for(Jee),Xee={_Type:e=>e,_In:e=>e,_Out:e=>e},tR=pe(Symbol.for("effect/Metric/globalMetricRegistry"),()=>Yee()),S3=function(e,t,n,r){const i=Object.assign(s=>Yk(s,a=>tte(i,a)),{[Qee]:Xee,keyType:e,unsafeUpdate:t,unsafeValue:n,unsafeModify:r,register(){return this.unsafeValue([]),this},pipe(){return re(this,arguments)}});return i},cv=(e,t)=>w3(cee(e,t)),w3=e=>{let t;const n=new WeakMap,r=i=>{if(i.length===0)return t!==void 0||(t=tR.get(e)),t;let s=n.get(i);return s!==void 0||(s=tR.get(fee(e,i)),n.set(i,s)),s};return S3(e.keyType,(i,s)=>r(s).update(i),i=>r(i).get(),(i,s)=>r(s).modify(i))},Wee=(e,t,n)=>w3(uee(e,t,n)),Zee=x(3,(e,t,n)=>ete(e,[GW(t,n)])),ete=x(2,(e,t)=>S3(e.keyType,(n,r)=>e.unsafeUpdate(n,$p(t,r)),n=>e.unsafeValue($p(t,n)),(n,r)=>e.unsafeModify(n,$p(t,r)))),tte=x(2,(e,t)=>Qb(y_,n=>V(()=>e.unsafeUpdate(t,n))));({...Eb});const nte=x(2,(e,t)=>Qb(Jj,n=>V(()=>{if(n.has(e)){const r=n.get(e);r.state.completed||(r.state.completed=!0,rv(r.result,t))}}))),rte="effect/Supervisor",uv=Symbol.for(rte),RE={_T:e=>e};var sD;sD=uv;const wT=class wT{constructor(t,n){g(this,"underlying");g(this,"value0");g(this,sD,RE);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 wT(this,O(this.value,Ae(t)))}zip(t){return new dy(this,t)}};let fy=wT;var aD;aD=uv;const _T=class _T{constructor(t,n){g(this,"left");g(this,"right");g(this,"_tag","Zip");g(this,aD,RE);this.left=t,this.right=n}get value(){return Yb(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 _T(this,t)}};let dy=_T;const _3=e=>ue(e,uv)&&V$(e,"Zip");var oD;oD=uv;class ite{constructor(t){g(this,"effect");g(this,oD,RE);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 dy(this,t)}onRun(t,n){return t()}}const ste=e=>new ite(e),fv=pe("effect/Supervisor/none",()=>ste(et)),ate=nf,x3="Empty",k3="AddSupervisor",E3="RemoveSupervisor",C3="AndThen",Od={_tag:x3},Bp=(e,t)=>({_tag:C3,first:e,second:t}),ote=(e,t)=>lte(t,qt(e)),lte=(e,t)=>{let n=e,r=t;for(;Ks(r);){const i=Fi(r);switch(i._tag){case x3:{r=Os(r);break}case k3:{n=n.zip(i.supervisor),r=Os(r);break}case E3:{n=P_(n,i.supervisor),r=Os(r);break}case C3:{r=Rn(i.first)(Rn(i.second)(Os(r)));break}}}return n},P_=(e,t)=>ae(e,t)?fv:_3(e)?P_(e.left,t).zip(P_(e.right,t)):e,hy=e=>ae(e,fv)?fl():_3(e)?O(hy(e.left),lh(hy(e.right))):$k(e),cte=(e,t)=>{if(ae(e,t))return Od;const n=hy(e),r=hy(t),i=O(r,oO(n),ch(Od,(a,o)=>Bp(a,{_tag:k3,supervisor:o}))),s=O(n,oO(r),ch(Od,(a,o)=>Bp(a,{_tag:E3,supervisor:o})));return Bp(i,s)},ute=ate({empty:Od,patch:ote,combine:Bp,diff:cte}),fte=cv("effect_fiber_started",{incremental:!0}),nR=cv("effect_fiber_active"),dte=cv("effect_fiber_successes",{incremental:!0}),hte=cv("effect_fiber_failures",{incremental:!0}),mte=Zee(Wee("effect_fiber_lifetimes",qZ({start:.5,factor:2,count:35})),"time_unit","milliseconds"),Ff="Continue",pte="Done",rR="Yield",gte={_E:e=>e,_A:e=>e},Zm=e=>{throw new Error(`BUG: FiberRuntime - ${hu(e)} - please report an issue at https://github.com/Effect-TS/effect/issues`)},ms=Symbol.for("effect/internal/fiberRuntime/YieldedOp"),ps=pe("effect/internal/fiberRuntime/yieldedOpChannel",()=>({currentOp:null})),jf={[Fg]:(e,t,n)=>pn(()=>t.effect_instruction_i1(n)),OnStep:(e,t,n)=>Ze(Ze(n)),[jg]:(e,t,n)=>pn(()=>t.effect_instruction_i2(n)),[mk]:(e,t,n)=>(e.patchRuntimeFlags(e.currentRuntimeFlags,t.patch),ha(e.currentRuntimeFlags)&&e.isInterrupted()?Xe(e.getInterruptedCause()):Ze(n)),[Pg]:(e,t,n)=>(pn(()=>t.effect_instruction_i2(n)),pn(()=>t.effect_instruction_i0())?(e.pushStack(t),pn(()=>t.effect_instruction_i1())):et),[Ed]:(e,t,n)=>{for(;;){const r=pn(()=>t.effect_instruction_i0.next(n));if(r.done)return Ze(r.value);const i=EV(r.value);if(Wb(i)){if(i._tag==="Failure")return i}else return e.pushStack(t),i;n=i.value}}},yte={[xE]:(e,t,n,r)=>(e.processNewInterruptSignal(r.cause),ha(t)?Xe(r.cause):n),[EE]:(e,t,n,r)=>{throw new Error("It is illegal to have multiple concurrent run loops in a single fiber")},[kE]:(e,t,n,r)=>(r.onFiber(e,$j(t)),n),[CE]:(e,t,n,r)=>B(Xk(),()=>n)},bte=e=>Kb(fJ(e),t=>Ki(EJ(t),([n,r])=>{const i=new Map,s=[];for(const o of r){s.push(Bn(o));for(const l of o)i.set(l.request,l)}const a=s.flat();return rf(Ute(n.runAll(s),a,()=>a.forEach(o=>{o.listeners.interrupted=!0})),Jj,i)},!1,!1)),vte=pk();var lD,cD;class T3 extends cf{constructor(n,r,i){super();g(this,cD,TZ);g(this,lD,gte);g(this,"_fiberRefs");g(this,"_fiberId");g(this,"_queue",new Array);g(this,"_children",null);g(this,"_observers",new Array);g(this,"_running",!1);g(this,"_stack",[]);g(this,"_asyncInterruptor",null);g(this,"_asyncBlockingOn",null);g(this,"_exitValue",null);g(this,"_steps",[]);g(this,"_isYielding",!1);g(this,"currentRuntimeFlags");g(this,"currentOpCount",0);g(this,"currentSupervisor");g(this,"currentScheduler");g(this,"currentTracer");g(this,"currentSpan");g(this,"currentContext");g(this,"currentDefaultServices");g(this,"run",()=>{this.drainQueueOnCurrentThread()});if(this.currentRuntimeFlags=i,this._fiberId=n,this._fiberRefs=r,vO(i)){const s=this.getFiberRef(y_);fte.unsafeUpdate(1,s),nR.unsafeUpdate(1,s)}this.refreshRefCache()}commit(){return vh(this)}id(){return this._fiberId}resume(n){this.tell(Ql(n))}get status(){return this.ask((n,r)=>r)}get runtimeFlags(){return this.ask((n,r)=>JX(r)?n.currentRuntimeFlags:r.runtimeFlags)}scope(){return kZ(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(Xm)}fiberRefs(){return this.ask(n=>n.getFiberRefs())}ask(n){return Te(()=>{const r=ev(this._fiberId);return this.tell(Up((i,s)=>{rv(r,V(()=>n(i,s)))})),ro(r)})}tell(n){this._queue.push(n),this._running||(this._running=!0,this.drainQueueLaterOnExecutor())}get await(){return vi(n=>{const r=i=>n(Z(i));return this.tell(Up((i,s)=>{i._exitValue!==null?r(this._exitValue):i.addObserver(r)})),V(()=>this.tell(Up((i,s)=>{i.removeObserver(r)})))},this.id())}get inheritAll(){return Be((n,r)=>{const i=n.id(),s=n.getFiberRefs(),a=r.runtimeFlags,o=this.getFiberRefs(),l=DX(s,i,o);n.setFiberRefs(l);const c=n.getFiberRef(oR),u=O(Fa(a,c),wO(Ll),wO(p_));return JF(u)})}get poll(){return V(()=>Qu(this._exitValue))}unsafePoll(){return this._exitValue}interruptAsFork(n){return V(()=>this.tell(JS(ci(n))))}unsafeInterruptAsFork(n){this.tell(JS(ci(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(oR,this.currentRuntimeFlags),this._fiberRefs}unsafeDeleteFiberRef(n){this._fiberRefs=Tj(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=C_(this._fiberRefs,{fiberId:this._fiberId,fiberRef:n,value:r}),this.refreshRefCache()}refreshRefCache(){this.currentDefaultServices=this.getFiberRef(Tu),this.currentTracer=this.currentDefaultServices.unsafeMap.get(lE.key),this.currentSupervisor=this.getFiberRef(Fte),this.currentScheduler=this.getFiberRef(SE),this.currentContext=this.getFiberRef(is),this.currentSpan=this.currentContext.unsafeMap.get(sv.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=Ff;const i=globalThis[la];globalThis[la]=this;try{for(;r===Ff;)r=this._queue.length===0?pte:this.evaluateMessageWhileSuspended(this._queue.splice(0,1)[0])}finally{this._running=!1,globalThis[la]=i}this._queue.length>0&&!this._running?(this._running=!0,r===rR?(this.drainQueueLaterOnExecutor(),n=!1):n=!0):n=!1}}drainQueueLaterOnExecutor(){this.currentScheduler.scheduleTask(this.run,this.getFiberRef(af))}drainQueueWhileRunning(n,r){let i=r;for(;this._queue.length>0;){const s=this._queue.splice(0,1)[0];i=yte[s._tag](this,n,i,s)}return i}isInterrupted(){return!eG(this.getFiberRef(Xm))}addInterruptedCause(n){const r=this.getFiberRef(Xm);this.setFiberRef(Xm,Cn(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(JS(ci(this.id()))),n=!0;return n}interruptAllChildren(){if(this.sendInterruptSignalToAllChildren()){const n=this._children.values();this._children=null;let r=!1;return Qk({while:()=>!r,body:()=>{const s=n.next();return s.done?V(()=>{r=!0}):Zr(s.value.await)},step:()=>{}})}return null}reportExitValue(n){if(vO(this.currentRuntimeFlags)){const r=this.getFiberRef(y_),i=this.id().startTimeMillis,s=Date.now();switch(mte.unsafeUpdate(s-i,r),nR.unsafeUpdate(-1,r),n._tag){case cn:{dte.unsafeUpdate(1,r);break}case ln:{hte.unsafeUpdate(1,r);break}}}if(n._tag==="Failure"){const r=this.getFiberRef(iQ);!$b(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(kte)}log(n,r,i){const s=St(i)?i.value:this.getFiberRef(ZJ),a=this.getFiberRef(Ste);if(sW(a,s))return;const o=this.getFiberRef(eQ),l=this.getFiberRef(WJ),c=this.getLoggers(),u=this.getFiberRefs();if(Lk(c)>0){const f=$s(this.getFiberRef(Tu),of),d=new Date(f.unsafeCurrentTimeMillis());NV(u,()=>{for(const h of c)h.log({fiberId:this.id(),logLevel:s,message:n,cause:r,context:u,spans:o,annotations:l,date:d})})}}evaluateMessageWhileSuspended(n){switch(n._tag){case CE:return rR;case xE:return this.processNewInterruptSignal(n.cause),this._asyncInterruptor!==null&&(this._asyncInterruptor(Xe(n.cause)),this._asyncInterruptor=null),Ff;case EE:return this._asyncInterruptor=null,this._asyncBlockingOn=null,this.evaluateEffect(n.effect),Ff;case kE:return n.onFiber(this,this._exitValue!==null?GX:YX(this.currentRuntimeFlags,this._asyncBlockingOn)),Ff;default:return Zm(n)}}evaluateEffect(n){this.currentSupervisor.onResume(this);try{let r=ha(this.currentRuntimeFlags)&&this.isInterrupted()?Xe(this.getInterruptedCause()):n;for(;r!==null;){const i=r,s=this.runLoop(i);if(s===ms){const a=ps.currentOp;ps.currentOp=null,a._op===Ip?sJ(this.currentRuntimeFlags)?(this.tell(SZ()),this.tell(Ql(Tn)),r=null):r=Tn:a._op===kd&&(r=null)}else{this.currentRuntimeFlags=O(this.currentRuntimeFlags,oJ(p_));const a=this.interruptAllChildren();a!==null?r=B(a,()=>s):(this._queue.length===0?this.setExitValue(s):this.tell(Ql(s)),r=null)}}}finally{this.currentSupervisor.onSuspend(this)}}start(n){if(this._running)this.tell(Ql(n));else{this._running=!0;const r=globalThis[la];globalThis[la]=this;try{this.evaluateEffect(n)}finally{this._running=!1,globalThis[la]=r,this._queue.length>0&&this.drainQueueLaterOnExecutor()}}}startFork(n){this.tell(Ql(n))}patchRuntimeFlags(n,r){const i=Hc(n,r);return globalThis[la]=this,this.currentRuntimeFlags=i,i}initiateAsync(n,r){let i=!1;const s=a=>{i||(i=!0,this.tell(Ql(a)))};ha(n)&&(this._asyncInterruptor=s);try{r(s)}catch(a){s(en(Gr(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!==zp)return n;n=this.popStack()}}getNextFailCont(){let n=this.popStack();for(;n;){if(n._op!==Fg&&n._op!==Pg&&n._op!==Ed)return n;n=this.popStack()}}[(cD=CZ,lD=OZ,DV)](n){return V(()=>pL(this.currentContext,n))}Left(n){return At(n.left)}None(n){return At(new Xb)}Right(n){return Ze(n.right)}Some(n){return Ze(n.value)}Micro(n){return Xg(r=>{let i=r;const s=zW(TW(n,this.currentContext));return s.addObserver(a=>{if(a._tag==="Success")return i(Ze(a.value));switch(a.cause._tag){case"Interrupt":return i(Xe(ci(Sr)));case"Fail":return i(At(a.cause.error));case"Die":return i(Ea(a.cause.defect))}}),Xg(a=>{i=o=>{a(et)},s.unsafeInterrupt()})})}[tL](n){const r=pn(()=>n.effect_instruction_i0()),i=this.getNextSuccessCont();return i!==void 0?(i._op in jf||Zm(i),jf[i._op](this,i,r)):(ps.currentOp=Ze(r),ms)}[cn](n){const r=n,i=this.getNextSuccessCont();return i!==void 0?(i._op in jf||Zm(i),jf[i._op](this,i,r.effect_instruction_i0)):(ps.currentOp=r,ms)}[ln](n){const r=n.effect_instruction_i0,i=this.getNextFailCont();if(i!==void 0)switch(i._op){case zp:case jg:return ha(this.currentRuntimeFlags)&&this.isInterrupted()?Xe(lO(r)):pn(()=>i.effect_instruction_i1(r));case"OnStep":return ha(this.currentRuntimeFlags)&&this.isInterrupted()?Xe(lO(r)):Ze(Xe(r));case mk:return this.patchRuntimeFlags(this.currentRuntimeFlags,i.patch),ha(this.currentRuntimeFlags)&&this.isInterrupted()?Xe(Cn(r,this.getInterruptedCause())):Xe(r);default:Zm(i)}else return ps.currentOp=Xe(r),ms}[nL](n){return pn(()=>n.effect_instruction_i0(this,$j(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=gh(a.refs,r),c=Fa(a.flags,i);return Ze(FF(n.effect_instruction_i0,Be(u=>{for(;s.length>0;)u.pushStack(s.pop());return u.setFiberRefs(yh(u.id(),u.getFiberRefs())(l)),u.currentRuntimeFlags=Hc(c)(u.currentRuntimeFlags),n.effect_instruction_i1})))}return Si(s=>B(ME(RJ(n.effect_instruction_i0)),()=>s(n.effect_instruction_i1)))}RunBlocked(n){return bte(n.effect_instruction_i0)}[Gu](n){const r=n.effect_instruction_i0,i=this.currentRuntimeFlags,s=Hc(i,r);if(ha(s)&&this.isInterrupted())return Xe(this.getInterruptedCause());if(this.patchRuntimeFlags(this.currentRuntimeFlags,r),n.effect_instruction_i1){const a=Fa(s,i);return this.pushStack(new MJ(a,n)),pn(()=>n.effect_instruction_i1(i))}else return Tn}[Fg](n){return this.pushStack(n),n.effect_instruction_i0}OnStep(n){return this.pushStack(n),n.effect_instruction_i0}[zp](n){return this.pushStack(n),n.effect_instruction_i0}[jg](n){return this.pushStack(n),n.effect_instruction_i0}[kd](n){return this._asyncBlockingOn=n.effect_instruction_i1,this.initiateAsync(this.currentRuntimeFlags,n.effect_instruction_i0),ps.currentOp=n,ms}[Ip](n){return this._isYielding=!1,ps.currentOp=n,ms}[Pg](n){const r=n.effect_instruction_i0,i=n.effect_instruction_i1;return r()?(this.pushStack(n),i()):Tn}[Ed](n){return jf[Ed](this,n,void 0)}[kb](n){return pn(()=>n.commit())}runLoop(n){let r=n;for(this.currentOpCount=0;;){if(this.currentRuntimeFlags&iJ&&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(Xk({priority:i}),()=>s)}}try{if(r=this.currentTracer.context(()=>{if(vte!==r[gl]._V){const i=this.getFiberRef(sQ);if(i._tag==="Some"){const s=r[gl]._V;this.log(`Executing an Effect versioned ${s} with a Runtime of version ${pk()}, 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`,eo,i)}}return this[r._op](r)},this),r===ms){const i=ps.currentOp;return i._op===Ip||i._op===kd?ms:(ps.currentOp=null,i._op===cn||i._op===ln?i:Xe(Gr(i)))}}catch(i){r!==ms&&!ue(r,"_op")||!(r._op in this)?r=qF(`Not a valid effect: ${hu(r)}`):dQ(i)?r=Xe(Cn(Gr(i),ci(Sr))):r=Ea(i)}}}}const Ste=pe("effect/FiberRef/currentMinimumLogLevel",()=>tn(aW("Info"))),wte=e=>TE(t=>{const n=Oj(t.context,Tu);$s(n,_j).unsafe.log(e.log(t))}),_te=pe(Symbol.for("effect/Logger/defaultLogger"),()=>wte(jZ)),xte=pe(Symbol.for("effect/Logger/tracerLogger"),()=>TE(({annotations:e,cause:t,context:n,fiberId:r,logLevel:i,message:s})=>{const a=Yu(ph(n,is),sv);if(a._tag==="None"||a.value._tag==="ExternalSpan")return;const o=pL(ph(n,Tu),of),l={};for(const[c,u]of e)l[c]=u;l["effect.fiberId"]=BG(r),l["effect.logLevel"]=i.label,t!==null&&t._tag!=="Empty"&&(l["effect.cause"]=tf(t,{renderErrorCause:!0})),a.value.event(hu(Array.isArray(s)&&s.length===1?s[0]:s),o.unsafeCurrentTimeNanos(),l)})),kte=pe(Symbol.for("effect/FiberRef/currentLoggers"),()=>JJ($k(_te,xte))),Ete=x(e=>Xs(e[0]),(e,t)=>sm(Yk(e,n=>Cte(r=>t(n,r))))),Cte=e=>Be(t=>{const n=t.getFiberRefs(),r=aJ(t.currentRuntimeFlags,Ll);return B(D3,i=>Wg(i,s=>Be(a=>{const o=a.getFiberRefs(),l=a.currentRuntimeFlags,c=gh(o,n),u=Fa(l,r),f=gh(n,o);return a.setFiberRefs(yh(c,a.id(),n)),Sh(LJ(e(s),u),V(()=>{a.setFiberRefs(yh(f,a.id(),a.getFiberRefs()))}))})))}),Tte=e=>{if(Array.isArray(e)||G$(e))return[e,K()];const t=Object.keys(e),n=t.length;return[t.map(r=>e[r]),ee(r=>{const i={};for(let s=0;s<n;s++)i[t[s]]=r[s];return i})]},Ate=(e,t,n)=>{const r=[];for(const i of e)r.push(Eu(i));return B(Ou(r,ge,{concurrency:n==null?void 0:n.concurrency,batching:n==null?void 0:n.batching,concurrentFinalizers:n==null?void 0:n.concurrentFinalizers}),i=>{const s=K(),a=i.length,o=new Array(a),l=new Array(a);let c=!1;for(let u=0;u<a;u++){const f=i[u];f._tag==="Left"?(o[u]=ee(f.left),c=!0):(l[u]=f.right,o[u]=s)}return c?t._tag==="Some"?At(t.value(o)):At(o):n!=null&&n.discard?et:t._tag==="Some"?Z(t.value(l)):Z(l)})},Ote=(e,t,n)=>{const r=[];for(const i of e)r.push(Eu(i));return n!=null&&n.discard?Ou(r,ge,{concurrency:n==null?void 0:n.concurrency,batching:n==null?void 0:n.batching,discard:!0,concurrentFinalizers:n==null?void 0:n.concurrentFinalizers}):Ae(Ou(r,ge,{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)},A3=(e,t)=>{const[n,r]=Tte(e);return(t==null?void 0:t.mode)==="validate"?Ate(n,r,t):(t==null?void 0:t.mode)==="either"?Ote(n,r,t):(t==null?void 0:t.discard)!==!0&&r._tag==="Some"?Ae(Ou(n,ge,t),r.value):Ou(n,ge,t)},Ou=x(e=>G$(e[0]),(e,t,n)=>Be(r=>{const i=(n==null?void 0:n.batching)===!0||(n==null?void 0:n.batching)==="inherit"&&r.getFiberRef(rQ);return n!=null&&n.discard?GO(n.concurrency,()=>Xl(ty,n==null?void 0:n.concurrentFinalizers)(s=>i?Ki(e,(a,o)=>s(t(a,o)),!0,!1,1):Kb(e,(a,o)=>s(t(a,o)))),()=>Xl(k_,n==null?void 0:n.concurrentFinalizers)(s=>Ki(e,(a,o)=>s(t(a,o)),i,!1)),s=>Xl(E_(s),n==null?void 0:n.concurrentFinalizers)(a=>Ki(e,(o,l)=>a(t(o,l)),i,!1,s))):GO(n==null?void 0:n.concurrency,()=>Xl(ty,n==null?void 0:n.concurrentFinalizers)(s=>i?U_(e,1,(a,o)=>s(t(a,o)),!0):Rs(e,(a,o)=>s(t(a,o)))),()=>Xl(k_,n==null?void 0:n.concurrentFinalizers)(s=>O3(e,(a,o)=>s(t(a,o)),i)),s=>Xl(E_(s),n==null?void 0:n.concurrentFinalizers)(a=>U_(e,s,(o,l)=>a(t(o,l)),i)))})),O3=(e,t,n)=>Te(()=>{const r=Ye(e),i=new Array(r.length);return Et(Ki(r,(a,o)=>B(t(a,o),l=>V(()=>i[o]=l)),n,!1),Z(i))}),Ki=(e,t,n,r,i)=>Si(s=>$J(a=>Be(o=>{let l=Array.from(e).reverse(),c=l.length;if(c===0)return et;let u=0,f=!1;const d=i?Math.min(l.length,i):l.length,h=new Set,p=new Array,b=()=>h.forEach(N=>{N.currentScheduler.scheduleTask(()=>{N.unsafeInterruptAsFork(o.id())},0)}),S=new Array,m=new Array,y=new Array,v=()=>{const N=p.filter(({exit:D})=>D._tag==="Failure").sort((D,M)=>D.index<M.index?-1:D.index===M.index?0:1).map(({exit:D})=>D);return N.length===0&&N.push(Tn),N},_=(N,D=!1)=>{const M=sm(a(N)),$=Rte(M,o,o.currentRuntimeFlags,lv);return o.currentScheduler.scheduleTask(()=>{D&&$.unsafeInterruptAsFork(o.id()),$.resume(M)},0),$},A=()=>{r||(c-=l.length,l=[]),f=!0,b()},E=n?NJ:ja,T=_(vi(N=>{const D=($,L)=>{$._op==="Blocked"?y.push($):(p.push({index:L,exit:$}),$._op==="Failure"&&!f&&A())},M=()=>{if(l.length>0){const $=l.pop();let L=u++;const J=()=>{const F=l.pop();return L=u++,B(Xk(),()=>B(E(s(t(F,L))),Y))},Y=F=>l.length>0&&(D(F,L),l.length>0)?J():Z(F),G=B(E(s(t($,L))),Y),z=_(G);S.push(z),h.add(z),f&&z.currentScheduler.scheduleTask(()=>{z.unsafeInterruptAsFork(o.id())},0),z.addObserver(F=>{let I;if(F._op==="Failure"?I=F:I=F.effect_instruction_i0,m.push(z),h.delete(z),D(I,L),p.length===c)N(Z(wt(qc(v(),{parallel:!0}),()=>Tn)));else if(y.length+p.length===c){const te=v(),R=y.map(Re=>Re.effect_instruction_i0).reduce(zF);N(Z(FF(R,Ki([wt(qc(te,{parallel:!0}),()=>Tn),...y.map(Re=>Re.effect_instruction_i1)],Re=>Re,n,!0,i))))}else M()})}};for(let $=0;$<d;$++)M()}));return Zr(yl(Vb(s(vh(T))),Zb({onFailure:N=>{A();const D=y.length+1,M=Math.min(typeof i=="number"?i:y.length,y.length),$=Array.from(y);return vi(L=>{let J=0,Y=0;const G=(F,I)=>te=>{J++,J===D&&L(Ze(Xe(N))),$.length>0&&I&&z()},z=()=>{_($.pop(),!0).addObserver(G(Y,!0)),Y++};T.addObserver(G(Y,!1)),Y++;for(let F=0;F<M;F++)z()})},onSuccess:()=>Rs(m,N=>N.inheritAll)})))}))),U_=(e,t,n,r)=>Te(()=>{const i=Ye(e),s=new Array(i.length);return Et(Ki(i,(o,l)=>Ae(n(o,l),c=>s[l]=c),r,!1,t),Z(s))}),ME=e=>Mte(e,lv),R3=(e,t,n,r=null)=>{const i=my(e,t,n,r);return i.resume(e),i},Rte=(e,t,n,r=null)=>my(e,t,n,r),my=(e,t,n,r=null)=>{const i=yF(),s=t.getFiberRefs(),a=zX(s,i),o=new T3(i,a,n),l=ph(a,is),c=o.currentSupervisor;return c.onStart(l,e,ee(t),o),o.addObserver(f=>c.onEnd(f,o)),(r!==null?r:O(t.getFiberRef(b_),wt(()=>t.scope()))).add(n,o),o},Mte=(e,t)=>Be((n,r)=>Z(R3(e,n,r.runtimeFlags,t))),iR=e=>Fl(t=>Nt(Yu(t,po),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Parallel":return e;case"Sequential":case"ParallelN":return B(ks(n,k_),r=>um(e,r))}}})),sR=e=>t=>Fl(n=>Nt(Yu(n,po),{onNone:()=>t,onSome:r=>r.strategy._tag==="ParallelN"&&r.strategy.parallelism===e?t:B(ks(r,E_(e)),i=>um(t,i))})),Xl=(e,t)=>n=>Fl(r=>Nt(Yu(r,po),{onNone:()=>n(ge),onSome:i=>{if(t===!0){const s=e._tag==="Parallel"?iR:e._tag==="Sequential"?aR:sR(e.parallelism);switch(i.strategy._tag){case"Parallel":return s(n(iR));case"Sequential":return s(n(aR));case"ParallelN":return s(n(sR(i.strategy.parallelism)))}}else return n(ge)}})),M3=e=>B(po,e),N3=e=>B(NE(),t=>yl(e(t),n=>t.close(n))),aR=e=>Fl(t=>Nt(Yu(t,po),{onNone:()=>e,onSome:n=>{switch(n.strategy._tag){case"Sequential":return e;case"Parallel":case"ParallelN":return B(ks(n,ty),r=>um(e,r))}}})),Nte=x(e=>Xs(e[1]),(e,t,n)=>cm(e,t,(r,i)=>[r,i],n)),Dte=x(e=>Xs(e[1]),(e,t,n)=>(n==null?void 0:n.concurrent)!==!0&&((n==null?void 0:n.batching)===void 0||n.batching===!1)?Jb(e,t):cm(e,t,(r,i)=>r,n)),zte=x(e=>Xs(e[1]),(e,t,n)=>(n==null?void 0:n.concurrent)!==!0&&((n==null?void 0:n.batching)===void 0||n.batching===!1)?Et(e,t):cm(e,t,(r,i)=>i,n)),cm=x(e=>Xs(e[1]),(e,t,n,r)=>Ae(A3([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))),po=mo("effect/Scope"),D3=po,Ite=(e,t)=>{e.state._tag==="Open"&&e.state.finalizers.set({},t)},$te={[kO]:kO,[EO]:EO,pipe(){return re(this,arguments)},fork(e){return V(()=>{const t=z3(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),Ite(t,i=>V(()=>{this.state._tag==="Open"&&this.state.finalizers.delete(n)})),t})},close(e){return Te(()=>{if(this.state._tag==="Closed")return et;const t=Array.from(this.state.finalizers.values()).reverse();return this.state={_tag:"Closed",exit:e},t.length===0?et:AX(this.strategy)?O(Rs(t,n=>ja(n(e))),B(n=>O(qc(n),Br(KS),wt(()=>Tn)))):OX(this.strategy)?O(O3(t,n=>ja(n(e)),!1),B(n=>O(qc(n,{parallel:!0}),Br(KS),wt(()=>Tn)))):O(U_(t,this.strategy.parallelism,n=>ja(n(e)),!1),B(n=>O(qc(n,{parallel:!0}),Br(KS),wt(()=>Tn))))})},addFinalizer(e){return Te(()=>this.state._tag==="Closed"?e(this.state.exit):(this.state.finalizers.set({},e),et))}},z3=(e=tl)=>{const t=Object.create($te);return t.strategy=e,t.state={_tag:"Open",finalizers:new Map},t},NE=(e=tl)=>V(()=>z3(e)),um=x(2,(e,t)=>hj(e,nr(bk(po,t)))),Lte=e=>sf(e,{differ:ute,fork:Od}),oR=XJ(lJ),Fte=Lte(fv),I3=x(3,(e,t,n)=>Pte(e,t,{onSelfWin:(r,i)=>B(r.await,s=>{switch(s._tag){case cn:return B(r.inheritAll,()=>n.onSelfDone(s,i));case ln:return n.onSelfDone(s,i)}}),onOtherWin:(r,i)=>B(r.await,s=>{switch(s._tag){case cn:return B(r.inheritAll,()=>n.onOtherDone(s,i));case ln:return n.onOtherDone(s,i)}})})),jte=x(2,(e,t)=>rm(n=>I3(e,t,{onSelfDone:(r,i)=>w_(r,{onFailure:s=>O(vh(i),YO(a=>to(s,a))),onSuccess:s=>O(i,hh(n),Hn(s))}),onOtherDone:(r,i)=>w_(r,{onFailure:s=>O(vh(i),YO(a=>to(a,s))),onSuccess:s=>O(i,hh(n),Hn(s))})}))),Pte=x(3,(e,t,n)=>Be((r,i)=>{const s=i.runtimeFlags,a=Jh(!0),o=my(e,r,s,n.selfScope),l=my(t,r,s,n.otherScope);return vi(c=>{o.addObserver(()=>lR(o,l,n.onSelfWin,a,c)),l.addObserver(()=>lR(l,o,n.onOtherWin,a,c)),o.startFork(e),l.startFork(t)},Ad(o.id(),l.id()))})),lR=(e,t,n,r,i)=>{DG(!0,!1)(r)&&i(n(e,t))},Sh=x(2,(e,t)=>Si(n=>Wr(n(e),{onFailure:r=>Wr(t,{onFailure:i=>en(Cn(r,i)),onSuccess:()=>en(r)}),onSuccess:r=>Hn(t,r)}))),Ute=(e,t,n)=>rm(r=>B(B(ME(Kk(e)),i=>vi(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"&&Wb(c.result.state.current.effect)&&c.result.state.current.effect._tag==="Failure"&&nF(c.result.state.current.effect.cause)))&&(l.forEach(c=>c()),n==null||n(),s(Wk(i)))};i.addObserver(c=>{l.forEach(u=>u()),s(c)});const l=t.map((c,u)=>{const f=d=>{a[u]=d,o()};return c.listeners.addObserver(f),()=>c.listeners.removeObserver(f)});return o(),V(()=>{l.forEach(c=>c())})})),()=>Te(()=>{const i=t.flatMap(s=>s.state.completed?[]:[s]);return Kb(i,s=>nte(s.request,gQ(r)))}))),Bte=eo,$3=hl,B_=Gr,L3=ci,Hte=to,qte=ZK,Vte=tF,py=nF,Kte=$b,Gte=Fk,Yte=sF,Jte=iG,Qte=lQ,Xte=Lb,uf=Xb,Wte=tf,Zte="effect/ScheduleInterval",gy=Symbol.for(Zte),F3={[gy]:gy,startMillis:0,endMillis:0},j3=(e,t)=>e>t?F3:{[gy]:gy,startMillis:e,endMillis:t},ene=x(2,(e,t)=>tne(e,t)===e),tne=x(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),nne=e=>e.startMillis>=e.endMillis,rne=x(2,(e,t)=>{const n=Math.max(e.startMillis,t.startMillis),r=Math.min(e.endMillis,t.endMillis);return j3(n,r)}),ine=e=>j3(e,Number.POSITIVE_INFINITY),P3=F3,sne=ene,ane=nne,one=rne,lne=ine,cne="effect/ScheduleIntervals",cR=Symbol.for(cne),U3=e=>({[cR]:cR,intervals:e}),une=x(2,(e,t)=>fne(e.intervals,t.intervals,Zt())),fne=(e,t,n)=>{let r=e,i=t,s=n;for(;Ks(r)&&Ks(i);){const a=O(Fi(r),one(Fi(i))),o=ane(a)?s:O(s,Rn(a));O(Fi(r),sne(Fi(i)))?r=Os(r):i=Os(i),s=o}return U3(Vs(s))},H_=e=>O(e.intervals,Ck,wt(()=>P3)).startMillis,dne=e=>O(e.intervals,Ck,wt(()=>P3)).endMillis,hne=x(2,(e,t)=>H_(e)<H_(t)),mne=e=>Ks(e.intervals),pne=U3,gne=une,yne=H_,uR=dne,bne=hne,vne=mne,DE="Continue",B3="Done",Sne=e=>({_tag:DE,intervals:e}),wne=e=>({_tag:DE,intervals:pne(qt(e))}),_ne={_tag:B3},xne=e=>e._tag===DE,kne=e=>e._tag===B3,Ene=Sne,Cne=wne,wh=_ne,fR=xne,yy=kne,Tne=po,by=aj,Ane=Wg,vy=v_,One=um,H3=ks,q3=NE;class Rne{constructor(t){g(this,"permits");g(this,"waiters",new Set);g(this,"taken",0);g(this,"take",t=>ka(n=>{if(this.free<t){const r=()=>{this.free<t||(this.waiters.delete(r),this.taken+=t,n(Z(t)))};return this.waiters.add(r),V(()=>{this.waiters.delete(r)})}return this.taken+=t,n(Z(t))}));g(this,"resize",t=>Zr(Be(n=>(this.permits=t,this.free<0?et:this.updateTakenUnsafe(n,r=>r)))));g(this,"release",t=>this.updateTaken(n=>n-t));g(this,"releaseAll",this.updateTaken(t=>0));g(this,"withPermits",t=>n=>Si(r=>B(r(this.take(t)),i=>Sh(r(n),this.release(i)))));g(this,"withPermitsIfAvailable",t=>n=>Si(r=>Te(()=>this.free<t?iZ:(this.taken+=t,Sh(r(JW(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(SE).scheduleTask(()=>{const r=this.waiters.values();let i=r.next();for(;i.done===!1&&this.free>0;)i.value(),i=r.next()},t.getFiberRef(af)),Z(this.free)}updateTaken(t){return Be(n=>this.updateTakenUnsafe(n,t))}}const zE=e=>new Rne(e),Mne=e=>V(()=>zE(e));class Nne extends cf{constructor(n){super();g(this,"isOpen");g(this,"waiters",[]);g(this,"scheduled",!1);g(this,"flushWaiters",()=>{this.scheduled=!1;const n=this.waiters;this.waiters=[];for(let r=0;r<n.length;r++)n[r](Tn)});g(this,"open",Be(n=>this.isOpen?et:(this.isOpen=!0,this.unsafeSchedule(n))));g(this,"release",Be(n=>this.isOpen?et:this.unsafeSchedule(n)));g(this,"await",ka(n=>this.isOpen?n(et):(this.waiters.push(n),V(()=>{const r=this.waiters.indexOf(n);r!==-1&&this.waiters.splice(r,1)}))));g(this,"close",V(()=>{this.isOpen=!1}));g(this,"whenOpen",n=>Et(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(af))),et}unsafeOpen(){this.isOpen||(this.isOpen=!0,this.flushWaiters())}unsafeClose(){this.isOpen=!1}}const Dne=e=>new Nne(e??!1),zne=x(2,(e,t)=>Be((n,r)=>{const i=t,s=R3(e,n,r.runtimeFlags,lv);if(i.state._tag==="Open"){const a=()=>rm(l=>ae(l,s.id())?et:Zr(Wk(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 Z(s)})),Ine="effect/Ref/SynchronizedRef",$ne=Symbol.for(Ine),Lne={_A:e=>e};var uD,fD,dD,hD;class Fne extends(hD=cf,dD=$ne,fD=qj,uD=ay,hD){constructor(n,r){super();g(this,"ref");g(this,"withLock");g(this,dD,Lne);g(this,fD,Vj);g(this,uD,ay);g(this,"get");this.ref=n,this.withLock=r,this.get=Vi(this.ref)}commit(){return this.get}modify(n){return this.modifyEffect(r=>Z(n(r)))}modifyEffect(n){return this.withLock(O(B(Vi(this.ref),n),B(([r,i])=>Hn(Kc(this.ref,i),r))))}}const jne=e=>V(()=>V3(e)),V3=e=>{const t=yE(e),n=zE(1);return new Fne(t,n.withPermits(1))},Pne=Symbol.for("effect/ManagedRuntime"),Une="Fresh",Bne="FromEffect",Hne="Scoped",qne="Suspend",Vne="Provide",K3="ProvideMerge",Kne="MergeAll",G3=RZ,Gne=NZ,dR=MZ,Pa=Wk,IE=hh,hR=vh,ff=e=>function(){if(arguments.length===1){const t=arguments[0];return(n,...r)=>e(t,n,...r)}return e.apply(this,arguments)},fm=ff((e,t,n)=>{const r=yF(),i=[[is,[[r,e.context]]]];n!=null&&n.scheduler&&i.push([SE,[[r,n.scheduler]]]);let s=$X(e.fiberRefs,{entries:i,forkAs:r});n!=null&&n.updateRefs&&(s=n.updateRefs(s,r));const a=new T3(r,s,e.runtimeFlags);let o=t;n!=null&&n.scope&&(o=B(H3(n.scope,tl),c=>Et(aj(c,rm(u=>ae(u,a.id())?et:hh(a,u))),yl(t,u=>vy(c,u)))));const l=a.currentSupervisor;return l!==fv&&(l.onStart(e.context,o,K(),a),a.addObserver(c=>l.onEnd(c,a))),lv.add(e.runtimeFlags,a),(n==null?void 0:n.immediate)===!1?a.resume(o):a.start(o),a}),Y3=ff((e,t,n={})=>{const r=fm(e,t,n);return n.onExit&&r.addObserver(i=>{n.onExit(i)}),(i,s)=>Y3(e)(O(r,IE(i??Sr)),{...s,onExit:s!=null&&s.onExit?a=>s.onExit(bZ(a)):void 0})}),J3=ff((e,t)=>{const n=Xne(e)(t);if(n._tag==="Failure")throw Q3(n.effect_instruction_i0);return n.effect_instruction_i0});class Yne 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`);g(this,"fiber");g(this,"_tag","AsyncFiberException");this.fiber=n,this.name=this._tag,this.stack=this.message}}const Jne=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new Yne(e);return Error.stackTraceLimit=t,n},QS=Symbol.for("effect/Runtime/FiberFailure"),ep=Symbol.for("effect/Runtime/FiberFailure/Cause");var mD,pD;class Qne extends Error{constructor(n){const r=oF(n)[0];super((r==null?void 0:r.message)||"An error has occurred");g(this,pD);g(this,mD);this[QS]=QS,this[ep]=n,this.name=r?`(FiberFailure) ${r.name}`:"FiberFailure",r!=null&&r.stack&&(this.stack=r.stack)}toJSON(){return{_id:"FiberFailure",cause:this[ep].toJSON()}}toString(){return"(FiberFailure) "+tf(this[ep],{renderErrorCause:!0})}[(pD=QS,mD=ep,Pe)](){return this.toString()}}const Q3=e=>{const t=Error.stackTraceLimit;Error.stackTraceLimit=0;const n=new Qne(e);return Error.stackTraceLimit=t,n},X3=e=>{const t=e;switch(t._op){case"Failure":case"Success":return t;case"Left":return mh(t.left);case"Right":return Ze(t.right);case"Some":return Ze(t.value);case"None":return mh(new Xb)}},Xne=ff((e,t)=>{const n=X3(t);if(n)return n;const r=new vE,i=fm(e)(t,{scheduler:r});r.flush();const s=i.unsafePoll();return s||lj(Vk(Jne(i),oE(i)))}),Wne=ff((e,t,n)=>Zne(e,t,n).then(r=>{switch(r._tag){case cn:return r.effect_instruction_i0;case ln:throw Q3(r.effect_instruction_i0)}})),Zne=ff((e,t,n)=>new Promise(r=>{const i=X3(t);i&&r(i);const s=fm(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 W3{constructor(t,n,r){g(this,"context");g(this,"runtimeFlags");g(this,"fiberRefs");this.context=t,this.runtimeFlags=n,this.fiberRefs=r}pipe(){return re(this,arguments)}}const Z3=e=>new W3(e.context,e.runtimeFlags,e.fiberRefs),ere=()=>Be((e,t)=>Z(new W3(e.getFiberRef(is),t.runtimeFlags,e.getFiberRefs()))),tre=NF(Ll,RF,OF),Ru=Z3({context:Qi(),runtimeFlags:tre,fiberRefs:LX()}),nre=fm(Ru),rre=Wne(Ru),ire=J3(Ru),sre=x(2,(e,t)=>e.modifyEffect(t)),are="effect/Layer",eP=Symbol.for(are),ore={_RIn:e=>e,_E:e=>e,_ROut:e=>e},Sl={[eP]:ore,pipe(){return re(this,arguments)}},lre="effect/Layer/MemoMap",XS=Symbol.for(lre),cre=Ju()("effect/Layer/CurrentMemoMap",{defaultValue:()=>dre()}),ure=e=>ue(e,eP),fre=e=>e._op_layer===Une;var gD;gD=XS;class tP{constructor(t){g(this,"ref");g(this,gD);this.ref=t,this[XS]=XS}getOrElseMemoize(t,n){return O(sre(this.ref,r=>{const i=r.get(t);if(i!==void 0){const[s,a]=i,o=O(s,B(([l,c])=>O(t3(l),Hn(c))),yl(Zb({onFailure:()=>et,onSuccess:()=>Wg(n,a)})));return Z([o,r])}return O(oy(0),B(s=>O(tv(),B(a=>O(oy(()=>et),Ae(o=>{const l=Si(u=>O(NE(),B(f=>O(u(B(sP(t,f,!0),d=>QW(d(this)))),ja,B(d=>{switch(d._tag){case ln:return O(fj(a,d.effect_instruction_i0),Et(v_(f,d)),Et(en(d.effect_instruction_i0)));case cn:return O(Kc(o,h=>O(v_(f,h),Jk(Kj(s,p=>[p===1,p-1])),Zr)),Et(ly(s,h=>h+1)),Et(Wg(n,h=>O(V(()=>r.delete(t)),Et(Vi(o)),B(p=>p(h))))),Et(iE(a,d.effect_instruction_i0)),Hn(d.effect_instruction_i0[1]))}}))))),c=[O(ro(a),yl(w_({onFailure:()=>et,onSuccess:()=>ly(s,u=>u+1)}))),u=>O(Vi(o),B(f=>f(u)))];return[l,fre(t)?r:r.set(t,c)]}))))))}),Vb)}}const nP=Te(()=>Ae(jne(new Map),e=>new tP(e))),dre=()=>new tP(V3(new Map)),rP=x(2,(e,t)=>B(nP,n=>iP(e,n,t))),iP=x(3,(e,t,n)=>B(sP(e,n),r=>n3(r(t),cre,t))),sP=(e,t,n=!1)=>{const r=e;switch(r._op_layer){case"Locally":return V(()=>i=>r.f(i.getOrElseMemoize(r.self,t)));case"ExtendScope":return V(()=>i=>M3(s=>i.getOrElseMemoize(r.layer,s)));case"Fold":return V(()=>i=>O(i.getOrElseMemoize(r.layer,t),Wr({onFailure:s=>i.getOrElseMemoize(r.failureK(s),t),onSuccess:s=>i.getOrElseMemoize(r.successK(s),t)})));case"Fresh":return V(()=>i=>O(r.layer,rP(t)));case"FromEffect":return V(n?()=>i=>r.effect:()=>i=>i.getOrElseMemoize(e,t));case"Provide":return V(()=>i=>O(i.getOrElseMemoize(r.first,t),B(s=>O(i.getOrElseMemoize(r.second,t),iv(s)))));case"Scoped":return V(n?()=>i=>um(r.effect,t):()=>i=>i.getOrElseMemoize(e,t));case"Suspend":return V(()=>i=>i.getOrElseMemoize(r.evaluate(),t));case"ProvideMerge":return V(()=>i=>O(i.getOrElseMemoize(r.first,t),WF(i.getOrElseMemoize(r.second,t),r.zipK)));case"ZipWith":return QF(function*(){const i=yield*ks(t,x_),s=yield*ks(i,tl),a=yield*ks(i,tl);return o=>O(o.getOrElseMemoize(r.first,s),cm(o.getOrElseMemoize(r.second,a),r.zipK,{concurrent:!0}))});case"MergeAll":{const i=r.layers;return Ae(ks(t,x_),s=>a=>{const o=new Array(i.length);return Ae(Ki(i,XF(function*(l,c){const u=yield*ks(s,tl),f=yield*a.getOrElseMemoize(l,u);o[c]=f}),!1,!1),()=>d7(...o))})}}},hre=()=>aP(sE()),mre=x(2,(e,t)=>{const n=mL(e),r=n?e:t;return aP(Ae(n?t:e,s=>bk(r,s)))});function aP(e){const t=Object.create(Sl);return t._op_layer=Bne,t.effect=e,t}const oP=(...e)=>{const t=Object.create(Sl);return t._op_layer=Kne,t.layers=e,t},pre=x(2,(e,t)=>{const n=mL(e),r=n?e:t;return gre(Ae(n?t:e,s=>bk(r,s)))}),gre=e=>{const t=Object.create(Sl);return t._op_layer=Hne,t.effect=e,t},yre=e=>{const t=Object.create(Sl);return t._op_layer=qne,t.evaluate=e,t},lP=x(2,(e,t)=>yre(()=>{const n=Object.create(Sl);return n._op_layer=Vne,n.first=Object.create(Sl,{_op_layer:{value:K3,enumerable:!0},first:{value:hre(),enumerable:!0},second:{value:Array.isArray(t)?oP(...t):t},zipK:{value:(r,i)=>O(r,nr(i))}}),n.second=e,n})),bre=x(2,(e,t)=>{const n=Object.create(Sl);return n._op_layer=K3,n.first=t,n.second=lP(e,t),n.zipK=(r,i)=>O(r,nr(i)),n}),mR=x(2,(e,t)=>N3(n=>B(rP(t,n),r=>aE(e,r)))),pR=x(2,(e,t)=>{const n=gh(Ru.fiberRefs,t.fiberRefs),r=Fa(Ru.runtimeFlags,t.runtimeFlags);return Si(i=>Be(s=>{const a=s.getFiberRef(is),o=s.getFiberRefs(),l=yh(s.id(),o)(n),c=s.currentRuntimeFlags,u=Hc(r)(c),f=gh(l,o),d=Fa(u,c);return s.setFiberRefs(l),s.currentRuntimeFlags=u,Sh(aE(i(e),nr(a,t.context)),Be(h=>(h.setFiberRefs(yh(h.id(),h.getFiberRefs())(f)),h.currentRuntimeFlags=Hc(d)(h.currentRuntimeFlags),et)))}))}),vre=x(2,(e,t)=>Array.isArray(t)?mR(e,oP(...t)):ure(t)?mR(e,t):f7(t)?aE(e,t):Pne in t?B(t.runtimeEffect,n=>pR(e,n)):pR(e,t)),tp=oY,gR=e=>Sre(e.slice(0)),Sre=e=>Object.setPrototypeOf(e,aY),$E=Xh,wre=Xh,LE=function(){const e=Symbol.for("effect/Data/Error/plainArgs");return{BaseEffectError:class extends eE{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}(),_re=e=>{const t={BaseEffectError:class extends LE{constructor(){super(...arguments);g(this,"_tag",e)}}};return t.BaseEffectError.prototype.name=e,t.BaseEffectError},xre="effect/Schedule",cP=Symbol.for(xre),kre=e=>ue(e,cP),Ere="effect/ScheduleDriver",Cre=Symbol.for(Ere),q_={start:0,now:0,input:void 0,output:void 0,elapsed:wu,elapsedSincePrevious:wu,recurrence:0},yR=Ju()("effect/Schedule/CurrentIterationMetadata",{defaultValue:()=>q_}),Tre={_Out:e=>e,_In:e=>e,_R:e=>e},Are={_Out:e=>e,_In:e=>e,_R:e=>e};var yD;yD=cP;class Ore{constructor(t,n){g(this,"initial");g(this,"step");g(this,yD,Tre);this.initial=t,this.step=n}pipe(){return re(this,arguments)}}const bR=(e,t,n,r)=>ly(e,i=>i.recurrence===0?{now:t,input:n,output:r,recurrence:i.recurrence+1,elapsed:wu,elapsedSincePrevious:wu,start:t}:{now:t,input:n,output:r,recurrence:i.recurrence+1,elapsed:_u(t-i.start),elapsedSincePrevious:_u(t-i.now),start:i.start});var bD;bD=Cre;class Rre{constructor(t,n){g(this,"schedule");g(this,"ref");g(this,bD,Are);g(this,"iterationMeta",yE(q_));this.schedule=t,this.ref=n}get state(){return Ae(Vi(this.ref),t=>t[1])}get last(){return B(Vi(this.ref),([t,n])=>{switch(t._tag){case"None":return Hb(()=>new Xb);case"Some":return Z(t.value)}})}get reset(){return Kc(this.ref,[K(),this.schedule.initial]).pipe(Jb(Kc(this.iterationMeta,q_)))}next(t){return O(Ae(Vi(this.ref),n=>n[1]),B(n=>O(HW,B(r=>O(Te(()=>this.schedule.step(r,t,n)),B(([i,s,a])=>{const o=Kc(this.ref,[ee(s),i]);if(yy(a))return o.pipe(Et(At(K())));const l=yne(a.intervals)-r;if(l<=0)return o.pipe(Et(bR(this.iterationMeta,r,t,s)),Hn(s));const c=_u(l);return O(o,Et(bR(this.iterationMeta,r,t,s)),Et(rZ(c)),Hn(s))}))))))}}const dm=(e,t)=>new Ore(e,t),Mre=x(2,(e,t)=>FE(e,(n,r)=>V(()=>t(n,r)))),FE=x(2,(e,t)=>dm(e.initial,(n,r,i)=>B(e.step(n,r,i),([s,a,o])=>yy(o)?Z([s,a,wh]):Ae(t(r,a),l=>l?[s,a,o]:[s,a,wh])))),Nre=e=>O(oy([K(),e.initial]),Ae(t=>new Rre(e,t))),Dre=x(2,(e,t)=>zre(e,t,gne)),zre=x(3,(e,t,n)=>dm([e.initial,t.initial],(r,i,s)=>O(WF(e.step(r,i,s[0]),t.step(r,i,s[1]),(a,o)=>[a,o]),B(([[a,o,l],[c,u,f]])=>fR(l)&&fR(f)?V_(e,t,i,a,o,l.intervals,c,u,f.intervals,n):Z([[a,c],[o,u],wh]))))),V_=(e,t,n,r,i,s,a,o,l,c)=>{const u=c(s,l);return vne(u)?Z([[r,a],[i,o],Ene(u)]):O(s,bne(l))?B(e.step(uR(s),n,r),([f,d,h])=>yy(h)?Z([[f,a],[d,o],wh]):V_(e,t,n,f,d,h.intervals,a,o,l,c)):B(t.step(uR(l),n,a),([f,d,h])=>yy(h)?Z([[r,f],[i,d],wh]):V_(e,t,n,r,i,s,f,d,h.intervals,c))},Ire=x(2,(e,t)=>$re(e,n=>V(()=>t(n)))),$re=x(2,(e,t)=>dm(e.initial,(n,r,i)=>B(e.step(n,r,i),([s,a,o])=>Ae(t(a),l=>[s,l,o])))),Lre=e=>dm(e.initial,(t,n,r)=>O(e.step(t,n,r),Ae(([i,s,a])=>[i,n,a]))),Fre=e=>Bre(fP,t=>t<e),jre=(e,t)=>dm(e,(n,r,i)=>V(()=>[t(i),i,Cne(lne(n))])),Pre=x(2,(e,t)=>FE(e,(n,r)=>eZ(t(n)))),Ure=x(2,(e,t)=>FE(e,(n,r)=>t(n))),Bre=x(2,(e,t)=>Mre(e,(n,r)=>t(r))),Hp=Symbol.for("effect/Schedule/ScheduleDefect");var vD;vD=Hp;class Hre{constructor(t){g(this,"error");g(this,vD);this.error=t,this[Hp]=Hp}}const qre=e=>ue(e,Hp),vR=e=>dh(e,t=>Ea(new Hre(t))),Vre=e=>Nt(jk(e,t=>tF(t)&&qre(t.defect)?ee(t.defect):K()),{onNone:()=>e,onSome:t=>hl(t.error)}),Kre=e=>HF(e,t=>en(Vre(t))),SR=x(2,(e,t)=>Yre(e,t,(n,r)=>At(n))),Gre=x(2,(e,t)=>{if(kre(t))return SR(e,t);const n=t.schedule??Lre(fP),r=t.while?Ure(n,a=>{const o=t.while(a);return typeof o=="boolean"?Z(o):vR(o)}):n,i=t.until?Pre(r,a=>{const o=t.until(a);return typeof o=="boolean"?Z(o):vR(o)}):r,s=t.times?Dre(i,Fre(t.times)).pipe(Ire(a=>a[0])):i;return Kre(SR(e,s))}),Yre=x(3,(e,t,n)=>B(Nre(t),r=>no(e,{onFailure:i=>n(i,K()),onSuccess:i=>uP(JO(e,yR,Vi(r.iterationMeta)),r,(s,a)=>JO(n(s,a),yR,Vi(r.iterationMeta)),i)}))),uP=(e,t,n,r)=>no(t.next(r),{onFailure:()=>DJ(t.last),onSuccess:i=>no(e,{onFailure:s=>n(s,ee(i)),onSuccess:s=>uP(e,t,n,s)})}),fP=jre(0,e=>e+1),ji=tv,Fn=ro,Jre=uj,Qre=fj,K_=SQ,Ns=iE,Xre=rv,wR=Symbol.for("effect/MutableList"),Wre={[wR]:wR,[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 it(this.toJSON())},toJSON(){return{_id:"MutableList",values:Array.from(this).map(vt)}},[Pe](){return this.toJSON()},pipe(){return re(this,arguments)}},Zre=e=>({value:e,removed:!1,prev:void 0,next:void 0}),eie=()=>{const e=Object.create(Wre);return e.head=void 0,e.tail=void 0,e._length=0,e},dP=e=>jE(e)===0,jE=e=>e._length,tie=x(2,(e,t)=>{const n=Zre(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}),nie=e=>{const t=e.head;if(t!==void 0)return rie(e,t),t.value},rie=(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))},_R=Symbol.for("effect/MutableQueue"),Xn=Symbol.for("effect/mutable/MutableQueue/Empty"),iie={[_R]:_R,[Symbol.iterator](){return Array.from(this.queue)[Symbol.iterator]()},toString(){return it(this.toJSON())},toJSON(){return{_id:"MutableQueue",values:Array.from(this).map(vt)}},[Pe](){return this.toJSON()},pipe(){return re(this,arguments)}},hP=e=>{const t=Object.create(iie);return t.queue=eie(),t.capacity=e,t},sie=e=>hP(e),PE=()=>hP(void 0),UE=e=>jE(e.queue),G_=e=>dP(e.queue),aie=e=>e.capacity===void 0?1/0:e.capacity,_h=x(2,(e,t)=>{const n=jE(e.queue);return e.capacity!==void 0&&n===e.capacity?!1:(tie(t)(e.queue),!0)}),mP=x(2,(e,t)=>{const n=t[Symbol.iterator]();let r,i=Zt(),s=!0;for(;s&&(r=n.next())&&!r.done;)s=_h(r.value)(e);for(;r!=null&&!r.done;)i=Rn(r.value)(i),r=n.next();return Vs(i)}),Ua=x(2,(e,t)=>dP(e.queue)?t:nie(e.queue)),BE=x(2,(e,t)=>{let n=Zt(),r=0;for(;r<t;){const i=Ua(Xn)(e);if(i===Xn)break;n=Rn(i)(n),r+=1}return Vs(n)}),Y_=gl,go=Xs,WS=ZW,oie=A3,Gi=Ou,J_=vi,Sy=Be,ss=At,pi=en,lie=qF,Gc=QF,ZS=FJ,cie=nZ,mt=Z,Ot=Te,at=V,Fe=et,pP=dh,HE=HF,uie=WW,fie=Wj,die=oZ,Rd=aZ,$o=vs,ui=Kk,hie=im,nd=sm,wy=Si,e0=Hn,qE=Zr,Je=Ae,mie=Gk,VE=Gb,_y=Ete,pie=UF,Rc=Sh,dv=D3,gie=M3,Q_=N3,yie=rm,bie=ME,nl=zne,gP=sE,yP=hj,xy=vre,vie=uZ,Wl=Eu,vn=ja,bP=YF,Sie=cZ,ce=B,cc=Vb,t0=jte,vP=I3,SP=Yk,wP=sZ,xR=Gre,wie=rf,_ie=Zj,X_=KF,fi=Wr,hm=ere,xie=zE,kie=Mne,Eie=Dne,KE=nre,Cie=rre,Yr=ire,ky=Nte,GE=Dte,gn=zte,hv=cm,Tie=hZ,Aie=mZ,_P=XF,mv=fm,Oie=J3,Rie=Y3,pv=Ru,YE=Z3,W_=Symbol.for("effect/FiberHandle"),Mie=e=>ue(e,W_),Nie={[W_]:W_,toString(){return it(this.toJSON())},toJSON(){return{_id:"FiberHandle",state:this.state}},[Pe](){return this.toJSON()},pipe(){return re(this,arguments)}},Die=e=>{const t=Object.create(Nie);return t.state={_tag:"Open",fiber:void 0},t.deferred=e,t},zie=()=>_y(Je(ji(),e=>Die(e)),e=>Sy(t=>{const n=e.state;return n._tag==="Closed"?Fe:(e.state={_tag:"Closed"},n.fiber?bP(qE(IE(n.fiber,Ad(t.id(),qp))),e.deferred):Jre(e.deferred,_E))})),Iie=()=>ce(zie(),e=>Fie(e)()),xP=-1,qp=UG(xP,0),$ie=Xte(void 0,{emptyCase:$a,failCase:$a,dieCase:$a,interruptCase:(e,t)=>XL(gF(t),xP),sequentialCase:(e,t,n)=>t||n,parallelCase:(e,t,n)=>t||n}),Lie=x(e=>Mie(e[0]),(e,t,n)=>{if(e.state._tag==="Closed"){t.unsafeInterruptAsFork(Ad((n==null?void 0:n.interruptAs)??Sr,qp));return}else if(e.state.fiber!==void 0){if((n==null?void 0:n.onlyIfMissing)===!0){t.unsafeInterruptAsFork(Ad((n==null?void 0:n.interruptAs)??Sr,qp));return}else if(e.state.fiber===t)return;e.state.fiber.unsafeInterruptAsFork(Ad((n==null?void 0:n.interruptAs)??Sr,qp)),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),wE(r)&&((n==null?void 0:n.propagateInterruption)===!0?!$ie(r.cause):!Kte(r.cause))&&Xre(e.deferred,r)})}),kR=function(){let e;return()=>(e===void 0&&(e=KE($o)),e)}(),Fie=e=>()=>Je(hm(),t=>{const n=mv(t);return(r,i)=>{if(e.state._tag==="Closed")return kR();if(e.state.fiber!==void 0&&(i==null?void 0:i.onlyIfMissing)===!0)return kR();const s=n(r,i);return Lie(e,s,i),s}}),jie=mre,kP=pre,EP=lP,n0=bre,Pie=nP,ER=iP,JE=tn,CP=is,Uie=ij,Bie="effect/QueueEnqueue",Hie=Symbol.for(Bie),qie="effect/QueueDequeue",Vie=Symbol.for(qie),Kie="effect/QueueStrategy",TP=Symbol.for(Kie),Gie="effect/BackingQueue",Yie=Symbol.for(Gie),AP={_A:e=>e},Jie={_A:e=>e},Qie={_In:e=>e},Xie={_Out:e=>e};var SD,wD,_D;class Wie extends(_D=cf,wD=Hie,SD=Vie,_D){constructor(n,r,i,s,a){super();g(this,"queue");g(this,"takers");g(this,"shutdownHook");g(this,"shutdownFlag");g(this,"strategy");g(this,wD,Qie);g(this,SD,Xie);this.queue=n,this.takers=r,this.shutdownHook=i,this.shutdownFlag=s,this.strategy=a}pipe(){return re(this,arguments)}commit(){return this.take}capacity(){return this.queue.capacity()}get size(){return Te(()=>dh(this.unsafeSize(),()=>vs))}unsafeSize(){return Gt(this.shutdownFlag)?K():ee(this.queue.length()-UE(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 sm(Be(n=>(O(this.shutdownFlag,Qh(!0)),O(Ki(Yc(this.takers),r=>dj(r,n.id()),!1,!1),Et(this.strategy.shutdown),Jk(iE(this.shutdownHook,void 0)),Zr))))}get isShutdown(){return V(()=>Gt(this.shutdownFlag))}get awaitShutdown(){return ro(this.shutdownHook)}isActive(){return!Gt(this.shutdownFlag)}unsafeOffer(n){if(Gt(this.shutdownFlag))return!1;let r;if(this.queue.length()===0){const s=O(this.takers,Ua(Xn));s!==Xn?(rl(s,n),r=!0):r=!1}else r=!1;if(r)return!0;const i=this.queue.offer(n);return Mc(this.strategy,this.queue,this.takers),i}offer(n){return Te(()=>{if(Gt(this.shutdownFlag))return vs;let r;if(this.queue.length()===0){const s=O(this.takers,Ua(Xn));s!==Xn?(rl(s,n),r=!0):r=!1}else r=!1;if(r)return Z(!0);const i=this.queue.offer(n);return Mc(this.strategy,this.queue,this.takers),i?Z(!0):this.strategy.handleSurplus([n],this.queue,this.takers,this.shutdownFlag)})}offerAll(n){return Te(()=>{if(Gt(this.shutdownFlag))return vs;const r=Ye(n),i=this.queue.length()===0?Ye(mse(this.takers,r.length)):Wa,[s,a]=O(r,NL(i.length));for(let l=0;l<i.length;l++){const c=i[l],u=s[l];rl(c,u)}if(a.length===0)return Z(!0);const o=this.queue.offerAll(a);return Mc(this.strategy,this.queue,this.takers),Ob(o)?Z(!0):this.strategy.handleSurplus(o,this.queue,this.takers,this.shutdownFlag)})}get take(){return Be(n=>{if(Gt(this.shutdownFlag))return vs;const r=this.queue.poll(Xn);if(r!==Xn)return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),Z(r);{const i=ev(n.id());return O(Te(()=>(O(this.takers,_h(i)),Mc(this.strategy,this.queue,this.takers),Gt(this.shutdownFlag)?vs:ro(i))),im(()=>V(()=>pse(this.takers,i))))}})}get takeAll(){return Te(()=>Gt(this.shutdownFlag)?vs:V(()=>{const n=this.queue.pollUpTo(Number.POSITIVE_INFINITY);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),qs(n)}))}takeUpTo(n){return Te(()=>Gt(this.shutdownFlag)?vs:V(()=>{const r=this.queue.pollUpTo(n);return this.strategy.unsafeOnQueueEmptySpace(this.queue,this.takers),qs(r)}))}takeBetween(n,r){return Te(()=>OP(this,n,r,Zt()))}}const OP=(e,t,n,r)=>n<t?Z(r):O(lse(e,n),B(i=>{const s=t-i.length;return s===1?O(Z_(e),Ae(a=>O(r,Ut(i),n_(a)))):s>1?O(Z_(e),B(a=>OP(e,s-1,n-i.length-1,O(r,Ut(i),n_(a))))):Z(O(r,Ut(i)))})),Zie=e=>O(V(()=>sie(e)),B(t=>RP(MP(t),use()))),ese=()=>O(V(()=>PE()),B(e=>RP(MP(e),fse()))),tse=(e,t,n,r,i)=>new Wie(e,t,n,r,i),RP=(e,t)=>O(tv(),Ae(n=>tse(e,PE(),n,Jh(!1),t)));var xD;xD=Yie;class nse{constructor(t){g(this,"mutable");g(this,xD,Jie);this.mutable=t}poll(t){return Ua(this.mutable,t)}pollUpTo(t){return BE(this.mutable,t)}offerAll(t){return mP(this.mutable,t)}offer(t){return _h(this.mutable,t)}capacity(){return aie(this.mutable)}length(){return UE(this.mutable)}}const MP=e=>new nse(e),rse=e=>e.size,ise=e=>e.isShutdown,sse=e=>e.shutdown,ase=x(2,(e,t)=>e.offer(t)),ose=x(2,(e,t)=>e.unsafeOffer(t)),Z_=e=>e.take,lse=x(2,(e,t)=>e.takeUpTo(t)),cse=x(3,(e,t,n)=>e.takeBetween(t,n)),use=()=>new dse,fse=()=>new hse;var kD;kD=TP;class dse{constructor(){g(this,kD,AP);g(this,"putters",PE())}surplusSize(){return UE(this.putters)}onCompleteTakersWithEmptyQueue(t){for(;!G_(this.putters)&&!G_(t);){const n=Ua(t,void 0),r=Ua(this.putters,void 0);r[2]&&rl(r[1],!0),rl(n,r[0])}}get shutdown(){return O(qb,B(t=>O(V(()=>Yc(this.putters)),B(n=>Ki(n,([r,i,s])=>s?O(dj(i,t),Zr):et,!1,!1)))))}handleSurplus(t,n,r,i){return Be(s=>{const a=ev(s.id());return O(Te(()=>(this.unsafeOffer(t,a),this.unsafeOnQueueEmptySpace(n,r),Mc(this,n,r),Gt(i)?vs:ro(a))),im(()=>V(()=>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,Ua(Xn));if(i===Xn)r=!1;else{const s=t.offer(i[0]);s&&i[2]?rl(i[1],!0):s||Ey(this.putters,O(Yc(this.putters),Rn(i))),Mc(this,t,n)}}}unsafeOffer(t,n){const r=Ye(t);for(let i=0;i<r.length;i++){const s=r[i];i===r.length-1?O(this.putters,_h([s,n,!0])):O(this.putters,_h([s,n,!1]))}}unsafeRemove(t){Ey(this.putters,O(Yc(this.putters),Ek(([,n])=>n!==t)))}}var ED;ED=TP;class hse{constructor(){g(this,ED,AP)}surplusSize(){return 0}get shutdown(){return et}onCompleteTakersWithEmptyQueue(){}handleSurplus(t,n,r,i){return Z(!1)}unsafeOnQueueEmptySpace(t,n){}}const rl=(e,t)=>rv(e,Z(t)),Ey=(e,t)=>O(e,mP(t)),Yc=e=>O(e,BE(Number.POSITIVE_INFINITY)),mse=(e,t)=>O(e,BE(t)),pse=(e,t)=>{Ey(e,O(Yc(e),Ek(n=>t!==n)))},Mc=(e,t,n)=>{let r=!0;for(;r&&t.length()!==0;){const i=O(n,Ua(Xn));if(i!==Xn){const s=t.poll(Xn);s!==Xn?(rl(i,s),e.unsafeOnQueueEmptySpace(t,n)):Ey(n,O(Yc(n),Rn(i))),r=!0}else r=!1}r&&t.length()===0&&!G_(n)&&e.onCompleteTakersWithEmptyQueue(n)},gse=x(2,(e,t)=>e.publish(t)),yse=gse,NP=Zie,bse=ese,vse=rse,Sse=ise,Cy=sse,Zl=ase,wse=ose,CR=Z_,_se=cse,DP="Continue",xse="Close",kse="Yield",Ese="effect/ChannelChildExecutorDecision",TR=Symbol.for(Ese),Cse={[TR]:TR},zP=e=>{const t=Object.create(Cse);return t._tag=DP,t},Vp="ContinuationK",Tse="ContinuationFinalizer",IP=Symbol.for("effect/ChannelContinuation"),$P={_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 CD;CD=IP;class LP{constructor(t,n){g(this,"onSuccess");g(this,"onHalt");g(this,"_tag",Vp);g(this,CD,$P);this.onSuccess=t,this.onHalt=n}onExit(t){return wE(t)?this.onHalt(t.cause):this.onSuccess(t.value)}}var TD;TD=IP;class Ase{constructor(t){g(this,"finalizer");g(this,"_tag",Tse);g(this,TD,$P);this.finalizer=t}}const FP="PullAfterNext",Ose="PullAfterAllEnqueued",Rse="effect/ChannelUpstreamPullStrategy",Mse=Symbol.for(Rse),Nse={_A:e=>e},Dse={[Mse]:Nse},jP=e=>{const t=Object.create(Dse);return t._tag=FP,t.emitSeparator=e,t},PP="BracketOut",UP="Bridge",QE="ConcatAll",BP="Emit",HP="Ensuring",qP="Fail",VP="Fold",KP="FromEffect",GP="PipeTo",zse="Provide",YP="Read",JP="Succeed",QP="SucceedNow",XP="Suspend",Ise="effect/Channel",WP=Symbol.for(Ise),$se={_Env:e=>e,_InErr:e=>e,_InElem:e=>e,_InDone:e=>e,_OutErr:e=>e,_OutElem:e=>e,_OutDone:e=>e},ir={[WP]:$se,pipe(){return re(this,arguments)}},ZP=e=>ue(e,WP)||go(e),Lse=x(2,(e,t)=>{const n=Object.create(ir);return n._tag=PP,n.acquire=()=>e,n.finalizer=t,n}),e4=(e,t,n)=>{const r=Object.create(ir);return r._tag=QE,r.combineInners=t,r.combineAll=n,r.onPull=()=>jP(K()),r.onEmit=()=>zP,r.value=()=>e,r.k=ge,r},Fse=x(4,(e,t,n,r)=>{const i=Object.create(ir);return i._tag=QE,i.combineInners=n,i.combineAll=r,i.onPull=()=>jP(K()),i.onEmit=()=>zP,i.value=()=>e,i.k=t,i}),t4=x(2,(e,t)=>{const n=Object.create(ir);return n._tag=UP,n.input=t,n.channel=e,n}),jse=x(2,(e,t)=>{const n=Object.create(ir);return n._tag=HP,n.channel=e,n.finalizer=t,n}),XE=e=>wr($3(e)),wr=e=>Pse(()=>e),Pse=e=>{const t=Object.create(ir);return t._tag=qP,t.error=e,t},Bt=x(2,(e,t)=>{const n=Object.create(ir);return n._tag=VP,n.channel=e,n.k=new LP(t,wr),n}),Ln=e=>{const t=Object.create(ir);return t._tag=KP,t.effect=()=>e,t},gi=x(2,(e,t)=>{const n=Object.create(ir);return n._tag=GP,n.left=()=>e,n.right=()=>t,n}),n4=e=>df({onInput:e.onInput,onFailure:t=>Wn(Yte(t),{onLeft:e.onFailure,onRight:wr}),onDone:e.onDone}),df=e=>{const t=Object.create(ir);return t._tag=YP,t.more=e.onInput,t.done=new LP(e.onDone,e.onFailure),t},r4=e=>ZE(()=>e),xh=e=>{const t=Object.create(ir);return t._tag=QP,t.terminal=e,t},WE=e=>{const t=Object.create(ir);return t._tag=XP,t.channel=e,t},ZE=e=>{const t=Object.create(ir);return t._tag=JP,t.evaluate=e,t},Ws=xh(void 0),_n=e=>{const t=Object.create(ir);return t._tag=BP,t.out=e,t},mm="Done",pm="Emit",hf="FromEffect",gm="Read",Use=Symbol.for("effect/ChannelState"),Bse={_E:e=>e,_R:e=>e},gv={[Use]:Bse},ec=()=>{const e=Object.create(gv);return e._tag=mm,e},r0=()=>{const e=Object.create(gv);return e._tag=pm,e},Pf=e=>{const t=Object.create(gv);return t._tag=hf,t.effect=e,t},i0=(e,t,n,r)=>{const i=Object.create(gv);return i._tag=gm,i.upstream=e,i.onEffect=t,i.onEmit=n,i.onDone=r,i},Ty=e=>e._tag===hf,Hse=e=>Ty(e)?e.effect:Fe,AR=e=>Ty(e)?uie(e.effect):void 0,i4="PullFromChild",e1="PullFromUpstream",t1="DrainChildExecutors",s4="Emit";class np{constructor(t,n,r){g(this,"childExecutor");g(this,"parentSubexecutor");g(this,"onEmit");g(this,"_tag",i4);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?hv(vn(n),vn(r),(i,s)=>O(i,bh(s))):n!==void 0?n:r!==void 0?r:void 0}enqueuePullFromChild(t){return this}}class Fo{constructor(t,n,r,i,s,a,o,l){g(this,"upstreamExecutor");g(this,"createChild");g(this,"lastDone");g(this,"activeChildExecutors");g(this,"combineChildResults");g(this,"combineWithChildResult");g(this,"onPull");g(this,"onEmit");g(this,"_tag",e1);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?hv(s,vn(a),(o,l)=>bh(o,l)):s!==void 0?s:a!==void 0?vn(a):void 0,void 0);return i}enqueuePullFromChild(t){return new Fo(this.upstreamExecutor,this.createChild,this.lastDone,[...this.activeChildExecutors,t],this.combineChildResults,this.combineWithChildResult,this.onPull,this.onEmit)}}class Nc{constructor(t,n,r,i,s,a,o){g(this,"upstreamExecutor");g(this,"lastDone");g(this,"activeChildExecutors");g(this,"upstreamDone");g(this,"combineChildResults");g(this,"combineWithChildResult");g(this,"onPull");g(this,"_tag",t1);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?hv(s,vn(a),(o,l)=>bh(o,l)):s!==void 0?s:a!==void 0?vn(a):void 0,void 0);return i}enqueuePullFromChild(t){return new Nc(this.upstreamExecutor,this.lastDone,[...this.activeChildExecutors,t],this.upstreamDone,this.combineChildResults,this.combineWithChildResult,this.onPull)}}class s0{constructor(t,n){g(this,"value");g(this,"next");g(this,"_tag",s4);this.value=t,this.next=n}close(t){const n=this.next.close(t);return n}enqueuePullFromChild(t){return this}}const qse="Pulled",Vse="NoUpstream",Kse="effect/ChannelUpstreamPullRequest",Gse=Symbol.for(Kse),Yse={_A:e=>e},a4={[Gse]:Yse},OR=e=>{const t=Object.create(a4);return t._tag=qse,t.value=e,t},Jse=e=>{const t=Object.create(a4);return t._tag=Vse,t.activeDownstreamCount=e,t};class Bo{constructor(t,n,r){g(this,"_activeSubexecutor");g(this,"_cancelled");g(this,"_closeLastSubstream");g(this,"_currentChannel");g(this,"_done");g(this,"_doneStack",[]);g(this,"_emitted");g(this,"_executeCloseLastSubstream");g(this,"_input");g(this,"_inProgressFinalizer");g(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=ec();else switch(go(this._currentChannel)&&(this._currentChannel=Ln(this._currentChannel)),this._currentChannel._tag){case PP:{t=this.runBracketOut(this._currentChannel);break}case UP:{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=()=>ce(n.awaitRead(),()=>Ot(()=>{const s=r.run();switch(s._tag){case mm:return Ms(r.getDone(),{onFailure:a=>n.error(a),onSuccess:a=>n.done(a)});case pm:return ce(n.emit(r.getEmit()),()=>i());case hf:return fi(s.effect,{onFailure:a=>n.error(a),onSuccess:()=>i()});case gm:return eC(s,()=>i(),a=>n.error(a))}}));t=Pf(ce(bie(ui(i())),s=>at(()=>this.addFinalizer(a=>ce(Pa(s),()=>Ot(()=>{const o=this.restorePipe(a,r);return o!==void 0?o:Fe}))))))}break}case QE:{const n=new Bo(this._currentChannel.value(),this._providedEnv,i=>at(()=>{const s=this._closeLastSubstream===void 0?Fe:this._closeLastSubstream;this._closeLastSubstream=O(s,gn(i))}));n._input=this._input;const r=this._currentChannel;this._activeSubexecutor=new Fo(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 BP:{this._emitted=this._currentChannel.out,this._currentChannel=this._activeSubexecutor!==void 0?void 0:Ws,t=r0();break}case HP:{this.runEnsuring(this._currentChannel);break}case qP:{t=this.doneHalt(this._currentChannel.error());break}case VP:{this._doneStack.push(this._currentChannel.k),this._currentChannel=this._currentChannel.channel;break}case KP:{const n=this._providedEnv===void 0?this._currentChannel.effect():O(this._currentChannel.effect(),xy(this._providedEnv));t=Pf(fi(n,{onFailure:r=>{const i=this.doneHalt(r);return i!==void 0&&Ty(i)?i.effect:Fe},onSuccess:r=>{const i=this.doneSucceed(r);return i!==void 0&&Ty(i)?i.effect:Fe}}));break}case GP:{const n=this._input,r=new Bo(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 zse:{const n=this._providedEnv;this._providedEnv=this._currentChannel.context(),this._currentChannel=this._currentChannel.inner,this.addFinalizer(()=>at(()=>{this._providedEnv=n}));break}case YP:{const n=this._currentChannel;t=i0(this._input,ge,r=>{try{this._currentChannel=n.more(r)}catch(i){this._currentChannel=n.done.onExit(yZ(i))}},r=>{const i=s=>n.done.onExit(s);this._currentChannel=i(r)});break}case JP:{t=this.doneSucceed(this._currentChannel.evaluate());break}case QP:{t=this.doneSucceed(this._currentChannel.terminal);break}case XP:{this._currentChannel=this._currentChannel.channel();break}}}catch(n){this._currentChannel=wr(B_(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:o0(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===Vp)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,Rc(at(()=>this.clearInProgressFinalizer()))));let i;const s=this.popAllFinalizers(t);s!==void 0&&(i=O(s,Rc(at(()=>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(vn(a0(a)),ky(vn(a0(n))),ky(vn(a0(i))),Je(([[o,l],c])=>O(o,bh(l),bh(c))),nd,ce(o=>Ot(()=>o)))}doneSucceed(t){if(this._doneStack.length===0)return this._done=mr(t),this._currentChannel=void 0,ec();const n=this._doneStack[this._doneStack.length-1];if(n._tag===Vp){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=mr(t),this._currentChannel=void 0,ec();const i=o0(r.map(a=>a.finalizer),mr(t));this.storeInProgressFinalizer(i);const s=O(i,Rc(at(()=>this.clearInProgressFinalizer())),nd,ce(()=>at(()=>this.doneSucceed(t))));return Pf(s)}doneHalt(t){if(this._doneStack.length===0)return this._done=An(t),this._currentChannel=void 0,ec();const n=this._doneStack[this._doneStack.length-1];if(n._tag===Vp){this._doneStack.pop();try{this._currentChannel=n.onHalt(t)}catch(a){this._currentChannel=wr(B_(a))}return}const r=this.popNextFinalizers();if(this._doneStack.length===0)return this._doneStack=r.reverse(),this._done=An(t),this._currentChannel=void 0,ec();const i=o0(r.map(a=>a.finalizer),An(t));this.storeInProgressFinalizer(i);const s=O(i,Rc(at(()=>this.clearInProgressFinalizer())),nd,ce(()=>at(()=>this.doneHalt(t))));return Pf(s)}processCancellation(){return this._currentChannel=void 0,this._done=this._cancelled,this._cancelled=void 0,ec()}runBracketOut(t){const n=nd(fi(this.provide(t.acquire()),{onFailure:r=>at(()=>{this._currentChannel=wr(r)}),onSuccess:r=>at(()=>{this.addFinalizer(i=>this.provide(t.finalizer(r,i))),this._currentChannel=_n(r)})}));return Pf(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 Ase(t))}runSubexecutor(){const t=this._activeSubexecutor;switch(t._tag){case i4:return this.pullFromChild(t.childExecutor,t.parentSubexecutor,t.onEmit,t);case e1:return this.pullFromUpstream(t);case t1:return this.drainChildExecutors(t);case s4:return this._emitted=t.value,this._activeSubexecutor=t.next,r0()}}replaceSubexecutor(t){this._currentChannel=void 0,this._activeSubexecutor=t}finishWithExit(t){const n=Ms(t,{onFailure:r=>this.doneHalt(r),onSuccess:r=>this.doneSucceed(r)});return this._activeSubexecutor=void 0,n===void 0?Fe:Hse(n)}finishSubexecutorWithCloseEffect(t,...n){this.addFinalizer(()=>O(n,Gi(i=>O(at(()=>i(t)),ce(s=>s!==void 0?s:Fe)),{discard:!0})));const r=O(t,Ms({onFailure:i=>this.doneHalt(i),onSuccess:i=>this.doneSucceed(i)}));return this._activeSubexecutor=void 0,r}applyUpstreamPullStrategy(t,n,r){switch(r._tag){case FP:{const i=!t||n.some(s=>s!==void 0);return[r.emitSeparator,i?[void 0,...n]:n]}case Ose:{const i=!t||n.some(s=>s!==void 0);return[r.emitSeparator,i?[...n,void 0]:n]}}}pullFromChild(t,n,r,i){return i0(t,ge,s=>{const a=r(s);switch(a._tag){case DP:break;case xse:{this.finishWithDoneValue(t,n,a.value);break}case kse:{const o=n.enqueuePullFromChild(i);this.replaceSubexecutor(o);break}}this._activeSubexecutor=new s0(s,this._activeSubexecutor)},Ms({onFailure:s=>{const a=this.handleSubexecutorFailure(t,n,s);return a===void 0?void 0:AR(a)},onSuccess:s=>{this.finishWithDoneValue(t,n,s)}}))}finishWithDoneValue(t,n,r){const i=n;switch(i._tag){case e1:{const s=new Fo(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(mr(r)),this.replaceSubexecutor(s);break}case t1:{const s=new Nc(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(mr(r)),this.replaceSubexecutor(s);break}}}handleSubexecutorFailure(t,n,r){return this.finishSubexecutorWithCloseEffect(An(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 Fo(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 np(n.childExecutor,r,n.onEmit))}performPullFromUpstream(t){return i0(t.upstreamExecutor,n=>{const r=this._closeLastSubstream===void 0?Fe:this._closeLastSubstream;return this._closeLastSubstream=void 0,O(this._executeCloseLastSubstream(r),gn(n))},n=>{if(this._closeLastSubstream!==void 0){const a=this._closeLastSubstream;return this._closeLastSubstream=void 0,O(this._executeCloseLastSubstream(a),Je(()=>{const o=new Bo(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);o._input=this._input;const[l,c]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(OR(n)));this._activeSubexecutor=new np(o,new Fo(t.upstreamExecutor,t.createChild,t.lastDone,c,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),St(l)&&(this._activeSubexecutor=new s0(l.value,this._activeSubexecutor))}))}const r=new Bo(t.createChild(n),this._providedEnv,this._executeCloseLastSubstream);r._input=this._input;const[i,s]=this.applyUpstreamPullStrategy(!1,t.activeChildExecutors,t.onPull(OR(n)));this._activeSubexecutor=new np(r,new Fo(t.upstreamExecutor,t.createChild,t.lastDone,s,t.combineChildResults,t.combineWithChildResult,t.onPull,t.onEmit),t.onEmit),St(i)&&(this._activeSubexecutor=new s0(i.value,this._activeSubexecutor))},n=>{if(t.activeChildExecutors.some(s=>s!==void 0)){const s=new Nc(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),Je(()=>this.replaceSubexecutor(s)))}this.replaceSubexecutor(s);return}const r=this._closeLastSubstream,i=this.finishSubexecutorWithCloseEffect(O(n,vZ(s=>t.combineWithChildResult(t.lastDone,s))),()=>r,s=>t.upstreamExecutor.close(s));return i===void 0?void 0:AR(i)})}drainChildExecutors(t){if(t.activeChildExecutors.length===0){const s=this._closeLastSubstream;return s!==void 0&&this.addFinalizer(()=>mt(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(Jse(r.reduce((o,l)=>l!==void 0?o+1:o,0))));return this.replaceSubexecutor(new Nc(t.upstreamExecutor,t.lastDone,a,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull)),St(s)?(this._emitted=s.value,r0()):void 0}const i=new Nc(t.upstreamExecutor,t.lastDone,r,t.upstreamDone,t.combineChildResults,t.combineWithChildResult,t.onPull);this.replaceSubexecutor(new np(n.childExecutor,i,n.onEmit))}}const a0=e=>e!==void 0?e:Fe,o0=(e,t)=>O(Gi(e,n=>vn(n(t))),Je(n=>O(gZ(n),wt(()=>_E))),ce(n=>Ot(()=>n))),eC=(e,t,n)=>{const r=[e],i=()=>{const s=r.pop();if(s===void 0||s.upstream===void 0)return lie("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?Ot(t):O(o,fi({onFailure:n,onSuccess:t})):o===void 0?Ot(()=>i()):O(o,fi({onFailure:n,onSuccess:()=>i()}))}case mm:{const o=s.onDone(s.upstream.getDone());return r.length===0?o===void 0?Ot(t):O(o,fi({onFailure:n,onSuccess:t})):o===void 0?Ot(()=>i()):O(o,fi({onFailure:n,onSuccess:()=>i()}))}case hf:return r.push(s),O(s.onEffect(a.effect),HE(o=>Ot(()=>{const l=s.onDone(An(o));return l===void 0?Fe:l})),fi({onFailure:n,onSuccess:()=>i()}));case gm:return r.push(s),r.push(a),Ot(()=>i())}};return i()},Qse=x(2,(e,t)=>{const n=(r,i,s)=>pie(at(()=>new Bo(e,void 0,ge)),a=>Ot(()=>Kp(a.run(),a).pipe(bP(r),gn(Fn(r)),GE(Fn(i)))),(a,o)=>{const l=a.close(o);return l===void 0?Fe:wP(l,c=>by(s,pi(c)))});return wy(r=>oie([H3(t,ty),ji(),ji()]).pipe(ce(([i,s,a])=>r(n(s,a,i)).pipe(nl(t),ce(o=>t.addFinalizer(l=>{const c=wE(l)?Gte(l.cause):void 0;return K_(s).pipe(ce(u=>u?Ns(a,void 0).pipe(gn(G3(o)),gn(dR(o))):Ns(a,void 0).pipe(gn(c&&Lk(c)>0?IE(o,PG(c)):Pa(o)),gn(dR(o)))))}).pipe(gn(r(Fn(s)))))))))}),Kp=(e,t)=>{const n=e;switch(n._tag){case hf:return O(n.effect,ce(()=>Kp(t.run(),t)));case pm:return Kp(t.run(),t);case mm:return Ot(()=>t.getDone());case gm:return eC(n,()=>Kp(t.run(),t),pi)}},Xse="Done",Wse="Await",Zse="effect/ChannelMergeDecision",eae=Symbol.for(Zse),tae={[eae]:{_R:e=>e,_E0:e=>e,_Z0:e=>e,_E:e=>e,_Z:e=>e}},RR=e=>{const t=Object.create(tae);return t._tag=Wse,t.f=e,t},o4="BothRunning",l4="LeftDone",c4="RightDone",nae="effect/ChannelMergeState",MR=Symbol.for(nae),tC={[MR]:MR},l0=(e,t)=>{const n=Object.create(tC);return n._tag=o4,n.left=e,n.right=t,n},NR=e=>{const t=Object.create(tC);return t._tag=l4,t.f=e,t},DR=e=>{const t=Object.create(tC);return t._tag=c4,t.f=e,t},u4="BackPressure",f4="BufferSliding",rae="effect/ChannelMergeStrategy",zR=Symbol.for(rae),d4={[zR]:zR},iae=e=>{const t=Object.create(d4);return t._tag=u4,t},sae=e=>{const t=Object.create(d4);return t._tag=f4,t},aae=x(2,(e,{onBackPressure:t,onBufferSliding:n})=>{switch(e._tag){case u4:return t();case f4:return n()}}),uc="Empty",rd="Emit",id="Error",sd="Done",h4=e=>({_tag:uc,notifyProducer:e}),c0=e=>({_tag:rd,notifyConsumers:e}),oae=e=>({_tag:id,cause:e}),lae=e=>({_tag:sd,done:e});class cae{constructor(t){g(this,"ref");this.ref=t}awaitRead(){return cc($f(this.ref,t=>t._tag===uc?[Fn(t.notifyProducer),t]:[Fe,t]))}get close(){return yie(t=>this.error(L3(t)))}done(t){return cc($f(this.ref,n=>{switch(n._tag){case uc:return[Fn(n.notifyProducer),n];case rd:return[Gi(n.notifyConsumers,r=>Ns(r,me(t)),{discard:!0}),lae(t)];case id:return[$o,n];case sd:return[$o,n]}}))}emit(t){return ce(ji(),n=>cc($f(this.ref,r=>{switch(r._tag){case uc:return[Fn(r.notifyProducer),r];case rd:{const i=r.notifyConsumers[0],s=r.notifyConsumers.slice(1);if(i!==void 0)return[Ns(i,de(t)),s.length===0?h4(n):c0(s)];throw new Error("Bug: Channel.SingleProducerAsyncInput.emit - Queue was empty! please report an issue at https://github.com/Effect-TS/effect/issues")}case id:return[$o,r];case sd:return[$o,r]}})))}error(t){return cc($f(this.ref,n=>{switch(n._tag){case uc:return[Fn(n.notifyProducer),n];case rd:return[Gi(n.notifyConsumers,r=>Qre(r,t),{discard:!0}),oae(t)];case id:return[$o,n];case sd:return[$o,n]}}))}get take(){return this.takeWith(t=>An(Jte(t,me)),t=>mr(t),t=>cy(de(t)))}takeWith(t,n,r){return ce(ji(),i=>cc($f(this.ref,s=>{switch(s._tag){case uc:return[gn(Ns(s.notifyProducer,void 0),X_(Fn(i),{onFailure:t,onSuccess:Wn({onLeft:r,onRight:n})})),c0([i])];case rd:return[X_(Fn(i),{onFailure:t,onSuccess:Wn({onLeft:r,onRight:n})}),c0([...s.notifyConsumers,i])];case id:return[mt(t(s.cause)),s];case sd:return[mt(r(s.done)),s]}})))}}const m4=()=>O(ji(),ce(e=>bE(h4(e))),Je(e=>new cae(e))),n1=x(2,(e,t)=>Fse(e,t,()=>{},()=>{})),uae=e=>{const t=df({onInput:()=>t,onFailure:wr,onDone:r4});return gi(e,t)},p4=x(2,(e,t)=>jse(e,()=>t)),fae=e=>Bt(e,ge),nC=e=>Ba(e.takeWith(wr,t=>Bt(_n(t),()=>nC(e)),r4)),g4=x(2,(e,t)=>Bt(e,n=>ZE(()=>t(n)))),y4=x(2,(e,t)=>{const n=n4({onInput:r=>Bt(_n(t(r)),()=>n),onFailure:XE,onDone:xh});return gi(e,n)}),dae=e=>t=>hae(e)(t,du),hae=({bufferSize:e=16,concurrency:t,mergeStrategy:n=iae()})=>(r,i)=>w4(s=>Gc(function*(){const a=t==="unbounded"?Number.MAX_SAFE_INTEGER:t,o=yield*m4(),l=nC(o),c=yield*NP(e);yield*by(s,Cy(c));const u=yield*bse();yield*by(s,Cy(u));const f=yield*bE(K()),d=yield*ji(),h=(yield*kie(a)).withPermits,p=yield*Jc(gi(l,r),s);function b(m){return m.pipe(ce(Wn({onLeft:y=>mt(ee(y)),onRight:y=>e0(Zl(c,mt(de(y))),K())})),xR({until:y=>St(y)}),ce(y=>PW(f,Nt({onNone:()=>ee(y.value),onSome:v=>ee(i(v,y.value))}))),HE(y=>py(y)?pi(y):Zl(c,pi(y)).pipe(gn(Ns(d,void 0)),qE)))}yield*p.pipe(fi({onFailure:m=>Zl(c,pi(m)).pipe(gn(mt(!1))),onSuccess:Wn({onLeft:m=>vP(ui(Fn(d)),ui(h(a)(Fe)),{onSelfDone:(y,v)=>e0(Pa(v),!1),onOtherDone:(y,v)=>gn(Pa(v),LW(f).pipe(ce(Nt({onNone:()=>Zl(c,mt(me(m))),onSome:_=>Zl(c,mt(me(i(_,m))))})),e0(!1)))}),onRight:m=>aae(n,{onBackPressure:()=>Gc(function*(){const y=yield*ji(),v=Q_(A=>Jc(gi(l,m),A).pipe(ce(E=>t0(vn(b(E)),vn(ui(Fn(d))))),ce(ge)));return yield*Ns(y,void 0).pipe(gn(v),h(1),nl(s)),yield*Fn(y),!(yield*K_(d))}),onBufferSliding:()=>Gc(function*(){const y=yield*ji(),v=yield*ji(),_=yield*vse(u);yield*CR(u).pipe(ce(T=>Ns(T,void 0)),Sie(()=>_>=a)),yield*Zl(u,y);const A=Q_(T=>Jc(gi(l,m),T).pipe(ce(N=>vn(b(N)).pipe(t0(vn(ui(Fn(d)))),t0(vn(ui(Fn(y)))))),ce(ge)));return yield*Ns(v,void 0).pipe(gn(A),h(1),nl(s)),yield*Fn(v),!(yield*K_(d))})})})}),xR({while:m=>m}),nl(s));const S=O(CR(c),cc,X_({onFailure:wr,onSuccess:Wn({onLeft:xh,onRight:m=>Bt(_n(m),()=>S)})}),Ba);return t4(S,o)})),b4=x(3,(e,t,n)=>dae(n)(y4(e,t))),mae=x(2,(e,t)=>{function n(r){return Gc(function*(){const i=yield*m4(),s=nC(i),a=yield*Jc(gi(s,e),r),o=yield*Jc(gi(s,t.other),r);function l(u,f,d){return(h,p,b)=>{function S(m){const y=m;return y._tag===Xse?mt(Ln(gn(Pa(f),y.effect))):Je(G3(f),Ms({onFailure:v=>Ln(y.f(An(v))),onSuccess:Wn({onLeft:v=>Ln(y.f(mr(v))),onRight:v=>rC(_n(v),c(b(y.f)))})}))}return Ms(u,{onFailure:m=>S(h(An(m))),onSuccess:Wn({onLeft:m=>S(h(mr(m))),onRight:m=>mt(Bt(_n(m),()=>Bt(Ln(nl(ui(d),r)),y=>c(p(y,f)))))})})}}function c(u){switch(u._tag){case o4:{const f=ui(hR(u.left)),d=ui(hR(u.right));return Ba(vP(f,d,{onSelfDone:(h,p)=>gn(Pa(p),l(h,u.right,a)(t.onSelfDone,l0,b=>NR(b))),onOtherDone:(h,p)=>gn(Pa(p),l(h,u.left,o)(t.onOtherDone,(b,S)=>l0(S,b),b=>DR(b)))}))}case l4:return Ba(Je(vn(o),Ms({onFailure:f=>Ln(u.f(An(f))),onSuccess:Wn({onLeft:f=>Ln(u.f(mr(f))),onRight:f=>Bt(_n(f),()=>c(NR(u.f)))})})));case c4:return Ba(Je(vn(a),Ms({onFailure:f=>Ln(u.f(An(f))),onSuccess:Wn({onLeft:f=>Ln(u.f(mr(f))),onRight:f=>Bt(_n(f),()=>c(DR(u.f)))})})))}}return Ln(Sy(u=>{const f=Sy(p=>(p.transferChildren(u.scope()),Fe)),d=ui(a).pipe(Rc(f),nl(r)),h=ui(o).pipe(Rc(f),nl(r));return hv(d,h,(p,b)=>l0(p,b))})).pipe(Bt(c),t4(i))})}return w4(n)}),pae=x(2,(e,t)=>WE(()=>{let n;const r=n4({onInput:s=>Bt(_n(s),()=>r),onFailure:s=>(n=wae(s),wr(B_(n))),onDone:xh}),i=df({onInput:s=>O(_n(s),Bt(()=>i)),onFailure:s=>Vte(s)&&_ae(s.defect)&&ae(s.defect,n)?XE(s.defect.error):wr(s),onDone:xh});return gi(gi(gi(e,r),t),i)})),gae=e=>Q_(t=>Qse(e,t)),v4=e=>gae(uae(e)),S4=e=>Ba(wy(t=>Je(q3(),n=>Lse(wP(t(One(e,n)),r=>vy(n,An(r))),(r,i)=>vy(n,i))))),yae=e=>vae(Je(dv,t=>Bt(Ln(e(t)),_n))),bae=e=>ce(dv,t=>Jc(e,t)),Jc=x(2,(e,t)=>ky(at(()=>new Bo(e,void 0,ge)),hm()).pipe(SP(([n,r])=>Ane(t,i=>{const s=n.close(i);return s!==void 0?xy(s,r):Fe})),nd,Je(([n])=>Ot(()=>r1(n.run(),n))))),r1=(e,t)=>{const n=e;switch(n._tag){case mm:return Ms(t.getDone(),{onFailure:pi,onSuccess:r=>mt(me(r))});case pm:return mt(de(t.getEmit()));case hf:return O(n.effect,ce(()=>r1(t.run(),t)));case gm:return eC(n,()=>r1(t.run(),t),r=>pi(r))}},Ba=e=>fae(Ln(e)),vae=e=>e4(S4(e),(t,n)=>t,(t,n)=>t),w4=e=>e4(yae(e),(t,n)=>t,(t,n)=>t),_4=e=>x4(0,e.length,e),x4=(e,t,n)=>e===t?Ws:O(_n(O(n,La(e))),Bt(()=>x4(e+1,t,n))),Sae=x(e=>ZP(e[1]),(e,t,n)=>n!=null&&n.concurrent?mae(e,{other:t,onSelfDone:r=>RR(i=>Ot(()=>QO(r,i))),onOtherDone:r=>RR(i=>Ot(()=>QO(i,r)))}):Bt(e,r=>g4(t,i=>[r,i]))),rC=x(e=>ZP(e[1]),(e,t,n)=>n!=null&&n.concurrent?g4(Sae(e,t,{concurrent:!0}),r=>r[1]):Bt(e,()=>t)),i1=Symbol.for("effect/Channel/ChannelException"),wae=e=>({_tag:"ChannelException",[i1]:i1,error:e}),_ae=e=>ue(e,i1),xae=Symbol.for("effect/Sink"),kae={_A:e=>e,_In:e=>e,_L:e=>e,_E:e=>e,_R:e=>e};var AD;AD=xae;class iC{constructor(t){g(this,"channel");g(this,AD,kae);this.channel=t}pipe(){return re(this,arguments)}}const Eae=e=>{const t=df({onInput:n=>O(Ln(Gi(n,r=>e(r),{discard:!0})),Bt(()=>t)),onFailure:wr,onDone:()=>Ws});return new iC(t)},Cae=e=>{const t=df({onInput:n=>O(Ln(e(n)),Bt(()=>t)),onFailure:wr,onDone:()=>Ws});return new iC(t)},Tae=e=>new iC(Ln(e)),k4=e=>go(e)?k4(Tae(e)):e.channel,Aae=()=>ss(K()),Oae=e=>VE(pi(e),ee),Rae="effect/Stream",sC=Symbol.for(Rae),Mae={_R:e=>e,_E:e=>e,_A:e=>e};var OD;OD=sC;class wi{constructor(t){g(this,"channel");g(this,OD,Mae);this.channel=t}pipe(){return re(this,arguments)}}const yv=e=>ue(e,sC)||go(e),Nae=4096,E4=x(2,(e,t)=>new wi(O(Hr(e),p4(t)))),Dae=e=>A4(ss(ee(e))),zae=e=>T4(pi(e)),Iae=x(2,(e,t)=>Uae(e,Ek(t))),C4=x(e=>yv(e[0]),(e,t,n)=>{const r=(n==null?void 0:n.bufferSize)??16;return n!=null&&n.switch?IR(n==null?void 0:n.concurrency,()=>$R(e,1,r,t),i=>$R(e,i,r,t)):IR(n==null?void 0:n.concurrency,()=>new wi(n1(Hr(e),i=>O(i,mK(s=>Hr(t(s))),gK(Ws,(s,a)=>O(s,rC(a)))))),i=>new wi(O(Hr(e),n1(_4),b4(s=>Hr(t(s)),n))))}),IR=(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()}},$R=x(4,(e,t,n,r)=>new wi(O(Hr(e),n1(_4),b4(i=>Hr(r(i)),{concurrency:t,mergeStrategy:sae(),bufferSize:n})))),$ae=x(e=>yv(e[0]),(e,t)=>C4(e,ge,t)),Lae=e=>new wi(e),Hr=e=>{if("channel"in e)return e.channel;if(go(e))return Hr(T4(e));throw new TypeError("Expected a Stream.")},Fae=e=>new wi(Ob(e)?Ws:_n(e)),T4=e=>O(e,VE(ee),A4),A4=e=>new wi(Ba(_ie(e,{onFailure:Nt({onNone:()=>Ws,onSome:XE}),onSuccess:t=>_n(qt(t))}))),jae=(e,t)=>O(_se(e,1,(t==null?void 0:t.maxChunkSize)??Nae),HE(n=>O(Sse(e),ce(r=>r&&py(n)?Aae():Oae(n)))),O4,t!=null&&t.shutdown?E4(Cy(e)):ge),Pae=(...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 N4(Je(_y(at(()=>t().getReader()),i=>r?at(()=>i.releaseLock()):cie(()=>i.cancel())),i=>Bae(ce(Rd({try:()=>i.read(),catch:s=>ee(n(s))}),({done:s,value:a})=>s?ss(K()):mt(a)))))},Uae=x(2,(e,t)=>new wi(O(Hr(e),y4(t)))),O4=e=>Jae(e,t=>O(Je(t,n=>ee([n,t])),pP(Nt({onNone:()=>mt(K()),onSome:ss})))),Bae=e=>O4(O(e,Je(qt))),R4=x(2,(e,t)=>Hr(e).pipe(pae(k4(t)),v4)),Hae=x(2,(e,t)=>R4(e,Eae(t))),qae=x(2,(e,t)=>R4(e,Cae(t))),Vae=e=>new wi(p4(S4(O(e,Je(qt))),Fe)),Kae=e=>Fae(qt(e)),M4=e=>new wi(WE(()=>Hr(e()))),Gae=x(e=>yv(e[0]),(e,t)=>Je(hm(),n=>Yae(e,n,t))),Yae=x(e=>yv(e[0]),(e,t,n)=>{const r=mv(t);let i,s;const a=Eie(!1);return new ReadableStream({start(o){s=r(qae(e,l=>l.length===0?Fe:a.whenOpen(at(()=>{a.unsafeClose();for(const c of l)o.enqueue(c);i(),i=void 0})))),s.addObserver(l=>{try{l._tag==="Failure"?o.error(Qte(l.cause)):o.close()}catch{}})},pull(){return new Promise(o=>{i=o,Yr(a.open)})},cancel(){if(s)return Cie(qE(Pa(s)))}},n==null?void 0:n.strategy)}),Jae=(e,t)=>M4(()=>{const n=r=>Ba(Je(t(r),Nt({onNone:()=>Ws,onSome:([i,s])=>Bt(_n(i),()=>n(s))})));return new wi(n(e))}),N4=e=>$ae(Vae(e)),LR=Symbol.for("effect/Mailbox"),FR=Symbol.for("effect/Mailbox/ReadonlyMailbox"),jo=Zt(),jR=Ze(jo),rp=Ze(!1),ip=Ze(!0),PR=[jo,!0];var RD,MD;class Qae extends cf{constructor(n,r,i){super();g(this,"scheduler");g(this,"capacity");g(this,"strategy");g(this,MD,LR);g(this,RD,FR);g(this,"state",{_tag:"Open",takers:new Set,offers:new Set,awaiters:new Set});g(this,"messages",[]);g(this,"messagesChunk",Zt());g(this,"shutdown",V(()=>{if(this.state._tag==="Done")return!0;this.messages=[],this.messagesChunk=jo;const n=this.state.offers;if(this.finalize(this.state._tag==="Open"?Tn:this.state.exit),n.size>0){for(const r of n)r._tag==="Single"?r.resume(rp):r.resume(Ze($n(r.remaining.slice(r.offset))));n.clear()}return!0}));g(this,"end",this.done(Tn));g(this,"clear",Te(()=>{if(this.state._tag==="Done")return jp(this.state.exit,jo);const n=this.unsafeTakeAll();return this.releaseCapacity(),Z(n)}));g(this,"takeAll",Te(()=>{if(this.state._tag==="Done")return jp(this.state.exit,PR);const n=this.unsafeTakeAll();return n.length===0?Et(this.awaitTake,this.takeAll):Z([n,this.releaseCapacity()])}));g(this,"take",Te(()=>this.unsafeTake()??Et(this.awaitTake,this.take)));g(this,"await",ka(n=>this.state._tag==="Done"?n(this.state.exit):(this.state.awaiters.add(n),V(()=>{this.state._tag!=="Done"&&this.state.awaiters.delete(n)}))));g(this,"size",V(()=>this.unsafeSize()));g(this,"awaitTake",ka(n=>this.state._tag==="Done"?n(this.state.exit):(this.state.takers.add(n),V(()=>{this.state._tag!=="Done"&&this.state.takers.delete(n)}))));g(this,"scheduleRunning",!1);g(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(Tn),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(),ip):this.offerRemainingSingle(n);case"sliding":return this.unsafeTake(),this.messages.push(n),ip}return this.messages.push(n),this.scheduleReleaseTaker(),ip})}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 Z(qs(n));const r=this.unsafeOfferAllArray(n);return r.length===0?jR:this.strategy==="dropping"?Z($n(r)):this.offerRemainingArray(r)})}unsafeOfferAll(n){return $n(this.unsafeOfferAllArray(n))}unsafeOfferAllArray(n){if(this.state._tag!=="Open")return Ye(n);if(this.capacity===Number.POSITIVE_INFINITY||this.strategy==="sliding")return this.messages.length>0&&(this.messagesChunk=Ut(this.messagesChunk,$n(this.messages))),this.strategy==="sliding"?this.messagesChunk=this.messagesChunk.pipe(Ut(qs(n)),pK(this.capacity)):Ab(n)?this.messagesChunk=Ut(this.messagesChunk,n):this.messages=Ye(n),this.scheduleReleaseTaker(),[];const r=this.capacity<=0?this.state.takers.size:this.capacity-this.messages.length-this.messagesChunk.length;if(r===0)return Ye(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(mh(n))}failCause(n){return this.done(Xe(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 V(()=>this.unsafeDone(n))}takeN(n){return Te(()=>{if(this.state._tag==="Done")return jp(this.state.exit,PR);if(n<=0)return Z([jo,!1]);n=Math.min(n,this.capacity);let r;if(n<=this.messagesChunk.length)r=qg(this.messagesChunk,n),this.messagesChunk=xa(this.messagesChunk,n);else if(n<=this.messages.length+this.messagesChunk.length)this.messagesChunk=Ut(this.messagesChunk,$n(this.messages)),this.messages=[],r=qg(this.messagesChunk,n),this.messagesChunk=xa(this.messagesChunk,n);else return Et(this.awaitTake,this.takeN(n));return Z([r,this.releaseCapacity()])})}unsafeTake(){if(this.state._tag==="Done")return cj(this.state.exit,mh(new uf));let n;if(this.messagesChunk.length>0)n=Tk(this.messagesChunk),this.messagesChunk=xa(this.messagesChunk,1);else if(this.messages.length>0)n=this.messages[0],this.messagesChunk=xa($n(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?Ze(this.messages.pop()):void 0):void 0;return this.releaseCapacity(),Ze(n)}unsafeSize(){const n=this.messages.length+this.messagesChunk.length;return this.state._tag==="Done"?K():ee(n)}commit(){return this.takeAll}pipe(){return re(this,arguments)}toJSON(){return{_id:"effect/Mailbox",state:this.state._tag,size:this.unsafeSize().toJSON()}}toString(){return it(this)}[(MD=LR,RD=FR,Pe)](){return it(this)}offerRemainingSingle(n){return ka(r=>{if(this.state._tag!=="Open")return r(rp);const i={_tag:"Single",message:n,resume:r};return this.state.offers.add(i),V(()=>{this.state._tag==="Open"&&this.state.offers.delete(i)})})}offerRemainingArray(n){return ka(r=>{if(this.state._tag!=="Open")return r(Ze($n(n)));const i={_tag:"Array",remaining:n,offset:0,resume:r};return this.state.offers.add(i),V(()=>{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(ip),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(jR),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?Ut(this.messagesChunk,$n(this.messages)):this.messagesChunk;return this.messagesChunk=jo,this.messages=[],n}else if(this.messages.length>0){const n=$n(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,qt(this.messages.pop());return jo}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 Xae=e=>Be(t=>Z(new Qae(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"))),Wae=e=>{const t=Bt(e.takeAll,([n,r])=>r?n.length===0?Ws:_n(n):rC(_n(n),t));return t},Zae=e=>Lae(Wae(e)),eoe=Xae,toe=Zae,u0=sC,D4=E4,noe=Dae,roe=zae,ioe=Iae,soe=C4,z4=Hr,aoe=jae,ooe=Pae,loe=Hae,coe=Kae,uoe=M4,foe=Gae,I4=N4;class ym extends vk("@effect/experimental/Reactivity")(){}const doe=at(()=>{const e=new Map,t=o=>{if(Array.isArray(o))for(let l=0;l<o.length;l++){const c=e.get(s1(o[l]));if(c!==void 0)for(const u of c)u()}else{const l=o;for(const c in l){const u=L4(c,l[c]);for(let d=0;d<u.length;d++){const h=e.get(u[d]);if(h!==void 0)for(const p of h)p()}const f=e.get(c);if(f!==void 0)for(const d of f)d()}}},n=o=>at(()=>t(o)),r=(o,l)=>GE(l,n(o)),i=(o,l)=>{const c=Array.isArray(o)?o.map(s1):moe(o);for(let u=0;u<c.length;u++){let f=e.get(c[u]);f===void 0&&(f=new Set,e.set(c[u],f)),f.add(l)}return()=>{for(let u=0;u<c.length;u++){const f=e.get(c[u]);f.delete(l),f.size===0&&e.delete(c[u])}}},s=(o,l)=>Gc(function*(){const c=yield*dv,u=yield*eoe(),f=yield*Iie();let d=!1,h=!1;const p=m=>{m._tag==="Failure"?u.unsafeDone(An(m.cause)):u.unsafeOffer(m.value),h?(h=!1,f(l).addObserver(p)):d=!1};function b(){if(d){h=!0;return}d=!0,f(l).addObserver(p)}const S=i(o,b);return yield*by(c,at(S)),b(),u}),a=(o,l)=>s(o,l).pipe(Je(toe),I4);return ym.of({mutation:r,query:s,stream:a,unsafeInvalidate:t,invalidate:n,unsafeRegister:i})}),$4=x(2,(e,t)=>ce(ym,n=>n.mutation(t,e))),hoe=e=>ce(ym,t=>t.invalidate(e)),f0=kP(ym,doe);function s1(e){return typeof e=="string"?e:ne(e)}const L4=(e,t)=>{const n=new Array(t.length);for(let r=0;r<t.length;r++)n[r]=`${e}:${s1(t[r])}`;return n},moe=e=>{const t=[];for(const n in e){t.push(n);for(const r of L4(n,e[n]))t.push(r)}return t},F4="effect/Redacted",Gp=pe("effect/Redacted/redactedRegistry",()=>new WeakMap),j4=Symbol.for(F4),poe={[j4]:{_A:e=>e},pipe(){return re(this,arguments)},toString(){return"<redacted>"},toJSON(){return"<redacted>"},[Pe](){return"<redacted>"},[be](){return O(ne(F4),Se(ne(Gp.get(this))),tt(this))},[ve](e){return goe(e)&&ae(Gp.get(this),Gp.get(e))}},goe=e=>ue(e,j4),yoe=e=>{const t=Object.create(poe);return Gp.set(t,e),t},P4=(e,t)=>{switch(t._tag){case"StringKeyword":case"TemplateLiteral":return Object.keys(e);case"SymbolKeyword":return Object.getOwnPropertySymbols(e);case"Refinement":return P4(e,t.from)}},U4=e=>{let t=!1,n;return()=>(t||(n=e(),t=!0),n)},aC=e=>Array.isArray(e),UR=e=>`[${wb(e)}]`,B4=e=>aC(e)?e.map(UR).join(""):UR(e),yo=(e,t,n,r)=>{let i=e;return n&&Wt(n)&&(i+=`
|
|
72
|
+
at path: ${B4(n)}`),t!==void 0&&(i+=`
|
|
73
|
+
details: ${t}`),r&&(i+=`
|
|
74
|
+
schema (${r._tag}): ${r}`),i},H4=(e,t,n)=>yo("Unsupported schema or overlapping types",`cannot extend ${e} with ${t}`,n),boe=e=>yo("Unsupported key schema",void 0,void 0,e),voe=e=>yo("Unsupported literal",`literal value: ${Qs(e)}`),BR=e=>yo("Duplicate index signature",`${e} index signature`),Soe=yo("Unsupported index signature parameter","An index signature parameter type must be `string`, `symbol`, a template literal type or a refinement of the previous types"),woe=yo("Invalid element","A required element cannot follow an optional element. ts(1257)"),HR=e=>yo("Duplicate property signature transformation",`Duplicate key ${Qs(e)}`),q4=e=>yo("Duplicate property signature",`Duplicate key ${Qs(e)}`),_oe=Symbol.for("effect/SchemaId/DateFromSelf"),xoe=Symbol.for("effect/annotation/TypeConstructor"),V4=Symbol.for("effect/annotation/Brand"),koe=Symbol.for("effect/annotation/SchemaId"),K4=Symbol.for("effect/annotation/Message"),oC=Symbol.for("effect/annotation/MissingMessage"),bm=Symbol.for("effect/annotation/Identifier"),Ci=Symbol.for("effect/annotation/Title"),Qc=Symbol.for("effect/annotation/AutoTitle"),jl=Symbol.for("effect/annotation/Description"),G4=Symbol.for("effect/annotation/Examples"),Y4=Symbol.for("effect/annotation/Default"),J4=Symbol.for("effect/annotation/JSONSchema"),Q4=Symbol.for("effect/annotation/Arbitrary"),X4=Symbol.for("effect/annotation/Pretty"),W4=Symbol.for("effect/annotation/Equivalence"),Eoe=Symbol.for("effect/annotation/Documentation"),Z4=Symbol.for("effect/annotation/Concurrency"),eU=Symbol.for("effect/annotation/Batching"),tU=Symbol.for("effect/annotation/ParseIssueTitle"),nU=Symbol.for("effect/annotation/ParseOptions"),rU=Symbol.for("effect/annotation/DecodingFallback"),Ay=Symbol.for("effect/annotation/Surrogate"),Coe=Symbol.for("effect/annotation/StableFilter"),Vn=x(2,(e,t)=>Object.prototype.hasOwnProperty.call(e.annotations,t)?ee(e.annotations[t]):K()),iU=Vn(V4),Toe=Vn(K4),Aoe=Vn(oC),sU=Vn(Ci),aU=Vn(Qc),bv=Vn(bm),oU=Vn(jl),Ooe=Vn(Z4),Roe=Vn(eU),Moe=Vn(tU),Noe=Vn(nU),Doe=Vn(rU),lU=Vn(Ay),zoe=Vn(Coe),Ioe=e=>L7(zoe(e),t=>t===!0),cU=Symbol.for("effect/annotation/JSONIdentifier"),$oe=Vn(cU),Loe=e=>qi($oe(e),()=>bv(e)),Foe=Symbol.for("effect/schema/ParseJson");class vv{constructor(t,n,r,i={}){g(this,"typeParameters");g(this,"decodeUnknown");g(this,"encodeUnknown");g(this,"annotations");g(this,"_tag","Declaration");this.typeParameters=t,this.decodeUnknown=n,this.encodeUnknown=r,this.annotations=i}toString(){return wt(Xi(this),()=>"<declaration schema>")}toJSON(){return{_tag:this._tag,typeParameters:this.typeParameters.map(t=>t.toJSON()),annotations:Dt(this.annotations)}}}const Ti=e=>t=>t._tag===e;let a1=class{constructor(t,n={}){g(this,"literal");g(this,"annotations");g(this,"_tag","Literal");this.literal=t,this.annotations=n}toString(){return wt(Xi(this),()=>Qs(this.literal))}toJSON(){return{_tag:this._tag,literal:bb(this.literal)?String(this.literal):this.literal,annotations:Dt(this.annotations)}}};const Md=Ti("Literal");class joe{constructor(t,n={}){g(this,"symbol");g(this,"annotations");g(this,"_tag","UniqueSymbol");this.symbol=t,this.annotations=n}toString(){return wt(Xi(this),()=>Qs(this.symbol))}toJSON(){return{_tag:this._tag,symbol:String(this.symbol),annotations:Dt(this.annotations)}}}class Poe{constructor(t={}){g(this,"annotations");g(this,"_tag","UndefinedKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const o1=new Poe({[Ci]:"undefined"});class Uoe{constructor(t={}){g(this,"annotations");g(this,"_tag","VoidKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const Boe=new Uoe({[Ci]:"void"}),Hoe=Ti("VoidKeyword");class qoe{constructor(t={}){g(this,"annotations");g(this,"_tag","NeverKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const lC=new qoe({[Ci]:"never"}),Voe=Ti("NeverKeyword");class Koe{constructor(t={}){g(this,"annotations");g(this,"_tag","UnknownKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const uU=new Koe({[Ci]:"unknown"});class Goe{constructor(t={}){g(this,"annotations");g(this,"_tag","AnyKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const Yoe=new Goe({[Ci]:"any"});class Joe{constructor(t={}){g(this,"annotations");g(this,"_tag","StringKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const l1=new Joe({[Ci]:"string",[jl]:"a string"}),c1=Ti("StringKeyword");class Qoe{constructor(t={}){g(this,"annotations");g(this,"_tag","NumberKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const u1=new Qoe({[Ci]:"number",[jl]:"a number"}),qR=Ti("NumberKeyword");class Xoe{constructor(t={}){g(this,"annotations");g(this,"_tag","BooleanKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const f1=new Xoe({[Ci]:"boolean",[jl]:"a boolean"}),VR=Ti("BooleanKeyword");class Woe{constructor(t={}){g(this,"annotations");g(this,"_tag","SymbolKeyword");this.annotations=t}toString(){return Zs(this)}toJSON(){return{_tag:this._tag,annotations:Dt(this.annotations)}}}const Zoe=new Woe({[Ci]:"symbol",[jl]:"a symbol"}),ele=Ti("SymbolKeyword");let Sv=class{constructor(t,n={}){g(this,"type");g(this,"annotations");this.type=t,this.annotations=n}toJSON(){return{type:this.type.toJSON(),annotations:Dt(this.annotations)}}toString(){return String(this.type)}};class mf extends Sv{constructor(n,r,i={}){super(n,i);g(this,"isOptional");this.isOptional=r}toJSON(){return{type:this.type.toJSON(),isOptional:this.isOptional,annotations:Dt(this.annotations)}}toString(){return String(this.type)+(this.isOptional?"?":"")}}const fU=e=>e.map(t=>t.type);class cC{constructor(t,n,r,i={}){g(this,"elements");g(this,"rest");g(this,"isReadonly");g(this,"annotations");g(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(woe)}toString(){return wt(Xi(this),()=>tle(this))}toJSON(){return{_tag:this._tag,elements:this.elements.map(t=>t.toJSON()),rest:this.rest.map(t=>t.toJSON()),isReadonly:this.isReadonly,annotations:Dt(this.annotations)}}}const tle=e=>{const t=e.elements.map(String).join(", ");return q7(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 hn extends mf{constructor(n,r,i,s,a){super(r,i,a);g(this,"name");g(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:Dt(this.annotations)}}}const dU=e=>{switch(e._tag){case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":return!0;case"Refinement":return dU(e.from)}return!1};class wv{constructor(t,n,r){g(this,"type");g(this,"isReadonly");g(this,"parameter");if(this.type=n,this.isReadonly=r,dU(t))this.parameter=t;else throw new Error(Soe)}toString(){return(this.isReadonly?"readonly ":"")+`[x: ${this.parameter}]: ${this.type}`}toJSON(){return{parameter:this.parameter.toJSON(),type:this.type.toJSON(),isReadonly:this.isReadonly}}}class Ha{constructor(t,n,r={}){g(this,"annotations");g(this,"_tag","TypeLiteral");g(this,"propertySignatures");g(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(q4(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(c1(o)){if(s.string)throw new Error(BR("string"));s.string=!0}else if(ele(o)){if(s.symbol)throw new Error(BR("symbol"));s.symbol=!0}}this.propertySignatures=t,this.indexSignatures=n}toString(){return wt(Xi(this),()=>nle(this))}toJSON(){return{_tag:this._tag,propertySignatures:this.propertySignatures.map(t=>t.toJSON()),indexSignatures:this.indexSignatures.map(t=>t.toJSON()),annotations:Dt(this.annotations)}}}const KR=e=>e.map(String).join("; "),nle=e=>{if(e.propertySignatures.length>0){const t=e.propertySignatures.map(String).join("; ");return e.indexSignatures.length>0?`{ ${t}; ${KR(e.indexSignatures)} }`:`{ ${t} }`}else return e.indexSignatures.length>0?`{ ${KR(e.indexSignatures)} }`:"{}"},GR=Ti("TypeLiteral"),rle=sh(EL(Cu,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})),ile={string:"StringKeyword",number:"NumberKeyword",boolean:"BooleanKeyword",bigint:"BigIntKeyword"},hU=e=>Hg(e,t=>_v(t)?hU(t.types):[t]),sle=e=>{const t=rle(e),n=[],r={},i=[];for(const s of t)switch(s._tag){case"NeverKeyword":break;case"AnyKeyword":return[Yoe];case"UnknownKeyword":return[uU];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=ile[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 Es;let fr=(Es=class{constructor(t,n={}){g(this,"types");g(this,"annotations");g(this,"_tag","Union");this.types=t,this.annotations=n}toString(){return wt(Xi(this),()=>this.types.map(String).join(" | "))}toJSON(){return{_tag:this._tag,types:this.types.map(t=>t.toJSON()),annotations:Dt(this.annotations)}}},g(Es,"make",(t,n)=>uC(t)?new Es(t,n):t.length===1?t[0]:lC),g(Es,"unify",(t,n)=>Es.make(sle(hU(t)),n)),Es);const ale=(e,t)=>e.map(t),uC=e=>e.length>1,_v=Ti("Union"),d0=pe(Symbol.for("effect/Schema/AST/toJSONMemoMap"),()=>new WeakMap);class Oy{constructor(t,n={}){g(this,"f");g(this,"annotations");g(this,"_tag","Suspend");this.f=t,this.annotations=n,this.f=U4(t)}toString(){return Xi(this).pipe(qi(()=>Il(N7(this.f)(),t=>Xi(t))),wt(()=>"<suspended schema>"))}toJSON(){const t=this.f();let n=d0.get(t);return n||(d0.set(t,{_tag:this._tag}),n={_tag:this._tag,ast:t.toJSON(),annotations:Dt(this.annotations)},d0.set(t,n),n)}}let mU=class{constructor(t,n,r={}){g(this,"from");g(this,"filter");g(this,"annotations");g(this,"_tag","Refinement");this.from=t,this.filter=n,this.annotations=r}toString(){return bv(this).pipe(wt(()=>Nt(wU(this),{onNone:()=>`{ ${this.from} | filter }`,onSome:t=>Xc(this.from)?String(this.from)+" & "+t:t})))}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),annotations:Dt(this.annotations)}}};const Xc=Ti("Refinement"),h0={};let Ho=class{constructor(t,n,r,i={}){g(this,"from");g(this,"to");g(this,"transformation");g(this,"annotations");g(this,"_tag","Transformation");this.from=t,this.to=n,this.transformation=r,this.annotations=i}toString(){return wt(Xi(this),()=>`(${String(this.from)} <-> ${String(this.to)})`)}toJSON(){return{_tag:this._tag,from:this.from.toJSON(),to:this.to.toJSON(),annotations:Dt(this.annotations)}}};const ole=Ti("Transformation");class pU{constructor(t,n){g(this,"decode");g(this,"encode");g(this,"_tag","FinalTransformation");this.decode=t,this.encode=n}}const lle=e=>t=>t._tag===e;class cle{constructor(){g(this,"_tag","ComposeTransformation")}}const gU=new cle;let ule=class{constructor(t,n,r,i){g(this,"from");g(this,"to");g(this,"decode");g(this,"encode");this.from=t,this.to=n,this.decode=r,this.encode=i}};class d1{constructor(t){g(this,"propertySignatureTransformations");g(this,"_tag","TypeLiteralTransformation");this.propertySignatureTransformations=t;const n={},r={};for(const i of t){const s=i.from;if(n[s])throw new Error(HR(s));n[s]=!0;const a=i.to;if(r[a])throw new Error(HR(a));r[a]=!0}}}const YR=lle("TypeLiteralTransformation"),pf=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={...e.annotations};delete r[bm];const i={...r,...t},s=lU(e);return St(s)&&(i[Ay]=pf(s.value,t)),n.annotations.value=i,Object.create(Object.getPrototypeOf(e),n)},fle="[\\s\\S]*?",dle="[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?",yU=(e,t)=>{switch(e._tag){case"Literal":return Zg(String(e.literal));case"StringKeyword":return fle;case"NumberKeyword":return dle;case"TemplateLiteral":return bU(e);case"Union":return e.types.map(n=>yU(n)).join("|")}},hle=(e,t,n,r)=>_v(e)?`(${t})`:t,bU=(e,t,n)=>{let r="";if(e.head!==""){const i=Zg(e.head);r+=i}for(const i of e.spans){const s=yU(i.type);if(r+=hle(i.type,s),i.literal!==""){const a=Zg(i.literal);r+=a}}return r},mle=e=>new RegExp(`^${bU(e)}$`),JR=(e,t)=>{const n=[],r=[],i=s=>{switch(s._tag){case"NeverKeyword":break;case"StringKeyword":case"SymbolKeyword":case"TemplateLiteral":case"Refinement":r.push(new wv(s,t,!0));break;case"Literal":if(Qr(s.literal)||Hs(s.literal))n.push(new hn(s.literal,t,!1,!0));else throw new Error(voe(s.literal));break;case"Enums":{for(const[a,o]of s.enums)n.push(new hn(o,t,!1,!0));break}case"UniqueSymbol":n.push(new hn(s.symbol,t,!1,!0));break;case"Union":s.types.forEach(i);break;default:throw new Error(boe(s))}};return i(e),{propertySignatures:n,indexSignatures:r}},vU=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},ple=e=>t=>{const n={...t.annotations};for(const r of e)delete n[r];return n},gle=vU([G4,Y4,J4,Q4,X4,W4]),$t=e=>{switch(e._tag){case"Declaration":{const t=$r(e.typeParameters,$t);return t===e.typeParameters?e:new vv(t,e.decodeUnknown,e.encodeUnknown,e.annotations)}case"TupleType":{const t=$r(e.elements,i=>{const s=$t(i.type);return s===i.type?i:new mf(s,i.isOptional)}),n=fU(e.rest),r=$r(n,$t);return t===e.elements&&r===n?e:new cC(t,r.map(i=>new Sv(i)),e.isReadonly,e.annotations)}case"TypeLiteral":{const t=$r(e.propertySignatures,r=>{const i=$t(r.type);return i===r.type?r:new hn(r.name,i,r.isOptional,r.isReadonly)}),n=$r(e.indexSignatures,r=>{const i=$t(r.type);return i===r.type?r:new wv(r.parameter,i,r.isReadonly)});return t===e.propertySignatures&&n===e.indexSignatures?e:new Ha(t,n,e.annotations)}case"Union":{const t=$r(e.types,$t);return t===e.types?e:fr.make(t,e.annotations)}case"Suspend":return new Oy(()=>$t(e.f()),e.annotations);case"Refinement":{const t=$t(e.from);return t===e.from?e:new mU(t,e.filter,e.annotations)}case"Transformation":{const t=gle(e);return $t(t!==void 0?pf(e.to,t):e.to)}}return e};function $r(e,t){let n=!1;const r=Cb(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 Oi=(e,t)=>{switch(e._tag){case"Declaration":{const n=$r(e.typeParameters,r=>Oi(r));return n===e.typeParameters?e:new vv(n,e.decodeUnknown,e.encodeUnknown)}case"TupleType":{const n=$r(e.elements,s=>{const a=Oi(s.type);return a===s.type?s:new mf(a,s.isOptional)}),r=fU(e.rest),i=$r(r,s=>Oi(s));return n===e.elements&&i===r?e:new cC(n,i.map(s=>new Sv(s)),e.isReadonly)}case"TypeLiteral":{const n=$r(e.propertySignatures,i=>{const s=Oi(i.type);return s===i.type?i:new hn(i.name,s,i.isOptional,i.isReadonly)}),r=$r(e.indexSignatures,i=>{const s=Oi(i.type);return s===i.type?i:new wv(i.parameter,s,i.isReadonly)});return n===e.propertySignatures&&r===e.indexSignatures?e:new Ha(n,r)}case"Union":{const n=$r(e.types,r=>Oi(r));return n===e.types?e:fr.make(n)}case"Suspend":{let n;const r=Loe(e);if(St(r)){const i="";n={[cU]:`${r.value}Encoded${i}`}}return new Oy(()=>Oi(e.f()),n)}case"Refinement":return Oi(e.from);case"Transformation":return Oi(e.from)}return e},Ry=e=>Oi(e),Dt=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)}},yle=(e,t)=>new Ho(e,t,gU),Zs=e=>wt(Xi(e),()=>e._tag);function ble(e){return Nt(iU(e),{onNone:()=>"",onSome:t=>t.map(n=>` & Brand<${Qs(n)}>`).join("")})}const wU=e=>sU(e).pipe(qi(()=>oU(e)),qi(()=>aU(e)),Br(t=>t+ble(e))),Xi=e=>qi(bv(e),()=>wU(e));class kn{constructor(t,n,r){g(this,"path");g(this,"actual");g(this,"issue");g(this,"_tag","Pointer");this.path=t,this.actual=n,this.issue=r}}class QR{constructor(t,n){g(this,"actual");g(this,"message");g(this,"_tag","Unexpected");this.actual=t,this.message=n}}class Uf{constructor(t,n){g(this,"ast");g(this,"message");g(this,"_tag","Missing");g(this,"actual");this.ast=t,this.message=n}}class Tt{constructor(t,n,r,i){g(this,"ast");g(this,"actual");g(this,"issues");g(this,"output");g(this,"_tag","Composite");this.ast=t,this.actual=n,this.issues=r,this.output=i}}class m0{constructor(t,n,r,i){g(this,"ast");g(this,"actual");g(this,"kind");g(this,"issue");g(this,"_tag","Refinement");this.ast=t,this.actual=n,this.kind=r,this.issue=i}}class p0{constructor(t,n,r,i){g(this,"ast");g(this,"actual");g(this,"kind");g(this,"issue");g(this,"_tag","Transformation");this.ast=t,this.actual=n,this.kind=r,this.issue=i}}class Sn{constructor(t,n,r){g(this,"ast");g(this,"actual");g(this,"message");g(this,"_tag","Type");this.ast=t,this.actual=n,this.message=r}}class h1{constructor(t,n,r){g(this,"ast");g(this,"actual");g(this,"message");g(this,"_tag","Forbidden");this.ast=t,this.actual=n,this.message=r}}const XR=Symbol.for("effect/Schema/ParseErrorTypeId");var ND;class vle extends _re("ParseError"){constructor(){super(...arguments);g(this,ND,XR)}get message(){return this.toString()}toString(){return Dd.formatIssueSync(this.issue)}toJSON(){return{_id:"ParseError",message:this.toString()}}[(ND=XR,Pe)](){return this.toJSON()}}const fC=e=>new vle({issue:e}),Zn=de,Ca=me,My=x7,En=SL,hi=x(2,(e,t)=>En(e)?Wn(e,{onLeft:me,onRight:t}):ce(e,t)),mn=x(2,(e,t)=>En(e)?C7(e,t):Je(e,t)),Nd=x(2,(e,t)=>En(e)?E7(e,t):VE(e,t)),Sle=x(2,(e,t)=>En(e)?k7(e,{onLeft:t.onFailure,onRight:t.onSuccess}):mie(e,t)),_U=x(2,(e,t)=>En(e)?Wn(e,{onLeft:t,onRight:de}):pP(e,t)),xv=(e,t)=>t===void 0||Hs(t)?e:e===void 0?t:{...e,...t},wle=(e,t,n)=>{const r=nn(e,t);return(i,s)=>r(i,xv(n,s))},xU=(e,t,n)=>{const r=wle(e,t,n);return(i,s)=>wL(r(i,s),fC)},kU=(e,t,n)=>{const r=nn(e,t);return(i,s)=>r(i,{...xv(n,s),isEffectAllowed:!0})},_le=(e,t)=>xU(e.ast,!0,t),EU=(e,t)=>kU(e.ast,!0,t),dC=(e,t)=>kU(e.ast,!1,t),hC=(e,t)=>xU($t(e.ast),!0,t),xle=(e,t)=>{const n=nn($t(e.ast),!0);return(r,i)=>Li(n(r,{exact:!0,...xv(t,i)}))},kle=pe(Symbol.for("effect/ParseResult/decodeMemoMap"),()=>new WeakMap),Ele=pe(Symbol.for("effect/ParseResult/encodeMemoMap"),()=>new WeakMap),nn=(e,t)=>{const n=t?kle:Ele,r=n.get(e);if(r)return r;const i=Cle(e,t),s=Noe(e),a=St(s)?(c,u)=>i(c,xv(u,s.value)):i,o=Doe(e),l=t&&St(o)?(c,u)=>od(_U(a(c,u),o.value),e,c,u):a;return n.set(e,l),l},g0=e=>Ni(Ooe(e)),y0=e=>Ni(Roe(e)),Cle=(e,t)=>{switch(e._tag){case"Refinement":if(t){const n=nn(e.from,!0);return(r,i)=>{i=i??h0;const s=(i==null?void 0:i.errors)==="all",a=hi(_U(n(r,i),o=>{const l=new m0(e,r,"From",o);return s&&Ioe(e)&&OU(o)?Nt(e.filter(r,i,e),{onNone:()=>me(l),onSome:c=>me(new Tt(e,r,[l,new m0(e,r,"Predicate",c)]))}):me(l)}),o=>Nt(e.filter(o,i,e),{onNone:()=>de(o),onSome:l=>me(new m0(e,r,"Predicate",l))}));return od(a,e,r,i)}}else{const n=nn($t(e),!0),r=nn(CU(e.from),!1);return(i,s)=>od(hi(n(i,s),a=>r(a,s)),e,i,s)}case"Transformation":{const n=Ole(e.transformation,t),r=t?nn(e.from,!0):nn(e.to,!1),i=t?nn(e.to,!0):nn(e.from,!1);return(s,a)=>od(hi(Nd(r(s,a),o=>new p0(e,s,t?"Encoded":"Type",o)),o=>hi(Nd(n(o,a??h0,e,s),l=>new p0(e,s,"Transformation",l)),l=>Nd(i(l,a),c=>new p0(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)=>od(n(r,i??h0,e),e,r,i)}case"Literal":return or(e,n=>n===e.literal);case"UniqueSymbol":return or(e,n=>n===e.symbol);case"UndefinedKeyword":return or(e,fV);case"NeverKeyword":return or(e,dV);case"UnknownKeyword":case"AnyKeyword":case"VoidKeyword":return de;case"StringKeyword":return or(e,Qr);case"NumberKeyword":return or(e,Hs);case"BooleanKeyword":return or(e,rh);case"BigIntKeyword":return or(e,bb);case"SymbolKeyword":return or(e,Ww);case"ObjectKeyword":return or(e,bi);case"Enums":return or(e,n=>e.enums.some(([r,i])=>i===n));case"TemplateLiteral":{const n=mle(e);return or(e,r=>Qr(r)&&n.test(r))}case"TupleType":{const n=e.elements.map(c=>nn(c.type,t)),r=e.rest.map(c=>nn(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,u)=>u).join(" | "):"never",o=g0(e),l=y0(e);return(c,u)=>{if(!K7(c))return me(new Sn(e,c));const f=(u==null?void 0:u.errors)==="all",d=[];let h=0;const p=[],b=c.length;for(let v=b;v<=s-1;v++){const _=new kn(v,c,new Uf(i[v-b]));if(f){d.push([h++,_]);continue}else return me(new Tt(e,c,_,p))}if(e.rest.length===0)for(let v=e.elements.length;v<=b-1;v++){const _=new kn(v,c,new QR(c[v],`is unexpected, expected: ${a}`));if(f){d.push([h++,_]);continue}else return me(new Tt(e,c,_,p))}let S=0,m;for(;S<n.length;S++)if(b<S+1){if(e.elements[S].isOptional)continue}else{const v=n[S],_=v(c[S],u);if(En(_)){if(rn(_)){const A=new kn(S,c,_.left);if(f){d.push([h++,A]);continue}else return me(new Tt(e,c,A,ni(p)))}p.push([h++,_.right])}else{const A=h++,E=S;m||(m=[]),m.push(({es:T,output:N})=>ce(Wl(_),D=>{if(rn(D)){const M=new kn(E,c,D.left);return f?(T.push([A,M]),Fe):me(new Tt(e,c,M,ni(N)))}return N.push([A,D.right]),Fe}))}}if(Wt(r)){const[v,..._]=r;for(;S<b-_.length;S++){const A=v(c[S],u);if(En(A))if(rn(A)){const E=new kn(S,c,A.left);if(f){d.push([h++,E]);continue}else return me(new Tt(e,c,E,ni(p)))}else p.push([h++,A.right]);else{const E=h++,T=S;m||(m=[]),m.push(({es:N,output:D})=>ce(Wl(A),M=>{if(rn(M)){const $=new kn(T,c,M.left);return f?(N.push([E,$]),Fe):me(new Tt(e,c,$,ni(D)))}else return D.push([E,M.right]),Fe}))}}for(let A=0;A<_.length;A++)if(S+=A,!(b<S+1)){const E=_[A](c[S],u);if(En(E)){if(rn(E)){const T=new kn(S,c,E.left);if(f){d.push([h++,T]);continue}else return me(new Tt(e,c,T,ni(p)))}p.push([h++,E.right])}else{const T=h++,N=S;m||(m=[]),m.push(({es:D,output:M})=>ce(Wl(E),$=>{if(rn($)){const L=new kn(N,c,$.left);return f?(D.push([T,L]),Fe):me(new Tt(e,c,L,ni(M)))}return M.push([T,$.right]),Fe}))}}}const y=({es:v,output:_})=>Uc(v)?me(new Tt(e,c,ni(v),ni(_))):de(ni(_));if(m&&m.length>0){const v=m;return Ot(()=>{const _={es:td(d),output:td(p)};return ce(Gi(v,A=>A(_),{concurrency:o,batching:l,discard:!0}),()=>y(_))})}return y({output:p,es:d})}}case"TypeLiteral":{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return or(e,hV);const n=[],r={},i=[];for(const u of e.propertySignatures)n.push([nn(u.type,t),u]),r[u.name]=null,i.push(u.name);const s=e.indexSignatures.map(u=>[nn(u.parameter,t),nn(u.type,t),u.parameter]),a=fr.make(e.indexSignatures.map(u=>u.parameter).concat(i.map(u=>Ww(u)?new joe(u):new a1(u)))),o=nn(a,t),l=g0(e),c=y0(e);return(u,f)=>{if(!pV(u))return me(new Sn(e,u));const d=(f==null?void 0:f.errors)==="all",h=[];let p=0;const b=(f==null?void 0:f.onExcessProperty)==="error",S=(f==null?void 0:f.onExcessProperty)==="preserve",m={};let y;if(b||S){y=Reflect.ownKeys(u);for(const E of y){const T=o(E,f);if(En(T)&&rn(T))if(b){const N=new kn(E,u,new QR(u[E],`is unexpected, expected: ${String(a)}`));if(d){h.push([p++,N]);continue}else return me(new Tt(e,u,N,m))}else m[E]=u[E]}}let v;const _=(f==null?void 0:f.exact)===!0;for(let E=0;E<n.length;E++){const T=n[E][1],N=T.name,D=Object.prototype.hasOwnProperty.call(u,N);if(!D){if(T.isOptional)continue;if(_){const L=new kn(N,u,new Uf(T));if(d){h.push([p++,L]);continue}else return me(new Tt(e,u,L,m))}}const M=n[E][0],$=M(u[N],f);if(En($)){if(rn($)){const L=new kn(N,u,D?$.left:new Uf(T));if(d){h.push([p++,L]);continue}else return me(new Tt(e,u,L,m))}m[N]=$.right}else{const L=p++,J=N;v||(v=[]),v.push(({es:Y,output:G})=>ce(Wl($),z=>{if(rn(z)){const F=new kn(J,u,D?z.left:new Uf(T));return d?(Y.push([L,F]),Fe):me(new Tt(e,u,F,G))}return G[J]=z.right,Fe}))}}for(let E=0;E<s.length;E++){const T=s[E],N=T[0],D=T[1],M=P4(u,T[2]);for(const $ of M){const L=N($,f);if(En(L)&&Li(L)){const J=D(u[$],f);if(En(J))if(rn(J)){const Y=new kn($,u,J.left);if(d){h.push([p++,Y]);continue}else return me(new Tt(e,u,Y,m))}else Object.prototype.hasOwnProperty.call(r,$)||(m[$]=J.right);else{const Y=p++,G=$;v||(v=[]),v.push(({es:z,output:F})=>ce(Wl(J),I=>{if(rn(I)){const te=new kn(G,u,I.left);return d?(z.push([Y,te]),Fe):me(new Tt(e,u,te,F))}else return Object.prototype.hasOwnProperty.call(r,$)||(F[$]=I.right),Fe}))}}}}const A=({es:E,output:T})=>{if(Uc(E))return me(new Tt(e,u,ni(E),T));if((f==null?void 0:f.propertyOrder)==="original"){const N=y||Reflect.ownKeys(u);for(const M of i)N.indexOf(M)===-1&&N.push(M);const D={};for(const M of N)Object.prototype.hasOwnProperty.call(T,M)&&(D[M]=T[M]);return de(D)}return de(T)};if(v&&v.length>0){const E=v;return Ot(()=>{const T={es:td(h),output:Object.assign({},m)};return ce(Gi(E,N=>N(T),{concurrency:l,batching:c,discard:!0}),()=>A(T))})}return A({es:h,output:m})}}case"Union":{const n=Tle(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],nn(e.types[c],t));const o=g0(e)??1,l=y0(e);return(c,u)=>{const f=[];let d=0,h=[];if(i>0)if(ck(c))for(let S=0;S<i;S++){const m=r[S],y=n.keys[m].buckets;if(Object.prototype.hasOwnProperty.call(c,m)){const v=String(c[m]);if(Object.prototype.hasOwnProperty.call(y,v))h=h.concat(y[v]);else{const{candidates:_,literals:A}=n.keys[m],E=fr.make(A),T=_.length===s?new Ha([new hn(m,E,!1,!0)],[]):fr.make(_);f.push([d++,new Tt(T,c,new kn(m,c,new Sn(E,c[m])))])}}else{const{candidates:v,literals:_}=n.keys[m],A=new hn(m,fr.make(_),!1,!0),E=v.length===s?new Ha([A],[]):fr.make(v);f.push([d++,new Tt(E,c,new kn(m,c,new Uf(A)))])}}else{const S=n.candidates.length===s?e:fr.make(n.candidates);f.push([d++,new Sn(S,c)])}n.otherwise.length>0&&(h=h.concat(n.otherwise));let p;for(let S=0;S<h.length;S++){const m=h[S],y=a.get(m)(c,u);if(En(y)&&(!p||p.length===0)){if(Li(y))return y;f.push([d++,y.left])}else{const v=d++;p||(p=[]),p.push(_=>Ot(()=>"finalResult"in _?Fe:ce(Wl(y),A=>(Li(A)?_.finalResult=A:_.es.push([v,A.left]),Fe))))}}const b=S=>Uc(S)?S.length===1&&S[0][1]._tag==="Type"?me(S[0][1]):me(new Tt(e,c,ni(S))):me(new Sn(e,c));if(p&&p.length>0){const S=p;return Ot(()=>{const m={es:td(f)};return ce(Gi(S,y=>y(m),{concurrency:o,batching:l,discard:!0}),()=>"finalResult"in m?m.finalResult:b(m.es))})}return b(f)}}case"Suspend":{const n=U4(()=>nn(e.f(),t));return(r,i)=>n()(r,i)}}},or=(e,t)=>n=>t(n)?de(n):me(new Sn(e,n)),ad=(e,t)=>{switch(e._tag){case"Declaration":{const n=lU(e);if(St(n))return ad(n.value,t);break}case"TypeLiteral":{const n=[];for(let r=0;r<e.propertySignatures.length;r++){const i=e.propertySignatures[r],s=t?Ry(i.type):$t(i.type);Md(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?Ry(i.type):$t(i.type);Md(s)&&!i.isOptional&&n.push([r,s])}return n}case"Refinement":return ad(e.from,t);case"Suspend":return ad(e.f(),t);case"Transformation":return ad(t?e.from:e.to,t)}return[]},Tle=(e,t)=>{const n={},r=[],i=[];for(let s=0;s<e.length;s++){const a=e[s],o=ad(a,t);if(o.length>0){i.push(a);for(let l=0;l<o.length;l++){const[c,u]=o[l],f=String(u.literal);n[c]=n[c]||{buckets:{},literals:[],candidates:[]};const d=n[c].buckets;if(Object.prototype.hasOwnProperty.call(d,f)){if(l<o.length-1)continue;d[f].push(a),n[c].literals.push(u),n[c].candidates.push(a)}else{d[f]=[a],n[c].literals.push(u),n[c].candidates.push(a);break}}}else r.push(a)}return{keys:n,otherwise:r,candidates:i}},CU=e=>Xc(e)?CU(e.from):e,od=(e,t,n,r)=>{if((r==null?void 0:r.isEffectAllowed)===!0||En(e))return e;const i=new vE,s=KE(e,{scheduler:i});i.flush();const a=s.unsafePoll();if(a){if(pZ(a))return de(a.value);const o=a.cause;return qte(o)?me(o.error):me(new h1(t,n,Wte(o)))}return me(new h1(t,n,"cannot be be resolved synchronously, this is caused by using runSync on an effect that performs async work"))},Ale=([e],[t])=>e>t?1:e<t?-1:0;function ni(e){return e.sort(Ale).map(t=>t[1])}const Ole=(e,t)=>{switch(e._tag){case"FinalTransformation":return t?e.decode:e.encode;case"ComposeTransformation":return de;case"TypeLiteralTransformation":return n=>{let r=de(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=mn(r,c=>{const u=o(Object.prototype.hasOwnProperty.call(c,s)?ee(c[s]):K());return delete c[s],St(u)&&(c[a]=u.value),c})}return r}}},zn=(e,t=[])=>({value:e,forest:t}),Dd={formatIssue:e=>mn(fc(e),Rle),formatIssueSync:e=>{const t=Dd.formatIssue(e);return En(t)?_L(t):Yr(t)},formatError:e=>Dd.formatIssue(e.issue),formatErrorSync:e=>Dd.formatIssueSync(e.issue)},Rle=e=>e.value+TU(`
|
|
75
|
+
`,e.forest),TU=(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+=TU(e+(r>1&&!a?"│ ":" "),i.forest)}return n},Mle=e=>{switch(e){case"Encoded":return"Encoded side transformation failure";case"Transformation":return"Transformation process failure";case"Type":return"Type side transformation failure"}},Nle=e=>{switch(e){case"From":return"From side refinement failure";case"Predicate":return"Predicate refinement failure"}},AU=e=>"ast"in e?ee(e.ast):K(),m1=de(void 0),Dle=e=>AU(e).pipe(Il(Toe),Nt({onNone:()=>m1,onSome:t=>{const n=t(e);return Qr(n)?de({message:n,override:!1}):go(n)?Je(n,r=>({message:r,override:!1})):Qr(n.message)?de({message:n.message,override:n.override}):Je(n.message,r=>({message:r,override:n.override}))}})),mC=e=>t=>t._tag===e,OU=mC("Composite"),WR=mC("Refinement"),ZR=mC("Transformation"),qa=e=>hi(Dle(e),t=>t!==void 0?!t.override&&(OU(e)||WR(e)&&e.kind==="From"||ZR(e)&&e.kind!=="Transformation")?ZR(e)||WR(e)?qa(e.issue):m1:de(t.message):m1),RU=e=>AU(e).pipe(Il(Moe),TL(t=>t(e)),Ni);function zle(e){return oU(e).pipe(qi(()=>sU(e)),qi(()=>aU(e)),qi(()=>bv(e)),wt(()=>`{ ${e.from} | filter }`))}function Ile(e){return e.message!==void 0?e.message:`Expected ${Xc(e.ast)?zle(e.ast):String(e.ast)}, actual ${Qs(e.actual)}`}const MU=e=>mn(qa(e),t=>t??RU(e)??Ile(e)),sp=e=>RU(e)??String(e.ast),NU=e=>e.message??"is forbidden",DU=e=>e.message??"is unexpected",zU=e=>{const t=Aoe(e.ast);if(St(t)){const n=t.value();return Qr(n)?de(n):n}return de(e.message??"is missing")},fc=e=>{switch(e._tag){case"Type":return mn(MU(e),zn);case"Forbidden":return de(zn(sp(e),[zn(NU(e))]));case"Unexpected":return de(zn(DU(e)));case"Missing":return mn(zU(e),zn);case"Transformation":return hi(qa(e),t=>t!==void 0?de(zn(t)):mn(fc(e.issue),n=>zn(sp(e),[zn(Mle(e.kind),[n])])));case"Refinement":return hi(qa(e),t=>t!==void 0?de(zn(t)):mn(fc(e.issue),n=>zn(sp(e),[zn(Nle(e.kind),[n])])));case"Pointer":return mn(fc(e.issue),t=>zn(B4(e.path),[t]));case"Composite":return hi(qa(e),t=>{if(t!==void 0)return de(zn(t));const n=sp(e);return aC(e.issues)?mn(Gi(e.issues,fc),r=>zn(n,r)):mn(fc(e.issues),r=>zn(n,[r]))})}},Ao=(e,t,n)=>({_tag:e,path:t,message:n}),Yp={formatIssue:e=>dc(e,void 0,[]),formatIssueSync:e=>{const t=Yp.formatIssue(e);return En(t)?_L(t):Yr(t)},formatError:e=>Yp.formatIssue(e.issue),formatErrorSync:e=>Yp.formatIssueSync(e.issue)},dc=(e,t,n)=>{const r=e._tag;switch(r){case"Type":return mn(MU(e),i=>[Ao(t??r,n,i)]);case"Forbidden":return de([Ao(r,n,NU(e))]);case"Unexpected":return de([Ao(r,n,DU(e))]);case"Missing":return mn(zU(e),i=>[Ao(r,n,i)]);case"Pointer":return dc(e.issue,void 0,n.concat(e.path));case"Composite":return hi(qa(e),i=>i!==void 0?de([Ao(r,n,i)]):aC(e.issues)?mn(Gi(e.issues,s=>dc(s,void 0,n)),DL):dc(e.issues,void 0,n));case"Refinement":return hi(qa(e),i=>i!==void 0?de([Ao(r,n,i)]):dc(e.issue,e.kind==="Predicate"?r:void 0,n));case"Transformation":return hi(qa(e),i=>i!==void 0?de([Ao(r,n,i)]):dc(e.issue,e.kind==="Transformation"?r:void 0,n))}},e2=yoe,$le=x(e=>bi(e[0]),(e,...t)=>{const n={};for(const r of t)r in e&&(n[r]=e[r]);return n}),IU=x(e=>bi(e[0]),(e,...t)=>{const n={...e};for(const r of t)delete n[r];return n}),Mu=Symbol.for("effect/Schema");function yt(e){var t,n,r;return n=Mu,t=Mu,r=class{constructor(){g(this,n,p1)}static annotations(s){return yt(ea(this.ast,s))}static pipe(){return re(this,arguments)}static toString(){return String(e)}},g(r,"ast",e),g(r,"Type"),g(r,"Encoded"),g(r,"Context"),g(r,t,p1),r}const p1={_A:e=>e,_I:e=>e,_R:e=>e},t2={typeConstructor:xoe,schemaId:koe,message:K4,missingMessage:oC,identifier:bm,title:Ci,description:jl,examples:G4,default:Y4,documentation:Eoe,jsonSchema:J4,arbitrary:Q4,pretty:X4,equivalence:W4,concurrency:Z4,batching:eU,parseIssueTitle:tU,parseOptions:nU,decodingFallback:rU},gf=e=>{if(!e)return{};const t={...e};for(const n in t2)if(n in e){const r=t2[n];t[r]=e[n],delete t[n]}return t},ea=(e,t)=>pf(e,gf(t));const Lle=e=>String(e.ast),Fle=e=>yt(Ry(e.ast)),g1=e=>yt($t(e.ast)),Bf=(e,t)=>{const n=dC(e,t);return(r,i)=>Nd(n(r,i),fC)},jle=(e,t)=>{const n=EU(e,t);return(r,i)=>Nd(n(r,i),fC)},Ple=jle,Wi=e=>ue(e,Mu)&&bi(e[Mu]);function Ule(e){return uC(e)?fr.make(ale(e,t=>new a1(t))):new a1(e[0])}function $U(e,t=Ule(e)){var n;return n=class extends yt(t){static annotations(i){return $U(this.literals,ea(this.ast,i))}},g(n,"literals",[...e]),n}function Pl(...e){return Wt(e)?$U(e):kh}const Ble=(e,t,n)=>pC(e,new vv(e.map(r=>r.ast),(...r)=>t.decode(...r.map(yt)),(...r)=>t.encode(...r.map(yt)),gf(n))),Hle=(e,t)=>{const n=()=>(i,s,a)=>e(i)?Zn(i):Ca(new Sn(a,i)),r=n;return pC([],new vv([],n,r,gf(t)))};function pC(e,t){var n;return n=class extends yt(t){static annotations(i){return pC(this.typeParameters,ea(this.ast,i))}},g(n,"typeParameters",[...e]),n}const vm=function(){if(Array.isArray(arguments[0])){const n=arguments[0],r=arguments[1],i=arguments[2];return Ble(n,r,i)}const e=arguments[0],t=arguments[1];return Hle(e,t)};class qle extends yt(o1){}class Vle extends yt(Boe){}class kh extends yt(lC){}class kv extends yt(uU){}class Kle extends yt(Zoe){}class oe extends yt(l1){}class LU extends yt(u1){}class so extends yt(f1){}const Gle=e=>fr.make(e.map(t=>t.ast));function FU(e,t=Gle(e)){var n;return n=class extends yt(t){static annotations(i){return FU(this.members,ea(this.ast,i))}},g(n,"members",[...e]),n}function Ev(...e){return uC(e)?FU(e):Wt(e)?e[0]:kh}const Yle=e=>Ev(e,qle),Jle=(e,t)=>new cC(e.map(n=>Wi(n)?new mf(n.ast,!1):n.ast),t.map(n=>Wi(n)?new Sv(n.ast):n.ast),!0);function Ny(e,t,n=Jle(e,t)){var r;return r=class extends yt(n){static annotations(s){return Ny(this.elements,this.rest,ea(this.ast,s))}},g(r,"elements",[...e]),g(r,"rest",[...t]),r}function Qle(...e){return Array.isArray(e[0])?Ny(e[0],e.slice(1)):Ny(e,[])}function jU(e,t){var n;return n=class extends Ny([],[e],t){static annotations(i){return jU(this.value,ea(this.ast,i))}},g(n,"value",e),n}const Zi=e=>jU(e),y1=e=>e?'"?:"':'":"';class Cv extends mf{constructor(n,r,i,s,a){super(n,r,s);g(this,"isReadonly");g(this,"defaultValue");g(this,"_tag","PropertySignatureDeclaration");this.isReadonly=i,this.defaultValue=a}toString(){const n=y1(this.isOptional),r=String(this.type);return`PropertySignature<${n}, ${r}, never, ${n}, ${r}>`}}class PU extends mf{constructor(n,r,i,s,a){super(n,r,s);g(this,"isReadonly");g(this,"defaultValue");this.isReadonly=i,this.defaultValue=a}}const Xle=e=>e===void 0?"never":Qr(e)?JSON.stringify(e):String(e);class UU{constructor(t,n,r,i){g(this,"from");g(this,"to");g(this,"decode");g(this,"encode");g(this,"_tag","PropertySignatureTransformation");this.from=t,this.to=n,this.decode=r,this.encode=i}toString(){return`PropertySignature<${y1(this.to.isOptional)}, ${this.to.type}, ${Xle(this.from.fromKey)}, ${y1(this.from.isOptional)}, ${this.from.type}>`}}const BU=(e,t)=>{switch(e._tag){case"PropertySignatureDeclaration":return new Cv(e.type,e.isOptional,e.isReadonly,{...e.annotations,...t},e.defaultValue);case"PropertySignatureTransformation":return new UU(e.from,new PU(e.to.type,e.to.isOptional,e.to.isReadonly,{...e.to.annotations,...t},e.to.defaultValue),e.decode,e.encode)}},HU=Symbol.for("effect/PropertySignature"),gC=e=>ue(e,HU);var DD,zD;zD=Mu,DD=HU;const xT=class xT{constructor(t){g(this,"ast");g(this,zD);g(this,DD,null);g(this,"_TypeToken");g(this,"_Key");g(this,"_EncodedToken");g(this,"_HasDefault");this.ast=t}pipe(){return re(this,arguments)}annotations(t){return new xT(BU(this.ast,gf(t)))}toString(){return String(this.ast)}};let Dy=xT;const n2=e=>new Dy(e);class Tv extends Dy{constructor(n,r){super(n);g(this,"from");this.from=r}annotations(n){return new Tv(BU(this.ast,gf(n)),this.from)}}const zd=e=>new Tv(new Cv(e.ast,!1,!0,{},void 0),e),qU=x(2,(e,t)=>{const n=e.ast;switch(n._tag){case"PropertySignatureDeclaration":return n2(new Cv(n.type,n.isOptional,n.isReadonly,n.annotations,t));case"PropertySignatureTransformation":return n2(new UU(n.from,new PU(n.to.type,n.to.isOptional,n.to.isReadonly,n.to.annotations,t),n.decode,n.encode))}}),mi=e=>{const t=e.ast===o1||e.ast===lC?o1:Yle(e).ast;return new Tv(new Cv(t,!0,!0,{},void 0),e)},Wle=vU([oC]),Zle=(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],u=e[c];if(gC(u)){const f=u.ast;switch(f._tag){case"PropertySignatureDeclaration":{const d=f.type,h=f.isOptional,p=f.annotations;s.push(new hn(c,d,h,!0,Wle(f))),a.push(new hn(c,$t(d),h,!0,p)),r.push(new hn(c,d,h,!0,p));break}case"PropertySignatureTransformation":{const d=f.from.fromKey??c;s.push(new hn(d,f.from.type,f.from.isOptional,!0,f.from.annotations)),a.push(new hn(c,f.to.type,f.to.isOptional,!0,f.to.annotations)),o.push(new ule(d,c,f.decode,f.encode));break}}}else s.push(new hn(c,u.ast,!1,!0)),a.push(new hn(c,$t(u.ast),!1,!0)),r.push(new hn(c,u.ast,!1,!0))}if(Wt(o)){const l=[],c=[];for(const u of t){const{indexSignatures:f,propertySignatures:d}=JR(u.key.ast,u.value.ast);d.forEach(h=>{s.push(h),a.push(new hn(h.name,$t(h.type),h.isOptional,h.isReadonly,h.annotations))}),f.forEach(h=>{l.push(h),c.push(new wv(h.parameter,$t(h.type),h.isReadonly))})}return new Ho(new Ha(s,l,{[Qc]:"Struct (Encoded side)"}),new Ha(a,c,{[Qc]:"Struct (Type side)"}),new d1(o))}}const i=[];for(const s of t){const{indexSignatures:a,propertySignatures:o}=JR(s.key.ast,s.value.ast);o.forEach(l=>r.push(l)),a.forEach(l=>i.push(l))}return new Ha(r,i)},VU=(e,t)=>{const n=Reflect.ownKeys(e);for(const r of n){const i=e[r];if(t[r]===void 0&&gC(i)){const s=i.ast,a=s._tag==="PropertySignatureDeclaration"?s.defaultValue:s.to.defaultValue;a!==void 0&&(t[r]=a())}}return t};function KU(e,t,n=Zle(e,t)){var r;return r=class extends yt(n){static annotations(s){return KU(this.fields,this.records,ea(this.ast,s))}static pick(...s){return un($le(e,...s))}static omit(...s){return un(IU(e,...s))}},g(r,"fields",{...e}),g(r,"records",[...t]),g(r,"make",(s,a)=>{const o=VU(e,{...s});return wC(a)?o:hC(r)(o)}),r}function un(e,...t){return KU(e,t)}const ece=e=>Pl(e).pipe(zd,qU(()=>e)),tce=(e,t)=>un({_tag:ece(e),...t});function GU(e,t){var n;return n=class extends yt(t){static annotations(i){return GU(this.from,ea(this.ast,i))}},g(n,"make",(i,s)=>wC(s)?i:hC(n)(i)),g(n,"from",e),n}const Sm=(e,t)=>n=>{const r=Nt(iU(n.ast),{onNone:()=>[e],onSome:s=>[...s,e]}),i=pf(n.ast,gf({[V4]:r,...t}));return GU(n,i)},Hf=(e,t,n)=>{if(GR(e)&&GR(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 hn(s,zy(l,i.type,n.concat(s)),o,!0)}}return new Ha(r,e.indexSignatures.concat(t.indexSignatures))}throw new Error(H4(e,t,n))},nce=ple([bm]),qf=(e,t)=>t.map(n=>new mU(n,e.filter,nce(e))),zy=(e,t,n)=>fr.make(bs([e],[t],n)),Oo=e=>_v(e)?e.types:[e],bs=(e,t,n)=>Hg(e,r=>Hg(t,i=>{switch(i._tag){case"Literal":{if(Qr(i.literal)&&c1(r)||Hs(i.literal)&&qR(r)||rh(i.literal)&&VR(r))return[i];break}case"StringKeyword":{if(i===l1){if(c1(r)||Md(r)&&Qr(r.literal))return[r];if(Xc(r))return qf(r,bs(Oo(r.from),[i],n))}else if(r===l1)return[i];break}case"NumberKeyword":{if(i===u1){if(qR(r)||Md(r)&&Hs(r.literal))return[r];if(Xc(r))return qf(r,bs(Oo(r.from),[i],n))}else if(r===u1)return[i];break}case"BooleanKeyword":{if(i===f1){if(VR(r)||Md(r)&&rh(r.literal))return[r];if(Xc(r))return qf(r,bs(Oo(r.from),[i],n))}else if(r===f1)return[i];break}case"Union":return bs(Oo(r),i.types,n);case"Suspend":return[new Oy(()=>zy(r,i.f(),n))];case"Refinement":return qf(i,bs(Oo(r),Oo(i.from),n));case"TypeLiteral":{switch(r._tag){case"Union":return bs(r.types,[i],n);case"Suspend":return[new Oy(()=>zy(r.f(),i,n))];case"Refinement":return qf(r,bs(Oo(r.from),[i],n));case"TypeLiteral":return[Hf(r,i,n)];case"Transformation":{const s=r.transformation,a=Hf(r.from,i,n),o=Hf(r.to,$t(i),n);switch(s._tag){case"TypeLiteralTransformation":return[new Ho(a,o,new d1(s.propertySignatureTransformations))];case"ComposeTransformation":return[new Ho(a,o,gU)];case"FinalTransformation":return[new Ho(a,o,new pU((l,c,u,f)=>mn(s.decode(l,c,u,f),d=>({...l,...d})),(l,c,u,f)=>mn(s.encode(l,c,u,f),d=>({...l,...d}))))]}}}break}case"Transformation":{if(ole(r)){if(YR(i.transformation)&&YR(r.transformation))return[new Ho(Hf(r.from,i.from,n),Hf(r.to,i.to,n),new d1(i.transformation.propertySignatureTransformations.concat(r.transformation.propertySignatureTransformations)))]}else return bs([i],[r],n);break}}throw new Error(H4(r,i,n))})),YU=x(2,(e,t)=>yt(zy(e.ast,t.ast,[]))),qo=x(e=>Wi(e[1]),(e,t)=>yC(e,t,yle(e.ast,t.ast))),rce=Symbol.for("effect/SchemaId/Refine");function yC(e,t,n){var r;return r=class extends yt(n){static annotations(s){return yC(this.from,this.to,ea(this.ast,s))}},g(r,"from",e),g(r,"to",t),r}const wl=x(e=>Wi(e[0])&&Wi(e[1]),(e,t,n)=>yC(e,t,new Ho(e.ast,t.ast,new pU(n.decode,n.encode)))),Ul=x(e=>Wi(e[0])&&Wi(e[1]),(e,t,n)=>wl(e,t,{strict:!0,decode:(r,i,s,a)=>Zn(n.decode(r,a)),encode:(r,i,s,a)=>Zn(n.encode(r,a))})),r2=e=>e instanceof Error?e.message:String(e),ice=e=>wl(oe.annotations({description:"a string to be decoded into JSON"}),kv,{strict:!0,decode:(t,n,r)=>My({try:()=>JSON.parse(t,e==null?void 0:e.reviver),catch:i=>new Sn(r,t,r2(i))}),encode:(t,n,r)=>My({try:()=>JSON.stringify(t,e==null?void 0:e.replacer,e==null?void 0:e.space),catch:i=>new Sn(r,t,r2(i))})}).annotations({title:"parseJson",schemaId:Foe}),JU=(e,t)=>Wi(e)?qo(JU(t),e):ice(e),sce=(e,t)=>{const n=Symbol.keyFor(e);return n===void 0?Ca(new Sn(t,e,`Unable to encode a unique symbol ${String(e)} into a string`)):Zn(n)},ace=e=>Zn(Symbol.for(e)),oce=(e,t,n,r)=>Sle(e,{onFailure:i=>new Tt(n,r,i),onSuccess:t});class lce extends vm(mV,{typeConstructor:{_tag:"Uint8Array"},identifier:"Uint8ArrayFromSelf",pretty:()=>t=>`new Uint8Array(${JSON.stringify(Array.from(t))})`,arbitrary:()=>t=>t.uint8Array(),equivalence:()=>Tb(ae)}){}const i2=_oe;class Eh extends vm(K$,{typeConstructor:{_tag:"Date"},identifier:"DateFromSelf",schemaId:i2,[i2]:{noInvalidDate:!1},description:"a potentially invalid Date instance",pretty:()=>t=>`new Date(${JSON.stringify(t)})`,arbitrary:()=>t=>t.date({noInvalidDate:!1}),equivalence:()=>g7}){}class b1 extends Ul(oe.annotations({description:"a string to be decoded into a Date"}),Eh,{strict:!0,decode:t=>new Date(t),encode:t=>W$(t)}).annotations({identifier:"DateFromString"}){}const cce=(e,t)=>n=>{const r=n.array(e(n));return(t.depthIdentifier!==void 0?n.oneof(t,n.constant([]),r):r).map(qs)},uce=e=>t=>`Chunk(${Bn(t).map(e).join(", ")})`,s2=e=>(t,n,r)=>Ab(t)?Ob(t)?Zn(Zt()):oce(e(Bn(t),n),qs,r,t):Ca(new Sn(r,t)),fce=e=>vm([e],{decode:t=>s2(EU(Zi(t))),encode:t=>s2(dC(Zi(t)))},{typeConstructor:{_tag:"effect/Chunk"},description:`Chunk<${Lle(e)}>`,pretty:uce,arbitrary:cce,equivalence:LL});function QU(e){return Ul(Zi(e),fce(g1(e)),{strict:!0,decode:t=>t.length===0?Zt():qs(t),encode:t=>Bn(t)})}const dce=e=>Wi(e)||gC(e),XU=e=>Reflect.ownKeys(e).every(t=>dce(e[t])),bC=e=>"fields"in e?e.fields:bC(e[rce]),vC=e=>XU(e)?un(e):Wi(e)?e:un(bC(e)),SC=e=>XU(e)?e:bC(e),Av=e=>(t,n)=>Id({kind:"Class",identifier:e,schema:vC(t),fields:SC(t),Base:$E,annotations:n}),hce=e=>qU(zd(Pl(e)),()=>e),WU=e=>(t,n,r)=>{class i extends LE{}i.prototype.name=t;const s=SC(n),a=vC(n),o={_tag:hce(t)},l=Jp(o,s),c="message"in l;class u extends Id({kind:"TaggedError",identifier:t,schema:YU(a,un(o)),fields:l,Base:i,annotations:r,disableToString:!0}){}return g(u,"_tag",t),c||Object.defineProperty(u.prototype,"message",{get(){return`{ ${Reflect.ownKeys(s).map(f=>`${wb(f)}: ${Qs(this[f])}`).join(", ")} }`},enumerable:!1,configurable:!0}),u},Jp=(e,t)=>{const n={...e};for(const r of Reflect.ownKeys(t)){if(r in e)throw new Error(q4(r));n[r]=t[r]}return n};function wC(e){return rh(e)?e:(e==null?void 0:e.disableValidation)??!1}const a2=pe("effect/Schema/astCache",()=>new WeakMap),mce=e=>e===void 0?[]:Array.isArray(e)?e:[e],Id=({Base:e,annotations:t,disableToString:n,fields:r,identifier:i,kind:s,schema:a})=>{var v,_;const o=Symbol.for(`effect/Schema/${s}/${i}`),[l,c,u]=mce(t),f=g1(a),d=f.annotations({identifier:i,...l}),h=f.annotations({[Qc]:`${i} (Type side)`,...l}),p=a.annotations({[Qc]:`${i} (Constructor)`,...l}),b=a.annotations({[Qc]:`${i} (Encoded side)`,...u}),S=a.annotations({...u,...l,...c}),m=A=>ue(A,o)&&xle(h)(A),y=(_=class extends e{constructor(A={},E=!1){A={...A},s!=="Class"&&delete A._tag,A=VU(r,A),wC(E)||(A=hC(p)(A)),super(A,!0)}static get ast(){let A=a2.get(this);if(A)return A;const E=vm([a],{decode:()=>(T,N,D)=>T instanceof this||m(T)?Zn(T):Ca(new Sn(D,T)),encode:()=>(T,N)=>T instanceof this?Zn(T):mn(dC(h)(T,N),D=>new this(D,!0))},{identifier:i,pretty:T=>N=>`${i}(${T(N)})`,arbitrary:T=>N=>T(N).map(D=>new this(D)),equivalence:ge,[Ay]:d.ast,...l});return A=Ul(b,E,{strict:!0,decode:T=>new this(T,!0),encode:ge}).annotations({[Ay]:S.ast,...c}).ast,a2.set(this,A),A}static pipe(){return re(this,arguments)}static annotations(A){return yt(this.ast).annotations(A)}static toString(){return`(${String(b)} <-> ${i})`}static make(...A){return new this(...A)}static extend(A){return(E,T)=>{const N=SC(E),D=vC(E),M=Jp(r,N);return Id({kind:s,identifier:A,schema:YU(a,D),fields:M,Base:this,annotations:T})}}static transformOrFail(A){return(E,T,N)=>{const D=Jp(r,E);return Id({kind:s,identifier:A,schema:wl(a,g1(un(D)),T),fields:D,Base:this,annotations:N})}}static transformOrFailFrom(A){return(E,T,N)=>{const D=Jp(r,E);return Id({kind:s,identifier:A,schema:wl(Fle(a),un(D),T),fields:D,Base:this,annotations:N})}}get[(v=Mu,o)](){return o}},g(_,v,p1),g(_,"fields",{...r}),g(_,"identifier",i),_);return n!==!0&&Object.defineProperty(y.prototype,"toString",{value(){return`${i}({ ${Reflect.ownKeys(r).map(A=>`${wb(A)}: ${Qs(this[A])}`).join(", ")} })`},configurable:!0,writable:!0}),y},o2=tce("symbol",{key:oe}).annotations({description:"an object to be decoded into a globally shared symbol"}),pce=wl(o2,Kle,{strict:!0,decode:e=>ace(e.key),encode:(e,t,n)=>mn(sce(e,n),r=>o2.make({key:r}))});class gce extends Ev(oe,LU,pce).annotations({identifier:"PropertyKey"}){}class yce extends un({_tag:zd(Pl("Pointer","Unexpected","Missing","Composite","Refinement","Transformation","Type","Forbidden")).annotations({description:"The tag identifying the type of parse issue"}),path:zd(Zi(gce)).annotations({description:"The path to the property where the issue occurred"}),message:zd(oe).annotations({description:"A descriptive message explaining the issue"})}).annotations({identifier:"ArrayFormatterIssue",description:"Represents an issue returned by the ArrayFormatter formatter"}){}const ZU=(e,t)=>{class n extends LE{constructor(){super(...arguments);g(this,"_tag",t)}}return n.prototype[e]=e,n.prototype.name=t,n},bce=gi,vce=df,Sce=v4,wce=WE,l2=ZE,_ce=bae,eB=Symbol.for("effect/Subscribable"),tB=e=>ue(e,eB),xce="effect/SubscriptionRef",kce=Symbol.for(xce),Ece=x(2,(e,t)=>O(jW(e.ref,t),GE(yse(e.pubsub,t)),e.semaphore.withPermits(1))),v1=kce,c2=Ece,Cce="~effect-atom/atom/Result",Ov={[Cce]:{E:ge,A:ge},pipe(){return re(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 ae(this.value,e.value);case"Failure":return ae(this.cause,e.cause)}},[be](){const e=ht(`${this._tag}:${this.waiting}`);return this._tag==="Initial"?tt(this,e):tt(this,Se(e)(this._tag==="Success"?ne(this.value):ne(this.cause)))}},nB=(e,t)=>e._tag==="Success"?_l(e.value):wm(e.cause,{previous:t}),_C=e=>e._tag==="None"?Va(!0):Rv(e.value),Tce=e=>e._tag!=="Initial",Va=(e=!1)=>{const t=Object.create(Ov);return t._tag="Initial",t.waiting=e,t},Ch=e=>e._tag==="Success",_l=(e,t)=>{const n=Object.create(Ov);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},Ace=e=>e._tag==="Failure",Oce=(e,t)=>{const n=Object.create(Ov);return n._tag="Failure",n.cause=e,n.previousSuccess=(t==null?void 0:t.previousSuccess)??K(),n.waiting=(t==null?void 0:t.waiting)??!1,n},wm=(e,t)=>Oce(e,{previousSuccess:Il(t.previous,n=>Ch(n)?ee(n):Ace(n)?n.previousSuccess:K()),waiting:t.waiting}),Rce=(e,t)=>wm($3(e),t),Rv=(e,t)=>{if(e.waiting)return t!=null&&t.touch?Mce(e):e;const n=Object.assign(Object.create(Ov),e);return n.waiting=!0,n},Mce=e=>Ch(e)?_l(e.value,{waiting:e.waiting}):e,ld=(e,t)=>e._tag==="Failure"?wm(e.cause,{previous:t,waiting:e.waiting}):e,rB=e=>e._tag==="Success"?ee(e.value):e._tag==="Failure"?Br(e.previousSuccess,t=>t.value):K(),S1=e=>CL(rB(e),()=>new uf("Result.getOrThrow: no value found")),u2=e=>{switch(e._tag){case"Success":return mr(e.value);case"Failure":return An(e.cause);default:return cy(new uf)}},Nce={immediate:!0},b0="~effect-atom/atom/Registry",Dce=e=>new zce(e==null?void 0:e.initialValues,e==null?void 0:e.scheduleTask,e==null?void 0:e.timeoutResolution,e==null?void 0:e.defaultIdleTTL),w1="~effect-atom/atom/Atom/Serializable",Vf=e=>w1 in e?e[w1].key:e;var ID,Ko;ID=b0;class zce{constructor(t,n=s=>queueMicrotask(s),r,i){g(this,"scheduleTask");g(this,"defaultIdleTTL");g(this,ID);g(this,"timeoutResolution");g(this,"nodes",new Map);g(this,"preloadedSerializable",new Map);g(this,"timeoutBuckets",new Map);g(this,"nodeTimeoutBucket",new Map);g(this,"disposed",!1);g(this,"refresh",t=>{t.refresh!==void 0?t.refresh(this.refresh):this.invalidateAtom(t)});g(this,"invalidateAtom",t=>{this.ensureNode(t).invalidate()});tS(this,Ko,null);if(this.scheduleTask=n,this.defaultIdleTTL=i,this[b0]=b0,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,du,Nce)}atomHasTtl(t){return!t.keepAlive&&t.idleTTL!==0&&(t.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(t){const n=Vf(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[w1].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 Ice(this,t)}scheduleAtomRemoval(t){this.scheduleTask(()=>{const n=this.nodes.get(Vf(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(Vf(t.atom)),t.remove())}setNodeTimeout(t){if(this.nodeTimeoutBucket.has(t))return;let n=t.atom.idleTTL??this.defaultIdleTTL;if(Rm(this,Ko)!==null&&(n-=Rm(this,Ko),n<=0)){this.nodes.delete(Vf(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(Vf(r.atom)),Mm(this,Ko,r.atom.idleTTL??this.defaultIdleTTL),r.remove(),Mm(this,Ko,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()}}Ko=new WeakMap;var Dc;(function(e){e[e.alive=1]="alive",e[e.initialized=2]="initialized",e[e.waitingForValue=4]="waitingForValue"})(Dc||(Dc={}));var li;(function(e){e[e.uninitialized=5]="uninitialized",e[e.stale=7]="stale",e[e.valid=3]="valid",e[e.removed=0]="removed"})(li||(li={}));let Ice=class{constructor(t,n){g(this,"registry");g(this,"atom");g(this,"state",li.uninitialized);g(this,"lifetime");g(this,"writeContext");g(this,"parents",[]);g(this,"previousParents");g(this,"children",[]);g(this,"listeners",[]);g(this,"skipInvalidation",!1);g(this,"_value");this.registry=t,this.atom=n,this.writeContext=new jce(t,this)}get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.length===0&&this.children.length===0&&this.state!==0}value(){if(this.state&Dc.waitingForValue){this.lifetime=Fce(this);const t=this.atom.read(this.lifetime);if(this.state&Dc.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&Dc.initialized?ee(this._value):K()}setValue(t){if(!(this.state&Dc.initialized)){this.state=li.valid,this._value=t,It.phase===Pi.collect?It.notify.add(this):this.notify();return}this.state=li.valid,!ae(this._value,t)&&(this._value=t,this.skipInvalidation?this.skipInvalidation=!1:this.invalidateChildren(),this.listeners.length>0&&(It.phase===Pi.collect?It.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===li.valid&&(this.state=li.stale,this.disposeLifetime()),It.phase===Pi.collect?It.stale.push(this):this.atom.lazy&&this.listeners.length===0&&!$ce(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]();It.phase===Pi.commit&&It.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=li.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 $ce(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 fn=e=>new Error(`Cannot use context of disposed Atom: ${e}`),Lce={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)throw fn(this.node.atom);this.finalizers??(this.finalizers=[]),this.finalizers.push(e)},get(e){if(this.disposed)throw fn(this.node.atom);const t=this.node.registry.ensureNode(e);return this.node.addParent(t),t.value()},result(e,t){if(this.disposed)throw fn(this.node.atom);if(this.isFn)return this.resultOnce(e,t);const n=this.get(e);if(t!=null&&t.suspendOnWaiting&&n.waiting)return ZS;switch(n._tag){case"Initial":return ZS;case"Failure":return An(n.cause);case"Success":return mt(n.value)}},resultOnce(e,t){if(this.disposed)throw fn(this.node.atom);return J_(n=>{const r=this.once(e);if(r._tag!=="Initial"&&!(t!=null&&t.suspendOnWaiting&&r.waiting))return n(u2(r));const i=this.node.registry.subscribe(e,s=>{s._tag==="Initial"||t!=null&&t.suspendOnWaiting&&s.waiting||(i(),n(u2(s)))},{immediate:!1});return at(i)})},setResult(e,t){if(this.disposed)throw fn(this.node.atom);return this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0})},some(e){if(this.disposed)throw fn(this.node.atom);if(this.isFn)return this.someOnce(e);const t=this.get(e);return t._tag==="None"?ZS:mt(t.value)},someOnce(e){if(this.disposed)throw fn(this.node.atom);return J_(t=>{const n=this.once(e);if(St(n))return t(mt(n.value));const r=this.node.registry.subscribe(e,i=>{Qt(i)||(r(),t(mt(i.value)))},{immediate:!1});return at(r)})},once(e){if(this.disposed)throw fn(this.node.atom);return this.node.registry.get(e)},self(){if(this.disposed)throw fn(this.node.atom);return this.node.valueOption()},refresh(e){if(this.disposed)throw fn(this.node.atom);this.node.registry.refresh(e)},refreshSelf(){if(this.disposed)throw fn(this.node.atom);this.node.invalidate()},mount(e){if(this.disposed)throw fn(this.node.atom);this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){if(this.disposed)throw fn(this.node.atom);this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){if(this.disposed)throw fn(this.node.atom);this.node.setValue(e)},set(e,t){if(this.disposed)throw fn(this.node.atom);this.node.registry.set(e,t)},stream(e,t){if(this.disposed)throw fn(this.node.atom);return O(_y(NP((t==null?void 0:t.bufferSize)??16),Cy),SP(n=>_y(at(()=>this.node.registry.subscribe(e,r=>{wse(n,r)},{immediate:(t==null?void 0:t.withoutInitialValue)!==!0})),r=>at(r))),Je(n=>aoe(n)),I4)},streamResult(e,t){return O(this.stream(e,t),ioe(Tce),soe(n=>n._tag==="Success"?coe(n.value):roe(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]()}},Fce=e=>{function t(n){if(t.disposed)throw fn(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,Lce),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t};class jce{constructor(t,n){g(this,"registry");g(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 Pi;(function(e){e[e.disabled=0]="disabled",e[e.collect=1]="collect",e[e.commit=2]="commit"})(Pi||(Pi={}));const It=pe("@effect-atom/atom/Registry/batchState",()=>({phase:Pi.disabled,depth:0,stale:[],notify:new Set}));function Pce(e){It.phase=Pi.collect,It.depth++;try{if(e(),It.depth===1){for(let t=0;t<It.stale.length;t++)iB(It.stale[t]);It.phase=Pi.commit;for(const t of It.notify)t.notify();It.notify.clear()}}finally{It.depth--,It.depth===0&&(It.phase=Pi.disabled,It.stale=[])}}function iB(e){if(e.state!==li.valid){for(let t=0;t<e.parents.length;t++){const n=e.parents[t];n.state!==li.valid&&iB(n)}e.state!==li.valid&&e.value()}}const Uce=e=>{const t=e;switch(t._tag){case"Failure":case"Success":return t;case"Left":return cy(t.left);case"Right":return mr(t.right);case"Some":return mr(t.value);case"None":return cy(new uf)}},xC=e=>{const t=mv(e);return(n,r,i=!1)=>{const s=Uce(n);if(s){r(s);return}const a=new vE,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(Sr)}return c}},Bce=Dce;class sB extends vk("@effect/atom/Registry/CurrentRegistry")(){}const _1="~effect-atom/atom/Atom",x1="~effect-atom/atom/Atom/Writable",aB=x(2,(e,t)=>{const n=Xr(t),r=uF(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?Yg(n):void 0})}),Th=aB(0),kC={[_1]:_1,pipe(){return re(this,arguments)},toJSON(){return{_id:"Atom",keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}},toString(){return it(this)},[Pe](){return this.toJSON()}},Hce={...kC,atom(e,t){const n=oB(e,t);return Ui(r=>{const i=r.self(),s=r(this);return s._tag!=="Success"?ld(s,i):n(r,s.value)})},fn(e,t){return arguments.length===0?(n,r)=>f2(this,n,r):f2(this,e,t)},pull(e,t){const n=Th(Iy(0)),r=Ui(i=>{const s=i.self(),a=i(this);return a._tag!=="Success"?ld(a,s):$d(i,eue(i,n,e,t),Va(!0),a.value)});return tue(n,r)},subscriptionRef(e){return Jce(Th(Ui(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return ld(r,n);const i=typeof e=="function"?e(t):e;return v1 in i?i:$d(t,i,Va(!0),r.value)})),(t,n)=>{const r=S1(t(this));return m2(t,n,r)})},subscribable(e){return Qce(Ui(t=>{const n=t.self(),r=t(this);if(r._tag!=="Success")return ld(r,n);const i=typeof e=="function"?e(t):e;return tB(i)?i:$d(t,i,Va(!0),r.value)}),(t,n)=>{const r=S1(t(this));return m2(t,n,r)})}},f2=(e,t,n)=>{const[r,i,s]=Wce(n!=null&&n.reactivityKeys?(a,o)=>{const l=t(a,o);return go(l)?$4(l,n.reactivityKeys):D4(l,hoe(n.reactivityKeys))}:t,n);return _m(a=>{a.get(s);const o=a.self(),l=a.get(e);return l._tag!=="Success"?ld(l,o):r(a,l.value)},i)},qce={...kC,[x1]:x1},Vce=e=>x1 in e,Ui=(e,t)=>{const n=Object.create(kC);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},_m=(e,t,n)=>{const r=Object.create(qce);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function Kce(e,t){e.setSelf(t)}const Bl=(e,t)=>{const n=oB(e,t);return _1 in n?n:Ui(n)},d2=e=>R7 in e||_7 in e,oB=(e,t)=>{if(typeof e=="function"&&!go(e)&&!(u0 in e)){const n=e;return function(r,i){const s=n(r);if(bi(s)){if(d2(s))return s;if(Y_ in s)return k1(r,s,t,i);if(u0 in s)return h2(r,s,t,i)}return s}}else if(bi(e)){if(d2(e))return Iy(e);if(Y_ in e)return function(n,r){return k1(n,e,t,r)};if(u0 in e)return function(n,r){return h2(n,e,t,r)}}return Iy(e)},Iy=e=>_m(function(t){return e},Kce),k1=(e,t,n,r)=>{const i=(n==null?void 0:n.initialValue)!==void 0?_l(n.initialValue):Va();return $d(e,t,i,r,n==null?void 0:n.uninterruptible)};function $d(e,t,n,r=pv,i=!1){const s=e.self(),a=Yr(q3());e.addFinalizer(()=>{KE(vy(a,_E))});const o=new Map(r.context.unsafeMap);o.set(Tne.key,a),o.set(sB.key,e.registry);const l=YE({context:u7(o),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags});let c,u=!1;const f=xC(l)(t,function(d){c=nB(d,s),u&&e.setSelf(c)},i);return u=!0,f!==void 0&&e.addFinalizer(f),c!==void 0?c:s._tag==="Some"?_C(s):Rv(n)}const Gce=e=>{let t=f0;function n(i){const s=Object.create(Hce);s.keepAlive=!1,s.lazy=!0,s.refresh=void 0,s.factory=n;const a=bo(Ui(typeof i=="function"?o=>n0(i(o),t):()=>n0(i,t)));return s.layer=a,s.read=function(l){const c=l(a),u=ce(ce(dv,f=>ER(c,e.memoMap,f)),f=>xy(hm(),f));return k1(l,u,{uninterruptible:!0})},s}n.memoMap=e.memoMap,n.addGlobalLayer=i=>{t=n0(t,EP(i,f0))};const r=Th(Bl(gie(i=>ER(f0,e.memoMap,i)).pipe(Je($s(ym)))));return n.withReactivity=i=>s=>nue(s,a=>{const o=S1(a(r));return a.addFinalizer(o.unsafeRegister(i,()=>{a.refresh(s)})),a.subscribe(s,l=>a.setSelf(l)),a.once(s)}),n},Yce=pe("@effect-atom/atom/Atom/defaultMemoMap",()=>Yr(Pie)),EC=pe("@effect-atom/atom/Atom/defaultContext",()=>Gce({memoMap:Yce}));EC.withReactivity;const h2=(e,t,n,r)=>{const i=(n==null?void 0:n.initialValue)!==void 0?_l(n.initialValue):Va();return CC(e,t,i,r)};function CC(e,t,n,r=pv){const i=e.self(),s=vce({onInput(l){return wce(()=>{const c=hK(l);return c._tag==="Some"&&e.setSelf(_l(c.value,{waiting:!0})),s})},onFailure(l){return l2(()=>{e.setSelf(wm(l,{previous:e.self()}))})},onDone(l){return l2(()=>{O(e.self(),Il(rB),Nt({onNone:()=>e.setSelf(Rce(new uf,{previous:e.self()})),onSome:c=>e.setSelf(_l(c))}))})}}),a=YE({context:Ur(r.context,sB,e.registry),fiberRefs:r.fiberRefs,runtimeFlags:r.runtimeFlags}),o=xC(a)(Sce(bce(z4(t),s)),du,!1);return o!==void 0&&e.addFinalizer(o),i._tag==="Some"?_C(i):Rv(n)}const m2=(e,t,n=pv)=>eB in t?(e.addFinalizer(t.changes.pipe(loe(r=>(e.setSelf(r),Fe)),Rie(n))),Oie(n)(t.get)):t._tag!=="Success"?t:CC(e,t.value.changes,Va(!0),n),Jce=(e,t)=>{function n(r,i){const s=r.get(e);v1 in s?Yr(c2(s,i)):Ch(s)&&Yr(c2(s.value,i))}return _m(r=>{const i=r(e);return v1 in i||Ch(i)?t(r,i):i},n)},Qce=(e,t)=>Ui(n=>{const r=n(e);return tB(r)||Ch(r)?t(n,r):r}),Xce=Symbol.for("@effect-atom/atom/Atom/Reset"),v0=Symbol.for("@effect-atom/atom/Atom/Interrupt");function Wce(e,t){const n=Th(Iy([0,void 0])),r=(t==null?void 0:t.initialValue)!==void 0?_l(t.initialValue):Va(),i=t!=null&&t.concurrent?Th(Ui(o=>{const l=new Set;return o.addFinalizer(()=>l.forEach(c=>c.unsafeInterruptAsFork(Sr))),l})):void 0;function s(o,l){const c=i?o(i):void 0;o.isFn=!0;const[u,f]=o.get(n);if(u===0)return r;if(f===v0)return wm(L3(Sr),{previous:o.self()});let d=e(f,o);if(Y_ in d){if(c){const h=d;d=ce(hm(),p=>{const b=mv(p,h);c.add(b);const S=Array.from(c);return b.addObserver(()=>c.delete(b)),Zce(S)})}return $d(o,d,r,l,!1)}return CC(o,d,r,l)}function a(o,l){rue(()=>{l===Xce?o.set(n,[0,void 0]):l===v0?o.set(n,[o.get(n)[0]+1,v0]):o.set(n,[o.get(n)[0]+1,l]),o.refreshSelf()})}return[s,a,n]}const Zce=e=>J_(t=>{let n=0,r,i;function s(o,l=!1){o._tag==="Failure"?r=r?Hte(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?An(r):i||An(Bte))}return a(),at(()=>{n<e.length&&e[n].removeObserver(s)})}),eue=(e,t,n,r)=>ce(_ce(z4(typeof n=="function"?n(e):n)),i=>{const s=xie(1),a=D7(Gne()),o=a.currentContext;let l=Zt();const c=ce(wie(Ot(()=>i),CP,o),Wn({onLeft:()=>{const h=Bn(l);return Uc(h)?mt({done:!0,items:h}):ss(new uf("Atom.pull: no items"))},onRight(h){let p;r!=null&&r.disableAccumulation?p=h:(p=Ut(l,h),l=p);const b=Bn(p);return Uc(b)?mt({done:!1,items:b}):c}})),u=s.withPermits(1)(c),f=xC(YE({context:o,fiberRefs:a.getFiberRefs(),runtimeFlags:pv.runtimeFlags})),d=new Set;return e.addFinalizer(()=>{for(const h of d)h()}),e.once(t),e.subscribe(t,()=>{e.setSelf(_C(e.self()));let h;h=f(u,p=>{h&&d.delete(h);const b=nB(p,e.self()),S=d.size>0;e.setSelf(S?Rv(b):b)}),h&&d.add(h)}),c}),tue=(e,t)=>_m(t.read,function(n,r){n.set(e,n.get(e)+1)}),p2=typeof WeakRef>"u"||typeof FinalizationRegistry>"u"?e=>{const t=z_();return function(n){const r=_s(t,n);if(r._tag==="Some")return r.value;const i=e(n);return Lo(t,n,i),i}}:e=>{const t=z_(),n=new FinalizationRegistry(r=>{pee(t,r)});return function(r){const i=_s(t,r).pipe(TL(a=>a.deref()));if(i._tag==="Some")return i.value;const s=e(r);return Lo(t,r,new WeakRef(s)),n.register(s,r),s}},bo=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),nue=x(2,(e,t)=>Vce(e)?_m(t,function(n,r){n.set(e,r)},e.refresh??function(n){n(e)}):Ui(t,e.refresh??function(n){n(e)})),rue=Pce,g2="~effect-atom/atom/Atom/ServerValue",iue=x(2,(e,t)=>g2 in e?e[g2](n=>t.get(n)):t.get(e)),Qp=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipart"),Xp=Symbol.for("@effect/platform/HttpApiSchema/AnnotationMultipartStream"),Ld=Symbol.for("@effect/platform/HttpApiSchema/AnnotationStatus"),Wp=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEmptyDecodeable"),Zp=Symbol.for("@effect/platform/HttpApiSchema/AnnotationEncoding"),eg=Symbol.for("@effect/platform/HttpApiSchema/AnnotationParam"),lB=e=>{const t={};return Ld in e&&(t[Ld]=e[Ld]),Wp in e&&(t[Wp]=e[Wp]),Zp in e&&(t[Zp]=e[Zp]),eg in e&&(t[eg]=e[eg]),Qp in e&&(t[Qp]=e[Qp]),Xp in e&&(t[Xp]=e[Xp]),t},sue=e=>e._tag==="Transformation"?{...e.to.annotations,...e.annotations}:e.annotations,xm=(e,t)=>sue(e)[t],cB=(e,t)=>xm(e,Ld)??t,aue=e=>xm(e,Wp)??!1,oue=e=>xm(e,Qp),lue=e=>xm(e,Xp),cue={kind:"Json",contentType:"application/json"},Mv=(e,t=cue)=>xm(e,Zp)??t,uue=e=>{var n;return(n=(e._tag==="PropertySignatureTransformation"?e.to.annotations:e.annotations)[eg])==null?void 0:n.name},Nu=e=>{const t=IU(e,"status");return e.status!==void 0&&(t[Ld]=e.status),t},E1=e=>{switch(e._tag){case"VoidKeyword":return!0;case"Transformation":return E1(e.from);case"Suspend":return E1(e.f());default:return!1}},fue=e=>cB(e,E1(e)?204:200),S0=e=>cB(e,500),C1=e=>{function t(r){if(_v(r))for(const i of r.types)t(i);else n.push(r)}const n=[];return t(e),n},uB=(e,t)=>fr.make(Array.from(new Set([...C1(e),...C1(t)]))),Ka=(e,t)=>yt(uB(e.ast,t.ast)),due=e=>Vle.annotations(Nu({status:e})),T1=due(204);class hue extends yce.annotations({identifier:"Issue",description:"Represents an error encountered while parsing a value to match the schema"}){}class $y extends WU()("HttpApiDecodeError",{issues:Zi(hue),message:oe},Nu({status:400,description:"The request did not match the expected schema"})){static fromParseError(t){return Yp.formatError(t).pipe(ky(Dd.formatError(t)),Je(([n,r])=>new $y({issues:n,message:r})))}static refailParseError(t){return ce($y.fromParseError(t),ss)}}const y2=Symbol.for("@effect/platform/HttpApi"),mue={[y2]:y2,pipe(){return re(this,arguments)},add(e){return ca({identifier:this.identifier,groups:U7(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(Qi());r.annotations=nr(e.annotations,r.annotations),r.middlewares=new Set([...e.middlewares,...r.middlewares]),t[n]=r}return ca({identifier:this.identifier,groups:t,errorSchema:Ka(this.errorSchema,e.errorSchema),annotations:this.annotations,middlewares:this.middlewares})},addError(e,t){return ca({identifier:this.identifier,groups:this.groups,errorSchema:Ka(this.errorSchema,t!=null&&t.status?e.annotations(Nu({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return ca({identifier:this.identifier,groups:Ac(this.groups,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return ca({identifier:this.identifier,groups:this.groups,errorSchema:Ka(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return ca({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:Ur(this.annotations,e,t),middlewares:this.middlewares})},annotateContext(e){return ca({identifier:this.identifier,groups:this.groups,errorSchema:this.errorSchema,annotations:nr(this.annotations,e),middlewares:this.middlewares})}},ca=e=>{function t(){}return Object.setPrototypeOf(t,mue),t.groups=e.groups,t.errorSchema=e.errorSchema,t.annotations=e.annotations,t.middlewares=e.middlewares,t},pue=e=>ca({groups:new Map,errorSchema:$y,annotations:Qi(),middlewares:new Set}),gue=(e,t)=>{const n=ap(e.errorSchema.ast,new Map,S0),r=Object.values(e.groups);for(const i of r){const s=ap(i.errorSchema.ast,n,S0),a=nr(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=ap(l.errorSchema.ast,s,S0);t.onEndpoint({group:i,endpoint:l,middleware:new Set([...i.middlewares,...l.middlewares]),mergedAnnotations:nr(a,l.annotations),payloads:l.payloadSchema._tag==="Some"?bue(l.payloadSchema.value.ast):yue,successes:ap(l.successSchema.ast,new Map,fue),errors:c})}}},yue=new Map,ap=(e,t,n)=>{const r=new Map(t);function i(s){if(Voe(s))return;const a=lB(e.annotations);P7(a)||(s=pf(s,{...a,...s.annotations}));const o=n(s),l=aue(s),c=r.get(o);r.set(o,{description:(c?c.description:K()).pipe(qi(()=>vue(s))),ast:(c?c.ast:K()).pipe(Br(u=>uB(u,s)),qi(()=>!l&&Hoe(Ry(s))?K():ee(s)))})}return C1(e).forEach(i),r},bue=e=>{const t=new Map;function n(r){if(r._tag==="NeverKeyword")return;r=pf(r,{...lB(e.annotations),...r.annotations});const i=Mv(r),s=oue(r)||lue(r)?"multipart/form-data":i.contentType,a=t.get(s);a===void 0?t.set(s,{encoding:i,ast:r}):a.ast=fr.make([a.ast,r])}if(e._tag==="Union")for(const r of e.types)n(r);else n(e);return t},vue=e=>{const t="to"in e?{...e.to.annotations,...e.annotations}:e.annotations;return Qu(t[jl]??t[bm])},Hl=e=>{const t=fB(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},fB=e=>{const t=Symbol.iterator in e?Ye(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=fB(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},dB=Zi(Qle(oe,oe)).annotations({identifier:"UrlParams"}),Sue=[],wue=x(2,(e,t)=>{const n=Hl(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}),_ue=x(2,(e,t)=>xk(e,Hl(t))),xue=(e,t,n)=>{try{const r=new URL(e,kue());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),de(r)}catch(r){return me(r)}},hB=e=>new URLSearchParams(e).toString(),kue=()=>{if("location"in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},Eue=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}},Cue=Ul(oe,dB,{decode(e){return Hl(new URLSearchParams(e))},encode(e){return hB(e)}}),Tue=e=>Ul(dB,e,{decode(t){return Eue(t)},encode(t){return Hl(t)}}),Aue=e=>qo(Cue,Tue(e)),tg=Symbol.for("@effect/platform/HttpBody");var $D;class TC{constructor(){g(this,$D);this[tg]=tg}[($D=tg,Pe)](){return this.toJSON()}toString(){return it(this)}}class Oue extends TC{constructor(){super(...arguments);g(this,"_tag","Empty")}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"Empty"}}}const Rue=new Oue;class Mue extends TC{constructor(n,r){super();g(this,"body");g(this,"contentType");g(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 mB=(e,t)=>new Mue(e,t??"application/octet-stream"),Nue=new TextEncoder,pB=(e,t)=>mB(Nue.encode(e),t??"text/plain"),Due=e=>pB(hB(e),"application/x-www-form-urlencoded");class zue extends TC{constructor(n){super();g(this,"formData");g(this,"_tag","FormData");this.formData=n}toJSON(){return{_id:"@effect/platform/HttpBody",_tag:"FormData",formData:this.formData}}}const Iue=e=>new zue(e),$ue=tg,Lue=e=>ue(e,$ue),Fue=mB,b2=pB,jue=Due,v2=Symbol.for("@effect/platform/Cookies"),S2=Symbol.for("@effect/platform/Cookies/Cookie"),Pue={[v2]:v2,..._b,toJSON(){return{_id:"@effect/platform/Cookies",cookies:Ac(this.cookies,e=>e.toJSON())}},pipe(){return re(this,arguments)}},Uue=e=>{const t=Object.create(Pue);return t.cookies=e,t},Bue=e=>{const t={};for(const n of e)t[n.name]=n;return Uue(t)},Hue=e=>{const t=typeof e=="string"?[e]:e,n=[];for(const r of t){const i=que(r.trim());St(i)&&n.push(i.value)}return Bue(n)};function que(e){const t=e.split(";").map(o=>o.trim()).filter(o=>o!=="");if(t.length===0)return K();const n=t[0].indexOf("=");if(n===-1)return K();const r=t[0].slice(0,n);if(!Vue.test(r))return K();const i=t[0].slice(n+1),s=Kue(i);if(t.length===1)return ee(Object.assign(Object.create(w2),{name:r,value:s,valueEncoded:i}));const a={};for(let o=1;o<t.length;o++){const l=t[o],c=l.indexOf("="),u=c===-1?l:l.slice(0,c).trim(),f=c===-1?void 0:l.slice(c+1).trim();switch(u.toLowerCase()){case"domain":{if(f===void 0)break;const d=f.trim().replace(/^\./,"");d&&(a.domain=d);break}case"expires":{if(f===void 0)break;const d=new Date(f);isNaN(d.getTime())||(a.expires=d);break}case"max-age":{if(f===void 0)break;const d=parseInt(f,10);isNaN(d)||(a.maxAge=fF(d));break}case"path":{if(f===void 0)break;f[0]==="/"&&(a.path=f);break}case"priority":{if(f===void 0)break;switch(f.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(f===void 0)break;switch(f.toLowerCase()){case"lax":a.sameSite="lax";break;case"strict":a.sameSite="strict";break;case"none":a.sameSite="none";break}break}}}return ee(Object.assign(Object.create(w2),{name:r,value:s,valueEncoded:i,options:Object.keys(a).length>0?a:void 0}))}const Vue=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,w2={[S2]:S2,..._b,toJSON(){return{_id:"@effect/platform/Cookies/Cookie",name:this.name,value:this.value,options:this.options}}},Kue=e=>{try{return decodeURIComponent(e)}catch{return e}},_2=Symbol.for("@effect/platform/Headers"),Ah=Object.assign(Object.create(null),{[_2]:_2,[xb](e){return O1(this,Oj(e,yB))}}),Nv=e=>Object.assign(Object.create(Ah),e),gB=Object.create(Ah),AC=e=>{if(e===void 0)return gB;if(Symbol.iterator in e){const n=Object.create(Ah);for(const[r,i]of e)n[r.toLowerCase()]=i;return n}const t=Object.create(Ah);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},Gue=e=>Object.setPrototypeOf(e,Ah),A1=x(3,(e,t,n)=>{const r=Nv(e);return r[t.toLowerCase()]=n,r}),Yue=x(2,(e,t)=>Nv({...e,...AC(t)})),Jue=x(2,(e,t)=>{const n=Nv(e);return Object.assign(n,t),n}),Que=x(2,(e,t)=>{const n=Nv(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}),O1=x(2,(e,t)=>{const n={...e},r=i=>{if(typeof i=="string"){const s=i.toLowerCase();s in e&&(n[s]=e2(e[s]))}else for(const s in e)i.test(s)&&(n[s]=e2(e[s]))};if(Array.isArray(t))for(let i=0;i<t.length;i++)r(t[i]);else r(t);return n}),yB=pe("@effect/platform/Headers/currentRedactedNames",()=>JE(["authorization","cookie","set-cookie","x-api-key"])),Xue=Symbol.for("@effect/platform/HttpClientError"),bB=Xue;class vB extends ZU(bB,"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 Ss extends ZU(bB,"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 Fd=Symbol.for("@effect/platform/HttpIncomingMessage"),Wue=(e,t)=>{const n=e.headers["content-type"]??"";let r;if(n.includes("application/json"))try{r=Yr(e.json)}catch{}else if(n.includes("text/")||n.includes("urlencoded"))try{r=Yr(e.text)}catch{}const i={...t,headers:hk(e.headers),remoteAddress:e.remoteAddress.toJSON()};return r!==void 0&&(i.body=r),i},Zue=e=>Gue({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"}`}),x2=Symbol.for("@effect/platform/HttpClientRequest"),efe={[x2]:x2,..._b,toJSON(){return{_id:"@effect/platform/HttpClientRequest",method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:hk(this.headers),body:this.body.toJSON()}},pipe(){return re(this,arguments)}};function _i(e,t,n,r,i,s){const a=Object.create(efe);return a.method=e,a.url=t,a.urlParams=n,a.hash=r,a.headers=i,a.body=s,a}const tfe=_i("GET","",Sue,K(),gB,Rue),vo=e=>(t,n)=>cfe(tfe,{method:e,url:t,...n??void 0}),nfe=vo("GET"),rfe=vo("POST"),ife=vo("PUT"),sfe=vo("PATCH"),afe=vo("DELETE"),ofe=vo("HEAD"),lfe=vo("OPTIONS"),cfe=x(2,(e,t)=>{let n=e;return t.method&&(n=dfe(n,t.method)),t.url&&(n=wB(n,t.url)),t.headers&&(n=OC(n,t.headers)),t.urlParams&&(n=_B(n,t.urlParams)),t.hash&&(n=pfe(n,t.hash)),t.body&&(n=RC(n,t.body)),t.accept&&(n=SB(n,t.accept)),t.acceptJson&&(n=ffe(n)),n}),ufe=x(3,(e,t,n)=>_i(e.method,e.url,e.urlParams,e.hash,A1(e.headers,t,n),e.body)),OC=x(2,(e,t)=>_i(e.method,e.url,e.urlParams,e.hash,Yue(e.headers,t),e.body)),SB=x(2,(e,t)=>ufe(e,"Accept",t)),ffe=SB("application/json"),dfe=x(2,(e,t)=>_i(t,e.url,e.urlParams,e.hash,e.headers,e.body)),wB=x(2,(e,t)=>{if(typeof t=="string")return _i(e.method,t,e.urlParams,e.hash,e.headers,e.body);const n=new URL(t.toString()),r=Hl(n.searchParams),i=n.hash?ee(n.hash.slice(1)):K();return n.search="",n.hash="",_i(e.method,n.toString(),r,i,e.headers,e.body)}),hfe=x(2,(e,t)=>_i(e.method,t.endsWith("/")&&e.url.startsWith("/")?t+e.url.slice(1):t+e.url,e.urlParams,e.hash,e.headers,e.body)),mfe=x(2,(e,t)=>_i(e.method,e.url,_ue(e.urlParams,t),e.hash,e.headers,e.body)),_B=x(2,(e,t)=>_i(e.method,e.url,wue(e.urlParams,t),e.hash,e.headers,e.body)),pfe=x(2,(e,t)=>_i(e.method,e.url,e.urlParams,ee(t),e.headers,e.body)),RC=x(2,(e,t)=>{let n=e.headers;if(t._tag==="Empty"||t._tag==="FormData")n=Que(n,["Content-type","Content-length"]);else{const r=t.contentType;r&&(n=A1(n,"content-type",r));const i=t.contentLength;i&&(n=A1(n,"content-length",i.toString()))}return _i(e.method,e.url,e.urlParams,e.hash,n,t)}),gfe=x(2,(e,t)=>RC(e,Iue(t))),jd=Symbol.for("@effect/platform/HttpClientResponse"),yfe=(e,t)=>new bfe(e,t);var LD,FD,jD;class bfe extends(jD=MV,FD=Fd,LD=jd,jD){constructor(n,r){super();g(this,"request");g(this,"source");g(this,FD);g(this,LD);g(this,"cachedCookies");g(this,"textBody");g(this,"formDataBody");g(this,"arrayBufferBody");this.request=n,this.source=r,this[Fd]=Fd,this[jd]=jd}toJSON(){return Wue(this,{_id:"@effect/platform/HttpClientResponse",request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return AC(this.source.headers)}get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=Hue(this.source.headers.getSetCookie())}get remoteAddress(){return K()}get stream(){return this.source.body?ooe(()=>this.source.body,n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})):noe(new Ss({request:this.request,response:this,reason:"EmptyBody",description:"can not create stream from empty body"}))}get json(){return die(this.text,{try:n=>n===""?null:JSON.parse(n),catch:n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})})}get text(){return this.textBody??(this.textBody=Rd({try:()=>this.source.text(),catch:n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(WS,Yr))}get urlParamsBody(){return ce(this.text,n=>fie({try:()=>Hl(new URLSearchParams(n)),catch:r=>new Ss({request:this.request,response:this,reason:"Decode",cause:r})}))}get formData(){return this.formDataBody??(this.formDataBody=Rd({try:()=>this.source.formData(),catch:n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(WS,Yr))}get arrayBuffer(){return this.arrayBufferBody??(this.arrayBufferBody=Rd({try:()=>this.source.arrayBuffer(),catch:n=>new Ss({request:this.request,response:this,reason:"Decode",cause:n})}).pipe(WS,Yr))}}const vfe=x(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)}),Sfe=e=>`http.request.header.${e}`,wfe="http.request.method",_fe=e=>`http.response.header.${e}`,xfe="http.response.status_code",kfe="server.address",Efe="server.port",Cfe="url.full",Tfe="url.path",Afe="url.scheme",Ofe="url.query",k2=Symbol.for("@effect/platform/HttpClient"),MC=mo("@effect/platform/HttpClient"),Rfe=pe(Symbol.for("@effect/platform/HttpClient/tracerDisabledWhen"),()=>JE($a)),Mfe=pe(Symbol.for("@effect/platform/HttpClient/currentTracerPropagation"),()=>JE(!0)),Nfe=Ju()("@effect/platform/HttpClient/SpanNameGenerator",{defaultValue:()=>e=>`http.client ${e.method}`}),Dfe={[k2]:k2,pipe(){return re(this,arguments)},..._b,toJSON(){return{_id:"@effect/platform/HttpClient"}},get(e,t){return this.execute(nfe(e,t))},head(e,t){return this.execute(ofe(e,t))},post(e,t){return this.execute(rfe(e,t))},put(e,t){return this.execute(ife(e,t))},patch(e,t){return this.execute(sfe(e,t))},del(e,t){return this.execute(afe(e,t))},options(e,t){return this.execute(lfe(e,t))}},NC=(e,t)=>{const n=Object.create(Dfe);return n.preprocess=t,n.postprocess=e,n.execute=function(r){return e(t(r))},n},Ly=pe("@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))}}}),zfe=pe("@effect/platform/HttpClient/scopedRequests",()=>new WeakMap),Ife=e=>NC(t=>ce(t,n=>Sy(r=>{const i=zfe.get(n),s=i??new AbortController,a=xue(n.url,n.urlParams,n.hash);if(a._tag==="Left")return ss(new vB({request:n,reason:"InvalidUrl",cause:a.left}));const o=a.right;if(!r.getFiberRef(Uie)||r.getFiberRef(Rfe)(n)){const u=e(n,o,s.signal,r);return i?u:wy(f=>fi(f(u),{onSuccess(d){return Ly.register(d,s),mt(new E2(d,s))},onFailure(d){return py(d)&&s.abort(),pi(d)}}))}const c=$s(r.currentContext,Nfe);return Tie(c(n),{kind:"client",captureStackTrace:!1},u=>{u.attribute(wfe,n.method),u.attribute(kfe,o.origin),o.port!==""&&u.attribute(Efe,+o.port),u.attribute(Cfe,o.toString()),u.attribute(Tfe,o.pathname),u.attribute(Afe,o.protocol.slice(0,-1));const f=o.search.slice(1);f!==""&&u.attribute(Ofe,f);const d=r.getFiberRef(yB),h=O1(n.headers,d);for(const p in h)u.attribute(Sfe(p),String(h[p]));return n=r.getFiberRef(Mfe)?OC(n,Zue(u)):n,wy(p=>p(e(n,o,s.signal,r)).pipe(Aie(u),fi({onSuccess:b=>{u.attribute(xfe,b.status);const S=O1(b.headers,d);for(const m in S)u.attribute(_fe(m),String(S[m]));return i?mt(b):(Ly.register(b,s),mt(new E2(b,s)))},onFailure(b){return!i&&py(b)&&s.abort(),pi(b)}})))})})),mt);var PD,UD;class E2{constructor(t,n){g(this,"original");g(this,"controller");g(this,UD,jd);g(this,PD,Fd);this.original=t,this.controller=n}applyInterrupt(t){return Ot(()=>(Ly.unregister(this.original),hie(t,()=>at(()=>{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 uoe(()=>(Ly.unregister(this.original),D4(this.original.stream,at(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[(UD=jd,PD=Fd,Pe)](){return this.original[Pe]()}}const{del:nEe,execute:rEe,get:iEe,head:sEe,options:aEe,patch:oEe,post:lEe,put:cEe}=vie(MC),$fe=x(2,(e,t)=>{const n=e;return NC(r=>t(n.postprocess(r)),n.preprocess)}),Lfe=x(2,(e,t)=>{const n=e;return NC(n.postprocess,r=>Je(n.preprocess(r),t))}),Ffe=e=>jie(MC,ce(gP(),t=>Je(e,n=>$fe(n,yP(r=>nr(t,r)))))),jfe=MC,Pfe=Lfe,Ufe=vo,Bfe=OC,Hfe=wB,qfe=hfe,Vfe=_B,Kfe=mfe,Gfe=RC,Yfe=gfe,Jfe=vfe,C2=e=>e!=="GET"&&e!=="HEAD"&&e!=="OPTIONS",Qfe=(e,t)=>Gc(function*(){const n=yield*gP(),r=t.httpClient.pipe((t==null?void 0:t.baseUrl)===void 0?ge:Pfe(qfe(t.baseUrl.toString())));gue(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=ede(s.path),c={orElse:ide},u=Jfe(c);a.forEach(({ast:S},m)=>{if(S._tag==="None"){c[m]=sde;return}const y=T2(S.value);c[m]=v=>ce(y(v),ss)}),o.forEach(({ast:S},m)=>{c[m]=S._tag==="None"?ade:T2(S.value)});const f=s.pathSchema.pipe(Br(Bf)),d=s.payloadSchema.pipe(Br(S=>C2(s.method)?Bf(lde(S)):Bf(S))),h=s.headersSchema.pipe(Br(Bf)),p=s.urlParamsSchema.pipe(Br(Bf)),b=_P(function*(S){let m=Ufe(s.method)(s.path);if(S&&S.path){const _=f._tag==="Some"?yield*f.value(S.path):S.path;m=Hfe(m,l(_))}if(S&&S.payload instanceof FormData)m=Yfe(m,S.payload);else if(d._tag==="Some")if(C2(s.method)){const _=yield*d.value(S.payload);m=Gfe(m,_)}else{const _=yield*d.value(S.payload);m=Vfe(m,_)}h._tag==="Some"&&(m=Bfe(m,yield*h.value(S.headers))),p._tag==="Some"&&(m=Kfe(m,yield*p.value(S.urlParams)));const y=yield*r.execute(m),v=yield*t.transformResponse===void 0?u(y):t.transformResponse(u(y));return(S==null?void 0:S.withResponse)===!0?[v,y]:v},yP(S=>nr(n,S)));t.onEndpoint({...i,endpointFn:b})}})}),Xfe=(e,t)=>ce(jfe,n=>Wfe(e,{...t,httpClient:t!=null&&t.transformClient?t.transformClient(n):n})),Wfe=(e,t)=>{const n={};return Qfe(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(Je(()=>n))},Zfe=/:(\w+)\??/g,ede=e=>{const t=e.split(Zfe),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}},T2=e=>{const t=Mv(e),n=Ple(xB(e,t));return r=>ce(r.arrayBuffer,n)},tde=Ul(kv,lce,{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)}}),R1=Ul(kv,oe,{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)}}),nde=wl(oe,kv,{strict:!0,decode:(e,t,n)=>e===""?Zn(void 0):My({try:()=>JSON.parse(e),catch:()=>new Sn(n,e,"Could not parse JSON")}),encode:(e,t,n)=>e===void 0?Zn(""):My({try:()=>JSON.stringify(e),catch:()=>new Sn(n,e,"Could not encode as JSON")})}),rde=qo(R1,nde),xB=(e,t)=>{if(e._tag==="Union")return Ev(...e.types.map(r=>xB(r,Mv(r,t))));const n=yt(e);switch(t.kind){case"Json":return qo(rde,n);case"UrlParams":return qo(R1,Aue(n));case"Uint8Array":return qo(tde,n);case"Text":return qo(R1,n)}},ide=e=>ss(new Ss({reason:"Decode",request:e.request,response:e})),sde=e=>ss(new Ss({reason:"StatusCode",request:e.request,response:e})),ade=e=>Fe,ode=vm(Lue),lde=e=>{const t=e.ast._tag==="Union"?e.ast.types:[e.ast];return Ev(...t.map(cde))},w0=pe("@effect/platform/HttpApiClient/bodyFromPayloadCache",()=>new WeakMap),cde=e=>{if(w0.has(e))return w0.get(e);const t=yt(e),n=Mv(e),r=wl(ode,t,{decode(i,s,a){return Ca(new h1(a,i,"encode only schema"))},encode(i,s,a){switch(n.kind){case"Json":try{return Zn(b2(JSON.stringify(i),n.contentType))}catch{return Ca(new Sn(a,i,"Could not encode as JSON"))}case"Text":return typeof i!="string"?Ca(new Sn(a,i,"Expected a string")):Zn(b2(i,n.contentType));case"UrlParams":return Zn(jue(Hl(i)));case"Uint8Array":return i instanceof Uint8Array?Zn(Fue(i,n.contentType)):Ca(new Sn(a,i,"Expected a Uint8Array"))}}});return w0.set(e,r),r},ude=e=>{if(Array.isArray(e))return gR(e);const t=Object.create(wre.prototype);for(const n in e){const r=e[n];Array.isArray(r)&&(t[n]=gR(r))}return t},fde=()=>(e,t)=>{const n=vk(e)();n.layer=kP(n,Xfe(t.api,t)).pipe(EP(t.httpClient)),n.runtime=EC(n.layer);const r=p2(({endpoint:s,group:a,withResponse:o})=>n.runtime.fn()(_P(function*(l){const u=(yield*n)[a][s]({...l,withResponse:o});return yield*l.reactivityKeys?$4(u,l.reactivityKeys):u})));n.mutation=(s,a,o)=>r(new dde({group:s,endpoint:a,withResponse:(o==null?void 0:o.withResponse)??!1}));const i=p2(s=>{let a=n.runtime.atom(ce(n,o=>o[s.group][s.endpoint](s)));return s.timeToLive&&(a=uF(s.timeToLive)?aB(a,s.timeToLive):bo(a)),s.reactivityKeys?n.runtime.factory.withReactivity(s.reactivityKeys)(a):a});return n.query=(s,a,o)=>i(new hde({group:s,endpoint:a,path:o.path&&tp(o.path),urlParams:o.urlParams&&tp(o.urlParams),payload:o.payload&&tp(o.payload),headers:o.headers&&tp(o.headers),withResponse:o.withResponse??!1,reactivityKeys:o.reactivityKeys?ude(o.reactivityKeys):void 0,timeToLive:o.timeToLive?Xr(o.timeToLive):void 0})),n};class dde extends $E{[ve](t){return this.group===t.group&&this.endpoint===t.endpoint&&this.withResponse===t.withResponse}[be](){return O(ht(`${this.group}/${this.endpoint}/${this.withResponse}`),tt(this))}}class hde extends $E{[ve](t){return this.group===t.group&&this.endpoint===t.endpoint&&ae(this.path,t.path)&&ae(this.urlParams,t.urlParams)&&ae(this.payload,t.payload)&&ae(this.headers,t.headers)&&ae(this.withResponse,t.withResponse)&&ae(this.reactivityKeys,t.reactivityKeys)&&ae(this.timeToLive,t.timeToLive)}[be](){return O(ht(`${this.group}/${this.endpoint}`),Se(ne(this.path)),Se(ne(this.urlParams)),Se(ne(this.payload)),Se(ne(this.headers)),Se(ne(this.withResponse)),Se(ne(this.reactivityKeys)),Se(ne(this.timeToLive)),tt(this))}}const mde=Symbol.for("@effect/matcher/Matcher"),pde={[mde]:{_input:ge,_filters:ge,_remaining:ge,_result:ge,_provided:ge,_return:ge},_tag:"ValueMatcher",add(e){return this.value._tag==="Right"?this:e._tag==="When"&&e.guard(this.provided)===!0?M1(this.provided,de(e.evaluate(this.provided))):e._tag==="Not"&&e.guard(this.provided)===!1?M1(this.provided,de(e.evaluate(this.provided))):this},pipe(){return re(this,arguments)}};function M1(e,t){const n=Object.create(pde);return n.provided=e,n.value=t,n}const gde=(e,t)=>({_tag:"When",guard:e,evaluate:t}),N1=e=>{if(typeof e=="function")return e;if(Array.isArray(e)){const t=e.map(N1),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,N1(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},yde=e=>M1(e,me(e)),bde=(e,t)=>n=>n.add(gde(N1(e),t)),vde=e=>t=>{const n=Sde(t);return SL(n)?n._tag==="Right"?n.right:e(n.left):r=>{const i=n(r);return i._tag==="Right"?i.right:e(i.left)}},Sde=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?de(n.evaluate(r)):me(r)}return n=>{for(let r=0;r<t;r++){const i=e.cases[r];if(i._tag==="When"&&i.guard(n)===!0)return de(i.evaluate(n));if(i._tag==="Not"&&i.guard(n)===!1)return de(i.evaluate(n))}return me(n)}},wde=yde,_0=bde,_de=vde;function xde(e){nw.unstable_scheduleCallback(nw.unstable_LowPriority,e)}const kB=w.createContext(Bce({scheduleTask:xde,defaultIdleTTL:400})),A2=pe("@effect-atom/atom-react/storeRegistry",()=>new WeakMap);function kde(e,t){let n=A2.get(e);n===void 0&&(n=new WeakMap,A2.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 iue(t,e)}};return n.set(t,i),i}function Ede(e,t){const n=kde(e,t);return w.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}const Yi=(e,t)=>{const n=w.useContext(kB);return Ede(n,e)};function Cde(e,t){w.useEffect(()=>e.mount(t),[t,e])}function Tde(e,t,n){return w.useCallback(r=>{e.set(t,typeof r=="function"?r(e.get(t)):r)},[e,t])}const qr=(e,t)=>{const n=w.useContext(kB);return Cde(n,e),Tde(n,e)},Ade="@effect/platform/FetchHttpClient/Fetch",Ode="@effect/platform/FetchHttpClient/FetchOptions",Rde=Ife((e,t,n,r)=>{const i=r.getFiberRef(CP),s=i.unsafeMap.get(Ade)??globalThis.fetch,a=i.unsafeMap.get(Ode)??{},o=a.headers?Jue(AC(a.headers),e.headers):e.headers,l=c=>Je(Rd({try:()=>s(t,{...a,method:e.method,headers:o,body:c,duplex:e.body._tag==="Stream"?"half":void 0,signal:n}),catch:u=>new vB({request:e,reason:"Transport",cause:u})}),u=>yfe(e,u));switch(e.body._tag){case"Raw":case"Uint8Array":return l(e.body.body);case"FormData":return l(e.body.formData);case"Stream":return ce(foe(e.body.stream),l)}return l(void 0)}),Mde=Ffe(mt(Rde)),Nde=Mde,Dde=e=>e.endsWith("/")?e.slice(0,-1):e,zde=x(2,(e,t)=>(t=Dde(t),e==="/"?t:t+e)),Ide=zde,O2=Symbol.for("@effect/platform/HttpApiEndpoint"),$de={[O2]:O2,pipe(){return re(this,arguments)},addSuccess(e,t){return e=t!=null&&t.status?e.annotations(Nu({status:t.status})):e,Mr({...this,successSchema:this.successSchema===T1?e:Ka(this.successSchema,e)})},addError(e,t){return Mr({...this,errorSchema:Ka(this.errorSchema,t!=null&&t.status?e.annotations(Nu({status:t.status})):e)})},setPayload(e){return Mr({...this,payloadSchema:ee(e)})},setPath(e){return Mr({...this,pathSchema:ee(e)})},setUrlParams(e){return Mr({...this,urlParamsSchema:ee(e)})},setHeaders(e){return Mr({...this,headersSchema:ee(e)})},prefix(e){return Mr({...this,path:Ide(this.path,e)})},middleware(e){return Mr({...this,errorSchema:Ka(this.errorSchema,e.failure),middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return Mr({...this,annotations:Ur(this.annotations,e,t)})},annotateContext(e){return Mr({...this,annotations:nr(this.annotations,e)})}},Mr=e=>Object.assign(Object.create($de),e),EB=e=>(t,...n)=>n.length===1?Mr({name:t,path:n[0],method:e,pathSchema:K(),urlParamsSchema:K(),payloadSchema:K(),headersSchema:K(),successSchema:T1,errorSchema:kh,annotations:Qi(),middlewares:new Set}):(r,...i)=>{let s=r[0].replace(":","::"),a=K();if(i.length>0){const o={};for(let l=0;l<i.length;l++){const c=i[l],u=uue(c.ast)??String(l),f=c.ast._tag==="PropertySignatureTransformation"&&c.ast.from.isOptional||c.ast._tag==="PropertySignatureDeclaration"&&c.ast.isOptional;o[u]=c,s+=`:${u}${f?"?":""}${r[l+1].replace(":","::")}`}a=ee(un(o))}return Mr({name:t,path:s,method:e,pathSchema:a,urlParamsSchema:K(),payloadSchema:K(),headersSchema:K(),successSchema:T1,errorSchema:kh,annotations:Qi(),middlewares:new Set})},Dv=EB("GET"),x0=EB("POST"),R2=Symbol.for("@effect/platform/HttpApiGroup"),Lde={[R2]:R2,add(e){return Ri({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 Ri({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:Ka(this.errorSchema,t!=null&&t.status?e.annotations(Nu({status:t.status})):e),annotations:this.annotations,middlewares:this.middlewares})},prefix(e){return Ri({identifier:this.identifier,topLevel:this.topLevel,endpoints:Ac(this.endpoints,t=>t.prefix(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},middleware(e){return Ri({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:Ka(this.errorSchema,e.failure),annotations:this.annotations,middlewares:new Set([...this.middlewares,e])})},middlewareEndpoints(e){return Ri({identifier:this.identifier,topLevel:this.topLevel,endpoints:Ac(this.endpoints,t=>t.middleware(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateContext(e){return Ri({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:nr(this.annotations,e),middlewares:this.middlewares})},annotate(e,t){return Ri({identifier:this.identifier,topLevel:this.topLevel,endpoints:this.endpoints,errorSchema:this.errorSchema,annotations:Ur(this.annotations,e,t),middlewares:this.middlewares})},annotateEndpointsContext(e){return Ri({identifier:this.identifier,topLevel:this.topLevel,endpoints:Ac(this.endpoints,t=>t.annotateContext(e)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},annotateEndpoints(e,t){return Ri({identifier:this.identifier,topLevel:this.topLevel,endpoints:Ac(this.endpoints,n=>n.annotate(e,t)),errorSchema:this.errorSchema,annotations:this.annotations,middlewares:this.middlewares})},pipe(){return re(this,arguments)}},Ri=e=>{function t(){}return Object.setPrototypeOf(t,Lde),Object.assign(t,e)},zv=(e,t)=>Ri({identifier:e,topLevel:!1,endpoints:j7(),errorSchema:kh,annotations:Qi(),middlewares:new Set}),Fde=oe.pipe(Sm("PullRequestId")),jde=oe.pipe(Sm("RepositoryName")),Pde=oe.pipe(Sm("AwsProfileName")),Ude=oe.pipe(Sm("AwsRegion")),M2=oe.pipe(Sm("CommentId")),Bde=Pl("OPEN","CLOSED"),Hde=Pl("error","info","warning","success"),qde=Pl("idle","loading","error");class DC extends Av("Account")({id:Pde,region:Ude}){}class Vde extends Av("PullRequest")({id:Fde,title:oe,description:mi(oe),author:oe,repositoryName:jde,creationDate:Eh,lastModifiedDate:Eh,link:oe,account:DC,status:Bde,sourceBranch:oe,destinationBranch:oe,isMergeable:so,isApproved:so}){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 uEe extends Av("PRComment")({id:M2,content:oe,author:oe,creationDate:Eh,inReplyTo:mi(M2),deleted:so,filePath:mi(oe),lineNumber:mi(LU)}){}class fEe extends Av("NotificationItem")({type:Hde,title:oe,message:oe,timestamp:Eh}){}class N2 extends WU()("ApiError",{message:oe}){}class Kde extends zv("prs").add(Dv("list","/").addSuccess(QU(Vde))).add(x0("refresh","/refresh").addSuccess(oe)).add(x0("create","/").setPayload(un({repositoryName:oe,title:oe,description:mi(oe),sourceBranch:oe,destinationBranch:oe,account:DC})).addSuccess(oe).addError(N2)).add(x0("open","/open").setPayload(un({profile:oe,link:oe})).addSuccess(oe).addError(N2)).prefix("/api/prs"){}class Gde extends zv("events").add(Dv("stream","/").addSuccess(oe)).prefix("/api/events"){}const Yde=un({accounts:Zi(un({profile:oe,regions:Zi(oe),enabled:so})),autoDetect:so,currentUser:mi(oe)});class Jde extends zv("config").add(Dv("list","/").addSuccess(Yde)).prefix("/api/config"){}class Qde extends zv("accounts").add(Dv("list","/").addSuccess(QU(DC))).prefix("/api/accounts"){}class Xde extends pue().add(Kde).add(Gde).add(Jde).add(Qde){}class yf extends fde()("ApiClient",{api:Xde,baseUrl:"/",httpClient:Nde}){}EC(yf.layer);const Wde={pullRequests:[],accounts:[],status:"idle"};yf.query("prs","list",{reactivityKeys:["prs"],timeToLive:"30 seconds"});yf.query("config","list",{reactivityKeys:["config"],timeToLive:"60 seconds"});yf.query("accounts","list",{reactivityKeys:["accounts"],timeToLive:"60 seconds"});const CB=yf.mutation("prs","refresh"),Zde=yf.mutation("prs","open"),Iv=Bl(Wde).pipe(bo),$v=Bl("prs").pipe(bo),D1=Bl("").pipe(bo),TB=Bl(null).pipe(bo),Fy=Bl({type:"all"}).pipe(bo),D2=Bl(!1).pipe(bo),ehe=un({id:oe,title:oe,description:mi(oe),author:oe,repositoryName:oe,creationDate:b1,lastModifiedDate:b1,link:oe,account:un({id:oe,region:oe}),status:Pl("OPEN","CLOSED"),sourceBranch:oe,destinationBranch:oe,isMergeable:so,isApproved:so}),the=un({pullRequests:Zi(ehe),accounts:Zi(un({profile:oe,region:oe,enabled:so})),status:qde,statusDetail:mi(oe),error:mi(oe),lastUpdated:mi(b1),currentUser:mi(oe)}),nhe=_le(JU(the));function rhe(e){const t=w.useRef(e);t.current=e,w.useEffect(()=>{const n=new EventSource("/api/events/");return n.onmessage=r=>{try{t.current(nhe(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 AB=(...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 ihe=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 she=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 z2=e=>{const t=she(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 ahe={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 ohe=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 lhe=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,...ahe,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:AB("lucide",i),...!s&&!ohe(o)&&{"aria-hidden":"true"},...o},[...a.map(([c,u])=>w.createElement(c,u)),...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 Tr=(e,t)=>{const n=w.forwardRef(({className:r,...i},s)=>w.createElement(lhe,{ref:s,iconNode:t,className:AB(`lucide-${ihe(z2(e))}`,`lucide-${e}`,r),...i}));return n.displayName=z2(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 che=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],uhe=Tr("arrow-left",che);/**
|
|
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 fhe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],dhe=Tr("arrow-right",fhe);/**
|
|
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 hhe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],mhe=Tr("check",hhe);/**
|
|
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 phe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],OB=Tr("chevron-down",phe);/**
|
|
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 ghe=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],yhe=Tr("chevron-up",ghe);/**
|
|
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 bhe=[["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"}]],vhe=Tr("external-link",bhe);/**
|
|
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 She=[["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"}]],I2=Tr("funnel",She);/**
|
|
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 whe=[["polyline",{points:"22 12 16 12 14 15 10 15 8 12 2 12",key:"o97t9d"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}]],_he=Tr("inbox",whe);/**
|
|
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 xhe=[["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"}]],khe=Tr("moon",xhe);/**
|
|
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 Ehe=[["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"}]],RB=Tr("refresh-cw",Ehe);/**
|
|
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 Che=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],MB=Tr("search",Che);/**
|
|
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 The=[["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"}]],Ahe=Tr("sun",The);/**
|
|
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 Ohe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],NB=Tr("x",Ohe);var $2=1,Rhe=.9,Mhe=.8,Nhe=.17,k0=.1,E0=.999,Dhe=.9999,zhe=.99,Ihe=/[\\\/_+.#"@\[\(\{&]/,$he=/[\\\/_+.#"@\[\(\{&]/g,Lhe=/[\s-]/,DB=/[\s-]/g;function z1(e,t,n,r,i,s,a){if(s===t.length)return i===e.length?$2:zhe;var o=`${i},${s}`;if(a[o]!==void 0)return a[o];for(var l=r.charAt(s),c=n.indexOf(l,i),u=0,f,d,h,p;c>=0;)f=z1(e,t,n,r,c+1,s+1,a),f>u&&(c===i?f*=$2:Ihe.test(e.charAt(c-1))?(f*=Mhe,h=e.slice(i,c-1).match($he),h&&i>0&&(f*=Math.pow(E0,h.length))):Lhe.test(e.charAt(c-1))?(f*=Rhe,p=e.slice(i,c-1).match(DB),p&&i>0&&(f*=Math.pow(E0,p.length))):(f*=Nhe,i>0&&(f*=Math.pow(E0,c-i))),e.charAt(c)!==t.charAt(s)&&(f*=Dhe)),(f<k0&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(d=z1(e,t,n,r,c+1,s+2,a),d*k0>f&&(f=d*k0)),f>u&&(u=f),c=n.indexOf(l,c+1);return a[o]=u,u}function L2(e){return e.toLowerCase().replace(DB," ")}function Fhe(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,z1(e,t,L2(e),L2(t),0,0,{})}function He(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 F2(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function ao(...e){return t=>{let n=!1;const r=e.map(i=>{const s=F2(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():F2(e[i],null)}}}}function Ct(...e){return w.useCallback(ao(...e),e)}function jhe(e,t){const n=w.createContext(t),r=s=>{const{children:a,...o}=s,l=w.useMemo(()=>o,Object.values(o));return k.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 bf(e,t=[]){let n=[];function r(s,a){const o=w.createContext(a),l=n.length;n=[...n,a];const c=f=>{var m;const{scope:d,children:h,...p}=f,b=((m=d==null?void 0:d[e])==null?void 0:m[l])||o,S=w.useMemo(()=>p,Object.values(p));return k.jsx(b.Provider,{value:S,children:h})};c.displayName=s+"Provider";function u(f,d){var b;const h=((b=d==null?void 0:d[e])==null?void 0:b[l])||o,p=w.useContext(h);if(p)return p;if(a!==void 0)return a;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}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,Phe(i,...t)]}function Phe(...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 f=l(s)[`__scope${c}`];return{...o,...f}},{});return w.useMemo(()=>({[`__scope${t.scopeName}`]:a}),[a])}};return n.scopeName=t.scopeName,n}var Mn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{},Uhe=dx[" useId ".trim().toString()]||(()=>{}),Bhe=0;function _r(e){const[t,n]=w.useState(Uhe());return Mn(()=>{n(r=>r??String(Bhe++))},[e]),e||(t?`radix-${t}`:"")}var Hhe=dx[" useInsertionEffect ".trim().toString()]||Mn;function xl({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[i,s,a]=qhe({defaultProp:t,onChange:n}),o=e!==void 0,l=o?e:i;{const u=w.useRef(e!==void 0);w.useEffect(()=>{const f=u.current;f!==o&&console.warn(`${r} is changing from ${f?"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.`),u.current=o},[o,r])}const c=w.useCallback(u=>{var f;if(o){const d=Vhe(u)?u(e):u;d!==e&&((f=a.current)==null||f.call(a,d))}else s(u)},[o,e,s,a]);return[l,c]}function qhe({defaultProp:e,onChange:t}){const[n,r]=w.useState(e),i=w.useRef(n),s=w.useRef(t);return Hhe(()=>{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 Vhe(e){return typeof e=="function"}function Du(e){const t=Khe(e),n=w.forwardRef((r,i)=>{const{children:s,...a}=r,o=w.Children.toArray(s),l=o.find(Yhe);if(l){const c=l.props.children,u=o.map(f=>f===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:f);return k.jsx(t,{...a,ref:i,children:w.isValidElement(c)?w.cloneElement(c,void 0,u):null})}return k.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}var zB=Du("Slot");function Khe(e){const t=w.forwardRef((n,r)=>{const{children:i,...s}=n;if(w.isValidElement(i)){const a=Qhe(i),o=Jhe(s,i.props);return i.type!==w.Fragment&&(o.ref=r?ao(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 Ghe=Symbol("radix.slottable");function Yhe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ghe}function Jhe(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 Qhe(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 Xhe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],qe=Xhe.reduce((e,t)=>{const n=Du(`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),k.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Whe(e,t){e&&Lu.flushSync(()=>e.dispatchEvent(t))}function oo(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 Zhe(e,t=globalThis==null?void 0:globalThis.document){const n=oo(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 eme="DismissableLayer",I1="dismissableLayer.update",tme="dismissableLayer.pointerDownOutside",nme="dismissableLayer.focusOutside",j2,IB=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zC=w.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:i,onFocusOutside:s,onInteractOutside:a,onDismiss:o,...l}=e,c=w.useContext(IB),[u,f]=w.useState(null),d=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=w.useState({}),p=Ct(t,T=>f(T)),b=Array.from(c.layers),[S]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),m=b.indexOf(S),y=u?b.indexOf(u):-1,v=c.layersWithOutsidePointerEventsDisabled.size>0,_=y>=m,A=sme(T=>{const N=T.target,D=[...c.branches].some(M=>M.contains(N));!_||D||(i==null||i(T),a==null||a(T),T.defaultPrevented||o==null||o())},d),E=ame(T=>{const N=T.target;[...c.branches].some(M=>M.contains(N))||(s==null||s(T),a==null||a(T),T.defaultPrevented||o==null||o())},d);return Zhe(T=>{y===c.layers.size-1&&(r==null||r(T),!T.defaultPrevented&&o&&(T.preventDefault(),o()))},d),w.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(j2=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),P2(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(d.body.style.pointerEvents=j2)}},[u,d,n,c]),w.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),P2())},[u,c]),w.useEffect(()=>{const T=()=>h({});return document.addEventListener(I1,T),()=>document.removeEventListener(I1,T)},[]),k.jsx(qe.div,{...l,ref:p,style:{pointerEvents:v?_?"auto":"none":void 0,...e.style},onFocusCapture:He(e.onFocusCapture,E.onFocusCapture),onBlurCapture:He(e.onBlurCapture,E.onBlurCapture),onPointerDownCapture:He(e.onPointerDownCapture,A.onPointerDownCapture)})});zC.displayName=eme;var rme="DismissableLayerBranch",ime=w.forwardRef((e,t)=>{const n=w.useContext(IB),r=w.useRef(null),i=Ct(t,r);return w.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),k.jsx(qe.div,{...e,ref:i})});ime.displayName=rme;function sme(e,t=globalThis==null?void 0:globalThis.document){const n=oo(e),r=w.useRef(!1),i=w.useRef(()=>{});return w.useEffect(()=>{const s=o=>{if(o.target&&!r.current){let l=function(){$B(tme,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 ame(e,t=globalThis==null?void 0:globalThis.document){const n=oo(e),r=w.useRef(!1);return w.useEffect(()=>{const i=s=>{s.target&&!r.current&&$B(nme,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 P2(){const e=new CustomEvent(I1);document.dispatchEvent(e)}function $B(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?Whe(i,s):i.dispatchEvent(s)}var C0="focusScope.autoFocusOnMount",T0="focusScope.autoFocusOnUnmount",U2={bubbles:!1,cancelable:!0},ome="FocusScope",IC=w.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:s,...a}=e,[o,l]=w.useState(null),c=oo(i),u=oo(s),f=w.useRef(null),d=Ct(t,b=>l(b)),h=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(r){let b=function(v){if(h.paused||!o)return;const _=v.target;o.contains(_)?f.current=_:ua(f.current,{select:!0})},S=function(v){if(h.paused||!o)return;const _=v.relatedTarget;_!==null&&(o.contains(_)||ua(f.current,{select:!0}))},m=function(v){if(document.activeElement===document.body)for(const A of v)A.removedNodes.length>0&&ua(o)};document.addEventListener("focusin",b),document.addEventListener("focusout",S);const y=new MutationObserver(m);return o&&y.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",S),y.disconnect()}}},[r,o,h.paused]),w.useEffect(()=>{if(o){H2.add(h);const b=document.activeElement;if(!o.contains(b)){const m=new CustomEvent(C0,U2);o.addEventListener(C0,c),o.dispatchEvent(m),m.defaultPrevented||(lme(hme(LB(o)),{select:!0}),document.activeElement===b&&ua(o))}return()=>{o.removeEventListener(C0,c),setTimeout(()=>{const m=new CustomEvent(T0,U2);o.addEventListener(T0,u),o.dispatchEvent(m),m.defaultPrevented||ua(b??document.body,{select:!0}),o.removeEventListener(T0,u),H2.remove(h)},0)}}},[o,c,u,h]);const p=w.useCallback(b=>{if(!n&&!r||h.paused)return;const S=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,m=document.activeElement;if(S&&m){const y=b.currentTarget,[v,_]=cme(y);v&&_?!b.shiftKey&&m===_?(b.preventDefault(),n&&ua(v,{select:!0})):b.shiftKey&&m===v&&(b.preventDefault(),n&&ua(_,{select:!0})):m===y&&b.preventDefault()}},[n,r,h.paused]);return k.jsx(qe.div,{tabIndex:-1,...a,ref:d,onKeyDown:p})});IC.displayName=ome;function lme(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ua(r,{select:t}),document.activeElement!==n)return}function cme(e){const t=LB(e),n=B2(t,e),r=B2(t.reverse(),e);return[n,r]}function LB(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 B2(e,t){for(const n of e)if(!ume(n,{upTo:t}))return n}function ume(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 fme(e){return e instanceof HTMLInputElement&&"select"in e}function ua(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&fme(e)&&t&&e.select()}}var H2=dme();function dme(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=q2(e,t),e.unshift(t)},remove(t){var n;e=q2(e,t),(n=e[0])==null||n.resume()}}}function q2(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hme(e){return e.filter(t=>t.tagName!=="A")}var mme="Portal",$C=w.forwardRef((e,t)=>{var o;const{container:n,...r}=e,[i,s]=w.useState(!1);Mn(()=>s(!0),[]);const a=n||i&&((o=globalThis==null?void 0:globalThis.document)==null?void 0:o.body);return a?z9.createPortal(k.jsx(qe.div,{...r,ref:t}),a):null});$C.displayName=mme;function pme(e,t){return w.useReducer((n,r)=>t[n][r]??n,e)}var Lv=e=>{const{present:t,children:n}=e,r=gme(t),i=typeof n=="function"?n({present:r.isPresent}):w.Children.only(n),s=Ct(r.ref,yme(i));return typeof n=="function"||r.isPresent?w.cloneElement(i,{ref:s}):null};Lv.displayName="Presence";function gme(e){const[t,n]=w.useState(),r=w.useRef(null),i=w.useRef(e),s=w.useRef("none"),a=e?"mounted":"unmounted",[o,l]=pme(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const c=op(r.current);s.current=o==="mounted"?c:"none"},[o]),Mn(()=>{const c=r.current,u=i.current;if(u!==e){const d=s.current,h=op(c);e?l("MOUNT"):h==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&d!==h?"ANIMATION_OUT":"UNMOUNT"),i.current=e}},[e,l]),Mn(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=h=>{const b=op(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&b&&(l("ANIMATION_END"),!i.current)){const S=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=S)})}},d=h=>{h.target===t&&(s.current=op(r.current))};return t.addEventListener("animationstart",d),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",d),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:w.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function op(e){return(e==null?void 0:e.animationName)||"none"}function yme(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 A0=0;function FB(){w.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??V2()),document.body.insertAdjacentElement("beforeend",e[1]??V2()),A0++,()=>{A0===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),A0--}},[])}function V2(){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 Di=function(){return Di=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},Di.apply(this,arguments)};function jB(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 bme(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 ng="right-scroll-bar-position",rg="width-before-scroll-bar",vme="with-scroll-bars-hidden",Sme="--removed-body-scroll-bar-size";function O0(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function wme(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 _me=typeof window<"u"?w.useLayoutEffect:w.useEffect,K2=new WeakMap;function xme(e,t){var n=wme(null,function(r){return e.forEach(function(i){return O0(i,r)})});return _me(function(){var r=K2.get(n);if(r){var i=new Set(r),s=new Set(e),a=n.current;i.forEach(function(o){s.has(o)||O0(o,null)}),s.forEach(function(o){i.has(o)||O0(o,a)})}K2.set(n,e)},[e]),n}function kme(e){return e}function Eme(e,t){t===void 0&&(t=kme);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 u=a;a=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){a.push(u),c()},filter:function(u){return a=a.filter(u),n}}}};return i}function Cme(e){e===void 0&&(e={});var t=Eme(null);return t.options=Di({async:!0,ssr:!1},e),t}var PB=function(e){var t=e.sideCar,n=jB(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,Di({},n))};PB.isSideCarExport=!0;function Tme(e,t){return e.useMedium(t),PB}var UB=Cme(),R0=function(){},Fv=w.forwardRef(function(e,t){var n=w.useRef(null),r=w.useState({onScrollCapture:R0,onWheelCapture:R0,onTouchMoveCapture:R0}),i=r[0],s=r[1],a=e.forwardProps,o=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,h=e.noRelative,p=e.noIsolation,b=e.inert,S=e.allowPinchZoom,m=e.as,y=m===void 0?"div":m,v=e.gapMode,_=jB(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=d,E=xme([n,t]),T=Di(Di({},_),i);return w.createElement(w.Fragment,null,u&&w.createElement(A,{sideCar:UB,removeScrollBar:c,shards:f,noRelative:h,noIsolation:p,inert:b,setCallbacks:s,allowPinchZoom:!!S,lockRef:n,gapMode:v}),a?w.cloneElement(w.Children.only(o),Di(Di({},T),{ref:E})):w.createElement(y,Di({},T,{className:l,ref:E}),o))});Fv.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Fv.classNames={fullWidth:rg,zeroRight:ng};var Ame=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Ome(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Ame();return t&&e.setAttribute("nonce",t),e}function Rme(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mme(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Nme=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Ome())&&(Rme(t,n),Mme(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Dme=function(){var e=Nme();return function(t,n){w.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},BB=function(){var e=Dme(),t=function(n){var r=n.styles,i=n.dynamic;return e(r,i),null};return t},zme={left:0,top:0,right:0,gap:0},M0=function(e){return parseInt(e||"",10)||0},Ime=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[M0(n),M0(r),M0(i)]},$me=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return zme;var t=Ime(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])}},Lme=BB(),Wc="data-scroll-locked",Fme=function(e,t,n,r){var i=e.left,s=e.top,a=e.right,o=e.gap;return n===void 0&&(n="margin"),`
|
|
181
|
+
.`.concat(vme,` {
|
|
182
|
+
overflow: hidden `).concat(r,`;
|
|
183
|
+
padding-right: `).concat(o,"px ").concat(r,`;
|
|
184
|
+
}
|
|
185
|
+
body[`).concat(Wc,`] {
|
|
186
|
+
overflow: hidden `).concat(r,`;
|
|
187
|
+
overscroll-behavior: contain;
|
|
188
|
+
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
189
|
+
padding-left: `.concat(i,`px;
|
|
190
|
+
padding-top: `).concat(s,`px;
|
|
191
|
+
padding-right: `).concat(a,`px;
|
|
192
|
+
margin-left:0;
|
|
193
|
+
margin-top:0;
|
|
194
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
195
|
+
`),n==="padding"&&"padding-right: ".concat(o,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.`).concat(ng,` {
|
|
199
|
+
right: `).concat(o,"px ").concat(r,`;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.`).concat(rg,` {
|
|
203
|
+
margin-right: `).concat(o,"px ").concat(r,`;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.`).concat(ng," .").concat(ng,` {
|
|
207
|
+
right: 0 `).concat(r,`;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.`).concat(rg," .").concat(rg,` {
|
|
211
|
+
margin-right: 0 `).concat(r,`;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
body[`).concat(Wc,`] {
|
|
215
|
+
`).concat(Sme,": ").concat(o,`px;
|
|
216
|
+
}
|
|
217
|
+
`)},G2=function(){var e=parseInt(document.body.getAttribute(Wc)||"0",10);return isFinite(e)?e:0},jme=function(){w.useEffect(function(){return document.body.setAttribute(Wc,(G2()+1).toString()),function(){var e=G2()-1;e<=0?document.body.removeAttribute(Wc):document.body.setAttribute(Wc,e.toString())}},[])},Pme=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?"margin":r;jme();var s=w.useMemo(function(){return $me(i)},[i]);return w.createElement(Lme,{styles:Fme(s,!t,i,n?"":"!important")})},$1=!1;if(typeof window<"u")try{var lp=Object.defineProperty({},"passive",{get:function(){return $1=!0,!0}});window.addEventListener("test",lp,lp),window.removeEventListener("test",lp,lp)}catch{$1=!1}var tc=$1?{passive:!1}:!1,Ume=function(e){return e.tagName==="TEXTAREA"},HB=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Ume(e)&&n[t]==="visible")},Bme=function(e){return HB(e,"overflowY")},Hme=function(e){return HB(e,"overflowX")},Y2=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var i=qB(e,r);if(i){var s=VB(e,r),a=s[1],o=s[2];if(a>o)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},qme=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Vme=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},qB=function(e,t){return e==="v"?Bme(t):Hme(t)},VB=function(e,t){return e==="v"?qme(t):Vme(t)},Kme=function(e,t){return e==="h"&&t==="rtl"?-1:1},Gme=function(e,t,n,r,i){var s=Kme(e,window.getComputedStyle(t).direction),a=s*r,o=n.target,l=t.contains(o),c=!1,u=a>0,f=0,d=0;do{if(!o)break;var h=VB(e,o),p=h[0],b=h[1],S=h[2],m=b-S-s*p;(p||m)&&qB(e,o)&&(f+=m,d+=p);var y=o.parentNode;o=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!l&&o!==document.body||l&&(t.contains(o)||t===o));return(u&&Math.abs(f)<1||!u&&Math.abs(d)<1)&&(c=!0),c},cp=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},J2=function(e){return[e.deltaX,e.deltaY]},Q2=function(e){return e&&"current"in e?e.current:e},Yme=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Jme=function(e){return`
|
|
218
|
+
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
219
|
+
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
220
|
+
`)},Qme=0,nc=[];function Xme(e){var t=w.useRef([]),n=w.useRef([0,0]),r=w.useRef(),i=w.useState(Qme++)[0],s=w.useState(BB)[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 b=bme([e.lockRef.current],(e.shards||[]).map(Q2),!0).filter(Boolean);return b.forEach(function(S){return S.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(S){return S.classList.remove("allow-interactivity-".concat(i))})}}},[e.inert,e.lockRef.current,e.shards]);var o=w.useCallback(function(b,S){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!a.current.allowPinchZoom;var m=cp(b),y=n.current,v="deltaX"in b?b.deltaX:y[0]-m[0],_="deltaY"in b?b.deltaY:y[1]-m[1],A,E=b.target,T=Math.abs(v)>Math.abs(_)?"h":"v";if("touches"in b&&T==="h"&&E.type==="range")return!1;var N=window.getSelection(),D=N&&N.anchorNode,M=D?D===E||D.contains(E):!1;if(M)return!1;var $=Y2(T,E);if(!$)return!0;if($?A=T:(A=T==="v"?"h":"v",$=Y2(T,E)),!$)return!1;if(!r.current&&"changedTouches"in b&&(v||_)&&(r.current=A),!A)return!0;var L=r.current||A;return Gme(L,S,b,L==="h"?v:_)},[]),l=w.useCallback(function(b){var S=b;if(!(!nc.length||nc[nc.length-1]!==s)){var m="deltaY"in S?J2(S):cp(S),y=t.current.filter(function(A){return A.name===S.type&&(A.target===S.target||S.target===A.shadowParent)&&Yme(A.delta,m)})[0];if(y&&y.should){S.cancelable&&S.preventDefault();return}if(!y){var v=(a.current.shards||[]).map(Q2).filter(Boolean).filter(function(A){return A.contains(S.target)}),_=v.length>0?o(S,v[0]):!a.current.noIsolation;_&&S.cancelable&&S.preventDefault()}}},[]),c=w.useCallback(function(b,S,m,y){var v={name:b,delta:S,target:m,should:y,shadowParent:Wme(m)};t.current.push(v),setTimeout(function(){t.current=t.current.filter(function(_){return _!==v})},1)},[]),u=w.useCallback(function(b){n.current=cp(b),r.current=void 0},[]),f=w.useCallback(function(b){c(b.type,J2(b),b.target,o(b,e.lockRef.current))},[]),d=w.useCallback(function(b){c(b.type,cp(b),b.target,o(b,e.lockRef.current))},[]);w.useEffect(function(){return nc.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",l,tc),document.addEventListener("touchmove",l,tc),document.addEventListener("touchstart",u,tc),function(){nc=nc.filter(function(b){return b!==s}),document.removeEventListener("wheel",l,tc),document.removeEventListener("touchmove",l,tc),document.removeEventListener("touchstart",u,tc)}},[]);var h=e.removeScrollBar,p=e.inert;return w.createElement(w.Fragment,null,p?w.createElement(s,{styles:Jme(i)}):null,h?w.createElement(Pme,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Wme(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Zme=Tme(UB,Xme);var LC=w.forwardRef(function(e,t){return w.createElement(Fv,Di({},e,{ref:t,sideCar:Zme}))});LC.classNames=Fv.classNames;var epe=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rc=new WeakMap,up=new WeakMap,fp={},N0=0,KB=function(e){return e&&(e.host||KB(e.parentNode))},tpe=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=KB(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})},npe=function(e,t,n,r){var i=tpe(t,Array.isArray(e)?e:[e]);fp[n]||(fp[n]=new WeakMap);var s=fp[n],a=[],o=new Set,l=new Set(i),c=function(f){!f||o.has(f)||(o.add(f),c(f.parentNode))};i.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(d){if(o.has(d))u(d);else try{var h=d.getAttribute(r),p=h!==null&&h!=="false",b=(rc.get(d)||0)+1,S=(s.get(d)||0)+1;rc.set(d,b),s.set(d,S),a.push(d),b===1&&p&&up.set(d,!0),S===1&&d.setAttribute(n,"true"),p||d.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",d,m)}})};return u(t),o.clear(),N0++,function(){a.forEach(function(f){var d=rc.get(f)-1,h=s.get(f)-1;rc.set(f,d),s.set(f,h),d||(up.has(f)||f.removeAttribute(r),up.delete(f)),h||f.removeAttribute(n)}),N0--,N0||(rc=new WeakMap,rc=new WeakMap,up=new WeakMap,fp={})}},GB=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),i=epe(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll("[aria-live], script"))),npe(r,i,n,"aria-hidden")):function(){return null}},jv="Dialog",[YB]=bf(jv),[rpe,Ai]=YB(jv),JB=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,u]=xl({prop:r,defaultProp:i??!1,onChange:s,caller:jv});return k.jsx(rpe,{scope:t,triggerRef:o,contentRef:l,contentId:_r(),titleId:_r(),descriptionId:_r(),open:c,onOpenChange:u,onOpenToggle:w.useCallback(()=>u(f=>!f),[u]),modal:a,children:n})};JB.displayName=jv;var QB="DialogTrigger",ipe=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ai(QB,n),s=Ct(t,i.triggerRef);return k.jsx(qe.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":PC(i.open),...r,ref:s,onClick:He(e.onClick,i.onOpenToggle)})});ipe.displayName=QB;var FC="DialogPortal",[spe,XB]=YB(FC,{forceMount:void 0}),WB=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:i}=e,s=Ai(FC,t);return k.jsx(spe,{scope:t,forceMount:n,children:w.Children.map(r,a=>k.jsx(Lv,{present:n||s.open,children:k.jsx($C,{asChild:!0,container:i,children:a})}))})};WB.displayName=FC;var jy="DialogOverlay",ZB=w.forwardRef((e,t)=>{const n=XB(jy,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Ai(jy,e.__scopeDialog);return s.modal?k.jsx(Lv,{present:r||s.open,children:k.jsx(ope,{...i,ref:t})}):null});ZB.displayName=jy;var ape=Du("DialogOverlay.RemoveScroll"),ope=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ai(jy,n);return k.jsx(LC,{as:ape,allowPinchZoom:!0,shards:[i.contentRef],children:k.jsx(qe.div,{"data-state":PC(i.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),kl="DialogContent",e6=w.forwardRef((e,t)=>{const n=XB(kl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,s=Ai(kl,e.__scopeDialog);return k.jsx(Lv,{present:r||s.open,children:s.modal?k.jsx(lpe,{...i,ref:t}):k.jsx(cpe,{...i,ref:t})})});e6.displayName=kl;var lpe=w.forwardRef((e,t)=>{const n=Ai(kl,e.__scopeDialog),r=w.useRef(null),i=Ct(t,n.contentRef,r);return w.useEffect(()=>{const s=r.current;if(s)return GB(s)},[]),k.jsx(t6,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:He(e.onCloseAutoFocus,s=>{var a;s.preventDefault(),(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:He(e.onPointerDownOutside,s=>{const a=s.detail.originalEvent,o=a.button===0&&a.ctrlKey===!0;(a.button===2||o)&&s.preventDefault()}),onFocusOutside:He(e.onFocusOutside,s=>s.preventDefault())})}),cpe=w.forwardRef((e,t)=>{const n=Ai(kl,e.__scopeDialog),r=w.useRef(!1),i=w.useRef(!1);return k.jsx(t6,{...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()}})}),t6=w.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:s,...a}=e,o=Ai(kl,n),l=w.useRef(null),c=Ct(t,l);return FB(),k.jsxs(k.Fragment,{children:[k.jsx(IC,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:s,children:k.jsx(zC,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":PC(o.open),...a,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),k.jsxs(k.Fragment,{children:[k.jsx(upe,{titleId:o.titleId}),k.jsx(dpe,{contentRef:l,descriptionId:o.descriptionId})]})]})}),jC="DialogTitle",n6=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ai(jC,n);return k.jsx(qe.h2,{id:i.titleId,...r,ref:t})});n6.displayName=jC;var r6="DialogDescription",i6=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ai(r6,n);return k.jsx(qe.p,{id:i.descriptionId,...r,ref:t})});i6.displayName=r6;var s6="DialogClose",a6=w.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,i=Ai(s6,n);return k.jsx(qe.button,{type:"button",...r,ref:t,onClick:He(e.onClick,()=>i.onOpenChange(!1))})});a6.displayName=s6;function PC(e){return e?"open":"closed"}var o6="DialogTitleWarning",[dEe,l6]=jhe(o6,{contentName:kl,titleName:jC,docsSlug:"dialog"}),upe=({titleId:e})=>{const t=l6(o6),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
221
|
+
|
|
222
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
223
|
+
|
|
224
|
+
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},fpe="DialogDescriptionWarning",dpe=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${l6(fpe).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},c6=JB,u6=WB,f6=ZB,d6=e6,hpe=n6,mpe=i6,ppe=a6,gpe=Symbol.for("react.lazy"),Py=dx[" use ".trim().toString()];function ype(e){return typeof e=="object"&&e!==null&&"then"in e}function h6(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===gpe&&"_payload"in e&&ype(e._payload)}function bpe(e){const t=vpe(e),n=w.forwardRef((r,i)=>{let{children:s,...a}=r;h6(s)&&typeof Py=="function"&&(s=Py(s._payload));const o=w.Children.toArray(s),l=o.find(wpe);if(l){const c=l.props.children,u=o.map(f=>f===l?w.Children.count(c)>1?w.Children.only(null):w.isValidElement(c)?c.props.children:null:f);return k.jsx(t,{...a,ref:i,children:w.isValidElement(c)?w.cloneElement(c,void 0,u):null})}return k.jsx(t,{...a,ref:i,children:s})});return n.displayName=`${e}.Slot`,n}function vpe(e){const t=w.forwardRef((n,r)=>{let{children:i,...s}=n;if(h6(i)&&typeof Py=="function"&&(i=Py(i._payload)),w.isValidElement(i)){const a=xpe(i),o=_pe(s,i.props);return i.type!==w.Fragment&&(o.ref=r?ao(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 Spe=Symbol("radix.slottable");function wpe(e){return w.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Spe}function _pe(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 xpe(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 kpe=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],So=kpe.reduce((e,t)=>{const n=bpe(`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),k.jsx(l,{...o,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Kf='[cmdk-group=""]',D0='[cmdk-group-items=""]',Epe='[cmdk-group-heading=""]',m6='[cmdk-item=""]',X2=`${m6}:not([aria-disabled="true"])`,L1="cmdk-item-select",hc="data-value",Cpe=(e,t,n)=>Fhe(e,t,n),p6=w.createContext(void 0),km=()=>w.useContext(p6),g6=w.createContext(void 0),UC=()=>w.useContext(g6),y6=w.createContext(void 0),b6=w.forwardRef((e,t)=>{let n=mc(()=>{var U,C;return{search:"",value:(C=(U=e.value)!=null?U:e.defaultValue)!=null?C:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=mc(()=>new Set),i=mc(()=>new Map),s=mc(()=>new Map),a=mc(()=>new Set),o=v6(e),{label:l,children:c,value:u,onValueChange:f,filter:d,shouldFilter:h,loop:p,disablePointerSelection:b=!1,vimBindings:S=!0,...m}=e,y=_r(),v=_r(),_=_r(),A=w.useRef(null),E=Lpe();El(()=>{if(u!==void 0){let U=u.trim();n.current.value=U,T.emit()}},[u]),El(()=>{E(6,J)},[]);let T=w.useMemo(()=>({subscribe:U=>(a.current.add(U),()=>a.current.delete(U)),snapshot:()=>n.current,setState:(U,C,X)=>{var W,le,H,he;if(!Object.is(n.current[U],C)){if(n.current[U]=C,U==="search")L(),M(),E(1,$);else if(U==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let we=document.getElementById(_);we?we.focus():(W=document.getElementById(y))==null||W.focus()}if(E(7,()=>{var we;n.current.selectedItemId=(we=Y())==null?void 0:we.id,T.emit()}),X||E(5,J),((le=o.current)==null?void 0:le.value)!==void 0){let we=C??"";(he=(H=o.current).onValueChange)==null||he.call(H,we);return}}T.emit()}},emit:()=>{a.current.forEach(U=>U())}}),[]),N=w.useMemo(()=>({value:(U,C,X)=>{var W;C!==((W=s.current.get(U))==null?void 0:W.value)&&(s.current.set(U,{value:C,keywords:X}),n.current.filtered.items.set(U,D(C,X)),E(2,()=>{M(),T.emit()}))},item:(U,C)=>(r.current.add(U),C&&(i.current.has(C)?i.current.get(C).add(U):i.current.set(C,new Set([U]))),E(3,()=>{L(),M(),n.current.value||$(),T.emit()}),()=>{s.current.delete(U),r.current.delete(U),n.current.filtered.items.delete(U);let X=Y();E(4,()=>{L(),(X==null?void 0:X.getAttribute("id"))===U&&$(),T.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:y,inputId:_,labelId:v,listInnerRef:A}),[]);function D(U,C){var X,W;let le=(W=(X=o.current)==null?void 0:X.filter)!=null?W:Cpe;return U?le(U,n.current.search,C):0}function M(){if(!n.current.search||o.current.shouldFilter===!1)return;let U=n.current.filtered.items,C=[];n.current.filtered.groups.forEach(W=>{let le=i.current.get(W),H=0;le.forEach(he=>{let we=U.get(he);H=Math.max(we,H)}),C.push([W,H])});let X=A.current;G().sort((W,le)=>{var H,he;let we=W.getAttribute("id"),_e=le.getAttribute("id");return((H=U.get(_e))!=null?H:0)-((he=U.get(we))!=null?he:0)}).forEach(W=>{let le=W.closest(D0);le?le.appendChild(W.parentElement===le?W:W.closest(`${D0} > *`)):X.appendChild(W.parentElement===X?W:W.closest(`${D0} > *`))}),C.sort((W,le)=>le[1]-W[1]).forEach(W=>{var le;let H=(le=A.current)==null?void 0:le.querySelector(`${Kf}[${hc}="${encodeURIComponent(W[0])}"]`);H==null||H.parentElement.appendChild(H)})}function $(){let U=G().find(X=>X.getAttribute("aria-disabled")!=="true"),C=U==null?void 0:U.getAttribute(hc);T.setState("value",C||void 0)}function L(){var U,C,X,W;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 he=(C=(U=s.current.get(H))==null?void 0:U.value)!=null?C:"",we=(W=(X=s.current.get(H))==null?void 0:X.keywords)!=null?W:[],_e=D(he,we);n.current.filtered.items.set(H,_e),_e>0&&le++}for(let[H,he]of i.current)for(let we of he)if(n.current.filtered.items.get(we)>0){n.current.filtered.groups.add(H);break}n.current.filtered.count=le}function J(){var U,C,X;let W=Y();W&&(((U=W.parentElement)==null?void 0:U.firstChild)===W&&((X=(C=W.closest(Kf))==null?void 0:C.querySelector(Epe))==null||X.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function Y(){var U;return(U=A.current)==null?void 0:U.querySelector(`${m6}[aria-selected="true"]`)}function G(){var U;return Array.from(((U=A.current)==null?void 0:U.querySelectorAll(X2))||[])}function z(U){let C=G()[U];C&&T.setState("value",C.getAttribute(hc))}function F(U){var C;let X=Y(),W=G(),le=W.findIndex(he=>he===X),H=W[le+U];(C=o.current)!=null&&C.loop&&(H=le+U<0?W[W.length-1]:le+U===W.length?W[0]:W[le+U]),H&&T.setState("value",H.getAttribute(hc))}function I(U){let C=Y(),X=C==null?void 0:C.closest(Kf),W;for(;X&&!W;)X=U>0?Ipe(X,Kf):$pe(X,Kf),W=X==null?void 0:X.querySelector(X2);W?T.setState("value",W.getAttribute(hc)):F(U)}let te=()=>z(G().length-1),R=U=>{U.preventDefault(),U.metaKey?te():U.altKey?I(1):F(1)},Re=U=>{U.preventDefault(),U.metaKey?z(0):U.altKey?I(-1):F(-1)};return w.createElement(So.div,{ref:t,tabIndex:-1,...m,"cmdk-root":"",onKeyDown:U=>{var C;(C=m.onKeyDown)==null||C.call(m,U);let X=U.nativeEvent.isComposing||U.keyCode===229;if(!(U.defaultPrevented||X))switch(U.key){case"n":case"j":{S&&U.ctrlKey&&R(U);break}case"ArrowDown":{R(U);break}case"p":case"k":{S&&U.ctrlKey&&Re(U);break}case"ArrowUp":{Re(U);break}case"Home":{U.preventDefault(),z(0);break}case"End":{U.preventDefault(),te();break}case"Enter":{U.preventDefault();let W=Y();if(W){let le=new Event(L1);W.dispatchEvent(le)}}}}},w.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:jpe},l),Pv(e,U=>w.createElement(g6.Provider,{value:T},w.createElement(p6.Provider,{value:N},U))))}),Tpe=w.forwardRef((e,t)=>{var n,r;let i=_r(),s=w.useRef(null),a=w.useContext(y6),o=km(),l=v6(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:a==null?void 0:a.forceMount;El(()=>{if(!c)return o.item(i,a==null?void 0:a.id)},[c]);let u=S6(i,s,[e.value,e.children,s],e.keywords),f=UC(),d=lo(E=>E.value&&E.value===u.current),h=lo(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(L1,p),()=>E.removeEventListener(L1,p)},[h,e.onSelect,e.disabled]);function p(){var E,T;b(),(T=(E=l.current).onSelect)==null||T.call(E,u.current)}function b(){f.setState("value",u.current,!0)}if(!h)return null;let{disabled:S,value:m,onSelect:y,forceMount:v,keywords:_,...A}=e;return w.createElement(So.div,{ref:ao(s,t),...A,id:i,"cmdk-item":"",role:"option","aria-disabled":!!S,"aria-selected":!!d,"data-disabled":!!S,"data-selected":!!d,onPointerMove:S||o.getDisablePointerSelection()?void 0:b,onClick:S?void 0:p},e.children)}),Ape=w.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...s}=e,a=_r(),o=w.useRef(null),l=w.useRef(null),c=_r(),u=km(),f=lo(h=>i||u.filter()===!1?!0:h.search?h.filtered.groups.has(a):!0);El(()=>u.group(a),[]),S6(a,o,[e.value,e.heading,l]);let d=w.useMemo(()=>({id:a,forceMount:i}),[i]);return w.createElement(So.div,{ref:ao(o,t),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&w.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),Pv(e,h=>w.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},w.createElement(y6.Provider,{value:d},h))))}),Ope=w.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=w.useRef(null),s=lo(a=>!a.search);return!n&&!s?null:w.createElement(So.div,{ref:ao(i,t),...r,"cmdk-separator":"",role:"separator"})}),Rpe=w.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,s=UC(),a=lo(c=>c.search),o=lo(c=>c.selectedItemId),l=km();return w.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),w.createElement(So.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)}})}),Mpe=w.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...i}=e,s=w.useRef(null),a=w.useRef(null),o=lo(c=>c.selectedItemId),l=km();return w.useEffect(()=>{if(a.current&&s.current){let c=a.current,u=s.current,f,d=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let h=c.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return d.observe(c),()=>{cancelAnimationFrame(f),d.unobserve(c)}}},[]),w.createElement(So.div,{ref:ao(s,t),...i,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":r,id:l.listId},Pv(e,c=>w.createElement("div",{ref:ao(a,l.listInnerRef),"cmdk-list-sizer":""},c)))}),Npe=w.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:s,container:a,...o}=e;return w.createElement(c6,{open:n,onOpenChange:r},w.createElement(u6,{container:a},w.createElement(f6,{"cmdk-overlay":"",className:i}),w.createElement(d6,{"aria-label":e.label,"cmdk-dialog":"",className:s},w.createElement(b6,{ref:t,...o}))))}),Dpe=w.forwardRef((e,t)=>lo(n=>n.filtered.count===0)?w.createElement(So.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),zpe=w.forwardRef((e,t)=>{let{progress:n,children:r,label:i="Loading...",...s}=e;return w.createElement(So.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},Pv(e,a=>w.createElement("div",{"aria-hidden":!0},a)))}),ql=Object.assign(b6,{List:Mpe,Item:Tpe,Input:Rpe,Group:Ape,Separator:Ope,Dialog:Npe,Empty:Dpe,Loading:zpe});function Ipe(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function $pe(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function v6(e){let t=w.useRef(e);return El(()=>{t.current=e}),t}var El=typeof window>"u"?w.useEffect:w.useLayoutEffect;function mc(e){let t=w.useRef();return t.current===void 0&&(t.current=e()),t}function lo(e){let t=UC(),n=()=>e(t.snapshot());return w.useSyncExternalStore(t.subscribe,n,n)}function S6(e,t,n,r=[]){let i=w.useRef(),s=km();return El(()=>{var a;let o=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.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(hc,o),i.current=o}),i}var Lpe=()=>{let[e,t]=w.useState(),n=mc(()=>new Map);return El(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,i)=>{n.current.set(r,i),t({})}};function Fpe(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function Pv({asChild:e,children:t},n){return e&&w.isValidElement(t)?w.cloneElement(Fpe(t),{ref:t.ref},n(t.props.children)):n(t)}var jpe={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},w6=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"}),Ppe="VisuallyHidden",Upe=w.forwardRef((e,t)=>k.jsx(qe.span,{...e,ref:t,style:{...w6,...e.style}}));Upe.displayName=Ppe;function _6(e){const t=e+"CollectionProvider",[n,r]=bf(t),[i,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=b=>{const{scope:S,children:m}=b,y=jt.useRef(null),v=jt.useRef(new Map).current;return k.jsx(i,{scope:S,itemMap:v,collectionRef:y,children:m})};a.displayName=t;const o=e+"CollectionSlot",l=Du(o),c=jt.forwardRef((b,S)=>{const{scope:m,children:y}=b,v=s(o,m),_=Ct(S,v.collectionRef);return k.jsx(l,{ref:_,children:y})});c.displayName=o;const u=e+"CollectionItemSlot",f="data-radix-collection-item",d=Du(u),h=jt.forwardRef((b,S)=>{const{scope:m,children:y,...v}=b,_=jt.useRef(null),A=Ct(S,_),E=s(u,m);return jt.useEffect(()=>(E.itemMap.set(_,{ref:_,...v}),()=>void E.itemMap.delete(_))),k.jsx(d,{[f]:"",ref:A,children:y})});h.displayName=u;function p(b){const S=s(e+"CollectionConsumer",b);return jt.useCallback(()=>{const y=S.collectionRef.current;if(!y)return[];const v=Array.from(y.querySelectorAll(`[${f}]`));return Array.from(S.itemMap.values()).sort((E,T)=>v.indexOf(E.ref.current)-v.indexOf(T.ref.current))},[S.collectionRef,S.itemMap])}return[{Provider:a,Slot:c,ItemSlot:h},p,r]}var Bpe=w.createContext(void 0);function BC(e){const t=w.useContext(Bpe);return e||t||"ltr"}function Hpe(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 qpe(e){const[t,n]=w.useState(void 0);return Mn(()=>{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 Vpe=["top","right","bottom","left"],co=Math.min,dr=Math.max,Uy=Math.round,dp=Math.floor,Ji=e=>({x:e,y:e}),Kpe={left:"right",right:"left",bottom:"top",top:"bottom"},Gpe={start:"end",end:"start"};function F1(e,t,n){return dr(e,co(t,n))}function Gs(e,t){return typeof e=="function"?e(t):e}function Ys(e){return e.split("-")[0]}function vf(e){return e.split("-")[1]}function HC(e){return e==="x"?"y":"x"}function qC(e){return e==="y"?"height":"width"}const Ype=new Set(["top","bottom"]);function Bi(e){return Ype.has(Ys(e))?"y":"x"}function VC(e){return HC(Bi(e))}function Jpe(e,t,n){n===void 0&&(n=!1);const r=vf(e),i=VC(e),s=qC(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(a=By(a)),[a,By(a)]}function Qpe(e){const t=By(e);return[j1(e),t,j1(t)]}function j1(e){return e.replace(/start|end/g,t=>Gpe[t])}const W2=["left","right"],Z2=["right","left"],Xpe=["top","bottom"],Wpe=["bottom","top"];function Zpe(e,t,n){switch(e){case"top":case"bottom":return n?t?Z2:W2:t?W2:Z2;case"left":case"right":return t?Xpe:Wpe;default:return[]}}function ege(e,t,n,r){const i=vf(e);let s=Zpe(Ys(e),n==="start",r);return i&&(s=s.map(a=>a+"-"+i),t&&(s=s.concat(s.map(j1)))),s}function By(e){return e.replace(/left|right|bottom|top/g,t=>Kpe[t])}function tge(e){return{top:0,right:0,bottom:0,left:0,...e}}function x6(e){return typeof e!="number"?tge(e):{top:e,right:e,bottom:e,left:e}}function Hy(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 eM(e,t,n){let{reference:r,floating:i}=e;const s=Bi(t),a=VC(t),o=qC(a),l=Ys(t),c=s==="y",u=r.x+r.width/2-i.width/2,f=r.y+r.height/2-i.height/2,d=r[o]/2-i[o]/2;let h;switch(l){case"top":h={x:u,y:r.y-i.height};break;case"bottom":h={x:u,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:f};break;case"left":h={x:r.x-i.width,y:f};break;default:h={x:r.x,y:r.y}}switch(vf(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 nge(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:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:h=0}=Gs(t,e),p=x6(h),S=o[d?f==="floating"?"reference":"floating":f],m=Hy(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(S)))==null||n?S:S.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(o.floating)),boundary:c,rootBoundary:u,strategy:l})),y=f==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(o.floating)),_=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},A=Hy(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:y,offsetParent:v,strategy:l}):y);return{top:(m.top-A.top+p.top)/_.y,bottom:(A.bottom-m.bottom+p.bottom)/_.y,left:(m.left-A.left+p.left)/_.x,right:(A.right-m.right+p.right)/_.x}}const rge=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:u,y:f}=eM(c,r,l),d=r,h={},p=0;for(let S=0;S<o.length;S++){var b;const{name:m,fn:y}=o[S],{x:v,y:_,data:A,reset:E}=await y({x:u,y:f,initialPlacement:r,placement:d,strategy:i,middlewareData:h,rects:c,platform:{...a,detectOverflow:(b=a.detectOverflow)!=null?b:nge},elements:{reference:e,floating:t}});u=v??u,f=_??f,h={...h,[m]:{...h[m],...A}},E&&p<=50&&(p++,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:u,y:f}=eM(c,d,l)),S=-1)}return{x:u,y:f,placement:d,strategy:i,middlewareData:h}},ige=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:u=0}=Gs(e,t)||{};if(c==null)return{};const f=x6(u),d={x:n,y:r},h=VC(i),p=qC(h),b=await a.getDimensions(c),S=h==="y",m=S?"top":"left",y=S?"bottom":"right",v=S?"clientHeight":"clientWidth",_=s.reference[p]+s.reference[h]-d[h]-s.floating[p],A=d[h]-s.reference[h],E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(c));let T=E?E[v]:0;(!T||!await(a.isElement==null?void 0:a.isElement(E)))&&(T=o.floating[v]||s.floating[p]);const N=_/2-A/2,D=T/2-b[p]/2-1,M=co(f[m],D),$=co(f[y],D),L=M,J=T-b[p]-$,Y=T/2-b[p]/2+N,G=F1(L,Y,J),z=!l.arrow&&vf(i)!=null&&Y!==G&&s.reference[p]/2-(Y<L?M:$)-b[p]/2<0,F=z?Y<L?Y-L:Y-J:0;return{[h]:d[h]+F,data:{[h]:G,centerOffset:Y-G-F,...z&&{alignmentOffset:F}},reset:z}}}),sge=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:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:b=!0,...S}=Gs(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=Ys(i),y=Bi(o),v=Ys(o)===o,_=await(l.isRTL==null?void 0:l.isRTL(c.floating)),A=d||(v||!b?[By(o)]:Qpe(o)),E=p!=="none";!d&&E&&A.push(...ege(o,b,p,_));const T=[o,...A],N=await l.detectOverflow(t,S),D=[];let M=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&D.push(N[m]),f){const Y=Jpe(i,a,_);D.push(N[Y[0]],N[Y[1]])}if(M=[...M,{placement:i,overflows:D}],!D.every(Y=>Y<=0)){var $,L;const Y=((($=s.flip)==null?void 0:$.index)||0)+1,G=T[Y];if(G&&(!(f==="alignment"?y!==Bi(G):!1)||M.every(I=>Bi(I.placement)===y?I.overflows[0]>0:!0)))return{data:{index:Y,overflows:M},reset:{placement:G}};let z=(L=M.filter(F=>F.overflows[0]<=0).sort((F,I)=>F.overflows[1]-I.overflows[1])[0])==null?void 0:L.placement;if(!z)switch(h){case"bestFit":{var J;const F=(J=M.filter(I=>{if(E){const te=Bi(I.placement);return te===y||te==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(te=>te>0).reduce((te,R)=>te+R,0)]).sort((I,te)=>I[1]-te[1])[0])==null?void 0:J[0];F&&(z=F);break}case"initialPlacement":z=o;break}if(i!==z)return{reset:{placement:z}}}return{}}}};function tM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function nM(e){return Vpe.some(t=>e[t]>=0)}const age=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...s}=Gs(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...s,elementContext:"reference"}),o=tM(a,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:nM(o)}}}case"escaped":{const a=await r.detectOverflow(t,{...s,altBoundary:!0}),o=tM(a,n.floating);return{data:{escapedOffsets:o,escaped:nM(o)}}}default:return{}}}}},k6=new Set(["left","top"]);async function oge(e,t){const{placement:n,platform:r,elements:i}=e,s=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Ys(n),o=vf(n),l=Bi(n)==="y",c=k6.has(a)?-1:1,u=s&&l?-1:1,f=Gs(t,e);let{mainAxis:d,crossAxis:h,alignmentAxis:p}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return o&&typeof p=="number"&&(h=o==="end"?p*-1:p),l?{x:h*u,y:d*c}:{x:d*c,y:h*u}}const lge=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 oge(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}}}}},cge=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:y,y:v}=m;return{x:y,y:v}}},...c}=Gs(e,t),u={x:n,y:r},f=await s.detectOverflow(t,c),d=Bi(Ys(i)),h=HC(d);let p=u[h],b=u[d];if(a){const m=h==="y"?"top":"left",y=h==="y"?"bottom":"right",v=p+f[m],_=p-f[y];p=F1(v,p,_)}if(o){const m=d==="y"?"top":"left",y=d==="y"?"bottom":"right",v=b+f[m],_=b-f[y];b=F1(v,b,_)}const S=l.fn({...t,[h]:p,[d]:b});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[h]:a,[d]:o}}}}}},uge=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}=Gs(e,t),u={x:n,y:r},f=Bi(i),d=HC(f);let h=u[d],p=u[f];const b=Gs(o,t),S=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(l){const v=d==="y"?"height":"width",_=s.reference[d]-s.floating[v]+S.mainAxis,A=s.reference[d]+s.reference[v]-S.mainAxis;h<_?h=_:h>A&&(h=A)}if(c){var m,y;const v=d==="y"?"width":"height",_=k6.has(Ys(i)),A=s.reference[f]-s.floating[v]+(_&&((m=a.offset)==null?void 0:m[f])||0)+(_?0:S.crossAxis),E=s.reference[f]+s.reference[v]+(_?0:((y=a.offset)==null?void 0:y[f])||0)-(_?S.crossAxis:0);p<A?p=A:p>E&&(p=E)}return{[d]:h,[f]:p}}}},fge=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}=Gs(e,t),u=await a.detectOverflow(t,c),f=Ys(i),d=vf(i),h=Bi(i)==="y",{width:p,height:b}=s.floating;let S,m;f==="top"||f==="bottom"?(S=f,m=d===(await(a.isRTL==null?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(m=f,S=d==="end"?"top":"bottom");const y=b-u.top-u.bottom,v=p-u.left-u.right,_=co(b-u[S],y),A=co(p-u[m],v),E=!t.middlewareData.shift;let T=_,N=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=v),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(T=y),E&&!d){const M=dr(u.left,0),$=dr(u.right,0),L=dr(u.top,0),J=dr(u.bottom,0);h?N=p-2*(M!==0||$!==0?M+$:dr(u.left,u.right)):T=b-2*(L!==0||J!==0?L+J:dr(u.top,u.bottom))}await l({...t,availableWidth:N,availableHeight:T});const D=await a.getDimensions(o.floating);return p!==D.width||b!==D.height?{reset:{rects:!0}}:{}}}};function Uv(){return typeof window<"u"}function Sf(e){return E6(e)?(e.nodeName||"").toLowerCase():"#document"}function xr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function as(e){var t;return(t=(E6(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function E6(e){return Uv()?e instanceof Node||e instanceof xr(e).Node:!1}function xi(e){return Uv()?e instanceof Element||e instanceof xr(e).Element:!1}function es(e){return Uv()?e instanceof HTMLElement||e instanceof xr(e).HTMLElement:!1}function rM(e){return!Uv()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof xr(e).ShadowRoot}const dge=new Set(["inline","contents"]);function Em(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=ki(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!dge.has(i)}const hge=new Set(["table","td","th"]);function mge(e){return hge.has(Sf(e))}const pge=[":popover-open",":modal"];function Bv(e){return pge.some(t=>{try{return e.matches(t)}catch{return!1}})}const gge=["transform","translate","scale","rotate","perspective"],yge=["transform","translate","scale","rotate","perspective","filter"],bge=["paint","layout","strict","content"];function KC(e){const t=GC(),n=xi(e)?ki(e):e;return gge.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)||yge.some(r=>(n.willChange||"").includes(r))||bge.some(r=>(n.contain||"").includes(r))}function vge(e){let t=uo(e);for(;es(t)&&!zu(t);){if(KC(t))return t;if(Bv(t))return null;t=uo(t)}return null}function GC(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Sge=new Set(["html","body","#document"]);function zu(e){return Sge.has(Sf(e))}function ki(e){return xr(e).getComputedStyle(e)}function Hv(e){return xi(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function uo(e){if(Sf(e)==="html")return e;const t=e.assignedSlot||e.parentNode||rM(e)&&e.host||as(e);return rM(t)?t.host:t}function C6(e){const t=uo(e);return zu(t)?e.ownerDocument?e.ownerDocument.body:e.body:es(t)&&Em(t)?t:C6(t)}function Oh(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=C6(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),a=xr(i);if(s){const o=P1(a);return t.concat(a,a.visualViewport||[],Em(i)?i:[],o&&n?Oh(o):[])}return t.concat(i,Oh(i,[],n))}function P1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function T6(e){const t=ki(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=es(e),s=i?e.offsetWidth:n,a=i?e.offsetHeight:r,o=Uy(n)!==s||Uy(r)!==a;return o&&(n=s,r=a),{width:n,height:r,$:o}}function YC(e){return xi(e)?e:e.contextElement}function Zc(e){const t=YC(e);if(!es(t))return Ji(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=T6(t);let a=(s?Uy(n.width):n.width)/r,o=(s?Uy(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!o||!Number.isFinite(o))&&(o=1),{x:a,y:o}}const wge=Ji(0);function A6(e){const t=xr(e);return!GC()||!t.visualViewport?wge:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _ge(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==xr(e)?!1:t}function Cl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=YC(e);let a=Ji(1);t&&(r?xi(r)&&(a=Zc(r)):a=Zc(e));const o=_ge(s,n,r)?A6(s):Ji(0);let l=(i.left+o.x)/a.x,c=(i.top+o.y)/a.y,u=i.width/a.x,f=i.height/a.y;if(s){const d=xr(s),h=r&&xi(r)?xr(r):r;let p=d,b=P1(p);for(;b&&r&&h!==p;){const S=Zc(b),m=b.getBoundingClientRect(),y=ki(b),v=m.left+(b.clientLeft+parseFloat(y.paddingLeft))*S.x,_=m.top+(b.clientTop+parseFloat(y.paddingTop))*S.y;l*=S.x,c*=S.y,u*=S.x,f*=S.y,l+=v,c+=_,p=xr(b),b=P1(p)}}return Hy({width:u,height:f,x:l,y:c})}function qv(e,t){const n=Hv(e).scrollLeft;return t?t.left+n:Cl(as(e)).left+n}function O6(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-qv(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function xge(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",a=as(r),o=t?Bv(t.floating):!1;if(r===a||o&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ji(1);const u=Ji(0),f=es(r);if((f||!f&&!s)&&((Sf(r)!=="body"||Em(a))&&(l=Hv(r)),es(r))){const h=Cl(r);c=Zc(r),u.x=h.x+r.clientLeft,u.y=h.y+r.clientTop}const d=a&&!f&&!s?O6(a,l):Ji(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+d.x,y:n.y*c.y-l.scrollTop*c.y+u.y+d.y}}function kge(e){return Array.from(e.getClientRects())}function Ege(e){const t=as(e),n=Hv(e),r=e.ownerDocument.body,i=dr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=dr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+qv(e);const o=-n.scrollTop;return ki(r).direction==="rtl"&&(a+=dr(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:a,y:o}}const iM=25;function Cge(e,t){const n=xr(e),r=as(e),i=n.visualViewport;let s=r.clientWidth,a=r.clientHeight,o=0,l=0;if(i){s=i.width,a=i.height;const u=GC();(!u||u&&t==="fixed")&&(o=i.offsetLeft,l=i.offsetTop)}const c=qv(r);if(c<=0){const u=r.ownerDocument,f=u.body,d=getComputedStyle(f),h=u.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,p=Math.abs(r.clientWidth-f.clientWidth-h);p<=iM&&(s-=p)}else c<=iM&&(s+=c);return{width:s,height:a,x:o,y:l}}const Tge=new Set(["absolute","fixed"]);function Age(e,t){const n=Cl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=es(e)?Zc(e):Ji(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 sM(e,t,n){let r;if(t==="viewport")r=Cge(e,n);else if(t==="document")r=Ege(as(e));else if(xi(t))r=Age(t,n);else{const i=A6(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Hy(r)}function R6(e,t){const n=uo(e);return n===t||!xi(n)||zu(n)?!1:ki(n).position==="fixed"||R6(n,t)}function Oge(e,t){const n=t.get(e);if(n)return n;let r=Oh(e,[],!1).filter(o=>xi(o)&&Sf(o)!=="body"),i=null;const s=ki(e).position==="fixed";let a=s?uo(e):e;for(;xi(a)&&!zu(a);){const o=ki(a),l=KC(a);!l&&o.position==="fixed"&&(i=null),(s?!l&&!i:!l&&o.position==="static"&&!!i&&Tge.has(i.position)||Em(a)&&!l&&R6(e,a))?r=r.filter(u=>u!==a):i=o,a=uo(a)}return t.set(e,r),r}function Rge(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Bv(t)?[]:Oge(t,this._c):[].concat(n),r],o=a[0],l=a.reduce((c,u)=>{const f=sM(t,u,i);return c.top=dr(f.top,c.top),c.right=co(f.right,c.right),c.bottom=co(f.bottom,c.bottom),c.left=dr(f.left,c.left),c},sM(t,o,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Mge(e){const{width:t,height:n}=T6(e);return{width:t,height:n}}function Nge(e,t,n){const r=es(t),i=as(t),s=n==="fixed",a=Cl(e,!0,s,t);let o={scrollLeft:0,scrollTop:0};const l=Ji(0);function c(){l.x=qv(i)}if(r||!r&&!s)if((Sf(t)!=="body"||Em(i))&&(o=Hv(t)),r){const h=Cl(t,!0,s,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else i&&c();s&&!r&&i&&c();const u=i&&!r&&!s?O6(i,o):Ji(0),f=a.left+o.scrollLeft-l.x-u.x,d=a.top+o.scrollTop-l.y-u.y;return{x:f,y:d,width:a.width,height:a.height}}function z0(e){return ki(e).position==="static"}function aM(e,t){if(!es(e)||ki(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return as(e)===n&&(n=n.ownerDocument.body),n}function M6(e,t){const n=xr(e);if(Bv(e))return n;if(!es(e)){let i=uo(e);for(;i&&!zu(i);){if(xi(i)&&!z0(i))return i;i=uo(i)}return n}let r=aM(e,t);for(;r&&mge(r)&&z0(r);)r=aM(r,t);return r&&zu(r)&&z0(r)&&!KC(r)?n:r||vge(e)||n}const Dge=async function(e){const t=this.getOffsetParent||M6,n=this.getDimensions,r=await n(e.floating);return{reference:Nge(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function zge(e){return ki(e).direction==="rtl"}const Ige={convertOffsetParentRelativeRectToViewportRelativeRect:xge,getDocumentElement:as,getClippingRect:Rge,getOffsetParent:M6,getElementRects:Dge,getClientRects:kge,getDimensions:Mge,getScale:Zc,isElement:xi,isRTL:zge};function N6(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function $ge(e,t){let n=null,r;const i=as(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:u,top:f,width:d,height:h}=c;if(o||t(),!d||!h)return;const p=dp(f),b=dp(i.clientWidth-(u+d)),S=dp(i.clientHeight-(f+h)),m=dp(u),v={rootMargin:-p+"px "+-b+"px "+-S+"px "+-m+"px",threshold:dr(0,co(1,l))||1};let _=!0;function A(E){const T=E[0].intersectionRatio;if(T!==l){if(!_)return a();T?a(!1,T):r=setTimeout(()=>{a(!1,1e-7)},1e3)}T===1&&!N6(c,e.getBoundingClientRect())&&a(),_=!1}try{n=new IntersectionObserver(A,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,v)}n.observe(e)}return a(!0),s}function Lge(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=YC(e),u=i||s?[...c?Oh(c):[],...Oh(t)]:[];u.forEach(m=>{i&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const f=c&&o?$ge(c,n):null;let d=-1,h=null;a&&(h=new ResizeObserver(m=>{let[y]=m;y&&y.target===c&&h&&(h.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{var v;(v=h)==null||v.observe(t)})),n()}),c&&!l&&h.observe(c),h.observe(t));let p,b=l?Cl(e):null;l&&S();function S(){const m=Cl(e);b&&!N6(b,m)&&n(),b=m,p=requestAnimationFrame(S)}return n(),()=>{var m;u.forEach(y=>{i&&y.removeEventListener("scroll",n),s&&y.removeEventListener("resize",n)}),f==null||f(),(m=h)==null||m.disconnect(),h=null,l&&cancelAnimationFrame(p)}}const Fge=lge,jge=cge,Pge=sge,Uge=fge,Bge=age,oM=ige,Hge=uge,qge=(e,t,n)=>{const r=new Map,i={platform:Ige,...n},s={...i.platform,_c:r};return rge(e,t,{...i,platform:s})};var Vge=typeof document<"u",Kge=function(){},ig=Vge?w.useLayoutEffect:Kge;function qy(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(!qy(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)&&!qy(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function D6(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function lM(e,t){const n=D6(e);return Math.round(t*n)/n}function I0(e){const t=w.useRef(e);return ig(()=>{t.current=e}),t}function Gge(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,[u,f]=w.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,h]=w.useState(r);qy(d,r)||h(r);const[p,b]=w.useState(null),[S,m]=w.useState(null),y=w.useCallback(I=>{I!==E.current&&(E.current=I,b(I))},[]),v=w.useCallback(I=>{I!==T.current&&(T.current=I,m(I))},[]),_=s||p,A=a||S,E=w.useRef(null),T=w.useRef(null),N=w.useRef(u),D=l!=null,M=I0(l),$=I0(i),L=I0(c),J=w.useCallback(()=>{if(!E.current||!T.current)return;const I={placement:t,strategy:n,middleware:d};$.current&&(I.platform=$.current),qge(E.current,T.current,I).then(te=>{const R={...te,isPositioned:L.current!==!1};Y.current&&!qy(N.current,R)&&(N.current=R,Lu.flushSync(()=>{f(R)}))})},[d,t,n,$,L]);ig(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(I=>({...I,isPositioned:!1})))},[c]);const Y=w.useRef(!1);ig(()=>(Y.current=!0,()=>{Y.current=!1}),[]),ig(()=>{if(_&&(E.current=_),A&&(T.current=A),_&&A){if(M.current)return M.current(_,A,J);J()}},[_,A,J,M,D]);const G=w.useMemo(()=>({reference:E,floating:T,setReference:y,setFloating:v}),[y,v]),z=w.useMemo(()=>({reference:_,floating:A}),[_,A]),F=w.useMemo(()=>{const I={position:n,left:0,top:0};if(!z.floating)return I;const te=lM(z.floating,u.x),R=lM(z.floating,u.y);return o?{...I,transform:"translate("+te+"px, "+R+"px)",...D6(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:te,top:R}},[n,o,z.floating,u.x,u.y]);return w.useMemo(()=>({...u,update:J,refs:G,elements:z,floatingStyles:F}),[u,J,G,z,F])}const Yge=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?oM({element:r.current,padding:i}).fn(n):{}:r?oM({element:r,padding:i}).fn(n):{}}}},Jge=(e,t)=>({...Fge(e),options:[e,t]}),Qge=(e,t)=>({...jge(e),options:[e,t]}),Xge=(e,t)=>({...Hge(e),options:[e,t]}),Wge=(e,t)=>({...Pge(e),options:[e,t]}),Zge=(e,t)=>({...Uge(e),options:[e,t]}),eye=(e,t)=>({...Bge(e),options:[e,t]}),tye=(e,t)=>({...Yge(e),options:[e,t]});var nye="Arrow",z6=w.forwardRef((e,t)=>{const{children:n,width:r=10,height:i=5,...s}=e;return k.jsx(qe.svg,{...s,ref:t,width:r,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:k.jsx("polygon",{points:"0,0 30,0 15,10"})})});z6.displayName=nye;var rye=z6,JC="Popper",[I6,$6]=bf(JC),[iye,L6]=I6(JC),F6=e=>{const{__scopePopper:t,children:n}=e,[r,i]=w.useState(null);return k.jsx(iye,{scope:t,anchor:r,onAnchorChange:i,children:n})};F6.displayName=JC;var j6="PopperAnchor",P6=w.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...i}=e,s=L6(j6,n),a=w.useRef(null),o=Ct(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:k.jsx(qe.div,{...i,ref:o})});P6.displayName=j6;var QC="PopperContent",[sye,aye]=I6(QC),U6=w.forwardRef((e,t)=>{var H,he,we,_e,Me,$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:u=0,sticky:f="partial",hideWhenDetached:d=!1,updatePositionStrategy:h="optimized",onPlaced:p,...b}=e,S=L6(QC,n),[m,y]=w.useState(null),v=Ct(t,Dn=>y(Dn)),[_,A]=w.useState(null),E=qpe(_),T=(E==null?void 0:E.width)??0,N=(E==null?void 0:E.height)??0,D=r+(s!=="center"?"-"+s:""),M=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},$=Array.isArray(c)?c:[c],L=$.length>0,J={padding:M,boundary:$.filter(lye),altBoundary:L},{refs:Y,floatingStyles:G,placement:z,isPositioned:F,middlewareData:I}=Gge({strategy:"fixed",placement:D,whileElementsMounted:(...Dn)=>Lge(...Dn,{animationFrame:h==="always"}),elements:{reference:S.anchor},middleware:[Jge({mainAxis:i+N,alignmentAxis:a}),l&&Qge({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?Xge():void 0,...J}),l&&Wge({...J}),Zge({...J,apply:({elements:Dn,rects:Ar,availableWidth:na,availableHeight:ra})=>{const{width:ia,height:eS}=Ar.reference,Eo=Dn.floating.style;Eo.setProperty("--radix-popper-available-width",`${na}px`),Eo.setProperty("--radix-popper-available-height",`${ra}px`),Eo.setProperty("--radix-popper-anchor-width",`${ia}px`),Eo.setProperty("--radix-popper-anchor-height",`${eS}px`)}}),_&&tye({element:_,padding:o}),cye({arrowWidth:T,arrowHeight:N}),d&&eye({strategy:"referenceHidden",...J})]}),[te,R]=q6(z),Re=oo(p);Mn(()=>{F&&(Re==null||Re())},[F,Re]);const U=(H=I.arrow)==null?void 0:H.x,C=(he=I.arrow)==null?void 0:he.y,X=((we=I.arrow)==null?void 0:we.centerOffset)!==0,[W,le]=w.useState();return Mn(()=>{m&&le(window.getComputedStyle(m).zIndex)},[m]),k.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...G,transform:F?G.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(_e=I.transformOrigin)==null?void 0:_e.x,(Me=I.transformOrigin)==null?void 0:Me.y].join(" "),...(($e=I.hide)==null?void 0:$e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:k.jsx(sye,{scope:n,placedSide:te,onArrowChange:A,arrowX:U,arrowY:C,shouldHideArrow:X,children:k.jsx(qe.div,{"data-side":te,"data-align":R,...b,ref:v,style:{...b.style,animation:F?void 0:"none"}})})})});U6.displayName=QC;var B6="PopperArrow",oye={top:"bottom",right:"left",bottom:"top",left:"right"},H6=w.forwardRef(function(t,n){const{__scopePopper:r,...i}=t,s=aye(B6,r),a=oye[s.placedSide];return k.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:k.jsx(rye,{...i,ref:n,style:{...i.style,display:"block"}})})});H6.displayName=B6;function lye(e){return e!==null}var cye=e=>({name:"transformOrigin",options:e,fn(t){var S,m,y;const{placement:n,rects:r,middlewareData:i}=t,a=((S=i.arrow)==null?void 0:S.centerOffset)!==0,o=a?0:e.arrowWidth,l=a?0:e.arrowHeight,[c,u]=q6(n),f={start:"0%",center:"50%",end:"100%"}[u],d=(((m=i.arrow)==null?void 0:m.x)??0)+o/2,h=(((y=i.arrow)==null?void 0:y.y)??0)+l/2;let p="",b="";return c==="bottom"?(p=a?f:`${d}px`,b=`${-l}px`):c==="top"?(p=a?f:`${d}px`,b=`${r.floating.height+l}px`):c==="right"?(p=`${-l}px`,b=a?f:`${h}px`):c==="left"&&(p=`${r.floating.width+l}px`,b=a?f:`${h}px`),{data:{x:p,y:b}}}});function q6(e){const[t,n="center"]=e.split("-");return[t,n]}var uye=F6,fye=P6,dye=U6,hye=H6,$0="rovingFocusGroup.onEntryFocus",mye={bubbles:!1,cancelable:!0},Cm="RovingFocusGroup",[U1,V6,pye]=_6(Cm),[gye,K6]=bf(Cm,[pye]),[yye,bye]=gye(Cm),G6=w.forwardRef((e,t)=>k.jsx(U1.Provider,{scope:e.__scopeRovingFocusGroup,children:k.jsx(U1.Slot,{scope:e.__scopeRovingFocusGroup,children:k.jsx(vye,{...e,ref:t})})}));G6.displayName=Cm;var vye=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:s,currentTabStopId:a,defaultCurrentTabStopId:o,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,d=w.useRef(null),h=Ct(t,d),p=BC(s),[b,S]=xl({prop:a,defaultProp:o??null,onChange:l,caller:Cm}),[m,y]=w.useState(!1),v=oo(c),_=V6(n),A=w.useRef(!1),[E,T]=w.useState(0);return w.useEffect(()=>{const N=d.current;if(N)return N.addEventListener($0,v),()=>N.removeEventListener($0,v)},[v]),k.jsx(yye,{scope:n,orientation:r,dir:p,loop:i,currentTabStopId:b,onItemFocus:w.useCallback(N=>S(N),[S]),onItemShiftTab:w.useCallback(()=>y(!0),[]),onFocusableItemAdd:w.useCallback(()=>T(N=>N+1),[]),onFocusableItemRemove:w.useCallback(()=>T(N=>N-1),[]),children:k.jsx(qe.div,{tabIndex:m||E===0?-1:0,"data-orientation":r,...f,ref:h,style:{outline:"none",...e.style},onMouseDown:He(e.onMouseDown,()=>{A.current=!0}),onFocus:He(e.onFocus,N=>{const D=!A.current;if(N.target===N.currentTarget&&D&&!m){const M=new CustomEvent($0,mye);if(N.currentTarget.dispatchEvent(M),!M.defaultPrevented){const $=_().filter(z=>z.focusable),L=$.find(z=>z.active),J=$.find(z=>z.id===b),G=[L,J,...$].filter(Boolean).map(z=>z.ref.current);Q6(G,u)}}A.current=!1}),onBlur:He(e.onBlur,()=>y(!1))})})}),Y6="RovingFocusGroupItem",J6=w.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:s,children:a,...o}=e,l=_r(),c=s||l,u=bye(Y6,n),f=u.currentTabStopId===c,d=V6(n),{onFocusableItemAdd:h,onFocusableItemRemove:p,currentTabStopId:b}=u;return w.useEffect(()=>{if(r)return h(),()=>p()},[r,h,p]),k.jsx(U1.ItemSlot,{scope:n,id:c,focusable:r,active:i,children:k.jsx(qe.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...o,ref:t,onMouseDown:He(e.onMouseDown,S=>{r?u.onItemFocus(c):S.preventDefault()}),onFocus:He(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:He(e.onKeyDown,S=>{if(S.key==="Tab"&&S.shiftKey){u.onItemShiftTab();return}if(S.target!==S.currentTarget)return;const m=_ye(S,u.orientation,u.dir);if(m!==void 0){if(S.metaKey||S.ctrlKey||S.altKey||S.shiftKey)return;S.preventDefault();let v=d().filter(_=>_.focusable).map(_=>_.ref.current);if(m==="last")v.reverse();else if(m==="prev"||m==="next"){m==="prev"&&v.reverse();const _=v.indexOf(S.currentTarget);v=u.loop?xye(v,_+1):v.slice(_+1)}setTimeout(()=>Q6(v))}}),children:typeof a=="function"?a({isCurrentTabStop:f,hasTabStop:b!=null}):a})})});J6.displayName=Y6;var Sye={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wye(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function _ye(e,t,n){const r=wye(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Sye[r]}function Q6(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function xye(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var kye=G6,Eye=J6;function cM(e,[t,n]){return Math.min(n,Math.max(t,e))}var Cye=[" ","Enter","ArrowUp","ArrowDown"],Tye=[" ","Enter"],Tl="Select",[Vv,Kv,Aye]=_6(Tl),[wf]=bf(Tl,[Aye,$6]),Gv=$6(),[Oye,wo]=wf(Tl),[Rye,Mye]=wf(Tl),X6=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:s,value:a,defaultValue:o,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:d,required:h,form:p}=e,b=Gv(t),[S,m]=w.useState(null),[y,v]=w.useState(null),[_,A]=w.useState(!1),E=BC(c),[T,N]=xl({prop:r,defaultProp:i??!1,onChange:s,caller:Tl}),[D,M]=xl({prop:a,defaultProp:o,onChange:l,caller:Tl}),$=w.useRef(null),L=S?p||!!S.closest("form"):!0,[J,Y]=w.useState(new Set),G=Array.from(J).map(z=>z.props.value).join(";");return k.jsx(uye,{...b,children:k.jsxs(Oye,{required:h,scope:t,trigger:S,onTriggerChange:m,valueNode:y,onValueNodeChange:v,valueNodeHasChildren:_,onValueNodeHasChildrenChange:A,contentId:_r(),value:D,onValueChange:M,open:T,onOpenChange:N,dir:E,triggerPointerDownPosRef:$,disabled:d,children:[k.jsx(Vv.Provider,{scope:t,children:k.jsx(Rye,{scope:e.__scopeSelect,onNativeOptionAdd:w.useCallback(z=>{Y(F=>new Set(F).add(z))},[]),onNativeOptionRemove:w.useCallback(z=>{Y(F=>{const I=new Set(F);return I.delete(z),I})},[]),children:n})}),L?k.jsxs(v5,{"aria-hidden":!0,required:h,tabIndex:-1,name:u,autoComplete:f,value:D,onChange:z=>M(z.target.value),disabled:d,form:p,children:[D===void 0?k.jsx("option",{value:""}):null,Array.from(J)]},G):null]})})};X6.displayName=Tl;var W6="SelectTrigger",Z6=w.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...i}=e,s=Gv(n),a=wo(W6,n),o=a.disabled||r,l=Ct(t,a.onTriggerChange),c=Kv(n),u=w.useRef("touch"),[f,d,h]=w5(b=>{const S=c().filter(v=>!v.disabled),m=S.find(v=>v.value===a.value),y=_5(S,b,m);y!==void 0&&a.onValueChange(y.value)}),p=b=>{o||(a.onOpenChange(!0),h()),b&&(a.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return k.jsx(fye,{asChild:!0,...s,children:k.jsx(qe.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":S5(a.value)?"":void 0,...i,ref:l,onClick:He(i.onClick,b=>{b.currentTarget.focus(),u.current!=="mouse"&&p(b)}),onPointerDown:He(i.onPointerDown,b=>{u.current=b.pointerType;const S=b.target;S.hasPointerCapture(b.pointerId)&&S.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(p(b),b.preventDefault())}),onKeyDown:He(i.onKeyDown,b=>{const S=f.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&d(b.key),!(S&&b.key===" ")&&Cye.includes(b.key)&&(p(),b.preventDefault())})})})});Z6.displayName=W6;var e5="SelectValue",t5=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,children:s,placeholder:a="",...o}=e,l=wo(e5,n),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,f=Ct(t,l.onValueNodeChange);return Mn(()=>{c(u)},[c,u]),k.jsx(qe.span,{...o,ref:f,style:{pointerEvents:"none"},children:S5(l.value)?k.jsx(k.Fragment,{children:a}):s})});t5.displayName=e5;var Nye="SelectIcon",n5=w.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...i}=e;return k.jsx(qe.span,{"aria-hidden":!0,...i,ref:t,children:r||"▼"})});n5.displayName=Nye;var Dye="SelectPortal",r5=e=>k.jsx($C,{asChild:!0,...e});r5.displayName=Dye;var Al="SelectContent",i5=w.forwardRef((e,t)=>{const n=wo(Al,e.__scopeSelect),[r,i]=w.useState();if(Mn(()=>{i(new DocumentFragment)},[]),!n.open){const s=r;return s?Lu.createPortal(k.jsx(s5,{scope:e.__scopeSelect,children:k.jsx(Vv.Slot,{scope:e.__scopeSelect,children:k.jsx("div",{children:e.children})})}),s):null}return k.jsx(a5,{...e,ref:t})});i5.displayName=Al;var ri=10,[s5,_o]=wf(Al),zye="SelectContentImpl",Iye=Du("SelectContent.RemoveScroll"),a5=w.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:s,onPointerDownOutside:a,side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:b,avoidCollisions:S,...m}=e,y=wo(Al,n),[v,_]=w.useState(null),[A,E]=w.useState(null),T=Ct(t,H=>_(H)),[N,D]=w.useState(null),[M,$]=w.useState(null),L=Kv(n),[J,Y]=w.useState(!1),G=w.useRef(!1);w.useEffect(()=>{if(v)return GB(v)},[v]),FB();const z=w.useCallback(H=>{const[he,...we]=L().map($e=>$e.ref.current),[_e]=we.slice(-1),Me=document.activeElement;for(const $e of H)if($e===Me||($e==null||$e.scrollIntoView({block:"nearest"}),$e===he&&A&&(A.scrollTop=0),$e===_e&&A&&(A.scrollTop=A.scrollHeight),$e==null||$e.focus(),document.activeElement!==Me))return},[L,A]),F=w.useCallback(()=>z([N,v]),[z,N,v]);w.useEffect(()=>{J&&F()},[J,F]);const{onOpenChange:I,triggerPointerDownPosRef:te}=y;w.useEffect(()=>{if(v){let H={x:0,y:0};const he=_e=>{var Me,$e;H={x:Math.abs(Math.round(_e.pageX)-(((Me=te.current)==null?void 0:Me.x)??0)),y:Math.abs(Math.round(_e.pageY)-((($e=te.current)==null?void 0:$e.y)??0))}},we=_e=>{H.x<=10&&H.y<=10?_e.preventDefault():v.contains(_e.target)||I(!1),document.removeEventListener("pointermove",he),te.current=null};return te.current!==null&&(document.addEventListener("pointermove",he),document.addEventListener("pointerup",we,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",he),document.removeEventListener("pointerup",we,{capture:!0})}}},[v,I,te]),w.useEffect(()=>{const H=()=>I(!1);return window.addEventListener("blur",H),window.addEventListener("resize",H),()=>{window.removeEventListener("blur",H),window.removeEventListener("resize",H)}},[I]);const[R,Re]=w5(H=>{const he=L().filter(Me=>!Me.disabled),we=he.find(Me=>Me.ref.current===document.activeElement),_e=_5(he,H,we);_e&&setTimeout(()=>_e.ref.current.focus())}),U=w.useCallback((H,he,we)=>{const _e=!G.current&&!we;(y.value!==void 0&&y.value===he||_e)&&(D(H),_e&&(G.current=!0))},[y.value]),C=w.useCallback(()=>v==null?void 0:v.focus(),[v]),X=w.useCallback((H,he,we)=>{const _e=!G.current&&!we;(y.value!==void 0&&y.value===he||_e)&&$(H)},[y.value]),W=r==="popper"?B1:o5,le=W===B1?{side:o,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:h,sticky:p,hideWhenDetached:b,avoidCollisions:S}:{};return k.jsx(s5,{scope:n,content:v,viewport:A,onViewportChange:E,itemRefCallback:U,selectedItem:N,onItemLeave:C,itemTextRefCallback:X,focusSelectedItem:F,selectedItemText:M,position:r,isPositioned:J,searchRef:R,children:k.jsx(LC,{as:Iye,allowPinchZoom:!0,children:k.jsx(IC,{asChild:!0,trapped:y.open,onMountAutoFocus:H=>{H.preventDefault()},onUnmountAutoFocus:He(i,H=>{var he;(he=y.trigger)==null||he.focus({preventScroll:!0}),H.preventDefault()}),children:k.jsx(zC,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:a,onFocusOutside:H=>H.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:k.jsx(W,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:H=>H.preventDefault(),...m,...le,onPlaced:()=>Y(!0),ref:T,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:He(m.onKeyDown,H=>{const he=H.ctrlKey||H.altKey||H.metaKey;if(H.key==="Tab"&&H.preventDefault(),!he&&H.key.length===1&&Re(H.key),["ArrowUp","ArrowDown","Home","End"].includes(H.key)){let _e=L().filter(Me=>!Me.disabled).map(Me=>Me.ref.current);if(["ArrowUp","End"].includes(H.key)&&(_e=_e.slice().reverse()),["ArrowUp","ArrowDown"].includes(H.key)){const Me=H.target,$e=_e.indexOf(Me);_e=_e.slice($e+1)}setTimeout(()=>z(_e)),H.preventDefault()}})})})})})})});a5.displayName=zye;var $ye="SelectItemAlignedPosition",o5=w.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...i}=e,s=wo(Al,n),a=_o(Al,n),[o,l]=w.useState(null),[c,u]=w.useState(null),f=Ct(t,T=>u(T)),d=Kv(n),h=w.useRef(!1),p=w.useRef(!0),{viewport:b,selectedItem:S,selectedItemText:m,focusSelectedItem:y}=a,v=w.useCallback(()=>{if(s.trigger&&s.valueNode&&o&&c&&b&&S&&m){const T=s.trigger.getBoundingClientRect(),N=c.getBoundingClientRect(),D=s.valueNode.getBoundingClientRect(),M=m.getBoundingClientRect();if(s.dir!=="rtl"){const Me=M.left-N.left,$e=D.left-Me,Dn=T.left-$e,Ar=T.width+Dn,na=Math.max(Ar,N.width),ra=window.innerWidth-ri,ia=cM($e,[ri,Math.max(ri,ra-na)]);o.style.minWidth=Ar+"px",o.style.left=ia+"px"}else{const Me=N.right-M.right,$e=window.innerWidth-D.right-Me,Dn=window.innerWidth-T.right-$e,Ar=T.width+Dn,na=Math.max(Ar,N.width),ra=window.innerWidth-ri,ia=cM($e,[ri,Math.max(ri,ra-na)]);o.style.minWidth=Ar+"px",o.style.right=ia+"px"}const $=d(),L=window.innerHeight-ri*2,J=b.scrollHeight,Y=window.getComputedStyle(c),G=parseInt(Y.borderTopWidth,10),z=parseInt(Y.paddingTop,10),F=parseInt(Y.borderBottomWidth,10),I=parseInt(Y.paddingBottom,10),te=G+z+J+I+F,R=Math.min(S.offsetHeight*5,te),Re=window.getComputedStyle(b),U=parseInt(Re.paddingTop,10),C=parseInt(Re.paddingBottom,10),X=T.top+T.height/2-ri,W=L-X,le=S.offsetHeight/2,H=S.offsetTop+le,he=G+z+H,we=te-he;if(he<=X){const Me=$.length>0&&S===$[$.length-1].ref.current;o.style.bottom="0px";const $e=c.clientHeight-b.offsetTop-b.offsetHeight,Dn=Math.max(W,le+(Me?C:0)+$e+F),Ar=he+Dn;o.style.height=Ar+"px"}else{const Me=$.length>0&&S===$[0].ref.current;o.style.top="0px";const Dn=Math.max(X,G+b.offsetTop+(Me?U:0)+le)+we;o.style.height=Dn+"px",b.scrollTop=he-X+b.offsetTop}o.style.margin=`${ri}px 0`,o.style.minHeight=R+"px",o.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[d,s.trigger,s.valueNode,o,c,b,S,m,s.dir,r]);Mn(()=>v(),[v]);const[_,A]=w.useState();Mn(()=>{c&&A(window.getComputedStyle(c).zIndex)},[c]);const E=w.useCallback(T=>{T&&p.current===!0&&(v(),y==null||y(),p.current=!1)},[v,y]);return k.jsx(Fye,{scope:n,contentWrapper:o,shouldExpandOnScrollRef:h,onScrollButtonChange:E,children:k.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:_},children:k.jsx(qe.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});o5.displayName=$ye;var Lye="SelectPopperPosition",B1=w.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:i=ri,...s}=e,a=Gv(n);return k.jsx(dye,{...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)"}})});B1.displayName=Lye;var[Fye,XC]=wf(Al,{}),H1="SelectViewport",l5=w.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...i}=e,s=_o(H1,n),a=XC(H1,n),o=Ct(t,s.onViewportChange),l=w.useRef(0);return k.jsxs(k.Fragment,{children:[k.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}),k.jsx(Vv.Slot,{scope:n,children:k.jsx(qe.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:o,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:He(i.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:d}=a;if(d!=null&&d.current&&f){const h=Math.abs(l.current-u.scrollTop);if(h>0){const p=window.innerHeight-ri*2,b=parseFloat(f.style.minHeight),S=parseFloat(f.style.height),m=Math.max(b,S);if(m<p){const y=m+h,v=Math.min(p,y),_=y-v;f.style.height=v+"px",f.style.bottom==="0px"&&(u.scrollTop=_>0?_:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});l5.displayName=H1;var c5="SelectGroup",[jye,Pye]=wf(c5),Uye=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=_r();return k.jsx(jye,{scope:n,id:i,children:k.jsx(qe.div,{role:"group","aria-labelledby":i,...r,ref:t})})});Uye.displayName=c5;var u5="SelectLabel",Bye=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Pye(u5,n);return k.jsx(qe.div,{id:i.id,...r,ref:t})});Bye.displayName=u5;var Vy="SelectItem",[Hye,f5]=wf(Vy),d5=w.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:i=!1,textValue:s,...a}=e,o=wo(Vy,n),l=_o(Vy,n),c=o.value===r,[u,f]=w.useState(s??""),[d,h]=w.useState(!1),p=Ct(t,y=>{var v;return(v=l.itemRefCallback)==null?void 0:v.call(l,y,r,i)}),b=_r(),S=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 k.jsx(Hye,{scope:n,value:r,disabled:i,textId:b,isSelected:c,onItemTextChange:w.useCallback(y=>{f(v=>v||((y==null?void 0:y.textContent)??"").trim())},[]),children:k.jsx(Vv.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:k.jsx(qe.div,{role:"option","aria-labelledby":b,"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:p,onFocus:He(a.onFocus,()=>h(!0)),onBlur:He(a.onBlur,()=>h(!1)),onClick:He(a.onClick,()=>{S.current!=="mouse"&&m()}),onPointerUp:He(a.onPointerUp,()=>{S.current==="mouse"&&m()}),onPointerDown:He(a.onPointerDown,y=>{S.current=y.pointerType}),onPointerMove:He(a.onPointerMove,y=>{var v;S.current=y.pointerType,i?(v=l.onItemLeave)==null||v.call(l):S.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:He(a.onPointerLeave,y=>{var v;y.currentTarget===document.activeElement&&((v=l.onItemLeave)==null||v.call(l))}),onKeyDown:He(a.onKeyDown,y=>{var _;((_=l.searchRef)==null?void 0:_.current)!==""&&y.key===" "||(Tye.includes(y.key)&&m(),y.key===" "&&y.preventDefault())})})})})});d5.displayName=Vy;var cd="SelectItemText",h5=w.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:i,...s}=e,a=wo(cd,n),o=_o(cd,n),l=f5(cd,n),c=Mye(cd,n),[u,f]=w.useState(null),d=Ct(t,m=>f(m),l.onItemTextChange,m=>{var y;return(y=o.itemTextRefCallback)==null?void 0:y.call(o,m,l.value,l.disabled)}),h=u==null?void 0:u.textContent,p=w.useMemo(()=>k.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:b,onNativeOptionRemove:S}=c;return Mn(()=>(b(p),()=>S(p)),[b,S,p]),k.jsxs(k.Fragment,{children:[k.jsx(qe.span,{id:l.textId,...s,ref:d}),l.isSelected&&a.valueNode&&!a.valueNodeHasChildren?Lu.createPortal(s.children,a.valueNode):null]})});h5.displayName=cd;var m5="SelectItemIndicator",p5=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f5(m5,n).isSelected?k.jsx(qe.span,{"aria-hidden":!0,...r,ref:t}):null});p5.displayName=m5;var q1="SelectScrollUpButton",g5=w.forwardRef((e,t)=>{const n=_o(q1,e.__scopeSelect),r=XC(q1,e.__scopeSelect),[i,s]=w.useState(!1),a=Ct(t,r.onScrollButtonChange);return Mn(()=>{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?k.jsx(b5,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop-l.offsetHeight)}}):null});g5.displayName=q1;var V1="SelectScrollDownButton",y5=w.forwardRef((e,t)=>{const n=_o(V1,e.__scopeSelect),r=XC(V1,e.__scopeSelect),[i,s]=w.useState(!1),a=Ct(t,r.onScrollButtonChange);return Mn(()=>{if(n.viewport&&n.isPositioned){let o=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=n.viewport;return o(),l.addEventListener("scroll",o),()=>l.removeEventListener("scroll",o)}},[n.viewport,n.isPositioned]),i?k.jsx(b5,{...e,ref:a,onAutoScroll:()=>{const{viewport:o,selectedItem:l}=n;o&&l&&(o.scrollTop=o.scrollTop+l.offsetHeight)}}):null});y5.displayName=V1;var b5=w.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...i}=e,s=_o("SelectScrollButton",n),a=w.useRef(null),o=Kv(n),l=w.useCallback(()=>{a.current!==null&&(window.clearInterval(a.current),a.current=null)},[]);return w.useEffect(()=>()=>l(),[l]),Mn(()=>{var u;const c=o().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[o]),k.jsx(qe.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:He(i.onPointerDown,()=>{a.current===null&&(a.current=window.setInterval(r,50))}),onPointerMove:He(i.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),a.current===null&&(a.current=window.setInterval(r,50))}),onPointerLeave:He(i.onPointerLeave,()=>{l()})})}),qye="SelectSeparator",Vye=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return k.jsx(qe.div,{"aria-hidden":!0,...r,ref:t})});Vye.displayName=qye;var K1="SelectArrow",Kye=w.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,i=Gv(n),s=wo(K1,n),a=_o(K1,n);return s.open&&a.position==="popper"?k.jsx(hye,{...i,...r,ref:t}):null});Kye.displayName=K1;var Gye="SelectBubbleInput",v5=w.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const i=w.useRef(null),s=Ct(r,i),a=Hpe(t);return w.useEffect(()=>{const o=i.current;if(!o)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(a!==t&&u){const f=new Event("change",{bubbles:!0});u.call(o,t),o.dispatchEvent(f)}},[a,t]),k.jsx(qe.select,{...n,style:{...w6,...n.style},ref:s,defaultValue:t})});v5.displayName=Gye;function S5(e){return e===""||e===void 0}function w5(e){const t=oo(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 _5(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=Yye(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 Yye(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Jye=X6,Qye=Z6,Xye=t5,Wye=n5,Zye=r5,ebe=i5,tbe=l5,nbe=d5,rbe=h5,ibe=p5,sbe=g5,abe=y5,obe="Separator",uM="horizontal",lbe=["horizontal","vertical"],x5=w.forwardRef((e,t)=>{const{decorative:n,orientation:r=uM,...i}=e,s=cbe(r)?r:uM,o=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return k.jsx(qe.div,{"data-orientation":s,...o,...i,ref:t})});x5.displayName=obe;function cbe(e){return lbe.includes(e)}var ube=x5,k5="Toggle",E5=w.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r,onPressedChange:i,...s}=e,[a,o]=xl({prop:n,onChange:i,defaultProp:r??!1,caller:k5});return k.jsx(qe.button,{type:"button","aria-pressed":a,"data-state":a?"on":"off","data-disabled":e.disabled?"":void 0,...s,ref:t,onClick:He(e.onClick,()=>{e.disabled||o(!a)})})});E5.displayName=k5;var xo="ToggleGroup",[C5]=bf(xo,[K6]),T5=K6(),WC=jt.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const i=r;return k.jsx(fbe,{...i,ref:t})}if(n==="multiple"){const i=r;return k.jsx(dbe,{...i,ref:t})}throw new Error(`Missing prop \`type\` expected on \`${xo}\``)});WC.displayName=xo;var[A5,O5]=C5(xo),fbe=jt.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=xl({prop:n,defaultProp:r??"",onChange:i,caller:xo});return k.jsx(A5,{scope:e.__scopeToggleGroup,type:"single",value:jt.useMemo(()=>a?[a]:[],[a]),onItemActivate:o,onItemDeactivate:jt.useCallback(()=>o(""),[o]),children:k.jsx(R5,{...s,ref:t})})}),dbe=jt.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:i=()=>{},...s}=e,[a,o]=xl({prop:n,defaultProp:r??[],onChange:i,caller:xo}),l=jt.useCallback(u=>o((f=[])=>[...f,u]),[o]),c=jt.useCallback(u=>o((f=[])=>f.filter(d=>d!==u)),[o]);return k.jsx(A5,{scope:e.__scopeToggleGroup,type:"multiple",value:a,onItemActivate:l,onItemDeactivate:c,children:k.jsx(R5,{...s,ref:t})})});WC.displayName=xo;var[hbe,mbe]=C5(xo),R5=jt.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:s,dir:a,loop:o=!0,...l}=e,c=T5(n),u=BC(a),f={role:"group",dir:u,...l};return k.jsx(hbe,{scope:n,rovingFocus:i,disabled:r,children:i?k.jsx(kye,{asChild:!0,...c,orientation:s,dir:u,loop:o,children:k.jsx(qe.div,{...f,ref:t})}):k.jsx(qe.div,{...f,ref:t})})}),Ky="ToggleGroupItem",M5=jt.forwardRef((e,t)=>{const n=O5(Ky,e.__scopeToggleGroup),r=mbe(Ky,e.__scopeToggleGroup),i=T5(e.__scopeToggleGroup),s=n.value.includes(e.value),a=r.disabled||e.disabled,o={...e,pressed:s,disabled:a},l=jt.useRef(null);return r.rovingFocus?k.jsx(Eye,{asChild:!0,...i,focusable:!a,active:s,ref:l,children:k.jsx(fM,{...o,ref:t})}):k.jsx(fM,{...o,ref:t})});M5.displayName=Ky;var fM=jt.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...i}=e,s=O5(Ky,n),a={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},o=s.type==="single"?a:void 0;return k.jsx(E5,{...o,...i,ref:t,onPressedChange:l=>{l?s.onItemActivate(r):s.onItemDeactivate(r)}})}),pbe=WC,gbe=M5;function N5(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=N5(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function D5(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=N5(e))&&(r&&(r+=" "),r+=t);return r}const ybe=(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},bbe=(e,t)=>({classGroupId:e,validator:t}),z5=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),Gy="-",dM=[],vbe="arbitrary..",Sbe=e=>{const t=_be(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return wbe(a);const o=a.split(Gy),l=o[0]===""&&o.length>1?1:0;return I5(o,l,t)},getConflictingClassGroupIds:(a,o)=>{if(o){const l=r[a],c=n[a];return l?c?ybe(c,l):l:c||dM}return n[a]||dM}}},I5=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],s=n.nextPart.get(i);if(s){const c=I5(e,t+1,s);if(c)return c}const a=n.validators;if(a===null)return;const o=t===0?e.join(Gy):e.slice(t).join(Gy),l=a.length;for(let c=0;c<l;c++){const u=a[c];if(u.validator(o))return u.classGroupId}},wbe=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?vbe+r:void 0})(),_be=e=>{const{theme:t,classGroups:n}=e;return xbe(n,t)},xbe=(e,t)=>{const n=z5();for(const r in e){const i=e[r];ZC(i,n,r,t)}return n},ZC=(e,t,n,r)=>{const i=e.length;for(let s=0;s<i;s++){const a=e[s];kbe(a,t,n,r)}},kbe=(e,t,n,r)=>{if(typeof e=="string"){Ebe(e,t,n);return}if(typeof e=="function"){Cbe(e,t,n,r);return}Tbe(e,t,n,r)},Ebe=(e,t,n)=>{const r=e===""?t:$5(t,e);r.classGroupId=n},Cbe=(e,t,n,r)=>{if(Abe(e)){ZC(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(bbe(n,e))},Tbe=(e,t,n,r)=>{const i=Object.entries(e),s=i.length;for(let a=0;a<s;a++){const[o,l]=i[a];ZC(l,$5(t,o),n,r)}},$5=(e,t)=>{let n=e;const r=t.split(Gy),i=r.length;for(let s=0;s<i;s++){const a=r[s];let o=n.nextPart.get(a);o||(o=z5(),n.nextPart.set(a,o)),n=o}return n},Abe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,Obe=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)}}},G1="!",hM=":",Rbe=[],mM=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),Mbe=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const s=[];let a=0,o=0,l=0,c;const u=i.length;for(let b=0;b<u;b++){const S=i[b];if(a===0&&o===0){if(S===hM){s.push(i.slice(l,b)),l=b+1;continue}if(S==="/"){c=b;continue}}S==="["?a++:S==="]"?a--:S==="("?o++:S===")"&&o--}const f=s.length===0?i:i.slice(l);let d=f,h=!1;f.endsWith(G1)?(d=f.slice(0,-1),h=!0):f.startsWith(G1)&&(d=f.slice(1),h=!0);const p=c&&c>l?c-l:void 0;return mM(s,h,d,p)};if(t){const i=t+hM,s=r;r=a=>a.startsWith(i)?s(a.slice(i.length)):mM(Rbe,!1,a,void 0,!0)}if(n){const i=r;r=s=>n({className:s,parseClassName:i})}return r},Nbe=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}},Dbe=e=>({cache:Obe(e.cacheSize),parseClassName:Mbe(e),sortModifiers:Nbe(e),...Sbe(e)}),zbe=/\s+/,Ibe=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:s}=t,a=[],o=e.trim().split(zbe);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:f,modifiers:d,hasImportantModifier:h,baseClassName:p,maybePostfixModifierPosition:b}=n(u);if(f){l=u+(l.length>0?" "+l:l);continue}let S=!!b,m=r(S?p.substring(0,b):p);if(!m){if(!S){l=u+(l.length>0?" "+l:l);continue}if(m=r(p),!m){l=u+(l.length>0?" "+l:l);continue}S=!1}const y=d.length===0?"":d.length===1?d[0]:s(d).join(":"),v=h?y+G1:y,_=v+m;if(a.indexOf(_)>-1)continue;a.push(_);const A=i(m,S);for(let E=0;E<A.length;++E){const T=A[E];a.push(v+T)}l=u+(l.length>0?" "+l:l)}return l},$be=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=L5(n))&&(i&&(i+=" "),i+=r);return i},L5=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=L5(e[r]))&&(n&&(n+=" "),n+=t);return n},Lbe=(e,...t)=>{let n,r,i,s;const a=l=>{const c=t.reduce((u,f)=>f(u),e());return n=Dbe(c),r=n.cache.get,i=n.cache.set,s=o,o(l)},o=l=>{const c=r(l);if(c)return c;const u=Ibe(l,n);return i(l,u),u};return s=a,(...l)=>s($be(...l))},Fbe=[],Kt=e=>{const t=n=>n[e]||Fbe;return t.isThemeGetter=!0,t},F5=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,j5=/^\((?:(\w[\w-]*):)?(.+)\)$/i,jbe=/^\d+\/\d+$/,Pbe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Ube=/\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$/,Bbe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Hbe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,qbe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ic=e=>jbe.test(e),Oe=e=>!!e&&!Number.isNaN(Number(e)),aa=e=>!!e&&Number.isInteger(Number(e)),L0=e=>e.endsWith("%")&&Oe(e.slice(0,-1)),gs=e=>Pbe.test(e),Vbe=()=>!0,Kbe=e=>Ube.test(e)&&!Bbe.test(e),P5=()=>!1,Gbe=e=>Hbe.test(e),Ybe=e=>qbe.test(e),Jbe=e=>!ie(e)&&!se(e),Qbe=e=>_f(e,H5,P5),ie=e=>F5.test(e),Ro=e=>_f(e,q5,Kbe),F0=e=>_f(e,tve,Oe),pM=e=>_f(e,U5,P5),Xbe=e=>_f(e,B5,Ybe),hp=e=>_f(e,V5,Gbe),se=e=>j5.test(e),Gf=e=>xf(e,q5),Wbe=e=>xf(e,nve),gM=e=>xf(e,U5),Zbe=e=>xf(e,H5),eve=e=>xf(e,B5),mp=e=>xf(e,V5,!0),_f=(e,t,n)=>{const r=F5.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},xf=(e,t,n=!1)=>{const r=j5.exec(e);return r?r[1]?t(r[1]):n:!1},U5=e=>e==="position"||e==="percentage",B5=e=>e==="image"||e==="url",H5=e=>e==="length"||e==="size"||e==="bg-size",q5=e=>e==="length",tve=e=>e==="number",nve=e=>e==="family-name",V5=e=>e==="shadow",rve=()=>{const e=Kt("color"),t=Kt("font"),n=Kt("text"),r=Kt("font-weight"),i=Kt("tracking"),s=Kt("leading"),a=Kt("breakpoint"),o=Kt("container"),l=Kt("spacing"),c=Kt("radius"),u=Kt("shadow"),f=Kt("inset-shadow"),d=Kt("text-shadow"),h=Kt("drop-shadow"),p=Kt("blur"),b=Kt("perspective"),S=Kt("aspect"),m=Kt("ease"),y=Kt("animate"),v=()=>["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"],A=()=>[..._(),se,ie],E=()=>["auto","hidden","clip","visible","scroll"],T=()=>["auto","contain","none"],N=()=>[se,ie,l],D=()=>[ic,"full","auto",...N()],M=()=>[aa,"none","subgrid",se,ie],$=()=>["auto",{span:["full",aa,se,ie]},aa,se,ie],L=()=>[aa,"auto",se,ie],J=()=>["auto","min","max","fr",se,ie],Y=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],G=()=>["start","end","center","stretch","center-safe","end-safe"],z=()=>["auto",...N()],F=()=>[ic,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...N()],I=()=>[e,se,ie],te=()=>[..._(),gM,pM,{position:[se,ie]}],R=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Re=()=>["auto","cover","contain",Zbe,Qbe,{size:[se,ie]}],U=()=>[L0,Gf,Ro],C=()=>["","none","full",c,se,ie],X=()=>["",Oe,Gf,Ro],W=()=>["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,L0,gM,pM],he=()=>["","none",p,se,ie],we=()=>["none",Oe,se,ie],_e=()=>["none",Oe,se,ie],Me=()=>[Oe,se,ie],$e=()=>[ic,"full",...N()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[gs],breakpoint:[gs],color:[Vbe],container:[gs],"drop-shadow":[gs],ease:["in","out","in-out"],font:[Jbe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[gs],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[gs],shadow:[gs],spacing:["px",Oe],text:[gs],"text-shadow":[gs],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",ic,ie,se,S]}],container:["container"],columns:[{columns:[Oe,ie,se,o]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"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:A()}],overflow:[{overflow:E()}],"overflow-x":[{"overflow-x":E()}],"overflow-y":[{"overflow-y":E()}],overscroll:[{overscroll:T()}],"overscroll-x":[{"overscroll-x":T()}],"overscroll-y":[{"overscroll-y":T()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset: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:[aa,"auto",se,ie]}],basis:[{basis:[ic,"full","auto",o,...N()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Oe,ic,"auto","initial","none",ie]}],grow:[{grow:["",Oe,se,ie]}],shrink:[{shrink:["",Oe,se,ie]}],order:[{order:[aa,"first","last","none",se,ie]}],"grid-cols":[{"grid-cols":M()}],"col-start-end":[{col:$()}],"col-start":[{"col-start":L()}],"col-end":[{"col-end":L()}],"grid-rows":[{"grid-rows":M()}],"row-start-end":[{row:$()}],"row-start":[{"row-start":L()}],"row-end":[{"row-end":L()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":J()}],"auto-rows":[{"auto-rows":J()}],gap:[{gap:N()}],"gap-x":[{"gap-x":N()}],"gap-y":[{"gap-y":N()}],"justify-content":[{justify:[...Y(),"normal"]}],"justify-items":[{"justify-items":[...G(),"normal"]}],"justify-self":[{"justify-self":["auto",...G()]}],"align-content":[{content:["normal",...Y()]}],"align-items":[{items:[...G(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...G(),{baseline:["","last"]}]}],"place-content":[{"place-content":Y()}],"place-items":[{"place-items":[...G(),"baseline"]}],"place-self":[{"place-self":["auto",...G()]}],p:[{p:N()}],px:[{px:N()}],py:[{py:N()}],ps:[{ps:N()}],pe:[{pe:N()}],pt:[{pt:N()}],pr:[{pr:N()}],pb:[{pb:N()}],pl:[{pl:N()}],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":N()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":N()}],"space-y-reverse":["space-y-reverse"],size:[{size:F()}],w:[{w:[o,"screen",...F()]}],"min-w":[{"min-w":[o,"screen","none",...F()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...F()]}],h:[{h:["screen","lh",...F()]}],"min-h":[{"min-h":["screen","lh","none",...F()]}],"max-h":[{"max-h":["screen","lh",...F()]}],"font-size":[{text:["base",n,Gf,Ro]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,se,F0]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",L0,ie]}],"font-family":[{font:[Wbe,ie,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,se,ie]}],"line-clamp":[{"line-clamp":[Oe,"none",se,F0]}],leading:[{leading:[s,...N()]}],"list-image":[{"list-image":["none",se,ie]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",se,ie]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...W(),"wavy"]}],"text-decoration-thickness":[{decoration:[Oe,"from-font","auto",se,Ro]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Oe,"auto",se,ie]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",se,ie]}],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",se,ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:te()}],"bg-repeat":[{bg:R()}],"bg-size":[{bg:Re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},aa,se,ie],radial:["",se,ie],conic:[aa,se,ie]},eve,Xbe]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:U()}],"gradient-via-pos":[{via:U()}],"gradient-to-pos":[{to:U()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:C()}],"rounded-s":[{"rounded-s":C()}],"rounded-e":[{"rounded-e":C()}],"rounded-t":[{"rounded-t":C()}],"rounded-r":[{"rounded-r":C()}],"rounded-b":[{"rounded-b":C()}],"rounded-l":[{"rounded-l":C()}],"rounded-ss":[{"rounded-ss":C()}],"rounded-se":[{"rounded-se":C()}],"rounded-ee":[{"rounded-ee":C()}],"rounded-es":[{"rounded-es":C()}],"rounded-tl":[{"rounded-tl":C()}],"rounded-tr":[{"rounded-tr":C()}],"rounded-br":[{"rounded-br":C()}],"rounded-bl":[{"rounded-bl":C()}],"border-w":[{border:X()}],"border-w-x":[{"border-x":X()}],"border-w-y":[{"border-y":X()}],"border-w-s":[{"border-s":X()}],"border-w-e":[{"border-e":X()}],"border-w-t":[{"border-t":X()}],"border-w-r":[{"border-r":X()}],"border-w-b":[{"border-b":X()}],"border-w-l":[{"border-l":X()}],"divide-x":[{"divide-x":X()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":X()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...W(),"hidden","none"]}],"divide-style":[{divide:[...W(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...W(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Oe,se,ie]}],"outline-w":[{outline:["",Oe,Gf,Ro]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",u,mp,hp]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",f,mp,hp]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:X()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Oe,Ro]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":X()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",d,mp,hp]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Oe,se,ie]}],"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":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"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":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"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":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"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":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"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":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"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":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"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":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[se,ie]}],"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":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"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":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:te()}],"mask-repeat":[{mask:R()}],"mask-size":[{mask:Re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",se,ie]}],filter:[{filter:["","none",se,ie]}],blur:[{blur:he()}],brightness:[{brightness:[Oe,se,ie]}],contrast:[{contrast:[Oe,se,ie]}],"drop-shadow":[{"drop-shadow":["","none",h,mp,hp]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Oe,se,ie]}],"hue-rotate":[{"hue-rotate":[Oe,se,ie]}],invert:[{invert:["",Oe,se,ie]}],saturate:[{saturate:[Oe,se,ie]}],sepia:[{sepia:["",Oe,se,ie]}],"backdrop-filter":[{"backdrop-filter":["","none",se,ie]}],"backdrop-blur":[{"backdrop-blur":he()}],"backdrop-brightness":[{"backdrop-brightness":[Oe,se,ie]}],"backdrop-contrast":[{"backdrop-contrast":[Oe,se,ie]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Oe,se,ie]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Oe,se,ie]}],"backdrop-invert":[{"backdrop-invert":["",Oe,se,ie]}],"backdrop-opacity":[{"backdrop-opacity":[Oe,se,ie]}],"backdrop-saturate":[{"backdrop-saturate":[Oe,se,ie]}],"backdrop-sepia":[{"backdrop-sepia":["",Oe,se,ie]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":N()}],"border-spacing-x":[{"border-spacing-x":N()}],"border-spacing-y":[{"border-spacing-y":N()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",se,ie]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Oe,"initial",se,ie]}],ease:[{ease:["linear","initial",m,se,ie]}],delay:[{delay:[Oe,se,ie]}],animate:[{animate:["none",y,se,ie]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[b,se,ie]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:we()}],"rotate-x":[{"rotate-x":we()}],"rotate-y":[{"rotate-y":we()}],"rotate-z":[{"rotate-z":we()}],scale:[{scale:_e()}],"scale-x":[{"scale-x":_e()}],"scale-y":[{"scale-y":_e()}],"scale-z":[{"scale-z":_e()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[se,ie,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"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:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"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",se,ie]}],"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":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",se,ie]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Oe,Gf,Ro,F0]}],stroke:[{stroke:["none",...I()]}],"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"]}},ive=Lbe(rve);function Ve(...e){return ive(D5(e))}function K5({...e}){return k.jsx(c6,{"data-slot":"dialog",...e})}function sve({...e}){return k.jsx(u6,{"data-slot":"dialog-portal",...e})}function ave({className:e,...t}){return k.jsx(f6,{"data-slot":"dialog-overlay",className:Ve("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 G5({children:e,className:t,showCloseButton:n=!0,...r}){return k.jsxs(sve,{"data-slot":"dialog-portal",children:[k.jsx(ave,{}),k.jsxs(d6,{"data-slot":"dialog-content",className:Ve("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&&k.jsxs(ppe,{"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:[k.jsx(NB,{}),k.jsx("span",{className:"sr-only",children:"Close"})]})]})]})}function Y5({className:e,...t}){return k.jsx("div",{"data-slot":"dialog-header",className:Ve("flex flex-col gap-2 text-center sm:text-left",e),...t})}function ove({className:e,...t}){return k.jsx("div",{"data-slot":"dialog-footer",className:Ve("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",e),...t})}function J5({className:e,...t}){return k.jsx(hpe,{"data-slot":"dialog-title",className:Ve("text-lg leading-none font-semibold",e),...t})}function Q5({className:e,...t}){return k.jsx(mpe,{"data-slot":"dialog-description",className:Ve("text-muted-foreground text-sm",e),...t})}function lve({className:e,...t}){return k.jsx(ql,{"data-slot":"command",className:Ve("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",e),...t})}function cve({children:e,className:t,description:n="Search for a command to run...",showCloseButton:r=!0,title:i="Command Palette",...s}){return k.jsxs(K5,{...s,children:[k.jsxs(Y5,{className:"sr-only",children:[k.jsx(J5,{children:i}),k.jsx(Q5,{children:n})]}),k.jsx(G5,{className:Ve("overflow-hidden p-0",t),showCloseButton:r,children:k.jsx(lve,{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 uve({className:e,...t}){return k.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-9 items-center gap-2 border-b px-3",children:[k.jsx(MB,{className:"size-4 shrink-0 opacity-50"}),k.jsx(ql.Input,{"data-slot":"command-input",className:Ve("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 fve({className:e,...t}){return k.jsx(ql.List,{"data-slot":"command-list",className:Ve("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",e),...t})}function dve({...e}){return k.jsx(ql.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...e})}function yM({className:e,...t}){return k.jsx(ql.Group,{"data-slot":"command-group",className:Ve("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 hve({className:e,...t}){return k.jsx(ql.Separator,{"data-slot":"command-separator",className:Ve("bg-border -mx-1 h-px",e),...t})}function j0({className:e,...t}){return k.jsx(ql.Item,{"data-slot":"command-item",className:Ve("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 bM({className:e,...t}){return k.jsx("span",{"data-slot":"command-shortcut",className:Ve("text-muted-foreground ml-auto text-xs tracking-widest",e),...t})}const mve=[{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 pve(){const e=Yi(D2),t=qr(D2),n=qr($v),r=qr(Fy),i=qr(CB);return w.useEffect(()=>{const s=a=>{a.key==="p"&&(a.metaKey||a.ctrlKey)&&(a.preventDefault(),t(o=>!o))};return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[t]),k.jsxs(cve,{open:e,onOpenChange:t,showCloseButton:!1,children:[k.jsx(uve,{placeholder:"Type a command..."}),k.jsxs(fve,{children:[k.jsx(dve,{children:"No results found."}),k.jsxs(yM,{heading:"Actions",children:[k.jsxs(j0,{onSelect:()=>{i({}),t(!1)},children:[k.jsx(RB,{}),"Refresh PRs",k.jsx(bM,{children:"R"})]}),k.jsxs(j0,{onSelect:()=>{n("prs"),t(!1)},children:[k.jsx(I2,{}),"View: PR List"]})]}),k.jsx(hve,{}),k.jsx(yM,{heading:"Filters",children:mve.map(s=>k.jsxs(j0,{onSelect:()=>{s.key==="all"?r({type:"all"}):r({type:s.key}),t(!1)},children:[k.jsx(I2,{}),"Filter: ",s.label,k.jsx(bM,{children:s.shortcut})]},s.key))})]})]})}const Y1=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},vM=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,SM=D5,eT=(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 u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const d=vM(u)||vM(f);return i[c][d]}),o=n&&Object.entries(n).reduce((c,u)=>{let[f,d]=u;return d===void 0||(c[f]=d),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:d,...h}=u;return Object.entries(h).every(p=>{let[b,S]=p;return Array.isArray(S)?S.includes({...s,...o}[b]):{...s,...o}[b]===S})?[...c,f,d]:c},[]);return SM(e,a,l,n==null?void 0:n.class,n==null?void 0:n.className)},gve=eT("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 Vo({asChild:e=!1,className:t,size:n="default",variant:r="default",...i}){const s=e?zB:"button";return k.jsx(s,{"data-slot":"button","data-variant":r,"data-size":n,className:Ve(gve({variant:r,size:n,className:t})),...i})}function yve({className:e,type:t,...n}){return k.jsx("input",{type:t,"data-slot":"input",className:Ve("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 bve({...e}){return k.jsx(Jye,{"data-slot":"select",...e})}function vve({...e}){return k.jsx(Xye,{"data-slot":"select-value",...e})}function Sve({children:e,className:t,size:n="default",...r}){return k.jsxs(Qye,{"data-slot":"select-trigger","data-size":n,className:Ve("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,k.jsx(Wye,{asChild:!0,children:k.jsx(OB,{className:"size-4 opacity-50"})})]})}function wve({align:e="center",children:t,className:n,position:r="item-aligned",...i}){return k.jsx(Zye,{children:k.jsxs(ebe,{"data-slot":"select-content",className:Ve("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:[k.jsx(xve,{}),k.jsx(tbe,{className:Ve("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:t}),k.jsx(kve,{})]})})}function _ve({children:e,className:t,...n}){return k.jsxs(nbe,{"data-slot":"select-item",className:Ve("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:[k.jsx("span",{"data-slot":"select-item-indicator",className:"absolute right-2 flex size-3.5 items-center justify-center",children:k.jsx(ibe,{children:k.jsx(mhe,{className:"size-4"})})}),k.jsx(rbe,{children:e})]})}function xve({className:e,...t}){return k.jsx(sbe,{"data-slot":"select-scroll-up-button",className:Ve("flex cursor-default items-center justify-center py-1",e),...t,children:k.jsx(yhe,{className:"size-4"})})}function kve({className:e,...t}){return k.jsx(abe,{"data-slot":"select-scroll-down-button",className:Ve("flex cursor-default items-center justify-center py-1",e),...t,children:k.jsx(OB,{className:"size-4"})})}const Eve=eT("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"}}),X5=w.createContext({size:"default",variant:"default",spacing:0});function Cve({children:e,className:t,size:n,spacing:r=0,variant:i,...s}){return k.jsx(pbe,{"data-slot":"toggle-group","data-variant":i,"data-size":n,"data-spacing":r,className:Ve("group/toggle-group flex w-fit items-center rounded-md",t),...s,children:k.jsx(X5,{value:{variant:i,size:n,spacing:r},children:e})})}function Tve({children:e,className:t,size:n,variant:r,...i}){const s=w.useContext(X5);return k.jsx(gbe,{"data-slot":"toggle-group-item","data-variant":s.variant||r,"data-size":s.size||n,"data-spacing":s.spacing,className:Ve(Eve({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 Ave=[{key:"all",label:"All"},{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 Ove(){const e=Yi(Iv),t=Yi(Fy),n=qr(Fy),r=Yi(D1),i=qr(D1),s=e.pullRequests,a=e.currentUser,o=w.useMemo(()=>{var S;const f=new Set,d=new Set,h=new Set,p=new Set,b=new Set;for(const m of s){f.add(m.author),d.add(((S=m.account)==null?void 0:S.id)??"unknown"),b.add(m.repositoryName);const y=Y1(m.title);y&&(h.add(y),a&&m.author===a&&p.add(y))}return{authors:Array.from(f).sort(),accounts:Array.from(d).sort(),scopes:Array.from(h).sort(),myScopes:Array.from(p).sort(),repos:Array.from(b).sort()}},[s,a]),l=f=>{const d=f;if(!d||d==="all"){n({type:"all"});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=f=>{t.type!=="all"&&n({type:t.type,value:f})},u=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 k.jsx("div",{className:"border-b bg-background",children:k.jsxs("div",{className:"mx-auto flex max-w-5xl items-center gap-3 px-4 py-2",children:[k.jsx(Cve,{type:"single",variant:"outline",size:"sm",value:t.type,onValueChange:l,children:Ave.map(f=>k.jsx(Tve,{value:f.key,children:f.label},f.key))}),u.length>0&&t.type!=="all"&&t.value&&k.jsxs(bve,{value:t.value,onValueChange:c,children:[k.jsx(Sve,{size:"sm",className:"w-[180px]",children:k.jsx(vve,{})}),k.jsx(wve,{children:u.map(f=>k.jsx(_ve,{value:f,children:f},f))})]}),k.jsxs("div",{className:"relative ml-auto w-64",children:[k.jsx(MB,{className:"absolute left-2.5 top-2.5 size-4 text-muted-foreground"}),k.jsx(yve,{placeholder:"Search...",className:"h-8 pl-8",value:r,onChange:f=>i(f.target.value)}),r&&k.jsx(Vo,{variant:"ghost",size:"icon-xs",className:"absolute right-1 top-1",onClick:()=>i(""),children:k.jsx(NB,{className:"size-3"})})]})]})})}const tT=e=>{const t=e.getDate().toString().padStart(2,"0"),n=(e.getMonth()+1).toString().padStart(2,"0"),r=e.getFullYear();return`${t}.${n}.${r}`},Rve=(e,t)=>{const n=Math.max(0,Math.floor((t.getTime()-e.getTime())/1e3));return wde(n).pipe(_0(r=>r<60,r=>`Updated ${r}s ago`),_0(r=>r<3600,r=>`Updated ${Math.floor(r/60)}m ago`),_0(r=>r<86400,r=>`Updated ${Math.floor(r/3600)}h ago`),_de(()=>`Updated on ${tT(e)}`))},W5=w.createContext({theme:"system",setTheme:()=>{}});function Mve({children:e}){const[t,n]=w.useState("system");return w.useEffect(()=>{const r=document.documentElement,i=t==="system"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":t;r.classList.remove("dark","light"),r.classList.add(i)},[t]),w.useEffect(()=>{if(t!=="system")return;const r=window.matchMedia("(prefers-color-scheme: dark)"),i=()=>{const s=document.documentElement;s.classList.remove("dark","light"),s.classList.add(r.matches?"dark":"light")};return r.addEventListener("change",i),()=>r.removeEventListener("change",i)},[t]),k.jsx(W5,{value:{theme:t,setTheme:n},children:e})}function Nve(){return w.useContext(W5)}function Dve({className:e,...t}){return k.jsx("kbd",{"data-slot":"kbd",className:Ve("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 Z5({className:e,decorative:t=!0,orientation:n="horizontal",...r}){return k.jsx(ube,{"data-slot":"separator",decorative:t,orientation:n,className:Ve("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 zve(){const e=Yi(Iv),t=qr(CB),{setTheme:n,theme:r}=Nve(),i=e.status==="loading",s=e.status==="error";return k.jsx("header",{className:"sticky top-0 z-40 border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60",children:k.jsxs("div",{className:"mx-auto flex h-14 max-w-5xl items-center gap-4 px-4",children:[k.jsx("span",{className:"text-sm font-semibold tracking-tight",children:"CodeCommit"}),k.jsx(Z5,{orientation:"vertical",className:"h-4"}),k.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.pullRequests.length," PRs"]}),s&&k.jsx("span",{className:"text-sm text-destructive",children:e.error??"Error loading PRs"}),e.lastUpdated&&!s&&k.jsx("span",{className:"text-xs text-muted-foreground",children:Rve(e.lastUpdated,new Date)}),k.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[k.jsx(Vo,{variant:"ghost",size:"icon-sm",onClick:()=>t({}),disabled:i,children:k.jsx(RB,{className:Ve("size-4",i&&"animate-spin")})}),k.jsx(Dve,{children:"⌘P"}),k.jsxs(Vo,{variant:"ghost",size:"icon-sm",onClick:()=>n(r==="dark"?"light":r==="light"?"system":"dark"),children:[k.jsx(Ahe,{className:"size-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"}),k.jsx(khe,{className:"absolute size-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"}),k.jsx("span",{className:"sr-only",children:"Toggle theme"})]})]})]})})}function Ive(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $ve=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Lve=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Fve={};function wM(e,t){return(Fve.jsx?Lve:$ve).test(e)}const jve=/[ \t\n\f\r]/g;function Pve(e){return typeof e=="object"?e.type==="text"?_M(e.value):!1:_M(e)}function _M(e){return e.replace(jve,"")===""}class Tm{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Tm.prototype.normal={};Tm.prototype.property={};Tm.prototype.space=void 0;function eH(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Tm(n,r,t)}function J1(e){return e.toLowerCase()}class sr{constructor(t,n){this.attribute=n,this.property=t}}sr.prototype.attribute="";sr.prototype.booleanish=!1;sr.prototype.boolean=!1;sr.prototype.commaOrSpaceSeparated=!1;sr.prototype.commaSeparated=!1;sr.prototype.defined=!1;sr.prototype.mustUseProperty=!1;sr.prototype.number=!1;sr.prototype.overloadedBoolean=!1;sr.prototype.property="";sr.prototype.spaceSeparated=!1;sr.prototype.space=void 0;let Uve=0;const Ce=Vl(),zt=Vl(),Q1=Vl(),q=Vl(),ct=Vl(),eu=Vl(),lr=Vl();function Vl(){return 2**++Uve}const X1=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ce,booleanish:zt,commaOrSpaceSeparated:lr,commaSeparated:eu,number:q,overloadedBoolean:Q1,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),P0=Object.keys(X1);class nT extends sr{constructor(t,n,r,i){let s=-1;if(super(t,n),xM(this,"space",i),typeof r=="number")for(;++s<P0.length;){const a=P0[s];xM(this,P0[s],(r&X1[a])===X1[a])}}}nT.prototype.defined=!0;function xM(e,t,n){n&&(e[t]=n)}function kf(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new nT(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[J1(r)]=r,n[J1(s.attribute)]=r}return new Tm(t,n,e.space)}const tH=kf({properties:{ariaActiveDescendant:null,ariaAtomic:zt,ariaAutoComplete:null,ariaBusy:zt,ariaChecked:zt,ariaColCount:q,ariaColIndex:q,ariaColSpan:q,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:zt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:zt,ariaFlowTo:ct,ariaGrabbed:zt,ariaHasPopup:null,ariaHidden:zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:q,ariaLive:null,ariaModal:zt,ariaMultiLine:zt,ariaMultiSelectable:zt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:q,ariaPressed:zt,ariaReadOnly:zt,ariaRelevant:null,ariaRequired:zt,ariaRoleDescription:ct,ariaRowCount:q,ariaRowIndex:q,ariaRowSpan:q,ariaSelected:zt,ariaSetSize:q,ariaSort:null,ariaValueMax:q,ariaValueMin:q,ariaValueNow:q,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function nH(e,t){return t in e?e[t]:t}function rH(e,t){return nH(e,t.toLowerCase())}const Bve=kf({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:eu,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ce,allowPaymentRequest:Ce,allowUserMedia:Ce,alt:null,as:null,async:Ce,autoCapitalize:null,autoComplete:ct,autoFocus:Ce,autoPlay:Ce,blocking:ct,capture:null,charSet:null,checked:Ce,cite:null,className:ct,cols:q,colSpan:null,content:null,contentEditable:zt,controls:Ce,controlsList:ct,coords:q|eu,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ce,defer:Ce,dir:null,dirName:null,disabled:Ce,download:Q1,draggable:zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ce,formTarget:null,headers:ct,height:q,hidden:Q1,high:q,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ce,inputMode:null,integrity:null,is:null,isMap:Ce,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ce,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ce,low:q,manifest:null,max:null,maxLength:q,media:null,method:null,min:null,minLength:q,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:q,pattern:null,ping:ct,placeholder:null,playsInline:Ce,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ce,referrerPolicy:null,rel:ct,required:Ce,reversed:Ce,rows:q,rowSpan:q,sandbox:ct,scope:null,scoped:Ce,seamless:Ce,selected:Ce,shadowRootClonable:Ce,shadowRootDelegatesFocus:Ce,shadowRootMode:null,shape:null,size:q,sizes:null,slot:null,span:q,spellCheck:zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:q,step:null,style:null,tabIndex:q,target:null,title:null,translate:null,type:null,typeMustMatch:Ce,useMap:null,value:zt,width:q,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:q,borderColor:null,bottomMargin:q,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:q,leftMargin:q,link:null,longDesc:null,lowSrc:null,marginHeight:q,marginWidth:q,noResize:Ce,noHref:Ce,noShade:Ce,noWrap:Ce,object:null,profile:null,prompt:null,rev:null,rightMargin:q,rules:null,scheme:null,scrolling:zt,standby:null,summary:null,text:null,topMargin:q,valueType:null,version:null,vAlign:null,vLink:null,vSpace:q,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ce,disableRemotePlayback:Ce,prefix:null,property:null,results:q,security:null,unselectable:null},space:"html",transform:rH}),Hve=kf({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:lr,accentHeight:q,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:q,amplitude:q,arabicForm:null,ascent:q,attributeName:null,attributeType:null,azimuth:q,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:q,by:null,calcMode:null,capHeight:q,className:ct,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:q,diffuseConstant:q,direction:null,display:null,dur:null,divisor:q,dominantBaseline:null,download:Ce,dx:null,dy:null,edgeMode:null,editable:null,elevation:q,enableBackground:null,end:null,event:null,exponent:q,externalResourcesRequired:null,fill:null,fillOpacity:q,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:eu,g2:eu,glyphName:eu,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:q,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:q,horizOriginX:q,horizOriginY:q,id:null,ideographic:q,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:q,k:q,k1:q,k2:q,k3:q,k4:q,kernelMatrix:lr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:q,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:q,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:q,overlineThickness:q,paintOrder:null,panose1:null,path:null,pathLength:q,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:q,pointsAtY:q,pointsAtZ:q,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:lr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:lr,rev:lr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:lr,requiredFeatures:lr,requiredFonts:lr,requiredFormats:lr,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:q,specularExponent:q,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:q,strikethroughThickness:q,string:null,stroke:null,strokeDashArray:lr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:q,strokeOpacity:q,strokeWidth:null,style:null,surfaceScale:q,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:lr,tabIndex:q,tableValues:null,target:null,targetX:q,targetY:q,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:lr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:q,underlineThickness:q,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:q,values:null,vAlphabetic:q,vMathematical:q,vectorEffect:null,vHanging:q,vIdeographic:q,version:null,vertAdvY:q,vertOriginX:q,vertOriginY:q,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:q,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:nH}),iH=kf({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()}}),sH=kf({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:rH}),aH=kf({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),qve={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"},Vve=/[A-Z]/g,kM=/-[a-z]/g,Kve=/^data[-\w.:]+$/i;function Gve(e,t){const n=J1(t);let r=t,i=sr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Kve.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(kM,Jve);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!kM.test(s)){let a=s.replace(Vve,Yve);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=nT}return new i(r,t)}function Yve(e){return"-"+e.toLowerCase()}function Jve(e){return e.charAt(1).toUpperCase()}const Qve=eH([tH,Bve,iH,sH,aH],"html"),rT=eH([tH,Hve,iH,sH,aH],"svg");function Xve(e){return e.join(" ").trim()}var iT={},EM=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wve=/\n/g,Zve=/^\s*/,eSe=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,tSe=/^:\s*/,nSe=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,rSe=/^[;\s]*/,iSe=/^\s+|\s+$/g,sSe=`
|
|
225
|
+
`,CM="/",TM="*",Po="",aSe="comment",oSe="declaration";function lSe(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(p){var b=p.match(Wve);b&&(n+=b.length);var S=p.lastIndexOf(sSe);r=~S?p.length-S:r+p.length}function s(){var p={line:n,column:r};return function(b){return b.position=new a(p),c(),b}}function a(p){this.start=p,this.end={line:n,column:r},this.source=t.source}a.prototype.content=e;function o(p){var b=new Error(t.source+":"+n+":"+r+": "+p);if(b.reason=p,b.filename=t.source,b.line=n,b.column=r,b.source=e,!t.silent)throw b}function l(p){var b=p.exec(e);if(b){var S=b[0];return i(S),e=e.slice(S.length),b}}function c(){l(Zve)}function u(p){var b;for(p=p||[];b=f();)b!==!1&&p.push(b);return p}function f(){var p=s();if(!(CM!=e.charAt(0)||TM!=e.charAt(1))){for(var b=2;Po!=e.charAt(b)&&(TM!=e.charAt(b)||CM!=e.charAt(b+1));)++b;if(b+=2,Po===e.charAt(b-1))return o("End of comment missing");var S=e.slice(2,b-2);return r+=2,i(S),e=e.slice(b),r+=2,p({type:aSe,comment:S})}}function d(){var p=s(),b=l(eSe);if(b){if(f(),!l(tSe))return o("property missing ':'");var S=l(nSe),m=p({type:oSe,property:AM(b[0].replace(EM,Po)),value:S?AM(S[0].replace(EM,Po)):Po});return l(rSe),m}}function h(){var p=[];u(p);for(var b;b=d();)b!==!1&&(p.push(b),u(p));return p}return c(),h()}function AM(e){return e?e.replace(iSe,Po):Po}var cSe=lSe,uSe=og&&og.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(iT,"__esModule",{value:!0});iT.default=dSe;const fSe=uSe(cSe);function dSe(e,t){let n=null;if(!e||typeof e!="string")return n;const r=(0,fSe.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 Yv={};Object.defineProperty(Yv,"__esModule",{value:!0});Yv.camelCase=void 0;var hSe=/^--[a-zA-Z0-9_-]+$/,mSe=/-([a-z])/g,pSe=/^[^-]+$/,gSe=/^-(webkit|moz|ms|o|khtml)-/,ySe=/^-(ms)-/,bSe=function(e){return!e||pSe.test(e)||hSe.test(e)},vSe=function(e,t){return t.toUpperCase()},OM=function(e,t){return"".concat(t,"-")},SSe=function(e,t){return t===void 0&&(t={}),bSe(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(ySe,OM):e=e.replace(gSe,OM),e.replace(mSe,vSe))};Yv.camelCase=SSe;var wSe=og&&og.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},_Se=wSe(iT),xSe=Yv;function W1(e,t){var n={};return!e||typeof e!="string"||(0,_Se.default)(e,function(r,i){r&&i&&(n[(0,xSe.camelCase)(r,t)]=i)}),n}W1.default=W1;var kSe=W1;const ESe=Dh(kSe),oH=lH("end"),sT=lH("start");function lH(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 CSe(e){const t=sT(e),n=oH(e);if(t&&n)return{start:t,end:n}}function Pd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?RM(e.position):"start"in e||"end"in e?RM(e):"line"in e||"column"in e?Z1(e):""}function Z1(e){return MM(e&&e.line)+":"+MM(e&&e.column)}function RM(e){return Z1(e&&e.start)+"-"+Z1(e&&e.end)}function MM(e){return e&&typeof e=="number"?e:1}class Nn 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=Pd(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}}Nn.prototype.file="";Nn.prototype.name="";Nn.prototype.reason="";Nn.prototype.message="";Nn.prototype.stack="";Nn.prototype.column=void 0;Nn.prototype.line=void 0;Nn.prototype.ancestors=void 0;Nn.prototype.cause=void 0;Nn.prototype.fatal=void 0;Nn.prototype.place=void 0;Nn.prototype.ruleId=void 0;Nn.prototype.source=void 0;const aT={}.hasOwnProperty,TSe=new Map,ASe=/[A-Z]/g,OSe=new Set(["table","tbody","thead","tfoot","tr"]),RSe=new Set(["td","th"]),cH="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function MSe(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=jSe(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=FSe(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"?rT:Qve,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=uH(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function uH(e,t,n){if(t.type==="element")return NSe(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return DSe(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ISe(e,t,n);if(t.type==="mdxjsEsm")return zSe(e,t);if(t.type==="root")return $Se(e,t,n);if(t.type==="text")return LSe(e,t)}function NSe(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=rT,e.schema=i),e.ancestors.push(t);const s=dH(e,t.tagName,!1),a=PSe(e,t);let o=lT(e,t);return OSe.has(t.tagName)&&(o=o.filter(function(l){return typeof l=="string"?!Pve(l):!0})),fH(e,a,s,t),oT(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function DSe(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)}Rh(e,t.position)}function zSe(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Rh(e,t.position)}function ISe(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=rT,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:dH(e,t.name,!0),a=USe(e,t),o=lT(e,t);return fH(e,a,s,t),oT(a,o),e.ancestors.pop(),e.schema=r,e.create(t,s,a,n)}function $Se(e,t,n){const r={};return oT(r,lT(e,t)),e.create(t,e.Fragment,r,n)}function LSe(e,t){return t.value}function fH(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function oT(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function FSe(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 jSe(e,t){return n;function n(r,i,s,a){const o=Array.isArray(s.children),l=sT(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 PSe(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&aT.call(t.properties,i)){const s=BSe(e,i,t.properties[i]);if(s){const[a,o]=s;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&RSe.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 USe(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 Rh(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 Rh(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function lT(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:TSe;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=uH(e,s,a);o!==void 0&&n.push(o)}return n}function BSe(e,t,n){const r=Gve(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Ive(n):Xve(n)),r.property==="style"){let i=typeof n=="object"?n:HSe(e,String(n));return e.stylePropertyNameCase==="css"&&(i=qSe(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?qve[r.property]||r.property:r.attribute,n]}}function HSe(e,t){try{return ESe(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new Nn("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=cH+"#cannot-parse-style-attribute",i}}function dH(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=wM(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=wM(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return aT.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);Rh(e)}function Rh(e,t){const n=new Nn("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=cH+"#cannot-handle-mdx-estrees-without-createevaluater",n}function qSe(e){const t={};let n;for(n in e)aT.call(e,n)&&(t[VSe(n)]=e[n]);return t}function VSe(e){let t=e.replace(ASe,KSe);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function KSe(e){return"-"+e.toLowerCase()}const U0={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"]},GSe={};function cT(e,t){const n=GSe,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return hH(e,r,i)}function hH(e,t,n){if(YSe(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 NM(e.children,t,n)}return Array.isArray(e)?NM(e,t,n):""}function NM(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=hH(e[i],t,n);return r.join("")}function YSe(e){return!!(e&&typeof e=="object")}const DM=document.createElement("i");function uT(e){const t="&"+e+";";DM.innerHTML=t;const n=DM.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function kr(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 Lr(e,t){return e.length>0?(kr(e,e.length,0,t),e):t}const zM={}.hasOwnProperty;function mH(e){const t={};let n=-1;for(;++n<e.length;)JSe(t,e[n]);return t}function JSe(e,t){let n;for(n in t){const i=(zM.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let a;if(s)for(a in s){zM.call(i,a)||(i[a]=[]);const o=s[a];QSe(i[a],Array.isArray(o)?o:o?[o]:[])}}}function QSe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);kr(e,0,0,r)}function pH(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 yi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jn=ko(/[A-Za-z]/),On=ko(/[\dA-Za-z]/),XSe=ko(/[#-'*+\--9=?A-Z^-~]/);function Yy(e){return e!==null&&(e<32||e===127)}const ex=ko(/\d/),WSe=ko(/[\dA-Fa-f]/),ZSe=ko(/[!-/:-@[-`{-~]/);function fe(e){return e!==null&&e<-2}function lt(e){return e!==null&&(e<0||e===32)}function ze(e){return e===-2||e===-1||e===32}const Jv=ko(new RegExp("\\p{P}|\\p{S}","u")),Ol=ko(/\s/);function ko(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ef(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let a="";if(s===37&&On(e.charCodeAt(n+1))&&On(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 Ue(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 e0e={tokenize:t0e};function t0e(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"),Ue(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 fe(o)?(e.consume(o),e.exit("chunkText"),s):(e.consume(o),a)}}const n0e={tokenize:r0e},IM={tokenize:i0e};function r0e(e){const t=this,n=[];let r=0,i,s,a;return o;function o(v){if(r<n.length){const _=n[r];return t.containerState=_[1],e.attempt(_[0].continuation,l,c)(v)}return c(v)}function l(v){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&y();const _=t.events.length;let A=_,E;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){E=t.events[A][1].end;break}m(r);let T=_;for(;T<t.events.length;)t.events[T][1].end={...E},T++;return kr(t.events,A+1,0,t.events.slice(_)),t.events.length=T,c(v)}return o(v)}function c(v){if(r===n.length){if(!i)return d(v);if(i.currentConstruct&&i.currentConstruct.concrete)return p(v);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(IM,u,f)(v)}function u(v){return i&&y(),m(r),d(v)}function f(v){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,p(v)}function d(v){return t.containerState={},e.attempt(IM,h,p)(v)}function h(v){return r++,n.push([t.currentConstruct,t.containerState]),d(v)}function p(v){if(v===null){i&&y(),m(0),e.consume(v);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),b(v)}function b(v){if(v===null){S(e.exit("chunkFlow"),!0),m(0),e.consume(v);return}return fe(v)?(e.consume(v),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,o):(e.consume(v),b)}function S(v,_){const A=t.sliceStream(v);if(_&&A.push(null),v.previous=s,s&&(s.next=v),s=v,i.defineSkip(v.start),i.write(A),t.parser.lazy[v.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 T=t.events.length;let N=T,D,M;for(;N--;)if(t.events[N][0]==="exit"&&t.events[N][1].type==="chunkFlow"){if(D){M=t.events[N][1].end;break}D=!0}for(m(r),E=T;E<t.events.length;)t.events[E][1].end={...M},E++;kr(t.events,N+1,0,t.events.slice(T)),t.events.length=E}}function m(v){let _=n.length;for(;_-- >v;){const A=n[_];t.containerState=A[1],A[0].exit.call(t,e)}n.length=v}function y(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function i0e(e,t,n){return Ue(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Iu(e){if(e===null||lt(e)||Ol(e))return 1;if(Jv(e))return 2}function Qv(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 tx={name:"attention",resolveAll:s0e,tokenize:a0e};function s0e(e,t){let n=-1,r,i,s,a,o,l,c,u;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 f={...e[r][1].end},d={...e[n][1].start};$M(f,-l),$M(d,l),a={type:l>1?"strongSequence":"emphasisSequence",start:f,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=Lr(c,[["enter",e[r][1],t],["exit",e[r][1],t]])),c=Lr(c,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",s,t]]),c=Lr(c,Qv(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),c=Lr(c,[["exit",s,t],["enter",o,t],["exit",o,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Lr(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,kr(e,r-1,n-r+3,c),n=r+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function a0e(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Iu(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"),u=Iu(l),f=!u||u===2&&i||n.includes(l),d=!i||i===2&&u||n.includes(r);return c._open=!!(s===42?f:f&&(i||!d)),c._close=!!(s===42?d:d&&(u||!f)),t(l)}}function $M(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const o0e={name:"autolink",tokenize:l0e};function l0e(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 jn(h)?(e.consume(h),a):h===64?n(h):c(h)}function a(h){return h===43||h===45||h===46||On(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||On(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||Yy(h)?n(h):(e.consume(h),l)}function c(h){return h===64?(e.consume(h),u):XSe(h)?(e.consume(h),c):n(h)}function u(h){return On(h)?f(h):n(h)}function f(h){return h===46?(e.consume(h),r=0,u):h===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(h),e.exit("autolinkMarker"),e.exit("autolink"),t):d(h)}function d(h){if((h===45||On(h))&&r++<63){const p=h===45?d:f;return e.consume(h),p}return n(h)}}const Am={partial:!0,tokenize:c0e};function c0e(e,t,n){return r;function r(s){return ze(s)?Ue(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||fe(s)?t(s):n(s)}}const gH={continuation:{tokenize:f0e},exit:d0e,name:"blockQuote",tokenize:u0e};function u0e(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 f0e(e,t,n){const r=this;return i;function i(a){return ze(a)?Ue(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):s(a)}function s(a){return e.attempt(gH,t,n)(a)}}function d0e(e){e.exit("blockQuote")}const yH={name:"characterEscape",tokenize:h0e};function h0e(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 ZSe(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const bH={name:"characterReference",tokenize:m0e};function m0e(e,t,n){const r=this;let i=0,s,a;return o;function o(f){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),l}function l(f){return f===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(f),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),s=31,a=On,u(f))}function c(f){return f===88||f===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(f),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,a=WSe,u):(e.enter("characterReferenceValue"),s=7,a=ex,u(f))}function u(f){if(f===59&&i){const d=e.exit("characterReferenceValue");return a===On&&!uT(r.sliceSerialize(d))?n(f):(e.enter("characterReferenceMarker"),e.consume(f),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(f)&&i++<s?(e.consume(f),u):n(f)}}const LM={partial:!0,tokenize:g0e},FM={concrete:!0,name:"codeFenced",tokenize:p0e};function p0e(e,t,n){const r=this,i={partial:!0,tokenize:A};let s=0,a=0,o;return l;function l(E){return c(E)}function c(E){const T=r.events[r.events.length-1];return s=T&&T[1].type==="linePrefix"?T[2].sliceSerialize(T[1],!0).length:0,o=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(E)}function u(E){return E===o?(a++,e.consume(E),u):a<3?n(E):(e.exit("codeFencedFenceSequence"),ze(E)?Ue(e,f,"whitespace")(E):f(E))}function f(E){return E===null||fe(E)?(e.exit("codeFencedFence"),r.interrupt?t(E):e.check(LM,b,_)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(E))}function d(E){return E===null||fe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),f(E)):ze(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ue(e,h,"whitespace")(E)):E===96&&E===o?n(E):(e.consume(E),d)}function h(E){return E===null||fe(E)?f(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),p(E))}function p(E){return E===null||fe(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),f(E)):E===96&&E===o?n(E):(e.consume(E),p)}function b(E){return e.attempt(i,_,S)(E)}function S(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m}function m(E){return s>0&&ze(E)?Ue(e,y,"linePrefix",s+1)(E):y(E)}function y(E){return E===null||fe(E)?e.check(LM,b,_)(E):(e.enter("codeFlowValue"),v(E))}function v(E){return E===null||fe(E)?(e.exit("codeFlowValue"),y(E)):(e.consume(E),v)}function _(E){return e.exit("codeFenced"),t(E)}function A(E,T,N){let D=0;return M;function M(G){return E.enter("lineEnding"),E.consume(G),E.exit("lineEnding"),$}function $(G){return E.enter("codeFencedFence"),ze(G)?Ue(E,L,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(G):L(G)}function L(G){return G===o?(E.enter("codeFencedFenceSequence"),J(G)):N(G)}function J(G){return G===o?(D++,E.consume(G),J):D>=a?(E.exit("codeFencedFenceSequence"),ze(G)?Ue(E,Y,"whitespace")(G):Y(G)):N(G)}function Y(G){return G===null||fe(G)?(E.exit("codeFencedFence"),T(G)):N(G)}}}function g0e(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 B0={name:"codeIndented",tokenize:b0e},y0e={partial:!0,tokenize:v0e};function b0e(e,t,n){const r=this;return i;function i(c){return e.enter("codeIndented"),Ue(e,s,"linePrefix",5)(c)}function s(c){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?a(c):n(c)}function a(c){return c===null?l(c):fe(c)?e.attempt(y0e,a,l)(c):(e.enter("codeFlowValue"),o(c))}function o(c){return c===null||fe(c)?(e.exit("codeFlowValue"),a(c)):(e.consume(c),o)}function l(c){return e.exit("codeIndented"),t(c)}}function v0e(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):fe(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):Ue(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):fe(a)?i(a):n(a)}}const S0e={name:"codeText",previous:_0e,resolve:w0e,tokenize:x0e};function w0e(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 _0e(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function x0e(e,t,n){let r=0,i,s;return a;function a(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),l(f))}function l(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),l):f===96?(s=e.enter("codeTextSequence"),i=0,u(f)):fe(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),l):(e.enter("codeTextData"),c(f))}function c(f){return f===null||f===32||f===96||fe(f)?(e.exit("codeTextData"),l(f)):(e.consume(f),c)}function u(f){return f===96?(e.consume(f),i++,u):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",c(f))}}class k0e{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&&Yf(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),Yf(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yf(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);Yf(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yf(this.left,n.reverse())}}}function Yf(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 vH(e){const t={};let n=-1,r,i,s,a,o,l,c;const u=new k0e(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type==="chunkFlow"&&u.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,E0e(u,n)),n=t[n],c=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(a=u.get(s),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(u.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={...u.get(i)[1].start},o=u.slice(i,n),o.unshift(r),u.splice(i,n-i+1,o))}}return kr(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function E0e(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 u,f,d=-1,h=n,p=0,b=0;const S=[b];for(;h;){for(;e.get(++i)[1]!==h;);s.push(i),h._tokenizer||(u=r.sliceStream(h),h.next||u.push(null),f&&a.defineSkip(h.start),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(u),h._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),f=h,h=h.next}for(h=n;++d<o.length;)o[d][0]==="exit"&&o[d-1][0]==="enter"&&o[d][1].type===o[d-1][1].type&&o[d][1].start.line!==o[d][1].end.line&&(b=d+1,S.push(b),h._tokenizer=void 0,h.previous=void 0,h=h.next);for(a.events=[],h?(h._tokenizer=void 0,h.previous=void 0):S.pop(),d=S.length;d--;){const m=o.slice(S[d],S[d+1]),y=s.pop();l.push([y,y+m.length-1]),e.splice(y,2,m)}for(l.reverse(),d=-1;++d<l.length;)c[p+l[d][0]]=p+l[d][1],p+=l[d][1]-l[d][0]-1;return c}const C0e={resolve:A0e,tokenize:O0e},T0e={partial:!0,tokenize:R0e};function A0e(e){return vH(e),e}function O0e(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):fe(o)?e.check(T0e,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 R0e(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),Ue(e,s,"linePrefix")}function s(a){if(a===null||fe(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 SH(e,t,n,r,i,s,a,o,l){const c=l||Number.POSITIVE_INFINITY;let u=0;return f;function f(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||Yy(m)?n(m):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),b(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||fe(m)?n(m):(e.consume(m),m===92?p:h)}function p(m){return m===60||m===62||m===92?(e.consume(m),h):h(m)}function b(m){return!u&&(m===null||m===41||lt(m))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),t(m)):u<c&&m===40?(e.consume(m),u++,b):m===41?(e.consume(m),u--,b):m===null||m===32||m===40||Yy(m)?n(m):(e.consume(m),m===92?S:b)}function S(m){return m===40||m===41||m===92?(e.consume(m),b):b(m)}}function wH(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),u}function u(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):fe(h)?(e.enter("lineEnding"),e.consume(h),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),f(h))}function f(h){return h===null||h===91||h===93||fe(h)||o++>999?(e.exit("chunkString"),u(h)):(e.consume(h),l||(l=!ze(h)),h===92?d:f)}function d(h){return h===91||h===92||h===93?(e.consume(h),o++,f):f(h)}}function _H(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):fe(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Ue(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(d))}function u(d){return d===a||d===null||fe(d)?(e.exit("chunkString"),c(d)):(e.consume(d),d===92?f:u)}function f(d){return d===a||d===92?(e.consume(d),u):u(d)}}function Ud(e,t){let n;return r;function r(i){return fe(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):ze(i)?Ue(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const M0e={name:"definition",tokenize:D0e},N0e={partial:!0,tokenize:z0e};function D0e(e,t,n){const r=this;let i;return s;function s(h){return e.enter("definition"),a(h)}function a(h){return wH.call(r,e,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(h)}function o(h){return i=yi(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 lt(h)?Ud(e,c)(h):c(h)}function c(h){return SH(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(h)}function u(h){return e.attempt(N0e,f,f)(h)}function f(h){return ze(h)?Ue(e,d,"whitespace")(h):d(h)}function d(h){return h===null||fe(h)?(e.exit("definition"),r.parser.defined.push(i),t(h)):n(h)}}function z0e(e,t,n){return r;function r(o){return lt(o)?Ud(e,i)(o):n(o)}function i(o){return _H(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function s(o){return ze(o)?Ue(e,a,"whitespace")(o):a(o)}function a(o){return o===null||fe(o)?t(o):n(o)}}const I0e={name:"hardBreakEscape",tokenize:$0e};function $0e(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return fe(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const L0e={name:"headingAtx",resolve:F0e,tokenize:j0e};function F0e(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"},kr(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function j0e(e,t,n){let r=0;return i;function i(u){return e.enter("atxHeading"),s(u)}function s(u){return e.enter("atxHeadingSequence"),a(u)}function a(u){return u===35&&r++<6?(e.consume(u),a):u===null||lt(u)?(e.exit("atxHeadingSequence"),o(u)):n(u)}function o(u){return u===35?(e.enter("atxHeadingSequence"),l(u)):u===null||fe(u)?(e.exit("atxHeading"),t(u)):ze(u)?Ue(e,o,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function l(u){return u===35?(e.consume(u),l):(e.exit("atxHeadingSequence"),o(u))}function c(u){return u===null||u===35||lt(u)?(e.exit("atxHeadingText"),o(u)):(e.consume(u),c)}}const P0e=["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"],jM=["pre","script","style","textarea"],U0e={concrete:!0,name:"htmlFlow",resolveTo:q0e,tokenize:V0e},B0e={partial:!0,tokenize:G0e},H0e={partial:!0,tokenize:K0e};function q0e(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 V0e(e,t,n){const r=this;let i,s,a,o,l;return c;function c(C){return u(C)}function u(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),f}function f(C){return C===33?(e.consume(C),d):C===47?(e.consume(C),s=!0,b):C===63?(e.consume(C),i=3,r.interrupt?t:R):jn(C)?(e.consume(C),a=String.fromCharCode(C),S):n(C)}function d(C){return C===45?(e.consume(C),i=2,h):C===91?(e.consume(C),i=5,o=0,p):jn(C)?(e.consume(C),i=4,r.interrupt?t:R):n(C)}function h(C){return C===45?(e.consume(C),r.interrupt?t:R):n(C)}function p(C){const X="CDATA[";return C===X.charCodeAt(o++)?(e.consume(C),o===X.length?r.interrupt?t:L:p):n(C)}function b(C){return jn(C)?(e.consume(C),a=String.fromCharCode(C),S):n(C)}function S(C){if(C===null||C===47||C===62||lt(C)){const X=C===47,W=a.toLowerCase();return!X&&!s&&jM.includes(W)?(i=1,r.interrupt?t(C):L(C)):P0e.includes(a.toLowerCase())?(i=6,X?(e.consume(C),m):r.interrupt?t(C):L(C)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(C):s?y(C):v(C))}return C===45||On(C)?(e.consume(C),a+=String.fromCharCode(C),S):n(C)}function m(C){return C===62?(e.consume(C),r.interrupt?t:L):n(C)}function y(C){return ze(C)?(e.consume(C),y):M(C)}function v(C){return C===47?(e.consume(C),M):C===58||C===95||jn(C)?(e.consume(C),_):ze(C)?(e.consume(C),v):M(C)}function _(C){return C===45||C===46||C===58||C===95||On(C)?(e.consume(C),_):A(C)}function A(C){return C===61?(e.consume(C),E):ze(C)?(e.consume(C),A):v(C)}function E(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),l=C,T):ze(C)?(e.consume(C),E):N(C)}function T(C){return C===l?(e.consume(C),l=null,D):C===null||fe(C)?n(C):(e.consume(C),T)}function N(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||lt(C)?A(C):(e.consume(C),N)}function D(C){return C===47||C===62||ze(C)?v(C):n(C)}function M(C){return C===62?(e.consume(C),$):n(C)}function $(C){return C===null||fe(C)?L(C):ze(C)?(e.consume(C),$):n(C)}function L(C){return C===45&&i===2?(e.consume(C),z):C===60&&i===1?(e.consume(C),F):C===62&&i===4?(e.consume(C),Re):C===63&&i===3?(e.consume(C),R):C===93&&i===5?(e.consume(C),te):fe(C)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(B0e,U,J)(C)):C===null||fe(C)?(e.exit("htmlFlowData"),J(C)):(e.consume(C),L)}function J(C){return e.check(H0e,Y,U)(C)}function Y(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),G}function G(C){return C===null||fe(C)?J(C):(e.enter("htmlFlowData"),L(C))}function z(C){return C===45?(e.consume(C),R):L(C)}function F(C){return C===47?(e.consume(C),a="",I):L(C)}function I(C){if(C===62){const X=a.toLowerCase();return jM.includes(X)?(e.consume(C),Re):L(C)}return jn(C)&&a.length<8?(e.consume(C),a+=String.fromCharCode(C),I):L(C)}function te(C){return C===93?(e.consume(C),R):L(C)}function R(C){return C===62?(e.consume(C),Re):C===45&&i===2?(e.consume(C),R):L(C)}function Re(C){return C===null||fe(C)?(e.exit("htmlFlowData"),U(C)):(e.consume(C),Re)}function U(C){return e.exit("htmlFlow"),t(C)}}function K0e(e,t,n){const r=this;return i;function i(a){return fe(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 G0e(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Am,t,n)}}const Y0e={name:"htmlText",tokenize:J0e};function J0e(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),A):R===63?(e.consume(R),v):jn(R)?(e.consume(R),N):n(R)}function c(R){return R===45?(e.consume(R),u):R===91?(e.consume(R),s=0,p):jn(R)?(e.consume(R),y):n(R)}function u(R){return R===45?(e.consume(R),h):n(R)}function f(R){return R===null?n(R):R===45?(e.consume(R),d):fe(R)?(a=f,F(R)):(e.consume(R),f)}function d(R){return R===45?(e.consume(R),h):f(R)}function h(R){return R===62?z(R):R===45?d(R):f(R)}function p(R){const Re="CDATA[";return R===Re.charCodeAt(s++)?(e.consume(R),s===Re.length?b:p):n(R)}function b(R){return R===null?n(R):R===93?(e.consume(R),S):fe(R)?(a=b,F(R)):(e.consume(R),b)}function S(R){return R===93?(e.consume(R),m):b(R)}function m(R){return R===62?z(R):R===93?(e.consume(R),m):b(R)}function y(R){return R===null||R===62?z(R):fe(R)?(a=y,F(R)):(e.consume(R),y)}function v(R){return R===null?n(R):R===63?(e.consume(R),_):fe(R)?(a=v,F(R)):(e.consume(R),v)}function _(R){return R===62?z(R):v(R)}function A(R){return jn(R)?(e.consume(R),E):n(R)}function E(R){return R===45||On(R)?(e.consume(R),E):T(R)}function T(R){return fe(R)?(a=T,F(R)):ze(R)?(e.consume(R),T):z(R)}function N(R){return R===45||On(R)?(e.consume(R),N):R===47||R===62||lt(R)?D(R):n(R)}function D(R){return R===47?(e.consume(R),z):R===58||R===95||jn(R)?(e.consume(R),M):fe(R)?(a=D,F(R)):ze(R)?(e.consume(R),D):z(R)}function M(R){return R===45||R===46||R===58||R===95||On(R)?(e.consume(R),M):$(R)}function $(R){return R===61?(e.consume(R),L):fe(R)?(a=$,F(R)):ze(R)?(e.consume(R),$):D(R)}function L(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),i=R,J):fe(R)?(a=L,F(R)):ze(R)?(e.consume(R),L):(e.consume(R),Y)}function J(R){return R===i?(e.consume(R),i=void 0,G):R===null?n(R):fe(R)?(a=J,F(R)):(e.consume(R),J)}function Y(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||lt(R)?D(R):(e.consume(R),Y)}function G(R){return R===47||R===62||lt(R)?D(R):n(R)}function z(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function F(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),I}function I(R){return ze(R)?Ue(e,te,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):te(R)}function te(R){return e.enter("htmlTextData"),a(R)}}const fT={name:"labelEnd",resolveAll:Z0e,resolveTo:ewe,tokenize:twe},Q0e={tokenize:nwe},X0e={tokenize:rwe},W0e={tokenize:iwe};function Z0e(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&&kr(e,0,e.length,n),e}function ewe(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}},u={type:"labelText",start:{...e[s+r+2][1].end},end:{...e[a-2][1].start}};return o=[["enter",l,t],["enter",c,t]],o=Lr(o,e.slice(s+1,s+r+3)),o=Lr(o,[["enter",u,t]]),o=Lr(o,Qv(t.parser.constructs.insideSpan.null,e.slice(s+r+4,a-3),t)),o=Lr(o,[["exit",u,t],e[a-2],e[a-1],["exit",c,t]]),o=Lr(o,e.slice(a+1)),o=Lr(o,[["exit",l,t]]),kr(e,s,e.length,o),e}function twe(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?f(d):(a=r.parser.defined.includes(yi(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(Q0e,u,a?u:f)(d):d===91?e.attempt(X0e,u,a?c:f)(d):a?u(d):f(d)}function c(d){return e.attempt(W0e,u,f)(d)}function u(d){return t(d)}function f(d){return s._balanced=!0,n(d)}}function nwe(e,t,n){return r;function r(f){return e.enter("resource"),e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),i}function i(f){return lt(f)?Ud(e,s)(f):s(f)}function s(f){return f===41?u(f):SH(e,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(f)}function a(f){return lt(f)?Ud(e,l)(f):u(f)}function o(f){return n(f)}function l(f){return f===34||f===39||f===40?_H(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(f):u(f)}function c(f){return lt(f)?Ud(e,u)(f):u(f)}function u(f){return f===41?(e.enter("resourceMarker"),e.consume(f),e.exit("resourceMarker"),e.exit("resource"),t):n(f)}}function rwe(e,t,n){const r=this;return i;function i(o){return wH.call(r,e,s,a,"reference","referenceMarker","referenceString")(o)}function s(o){return r.parser.defined.includes(yi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(o):n(o)}function a(o){return n(o)}}function iwe(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 swe={name:"labelStartImage",resolveAll:fT.resolveAll,tokenize:awe};function awe(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 owe={name:"labelStartLink",resolveAll:fT.resolveAll,tokenize:lwe};function lwe(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 H0={name:"lineEnding",tokenize:cwe};function cwe(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ue(e,t,"linePrefix")}}const sg={name:"thematicBreak",tokenize:uwe};function uwe(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||fe(c))?(e.exit("thematicBreak"),t(c)):n(c)}function l(c){return c===i?(e.consume(c),r++,l):(e.exit("thematicBreakSequence"),ze(c)?Ue(e,o,"whitespace")(c):o(c))}}const Yn={continuation:{tokenize:mwe},exit:gwe,name:"list",tokenize:hwe},fwe={partial:!0,tokenize:ywe},dwe={partial:!0,tokenize:pwe};function hwe(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 p=r.containerState.type||(h===42||h===43||h===45?"listUnordered":"listOrdered");if(p==="listUnordered"?!r.containerState.marker||h===r.containerState.marker:ex(h)){if(r.containerState.type||(r.containerState.type=p,e.enter(p,{_container:!0})),p==="listUnordered")return e.enter("listItemPrefix"),h===42||h===45?e.check(sg,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 ex(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(Am,r.interrupt?n:u,e.attempt(fwe,d,f))}function u(h){return r.containerState.initialBlankLine=!0,s++,d(h)}function f(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 mwe(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Am,i,s);function i(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ue(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(dwe,t,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ue(e,e.attempt(Yn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function pwe(e,t,n){const r=this;return Ue(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 gwe(e){e.exit(this.containerState.type)}function ywe(e,t,n){const r=this;return Ue(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 PM={name:"setextUnderline",resolveTo:bwe,tokenize:vwe};function bwe(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 vwe(e,t,n){const r=this;let i;return s;function s(c){let u=r.events.length,f;for(;u--;)if(r.events[u][1].type!=="lineEnding"&&r.events[u][1].type!=="linePrefix"&&r.events[u][1].type!=="content"){f=r.events[u][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||f)?(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)?Ue(e,l,"lineSuffix")(c):l(c))}function l(c){return c===null||fe(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}const Swe={tokenize:wwe};function wwe(e){const t=this,n=e.attempt(Am,r,e.attempt(this.parser.constructs.flowInitial,i,Ue(e,e.attempt(this.parser.constructs.flow,i,e.attempt(C0e,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 _we={resolveAll:kH()},xwe=xH("string"),kwe=xH("text");function xH(e){return{resolveAll:kH(e==="text"?Ewe: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(u){return c(u)?s(u):o(u)}function o(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),l}function l(u){return c(u)?(n.exit("data"),s(u)):(n.consume(u),l)}function c(u){if(u===null)return!0;const f=i[u];let d=-1;if(f)for(;++d<f.length;){const h=f[d];if(!h.previous||h.previous.call(r,r.previous))return!0}return!1}}}function kH(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 Ewe(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 Cwe={42:Yn,43:Yn,45:Yn,48:Yn,49:Yn,50:Yn,51:Yn,52:Yn,53:Yn,54:Yn,55:Yn,56:Yn,57:Yn,62:gH},Twe={91:M0e},Awe={[-2]:B0,[-1]:B0,32:B0},Owe={35:L0e,42:sg,45:[PM,sg],60:U0e,61:PM,95:sg,96:FM,126:FM},Rwe={38:bH,92:yH},Mwe={[-5]:H0,[-4]:H0,[-3]:H0,33:swe,38:bH,42:tx,60:[o0e,Y0e],91:owe,92:[I0e,yH],93:fT,95:tx,96:S0e},Nwe={null:[tx,_we]},Dwe={null:[42,95]},zwe={null:[]},Iwe=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Dwe,contentInitial:Twe,disable:zwe,document:Cwe,flow:Owe,flowInitial:Awe,insideSpan:Nwe,string:Rwe,text:Mwe},Symbol.toStringTag,{value:"Module"}));function $we(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:T(A),check:T(E),consume:y,enter:v,exit:_,interrupt:T(E,{interrupt:!0})},c={code:null,containerState:{},defineSkip:b,events:[],now:p,parser:e,previous:null,sliceSerialize:d,sliceStream:h,write:f};let u=t.tokenize.call(c,l);return t.resolveAll&&s.push(t),c;function f($){return a=Lr(a,$),S(),a[a.length-1]!==null?[]:(N(t,0),c.events=Qv(s,c.events,c),c.events)}function d($,L){return Fwe(h($),L)}function h($){return Lwe(a,$)}function p(){const{_bufferIndex:$,_index:L,line:J,column:Y,offset:G}=r;return{_bufferIndex:$,_index:L,line:J,column:Y,offset:G}}function b($){i[$.line]=$.column,M()}function S(){let $;for(;r._index<a.length;){const L=a[r._index];if(typeof L=="string")for($=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===$&&r._bufferIndex<L.length;)m(L.charCodeAt(r._bufferIndex));else m(L)}}function m($){u=u($)}function y($){fe($)?(r.line++,r.column=1,r.offset+=$===-3?2:1,M()):$!==-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=$}function v($,L){const J=L||{};return J.type=$,J.start=p(),c.events.push(["enter",J,c]),o.push(J),J}function _($){const L=o.pop();return L.end=p(),c.events.push(["exit",L,c]),L}function A($,L){N($,L.from)}function E($,L){L.restore()}function T($,L){return J;function J(Y,G,z){let F,I,te,R;return Array.isArray(Y)?U(Y):"tokenize"in Y?U([Y]):Re(Y);function Re(le){return H;function H(he){const we=he!==null&&le[he],_e=he!==null&&le.null,Me=[...Array.isArray(we)?we:we?[we]:[],...Array.isArray(_e)?_e:_e?[_e]:[]];return U(Me)(he)}}function U(le){return F=le,I=0,le.length===0?z:C(le[I])}function C(le){return H;function H(he){return R=D(),te=le,le.partial||(c.currentConstruct=le),le.name&&c.parser.constructs.disable.null.includes(le.name)?W():le.tokenize.call(L?Object.assign(Object.create(c),L):c,l,X,W)(he)}}function X(le){return $(te,R),G}function W(le){return R.restore(),++I<F.length?C(F[I]):z}}}function N($,L){$.resolveAll&&!s.includes($)&&s.push($),$.resolve&&kr(c.events,L,c.events.length-L,$.resolve(c.events.slice(L),c)),$.resolveTo&&(c.events=$.resolveTo(c.events,c))}function D(){const $=p(),L=c.previous,J=c.currentConstruct,Y=c.events.length,G=Array.from(o);return{from:Y,restore:z};function z(){r=$,c.previous=L,c.currentConstruct=J,c.events.length=Y,o=G,M()}}function M(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Lwe(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 Fwe(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=`
|
|
226
|
+
`;break}case-3:{a=`\r
|
|
227
|
+
`;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 jwe(e){const r={constructs:mH([Iwe,...(e||{}).extensions||[]]),content:i(e0e),defined:[],document:i(n0e),flow:i(Swe),lazy:{},string:i(xwe),text:i(kwe)};return r;function i(s){return a;function a(o){return $we(r,s,o)}}}function Pwe(e){for(;!vH(e););return e}const UM=/[\0\t\n\r]/g;function Uwe(){let e=1,t="",n=!0,r;return i;function i(s,a,o){const l=[];let c,u,f,d,h;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(a||void 0).decode(s)),f=0,t="",n&&(s.charCodeAt(0)===65279&&f++,n=void 0);f<s.length;){if(UM.lastIndex=f,c=UM.exec(s),d=c&&c.index!==void 0?c.index:s.length,h=s.charCodeAt(d),!c){t=s.slice(f);break}if(h===10&&f===d&&r)l.push(-3),r=void 0;else switch(r&&(l.push(-5),r=void 0),f<d&&(l.push(s.slice(f,d)),e+=d-f),h){case 0:{l.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,l.push(-2);e++<u;)l.push(-1);break}case 10:{l.push(-4),e=1;break}default:r=!0,e=1}f=d+1}return o&&(r&&l.push(-5),t&&l.push(t),l.push(null)),l}}const Bwe=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Hwe(e){return e.replace(Bwe,qwe)}function qwe(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return pH(n.slice(s?2:1),s?16:10)}return uT(n)||e}const EH={}.hasOwnProperty;function Vwe(e,t,n){return typeof t!="string"&&(n=t,t=void 0),Kwe(n)(Pwe(jwe(n).document().write(Uwe()(e,t,!0))))}function Kwe(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Eo),autolinkProtocol:D,autolinkEmail:D,atxHeading:s(na),blockQuote:s(_e),characterEscape:D,characterReference:D,codeFenced:s(Me),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:s(Me,a),codeText:s($e,a),codeTextData:D,data:D,codeFlowValue:D,definition:s(Dn),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:s(Ar),hardBreakEscape:s(ra),hardBreakTrailing:s(ra),htmlFlow:s(ia,a),htmlFlowData:D,htmlText:s(ia,a),htmlTextData:D,image:s(eS),label:a,link:s(Eo),listItem:s(s9),listItemValue:d,listOrdered:s(kT,f),listUnordered:s(kT),paragraph:s(a9),reference:C,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:s(na),strong:s(o9),thematicBreak:s(c9)},exit:{atxHeading:l(),atxHeadingSequence:A,autolink:l(),autolinkEmail:we,autolinkProtocol:he,blockQuote:l(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:le,characterReference:H,codeFenced:l(S),codeFencedFence:b,codeFencedFenceInfo:h,codeFencedFenceMeta:p,codeFlowValue:M,codeIndented:l(m),codeText:l(G),codeTextData:M,data:M,definition:l(),definitionDestinationString:_,definitionLabelString:y,definitionTitleString:v,emphasis:l(),hardBreakEscape:l(L),hardBreakTrailing:l(L),htmlFlow:l(J),htmlFlowData:M,htmlText:l(Y),htmlTextData:M,image:l(F),label:te,labelText:I,lineEnding:$,link:l(z),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:X,resourceDestinationString:R,resourceTitleString:Re,resource:U,setextHeading:l(N),setextHeadingLineSequence:T,setextHeadingText:E,strong:l(),thematicBreak:l()}};CH(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(j){let Q={type:"root",children:[]};const xe={stack:[Q],tokenStack:[],config:t,enter:o,exit:c,buffer:a,resume:u,data:n},Le=[];let st=-1;for(;++st<j.length;)if(j[st][1].type==="listOrdered"||j[st][1].type==="listUnordered")if(j[st][0]==="enter")Le.push(st);else{const ei=Le.pop();st=i(j,ei,st)}for(st=-1;++st<j.length;){const ei=t[j[st][0]];EH.call(ei,j[st][1].type)&&ei[j[st][1].type].call(Object.assign({sliceSerialize:j[st][2].sliceSerialize},xe),j[st][1])}if(xe.tokenStack.length>0){const ei=xe.tokenStack[xe.tokenStack.length-1];(ei[1]||BM).call(xe,void 0,ei[0])}for(Q.position={start:oa(j.length>0?j[0][1].start:{line:1,column:1,offset:0}),end:oa(j.length>0?j[j.length-2][1].end:{line:1,column:1,offset:0})},st=-1;++st<t.transforms.length;)Q=t.transforms[st](Q)||Q;return Q}function i(j,Q,xe){let Le=Q-1,st=-1,ei=!1,Co,ls,Cf,Tf;for(;++Le<=xe;){const ar=j[Le];switch(ar[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ar[0]==="enter"?st++:st--,Tf=void 0;break}case"lineEndingBlank":{ar[0]==="enter"&&(Co&&!Tf&&!st&&!Cf&&(Cf=Le),Tf=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tf=void 0}if(!st&&ar[0]==="enter"&&ar[1].type==="listItemPrefix"||st===-1&&ar[0]==="exit"&&(ar[1].type==="listUnordered"||ar[1].type==="listOrdered")){if(Co){let Kl=Le;for(ls=void 0;Kl--;){const cs=j[Kl];if(cs[1].type==="lineEnding"||cs[1].type==="lineEndingBlank"){if(cs[0]==="exit")continue;ls&&(j[ls][1].type="lineEndingBlank",ei=!0),cs[1].type="lineEnding",ls=Kl}else if(!(cs[1].type==="linePrefix"||cs[1].type==="blockQuotePrefix"||cs[1].type==="blockQuotePrefixWhitespace"||cs[1].type==="blockQuoteMarker"||cs[1].type==="listItemIndent"))break}Cf&&(!ls||Cf<ls)&&(Co._spread=!0),Co.end=Object.assign({},ls?j[ls][1].start:ar[1].end),j.splice(ls||Le,0,["exit",Co,ar[2]]),Le++,xe++}if(ar[1].type==="listItemPrefix"){const Kl={type:"listItem",_spread:!1,start:Object.assign({},ar[1].start),end:void 0};Co=Kl,j.splice(Le,0,["enter",Kl,ar[2]]),Le++,xe++,Cf=void 0,Tf=!0}}}return j[Q][1]._spread=ei,xe}function s(j,Q){return xe;function xe(Le){o.call(this,j(Le),Le),Q&&Q.call(this,Le)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(j,Q,xe){this.stack[this.stack.length-1].children.push(j),this.stack.push(j),this.tokenStack.push([Q,xe||void 0]),j.position={start:oa(Q.start),end:void 0}}function l(j){return Q;function Q(xe){j&&j.call(this,xe),c.call(this,xe)}}function c(j,Q){const xe=this.stack.pop(),Le=this.tokenStack.pop();if(Le)Le[0].type!==j.type&&(Q?Q.call(this,j,Le[0]):(Le[1]||BM).call(this,j,Le[0]));else throw new Error("Cannot close `"+j.type+"` ("+Pd({start:j.start,end:j.end})+"): it’s not open");xe.position.end=oa(j.end)}function u(){return cT(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function d(j){if(this.data.expectingFirstListItemValue){const Q=this.stack[this.stack.length-2];Q.start=Number.parseInt(this.sliceSerialize(j),10),this.data.expectingFirstListItemValue=void 0}}function h(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.lang=j}function p(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.meta=j}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.value=j.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.value=j.replace(/(\r?\n|\r)$/g,"")}function y(j){const Q=this.resume(),xe=this.stack[this.stack.length-1];xe.label=Q,xe.identifier=yi(this.sliceSerialize(j)).toLowerCase()}function v(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.title=j}function _(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.url=j}function A(j){const Q=this.stack[this.stack.length-1];if(!Q.depth){const xe=this.sliceSerialize(j).length;Q.depth=xe}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function T(j){const Q=this.stack[this.stack.length-1];Q.depth=this.sliceSerialize(j).codePointAt(0)===61?1:2}function N(){this.data.setextHeadingSlurpLineEnding=void 0}function D(j){const xe=this.stack[this.stack.length-1].children;let Le=xe[xe.length-1];(!Le||Le.type!=="text")&&(Le=l9(),Le.position={start:oa(j.start),end:void 0},xe.push(Le)),this.stack.push(Le)}function M(j){const Q=this.stack.pop();Q.value+=this.sliceSerialize(j),Q.position.end=oa(j.end)}function $(j){const Q=this.stack[this.stack.length-1];if(this.data.atHardBreak){const xe=Q.children[Q.children.length-1];xe.position.end=oa(j.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Q.type)&&(D.call(this,j),M.call(this,j))}function L(){this.data.atHardBreak=!0}function J(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.value=j}function Y(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.value=j}function G(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.value=j}function z(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=Q,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function F(){const j=this.stack[this.stack.length-1];if(this.data.inReference){const Q=this.data.referenceType||"shortcut";j.type+="Reference",j.referenceType=Q,delete j.url,delete j.title}else delete j.identifier,delete j.label;this.data.referenceType=void 0}function I(j){const Q=this.sliceSerialize(j),xe=this.stack[this.stack.length-2];xe.label=Hwe(Q),xe.identifier=yi(Q).toLowerCase()}function te(){const j=this.stack[this.stack.length-1],Q=this.resume(),xe=this.stack[this.stack.length-1];if(this.data.inReference=!0,xe.type==="link"){const Le=j.children;xe.children=Le}else xe.alt=Q}function R(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.url=j}function Re(){const j=this.resume(),Q=this.stack[this.stack.length-1];Q.title=j}function U(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function X(j){const Q=this.resume(),xe=this.stack[this.stack.length-1];xe.label=Q,xe.identifier=yi(this.sliceSerialize(j)).toLowerCase(),this.data.referenceType="full"}function W(j){this.data.characterReferenceType=j.type}function le(j){const Q=this.sliceSerialize(j),xe=this.data.characterReferenceType;let Le;xe?(Le=pH(Q,xe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Le=uT(Q);const st=this.stack[this.stack.length-1];st.value+=Le}function H(j){const Q=this.stack.pop();Q.position.end=oa(j.end)}function he(j){M.call(this,j);const Q=this.stack[this.stack.length-1];Q.url=this.sliceSerialize(j)}function we(j){M.call(this,j);const Q=this.stack[this.stack.length-1];Q.url="mailto:"+this.sliceSerialize(j)}function _e(){return{type:"blockquote",children:[]}}function Me(){return{type:"code",lang:null,meta:null,value:""}}function $e(){return{type:"inlineCode",value:""}}function Dn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ar(){return{type:"emphasis",children:[]}}function na(){return{type:"heading",depth:0,children:[]}}function ra(){return{type:"break"}}function ia(){return{type:"html",value:""}}function eS(){return{type:"image",title:null,url:"",alt:null}}function Eo(){return{type:"link",title:null,url:"",children:[]}}function kT(j){return{type:"list",ordered:j.type==="listOrdered",start:null,spread:j._spread,children:[]}}function s9(j){return{type:"listItem",spread:j._spread,checked:null,children:[]}}function a9(){return{type:"paragraph",children:[]}}function o9(){return{type:"strong",children:[]}}function l9(){return{type:"text",value:""}}function c9(){return{type:"thematicBreak"}}}function oa(e){return{line:e.line,column:e.column,offset:e.offset}}function CH(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?CH(e,r):Gwe(e,r)}}function Gwe(e,t){let n;for(n in t)if(EH.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 BM(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pd({start:t.start,end:t.end})+") is still open")}function Ywe(e){const t=this;t.parser=n;function n(r){return Vwe(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function Jwe(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 Qwe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
228
|
+
`}]}function Xwe(e,t){const n=t.value?t.value+`
|
|
229
|
+
`:"",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 Wwe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Zwe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function e_e(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Ef(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 t_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 n_e(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function TH(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 r_e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return TH(e,t);const i={src:Ef(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 i_e(e,t){const n={src:Ef(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 s_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 a_e(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return TH(e,t);const i={href:Ef(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 o_e(e,t){const n={href:Ef(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 l_e(e,t,n){const r=e.all(t),i=n?c_e(n):AH(t),s={},a=[];if(typeof t.checked=="boolean"){const u=r[0];let f;u&&u.type==="element"&&u.tagName==="p"?f=u:(f={type:"element",tagName:"p",properties:{},children:[]},r.unshift(f)),f.children.length>0&&f.children.unshift({type:"text",value:" "}),f.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let o=-1;for(;++o<r.length;){const u=r[o];(i||o!==0||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
|
|
230
|
+
`}),u.type==="element"&&u.tagName==="p"&&!i?a.push(...u.children):a.push(u)}const l=r[r.length-1];l&&(i||l.type!=="element"||l.tagName!=="p")&&a.push({type:"text",value:`
|
|
231
|
+
`});const c={type:"element",tagName:"li",properties:s,children:a};return e.patch(t,c),e.applyData(t,c)}function c_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=AH(n[r])}return t}function AH(e){const t=e.spread;return t??e.children.length>1}function u_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 f_e(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function d_e(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function h_e(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function m_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=sT(t.children[1]),l=oH(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 p_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 f=t.children[l],d={},h=a?a[l]:void 0;h&&(d.align=h);let p={type:"element",tagName:s,properties:d,children:[]};f&&(p.children=e.all(f),e.patch(f,p),p=e.applyData(f,p)),c.push(p)}const u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}function g_e(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const HM=9,qM=32;function y_e(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(VM(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(VM(t.slice(i),i>0,!1)),s.join("")}function VM(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===HM||s===qM;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===HM||s===qM;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function b_e(e,t){const n={type:"text",value:y_e(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function v_e(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const S_e={blockquote:Jwe,break:Qwe,code:Xwe,delete:Wwe,emphasis:Zwe,footnoteReference:e_e,heading:t_e,html:n_e,imageReference:r_e,image:i_e,inlineCode:s_e,linkReference:a_e,link:o_e,listItem:l_e,list:u_e,paragraph:f_e,root:d_e,strong:h_e,table:m_e,tableCell:g_e,tableRow:p_e,text:b_e,thematicBreak:v_e,toml:pp,yaml:pp,definition:pp,footnoteDefinition:pp};function pp(){}const OH=-1,Xv=0,Bd=1,Jy=2,dT=3,hT=4,mT=5,pT=6,RH=7,MH=8,KM=typeof self=="object"?self:globalThis,w_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 Xv:case OH:return n(a,i);case Bd:{const o=n([],i);for(const l of a)o.push(r(l));return o}case Jy:{const o=n({},i);for(const[l,c]of a)o[r(l)]=r(c);return o}case dT:return n(new Date(a),i);case hT:{const{source:o,flags:l}=a;return n(new RegExp(o,l),i)}case mT:{const o=n(new Map,i);for(const[l,c]of a)o.set(r(l),r(c));return o}case pT:{const o=n(new Set,i);for(const l of a)o.add(r(l));return o}case RH:{const{name:o,message:l}=a;return n(new KM[o](l),i)}case MH: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 KM[s](a),i)};return r},GM=e=>w_e(new Map,e)(0),sc="",{toString:__e}={},{keys:x_e}=Object,Jf=e=>{const t=typeof e;if(t!=="object"||!e)return[Xv,t];const n=__e.call(e).slice(8,-1);switch(n){case"Array":return[Bd,sc];case"Object":return[Jy,sc];case"Date":return[dT,sc];case"RegExp":return[hT,sc];case"Map":return[mT,sc];case"Set":return[pT,sc];case"DataView":return[Bd,n]}return n.includes("Array")?[Bd,n]:n.includes("Error")?[RH,n]:[Jy,n]},gp=([e,t])=>e===Xv&&(t==="function"||t==="symbol"),k_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]=Jf(a);switch(o){case Xv:{let u=a;switch(l){case"bigint":o=MH,u=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+l);u=null;break;case"undefined":return i([OH],a)}return i([o,u],a)}case Bd:{if(l){let d=a;return l==="DataView"?d=new Uint8Array(a.buffer):l==="ArrayBuffer"&&(d=new Uint8Array(a)),i([l,[...d]],a)}const u=[],f=i([o,u],a);for(const d of a)u.push(s(d));return f}case Jy:{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 u=[],f=i([o,u],a);for(const d of x_e(a))(e||!gp(Jf(a[d])))&&u.push([s(d),s(a[d])]);return f}case dT:return i([o,a.toISOString()],a);case hT:{const{source:u,flags:f}=a;return i([o,{source:u,flags:f}],a)}case mT:{const u=[],f=i([o,u],a);for(const[d,h]of a)(e||!(gp(Jf(d))||gp(Jf(h))))&&u.push([s(d),s(h)]);return f}case pT:{const u=[],f=i([o,u],a);for(const d of a)(e||!gp(Jf(d)))&&u.push(s(d));return f}}const{message:c}=a;return i([o,{name:l,message:c}],a)};return s},YM=(e,{json:t,lossy:n}={})=>{const r=[];return k_e(!(t||n),!!t,new Map,r)(e),r},Qy=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?GM(YM(e,t)):structuredClone(e):(e,t)=>GM(YM(e,t));function E_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 C_e(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function T_e(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||E_e,r=e.options.footnoteBackLabel||C_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 u=e.all(c),f=String(c.identifier).toUpperCase(),d=Ef(f.toLowerCase());let h=0;const p=[],b=e.footnoteCounts.get(f);for(;b!==void 0&&++h<=b;){p.length>0&&p.push({type:"text",value:" "});let y=typeof n=="string"?n:n(l,h);typeof y=="string"&&(y={type:"text",value:y}),p.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(y)?y:[y]})}const S=u[u.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const y=S.children[S.children.length-1];y&&y.type==="text"?y.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...p)}else u.push(...p);const m={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(u,!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:{...Qy(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
232
|
+
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(o,!0)},{type:"text",value:`
|
|
233
|
+
`}]}}const Wv=function(e){if(e==null)return M_e;if(typeof e=="function")return Zv(e);if(typeof e=="object")return Array.isArray(e)?A_e(e):O_e(e);if(typeof e=="string")return R_e(e);throw new Error("Expected function, string, or object as test")};function A_e(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Wv(e[n]);return Zv(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function O_e(e){const t=e;return Zv(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function R_e(e){return Zv(t);function t(n){return n&&n.type===e}}function Zv(e){return t;function t(n,r,i){return!!(N_e(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function M_e(){return!0}function N_e(e){return e!==null&&typeof e=="object"&&"type"in e}const NH=[],D_e=!0,nx=!1,z_e="skip";function DH(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=Wv(i),a=r?-1:1;o(e,void 0,[])();function o(l,c,u){const f=l&&typeof l=="object"?l:{};if(typeof f.type=="string"){const h=typeof f.tagName=="string"?f.tagName:typeof f.name=="string"?f.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(l.type+(h?"<"+h+">":""))+")"})}return d;function d(){let h=NH,p,b,S;if((!t||s(l,c,u[u.length-1]||void 0))&&(h=I_e(n(l,u)),h[0]===nx))return h;if("children"in l&&l.children){const m=l;if(m.children&&h[0]!==z_e)for(b=(r?m.children.length:-1)+a,S=u.concat(m);b>-1&&b<m.children.length;){const y=m.children[b];if(p=o(y,b,S)(),p[0]===nx)return p;b=typeof p[1]=="number"?p[1]:b+a}}return h}}}function I_e(e){return Array.isArray(e)?e:typeof e=="number"?[D_e,e]:e==null?NH:[e]}function gT(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),DH(e,s,o,i);function o(l,c){const u=c[c.length-1],f=u?u.children.indexOf(l):void 0;return a(l,f,u)}}const rx={}.hasOwnProperty,$_e={};function L_e(e,t){const n=t||$_e,r=new Map,i=new Map,s=new Map,a={...S_e,...n.handlers},o={all:c,applyData:j_e,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:a,one:l,options:n,patch:F_e,wrap:U_e};return gT(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){const f=u.type==="definition"?r:i,d=String(u.identifier).toUpperCase();f.has(d)||f.set(d,u)}}),o;function l(u,f){const d=u.type,h=o.handlers[d];if(rx.call(o.handlers,d)&&h)return h(o,u,f);if(o.options.passThrough&&o.options.passThrough.includes(d)){if("children"in u){const{children:b,...S}=u,m=Qy(S);return m.children=o.all(u),m}return Qy(u)}return(o.options.unknownHandler||P_e)(o,u,f)}function c(u){const f=[];if("children"in u){const d=u.children;let h=-1;for(;++h<d.length;){const p=o.one(d[h],u);if(p){if(h&&d[h-1].type==="break"&&(!Array.isArray(p)&&p.type==="text"&&(p.value=JM(p.value)),!Array.isArray(p)&&p.type==="element")){const b=p.children[0];b&&b.type==="text"&&(b.value=JM(b.value))}Array.isArray(p)?f.push(...p):f.push(p)}}}return f}}function F_e(e,t){e.position&&(t.position=CSe(e))}function j_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,Qy(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function P_e(e,t){const n=t.data||{},r="value"in t&&!(rx.call(n,"hProperties")||rx.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 U_e(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
234
|
+
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
235
|
+
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
236
|
+
`}),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 QM(e,t){const n=L_e(e,t),r=n.one(e,void 0),i=T_e(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
|
|
237
|
+
`},i),s}function B_e(e,t){return e&&"run"in e?async function(n,r){const i=QM(n,{file:r,...t});await e.run(i,r)}:function(n,r){return QM(n,{file:r,...e||t})}}function XM(e){if(e)throw e}var ag=Object.prototype.hasOwnProperty,zH=Object.prototype.toString,WM=Object.defineProperty,ZM=Object.getOwnPropertyDescriptor,eN=function(t){return typeof Array.isArray=="function"?Array.isArray(t):zH.call(t)==="[object Array]"},tN=function(t){if(!t||zH.call(t)!=="[object Object]")return!1;var n=ag.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&ag.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!r)return!1;var i;for(i in t);return typeof i>"u"||ag.call(t,i)},nN=function(t,n){WM&&n.name==="__proto__"?WM(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},rN=function(t,n){if(n==="__proto__")if(ag.call(t,n)){if(ZM)return ZM(t,n).value}else return;return t[n]},H_e=function e(){var t,n,r,i,s,a,o=arguments[0],l=1,c=arguments.length,u=!1;for(typeof o=="boolean"&&(u=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=rN(o,n),i=rN(t,n),o!==i&&(u&&i&&(tN(i)||(s=eN(i)))?(s?(s=!1,a=r&&eN(r)?r:[]):a=r&&tN(r)?r:{},nN(o,{name:n,newValue:e(u,a,i)})):typeof i<"u"&&nN(o,{name:n,newValue:i}));return o};const q0=Dh(H_e);function ix(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 q_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 u=e[++s];let f=-1;if(l){a(l);return}for(;++f<i.length;)(c[f]===null||c[f]===void 0)&&(c[f]=i[f]);i=c,u?V_e(u,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 V_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 u=c;if(o&&n)throw u;return i(u)}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 Mi={basename:K_e,dirname:G_e,extname:Y_e,join:J_e,sep:"/"};function K_e(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Om(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 G_e(e){if(Om(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 Y_e(e){Om(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 J_e(...e){let t=-1,n;for(;++t<e.length;)Om(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":Q_e(n)}function Q_e(e){Om(e);const t=e.codePointAt(0)===47;let n=X_e(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function X_e(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 Om(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const W_e={cwd:Z_e};function Z_e(){return"/"}function sx(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function e1e(e){if(typeof e=="string")e=new URL(e);else if(!sx(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 t1e(e)}function t1e(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 V0=["history","path","basename","stem","extname","dirname"];class IH{constructor(t){let n;t?sx(t)?n={path:t}:typeof t=="string"||n1e(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":W_e.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<V0.length;){const s=V0[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)V0.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Mi.basename(this.path):void 0}set basename(t){G0(t,"basename"),K0(t,"basename"),this.path=Mi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Mi.dirname(this.path):void 0}set dirname(t){iN(this.basename,"dirname"),this.path=Mi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Mi.extname(this.path):void 0}set extname(t){if(K0(t,"extname"),iN(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=Mi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){sx(t)&&(t=e1e(t)),G0(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Mi.basename(this.path,this.extname):void 0}set stem(t){G0(t,"stem"),K0(t,"stem"),this.path=Mi.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 Nn(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 K0(e,t){if(e&&e.includes(Mi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Mi.sep+"`")}function G0(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function iN(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function n1e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const r1e=function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s},i1e={}.hasOwnProperty;class yT extends r1e{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=q_e()}copy(){const t=new yT;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(q0(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Q0("data",this.frozen),this.namespace[t]=n,this):i1e.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Q0("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=yp(t),r=this.parser||this.Parser;return Y0("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Y0("process",this.parser||this.Parser),J0("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,a){const o=yp(t),l=r.parse(o);r.run(l,o,function(u,f,d){if(u||!f||!d)return c(u);const h=f,p=r.stringify(h,d);o1e(p)?d.value=p:d.result=p,c(u,d)});function c(u,f){u||!f?a(u):s?s(f):n(void 0,f)}}}processSync(t){let n=!1,r;return this.freeze(),Y0("processSync",this.parser||this.Parser),J0("processSync",this.compiler||this.Compiler),this.process(t,i),aN("processSync","process",n),r;function i(s,a){n=!0,XM(s),r=a}}run(t,n,r){sN(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=yp(n);i.run(t,l,c);function c(u,f,d){const h=f||t;u?o(u):a?a(h):r(void 0,h,d)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),aN("runSync","run",r),i;function s(a,o){XM(a),i=o,r=!0}}stringify(t,n){this.freeze();const r=yp(n),i=this.compiler||this.Compiler;return J0("stringify",i),sN(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Q0("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[u,...f]=c;l(u,f)}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=q0(!0,i.settings,c.settings))}function o(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){const f=c[u];s(f)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function l(c,u){let f=-1,d=-1;for(;++f<r.length;)if(r[f][0]===c){d=f;break}if(d===-1)r.push([c,...u]);else if(u.length>0){let[h,...p]=u;const b=r[d][1];ix(b)&&ix(h)&&(h=q0(!0,b,h)),r[d]=[c,h,...p]}}}}const s1e=new yT().freeze();function Y0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function J0(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Q0(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 sN(e){if(!ix(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function aN(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function yp(e){return a1e(e)?e:new IH(e)}function a1e(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function o1e(e){return typeof e=="string"||l1e(e)}function l1e(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const c1e="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",oN=[],lN={allowDangerousHtml:!0},u1e=/^(https?|ircs?|mailto|xmpp)$/i,f1e=[{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 d1e(e){const t=h1e(e),n=m1e(e);return p1e(t.runSync(t.parse(n),n),e)}function h1e(e){const t=e.rehypePlugins||oN,n=e.remarkPlugins||oN,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...lN}:lN;return s1e().use(Ywe).use(n).use(B_e,r).use(t)}function m1e(e){const t=e.children||"",n=new IH;return typeof t=="string"&&(n.value=t),n}function p1e(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,a=t.skipHtml,o=t.unwrapDisallowed,l=t.urlTransform||g1e;for(const u of f1e)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+c1e+u.id,void 0);return gT(e,c),MSe(e,{Fragment:k.Fragment,components:i,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function c(u,f,d){if(u.type==="raw"&&d&&typeof f=="number")return a?d.children.splice(f,1):d.children[f]={type:"text",value:u.value},f;if(u.type==="element"){let h;for(h in U0)if(Object.hasOwn(U0,h)&&Object.hasOwn(u.properties,h)){const p=u.properties[h],b=U0[h];(b===null||b.includes(u.tagName))&&(u.properties[h]=l(String(p||""),h,u))}}if(u.type==="element"){let h=n?!n.includes(u.tagName):s?s.includes(u.tagName):!1;if(!h&&r&&typeof f=="number"&&(h=!r(u,f,d)),h&&d&&typeof f=="number")return o&&u.children?d.children.splice(f,1,...u.children):d.children.splice(f,1),f}}}function g1e(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||u1e.test(e.slice(0,t))?e:""}function cN(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 y1e(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function b1e(e,t,n){const i=Wv((n||{}).ignore||[]),s=v1e(t);let a=-1;for(;++a<s.length;)DH(e,"text",o);function o(c,u){let f=-1,d;for(;++f<u.length;){const h=u[f],p=d?d.children:void 0;if(i(h,p?p.indexOf(h):void 0,d))return;d=h}if(d)return l(c,u)}function l(c,u){const f=u[u.length-1],d=s[a][0],h=s[a][1];let p=0;const S=f.children.indexOf(c);let m=!1,y=[];d.lastIndex=0;let v=d.exec(c.value);for(;v;){const _=v.index,A={index:v.index,input:v.input,stack:[...u,c]};let E=h(...v,A);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?d.lastIndex=_+1:(p!==_&&y.push({type:"text",value:c.value.slice(p,_)}),Array.isArray(E)?y.push(...E):E&&y.push(E),p=_+v[0].length,m=!0),!d.global)break;v=d.exec(c.value)}return m?(p<c.value.length&&y.push({type:"text",value:c.value.slice(p)}),f.children.splice(S,1,...y)):y=[c],S+y.length}}function v1e(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([S1e(i[0]),w1e(i[1])])}return t}function S1e(e){return typeof e=="string"?new RegExp(y1e(e),"g"):e}function w1e(e){return typeof e=="function"?e:function(){return e}}const X0="phrasing",W0=["autolink","link","image","label"];function _1e(){return{transforms:[O1e],enter:{literalAutolink:k1e,literalAutolinkEmail:Z0,literalAutolinkHttp:Z0,literalAutolinkWww:Z0},exit:{literalAutolink:A1e,literalAutolinkEmail:T1e,literalAutolinkHttp:E1e,literalAutolinkWww:C1e}}}function x1e(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:X0,notInConstruct:W0},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:X0,notInConstruct:W0},{character:":",before:"[ps]",after:"\\/",inConstruct:X0,notInConstruct:W0}]}}function k1e(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Z0(e){this.config.enter.autolinkProtocol.call(this,e)}function E1e(e){this.config.exit.autolinkProtocol.call(this,e)}function C1e(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 T1e(e){this.config.exit.autolinkEmail.call(this,e)}function A1e(e){this.exit(e)}function O1e(e){b1e(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,R1e],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),M1e]],{ignore:["link","linkReference"]})}function R1e(e,t,n,r,i){let s="";if(!$H(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!N1e(n)))return!1;const a=D1e(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 M1e(e,t,n,r){return!$H(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function N1e(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 D1e(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=cN(e,"(");let s=cN(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 $H(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ol(n)||Jv(n))&&(!t||n!==47)}LH.peek=B1e;function z1e(){this.buffer()}function I1e(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $1e(){this.buffer()}function L1e(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function F1e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function j1e(e){this.exit(e)}function P1e(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function U1e(e){this.exit(e)}function B1e(){return"["}function LH(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 H1e(){return{enter:{gfmFootnoteCallString:z1e,gfmFootnoteCall:I1e,gfmFootnoteDefinitionLabelString:$1e,gfmFootnoteDefinition:L1e},exit:{gfmFootnoteCallString:F1e,gfmFootnoteCall:j1e,gfmFootnoteDefinitionLabelString:P1e,gfmFootnoteDefinition:U1e}}}function q1e(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:LH},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"),u=s.enter("label");return l+=o.move(s.safe(s.associationId(r),{before:l,after:"]"})),u(),l+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),l+=o.move((t?`
|
|
238
|
+
`:" ")+s.indentLines(s.containerFlow(r,o.current()),t?FH:V1e))),c(),l}}function V1e(e,t,n){return t===0?e:FH(e,t,n)}function FH(e,t,n){return(n?"":" ")+e}const K1e=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];jH.peek=X1e;function G1e(){return{canContainEols:["delete"],enter:{strikethrough:J1e},exit:{strikethrough:Q1e}}}function Y1e(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:K1e}],handlers:{delete:jH}}}function J1e(e){this.enter({type:"delete",children:[]},e)}function Q1e(e){this.exit(e)}function jH(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 X1e(){return"~"}function W1e(e){return e.length}function Z1e(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||W1e,s=[],a=[],o=[],l=[];let c=0,u=-1;for(;++u<e.length;){const b=[],S=[];let m=-1;for(e[u].length>c&&(c=e[u].length);++m<e[u].length;){const y=exe(e[u][m]);if(n.alignDelimiters!==!1){const v=i(y);S[m]=v,(l[m]===void 0||v>l[m])&&(l[m]=v)}b.push(y)}a[u]=b,o[u]=S}let f=-1;if(typeof r=="object"&&"length"in r)for(;++f<c;)s[f]=uN(r[f]);else{const b=uN(r);for(;++f<c;)s[f]=b}f=-1;const d=[],h=[];for(;++f<c;){const b=s[f];let S="",m="";b===99?(S=":",m=":"):b===108?S=":":b===114&&(m=":");let y=n.alignDelimiters===!1?1:Math.max(1,l[f]-S.length-m.length);const v=S+"-".repeat(y)+m;n.alignDelimiters!==!1&&(y=S.length+y+m.length,y>l[f]&&(l[f]=y),h[f]=y),d[f]=v}a.splice(1,0,d),o.splice(1,0,h),u=-1;const p=[];for(;++u<a.length;){const b=a[u],S=o[u];f=-1;const m=[];for(;++f<c;){const y=b[f]||"";let v="",_="";if(n.alignDelimiters!==!1){const A=l[f]-(S[f]||0),E=s[f];E===114?v=" ".repeat(A):E===99?A%2?(v=" ".repeat(A/2+.5),_=" ".repeat(A/2-.5)):(v=" ".repeat(A/2),_=v):_=" ".repeat(A)}n.delimiterStart!==!1&&!f&&m.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&y==="")&&(n.delimiterStart!==!1||f)&&m.push(" "),n.alignDelimiters!==!1&&m.push(v),m.push(y),n.alignDelimiters!==!1&&m.push(_),n.padding!==!1&&m.push(" "),(n.delimiterEnd!==!1||f!==c-1)&&m.push("|")}p.push(n.delimiterEnd===!1?m.join("").replace(/ +$/,""):m.join(""))}return p.join(`
|
|
239
|
+
`)}function exe(e){return e==null?"":String(e)}function uN(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 txe(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()),nxe);return i(),a}function nxe(e,t,n){return">"+(n?"":" ")+e}function rxe(e,t){return fN(e,t.inConstruct,!0)&&!fN(e,t.notInConstruct,!1)}function fN(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 dN(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
240
|
+
`&&rxe(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
241
|
+
`}function ixe(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 sxe(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 axe(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 oxe(e,t,n,r){const i=axe(n),s=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(sxe(e,n)){const f=n.enter("codeIndented"),d=n.indentLines(s,lxe);return f(),d}const o=n.createTracker(r),l=i.repeat(Math.max(ixe(s,i)+1,3)),c=n.enter("codeFenced");let u=o.move(l);if(e.lang){const f=n.enter(`codeFencedLang${a}`);u+=o.move(n.safe(e.lang,{before:u,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=n.enter(`codeFencedMeta${a}`);u+=o.move(" "),u+=o.move(n.safe(e.meta,{before:u,after:`
|
|
242
|
+
`,encode:["`"],...o.current()})),f()}return u+=o.move(`
|
|
243
|
+
`),s&&(u+=o.move(s+`
|
|
244
|
+
`)),u+=o.move(l),c(),u}function lxe(e,t,n){return(n?"":" ")+e}function bT(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 cxe(e,t,n,r){const i=bT(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?" ":`
|
|
245
|
+
`,...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 uxe(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 Mh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Xy(e,t,n){const r=Iu(e),i=Iu(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}}PH.peek=fxe;function PH(e,t,n,r){const i=uxe(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),u=Xy(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Mh(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=Xy(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+Mh(f));const h=a.move(i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},o+l+h}function fxe(e,t,n){return n.options.emphasis||"*"}function dxe(e,t){let n=!1;return gT(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,nx}),!!((!e.depth||e.depth<3)&&cT(e)&&(t.options.setext||n))}function hxe(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(dxe(e,n)){const u=n.enter("headingSetext"),f=n.enter("phrasing"),d=n.containerPhrasing(e,{...s.current(),before:`
|
|
246
|
+
`,after:`
|
|
247
|
+
`});return f(),u(),d+`
|
|
248
|
+
`+(i===1?"=":"-").repeat(d.length-(Math.max(d.lastIndexOf("\r"),d.lastIndexOf(`
|
|
249
|
+
`))+1))}const a="#".repeat(i),o=n.enter("headingAtx"),l=n.enter("phrasing");s.move(a+" ");let c=n.containerPhrasing(e,{before:"# ",after:`
|
|
250
|
+
`,...s.current()});return/^[\t ]/.test(c)&&(c=Mh(c.charCodeAt(0))+c.slice(1)),c=c?a+" "+c:a,n.options.closeAtx&&(c+=" "+a),l(),o(),c}UH.peek=mxe;function UH(e){return e.value||""}function mxe(){return"<"}BH.peek=pxe;function BH(e,t,n,r){const i=bT(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 pxe(){return"!"}HH.peek=gxe;function HH(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 u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=u,s(),i==="full"||!c||c!==f?l+=o.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function gxe(){return"!"}qH.peek=yxe;function qH(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 yxe(){return"`"}function VH(e,t){const n=cT(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))}KH.peek=bxe;function KH(e,t,n,r){const i=bT(n),s=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let o,l;if(VH(e,n)){const u=n.stack;n.stack=[],o=n.enter("autolink");let f=a.move("<");return f+=a.move(n.containerPhrasing(e,{before:f,after:">",...a.current()})),f+=a.move(">"),o(),n.stack=u,f}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 bxe(e,t,n){return VH(e,n)?"<":"["}GH.peek=vxe;function GH(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 u=n.stack;n.stack=[],a=n.enter("reference");const f=n.safe(n.associationId(e),{before:l,after:"]",...o.current()});return a(),n.stack=u,s(),i==="full"||!c||c!==f?l+=o.move(f+"]"):i==="shortcut"?l=l.slice(0,-1):l+=o.move("]"),l}function vxe(){return"["}function vT(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 Sxe(e){const t=vT(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 wxe(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 YH(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 _xe(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let a=e.ordered?wxe(n):vT(n);const o=e.ordered?a==="."?")":".":Sxe(n);let l=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const u=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&u&&(!u.children||!u.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),YH(n)===a&&u){let f=-1;for(;++f<e.children.length;){const d=e.children[f];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 xxe(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 kxe(e,t,n,r){const i=xxe(n);let s=n.bulletCurrent||vT(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()),u);return l(),c;function u(f,d,h){return d?(h?"":" ".repeat(a))+f:(h?s:s+" ".repeat(a-s.length))+f}}function Exe(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),a=n.containerPhrasing(e,r);return s(),i(),a}const Cxe=Wv(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Txe(e,t,n,r){return(e.children.some(function(a){return Cxe(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Axe(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}JH.peek=Oxe;function JH(e,t,n,r){const i=Axe(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),u=Xy(r.before.charCodeAt(r.before.length-1),c,i);u.inside&&(l=Mh(c)+l.slice(1));const f=l.charCodeAt(l.length-1),d=Xy(r.after.charCodeAt(0),f,i);d.inside&&(l=l.slice(0,-1)+Mh(f));const h=a.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:d.outside,before:u.outside},o+l+h}function Oxe(e,t,n){return n.options.strong||"*"}function Rxe(e,t,n,r){return n.safe(e.value,r)}function Mxe(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 Nxe(e,t,n){const r=(YH(n)+(n.options.ruleSpaces?" ":"")).repeat(Mxe(n));return n.options.ruleSpaces?r.slice(0,-1):r}const QH={blockquote:txe,break:dN,code:oxe,definition:cxe,emphasis:PH,hardBreak:dN,heading:hxe,html:UH,image:BH,imageReference:HH,inlineCode:qH,link:KH,linkReference:GH,list:_xe,listItem:kxe,paragraph:Exe,root:Txe,strong:JH,text:Rxe,thematicBreak:Nxe};function Dxe(){return{enter:{table:zxe,tableData:hN,tableHeader:hN,tableRow:$xe},exit:{codeText:Lxe,table:Ixe,tableData:ew,tableHeader:ew,tableRow:ew}}}function zxe(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 Ixe(e){this.exit(e),this.data.inTable=void 0}function $xe(e){this.enter({type:"tableRow",children:[]},e)}function ew(e){this.exit(e)}function hN(e){this.enter({type:"tableCell",children:[]},e)}function Lxe(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Fxe));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Fxe(e,t){return t==="|"?t:e}function jxe(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
251
|
+
`,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,p,b,S){return c(u(h,b,S),h.align)}function o(h,p,b,S){const m=f(h,b,S),y=c([m]);return y.slice(0,y.indexOf(`
|
|
252
|
+
`))}function l(h,p,b,S){const m=b.enter("tableCell"),y=b.enter("phrasing"),v=b.containerPhrasing(h,{...S,before:s,after:s});return y(),m(),v}function c(h,p){return Z1e(h,{align:p,alignDelimiters:r,padding:n,stringLength:i})}function u(h,p,b){const S=h.children;let m=-1;const y=[],v=p.enter("table");for(;++m<S.length;)y[m]=f(S[m],p,b);return v(),y}function f(h,p,b){const S=h.children;let m=-1;const y=[],v=p.enter("tableRow");for(;++m<S.length;)y[m]=l(S[m],h,p,b);return v(),y}function d(h,p,b){let S=QH.inlineCode(h,p,b);return b.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function Pxe(){return{exit:{taskListCheckValueChecked:mN,taskListCheckValueUnchecked:mN,paragraph:Bxe}}}function Uxe(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Hxe}}}function mN(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Bxe(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 Hxe(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=QH.listItem(e,t,n,{...r,...o.current()});return s&&(l=l.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,c)),l;function c(u){return u+a}}function qxe(){return[_1e(),H1e(),G1e(),Dxe(),Pxe()]}function Vxe(e){return{extensions:[x1e(),q1e(e),Y1e(),jxe(e),Uxe()]}}const Kxe={tokenize:Wxe,partial:!0},XH={tokenize:Zxe,partial:!0},WH={tokenize:eke,partial:!0},ZH={tokenize:tke,partial:!0},Gxe={tokenize:nke,partial:!0},e9={name:"wwwAutolink",tokenize:Qxe,previous:n9},t9={name:"protocolAutolink",tokenize:Xxe,previous:r9},ta={name:"emailAutolink",tokenize:Jxe,previous:i9},os={};function Yxe(){return{text:os}}let Mo=48;for(;Mo<123;)os[Mo]=ta,Mo++,Mo===58?Mo=65:Mo===91&&(Mo=97);os[43]=ta;os[45]=ta;os[46]=ta;os[95]=ta;os[72]=[ta,t9];os[104]=[ta,t9];os[87]=[ta,e9];os[119]=[ta,e9];function Jxe(e,t,n){const r=this;let i,s;return a;function a(f){return!ax(f)||!i9.call(r,r.previous)||ST(r.events)?n(f):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),o(f))}function o(f){return ax(f)?(e.consume(f),o):f===64?(e.consume(f),l):n(f)}function l(f){return f===46?e.check(Gxe,u,c)(f):f===45||f===95||On(f)?(s=!0,e.consume(f),l):u(f)}function c(f){return e.consume(f),i=!0,l}function u(f){return s&&i&&jn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(f)):n(f)}}function Qxe(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!n9.call(r,r.previous)||ST(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Kxe,e.attempt(XH,e.attempt(WH,s),n),n)(a))}function s(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function Xxe(e,t,n){const r=this;let i="",s=!1;return a;function a(f){return(f===72||f===104)&&r9.call(r,r.previous)&&!ST(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(f),e.consume(f),o):n(f)}function o(f){if(jn(f)&&i.length<5)return i+=String.fromCodePoint(f),e.consume(f),o;if(f===58){const d=i.toLowerCase();if(d==="http"||d==="https")return e.consume(f),l}return n(f)}function l(f){return f===47?(e.consume(f),s?c:(s=!0,l)):n(f)}function c(f){return f===null||Yy(f)||lt(f)||Ol(f)||Jv(f)?n(f):e.attempt(XH,e.attempt(WH,u),n)(f)}function u(f){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(f)}}function Wxe(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 Zxe(e,t,n){let r,i,s;return a;function a(c){return c===46||c===95?e.check(ZH,l,o)(c):c===null||lt(c)||Ol(c)||c!==45&&Jv(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 eke(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(ZH,t,s)(a):a===null||lt(a)||Ol(a)?t(a):(e.consume(a),i)}function s(a){return a===41&&r++,e.consume(a),i}}function tke(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||lt(o)||Ol(o)?t(o):n(o)}function i(o){return o===null||o===40||o===91||lt(o)||Ol(o)?t(o):r(o)}function s(o){return jn(o)?a(o):n(o)}function a(o){return o===59?(e.consume(o),r):jn(o)?(e.consume(o),a):n(o)}}function nke(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return On(s)?n(s):t(s)}}function n9(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||lt(e)}function r9(e){return!jn(e)}function i9(e){return!(e===47||ax(e))}function ax(e){return e===43||e===45||e===46||e===95||On(e)}function ST(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 rke={tokenize:fke,partial:!0};function ike(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:lke,continuation:{tokenize:cke},exit:uke}},text:{91:{name:"gfmFootnoteCall",tokenize:oke},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ske,resolveTo:ake}}}}function ske(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=yi(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 ake(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 oke(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,a;return o;function o(f){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),l}function l(f){return f!==94?n(f):(e.enter("gfmFootnoteCallMarker"),e.consume(f),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",c)}function c(f){if(s>999||f===93&&!a||f===null||f===91||lt(f))return n(f);if(f===93){e.exit("chunkString");const d=e.exit("gfmFootnoteCallString");return i.includes(yi(r.sliceSerialize(d)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(f)}return lt(f)||(a=!0),s++,e.consume(f),f===92?u:c}function u(f){return f===91||f===92||f===93?(e.consume(f),s++,c):c(f)}}function lke(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,a=0,o;return l;function l(p){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),c}function c(p){return p===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",u):n(p)}function u(p){if(a>999||p===93&&!o||p===null||p===91||lt(p))return n(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteDefinitionLabelString");return s=yi(r.sliceSerialize(b)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(p),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),d}return lt(p)||(o=!0),a++,e.consume(p),p===92?f:u}function f(p){return p===91||p===92||p===93?(e.consume(p),a++,u):u(p)}function d(p){return p===58?(e.enter("definitionMarker"),e.consume(p),e.exit("definitionMarker"),i.includes(s)||i.push(s),Ue(e,h,"gfmFootnoteDefinitionWhitespace")):n(p)}function h(p){return t(p)}}function cke(e,t,n){return e.check(Am,t,e.attempt(rke,t,n))}function uke(e){e.exit("gfmFootnoteDefinition")}function fke(e,t,n){const r=this;return Ue(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 dke(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 u={type:"strikethrough",start:Object.assign({},a[c][1].start),end:Object.assign({},a[l][1].end)},f={type:"strikethroughText",start:Object.assign({},a[c][1].end),end:Object.assign({},a[l][1].start)},d=[["enter",u,o],["enter",a[c][1],o],["exit",a[c][1],o],["enter",f,o]],h=o.parser.constructs.insideSpan.null;h&&kr(d,d.length,0,Qv(h,a.slice(c+1,l),o)),kr(d,d.length,0,[["exit",f,o],["enter",a[l][1],o],["exit",a[l][1],o],["exit",u,o]]),kr(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,u=this.events;let f=0;return d;function d(p){return c===126&&u[u.length-1][1].type!=="characterEscape"?l(p):(a.enter("strikethroughSequenceTemporary"),h(p))}function h(p){const b=Iu(c);if(p===126)return f>1?l(p):(a.consume(p),f++,h);if(f<2&&!n)return l(p);const S=a.exit("strikethroughSequenceTemporary"),m=Iu(p);return S._open=!m||m===2&&!!b,S._close=!b||b===2&&!!m,o(p)}}}class hke{constructor(){this.map=[]}add(t,n,r){mke(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 mke(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 pke(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 gke(){return{flow:{null:{name:"table",tokenize:yke,resolveAll:bke}}}}function yke(e,t,n){const r=this;let i=0,s=0,a;return o;function o(M){let $=r.events.length-1;for(;$>-1;){const Y=r.events[$][1].type;if(Y==="lineEnding"||Y==="linePrefix")$--;else break}const L=$>-1?r.events[$][1].type:null,J=L==="tableHead"||L==="tableRow"?E:l;return J===E&&r.parser.lazy[r.now().line]?n(M):J(M)}function l(M){return e.enter("tableHead"),e.enter("tableRow"),c(M)}function c(M){return M===124||(a=!0,s+=1),u(M)}function u(M){return M===null?n(M):fe(M)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),h):n(M):ze(M)?Ue(e,u,"whitespace")(M):(s+=1,a&&(a=!1,i+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),a=!0,u):(e.enter("data"),f(M)))}function f(M){return M===null||M===124||lt(M)?(e.exit("data"),u(M)):(e.consume(M),M===92?d:f)}function d(M){return M===92||M===124?(e.consume(M),f):f(M)}function h(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),a=!1,ze(M)?Ue(e,p,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):p(M))}function p(M){return M===45||M===58?S(M):M===124?(a=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),b):A(M)}function b(M){return ze(M)?Ue(e,S,"whitespace")(M):S(M)}function S(M){return M===58?(s+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),m):M===45?(s+=1,m(M)):M===null||fe(M)?_(M):A(M)}function m(M){return M===45?(e.enter("tableDelimiterFiller"),y(M)):A(M)}function y(M){return M===45?(e.consume(M),y):M===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),v):(e.exit("tableDelimiterFiller"),v(M))}function v(M){return ze(M)?Ue(e,_,"whitespace")(M):_(M)}function _(M){return M===124?p(M):M===null||fe(M)?!a||i!==s?A(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):A(M)}function A(M){return n(M)}function E(M){return e.enter("tableRow"),T(M)}function T(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),T):M===null||fe(M)?(e.exit("tableRow"),t(M)):ze(M)?Ue(e,T,"whitespace")(M):(e.enter("data"),N(M))}function N(M){return M===null||M===124||lt(M)?(e.exit("data"),T(M)):(e.consume(M),M===92?D:N)}function D(M){return M===92||M===124?(e.consume(M),N):N(M)}}function bke(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],a=[0,0,0,0],o=!1,l=0,c,u,f;const d=new hke;for(;++n<e.length;){const h=e[n],p=h[1];h[0]==="enter"?p.type==="tableHead"?(o=!1,l!==0&&(pN(d,t,l,c,u),u=void 0,l=0),c={type:"table",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",c,t]])):p.type==="tableRow"||p.type==="tableDelimiterRow"?(r=!0,f=void 0,s=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,u={type:"tableBody",start:Object.assign({},p.start),end:Object.assign({},p.end)},d.add(n,0,[["enter",u,t]])),i=p.type==="tableDelimiterRow"?2:u?3:1):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(s[1]!==0&&(a[0]=a[1],f=bp(d,t,s,i,void 0,f),s=[0,0,0,0]),a[2]=n)):p.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(a[0]=a[1],f=bp(d,t,s,i,void 0,f)),s=a,a=[s[1],n,0,0])):p.type==="tableHead"?(o=!0,l=n):p.type==="tableRow"||p.type==="tableDelimiterRow"?(l=n,s[1]!==0?(a[0]=a[1],f=bp(d,t,s,i,n,f)):a[1]!==0&&(f=bp(d,t,a,i,n,f)),i=0):i&&(p.type==="data"||p.type==="tableDelimiterMarker"||p.type==="tableDelimiterFiller")&&(a[3]=n)}for(l!==0&&pN(d,t,l,c,u),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=pke(t.events,n))}return e}function bp(e,t,n,r,i,s){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(s.end=Object.assign({},pc(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const l=pc(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=pc(t.events,n[2]),u=pc(t.events,n[3]),f={type:o,start:Object.assign({},c),end:Object.assign({},u)};if(e.add(n[2],0,[["enter",f,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 p=n[2]+1,b=n[3]-n[2]-1;e.add(p,b,[])}}e.add(n[3]+1,0,[["exit",f,t]])}return i!==void 0&&(s.end=Object.assign({},pc(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function pN(e,t,n,r,i){const s=[],a=pc(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 pc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const vke={name:"tasklistCheck",tokenize:wke};function Ske(){return{text:{91:vke}}}function wke(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 lt(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 fe(l)?t(l):ze(l)?e.check({tokenize:_ke},t,n)(l):n(l)}}function _ke(e,t,n){return Ue(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function xke(e){return mH([Yxe(),ike(),dke(e),gke(),Ske()])}const kke={};function Eke(e){const t=this,n=e||kke,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(xke(n)),s.push(qxe()),a.push(Vxe(n))}function Cke(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 Tke={grantedDismissed:"codecommit-granted-dismissed"},Ake=eT("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 ai({asChild:e=!1,className:t,variant:n="default",...r}){const i=e?zB:"span";return k.jsx(i,{"data-slot":"badge","data-variant":n,className:Ve(Ake({variant:n}),t),...r})}function gN({className:e,...t}){return k.jsx("div",{"data-slot":"card",className:Ve("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function Oke({className:e,...t}){return k.jsx("div",{"data-slot":"card-header",className:Ve("@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 Rke({className:e,...t}){return k.jsx("div",{"data-slot":"card-title",className:Ve("leading-none font-semibold",e),...t})}function yN({className:e,...t}){return k.jsx("div",{"data-slot":"card-content",className:Ve("px-6",e),...t})}function Mke(){const e=Yi(TB),t=qr($v),n=qr(Zde),r=Cke(Tke.grantedDismissed),i=w.useCallback(()=>{e&&n({payload:{profile:e.account.id,link:e.link}})},[n,e]),s=w.useCallback(()=>{e&&(r.show()||i())},[r,e,i]),a=()=>{r.dismiss(),i()};if(w.useEffect(()=>{const c=u=>{u.key==="Escape"?(u.preventDefault(),t("prs")):(u.key==="Enter"||u.key==="o")&&(e!=null&&e.link)&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s,e,t]),!e)return k.jsx("div",{className:"flex items-center justify-center py-20 text-muted-foreground",children:k.jsx("p",{className:"text-sm",children:"No PR selected"})});const o=e.isMergeable?k.jsx(ai,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Mergeable"}):k.jsx(ai,{variant:"destructive",children:"Conflict"}),l=e.isApproved?k.jsx(ai,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Approved"}):k.jsx(ai,{variant:"secondary",children:"Pending"});return k.jsxs("div",{className:"space-y-6",children:[k.jsxs("div",{className:"flex items-center gap-4",children:[k.jsxs(Vo,{variant:"ghost",size:"sm",onClick:()=>t("prs"),children:[k.jsx(uhe,{className:"size-4"}),"Back"]}),k.jsx("div",{className:"ml-auto",children:k.jsxs(Vo,{size:"sm",onClick:s,children:[k.jsx(vhe,{className:"size-4"}),"Open in Console"]})})]}),k.jsxs("div",{children:[k.jsx("h1",{className:"text-xl font-semibold tracking-tight",children:e.title}),k.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[o,l,k.jsx(ai,{variant:"outline",children:e.status}),k.jsxs("span",{className:"text-sm text-muted-foreground",children:[e.author," · ",tT(e.creationDate)]})]})]}),k.jsx(Z5,{}),k.jsx(gN,{children:k.jsxs(yN,{className:"grid grid-cols-[auto_1fr] gap-x-6 gap-y-2 py-4 text-sm",children:[k.jsx("span",{className:"text-muted-foreground",children:"Repository"}),k.jsx("span",{className:"font-mono text-xs",children:e.repositoryName}),k.jsx("span",{className:"text-muted-foreground",children:"Branch"}),k.jsxs("div",{className:"flex items-center gap-2",children:[k.jsx(ai,{variant:"outline",className:"font-mono text-xs",children:e.sourceBranch}),k.jsx(dhe,{className:"size-3 text-muted-foreground"}),k.jsx(ai,{variant:"outline",className:"font-mono text-xs",children:e.destinationBranch})]}),k.jsx("span",{className:"text-muted-foreground",children:"ID"}),k.jsx("span",{className:"font-mono text-xs",children:e.id})]})}),e.description&&k.jsxs(gN,{children:[k.jsx(Oke,{children:k.jsx(Rke,{className:"text-sm",children:"Description"})}),k.jsx(yN,{children:k.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:k.jsx(d1e,{remarkPlugins:[Eke],children:e.description})})})]}),k.jsx(K5,{open:r.visible,onOpenChange:r.cancel,children:k.jsxs(G5,{children:[k.jsxs(Y5,{children:[k.jsx(J5,{children:"Granted CLI Required"}),k.jsxs(Q5,{children:['"Open in Console" uses'," ",k.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"," ",k.jsx("code",{className:"rounded bg-muted px-1 py-0.5 font-mono text-xs",children:"assume"})," CLI is installed and configured before continuing."]})]}),k.jsxs(ove,{children:[k.jsxs("label",{className:"flex items-center gap-2 text-sm text-muted-foreground mr-auto",children:[k.jsx("input",{type:"checkbox",checked:r.dontRemind,onChange:c=>r.setDontRemind(c.target.checked),className:"accent-primary"}),"Don't remind again"]}),k.jsx(Vo,{variant:"ghost",onClick:r.cancel,children:"Cancel"}),k.jsx(Vo,{onClick:a,children:"Continue"})]})]})})]})}function Nke({onClick:e,pr:t}){const n=t.isMergeable?t.isApproved?k.jsx(ai,{variant:"outline",className:"border-green-500/30 text-green-600 dark:text-green-400",children:"Approved"}):k.jsx(ai,{variant:"secondary",children:"Pending"}):k.jsx(ai,{variant:"destructive",children:"Conflict"});return k.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:[k.jsxs("div",{className:"flex items-center gap-2",children:[n,k.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.author," · ",tT(t.creationDate)]})]}),k.jsxs("div",{className:"flex items-baseline gap-1.5",children:[k.jsx("span",{className:"font-mono text-xs text-muted-foreground",children:t.repositoryName}),k.jsx("span",{className:"text-muted-foreground/50",children:"›"}),k.jsx("span",{className:"text-sm font-medium",children:t.title})]}),t.description&&k.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.description.split(`
|
|
253
|
+
`).slice(0,2).join(" ")})]})}function Dke(){const e=Yi(Iv),t=Yi(D1),n=Yi(Fy),r=qr(TB),i=qr($v),s=e.status==="loading",a=e.pullRequests,o=e.currentUser,l=w.useMemo(()=>{var S;if(a.length===0)return[];const u=t.toLowerCase(),f=m=>{var y;return t?m.repositoryName.toLowerCase().includes(u)||m.title.toLowerCase().includes(u)||m.author.toLowerCase().includes(u)||m.sourceBranch.toLowerCase().includes(u)||(((y=m.description)==null?void 0:y.toLowerCase().includes(u))??!1):!0},d=m=>{var y;if(n.type==="all")return!0;if(n.type==="mine")return o&&m.author!==o?!1:Y1(m.title)===n.value;if(n.type==="account")return((y=m.account)==null?void 0:y.id)===n.value;if(n.type==="author")return m.author===n.value;if(n.type==="scope")return Y1(m.title)===n.value;if(n.type==="repo")return m.repositoryName===n.value;if(n.type==="status")switch(n.value){case"approved":return m.isApproved;case"pending":return!m.isApproved;case"mergeable":return m.isMergeable;case"conflicts":return!m.isMergeable;default:return!0}return!0},h=m=>f(m)&&d(m),p=new Map;for(const m of a){const y=((S=m.account)==null?void 0:S.id)??"unknown";p.has(y)||p.set(y,[]),p.get(y).push(m)}const b=[];for(const[m,y]of p){const v=y.filter(h);v.length>0&&b.push([m,v])}return b},[a,o,t,n]),c=u=>{r(u),i("details")};return l.length===0&&!s?k.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-muted-foreground",children:[k.jsx(_he,{className:"mb-4 size-10 opacity-50"}),k.jsx("p",{className:"text-sm",children:"No pull requests found"})]}):k.jsx("div",{className:"space-y-6",children:l.map(([u,f])=>k.jsxs("section",{children:[k.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[k.jsx("span",{className:"text-xs font-medium uppercase tracking-wider text-muted-foreground",children:u}),k.jsx(ai,{variant:"secondary",children:f.length})]}),k.jsx("div",{className:"divide-y rounded-lg border bg-card",children:f.map(d=>k.jsx(Nke,{pr:d,onClick:()=>c(d)},d.id))})]},u))})}function zke(){const e=Yi($v),t=qr(Iv);return rhe(n=>t(n)),k.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[k.jsx(zve,{}),e==="prs"&&k.jsx(Ove,{}),k.jsxs("main",{className:"mx-auto w-full max-w-5xl flex-1 px-4 py-6",children:[e==="prs"&&k.jsx(Dke,{}),e==="details"&&k.jsx(Mke,{})]}),k.jsx(pve,{})]})}function Ike(){return k.jsx(Mve,{children:k.jsx(zke,{})})}const bN=document.getElementById("root");bN&&cV.createRoot(bN).render(k.jsx(jt.StrictMode,{children:k.jsx(Ike,{})}));
|