@knpkv/codecommit-web 0.16.0 → 0.17.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.
Files changed (79) hide show
  1. package/README.md +13 -0
  2. package/dist/client/assets/index-BQbzvlT7.js +90 -0
  3. package/dist/client/assets/index-Rg2HVfx7.css +1 -0
  4. package/dist/client/assets/pr-review-workspace-B7GX-PRi.js +23 -0
  5. package/dist/client/index.html +2 -2
  6. package/dist/pull-request-coordinates.d.ts.map +1 -1
  7. package/dist/pull-request-coordinates.js +5 -4
  8. package/dist/pull-request-coordinates.js.map +1 -1
  9. package/dist/server/Api.d.ts +243 -243
  10. package/dist/server/Api.d.ts.map +1 -1
  11. package/dist/server/Api.js +1 -1
  12. package/dist/server/Api.js.map +1 -1
  13. package/dist/server/Server.d.ts +3 -3
  14. package/dist/server/Server.d.ts.map +1 -1
  15. package/dist/server/Server.js +13 -11
  16. package/dist/server/Server.js.map +1 -1
  17. package/dist/server/handlers/accounts-live.d.ts +1 -1
  18. package/dist/server/handlers/accounts-live.d.ts.map +1 -1
  19. package/dist/server/handlers/accounts-live.js +1 -1
  20. package/dist/server/handlers/accounts-live.js.map +1 -1
  21. package/dist/server/handlers/audit-live.d.ts +1 -1
  22. package/dist/server/handlers/audit-live.d.ts.map +1 -1
  23. package/dist/server/handlers/audit-live.js +1 -1
  24. package/dist/server/handlers/audit-live.js.map +1 -1
  25. package/dist/server/handlers/config-live.d.ts +1 -1
  26. package/dist/server/handlers/config-live.d.ts.map +1 -1
  27. package/dist/server/handlers/config-live.js +2 -2
  28. package/dist/server/handlers/config-live.js.map +1 -1
  29. package/dist/server/handlers/events-live.d.ts +1 -1
  30. package/dist/server/handlers/events-live.d.ts.map +1 -1
  31. package/dist/server/handlers/events-live.js +26 -8
  32. package/dist/server/handlers/events-live.js.map +1 -1
  33. package/dist/server/handlers/notifications-live.d.ts +2 -2
  34. package/dist/server/handlers/notifications-live.d.ts.map +1 -1
  35. package/dist/server/handlers/notifications-live.js +2 -2
  36. package/dist/server/handlers/notifications-live.js.map +1 -1
  37. package/dist/server/handlers/permissions-live.d.ts +1 -1
  38. package/dist/server/handlers/permissions-live.d.ts.map +1 -1
  39. package/dist/server/handlers/permissions-live.js +1 -1
  40. package/dist/server/handlers/permissions-live.js.map +1 -1
  41. package/dist/server/handlers/prs-live.d.ts +3 -3
  42. package/dist/server/handlers/prs-live.d.ts.map +1 -1
  43. package/dist/server/handlers/prs-live.js +3 -3
  44. package/dist/server/handlers/prs-live.js.map +1 -1
  45. package/dist/server/handlers/sandbox-live.d.ts +1 -1
  46. package/dist/server/handlers/sandbox-live.d.ts.map +1 -1
  47. package/dist/server/handlers/sandbox-live.js +2 -2
  48. package/dist/server/handlers/sandbox-live.js.map +1 -1
  49. package/dist/server/handlers/stats-live.d.ts +1 -1
  50. package/dist/server/handlers/stats-live.d.ts.map +1 -1
  51. package/dist/server/handlers/stats-live.js +1 -1
  52. package/dist/server/handlers/stats-live.js.map +1 -1
  53. package/dist/server/handlers/subscriptions-live.d.ts +1 -1
  54. package/dist/server/handlers/subscriptions-live.d.ts.map +1 -1
  55. package/dist/server/handlers/subscriptions-live.js +1 -1
  56. package/dist/server/handlers/subscriptions-live.js.map +1 -1
  57. package/dist/server/internal/OwnerSessionSecurity.d.ts +19 -8
  58. package/dist/server/internal/OwnerSessionSecurity.d.ts.map +1 -1
  59. package/dist/server/internal/OwnerSessionSecurity.js +109 -32
  60. package/dist/server/internal/OwnerSessionSecurity.js.map +1 -1
  61. package/dist/server/internal/PublicOrigin.d.ts +9 -0
  62. package/dist/server/internal/PublicOrigin.d.ts.map +1 -0
  63. package/dist/server/internal/PublicOrigin.js +17 -0
  64. package/dist/server/internal/PublicOrigin.js.map +1 -0
  65. package/dist/server/review/PullRequestReview.d.ts +1 -1
  66. package/dist/server/review/PullRequestReview.d.ts.map +1 -1
  67. package/dist/server/review/PullRequestReview.js +1 -1
  68. package/dist/server/review/PullRequestReview.js.map +1 -1
  69. package/dist/server/review/ReviewSkillCatalog.js +2 -2
  70. package/dist/tooling/authenticated-dev-proxy.d.ts +20 -5
  71. package/dist/tooling/authenticated-dev-proxy.d.ts.map +1 -1
  72. package/dist/tooling/authenticated-dev-proxy.js +25 -9
  73. package/dist/tooling/authenticated-dev-proxy.js.map +1 -1
  74. package/dist/tooling/authenticated-dev-proxy.test.js +96 -5
  75. package/dist/tooling/authenticated-dev-proxy.test.js.map +1 -1
  76. package/package.json +32 -26
  77. package/dist/client/assets/index-DqzI_8bH.js +0 -90
  78. package/dist/client/assets/index-Ds8Muxxv.css +0 -1
  79. package/dist/client/assets/pr-review-workspace-Ca3Vmiye.js +0 -22
@@ -1,90 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/pr-review-workspace-Ca3Vmiye.js","assets/pr-review-workspace-mH4SV5xO.css"])))=>i.map(i=>d[i]);
2
- var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.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`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(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 N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function ee(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var P=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&&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)},F={map:ee,forEach:function(e,t,n){ee(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ee(e,function(){t++}),t},toArray:function(e){return ee(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=F,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,P)}catch(e){P(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.8`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(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 r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.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??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.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})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=c(t.as,t.crossOrigin);i.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 i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.8`})),h=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=o((e=>{var t=p(),n=d(),r=h();function i(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 a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(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 s(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 c(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 l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var m=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),D=Symbol.for(`react.memo`),O=Symbol.for(`react.lazy`),k=Symbol.for(`react.activity`),A=Symbol.for(`react.memo_cache_sentinel`),j=Symbol.iterator;function M(e){return typeof e!=`object`||!e?null:(e=j&&e[j]||e[`@@iterator`],typeof e==`function`?e:null)}var N=Symbol.for(`react.client.reference`);function ee(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===N?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case k:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case D:return t=e.displayName||null,t===null?ee(e.type)||`Memo`:t;case O:t=e._payload,e=e._init;try{return ee(e(t))}catch{}}return null}var te=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ne={pending:!1,data:null,method:null,action:null},re=[],ie=-1;function ae(e){return{current:e}}function I(e){0>ie||(e.current=re[ie],re[ie]=null,ie--)}function oe(e,t){ie++,re[ie]=e.current,e.current=t}var se=ae(null),ce=ae(null),le=ae(null),ue=ae(null);function de(e,t){switch(oe(le,t),oe(ce,e),oe(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?nf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=nf(t),e=rf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}I(se),oe(se,e)}function fe(){I(se),I(ce),I(le)}function pe(e){e.memoizedState!==null&&oe(ue,e);var t=se.current,n=rf(t,e.type);t!==n&&(oe(ce,e),oe(se,n))}function me(e){ce.current===e&&(I(se),I(ce)),ue.current===e&&(I(ue),pp._currentValue=ne)}var he,ge;function _e(e){if(he===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);he=t&&t[1]||``,ge=-1<e.stack.indexOf(`
3
- at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
4
- `+he+e+ge}var ve=!1;function ye(e,t){if(!e||ve)return``;ve=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.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 a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
5
- `),l=s.split(`
6
- `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
7
- `+c[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{ve=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?_e(n):``}function be(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ye(e.type,!1);case 11:return ye(e.type.render,!1);case 1:return ye(e.type,!0);case 31:return _e(`Activity`);default:return``}}function xe(e){try{var t=``,n=null;do t+=be(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
8
- Error generating stack: `+e.message+`
9
- `+e.stack}}var Se=Object.prototype.hasOwnProperty,Ce=t.unstable_scheduleCallback,we=t.unstable_cancelCallback,Te=t.unstable_shouldYield,Ee=t.unstable_requestPaint,De=t.unstable_now,Oe=t.unstable_getCurrentPriorityLevel,ke=t.unstable_ImmediatePriority,Ae=t.unstable_UserBlockingPriority,je=t.unstable_NormalPriority,Me=t.unstable_LowPriority,Ne=t.unstable_IdlePriority,Pe=t.log,Fe=t.unstable_setDisableYieldValue,Ie=null,Le=null;function Re(e){if(typeof Pe==`function`&&Fe(e),Le&&typeof Le.setStrictMode==`function`)try{Le.setStrictMode(Ie,e)}catch{}}var ze=Math.clz32?Math.clz32:He,Be=Math.log,Ve=Math.LN2;function He(e){return e>>>=0,e===0?32:31-(Be(e)/Ve|0)|0}var Ue=256,We=262144,Ge=4194304;function Ke(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 qe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ke(n))):i=Ke(o):i=Ke(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ke(n))):i=Ke(o)):i=Ke(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Je(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ye(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 Xe(){var e=Ge;return Ge<<=1,!(Ge&62914560)&&(Ge=4194304),e}function Ze(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $e(e,t,n,r,i,a){var o=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 s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&et(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function et(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function tt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function nt(e,t){var n=t&-t;return n=n&42?1:rt(n),(n&(e.suspendedLanes|t))===0?n:0}function rt(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 it(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function at(){var e=F.p;return e===0?(e=window.event,e===void 0?32:kp(e.type)):e}function ot(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var st=Math.random().toString(36).slice(2),ct=`__reactFiber$`+st,lt=`__reactProps$`+st,ut=`__reactContainer$`+st,dt=`__reactEvents$`+st,ft=`__reactListeners$`+st,pt=`__reactHandles$`+st,mt=`__reactResources$`+st,ht=`__reactMarker$`+st;function gt(e){delete e[ct],delete e[lt],delete e[dt],delete e[ft],delete e[pt]}function _t(e){var t=e[ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ut]||n[ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ef(e);e!==null;){if(n=e[ct])return n;e=Ef(e)}return t}e=n,n=e.parentNode}return null}function vt(e){if(e=e[ct]||e[ut]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function yt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function bt(e){var t=e[mt];return t||=e[mt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function xt(e){e[ht]=!0}var St=new Set,Ct={};function wt(e,t){Tt(e,t),Tt(e+`Capture`,t)}function Tt(e,t){for(Ct[e]=t,e=0;e<t.length;e++)St.add(t[e])}var Et=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]*$`),Dt={},Ot={};function kt(e){return Se.call(Ot,e)?!0:Se.call(Dt,e)?!1:Et.test(e)?Ot[e]=!0:(Dt[e]=!0,!1)}function At(e,t,n){if(kt(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 jt(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 Mt(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 Nt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Pt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Ft(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function It(e){if(!e._valueTracker){var t=Pt(e)?`checked`:`value`;e._valueTracker=Ft(e,t,``+e[t])}}function Lt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Pt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Rt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var zt=/[\n"\\]/g;function Bt(e){return e.replace(zt,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Vt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Nt(t)):e.value!==``+Nt(t)&&(e.value=``+Nt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Ut(e,o,Nt(n)):Ut(e,o,Nt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Nt(s):e.removeAttribute(`name`)}function Ht(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){It(e);return}n=n==null?``:``+Nt(n),t=t==null?n:``+Nt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),It(e)}function Ut(e,t,n){t===`number`&&Rt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Wt(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=``+Nt(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 Gt(e,t,n){if(t!=null&&(t=``+Nt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Nt(n)}function Kt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(te(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Nt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),It(e)}function qt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Jt=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 Yt(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||Jt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Xt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Yt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Yt(e,o,t[o])}function Zt(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 Qt=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`]]),$t=/^[\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 en(e){return $t.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function tn(){}var nn=null;function rn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var an=null,on=null;function sn(e){var t=vt(e);if(t&&(e=t.stateNode)){var n=e[lt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Vt(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="`+Bt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[lt]||null;if(!a)throw Error(i(90));Vt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Lt(r)}break a;case`textarea`:Gt(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Wt(e,!!n.multiple,t,!1)}}}var cn=!1;function ln(e,t,n){if(cn)return e(t,n);cn=!0;try{return e(t)}finally{if(cn=!1,(an!==null||on!==null)&&(Mu(),an&&(t=an,e=on,on=an=null,sn(t),e)))for(t=0;t<e.length;t++)sn(e[t])}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=n[lt]||null;if(r===null)return null;n=r[t];a: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 a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var dn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),fn=!1;if(dn)try{var pn={};Object.defineProperty(pn,"passive",{get:function(){fn=!0}}),window.addEventListener(`test`,pn,pn),window.removeEventListener(`test`,pn,pn)}catch{fn=!1}var mn=null,hn=null,gn=null;function _n(){if(gn)return gn;var e,t=hn,n=t.length,r,i=`value`in mn?mn.value:mn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return gn=i.slice(e,1<r?1-r:void 0)}function vn(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 yn(){return!0}function bn(){return!1}function xn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?yn:bn,this.isPropagationStopped=bn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=yn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=yn)},persist:function(){},isPersistent:yn}),t}var Sn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cn=xn(Sn),wn=m({},Sn,{view:0,detail:0}),Tn=xn(wn),En,Dn,On,kn=m({},wn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bn,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!==On&&(On&&e.type===`mousemove`?(En=e.screenX-On.screenX,Dn=e.screenY-On.screenY):Dn=En=0,On=e),En)},movementY:function(e){return`movementY`in e?e.movementY:Dn}}),An=xn(kn),jn=xn(m({},kn,{dataTransfer:0})),Mn=xn(m({},wn,{relatedTarget:0})),Nn=xn(m({},Sn,{animationName:0,elapsedTime:0,pseudoElement:0})),Pn=xn(m({},Sn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Fn=xn(m({},Sn,{data:0})),In={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Ln={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`},Rn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function zn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Rn[e])?!!t[e]:!1}function Bn(){return zn}var Vn=xn(m({},wn,{key:function(e){if(e.key){var t=In[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=vn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Ln[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bn,charCode:function(e){return e.type===`keypress`?vn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?vn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Hn=xn(m({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Un=xn(m({},wn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bn})),Wn=xn(m({},Sn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Gn=xn(m({},kn,{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})),Kn=xn(m({},Sn,{newState:0,oldState:0})),qn=[9,13,27,32],Jn=dn&&`CompositionEvent`in window,Yn=null;dn&&`documentMode`in document&&(Yn=document.documentMode);var Xn=dn&&`TextEvent`in window&&!Yn,Zn=dn&&(!Jn||Yn&&8<Yn&&11>=Yn),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return qn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Jn&&er(e,t)?(e=_n(),gn=hn=mn=null,nr=!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 Zn&&t.locale!==`ko`?null:t.data;default:return null}}var ar={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 or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!ar[e.type]:t===`textarea`}function sr(e,t,n,r){an?on?on.push(r):on=[r]:an=r,t=Bd(t,`onChange`),0<t.length&&(n=new Cn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var cr=null,lr=null;function ur(e){Md(e,0)}function dr(e){if(Lt(yt(e)))return e}function fr(e,t){if(e===`change`)return t}var pr=!1;if(dn){var mr;if(dn){var hr=`oninput`in document;if(!hr){var gr=document.createElement(`div`);gr.setAttribute(`oninput`,`return;`),hr=typeof gr.oninput==`function`}mr=hr}else mr=!1;pr=mr&&(!document.documentMode||9<document.documentMode)}function _r(){cr&&(cr.detachEvent(`onpropertychange`,vr),lr=cr=null)}function vr(e){if(e.propertyName===`value`&&dr(lr)){var t=[];sr(t,lr,e,rn(e)),ln(ur,t)}}function yr(e,t,n){e===`focusin`?(_r(),cr=t,lr=n,cr.attachEvent(`onpropertychange`,vr)):e===`focusout`&&_r()}function br(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return dr(lr)}function xr(e,t){if(e===`click`)return dr(t)}function Sr(e,t){if(e===`input`||e===`change`)return dr(t)}function Cr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var wr=typeof Object.is==`function`?Object.is:Cr;function Tr(e,t){if(wr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)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(!Se.call(t,i)||!wr(e[i],t[i]))return!1}return!0}function Er(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dr(e,t){var n=Er(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}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Rt(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=Rt(e.document)}return t}function Ar(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 jr=dn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Rt(r)||(r=Mr,`selectionStart`in r&&Ar(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}),Pr&&Tr(Pr,r)||(Pr=r,r=Bd(Nr,`onSelect`),0<r.length&&(t=new Cn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Mr)))}function Lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Rr={animationend:Lr(`Animation`,`AnimationEnd`),animationiteration:Lr(`Animation`,`AnimationIteration`),animationstart:Lr(`Animation`,`AnimationStart`),transitionrun:Lr(`Transition`,`TransitionRun`),transitionstart:Lr(`Transition`,`TransitionStart`),transitioncancel:Lr(`Transition`,`TransitionCancel`),transitionend:Lr(`Transition`,`TransitionEnd`)},zr={},Br={};dn&&(Br=document.createElement(`div`).style,`AnimationEvent`in window||(delete Rr.animationend.animation,delete Rr.animationiteration.animation,delete Rr.animationstart.animation),`TransitionEvent`in window||delete Rr.transitionend.transition);function Vr(e){if(zr[e])return zr[e];if(!Rr[e])return e;var t=Rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Br)return zr[e]=t[n];return e}var Hr=Vr(`animationend`),Ur=Vr(`animationiteration`),Wr=Vr(`animationstart`),Gr=Vr(`transitionrun`),Kr=Vr(`transitionstart`),qr=Vr(`transitioncancel`),Jr=Vr(`transitionend`),Yr=new Map,Xr=`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(` `);Xr.push(`scrollEnd`);function Zr(e,t){Yr.set(e,t),wt(t,[e])}var Qr=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&&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)},$r=[],ei=0,ti=0;function ni(){for(var e=ei,t=ti=ei=0;t<e;){var n=$r[t];$r[t++]=null;var r=$r[t];$r[t++]=null;var i=$r[t];$r[t++]=null;var a=$r[t];if($r[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&oi(n,i,a)}}function ri(e,t,n,r){$r[ei++]=e,$r[ei++]=t,$r[ei++]=n,$r[ei++]=r,ti|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ii(e,t,n,r){return ri(e,t,n,r),si(e)}function ai(e,t){return ri(e,null,null,t),si(e)}function oi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function si(e){if(50<Cu)throw Cu=0,wu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ci={};function li(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 ui(e,t,n,r){return new li(e,t,n,r)}function di(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var n=e.alternate;return n===null?(n=ui(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 pi(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 mi(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)di(e)&&(s=1);else if(typeof e==`string`)s=ip(e,n,se.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=ui(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return hi(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=ui(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=ui(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=ui(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ui(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function hi(e,t,n,r){return e=ui(7,e,r,t),e.lanes=n,e}function gi(e,t,n){return e=ui(6,e,null,t),e.lanes=n,e}function _i(e){var t=ui(18,null,null,0);return t.stateNode=e,t}function vi(e,t,n){return t=ui(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var yi=new WeakMap;function bi(e,t){if(typeof e==`object`&&e){var n=yi.get(e);return n===void 0?(t={value:e,source:t,stack:xe(t)},yi.set(e,t),t):n}return{value:e,source:t,stack:xe(t)}}var xi=[],Si=0,Ci=null,wi=0,Ti=[],Ei=0,Di=null,Oi=1,ki=``;function Ai(e,t){xi[Si++]=wi,xi[Si++]=Ci,Ci=e,wi=t}function ji(e,t,n){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Di=e;var r=Oi;e=ki;var i=32-ze(r)-1;r&=~(1<<i),n+=1;var a=32-ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Oi=1<<32-ze(t)+i|n<<i|r,ki=a+e}else Oi=1<<a|n<<i|r,ki=e}function Mi(e){e.return!==null&&(Ai(e,1),ji(e,1,0))}function Ni(e){for(;e===Ci;)Ci=xi[--Si],xi[Si]=null,wi=xi[--Si],xi[Si]=null;for(;e===Di;)Di=Ti[--Ei],Ti[Ei]=null,ki=Ti[--Ei],Ti[Ei]=null,Oi=Ti[--Ei],Ti[Ei]=null}function Pi(e,t){Ti[Ei++]=Oi,Ti[Ei++]=ki,Ti[Ei++]=Di,Oi=t.id,ki=t.overflow,Di=e}var Fi=null,Ii=null,Li=!1,Ri=null,zi=!1,Bi=Error(i(519));function Vi(e){throw qi(bi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Bi}function Hi(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[ct]=e,t[lt]=r,n){case`dialog`:Nd(`cancel`,t),Nd(`close`,t);break;case`iframe`:case`object`:case`embed`:Nd(`load`,t);break;case`video`:case`audio`:for(n=0;n<Ad.length;n++)Nd(Ad[n],t);break;case`source`:Nd(`error`,t);break;case`img`:case`image`:case`link`:Nd(`error`,t),Nd(`load`,t);break;case`details`:Nd(`toggle`,t);break;case`input`:Nd(`invalid`,t),Ht(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Nd(`invalid`,t);break;case`textarea`:Nd(`invalid`,t),Kt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Kd(t.textContent,n)?(r.popover!=null&&(Nd(`beforetoggle`,t),Nd(`toggle`,t)),r.onScroll!=null&&Nd(`scroll`,t),r.onScrollEnd!=null&&Nd(`scrollend`,t),r.onClick!=null&&(t.onclick=tn),t=!0):t=!1,t||Vi(e,!0)}function Ui(e){for(Fi=e.return;Fi;)switch(Fi.tag){case 5:case 31:case 13:zi=!1;return;case 27:case 3:zi=!0;return;default:Fi=Fi.return}}function Wi(e){if(e!==Fi)return!1;if(!Li)return Ui(e),Li=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||af(e.type,e.memoizedProps)),n=!n),n&&Ii&&Vi(e),Ui(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=Tf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));Ii=Tf(e)}else t===27?(t=Ii,pf(e.type)?(e=wf,wf=null,Ii=e):Ii=t):Ii=Fi?Cf(e.stateNode.nextSibling):null;return!0}function Gi(){Ii=Fi=null,Li=!1}function Ki(){var e=Ri;return e!==null&&(lu===null?lu=e:lu.push.apply(lu,e),Ri=null),e}function qi(e){Ri===null?Ri=[e]:Ri.push(e)}var Ji=ae(null),Yi=null,Xi=null;function Zi(e,t,n){oe(Ji,t._currentValue),t._currentValue=n}function Qi(e){e._currentValue=Ji.current,I(Ji)}function $i(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function ea(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),$i(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),$i(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ta(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;wr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ue.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[pp]:e.push(pp))}a=a.return}e!==null&&ea(t,e,n,r),t.flags|=262144}function na(e){for(e=e.firstContext;e!==null;){if(!wr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ra(e){Yi=e,Xi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ia(e){return oa(Yi,e)}function aa(e,t){return Yi===null&&ra(e),oa(e,t)}function oa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Xi===null){if(e===null)throw Error(i(308));Xi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xi=Xi.next=t;return n}var sa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ca=t.unstable_scheduleCallback,la=t.unstable_NormalPriority,ua={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function da(){return{controller:new sa,data:new Map,refCount:0}}function fa(e){e.refCount--,e.refCount===0&&ca(la,function(){e.controller.abort()})}var pa=null,ma=0,ha=0,ga=null;function _a(e,t){if(pa===null){var n=pa=[];ma=0,ha=wd(),ga={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return ma++,t.then(va,va),t}function va(){if(--ma===0&&pa!==null){ga!==null&&(ga.status=`fulfilled`);var e=pa;pa=null,ha=0,ga=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ya(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ba=P.S;P.S=function(e,t){fu=De(),typeof t==`object`&&t&&typeof t.then==`function`&&_a(e,t),ba!==null&&ba(e,t)};var xa=ae(null);function Sa(){var e=xa.current;return e===null?ql.pooledCache:e}function Ca(e,t){t===null?oe(xa,xa.current):oe(xa,t.pool)}function wa(){var e=Sa();return e===null?null:{parent:ua._currentValue,pool:e}}var Ta=Error(i(460)),L=Error(i(474)),Ea=Error(i(542)),Da={then:function(){}};function Oa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ka(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(tn,tn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e;default:if(typeof t.status==`string`)t.then(tn,tn);else{if(e=ql,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Na(e),e}throw ja=t,Ta}}function Aa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(ja=e,Ta):e}}var ja=null;function Ma(){if(ja===null)throw Error(i(459));var e=ja;return ja=null,e}function Na(e){if(e===Ta||e===Ea)throw Error(i(483))}var Pa=null,Fa=0;function Ia(e){var t=Fa;return Fa+=1,Pa===null&&(Pa=[]),ka(Pa,e,t)}function La(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Ra(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=fi(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=gi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&Aa(i)===t.type)?(t=a(t,n.props),La(t,n),t.return=e,t):(t=mi(n.type,n.key,n.props,null,e.mode,r),La(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=vi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=hi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=gi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=mi(t.type,t.key,t.props,null,e.mode,n),La(n,t),n.return=e,n;case v:return t=vi(t,e.mode,n),t.return=e,t;case O:return t=Aa(t),f(e,t,n)}if(te(t)||M(t))return t=hi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ia(t),n);if(t.$$typeof===C)return f(e,aa(e,t),n);Ra(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=Aa(n),p(e,t,n,r)}if(te(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ia(n),r);if(n.$$typeof===C)return p(e,t,aa(e,n),r);Ra(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=Aa(r),m(e,t,n,r,i)}if(te(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ia(r),i);if(r.$$typeof===C)return m(e,t,n,aa(t,r),i);Ra(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Li&&Ai(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Li&&Ai(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Li&&Ai(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Li&&Ai(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Li&&Ai(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Li&&Ai(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&Aa(l)===r.type){n(e,r.sibling),c=a(r,o.props),La(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===y?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),La(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=Aa(o),b(e,r,o,c)}if(te(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Ia(o),c);if(o.$$typeof===C)return b(e,r,aa(e,o),c);Ra(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Fa=0;var i=b(e,t,n,r);return Pa=null,i}catch(t){if(t===Ta||t===Ea)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ba=za(!0),Va=za(!1),Ha=!1;function Ua(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Wa(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 Ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ka(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function qa(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}function Ja(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,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 Ya=!1;function Xa(){if(Ya){var e=ga;if(e!==null)throw e}}function Za(e,t,n,r){Ya=!1;var i=e.updateQueue;Ha=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Yl&f)===f:(r&f)===f){f!==0&&f===ha&&(Ya=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Ha=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ru|=o,e.lanes=o,e.memoizedState=d}}function Qa(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function $a(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Qa(n[e],t)}var eo=ae(null),to=ae(0);function no(e,t){e=tu,oe(to,e),oe(eo,t),tu=e|t.baseLanes}function R(){oe(to,tu),oe(eo,eo.current)}function ro(){tu=to.current,I(eo),I(to)}var io=ae(null),ao=null;function oo(e){var t=e.alternate;oe(fo,fo.current&1),oe(io,e),ao===null&&(t===null||eo.current!==null||t.memoizedState!==null)&&(ao=e)}function so(e){oe(fo,fo.current),oe(io,e),ao===null&&(ao=e)}function co(e){e.tag===22?(oe(fo,fo.current),oe(io,e),ao===null&&(ao=e)):lo(e)}function lo(){oe(fo,fo.current),oe(io,io.current)}function uo(e){I(io),ao===e&&(ao=null),I(fo)}var fo=ae(0);function po(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||bf(n)||xf(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 mo=0,ho=null,go=null,_o=null,vo=!1,yo=!1,bo=!1,xo=0,So=0,Co=null,wo=0;function To(){throw Error(i(321))}function Eo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wr(e[n],t[n]))return!1;return!0}function Do(e,t,n,r,i,a){return mo=a,ho=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?Ws:Gs,bo=!1,a=n(r,i),bo=!1,yo&&(a=ko(t,n,r,i)),Oo(e),a}function Oo(e){P.H=Us;var t=go!==null&&go.next!==null;if(mo=0,_o=go=ho=null,vo=!1,So=0,Co=null,t)throw Error(i(300));e===null||cc||(e=e.dependencies,e!==null&&na(e)&&(cc=!0))}function ko(e,t,n,r){ho=e;var a=0;do{if(yo&&(Co=null),So=0,yo=!1,25<=a)throw Error(i(301));if(a+=1,_o=go=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=Ks,o=t(n,r)}while(yo);return o}function Ao(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?Lo(t):t,e=e.useState()[0],(go===null?null:go.memoizedState)!==e&&(ho.flags|=1024),t}function jo(){var e=xo!==0;return xo=0,e}function Mo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function No(e){if(vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}vo=!1}mo=0,_o=go=ho=null,yo=!1,So=xo=0,Co=null}function Po(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return _o===null?ho.memoizedState=_o=e:_o=_o.next=e,_o}function Fo(){if(go===null){var e=ho.alternate;e=e===null?null:e.memoizedState}else e=go.next;var t=_o===null?ho.memoizedState:_o.next;if(t!==null)_o=t,go=e;else{if(e===null)throw ho.alternate===null?Error(i(467)):Error(i(310));go=e,e={memoizedState:go.memoizedState,baseState:go.baseState,baseQueue:go.baseQueue,queue:go.queue,next:null},_o===null?ho.memoizedState=_o=e:_o=_o.next=e}return _o}function Io(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lo(e){var t=So;return So+=1,Co===null&&(Co=[]),e=ka(Co,e,t),t=ho,(_o===null?t.memoizedState:_o.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?Ws:Gs),e}function Ro(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Lo(e);if(e.$$typeof===C)return ia(e)}throw Error(i(438,String(e)))}function zo(e){var t=null,n=ho.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=ho.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Io(),ho.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]=A;return t.index++,n}function Bo(e,t){return typeof t==`function`?t(e):t}function Vo(e){return Ho(Fo(),go,e)}function Ho(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(mo&f)===f:(Yl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ha&&(d=!0);else if((mo&p)===p){u=u.next,p===ha&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,ho.lanes|=p,ru|=p;f=u.action,bo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,ho.lanes|=f,ru|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!wr(o,e.memoizedState)&&(cc=!0,d&&(n=ga,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Uo(e){var t=Fo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);wr(o,t.memoizedState)||(cc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Wo(e,t,n){var r=ho,a=Fo(),o=Li;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!wr((go||a).memoizedState,n);if(s&&(a.memoizedState=n,cc=!0),a=a.queue,hs(qo.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||_o!==null&&_o.memoizedState.tag&1){if(r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,a,n,t),null),ql===null)throw Error(i(349));o||mo&127||Go(r,t,n)}return n}function Go(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ho.updateQueue,t===null?(t=Io(),ho.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ko(e,t,n,r){t.value=n,t.getSnapshot=r,Jo(t)&&Yo(e)}function qo(e,t,n){return n(function(){Jo(t)&&Yo(e)})}function Jo(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wr(e,n)}catch{return!0}}function Yo(e){var t=ai(e,2);t!==null&&Du(t,e,2)}function Xo(e){var t=Po();if(typeof e==`function`){var n=e;if(e=n(),bo){Re(!0);try{n()}finally{Re(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:e},t}function Zo(e,t,n,r){return e.baseState=n,Ho(e,go,typeof r==`function`?r:Bo)}function Qo(e,t,n,r,a){if(Bs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,$o(t,o)):(o.next=n.next,t.pending=n.next=o)}}function $o(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),es(e,t,s)}catch(n){ns(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),es(e,t,a)}catch(n){ns(e,t,n)}}function es(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ts(e,t,n)},function(n){return ns(e,t,n)}):ts(e,t,n)}function ts(e,t,n){t.status=`fulfilled`,t.value=n,rs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,$o(e,n)))}function ns(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,rs(t),t=t.next;while(t!==r)}e.action=null}function rs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function is(e,t){return t}function as(e,t){if(Li){var n=ql.formState;if(n!==null){a:{var r=ho;if(Li){if(Ii){b:{for(var i=Ii,a=zi;i.nodeType!==8;){if(!a){i=null;break b}if(i=Cf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){Ii=Cf(i.nextSibling),r=i.data===`F!`;break a}}Vi(r)}r=!1}r&&(t=n[0])}}return n=Po(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:is,lastRenderedState:t},n.queue=r,n=Ls.bind(null,ho,r),r.dispatch=n,r=Xo(!1),a=zs.bind(null,ho,!1,r.queue),r=Po(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Qo.bind(null,ho,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function os(e){return ss(Fo(),go,e)}function ss(e,t,n){if(t=Ho(e,t,is)[0],e=Vo(Bo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Lo(t)}catch(e){throw e===Ta?Ea:e}else r=t;t=Fo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(ho.flags|=2048,us(9,{destroy:void 0},cs.bind(null,i,n),null)),[r,a,e]}function cs(e,t){e.action=t}function ls(e){var t=Fo(),n=go;if(n!==null)return ss(t,n,e);Fo(),t=t.memoizedState,n=Fo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function us(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=ho.updateQueue,t===null&&(t=Io(),ho.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 ds(){return Fo().memoizedState}function fs(e,t,n,r){var i=Po();ho.flags|=e,i.memoizedState=us(1|t,{destroy:void 0},n,r===void 0?null:r)}function ps(e,t,n,r){var i=Fo();r=r===void 0?null:r;var a=i.memoizedState.inst;go!==null&&r!==null&&Eo(r,go.memoizedState.deps)?i.memoizedState=us(t,a,n,r):(ho.flags|=e,i.memoizedState=us(1|t,a,n,r))}function ms(e,t){fs(8390656,8,e,t)}function hs(e,t){ps(2048,8,e,t)}function gs(e){ho.flags|=4;var t=ho.updateQueue;if(t===null)t=Io(),ho.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function _s(e){var t=Fo().memoizedState;return gs({ref:t,nextImpl:e}),function(){if(Kl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function vs(e,t){return ps(4,2,e,t)}function ys(e,t){return ps(4,4,e,t)}function bs(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 xs(e,t,n){n=n==null?null:n.concat([e]),ps(4,4,bs.bind(null,t,e),n)}function Ss(){}function Cs(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Eo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ws(e,t){var n=Fo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Eo(t,r[1]))return r[0];if(r=e(),bo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r}function Ts(e,t,n){return n===void 0||mo&1073741824&&!(Yl&261930)?e.memoizedState=t:(e.memoizedState=n,e=Eu(),ho.lanes|=e,ru|=e,n)}function Es(e,t,n,r){return wr(n,t)?n:eo.current===null?!(mo&42)||mo&1073741824&&!(Yl&261930)?(cc=!0,e.memoizedState=n):(e=Eu(),ho.lanes|=e,ru|=e,t):(e=Ts(e,n,r),wr(e,t)||(cc=!0),e)}function Ds(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};P.T=s,zs(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Rs(e,t,ya(c,r),Tu(e)):Rs(e,t,r,Tu(e))}catch(n){Rs(e,t,{then:function(){},status:`rejected`,reason:n},Tu())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Os(){}function ks(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=As(e).queue;Ds(e,a,t,ne,n===null?Os:function(){return js(e),n(r)})}function As(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function js(e){var t=As(e);t.next===null&&(t=e.alternate.memoizedState),Rs(e,t.next.queue,{},Tu())}function Ms(){return ia(pp)}function Ns(){return Fo().memoizedState}function Ps(){return Fo().memoizedState}function Fs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Tu();e=Ga(n);var r=Ka(t,e,n);r!==null&&(Du(r,t,n),qa(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Is(e,t,n){var r=Tu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Bs(e)?Vs(t,n):(n=ii(e,t,n,r),n!==null&&(Du(n,e,r),Hs(n,t,r)))}function Ls(e,t,n){Rs(e,t,n,Tu())}function Rs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Bs(e))Vs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),ql===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Du(n,e,r),Hs(n,t,r),!0}return!1}function zs(e,t,n,r){if(r={lane:2,revertLane:wd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Bs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Du(t,e,2)}function Bs(e){var t=e.alternate;return e===ho||t!==null&&t===ho}function Vs(e,t){yo=vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Hs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,tt(e,n)}}var Us={readContext:ia,use:Ro,useCallback:To,useContext:To,useEffect:To,useImperativeHandle:To,useLayoutEffect:To,useInsertionEffect:To,useMemo:To,useReducer:To,useRef:To,useState:To,useDebugValue:To,useDeferredValue:To,useTransition:To,useSyncExternalStore:To,useId:To,useHostTransitionStatus:To,useFormState:To,useActionState:To,useOptimistic:To,useMemoCache:To,useCacheRefresh:To};Us.useEffectEvent=To;var Ws={readContext:ia,use:Ro,useCallback:function(e,t){return Po().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:ms,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),fs(4194308,4,bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return fs(4194308,4,e,t)},useInsertionEffect:function(e,t){fs(4,2,e,t)},useMemo:function(e,t){var n=Po();t=t===void 0?null:t;var r=e();if(bo){Re(!0);try{e()}finally{Re(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Po();if(n!==void 0){var i=n(t);if(bo){Re(!0);try{n(t)}finally{Re(!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=Is.bind(null,ho,e),[r.memoizedState,e]},useRef:function(e){var t=Po();return e={current:e},t.memoizedState=e},useState:function(e){e=Xo(e);var t=e.queue,n=Ls.bind(null,ho,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ss,useDeferredValue:function(e,t){return Ts(Po(),e,t)},useTransition:function(){var e=Xo(!1);return e=Ds.bind(null,ho,e.queue,!0,!1),Po().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=ho,a=Po();if(Li){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));Yl&127||Go(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ms(qo.bind(null,r,o,e),[e]),r.flags|=2048,us(9,{destroy:void 0},Ko.bind(null,r,o,n,t),null),n},useId:function(){var e=Po(),t=ql.identifierPrefix;if(Li){var n=ki,r=Oi;n=(r&~(1<<32-ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=xo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=wo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ms,useFormState:as,useActionState:as,useOptimistic:function(e){var t=Po();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=zs.bind(null,ho,!0,n),n.dispatch=t,[e,t]},useMemoCache:zo,useCacheRefresh:function(){return Po().memoizedState=Fs.bind(null,ho)},useEffectEvent:function(e){var t=Po(),n={impl:e};return t.memoizedState=n,function(){if(Kl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},Gs={readContext:ia,use:Ro,useCallback:Cs,useContext:ia,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Vo,useRef:ds,useState:function(){return Vo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){return Es(Fo(),go.memoizedState,e,t)},useTransition:function(){var e=Vo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:os,useActionState:os,useOptimistic:function(e,t){return Zo(Fo(),go,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Gs.useEffectEvent=_s;var Ks={readContext:ia,use:Ro,useCallback:Cs,useContext:ia,useEffect:hs,useImperativeHandle:xs,useInsertionEffect:vs,useLayoutEffect:ys,useMemo:ws,useReducer:Uo,useRef:ds,useState:function(){return Uo(Bo)},useDebugValue:Ss,useDeferredValue:function(e,t){var n=Fo();return go===null?Ts(n,e,t):Es(n,go.memoizedState,e,t)},useTransition:function(){var e=Uo(Bo)[0],t=Fo().memoizedState;return[typeof e==`boolean`?e:Lo(e),t]},useSyncExternalStore:Wo,useId:Ns,useHostTransitionStatus:Ms,useFormState:ls,useActionState:ls,useOptimistic:function(e,t){var n=Fo();return go===null?(n.baseState=e,[e,n.queue.dispatch]):Zo(n,go,e,t)},useMemoCache:zo,useCacheRefresh:Ps};Ks.useEffectEvent=_s;function qs(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Tu(),i=Ga(r);i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Du(t,e,r),qa(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Tu(),i=Ga(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ka(e,i,r),t!==null&&(Du(t,e,r),qa(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Tu(),r=Ga(n);r.tag=2,t!=null&&(r.callback=t),t=Ka(e,r,n),t!==null&&(Du(t,e,n),qa(t,e,n))}};function Ys(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Tr(n,r)||!Tr(i,a):!0}function Xs(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&&Js.enqueueReplaceState(t,t.state,null)}function Zs(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Qs(e){Qr(e)}function $s(e){console.error(e)}function ec(e){Qr(e)}function tc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function nc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function rc(e,t,n){return n=Ga(n),n.tag=3,n.payload={element:null},n.callback=function(){tc(e,t)},n}function ic(e){return e=Ga(e),e.tag=3,e}function ac(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){nc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){nc(t,n,r),typeof i!=`function`&&(hu===null?hu=new Set([this]):hu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function oc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ta(t,n,a,!0),n=io.current,n!==null){switch(n.tag){case 31:case 13:return ao===null?zu():n.alternate===null&&nu===0&&(nu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Da?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),id(e,r,a)),!1;case 22:return n.flags|=65536,r===Da?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)),id(e,r,a)),!1}throw Error(i(435,n.tag))}return id(e,r,a),zu(),!1}if(Li)return t=io.current,t===null?(r!==Bi&&(t=Error(i(423),{cause:r}),qi(bi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=bi(r,n),a=rc(e.stateNode,r,a),Ja(e,a),nu!==4&&(nu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Bi&&(e=Error(i(422),{cause:r}),qi(bi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=bi(o,n),cu===null?cu=[o]:cu.push(o),nu!==4&&(nu=2),t===null)return!0;r=bi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=rc(n.stateNode,r,e),Ja(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(hu===null||!hu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=ic(a),ac(a,e,n,r),Ja(n,a),!1}n=n.return}while(n!==null);return!1}var sc=Error(i(461)),cc=!1;function lc(e,t,n,r){t.child=e===null?Va(t,null,n,r):Ba(t,e.child,n,r)}function uc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ra(t),r=Do(e,t,n,o,a,i),s=jo(),e!==null&&!cc?(Mo(e,t,i),Pc(e,t,i)):(Li&&s&&Mi(t),t.flags|=1,lc(e,t,r,i),t.child)}function dc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!di(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,fc(e,t,a,r,i)):(e=mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Fc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Tr:n,n(o,r)&&e.ref===t.ref)return Pc(e,t,i)}return t.flags|=1,e=fi(a,r),e.ref=t.ref,e.return=t,t.child=e}function fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Tr(a,r)&&e.ref===t.ref){if(cc=!1,t.pendingProps=r=a,Fc(e,i))e.flags&131072&&(cc=!0);else return t.lanes=e.lanes,Pc(e,t,i)}}return bc(e,t,n,r,i)}function pc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return hc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ca(t,a===null?null:a.cachePool),a===null?R():no(t,a),co(t);else return r=t.lanes=536870912,hc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ca(t,null),R(),lo(t)):(Ca(t,a.cachePool),no(t,a),lo(t),t.memoizedState=null);return lc(e,t,i,n),t.child}function mc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function hc(e,t,n,r,i){var a=Sa();return a=a===null?null:{parent:ua._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ca(t,null),R(),co(t),e!==null&&ta(e,t,r,!0),t.childLanes=i,null}function gc(e,t){return t=kc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _c(e,t,n){return Ba(t,e.child,null,n),e=gc(t,t.pendingProps),e.flags|=2,uo(t),t.memoizedState=null,e}function vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(Li){if(r.mode===`hidden`)return e=gc(t,r),t.lanes=536870912,mc(null,e);if(so(t),(e=Ii)?(e=yf(e,zi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Vi(t);return t.lanes=536870912,null}return gc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(so(t),a){if(t.flags&256)t.flags&=-257,t=_c(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(cc||ta(e,t,n,!1),a=(n&e.childLanes)!==0,cc||a){if(r=ql,r!==null&&(s=nt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,ai(e,s),Du(r,e,s),sc;zu(),t=_c(e,t,n)}else e=o.treeContext,Ii=Cf(s.nextSibling),Fi=t,Li=!0,Ri=null,zi=!1,e!==null&&Pi(t,e),t=gc(t,r),t.flags|=4096;return t}return e=fi(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function yc(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(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function bc(e,t,n,r,i){return ra(t),n=Do(e,t,n,r,void 0,i),r=jo(),e!==null&&!cc?(Mo(e,t,i),Pc(e,t,i)):(Li&&r&&Mi(t),t.flags|=1,lc(e,t,n,i),t.child)}function xc(e,t,n,r,i,a){return ra(t),t.updateQueue=null,n=ko(t,r,n,i),Oo(e),r=jo(),e!==null&&!cc?(Mo(e,t,a),Pc(e,t,a)):(Li&&r&&Mi(t),t.flags|=1,lc(e,t,n,a),t.child)}function Sc(e,t,n,r,i){if(ra(t),t.stateNode===null){var a=ci,o=n.contextType;typeof o==`object`&&o&&(a=ia(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Js,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Ua(t),o=n.contextType,a.context=typeof o==`object`&&o?ia(o):ci,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(qs(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Js.enqueueReplaceState(a,a.state,null),Za(t,r,a,i),Xa(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Zs(n,s);a.props=c;var l=a.context,u=n.contextType;o=ci,typeof u==`object`&&u&&(o=ia(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Xs(t,a,r,o),Ha=!1;var f=t.memoizedState;a.state=f,Za(t,r,a,i),Xa(),l=t.memoizedState,s||f!==l||Ha?(typeof d==`function`&&(qs(t,n,d,r),l=t.memoizedState),(c=Ha||Ys(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Wa(e,t),o=t.memoizedProps,u=Zs(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=ci,typeof l==`object`&&l&&(c=ia(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Xs(t,a,r,c),Ha=!1,f=t.memoizedState,a.state=f,Za(t,r,a,i),Xa();var p=t.memoizedState;o!==d||f!==p||Ha||e!==null&&e.dependencies!==null&&na(e.dependencies)?(typeof s==`function`&&(qs(t,n,s,r),p=t.memoizedState),(u=Ha||Ys(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&na(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,yc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ba(t,e.child,null,i),t.child=Ba(t,null,n,i)):lc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Pc(e,t,i),e}function Cc(e,t,n,r){return Gi(),t.flags|=256,lc(e,t,n,r),t.child}var wc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Tc(e){return{baseLanes:e,cachePool:wa()}}function Ec(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=ou),e}function Dc(e,t,n){var r=t.pendingProps,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(fo.current&2)),s&&(a=!0,t.flags&=-129),s=!!(t.flags&32),t.flags&=-33,e===null){if(Li){if(a?oo(t):lo(t),(e=Ii)?(e=yf(e,zi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Di===null?null:{id:Oi,overflow:ki},retryLane:536870912,hydrationErrors:null},n=_i(e),n.return=t,t.child=n,Fi=t,Ii=null)):e=null,e===null)throw Vi(t);return xf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(lo(t),a=t.mode,c=kc({mode:`hidden`,children:c},a),r=hi(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(null,r)):(oo(t),Oc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(oo(t),t.flags&=-257,t=Ac(e,t,n)):t.memoizedState===null?(lo(t),c=r.fallback,a=t.mode,r=kc({mode:`visible`,children:r.children},a),c=hi(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ba(t,e.child,null,n),r=t.child,r.memoizedState=Tc(n),r.childLanes=Ec(e,s,n),t.memoizedState=wc,t=mc(null,r)):(lo(t),t.child=e.child,t.flags|=128,t=null);else if(oo(t),xf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,qi({value:r,source:null,stack:null}),t=Ac(e,t,n)}else if(cc||ta(e,t,n,!1),s=(n&e.childLanes)!==0,cc||s){if(s=ql,s!==null&&(r=nt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,ai(e,r),Du(s,e,r),sc;bf(c)||zu(),t=Ac(e,t,n)}else bf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,Ii=Cf(c.nextSibling),Fi=t,Li=!0,Ri=null,zi=!1,e!==null&&Pi(t,e),t=Oc(t,r.children),t.flags|=4096);return t}return a?(lo(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=fi(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=hi(c,a,n,null),c.flags|=2):c=fi(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,mc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Tc(n):(a=c.cachePool,a===null?a=wa():(l=ua._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Ec(e,s,n),t.memoizedState=wc,mc(e.child,r)):(oo(t),n=e.child,e=n.sibling,n=fi(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Oc(e,t){return t=kc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function kc(e,t){return e=ui(22,e,null,t),e.lanes=0,e}function Ac(e,t,n){return Ba(t,e.child,null,n),e=Oc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),$i(e.return,t,n)}function Mc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function Nc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=fo.current,s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,oe(fo,o),lc(e,t,r,n),r=Li?wi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jc(e,n,t);else if(e.tag===19)jc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;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&&po(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Mc(t,!1,i,n,a,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&&po(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Mc(t,!0,n,null,a,r);break;case`together`:Mc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Pc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ru|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ta(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=fi(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fi(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fc(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&na(e)))}function Ic(e,t,n){switch(t.tag){case 3:de(t,t.stateNode.containerInfo),Zi(t,ua,e.memoizedState.cache),Gi();break;case 27:case 5:pe(t);break;case 4:de(t,t.stateNode.containerInfo);break;case 10:Zi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,so(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(oo(t),e=Pc(e,t,n),e===null?null:e.sibling):Dc(e,t,n):(oo(t),t.flags|=128,null);oo(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(ta(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Nc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),oe(fo,fo.current),r)break;return null;case 22:return t.lanes=0,pc(e,t,n,t.pendingProps);case 24:Zi(t,ua,e.memoizedState.cache)}return Pc(e,t,n)}function Lc(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)cc=!0;else{if(!Fc(e,n)&&!(t.flags&128))return cc=!1,Ic(e,t,n);cc=!!(e.flags&131072)}}else cc=!1,Li&&t.flags&1048576&&ji(t,wi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Aa(t.elementType),t.type=e,typeof e==`function`)di(e)?(r=Zs(e,r),t.tag=1,t=Sc(null,t,e,r,n)):(t.tag=0,t=bc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=uc(null,t,e,r,n);break a}if(a===D){t.tag=14,t=dc(null,t,e,r,n);break a}}throw t=ee(e)||e,Error(i(306,t,``))}}return t;case 0:return bc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Zs(r,t.pendingProps),Sc(e,t,r,a,n);case 3:a:{if(de(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Wa(e,t),Za(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Zi(t,ua,r),r!==o.cache&&ea(t,[ua],n,!0),Xa(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Cc(e,t,r,n);break a}if(r!==a){a=bi(Error(i(424)),t),qi(a),t=Cc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(Ii=Cf(e.firstChild),Fi=t,Li=!0,Ri=null,zi=!0,n=Va(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Gi(),r===a){t=Pc(e,t,n);break a}lc(e,t,r,n)}t=t.child}return t;case 26:return yc(e,t),e===null?(n=Wf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Li||(n=t.type,e=t.pendingProps,r=tf(le.current).createElement(n),r[ct]=t,r[lt]=e,Yd(r,n,e),xt(r),t.stateNode=r):t.memoizedState=Wf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return pe(t),e===null&&Li&&(r=t.stateNode=Df(t.type,t.pendingProps,le.current),Fi=t,zi=!0,a=Ii,pf(t.type)?(wf=a,Ii=Cf(r.firstChild)):Ii=a),lc(e,t,t.pendingProps.children,n),yc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Li&&((a=r=Ii)&&(r=_f(r,t.type,t.pendingProps,zi),r===null?a=!1:(t.stateNode=r,Fi=t,Ii=Cf(r.firstChild),zi=!1,a=!0)),a||Vi(t)),pe(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,af(a,o)?r=null:s!==null&&af(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Do(e,t,Ao,null,null,n),pp._currentValue=a),yc(e,t),lc(e,t,r,n),t.child;case 6:return e===null&&Li&&((e=n=Ii)&&(n=vf(n,t.pendingProps,zi),n===null?e=!1:(t.stateNode=n,Fi=t,Ii=null,e=!0)),e||Vi(t)),null;case 13:return Dc(e,t,n);case 4:return de(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ba(t,null,r,n):lc(e,t,r,n),t.child;case 11:return uc(e,t,t.type,t.pendingProps,n);case 7:return lc(e,t,t.pendingProps,n),t.child;case 8:return lc(e,t,t.pendingProps.children,n),t.child;case 12:return lc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Zi(t,t.type,r.value),lc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ra(t),a=ia(a),r=r(a),t.flags|=1,lc(e,t,r,n),t.child;case 14:return dc(e,t,t.type,t.pendingProps,n);case 15:return fc(e,t,t.type,t.pendingProps,n);case 19:return Nc(e,t,n);case 31:return vc(e,t,n);case 22:return pc(e,t,n,t.pendingProps);case 24:return ra(t),r=ia(ua),e===null?(a=Sa(),a===null&&(a=ql,o=da(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},Ua(t),Zi(t,ua,a)):((e.lanes&n)!==0&&(Wa(e,t),Za(t,null,null,n),Xa()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Zi(t,ua,r),r!==a.cache&&ea(t,[ua],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Zi(t,ua,r))),lc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function Rc(e){e.flags|=4}function zc(e,t,n,r,i){if((t=!!(e.mode&32))&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Iu())e.flags|=8192;else throw ja=Da,L}}else e.flags&=-16777217}function Bc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!ap(t)){if(Iu())e.flags|=8192;else throw ja=Da,L}}function Vc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Xe(),e.lanes|=t,su|=t)}function Hc(e,t){if(!Li)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 Uc(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 Wc(e,t,n){var r=t.pendingProps;switch(Ni(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Uc(t),null;case 1:return Uc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Qi(ua),fe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Wi(t)?Rc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ki())),Uc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(Rc(t),o===null?(Uc(t),zc(t,a,null,r,n)):(Uc(t),Bc(t,o))):o?o===e.memoizedState?(Uc(t),t.flags&=-16777217):(Rc(t),Uc(t),Bc(t,o)):(e=e.memoizedProps,e!==r&&Rc(t),Uc(t),zc(t,a,e,r,n)),null;case 27:if(me(t),n=le.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}e=se.current,Wi(t)?Hi(t,e):(e=Df(a,r,n),t.stateNode=e,Rc(t))}return Uc(t),null;case 5:if(me(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return Uc(t),null}if(o=se.current,Wi(t))Hi(t,o);else{var s=tf(le.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ct]=t,o[lt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Yd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=le.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ct]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Kd(e.nodeValue,n)),e||Vi(t,!0)}else e=tf(e).createTextNode(r),e[ct]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ct]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(uo(t),t):(uo(t),null);if(t.flags&128)throw Error(i(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ct]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(uo(t),t):(uo(t),null)}return uo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),Uc(t),null);case 4:return fe(),e===null&&Id(t.stateNode.containerInfo),Uc(t),null;case 10:return Qi(t.type),Uc(t),null;case 19:if(I(fo),r=t.memoizedState,r===null)return Uc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Hc(r,!1);else{if(nu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=po(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return oe(fo,fo.current&1|2),Li&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&De()>pu&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=po(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Li)return Uc(t),null}else 2*De()-r.renderingStartTime>pu&&n!==536870912&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=De(),e.sibling=null,n=fo.current,oe(fo,a?n&1|2:n&1),Li&&Ai(t,r.treeForkCount),e);case 22:case 23:return uo(t),ro(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(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&&I(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Uc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Gc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),fe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return me(t),null;case 31:if(t.memoizedState!==null){if(uo(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(uo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I(fo),null;case 4:return fe(),null;case 10:return Qi(t.type),null;case 22:case 23:return uo(t),ro(),e!==null&&I(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function Kc(e,t){switch(Ni(t),t.tag){case 3:Qi(ua),fe();break;case 26:case 27:case 5:me(t);break;case 4:fe();break;case 31:t.memoizedState!==null&&uo(t);break;case 13:uo(t);break;case 19:I(fo);break;case 10:Qi(t.type);break;case 22:case 23:uo(t),ro(),e!==null&&I(xa);break;case 24:Qi(ua)}}function qc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){rd(t,t.return,e)}}function Jc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){rd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){rd(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{$a(t,n)}catch(t){rd(e,e.return,t)}}}function Xc(e,t,n){n.props=Zs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){rd(e,t,n)}}function Zc(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(n){rd(e,t,n)}}function Qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){rd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){rd(e,t,n)}else n.current=null}}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){rd(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Xd(r,e.type,n,t),r[lt]=t}catch(t){rd(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&pf(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(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&&pf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(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=tn));else if(r!==4&&(r===27&&pf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(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&&pf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Yd(t,r,n),t[ct]=e,t[lt]=n}catch(t){rd(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,$d=Sp,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ef={focusedElem:e,selectionRange:n},Sp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Zs(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){rd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)gf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:gf(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(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Dl(e,n),r&4&&qc(5,n);break;case 1:if(Dl(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){rd(n,n.return,e)}else{var i=Zs(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){rd(n,n.return,e)}}}r&64&&Yc(n),r&512&&Zc(n,n.return);break;case 3:if(Dl(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{$a(e,t)}catch(e){rd(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:Dl(e,n),t===null&&r&4&&$c(n),r&512&&Zc(n,n.return);break;case 12:Dl(e,n);break;case 31:Dl(e,n),r&4&&vl(e,n);break;case 13:Dl(e,n),r&4&&yl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=sd.bind(null,n),Sf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?kl(e,n,!!(n.subtreeFlags&8772)):Dl(e,n),ol=i,sl=a}break;case 30:break;default:Dl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&gt(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 ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(Le&&typeof Le.onCommitFiberUnmount==`function`)try{Le.onCommitFiberUnmount(Ie,n)}catch{}switch(n.tag){case 26:sl||Qc(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||Qc(n,t);var r=ml,i=hl;pf(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),Of(n.stateNode),ml=r,hl=i;break;case 5:sl||Qc(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null){if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){rd(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){rd(n,t,e)}}break;case 18:ml!==null&&(hl?(e=ml,mf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Kp(e)):mf(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:Jc(2,n,t),sl||Jc(4,n,t),gl(e,t,n);break;case 1:sl||(Qc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Xc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kp(e)}catch(e){rd(t,t.return,e)}}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kp(e)}catch(e){rd(t,t.return,e)}}function bl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function xl(e,t){var n=bl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=cd.bind(null,e,t);t.then(r,r)}})}function Sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(pf(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wl(t,e),t=t.sibling}var Cl=null;function wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sl(t,e),Tl(e),r&4&&(Jc(3,e,e.return),qc(3,e),Jc(5,e,e.return));break;case 1:Sl(t,e),Tl(e),r&512&&(sl||n===null||Qc(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Cl;if(Sl(t,e),Tl(e),r&512&&(sl||n===null||Qc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null){if(r===null){if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ht]||o[ct]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Yd(o,r,n),o[ct]=e,xt(o),r=o;break a;case`link`:var s=np(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Yd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=np(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Yd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[ct]=e,xt(o),r=o}e.stateNode=r}else rp(a,e.type,e.stateNode)}else e.stateNode=Zf(a,r,e.memoizedProps)}else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?rp(a,e.type,e.stateNode):Zf(a,r,e.memoizedProps))}break;case 27:Sl(t,e),Tl(e),r&512&&(sl||n===null||Qc(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Sl(t,e),Tl(e),r&512&&(sl||n===null||Qc(n,n.return)),e.flags&32){a=e.stateNode;try{qt(a,``)}catch(t){rd(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(Sl(t,e),Tl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){rd(e,e.return,t)}}break;case 3:if(tp=null,a=Cl,Cl=jf(t.containerInfo),Sl(t,e),Cl=a,Tl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Kp(t.containerInfo)}catch(t){rd(e,e.return,t)}cl&&(cl=!1,El(e));break;case 4:r=Cl,Cl=jf(e.stateNode.containerInfo),Sl(t,e),Tl(e),Cl=r;break;case 12:Sl(t,e),Tl(e);break;case 31:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 13:Sl(t,e),Tl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(du=De()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,Sl(t,e),sl=d,ol=u,Tl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Ol(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){rd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){rd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?hf(m,!0):hf(l.stateNode,!1)}catch(e){rd(l,l.return,e)}}}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 a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;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,xl(e,n))));break;case 19:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 30:break;case 21:break;default:Sl(t,e),Tl(e)}}function Tl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(qt(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){rd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function El(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;El(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Jc(4,t,t.return),Ol(t);break;case 1:Qc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Xc(t,t.return,n),Ol(t);break;case 27:Of(t.stateNode);case 26:case 5:Qc(t,t.return),Ol(t);break;case 22:t.memoizedState===null&&Ol(t);break;case 30:Ol(t);break;default:Ol(t)}e=e.sibling}}function kl(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:kl(i,a,n),qc(4,a);break;case 1:if(kl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){rd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Qa(c[i],s)}catch(e){rd(r,r.return,e)}}n&&o&64&&Yc(a),Zc(a,a.return);break;case 27:al(a);case 26:case 5:kl(i,a,n),n&&r===null&&o&4&&$c(a),Zc(a,a.return);break;case 12:kl(i,a,n);break;case 31:kl(i,a,n),n&&o&4&&vl(i,a);break;case 13:kl(i,a,n),n&&o&4&&yl(i,a);break;case 22:a.memoizedState===null&&kl(i,a,n),Zc(a,a.return);break;case 30:break;default:kl(i,a,n)}t=t.sibling}}function Al(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&&fa(n))}function jl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&fa(e))}function Ml(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nl(e,t,n,r),t=t.sibling}function Nl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ml(e,t,n,r),i&2048&&qc(9,t);break;case 1:Ml(e,t,n,r);break;case 3:Ml(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&&fa(e)));break;case 12:if(i&2048){Ml(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){rd(t,t.return,e)}}else Ml(e,t,n,r);break;case 31:Ml(e,t,n,r);break;case 13:Ml(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ml(e,t,n,r):(a._visibility|=2,Pl(e,t,n,r,!!(t.subtreeFlags&10256)||!1)):a._visibility&2?Ml(e,t,n,r):Fl(e,t),i&2048&&Al(o,t);break;case 24:Ml(e,t,n,r),i&2048&&jl(t.alternate,t);break;default:Ml(e,t,n,r)}}function Pl(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Pl(a,o,s,c,i),qc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Pl(a,o,s,c,i)):u._visibility&2?Pl(a,o,s,c,i):Fl(a,o),i&&l&2048&&Al(o.alternate,o);break;case 24:Pl(a,o,s,c,i),i&&l&2048&&jl(o.alternate,o);break;default:Pl(a,o,s,c,i)}t=t.sibling}}function Fl(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:Fl(n,r),i&2048&&Al(r.alternate,r);break;case 24:Fl(n,r),i&2048&&jl(r.alternate,r);break;default:Fl(n,r)}t=t.sibling}}var Il=8192;function Ll(e,t,n){if(e.subtreeFlags&Il)for(e=e.child;e!==null;)Rl(e,t,n),e=e.sibling}function Rl(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Il&&e.memoizedState!==null&&op(n,Cl,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var r=Cl;Cl=jf(e.stateNode.containerInfo),Ll(e,t,n),Cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Il,Il=16777216,Ll(e,t,n),Il=r):Ll(e,t,n));break;default:Ll(e,t,n)}}function zl(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 Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vl(e),e=e.sibling}function Vl(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&Jc(9,e,e.return);break;case 3:Bl(e);break;case 12:Bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hl(e)):Bl(e);break;default:Bl(e)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Jc(8,t,t.return),Hl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hl(t));break;default:Hl(t)}e=e.sibling}}function Ul(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:Jc(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:fa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Wl={getCacheForType:function(e){var t=ia(ua),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ia(ua).controller.signal}},Gl=typeof WeakMap==`function`?WeakMap:Map,Kl=0,ql=null,Jl=null,Yl=0,Xl=0,Zl=null,Ql=!1,$l=!1,eu=!1,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=0,cu=null,lu=null,uu=!1,du=0,fu=0,pu=1/0,mu=null,hu=null,gu=0,_u=null,vu=null,yu=0,bu=0,xu=null,Su=null,Cu=0,wu=null;function Tu(){return Kl&2&&Yl!==0?Yl&-Yl:P.T===null?at():wd()}function Eu(){if(ou===0){if(!(Yl&536870912)||Li){var e=We;We<<=1,!(We&3932160)&&(We=262144),ou=e}else ou=536870912}return e=io.current,e!==null&&(e.flags|=32),ou}function Du(e,t,n){(e===ql&&(Xl===2||Xl===9)||e.cancelPendingCommit!==null)&&(Pu(e,0),ju(e,Yl,ou,!1)),Qe(e,n),(!(Kl&2)||e!==ql)&&(e===ql&&(!(Kl&2)&&(iu|=n),nu===4&&ju(e,Yl,ou,!1)),gd(e))}function Ou(e,t,n){if(Kl&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||Je(e,t),a=r?Hu(e,t):Bu(e,t,!0),o=r;do{if(a===0){$l&&!r&&ju(e,t,0,!1);break}if(n=e.current.alternate,o&&!Au(n)){a=Bu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=cu;var l=c.current.memoizedState.isDehydrated;if(l&&(Pu(c,s).flags|=256),s=Bu(c,s,!1),s!==2){if(eu&&!l){c.errorRecoveryDisabledLanes|=o,iu|=o,a=4;break a}o=lu,lu=a,o!==null&&(lu===null?lu=o:lu.push.apply(lu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Pu(e,0),ju(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:ju(r,t,ou,!Ql);break a;case 2:lu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=du+300-De(),10<a)){if(ju(r,t,ou,!Ql),qe(r,0,!0)!==0)break a;yu=t,r.timeoutHandle=cf(ku.bind(null,r,n,lu,mu,uu,t,ou,iu,su,Ql,o,`Throttled`,-0,0),a);break a}ku(r,n,lu,mu,uu,t,ou,iu,su,Ql,o,null,-0,0)}break}while(1);gd(e)}function ku(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:tn},Rl(t,a,d);var m=(a&62914560)===a?du-De():(a&4194048)===a?fu-De():0;if(m=cp(d,m),m!==null){yu=a,e.cancelPendingCommit=m(Yu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),ju(e,a,o,!l);return}}Yu(e,t,a,n,r,i,o,s,c)}function Au(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],a=i.getSnapshot;i=i.value;try{if(!wr(a(),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 ju(e,t,n,r){t&=~au,t&=~iu,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&et(e,n,t)}function Mu(){return Kl&6?!0:(_d(0,!1),!1)}function Nu(){if(Jl!==null){if(Xl===0)var e=Jl.return;else e=Jl,Xi=Yi=null,No(e),Pa=null,Fa=0,e=Jl;for(;e!==null;)Kc(e.alternate,e),e=e.return;Jl=null}}function Pu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,lf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),yu=0,Nu(),ql=e,Jl=n=fi(e.current,null),Yl=t,Xl=0,Zl=null,Ql=!1,$l=Je(e,t),eu=!1,su=ou=au=iu=ru=nu=0,lu=cu=null,uu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-ze(r),a=1<<i;t|=e[i],r&=~a}return tu=t,ni(),n}function Fu(e,t){ho=null,P.H=Us,t===Ta||t===Ea?(t=Ma(),Xl=3):t===L?(t=Ma(),Xl=4):Xl=t===sc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Zl=t,Jl===null&&(nu=1,tc(e,bi(t,e.current)))}function Iu(){var e=io.current;return e===null?!0:(Yl&4194048)===Yl?ao===null:(Yl&62914560)===Yl||Yl&536870912?e===ao:!1}function Lu(){var e=P.H;return P.H=Us,e===null?Us:e}function Ru(){var e=P.A;return P.A=Wl,e}function zu(){nu=4,Ql||(Yl&4194048)!==Yl&&io.current!==null||($l=!0),!(ru&134217727)&&!(iu&134217727)||ql===null||ju(ql,Yl,ou,!1)}function Bu(e,t,n){var r=Kl;Kl|=2;var i=Lu(),a=Ru();(ql!==e||Yl!==t)&&(mu=null,Pu(e,t)),t=!1;var o=nu;a:do try{if(Xl!==0&&Jl!==null){var s=Jl,c=Zl;switch(Xl){case 8:Nu(),o=6;break a;case 3:case 2:case 9:case 6:io.current===null&&(t=!0);var l=Xl;if(Xl=0,Zl=null,Ku(e,s,c,l),n&&$l){o=0;break a}break;default:l=Xl,Xl=0,Zl=null,Ku(e,s,c,l)}}Vu(),o=nu;break}catch(t){Fu(e,t)}while(1);return t&&e.shellSuspendCounter++,Xi=Yi=null,Kl=r,P.H=i,P.A=a,Jl===null&&(ql=null,Yl=0,ni()),o}function Vu(){for(;Jl!==null;)Wu(Jl)}function Hu(e,t){var n=Kl;Kl|=2;var r=Lu(),a=Ru();ql!==e||Yl!==t?(mu=null,pu=De()+500,Pu(e,t)):$l=Je(e,t);a:do try{if(Xl!==0&&Jl!==null){t=Jl;var o=Zl;b:switch(Xl){case 1:Xl=0,Zl=null,Ku(e,t,o,1);break;case 2:case 9:if(Oa(o)){Xl=0,Zl=null,Gu(t);break}t=function(){Xl!==2&&Xl!==9||ql!==e||(Xl=7),gd(e)},o.then(t,t);break a;case 3:Xl=7;break a;case 4:Xl=5;break a;case 7:Oa(o)?(Xl=0,Zl=null,Gu(t)):(Xl=0,Zl=null,Ku(e,t,o,7));break;case 5:var s=null;switch(Jl.tag){case 26:s=Jl.memoizedState;case 5:case 27:var c=Jl;if(s?ap(s):c.stateNode.complete){Xl=0,Zl=null;var l=c.sibling;if(l!==null)Jl=l;else{var u=c.return;u===null?Jl=null:(Jl=u,qu(u))}break b}}Xl=0,Zl=null,Ku(e,t,o,5);break;case 6:Xl=0,Zl=null,Ku(e,t,o,6);break;case 8:Nu(),nu=6;break a;default:throw Error(i(462))}}Uu();break}catch(t){Fu(e,t)}while(1);return Xi=Yi=null,P.H=r,P.A=a,Kl=n,Jl===null?(ql=null,Yl=0,ni(),nu):0}function Uu(){for(;Jl!==null&&!Te();)Wu(Jl)}function Wu(e){var t=Lc(e.alternate,e,tu);e.memoizedProps=e.pendingProps,t===null?qu(e):Jl=t}function Gu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xc(n,t,t.pendingProps,t.type,void 0,Yl);break;case 11:t=xc(n,t,t.pendingProps,t.type.render,t.ref,Yl);break;case 5:No(t);default:Kc(n,t),t=Jl=pi(t,tu),t=Lc(n,t,tu)}e.memoizedProps=e.pendingProps,t===null?qu(e):Jl=t}function Ku(e,t,n,r){Xi=Yi=null,No(t),Pa=null,Fa=0;var i=t.return;try{if(oc(e,i,t,n,Yl)){nu=1,tc(e,bi(n,e.current)),Jl=null;return}}catch(t){if(i!==null)throw Jl=i,t;nu=1,tc(e,bi(n,e.current)),Jl=null;return}t.flags&32768?(Li||r===1?e=!0:$l||Yl&536870912?e=!1:(Ql=e=!0,(r===2||r===9||r===3||r===6)&&(r=io.current,r!==null&&r.tag===13&&(r.flags|=16384))),Ju(t,e)):qu(t)}function qu(e){var t=e;do{if(t.flags&32768){Ju(t,Ql);return}e=t.return;var n=Wc(t.alternate,t,tu);if(n!==null){Jl=n;return}if(t=t.sibling,t!==null){Jl=t;return}Jl=t=e}while(t!==null);nu===0&&(nu=5)}function Ju(e,t){do{var n=Gc(e.alternate,e);if(n!==null){n.flags&=32767,Jl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Jl=e;return}Jl=e=n}while(e!==null);nu=6,Jl=null}function Yu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do ed();while(gu!==0);if(Kl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=ti,$e(e,n,o,s,c,l),e===ql&&(Jl=ql=null,Yl=0),vu=t,_u=e,yu=n,bu=o,xu=a,Su=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,ld(je,function(){return td(),null})):(e.callbackNode=null,e.callbackPriority=0),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,a=F.p,F.p=2,s=Kl,Kl|=4;try{dl(e,t,n)}finally{Kl=s,F.p=a,P.T=r}}gu=1,Xu(),Zu(),Qu()}}function Xu(){if(gu===1){gu=0;var e=_u,t=vu,n=!!(t.flags&13878);if(t.subtreeFlags&13878||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Kl;Kl|=4;try{wl(t,e);var a=ef,o=kr(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&Or(s.ownerDocument.documentElement,s)){if(c!==null&&Ar(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Sp=!!$d,ef=$d=null}finally{Kl=i,F.p=r,P.T=n}}e.current=t,gu=2}}function Zu(){if(gu===2){gu=0;var e=_u,t=vu,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Kl;Kl|=4;try{fl(e,t.alternate,t)}finally{Kl=i,F.p=r,P.T=n}}gu=3}}function Qu(){if(gu===4||gu===3){gu=0,Ee();var e=_u,t=vu,n=yu,r=Su;t.subtreeFlags&10256||t.flags&10256?gu=5:(gu=0,vu=_u=null,$u(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(hu=null),it(n),t=t.stateNode,Le&&typeof Le.onCommitFiberRoot==`function`)try{Le.onCommitFiberRoot(Ie,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=P.T,i=F.p,F.p=2,P.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{P.T=t,F.p=i}}yu&3&&ed(),gd(e),i=e.pendingLanes,n&261930&&i&42?e===wu?Cu++:(Cu=0,wu=e):Cu=0,_d(0,!1)}}function $u(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,fa(t)))}function ed(){return Xu(),Zu(),Qu(),td()}function td(){if(gu!==5)return!1;var e=_u,t=bu;bu=0;var n=it(yu),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=xu,xu=null;var o=_u,s=yu;if(gu=0,vu=_u=null,yu=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Vl(o.current),Nl(o,o.current,s,n),Kl=c,_d(0,!1),Le&&typeof Le.onPostCommitFiberRoot==`function`)try{Le.onPostCommitFiberRoot(Ie,o)}catch{}return!0}finally{F.p=a,P.T=r,$u(e,t)}}function nd(e,t,n){t=bi(n,t),t=rc(e.stateNode,t,2),e=Ka(e,t,2),e!==null&&(Qe(e,2),gd(e))}function rd(e,t,n){if(e.tag===3)nd(e,e,n);else for(;t!==null;){if(t.tag===3){nd(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(hu===null||!hu.has(r))){e=bi(n,e),n=ic(2),r=Ka(t,n,2),r!==null&&(ac(n,r,t,e),Qe(r,2),gd(r));break}}t=t.return}}function id(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gl;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)||(eu=!0,i.add(n),e=ad.bind(null,e,t,n),t.then(e,e))}function ad(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(Yl&n)===n&&(nu===4||nu===3&&(Yl&62914560)===Yl&&300>De()-du?!(Kl&2)&&Pu(e,0):au|=n,su===Yl&&(su=0)),gd(e)}function od(e,t){t===0&&(t=Xe()),e=ai(e,t),e!==null&&(Qe(e,t),gd(e))}function sd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),od(e,n)}function cd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),od(e,n)}function ld(e,t){return Ce(e,t)}var ud=null,dd=null,fd=!1,pd=!1,md=!1,hd=0;function gd(e){e!==dd&&e.next===null&&(dd===null?ud=dd=e:dd=dd.next=e),pd=!0,fd||(fd=!0,Cd())}function _d(e,t){if(!md&&pd){md=!0;do for(var n=!1,r=ud;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Sd(r,a))}else a=Yl,a=qe(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Je(r,a)||(n=!0,Sd(r,a))}r=r.next}while(n);md=!1}}function vd(){yd()}function yd(){pd=fd=!1;var e=0;hd!==0&&sf()&&(e=hd);for(var t=De(),n=null,r=ud;r!==null;){var i=r.next,a=bd(r,t);a===0?(r.next=null,n===null?ud=i:n.next=i,i===null&&(dd=n)):(n=r,(e!==0||a&3)&&(pd=!0)),r=i}gu!==0&&gu!==5||_d(e,!1),hd!==0&&(hd=0)}function bd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ye(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ql,n=Yl,n=qe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Xl===2||Xl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&we(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Je(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&we(r),it(n)){case 2:case 8:n=Ae;break;case 32:n=je;break;case 268435456:n=Ne;break;default:n=je}return r=xd.bind(null,e),n=Ce(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&we(r),e.callbackPriority=2,e.callbackNode=null,2}function xd(e,t){if(gu!==0&&gu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ed()&&e.callbackNode!==n)return null;var r=Yl;return r=qe(e,e===ql?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ou(e,r,t),bd(e,De()),e.callbackNode!=null&&e.callbackNode===n?xd.bind(null,e):null)}function Sd(e,t){if(ed())return null;Ou(e,t,!0)}function Cd(){df(function(){Kl&6?Ce(ke,vd):yd()})}function wd(){if(hd===0){var e=ha;e===0&&(e=Ue,Ue<<=1,!(Ue&261888)&&(Ue=256)),hd=e}return hd}function Td(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:en(``+e)}function Ed(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 Dd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Td((i[lt]||null).action),o=r.submitter;o&&(t=(t=o[lt]||null)?Td(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Cn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(hd!==0){var e=o?Ed(i,o):new FormData(i);ks(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Ed(i,o):new FormData(i),ks(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Od=0;Od<Xr.length;Od++){var kd=Xr[Od];Zr(kd.toLowerCase(),`on`+(kd[0].toUpperCase()+kd.slice(1)))}Zr(Hr,`onAnimationEnd`),Zr(Ur,`onAnimationIteration`),Zr(Wr,`onAnimationStart`),Zr(`dblclick`,`onDoubleClick`),Zr(`focusin`,`onFocus`),Zr(`focusout`,`onBlur`),Zr(Gr,`onTransitionRun`),Zr(Kr,`onTransitionStart`),Zr(qr,`onTransitionCancel`),Zr(Jr,`onTransitionEnd`),Tt(`onMouseEnter`,[`mouseout`,`mouseover`]),Tt(`onMouseLeave`,[`mouseout`,`mouseover`]),Tt(`onPointerEnter`,[`pointerout`,`pointerover`]),Tt(`onPointerLeave`,[`pointerout`,`pointerover`]),wt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),wt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),wt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),wt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),wt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Ad=`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(` `),jd=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Ad));function Md(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Qr(e)}i.currentTarget=null,a=c}}}}function Nd(e,t){var n=t[dt];n===void 0&&(n=t[dt]=new Set);var r=e+`__bubble`;n.has(r)||(Ld(t,e,2,!1),n.add(r))}function Pd(e,t,n){var r=0;t&&(r|=4),Ld(n,e,r,t)}var Fd=`_reactListening`+Math.random().toString(36).slice(2);function Id(e){if(!e[Fd]){e[Fd]=!0,St.forEach(function(t){t!==`selectionchange`&&(jd.has(t)||Pd(t,!1,e),Pd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Fd]||(t[Fd]=!0,Pd(`selectionchange`,!1,t))}}function Ld(e,t,n,r){switch(kp(t)){case 2:var i=Cp;break;case 8:i=wp;break;default:i=Tp}n=i.bind(null,t,n,e),i=void 0,!fn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Rd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=_t(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}ln(function(){var r=a,i=rn(n),s=[];a:{var c=Yr.get(e);if(c!==void 0){var l=Cn,u=e;switch(e){case`keypress`:if(vn(n)===0)break a;case`keydown`:case`keyup`:l=Vn;break;case`focusin`:u=`focus`,l=Mn;break;case`focusout`:u=`blur`,l=Mn;break;case`beforeblur`:case`afterblur`:l=Mn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=An;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=jn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Un;break;case Hr:case Ur:case Wr:l=Nn;break;case Jr:l=Wn;break;case`scroll`:case`scrollend`:l=Tn;break;case`wheel`:l=Gn;break;case`copy`:case`cut`:case`paste`:l=Pn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Hn;break;case`toggle`:case`beforetoggle`:l=Kn}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=un(m,p),g!=null&&d.push(zd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==nn&&(u=n.relatedTarget||n.fromElement)&&(_t(u)||u[ut]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?_t(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=An,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Hn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:yt(l),h=u==null?c:yt(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,_t(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Vd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Hd(s,c,l,d,!1),u!==null&&f!==null&&Hd(s,f,u,d,!0)}}a:{if(c=r?yt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=fr;else if(or(c)){if(pr)v=Sr;else{v=br;var y=yr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Zt(r.elementType)&&(v=fr):v=xr;if(v&&=v(e,r)){sr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Ut(c,`number`,c.value)}switch(y=r?yt(r):window,e){case`focusin`:(or(y)||y.contentEditable===`true`)&&(Mr=y,Nr=r,Pr=null);break;case`focusout`:Pr=Nr=Mr=null;break;case`mousedown`:Fr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Fr=!1,Ir(s,n,i);break;case`selectionchange`:if(jr)break;case`keydown`:case`keyup`:Ir(s,n,i)}var b;if(Jn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else nr?er(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Zn&&n.locale!==`ko`&&(nr||x!==`onCompositionStart`?x===`onCompositionEnd`&&nr&&(b=_n()):(mn=i,hn=`value`in mn?mn.value:mn.textContent,nr=!0)),y=Bd(r,x),0<y.length&&(x=new Fn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=tr(n),b!==null&&(x.data=b)))),(b=Xn?rr(e,n):ir(e,n))&&(x=Bd(r,`onBeforeInput`),0<x.length&&(y=new Fn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),Dd(s,e,r,n,i)}Md(s,t)})}function zd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Bd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=un(e,n),i!=null&&r.unshift(zd(e,i,a)),i=un(e,t),i!=null&&r.push(zd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Vd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Hd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=un(n,a),l!=null&&o.unshift(zd(n,l,c))):i||(l=un(n,a),l!=null&&o.push(zd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ud=/\r\n?/g,Wd=/\u0000|\uFFFD/g;function Gd(e){return(typeof e==`string`?e:``+e).replace(Ud,`
10
- `).replace(Wd,``)}function Kd(e,t){return t=Gd(t),Gd(e)===t}function qd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&qt(e,``+r);break;case`className`:jt(e,`class`,r);break;case`tabIndex`:jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:jt(e,n,r);break;case`style`:Xt(e,r,o);break;case`data`:if(t!==`object`){jt(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=en(``+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}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&qd(e,t,`name`,a.name,a,null),qd(e,t,`formEncType`,a.formEncType,a,null),qd(e,t,`formMethod`,a.formMethod,a,null),qd(e,t,`formTarget`,a.formTarget,a,null)):(qd(e,t,`encType`,a.encType,a,null),qd(e,t,`method`,a.method,a,null),qd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=en(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`onScroll`:r!=null&&Nd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Nd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(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=en(``+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`:!0===r?e.setAttribute(n,``):!1!==r&&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`:Nd(`beforetoggle`,e),Nd(`toggle`,e),At(e,`popover`,r);break;case`xlinkActuate`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Mt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Mt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:At(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=Qt.get(n)||n,At(e,n,r))}}function Jd(e,t,n,r,a,o){switch(n){case`style`:Xt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?qt(e,r):(typeof r==`number`||typeof r==`bigint`)&&qt(e,``+r);break;case`onScroll`:r!=null&&Nd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Nd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=tn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Ct.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[lt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):At(e,n,r)}}}function Yd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Nd(`error`,e),Nd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:qd(e,t,o,s,n,null)}}a&&qd(e,t,`srcSet`,n.srcSet,n,null),r&&qd(e,t,`src`,n.src,n,null);return;case`input`:Nd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:qd(e,t,r,d,n,null)}}Ht(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Nd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:qd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Wt(e,!!r,n,!0):Wt(e,!!r,t,!1);return;case`textarea`:for(s in Nd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:qd(e,t,s,c,n,null)}Kt(e,r,a,o);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:qd(e,t,l,r,n,null)}return;case`dialog`:Nd(`beforetoggle`,e),Nd(`toggle`,e),Nd(`cancel`,e),Nd(`close`,e);break;case`iframe`:case`object`:Nd(`load`,e);break;case`video`:case`audio`:for(r=0;r<Ad.length;r++)Nd(Ad[r],e);break;case`image`:Nd(`error`,e),Nd(`load`,e);break;case`details`:Nd(`toggle`,e);break;case`embed`:case`source`:case`link`:Nd(`error`,e),Nd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:qd(e,t,u,r,n,null)}return;default:if(Zt(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Jd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&qd(e,t,c,r,n,null))}function Xd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||qd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&qd(e,t,p,m,r,f)}}Vt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||qd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&qd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Wt(e,!!n,n?[]:``,!1):Wt(e,!!n,t,!0)):Wt(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:qd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&qd(e,t,s,a,r,o)}Gt(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:qd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:qd(e,t,l,p,r,m)}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 g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&qd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:qd(e,t,u,p,r,m)}return;default:if(Zt(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Jd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Jd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&qd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||qd(e,t,f,p,r,m)}function Zd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Qd(){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],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Zd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Zd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(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 $d=null,ef=null;function tf(e){return e.nodeType===9?e:e.ownerDocument}function nf(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 rf(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 af(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 of=null;function sf(){var e=window.event;return e&&e.type===`popstate`?e!==of&&(of=e,!0):(of=null,!1)}var cf=typeof setTimeout==`function`?setTimeout:void 0,lf=typeof clearTimeout==`function`?clearTimeout:void 0,uf=typeof Promise==`function`?Promise:void 0,df=typeof queueMicrotask==`function`?queueMicrotask:uf===void 0?cf:function(e){return uf.resolve(null).then(e).catch(ff)};function ff(e){setTimeout(function(){throw e})}function pf(e){return e===`head`}function mf(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),Kp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Of(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Of(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ht]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Of(e.ownerDocument.body)}n=i}while(n);Kp(t)}function hf(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 gf(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`:gf(n),gt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function _f(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(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[ht])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==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(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Cf(e.nextSibling),e===null)break}return null}function vf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Cf(e.nextSibling),e===null))return null;return e}function yf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Cf(e.nextSibling),e===null))return null;return e}function bf(e){return e.data===`$?`||e.data===`$~`}function xf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function Sf(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 Cf(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 wf=null;function Tf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Cf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Ef(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 Df(e,t,n){switch(t=tf(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Of(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);gt(e)}var kf=new Map,Af=new Set;function jf(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Mf=F.d;F.d={f:Nf,r:Pf,D:Lf,C:Rf,L:zf,m:Bf,X:Hf,S:Vf,M:Uf};function Nf(){var e=Mf.f(),t=Mu();return e||t}function Pf(e){var t=vt(e);t!==null&&t.tag===5&&t.type===`form`?js(t):Mf.r(e)}var Ff=typeof document>`u`?null:document;function If(e,t,n){var r=Ff;if(r&&typeof t==`string`&&t){var i=Bt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Af.has(i)||(Af.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Yd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Lf(e){Mf.D(e),If(`dns-prefetch`,e,null)}function Rf(e,t){Mf.C(e,t),If(`preconnect`,e,t)}function zf(e,t,n){Mf.L(e,t,n);var r=Ff;if(r&&e&&t){var i=`link[rel="preload"][as="`+Bt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Bt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Bt(n.imageSizes)+`"]`)):i+=`[href="`+Bt(e)+`"]`;var a=i;switch(t){case`style`:a=Gf(e);break;case`script`:a=Yf(e)}kf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),kf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Kf(a))||t===`script`&&r.querySelector(Xf(a))||(t=r.createElement(`link`),Yd(t,`link`,e),xt(t),r.head.appendChild(t)))}}function Bf(e,t){Mf.m(e,t);var n=Ff;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Bt(r)+`"][href="`+Bt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Yf(e)}if(!kf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),kf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Xf(a)))return}r=n.createElement(`link`),Yd(r,`link`,e),xt(r),n.head.appendChild(r)}}}function Vf(e,t,n){Mf.S(e,t,n);var r=Ff;if(r&&e){var i=bt(r).hoistableStyles,a=Gf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Kf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=kf.get(a))&&$f(e,n);var c=o=r.createElement(`link`);xt(c),Yd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Hf(e,t){Mf.X(e,t);var n=Ff;if(n&&e){var r=bt(n).hoistableScripts,i=Yf(e),a=r.get(i);a||(a=n.querySelector(Xf(i)),a||(e=m({src:e,async:!0},t),(t=kf.get(i))&&ep(e,t),a=n.createElement(`script`),xt(a),Yd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t){Mf.M(e,t);var n=Ff;if(n&&e){var r=bt(n).hoistableScripts,i=Yf(e),a=r.get(i);a||(a=n.querySelector(Xf(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=kf.get(i))&&ep(e,t),a=n.createElement(`script`),xt(a),Yd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Wf(e,t,n,r){var a=(a=le.current)?jf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Gf(n.href),n=bt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Gf(n.href);var o=bt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Kf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),kf.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},kf.set(e,n),o||Jf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Yf(n),n=bt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Gf(e){return`href="`+Bt(e)+`"`}function Kf(e){return`link[rel="stylesheet"][`+e+`]`}function qf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Jf(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}),Yd(t,`link`,n),xt(t),e.head.appendChild(t))}function Yf(e){return`[src="`+Bt(e)+`"]`}function Xf(e){return`script[async]`+e}function Zf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Bt(n.href)+`"]`);if(r)return t.instance=r,xt(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),xt(r),Yd(r,`style`,a),Qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Gf(n.href);var o=e.querySelector(Kf(a));if(o)return t.state.loading|=4,t.instance=o,xt(o),o;r=qf(n),(a=kf.get(a))&&$f(r,a),o=(e.ownerDocument||e).createElement(`link`),xt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Yd(o,`link`,r),t.state.loading|=4,Qf(o,n.precedence,e),t.instance=o;case`script`:return o=Yf(n.src),(a=e.querySelector(Xf(o)))?(t.instance=a,xt(a),a):(r=n,(a=kf.get(o))&&(r=m({},n),ep(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),xt(a),Yd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Qf(r,n.precedence,e));return t.instance}function Qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function $f(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function ep(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var tp=null;function np(e,t,n){if(tp===null){var r=new Map,i=tp=new Map;i.set(n,r)}else i=tp,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 a=n[i];if(!(a[ht]||a[ct]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function rp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function ip(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 ap(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function op(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Gf(r.href),a=t.querySelector(Kf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=lp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,xt(a);return}a=t.ownerDocument||t,r=qf(r),(i=kf.get(i))&&$f(r,i),a=a.createElement(`link`),xt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Yd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=lp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var sp=0;function cp(e,t){return e.stylesheets&&e.count===0&&dp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&dp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&sp===0&&(sp=62500*Qd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&dp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>sp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function lp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)dp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var up=null;function dp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,up=new Map,t.forEach(fp,e),up=null,lp.call(e))}function fp(e,t){if(!(t.state.loading&4)){var n=up.get(e);if(n)var r=n.get(null);else{n=new Map,up.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=lp.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var pp={$$typeof:C,Provider:null,Consumer:null,_currentValue:ne,_currentValue2:ne,_threadCount:0};function mp(e,t,n,r,i,a,o,s,c){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=Ze(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ze(0),this.hiddenUpdates=Ze(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function hp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new mp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ui(3,null,null,t),e.current=a,a.stateNode=e,t=da(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Ua(a),e}function gp(e){return e?(e=ci,e):ci}function _p(e,t,n,r,i,a){i=gp(i),r.context===null?r.context=i:r.pendingContext=i,r=Ga(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ka(e,r,t),n!==null&&(Du(n,e,t),qa(n,e,t))}function vp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function yp(e,t){vp(e,t),(e=e.alternate)&&vp(e,t)}function bp(e){if(e.tag===13||e.tag===31){var t=ai(e,67108864);t!==null&&Du(t,e,67108864),yp(e,67108864)}}function xp(e){if(e.tag===13||e.tag===31){var t=Tu();t=rt(t);var n=ai(e,t);n!==null&&Du(n,e,t),yp(e,t)}}var Sp=!0;function Cp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,Tp(e,t,n,r)}finally{F.p=a,P.T=i}}function wp(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,Tp(e,t,n,r)}finally{F.p=a,P.T=i}}function Tp(e,t,n,r){if(Sp){var i=Ep(r);if(i===null)Rd(e,t,r,Dp,n),Lp(e,r);else if(tee(i,e,t,n,r))r.stopPropagation();else if(Lp(e,r),t&4&&-1<eee.indexOf(e)){for(;i!==null;){var a=vt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ke(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-ze(o);s.entanglements[1]|=c,o&=~c}gd(a),!(Kl&6)&&(pu=De()+500,_d(0,!1))}}break;case 31:case 13:s=ai(a,2),s!==null&&Du(s,a,2),Mu(),yp(a,2)}if(a=Ep(r),a===null&&Rd(e,t,r,Dp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Rd(e,t,r,null,n)}}function Ep(e){return e=rn(e),Op(e)}var Dp=null;function Op(e){if(Dp=null,e=_t(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(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 Dp=e,null}function kp(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(Oe()){case ke:return 2;case Ae:return 8;case je:case Me:return 32;case Ne:return 268435456;default:return 32}default:return 32}}var Ap=!1,jp=null,Mp=null,Np=null,Pp=new Map,Fp=new Map,Ip=[],eee=`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 Lp(e,t){switch(e){case`focusin`:case`focusout`:jp=null;break;case`dragenter`:case`dragleave`:Mp=null;break;case`mouseover`:case`mouseout`:Np=null;break;case`pointerover`:case`pointerout`:Pp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Fp.delete(t.pointerId)}}function Rp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=vt(t),t!==null&&bp(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function tee(e,t,n,r,i){switch(t){case`focusin`:return jp=Rp(jp,e,t,n,r,i),!0;case`dragenter`:return Mp=Rp(Mp,e,t,n,r,i),!0;case`mouseover`:return Np=Rp(Np,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Pp.set(a,Rp(Pp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Fp.set(a,Rp(Fp.get(a)||null,e,t,n,r,i)),!0}return!1}function zp(e){var t=_t(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,ot(e.priority,function(){xp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,ot(e.priority,function(){xp(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 Bp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ep(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);nn=r,n.target.dispatchEvent(r),nn=null}else return t=vt(n),t!==null&&bp(t),e.blockedOn=n,!1;t.shift()}return!0}function Vp(e,t,n){Bp(e)&&n.delete(t)}function Hp(){Ap=!1,jp!==null&&Bp(jp)&&(jp=null),Mp!==null&&Bp(Mp)&&(Mp=null),Np!==null&&Bp(Np)&&(Np=null),Pp.forEach(Vp),Fp.forEach(Vp)}function Up(e,n){e.blockedOn===n&&(e.blockedOn=null,Ap||(Ap=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hp)))}var Wp=null;function Gp(e){Wp!==e&&(Wp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Wp===e&&(Wp=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(Op(r||n)===null)continue;break}var a=vt(n);a!==null&&(e.splice(t,3),t-=3,ks(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Kp(e){function t(t){return Up(t,e)}jp!==null&&Up(jp,e),Mp!==null&&Up(Mp,e),Np!==null&&Up(Np,e),Pp.forEach(t),Fp.forEach(t);for(var n=0;n<Ip.length;n++){var r=Ip[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ip.length&&(n=Ip[0],n.blockedOn===null);)zp(n),n.blockedOn===null&&Ip.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[lt]||null;if(typeof a==`function`)o||Gp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[lt]||null)s=o.formAction;else if(Op(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Gp(n)}}}function qp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.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 Jp(e){this._internalRoot=e}Yp.prototype.render=Jp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;_p(n,Tu(),e,t,null,null)},Yp.prototype.unmount=Jp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_p(e.current,2,null,e,null,null),Mu(),t[ut]=null}};function Yp(e){this._internalRoot=e}Yp.prototype.unstable_scheduleHydration=function(e){if(e){var t=at();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ip.length&&t!==0&&t<Ip[n].priority;n++);Ip.splice(n,0,e),n===0&&zp(e)}};var Xp=n.version;if(Xp!==`19.2.8`)throw Error(i(527,Xp,`19.2.8`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Zp={bundleType:0,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.2.8`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Qp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Qp.isDisabled&&Qp.supportsFiber)try{Ie=Qp.inject(Zp),Le=Qp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Qs,s=$s,c=ec;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=hp(e,1,!1,null,null,n,r,null,o,s,c,qp),e[ut]=t.current,Id(e),new Jp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,y=/^[\\/]{2}/;function b(e,t){return t+e.replace(/\\/g,`/`)}var x=`popstate`;function S(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function C(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return O(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:k(t)}return j(t,n,null,e)}function w(e,t){if(e===!1||e==null)throw Error(t)}function T(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function E(){return Math.random().toString(36).substring(2,10)}function D(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function O(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?A(t):t,state:n,key:t&&t.key||r||E(),mask:i}}function k({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function A(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function j(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u()+1;let d=D(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=S(e)?e:O(h.location,e,t);n&&n(r,e),l=u();let i=D(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return M(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(x,d),c=e,()=>{i.removeEventListener(x,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function M(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),w(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:k(t);return i=i.replace(/ $/,`%20`),!n&&y.test(i)&&(i=r+i),new URL(i,r)}var N=l(d(),1),ee=class{#e=new Map;constructor(e){if(e)for(let[t,n]of e)this.set(t,n)}get(e){if(this.#e.has(e))return this.#e.get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw Error(`No value found for context`)}set(e,t){this.#e.set(e,t)}},te=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`children`]);function P(e){return te.has(e)}var F=new Set([`lazy`,`caseSensitive`,`path`,`id`,`index`,`middleware`,`children`]);function ne(e){return F.has(e)}function re(e){return e.index===!0}function ie(e){let t={};return e.Component&&Object.assign(t,{element:N.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:N.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:N.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}function ae(e,t=ie,n=[],r={},i=!1){return e.map((e,a)=>{let o=[...n,String(a)],s=typeof e.id==`string`?e.id:o.join(`-`);if(w(e.index!==!0||!e.children,`Cannot specify children on an index route`),w(i||!r[s],`Found a route id collision on id "${s}". Route id's must be globally unique within Data Router usages`),re(e)){let n={...e,id:s};return r[s]=I(n,t(n)),n}{let n={...e,id:s,children:void 0};return r[s]=I(n,t(n)),e.children&&(n.children=ae(e.children,t,o,r,i)),n}})}function I(e,t){return Object.assign(e,{...t,...typeof t.lazy==`object`&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function oe(e,t,n=`/`){return se(e,t,n,!1)}function se(e,t,n,r,i){let a=ke((typeof t==`string`?A(t):t).pathname||`/`,n);if(a==null)return null;let o=i??le(e),s=null,c=Oe(a);for(let e=0;s==null&&e<o.length;++e)s=we(o[e],c,r);return s}function ce(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,loaderData:t[n.id],handle:n.handle}}function le(e){let t=ue(e);return fe(t),t}function ue(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;w(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=ze([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(w(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),ue(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Se(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=De(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of de(e.path))a(e,t,!0,n)}),t}function de(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=de(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function fe(e){e.sort((e,t)=>e.score===t.score?Ce(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var pe=/^:[\w-]+$/,me=/^:[\w-]+/,he=3.5,ge=3,_e=2,ve=1,ye=10,be=-2,xe=e=>e===`*`;function Se(e,t){let n=e.split(`/`),r=n.length;return n.some(xe)&&(r+=be),t&&(r+=_e),n.filter(e=>!xe(e)).reduce((e,t)=>e+(pe.test(t)?ge:me.test(t)?he:t===``?ve:ye),r)}function Ce(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function we(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?Ee(u,l,s.matcher,s.compiledParams):Te(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Te({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:ze([a,d.pathname]),pathnameBase:Ve(ze([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=ze([a,d.pathnameBase]))}return o}function Te(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=De(e.path,e.caseSensitive,e.end);return Ee(e,t,n,r)}function Ee(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return e[t]=n&&!i?void 0:(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function De(e,t=!1,n=!0){T(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(?=\/|$|\()/g,`(?:/$1)?`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function Oe(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return T(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function ke(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function Ae({basename:e,pathname:t}){return t===`/`?e:ze([e,t])}var je=e=>v.test(e);function Me(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?A(e):e,a;return n?(n=Re(n),a=n.startsWith(`/`)?Ne(n.substring(1),`/`):Ne(n,t)):a=t,{pathname:a,search:He(r),hash:Ue(i)}}function Ne(e,t){let n=Be(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function Pe(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Fe(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Ie(e){let t=Fe(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Le(e,t,n,r=!1){let i;typeof e==`string`?i=A(e):(i={...e},w(!i.pathname||!i.pathname.includes(`?`),Pe(`?`,`pathname`,`search`,i)),w(!i.pathname||!i.pathname.includes(`#`),Pe(`#`,`pathname`,`hash`,i)),w(!i.search||!i.search.includes(`#`),Pe(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=Me(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Re=e=>e.replace(/[\\/]{2,}/g,`/`),ze=e=>Re(e.join(`/`)),Be=e=>e.replace(/\/+$/,``),Ve=e=>Be(e).replace(/^\/*/,`/`),He=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,Ue=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,We=[`EvalError`,`RangeError`,`ReferenceError`,`SyntaxError`,`TypeError`,`URIError`],Ge=class{status;statusText;data;error;internal;constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Ke(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function qe(e){return ze(e.map(e=>e.route.path).filter(Boolean))||`/`}function Je(e,t){let n=new URL(typeof e==`string`||e instanceof URL?e:e.url),r=typeof t==`string`?A(t):t;if(n.pathname=r.pathname||`/`,r.search){let e=new URLSearchParams(r.search),t=e.getAll(`index`);e.delete(`index`);for(let n of t.filter(Boolean))e.append(`index`,n);let i=e.toString();n.search=i?`?${i}`:``}else n.search=``;return n.hash=r.hash||``,n}var Ye=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Xe(e,t){let n=e;if(typeof n!=`string`||!v.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Ye)try{let e=new URL(window.location.href),r=y.test(n)?new URL(b(n,e.protocol)):new URL(n),a=ke(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{T(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}var Ze=Symbol(`Uninstrumented`),Qe=new WeakMap;function $e(e,t){let n={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){e.lazy!=null&&n.lazy.push(e.lazy),e[`lazy.loader`]!=null&&n[`lazy.loader`].push(e[`lazy.loader`]),e[`lazy.action`]!=null&&n[`lazy.action`].push(e[`lazy.action`]),e[`lazy.middleware`]!=null&&n[`lazy.middleware`].push(e[`lazy.middleware`]),e.middleware!=null&&n.middleware.push(e.middleware),e.loader!=null&&n.loader.push(e.loader),e.action!=null&&n.action.push(e.action)}}));let r={};if(typeof t.lazy==`function`&&n.lazy.length>0){let e=t.lazy;r.lazy=async(...t)=>at(await ot(n.lazy,void 0,()=>e(...t),st))}if(typeof t.lazy==`object`){let e=t.lazy;if(typeof e.middleware==`function`&&n[`lazy.middleware`].length>0){let t=e.middleware;r.lazy=Object.assign(r.lazy||{},{middleware:async(...e)=>at(await ot(n[`lazy.middleware`],void 0,()=>t(...e),st))})}if(typeof e.loader==`function`&&n[`lazy.loader`].length>0){let t=e.loader;r.lazy=Object.assign(r.lazy||{},{loader:async(...e)=>at(await ot(n[`lazy.loader`],void 0,()=>t(...e),st))})}if(typeof e.action==`function`&&n[`lazy.action`].length>0){let t=e.action;r.lazy=Object.assign(r.lazy||{},{action:async(...e)=>at(await ot(n[`lazy.action`],void 0,()=>t(...e),st))})}}if(typeof t.loader==`function`&&n.loader.length>0){let e=tt(t.loader),i=async(...t)=>at(await ot(n.loader,ct(t[0]),()=>e(...t),st));e.hydrate===!0&&(i.hydrate=!0),nt(i,e),r.loader=i}if(typeof t.action==`function`&&n.action.length>0){let e=tt(t.action),i=async(...t)=>at(await ot(n.action,ct(t[0]),()=>e(...t),st));nt(i,e),r.action=i}return t.middleware&&t.middleware.length>0&&n.middleware.length>0&&(r.middleware=t.middleware.map(e=>{let t=tt(e),r=async(...e)=>at(await ot(n.middleware,ct(e[0]),()=>t(...e),st));return nt(r,t),r})),r}function et(e,t){let n={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){e.navigate!=null&&n.navigate.push(e.navigate),e.fetch!=null&&n.fetch.push(e.fetch)}})),n.navigate.length>0){let t=tt(e.navigate),r=async(...r)=>{let[i,a]=r,o,s={to:typeof i==`number`||typeof i==`string`?i:i?k(i):`.`,...lt(e,a??{})};return at(await ot(n.navigate,s,async()=>{if(typeof i==`number`)return await t(...r);let n=rt(e,e=>{o=e});try{return await t(...r)}finally{n()}},e=>({...st(e),meta:o})))};nt(r,t),e.navigate=r}if(n.fetch.length>0){let t=tt(e.fetch),r=async(...r)=>{let[i,a,o,s]=r,c;return at(await ot(n.fetch,{href:o??`.`,fetcherKey:i,...lt(e,s??{})},async()=>{let n=rt(e,e=>{c=e});try{return await t(...r)}finally{n()}},e=>({...st(e),meta:c})))};nt(r,t),e.fetch=r}return e}function tt(e){return e[Ze]??e}function nt(e,t){e[Ze]=t}function rt(e,t){return Qe.set(e,t),()=>{Qe.get(e)===t&&Qe.delete(e)}}function it(e){let t=Qe.get(e);return Qe.delete(e),t}function at(e){if(e.type===`error`)throw e.value;return e.value}async function ot(e,t,n,r,i={result:null,innerResult:null},a=e.length-1){let o=e[a];if(o){let s,c=async()=>(s?console.error(`You cannot call instrumented handlers more than once`):s=ot(e,t,n,r,i,a-1),await s,w(i.innerResult,`Expected an inner result`),i.innerResult);try{await o(c,t)}catch(e){console.error(`An instrumentation function threw an error:`,e)}s||await c(),await s}else{try{i.result={type:`success`,value:await n()}}catch(e){i.result={type:`error`,value:e}}i.innerResult=r(i.result,t)}return i.result?i.result:(i.result={type:`error`,value:Error(`No result assigned in instrumentation chain.`)},i.innerResult=r(i.result,t),i.result)}function st(e){return e.type===`error`&&e.value instanceof Error?{status:`error`,error:e.value}:{status:`success`,error:void 0}}function ct(e){let{request:t,context:n,params:r}=e;return{...e,request:ut(t),params:{...r},context:dt(n)}}function lt(e,t){return{currentUrl:k(e.state.location),...`formMethod`in t?{formMethod:t.formMethod}:{},...`formEncType`in t?{formEncType:t.formEncType}:{},...`formData`in t?{formData:t.formData}:{},...`body`in t?{body:t.body}:{}}}function ut(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function dt(e){return{get:t=>e.get(t)}}var ft=[`POST`,`PUT`,`PATCH`,`DELETE`],pt=new Set(ft),mt=[`GET`,...ft],ht=new Set(mt),gt=new Set([301,302,303,307,308]),_t=new Set([307,308]),vt={state:`idle`,location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},yt={state:`idle`,data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},bt={state:`unblocked`,proceed:void 0,reset:void 0,location:void 0},xt=`remix-router-transitions`,St=Symbol(`ResetLoaderData`),Ct=class{#e;#t;#n;#r;constructor(e){this.#e=e,this.#t=le(e)}get stableRoutes(){return this.#e}get activeRoutes(){return this.#n??this.#e}get branches(){return this.#r??this.#t}get hasHMRRoutes(){return this.#n!=null}setRoutes(e){this.#e=e,this.#t=le(e)}setHmrRoutes(e){this.#n=e,this.#r=le(e)}commitHmrRoutes(){this.#n&&(this.#e=this.#n,this.#t=this.#r,this.#n=void 0,this.#r=void 0)}};function wt(e){let t=e.window?e.window:typeof window<`u`?window:void 0,n=t!==void 0&&t.document!==void 0&&t.document.createElement!==void 0;w(e.routes.length>0,`You must provide a non-empty routes array to createRouter`);let r=e.hydrationRouteProperties||[],i=e.mapRouteProperties,a=i||(()=>({}));if(e.instrumentations){let t=e.instrumentations;a=e=>({...i?.(e),...$e(t.map(e=>e.route).filter(Boolean),e)})}let o={},s=new Ct(ae(e.routes,a,void 0,o)),c=e.basename||`/`;c.startsWith(`/`)||(c=`/${c}`);let l=e.dataStrategy||Vt,u={...e.future},d=null,f=new Set,p=null,m=null,h=null,g=null,_=e.hydrationData!=null,v=se(s.activeRoutes,e.history.location,c,!1,s.branches),y=!1,b=null,x,S;if(v==null&&!e.patchRoutesOnNavigation){let t=fn(404,{pathname:e.history.location.pathname}),{matches:n,route:r}=dn(s.activeRoutes);x=!0,S=!x,v=n,b={[r.id]:t}}else if(v&&!e.hydrationData&&ct(v,s.activeRoutes,e.history.location.pathname).active&&(v=null),!v){x=!1,S=!x,v=[];let t=ct(null,s.activeRoutes,e.history.location.pathname);t.active&&t.matches&&(y=!0,v=t.matches)}else if(v.some(e=>e.route.lazy))x=!1,S=!x;else if(!v.some(e=>kt(e.route)))x=!0,S=!x;else{let t=e.hydrationData?e.hydrationData.loaderData:null,n=e.hydrationData?e.hydrationData.errors:null,r=v;if(n){let e=v.findIndex(e=>n[e.route.id]!==void 0);r=r.slice(0,e+1)}S=!1,x=!0,r.forEach(e=>{let r=At(e.route,t,n);S||=r.renderFallback,x&&=!r.shouldLoad})}let C,E={historyAction:e.history.action,location:e.history.location,matches:v,initialized:x,renderFallback:S,navigation:vt,restoreScrollPosition:e.hydrationData==null&&null,preventScrollReset:!1,revalidation:`idle`,loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||b,fetchers:new Map,blockers:new Map},D=`POP`,k=null,j=!1,N,te=!1,P=new Map,F=null,ne=!1,re=!1,ie=new Set,I=new Map,oe=0,le=-1,ue=new Map,de=new Set,fe=new Map,pe=new Map,me=new Set,he=new Map,ge,_e=null;function ve(){if(d=e.history.listen(({action:t,location:n,delta:r})=>{if(ge){ge(),ge=void 0;return}T(he.size===0||r!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let i=tt({currentLocation:E.location,nextLocation:n,historyAction:t});if(i&&r!=null){let t=new Promise(e=>{ge=e});e.history.go(r*-1),Qe(i,{state:`blocked`,location:n,proceed(){Qe(i,{state:`proceeding`,proceed:void 0,reset:void 0,location:n}),t.then(()=>e.history.go(r))},reset(){let e=new Map(E.blockers);e.set(i,bt),xe({blockers:e})}}),k?.resolve(),k=null;return}return Te(t,n)}),n){Ln(t,P);let e=()=>Rn(t,P);t.addEventListener(`pagehide`,e),F=()=>t.removeEventListener(`pagehide`,e)}return E.initialized||Te(`POP`,E.location,{initialHydration:!0}),C}function ye(){d&&d(),F&&F(),f.clear(),N&&N.abort(),E.fetchers.forEach((e,t)=>Ue(E.fetchers,t)),E.blockers.forEach((e,t)=>Ze(t))}function be(e){if(f.add(e),p){let{newErrors:t}=p;p=null,e(E,{deletedFetchers:[],newErrors:t,viewTransitionOpts:void 0,flushSync:!1})}return()=>f.delete(e)}function xe(e,t={}){e.matches&&=e.matches.map(e=>{let t=o[e.route.id],n=e.route;return n.element!==t.element||n.errorElement!==t.errorElement||n.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e}),E={...E,...e};let n=[],r=[];E.fetchers.forEach((e,t)=>{e.state===`idle`&&(me.has(t)?n.push(t):r.push(t))}),me.forEach(e=>{!E.fetchers.has(e)&&!I.has(e)&&n.push(e)}),f.size===0&&(p={newErrors:e.errors??null}),[...f].forEach(r=>r(E,{deletedFetchers:n,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:t.flushSync===!0})),n.forEach(e=>Ue(E.fetchers,e)),r.forEach(e=>E.fetchers.delete(e))}function Se(t,n,{flushSync:r}={}){let i=E.actionData!=null&&E.navigation.formMethod!=null&&Dn(E.navigation.formMethod)&&E.navigation.state===`loading`&&t.state?._isRedirect!==!0,a;a=n.actionData?Object.keys(n.actionData).length>0?n.actionData:null:i?E.actionData:null;let o=n.loaderData?cn(E.loaderData,n.loaderData,n.matches||[],n.errors):E.loaderData,c=E.blockers;c.size>0&&!ne&&(c=new Map(c),c.forEach((e,t)=>c.set(t,bt)));let l=!ne&&st(t,n.matches||E.matches),u=j===!0||E.navigation.formMethod!=null&&Dn(E.navigation.formMethod)&&t.state?._isRedirect!==!0;s.commitHmrRoutes(),ne||D===`POP`||(D===`PUSH`?e.history.push(t,t.state):D===`REPLACE`&&e.history.replace(t,t.state));let d;if(D===`POP`){let e=P.get(E.location.pathname);e&&e.has(t.pathname)?d={currentLocation:E.location,nextLocation:t}:P.has(t.pathname)&&(d={currentLocation:t,nextLocation:E.location})}else if(te){let e=P.get(E.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),P.set(E.location.pathname,e)),d={currentLocation:E.location,nextLocation:t}}xe({...n,actionData:a,loaderData:o,historyAction:D,location:t,initialized:!0,renderFallback:!1,navigation:vt,revalidation:`idle`,restoreScrollPosition:l,preventScrollReset:u,blockers:c},{viewTransitionOpts:d,flushSync:r===!0}),D=`POP`,j=!1,te=!1,ne=!1,re=!1,k?.resolve(),k=null,_e?.resolve(),_e=null}async function Ce(t,n){if(k?.resolve(),k=null,typeof t==`number`){k||=zn();let n=k.promise;return e.history.go(t),n}let r=it(C),{path:i,submission:a,error:o}=Dt(!1,Et(E.location,E.matches,c,t,n?.fromRouteId,n?.relative),n),s;n?.mask&&(s={pathname:``,search:``,hash:``,...typeof n.mask==`string`?A(n.mask):{...E.location.mask,...n.mask}});let l=E.location,u=O(l,i,n&&n.state,void 0,s);u={...u,...e.history.encodeLocation(u)};let d=n&&n.replace!=null?n.replace:void 0,f=`PUSH`;d===!0?f=`REPLACE`:d===!1||a!=null&&Dn(a.formMethod)&&a.formAction===E.location.pathname+E.location.search&&(f=`REPLACE`);let p=n&&`preventScrollReset`in n?n.preventScrollReset===!0:void 0,m=(n&&n.flushSync)===!0,h=tt({currentLocation:l,nextLocation:u,historyAction:f});if(h){Qe(h,{state:`blocked`,location:u,proceed(){Qe(h,{state:`proceeding`,proceed:void 0,reset:void 0,location:u}),Ce(t,n)},reset(){let e=new Map(E.blockers);e.set(h,bt),xe({blockers:e})}});return}await Te(f,u,{submission:a,pendingError:o,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.defaultShouldRevalidate,instrumentationNavigateMetaReceiver:r})}function we(){_e||=zn(),Re(),xe({revalidation:`loading`});let e=_e.promise;return E.navigation.state===`submitting`?e:E.navigation.state===`idle`?(Te(E.historyAction,E.location,{startUninterruptedRevalidation:!0}),e):(Te(D||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:te===!0}),e)}async function Te(t,n,r){N&&N.abort(),N=null,D=t,ne=(r&&r.startUninterruptedRevalidation)===!0,ot(E.location,E.matches),j=(r&&r.preventScrollReset)===!0,te=(r&&r.enableViewTransition)===!0;let i=s.activeRoutes,a=r?.initialHydration&&E.matches&&E.matches.length>0&&!y?E.matches:se(i,n,c,!1,s.branches),o=(r&&r.flushSync)===!0;if(a&&E.initialized&&!re&&hn(E.location,n)&&!(r&&r.submission&&Dn(r.submission.formMethod))){Se(n,{matches:a},{flushSync:o});return}let l=ct(a,i,n.pathname);if(l.active&&l.matches&&(a=l.matches),r?.instrumentationNavigateMetaReceiver){let t=An(e.history,n,a);r.instrumentationNavigateMetaReceiver(t)}if(!a){let{error:e,notFoundMatches:t,route:r}=nt(n.pathname);Se(n,{matches:t,loaderData:{},errors:{[r.id]:e}},{flushSync:o});return}let u=r&&r.overrideNavigation?{...r.overrideNavigation,matches:a,historyAction:t}:void 0;N=new AbortController;let d=nn(e.history,n,N.signal,r&&r.submission),f=e.getContext?await e.getContext():new ee,p;if(r&&r.pendingError)p=[un(a).route.id,{type:`error`,error:r.pendingError}];else if(r&&r.submission&&Dn(r.submission.formMethod)){let i=await Ee(d,n,r.submission,a,t,f,l.active,r&&r.initialHydration===!0,{replace:r.replace,flushSync:o});if(i.shortCircuited)return;if(i.pendingActionResult){let[e,t]=i.pendingActionResult;if(bn(t)&&Ke(t.error)&&t.error.status===404){N=null,Se(n,{matches:i.matches,loaderData:{},errors:{[e]:t.error}});return}}a=i.matches||a,p=i.pendingActionResult,u=Mn(n,a,t,r.submission),o=!1,l.active=!1,d=nn(e.history,d.url,d.signal)}let{shortCircuited:m,matches:h,loaderData:g,errors:_,workingFetchers:v}=await De(d,n,a,t,f,l.active,u,r&&r.submission,r&&r.fetcherSubmission,r&&r.replace,r&&r.initialHydration===!0,o,p,r&&r.callSiteDefaultShouldRevalidate);m||(N=null,Se(n,{matches:h||a,...ln(p),loaderData:g,errors:_,...v?{fetchers:v}:{}}))}async function Ee(t,n,i,l,u,d,f,p,m={}){if(Re(),xe({navigation:Nn(n,l,u,i)},{flushSync:m.flushSync===!0}),f){let e=await lt(l,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=dn(s.activeRoutes);return{matches:t,pendingActionResult:[n.id,{type:`error`,error:e.error}]}}let t=un(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:`error`,error:e.error}]}}if(e.matches)l=e.matches;else{let{notFoundMatches:e,error:t,route:r}=nt(n.pathname);return{matches:e,pendingActionResult:[r.id,{type:`error`,error:t}]}}}let h,g=kn(l,n);if(!g.route.action&&!g.route.lazy)h={type:`error`,error:fn(405,{method:t.method,pathname:n.pathname,routeId:g.route.id})};else{let e=await Ie(t,n,qt(a,o,t,n,l,g,p?[]:r,d),d,null);if(h=e[g.route.id],!h){for(let t of l)if(e[t.route.id]){h=e[t.route.id];break}}if(t.signal.aborted)return{shortCircuited:!0}}if(xn(h)){let n;return n=m&&m.replace!=null?m.replace:tn(h.response.headers.get(`Location`),new URL(t.url),c,e.history)===E.location.pathname+E.location.search,await Fe(t,h,!0,{submission:i,replace:n}),{shortCircuited:!0}}if(bn(h)){let e=un(l,g.route.id);return(m&&m.replace)!==!0&&(D=`PUSH`),{matches:l,pendingActionResult:[e.route.id,h,g.route.id]}}return{matches:l,pendingActionResult:[g.route.id,h]}}async function De(t,n,i,l,u,d,f,p,m,h,g,_,v,y){let b=f||Mn(n,i,l,p),x=p||m||jn(b),S=!ne&&!g;if(d){if(S){let e=Oe(v);xe({navigation:b,...e===void 0?{}:{actionData:e}},{flushSync:_})}let e=await lt(i,n.pathname,t.signal);if(e.type===`aborted`)return{shortCircuited:!0};if(e.type===`error`){if(e.partialMatches.length===0){let{matches:t,route:n}=dn(s.activeRoutes);return{matches:t,loaderData:{},errors:{[n.id]:e.error}}}let t=un(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(e.matches)i=e.matches;else{let{error:e,notFoundMatches:t,route:r}=nt(n.pathname);return{matches:t,loaderData:{},errors:{[r.id]:e}}}}let C=s.activeRoutes,{dsMatches:w,revalidatingFetchers:T}=Ot(t,u,a,o,e.history,E,i,x,n,g?[]:r,g===!0,re,ie,me,fe,de,C,c,e.patchRoutesOnNavigation!=null,s.branches,v,y);if(le=++oe,!e.dataStrategy&&!w.some(e=>e.shouldLoad)&&!w.some(e=>e.route.middleware&&e.route.middleware.length>0)&&T.length===0){let e=new Map(E.fetchers),t=Je(e);return Se(n,{matches:i,loaderData:{},errors:v&&bn(v[1])?{[v[0]]:v[1].error}:null,...ln(v),...t?{fetchers:e}:{}},{flushSync:_}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=Oe(v);t!==void 0&&(e.actionData=t)}T.length>0&&(e.fetchers=Ae(T)),xe(e,{flushSync:_})}T.forEach(e=>{Ge(e.key),e.controller&&I.set(e.key,e.controller)});let D=()=>T.forEach(e=>Ge(e.key));N&&N.signal.addEventListener(`abort`,D);let{loaderResults:O,fetcherResults:k}=await Le(w,T,t,n,u);if(t.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener(`abort`,D),T.forEach(e=>I.delete(e.key));let A=pn(O);if(A)return await Fe(t,A.result,!0,{replace:h}),{shortCircuited:!0};if(A=pn(k),A)return de.add(A.key),await Fe(t,A.result,!0,{replace:h}),{shortCircuited:!0};let j=new Map(E.fetchers),{loaderData:M,errors:ee}=sn(E,i,O,v,T,k,j);g&&E.errors&&(ee={...E.errors,...ee});let te=Je(j),P=Ye(le,j),F=te||P||T.length>0;return{matches:i,loaderData:M,errors:ee,...F?{workingFetchers:j}:{}}}function Oe(e){if(e&&!bn(e[1]))return{[e[0]]:e[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function Ae(e){let t=new Map(E.fetchers);return e.forEach(e=>{let n=t.get(e.key),r=Pn(void 0,n?n.data:void 0);t.set(e.key,r)}),t}async function Me(t,n,r,i){Ge(t);let a=(i&&i.flushSync)===!0,o=it(C),l=s.activeRoutes,u=Et(E.location,E.matches,c,r,n,i?.relative),d=se(l,u,c,!1,s.branches),f=ct(d,l,u);if(f.active&&f.matches&&(d=f.matches),o&&o(An(e.history,u,d)),!d){Be(t,n,fn(404,{pathname:u}),{flushSync:a});return}let{path:p,submission:m,error:h}=Dt(!0,u,i);if(h){Be(t,n,h,{flushSync:a});return}let g=e.getContext?await e.getContext():new ee,_=(i&&i.preventScrollReset)===!0;if(m&&Dn(m.formMethod)){await Ne(t,n,p,d,g,f.active,a,_,m,i&&i.defaultShouldRevalidate);return}fe.set(t,{routeId:n,path:p}),await Pe(t,n,p,d,g,f.active,a,_,m)}async function Ne(t,n,i,l,u,d,f,p,m,h){Re(),fe.delete(t),ze(t,Fn(m,E.fetchers.get(t)),{flushSync:f});let g=new AbortController,_=nn(e.history,i,g.signal,m);if(d){let e=await lt(l,new URL(_.url).pathname,_.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Be(t,n,e.error,{flushSync:f});return}if(e.matches)l=e.matches;else{Be(t,n,fn(404,{pathname:i}),{flushSync:f});return}}let v=kn(l,i);if(!v.route.action&&!v.route.lazy){Be(t,n,fn(405,{method:m.formMethod,pathname:i,routeId:n}),{flushSync:f});return}I.set(t,g);let y=oe,b=qt(a,o,_,i,l,v,r,u),x=await Ie(_,i,b,u,t),S=x[v.route.id];if(!S){for(let e of b)if(x[e.route.id]){S=x[e.route.id];break}}if(_.signal.aborted){I.get(t)===g&&I.delete(t);return}if(me.has(t)){if(xn(S)||bn(S)){ze(t,In(void 0));return}}else{if(xn(S)){if(I.delete(t),le>y){ze(t,In(void 0));return}return de.add(t),ze(t,Pn(m)),Fe(_,S,!1,{fetcherSubmission:m,preventScrollReset:p})}if(bn(S)){Be(t,n,S.error);return}}let C=E.navigation.location||E.location,T=nn(e.history,C,g.signal),O=s.activeRoutes,k=E.navigation.state===`idle`?E.matches:se(O,E.navigation.location,c,!1,s.branches);w(k,`Didn't find any matches after fetcher action`);let A=++oe;ue.set(t,A);let{dsMatches:j,revalidatingFetchers:M}=Ot(T,u,a,o,e.history,E,k,m,C,r,!1,re,ie,me,fe,de,O,c,e.patchRoutesOnNavigation!=null,s.branches,[v.route.id,S],h),ee=Pn(m,S.data),te=new Map(E.fetchers);te.set(t,ee),M.filter(e=>e.key!==t).forEach(e=>{let t=e.key,n=te.get(t),r=Pn(void 0,n?n.data:void 0);te.set(t,r),Ge(t),e.controller&&I.set(t,e.controller)}),xe({fetchers:te});let P=()=>M.forEach(e=>Ge(e.key));g.signal.addEventListener(`abort`,P);let{loaderResults:F,fetcherResults:ne}=await Le(j,M,T,C,u);if(g.signal.aborted)return;g.signal.removeEventListener(`abort`,P),ue.delete(t),I.delete(t),M.forEach(e=>I.delete(e.key));let ae=E.fetchers.has(t),ce=e=>{if(!ae)return e;let n=new Map(e.fetchers);return n.set(t,In(S.data)),{...e,fetchers:n}},pe=pn(F);if(pe)return E=ce(E),Fe(T,pe.result,!1,{preventScrollReset:p});if(pe=pn(ne),pe)return de.add(pe.key),E=ce(E),Fe(T,pe.result,!1,{preventScrollReset:p});let he=new Map(E.fetchers);ae&&he.set(t,In(S.data));let{loaderData:ge,errors:_e}=sn(E,k,F,void 0,M,ne,he);Ye(A,he),E.navigation.state===`loading`&&A>le?(w(D,`Expected pending action`),N&&N.abort(),Se(E.navigation.location,{matches:k,loaderData:ge,errors:_e,fetchers:he})):(xe({errors:_e,loaderData:cn(E.loaderData,ge,k,_e),fetchers:he}),re=!1)}async function Pe(t,n,i,s,c,l,u,d,f){let p=E.fetchers.get(t);ze(t,Pn(f,p?p.data:void 0),{flushSync:u});let m=new AbortController,h=nn(e.history,i,m.signal);if(l){let e=await lt(s,new URL(h.url).pathname,h.signal,t);if(e.type===`aborted`)return;if(e.type===`error`){Be(t,n,e.error,{flushSync:u});return}if(e.matches)s=e.matches;else{Be(t,n,fn(404,{pathname:i}),{flushSync:u});return}}let g=kn(s,i);I.set(t,m);let _=oe,v=await Ie(h,i,qt(a,o,h,i,s,g,r,c),c,t),y=v[g.route.id];if(!y){for(let e of s)if(v[e.route.id]){y=v[e.route.id];break}}if(I.get(t)===m&&I.delete(t),!h.signal.aborted){if(me.has(t)){ze(t,In(void 0));return}if(xn(y)){if(le>_){ze(t,In(void 0));return}de.add(t),await Fe(h,y,!1,{preventScrollReset:d});return}if(bn(y)){Be(t,n,y.error);return}ze(t,In(y.data))}}async function Fe(r,i,a,{submission:o,fetcherSubmission:s,preventScrollReset:l,replace:u}={}){a||(k?.resolve(),k=null),i.response.headers.has(`X-Remix-Revalidate`)&&(re=!0);let d=i.response.headers.get(`Location`);w(d,`Expected a Location header on the redirect Response`),d=tn(d,new URL(r.url),c,e.history);let f=O(E.location,d,{_isRedirect:!0});if(n){let e=!1;if(i.response.headers.has(`X-Remix-Reload-Document`))e=!0;else if(je(d)){let n=M(t,d,!0);e=n.origin!==t.location.origin||ke(n.pathname,c)==null}if(e){u?t.location.replace(d):t.location.assign(d);return}}N=null;let p=u===!0||i.response.headers.has(`X-Remix-Replace`)?`REPLACE`:`PUSH`,{formMethod:m,formAction:h,formEncType:g}=E.navigation;!o&&!s&&m&&h&&g&&(o=jn(E.navigation));let _=o||s;_t.has(i.response.status)&&_&&Dn(_.formMethod)?await Te(p,f,{submission:{..._,formAction:d},preventScrollReset:l||j,enableViewTransition:a?te:void 0}):await Te(p,f,{overrideNavigation:Mn(f,[],p,o),fetcherSubmission:s,preventScrollReset:l||j,enableViewTransition:a?te:void 0})}async function Ie(e,t,n,r,i){let a,o={};try{a=await Jt(l,e,t,n,i,r,!1)}catch(e){return n.filter(e=>e.shouldLoad).forEach(t=>{o[t.route.id]={type:`error`,error:e}}),o}if(e.signal.aborted)return o;if(!Dn(e.method))for(let e of n){if(a[e.route.id]?.type===`error`)break;!a.hasOwnProperty(e.route.id)&&!E.loaderData.hasOwnProperty(e.route.id)&&(!E.errors||!E.errors.hasOwnProperty(e.route.id))&&e.shouldCallHandler()&&(a[e.route.id]={type:`error`,result:Error(`No result returned from dataStrategy for route ${e.route.id}`)})}for(let[t,r]of Object.entries(a))if(yn(r)){let i=r.result;o[t]={type:`redirect`,response:Qt(i,e,t,n,c)}}else o[t]=await Zt(r);return o}async function Le(e,t,n,r,i){let a=Ie(n,r,e,i,null),o=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await Ie(e.request,e.path,e.matches,i,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:`error`,error:fn(404,{pathname:e.path})}})}));return{loaderResults:await a,fetcherResults:(await o).reduce((e,t)=>Object.assign(e,t),{})}}function Re(){re=!0,fe.forEach((e,t)=>{I.has(t)&&ie.add(t),Ge(t)})}function ze(e,t,n={}){let r=new Map(E.fetchers);r.set(e,t),xe({fetchers:r},{flushSync:(n&&n.flushSync)===!0})}function Be(e,t,n,r={}){let i=un(E.matches,t),a=new Map(E.fetchers);Ue(a,e),xe({errors:{[i.route.id]:n},fetchers:a},{flushSync:(r&&r.flushSync)===!0})}function Ve(e){return pe.set(e,(pe.get(e)||0)+1),me.has(e)&&me.delete(e),E.fetchers.get(e)||yt}function He(e,t){Ge(e,t?.reason),ze(e,In(null))}function Ue(e,t){let n=E.fetchers.get(t);I.has(t)&&!(n&&n.state===`loading`&&ue.has(t))&&Ge(t),fe.delete(t),ue.delete(t),de.delete(t),me.delete(t),ie.delete(t),e.delete(t)}function We(e){let t=(pe.get(e)||0)-1;t<=0?(pe.delete(e),me.add(e)):pe.set(e,t),xe({fetchers:new Map(E.fetchers)})}function Ge(e,t){let n=I.get(e);n&&(n.abort(t),I.delete(e))}function qe(e,t){for(let n of e){let e=t.get(n);w(e,`Expected fetcher: ${n}`);let r=In(e.data);t.set(n,r)}}function Je(e){let t=[],n=!1;for(let r of de){let i=e.get(r);w(i,`Expected fetcher: ${r}`),i.state===`loading`&&(de.delete(r),t.push(r),n=!0)}return qe(t,e),n}function Ye(e,t){let n=[];for(let[r,i]of ue)if(i<e){let e=t.get(r);w(e,`Expected fetcher: ${r}`),e.state===`loading`&&(Ge(r),ue.delete(r),n.push(r))}return qe(n,t),n.length>0}function Xe(e,t){let n=E.blockers.get(e)||bt;return he.get(e)!==t&&he.set(e,t),n}function Ze(e){E.blockers.delete(e),he.delete(e)}function Qe(e,t){let n=E.blockers.get(e)||bt;w(n.state===`unblocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`blocked`||n.state===`blocked`&&t.state===`proceeding`||n.state===`blocked`&&t.state===`unblocked`||n.state===`proceeding`&&t.state===`unblocked`,`Invalid blocker state transition: ${n.state} -> ${t.state}`);let r=new Map(E.blockers);r.set(e,t),xe({blockers:r})}function tt({currentLocation:e,nextLocation:t,historyAction:n}){if(he.size===0)return;he.size>1&&T(!1,`A router only supports one blocker at a time`);let r=Array.from(he.entries()),[i,a]=r[r.length-1],o=E.blockers.get(i);if(!(o&&o.state===`proceeding`)&&a({currentLocation:e,nextLocation:t,historyAction:n}))return i}function nt(e){let t=fn(404,{pathname:e}),n=s.activeRoutes,{matches:r,route:i}=dn(n);return{notFoundMatches:r,route:i,error:t}}function rt(e,t,n){if(m=e,g=t,h=n||null,!_&&E.navigation===vt){_=!0;let e=st(E.location,E.matches);e!=null&&xe({restoreScrollPosition:e})}return()=>{m=null,g=null,h=null}}function at(e,t){return h&&h(e,t.map(e=>ce(e,E.loaderData)))||e.key}function ot(e,t){if(m&&g){let n=at(e,t);m[n]=g()}}function st(e,t){if(m){let n=at(e,t),r=m[n];if(typeof r==`number`)return r}return null}function ct(t,n,r){if(e.patchRoutesOnNavigation){let e=s.branches;if(!t)return{active:!0,matches:se(n,r,c,!0,e)||[]};if(Object.keys(t[0].params).length>0)return{active:!0,matches:se(n,r,c,!0,e)}}return{active:!1,matches:null}}async function lt(t,n,r,i){if(!e.patchRoutesOnNavigation)return{type:`success`,matches:t};let l=t;for(;;){let t=o;try{await e.patchRoutesOnNavigation({signal:r,path:n,matches:l,fetcherKey:i,patch:(e,n)=>{r.aborted||Pt(e,n,s,t,a,!1)}})}catch(e){return{type:`error`,error:e,partialMatches:l}}if(r.aborted)return{type:`aborted`};let u=s.branches,d=se(s.activeRoutes,n,c,!1,u),f=null;if(d&&(Object.keys(d[0].params).length===0||(f=se(s.activeRoutes,n,c,!0,u),!(f&&l.length<f.length&&ut(l,f.slice(0,l.length))))))return{type:`success`,matches:d};if(f||=se(s.activeRoutes,n,c,!0,u),!f||ut(l,f))return{type:`success`,matches:null};l=f}}function ut(e,t){return e.length===t.length&&e.every((e,n)=>e.route.id===t[n].route.id)}function dt(e){o={},s.setHmrRoutes(ae(e,a,void 0,o))}function ft(e,t,n=!1){Pt(e,t,s,o,a,n),s.hasHMRRoutes||xe({})}return C={get basename(){return c},get future(){return u},get state(){return E},get routes(){return s.stableRoutes},get branches(){return s.branches},get manifest(){return o},get window(){return t},initialize:ve,subscribe:be,enableScrollRestoration:rt,navigate:Ce,fetch:Me,revalidate:we,createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:Ve,resetFetcher:He,deleteFetcher:We,dispose:ye,getBlocker:Xe,deleteBlocker:Ze,patchRoutes:ft,_internalFetchControllers:I,_internalSetRoutes:dt,_internalSetStateDoNotUseOrYouWillBreakYourApp(e){xe(e)}},e.instrumentations&&(C=et(C,e.instrumentations.map(e=>e.router).filter(Boolean))),C}function Tt(e){return e!=null&&(`formData`in e&&e.formData!=null||`body`in e&&e.body!==void 0)}function Et(e,t,n,r,i,a){let o,s;if(i){o=[];for(let e of t)if(o.push(e),e.route.id===i){s=e;break}}else o=t,s=t[t.length-1];let c=Le(r||`.`,Ie(o),ke(e.pathname,n)||e.pathname,a===`path`);if(r??(c.search=e.search,c.hash=e.hash),(r==null||r===``||r===`.`)&&s){let e=On(c.search);if(s.route.index&&!e)c.search=c.search?c.search.replace(/^\?/,`?index&`):`?index`;else if(!s.route.index&&e){let e=new URLSearchParams(c.search),t=e.getAll(`index`);e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();c.search=n?`?${n}`:``}}return n!==`/`&&(c.pathname=Ae({basename:n,pathname:c.pathname})),k(c)}function Dt(e,t,n){if(!n||!Tt(n))return{path:t};if(n.formMethod&&!En(n.formMethod))return{path:t,error:fn(405,{method:n.formMethod})};let r=()=>({path:t,error:fn(400,{type:`invalid-body`})}),i=(n.formMethod||`get`).toUpperCase(),a=mn(t);if(n.body!==void 0){if(n.formEncType===`text/plain`){if(!Dn(i))return r();let e=typeof n.body==`string`?n.body:n.body instanceof FormData||n.body instanceof URLSearchParams?Array.from(n.body.entries()).reduce((e,[t,n])=>`${e}${t}=${n}\n`,``):String(n.body);return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:void 0,text:e}}}if(n.formEncType===`application/json`){if(!Dn(i))return r();try{let e=typeof n.body==`string`?JSON.parse(n.body):n.body;return{path:t,submission:{formMethod:i,formAction:a,formEncType:n.formEncType,formData:void 0,json:e,text:void 0}}}catch{return r()}}}w(typeof FormData==`function`,`FormData is not available in this environment`);let o,s;if(n.formData)o=rn(n.formData),s=n.formData;else if(n.body instanceof FormData)o=rn(n.body),s=n.body;else if(n.body instanceof URLSearchParams)o=n.body,s=an(o);else if(n.body==null)o=new URLSearchParams,s=new FormData;else try{o=new URLSearchParams(n.body),s=an(o)}catch{return r()}let c={formMethod:i,formAction:a,formEncType:n&&n.formEncType||`application/x-www-form-urlencoded`,formData:s,json:void 0,text:void 0};if(Dn(c.formMethod))return{path:t,submission:c};let l=A(t);return e&&l.search&&On(l.search)&&o.append(`index`,``),l.search=`?${o}`,{path:k(l),submission:c}}function Ot(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x){let S=b?bn(b[1])?b[1].error:b[1].data:void 0,C=i.createURL(a.location),w=i.createURL(c),T;if(u&&a.errors){let e=Object.keys(a.errors)[0];T=o.findIndex(t=>t.route.id===e)}else if(b&&bn(b[1])){let e=b[0];T=o.findIndex(t=>t.route.id===e)-1}let E=b?b[1].statusCode:void 0,D=E&&E>=400,O={currentUrl:C,currentParams:a.matches[0]?.params||{},nextUrl:w,nextParams:o[0].params,...s,actionResult:S,actionStatus:E},k=qe(o),A=o.map((i,o)=>{let{route:s}=i,f=null;if(T!=null&&o>T)f=!1;else if(s.lazy)f=!0;else if(!kt(s))f=!1;else if(u){let{shouldLoad:e}=At(s,a.loaderData,a.errors);f=e}else jt(a.loaderData,a.matches[o],i)&&(f=!0);if(f!==null)return Kt(n,r,e,c,k,i,l,t,f);let p=!1;typeof x==`boolean`?p=x:D?p=!1:d||C.pathname+C.search===w.pathname+w.search?p=!0:C.search===w.search?Mt(a.matches[o],i)&&(p=!0):p=!0;let m={...O,defaultShouldRevalidate:p};return Kt(n,r,e,c,k,i,l,t,Nt(i,m),m,x)}),j=[];return m.forEach((e,s)=>{if(u||!o.some(t=>t.route.id===e.routeId)||p.has(s))return;let c=a.fetchers.get(s),m=c&&c.state!==`idle`&&c.data===void 0,b=se(g,e.path,_??`/`,!1,y);if(!b){if(v&&m)return;j.push({key:s,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null});return}if(h.has(s))return;let S=kn(b,e.path),C=new AbortController,w=nn(i,e.path,C.signal),T=null;if(f.has(s))f.delete(s),T=qt(n,r,w,e.path,b,S,l,t);else if(m)d&&(T=qt(n,r,w,e.path,b,S,l,t));else{let i;i=typeof x==`boolean`?x:!D&&d;let a={...O,defaultShouldRevalidate:i};Nt(S,a)&&(T=qt(n,r,w,e.path,b,S,l,t,a))}T&&j.push({key:s,routeId:e.routeId,path:e.path,matches:T,match:S,request:w,controller:C})}),{dsMatches:A,revalidatingFetchers:j}}function kt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function At(e,t,n){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!kt(e))return{shouldLoad:!1,renderFallback:!1};let r=t!=null&&e.id in t,i=n!=null&&n[e.id]!==void 0;if(!r&&i)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader==`function`&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!r};let a=!r&&!i;return{shouldLoad:a,renderFallback:a}}function jt(e,t,n){let r=!t||n.route.id!==t.route.id,i=!e.hasOwnProperty(n.route.id);return r||i}function Mt(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith(`*`)&&e.params[`*`]!==t.params[`*`]}function Nt(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n==`boolean`)return n}return t.defaultShouldRevalidate}function Pt(e,t,n,r,i,a){let o;if(e){let t=r[e];w(t,`No route found to patch children into: routeId = ${e}`),t.children||=[],o=t.children}else o=n.activeRoutes;let s=[],c=[];if(t.forEach(e=>{let t=o.find(t=>Ft(e,t));t?c.push({existingRoute:t,newRoute:e}):s.push(e)}),s.length>0){let t=ae(s,i,[e||`_`,`patch`,String(o?.length||`0`)],r);o.push(...t)}if(a&&c.length>0)for(let e=0;e<c.length;e++){let{existingRoute:t,newRoute:n}=c[e],r=t,[a]=ae([n],i,[],{},!0);Object.assign(r,{element:a.element?a.element:r.element,errorElement:a.errorElement?a.errorElement:r.errorElement,hydrateFallbackElement:a.hydrateFallbackElement?a.hydrateFallbackElement:r.hydrateFallbackElement})}n.hasHMRRoutes||n.setRoutes([...n.activeRoutes])}function Ft(e,t){return`id`in e&&`id`in t&&e.id===t.id?!0:e.index!==t.index||e.path!==t.path||e.caseSensitive!==t.caseSensitive?!1:(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children?.every((e,n)=>t.children?.some(t=>Ft(e,t)))??!1}var It=new WeakMap,Lt=({key:e,route:t,manifest:n,mapRouteProperties:r})=>{let i=n[t.id];if(w(i,`No route found in manifest`),!i.lazy||typeof i.lazy!=`object`)return;let a=i.lazy[e];if(!a)return;let o=It.get(i);o||(o={},It.set(i,o));let s=o[e];if(s)return s;let c=(async()=>{let t=P(e),n=i[e]!==void 0;if(t)T(!t,`Route property `+e+` is not a supported lazy route property. This property will be ignored.`),o[e]=Promise.resolve();else if(n)T(!1,`Route "${i.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await a();t!=null&&(Object.assign(i,{[e]:t}),Object.assign(i,r(i)))}typeof i.lazy==`object`&&(i.lazy[e]=void 0,Object.values(i.lazy).every(e=>e===void 0)&&(i.lazy=void 0))})();return o[e]=c,c},Rt=new WeakMap;function zt(e,t,n,r,i){let a=n[e.id];if(w(a,`No route found in manifest`),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy==`function`){let t=Rt.get(a);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let n=(async()=>{w(typeof e.lazy==`function`,`No lazy route function found`);let t=await e.lazy(),n={};for(let e in t){let r=t[e];if(r===void 0)continue;let i=ne(e),o=a[e]!==void 0;i?T(!i,`Route property `+e+` is not a supported property to be returned from a lazy route function. This property will be ignored.`):o?T(!o,`Route "${a.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):n[e]=r}Object.assign(a,n),Object.assign(a,{...r(a),lazy:void 0})})();return Rt.set(a,n),n.catch(()=>{}),{lazyRoutePromise:n,lazyHandlerPromise:n}}let o=Object.keys(e.lazy),s=[],c;for(let a of o){if(i&&i.includes(a))continue;let o=Lt({key:a,route:e,manifest:n,mapRouteProperties:r});o&&(s.push(o),a===t&&(c=o))}let l=s.length>0?Promise.all(s).then(()=>{}):void 0;return l?.catch(()=>{}),c?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:c}}async function Bt(e){let t=e.matches.filter(e=>e.shouldLoad),n={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,r)=>{n[t[r].route.id]=e}),n}async function Vt(e){return e.matches.some(e=>e.route.middleware)?Ht(e,()=>Bt(e)):Bt(e)}function Ht(e,t){return Ut(e,t,e=>{if(Tn(e))throw e;return e},_n,n);async function n(t,n,r){if(r)return Object.assign(r.value,{[n]:{type:`error`,result:t}});{let{matches:r}=e,i=Math.min(Math.max(r.findIndex(e=>e.route.id===n),0),Math.max(r.findIndex(e=>e.shouldCallHandler()),0)),a=r[i].route.id;for(let e of r.slice(0,i+1))try{await e._lazyPromises?.route}catch{a=e.route.id;break}return{[un(r,a).route.id]:{type:`error`,result:t}}}}}async function Ut(e,t,n,r,i){let{matches:a,...o}=e;return await Wt(o,a.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),t,n,r,i)}async function Wt(e,t,n,r,i,a,o=0){let{request:s}=e;if(s.signal.aborted)throw s.signal.reason??Error(`Request aborted: ${s.method} ${s.url}`);let c=t[o];if(!c)return await n();let[l,u]=c,d,f=async()=>{if(d)throw Error("You may only call `next()` once per middleware");try{return d={value:await Wt(e,t,n,r,i,a,o+1)},d.value}catch(e){return d={value:await a(e,l,d)},d.value}};try{let t=await u(e,f),n=t==null?void 0:r(t);return i(n)?n:d?n??d.value:(d={value:await f()},d.value)}catch(e){return await a(e,l,d)}}function Gt(e,t,n,r,i){let a=Lt({key:`middleware`,route:r.route,manifest:t,mapRouteProperties:e}),o=zt(r.route,Dn(n.method)?`action`:`loader`,t,e,i);return{middleware:a,route:o.lazyRoutePromise,handler:o.lazyHandlerPromise}}function Kt(e,t,n,r,i,a,o,s,c,l=null,u){let d=!1,f=Gt(e,t,n,a,o);return{...a,_lazyPromises:f,shouldLoad:c,shouldRevalidateArgs:l,shouldCallHandler(e){return d=!0,l?typeof u==`boolean`?Nt(a,{...l,defaultShouldRevalidate:u}):typeof e==`boolean`?Nt(a,{...l,defaultShouldRevalidate:e}):Nt(a,l):c},resolve(e){let{lazy:t,loader:o,middleware:l}=a.route,u=d||c||e&&!Dn(n.method)&&(t||o),p=l&&l.length>0&&!o&&!t;return u&&(Dn(n.method)||!p)?Yt({request:n,path:r,pattern:i,match:a,lazyHandlerPromise:f?.handler,lazyRoutePromise:f?.route,handlerOverride:e,scopedContext:s}):Promise.resolve({type:`data`,result:void 0})}}}function qt(e,t,n,r,i,a,o,s,c=null){return i.map(l=>l.route.id===a.route.id?Kt(e,t,n,r,qe(i),l,o,s,!0,c):{...l,shouldLoad:!1,shouldRevalidateArgs:c,shouldCallHandler:()=>!1,_lazyPromises:Gt(e,t,n,l,o),resolve:()=>Promise.resolve({type:`data`,result:void 0})})}async function Jt(e,t,n,r,i,a,o){r.some(e=>e._lazyPromises?.middleware)&&await Promise.all(r.map(e=>e._lazyPromises?.middleware));let s={request:t,url:Je(t,n),pattern:qe(r),params:r[0].params,context:a,matches:r},c=o?()=>{throw Error("You cannot call `runClientMiddleware()` from a static handler `dataStrategy`. Middleware is run outside of `dataStrategy` during SSR in order to bubble up the Response. You can enable middleware via the `respond` API in `query`/`queryRoute`")}:e=>{let t=s;return Ht(t,()=>e({...t,fetcherKey:i,runClientMiddleware:()=>{throw Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},l=await e({...s,fetcherKey:i,runClientMiddleware:c});try{await Promise.all(r.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch{}return l}async function Yt({request:e,path:t,pattern:n,match:r,lazyHandlerPromise:i,lazyRoutePromise:a,handlerOverride:o,scopedContext:s}){let c,l,u=Dn(e.method),d=u?`action`:`loader`,f=i=>{let a,c=new Promise((e,t)=>a=t);l=()=>a(),e.signal.addEventListener(`abort`,l);let u=a=>typeof i==`function`?i({request:e,url:Je(e,t),pattern:n,params:r.params,context:s},...a===void 0?[]:[a]):Promise.reject(Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${r.route.id}]`)),f=(async()=>{try{return{type:`data`,result:await(o?o(e=>u(e)):u())}}catch(e){return{type:`error`,result:e}}})();return Promise.race([f,c])};try{let t=u?r.route.action:r.route.loader;if(i||a){if(t){let e,[n]=await Promise.all([f(t).catch(t=>{e=t}),i,a]);if(e!==void 0)throw e;c=n}else{await i;let t=u?r.route.action:r.route.loader;if(t)[c]=await Promise.all([f(t),a]);else if(d===`action`){let t=new URL(e.url),n=t.pathname+t.search;throw fn(405,{method:e.method,pathname:n,routeId:r.route.id})}else return{type:`data`,result:void 0}}}else if(t)c=await f(t);else{let t=new URL(e.url);throw fn(404,{pathname:t.pathname+t.search})}}catch(e){return{type:`error`,result:e}}finally{l&&e.signal.removeEventListener(`abort`,l)}return c}async function Xt(e){let t=e.headers.get(`Content-Type`);return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Zt(e){let{result:t,type:n}=e;if(Cn(t)){let e;try{e=await Xt(t)}catch(e){return{type:`error`,error:e}}return n===`error`?{type:`error`,error:new Ge(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:`data`,data:e,statusCode:t.status,headers:t.headers}}return n===`error`?Sn(t)?t.data instanceof Error?{type:`error`,error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:gn(t),statusCode:Ke(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`error`,error:t,statusCode:Ke(t)?t.status:void 0}:Sn(t)?{type:`data`,data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:`data`,data:t}}function Qt(e,t,n,r,i){let a=e.headers.get(`Location`);if(w(a,`Redirects returned/thrown from loaders/actions must have a Location header`),!je(a)){let o=r.slice(0,r.findIndex(e=>e.route.id===n)+1);a=Et(new URL(t.url),o,i,a),e.headers.set(`Location`,a)}return e}var $t=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function en(e){try{return $t.includes(new URL(e).protocol)}catch{return!1}}function tn(e,t,n,r){if(je(e)){let r=e,i=y.test(r)?new URL(b(r,t.protocol)):new URL(r);if(en(i.toString()))throw Error(`Invalid redirect location`);let a=ke(i.pathname,n)!=null;if(i.origin===t.origin&&a)return Re(i.pathname)+i.search+i.hash}try{if(en(r.createURL(e).toString()))throw Error(`Invalid redirect location`)}catch{}return e}function nn(e,t,n,r){let i=e.createURL(mn(t)).toString(),a={signal:n};if(r&&Dn(r.formMethod)){let{formMethod:e,formEncType:t}=r;a.method=e.toUpperCase(),t===`application/json`?(a.headers=new Headers({"Content-Type":t}),a.body=JSON.stringify(r.json)):a.body=t===`text/plain`?r.text:t===`application/x-www-form-urlencoded`&&r.formData?rn(r.formData):r.formData}return new Request(i,a)}function rn(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r==`string`?r:r.name);return t}function an(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function on(e,t,n,r=!1,i=!1){let a={},o=null,s,c=!1,l={},u=n&&bn(n[1])?n[1].error:void 0;return e.forEach(n=>{if(!(n.route.id in t))return;let d=n.route.id,f=t[d];if(w(!xn(f),`Cannot handle redirect results in processLoaderData`),bn(f)){let t=f.error;if(u!==void 0&&(t=u,u=void 0),o||={},i)o[d]=t;else{let n=un(e,d);o[n.route.id]??(o[n.route.id]=t)}r||(a[d]=St),c||(c=!0,s=Ke(f.error)?f.error.status:500),f.headers&&(l[d]=f.headers)}else a[d]=f.data,f.statusCode&&f.statusCode!==200&&!c&&(s=f.statusCode),f.headers&&(l[d]=f.headers)}),u!==void 0&&n&&(o={[n[0]]:u},n[2]&&(a[n[2]]=void 0)),{loaderData:a,errors:o,statusCode:s||200,loaderHeaders:l}}function sn(e,t,n,r,i,a,o){let{loaderData:s,errors:c}=on(t,n,r);return i.filter(e=>!e.matches||e.matches.some(e=>e.shouldLoad)).forEach(t=>{let{key:n,match:r,controller:i}=t;if(i&&i.signal.aborted)return;let s=a[n];if(w(s,`Did not find corresponding fetcher result`),bn(s)){let t=un(e.matches,r?.route.id);c&&c[t.route.id]||(c={...c,[t.route.id]:s.error}),o.delete(n)}else if(xn(s))w(!1,`Unhandled fetcher revalidation redirect`);else{let e=In(s.data);o.set(n,e)}}),{loaderData:s,errors:c}}function cn(e,t,n,r){let i=Object.entries(t).filter(([,e])=>e!==St).reduce((e,[t,n])=>(e[t]=n,e),{});for(let a of n){let n=a.route.id;if(!t.hasOwnProperty(n)&&e.hasOwnProperty(n)&&a.route.loader&&(i[n]=e[n]),r&&r.hasOwnProperty(n))break}return i}function ln(e){return e?bn(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function un(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>e.route.ErrorBoundary!=null||e.route.errorElement!=null)||e[0]}function dn(e){let t=e.length===1?e[0]:e.find(e=>e.index||!e.path||e.path===`/`)||{id:`__shim-error-route__`};return{matches:[{params:{},pathname:``,pathnameBase:``,route:t}],route:t}}function fn(e,{pathname:t,routeId:n,method:r,type:i,message:a}={}){let o=`Unknown Server Error`,s=`Unknown @remix-run/router error`;return e===400?(o=`Bad Request`,r&&t&&n?s=`You made a ${r} request to "${t}" but did not provide a \`loader\` for route "${n}", so there is no way to handle the request.`:i===`invalid-body`&&(s=`Unable to encode submission body`)):e===403?(o=`Forbidden`,s=`Route "${n}" does not match URL "${t}"`):e===404?(o=`Not Found`,s=`No route matches URL "${t}"`):e===405&&(o=`Method Not Allowed`,r&&t&&n?s=`You made a ${r.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${n}", so there is no way to handle the request.`:r&&(s=`Invalid request method "${r.toUpperCase()}"`)),new Ge(e||500,o,Error(s),!0)}function pn(e){let t=Object.entries(e);for(let e=t.length-1;e>=0;e--){let[n,r]=t[e];if(xn(r))return{key:n,result:r}}}function mn(e){return k({...typeof e==`string`?A(e):e,hash:``})}function hn(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===``?t.hash!==``:e.hash===t.hash||t.hash!==``}function gn(e){return new Ge(e.init?.status??500,e.init?.statusText??`Internal Server Error`,e.data)}function _n(e){return typeof e==`object`&&!!e&&Object.entries(e).every(([e,t])=>typeof e==`string`&&vn(t))}function vn(e){return typeof e==`object`&&!!e&&`type`in e&&`result`in e&&(e.type===`data`||e.type===`error`)}function yn(e){return Cn(e.result)&&gt.has(e.result.status)}function bn(e){return e.type===`error`}function xn(e){return(e&&e.type)===`redirect`}function Sn(e){return typeof e==`object`&&!!e&&`type`in e&&`data`in e&&`init`in e&&e.type===`DataWithResponseInit`}function Cn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.headers==`object`&&e.body!==void 0}function wn(e){return gt.has(e)}function Tn(e){return Cn(e)&&wn(e.status)&&e.headers.has(`Location`)}function En(e){return ht.has(e.toUpperCase())}function Dn(e){return pt.has(e.toUpperCase())}function On(e){return new URLSearchParams(e).getAll(`index`).some(e=>e===``)}function kn(e,t){let n=typeof t==`string`?A(t).search:t.search;if(e[e.length-1].route.index&&On(n||``))return e[e.length-1];let r=Fe(e);return r[r.length-1]}function An(e,t,n){return{url:Je(e.createURL(t),t),pattern:n?qe(n):``,params:n?.[0]?.params?{...n[0].params}:{}}}function jn(e){let{formMethod:t,formAction:n,formEncType:r,text:i,formData:a,json:o}=e;if(!(!t||!n||!r)){if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:i};if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:a,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function Mn(e,t,n,r){return r?{state:`loading`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:`loading`,location:e,matches:t,historyAction:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Nn(e,t,n,r){return{state:`submitting`,location:e,matches:t,historyAction:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function Pn(e,t){return e?{state:`loading`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:`loading`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Fn(e,t){return{state:`submitting`,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function In(e){return{state:`idle`,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Ln(e,t){try{let n=e.sessionStorage.getItem(xt);if(n){let e=JSON.parse(n);for(let[n,r]of Object.entries(e||{}))r&&Array.isArray(r)&&t.set(n,new Set(r||[]))}}catch{}}function Rn(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(xt,JSON.stringify(n))}catch(e){T(!1,`Failed to save applied view transitions in sessionStorage (${e}).`)}}}function zn(){let e,t,n=new Promise((r,i)=>{e=async e=>{r(e);try{await n}catch{}},t=async e=>{i(e);try{await n}catch{}}});return{promise:n,resolve:e,reject:t}}var Bn=N.createContext(null);Bn.displayName=`DataRouter`;var Vn=N.createContext(null);Vn.displayName=`DataRouterState`;var Hn=N.createContext(!1);function Un(){return N.useContext(Hn)}var Wn=N.createContext({isTransitioning:!1});Wn.displayName=`ViewTransition`;var Gn=N.createContext(new Map);Gn.displayName=`Fetchers`;var Kn=N.createContext(null);Kn.displayName=`Await`;var qn=N.createContext(null);qn.displayName=`Navigation`;var Jn=N.createContext(null);Jn.displayName=`Location`;var Yn=N.createContext({outlet:null,matches:[],isDataRoute:!1});Yn.displayName=`Route`;var Xn=N.createContext(null);Xn.displayName=`RouteError`;var Zn=`REACT_ROUTER_ERROR`,Qn=`REDIRECT`,$n=`ROUTE_ERROR_RESPONSE`;function er(e){if(e.startsWith(`${Zn}:${Qn}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function tr(e){if(e.startsWith(`${Zn}:${$n}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Ge(t.status,t.statusText,t.data)}catch{}}function nr(e,{relative:t}={}){w(rr(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=N.useContext(qn),{hash:i,pathname:a,search:o}=dr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:ze([n,a])),r.createHref({pathname:s,search:o,hash:i})}function rr(){return N.useContext(Jn)!=null}function ir(){return w(rr(),`useLocation() may be used only in the context of a <Router> component.`),N.useContext(Jn).location}var ar=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function or(){let{isDataRoute:e}=N.useContext(Yn);return e?kr():sr()}function sr(){w(rr(),`useNavigate() may be used only in the context of a <Router> component.`);let e=N.useContext(Bn),{basename:t,navigator:n}=N.useContext(qn),{matches:r}=N.useContext(Yn),{pathname:i}=ir(),a=JSON.stringify(Ie(r)),o=N.useRef(!1);return N.useLayoutEffect(()=>{o.current=!0}),N.useCallback((r,s={})=>{if(T(o.current,ar),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Le(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:ze([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var cr=N.createContext(null);function lr(e){let t=N.useContext(Yn).outlet;return N.useMemo(()=>t&&N.createElement(cr.Provider,{value:e},t),[t,e])}function ur(){let{matches:e}=N.useContext(Yn);return e[e.length-1]?.params??{}}function dr(e,{relative:t}={}){let{matches:n}=N.useContext(Yn),{pathname:r}=ir(),i=JSON.stringify(Ie(n));return N.useMemo(()=>Le(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function fr(e,t,n){w(rr(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=N.useContext(qn),{matches:i}=N.useContext(Yn),a=i[i.length-1],o=a?a.params:{};a&&a.pathname;let s=a?a.pathnameBase:`/`;a&&a.route;let c=ir(),l;if(t){let e=typeof t==`string`?A(t):t;w(s===`/`||e.pathname?.startsWith(s),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${s}" but pathname "${e.pathname}" was given in the \`location\` prop.`),l=e}else l=c;let u=l.pathname||`/`,d=u;if(s!==`/`){let e=s.replace(/^\//,``).split(`/`);d=`/`+u.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let f=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):oe(e,{pathname:d}),p=yr(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:ze([s,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?s:ze([s,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&p?N.createElement(Jn.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...l},navigationType:`POP`}},p):p}function pr(){let e=Or(),t=Ke(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null;return N.createElement(N.Fragment,null,N.createElement(`h2`,null,`Unexpected Application Error!`),N.createElement(`h3`,{style:{fontStyle:`italic`}},t),n?N.createElement(`pre`,{style:{padding:`0.5rem`,backgroundColor:`rgba(200,200,200, 0.5)`}},n):null,null)}var mr=N.createElement(pr,null),hr=class extends N.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static contextType=Hn;static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=tr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:N.createElement(Yn.Provider,{value:this.props.routeContext},N.createElement(Xn.Provider,{value:e,children:this.props.component}));return this.context?N.createElement(_r,{error:e},t):t}},gr=new WeakMap;function _r({children:e,error:t}){let{basename:n}=N.useContext(qn);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=er(t.digest);if(e){let r=gr.get(t);if(r)throw r;let i=Xe(e.location,n),a=i.absoluteURL||i.to;if(en(a))throw Error(`Invalid redirect location`);if(Ye&&!gr.get(t)){if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw gr.set(t,n),n}}return N.createElement(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function vr({routeContext:e,match:t,children:n}){let r=N.useContext(Bn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),N.createElement(Yn.Provider,{value:e},n)}function yr(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);w(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:qe(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||mr,o&&(s<0&&c===0?(jr(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),h=()=>{let t;return t=u?f:d?p:n.route.Component?N.createElement(n.route.Component,null):n.route.element?n.route.element:e,N.createElement(vr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?N.createElement(hr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:h(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):h()},null)}function br(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xr(e){let t=N.useContext(Bn);return w(t,br(e)),t}function Sr(e){let t=N.useContext(Vn);return w(t,br(e)),t}function Cr(e){let t=N.useContext(Yn);return w(t,br(e)),t}function wr(e){let t=Cr(e),n=t.matches[t.matches.length-1];return w(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Tr(){return wr(`useRouteId`)}function Er(){let e=Sr(`useNavigation`);return N.useMemo(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Dr(){let{matches:e,loaderData:t}=Sr(`useMatches`);return N.useMemo(()=>e.map(e=>ce(e,t)),[e,t])}function Or(){let e=N.useContext(Xn),t=Sr(`useRouteError`),n=wr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function kr(){let{router:e}=xr(`useNavigate`),t=wr(`useNavigate`),n=N.useRef(!1);return N.useLayoutEffect(()=>{n.current=!0}),N.useCallback(async(r,i={})=>{T(n.current,ar),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var Ar={};function jr(e,t,n){!t&&!Ar[e]&&(Ar[e]=!0,T(!1,n))}var Mr={};function Nr(e,t){!e&&!Mr[t]&&(Mr[t]=!0,console.warn(t))}var Pr=[`HydrateFallback`,`hydrateFallbackElement`],Fr=class{status=`pending`;promise;resolve;reject;constructor(){this.promise=new Promise((e,t)=>{this.resolve=t=>{this.status===`pending`&&(this.status=`resolved`,e(t))},this.reject=e=>{this.status===`pending`&&(this.status=`rejected`,t(e))}})}};function Ir({router:e,flushSync:t,onError:n,useTransitions:r}){r=Un()||r;let[i,a]=N.useState(e.state),[o,s]=(0,N.useOptimistic)(i),[c,l]=N.useState(),[u,d]=N.useState({isTransitioning:!1}),[f,p]=N.useState(),[m,h]=N.useState(),[g,_]=N.useState(),v=N.useRef(new Map),y=N.useCallback((i,{deletedFetchers:o,newErrors:c,flushSync:u,viewTransitionOpts:g})=>{c&&n&&Object.values(c).forEach(e=>n(e,{location:i.location,params:i.matches[0]?.params??{},pattern:qe(i.matches)})),i.fetchers.forEach((e,t)=>{e.data!==void 0&&v.current.set(t,e.data)}),o.forEach(e=>v.current.delete(e)),Nr(u===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let y=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition==`function`;if(Nr(g==null||y,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!g||!y){t&&u?t(()=>a(i)):r===!1?a(i):N.startTransition(()=>{r===!0&&s(e=>Lr(e,i)),a(i)});return}if(t&&u){t(()=>{m&&(f?.resolve(),m.skipTransition()),d({isTransitioning:!0,flushSync:!0,currentLocation:g.currentLocation,nextLocation:g.nextLocation})});let n=e.window.document.startViewTransition(()=>{t(()=>a(i))});n.finished.finally(()=>{t(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})})}),t(()=>h(n));return}m?(f?.resolve(),m.skipTransition(),_({state:i,currentLocation:g.currentLocation,nextLocation:g.nextLocation})):(l(i),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}))},[e.window,t,m,f,r,s,n]);N.useLayoutEffect(()=>e.subscribe(y),[e,y]),N.useEffect(()=>{u.isTransitioning&&!u.flushSync&&p(new Fr)},[u]),N.useEffect(()=>{if(f&&c&&e.window){let t=c,n=f.promise,i=e.window.document.startViewTransition(async()=>{r===!1?a(t):N.startTransition(()=>{r===!0&&s(e=>Lr(e,t)),a(t)}),await n});i.finished.finally(()=>{p(void 0),h(void 0),l(void 0),d({isTransitioning:!1})}),h(i)}},[c,f,e.window,r,s]),N.useEffect(()=>{f&&c&&o.location.key===c.location.key&&f.resolve()},[f,m,o.location,c]),N.useEffect(()=>{!u.isTransitioning&&g&&(l(g.state),d({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),_(void 0))},[u.isTransitioning,g]);let b=N.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,n,r)=>e.navigate(t,{state:n,preventScrollReset:r?.preventScrollReset}),replace:(t,n,r)=>e.navigate(t,{replace:!0,state:n,preventScrollReset:r?.preventScrollReset})}),[e]),x=e.basename||`/`,S=N.useMemo(()=>({router:e,navigator:b,static:!1,basename:x,onError:n}),[e,b,x,n]);return N.createElement(N.Fragment,null,N.createElement(Bn.Provider,{value:S},N.createElement(Vn.Provider,{value:o},N.createElement(Gn.Provider,{value:v.current},N.createElement(Wn.Provider,{value:u},N.createElement(Hr,{basename:x,location:o.location,navigationType:o.historyAction,navigator:b,useTransitions:r},N.createElement(Rr,{routes:e.routes,manifest:e.manifest,future:e.future,state:o,isStatic:!1,onError:n})))))),null)}function Lr(e,t){return{...e,navigation:t.navigation.state===`idle`?e.navigation:t.navigation,revalidation:t.revalidation===`idle`?e.revalidation:t.revalidation,actionData:t.navigation.state===`submitting`?e.actionData:t.actionData,fetchers:t.fetchers}}var Rr=N.memo(zr);function zr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return fr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function Br({to:e,replace:t,state:n,relative:r}){w(rr(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=N.useContext(qn);T(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=N.useContext(Yn),{pathname:o}=ir(),s=or(),c=Le(e,Ie(a),o,r===`path`),l=JSON.stringify(c);return N.useEffect(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Vr(e){return lr(e.context)}function Hr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){w(!rr(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=N.useMemo(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=A(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,h=N.useMemo(()=>{let e=ke(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return T(h!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),h==null?null:N.createElement(qn.Provider,{value:c},N.createElement(Jn.Provider,{children:t,value:h}))}N.Component;var Ur=`application/x-www-form-urlencoded`;function Wr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Gr(e){return Wr(e)&&e.tagName.toLowerCase()===`button`}function Kr(e){return Wr(e)&&e.tagName.toLowerCase()===`form`}function qr(e){return Wr(e)&&e.tagName.toLowerCase()===`input`}function Jr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Yr(e,t){return e.button===0&&(!t||t===`_self`)&&!Jr(e)}function Xr(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function Zr(e,t){let n=Xr(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var Qr=null;function $r(){if(Qr===null)try{new FormData(document.createElement(`form`),0),Qr=!1}catch{Qr=!0}return Qr}var ei=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ti(e){return e!=null&&!ei.has(e)?(T(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Ur}"`),null):e}function ni(e,t){let n,r,i,a,o;if(Kr(e)){let o=e.getAttribute(`action`);r=o?ke(o,t):null,n=e.getAttribute(`method`)||`get`,i=ti(e.getAttribute(`enctype`))||Ur,a=new FormData(e)}else if(Gr(e)||qr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?ke(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||`get`,i=ti(e.getAttribute(`formenctype`))||ti(o.getAttribute(`enctype`))||Ur,a=new FormData(o,e),!$r()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(Wr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=`get`,r=null,i=Ur,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}function ri(e,t){if(e===!1||e==null)throw Error(t)}var ii={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},ai=/[&><\u2028\u2029]/g;function oi(e){return e.replace(ai,e=>ii[e])}function si(e,t){let n=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n.pathname=n.pathname.endsWith(`/`)?`${n.pathname}_.${t}`:`${n.pathname}.${t}`,n}var ci=l(h(),1),li=l(_(),1),ui=`modulepreload`,di=function(e){return`/`+e},fi={},pi=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=di(t,n),t=s(t),t in fi)return;fi[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ui,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};async function mi(e,t){if(e.id in t)return t[e.id];try{let n=await pi(()=>import(e.module),[]);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function hi(e){return e!=null&&typeof e.page==`string`}function gi(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function _i(e,t,n){return Si((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await mi(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(gi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function vi(e,t,n,r,i,a){let o=(e,t)=>!n[t]||e.route.id!==n[t].route.id,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function yi(e,t,{includeHydrateFallback:n}={}){return bi(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function bi(e){return[...new Set(e)]}function xi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function Si(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!hi(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(xi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function Ci(){let e=N.useContext(Bn);return ri(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function wi(){let e=N.useContext(Vn);return ri(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Ti=N.createContext(void 0);Ti.displayName=`FrameworkContext`;function Ei(){let e=N.useContext(Ti);return ri(e,`You must render this element inside a <HydratedRouter> element`),e}function Di(e,t){let n=N.useContext(Ti),[r,i]=N.useState(!1),[a,o]=N.useState(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:d}=t,f=N.useRef(null);N.useEffect(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]),N.useEffect(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let p=()=>{i(!0)},m=()=>{i(!1),o(!1)};return n?e===`intent`?[a,f,{onFocus:Oi(s,p),onBlur:Oi(c,m),onMouseEnter:Oi(l,p),onMouseLeave:Oi(u,m),onTouchStart:Oi(d,p)}]:[a,f,{}]:[!1,f,{}]}function Oi(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function ki({page:e,...t}){let n=Un(),{nonce:r}=Ei(),{router:i}=Ci(),a=N.useMemo(()=>oe(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),n?N.createElement(ji,{page:e,matches:a,...t}):N.createElement(Mi,{page:e,matches:a,...t})):null}function Ai(e){let{manifest:t,routeModules:n}=Ei(),[r,i]=N.useState([]);return N.useEffect(()=>{let r=!1;return _i(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function ji({page:e,matches:t,...n}){let r=ir(),i=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=si(e,`rsc`),i=!1,a=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?i=!0:a.push(e.route.id);return i&&a.length>0&&n.searchParams.set(`_routes`,a.join(`,`)),[n.pathname+n.search]},[e,r,t]);return N.createElement(N.Fragment,null,i.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function Mi({page:e,matches:t,...n}){let r=ir(),{manifest:i,routeModules:a}=Ei(),{loaderData:o,matches:s}=wi(),c=N.useMemo(()=>vi(e,t,s,i,r,`data`),[e,t,s,i,r]),l=N.useMemo(()=>vi(e,t,s,i,r,`assets`),[e,t,s,i,r]),u=N.useMemo(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,s=!1;if(t.forEach(e=>{let t=i.routes[e.route.id];!t||!t.hasLoader||(!c.some(t=>t.route.id===e.route.id)&&e.route.id in o&&a[e.route.id]?.shouldRevalidate||t.hasClientLoader?s=!0:n.add(e.route.id))}),n.size===0)return[];let l=si(e,`data`);return s&&n.size>0&&l.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[l.pathname+l.search]},[o,r,i,c,t,e,a]),d=N.useMemo(()=>yi(l,i),[l,i]),f=Ai(l);return N.createElement(N.Fragment,null,u.map(e=>N.createElement(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),d.map(e=>N.createElement(`link`,{key:e,rel:`modulepreload`,href:e,...n})),f.map(({key:e,link:t})=>N.createElement(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ni(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var Pi=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{Pi&&(window.__reactRouterVersion=`8.3.0`)}catch{}function Fi(e,t){return wt({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:C({window:t?.window}),hydrationData:t?.hydrationData||Ii(),routes:e,mapRouteProperties:ie,hydrationRouteProperties:Pr,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,instrumentations:t?.instrumentations}).initialize()}function Ii(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:Li(e.errors)}),e}function Li(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,r]of t)if(r&&r.__type===`RouteErrorResponse`)n[e]=new Ge(r.status,r.statusText,r.data,r.internal===!0);else if(r&&r.__type===`Error`){if(typeof r.__subType==`string`&&We.includes(r.__subType)){let t=window[r.__subType];if(typeof t==`function`)try{let i=new t(r.message);i.stack=``,n[e]=i}catch{}}if(n[e]==null){let t=Error(r.message);t.stack=``,n[e]=t}}else n[e]=r;return n}var Ri=N.forwardRef(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:o,state:s,target:c,to:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m){let{basename:h,navigator:g,useTransitions:_}=N.useContext(qn),y=typeof l==`string`&&v.test(l),b=Xe(l,h);l=b.to;let x=nr(l,{relative:r}),S=ir(),C=null;if(o){let e=Le(o,[],S.mask?S.mask.pathname:`/`,!0);h!==`/`&&(e.pathname=e.pathname===`/`?h:ze([h,e.pathname])),C=g.createHref(e)}let[w,T,E]=Di(n,p),D=Gi(l,{replace:a,mask:o,state:s,target:c,preventScrollReset:u,relative:r,viewTransition:d,defaultShouldRevalidate:f,useTransitions:_});function O(t){e&&e(t),t.defaultPrevented||D(t)}let k=!(b.isExternal||i),A=N.createElement(`a`,{...p,...E,href:(k?C:void 0)||b.absoluteURL||x,onClick:k?O:e,ref:Ni(m,T),target:c,"data-discover":!y&&t===`render`?`true`:void 0});return w&&!y?N.createElement(N.Fragment,null,A,N.createElement(ki,{page:x})):A});Ri.displayName=`Link`;var zi=N.forwardRef(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=dr(a,{relative:c.relative}),d=ir(),f=N.useContext(Vn),{navigator:p,basename:m}=N.useContext(qn),h=f!=null&&na(u)&&o===!0,g=p.encodeLocation?p.encodeLocation(u).pathname:u.pathname,_=d.pathname,v=f&&f.navigation&&f.navigation.location?f.navigation.location.pathname:null;t||(_=_.toLowerCase(),v=v?v.toLowerCase():null,g=g.toLowerCase()),v&&m&&(v=ke(v,m)||v);let y=g!==`/`&&g.endsWith(`/`)?g.length-1:g.length,b=_===g||!r&&_.startsWith(g)&&_.charAt(y)===`/`,x=v!=null&&(v===g||!r&&v.startsWith(g)&&v.charAt(y)===`/`),S={isActive:b,isPending:x,isTransitioning:h},C=b?e:void 0,w;w=typeof n==`function`?n(S):[n,b?`active`:null,x?`pending`:null,h?`transitioning`:null].filter(Boolean).join(` `);let T=typeof i==`function`?i(S):i;return N.createElement(Ri,{...c,"aria-current":C,className:w,ref:l,style:T,to:a,viewTransition:o},typeof s==`function`?s(S):s)});zi.displayName=`NavLink`;var Bi=N.forwardRef(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=`get`,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f,...p},m)=>{let{useTransitions:h}=N.useContext(qn),g=Yi(),_=Xi(s,{relative:l}),y=o.toLowerCase()===`get`?`get`:`post`,b=typeof s==`string`&&v.test(s);return N.createElement(`form`,{ref:m,method:y,action:_,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,p=()=>g(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:f});h&&n!==!1?N.startTransition(()=>p()):p()},...p,"data-discover":!b&&e===`render`?`true`:void 0})});Bi.displayName=`Form`;function Vi({getKey:e,storageKey:t,...n}){let r=N.useContext(Ti),{basename:i}=N.useContext(qn),a=ir(),o=Dr();ea({getKey:e,storageKey:t});let s=N.useMemo(()=>{if(!r||!e)return null;let t=$i(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),N.createElement(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${oi(JSON.stringify(t||Zi))}, ${oi(JSON.stringify(s))})`}})}Vi.displayName=`ScrollRestoration`;function Hi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ui(e){let t=N.useContext(Bn);return w(t,Hi(e)),t}function Wi(e){let t=N.useContext(Vn);return w(t,Hi(e)),t}function Gi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:l}={}){let u=or(),d=ir(),f=dr(e,{relative:o});return N.useCallback(p=>{if(Yr(p,t)){p.preventDefault();let t=n===void 0?k(d)===k(f):n,m=()=>u(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});l?N.startTransition(()=>m()):m()}},[d,u,f,n,r,i,t,e,a,o,s,c,l])}function Ki(e){T(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=N.useRef(Xr(e)),n=N.useRef(!1),r=ir(),i=N.useMemo(()=>Zr(r.search,n.current?null:t.current),[r.search]),a=or();return[i,N.useCallback((e,t)=>{let r=Xr(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var qi=0,Ji=()=>`__${String(++qi)}__`;function Yi(){let{router:e}=Ui(`useSubmit`),{basename:t}=N.useContext(qn),n=Tr(),r=e.fetch,i=e.navigate;return N.useCallback(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ni(e,t);a.navigate===!1?await r(a.fetcherKey||Ji(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Xi(e,{relative:t}={}){let{basename:n}=N.useContext(qn),r=N.useContext(Yn);w(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...dr(e||`.`,{relative:t})},o=ir();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:ze([n,a.pathname])),k(a)}var Zi=`react-router-scroll-positions`,Qi={};function $i(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:ke(e.pathname,n)||e.pathname},t)),i??=e.key,i}function ea({getKey:e,storageKey:t}={}){let{router:n}=Ui(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Wi(`useScrollRestoration`),{basename:a}=N.useContext(qn),o=ir(),s=Dr(),c=Er();N.useEffect(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),ta(N.useCallback(()=>{if(c.state===`idle`){let t=$i(o,s,a,e);Qi[t]=window.scrollY}try{sessionStorage.setItem(t||Zi,JSON.stringify(Qi))}catch(e){T(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(N.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(t||Zi);e&&(Qi=JSON.parse(e))}catch{}},[t]),N.useLayoutEffect(()=>{let t=n?.enableScrollRestoration(Qi,()=>window.scrollY,e?(t,n)=>$i(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),N.useLayoutEffect(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{T(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function ta(e,t){let{capture:n}=t||{};N.useEffect(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function na(e,{relative:t}={}){let n=N.useContext(Wn);w(n!=null,"`useViewTransitionState` must be used within `react-router/dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=Ui(`useViewTransitionState`),i=dr(e,{relative:t});if(!n.isTransitioning)return!1;let a=ke(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=ke(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Te(i.pathname,o)!=null||Te(i.pathname,a)!=null}var ra=Object.defineProperty,ia=(e,t)=>ra(e,`name`,{value:t,configurable:!0});function aa(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}ia(aa,`setRef`);function oa(...e){return t=>{let n=!1,r=e.map(e=>{let r=aa(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():aa(e[t],null)}}}}ia(oa,`composeRefs`);function sa(...e){return N.useCallback(oa(...e),e)}ia(sa,`useComposedRefs`);var ca=Object.defineProperty,la=(e,t)=>ca(e,`name`,{value:t,configurable:!0});function ua(e){let t=N.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];ya(r)&&typeof Ca==`function`&&(r=Ca(r._payload)),N.Children.forEach(r,e=>{if(_a(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;ya(n)&&typeof Ca==`function`&&(n=Ca(n._payload)),a=ma(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=N.cloneElement(a,void 0,s):!o&&N.Children.count(r)===1&&N.isValidElement(r)&&(a=r);let c=a?ga(a):void 0,l=sa(n,c);if(!a){if(r||r===0)throw Error(o?Sa(e):xa(e));return r}let u=ha(i,a.props??{});return a.type!==N.Fragment&&(u.ref=n?l:c),N.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}la(ua,`createSlot`);var da=ua(`Slot`),fa=Symbol.for(`radix.slottable`);function pa(e){let t=la(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=fa,t}la(pa,`createSlottable`);var ma=la((e,t)=>{if(`child`in e.props){let t=e.props.child;return N.isValidElement(t)?N.cloneElement(t,void 0,e.props.children(t.props.children)):null}return N.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function ha(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}la(ha,`mergeProps`);function ga(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}la(ga,`getElementRef`);function _a(e){return N.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===fa}la(_a,`isSlottable`);var va=Symbol.for(`react.lazy`);function ya(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===va&&`_payload`in e&&ba(e._payload)}la(ya,`isLazyComponent`);function ba(e){return typeof e==`object`&&!!e&&`then`in e}la(ba,`isPromiseLike`);var xa=la(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),Sa=la(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),Ca=N.use,wa=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Ta=o(((e,t)=>{t.exports=wa()})),L=Ta(),Ea=Object.defineProperty,Da=(e,t)=>Ea(e,`name`,{value:t,configurable:!0}),Oa=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=ua(`Primitive.${t}`),r=N.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,L.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ka(e,t){e&&ci.flushSync(()=>e.dispatchEvent(t))}Da(ka,`dispatchDiscreteCustomEvent`);var Aa=Object.defineProperty,ja=(e,t)=>Aa(e,`name`,{value:t,configurable:!0}),Ma=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`}),Na=N.forwardRef(ja(function(e,t){return(0,L.jsx)(Oa.span,{...e,ref:t,style:{...Ma,...e.style}})},`VisuallyHidden`)),Pa=Object.defineProperty,Fa=((e,t)=>Pa(e,`name`,{value:t,configurable:!0}))(({children:e,label:t})=>{let n=N.Children.only(e);return(0,L.jsxs)(L.Fragment,{children:[N.cloneElement(n,{"aria-hidden":`true`,focusable:`false`}),(0,L.jsx)(Na,{children:t})]})},`AccessibleIcon`),Ia=Object.defineProperty,La=(e,t)=>Ia(e,`name`,{value:t,configurable:!0});function Ra(e,t){let n=N.createContext(t);n.displayName=e+`Context`;let r=La(e=>{let{children:t,...r}=e,i=N.useMemo(()=>r,Object.values(r));return(0,L.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=N.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return La(i,`useContext`),[r,i]}La(Ra,`createContext`);function za(e,t=[]){let n=[];function r(t,r){let i=N.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=La(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=N.useMemo(()=>o,Object.values(o));return(0,L.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=N.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return La(s,`useContext`),[o,s]}La(r,`createContext`);let i=La(()=>{let t=n.map(e=>N.createContext(e));return La(function(n){let r=n?.[e]||t;return N.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,Ba(i,...t)]}La(za,`createContextScope`);function Ba(...e){let t=e[0];if(e.length===1)return t;let n=La(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return La(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return N.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}La(Ba,`composeContextScopes`);var Va=Object.defineProperty,Ha=(e,t)=>Va(e,`name`,{value:t,configurable:!0});function Ua(e){let t=e+`CollectionProvider`,[n,r]=za(t),[i,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),o=Ha(e=>{let{scope:t,children:n}=e,r=N.useRef(null),a=N.useRef(new Map).current;return(0,L.jsx)(i,{scope:t,itemMap:a,collectionRef:r,children:n})},`CollectionProvider`);o.displayName=t;let s=e+`CollectionSlot`,c=ua(s),l=N.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=sa(t,a(s,n).collectionRef);return(0,L.jsx)(c,{ref:i,children:r})});l.displayName=s;let u=e+`CollectionItemSlot`,d=`data-radix-collection-item`,f=ua(u),p=N.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=N.useRef(null),s=sa(t,o),c=a(u,n);return N.useEffect(()=>(c.itemMap.set(o,{ref:o,...i}),()=>void c.itemMap.delete(o))),(0,L.jsx)(f,{[d]:``,ref:s,children:r})});p.displayName=u;function m(t){let n=a(e+`CollectionConsumer`,t);return N.useCallback(()=>{let e=n.collectionRef.current;if(!e)return[];let t=Array.from(e.querySelectorAll(`[${d}]`));return Array.from(n.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[n.collectionRef,n.itemMap])}return Ha(m,`useCollection`),[{Provider:o,Slot:l,ItemSlot:p},m,r]}Ha(Ua,`createCollection`);var Wa=new WeakMap,Ga=class e extends Map{static{Ha(this,`OrderedDict`)}#e;constructor(e){super(e),this.#e=[...super.keys()],Wa.set(this,!0)}set(e,t){return Wa.get(this)&&(this.has(e)?this.#e[this.#e.indexOf(e)]=e:this.#e.push(e)),super.set(e,t),this}insert(e,t,n){let r=this.has(t),i=this.#e.length,a=Ja(e),o=a>=0?a:i+a,s=o<0||o>=i?-1:o;if(s===this.size||r&&s===this.size-1||s===-1)return this.set(t,n),this;let c=this.size+ +!r;a<0&&o++;let l=[...this.#e],u,d=!1;for(let e=o;e<c;e++)if(o===e){let i=l[e];l[e]===t&&(i=l[e+1]),r&&this.delete(t),u=this.get(i),this.set(t,n)}else{!d&&l[e-1]===t&&(d=!0);let n=l[d?e:e-1],r=u;u=this.get(n),this.delete(n),this.set(n,r)}return this}with(t,n,r){let i=new e(this);return i.insert(t,n,r),i}before(e){let t=this.#e.indexOf(e)-1;if(!(t<0))return this.entryAt(t)}setBefore(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r,t,n)}after(e){let t=this.#e.indexOf(e);if(t=t===-1||t===this.size-1?-1:t+1,t!==-1)return this.entryAt(t)}setAfter(e,t,n){let r=this.#e.indexOf(e);return r===-1?this:this.insert(r+1,t,n)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(e){let t=super.delete(e);return t&&this.#e.splice(this.#e.indexOf(e),1),t}deleteAt(e){let t=this.keyAt(e);return t!==void 0&&this.delete(t)}at(e){let t=Ka(this.#e,e);if(t!==void 0)return this.get(t)}entryAt(e){let t=Ka(this.#e,e);if(t!==void 0)return[t,this.get(t)]}indexOf(e){return this.#e.indexOf(e)}keyAt(e){return Ka(this.#e,e)}from(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.at(r)}keyFrom(e,t){let n=this.indexOf(e);if(n===-1)return;let r=n+t;return r<0&&(r=0),r>=this.size&&(r=this.size-1),this.keyAt(r)}find(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return r;n++}}findIndex(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return n;n++}return-1}filter(t,n){let r=[],i=0;for(let e of this)Reflect.apply(t,n,[e,i,this])&&r.push(e),i++;return new e(r)}map(t,n){let r=[],i=0;for(let e of this)r.push([e[0],Reflect.apply(t,n,[e,i,this])]),i++;return new e(r)}reduce(...e){let[t,n]=e,r=0,i=n??this.at(0);for(let n of this)i=r===0&&e.length===1?n:Reflect.apply(t,this,[i,n,r,this]),r++;return i}reduceRight(...e){let[t,n]=e,r=n??this.at(-1);for(let n=this.size-1;n>=0;n--){let i=this.at(n);r=n===this.size-1&&e.length===1?i:Reflect.apply(t,this,[r,i,n,this])}return r}toSorted(t){let n=[...this.entries()].sort(t);return new e(n)}toReversed(){let t=new e;for(let e=this.size-1;e>=0;e--){let n=this.keyAt(e),r=this.get(n);t.set(n,r)}return t}toSpliced(...t){let n=[...this.entries()];return n.splice(...t),new e(n)}slice(t,n){let r=new e,i=this.size-1;if(t===void 0)return r;t<0&&(t+=this.size),n!==void 0&&n>0&&(i=n-1);for(let e=t;e<=i;e++){let t=this.keyAt(e),n=this.get(t);r.set(t,n)}return r}every(e,t){let n=0;for(let r of this){if(!Reflect.apply(e,t,[r,n,this]))return!1;n++}return!0}some(e,t){let n=0;for(let r of this){if(Reflect.apply(e,t,[r,n,this]))return!0;n++}return!1}};function Ka(e,t){if(`at`in Array.prototype)return Array.prototype.at.call(e,t);let n=qa(e,t);return n===-1?void 0:e[n]}Ha(Ka,`at`);function qa(e,t){let n=e.length,r=Ja(t),i=r>=0?r:n+r;return i<0||i>=n?-1:i}Ha(qa,`toSafeIndex`);function Ja(e){return e!==e||e===0?0:Math.trunc(e)}Ha(Ja,`toSafeInteger`);function Ya(e){let t=e+`CollectionProvider`,[n,r]=za(t),[i,a]=n(t,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new Ga,setItemMap:Ha(()=>void 0,`setItemMap`)}),o=Ha(({state:e,...t})=>e?(0,L.jsx)(c,{...t,state:e}):(0,L.jsx)(s,{...t}),`CollectionProvider`);o.displayName=t;let s=Ha(e=>{let t=h();return(0,L.jsx)(c,{...e,state:t})},`CollectionInit`);s.displayName=t+`Init`;let c=Ha(e=>{let{scope:t,children:n,state:r}=e,a=N.useRef(null),[o,s]=N.useState(null),c=sa(a,s),[l,u]=r;return N.useEffect(()=>{if(!o)return;let e=$a(()=>{});return e.observe(o,{childList:!0,subtree:!0}),()=>{e.disconnect()}},[o]),(0,L.jsx)(i,{scope:t,itemMap:l,setItemMap:u,collectionRef:c,collectionRefObject:a,collectionElement:o,children:n})},`CollectionProviderImpl`);c.displayName=t+`Impl`;let l=e+`CollectionSlot`,u=ua(l),d=N.forwardRef((e,t)=>{let{scope:n,children:r}=e,i=sa(t,a(l,n).collectionRef);return(0,L.jsx)(u,{ref:i,children:r})});d.displayName=l;let f=e+`CollectionItemSlot`,p=ua(f),m=N.forwardRef((e,t)=>{let{scope:n,children:r,...i}=e,o=N.useRef(null),[s,c]=N.useState(null),l=sa(t,o,c),{setItemMap:u}=a(f,n),d=N.useRef(i);Xa(d.current,i)||(d.current=i);let m=d.current;return N.useEffect(()=>{let e=m;return u(t=>s?t.has(s)?t.set(s,{...e,element:s}).toSorted(Qa):(t.set(s,{...e,element:s}),t.toSorted(Qa)):t),()=>{u(e=>!s||!e.has(s)?e:(e.delete(s),new Ga(e)))}},[s,m,u]),(0,L.jsx)(p,{"data-radix-collection-item":``,ref:l,children:r})});m.displayName=f;function h(){return N.useState(new Ga)}Ha(h,`useInitCollection`);function g(t){let{itemMap:n}=a(e+`CollectionConsumer`,t);return n}return Ha(g,`useCollection`),[{Provider:o,Slot:d,ItemSlot:m},{createCollectionScope:r,useCollection:g,useInitCollection:h}]}Ha(Ya,`createCollection`);function Xa(e,t){if(e===t)return!0;if(typeof e!=`object`||typeof t!=`object`||e==null||t==null)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||e[r]!==t[r])return!1;return!0}Ha(Xa,`shallowEqual`);function Za(e,t){return!!(t.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}Ha(Za,`isElementPreceding`);function Qa(e,t){return!e[1].element||!t[1].element?0:Za(e[1].element,t[1].element)?-1:1}Ha(Qa,`sortByDocumentPosition`);function $a(e){return new MutationObserver(t=>{for(let n of t)if(n.type===`childList`){e();return}})}Ha($a,`getChildListObserver`);var eo=Object.defineProperty,to=(e,t)=>eo(e,`name`,{value:t,configurable:!0}),no=!!(typeof window<`u`&&window.document&&window.document.createElement);function R(e,t,{checkForDefaultPrevented:n=!0}={}){return to(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}to(R,`composeEventHandlers`);function ro(e){if(!no)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}to(ro,`getOwnerWindow`);function io(e){if(!no)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}to(io,`getOwnerDocument`);function ao(e,t=!1){let{activeElement:n}=io(e);if(!n?.nodeName)return null;if(oo(n)&&n.contentDocument)return ao(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=io(n).getElementById(e);if(t)return t}}return n}to(ao,`getActiveElement`);function oo(e){return e.tagName===`IFRAME`}to(oo,`isFrame`);var so=globalThis?.document?N.useLayoutEffect:()=>{},co=Object.defineProperty,lo=(e,t)=>co(e,`name`,{value:t,configurable:!0}),uo=N.useEffectEvent,fo=N.useInsertionEffect;function po(e){if(typeof uo==`function`)return uo(e);let t=N.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof fo==`function`?fo(()=>{t.current=e}):so(()=>{t.current=e}),N.useMemo(()=>((...e)=>t.current?.(...e)),[])}lo(po,`useEffectEvent`);var mo=Object.defineProperty,ho=(e,t)=>mo(e,`name`,{value:t,configurable:!0}),go=N.useInsertionEffect||so;function _o({prop:e,defaultProp:t,onChange:n=ho(()=>{},`onChange`),caller:r}){let[i,a,o]=vo({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,N.useCallback(t=>{if(s){let n=yo(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}ho(_o,`useControllableState`);function vo({defaultProp:e,onChange:t}){let[n,r]=N.useState(e),i=N.useRef(n),a=N.useRef(t);return go(()=>{a.current=t},[t]),N.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}ho(vo,`useUncontrolledState`);function yo(e){return typeof e==`function`}ho(yo,`isFunction`);var bo=Symbol(`RADIX:SYNC_STATE`);function xo(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=po(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=N.useReducer((t,n)=>{if(n.type===bo)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=N.useRef(p);N.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=N.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return N.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:bo,state:i})},[i,d.state,c]),[h,f]}ho(xo,`useControllableStateReducer`);var So=Object.defineProperty,Co=(e,t)=>So(e,`name`,{value:t,configurable:!0});function wo(e,t){return N.useReducer((e,n)=>t[e][n]??e,e)}Co(wo,`useStateMachine`);var To=Co(e=>{let{present:t,children:n}=e,r=Eo(t),i=typeof n==`function`?n({present:r.isPresent}):N.Children.only(n),a=Oo(r.ref,Ao(i));return typeof n==`function`||r.isPresent?N.cloneElement(i,{ref:a}):null},`Presence`);function Eo(e){let[t,n]=N.useState(),r=N.useRef(null),i=N.useRef(e),a=N.useRef(`none`),o=N.useRef(void 0),[s,c]=wo(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return N.useEffect(()=>{s===`mounted`?(a.current=o.current??ko(r.current),o.current=void 0):a.current=`none`},[s]),so(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=ko(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),so(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Co(a=>{let o=ko(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Co(e=>{e.target===t&&(a.current=ko(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:N.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=ko(t)}else r.current=null;n(e)},[])}}Co(Eo,`usePresence`);function Do(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Co(Do,`setRef`);function Oo(...e){let t=N.useRef(e);return t.current=e,N.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Do(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Do(n[e],null)}}},[])}Co(Oo,`useStableComposedRefs`);function ko(e){return e?.animationName||`none`}Co(ko,`getAnimationName`);function Ao(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Co(Ao,`getElementRef`);var jo=Object.defineProperty,Mo=(e,t)=>jo(e,`name`,{value:t,configurable:!0}),No=N.useId||(()=>void 0),Po=0;function Fo(e){let[t,n]=N.useState(No());return so(()=>{e||n(e=>e??String(Po++))},[e]),e||(t?`radix-${t}`:``)}Mo(Fo,`useId`);var Io=Object.defineProperty,Lo=(e,t)=>Io(e,`name`,{value:t,configurable:!0}),Ro=N.createContext(void 0);function zo(e){let t=N.useContext(Ro);return e||t||`ltr`}Lo(zo,`useDirection`);var Bo=Object.defineProperty,Vo=(e,t)=>Bo(e,`name`,{value:t,configurable:!0});function Ho(e){let t=N.useRef(e);return N.useEffect(()=>{t.current=e}),N.useMemo(()=>((...e)=>t.current?.(...e)),[])}Vo(Ho,`useCallbackRef`);var Uo=Object.defineProperty,Wo=(e,t)=>Uo(e,`name`,{value:t,configurable:!0}),Go=`dismissableLayer.update`,Ko=`dismissableLayer.pointerDownOutside`,qo=`dismissableLayer.focusOutside`,Jo,Yo=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),Xo=N.forwardRef(Wo(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=N.useContext(Yo),[d,f]=N.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=N.useState({}),h=sa(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=N.useRef(!1),C=$o(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:N.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=es(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=Ho(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return N.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),N.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Jo=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),ts(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=Jo))}},[d,p,n,u]),N.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),ts())},[d,u]),N.useEffect(()=>{let e=Wo(()=>m({}),`handleUpdate`);return document.addEventListener(Go,e),()=>document.removeEventListener(Go,e)},[]),(0,L.jsx)(Oa.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:R(e.onFocusCapture,w.onFocusCapture),onBlurCapture:R(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:R(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function Zo(){let e=N.useContext(Yo),[t,n]=N.useState(null);return N.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Wo(Zo,`useDismissableLayerSurface`);var Qo=Wo(()=>!0,`IS_TRUE`);function $o(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=Qo}=t,s=Ho(e),c=N.useRef(!1),l=N.useRef(!1),u=N.useRef(new Map),d=N.useRef(()=>{});return N.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Wo(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Wo(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Wo(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Wo(p,`handleInteractionBubble`);let m=Wo(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||ns(Ko,s,p,{discrete:!0})};if(Wo(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Wo(()=>c.current=!0,`onPointerDownCapture`)}}Wo($o,`usePointerDownOutside`);function es(e,t=globalThis?.document){let n=Ho(e),r=N.useRef(!1);return N.useEffect(()=>{let e=Wo(e=>{e.target&&!r.current&&ns(qo,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Wo(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Wo(()=>r.current=!1,`onBlurCapture`)}}Wo(es,`useFocusOutside`);function ts(){let e=new CustomEvent(Go);document.dispatchEvent(e)}Wo(ts,`dispatchUpdate`);function ns(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?ka(i,a):i.dispatchEvent(a)}Wo(ns,`handleAndDispatchCustomEvent`);var rs=Object.defineProperty,is=(e,t)=>rs(e,`name`,{value:t,configurable:!0}),as=`focusScope.autoFocusOnMount`,os=`focusScope.autoFocusOnUnmount`,ss={bubbles:!1,cancelable:!0},cs=N.forwardRef(is(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=N.useState(null),l=Ho(i),u=Ho(a),d=N.useRef(null),f=sa(t,c),p=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(r){let e=function(e){if(p.paused||!s)return;let t=e.target;s.contains(t)?d.current=t:hs(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||hs(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&hs(s)};is(e,`handleFocusIn`),is(t,`handleFocusOut`),is(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,p.paused]),N.useEffect(()=>{if(s){gs.add(p);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(as,ss);s.addEventListener(as,l),s.dispatchEvent(t),t.defaultPrevented||(ls(ys(ds(s)),{select:!0}),document.activeElement===e&&hs(s))}return()=>{s.removeEventListener(as,l),setTimeout(()=>{let t=new CustomEvent(os,ss);s.addEventListener(os,u),s.dispatchEvent(t),t.defaultPrevented||hs(e??document.body,{select:!0}),s.removeEventListener(os,u),gs.remove(p)},0)}}},[s,l,u,p]);let m=N.useCallback(e=>{if(!n&&!r||p.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=us(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&hs(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&hs(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,p.paused]);return(0,L.jsx)(Oa.div,{tabIndex:-1,...o,ref:f,onKeyDown:m})},`FocusScope`));function ls(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(hs(r,{select:t}),document.activeElement!==n)return}is(ls,`focusFirst`);function us(e){let t=ds(e);return[fs(t,e),fs(t.reverse(),e)]}is(us,`getTabbableEdges`);function ds(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:is(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}is(ds,`getTabbableCandidates`);function fs(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ps(r,{upTo:t})))return r}is(fs,`findVisible`);function ps(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}is(ps,`isHidden`);function ms(e){return e instanceof HTMLInputElement&&`select`in e}is(ms,`isSelectableInput`);function hs(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&ms(e)&&t&&e.select()}}is(hs,`focus`);var gs=_s();function _s(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=vs(e,t),e.unshift(t)},remove(t){e=vs(e,t),e[0]?.resume()}}}is(_s,`createFocusScopesStack`);function vs(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}is(vs,`arrayRemove`);function ys(e){return e.filter(e=>e.tagName!==`A`)}is(ys,`removeLinks`);var bs=Object.defineProperty,xs=N.forwardRef(((e,t)=>bs(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=N.useState(!1);so(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ci.createPortal((0,L.jsx)(Oa.div,{...r,ref:t}),o):null},`Portal`)),Ss=xs,Cs=Object.defineProperty,ws=(e,t)=>Cs(e,`name`,{value:t,configurable:!0}),Ts=0,Es=null;function Ds(e){return Os(),e.children}ws(Ds,`FocusGuards`);function Os(){N.useEffect(()=>{Es||={start:ks(),end:ks()};let{start:e,end:t}=Es;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ts++,()=>{Ts===1&&(Es?.start.remove(),Es?.end.remove(),Es=null),Ts=Math.max(0,Ts-1)}},[])}ws(Os,`useFocusGuards`);function ks(){let 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}ws(ks,`createFocusGuard`);var As=function(){return As=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},As.apply(this,arguments)};function js(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 Ms(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Ns=`right-scroll-bar-position`,Ps=`width-before-scroll-bar`,Fs=`with-scroll-bars-hidden`,Is=`--removed-body-scroll-bar-size`;function Ls(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Rs(e,t){var n=(0,N.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var zs=typeof window<`u`?N.useLayoutEffect:N.useEffect,Bs=new WeakMap;function Vs(e,t){var n=Rs(t||null,function(t){return e.forEach(function(e){return Ls(e,t)})});return zs(function(){var t=Bs.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ls(e,null)}),i.forEach(function(e){r.has(e)||Ls(e,a)})}Bs.set(n,e)},[e]),n}function Hs(e){return e}function Us(e,t){t===void 0&&(t=Hs);var n=[],r=!1;return{read:function(){if(r)throw 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(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ws(e){e===void 0&&(e={});var t=Us(null);return t.options=As({async:!0,ssr:!1},e),t}var Gs=function(e){var t=e.sideCar,n=js(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return N.createElement(r,As({},n))};Gs.isSideCarExport=!0;function Ks(e,t){return e.useMedium(t),Gs}var qs=Ws(),Js=function(){},Ys=N.forwardRef(function(e,t){var n=N.useRef(null),r=N.useState({onScrollCapture:Js,onWheelCapture:Js,onTouchMoveCapture:Js}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=js(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Vs([n,t]),C=As(As({},b),i);return N.createElement(N.Fragment,null,u&&N.createElement(x,{sideCar:qs,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?N.cloneElement(N.Children.only(s),As(As({},C),{ref:S})):N.createElement(v,As({},C,{className:c,ref:S}),s))});Ys.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Ys.classNames={fullWidth:Ps,zeroRight:Ns};var Xs,Zs=function(){if(Xs)return Xs;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function Qs(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=Zs();return t&&e.setAttribute(`nonce`,t),e}function $s(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ec(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var tc=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qs())&&($s(t,n),ec(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},nc=function(){var e=tc();return function(t,n){N.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rc=function(){var e=nc();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ic={left:0,top:0,right:0,gap:0},ac=function(e){return parseInt(e||``,10)||0},oc=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[ac(n),ac(r),ac(i)]},sc=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ic;var t=oc(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])}},cc=rc(),lc=`data-scroll-locked`,uc=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
11
- .${Fs} {
12
- overflow: hidden ${r};
13
- padding-right: ${s}px ${r};
14
- }
15
- body[${lc}] {
16
- overflow: hidden ${r};
17
- overscroll-behavior: contain;
18
- ${[t&&`position: relative ${r};`,n===`margin`&&`
19
- padding-left: ${i}px;
20
- padding-top: ${a}px;
21
- padding-right: ${o}px;
22
- margin-left:0;
23
- margin-top:0;
24
- margin-right: ${s}px ${r};
25
- `,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
26
- }
27
-
28
- .${Ns} {
29
- right: ${s}px ${r};
30
- }
31
-
32
- .${Ps} {
33
- margin-right: ${s}px ${r};
34
- }
35
-
36
- .${Ns} .${Ns} {
37
- right: 0 ${r};
38
- }
39
-
40
- .${Ps} .${Ps} {
41
- margin-right: 0 ${r};
42
- }
43
-
44
- body[${lc}] {
45
- ${Is}: ${s}px;
46
- }
47
- `},dc=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},fc=function(){N.useEffect(function(){return document.body.setAttribute(lc,(dc()+1).toString()),function(){var e=dc()-1;e<=0?document.body.removeAttribute(lc):document.body.setAttribute(lc,e.toString())}},[])},pc=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;fc();var a=N.useMemo(function(){return sc(i)},[i]);return N.createElement(cc,{styles:uc(a,!t,i,n?``:`!important`)})},mc=!1;if(typeof window<`u`)try{var hc=Object.defineProperty({},"passive",{get:function(){return mc=!0,!0}});window.addEventListener(`test`,hc,hc),window.removeEventListener(`test`,hc,hc)}catch{mc=!1}var gc=mc?{passive:!1}:!1,_c=function(e){return e.tagName===`TEXTAREA`},vc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!_c(e)&&n[t]===`visible`)},yc=function(e){return vc(e,`overflowY`)},bc=function(e){return vc(e,`overflowX`)},xc=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),wc(e,r)){var i=Tc(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Sc=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Cc=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},wc=function(e,t){return e===`v`?yc(t):bc(t)},Tc=function(e,t){return e===`v`?Sc(t):Cc(t)},Ec=function(e,t){return e===`h`&&t===`rtl`?-1:1},Dc=function(e,t,n,r,i){var a=Ec(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Tc(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&wc(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},Oc=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},kc=function(e){return[e.deltaX,e.deltaY]},Ac=function(e){return e&&`current`in e?e.current:e},jc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mc=function(e){return`
48
- .block-interactivity-${e} {pointer-events: none;}
49
- .allow-interactivity-${e} {pointer-events: all;}
50
- `},Nc=0,Pc=[];function Fc(e){var t=N.useRef([]),n=N.useRef([0,0]),r=N.useRef(),i=N.useState(Nc++)[0],a=N.useState(rc)[0],o=N.useRef(e);N.useEffect(function(){o.current=e},[e]),N.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Ms([e.lockRef.current],(e.shards||[]).map(Ac),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=N.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=Oc(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=xc(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=xc(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Dc(h,t,e,h===`h`?s:c,!0)},[]),c=N.useCallback(function(e){var n=e;if(!(!Pc.length||Pc[Pc.length-1]!==a)){var r=`deltaY`in n?kc(n):Oc(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&jc(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Ac).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=N.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Ic(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=N.useCallback(function(e){n.current=Oc(e),r.current=void 0},[]),d=N.useCallback(function(t){l(t.type,kc(t),t.target,s(t,e.lockRef.current))},[]),f=N.useCallback(function(t){l(t.type,Oc(t),t.target,s(t,e.lockRef.current))},[]);N.useEffect(function(){return Pc.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,gc),document.addEventListener(`touchmove`,c,gc),document.addEventListener(`touchstart`,u,gc),function(){Pc=Pc.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,gc),document.removeEventListener(`touchmove`,c,gc),document.removeEventListener(`touchstart`,u,gc)}},[]);var p=e.removeScrollBar,m=e.inert;return N.createElement(N.Fragment,null,m?N.createElement(a,{styles:Mc(i)}):null,p?N.createElement(pc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ic(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Lc=Ks(qs,Fc),Rc=N.forwardRef(function(e,t){return N.createElement(Ys,As({},e,{ref:t,sideCar:Lc}))});Rc.classNames=Ys.classNames;var zc=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Bc=new WeakMap,Vc=new WeakMap,Hc={},Uc=0,Wc=function(e){return e&&(e.host||Wc(e.parentNode))},Gc=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Wc(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Kc=function(e,t,n,r){var i=Gc(t,Array.isArray(e)?e:[e]);Hc[n]||(Hc[n]=new WeakMap);var a=Hc[n],o=[],s=new Set,c=new Set(i),l=function(e){!e||s.has(e)||(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){!e||c.has(e)||Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(Bc.get(e)||0)+1,l=(a.get(e)||0)+1;Bc.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Vc.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),Uc++,function(){o.forEach(function(e){var t=Bc.get(e)-1,i=a.get(e)-1;Bc.set(e,t),a.set(e,i),t||(Vc.has(e)||e.removeAttribute(r),Vc.delete(e)),i||e.removeAttribute(n)}),Uc--,Uc||(Bc=new WeakMap,Bc=new WeakMap,Vc=new WeakMap,Hc={})}},qc=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||zc(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Kc(r,i,n,`aria-hidden`)):function(){return null}},Jc=Object.defineProperty,Yc=(e,t)=>Jc(e,`name`,{value:t,configurable:!0}),Xc=`Dialog`,[Zc,Qc]=za(Xc),[$c,el]=Zc(Xc),tl=Yc(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=N.useRef(null),c=N.useRef(null),[l,u]=_o({prop:r,defaultProp:i??!1,onChange:a,caller:Xc}),[d,f]=N.useState(0),[p,m]=N.useState(0);return(0,L.jsx)($c,{scope:t,triggerRef:s,contentRef:c,contentId:Fo(),titleId:Fo(),descriptionId:Fo(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:N.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),nl=`DialogTrigger`,rl=N.forwardRef(Yc(function(e,t){let{__scopeDialog:n,...r}=e,i=el(nl,n),a=sa(t,i.triggerRef);return(0,L.jsx)(Oa.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Cl(i.open),...r,ref:a,onClick:R(e.onClick,i.onOpenToggle)})},`DialogTrigger`)),il=`DialogPortal`,[al,ol]=Zc(il,{forceMount:void 0}),sl=Yc(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=el(il,t);return(0,L.jsx)(al,{scope:t,forceMount:n,children:N.Children.map(r,e=>(0,L.jsx)(To,{present:n||a.open,children:(0,L.jsx)(xs,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),cl=`DialogOverlay`,ll=N.forwardRef(Yc(function(e,t){let n=ol(cl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=el(cl,e.__scopeDialog);return a.modal?(0,L.jsx)(To,{present:r||a.open,children:(0,L.jsx)(dl,{...i,ref:t})}):null},`DialogOverlay`)),ul=ua(`DialogOverlay.RemoveScroll`),dl=N.forwardRef(Yc(function(e,t){let{__scopeDialog:n,...r}=e,i=el(cl,n),a=sa(t,Zo());return(0,L.jsx)(Rc,{as:ul,allowPinchZoom:!0,shards:[i.contentRef],children:(0,L.jsx)(Oa.div,{"data-state":Cl(i.open),...r,ref:a,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),fl=`DialogContent`,pl=N.forwardRef(Yc(function(e,t){let n=ol(fl,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=el(fl,e.__scopeDialog);return(0,L.jsx)(To,{present:r||a.open,children:a.modal?(0,L.jsx)(ml,{...i,ref:t}):(0,L.jsx)(hl,{...i,ref:t})})},`DialogContent`)),ml=N.forwardRef(Yc(function(e,t){let n=el(fl,e.__scopeDialog),r=N.useRef(null),i=sa(t,n.contentRef,r);return N.useEffect(()=>{let e=r.current;if(e)return qc(e)},[]),(0,L.jsx)(gl,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),hl=N.forwardRef(Yc(function(e,t){let n=el(fl,e.__scopeDialog),r=N.useRef(!1),i=N.useRef(!1);return(0,L.jsx)(gl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),gl=N.forwardRef(Yc(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=el(fl,n);return Os(),(0,L.jsx)(L.Fragment,{children:(0,L.jsx)(cs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(Xo,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":Cl(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),_l=`DialogTitle`,vl=N.forwardRef(Yc(function(e,t){let{__scopeDialog:n,...r}=e,i=el(_l,n),{setTitleCount:a}=i;return so(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(Oa.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),yl=`DialogDescription`,bl=N.forwardRef(Yc(function(e,t){let{__scopeDialog:n,...r}=e,i=el(yl,n),{setDescriptionCount:a}=i;return so(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,L.jsx)(Oa.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),xl=`DialogClose`,Sl=N.forwardRef(Yc(function(e,t){let{__scopeDialog:n,...r}=e,i=el(xl,n);return(0,L.jsx)(Oa.button,{type:`button`,...r,ref:t,onClick:R(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function Cl(e){return e?`open`:`closed`}Yc(Cl,`getState`);var wl=Object.defineProperty,Tl=(e,t)=>wl(e,`name`,{value:t,configurable:!0}),El=`Avatar`,[Dl,Ol]=za(El),kl=[0,()=>void 0],[Al,jl]=Dl(El),Ml=N.forwardRef(Tl(function(e,t){let{__scopeAvatar:n,...r}=e,[i,a]=N.useState(`idle`),[o,s]=zl();return(0,L.jsx)(Al,{scope:n,imageLoadingStatus:i,setImageLoadingStatus:a,imageCount:o,setImageCount:s,children:(0,L.jsx)(Oa.span,{...r,ref:t})})},`Avatar`)),Nl=`AvatarImage`,Pl=N.forwardRef(Tl(function(e,t){let{__scopeAvatar:n,src:r,onLoadingStatusChange:i,...a}=e,o=jl(Nl,n);o.setImageCount;let s=Ll(r,{referrerPolicy:a.referrerPolicy,crossOrigin:a.crossOrigin,loadingStatus:o.imageLoadingStatus,setLoadingStatus:o.setImageLoadingStatus}),c=Ho(e=>{i?.(e)}),l=N.useRef(s);return so(()=>{let e=l.current;l.current=s,s!==e&&c(s)},[s,c]),s===`loaded`?(0,L.jsx)(Oa.img,{...a,ref:t,src:r}):null},`AvatarImage`)),Fl=`AvatarFallback`,Il=N.forwardRef(Tl(function(e,t){let{__scopeAvatar:n,delayMs:r,...i}=e,a=jl(Fl,n),[o,s]=N.useState(r===void 0);return N.useEffect(()=>{if(r!==void 0){let e=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(e)}},[r]),o&&a.imageLoadingStatus!==`loaded`?(0,L.jsx)(Oa.span,{...i,ref:t}):null},`AvatarFallback`));function Ll(e,{loadingStatus:t,setLoadingStatus:n,referrerPolicy:r,crossOrigin:i}){return so(()=>{if(!e){n(`error`);return}let t=new window.Image,a=Tl(e=>{let t=e.currentTarget;n(Rl(t))},`handleLoad`),o=Tl(()=>n(`error`),`handleError`);return t.addEventListener(`load`,a),t.addEventListener(`error`,o),r&&(t.referrerPolicy=r),t.crossOrigin=i??null,t.src=e,n(Rl(t)),()=>{t.removeEventListener(`load`,a),t.removeEventListener(`error`,o),n(`idle`)}},[e,i,r,n]),t}Tl(Ll,`useImageLoadingStatus`);function Rl(e){return e.complete?e.naturalWidth>0?`loaded`:`error`:`loading`}Tl(Rl,`getImageLoadingStatus`);function zl(){return kl}Tl(zl,`useImageCount`);function Bl(e){}Tl(Bl,`useUpdateImageCount`);var Vl=Object.defineProperty,Hl=(e,t)=>Vl(e,`name`,{value:t,configurable:!0});function Ul(e){let[t,n]=N.useState(void 0);return so(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}Hl(Ul,`useSize`);var Wl=[`top`,`right`,`bottom`,`left`],Gl=Math.min,Kl=Math.max,ql=Math.round,Jl=Math.floor,Yl=e=>({x:e,y:e}),Xl={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Zl(e,t,n){return Kl(e,Gl(t,n))}function Ql(e,t){return typeof e==`function`?e(t):e}function $l(e){return e.split(`-`)[0]}function eu(e){return e.split(`-`)[1]}function tu(e){return e===`x`?`y`:`x`}function nu(e){return e===`y`?`height`:`width`}function ru(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function iu(e){return tu(ru(e))}function au(e,t,n){n===void 0&&(n=!1);let r=eu(e),i=iu(e),a=nu(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=mu(o)),[o,mu(o)]}function ou(e){let t=mu(e);return[su(e),t,su(t)]}function su(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var cu=[`left`,`right`],lu=[`right`,`left`],uu=[`top`,`bottom`],du=[`bottom`,`top`];function fu(e,t,n){switch(e){case`top`:case`bottom`:return n?t?lu:cu:t?cu:lu;case`left`:case`right`:return t?uu:du;default:return[]}}function pu(e,t,n,r){let i=eu(e),a=fu($l(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(su)))),a}function mu(e){let t=$l(e);return Xl[t]+e.slice(t.length)}function hu(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function gu(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:hu(e)}function _u(e){let{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 vu(e,t,n){let{reference:r,floating:i}=e,a=ru(t),o=iu(t),s=nu(o),c=$l(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=eu(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function yu(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=Ql(t,e),p=gu(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=_u(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=_u(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var bu=50,xu=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:yu},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=vu(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<bu&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=vu(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Su=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=Ql(e,t)||{};if(l==null)return{};let d=gu(u),f={x:n,y:r},p=iu(i),m=nu(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=Gl(d[_],T),D=Gl(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=Zl(E,k,O),j=!c.arrow&&eu(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Cu=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=Ql(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=$l(r),_=ru(o),v=$l(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[mu(o)]:ou(o)),x=p!==`none`;!d&&x&&b.push(...pu(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=au(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===ru(t)||T.every(e=>ru(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=ru(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function wu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tu(e){return Wl.some(t=>e[t]>=0)}var Eu=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=Ql(e,t);switch(i){case`referenceHidden`:{let e=wu(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Tu(e)}}}case`escaped`:{let e=wu(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Tu(e)}}}default:return{}}}}},Du=new Set([`left`,`top`]);async function Ou(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=$l(n),s=eu(n),c=ru(n)===`y`,l=Du.has(o)?-1:1,u=a&&c?-1:1,d=Ql(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var ku=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Ou(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Au=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=Ql(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=ru(i),p=tu(f),m=u[p],h=u[f],g=(e,t)=>Zl(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},ju=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=Ql(e,t),u={x:n,y:r},d=ru(i),f=tu(d),p=u[f],m=u[d],h=Ql(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Du.has($l(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Mu=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=Ql(e,t),c=await i.detectOverflow(t,s),l=$l(n),u=eu(n),d=ru(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=Gl(p-c[m],g),y=Gl(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*Kl(c.left,c.right):S=p-2*Kl(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function Nu(){return typeof window<`u`}function Pu(e){return Lu(e)?(e.nodeName||``).toLowerCase():`#document`}function Fu(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Iu(e){return((Lu(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Lu(e){return Nu()?e instanceof Node||e instanceof Fu(e).Node:!1}function Ru(e){return Nu()?e instanceof Element||e instanceof Fu(e).Element:!1}function zu(e){return Nu()?e instanceof HTMLElement||e instanceof Fu(e).HTMLElement:!1}function Bu(e){return!Nu()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Fu(e).ShadowRoot}function Vu(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Qu(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Hu(e){return/^(table|td|th)$/.test(Pu(e))}function Uu(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Wu=/transform|translate|scale|rotate|perspective|filter/,Gu=/paint|layout|strict|content/,Ku=e=>!!e&&e!==`none`,qu;function Ju(e){let t=Ru(e)?Qu(e):e;return Ku(t.transform)||Ku(t.translate)||Ku(t.scale)||Ku(t.rotate)||Ku(t.perspective)||!Xu()&&(Ku(t.backdropFilter)||Ku(t.filter))||Wu.test(t.willChange||``)||Gu.test(t.contain||``)}function Yu(e){let t=ed(e);for(;zu(t)&&!Zu(t);){if(Ju(t))return t;if(Uu(t))return null;t=ed(t)}return null}function Xu(){return qu??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),qu}function Zu(e){return/^(html|body|#document)$/.test(Pu(e))}function Qu(e){return Fu(e).getComputedStyle(e)}function $u(e){return Ru(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ed(e){if(Pu(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Bu(e)&&e.host||Iu(e);return Bu(t)?t.host:t}function td(e){let t=ed(e);return Zu(t)?(e.ownerDocument||e).body:zu(t)&&Vu(t)?t:td(t)}function nd(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=td(e),i=r===e.ownerDocument?.body,a=Fu(r);if(i){let e=rd(a);return t.concat(a,a.visualViewport||[],Vu(r)?r:[],e&&n?nd(e):[])}return t.concat(r,nd(r,[],n))}function rd(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function id(e){let t=Qu(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zu(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=ql(n)!==a||ql(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function ad(e){return Ru(e)?e:e.contextElement}function od(e){let t=ad(e);if(!zu(t))return Yl(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=id(t),o=(a?ql(n.width):n.width)/r,s=(a?ql(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var sd=Yl(0);function cd(e){let t=Fu(e);return!Xu()||!t.visualViewport?sd:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ld(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Fu(e)}function ud(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=ad(e),o=Yl(1);t&&(r?Ru(r)&&(o=od(r)):o=od(e));let s=ld(a,n,r)?cd(a):Yl(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Fu(a),t=Ru(r)?Fu(r):r,n=e,i=rd(n);for(;i&&t!==n;){let e=od(i),t=i.getBoundingClientRect(),r=Qu(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Fu(i),i=rd(n)}}return _u({width:u,height:d,x:c,y:l})}function dd(e,t){let n=$u(e).scrollLeft;return t?t.left+n:ud(Iu(e)).left+n}function fd(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-dd(e,n),y:n.top+t.scrollTop}}function pd(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Iu(r),s=t?Uu(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=Yl(1),u=Yl(0),d=zu(r);if((d||!a)&&((Pu(r)!==`body`||Vu(o))&&(c=$u(r)),d)){let e=ud(r);l=od(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?fd(o,c):Yl(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function md(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function hd(e){let t=$u(e),n=e.ownerDocument.body,r=Kl(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=Kl(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+dd(e),o=-t.scrollTop;return Qu(n).direction===`rtl`&&(a+=Kl(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var gd=25;function _d(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Fu(e),a=Iu(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Xu()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(dd(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=gd&&(s-=o)}return{width:s,height:c,x:l,y:u}}function vd(e,t){let n=ud(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=od(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function yd(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=_d(e,n,t);else if(t===`document`)r=hd(Iu(e));else if(Ru(t))r=vd(t,n);else{let n=cd(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return _u(r)}function bd(e,t){let n=t.get(e);if(n)return n;let r=nd(e,[],!1).filter(e=>Ru(e)&&Pu(e)!==`body`),i=null,a=Qu(e).position===`fixed`,o=a?ed(e):e;for(;Ru(o)&&!Zu(o);){let e=Qu(o),t=Ju(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=ed(o)}return t.set(e,r),r}function xd(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Uu(t)?[]:bd(t,this._c):[].concat(n),r],o=yd(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=yd(t,a[e],i);s=Kl(n.top,s),c=Gl(n.right,c),l=Gl(n.bottom,l),u=Kl(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Sd(e){let{width:t,height:n}=id(e);return{width:t,height:n}}function Cd(e,t,n){let r=zu(t),i=Iu(t),a=n===`fixed`,o=ud(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=Yl(0);if((r||!a)&&((Pu(t)!==`body`||Vu(i))&&(s=$u(t)),r)){let e=ud(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=dd(i));let l=i&&!r&&!a?fd(i,s):Yl(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function wd(e){return Qu(e).position===`static`}function Td(e,t){if(!zu(e)||Qu(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Iu(e)===n&&(n=n.ownerDocument.body),n}function Ed(e,t){let n=Fu(e);if(Uu(e))return n;if(!zu(e)){let t=ed(e);for(;t&&!Zu(t);){if(Ru(t)&&!wd(t))return t;t=ed(t)}return n}let r=Td(e,t);for(;r&&Hu(r)&&wd(r);)r=Td(r,t);return r&&Zu(r)&&wd(r)&&!Ju(r)?n:r||Yu(e)||n}var Dd=async function(e){let t=this.getOffsetParent||Ed,n=this.getDimensions,r=await n(e.floating);return{reference:Cd(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Od(e){return Qu(e).direction===`rtl`}var kd={convertOffsetParentRelativeRectToViewportRelativeRect:pd,getDocumentElement:Iu,getClippingRect:xd,getOffsetParent:Ed,getElementRects:Dd,getClientRects:md,getDimensions:Sd,getScale:od,isElement:Ru,isRTL:Od};function Ad(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jd(e,t,n){let r=null,i,a=Iu(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=Jl(d),h=Jl(a.clientWidth-(u+f)),g=Jl(a.clientHeight-(d+p)),_=Jl(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Kl(0,Gl(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ad(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Fu(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Md(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=ad(e),u=i||a?[...l?nd(l):[],...t?nd(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?jd(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ud(e):null;c&&g();function g(){let t=ud(e);h&&!Ad(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Nd=ku,Pd=Au,Fd=Cu,Id=Mu,Ld=Eu,Rd=Su,zd=ju,Bd=(e,t,n)=>{let r=new Map,i=n??{},a={...kd,...i.platform,_c:r};return xu(e,t,{...i,platform:a})},Vd=typeof document<`u`?N.useLayoutEffect:function(){};function Hd(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(!Hd(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;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!Hd(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function Ud(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Wd(e,t){let n=Ud(e);return Math.round(t*n)/n}function Gd(e){let t=N.useRef(e);return Vd(()=>{t.current=e}),t}function Kd(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=N.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=N.useState(r);Hd(f,r)||p(r);let[m,h]=N.useState(null),[g,_]=N.useState(null),v=N.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=N.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=N.useRef(null),C=N.useRef(null),w=N.useRef(u),T=c!=null,E=Gd(c),D=Gd(i),O=Gd(l),k=N.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),Bd(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!Hd(w.current,t)&&(w.current=t,ci.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);Vd(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=N.useRef(!1);Vd(()=>(A.current=!0,()=>{A.current=!1}),[]),Vd(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=N.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=N.useMemo(()=>({reference:b,floating:x}),[b,x]),ee=N.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=Wd(M.floating,u.x),r=Wd(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...Ud(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return N.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:ee}),[u,k,j,M,ee])}var qd=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:Rd({element:r.current,padding:i}).fn(n):r?Rd({element:r,padding:i}).fn(n):{}}}},Jd=(e,t)=>{let n=Nd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yd=(e,t)=>{let n=Pd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xd=(e,t)=>({fn:zd(e).fn,options:[e,t]}),Zd=(e,t)=>{let n=Fd(e);return{name:n.name,fn:n.fn,options:[e,t]}},Qd=(e,t)=>{let n=Id(e);return{name:n.name,fn:n.fn,options:[e,t]}},$d=(e,t)=>{let n=Ld(e);return{name:n.name,fn:n.fn,options:[e,t]}},ef=(e,t)=>{let n=qd(e);return{name:n.name,fn:n.fn,options:[e,t]}},tf=Object.defineProperty,nf=(e,t)=>tf(e,`name`,{value:t,configurable:!0}),rf=`Popper`,[af,of]=za(rf),[sf,cf]=af(rf),lf=nf(e=>{let{__scopePopper:t,children:n}=e,[r,i]=N.useState(null),[a,o]=N.useState(void 0);return(0,L.jsx)(sf,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),uf=`PopperAnchor`,df=N.forwardRef(nf(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=cf(uf,n),o=N.useRef(null),s=a.onAnchorChange,c=sa(t,N.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=N.useRef(null);N.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&vf(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,L.jsx)(Oa.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),ff=`PopperContent`,[pf,mf]=af(ff),hf=N.forwardRef(nf(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=`partial`,hideWhenDetached:f=!1,updatePositionStrategy:p=`optimized`,onPlaced:m,...h}=e,g=cf(ff,n),[_,v]=N.useState(null),y=sa(t,v),[b,x]=N.useState(null),S=Ul(b),C=S?.width??0,w=S?.height??0,T=r+(a===`center`?``:`-`+a),E=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],O=D.length>0,k={padding:E,boundary:D.filter(gf),altBoundary:O},{refs:A,floatingStyles:j,placement:M,isPositioned:ee,middlewareData:te}=Kd({strategy:`fixed`,placement:T,whileElementsMounted:nf((...e)=>Md(...e,{animationFrame:p===`always`}),`whileElementsMounted`),elements:{reference:g.anchor},middleware:[Jd({mainAxis:i+w,alignmentAxis:o}),c&&Yd({mainAxis:!0,crossAxis:!1,limiter:d===`partial`?Xd():void 0,...k}),c&&Zd({...k}),Qd({...k,apply:nf(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),b&&ef({element:b,padding:s}),_f({arrowWidth:C,arrowHeight:w}),f&&$d({strategy:`referenceHidden`,...k,boundary:O?k.boundary:void 0})]}),P=g.setPlacementState;so(()=>(P(M),()=>{P(void 0)}),[M,P]);let[F,ne]=vf(M),re=Ho(m);so(()=>{ee&&re?.()},[ee,re]);let ie=te.arrow?.x,ae=te.arrow?.y,I=te.arrow?.centerOffset!==0,[oe,se]=N.useState();return so(()=>{_&&se(window.getComputedStyle(_).zIndex)},[_]),(0,L.jsx)(`div`,{ref:A.setFloating,"data-radix-popper-content-wrapper":``,style:{...j,transform:ee?j.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:oe,"--radix-popper-transform-origin":[te.transformOrigin?.x,te.transformOrigin?.y].join(` `),...te.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,L.jsx)(pf,{scope:n,placedSide:F,placedAlign:ne,onArrowChange:x,arrowX:ie,arrowY:ae,shouldHideArrow:I,children:(0,L.jsx)(Oa.div,{"data-side":F,"data-align":ne,...h,ref:y,style:{...h.style,animation:ee?h.style?.animation:`none`}})})})},`PopperContent`));function gf(e){return e!==null}nf(gf,`isNotNull`);var _f=nf(e=>({name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=vf(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function vf(e){let[t,n=`center`]=e.split(`-`);return[t,n]}nf(vf,`getSideAndAlignFromPlacement`);var yf=lf,bf=df,xf=hf,Sf=Object.defineProperty,Cf=(e,t)=>Sf(e,`name`,{value:t,configurable:!0}),wf=!1;function Tf(){let[e,t]=N.useState(wf);return N.useEffect(()=>{wf||(wf=!0,t(!0))},[]),e}Cf(Tf,`useIsHydrated`);var Ef=N.useSyncExternalStore;function Df(){return()=>{}}Cf(Df,`subscribe`);function Of(){return Ef(Df,()=>!0,()=>!1)}Cf(Of,`useIsHydratedModern`);var kf=typeof Ef==`function`?Of:Tf,Af=Object.defineProperty,jf=(e,t)=>Af(e,`name`,{value:t,configurable:!0}),Mf=`rovingFocusGroup.onEntryFocus`,Nf={bubbles:!1,cancelable:!0},Pf=`RovingFocusGroup`,[Ff,If,Lf]=Ua(Pf),[Rf,zf]=za(Pf,[Lf]),[Bf,Vf]=Rf(Pf),Hf=N.forwardRef(jf(function(e,t){return(0,L.jsx)(Ff.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(Ff.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,L.jsx)(Uf,{...e,ref:t})})})},`RovingFocusGroup`)),Uf=N.forwardRef(jf(function(e,t){let{__scopeRovingFocusGroup:n,orientation:r,loop:i=!1,dir:a,currentTabStopId:o,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,preventScrollOnEntryFocus:u=!1,...d}=e,f=N.useRef(null),p=sa(t,f),m=zo(a),[h,g]=_o({prop:o,defaultProp:s??null,onChange:c,caller:Pf}),[_,v]=N.useState(!1),y=Ho(l),b=If(n),x=N.useRef(!1),[S,C]=N.useState(0);return N.useEffect(()=>{let e=f.current;if(e)return e.addEventListener(Mf,y),()=>e.removeEventListener(Mf,y)},[y]),(0,L.jsx)(Bf,{scope:n,orientation:r,dir:m,loop:i,currentTabStopId:h,onItemFocus:N.useCallback(e=>g(e),[g]),onItemShiftTab:N.useCallback(()=>v(!0),[]),onFocusableItemAdd:N.useCallback(()=>C(e=>e+1),[]),onFocusableItemRemove:N.useCallback(()=>C(e=>e-1),[]),children:(0,L.jsx)(Oa.div,{tabIndex:_||S===0?-1:0,"data-orientation":r,...d,ref:p,style:{outline:`none`,...e.style},onMouseDown:R(e.onMouseDown,()=>{x.current=!0}),onFocus:R(e.onFocus,e=>{let t=!x.current;if(e.target===e.currentTarget&&t&&!_){let t=new CustomEvent(Mf,Nf);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=b().filter(e=>e.focusable);Yf([e.find(e=>e.active),e.find(e=>e.id===h),...e].filter(Boolean).map(e=>e.ref.current),u)}}x.current=!1}),onBlur:R(e.onBlur,()=>v(!1))})})},`RovingFocusGroupImpl`)),Wf=`RovingFocusGroupItem`,Gf=N.forwardRef(jf(function(e,t){let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:a,children:o,...s}=e,c=Fo(),l=a||c,u=Vf(Wf,n),d=u.currentTabStopId===l,f=If(n),{onFocusableItemAdd:p,onFocusableItemRemove:m,currentTabStopId:h}=u,g=kf();return so(()=>{if(!(!g||!r))return p(),()=>m()},[g,r,p,m]),N.useEffect(()=>{if(!(g||!r))return p(),()=>m()},[g,r,p,m]),(0,L.jsx)(Ff.ItemSlot,{scope:n,id:l,focusable:r,active:i,children:(0,L.jsx)(Oa.span,{tabIndex:d?0:-1,"data-orientation":u.orientation,...s,ref:t,onMouseDown:R(e.onMouseDown,e=>{r?u.onItemFocus(l):e.preventDefault()}),onFocus:R(e.onFocus,()=>u.onItemFocus(l)),onKeyDown:R(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){u.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=Jf(e,u.orientation,u.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=f().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=u.loop?Xf(n,r+1):n.slice(r+1)}setTimeout(()=>Yf(n))}}),children:typeof o==`function`?o({isCurrentTabStop:d,hasTabStop:h!=null}):o})})},`RovingFocusGroupItem`)),Kf={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function qf(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}jf(qf,`getDirectionAwareKey`);function Jf(e,t,n){let r=qf(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return Kf[r]}jf(Jf,`getFocusIntent`);function Yf(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}jf(Yf,`focusFirst`);function Xf(e,t){return e.map((n,r)=>e[(t+r)%e.length])}jf(Xf,`wrapArray`);var Zf=Hf,Qf=Gf,$f=Object.defineProperty,ep=(e,t)=>$f(e,`name`,{value:t,configurable:!0}),tp=[`Enter`,` `],np=[`ArrowDown`,`PageUp`,`Home`],rp=[`ArrowUp`,`PageDown`,`End`],ip=[...np,...rp];[...tp],[...tp];var ap=`Menu`,[op,sp,cp]=Ua(ap),[lp,up]=za(ap,[cp,of,zf]),dp=of(),fp=zf(),[pp,mp]=lp(ap),[hp,gp]=lp(ap),_p=ep(e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:i,onOpenChange:a,modal:o=!0}=e,s=dp(t),[c,l]=N.useState(null),u=N.useRef(!1),d=Ho(a),f=zo(i);return N.useEffect(()=>{let e=ep(()=>{u.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},`handleKeyDown`),t=ep(()=>u.current=!1,`handlePointer`);return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),N.useEffect(()=>{if(!n)return;let e=ep(()=>d(!1),`handleBlur`);return window.addEventListener(`blur`,e),()=>window.removeEventListener(`blur`,e)},[n,d]),(0,L.jsx)(yf,{...s,children:(0,L.jsx)(pp,{scope:t,open:n,onOpenChange:d,content:c,onContentChange:l,children:(0,L.jsx)(hp,{scope:t,onClose:N.useCallback(()=>d(!1),[d]),isUsingKeyboardRef:u,dir:f,modal:o,children:r})})})},`Menu`),vp=N.forwardRef(ep(function(e,t){let{__scopeMenu:n,...r}=e,i=dp(n);return(0,L.jsx)(bf,{...i,...r,ref:t})},`MenuAnchor`)),yp=`MenuPortal`,[bp,xp]=lp(yp,{forceMount:void 0}),Sp=ep(e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=mp(yp,t);return(0,L.jsx)(bp,{scope:t,forceMount:n,children:(0,L.jsx)(To,{present:n||a.open,children:(0,L.jsx)(xs,{asChild:!0,container:i,children:r})})})},`MenuPortal`),Cp=`MenuContent`,[wp,Tp]=lp(Cp),Ep=N.forwardRef(ep(function(e,t){let n=xp(Cp,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=mp(Cp,e.__scopeMenu),o=gp(Cp,e.__scopeMenu);return(0,L.jsx)(op.Provider,{scope:e.__scopeMenu,children:(0,L.jsx)(To,{present:r||a.open,children:(0,L.jsx)(op.Slot,{scope:e.__scopeMenu,children:o.modal?(0,L.jsx)(Dp,{...i,ref:t}):(0,L.jsx)(Op,{...i,ref:t})})})})},`MenuContent`)),Dp=N.forwardRef(ep(function(e,t){let n=mp(Cp,e.__scopeMenu),r=N.useRef(null),i=sa(t,r);return N.useEffect(()=>{let e=r.current;if(e)return qc(e)},[]),(0,L.jsx)(Ap,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentModal`)),Op=N.forwardRef(ep(function(e,t){let n=mp(Cp,e.__scopeMenu);return(0,L.jsx)(Ap,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})},`MenuRootContentNonModal`)),kp=ua(`MenuContent.ScrollLock`),Ap=N.forwardRef(ep(function(e,t){let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:o,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,g=mp(Cp,n),_=gp(Cp,n),v=dp(n),y=fp(n),b=sp(n),[x,S]=N.useState(null),C=N.useRef(null),w=sa(t,C,g.onContentChange),T=N.useRef(0),E=N.useRef(``),D=N.useRef(0),O=N.useRef(null),k=N.useRef(`right`),A=N.useRef(0),j=m?Rc:N.Fragment,M=m?{as:kp,allowPinchZoom:!0}:void 0,ee=ep(e=>{let t=E.current+e,n=b().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=Wp(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;ep((function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(t),o&&setTimeout(()=>o.focus())},`handleTypeaheadSearch`);N.useEffect(()=>()=>window.clearTimeout(T.current),[]),Os();let te=N.useCallback(e=>k.current===O.current?.side&&Kp(e,O.current?.area),[]);return(0,L.jsx)(wp,{scope:n,searchRef:E,onItemEnter:N.useCallback(e=>{te(e)&&e.preventDefault()},[te]),onItemLeave:N.useCallback(e=>{te(e)||(C.current?.focus(),S(null))},[te]),onTriggerLeave:N.useCallback(e=>{te(e)&&e.preventDefault()},[te]),pointerGraceTimerRef:D,onPointerGraceIntentChange:N.useCallback(e=>{O.current=e},[]),children:(0,L.jsx)(j,{...M,children:(0,L.jsx)(cs,{asChild:!0,trapped:i,onMountAutoFocus:R(a,e=>{e.preventDefault(),C.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:o,children:(0,L.jsx)(Xo,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:d,onInteractOutside:f,onDismiss:p,children:(0,L.jsx)(Zf,{asChild:!0,...y,dir:_.dir,orientation:`vertical`,loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:R(c,e=>{_.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,L.jsx)(xf,{role:`menu`,"aria-orientation":`vertical`,"data-state":zp(g.open),"data-radix-menu-content":``,dir:_.dir,...v,...h,ref:w,style:{outline:`none`,...h.style},onKeyDown:R(h.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&ee(e.key));let i=C.current;if(e.target!==i||!ip.includes(e.key))return;e.preventDefault();let a=b().filter(e=>!e.disabled).map(e=>e.ref.current);rp.includes(e.key)&&a.reverse(),Hp(a)}),onBlur:R(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:R(e.onPointerMove,qp(e=>{let t=e.target,n=A.current!==e.clientX;if(e.currentTarget.contains(t)&&n){let t=e.clientX>A.current?`right`:`left`;k.current=t,A.current=e.clientX}}))})})})})})})},`MenuContentImpl`)),jp=`MenuItem`,Mp=`menu.itemSelect`,Np=N.forwardRef(ep(function(e,t){let{disabled:n=!1,onSelect:r,...i}=e,a=N.useRef(null),o=gp(jp,e.__scopeMenu),s=Tp(jp,e.__scopeMenu),c=sa(t,a),l=N.useRef(!1),u=ep(()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Mp,{bubbles:!0,cancelable:!0});e.addEventListener(Mp,e=>r?.(e),{once:!0}),ka(e,t),t.defaultPrevented?l.current=!1:o.onClose()}},`handleSelect`);return(0,L.jsx)(Pp,{...i,ref:c,disabled:n,onClick:R(e.onClick,u),onPointerDown:t=>{e.onPointerDown?.(t),l.current=!0},onPointerUp:R(e.onPointerUp,e=>{l.current||e.currentTarget?.click()}),onKeyDown:R(e.onKeyDown,e=>{n||e.target!==e.currentTarget||(s.searchRef.current===``||e.key!==` `)&&tp.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})},`MenuItem`)),Pp=N.forwardRef(ep(function(e,t){let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=Tp(jp,n),s=fp(n),c=N.useRef(null),l=sa(t,c),[u,d]=N.useState(!1),[f,p]=N.useState(``);return N.useEffect(()=>{let e=c.current;e&&p((e.textContent??``).trim())},[a.children]),(0,L.jsx)(op.ItemSlot,{scope:n,disabled:r,textValue:i??f,children:(0,L.jsx)(Qf,{asChild:!0,...s,focusable:!r,children:(0,L.jsx)(Oa.div,{role:`menuitem`,"data-highlighted":u?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:l,onPointerMove:R(e.onPointerMove,qp(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:R(e.onPointerLeave,qp(e=>o.onItemLeave(e))),onFocus:R(e.onFocus,()=>d(!0)),onBlur:R(e.onBlur,()=>d(!1))})})})},`MenuItemImpl`)),[Fp,Ip]=lp(`MenuRadioGroup`,{value:void 0,onValueChange:ep(()=>{},`onValueChange`)}),[eee,Lp]=lp(`MenuItemIndicator`,{checked:!1}),[Rp,tee]=lp(`MenuSub`);function zp(e){return e?`open`:`closed`}ep(zp,`getOpenState`);function Bp(e){return e===`indeterminate`}ep(Bp,`isIndeterminate`);function Vp(e){return Bp(e)?`indeterminate`:e?`checked`:`unchecked`}ep(Vp,`getCheckedState`);function Hp(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}ep(Hp,`focusFirst`);function Up(e,t){return e.map((n,r)=>e[(t+r)%e.length])}ep(Up,`wrapArray`);function Wp(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Up(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}ep(Wp,`getNextMatch`);function Gp(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}ep(Gp,`isPointInPolygon`);function Kp(e,t){return t?Gp({x:e.clientX,y:e.clientY},t):!1}ep(Kp,`isPointerInGraceArea`);function qp(e){return t=>t.pointerType===`mouse`?e(t):void 0}ep(qp,`whenMouse`);var Jp=_p,Yp=vp,Xp=Sp,Zp=Ep,Qp=Np,$p=Object.defineProperty,em=(e,t)=>$p(e,`name`,{value:t,configurable:!0}),tm=`DropdownMenu`,[nm,nee]=za(tm,[up]),rm=up(),[im,am]=nm(tm),ree=em(e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=rm(t),l=N.useRef(null),[u,d]=_o({prop:i,defaultProp:a??!1,onChange:o,caller:tm});return(0,L.jsx)(im,{scope:t,triggerId:Fo(),triggerRef:l,contentId:Fo(),open:u,onOpenChange:d,onOpenToggle:N.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,L.jsx)(Jp,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})},`DropdownMenu`),om=`DropdownMenuTrigger`,sm=N.forwardRef(em(function(e,t){let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=am(om,n),o=rm(n),s=sa(t,a.triggerRef);return(0,L.jsx)(Yp,{asChild:!0,...o,children:(0,L.jsx)(Oa.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:s,onPointerDown:R(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:R(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})},`DropdownMenuTrigger`)),cm=em(e=>{let{__scopeDropdownMenu:t,...n}=e,r=rm(t);return(0,L.jsx)(Xp,{...r,...n})},`DropdownMenuPortal`),lm=`DropdownMenuContent`,um=N.forwardRef(em(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=am(lm,n),a=rm(n),o=N.useRef(!1);return(0,L.jsx)(Zp,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:R(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})},`DropdownMenuContent`)),dm=N.forwardRef(em(function(e,t){let{__scopeDropdownMenu:n,...r}=e,i=rm(n);return(0,L.jsx)(Qp,{...i,...r,ref:t})},`DropdownMenuItem`)),fm=ree,pm=sm,mm=cm,hm=um,gm=dm,_m=Object.defineProperty,vm=(e,t)=>_m(e,`name`,{value:t,configurable:!0});function ym(e){let t=N.useRef({value:e,previous:e});return N.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}vm(ym,`usePrevious`);var bm=Object.defineProperty,xm=(e,t)=>bm(e,`name`,{value:t,configurable:!0});function Sm(e,[t,n]){return Math.min(n,Math.max(t,e))}xm(Sm,`clamp`);var Cm=Object.defineProperty,wm=(e,t)=>Cm(e,`name`,{value:t,configurable:!0}),Tm=`Popover`,[Em,iee]=za(Tm,[of]),Dm=of(),[aee,Om]=Em(Tm),oee=wm(e=>{let{__scopePopover:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!1}=e,s=Dm(t),c=N.useRef(null),[l,u]=N.useState(!1),[d,f]=_o({prop:r,defaultProp:i??!1,onChange:a,caller:Tm});return(0,L.jsx)(yf,{...s,children:(0,L.jsx)(aee,{scope:t,contentId:Fo(),triggerRef:c,open:d,onOpenChange:f,onOpenToggle:N.useCallback(()=>f(e=>!e),[f]),hasCustomAnchor:l,onCustomAnchorAdd:N.useCallback(()=>u(!0),[]),onCustomAnchorRemove:N.useCallback(()=>u(!1),[]),modal:o,children:n})})},`Popover`),see=`PopoverTrigger`,cee=N.forwardRef(wm(function(e,t){let{__scopePopover:n,...r}=e,i=Om(see,n),a=Dm(n),o=sa(t,i.triggerRef),s=(0,L.jsx)(Oa.button,{type:`button`,"aria-haspopup":`dialog`,"aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":Lm(i.open),...r,ref:o,onClick:R(e.onClick,i.onOpenToggle)});return i.hasCustomAnchor?s:(0,L.jsx)(bf,{asChild:!0,...a,children:s})},`PopoverTrigger`)),km=`PopoverPortal`,[lee,uee]=Em(km,{forceMount:void 0}),Am=wm(e=>{let{__scopePopover:t,forceMount:n,children:r,container:i}=e,a=Om(km,t);return(0,L.jsx)(lee,{scope:t,forceMount:n,children:(0,L.jsx)(To,{present:n||a.open,children:(0,L.jsx)(xs,{asChild:!0,container:i,children:r})})})},`PopoverPortal`),jm=`PopoverContent`,Mm=N.forwardRef(wm(function(e,t){let n=uee(jm,e.__scopePopover),{forceMount:r=n.forceMount,...i}=e,a=Om(jm,e.__scopePopover);return(0,L.jsx)(To,{present:r||a.open,children:a.modal?(0,L.jsx)(Pm,{...i,ref:t}):(0,L.jsx)(Fm,{...i,ref:t})})},`PopoverContent`)),Nm=ua(`PopoverContent.RemoveScroll`),Pm=N.forwardRef(wm(function(e,t){let n=Om(jm,e.__scopePopover),r=N.useRef(null),i=sa(t,r),a=N.useRef(!1);return N.useEffect(()=>{let e=r.current;if(e)return qc(e)},[]),(0,L.jsx)(Rc,{as:Nm,allowPinchZoom:!0,children:(0,L.jsx)(Im,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:R(e.onCloseAutoFocus,e=>{e.preventDefault(),a.current||n.triggerRef.current?.focus()}),onPointerDownOutside:R(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;a.current=r},{checkForDefaultPrevented:!1}),onFocusOutside:R(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1})})})},`PopoverContentModal`)),Fm=N.forwardRef(wm(function(e,t){let n=Om(jm,e.__scopePopover),r=N.useRef(!1),i=N.useRef(!1);return(0,L.jsx)(Im,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`PopoverContentNonModal`)),Im=N.forwardRef(wm(function(e,t){let{__scopePopover:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:o,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,f=Om(jm,n),p=Dm(n);return Os(),(0,L.jsx)(cs,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,L.jsx)(Xo,{asChild:!0,disableOutsidePointerEvents:o,onInteractOutside:u,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>f.onOpenChange(!1),deferPointerDownOutside:!0,children:(0,L.jsx)(xf,{"data-state":Lm(f.open),role:`dialog`,id:f.contentId,...p,...d,ref:t,style:{...d.style,"--radix-popover-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-popover-content-available-width":`var(--radix-popper-available-width)`,"--radix-popover-content-available-height":`var(--radix-popper-available-height)`,"--radix-popover-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-popover-trigger-height":`var(--radix-popper-anchor-height)`}})})})},`PopoverContentImpl`));function Lm(e){return e?`open`:`closed`}wm(Lm,`getState`);var Rm=oee,zm=cee,Bm=Am,Vm=Mm,Hm=Object.defineProperty,Um=(e,t)=>Hm(e,`name`,{value:t,configurable:!0}),Wm=[` `,`Enter`,`ArrowUp`,`ArrowDown`],Gm=[` `,`Enter`],Km=`Select`,[qm,Jm,Ym]=Ua(Km),[Xm,dee]=za(Km,[Ym,of]),Zm=of(),[Qm,$m]=Xm(Km),[eh,th]=Xm(Km);function nh(e){let{__scopeSelect:t,children:n,open:r,defaultOpen:i,onOpenChange:a,value:o,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:f,required:p,form:m,internal_do_not_use_render:h}=e,g=Zm(t),[_,v]=N.useState(null),[y,b]=N.useState(null),[x,S]=N.useState(!1),C=zo(l),[w,T]=_o({prop:r,defaultProp:i??!1,onChange:a,caller:Km}),[E,D]=_o({prop:o,defaultProp:s,onChange:c,caller:Km}),O=N.useRef(null),k=N.useRef(E);N.useEffect(()=>{let e=m?_?.ownerDocument.getElementById(m):_?.form;if(e instanceof HTMLFormElement){let t=Um(()=>D(k.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[m,_,D]);let A=!_||!!m||!!_.closest(`form`),[j,M]=N.useState(new Set),ee=Fo(),te=Array.from(j).map(e=>e.props.value).join(`;`),P=N.useCallback(e=>{M(t=>new Set(t).add(e))},[]),F=N.useCallback(e=>{M(t=>{let n=new Set(t);return n.delete(e),n})},[]),ne={required:p,trigger:_,onTriggerChange:v,valueNode:y,onValueNodeChange:b,valueNodeHasChildren:x,onValueNodeHasChildrenChange:S,contentId:ee,value:E,onValueChange:D,open:w,onOpenChange:T,dir:C,triggerPointerDownPosRef:O,disabled:f,name:u,autoComplete:d,form:m,nativeOptions:j,nativeSelectKey:te,isFormControl:A};return(0,L.jsx)(yf,{...g,children:(0,L.jsx)(Qm,{scope:t,...ne,children:(0,L.jsx)(qm.Provider,{scope:t,children:(0,L.jsx)(eh,{scope:t,onNativeOptionAdd:P,onNativeOptionRemove:F,children:Lh(h)?h(ne):n})})})})}Um(nh,`SelectProvider`);var rh=Um(e=>{let{__scopeSelect:t,children:n,...r}=e;return(0,L.jsx)(nh,{__scopeSelect:t,...r,internal_do_not_use_render:({isFormControl:e})=>(0,L.jsxs)(L.Fragment,{children:[n,e?(0,L.jsx)(_ee,{__scopeSelect:t}):null]})})},`Select`),ih=`SelectTrigger`,ah=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,disabled:r=!1,...i}=e,a=Zm(n),o=$m(ih,n),s=o.disabled||r,c=sa(t,o.onTriggerChange),l=Jm(n),u=N.useRef(`touch`),[d,f,p]=zh(e=>{let t=l().filter(e=>!e.disabled),n=Bh(t,e,t.find(e=>e.value===o.value));n!==void 0&&o.onValueChange(n.value)}),m=Um(e=>{s||(o.onOpenChange(!0),p()),e&&(o.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})},`handleOpen`);return(0,L.jsx)(bf,{asChild:!0,...a,children:(0,L.jsx)(Oa.button,{type:`button`,role:`combobox`,"aria-controls":o.open?o.contentId:void 0,"aria-expanded":o.open,"aria-required":o.required,"aria-autocomplete":`none`,dir:o.dir,"data-state":o.open?`open`:`closed`,disabled:s,"data-disabled":s?``:void 0,"data-placeholder":Rh(o.value)?``:void 0,...i,ref:c,onClick:R(i.onClick,e=>{e.currentTarget.focus(),u.current!==`mouse`&&m(e)}),onPointerDown:R(i.onPointerDown,e=>{u.current=e.pointerType;let t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&e.pointerType===`mouse`&&(m(e),e.preventDefault())}),onKeyDown:R(i.onKeyDown,e=>{let t=d.current!==``;!(e.ctrlKey||e.altKey||e.metaKey)&&e.key.length===1&&f(e.key),!(t&&e.key===` `)&&Wm.includes(e.key)&&(m(),e.preventDefault())})})})},`SelectTrigger`)),oh=`SelectValue`,sh=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,className:r,style:i,children:a,placeholder:o=``,...s}=e,c=$m(oh,n),{onValueNodeHasChildrenChange:l}=c,u=a!==void 0,d=sa(t,c.onValueNodeChange);so(()=>{l(u)},[l,u]);let f=Rh(c.value);return(0,L.jsx)(Oa.span,{...s,asChild:!f&&s.asChild,ref:d,style:{pointerEvents:`none`},children:(0,L.jsx)(N.Fragment,{children:f?o:a},f?`placeholder`:`value`)})},`SelectValue`)),ch=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,children:r,...i}=e;return(0,L.jsx)(Oa.span,{"aria-hidden":!0,...i,ref:t,children:r||`▼`})},`SelectIcon`)),[lh,uh]=Xm(`SelectPortal`,{forceMount:void 0}),dh=Um(e=>{let{__scopeSelect:t,forceMount:n,...r}=e;return(0,L.jsx)(lh,{scope:e.__scopeSelect,forceMount:n,children:(0,L.jsx)(xs,{asChild:!0,...r})})},`SelectPortal`),fh=`SelectContent`,ph=N.forwardRef(Um(function(e,t){let n=uh(fh,e.__scopeSelect),{forceMount:r=n.forceMount,...i}=e,a=$m(fh,e.__scopeSelect),[o,s]=N.useState();return so(()=>{s(new DocumentFragment)},[]),(0,L.jsx)(To,{present:r||a.open,children:({present:e})=>e?(0,L.jsx)(yh,{...i,ref:t}):(0,L.jsx)(mh,{...i,fragment:o})})},`SelectContent`)),mh=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,children:r,fragment:i}=e;return i?ci.createPortal((0,L.jsx)(gh,{scope:n,children:(0,L.jsx)(qm.Slot,{scope:n,children:(0,L.jsx)(`div`,{ref:t,children:r})})}),i):null},`SelectContentFragment`)),hh=10,[gh,_h]=Xm(fh),vh=ua(`SelectContent.RemoveScroll`),yh=N.forwardRef(Um(function(e,t){let{__scopeSelect:n}=e,{position:r=`item-aligned`,onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:o,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g,..._}=e,v=$m(fh,n),[y,b]=N.useState(null),[x,S]=N.useState(null),C=sa(t,b),[w,T]=N.useState(null),[E,D]=N.useState(null),O=Jm(n),[k,A]=N.useState(!1),j=N.useRef(!1);N.useEffect(()=>{if(y)return qc(y)},[y]),Os();let M=N.useCallback(e=>{let[t,...n]=O().map(e=>e.ref.current),[r]=n.slice(-1),i=document.activeElement;for(let n of e)if(n===i||(n?.scrollIntoView({block:`nearest`}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),n?.focus(),document.activeElement!==i))return},[O,x]),ee=N.useCallback(()=>M([w,y]),[M,w,y]);N.useEffect(()=>{k&&ee()},[k,ee]);let{onOpenChange:te,triggerPointerDownPosRef:P}=v;N.useEffect(()=>{if(y){let e={x:0,y:0},t=Um(t=>{e={x:Math.abs(Math.round(t.pageX)-(P.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(P.current?.y??0))}},`handlePointerMove`),n=Um(n=>{e.x<=10&&e.y<=10?n.preventDefault():n.composedPath().includes(y)||te(!1),document.removeEventListener(`pointermove`,t),P.current=null},`handlePointerUp`);return P.current!==null&&(document.addEventListener(`pointermove`,t),document.addEventListener(`pointerup`,n,{capture:!0,once:!0})),()=>{document.removeEventListener(`pointermove`,t),document.removeEventListener(`pointerup`,n,{capture:!0})}}},[y,te,P]),N.useEffect(()=>{let e=Um(()=>te(!1),`close`);return window.addEventListener(`blur`,e),window.addEventListener(`resize`,e),()=>{window.removeEventListener(`blur`,e),window.removeEventListener(`resize`,e)}},[te]);let[F,ne]=zh(e=>{let t=O().filter(e=>!e.disabled),n=Bh(t,e,t.find(e=>e.ref.current===document.activeElement));n&&setTimeout(()=>n.ref.current?.focus())}),re=N.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&(T(e),r&&(j.current=!0))},[v.value]),ie=N.useCallback(()=>y?.focus(),[y]),ae=N.useCallback((e,t,n)=>{let r=!j.current&&!n;(v.value!==void 0&&v.value===t||r)&&D(e)},[v.value]),I=r===`popper`?xh:bh,oe=I===xh?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:g}:{};return(0,L.jsx)(gh,{scope:n,content:y,viewport:x,onViewportChange:S,itemRefCallback:re,selectedItem:w,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:ee,selectedItemText:E,position:r,isPositioned:k,searchRef:F,children:(0,L.jsx)(Rc,{as:vh,allowPinchZoom:!0,children:(0,L.jsx)(cs,{asChild:!0,trapped:v.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:R(i,e=>{v.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:(0,L.jsx)(Xo,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:(0,L.jsx)(I,{role:`listbox`,id:v.contentId,"data-state":v.open?`open`:`closed`,dir:v.dir,onContextMenu:e=>e.preventDefault(),..._,...oe,onPlaced:()=>A(!0),ref:C,style:{display:`flex`,flexDirection:`column`,outline:`none`,..._.style},onKeyDown:R(_.onKeyDown,e=>{let t=e.ctrlKey||e.altKey||e.metaKey;if(e.key===`Tab`&&e.preventDefault(),!t&&e.key.length===1&&ne(e.key),[`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)){let t=O().filter(e=>!e.disabled).map(e=>e.ref.current);if([`ArrowUp`,`End`].includes(e.key)&&(t=t.slice().reverse()),[`ArrowUp`,`ArrowDown`].includes(e.key)){let n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>M(t)),e.preventDefault()}})})})})})})},`SelectContentImpl`)),bh=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,onPlaced:r,...i}=e,a=$m(fh,n),o=_h(fh,n),[s,c]=N.useState(null),[l,u]=N.useState(null),d=sa(t,u),f=Jm(n),p=N.useRef(!1),m=N.useRef(!0),{viewport:h,selectedItem:g,selectedItemText:_,focusSelectedItem:v}=o,y=N.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&l&&h&&g&&_){let e=a.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),i=_.getBoundingClientRect();if(a.dir!==`rtl`){let r=i.left-t.left,a=n.left-r,o=e.left-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-hh,d=Sm(a,[hh,Math.max(hh,u-l)]);s.style.minWidth=c+`px`,s.style.left=d+`px`}else{let r=t.right-i.right,a=window.innerWidth-n.right-r,o=window.innerWidth-e.right-a,c=e.width+o,l=Math.max(c,t.width),u=window.innerWidth-hh,d=Sm(a,[hh,Math.max(hh,u-l)]);s.style.minWidth=c+`px`,s.style.right=d+`px`}let o=f(),c=window.innerHeight-hh*2,u=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),v=parseInt(d.paddingTop,10),y=parseInt(d.borderBottomWidth,10),b=parseInt(d.paddingBottom,10),x=m+v+u+b+y,S=Math.min(g.offsetHeight*5,x),C=window.getComputedStyle(h),w=parseInt(C.paddingTop,10),T=parseInt(C.paddingBottom,10),E=e.top+e.height/2-hh,D=c-E,O=g.offsetHeight/2,k=g.offsetTop+O,A=m+v+k,j=x-A;if(A<=E){let e=o.length>0&&g===o[o.length-1].ref.current;s.style.bottom=`0px`;let t=l.clientHeight-h.offsetTop-h.offsetHeight,n=A+Math.max(D,O+(e?T:0)+t+y);s.style.height=n+`px`}else{let e=o.length>0&&g===o[0].ref.current;s.style.top=`0px`;let t=Math.max(E,m+h.offsetTop+(e?w:0)+O)+j;s.style.height=t+`px`,h.scrollTop=A-E+h.offsetTop}s.style.margin=`${hh}px 0`,s.style.minHeight=S+`px`,s.style.maxHeight=c+`px`,r?.(),requestAnimationFrame(()=>p.current=!0)}},[f,a.trigger,a.valueNode,s,l,h,g,_,a.dir,r]);so(()=>y(),[y]);let[b,x]=N.useState();so(()=>{l&&x(window.getComputedStyle(l).zIndex)},[l]);let S=N.useCallback(e=>{e&&m.current===!0&&(y(),v?.(),m.current=!1)},[y,v]);return(0,L.jsx)(Sh,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S,children:(0,L.jsx)(`div`,{ref:c,style:{display:`flex`,flexDirection:`column`,position:`fixed`,zIndex:b},children:(0,L.jsx)(Oa.div,{...i,ref:d,style:{boxSizing:`border-box`,maxHeight:`100%`,...i.style}})})})},`SelectItemAlignedPosition`)),xh=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,align:r=`start`,collisionPadding:i=hh,...a}=e,o=Zm(n);return(0,L.jsx)(xf,{...o,...a,ref:t,align:r,collisionPadding:i,style:{boxSizing:`border-box`,...a.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)`}})},`SelectPopperPosition`)),[Sh,Ch]=Xm(fh,{}),wh=`SelectViewport`,Th=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,nonce:r,...i}=e,a=_h(wh,n),o=Ch(wh,n),s=sa(t,a.onViewportChange),c=N.useRef(0);return(0,L.jsxs)(L.Fragment,{children:[(0,L.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}),(0,L.jsx)(qm.Slot,{scope:n,children:(0,L.jsx)(Oa.div,{"data-radix-select-viewport":``,role:`presentation`,...i,ref:s,style:{position:`relative`,flex:1,overflow:`hidden auto`,...i.style},onScroll:R(i.onScroll,e=>{let t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(r?.current&&n){let e=Math.abs(c.current-t.scrollTop);if(e>0){let r=window.innerHeight-hh*2,i=parseFloat(n.style.minHeight),a=parseFloat(n.style.height),o=Math.max(i,a);if(o<r){let i=o+e,a=Math.min(r,i),s=i-a;n.style.height=a+`px`,n.style.bottom===`0px`&&(t.scrollTop=s>0?s:0,n.style.justifyContent=`flex-end`)}}}c.current=t.scrollTop})})})]})},`SelectViewport`)),[fee,pee]=Xm(`SelectGroup`),Eh=`SelectItem`,[mee,Dh]=Xm(Eh),Oh=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,value:r,disabled:i=!1,textValue:a,...o}=e,s=$m(Eh,n),c=_h(Eh,n),l=s.value===r,[u,d]=N.useState(a??``),[f,p]=N.useState(!1),m=sa(t,Ho(e=>c.itemRefCallback?.(e,r,i))),h=Fo(),g=N.useRef(`touch`),_=Um(()=>{i||(s.onValueChange(r),s.onOpenChange(!1))},`handleSelect`);return(0,L.jsx)(mee,{scope:n,value:r,disabled:i,textId:h,isSelected:l,onItemTextChange:N.useCallback(e=>{d(t=>t||(e?.textContent??``).trim())},[]),children:(0,L.jsx)(qm.ItemSlot,{scope:n,value:r,disabled:i,textValue:u,children:(0,L.jsx)(Oa.div,{role:`option`,"aria-labelledby":h,"data-highlighted":f?``:void 0,"aria-selected":l&&f,"data-state":l?`checked`:`unchecked`,"aria-disabled":i||void 0,"data-disabled":i?``:void 0,tabIndex:i?void 0:-1,...o,ref:m,onFocus:R(o.onFocus,()=>p(!0)),onBlur:R(o.onBlur,()=>p(!1)),onClick:R(o.onClick,()=>{g.current!==`mouse`&&_()}),onPointerUp:R(o.onPointerUp,()=>{g.current===`mouse`&&_()}),onPointerDown:R(o.onPointerDown,e=>{g.current=e.pointerType}),onPointerMove:R(o.onPointerMove,e=>{g.current=e.pointerType,i?c.onItemLeave?.():g.current===`mouse`&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:R(o.onPointerLeave,e=>{e.currentTarget===document.activeElement&&c.onItemLeave?.()}),onKeyDown:R(o.onKeyDown,e=>{i||e.target!==e.currentTarget||(c.searchRef?.current===``||e.key!==` `)&&(Gm.includes(e.key)&&_(),e.key===` `&&e.preventDefault())})})})})},`SelectItem`)),kh=`SelectItemText`,Ah=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,className:r,style:i,...a}=e,o=$m(kh,n),s=_h(kh,n),c=Dh(kh,n),l=th(kh,n),[u,d]=N.useState(null),f=Ho(e=>s.itemTextRefCallback?.(e,c.value,c.disabled)),p=sa(t,d,c.onItemTextChange,f),m=u?.textContent,h=N.useMemo(()=>(0,L.jsx)(`option`,{value:c.value,disabled:c.disabled,children:m},c.value),[c.disabled,c.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:_}=l;return so(()=>(g(h),()=>_(h)),[g,_,h]),(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Oa.span,{id:c.textId,...a,ref:p}),c.isSelected&&o.valueNode&&!o.valueNodeHasChildren&&!Rh(o.value)?ci.createPortal(a.children,o.valueNode):null]})},`SelectItemText`)),hee=`SelectItemIndicator`,jh=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,...r}=e;return Dh(hee,n).isSelected?(0,L.jsx)(Oa.span,{"aria-hidden":!0,...r,ref:t}):null},`SelectItemIndicator`)),Mh=`SelectScrollUpButton`,Nh=N.forwardRef(Um(function(e,t){let n=_h(Mh,e.__scopeSelect),r=Ch(Mh,e.__scopeSelect),[i,a]=N.useState(!1),o=sa(t,r.onScrollButtonChange);return so(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollTop>0;a(e)};Um(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,L.jsx)(Ih,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop-=t.offsetHeight)}}):null},`SelectScrollUpButton`)),Ph=`SelectScrollDownButton`,Fh=N.forwardRef(Um(function(e,t){let n=_h(Ph,e.__scopeSelect),r=Ch(Ph,e.__scopeSelect),[i,a]=N.useState(!1),o=sa(t,r.onScrollButtonChange);return so(()=>{if(n.viewport&&n.isPositioned){let e=function(){let e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};Um(e,`handleScroll`);let t=n.viewport;return e(),t.addEventListener(`scroll`,e),()=>t.removeEventListener(`scroll`,e)}},[n.viewport,n.isPositioned]),i?(0,L.jsx)(Ih,{...e,ref:o,onAutoScroll:()=>{let{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop+=t.offsetHeight)}}):null},`SelectScrollDownButton`)),Ih=N.forwardRef(Um(function(e,t){let{__scopeSelect:n,onAutoScroll:r,...i}=e,a=_h(`SelectScrollButton`,n),o=N.useRef(null),s=Jm(n),c=N.useCallback(()=>{o.current!==null&&(window.clearInterval(o.current),o.current=null)},[]);return N.useEffect(()=>()=>c(),[c]),so(()=>{s().find(e=>e.ref.current===document.activeElement)?.ref.current?.scrollIntoView({block:`nearest`})},[s]),(0,L.jsx)(Oa.div,{"aria-hidden":!0,...i,ref:t,style:{flexShrink:0,...i.style},onPointerDown:R(i.onPointerDown,()=>{o.current===null&&(o.current=window.setInterval(r,50))}),onPointerMove:R(i.onPointerMove,()=>{a.onItemLeave?.(),o.current===null&&(o.current=window.setInterval(r,50))}),onPointerLeave:R(i.onPointerLeave,()=>{c()})})},`SelectScrollButtonImpl`)),gee=`SelectBubbleInput`,_ee=N.forwardRef(Um(function({__scopeSelect:e,...t},n){let r=$m(gee,e),{value:i,onValueChange:a,required:o,disabled:s,name:c,autoComplete:l,form:u}=r,{nativeOptions:d,nativeSelectKey:f}=r,p=N.useRef(null),m=sa(n,p),h=i??``,g=ym(h),_=Array.from(d).some(e=>(e.props.value??``)===``);return N.useEffect(()=>{let e=p.current;if(!e)return;let t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,`value`).set;if(g!==h&&n){let t=new Event(`change`,{bubbles:!0});n.call(e,h),e.dispatchEvent(t)}},[g,h]),(0,L.jsxs)(Oa.select,{"aria-hidden":!0,required:o,tabIndex:-1,name:c,autoComplete:l,disabled:s,form:u,onChange:e=>a(e.target.value),...t,style:{...Ma,...t.style},ref:m,defaultValue:h,children:[Rh(i)&&!_?(0,L.jsx)(`option`,{value:``}):null,Array.from(d)]},f)},`SelectBubbleInput`));function Lh(e){return typeof e==`function`}Um(Lh,`isFunction`);function Rh(e){return e===``||e===void 0}Um(Rh,`shouldShowPlaceholder`);function zh(e){let t=Ho(e),n=N.useRef(``),r=N.useRef(0),i=N.useCallback(e=>{let i=n.current+e;t(i),Um((function e(t){n.current=t,window.clearTimeout(r.current),t!==``&&(r.current=window.setTimeout(()=>e(``),1e3))}),`updateSearch`)(i)},[t]),a=N.useCallback(()=>{n.current=``,window.clearTimeout(r.current)},[]);return N.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,i,a]}Um(zh,`useTypeaheadSearch`);function Bh(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=Vh(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}Um(Bh,`findNextItem`);function Vh(e,t){return e.map((n,r)=>e[(t+r)%e.length])}Um(Vh,`wrapArray`);var Hh=Object.defineProperty,Uh=(e,t)=>Hh(e,`name`,{value:t,configurable:!0}),Wh=`horizontal`,Gh=[`horizontal`,`vertical`],Kh=N.forwardRef(Uh(function(e,t){let{decorative:n,orientation:r=Wh,...i}=e,a=qh(r)?r:Wh,o=n?{role:`none`}:{"aria-orientation":a===`vertical`?a:void 0,role:`separator`};return(0,L.jsx)(Oa.div,{"data-orientation":a,...o,...i,ref:t})},`Separator`));function qh(e){return Gh.includes(e)}Uh(qh,`isValidOrientation`);var Jh=Kh,Yh=Object.defineProperty,Xh=(e,t)=>Yh(e,`name`,{value:t,configurable:!0}),Zh=`Toggle`,Qh=N.forwardRef(Xh(function(e,t){let{pressed:n,defaultPressed:r,onPressedChange:i,...a}=e,[o,s]=_o({prop:n,onChange:i,defaultProp:r??!1,caller:Zh});return(0,L.jsx)(Oa.button,{type:`button`,"aria-pressed":o,"data-state":o?`on`:`off`,"data-disabled":e.disabled?``:void 0,...a,ref:t,onClick:R(e.onClick,()=>{e.disabled||s(!o)})})},`Toggle`)),$h=Object.defineProperty,eg=(e,t)=>$h(e,`name`,{value:t,configurable:!0}),tg=`ToggleGroup`,[ng,vee]=za(tg,[zf]),rg=zf(),ig=N.forwardRef(eg(function(e,t){let{type:n,...r}=e;if(n===`single`)return(0,L.jsx)(sg,{role:`radiogroup`,...r,ref:t});if(n===`multiple`)return(0,L.jsx)(cg,{role:`toolbar`,...r,ref:t});throw Error(`Missing prop \`type\` expected on \`${tg}\``)},`ToggleGroup`)),[ag,og]=ng(tg),sg=N.forwardRef(eg(function(e,t){let{value:n,defaultValue:r,onValueChange:i=eg(()=>{},`onValueChange`),...a}=e,[o,s]=_o({prop:n,defaultProp:r??``,onChange:i,caller:tg});return(0,L.jsx)(ag,{scope:e.__scopeToggleGroup,type:`single`,value:N.useMemo(()=>o?[o]:[],[o]),onItemActivate:s,onItemDeactivate:N.useCallback(()=>s(``),[s]),children:(0,L.jsx)(dg,{...a,ref:t})})},`ToggleGroupImplSingle`)),cg=N.forwardRef(eg(function(e,t){let{value:n,defaultValue:r,onValueChange:i=eg(()=>{},`onValueChange`),...a}=e,[o,s]=_o({prop:n,defaultProp:r??[],onChange:i,caller:tg}),c=N.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=N.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,L.jsx)(ag,{scope:e.__scopeToggleGroup,type:`multiple`,value:o,onItemActivate:c,onItemDeactivate:l,children:(0,L.jsx)(dg,{...a,ref:t})})},`ToggleGroupImplMultiple`)),[lg,ug]=ng(tg),dg=N.forwardRef(eg(function(e,t){let{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:i=!0,orientation:a,dir:o,loop:s=!0,...c}=e,l=rg(n),u=zo(o),d={dir:u,...c};return(0,L.jsx)(lg,{scope:n,rovingFocus:i,disabled:r,children:i?(0,L.jsx)(Zf,{asChild:!0,...l,orientation:a,dir:u,loop:s,children:(0,L.jsx)(Oa.div,{...d,ref:t})}):(0,L.jsx)(Oa.div,{...d,ref:t})})},`ToggleGroupImpl`)),fg=`ToggleGroupItem`,pg=N.forwardRef(eg(function(e,t){let n=og(fg,e.__scopeToggleGroup),r=ug(fg,e.__scopeToggleGroup),i=rg(e.__scopeToggleGroup),a=n.value.includes(e.value),o=r.disabled||e.disabled,s={...e,pressed:a,disabled:o},c=N.useRef(null);return r.rovingFocus?(0,L.jsx)(Qf,{asChild:!0,...i,focusable:!o,active:a,ref:c,children:(0,L.jsx)(mg,{...s,ref:t})}):(0,L.jsx)(mg,{...s,ref:t})},`ToggleGroupItem`)),mg=N.forwardRef(eg(function(e,t){let{__scopeToggleGroup:n,value:r,...i}=e,a=og(fg,n),o={role:`radio`,"aria-checked":e.pressed,"aria-pressed":void 0},s=a.type===`single`?o:void 0;return(0,L.jsx)(Qh,{...s,...i,ref:t,onPressedChange:e=>{e?a.onItemActivate(r):a.onItemDeactivate(r)}})},`ToggleGroupItemImpl`)),hg=e=>{let{asChild:t,children:n,...r}=e;return t?(0,L.jsx)(da,{...r,children:(0,N.cloneElement)(n,{"data-rly-root":``})}):(0,L.jsx)(`div`,{...r,"data-rly-root":``,children:n})},gg=(0,N.createContext)(`system`),_g=({theme:e,...t})=>(0,L.jsx)(gg.Provider,{value:e,children:(0,L.jsx)(hg,{...t,"data-theme":e})}),vg=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),yg=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),bg=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),xg=e=>{let t=bg(e);return t.charAt(0).toUpperCase()+t.slice(1)},Sg={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`},Cg=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},wg=(0,N.createContext)({}),Tg=()=>(0,N.useContext)(wg),Eg=(0,N.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=Tg()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,N.createElement)(`svg`,{ref:c,...Sg,width:t??l??Sg.width,height:t??l??Sg.height,stroke:e??f,strokeWidth:m,className:vg(`lucide`,p,i),...!a&&!Cg(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,N.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),z=(e,t)=>{let n=(0,N.forwardRef)(({className:n,...r},i)=>(0,N.createElement)(Eg,{ref:i,iconNode:t,className:vg(`lucide-${yg(xg(e))}`,`lucide-${e}`,n),...r}));return n.displayName=xg(e),n},Dg=z(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),Og=z(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),kg=z(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),Ag=z(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),jg=z(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),Mg=z(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Ng=z(`box`,[[`path`,{d:`M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z`,key:`hh9hay`}],[`path`,{d:`m3.3 7 8.7 5 8.7-5`,key:`g66t2b`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}]]),Pg=z(`calendar`,[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}]]),Fg=z(`chart-column`,[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]]),Ig=z(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),Lg=z(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),Rg=z(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),zg=z(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),Bg=z(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),Vg=z(`circle-alert`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]]),Hg=z(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),Ug=z(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Wg=z(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),Gg=z(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),Kg=z(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),qg=z(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Jg=z(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),Yg=z(`ellipsis`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]]),Xg=z(`external-link`,[[`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`}]]),Zg=z(`eye-off`,[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]),Qg=z(`eye`,[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),$g=z(`file`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]),e_=z(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]),t_=z(`funnel`,[[`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`}]]),n_=z(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),r_=z(`git-merge`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M6 21V9a9 9 0 0 0 9 9`,key:`7kw0sc`}]]),i_=z(`git-pull-request`,[[`circle`,{cx:`18`,cy:`18`,r:`3`,key:`1xkwt0`}],[`circle`,{cx:`6`,cy:`6`,r:`3`,key:`1lh9wr`}],[`path`,{d:`M13 6h3a2 2 0 0 1 2 2v7`,key:`1yeb86`}],[`line`,{x1:`6`,x2:`6`,y1:`9`,y2:`21`,key:`rroup`}]]),a_=z(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),o_=z(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),s_=z(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),c_=z(`loader`,[[`path`,{d:`M12 2v4`,key:`3427ic`}],[`path`,{d:`m16.2 7.8 2.9-2.9`,key:`r700ao`}],[`path`,{d:`M18 12h4`,key:`wj9ykh`}],[`path`,{d:`m16.2 16.2 2.9 2.9`,key:`1bxg5t`}],[`path`,{d:`M12 18v4`,key:`jadmvz`}],[`path`,{d:`m4.9 19.1 2.9-2.9`,key:`bwix9q`}],[`path`,{d:`M2 12h4`,key:`j09sii`}],[`path`,{d:`m4.9 4.9 2.9 2.9`,key:`giyufr`}]]),l_=z(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),u_=z(`log-in`,[[`path`,{d:`m10 17 5-5-5-5`,key:`1bsop3`}],[`path`,{d:`M15 12H3`,key:`6jk70r`}],[`path`,{d:`M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4`,key:`u53s6r`}]]),yee=z(`mail-open`,[[`path`,{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`,key:`1jhwl8`}],[`path`,{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`,key:`1qfld7`}]]),bee=z(`mail`,[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]),xee=z(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),d_=z(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),See=z(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),f_=z(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),p_=z(`moon`,[[`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`}]]),Cee=z(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),m_=z(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),wee=z(`radio-tower`,[[`path`,{d:`M4.9 16.1C1 12.2 1 5.8 4.9 1.9`,key:`s0qx1y`}],[`path`,{d:`M7.8 4.7a6.14 6.14 0 0 0-.8 7.5`,key:`1idnkw`}],[`circle`,{cx:`12`,cy:`9`,r:`2`,key:`1092wv`}],[`path`,{d:`M16.2 4.8c2 2 2.26 5.11.8 7.47`,key:`ojru2q`}],[`path`,{d:`M19.1 1.9a9.96 9.96 0 0 1 0 14.1`,key:`rhi7fg`}],[`path`,{d:`M9.5 18h5`,key:`mfy3pd`}],[`path`,{d:`m8 22 4-11 4 11`,key:`25yftu`}]]),h_=z(`refresh-cw`,[[`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`}]]),Tee=z(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),g_=z(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),__=z(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Eee=z(`server`,[[`rect`,{width:`20`,height:`8`,x:`2`,y:`2`,rx:`2`,ry:`2`,key:`ngkwjq`}],[`rect`,{width:`20`,height:`8`,x:`2`,y:`14`,rx:`2`,ry:`2`,key:`iecqi9`}],[`line`,{x1:`6`,x2:`6.01`,y1:`6`,y2:`6`,key:`16zg32`}],[`line`,{x1:`6`,x2:`6.01`,y1:`18`,y2:`18`,key:`nzw8ys`}]]),v_=z(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),y_=z(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Dee=z(`star`,[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]),b_=z(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),x_=z(`trash`,[[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Oee=z(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),S_=z(`user`,[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]),C_=z(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),kee={size:{small:{pixels:16,purpose:`Dense metadata and supporting controls`},default:{pixels:20,purpose:`Standard interface controls`},large:{pixels:24,purpose:`Prominent standalone indicators`}}},Aee={size:`default`},jee={"arrow-down":Dg,"arrow-left":Og,"arrow-right":kg,"arrow-up":Ag,check:Ig,"chevron-down":Lg,"chevron-left":Rg,"chevron-right":zg,"chevron-up":Bg,alert:Vg,clock:Gg,"external-link":Xg,file:$g,link:o_,loader:s_,menu:xee,minus:See,plus:m_,search:__,user:S_,close:C_},Mee=e=>kee.size[e??Aee.size].pixels,w_=e=>{let t=jee[e.name],n=Mee(e.size),r={className:e.className,color:`currentColor`,focusable:!1,height:n,strokeWidth:1.75,width:n};if(e.decorative)return(0,L.jsx)(t,{...r,"aria-hidden":`true`});if(e.label.trim().length===0)throw Error(`Informative Icon labels must contain visible text`);return(0,L.jsx)(Fa,{label:e.label,children:(0,L.jsx)(t,{...r})})},T_={available:!1},E_=(0,N.createContext)(T_),D_=()=>(0,N.useContext)(E_),O_=({children:e})=>{let t=D_();return t.available?e(t.container):null},Nee=({children:e,container:t})=>{let[n,r]=(0,N.useState)(null),i=t===void 0?n:t,a=i===null?T_:{available:!0,container:i};return(0,L.jsxs)(E_.Provider,{value:a,children:[e,t===void 0?(0,L.jsx)(`div`,{"data-rly-portal-root":``,ref:r}):null]})},k_=(0,N.createContext)(e=>(0,L.jsx)(`a`,{...e})),Pee=()=>(0,N.useContext)(k_),Fee=({children:e,component:t})=>(0,L.jsx)(k_.Provider,{value:t,children:e}),A_=e=>{let t=Pee();return(0,L.jsx)(t,{...e})},j_={dockerDismissed:`codecommit-docker-dismissed`,grantedDismissed:`codecommit-granted-dismissed`,theme:`codecommit-theme`,desktopNotifications:`codecommit:desktopNotifications`,reminders:`codecommit:reminders`,reminderInterval:`codecommit:reminderInterval`},M_=(0,N.createContext)({theme:`system`,setTheme:()=>{}}),N_=(0,N.forwardRef)(function({href:e,...t},n){return(0,L.jsx)(Ri,{...t,ref:n,to:e})}),P_=()=>{try{let e=localStorage.getItem(j_.theme);return e===`dark`||e===`light`||e===`system`?e:`system`}catch{return`system`}},Iee=()=>window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`;function F_({children:e}){let[t,n]=(0,N.useState)(P_),[r,i]=(0,N.useState)(Iee),a=(0,N.useCallback)(e=>{n(e);try{localStorage.setItem(j_.theme,e)}catch{}},[]);(0,N.useEffect)(()=>{let e=document.documentElement,n=t===`system`?r:t;e.classList.remove(`dark`,`light`),e.classList.add(n),e.dataset.theme=t},[r,t]),(0,N.useEffect)(()=>{let e=window.matchMedia(`(prefers-color-scheme: dark)`),t=()=>i(e.matches?`dark`:`light`);return t(),e.addEventListener(`change`,t),()=>e.removeEventListener(`change`,t)},[]);let o=(0,N.useMemo)(()=>({theme:t,setTheme:a}),[a,t]);return(0,L.jsx)(M_,{value:o,children:(0,L.jsx)(_g,{theme:t,children:(0,L.jsx)(Nee,{children:(0,L.jsx)(Fee,{component:N_,children:e})})})})}var I_=()=>(0,N.useContext)(M_),L_=(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 e=0,r=t.length;e<r;e++)n=t[e](n);return n}}},R_={pipe(){return L_(this,arguments)}},z_=function(){function e(){}return e.prototype=R_,e}(),B=function(e,t){if(typeof e==`function`)return function(){return e(arguments)?t.apply(this,arguments):e=>t(e,...arguments)};switch(e){case 0:case 1:throw RangeError(`Invalid arity ${e}`);case 2:return function(e,n){return arguments.length>=2?t(e,n):function(n){return t(n,e)}};case 3:return function(e,n,r){return arguments.length>=3?t(e,n,r):function(r){return t(r,e,n)}};default:return function(){if(arguments.length>=e)return t.apply(this,arguments);let n=arguments;return function(e){return t(e,...n)}}}},B_=e=>e,V_=e=>()=>e,H_=V_(!0),U_=V_(!1),W_=V_(null),G_=V_(void 0),K_=G_;function q_(e,...t){return L_(e,t)}function J_(e,t,n,r,i,a,o,s,c){switch(arguments.length){case 1:return e;case 2:return function(){return t(e.apply(this,arguments))};case 3:return function(){return n(t(e.apply(this,arguments)))};case 4:return function(){return r(n(t(e.apply(this,arguments))))};case 5:return function(){return i(r(n(t(e.apply(this,arguments)))))};case 6:return function(){return a(i(r(n(t(e.apply(this,arguments))))))};case 7:return function(){return o(a(i(r(n(t(e.apply(this,arguments)))))))};case 8:return function(){return s(o(a(i(r(n(t(e.apply(this,arguments))))))))};case 9:return function(){return c(s(o(a(i(r(n(t(e.apply(this,arguments)))))))))}}}function Y_(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),i}}function X_(e){let t=new WeakMap;return n=>{let r=t.get(n);if(r!==void 0)return r;let i=e(n);return t.set(n,i),t.set(i,i),i}}var Z_=e=>{let t=new Set(Reflect.ownKeys(e));if(e.constructor===Object)return t;e instanceof Error&&t.delete(`stack`);let n=Object.getPrototypeOf(e),r=n;for(;r!==null&&r!==Object.prototype;){let e=Reflect.ownKeys(r);for(let n=0;n<e.length;n++)t.add(e[n]);r=Object.getPrototypeOf(r)}return t.has(`constructor`)&&typeof e.constructor==`function`&&n===e.constructor.prototype&&t.delete(`constructor`),t},Q_=new WeakSet;function $_(e){return typeof e==`string`}function ev(e){return typeof e==`number`}function Lee(e){return typeof e==`boolean`}function Ree(e){return typeof e==`symbol`}function tv(e){return $_(e)||ev(e)||Ree(e)}function nv(e){return typeof e==`function`}function zee(e){return e===void 0}function Bee(e){return e!==void 0}function Vee(e){return e!=null}function rv(e){return!1}function iv(e){return!0}function av(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ov(e){return typeof e==`object`&&!!e||nv(e)}var sv=B(2,(e,t)=>ov(e)&&t in e),cv=B(2,(e,t)=>sv(e,`_tag`)&&e._tag===t);function lv(e){return e instanceof Error}var uv=`~effect/interfaces/Hash`,dv=e=>{switch(typeof e){case`number`:return gv(e);case`bigint`:return _v(e.toString(10));case`boolean`:return _v(String(e));case`symbol`:return _v(String(e));case`string`:return _v(e);case`undefined`:return _v(`undefined`);case`function`:case`object`:if(e===null)return _v(`null`);if(e instanceof Date)return Number.isNaN(e.getTime())?_v(`Invalid Date`):_v(e.toISOString());if(e instanceof RegExp)return _v(e.toString());{if(Q_.has(e))return fv(e);if(Tv.has(e))return Tv.get(e);let t=Dv(e,()=>hv(e)?e[uv]():typeof e==`function`?fv(e):e instanceof DataView?xv(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)):Array.isArray(e)||ArrayBuffer.isView(e)?xv(e):e instanceof Map?Sv(e):e instanceof Set?Cv(e):yv(e));return Tv.set(e,t),t}default:throw Error(`BUG: unhandled typeof ${typeof e} - please report an issue at https://github.com/Effect-TS/effect/issues`)}},fv=e=>(wv.has(e)||wv.set(e,gv(Math.floor(Math.random()*(2**53-1)))),wv.get(e)),pv=B(2,(e,t)=>e*53^t),mv=e=>e&3221225471|e>>>1&1073741824,hv=e=>sv(e,uv),gv=e=>{if(e!==e)return _v(`NaN`);if(e===1/0)return _v(`Infinity`);if(e===-1/0)return _v(`-Infinity`);let t=e|0;for(t!==e&&(t^=e*4294967295);e>4294967295;)t^=e/=4294967295;return mv(t)},_v=e=>{let t=5381,n=e.length;for(;n;)t=t*33^e.charCodeAt(--n);return mv(t)},vv=(e,t)=>{let n=12289;for(let r of t)n^=pv(dv(r),dv(e[r]));return mv(n)},yv=e=>vv(e,Z_(e)),bv=(e,t)=>n=>{let r=e;for(let e of n)r^=t(e);return mv(r)},xv=bv(6151,dv),Sv=bv(_v(`Map`),([e,t])=>pv(dv(e),dv(t))),Cv=bv(_v(`Set`),dv),wv=new WeakMap,Tv=new WeakMap,Ev=new WeakSet;function Dv(e,t){if(Ev.has(e))return _v(`[Circular]`);Ev.add(e);let n=t();return Ev.delete(e),n}var Ov=`~effect/interfaces/Equal`;function kv(){return arguments.length===1?e=>Av(e,arguments[0]):Av(arguments[0],arguments[1])}function Av(e,t){if(e===t)return!0;if(e==null||t==null)return!1;let n=typeof e;return n===typeof t?n===`number`&&e!==e&&t!==t?!0:n!==`object`&&n!==`function`||Q_.has(e)||Q_.has(t)?!1:Fv(e,t,Pv):!1}function jv(e,t,n){let r=Mv.has(e),i=Nv.has(t);if(r&&i)return!0;if(r||i)return!1;Mv.add(e),Nv.add(t);let a=n();return Mv.delete(e),Nv.delete(t),a}var Mv=new WeakSet,Nv=new WeakSet;function Pv(e,t){if(dv(e)!==dv(t))return!1;if(e instanceof Date){if(!(t instanceof Date))return!1;let n=e.getTime(),r=t.getTime();return n===r||Number.isNaN(n)&&Number.isNaN(r)}if(e instanceof RegExp)return t instanceof RegExp&&e.toString()===t.toString();let n=Wv(e),r=Wv(t);if(n!==r)return!1;let i=n&&r;return typeof e==`function`&&!i?!1:jv(e,t,()=>{if(i)return e[Ov](t);if(Array.isArray(e))return!Array.isArray(t)||e.length!==t.length?!1:Lv(e,t);if(ArrayBuffer.isView(e)){let n=e instanceof DataView;if(!ArrayBuffer.isView(t)||e.byteLength!==t.byteLength||n!==t instanceof DataView)return!1;if(n){let n=t;return Rv(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(n.buffer,n.byteOffset,n.byteLength))}return Rv(e,t)}return e instanceof Map?!(t instanceof Map)||e.size!==t.size?!1:Vv(e,t):e instanceof Set?!(t instanceof Set)||e.size!==t.size?!1:Uv(e,t):zv(e,t)})}function Fv(e,t,n){let r=Iv.get(e);if(!r)r=new WeakMap,Iv.set(e,r);else if(r.has(t))return r.get(t);let i=n(e,t);r.set(t,i);let a=Iv.get(t);return a||(a=new WeakMap,Iv.set(t,a)),a.set(e,i),i}var Iv=new WeakMap;function Lv(e,t){for(let n=0;n<e.length;n++)if(!Av(e[n],t[n]))return!1;return!0}function Rv(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function zv(e,t){let n=Z_(e),r=Z_(t);if(n.size!==r.size)return!1;for(let i of n)if(!r.has(i)||!Av(e[i],t[i]))return!1;return!0}function Bv(e,t){return function(n,r){let i=Array.from(r);for(let[r,a]of n){let n=!1;for(let o=0;o<i.length;o++){let[s,c]=i[o];if(e(r,s)&&t(a,c)){i[o]=i[i.length-1],i.pop(),n=!0;break}}if(!n)return!1}return!0}}var Vv=Bv(Av,Av);function Hv(e){return function(t,n){let r=Array.from(n);for(let n of t){let t=!1;for(let i=0;i<r.length;i++){let a=r[i];if(e(n,a)){r[i]=r[r.length-1],r.pop(),t=!0;break}}if(!t)return!1}return!0}}var Uv=Hv(Av),Wv=e=>sv(e,Ov),Gv=()=>kv,Kv=Symbol.for(`~effect/Redactable`),Hee=e=>sv(e,Kv);function qv(e){return Hee(e)?Jv(e):e}function Jv(e){return e[Kv](globalThis[`~effect/Fiber/currentFiber`]?.context??Uee)}var Yv=`~effect/Fiber/currentFiber`,Xv=new Map,Uee={"~effect/Context":{},base:Xv,depth:0,mapUnsafe:Xv,pipe(){return L_(this,arguments)}};function Zv(e,t){let n=t?.space??0,r=new WeakSet,i=n?typeof n==`number`?` `.repeat(n):n:``,a=e=>i.repeat(e),o=(e,t)=>{let n=e?.constructor;return n&&n!==Object.prototype.constructor&&n.name?`${n.name}(${t})`:t},s=e=>{try{return Reflect.ownKeys(e)}catch{return[`[ownKeys threw]`]}};function c(e,n=0){if(typeof e==`string`)return JSON.stringify(e);if(typeof e==`number`||e==null||typeof e==`boolean`||typeof e==`symbol`)return String(e);if(typeof e==`bigint`)return String(e)+`n`;if(typeof e==`object`||typeof e==`function`){if(r.has(e))return Wee;r.add(e);let l;if(Kv in e)l=c(Jv(e),n);else if(Array.isArray(e))l=!i||e.length<=1?`[${e.map(e=>c(e,n)).join(`,`)}]`:`[\n${a(n+1)}${e.map(e=>c(e,n+1)).join(`,
51
- `+a(n+1))}\n${a(n)}]`;else if(e instanceof Date)l=$v(e);else if(!t?.ignoreToString&&sv(e,`toString`)&&typeof e.toString==`function`&&e.toString!==Object.prototype.toString&&e.toString!==Array.prototype.toString){let t=Kee(e);l=e instanceof Error&&e.cause?`${t} (cause: ${c(e.cause,n)})`:t}else if(Symbol.iterator in e)l=`${e.constructor.name}(${c(Array.from(e),n)})`;else{let t=s(e);if(!i||t.length<=1){let r=`{${t.map(t=>`${Qv(t)}:${c(e[t],n)}`).join(`,`)}}`;l=o(e,r)}else{let r=`{\n${t.map(t=>`${a(n+1)}${Qv(t)}: ${c(e[t],n+1)}`).join(`,
52
- `)}\n${a(n)}}`;l=o(e,r)}}return r.delete(e),l}return String(e)}return c(e,0)}var Wee=`[Circular]`;function Qv(e){return typeof e==`string`?JSON.stringify(e):String(e)}function Gee(e){return e.map(e=>`[${Qv(e)}]`).join(``)}function $v(e){try{return e.toISOString()}catch{return`Invalid Date`}}function Kee(e){try{let t=e.toString();return typeof t==`string`?t:String(t)}catch{return`[toString threw]`}}function qee(e,t){let n=[];return JSON.stringify(e,function(e,t){let r=Object.getOwnPropertyDescriptor(this,e)?.value,i=sv(r,Kv)?qv(r):qv(t);if(typeof i==`bigint`)return Zv(i);if(typeof i!=`object`||!i)return i;for(;n.length>0&&n[n.length-1]!==this;)n.pop();if(!n.includes(i))return n.push(i),i},t?.space)??`null`}var ey=Symbol.for(`nodejs.util.inspect.custom`),ty=e=>{try{return e=qv(e),sv(e,`toJSON`)&&nv(e.toJSON)&&e.toJSON.length===0?e.toJSON():Array.isArray(e)?e.map(ty):e}catch{return`[toJSON threw]`}},ny={toJSON(){return ty(this)},[ey](){return this.toJSON()},toString(){return Zv(this.toJSON())}},Jee=class{[ey](){return this.toJSON()}toString(){return Zv(this.toJSON())}},ry=class e{called=!1;self;constructor(e){this.self=e}next(e){return this.called?{value:e,done:!0}:(this.called=!0,{value:this.self,done:!1})}[Symbol.iterator](){return new e(this.self)}},iy=(()=>{let e=`~effect/Utils/internal`,t={[e]:e=>e()},n={[e]:e=>{try{return e()}finally{}}};return t[e](()=>Error().stack)?.includes(e)===!0?t[e]:n[e]})();function ay(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0}):e[t]=n}function oy(e,t){for(let n of Reflect.ownKeys(t))Object.prototype.propertyIsEnumerable.call(t,n)&&ay(e,n,t[n])}var sy=`~effect/Effect`,cy=`~effect/Exit`,ly={_A:B_,_E:B_,_R:B_},uy=`${sy}/identifier`,dy=`${sy}/args`,fy=`${sy}/evaluate`,py=`${sy}/successCont`,my=`${sy}/failureCont`,hy=`${sy}/ensureCont`,gy=Symbol.for(`effect/Effect/Yield`),_y={pipe(){return L_(this,arguments)},toJSON(){return{...this}},toString(){return Zv(this.toJSON(),{ignoreToString:!0,space:2})},[ey](){return this.toJSON()}},vy={[sy]:ly,..._y,[Symbol.iterator](){return new ry(this)},toJSON(){return{_id:`Effect`,op:this[uy],...dy in this?{args:this[dy]}:void 0}}},yy=e=>sv(e,sy),by=e=>sv(e,cy),xy=`~effect/Cause`,Sy=`~effect/Cause/Reason`,Cy=e=>sv(e,xy),wy=e=>sv(e,Sy),Ty=class{[xy];reasons;constructor(e){this[xy]=xy,this.reasons=e}pipe(){return L_(this,arguments)}toJSON(){return{_id:`Cause`,failures:this.reasons.map(e=>e.toJSON())}}toString(){return`Cause(${Zv(this.reasons)})`}[ey](){return this.toJSON()}[Ov](e){return Cy(e)&&this.reasons.length===e.reasons.length&&this.reasons.every((t,n)=>kv(t,e.reasons[n]))}[uv](){return xv(this.reasons)}},Ey=new WeakMap,Dy=class{[Sy];annotations;_tag;constructor(e,t,n){if(this[Sy]=Sy,this._tag=e,t!==Oy&&typeof n==`object`&&n&&t.size>0){let e=Ey.get(n);e&&(t=new Map([...e,...t])),Ey.set(n,t)}this.annotations=t}annotate(e,t){if(e.mapUnsafe.size===0)return this;let n=new Map(this.annotations);e.mapUnsafe.forEach((e,r)=>{t?.overwrite!==!0&&n.has(r)||n.set(r,e)});let r=Object.assign(Object.create(Object.getPrototypeOf(this)),this);return r.annotations=n,r}pipe(){return L_(this,arguments)}toString(){return Zv(this)}[ey](){return this.toString()}},Oy=new Map,ky=class extends Dy{error;constructor(e,t=Oy){super(`Fail`,t,e),this.error=e}toString(){return`Fail(${Zv(this.error)})`}toJSON(){return{_tag:`Fail`,error:this.error}}[Ov](e){return Iy(e)&&kv(this.error,e.error)&&kv(this.annotations,e.annotations)}[uv](){return pv(_v(this._tag))(pv(dv(this.error))(dv(this.annotations)))}},Ay=e=>new Ty(e),jy=new Ty([]),My=e=>new Ty([new ky(e)]),Ny=class extends Dy{defect;constructor(e,t=Oy){super(`Die`,t,e),this.defect=e}toString(){return`Die(${Zv(this.defect)})`}toJSON(){return{_tag:`Die`,defect:this.defect}}[Ov](e){return Ly(e)&&kv(this.defect,e.defect)&&kv(this.annotations,e.annotations)}[uv](){return pv(_v(this._tag))(pv(dv(this.defect))(dv(this.annotations)))}},Py=e=>new Ty([new Ny(e)]),Fy=B(e=>Cy(e[0]),(e,t,n)=>t.mapUnsafe.size===0?e:new Ty(e.reasons.map(e=>e.annotate(t,n)))),Iy=e=>e._tag===`Fail`,Ly=e=>e._tag===`Die`,Ry=e=>e._tag===`Interrupt`;function zy(e){return Jy(`Effect.evaluate: Not implemented`)}var By=e=>({...vy,[uy]:e.op,[fy]:e[fy]??zy,[py]:e[py],[my]:e[my],[hy]:e[hy]}),Vy=e=>{let t=By(e);return function(){let n=Object.create(t);return n[dy]=e.single===!1?arguments:arguments[0],n}},Hy=e=>{let t={[cy]:cy,_tag:e.op,get[e.prop](){return this[dy]},...By(e),toString(){return`${e.op}(${Zv(this[dy])})`},toJSON(){return{_id:`Exit`,_tag:e.op,[e.prop]:this[dy]}},[Ov](e){return by(e)&&e._tag===this._tag&&kv(this[dy],e[dy])},[uv](){return pv(_v(e.op),dv(this[dy]))}};return function(e){let n=Object.create(t);return n[dy]=e,n}},Uy=Hy({op:`Success`,prop:`value`,[fy](e){let t=e.getCont(py);return t?t[py](this[dy],e,this):e.yieldWith(this)}}),Wy={key:`effect/Cause/StackTrace`},Gy={key:`effect/Cause/InterruptorStackTrace`},Ky=Hy({op:`Failure`,prop:`cause`,[fy](e){let t=this[dy],n=!1;e.currentStackFrame&&(t=Fy(t,{mapUnsafe:new Map([[Wy.key,e.currentStackFrame]])}),n=!0);let r=e.getCont(my);for(;e.interruptible&&e._interruptedCause&&r;)r=e.getCont(my);return r?r[my](t,e,n?void 0:this):e.yieldWith(n?Ky(t):this)}}),qy=e=>Ky(My(e)),Jy=e=>Ky(Py(e)),Yy=Vy({op:`WithFiber`,[fy](e){return this[dy](e)}}),Xy=function(){class e extends globalThis.Error{}let t=By({op:`YieldableError`,[fy](){return qy(this)}});return delete t.toString,Object.assign(e.prototype,t),e}(),Zy=function(){let e=Symbol.for(`effect/Data/Error/plainArgs`);return class extends Xy{constructor(t){super(t?.message,t?.cause?{cause:t.cause}:void 0),t&&(oy(this,t),Object.defineProperty(this,e,{value:t,enumerable:!1}))}toJSON(){return{...this[e],...this}}}}(),Qy=e=>{class t extends Zy{_tag=e}return t.prototype.name=e,t},$y=`~effect/Cause/NoSuchElementError`,eb=class extends Qy(`NoSuchElementError`){[$y]=$y;constructor(e){super({message:e})}},tb=`~effect/Cause/Done`,nb=e=>sv(e,tb),rb={[tb]:tb,_tag:`Done`,value:void 0},ib=e=>e===void 0?rb:{[tb]:tb,_tag:`Done`,value:e},ab=qy(rb),ob=e=>e===void 0?ab:qy(ib(e)),sb=e=>By({op:e.label,[fy]:e.evaluate}),cb=e=>(t,n)=>t===n||e(t,n),lb=(e,t)=>e===t,ub=()=>lb;function db(e){return cb((t,n)=>{if(t.length!==n.length)return!1;for(let r=0;r<t.length;r++)if(!e[r](t[r],n[r]))return!1;return!0})}function fb(e){return cb((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})}var pb=`~effect/data/Option`,mb={[pb]:{_A:e=>e},..._y,[Symbol.iterator](){return new ry(this)}},hb=Object.defineProperty(Object.assign(Object.create(mb),{_tag:`Some`,_op:`Some`,[Ov](e){return vb(e)&&bb(e)&&kv(this.value,e.value)},[uv](){return pv(dv(this._tag))(dv(this.value))},toString(){return`some(${Zv(this.value)})`},toJSON(){return{_id:`Option`,_tag:this._tag,value:ty(this.value)}}}),"valueOrUndefined",{get(){return this.value}}),gb=dv(`None`),_b=Object.assign(Object.create(mb),{_tag:`None`,_op:`None`,valueOrUndefined:void 0,[Ov](e){return vb(e)&&yb(e)},[uv](){return gb},toString(){return`none()`},toJSON(){return{_id:`Option`,_tag:this._tag}}}),vb=e=>sv(e,pb),yb=e=>e._tag===`None`,bb=e=>e._tag===`Some`,xb=Object.create(_b),Sb=e=>{let t=Object.create(hb);return t.value=e,t},Cb=`~effect/data/Result`,wb={[Cb]:{_A:e=>e,_E:e=>e},..._y,[Symbol.iterator](){return new ry(this)}},Tb=Object.assign(Object.create(wb),{_tag:`Success`,_op:`Success`,[Ov](e){return Db(e)&&kb(e)&&kv(this.success,e.success)},[uv](){return pv(dv(this._tag))(dv(this.success))},toString(){return`success(${Zv(this.success)})`},toJSON(){return{_id:`Result`,_tag:this._tag,value:ty(this.success)}}}),Eb=Object.assign(Object.create(wb),{_tag:`Failure`,_op:`Failure`,[Ov](e){return Db(e)&&Ob(e)&&kv(this.failure,e.failure)},[uv](){return pv(dv(this._tag))(dv(this.failure))},toString(){return`failure(${Zv(this.failure)})`},toJSON(){return{_id:`Result`,_tag:this._tag,failure:ty(this.failure)}}}),Db=e=>sv(e,Cb),Ob=e=>e._tag===`Failure`,kb=e=>e._tag===`Success`,Ab=e=>{let t=Object.create(Eb);return t.failure=e,t},jb=e=>{let t=Object.create(Tb);return t.success=e,t};function Mb(e){return(t,n)=>t===n?0:e(t,n)}var Nb=Mb((e,t)=>globalThis.Number.isNaN(e)&&globalThis.Number.isNaN(t)?0:globalThis.Number.isNaN(e)?-1:globalThis.Number.isNaN(t)?1:e<t?-1:1),Pb=B(2,(e,t)=>Mb((n,r)=>e(t(n),t(r)))),Fb=Pb(Nb,e=>e.getTime()),Ib=e=>B(2,(t,n)=>e(t,n)===-1),Lb=e=>B(2,(t,n)=>e(t,n)===1),Rb=e=>B(2,(t,n)=>e(t,n)!==1),zb=e=>B(2,(t,n)=>e(t,n)!==-1),Bb=()=>xb,Vb=Sb,Hb=vb,Ub=yb,Wb=bb,Gb=B(2,(e,{onNone:t,onSome:n})=>Ub(e)?t():n(e.value)),Kb=B(2,(e,t)=>Ub(e)?t():e.value),qb=B(2,(e,t)=>Ub(e)?t():e),Jb=e=>e==null?Bb():Vb(e),Yb=Kb(W_),Xb=Kb(G_),Zb=B(2,(e,t)=>{if(Wb(e))return e.value;throw t()}),Qb=B(2,(e,t)=>Ub(e)?Bb():Vb(t(e.value))),$b=B(2,(e,t)=>Ub(e)?Bb():t(e.value)),ex=B(2,(e,t)=>Ub(e)?Bb():Jb(t(e.value))),tx=B(2,(e,t)=>Ub(e)?Bb():t(e.value)?Vb(e.value):Bb()),nx=e=>cb((t,n)=>Ub(t)?Ub(n):!Ub(n)&&e(t.value,n.value)),rx=`~effect/Context/Service`,ix=function(){function e(){}let t=e;Object.setPrototypeOf(t,ax);let n=(e,n)=>(t.key=e,n?.defaultValue&&(t[sx]=sx,t.defaultValue=n.defaultValue),n?.make&&(t.make=n.make),n?.fiberCached&&ox.add(e),t);return arguments.length>0?n(arguments[0],arguments[1]):n},ax={[rx]:rx,...sb({label:`Service`,evaluate(e){return Uy(Ox(e.context,this))}}),toJSON(){return{_id:`Service`,key:this.key}},of(e){return e},context(e){return Cx(this,e)},use(e){return Yy(t=>e(Ox(t.context,this)))},useSync(e){return Yy(t=>Uy(e(Ox(t.context,this))))}},ox=new Set,sx=`~effect/Context/Reference`,cx=`~effect/Context`,lx=8,ux=8,dx=(e,t,n,r)=>{let i=Object.create(vx);return i.cacheRoot=e??i,i.base=t,i.overlay=n,i.depth=r,i._flat=void 0,i.baseHits=0,i},fx=(e,t)=>{t&&(fx(e,t.parent),e.set(t.key,t.value))},px=e=>{if(e._flat)return e._flat;if(!e.overlay)return e._flat=e.base;let t=new Map(e.base);return fx(t,e.overlay),e._flat=t},mx=(e,t)=>{let n=new Map(e.mapUnsafe);return t(n),_x(n)},hx=Symbol(),gx=(e,t)=>{let n=e;for(let e=n.overlay;e;e=e.parent)if(e.key===t)return e.value;let r=n.base.get(t);return r===void 0&&!n.base.has(t)?hx:(n.overlay&&++n.baseHits>=ux&&(n.base=px(n),n.overlay=void 0,n.depth=0),r)},_x=e=>dx(void 0,e,void 0,0),vx={..._y,[cx]:{_Services:e=>e},get mapUnsafe(){return px(this)},toJSON(){return{_id:`Context`,services:Array.from(this.mapUnsafe).map(([e,t])=>({key:e,value:t}))}},[Ov](e){if(!bx(e))return!1;let t=this.mapUnsafe,n=e.mapUnsafe;if(t.size!==n.size)return!1;for(let[e,r]of t)if(!n.has(e)||!kv(r,n.get(e)))return!1;return!0},[uv](){return gv(this.mapUnsafe.size)}},yx=(e,t)=>e.cacheRoot===t.cacheRoot,bx=e=>sv(e,cx),xx=e=>!!e[sx],Sx=()=>Yee,Yee=_x(new Map),Cx=(e,t)=>_x(new Map([[e.key,t]])),wx=B(3,(e,t,n)=>Xee(e,t.key,n)),Xee=(e,t,n)=>{let r=e,i=ox.has(t)?void 0:r.cacheRoot;if(r.depth>=lx){let e=new Map(r.mapUnsafe);return e.set(t,n),dx(i,e,void 0,0)}return dx(i,r.base,{key:t,value:n,parent:r.overlay},r.depth+1)},Tx=B(2,(e,t)=>Ex(e,t.key)),Ex=(e,t)=>{let n=gx(e,t);return n===hx?void 0:n},Dx=B(2,(e,t)=>{let n=gx(e,t.key);if(n===hx){if(xx(t))return Zee(t);throw Qee(t)}return n}),Ox=Dx,kx=`~effect/Context/defaultValue`,Zee=e=>kx in e?e[kx]:e[kx]=e.defaultValue(),Qee=e=>{let t=Error(`Service not found${e.key?`: ${String(e.key)}`:``}`);if(t.stack){let e=t.stack.split(`
53
- `);e.splice(1,3),t.stack=e.join(`
54
- `)}return t},Ax=B(2,(e,t)=>e.mapUnsafe.size===0?t:t.mapUnsafe.size===0?e:mx(e,e=>t.mapUnsafe.forEach((t,n)=>e.set(n,t)))),$ee=(...e)=>{let t=new Map;for(let n=0;n<e.length;n++)e[n].mapUnsafe.forEach((e,n)=>{t.set(n,e)});return _x(t)},ete=(...e)=>t=>mx(t,t=>{for(let n=0;n<e.length;n++)t.delete(e[n].key)}),jx=ix,Mx=e=>e.length>0,Nx=jb,Px=Ab,Fx=e=>{if(nv(e))try{return Nx(e())}catch(e){return Px(e)}try{return Nx(e.try())}catch(t){return Px(e.catch(t))}},tte=Db,Ix=Ob,Lx=kb,nte=B(2,(e,t)=>Ix(e)?Px(t(e.failure)):e),rte=B(2,(e,{onFailure:t,onSuccess:n})=>Ix(e)?t(e.failure):n(e.success)),ite=db,ate=B(2,(e,t)=>Object.hasOwn(e,t)),Rx=B(2,(e,t)=>{let n={...e};for(let r of zx(e))ay(n,r,t(e[r],r));return n}),zx=e=>Object.keys(e),ote=e=>B(2,(t,n)=>{for(let r of zx(t))if(!ate(n,r)||!e(t[r],n[r]))return!1;return!0}),ste=e=>{let t=ote(e);return(e,n)=>t(e,n)&&t(n,e)},Bx=globalThis.Array,Vx=e=>Bx.isArray(e)?e:Bx.from(e),Hx=e=>Bx.isArray(e)?e:[e],Ux=B(2,(e,t)=>[...e,t]),Wx=B(2,(e,t)=>Vx(e).concat(Vx(t)));Bx.isArray;var Gx=Mx,Kx=Mx,cte=e=>e[e.length-1],lte=(e,t)=>{let n=dv(t),r=e.get(n);if(r===void 0)return e.set(n,[t]),!0;for(let e of r)if(kv(e,t))return!1;return r.push(t),!0},ute=B(2,(e,t)=>{let n=Vx(e),r=Vx(t);return Kx(n)?Kx(r)?Zx(Wx(n,r)):n:r}),qx=()=>[],Jx=e=>[e],Yx=B(2,(e,t)=>e.map(t)),Xx=fb,Zx=e=>{let t=Vx(e);if(t.length<2)return[...t];let n=new Map,r=[];for(let e of t)lte(n,e)&&r.push(e);return r},Qx=`~effect/time/Duration`,$x=BigInt(0),eS=BigInt(1),tS=BigInt(2),nS=BigInt(10),rS=BigInt(1e3),iS=e=>BigInt(e<0?Math.ceil(e-.5):Math.floor(e+.5)),aS=e=>iS(e*1e6),oS=(e,t)=>{let n=e.indexOf(`.`);if(n===-1)return BigInt(e)*t;let r=e[0]===`-`,i=e.slice(n+1),a=nS**BigInt(i.length),o=(BigInt(e.slice(+!!r,n))*a+BigInt(i))*t,s=o/a+(o%a*tS>=a?eS:$x);return r?-s:s},sS=/^(-?\d+(?:\.\d+)?)\s+(nanos?|micros?|millis?|seconds?|minutes?|hours?|days?|weeks?)$/,cS=e=>{switch(typeof e){case`number`:return xS(e);case`bigint`:return bS(e);case`string`:{if(e===`Infinity`)return vS;if(e===`-Infinity`)return yS;let t=sS.exec(e);if(!t)break;let[n,r,i]=t;if(i===`nano`||i===`nanos`)return bS(oS(r,eS));if(i===`micro`||i===`micros`)return bS(oS(r,rS));let a=Number(r);switch(i){case`milli`:case`millis`:return xS(a);case`second`:case`seconds`:return SS(a);case`minute`:case`minutes`:return CS(a);case`hour`:case`hours`:return wS(a);case`day`:case`days`:return TS(a);case`week`:case`weeks`:return ES(a)}break}case`object`:{if(e===null)break;if(Qx in e)return e;if(Array.isArray(e))return e.length!==2||!e.every(ev)?lS(e):Number.isNaN(e[0])||Number.isNaN(e[1])?_S:e[0]===-1/0||e[1]===-1/0?yS:e[0]===1/0||e[1]===1/0?vS:mS(iS(e[0]*1e9+e[1]));let t=e,n=0;return t.weeks&&(n+=t.weeks*6048e5),t.days&&(n+=t.days*864e5),t.hours&&(n+=t.hours*36e5),t.minutes&&(n+=t.minutes*6e4),t.seconds&&(n+=t.seconds*1e3),t.milliseconds&&(n+=t.milliseconds),!t.microseconds&&!t.nanoseconds?mS(n):mS(iS(n*1e6+(t.microseconds??0)*1e3+(t.nanoseconds??0)))}}return lS(e)},lS=e=>{throw Error(`Invalid Input: ${e}`)},uS={_tag:`Millis`,millis:0},dS={_tag:`Infinity`},fS={_tag:`NegativeInfinity`},pS={[Qx]:Qx,[uv](){switch(this.value._tag){case`Millis`:{let e=this.value.millis*1e6;return Number.isFinite(e)?dv(iS(e)):gv(this.value.millis)}case`Nanos`:return dv(this.value.nanos);default:return yv(this.value)}},[Ov](e){return hS(e)&&NS(this,e)},toString(){switch(this.value._tag){case`Infinity`:return`Infinity`;case`NegativeInfinity`:return`-Infinity`;case`Nanos`:return`${this.value.nanos} nanos`;case`Millis`:return`${this.value.millis} millis`}},toJSON(){switch(this.value._tag){case`Millis`:return{_id:`Duration`,_tag:`Millis`,millis:this.value.millis};case`Nanos`:return{_id:`Duration`,_tag:`Nanos`,nanos:String(this.value.nanos)};case`Infinity`:return{_id:`Duration`,_tag:`Infinity`};case`NegativeInfinity`:return{_id:`Duration`,_tag:`NegativeInfinity`}}},[ey](){return this.toJSON()},pipe(){return L_(this,arguments)}},mS=e=>{let t=Object.create(pS);return t.value=typeof e==`number`?isNaN(e)||e===0||Object.is(e,-0)?uS:Number.isFinite(e)?Number.isInteger(e)?{_tag:`Millis`,millis:e}:{_tag:`Nanos`,nanos:aS(e)}:e>0?dS:fS:e===$x?uS:{_tag:`Nanos`,nanos:e},t},hS=e=>sv(e,Qx),gS=e=>e.value._tag!==`Infinity`&&e.value._tag!==`NegativeInfinity`,_S=mS(0),vS=mS(1/0),yS=mS(-1/0),bS=e=>mS(e),xS=e=>mS(e),SS=e=>mS(e*1e3),CS=e=>mS(e*6e4),wS=e=>mS(e*36e5),TS=e=>mS(e*864e5),ES=e=>mS(e*6048e5),DS=e=>AS(cS(e),{onMillis:B_,onNanos:e=>Number(e)/1e6,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),OS=e=>AS(cS(e),{onMillis:e=>e/36e5,onNanos:e=>Number(e)/36e11,onInfinity:()=>1/0,onNegativeInfinity:()=>-1/0}),kS=e=>{let t=cS(e);switch(t.value._tag){case`Infinity`:case`NegativeInfinity`:throw Error(`Cannot convert infinite duration to nanos`);case`Nanos`:return t.value.nanos;case`Millis`:return aS(t.value.millis)}},AS=B(2,(e,t)=>{switch(e.value._tag){case`Millis`:return t.onMillis(e.value.millis);case`Nanos`:return t.onNanos(e.value.nanos);case`Infinity`:return t.onInfinity();case`NegativeInfinity`:return(t.onNegativeInfinity??t.onInfinity)()}}),jS=B(3,(e,t,n)=>e.value._tag===`Infinity`||e.value._tag===`NegativeInfinity`||t.value._tag===`Infinity`||t.value._tag===`NegativeInfinity`?n.onInfinity(e,t):e.value._tag===`Millis`?t.value._tag===`Millis`?n.onMillis(e.value.millis,t.value.millis):n.onNanos(kS(e),t.value.nanos):n.onNanos(e.value.nanos,kS(t))),MS=(e,t)=>jS(e,t,{onMillis:(e,t)=>e===t,onNanos:(e,t)=>e===t,onInfinity:(e,t)=>e.value._tag===t.value._tag}),NS=B(2,(e,t)=>MS(e,t)),PS=B(2,(e,t)=>n=>{let r=e(n);if(Ix(r))return Px(n);let i=t(r.success);return Ix(i)?Px(n):i}),FS=e=>t=>{let n=e(t);return Ix(n)?Bb():Vb(n.success)},IS=jx(`effect/Scheduler`,{fiberCached:!0,defaultValue:()=>new BS}),LS=`setImmediate`in globalThis?e=>{let t=globalThis.setImmediate(e);return()=>globalThis.clearImmediate(t)}:e=>{let t=setTimeout(e,0);return()=>clearTimeout(t)},RS=e=>{let t=!1;return Promise.resolve().then(()=>{t||e()}),()=>{t=!0}},zS=class{buckets=[];scheduleTask(e,t){let n=this.buckets,r=n.length,i,a=0;for(;a<r&&!(n[a][0]>t);a++)i=n[a];i&&i[0]===t?i[1].push(e):a===r?n.push([t,[e]]):n.splice(a,0,[t,[e]])}drain(){let e=this.buckets;return this.buckets=[],e}},BS=class{executionMode;setImmediate;constructor(e=`async`,t){this.executionMode=e,this.setImmediate=t??(e===`sync`?RS:LS)}shouldYield(e){return e.currentOpCount>=e.maxOpsBeforeYield}makeDispatcher(){return new VS(this.setImmediate)}},VS=class{tasks=new zS;running=void 0;setImmediate;constructor(e=LS){this.setImmediate=e}scheduleTask(e,t){this.tasks.scheduleTask(e,t),this.running===void 0&&(this.running=this.setImmediate(this.afterScheduled))}afterScheduled=()=>{this.running=void 0,this.runTasks()};runTasks(){let e=this.tasks.drain();for(let t=0;t<e.length;t++){let n=e[t][1];for(let e=0;e<n.length;e++)n[e]()}}flush(){for(;this.tasks.buckets.length>0;)this.running!==void 0&&(this.running(),this.running=void 0),this.runTasks()}},HS=jx(`effect/Scheduler/MaxOpsBeforeYield`,{fiberCached:!0,defaultValue:()=>2048}),US=jx(`effect/Scheduler/PreventSchedulerYield`,{fiberCached:!0,defaultValue:()=>!1}),WS=`effect/Tracer/ParentSpan`,GS=class extends ix()(WS,{fiberCached:!0}){},KS=e=>e,qS=jx(`effect/Tracer/DisablePropagation`,{defaultValue:U_}),JS=jx(`effect/Tracer/CurrentTraceLevel`,{defaultValue:()=>`Info`}),YS=jx(`effect/Tracer/MinimumTraceLevel`,{defaultValue:()=>`All`}),XS=`effect/Tracer`,ZS=jx(XS,{fiberCached:!0,defaultValue:()=>KS({span:e=>new QS(e)})}),QS=class{_tag=`Span`;spanId;traceId=`native`;sampled;name;parent;annotations;links;startTime;kind;status;attributes;events=[];constructor(e){this.name=e.name,this.parent=e.parent,this.annotations=e.annotations,this.links=e.links,this.startTime=e.startTime,this.kind=e.kind,this.sampled=e.sampled,this.status={_tag:`Started`,startTime:e.startTime},this.attributes=new Map,this.traceId=Xb(e.parent)?.traceId??$S(32),this.spanId=$S(16)}end(e,t){this.status={_tag:`Ended`,endTime:e,exit:t,startTime:this.status.startTime}}attribute(e,t){this.attributes.set(e,t)}event(e,t,n){this.events.push([e,t,n??{}])}addLinks(e){this.links.push(...e)}},$S=function(){return function(e){let t=``;for(let n=0;n<e;n++)t+=`abcdef0123456789`.charAt(Math.floor(Math.random()*16));return t}}(),eC=`effect/observability/Metric/FiberRuntimeMetricsKey`,tC=jx(`effect/References/CurrentStackFrame`,{fiberCached:!0,defaultValue:G_}),nC=jx(`effect/References/TracerEnabled`,{defaultValue:H_}),rC=jx(`effect/References/TracerTimingEnabled`,{defaultValue:H_}),iC=jx(`effect/References/TracerSpanAnnotations`,{defaultValue:()=>({})}),aC=jx(`effect/References/TracerSpanLinks`,{defaultValue:()=>[]}),oC=jx(`effect/References/CurrentLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),sC=jx(`effect/References/MinimumLogLevel`,{fiberCached:!0,defaultValue:()=>`Info`}),cC=(()=>{let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.hasOwn(e,`writable`)?e.writable===!0:e.set!==void 0})(),lC=()=>Error.stackTraceLimit,uC=e=>{cC&&(Error.stackTraceLimit=e)},dC=e=>{if(e?.captureStackTrace===!1||e?.captureStackTrace!==void 0&&typeof e.captureStackTrace!=`boolean`)return e;let t=lC();uC(3);let n=Error();return uC(t),{...e,captureStackTrace:pC(()=>n.stack)}},fC=e=>t=>{let n;return()=>{if(n!==void 0)return n;let r=t();if(!r)return;let i=r.split(`
55
- `);if(i[e]!==void 0)return n=i[e].trim(),n}},pC=fC(3),mC=class extends Dy{fiberId;constructor(e,t=Oy){super(`Interrupt`,t,`Interrupted`),this.fiberId=e}toString(){return`Interrupt(${this.fiberId})`}toJSON(){return{_tag:`Interrupt`,fiberId:this.fiberId}}[Ov](e){return Ry(e)&&this.fiberId===e.fiberId&&this.annotations===e.annotations}[uv](){return pv(_v(`${this._tag}:${this.fiberId}`))(fv(this.annotations))}},hC=e=>new mC(e),gC=e=>new Ty([new mC(e)]),_C=e=>{for(let t=0;t<e.reasons.length;t++){let n=e.reasons[t];if(n._tag===`Fail`)return Nx(n.error)}return Px(e)},vC=FS(_C),yC=e=>{let t=e.reasons.find(Ly);return t?Nx(t.defect):Px(e)},bC=e=>e.reasons.some(Ry),xC=e=>{let t;for(let n=0;n<e.reasons.length;n++){let r=e.reasons[n];r._tag===`Interrupt`&&(t??=new Set,r.fiberId!==void 0&&t.add(r.fiberId))}return t?Nx(t):Px(e)},SC=B(2,(e,t)=>{if(e.reasons.length===0)return t;if(t.reasons.length===0)return e;let n=new Ty(ute(e.reasons,t.reasons));return kv(e,n)?e:n}),CC=B(2,(e,t)=>{let n=!1,r=e.reasons.map(e=>Iy(e)?(n=!0,new ky(t(e.error),e.annotations)):e);return n?Ay(r):e}),wC=e=>{let t={Fail:[],Die:[],Interrupt:[]};for(let n=0;n<e.reasons.length;n++)t[e.reasons[n]._tag].push(e.reasons[n]);return t},TC=e=>{let t=wC(e);return t.Fail.length>0?t.Fail[0].error:t.Die.length>0?t.Die[0].defect:t.Interrupt.length>0?new globalThis.Error(`All fibers interrupted without error`):new globalThis.Error(`Empty cause`)},EC=`~effect/Fiber`,DC={_A:B_,_E:B_},OC={id:0},kC=()=>globalThis[Yv],AC=class{constructor(e,t=!0){this[EC]=DC,this.setContext(e),this.id=++OC.id,this.currentOpCount=0,this.interruptible=t,this._stack=[],this._observers=[],this._exit=void 0,this._children=void 0,this._interruptedCause=void 0,this._yielded=void 0,this._running=!1,this._deferredInterrupt=!1,this.runtimeMetrics?.recordFiberStart(this.context)}[EC];id;interruptible;currentOpCount;_stack;_observers;_exit;_children;_interruptedCause;_yielded;_running;_deferredInterrupt;context;currentScheduler;currentTracerContext;currentSpan;currentLogLevel;minimumLogLevel;currentStackFrame;runtimeMetrics;maxOpsBeforeYield;currentPreventYield;_dispatcher=void 0;get currentDispatcher(){return this._dispatcher??=this.currentScheduler.makeDispatcher()}getRef(e){return Ox(this.context,e)}addObserver(e){return this._exit?(e(this._exit),K_):(this._observers.push(e),()=>{let t=this._observers.indexOf(e);t>=0&&this._observers.splice(t,1)})}interruptUnsafe(e,t){if(this._exit)return;let n=gC(e);this.currentStackFrame&&(n=Fy(n,Cx(Wy,this.currentStackFrame))),t&&(n=Fy(n,t)),this._interruptedCause=this._interruptedCause?SC(this._interruptedCause,n):n,this.interruptible&&(this._running?this._deferredInterrupt=!0:this.evaluate(HC(this._interruptedCause)))}pollUnsafe(){return this._exit}evaluate(e){if(this._exit)return;if(this._yielded!==void 0){let e=this._yielded;this._yielded=void 0,e()}let t=this.runLoop(e);if(t===gy)return;let n=MC.interruptChildren&&MC.interruptChildren(this);if(n!==void 0)return this.evaluate(xw(n,()=>t));this._exit=t,this.runtimeMetrics?.recordFiberEnd(this.context,this._exit);for(let e=0;e<this._observers.length;e++)this._observers[e](t);this._observers.length=0,this._stack.length=0,this._children=void 0,this.context=Sx()}runLoop(e){let t=globalThis[Yv];globalThis[Yv]=this;let n=this._running;this._running=!0;let r=!1,i=e;this.currentOpCount=0;try{for(;;){if(this._deferredInterrupt&&(this._deferredInterrupt=!1,i=HC(this._interruptedCause)),this.currentOpCount++,!r&&!this.currentPreventYield&&this.currentScheduler.shouldYield(this)){r=!0;let e=i;i=xw(qC,()=>e)}if(i=this.currentTracerContext?this.currentTracerContext(i,this):i[fy](this),i===gy){let e=this._yielded;if(cy in e)return this._deferredInterrupt=!1,this._yielded=void 0,e;if(this._deferredInterrupt){this._yielded=void 0,e();continue}return gy}}}catch(e){return sv(i,fy)?this.runLoop(Jy(e)):Jy(`Fiber.runLoop: Not a valid effect: ${String(i)}`)}finally{this._running=n,globalThis[Yv]=t}}getCont(e){if(this._deferredInterrupt)return this._deferredInterrupt=!1,jC;for(;;){let t=this._stack.pop();if(!t)return;let n=t[hy]&&t[hy](this);if(n)return n[e]=n,n;if(t[e])return t}}yieldWith(e){return this._yielded=e,gy}children(){return this._children??=new Set}pipe(){return L_(this,arguments)}setContext(e){let t=this.context;if(this.context=e,t!==void 0&&yx(t,e))return;let n=this.getRef(IS);n!==this.currentScheduler&&(this.currentScheduler=n,this._dispatcher=void 0),this.currentSpan=Ex(e,WS),this.currentLogLevel=this.getRef(oC),this.minimumLogLevel=this.getRef(sC),this.currentStackFrame=this.getRef(tC),this.maxOpsBeforeYield=this.getRef(HS),this.currentPreventYield=this.getRef(US),this.runtimeMetrics=Ex(e,eC);let r=Ex(e,XS);this.currentTracerContext=r?r.context:void 0}get currentSpanLocal(){return this.currentSpan?._tag===`Span`?this.currentSpan:void 0}},jC={[py](e,t){return HC(t._interruptedCause)},[my](e,t){return HC(t._interruptedCause)}},MC={interruptChildren:void 0},NC=e=>{if(!e.currentStackFrame)return;let t=new Map;return t.set(Gy.key,e.currentStackFrame),_x(t)},PC=e=>{let t=e;return t._exit?VC(t._exit):aw(n=>t._exit?n(VC(t._exit)):WC(e.addObserver(e=>n(VC(e)))))},FC=e=>aw(t=>{let n=e[Symbol.iterator](),r=[],i;function a(){let e=n.next();for(;!e.done;){if(e.value._exit){r.push(e.value._exit),e=n.next();continue}i=e.value.addObserver(e=>{r.push(e),a()});return}t(VC(r))}return a(),WC(()=>i?.())}),IC=e=>{let t=e;return t._exit?t._exit:aw(n=>t._exit?n(t._exit):WC(e.addObserver(n)))},LC=e=>aw(t=>{let n=Array.from(e);if(n.length===0)return t(VC(qx()));let r=Array(n.length),i=qx(),a=0,o=!1;for(let e=0;e<n.length&&!o;e++)i.push(n[e].addObserver(s=>{if(a++,s._tag===`Failure`)return o=!0,i.forEach(e=>e()),t(s);r[e]=s.value,a===n.length&&t(VC(r))}));return WC(()=>{o=!0,i.forEach(e=>e())})}),RC=e=>Yy(t=>zC(e,t.id)),zC=B(e=>sv(e[0],EC),(e,t,n)=>Yy(r=>{let i=NC(r);return i=i&&n?Ax(i,n):i??n,e.interruptUnsafe(t,i),bw(PC(e))})),BC=e=>Yy(t=>{let n=NC(t),r=qx();for(let i of e)i.interruptUnsafe(t.id,n),r.push(i);return bw(FC(r))}),VC=Uy,HC=Ky,UC=qy,WC=Vy({op:`Sync`,[fy](e){let t=this[dy](),n=e.getCont(py);return n?n[py](t,e):e.yieldWith(Uy(t))}}),GC=Vy({op:`Suspend`,[fy](e){return this[dy]()}}),KC=rte({onFailure:UC,onSuccess:VC}),qC=Vy({op:`Yield`,[fy](e){let t=!1;return e.currentDispatcher.scheduleTask(()=>{t||e.evaluate(Fw)},this[dy]??0),e.yieldWith(()=>{t=!0})}})(0),JC=VC(Bb()),YC=e=>GC(()=>HC(iy(e))),XC=e=>Jy(e),ZC=e=>GC(()=>UC(iy(e))),QC=VC(void 0),$C=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new jE(e,`An error occurred in Effect.try`):e.catch;return GC(()=>{try{return VC(iy(t))}catch(e){return UC(iy(()=>n(e)))}})},ew=e=>rw(function(t,n){iy(()=>e(n)).then(e=>t(VC(e)),e=>t(XC(e)))},e.length!==0),tw=e=>{let t=typeof e==`function`?e:e.try,n=typeof e==`function`?e=>new jE(e,`An error occurred in Effect.tryPromise`):e.catch;return rw(function(e,r){let i=t=>{try{e(UC(iy(()=>n(t))))}catch(t){e(XC(t))}};try{iy(()=>t(r)).then(t=>e(VC(t)),i)}catch(e){i(e)}},t.length!==0)},nw=e=>Yy(t=>e(t.id)),rw=Vy({op:`Async`,single:!1,[fy](e){let t=iy(()=>this[dy][0].bind(e.currentScheduler)),n=!1,r=!1,i=this[dy][1]?new AbortController:void 0,a=t(t=>{n||(n=!0,r?e.evaluate(t):r=t)},i?.signal);return r===!1?(r=!0,e._yielded=()=>{n=!0},i===void 0&&a===void 0||e._stack.push(iw(()=>(n=!0,i?.abort(),a??Fw))),gy):r}}),iw=Vy({op:`AsyncFinalizer`,[hy](e){e.interruptible&&(e.interruptible=!1,e._stack.push(LT))},[my](e,t){return bC(e)?xw(this[dy](),()=>HC(e)):HC(e)}}),aw=e=>rw(e,e.length>=2),ow=aw(K_),sw=(...e)=>GC(()=>hw(e.length===1?e[0]():e[1].call(e[0].self))),cw=(e,...t)=>{let n=t.length===0?function(){return GC(()=>hw(e.apply(this,arguments)))}:function(){let n=GC(()=>hw(e.apply(this,arguments)));for(let e=0;e<t.length;e++)n=t[e](n,...arguments);return n};return lw(e.length,n)},lw=(e,t)=>Object.defineProperty(t,"length",{value:e,configurable:!0}),uw=fC(2),dw=function(){let e=typeof arguments[0]==`string`,t=e?arguments[0]:`Effect.fn`,n=e?arguments[1]:void 0,r=lC();uC(2);let i=new globalThis.Error;return uC(r),e?(r,...a)=>fw(t,r,i,a,e,n):fw(t,arguments[0],i,Array.prototype.slice.call(arguments,1),e,n)},fw=(e,t,n,r,i,a)=>{let o=typeof t==`function`?t:r.pop().bind(t.self);return lw(o.length,function(...t){let s=GC(()=>{let e=o.apply(this,arguments);return yy(e)?e:hw(e)});for(let e=0;e<r.length;e++)s=r[e](s,...t);if(!yy(s))return s;let c=lC();uC(2);let l=new globalThis.Error;return uC(c),Uw(i?yE(e,a,e=>bE(s,e)):s,tC,t=>({name:e,stack:uw(()=>l.stack),parent:{name:`${e} (definition)`,stack:uw(()=>n.stack),parent:t}}))})},pw=(e,...t)=>lw(e.length,t.length===0?function(){return mw(()=>e.apply(this,arguments))}:function(){let n=mw(()=>e.apply(this,arguments));for(let e of t)n=e(n);return n}),mw=e=>{try{let t=e(),n;for(;;){let r=t.next(n);if(r.done)return VC(r.value);let i=r.value;if(i&&i._tag===`Success`){n=i.value;continue}if(i&&i._tag===`Failure`)return r.value;{let n=!0;return GC(()=>n?(n=!1,xw(r.value,e=>hw(t,e))):GC(()=>hw(e())))}}}catch(e){return XC(e)}},hw=Vy({op:`Iterator`,single:!1,[py](e,t){let n=this[dy][0];for(;;){let r=n.next(e);if(r.done)return VC(r.value);if(!Cw(r.value))return t._stack.push(this),r.value;if(r.value._tag===`Failure`)return r.value;e=r.value.value}},[fy](e){return this[py](this[dy][1],e)}}),gw=B(2,(e,t)=>{let n=VC(t);return xw(e,e=>n)}),_w=e=>Ew(e,Vb),vw=B(2,(e,t)=>xw(e,e=>yy(t)?t:iy(()=>t(e)))),yw=B(2,(e,t)=>xw(e,e=>gw(yy(t)?t:iy(()=>t(e)),e))),bw=e=>xw(e,e=>Fw),xw=B(2,(e,t)=>{let n=Object.create(Sw);return n[dy]=e,n[py]=t.length===1?t:e=>t(e),n}),Sw=By({op:`OnSuccess`,[fy](e){return e._stack.push(this),this[dy]}}),Cw=e=>cy in e,ww=B(2,(e,t)=>Cw(e)?e._tag===`Success`?t(e.value):e:xw(e,t)),Tw=e=>xw(e,B_),Ew=B(2,(e,t)=>xw(e,e=>VC(iy(()=>t(e))))),Dw=B(2,(e,t)=>Cw(e)?Iw(e,t):Ew(e,t)),Ow=B(2,(e,t)=>Cw(e)?Lw(e,t):nT(e,t)),kw=B(2,(e,t)=>Cw(e)?Rw(e,t):rT(e,t)),Aw=e=>Ky(gC(e)),jw=e=>e._tag===`Success`,Mw=e=>e._tag===`Failure`,Nw=e=>e._tag===`Failure`?Nx(e.cause):Px(e),Pw=PS(Nw,_C),Fw=Uy(void 0),Iw=B(2,(e,t)=>e._tag===`Success`?Uy(t(e.value)):e),Lw=B(2,(e,t)=>{if(e._tag===`Success`)return e;let n=_C(e.cause);return Ix(n)?e:qy(t(n.success))}),Rw=B(2,(e,t)=>{if(e._tag===`Success`)return Uy(t.onSuccess(e.value));let n=_C(e.cause);return Ix(n)?e:qy(t.onFailure(n.success))}),zw=B(2,(e,t)=>jw(e)?t:e),Bw=e=>{let t=[];for(let n of e)n._tag===`Failure`&&t.push(...n.cause.reasons);return t.length===0?Fw:Ky(Ay(t))},Vw=e=>{let t=Pw(e);return Ix(t)?Bb():Vb(t.success)},Hw=B(2,(e,t)=>Yy(n=>{let r=n.context,i=t(r);return r===i?e:(n.setContext(i),TT(e,()=>{n.setContext(r)}))})),Uw=B(3,(e,t,n)=>Hw(e,e=>{let r=Dx(e,t),i=n(r);return r===i?e:wx(e,t,i)})),Ww=()=>Gw,Gw=Yy(e=>VC(e.context)),Kw=e=>Yy(t=>e(t.context)),qw=B(2,(e,t)=>Cw(e)?e:Hw(e,Ax(t))),Jw=function(){return arguments.length===1?B(2,(e,t)=>Yw(e,arguments[0],t)):B(3,(e,t,n)=>Yw(e,t,n)).apply(this,arguments)},Yw=(e,t,n)=>Hw(e,wx(t,n)),Xw=B(2,(e,t)=>xw(t,t=>t?_w(e):JC)),Zw=B(e=>yy(e[0]),(e,t)=>HT({while:H_,body:V_(t?.disableYield?e:xw(e,e=>qC)),step:K_})),Qw=B(2,(e,t)=>{let n=Object.create($w);return n[dy]=e,n[my]=t.length===1?t:e=>t(e),n}),$w=By({op:`OnFailure`,[fy](e){return e._stack.push(this),this[dy]}}),eT=B(3,(e,t,n)=>Qw(e,e=>{let r=t(e);return Ix(r)?HC(r.failure):iy(()=>n(r.success,e))})),tT=B(2,(e,t)=>eT(e,_C,e=>t(e))),nT=B(2,(e,t)=>tT(e,e=>ZC(()=>t(e)))),rT=B(2,(e,t)=>oT(e,{onFailure:e=>ZC(()=>t.onFailure(e)),onSuccess:e=>WC(()=>t.onSuccess(e))})),iT=B(2,(e,t)=>{let n=Object.create(aT);return n[dy]=e,n[py]=t.onSuccess.length===1?t.onSuccess:e=>t.onSuccess(e),n[my]=t.onFailure.length===1?t.onFailure:e=>t.onFailure(e),n}),aT=By({op:`OnSuccessAndFailure`,[fy](e){return e._stack.push(this),this[dy]}}),oT=B(2,(e,t)=>iT(e,{onFailure:e=>{let n=e.reasons.find(Iy);return n?iy(()=>t.onFailure(n.error)):HC(e)},onSuccess:t.onSuccess})),sT=e=>Cw(e)?Uy(e):cT(e),cT=Vy({op:`Exit`,[fy](e){return e._stack.push(this),this[dy]},[py](e,t,n){return VC(n??Uy(e))},[my](e,t,n){return VC(n??Ky(e))}}),lT=`~effect/Scope`,uT=`~effect/Scope/Closeable`,dT=ix(`effect/Scope`),fT=(e,t)=>GC(()=>pT(e,t)??QC),pT=(e,t)=>{if(e.state._tag===`Closed`)return;let n={_tag:`Closed`,exit:t};if(e.state._tag===`Empty`){e.state=n;return}let{finalizers:r}=e.state;if(e.state=n,r.size!==0)return r.size===1?r.values().next().value(t):mT(e,r,t)},mT=cw(function*(e,t,n){let r=[],i=[],a=Array.from(t.values()),o=kC();for(let t=a.length-1;t>=0;t--){let s=a[t];e.strategy===`sequential`?r.push(yield*sT(s(n))):i.push(JT(o,s(n),!0,!0,`inherit`))}return i.length>0&&(r=yield*FC(i)),yield*Bw(r)}),hT=(e,t)=>{let n=bT(t);if(e.state._tag===`Closed`)return n.state=e.state,n;let r={};return vT(e,r,e=>fT(n,e)),vT(n,r,t=>WC(()=>yT(e,r))),n},gT=(e,t)=>GC(()=>e.state._tag===`Closed`?t(e.state.exit):(vT(e,{},t),QC)),_T=(e,t)=>gT(e,V_(t)),vT=(e,t,n)=>{e.state._tag===`Empty`?e.state={_tag:`Open`,finalizers:new Map([[t,n]])}:e.state._tag===`Open`&&e.state.finalizers.set(t,n)},yT=(e,t)=>{e.state._tag===`Open`&&e.state.finalizers.delete(t)},bT=(e=`sequential`)=>({[uT]:uT,[lT]:lT,strategy:e,state:xT}),xT={_tag:`Empty`},ST=dT,CT=Jw(dT),wT=e=>GC(()=>{let t=bT();return ET(e(t),e=>GC(()=>pT(t,e)??QC))}),TT=Vy({op:`OnExit`,single:!1,[fy](e){return e._stack.push(this),this[dy][0]},[hy](e){e.interruptible&&this[dy][2]!==!0&&(e._stack.push(LT),e.interruptible=!1)},[py](e,t,n){n??=Uy(e);let r=this[dy][1](n);return r?xw(r,e=>n):n},[my](e,t,n){n??=Ky(e);let r=this[dy][1](n);return r?xw(r,e=>n):n}}),ET=B(2,TT),DT=B(3,(e,t,n)=>ET(e,e=>{let r=t(e);return Ix(r)?QC:n(r.success,e)})),OT=B(2,(e,t)=>DT(e,Nw,t)),kT=B(3,(e,t,n)=>ET(e,e=>{if(e._tag!==`Failure`)return QC;let r=t(e.cause);return Ix(r)?QC:n(r.success,e.cause)})),AT=B(2,(e,t)=>kT(xC,t)(e)),jT=B(2,(e,t)=>WC(()=>{let n=DS(cS(t)),r=Number.isFinite(n),i=dE(!1),a=0,o=!1,s,c=xw(i.await,()=>s);return[Yy(t=>{let l=t.getRef(SE),u=r?l.currentTimeMillisUnsafe():0;return o||u<a?s??c:(o=!0,i.closeUnsafe(),s=void 0,ET(e,e=>WC(()=>{o=!1,a=l.currentTimeMillisUnsafe()+n,s=e,i.openUnsafe()})))}),WC(()=>{a=0,i.closeUnsafe(),s=void 0})]})),MT=B(2,(e,t)=>Ew(jT(e,t),e=>e[0])),NT=e=>MT(e,vS),PT=Yy(e=>HC(gC(e.id))),FT=e=>Yy(t=>t.interruptible?(t.interruptible=!1,t._stack.push(LT),e):e),IT=Vy({op:`SetInterruptible`,[hy](e){if(e.interruptible=this[dy],e._interruptedCause&&e.interruptible)return()=>HC(e._interruptedCause)}}),LT=IT(!0),RT=IT(!1),zT=e=>{if(e.interruptible=!0,e._stack.push(RT),e._interruptedCause)return HC(e._interruptedCause)},BT=e=>Yy(t=>t.interruptible?e:zT(t)??e),VT=e=>Yy(t=>t.interruptible?(t.interruptible=!1,t._stack.push(LT),e(BT)):e(B_)),HT=Vy({op:`While`,[py](e,t){return this[dy].step(e),this[dy].while()?(t._stack.push(this),this[dy].body()):Fw},[fy](e){return this[dy].while()?(e._stack.push(this),this[dy].body()):Fw}}),UT=B(e=>typeof e[1]==`function`,(e,t,n)=>GC(()=>{let r=n?.concurrency??1,i=r===`unbounded`?1/0:Math.max(1,r);if(i===1)return WT(e,t,n);let a=Vx(e),o=a.length;if(o===0)return n?.discard?QC:VC([]);let s=n?.discard?void 0:Array(o),c=qT({f:t,out:s},a,{concurrency:i});return c?gw(c,s):VC(s)})),WT=(e,t,n)=>GC(()=>{let r=n?.discard?void 0:[],i=e[Symbol.iterator](),a=i.next(),o=0;return gw(HT({while:()=>!a.done,body:()=>t(a.value,o++),step:e=>{r&&r.push(e),a=i.next()}}),r)}),GT=e=>{let t=e.onItem,n=e.step,r=(e,i,a,o)=>{for(;a<o;a++){let s=i[a],c=t(e,s,a);if(!Cw(c))return xw(sT(c),t=>n(e,s,t,a)??r(e,i,a+1,o)??QC);let l=n(e,s,c,a);if(l)return l._tag===`Failure`?l:void 0}};return(e,i,a)=>{let o=0,s=a?.end??i.length,c=a?.concurrency??1;if(c===1)return r(e,i,0,s);let l=a?.orderedStep===!0&&c>1,u=!1,d,f,p,m=!1,h,g,_=o,v=l?Array(s):void 0,y=e=>{let t=Jy(e);return h=t,u=!0,m=!0,f&&f.size>0?xw(FT(BC(Array.from(f))),()=>t):t},b=(t,r,a)=>{if(!l)return n(e,t,r,a);if(h)return h;for(v[a]=r;_<s;){let t=v[_];if(t===void 0)return;v[_]=void 0;let r=_++,a=n(e,i[r],t,r);if(a)return a}},x=()=>{let n=!1;for(;!h&&o<s;o++){let r=i[o],a=g??t(e,r,o);if(Cw(a)){if(h=b(r,a,o),h)break}else if(d){g=void 0;let e=JT(d,a,!0,!0,`inherit`);if(e._exit){if(h=b(r,e._exit,o),h)break;continue}f.add(e);let t=o;if(e.addObserver(i=>{f.delete(e);try{if(h){if(!m&&i._tag===`Failure`)for(let e of i.cause.reasons)if(e._tag===`Interrupt`)continue;else h._tag===`Failure`?h.cause.reasons.push(e):h=Ky(Ay([e]))}else{let e=b(r,i,t);e&&(h=e._tag===`Failure`?Ky(Ay(e.cause.reasons.slice())):e,x())}if(n){let e=x();e&&p(e)}else u&&f.size===0&&p(h??QC)}catch(e){p(y(e))}}),f.size<c)continue;n=!0,o++;return}else return aw(e=>{d=kC(),f=new Set,g=a,p=e;let t;try{t=x()}catch(t){return e(y(t))}return t?e(t):GC(()=>(h=Fw,m=!0,f?BC(f):QC))})}if(u=!0,h){if(f&&f.size>0){let e=NC(d);f.forEach(t=>t.interruptUnsafe(d.id,e));return}if(p||h._tag===`Failure`)return h}else if(p){if(f)f.size===0&&p(QC);else return Fw}};return x()}},KT=()=>GT,qT=GT({onItem(e,t,n){return e.f(t,n)},step(e,t,n,r){if(n._tag===`Failure`)return n;e.out&&(e.out[r]=n.value)}}),JT=(e,t,n=!1,r=!1,i=!1)=>{let a=e,o=i===`inherit`?a.interruptible:!i,s=new AC(a.context,o);return n?s.evaluate(t):a.currentDispatcher.scheduleTask(()=>s.evaluate(t),0),!r&&!s._exit&&(a.children().add(s),s.addObserver(()=>a._children.delete(s))),s},YT=B(e=>yy(e[0]),(e,t)=>Yy(n=>VC(JT(n,e,t?.startImmediately,!0,t?.uninterruptible)))),XT=B(e=>yy(e[0]),(e,t,n)=>Yy(r=>{let i=JT(r,e,n?.startImmediately,!0,n?.uninterruptible);if(!i._exit){if(t.state._tag!==`Closed`){let e={};vT(t,e,()=>nw(e=>e===i.id?QC:RC(i))),i.addObserver(()=>yT(t,e))}else i.interruptUnsafe(r.id,NC(r))}return VC(i)})),ZT=e=>(t,n)=>{let r=new AC(n?.scheduler?wx(e,IS,n.scheduler):e,n?.uninterruptible!==!0);if(r.evaluate(t),r._exit)return r;if(n?.signal){if(n.signal.aborted)r.interruptUnsafe();else{let e=()=>r.interruptUnsafe();n.signal.addEventListener(`abort`,e,{once:!0}),r.addObserver(()=>n.signal.removeEventListener(`abort`,e))}}return n?.onFiberStart&&n.onFiberStart(r),r},QT=B(2,(e,t)=>{if(e._exit)return e;if(t.state._tag===`Closed`)return e.interruptUnsafe(e.id),e;let n={};return vT(t,n,()=>RC(e)),e.addObserver(()=>yT(t,n)),e}),$T=ZT(Sx()),eE=e=>{let t=ZT(e);return(e,n)=>{let r=t(e,n);return n?.onExit&&r.addObserver(n.onExit),e=>r.interruptUnsafe(e)}},tE=e=>{let t=ZT(e);return(e,n)=>{let r=t(e,n);return new Promise(e=>{r.addObserver(t=>e(t))})}},nE=tE(Sx()),rE=(e=>{let t=tE(e);return(e,n)=>t(e,n).then(e=>{if(e._tag===`Failure`)throw TC(e.cause);return e.value})})(Sx()),iE=e=>{let t=ZT(e);return e=>{if(Cw(e))return e;let n=new BS(`sync`),r=t(e,{scheduler:n});return r._dispatcher?.flush(),r._exit??Jy(new kE(r))}},aE=iE(Sx()),oE=e=>{let t=iE(e);return e=>{let n=t(e);if(n._tag===`Failure`)throw TC(n.cause);return n.value}},sE=oE(Sx()),cE=VC(!0),lE=VC(!1),uE=class{waiters=[];scheduled=void 0;_isOpen;constructor(e){this._isOpen=e}scheduleUnsafe(e){if(this.waiters.length===0)return cE;if(this.scheduled===void 0)this.scheduled=this.waiters,e.currentDispatcher.scheduleTask(this.flushScheduled,0);else for(let e=0;e<this.waiters.length;e++)this.scheduled.push(this.waiters[e]);return this.waiters=[],cE}flushScheduled=()=>{if(this.scheduled===void 0)return;let e=this.scheduled;this.scheduled=void 0;for(let t=0;t<e.length;t++)e[t](Fw)};flushWaiters(){let e=this.waiters;this.waiters=[],this.flushScheduled();for(let t=0;t<e.length;t++)e[t](Fw)}open=Yy(e=>this._isOpen?lE:(this._isOpen=!0,this.scheduleUnsafe(e)));release=Yy(e=>this._isOpen?lE:this.scheduleUnsafe(e));openUnsafe(){return!this._isOpen&&(this._isOpen=!0,this.flushWaiters(),!0)}await=aw(e=>this._isOpen?e(QC):(this.waiters.push(e),WC(()=>{let t=this.waiters.indexOf(e);t===-1?this.scheduled!==void 0&&(t=this.scheduled.indexOf(e),t!==-1&&this.scheduled.splice(t,1)):this.waiters.splice(t,1)})));closeUnsafe(){return this._isOpen?(this._isOpen=!1,!0):!1}close=WC(()=>this.closeUnsafe());whenOpen=e=>xw(this.await,()=>e);isOpen(){return this._isOpen}},dE=e=>new uE(e??!1),fE=BigInt(0),pE={_tag:`Span`,spanId:`noop`,traceId:`noop`,sampled:!1,status:{_tag:`Ended`,startTime:fE,endTime:fE,exit:Fw},attributes:new Map,links:[],kind:`internal`,attribute(){},event(){},end(){},addLinks(){}},mE=e=>Object.assign(Object.create(pE),e),hE=e=>e?Ox(e.annotations,qS)?e._tag===`Span`?hE(Xb(e.parent)):Bb():Vb(e):Bb(),gE=(e,t,n)=>{let r=!e.getRef(nC)||n?.annotations&&Ox(n.annotations,qS),i=n?.parent===void 0?n?.root?Bb():hE(e.currentSpan):Vb(n.parent),a;if(r)a=mE({name:t,parent:i,annotations:wx(n?.annotations??Sx(),qS,!0)});else{let r=e.getRef(ZS),o=e.getRef(SE),s=e.getRef(rC),c=e.getRef(iC),l=e.getRef(aC),u=n?.level??e.getRef(JS),d=n?.links===void 0?l.slice():[...l,...n.links];a=r.span({name:t,parent:i,annotations:n?.annotations??Sx(),links:d,startTime:s?o.currentTimeNanosUnsafe():BigInt(0),kind:n?.kind??`internal`,root:n?.root??Ub(i),sampled:n?.sampled??(Wb(i)&&i.value.sampled===!1?!1:!ME(e.getRef(YS),u))});for(let[e,t]of Object.entries(c))a.attribute(e,t);if(n?.attributes!==void 0)for(let[e,t]of Object.entries(n.attributes))a.attribute(e,t)}return a},_E=(e,t)=>(t=typeof t==`function`?t:G_,Uw(tC,n=>({name:e,stack:t,parent:n}))),vE=(e,t,n,r)=>WC(()=>{e.status._tag!==`Ended`&&e.end(r?n.currentTimeNanosUnsafe():fE,t)}),yE=(e,...t)=>{let n=t.length===1?void 0:t[0],r=t[t.length-1];return Yy(t=>{let i=gE(t,e,n),a=t.getRef(SE),o=t.getRef(rC);return ET(iy(()=>r(i)),e=>vE(i,e,a,o))})},bE=Jw(GS),xE=function(){let e=yy(arguments[0]),t=e?arguments[1]:arguments[0],n=e?arguments[2]:arguments[1],r=B_;return t._tag===`Span`&&(n=dC(n),r=_E(t.name,n?.captureStackTrace)),e?bE(r(arguments[0]),t):e=>bE(r(e),t)},SE=jx(`effect/Clock`,{defaultValue:()=>new wE}),CE=2**31-1,wE=class{currentTimeMillisUnsafe(){return Date.now()}currentTimeMillis=WC(()=>this.currentTimeMillisUnsafe());currentTimeNanosUnsafe(){return DE()}currentTimeNanos=WC(()=>this.currentTimeNanosUnsafe());monotonicTimeNanosUnsafe(){return EE()}monotonicTimeNanos=WC(()=>this.monotonicTimeNanosUnsafe());sleep(e){return this.sleepMillis(DS(e))}sleepMillis(e){return e<=0?qC:Number.isFinite(e)?aw(t=>{let n=e>CE?this.sleepMillis(e-CE):QC,r=setTimeout(()=>t(n),Math.min(e,CE));return WC(()=>clearTimeout(r))}):ow}},TE=BigInt(1e6),EE=function(){let e=globalThis.process?.hrtime;if(typeof e?.bigint==`function`)return()=>e.bigint();if(typeof performance<`u`&&typeof performance.now==`function`)return()=>BigInt(Math.round(performance.now()*1e6));let t=BigInt(0);return()=>{let e=BigInt(Date.now())*TE;return e>t&&(t=e),t}}(),DE=function(){let e=BigInt(1e9),t;return()=>{let n=EE(),r=BigInt(Date.now())*TE;if(t===void 0)t=r-n;else{let i=t+n;(r>i?r-i:i-r)>e&&(t=r-n)}return t+n}}();Qy(`TimeoutError`),Qy(`IllegalArgumentError`),Qy(`ExceededCapacityError`);var OE=`~effect/Cause/AsyncFiberError`,kE=class extends Qy(`AsyncFiberError`){[OE]=OE;constructor(e){super({message:`An asynchronous Effect was executed with Effect.runSync`,fiber:e})}},AE=`~effect/Cause/UnknownError`,jE=class extends Qy(`UnknownError`){[AE]=AE;constructor(e,t){super({message:t,cause:e})}},ME=Lb(Pb(Nb,e=>{switch(e){case`All`:return-(2**53-1);case`Fatal`:return 5e4;case`Error`:return 4e4;case`Warn`:return 3e4;case`Info`:return 2e4;case`Debug`:return 1e4;case`Trace`:return 0;case`None`:return 2**53-1}})),NE={bold:`1`,red:`31`,green:`32`,yellow:`33`,blue:`34`,cyan:`36`,white:`37`,gray:`90`,black:`30`,bgBrightRed:`101`};NE.gray,NE.blue,NE.green,NE.yellow,NE.red,NE.bgBrightRed,NE.black;var PE=Cy,FE=wy,IE=Iy,LE=Ay,RE=jy,zE=My,BE=gC,VE=e=>new ky(e),HE=e=>new Ny(e),UE=hC,WE=CC,GE=SC,KE=TC,qE=_C,JE=vC,YE=yC,XE=bC,ZE=xC,QE=eb,$E=nb,eD=ob;ix()(`effect/Cause/StackTrace`),ix()(`effect/Cause/InterruptorStackTrace`);var tD=by,nD=Uy,rD=Ky,iD=qy,aD=Fw,oD=jw,sD=Mw,cD=Vw,lD={"~effect/Deferred":{_A:B_,_E:B_},pipe(){return L_(this,arguments)}},uD=()=>{let e=Object.create(lD);return e.resumes=void 0,e.effect=void 0,e},dD=e=>aw(t=>e.effect?t(e.effect):(e.resumes??=[],e.resumes.push(t),WC(()=>{let n=e.resumes;if(n===void 0)return;let r=n.indexOf(t);r>=0&&n.splice(r,1)}))),fD=B(2,(e,t)=>WC(()=>pte(e,t))),dte=B(2,(e,t)=>fD(e,Ky(t))),fte=B(2,(e,t)=>dte(e,gC(t))),pte=(e,t)=>{if(e.effect)return!1;if(e.effect=t,e.resumes){for(let n=0;n<e.resumes.length;n++)e.resumes[n](t);e.resumes=void 0}return!0},pD=dT,mD=bT,hD=CT,gD=gT,_D=_T,vD=hT,yD=fT,mte=`~effect/Layer`,bD=`~effect/Layer/MemoMap`,hte=(e,t)=>(e.observers++,vw(gT(t,t=>e.finalizer(t)),e.effect)),gte={[mte]:{_ROut:B_,_E:B_,_RIn:B_},pipe(){return L_(this,arguments)}},xD=e=>{let t=Object.create(gte);return t.build=e,t},SD=e=>xD((t,n)=>{let r=vD(n);return ET(e(t,r),e=>e._tag===`Failure`?yD(r,e):QC)}),_te=e=>{let t=SD((n,r)=>n.getOrElseMemoize(t,r,e));return t},vte=(e,t,n,r)=>{let i=mD(),a=uD(),o={observers:1,effect:dD(a),finalizer:n=>GC(()=>(o.observers--,o.observers===0?(e.map.delete(t),yD(i,n)):QC))};return e.map.set(t,o),gT(n,o.finalizer).pipe(xw(()=>r(e,i)),ET(e=>(o.effect=e,fD(a,e))))},CD=class{get[bD](){return bD}parent;constructor(e){this.parent=e}map=new Map;get(e,t){let n=this.map.get(e);return n?hte(n,t):this.parent?.get(e,t)}getOrElseMemoize(e,t,n){return GC(()=>this.get(e,t)||vte(this,e,t,n))}},wD=()=>new CD,yte=e=>new CD(e),TD=class e extends ix()(`effect/Layer/CurrentMemoMap`){static forkOrCreate(t){let n=Tx(t,e);return n?yte(n):wD()}},ED=B(3,(e,t,n)=>Jw(Ew(e.build(t,n),wx(TD,t)),TD,t)),bte=function(){return arguments.length===1?e=>DD(Cx(arguments[0],e)):DD(Cx(arguments[0],arguments[1]))},DD=e=>xD(V_(VC(e))),OD=function(){return arguments.length===1?e=>kD(arguments[0],e):kD(arguments[0],arguments[1])},kD=(e,t)=>AD(Ew(t,t=>Cx(e,t))),AD=e=>_te((t,n)=>hD(e,n)),xte=e=>AD(gw(e,Sx())),jD=(e,t,n)=>{let r=vD(n,`parallel`);return UT(e,e=>e.build(t,vD(r,`sequential`)),{concurrency:e.length}).pipe(Ew(e=>$ee(...e)))},Ste=(...e)=>SD((t,n)=>jD(e,t,n)),MD=(e,t,n)=>SD((r,i)=>xw(Array.isArray(t)?jD(t,r,i):t.build(r,i),t=>e.build(r,i).pipe(qw(t),Ew(e=>n(e,t))))),ND=B(2,(e,t)=>MD(e,t,B_)),PD=B(2,(e,t)=>MD(e,t,(e,t)=>Ax(t,e))),FD=class extends z_{constructor(e){super(),e&&oy(this,e)}},Cte=e=>class extends FD{_tag=e},wte=()=>new Proxy({},{get(e,t,n){return t===`$is`?cv:t===`$match`?Tte:e=>({...e,_tag:t})}});function Tte(){if(arguments.length===1){let e=arguments[0];return function(t){return e[t._tag](t)}}let e=arguments[0];return arguments[1][e._tag](e)}var ID=Qy,LD=`~effect/time/DateTime`,RD=`~effect/time/DateTime/TimeZone`,zD={[LD]:LD,pipe(){return L_(this,arguments)},[ey](){return this.toString()},toJSON(){return Ete(this).toJSON()}};({...zD}),{...zD};var BD={[RD]:RD,[ey](){return this.toString()}};({...BD}),{...BD};var Ete=e=>new Date(e.epochMilliseconds);globalThis.String;var Dte=e=>e.trim(),Ote=B(2,(e,t)=>eT(e,jte,e=>t(e))),VD=e=>e.reasons.some(kte),kte=e=>e._tag===`Fail`&&$E(e.error),Ate=PS(qE,e=>$E(e)?Nx(e):Px(e)),jte=PS(qE,e=>$E(e)?Nx(e.value):Px(e)),Mte=e=>{let t=Ate(e);return Ix(t)?rD(t.failure):nD(t.success.value)},HD=yy,Nte=UT,Pte=HT,UD=ew,WD=tw,V=VC,GD=JC,KD=GC,qD=WC,JD=QC,YD=aw,XD=ow,ZD=sw,QD=UC,$D=HC,eO=YC,Fte=XC,tO=$C,nO=Yy,Ite=KC,rO=xw,Lte=Tw,iO=vw,aO=yw,oO=sT,sO=Ew,cO=gw,lO=bw,Rte=tT,uO=Qw,zte=nT,Bte=Xw,dO=iT,fO=Ww,pO=Kw,mO=qw,hO=Hw,gO=Jw,_O=ST,vO=wT,yO=OT,bO=ET,xO=NT,SO=PT,CO=AT,wO=FT,TO=VT,EO=Zw,DO=yE,OO=xE,kO=XT,AO=YT,jO=$T,MO=ZT,Vte=eE,Hte=rE,NO=nE,PO=sE,FO=oE,IO=aE,LO=cw,RO=dw;ix()(`effect/Effect/Transaction`);var zO=Dw,BO=Ow,VO=kw,HO=ww,UO=pw,WO=`~effect/collections/Chunk`;function GO(e,t,n,r,i){for(let a=t;a<Math.min(e.length,t+i);a++)n[r+a-t]=e[a];return n}var KO=[],qO=e=>cb((t,n)=>t.length===n.length&&tk(t).every((t,r)=>e(t,rk(n,r)))),Ute=qO(kv),Wte={[WO]:{_A:e=>e},toString(){return`Chunk(${Zv(tk(this))})`},toJSON(){return{_id:`Chunk`,values:ty(tk(this))}},[ey](){return this.toJSON()},[Ov](e){return YO(e)&&Ute(this,e)},[uv](){return xv(tk(this))},[Symbol.iterator](){switch(this.backing._tag){case`IArray`:return this.backing.array[Symbol.iterator]();case`IEmpty`:return KO[Symbol.iterator]();default:return tk(this)[Symbol.iterator]()}},pipe(){return L_(this,arguments)}},JO=e=>{let t=Object.create(Wte);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=XO,t.right=XO;break;case`ISingleton`:t.length=1,t.depth=0,t.left=XO,t.right=XO;break;case`ISlice`:t.length=e.length,t.depth=e.chunk.depth+1,t.left=XO,t.right=XO}return t},YO=e=>sv(e,WO),XO=JO({_tag:`IEmpty`}),ZO=()=>XO,QO=e=>JO({_tag:`ISingleton`,a:e}),$O=e=>YO(e)?e:nk(Vx(e)),ek=(e,t,n)=>{switch(e.backing._tag){case`IArray`:GO(e.backing.array,0,t,n,e.length);break;case`IConcat`:ek(e.left,t,n),ek(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]=rk(e,r),r+=1,i+=1;break}}},tk=e=>{switch(e.backing._tag){case`IEmpty`:return KO;case`IArray`:return e.backing.array;default:{let t=Array(e.length);return ek(e,t,0),e.backing={_tag:`IArray`,array:t},e.left=XO,e.right=XO,e.depth=0,t}}},nk=e=>e.length===0?ZO():e.length===1?QO(e[0]):JO({_tag:`IArray`,array:e}),rk=B(2,(e,t)=>{let n=Math.floor(t);switch(e.backing._tag){case`IEmpty`:throw Error(`Index out of bounds: ${n}`);case`ISingleton`:if(t!==0)throw Error(`Index out of bounds: ${n}`);return e.backing.a;case`IArray`:if(n>=e.length||n<0)throw Error(`Index out of bounds: ${n}`);return e.backing.array[n];case`IConcat`:return n<e.left.length?rk(e.left,n):rk(e.right,n-e.left.length);case`ISlice`:return rk(e.backing.chunk,n+e.backing.offset)}}),ik=e=>e.length,ak=IC,ok=LC,sk=RC,ck=kC,lk=QT,uk=dE,dk=`~effect/MutableRef`,fk={[dk]:dk,..._y,toJSON(){return{_id:`MutableRef`,current:ty(this.current)}}},pk=e=>{let t=Object.create(fk);return t.current=e,t},mk=B(2,(e,t)=>(e.current=t,e)),hk=Symbol.for(`effect/MutableList/Empty`),gk=()=>({head:void 0,tail:void 0,length:0}),_k=()=>({array:[],mutable:!0,offset:0,next:void 0}),vk=(e,t)=>{e.tail?e.tail.mutable||(e.tail.next=_k(),e.tail=e.tail.next):e.head=e.tail=_k(),e.tail.array.push(t),e.length++},yk=e=>{e.head=e.tail=void 0,e.length=0},bk=(e,t)=>{if(t<=0||!e.head)return[];if(t=Math.min(t,e.length),t===e.length&&e.head?.offset===0&&!e.head.next){let t=e.head.array;return yk(e),t}let n=Array(t),r=0,i=e.head;for(;i;){for(;i.offset<i.array.length;)if(n[r++]=i.array[i.offset],i.mutable&&(i.array[i.offset]=void 0),i.offset++,r===t)return e.head=i,e.length-=t,e.length===0&&yk(e),n;i=i.next}return yk(e),n},xk=e=>bk(e,e.length),Sk=e=>{if(!e.head)return hk;let t=e.head.array[e.head.offset];return e.head.mutable&&(e.head.array[e.head.offset]=void 0),e.head.offset++,e.length--,e.head.offset===e.head.array.length&&(e.head.next?e.head=e.head.next:yk(e)),t},Ck=(e,t)=>{let n=[],r=e.head;for(;r;){for(let e=r.offset;e<r.array.length;e++)t(r.array[e],e)&&n.push(r.array[e]);r=r.next}if(n.length===0){yk(e);return}e.head=e.tail={array:n,mutable:!0,offset:0,next:void 0},e.length=n.length},wk=(e,t)=>Ck(e,e=>e!==t),Tk=`~effect/PubSub/Subscription`,Ek=B(2,(e,t)=>e.shutdownFlag.current?!1:e.pubsub.publish(t)?(e.strategy.completeSubscribersUnsafe(e.pubsub,e.subscribers),!0):!1),Dk=e=>wO(pO(t=>{let n=Ox(t,pD),r=vD(e.scope),i=jk(e.pubsub,e.subscribers,e.strategy);return _D(r,Ok(i)).pipe(iO(gD(n,e=>yD(r,e))),cO(i))})),Ok=e=>wO(nO(t=>(mk(e.shutdownFlag,!0),Nte(xk(e.pollers),e=>fte(e,t.id),{discard:!0,concurrency:`unbounded`}).pipe(aO(()=>qD(()=>{e.subscribers.delete(e.subscription),e.subscription.unsubscribe(),e.replayWindow.close(),e.strategy.onPubSubEmptySpaceUnsafe(e.pubsub,e.subscribers)})),Bte(e.shutdownHook.open),lO)))),kk=e=>KD(function t(n){if(e.shutdownFlag.current)return SO;let r=e.pollers.length===0?e.subscription.pollUpTo(1/0):[];return n&&(r=n.concat(r)),e.strategy.onPubSubEmptySpaceUnsafe(e.pubsub,e.subscribers),e.replayWindow.remaining>0?V(e.replayWindow.takeAll().concat(r)):Gx(r)?V(r):rO(Ak(e),e=>t([e]))}),Ak=e=>{let t=uD(),n=e.subscribers.get(e.subscription);return n||(n=new Set,e.subscribers.set(e.subscription,n)),n.add(e.pollers),vk(e.pollers,t),e.strategy.completePollersUnsafe(e.pubsub,e.subscribers,e.subscription,e.pollers),CO(dD(t),()=>(wk(e.pollers,t),JD))},jk=(e,t,n)=>new Mk(e,t,e.subscribe(),gk(),uk(!1),pk(!1),n,e.replayWindow()),Mk=class{[Tk]={_A:B_};pubsub;subscribers;subscription;pollers;shutdownHook;shutdownFlag;strategy;replayWindow;constructor(e,t,n,r,i,a,o,s){this.pubsub=e,this.subscribers=t,this.subscription=n,this.pollers=r,this.shutdownHook=i,this.shutdownFlag=a,this.strategy=o,this.replayWindow=s}pipe(){return L_(this,arguments)}},Nk=`~effect/Queue`,Pk=`~effect/Queue/Enqueue`,Fk=`~effect/Queue/Dequeue`,Ik={_A:B_,_E:B_},Lk={[Nk]:Ik,[Pk]:Ik,[Fk]:Ik,..._y,toJSON(){return{_id:`effect/Queue`,state:this.state._tag,size:Kte(this)}}},Rk=e=>Yy(t=>{let n=Object.create(Lk);return n.dispatcher=t.currentDispatcher,n.capacity=e?.capacity??1/0,n.strategy=e?.strategy??`suspend`,n.messages=gk(),n.scheduleRunning=!1,n.state={_tag:`Open`,takers:new Set,offers:new Set,awaiters:new Set},VC(n)}),zk=e=>Rk({capacity:e}),Bk=(e,t)=>GC(()=>{if(e.state._tag!==`Open`)return Jk;if(e.messages.length>=e.capacity)switch(e.strategy){case`dropping`:return Jk;case`suspend`:return e.capacity<=0&&e.state.takers.size>0?(vk(e.messages,t),Xk(e),Yk):Qk(e,t);case`sliding`:return Sk(e.messages),vk(e.messages,t),Yk}return vk(e.messages,t),Zk(e),Yk}),Vk=(e,t)=>e.state._tag===`Open`?e.messages.length>=e.capacity?e.strategy===`sliding`?(Sk(e.messages),vk(e.messages,t),!0):e.capacity<=0&&e.state.takers.size>0&&(vk(e.messages,t),Xk(e),!0):(vk(e.messages,t),Zk(e),!0):!1,Hk=B(2,(e,t)=>WC(()=>Uk(e,t))),Uk=(e,t)=>{if(e.state._tag!==`Open`)return!1;let n=zw(Ky(t),qte);return e.state.offers.size===0&&e.messages.length===0?(tA(e,n),!0):(e.state={...e.state,_tag:`Closing`,exit:n},!0)},Wk=e=>WC(()=>{if(e.state._tag===`Done`)return!0;yk(e.messages);let t=e.state.offers;if(tA(e,e.state._tag===`Open`?Jte:e.state.exit),t.size>0){for(let e of t)e._tag===`Single`?e.resume(Jk):e.resume(Uy(e.remaining.slice(e.offset)));t.clear()}return!0}),Gk=e=>Kk(e,1,1/0),Kk=(e,t,n)=>GC(()=>Yte(e,t,n)??vw(eA(e),Kk(e,1,n))),qk=e=>GC(()=>Gte(e)??vw(eA(e),qk(e))),Gte=e=>{if(e.state._tag===`Done`)return e.state.exit;if(e.messages.length>0){let t=Sk(e.messages);return $k(e),Uy(t)}if(e.capacity<=0&&e.state.offers.size>0){e.capacity=1,$k(e),e.capacity=0;let t=Sk(e.messages);return $k(e),Uy(t)}},Kte=e=>e.state._tag===`Done`?0:e.messages.length,Jk=Uy(!1),Yk=Uy(!0),qte=qy(ib()),Jte=Aw(),Xk=e=>{if(e.scheduleRunning=!1,e.state._tag!==`Done`&&e.state.takers.size!==0){for(let t of e.state.takers)if(e.state.takers.delete(t),t(Fw),e.messages.length===0)break}},Zk=e=>{e.scheduleRunning||e.state._tag===`Done`||e.state.takers.size===0||(e.scheduleRunning=!0,e.dispatcher.scheduleTask(()=>Xk(e),0))},Yte=(e,t,n)=>{if(e.state._tag===`Done`)return e.state.exit;if(n<=0||t<=0)return Uy([]);if(e.capacity<=0&&e.state.offers.size>0){e.capacity=1,$k(e),e.capacity=0;let t=[Sk(e.messages)];return $k(e),Uy(t)}if(t=Math.min(t,e.capacity||1),t<=e.messages.length){let t=bk(e.messages,n);return $k(e),Uy(t)}},Qk=(e,t)=>aw(n=>{if(e.state._tag!==`Open`)return n(Jk);let r={_tag:`Single`,message:t,resume:n};return e.state.offers.add(r),WC(()=>{e.state._tag===`Open`&&e.state.offers.delete(r)})}),$k=e=>{if(e.state._tag===`Done`)return VD(e.state.exit.cause);if(e.state.offers.size===0)return e.state._tag===`Closing`&&e.messages.length===0&&(tA(e,e.state.exit),VD(e.state.exit.cause));let t=e.capacity-e.messages.length;for(let n of e.state.offers)if(t===0)break;else if(n._tag===`Single`)vk(e.messages,n.message),t--,n.resume(Yk),e.state.offers.delete(n);else{for(;n.offset<n.remaining.length;n.offset++){if(t===0)return!1;vk(e.messages,n.remaining[n.offset]),t--}n.resume(Uy([])),e.state.offers.delete(n)}return!1},eA=e=>aw(t=>e.state._tag===`Done`?t(e.state.exit):(e.state.takers.add(t),WC(()=>{e.state._tag!==`Done`&&e.state.takers.delete(t)}))),tA=(e,t)=>{if(e.state._tag===`Done`)return;let n=e.state;e.state={_tag:`Done`,exit:t};for(let e of n.takers)e(t);n.takers.clear();for(let e of n.awaiters)e(t);n.awaiters.clear()},nA=e=>new iA(e),rA=(e,t,n)=>aw(r=>{if(e.free>=t)return r(n);let i=()=>{e.free<t||(e.waiters.delete(i),r(n))};return e.waiters.add(i),WC(()=>{e.waiters.delete(i)})}),iA=class{waiters=new Set;taken=0;permits;constructor(e){this.permits=e}get free(){return this.permits-this.taken}take(e){let t=GC(()=>this.free<e?rA(this,e,t):(this.taken+=e,VC(e)));return t}takeIfAvailable(e){return GC(()=>this.free<e?VC(!1):(this.taken+=e,VC(!0)))}releaseUnsafe(e,t){return this.taken-=t,this.waiters.size>0&&e.currentDispatcher.scheduleTask(()=>{for(let e of this.waiters){if(this.free<=0)break;e()}},0),this.free}resize(e){return Yy(t=>(this.permits=e,this.free<0||this.releaseUnsafe(t,0),QC))}release(e){return Yy(t=>VC(this.releaseUnsafe(t,e)))}get releaseAll(){return Yy(e=>VC(this.releaseUnsafe(e,this.taken)))}withPermits(e){return t=>VT(n=>{let r=GC(()=>this.free<e?xw(n(rA(this,e,QC)),()=>r):(this.taken+=e,TT(n(t),()=>{this.releaseUnsafe(kC(),e)},!0)));return r})}withPermit=this.withPermits(1);withPermitsIfAvailable(e){return t=>VT(n=>this.free<e?JC:(this.taken+=e,TT(n(_w(t)),()=>{this.releaseUnsafe(kC(),e)},!0)))}},aA=`~effect/Channel`,oA=e=>sv(e,aA),sA={[aA]:{_Env:B_,_InErr:B_,_InElem:B_,_OutErr:B_,_OutElem:B_},pipe(){return L_(this,arguments)}},cA=e=>{let t=Object.create(sA);return t.transform=(t,n)=>uO(e(t,n),e=>V($D(e))),t},lA=(e,t)=>cA((n,r)=>rO(fA(e)(n,r),e=>t(e,r))),uA=e=>cA((t,n)=>e),dA=e=>cA(LO(function*(t,n){let r=vD(n),i=e=>yD(r,Mte(e));return yO(yield*yO(e(t,n,r),i),i)})),fA=e=>e.transform,pA=(e,t,n)=>Rk({capacity:n?.bufferSize,strategy:n?.strategy}).pipe(aO(t=>_D(e,Wk(t))),aO(n=>kO(hD(t(n),e),e))),mA=(e,t)=>cA((n,r)=>sO(pA(r,e,t),Gk)),hA=e=>cA((t,n)=>KD(()=>fA(e())(t,n))),gA=uA(V(eD())),_A=e=>uA(V(QD(e))),vA=e=>uA(V(Gk(e))),yA=e=>uA(V(CO(kk(e),()=>eD()))),bA=e=>jA(sO(Dk(e),yA)),xA=e=>cA((t,n)=>SA({scope:n,readable:e.evaluate(),onError:e.onError,releaseLockOnEnd:e.releaseLockOnEnd})),SA=e=>{let t=e.readable.getReader(),n=e.exit??pk(void 0),r=KD(()=>n.current?n.current:dO(WD({try:()=>t.read(),catch:e.onError}),{onFailure:e=>n.current??$D(e),onSuccess:({done:e,value:t})=>n.current?n.current:e?eD():V(Jx(t))}));return cO(_D(e.scope,e.releaseLockOnEnd?qD(()=>t.releaseLock()):UD(()=>t.cancel().catch(K_))),r)},CA=B(2,(e,t)=>lA(e,e=>qD(()=>{let n=0;return sO(e,e=>t(e,n++))}))),wA=e=>e===void 0||e!==`unbounded`&&e<=1,TA=B(e=>oA(e[0]),(e,t,n)=>wA(n?.concurrency)?EA(e,t):DA(e,t,n)),EA=(e,t)=>cA((n,r)=>{let i=0;return sO(fA(e)(n,r),rO(e=>t(e,i++)))}),DA=(e,t,n)=>dA(LO(function*(r,i,a){let o=0,s=yield*fA(e)(r,i),c=n.concurrency===`unbounded`?2**53-1:n.concurrency,l=yield*zk(0);yield*_D(a,Wk(l));let u=MO(yield*fO()),d=lk(a);if(n.unordered){let e=nA(c),n=V_(e.release(1)),r=dO({onFailure:e=>rO(Hk(l,e),n),onSuccess:e=>rO(Bk(l,e),n)});yield*e.take(1).pipe(rO(()=>s),rO(e=>(d(u(r(t(e,o++)))),JD)),EO({disableYield:!0}),uO(t=>e.withPermits(c-1)(Hk(l,t))),kO(a))}else{let e=yield*zk(c-2);yield*_D(a,Wk(l)),yield*qk(e).pipe(Lte,rO(e=>Bk(l,e)),EO({disableYield:!0}),uO(e=>Hk(l,e)),kO(a));let n,r=e=>{e._tag!==`Success`&&(n=e.cause,Uk(l,e.cause))};yield*s.pipe(rO(i=>{if(n)return $D(n);let a=u(t(i,o++));return d(a),a.addObserver(r),Bk(e,ak(a))}),EO({disableYield:!0}),uO(t=>Bk(e,rD(t)).pipe(iO(Hk(e,t)))),kO(a))}return qk(l)})),OA=e=>lA(e,e=>{let t,n=0;return V(KD(function r(){if(t===void 0)return rO(e,e=>{switch(e.length){case 0:return r();case 1:return V(e[0]);default:return t=e,V(e[n++])}});let i=t[n++];return n>=t.length&&(t=void 0,n=0),V(i)}))}),kA=B(2,(e,t)=>lA(e,e=>V(rO(e,function n(r){let i=[];for(let e=0;e<r.length;e++)t(r[e])&&i.push(r[e]);return Kx(i)?V(i):rO(e,n)})))),AA=B(2,(e,t)=>cA((n,r)=>rO(fA(e)(n,r),e=>fA(t)(e,r)))),jA=e=>cA((t,n)=>{let r;return V(KD(()=>r||e.pipe(hD(n),rO(e=>fA(e)(t,n)),rO(e=>r=e))))}),MA=B(2,(e,t)=>dA((n,r,i)=>gD(i,t).pipe(iO(fA(e)(n,r))))),NA=B(2,(e,t)=>MA(e,e=>t)),PA=(e,t,n)=>KD(()=>{let r=mD();return Ote(rO(fA(e)(eD(),r),t),n||V).pipe(bO(e=>yD(r,e)))}),FA=B(2,(e,t)=>cA((n,r)=>sO(mO(fA(e)(n,r),t),mO(t)))),IA=B(2,(e,t)=>PA(e,e=>EO(rO(e,t),{disableYield:!0}))),LA=LO(function*(e){let t=nA(1),n=yield*fO(),r=Ox(n,pD);return(yield*fA(e)(eD(),r)).pipe(mO(n),t.withPermits(1))},uO(e=>V($D(e)))),RA=(e,t)=>fA(e)(eD(),t),zA=`~effect/collections/MutableHashMap`,BA={[zA]:zA,[Symbol.iterator](){return this.backing[Symbol.iterator]()},toString(){return`MutableHashMap(${Zv(Array.from(this))})`},toJSON(){return{_id:`MutableHashMap`,values:ty(Array.from(this))}},[ey](){return this.toJSON()},pipe(){return L_(this,arguments)}},VA=()=>{let e=Object.create(BA);return e.backing=new Map,e.buckets=new Map,e},HA=B(2,(e,t)=>{if(e.backing.has(t))return Vb(e.backing.get(t));if(WA(t))return Bb();let n=UA.get(e);if(n!==void 0)return e.backing.has(n)?Vb(e.backing.get(n)):Bb();let r=dv(t),i=e.buckets.get(r);return i===void 0?Bb():GA(e,i,t)}),UA=new WeakMap,WA=e=>typeof e!=`object`&&typeof e!=`function`,GA=(e,t,n)=>{for(let r=0,i=t.length;r<i;r++)if(kv(n,t[r])){let i=t[r];return UA.set(n,i),Vb(e.backing.get(i))}return Bb()},KA=B(3,(e,t,n)=>{if(e.backing.has(t)||WA(t))return e.backing.set(t,n),e;let r=UA.get(e);if(r!==void 0&&e.backing.has(r))return e.backing.set(r,n),e;let i=dv(t),a=e.buckets.get(i);return a===void 0?(e.buckets.set(i,[t]),e.backing.set(t,n),e):(r=qA(a,t),r===void 0&&(a.push(t),r=t),e.backing.set(r,n),e)}),qA=(e,t)=>{for(let n=0,r=e.length;n<r;n++)if(kv(t,e[n]))return UA.set(t,e[n]),e[n]},JA=B(2,(e,t)=>{if(WA(t))return e.backing.delete(t),e;let n=UA.get(e)??t,r=dv(n),i=e.buckets.get(r);if(i===void 0)return e;for(let t=0,r=i.length;t<r;t++){let r=i[t];if(r===n||kv(n,r)){e.backing.delete(r),i.splice(t,1);break}}return i.length===0&&e.buckets.delete(r),e}),YA=`~effect/BigDecimal`,XA={[YA]:YA,[uv](){let e=rj(this);return pv(dv(e.value),gv(e.scale))},[Ov](e){return ZA(e)&&sj(this,e)},toString(){return`BigDecimal(${cj(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[ey](){return this.toJSON()},pipe(){return L_(this,arguments)}},ZA=e=>sv(e,YA),QA=(e,t)=>{let n=Object.create(XA);return n.value=e,n.scale=t,n},$A=(e,t)=>{if(e!==ej&&e%tj===ej)throw RangeError(`Value must be normalized`);let n=QA(e,t);return n.normalized=n,n},ej=BigInt(0),tj=BigInt(10),nj=$A(ej,0),rj=e=>{if(e.normalized===void 0){if(e.value===ej)e.normalized=nj;else{let t=`${e.value}`,n=0;for(let e=t.length-1;e>=0&&t[e]===`0`;e--)n++;n===0&&(e.normalized=e),e.normalized=$A(BigInt(t.substring(0,t.length-n)),e.scale-n)}}return e.normalized},ij=B(2,(e,t)=>t>e.scale?QA(e.value*tj**BigInt(t-e.scale),t):t<e.scale?QA(e.value/tj**BigInt(e.scale-t),t):e),aj=e=>e.value<ej?QA(-e.value,e.scale):e,oj=cb((e,t)=>e.scale>t.scale?ij(t,e.scale).value===e.value:e.scale<t.scale?ij(e,t.scale).value===t.value:e.value===t.value),sj=B(2,(e,t)=>oj(e,t)),cj=e=>{let t=rj(e);if(Math.abs(t.scale)>=16)return lj(t);let n=t.value<ej,r=n?`${t.value}`.substring(1):`${t.value}`,i,a;if(t.scale>=r.length)i=`0`,a=`0`.repeat(t.scale-r.length)+r;else{let e=r.length-t.scale;if(e>r.length){let t=e-r.length;i=`${r}${`0`.repeat(t)}`,a=``}else a=r.slice(e),i=r.slice(0,e)}let o=a===``?i:`${i}.${a}`;return n?`-${o}`:o},lj=e=>{if(uj(e))return`0e+0`;let t=rj(e),n=`${aj(t).value}`,r=n.slice(0,1),i=n.slice(1),a=`${dj(t)?`-`:``}${r}`;i!==``&&(a+=`.${i}`);let o=i.length-t.scale;return`${a}e${o>=0?`+`:``}${o}`},uj=e=>e.value===ej,dj=e=>e.value<ej;ix()(`effect/DateTime/CurrentTimeZone`);var fj=`~effect/encoding/EncodingError`,pj=class extends ID(`EncodingError`){[fj]=fj},mj=e=>yj(typeof e==`string`?_j.encode(e):e),hj=e=>{let t=vj(e),n=t.length;if(n%4!=0)return Px(new pj({kind:`Decode`,module:`Base64`,input:t,message:`Length must be a multiple of 4, but is ${n}`}));let r=t.indexOf(`=`);if(r!==-1&&(r<n-2||r===n-2&&t[n-1]!==`=`))return Px(new pj({kind:`Decode`,module:`Base64`,input:t,message:`Found a '=' character, but it is not at the end`}));try{let e=t.endsWith(`==`)?2:+!!t.endsWith(`=`),r=new Uint8Array(n/4*3-e);for(let e=0,i=0;e<n;e+=4,i+=3){let n=bj(t.charCodeAt(e))<<18|bj(t.charCodeAt(e+1))<<12|bj(t.charCodeAt(e+2))<<6|bj(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return Nx(r)}catch(e){return Px(new pj({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},gj=e=>Cj(typeof e==`string`?_j.encode(e):e),_j=new TextEncoder,vj=e=>e.replace(/[\n\r]/g,``),yj=e=>{let t=e.length,n=``,r;for(r=2;r<t;r+=3)n+=xj[e[r-2]>>2],n+=xj[(e[r-2]&3)<<4|e[r-1]>>4],n+=xj[(e[r-1]&15)<<2|e[r]>>6],n+=xj[e[r]&63];return r===t+1&&(n+=xj[e[r-2]>>2],n+=xj[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=xj[e[r-2]>>2],n+=xj[(e[r-2]&3)<<4|e[r-1]>>4],n+=xj[(e[r-1]&15)<<2],n+=`=`),n};function bj(e){if(e>=Sj.length)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);let t=Sj[e];if(t===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return t}var xj=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`.split(``),Sj=[255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,62,255,255,255,63,52,53,54,55,56,57,58,59,60,61,255,255,255,0,255,255,255,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,255,255,255,255,255,255,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],Cj=e=>yj(e).replace(/=/g,``).replace(/\+/g,`-`).replace(/\//g,`_`);function wj(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}function Tj(e){return t=>wj(t)?.[e]}var Ej=`~structural`,Dj=`~sentinels`,Oj=`~constructor`,kj=Tj(`brands`),Aj=Y_(e=>{let t=wj(e)?.identifier;return typeof t==`string`?t:e.getExpected(Aj)}),jj=Symbol(),Mj=nD,Nj=Mj(jj),Pj=Mj(jj),Fj=e=>e===jj?Bb():Vb(e),Ij=e=>e._tag===`None`?Nj:Mj(e.value),Lj=`~effect/SchemaIssue/Issue`;function Rj(e){return sv(e,Lj)&&e[Lj]===Lj}function zj(e){return Object.hasOwn(e,`input`)}var Bj=class{[Lj]=Lj;constructor(e,t){t?.reportInput===!0&&e!==jj&&(this.input=e)}},Vj=class extends Bj{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},Hj=class extends Bj{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},Uj=class extends Bj{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Wj=class extends Bj{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},Gj=class extends Bj{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Kj=class extends Bj{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},qj=class extends Bj{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Jj=class extends Bj{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}};function Yj(e,t,n,r,i){return new Kj(e,[new Uj([t],n)],r,i)}var Xj=class extends Bj{_tag=`Forbidden`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},Zj=class extends Bj{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Qj=class extends Bj{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function $j(e,t,n){if(Rj(e))return e;if(typeof e==`string`)return new Jj({message:e},t,n);let r=typeof e.issue==`string`?new Jj({message:e.issue},t,n):e.issue;return new Uj(e.path,r)}function eM(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new Jj(void 0,t,n):$j(e,t,n)}function tM(e,t,n,r){return Array.isArray(t)?Kx(t)?t.length===1?$j(t[0],n,r):new Kj(e,Yx(t,e=>$j(e,n,r)),n,r):void 0:eM(t,n,r)}var nM=e=>{let t=dM(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return oM(Aj(e.ast),e);case`InvalidValue`:{let t=aM(e);if(t!==void 0)return oM(t,e);let n=iM(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=iM(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=iM(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},rM=e=>dM(e.issue)??dM(e);function iM(e){return zj(e)?Zv(e.input):void 0}function aM(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function oM(e,t){let n=iM(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function sM(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>sM(e)).join(` & `)}}function cM(){return e=>uM(e,``)}var lM=cM();function uM(e,t){let n;switch(e._tag){case`Filter`:{let r=rM(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return uM(e.issue,t);let r=aM(e.issue);n=r===void 0?oM(sM(e.filter),e):oM(r,e.issue)}break}case`Encoding`:return uM(e.issue,t);case`Pointer`:return uM(e.issue,t+Gee(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>uM(e,t)).join(`
56
- `);n=dM(e)??oM(Aj(e.ast),e);break;default:n=nM(e)}return t?`${n}\n at ${t}`:n}function dM(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return dM(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function fM(e){let t;for(let n of e.reasons){if(!IE(n)||!Rj(n.error))return;t??=n.error}return t}function pM(e,t){let n=fM(e);if(n===void 0)throw Error(t,{cause:e});return n}var mM=class e extends z_{run;constructor(e){super(),this.run=e}map(t){return new e((e,n)=>this.run(e,n).pipe(zO(Qb(t))))}compose(t){return gM(this)?t:gM(t)?this:new e((e,n)=>this.run(e,n).pipe(HO(e=>t.run(e,n))))}},hM=new mM(V);function gM(e){return e.run===hM.run}function _M(){return hM}function vM(e){return new mM((t,n)=>Ub(t)?GD:e(t.value,n))}function yM(e){return xM(Qb(e))}function bM(e){return vM((t,n)=>e(t,n).pipe(zO(Vb)))}function xM(e){return new mM(t=>V(e(t)))}function SM(){return new mM(()=>GD)}function CM(e){return new mM(t=>{let n=tx(t,Bee);return Wb(n)?V(n):zO(e,Vb)})}function wM(){return yM(globalThis.String)}function TM(){return yM(globalThis.Number)}function EM(){return yM(e=>new globalThis.Date(e))}function DM(){return yM(Dte)}function OM(e){return vM((t,n)=>tO({try:()=>Vb(JSON.parse(t,e?.reviver)),catch:()=>new Jj({expected:`a valid JSON string`},t,n)}))}function kM(e){return vM((t,n)=>tO({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return Vb(n)},catch:()=>new Jj({expected:`a JSON-serializable value`},t,n)}))}function AM(){return yM(mj)}function jM(){return bM((e,t)=>BO(Ite(hj(e)),()=>new Jj({expected:`a valid Base64 string`},e,t)))}var MM=`~effect/SchemaTransformation/Transformation`,NM=class e{[MM]=MM;_tag=`Transformation`;decode;encode;constructor(e,t){this.decode=e,this.encode=t}flip(){return new e(this.encode,this.decode)}compose(t){return new e(this.decode.compose(t.decode),t.encode.compose(this.encode))}};function Xte(e){return sv(e,MM)&&e[MM]===MM}var PM=e=>Xte(e)?e:new NM(e.decode,e.encode);function Zte(e){return new NM(bM(e.decode),bM(e.encode))}function FM(e){return new NM(yM(e.decode),yM(e.encode))}function Qte(){return new NM(DM(),_M())}var $te=new NM(_M(),_M());function IM(){return $te}var LM=new NM(TM(),wM()),RM=new NM(EM(),yM($v)),ene=e=>av(e)&&typeof e.message==`string`,tne=e=>{let t=Object.hasOwn(e,`cause`)?Error(e.message,{cause:zM(e.cause)}):Error(e.message);return typeof e.name==`string`&&e.name!==`Error`&&(t.name=e.name),typeof e.stack==`string`&&(t.stack=e.stack),t},nne=e=>{try{let t=qee(e);return t===void 0?Zv(e):JSON.parse(t)}catch{return Zv(e)}},rne=(e,t,n)=>{let r={name:e.name,message:typeof e.message==`string`?e.message:``};return t?.includeStack&&typeof e.stack==`string`&&(r.stack=e.stack),!t?.excludeCause&&e.cause!==void 0&&(r.cause=n(e.cause)),r},ine=e=>{let t=new WeakSet,n=r=>{if(lv(r)){if(t.has(r))return`[Circular]`;t.add(r);let i=rne(r,e,n);return t.delete(r),i}return nne(r)};return n},zM=e=>ene(e)?tne(e):e,ane=e=>FM({decode:zM,encode:ine(e)}),one=new NM(jM(),AM());function sne(e){return new NM(OM(e??{}),kM(e))}function BM(e){return t=>t._tag===e}var VM=BM(`Declaration`),cne=BM(`Null`),HM=BM(`Void`),lne=BM(`Never`),UM=BM(`Literal`),WM=BM(`UniqueSymbol`),une=BM(`Arrays`),GM=BM(`Objects`),KM=BM(`Union`),qM=BM(`Suspend`),JM=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},YM={},XM=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},ZM=`~effect/Schema`,QM=class{[ZM]=ZM;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},$M=class e extends QM{_tag=`Declaration`;typeParameters;run;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o}getParser(){let e;return(t,n)=>t===jj?Nj:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(t,n,r){let i=fP(this.typeParameters,t);return i===this.typeParameters&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.run,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},eN=new class extends QM{_tag=`Null`;getParser(){return kP(this,null)}getExpected(){return`null`}},dne=class extends QM{_tag=`Undefined`;getParser(){return kP(this,void 0)}toCodecJson(){return eP(this,[tN])}getExpected(){return`undefined`}},tN=new JM(eN,new NM(yM(()=>void 0),yM(()=>null))),nN=new dne,fne=new class extends QM{_tag=`Void`;getParser(){let e=Mj(void 0);return t=>t===jj?Nj:e}toCodecJson(){return eP(this,[tN])}getExpected(){return`void`}},pne=new class extends QM{_tag=`Never`;getParser(){return AP(this,rv)}getExpected(){return`never`}},rN=new class extends QM{_tag=`Unknown`;getParser(){return AP(this,iv)}getExpected(){return`unknown`}},iN=class extends QM{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${Zv(e)}`);this.literal=e}getParser(){return kP(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?aN(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:aN(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function aN(e){let t=globalThis.String(e.literal);return eP(e,[new JM(new iN(t),new NM(yM(()=>e.literal),yM(()=>t)))])}var oN=new class extends QM{_tag=`String`;getParser(){return AP(this,$_)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&zP(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},sN=class extends QM{_tag=`Number`;getParser(){return AP(this,ev)}matchKey(e,t){return this._match(PP,e,t)}matchPart(e,t){return this._match(NP,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:zP(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(cN(this.checks,`effect/schema/isFinite`)||cN(this.checks,`effect/schema/isInt`))?this:eP(this,[lN(this.checks)])}toCodecStringTree(){return this.toCodecJson()===this?eP(this,[LP]):eP(this,[RP])}getExpected(){return`number`}};function cN(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&cN(e.checks,t))}function lN(e){return new JM(new LN([e?iP(YN,e):YN,BN],`anyOf`),new NM(TM(),yM(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))))}var uN=new sN,dN=new class extends QM{_tag=`Boolean`;getParser(){return AP(this,Lee)}getExpected(){return`boolean`}},fN=class e extends QM{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(xP(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(xP(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}return UO(function*(e,c){if(e===jj)return jj;if(!Array.isArray(e))return yield*QD(new qj(n,e,c));r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)})));let l=e.length,u={ast:n,getParser:s,input:e,len:l,tailThreshold:Math.max(a,l-o),output:new globalThis.Array(l),issues:void 0,options:c},d=pN(u,e,{concurrency:mN(c?.concurrency)?.concurrency,end:n.rest.length===0?a:Math.max(l,a+o)});if(d&&(yield*d),n.rest.length===0&&l>a)for(let t=a;t<=l-1;t++){let r=new Gj(n,e[t],c),i=new Uj([t],r);if(c.errors===`all`)u.issues?u.issues.push(i):u.issues=[i];else return yield*QD(new Kj(n,[i],e,c))}return u.issues?yield*QD(new Kj(n,u.issues,e,c)):u.output})}_rebuild(t,n,r){let i=fP(this.elements,t),a=fP(this.rest,t);return i===this.elements&&a===this.rest&&n===this.checks&&r===this.encodingChecks?this:new e(this.isMutable,i,a,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}},pN=KT()({onItem(e,t,n){let r=n<e.len?t:jj;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step(e,t,n,r){if(n._tag===`Failure`)return hN(e,e.ast,r,n);let i=n===Pj?t:n[dy];if(i!==jj)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(xP(t.ast))return;let n=new Uj([r],new Wj(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return iD(new Kj(e.ast,[n],e.input,e.options))}}}),mN=e=>(e=e===`unbounded`?1/0:e??1,e>1?{concurrency:e}:void 0),hN=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=fM(r.cause);if(i===void 0)return rD(WE(r.cause,r=>new Kj(t,[new Uj([n],r)],e.input,e.options)));let a=new Uj([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return iD(new Kj(t,[a],e.input,e.options))},gN=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function _N(e,t,n=YM){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(jP(TP(t)))}var vN=class{name;type;constructor(e,t){this.name=e,this.type=t}};function yN(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(yN);default:return!1}}function bN(e){return yN(e)&&yN(TP(e))}var xN=class{parameter;type;constructor(e,t){if(!bN(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,xP(t)&&!OP(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},SN=class e extends QM{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o;let s=e.map(e=>e.name).filter((e,t,n)=>n.indexOf(e)!==t);if(s.length>0)throw Error(`Duplicate identifiers: ${JSON.stringify(s)}. ts(2300)`)}getParser(e,t=e){let n=this,r=[];for(let e of n.propertySignatures)r.push(e.name);let i=r.length,a=n.indexSignatures.length,o=i&&a?new Set(r):void 0;if(!i&&!a)return AP(n,Vee);let s,c,l=(e,t,r,a,s)=>{if(s._tag===`Failure`)return hN(e,n,t,s)??aD;let c=s===Pj?a:s[dy];if(r!==jj&&c!==jj){if(i&&(o.has(t)||o.has(r)))return aD;ay(e.out,r,c)}return aD},u=(e,t,r,i)=>{if(!i){let n=r.parserKey(t,e.options);if(!Cw(n))return rO(oO(n),n=>u(e,t,r,n));i=n}if(i._tag===`Failure`)return hN(e,n,t,i)??aD;let a=i===Pj?t:i[dy],o=e.input[t],s=r.parserValue(o,e.options);return Cw(s)?l(e,t,a,o,s):rO(oO(s),n=>l(e,t,a,o,n))},d=(e,t,n)=>{let r=e.input[t],i=n.parserValue(r,e.options);return Cw(i)?l(e,t,t,r,i):rO(oO(i),n=>l(e,t,t,r,n))},f=a?KT()({onItem:(e,[t,n])=>u(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return UO(function*(l,p){if(l===jj)return jj;if(!(typeof l==`object`&&l&&!Array.isArray(l)))return yield*QD(new qj(n,l,p));s||(s=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),c=a?n.indexSignatures.map(n=>({is:n,parserKey:e(jP(n.parameter)),parserValue:t(n.type)})):void 0);let m=l,h={},g={ast:n,input:m,out:h,issues:void 0,options:p},_=p.errors===`all`,v=p.onExcessProperty===`error`,y=p.onExcessProperty===`preserve`,b;if(!a&&(v||y)){o??=new Set(r),b=Reflect.ownKeys(m);for(let e=0;e<b.length;e++){let t=b[e];if(!o.has(t)){if(v){let e=new Gj(n,m[t],p),r=new Uj([t],e);if(_){g.issues?g.issues.push(r):g.issues=[r];continue}return yield*QD(new Kj(n,[r],l,p))}ay(h,t,m[t])}}}let x=mN(p?.concurrency);if(i){let e=CN(g,s,x);e&&(yield*e)}if(a&&!x)for(let e=0;e<a;e++){let t=c[e],n=t.is.parameter===oN?d:u,r=t.is.parameter===oN?Object.keys(m):_N(m,t.is.parameter,p);for(let e=0;e<r.length;e++){let i=n(g,r[e],t);if(!Cw(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(f){let e=qx();for(let t=0;t<a;t++){let n=c[t],r=_N(m,n.is.parameter,p);for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=f(g,e,x);t&&(yield*t)}if(g.issues)return yield*QD(new Kj(n,g.issues,l,p));if(p.propertyOrder===`original`){let e=(b??Reflect.ownKeys(m)).concat(r),t={};for(let n of e)Object.hasOwn(h,n)&&ay(t,n,h[n]);return t}return h})}_rebuild(t,n,r,i){let a=fP(this.propertySignatures,e=>{let n=t(e.type);return n===e.type?e:new vN(e.name,n)}),o=fP(this.indexSignatures,e=>{let r=n(e.parameter),i=t(e.type);return r===e.parameter&&i===e.type?e:new xN(r,i)});return a===this.propertySignatures&&o===this.indexSignatures&&r===this.checks&&i===this.encodingChecks?this:new e(a,o,this.annotations,r,void 0,this.context,i)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}},CN=KT()({onItem(e,t){if(!Object.hasOwn(e.input,t.name))return t.parser(jj,e.options);let n=e.input[t.name];return ay(e.out,t.name,n),t.parser(n,e.options)},step(e,t,n){if(n._tag===`Failure`)return hN(e,e.ast,t.name,n);if(n===Pj)return;let r=n[dy];if(r!==jj){ay(e.out,t.name,r);return}if(delete e.out[t.name],!xP(t.type)){let n=new Uj([t.name],new Wj(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return iD(new Kj(e.ast,[n],e.input,e.options))}}});function wN(e,t){return e?t?[...e,...t]:e:t}function TN(e,t,n){return new SN(Reflect.ownKeys(e).map(t=>new vN(t,e[t].ast)),[],n,t)}function EN(e){return e.ast}function DN(e,t=void 0){return new fN(!1,e.map(e=>e.ast),[],void 0,t)}function ON(e,t,n){return new LN(e.map(EN),t,void 0,n)}var kN=X_(e=>{for(;;){if(qM(e))return rN;let t=e.encoding;if(!t)return e.recur?.(kN,B_)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==B_))return rN;e=t[t.length-1].to}});function AN(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(AN)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function jN(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[Dj];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!xP(t)){if(UM(t))return[{key:e.name,literal:t.literal}];if(WM(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!xP(e)){if(UM(e))return[{key:t,literal:e.literal}];if(WM(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>jN(kN(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return jN(e.thunk())}}var MN=new WeakMap,NN=Object.freeze([]);function PN(e){let t=MN.get(e);if(t)return t;let n,r=0,i,a,o=!0;for(let t=0;t<e.length;t++){let s=e[t],c=kN(s);if(lne(c))continue;if(o){if(UM(c)||WM(c)){a??=new Map;let e=UM(c)?c.literal:c.symbol,t=a.get(e);t||a.set(e,t=[]),t.push(s)}else o=!1}let l=jN(c);if(l.length){n??=new Map,r++;for(let{key:e,literal:r}of l){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=AN(c);for(let n of e)(i[n]??=[]).push(t)}}if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??NN;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=i;for(let[t,n]of i)a.set(t,Object.freeze(Array.from(n,t=>e[t])));t=(t,n)=>{if(ov(t)){let i=Object.hasOwn(t,r)?t[r]:void 0;if(i!==void 0)return a.get(i)??NN;if(n)return e}return NN}}else if(n){let a;for(let e of n)(!a||e[1][0].size>a[1][0].size)&&e[1][1].size===r&&(a=e);t=(t,r)=>{let o=i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??NN;if(!ov(t))return o.map(t=>e[t]);let s=new Set(o),c;if(a){let[n,[i]]=a,l=Object.hasOwn(t,n),u=l?t[n]:void 0;if(l&&(!r||u!==void 0)){let t=i.get(u);if(!t)return o.map(t=>e[t]);for(let e of t)s.add(e);c=n}}if(c===void 0)for(let[e,[i,a]]of n){let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);if(e)for(let t of e)s.add(t)}else if(r)for(let e of a)s.add(e)}for(let[e,[i,a]]of n){if(e===c)continue;let n=Object.hasOwn(t,e),o=n?t[e]:void 0;if(n&&(!r||o!==void 0)){let e=i.get(o);for(let t of s)a.has(t)&&!e?.has(t)&&s.delete(t)}}return Array.from(s).sort((e,t)=>e-t).map(t=>e[t])}}else t=t=>(i?.[t===null?`null`:Array.isArray(t)?`array`:typeof t]??NN).map(t=>e[t]).filter(FN(t));return MN.set(e,t),t}function FN(e){return t=>{let n=kN(t);return n._tag===`Literal`?n.literal===e:n._tag!==`UniqueSymbol`||n.symbol===e}}function IN(e,t,n=!1){return PN(t)(e,n)}var LN=class e extends QM{_tag=`Union`;types;mode;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.mode=t,this.encodingChecks=o}getParser(e,t){let n=this;return(r,i)=>{if(r===jj)return Nj;let a=IN(r,n.types,t!==void 0);if(a.length===1){let t=e(a[0])(r,i);return t._tag===`Success`?t:Cw(t)?RN(n,t.cause,r,i):uO(t,e=>RN(n,e,r,i))}let o={ast:n,compile:e,input:r,out:void 0,successes:n.mode===`oneOf`?[]:void 0,issues:void 0,options:i},s=mN(i?.concurrency),c=zN(o,a,s?{...s,orderedStep:!0}:void 0);return c?HO(c,e=>o.out===Pj?V(r):o.out?o.out:QD(new Zj(n,o.issues??[],r,i))):o.out?o.out:QD(new Zj(n,o.issues??[],r,i))}}_rebuild(t,n,r){let i=fP(this.types,t);return i===this.types&&n===this.checks&&r===this.encodingChecks?this:new e(i,this.mode,this.annotations,n,void 0,this.context,r)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=TP(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(UM);if(t.length>0)return`${VN(n.isMutable)}[ ${t.map(t=>e(t)+HN(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>UM(e.type));if(t.length>0)return`{ ${t.map(t=>`${VN(t.type.context?.isMutable)}${Qv(t.name)}${HN(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function RN(e,t,n,r){let i=fM(t);return i?iD(new Zj(e,[i],n,r)):rD(t)}var zN=KT()({onItem(e,t){return e.compile(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=fM(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(t),iD(new Qj(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(t);else return aD}}}),BN=new LN([new iN(`Infinity`),new iN(`-Infinity`),new iN(`NaN`)],`anyOf`);function VN(e){return e?``:`readonly `}function HN(e){return e?`?`:``}function UN(e){let t=!1,n;return()=>t?n:(n=e(),t=!0,n)}var WN=class e extends QM{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i),this.thunk=UN(e)}getParser(e){let t;return(n,r)=>(t??=e(this.thunk()))(n,r)}recur(t){return new e(()=>t(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},GN=class e extends z_{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(t){return new e(this.run,{...this.annotations,...t},this.aborted)}abort(){return new e(this.run,this.annotations,!0)}and(e,t){return new KN([this,e],t)}},KN=class e extends z_{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(t){return new e(this.checks,{...this.annotations,...t})}and(t,n){return new e([this,t],n)}};function qN(e,t,n=!1){return new GN((t,n,r)=>tM(n,e(t,n,r),t,r),t,n)}function JN(e){return qN(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitrary:{constraint:{noInfinity:!0,noNaN:!0}},...e})}var YN=iP(uN,[JN()]);function XN(e,t){let n=e.source,r=new globalThis.RegExp(n,e.flags);return qN(e=>(r.lastIndex=0,r.test(e)),{expected:`a string matching the RegExp ${n}`,representation:{id:`effect/schema/isPattern`,payload:{source:n,flags:e.flags}},toJsonSchema:()=>({pattern:n}),arbitrary:{constraint:{patterns:[e.source]}},...t})}function ZN(e,t){let n=Object.getOwnPropertyDescriptors(e);return t(n),Object.create(Object.getPrototypeOf(e),n)}var QN=new WeakMap;function $N(e){return QN.get(e)??e}function eP(e,t){return e.encoding===t?e:ZN(e,e=>{e.encoding.value=t})}function tP(e,t){if(e.context===t)return e;let n=$N(e);if(n.context===t)return n;let r=ZN(e,e=>{e.context.value=t});return QN.set(r,n),r}function nP(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return rP(e,Ux(e.checks.slice(0,-1),n.annotate(t)))}return ZN(e,e=>{e.annotations.value={...e.annotations.value,...t}})}function rP(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:ZN(e,e=>{e.checks.value=t})}function iP(e,t){return rP(e,wN(e.checks,t))}function aP(e,t){let n=t(e.to);return n===e.to?e:new JM(n,e.transformation)}function oP(e,t){let n=e,r=n[n.length-1],i=aP(r,t);return i===r?e:Ux(e.slice(0,e.length-1),i)}function sP(e){return t=>t.encoding?eP(t,oP(t.encoding,e)):t}function cP(e,t){return sP(e=>tP(e,t))(e)}function lP(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:eP(r,oP(r.encoding,n))}return e(r)}return X_(n)}function uP(e,t,n){let r=new JM(e,t);return eP(n,n.encoding?[...n.encoding,r]:[r])}function dP(e,t){let n=kj(e);return nP(e,{brands:n?[...n,t]:[t]})}function fP(e,t){let n=!1,r=Array(e.length);for(let i=0;i<e.length;i++){let a=e[i],o=t(a);o!==a&&(n=!0),r[i]=o}return n?r:e}function pP(e,t){return tP(e,e.context?new XM(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new XM(!1,!1,void 0,t))}var mP=X_(e=>hP(tP(e,e.context?e.context.isOptional===!1?new XM(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new XM(!0,!1)))),hP=sP(mP),gP=Y_(e=>mP(new LN([e,nN],`anyOf`)));function _P(e,t){let n=new JM(rN,new NM(CM(t),_M()));return tP(e,e.context?new XM(e.context.isOptional,e.context.isMutable,n,e.context.annotations):new XM(!1,!1,n))}function vP(e,t,n){return uP(e,n,t)}function yP(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:tv(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function bP(e,t){let{literals:n,parameters:r}=yP(e);return new SN(n.map(e=>new vN(e,t)),r.map(e=>new xN(e,t)))}function xP(e){return e.context?.isOptional??!1}function SP(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(SP)}function CP(e){function t(e){return SP(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return Gx(n)?n:void 0}var wP=X_(e=>{if(e.encoding)return wP(eP(e,void 0));let t=e,n=t.recur?.(wP)??t,r=n.encodingChecks;if(r){let t=n===e?r:une(n)||GM(n)||VM(n)&&n.typeParameters.length>0?CP(r):void 0;return ZN(n,e=>{e.encodingChecks.value=void 0,e.checks.value=wN(n.checks,t)})}return n}),TP=X_(e=>wP(DP(e)));function EP(e,t){let n=t,r=n.length,i=n[r-1],a=[new JM(DP(eP(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new JM(DP(n[e-1].to),n[e].transformation.flip()));let o=DP(i.to);return o.encoding?eP(o,[...o.encoding,...a]):eP(o,a)}var DP=Y_(e=>{if(e.encoding)return EP(e,e.encoding);let t=e;return t.flip?.(DP)??t.recur?.(DP)??t});function OP(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(OP);default:return!1}}function kP(e,t){let n=Mj(t);return(r,i)=>r===jj?Nj:r===t?n:QD(new qj(e,r,i))}function AP(e,t){return(n,r)=>n===jj?Nj:t(n)?Pj:QD(new qj(e,n,r))}var jP=lP(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(jP)}}),MP=lP(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(MP)}}),NP=new globalThis.RegExp(`^${gN}$`),PP=new globalThis.RegExp(`^(?:${gN}|Infinity|-Infinity|NaN)$`);function FP(e){return XN(NP,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:NP.source}),...e})}var IP=iP(oN,[FP()]),LP=new JM(IP,LM),RP=new JM(new LN([IP,BN],`anyOf`),LM);function zP(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=zP(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new Vj(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function BP(e){if(!VM(e))return;let t=e.annotations?.[Oj];return nv(t)?t(e.typeParameters):void 0}var VP=Tj;function HP(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function UP(e){return e===void 0||typeof e==`string`}function WP(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function GP(e){return WP(e,HP)}var KP=new $M([],()=>(e,t,n)=>GP(e)?Pj:QD(new qj(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>XP,toArbitrary:()=>e=>e.jsonValue()}),qP=new JM(KP,IM()),JP=new JM(new LN([new fN(!1,[],[KP]),new SN([],[new xN(oN,KP)])],`anyOf`),IM());function YP(e){return WP(e,UP)}var XP=new JM(new $M([],()=>(e,t,n)=>YP(e)?Pj:QD(new qj(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),IM());function ZP(e){let t=uF(hF,wP(e.ast));return(e,n)=>t(e,n?.disableChecks?n?.parseOptions?{...n.parseOptions,disableChecks:!0}:{disableChecks:!0}:n?.parseOptions)}function QP(e){let t=ZP(e);return(e,n)=>{let r=IO(t(e,n));return oD(r)?Vb(r.value):(pM(r.cause,`Option adapter can only return none for schema issues`),Bb())}}function $P(e){let t=ZP(e);return(e,n)=>{let r=IO(t(e,n));if(oD(r))return r.value;let i=pM(r.cause,`Constructor adapter can only throw schema issues`);throw Error(`Schema validation failed`,{cause:i})}}function eF(e){return tF(e.ast)}function tF(e){let t=dF(lF(wP(e)));return e=>{let n=t(e,YM);return oD(n)?!0:(pM(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}function nF(e,t){let n=lF(e.ast);return t===void 0?n:(e,r)=>n(e,sF(t,r))}function rF(e,t){return fF(nF(e,t))}var iF=rF;function aF(e,t){return pF(nF(e,t))}function oF(e,t){let n=lF(DP(e.ast));return t===void 0?n:(e,r)=>n(e,sF(t,r))}var sF=(e,t)=>t?{...e,...t}:e,cF=e=>e===jj?QD(new Jj):V(e);function lF(e){return uF(mF,e)}function uF(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??YM);return a===Pj?V(r):Cw(a)?a[dy]===jj?cF(jj):a:HO(a,cF)}}function dF(e){return(t,n)=>IO(e(t,n))}function fF(e){let t=dF(e);return(e,n)=>{let r=t(e,n);return oD(r)?Vb(r.value):(pM(r.cause,`Option adapter can only return none for schema issues`),Bb())}}function pF(e){let t=dF(e);return(e,n)=>{let r=t(e,n);return oD(r)?Nx(r.value):Px(pM(r.cause,`Result adapter can only return schema issues`))}}var mF=Y_(e=>bF(e,mF)),hF=Y_(e=>bF(e,hF,_F)),gF=Y_(e=>bF(e,hF,_F,e.context?.constructorDefault));function _F(e){return e.context?.constructorDefault?gF(e):hF(e)}function vF(e,t,n,r){let i;if(Cw(e)&&e._tag===`Success`){let a=Fj(e===Pj?t:e[dy]);i=n._tag===`Transformation`?n.decode.run(a,r):n.decode(Mj(a),r)}else i=n._tag===`Transformation`?HO(e,e=>n.decode.run(Fj(e),r)):n.decode(zO(e,Fj),r);return Cw(i)&&i._tag===`Success`?Ij(i[dy]):HO(i,Ij)}function yF(e,t){let n;return(r,i)=>r===jj?Nj:e.isConstructed(r)?Pj:vF((n??=t(e.link.to))(r,i),r,e.link.transformation,i)}function bF(e,t,n,r){let i=n?BP(e):void 0,a=i?yF(i,t):e.getParser(t,n),o=e.checks,s=r?e.encoding?[...e.encoding,r]:[r]:e.encoding,c=e.encodingChecks,l=(o?o[o.length-1].annotations:e.annotations)?.parseOptions;if(!s&&!o&&!c)return l?(e,t)=>a(e,sF(t,l)):a;let u,d=(t,n)=>{let r=a(t,n);if(c&&!n.disableChecks){if(Cw(r)){if(r._tag===`Success`){let i=r===Pj?t:r[dy];if(t!==jj&&i!==jj){let i=zP(c,t,void 0,e,n);i&&(r=QD(new Kj(e,i,t,n)))}}}else r=rO(r,r=>{if(t!==jj&&r!==jj){let r=zP(c,t,void 0,e,n);if(r)return QD(new Kj(e,r,t,n))}return V(r)})}if(o&&!n.disableChecks){if(Cw(r)){if(r._tag===`Success`){let i=r===Pj?t:r[dy];if(i===jj)return r;let a=zP(o,i,void 0,e,n);a&&(r=QD(new Kj(e,a,i,n)))}}else r=rO(r,t=>{if(t!==jj){let r=zP(o,t,void 0,e,n);if(r)return QD(new Kj(e,r,t,n))}return V(t)})}return r};return s?(n,r)=>{l&&(r=sF(r,l));let i=u??=s.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=s.length-1;e>=0;e--)if(o=vF(o,a,s[e].transformation,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[dy],o=t(a,r)):o=HO(o,e=>{let n=t(e,r);return n===Pj?Mj(e):n})}if(o._tag===`Success`){let e=o[dy],t=d(e,r);return t===Pj?o:t}return o=uO(o,t=>eO(()=>WE(t,t=>new Hj(e,t,n,r)))),HO(o,e=>{let t=d(e,r);return t===Pj?Mj(e):t})}:l?(e,t)=>d(e,sF(t,l)):d}var xF=`~effect/Schema/Schema`,SF={[xF]:xF,pipe(){return L_(this,arguments)},annotate(e){return this.rebuild(nP(this.ast,e))},annotateKey(e){return this.rebuild(pP(this.ast,e))},check(...e){return this.rebuild(iP(this.ast,e))}};function CF(e,t){function n(){}let r=Object.defineProperties(Object.setPrototypeOf(n,SF),Object.getOwnPropertyDescriptors({...t}));return r.ast=e,r.rebuild=e=>CF(e,t),r.makeEffect=ZP(r),r.make=$P(r),r.makeOption=QP(r),r}var wF=e=>e,TF=B(2,(e,t)=>e===void 0?void 0:t(e)),EF=new WeakMap,DF=`~effect/data/Redacted`,OF=e=>sv(e,DF),kF=(e,t)=>{let n=Object.create(AF);return t?.label&&(n.label=t.label),EF.set(n,e),n},AF={[DF]:{_A:e=>e},label:void 0,..._y,toJSON(){return this.toString()},toString(){return`<redacted${$_(this.label)?`:`+this.label:``}>`},[uv](){return dv(EF.get(this))},[Ov](e){return OF(e)&&kv(EF.get(this),EF.get(e))}},jF=xF;function MF(){return(e,t,n)=>QF(new $M(e.map(EN),e=>t(e.map(e=>QF(e))),n))}function NF(e,t){return MF()([],()=>(t,n,r)=>e(t)?V(t):QD(new qj(n,t,r)),t)}var PF=`~effect/SchemaError/SchemaError`,FF=class extends ID(`SchemaError`){[PF]=PF;constructor(e){super({issue:e})}get message(){return lM(this.issue)}toString(){return`SchemaError(${this.message})`}};function IF(e){return sv(e,PF)&&e[PF]===PF}var LF=eF;function RF(e,t){let n=nF(e,t);return(e,t)=>zF(n(e,t))}function zF(e){return uO(e,e=>eO(()=>WE(e,e=>new FF(e))))}var BF=RF;function VF(e,t){let n;for(let r of e.reasons){if(!IE(r)||!IF(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function HF(e){return NO(e).then(e=>{if(oD(e))return e.value;throw VF(e.cause,`Promise adapter can only reject schema errors`)})}function UF(e){let t=IO(e);if(oD(t))return t.value;throw VF(t.cause,`Sync adapter can only throw schema errors`)}var WF=iF;function GF(e,t){let n=aF(e,t);return(e,t)=>nte(n(e,t),e=>new FF(e))}function KF(e,t){let n=RF(e,t);return(e,t)=>HF(n(e,t))}function qF(e,t){let n=RF(e,t);return(e,t)=>UF(n(e,t))}var JF=qF;function YF(e,t){let n=oF(e,t);return(e,t)=>zF(n(e,t))}function XF(e,t){let n=YF(e,t);return(e,t)=>UF(n(e,t))}var ZF=XF,QF=CF;function $F(e){return sv(e,jF)&&e[jF]===jF}var eI=wF(e=>QF(mP(e.ast),{schema:e})),H=wF(e=>{let t=yI(e);return QF(gP(e.ast),{schema:t})}),tI=wF(e=>QF(wP(e.ast),{schema:e})),nI=wF(e=>QF(TP(e.ast),{schema:e}));function rI(e){let t=QF(new iN(e),{literal:e,transform(n){return t.pipe(CI(rI(n),{decode:yM(()=>n),encode:yM(()=>e)}))}});return t}var iI=QF(pne),aI=QF(rN),oI=QF(eN),sI=QF(nN),U=QF(oN),W=QF(uN),cI=QF(dN),lI=QF(fne);function uI(e,t){return QF(e,{fields:t,mapFields(e,t){let n=e(this.fields);return uI(TN(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function G(e){return uI(TN(e,void 0),e)}function dI(e,t){return QF(bP(e.ast,t.ast),{key:e,value:t})}function fI(e,t){return QF(e,{elements:t,mapElements(e,t){let n=e(this.elements);return fI(DN(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function pI(e){return fI(DN(e),e)}var K=wF(e=>QF(new fN(!1,[],[e.ast]),{value:e})),mI=wF(e=>QF(new fN(!1,[e.ast],[e.ast]),{value:e}));function hI(e,t){return QF(e,{members:t,mapMembers(e,t){let n=e(this.members);return hI(ON(n,this.ast.mode,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function gI(e,t){return hI(ON(e,t?.mode??`anyOf`,void 0),e)}function _I(e){let t=e.map(rI);return QF(ON(t,`anyOf`,void 0),{literals:e,members:t,mapMembers(e){return gI(e(this.members))},pick(e){return _I(e)},transform(e){return gI(t.map((t,n)=>t.transform(e[n])))}})}var vI=wF(e=>gI([e,oI])),yI=wF(e=>gI([e,sI]));function bI(e){return QF(new WN(()=>e().ast))}function xI(...e){return t=>t.check(...e)}function SI(e){return t=>QF(dP(t.ast,e),{schema:t,identifier:e})}function CI(e,t){return n=>QF(vP(n.ast,e.ast,t?PM(t):IM()),{from:n,to:e})}function wI(e,t){return n=>t?CI(n,t)(e):CI(n)(e)}function TI(e){return t=>QF(_P(t.ast,e),{schema:t})}function EI(e){return uO(e,e=>eO(()=>WE(e,e=>e.issue)))}function DI(e,t){let n=t?.encodingStrategy===`omit`?SM():_M();return t=>eI(nI(t)).pipe(CI(t,{decode:CM(EI(e)),encode:n}))}function OI(e,t){return n=>tI(n).pipe(DI(e,t),wI(eI(n)))}function kI(e,t){let n=t?.encodingStrategy===`omit`?SM():_M();return t=>H(nI(t)).pipe(CI(t,{decode:CM(EI(e)),encode:n}))}function AI(e,t){return n=>tI(n).pipe(kI(e,t),wI(H(n)))}function jI(e){return rI(e).pipe(TI(V(e)))}function MI(e,t){return G({_tag:jI(e),...t})}function NI(e){return t=>{let n={},r=[],i=new Set,a={};return o(t),Object.assign(t,{cases:n,discriminants:r,isAnyOf:t=>n=>t.includes(n[e]),guards:a,match:s});function o(t){let s=t.ast;if(KM(s)&&`members`in t&&globalThis.Array.isArray(t.members)&&t.members.every($F))return t.members.forEach(o);let c=jN(s);if(c.length>0){let o=c.find(t=>t.key===e)?.literal;if(tv(o)){let e=typeof o==`number`?globalThis.String(o):o;if(i.has(e))throw new globalThis.Error(`Duplicate discriminant: ${globalThis.String(o)}`);i.add(e),r.push(o),ay(n,o,t),ay(a,o,LF(tI(t)));return}}throw new globalThis.Error(`No literal or unique symbol found`)}function s(){if(arguments.length===1){let t=arguments[0];return function(n){let r=n[e];return(Object.hasOwn(t,r)?t[r]:void 0)(n)}}let t=arguments[0],n=arguments[1],r=t[e];return(Object.hasOwn(n,r)?n[r]:void 0)(t)}}}function PI(e){let t={},n=[];for(let r of Object.keys(e)){let i=MI(r,e[r]);ay(t,r,i),n.push(i)}let r=gI(n),{guards:i,isAnyOf:a,match:o}=NI(`_tag`)(r);return QF(r.ast,{cases:t,isAnyOf:a,guards:i,match:o})}function FI(e,t){return NF(t=>t instanceof e,t)}function II(){return(e,t)=>new JM(e.ast,PM(t))}var LI=qN,RI=`^\\S[\\s\\S]*\\S$|^\\S$|^$`;function zI(e){let t=new globalThis.RegExp(RI);return LI(e=>e.trim()===e,{expected:`a string with no leading or trailing whitespace`,representation:{id:`effect/schema/isTrimmed`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isTrimmed()`}),arbitrary:{constraint:{patterns:[RI]}},...e})}function BI(e,t){let n=e.source,r=e.flags,i=r===``?`new RegExp(${Zv(n)})`:`new RegExp(${Zv(n)}, ${Zv(r)})`;return XN(e,{toCode:()=>({runtime:`Schema.isPattern(${i})`}),...t})}var VI=e=>e?new globalThis.RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|[fF]{8}-[fF]{4}-[fF]{4}-[fF]{4}-[fF]{12})$/;function HI(e,t){let n=VI(e);return BI(n,{expected:e?`a UUID v${e}`:`a UUID`,representation:{id:`effect/schema/isUUID`,payload:{version:e??null}},toJsonSchema:()=>({pattern:n.source,format:`uuid`}),toCode:()=>({runtime:e===void 0?`Schema.isUUID()`:`Schema.isUUID(${e})`}),...t})}var UI=QF(YN);function WI(e){let t=Lb(e.order),n=e.formatter??Zv;return(r,i)=>LI(e=>t(e,r),{expected:`a value greater than ${n(r)}`,arbitrary:{constraint:{ordered:{order:e.order,minimum:r,exclusiveMinimum:!0}}},...e.annotate?.(r),...i})}function GI(e){let t=zb(e.order),n=e.formatter??Zv;return(r,i)=>LI(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitrary:{constraint:{ordered:{order:e.order,minimum:r}}},...e.annotate?.(r),...i})}function KI(e){let t=zb(e.order),n=Lb(e.order),r=Rb(e.order),i=Ib(e.order),a=e.formatter??Zv;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return LI(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitrary:{constraint:{ordered:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}}}},...e.annotate?.(o),...s})}}function qI(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${Zv(e)}`);return e}var JI=WI({order:Nb,annotate:e=>({representation:{id:`effect/schema/isGreaterThan`,payload:{exclusiveMinimum:qI(e)}},toJsonSchema:()=>({exclusiveMinimum:e}),toCode:()=>({runtime:`Schema.isGreaterThan(${Zv(e)})`})})}),YI=GI({order:Nb,annotate:e=>({representation:{id:`effect/schema/isGreaterThanOrEqualTo`,payload:{minimum:qI(e)}},toJsonSchema:()=>({minimum:e}),toCode:()=>({runtime:`Schema.isGreaterThanOrEqualTo(${Zv(e)})`})})}),XI=KI({order:Nb,annotate:e=>{let t=e.exclusiveMinimum?!0:void 0,n=e.exclusiveMaximum?!0:void 0;return{representation:{id:`effect/schema/isBetween`,payload:{minimum:qI(e.minimum),maximum:qI(e.maximum),...t&&{exclusiveMinimum:t},...n&&{exclusiveMaximum:n}}},toJsonSchema:()=>({[t?`exclusiveMinimum`:`minimum`]:e.minimum,[n?`exclusiveMaximum`:`maximum`]:e.maximum}),toCode:()=>({runtime:`Schema.isBetween({ minimum: ${Zv(e.minimum)}, maximum: ${Zv(e.maximum)}, exclusiveMinimum: ${Zv(t)}, exclusiveMaximum: ${Zv(n)} })`})}}});function ZI(e){return LI(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>({type:`integer`}),toCode:()=>({runtime:`Schema.isInt()`}),arbitrary:{constraint:{integer:!0}},...e})}var QI=W.check(ZI());function $I(e,t){return e=Math.max(0,Math.floor(e)),LI(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:t})=>t===`array`?{minItems:e}:{minLength:e},toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[Ej]:!0,arbitrary:{constraint:{minLength:e}},...t})}function eL(e){return $I(1,e)}function tL(e,t){return e=Math.max(0,Math.floor(e)),LI(t=>t.length<=e,{expected:`a value with a length of at most ${e}`,representation:{id:`effect/schema/isMaxLength`,payload:{maxLength:e}},toJsonSchema:({type:t})=>t===`array`?{maxItems:e}:{maxLength:e},toCode:()=>({runtime:`Schema.isMaxLength(${e})`}),[Ej]:!0,arbitrary:{constraint:{maxLength:e}},...t})}function nL(e){return LI(e=>Zx(e).length===e.length,{expected:`an array with unique items`,representation:{id:`effect/schema/isUnique`,payload:null},toJsonSchema:()=>({uniqueItems:!0}),toCode:()=>({runtime:`Schema.isUnique()`}),arbitrary:{constraint:{unique:!0}},...e})}function rL(e){return QF(MF()([e],([e])=>(t,n,r)=>Hb(t)?Ub(t)?GD:VO(nF(e)(t.value,r),{onSuccess:Vb,onFailure:e=>Yj(n,`value`,e,t,r)}):QD(new qj(n,t,r)),{representation:{id:`effect/schema/Option`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.Option(${e[0].runtime})`,Type:`Option.Option<${e[0].Type}>`,importDeclarations:[`import * as Option from "effect/Option"`]}),expected:`Option`,toCodec:([e])=>II()(gI([G({_tag:rI(`Some`),value:e}),G({_tag:rI(`None`)})]),FM({decode:e=>e._tag===`None`?Bb():Vb(e.value),encode:e=>Wb(e)?{_tag:`Some`,value:e.value}:{_tag:`None`}})),toArbitrary:([e])=>(t,n)=>{let r=t.constant(Bb());return gL(t,n,r,t.oneof(r,e.arbitrary.map(Vb)))},toEquivalence:([e])=>nx(e),toFormatter:([e])=>Gb({onNone:()=>`none()`,onSome:t=>`some(${e(t)})`})}).ast,{value:e})}function iL(e,t){return QF(MF()([e,t],([e,t])=>(n,r,i)=>{if(!FE(n))return QD(new qj(r,n,i));switch(n._tag){case`Fail`:return VO(nF(e)(n.error,i),{onSuccess:VE,onFailure:e=>Yj(r,`error`,e,n,i)});case`Die`:return VO(nF(t)(n.defect,i),{onSuccess:HE,onFailure:e=>Yj(r,`defect`,e,n,i)});case`Interrupt`:return V(n)}},{representation:{id:`effect/schema/CauseReason`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.CauseReason(${e[0].runtime}, ${e[1].runtime})`,Type:`Cause.Failure<${e[0].Type}, ${e[1].Type}>`,importDeclarations:[`import * as Cause from "effect/Cause"`]}),expected:`Cause.Failure`,toCodec:([e,t])=>II()(gI([G({_tag:rI(`Fail`),error:e}),G({_tag:rI(`Die`),defect:t}),G({_tag:rI(`Interrupt`),fiberId:yI(UI)})]),FM({decode:e=>{switch(e._tag){case`Fail`:return VE(e.error);case`Die`:return HE(e.defect);case`Interrupt`:return UE(e.fiberId)}},encode:B_})),toArbitrary:([e,t])=>aL(e,t),toEquivalence:([e,t])=>oL(e,t),toFormatter:([e,t])=>sL(e,t)}).ast,{error:e,defect:t})}function aL(e,t){return(n,r)=>{let i=n.constant(UE());return gL(n,r,i,n.oneof(i,n.integer({min:1}).map(UE),e.arbitrary.map(e=>VE(e)),t.arbitrary.map(e=>HE(e))))}}function oL(e,t){return(n,r)=>{if(n._tag!==r._tag)return!1;switch(n._tag){case`Fail`:return e(n.error,r.error);case`Die`:return t(n.defect,r.defect);case`Interrupt`:return n.fiberId===r.fiberId}}}function sL(e,t){return n=>{switch(n._tag){case`Fail`:return`Fail(${e(n.error)})`;case`Die`:return`Die(${t(n.defect)})`;case`Interrupt`:return`Interrupt`}}}function cL(e,t){return QF(MF()([e,t],([e,t])=>{let n=K(iL(e,t));return(e,t,r)=>PE(e)?VO(nF(n)(e.reasons,r),{onSuccess:LE,onFailure:n=>Yj(t,`failures`,n,e,r)}):QD(new qj(t,e,r))},{representation:{id:`effect/schema/Cause`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.Cause(${e[0].runtime}, ${e[1].runtime})`,Type:`Cause.Cause<${e[0].Type}, ${e[1].Type}>`,importDeclarations:[`import * as Cause from "effect/Cause"`]}),expected:`Cause`,toCodec:([e,t])=>II()(K(iL(e,t)),FM({decode:LE,encode:({reasons:e})=>e})),toArbitrary:([e,t])=>lL(e,t),toEquivalence:([e,t])=>uL(e,t),toFormatter:([e,t])=>dL(e,t)}).ast,{error:e,defect:t})}function lL(e,t){return(n,r)=>{let i=aL(e,t)(n,r);return gL(n,r,n.constant(RE),n.array(i.arbitrary).map(LE))}}function uL(e,t){let n=fb(oL(e,t));return(e,t)=>n(e.reasons,t.reasons)}function dL(e,t){let n=sL(e,t);return e=>`Cause([${e.reasons.map(n).join(`, `)}])`}var fL=e=>e?.includeStack===!0|(e?.excludeCause===!0?2:0),pL=e=>{switch(e){case 0:return;case 1:return{includeStack:!0};case 2:return{excludeCause:!0};case 3:return{includeStack:!0,excludeCause:!0}}},mL=[];function hL(e){let t=fL(e),n=mL[t];if(n!==void 0)return n;let r=nR.pipe(CI(aI,ane(pL(t))));return mL[t]=r,r}function gL(e,t,n,r){return{arbitrary:n===void 0||t.recursion===void 0?r:e.oneof(t.recursion,n,r),terminal:n}}function _L(e,t,n,r){return r===void 0?e.array(t,n):e.uniqueArray(t,{...n,comparator:r})}function vL(e,t,n,r,i,a){let o=t.constraint,s=o===void 0||o.minLength===void 0&&o.maxLength===void 0?void 0:{...o.minLength===void 0?{}:{minLength:o.minLength},...o.maxLength===void 0?{}:{maxLength:o.maxLength}};if(s?.minLength!==void 0&&s.maxLength!==void 0&&s.minLength>s.maxLength)throw new globalThis.Error(`Unable to derive an arbitrary for size constraints`);let c=s?.minLength??0,l=gL(e,t,c===0?e.constant([]):r===void 0?void 0:_L(e,r,{...s,maxLength:c},a),_L(e,n,s,a));return{arbitrary:l.arbitrary.map(i),terminal:l.terminal?.map(i)}}function yL(e){return QF(MF()([e],([e])=>{let t=K(e);return(e,n,r)=>YO(e)?VO(nF(t)(Vx(e),r),{onSuccess:$O,onFailure:t=>Yj(n,`values`,t,e,r)}):QD(new qj(n,e,r))},{representation:{id:`effect/schema/Chunk`,payload:null},toCode:({typeParameters:e})=>({runtime:`Schema.Chunk(${e[0].runtime})`,Type:`Chunk.Chunk<${e[0].Type}>`}),expected:`Chunk`,toCodec:([e])=>II()(K(e),FM({decode:$O,encode:Vx})),toArbitrary:([e])=>(t,n)=>vL(t,n,e.arbitrary,e.terminal,$O),toEquivalence:([e])=>qO(e),toFormatter:([e])=>t=>{let n=ik(t);return n===0?`Chunk(0) {}`:`Chunk(${n}) { ${globalThis.Array.from(t).sort().map(t=>`${e(t)}`).join(`, `)} }`}}).ast,{value:e})}globalThis.RegExp,globalThis.URL;function bL(e,t,n){let r={...t};if(e?.minimum!==void 0){let t=n===void 0?e.minimum:n(e.minimum),i=e.exclusiveMinimum?new globalThis.Date(t.getTime()+1):t;(r.min===void 0||i.getTime()>r.min.getTime())&&(r.min=i)}if(e?.maximum!==void 0){let t=n===void 0?e.maximum:n(e.maximum),i=e.exclusiveMaximum?new globalThis.Date(t.getTime()-1):t;(r.max===void 0||i.getTime()<r.max.getTime())&&(r.max=i)}return r}var xL=U.annotate({expected:`a string that will be decoded as a Date`}),SL=NF(e=>e instanceof globalThis.Date&&!globalThis.Number.isNaN(e.getTime()),{representation:{id:`effect/schema/Date`,payload:null},toCode:()=>({runtime:`Schema.Date`,Type:`globalThis.Date`}),expected:`a valid Date`,toCodecJson:()=>II()(xL,RM),toArbitrary:()=>(e,t)=>e.date(bL(t?.constraint?.ordered?.order===Fb?t.constraint.ordered:void 0,{noInvalidDate:!0}))}),CL=xL.pipe(CI(SL,RM)),wL=U.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function TL(e,t){return wL.pipe(CI(e,sne(t)))}var EL=TL(aI);globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var DL=U.annotate({expected:`a string that will be decoded as a number`}).pipe(CI(W,LM)),OL=U.check(zI()),kL=U.annotate({expected:`a string that will be decoded as a trimmed string`}).pipe(CI(OL,Qte())),AL=U.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),jL=FI(globalThis.Uint8Array,{representation:{id:`effect/schema/Uint8Array`,payload:null},toCode:()=>({runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`}),expected:`Uint8Array`,toCodecJson:()=>II()(AL,one),toArbitrary:()=>e=>e.uint8Array()}),ML=globalThis.Symbol.for(`immer-draftable`),NL={};function PL(e,t,n,r,i){let a=LL(n,t,r),o=IL(t),s=class extends e{constructor(...[e,t]){let r=t?.[`~payload`],i=r?.token===NL?r.value:n.make(e??{},t);super(i,{...t,disableChecks:!0,"~payload":{token:NL,value:i}})}static[jF]=jF;get[o](){return o}static[ML]=!0;static identifier=t;static fields=n.fields;static get ast(){return a(this).ast}static pipe(){return L_(this,arguments)}static rebuild(e){return a(this).rebuild(e)}static make(e,t){return new this(e,t)}static makeOption(e,t){return QP(a(this))(e??{},t)}static makeEffect(e,t){return a(this).makeEffect(e??{},t)}static annotate(e){return this.rebuild(nP(this.ast,e))}static annotateKey(e){return this.rebuild(pP(this.ast,e))}static check(...e){return this.rebuild(iP(this.ast,e))}static extend(e){return(t,r)=>{let a=RL(t)?t:G(t),o={...n.fields,...a.fields},s=TN(o,n.ast.checks,{identifier:e});return PL(this,e,uI(iP(s,a.ast.checks),o),r,i)}}static mapFields(e,t){return n.mapFields(e,t)}};return i!==void 0&&Object.assign(s.prototype,i(t)),s}function FL(e){return new NM(yM(t=>new e(t,{"~payload":{token:NL,value:t}})),_M())}function IL(e){return`~effect/Schema/Class/${e}`}function LL(e,t,n){let r;return i=>{if(r!==void 0)return r;let a=IL(t),o=e=>e instanceof i||sv(e,a),s=FL(i);return r=CI(QF(new $M([e.ast],()=>(e,t,n)=>o(e)?V(e):QD(new qj(t,e,n)),{identifier:t,[Oj]:([e])=>({isConstructed:o,link:new JM(e,s)}),toCodec:([e])=>new JM(e.ast,s),toArbitrary:([e])=>()=>({arbitrary:e.arbitrary.map(e=>new i(e)),terminal:e.terminal?.map(e=>new i(e))}),toFormatter:([e])=>t=>`${i.identifier}(${e(t)})`,[Dj]:jN(e.ast),...n})),s)(e)}}function RL(e){return $F(e)}var zL=e=>(t,n)=>PL(FD,e,RL(t)?t:G(t),n,e=>({toString(){return`${e}(${Zv({...this})})`}})),BL=e=>(t,n)=>PL(Zy,e,RL(t)?t:G(t),n,e=>({name:e})),VL=e=>(t,n,r)=>{let i=RL(n)?n.mapFields(e=>({_tag:jI(t),...e}),{unsafePreserveChecks:!0}):MI(t,n);return BL(e??t)(i,r)};function HL(e){return QF(UL(e.ast),{schema:e})}var UL=lP(e=>{let t=JL(e,UL),n=e.context;return t===e||n===void 0?t:cP(t,WL(n))});function WL(e){return e.constructorDefault===void 0?e:new XM(e.isOptional,e.isMutable,void 0,e.annotations)}function GL(e){if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e})}function KL(e){return t=>{let n=new Map;for(let e=0;e<t.length;e++)n.set(TP(t[e]),e);let r=[...t].sort((t,r)=>{t=TP(t),r=TP(r);let i=e(t),a=e(r);return i===a?n.get(t)-n.get(r):i-a});return r.some((e,n)=>e!==t[n])?r:t}}var qL=KL(e=>{switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function JL(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(!nv(n))return eP(e,[qP]);let r=n(e.typeParameters.map(e=>CF(TP(e))));return r===void 0?e:eP(e,[aP(r,t)])}case`Unknown`:return eP(e,[qP]);case`ObjectKeyword`:return eP(e,[JP]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return GL(e),e.recur(t,MP);case`Union`:{let n=qL(e.types);return n===e.types?e.recur(t):new LN(n,e.mode,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}function YL(e){return QF(tR(e.ast),{schema:e})}var XL=KL(e=>{switch(e._tag){case`Null`:case`Boolean`:case`Number`:case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function ZL(e,t,n){switch(e._tag){case`Declaration`:{let r=e.typeParameters.map(e=>QF(t(TP(e)))),i=e.annotations?.toCodecStringTree;if(nv(i)){let n=i(r);return n===void 0?e:eP(e,[aP(n,t)])}let a=e.annotations?.toCodecJson,o=nv(a)?a(r):void 0,s=o===void 0?e.annotations?.toCodec:void 0,c=o??(nv(s)?s(r):void 0);return c===void 0?n(e):eP(e,[aP(c,t)])}case`Null`:return eP(e,[QL]);case`Boolean`:return eP(e,[$L]);case`Unknown`:case`ObjectKeyword`:return eP(e,[XP]);case`Enum`:case`Number`:case`Literal`:case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return GL(e),e.recur(t,MP);case`Union`:{let n=XL(e.types);return n===e.types?e.recur(t):new LN(n,e.mode,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}var QL=new JM(new iN(`null`),new NM(yM(()=>null),yM(()=>`null`))),$L=new JM(new LN([new iN(`true`),new iN(`false`)],`anyOf`),new NM(yM(e=>e===`true`),wM())),eR=new NM(yM(e=>typeof e==`string`?[e]:e),_M()),tR=lP(e=>{let t=ZL(e,tR,e=>{throw new globalThis.Error(`Missing structural codec for StringTree`,{cause:e})});return t!==e&&e.context!==void 0?cP(t,WL(e.context)):t},{stopAt:e=>e.transformation===eR}),nR=QF(nP(KP,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),rR=`~effect/Stream`,iR={_R:B_,_E:B_,_A:B_},aR={[rR]:iR,pipe(){return L_(this,arguments)}},oR=e=>{let t=Object.create(aR);return t.channel=e,t},sR=`~effect/Stream`,cR=e=>sv(e,sR),lR=oR,uR=(e,t)=>lR(cA((n,r)=>rO(RA(e.channel,r),e=>t(e,r)))),dR=e=>e.channel,fR=(e,t)=>lR(mA(e,t)),pR=lR(gA),mR=e=>lR(hA(()=>e().channel)),hR=e=>lR(_A(e)),gR=e=>lR(vA(e)),_R=e=>lR(bA(e)),vR=e=>lR(xA(e)),yR=e=>lR(jA(sO(e,dR))),bR=B(2,(e,t)=>mR(()=>{let n=0;return lR(CA(e.channel,Yx(e=>t(e,n++))))})),xR=B(e=>cR(e[0]),(e,t,n)=>e.channel.pipe(OA,TA(t,n),CA(Jx),lR)),mne=B(2,(e,t)=>lR(kA(dR(e),t))),SR=B(2,(e,t)=>lR(AA(e.channel,t))),CR=B(e=>cR(e[0]),(e,t)=>mR(()=>{let n=new TextDecoder(t?.encoding);return bR(e,e=>n.decode(e,{stream:!0}))})),wR=B(2,(e,t)=>lR(NA(e.channel,t))),TR=B(2,(e,t)=>lR(FA(e.channel,t))),ER=B(2,(e,t)=>IA(e.channel,t)),DR=e=>LA(e.channel),OR=B(e=>cR(e[0]),(e,t,n)=>{let r,i,a=uk(!1);return new ReadableStream({start(n){i=jO(mO(ER(e,e=>a.whenOpen(qD(()=>{a.closeUnsafe();for(let t=0;t<e.length;t++)n.enqueue(e[t]);r(),r=void 0}))),t)),i.addObserver(e=>{e._tag===`Failure`?n.error(KE(e.cause)):n.close()})},pull(){return new Promise(e=>{r=e,a.openUnsafe()})},cancel(){if(i)return Hte(lO(sk(i)))}},n?.strategy)}),kR=B(e=>cR(e[0]),(e,t)=>sO(fO(),n=>OR(e,n,t))),AR=`~effect/SubscriptionRef`,jR=e=>sv(e,AR);({..._y});var MR=e=>_R(e.pubsub),NR=e=>qD(()=>e.value),PR=(e,t)=>{e.value=t,Ek(e.pubsub,t)},FR=B(2,(e,t)=>e.semaphore.withPermit(qD(()=>PR(e,t)))),IR=BigInt(1024);IR*IR*IR*IR*IR,ix()(`effect/platform/FileSystem/WatchBackend`);var LR=class extends ix()(`effect/reactivity/Reactivity`){},RR=qD(()=>{let e=new Map,t=t=>{WR(t,t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})},n=e=>pO(n=>{let r=Tx(n,zR);return r?WR(e,e=>{r.add(e)}):t(e),JD}),r=(e,t)=>aO(t,n(e)),i=(t,n)=>{let r=[];return WR(t,t=>{r.push(t);let i=e.get(t);i===void 0&&(i=new Set,e.set(t,i)),i.add(n)}),()=>{for(let t=0;t<r.length;t++){let i=e.get(r[t]);i.delete(n),i.size===0&&e.delete(r[t])}}},a=(e,t)=>ZD(function*(){let n=yield*fO(),r=Ox(n,pD),a=yield*Rk(),o=J_(MO(n),lk(r)),s=!1,c=!1,l=e=>{e._tag===`Failure`?Uk(a,e.cause):Vk(a,e.value),c?(c=!1,o(t).addObserver(l)):s=!1};function u(){if(s){c=!0;return}s=!0,o(t).addObserver(l)}return yield*_D(r,qD(i(e,u))),u(),a});return LR.of({mutation:r,query:a,stream:(e,t)=>a(e,t).pipe(sO(gR),yR),invalidateUnsafe:t,invalidate:n,registerUnsafe:i,withBatch:t=>KD(()=>{let n=new Set;return t.pipe(gO(zR,n),bO(t=>qD(()=>{n.forEach(t=>{let n=e.get(t);n!==void 0&&n.forEach(e=>e())})})))})})}),zR=class extends ix()(`effect/reactivity/Reactivity/PendingInvalidation`){},BR=B(2,(e,t)=>LR.use(n=>n.mutation(t,e))),VR=e=>LR.use(t=>t.invalidate(e)),HR=OD(LR)(RR);function UR(e){switch(typeof e){case`string`:case`number`:case`bigint`:case`boolean`:return String(e);default:return dv(e)}}var WR=(e,t)=>{if(Array.isArray(e)){for(let n=0;n<e.length;n++)t(UR(e[n]));return}for(let n in e){t(n);let r=e[n];for(let e=0;e<r.length;e++)t(`${n}:${UR(r[e])}`)}},GR=`~effect/reactivity/AsyncResult`,KR=e=>sv(e,GR),qR={[GR]:{E:B_,A:B_},pipe(){return L_(this,arguments)},[Ov](e){if(this._tag!==e._tag||this.waiting!==e.waiting)return!1;switch(this._tag){case`Initial`:return!0;case`Success`:return kv(this.value,e.value);case`Failure`:return kv(this.cause,e.cause)}},[uv](){let e=_v(`${this._tag}:${this.waiting}`);return this._tag===`Initial`?e:pv(e)(this._tag===`Success`?dv(this.value):dv(this.cause))}},JR=e=>e.waiting,YR=(e,t)=>e._tag===`Success`?tz(e.value):iz(e.cause,{previous:t}),XR=e=>e._tag===`None`?$R(!0):az(e.value),ZR=e=>e._tag===`Initial`,QR=e=>e._tag!==`Initial`,$R=(e=!1)=>{let t=Object.create(qR);return t._tag=`Initial`,t.waiting=e,t},ez=e=>e._tag===`Success`,tz=(e,t)=>{let n=Object.create(qR);return n._tag=`Success`,n.value=e,n.waiting=t?.waiting??!1,n.timestamp=t?.timestamp??Date.now(),n},nz=e=>e._tag===`Failure`,rz=(e,t)=>{let n=Object.create(qR);return n._tag=`Failure`,n.cause=e,n.previousSuccess=t?.previousSuccess??Bb(),n.waiting=t?.waiting??!1,n},iz=(e,t)=>rz(e,{previousSuccess:$b(t.previous,e=>ez(e)?Vb(e):nz(e)?e.previousSuccess:Bb()),waiting:t.waiting}),hne=(e,t)=>iz(zE(e),t),az=(e,t)=>{if(e.waiting)return t?.touch?gne(e):e;let n=Object.assign(Object.create(qR),e);return n.waiting=!0,t?.touch&&ez(n)&&(n.timestamp=Date.now()),n},gne=e=>ez(e)?tz(e.value,{waiting:e.waiting}):e,oz=(e,t)=>e._tag===`Failure`?iz(e.cause,{previous:t,waiting:e.waiting}):e,sz=e=>e._tag===`Success`?Vb(e.value):e._tag===`Failure`?Qb(e.previousSuccess,e=>e.value):Bb(),cz=e=>Zb(sz(e),()=>new QE(`AsyncResult.getOrThrow: no value found`)),lz=e=>{switch(e._tag){case`Success`:return nD(e.value);case`Failure`:return rD(e.cause);default:return iD(new QE)}},uz=e=>new _ne(e),_ne=class{constructor(e){this.result=e}result;output=Bb();when(e,t){if(Ub(this.output)&&e(this.result)){let e=t(this.result);Wb(e)&&(this.output=e)}return this}pipe(){return L_(this,arguments)}onWaiting(e){return this.when(e=>e.waiting,t=>Vb(e(t)))}onInitialOrWaiting(e){return this.when(e=>ZR(e)||e.waiting,t=>Vb(e(t)))}onInitial(e){return this.when(ZR,t=>Vb(e(t)))}onSuccess(e){return this.when(ez,t=>Vb(e(t.value,t)))}onFailure(e){return this.when(nz,t=>Vb(e(t.cause,t)))}onError(e){return this.onErrorIf(H_,e)}onErrorIf(e,t){return this.when(nz,n=>JE(n.cause).pipe(tx(e),Qb(e=>t(e,n))))}onErrorTag(e,t){return this.onErrorIf(t=>sv(t,`_tag`)&&(Array.isArray(e)?e.includes(t._tag):t._tag===e),t)}onDefect(e){return this.when(nz,t=>{let n=YE(t.cause);return Ix(n)?Bb():Vb(e(n.success,t))})}onInterrupt(e){return this.when(nz,t=>{let n=ZE(t.cause);return Ix(n)?Bb():Vb(e(n.success,t))})}orElse(e){return Kb(this.output,e)}orNull(){return Yb(this.output)}render(){if(Wb(this.output))return this.output.value;if(nz(this.result))throw KE(this.result.cause);return null}exhaustive(){return this.render()}},dz=e=>{let t=e.success??iI,n=e.error??iI,r=MF()([t,cL(n,hL())],([e,t])=>(n,r,i)=>{if(!KR(n))return QD(new qj(r,n,i));switch(n._tag){case`Initial`:return V(n);case`Success`:return VO(nF(e)(n.value,i),{onSuccess:e=>tz(e,n),onFailure:e=>Yj(r,`value`,e,n,i)});case`Failure`:{let a=n.previousSuccess.pipe(Qb(t=>VO(nF(e)(t.value,i),{onSuccess:e=>Vb(tz(e,t)),onFailure:e=>new Kj(r,[new Uj([`previousSuccess`,`value`],e)],n,i)})),Kb(()=>GD)),o=BO(nF(t)(n.cause,i),e=>Yj(r,`cause`,e,n,i));return HO(a,e=>zO(o,t=>rz(t,{previousSuccess:e,waiting:n.waiting})))}}},{expected:`AsyncResult`,toCodec([e,t]){let n=MI(`Success`,{value:e,waiting:cI,timestamp:QI});return II()(gI([MI(`Initial`,{waiting:cI}),n,MI(`Failure`,{cause:t,previousSuccess:rL(n),waiting:cI})]),FM({decode:e=>{switch(e._tag){case`Initial`:return $R(e.waiting);case`Success`:return tz(e.value,{waiting:e.waiting,timestamp:e.timestamp});case`Failure`:return rz(e.cause,{previousSuccess:Qb(e.previousSuccess,e=>tz(e.value,e)),waiting:e.waiting})}},encode(e){switch(e._tag){case`Initial`:return{_tag:`Initial`,waiting:e.waiting};case`Success`:return{_tag:`Success`,value:e.value,waiting:e.waiting,timestamp:e.timestamp};case`Failure`:return{_tag:`Failure`,cause:e.cause,previousSuccess:e.previousSuccess,waiting:e.waiting}}}}))},toEquivalence:Gv,toFormatter:([e,t])=>n=>{switch(n._tag){case`Success`:return`AsyncResult.Success(${e(n.value)}, ${n.waiting}, ${n.timestamp})`;case`Failure`:return`AsyncResult.Failure(${t(n.cause)}, ${n.waiting})`;case`Initial`:return`AsyncResult.Initial(${n.waiting}, ${n.waiting})`}}});return Object.assign(r,{success:t,error:n})},fz=`~effect/reactivity/AtomRegistry`,vne=e=>sv(e,fz),yne=e=>new Cne(e?.initialValues,e?.scheduleTask,e?.timeoutResolution,e?.defaultIdleTTL),pz=ix(fz),bne=B(e=>vne(e[0]),(e,t,n)=>{let r=n?.suspendOnWaiting??!1;return YD(n=>{let i=e.get(t);if(i._tag!==`Initial`&&!(r&&i.waiting))return n(lz(i));let a=e.subscribe(t,e=>{e._tag!==`Initial`&&!(r&&e.waiting)&&(n(lz(e)),a())});return qD(a)})}),xne={immediate:!0},Sne=e=>{e()},mz=`~effect-atom/atom/Atom/Serializable`,hz=e=>mz in e?e[mz].key:e,Cne=class{[fz];timeoutResolution;defaultIdleTTL;scheduler;schedulerAsync;dispatcher;onNodeAdded;onNodeRemoved;constructor(e,t,n,r){if(this[fz]=fz,this.scheduler=new BS(`sync`,t),this.schedulerAsync=new BS(`async`,t),this.dispatcher=this.schedulerAsync.makeDispatcher(),this.defaultIdleTTL=r,this.timeoutResolution=n===void 0&&r!==void 0?Math.round(r/2):n??1e3,e!==void 0)for(let[t,n]of e){let e=t;for(;e.initialValueTarget;)e=e.initialValueTarget;this.ensureNode(e).setInitialValue(n)}}nodes=new Map;preloadedSerializable=new Map;timeoutBuckets=new Map;nodeTimeoutBucket=new Map;disposed=!1;getNodes(){return this.nodes}get(e){return this.ensureNode(e).value()}set(e,t){e.write(this.ensureNode(e).writeContext,t)}setSerializable(e,t){this.preloadedSerializable.set(e,t)}modify(e,t){let n=this.ensureNode(e),r=t(n.value());return e.write(n.writeContext,r[1]),r[0]}update(e,t){let n=this.ensureNode(e);e.write(n.writeContext,t(n.value()))}refresh=e=>{e.refresh===void 0?this.invalidateAtom(e):e.refresh(this.refresh)};subscribe(e,t,n){let r=this.ensureNode(e);n?.immediate&&t(r.value());let i=r.subscribe(function(){t(r._value)});return()=>{i(),r.canBeRemoved&&this.scheduleNodeRemoval(r)}}mount(e){return this.subscribe(e,K_,xne)}atomHasTtl(e){return!e.keepAlive&&e.idleTTL!==0&&(e.idleTTL!==void 0||this.defaultIdleTTL!==void 0)}ensureNode(e){let t=hz(e),n=this.nodes.get(t);if(n===void 0?(n=this.createNode(e),this.nodes.set(t,n),this.onNodeAdded?.(n)):this.atomHasTtl(e)&&this.removeNodeTimeout(n),typeof t==`string`&&this.preloadedSerializable.has(t)){let r=this.preloadedSerializable.get(t);this.preloadedSerializable.delete(t);let i=e[mz].decode(r),a=e;for(;a.initialValueTarget;)a=a.initialValueTarget;a===e?n.setValue(i):this.ensureNode(a).setInitialValue(i)}return n}createNode(e){if(this.disposed)throw Error(`Cannot access Atom ${e}: registry is disposed`);return e.keepAlive||this.scheduleAtomRemoval(e),new wne(this,e)}invalidateAtom=e=>{this.ensureNode(e).invalidate()};scheduleAtomRemoval(e){this.dispatcher.scheduleTask(()=>{let t=this.nodes.get(hz(e));t!==void 0&&t.canBeRemoved&&this.removeNode(t)},0)}scheduleNodeRemoval(e){this.dispatcher.scheduleTask(()=>{e.canBeRemoved&&this.removeNode(e)},0)}removeNode(e){this.atomHasTtl(e.atom)?this.setNodeTimeout(e):(this.nodes.delete(hz(e.atom)),e.remove(),this.onNodeRemoved?.(e))}setNodeTimeout(e){if(this.nodeTimeoutBucket.has(e))return;let t=e.atom.idleTTL??this.defaultIdleTTL;if(this.#e!==null&&(t-=this.#e,t<=0)){this.nodes.delete(hz(e.atom)),e.remove(),this.onNodeRemoved?.(e);return}let n=Math.ceil(t/this.timeoutResolution)*this.timeoutResolution,r=Date.now()+n,i=r-r%this.timeoutResolution+this.timeoutResolution,a=this.timeoutBuckets.get(i);a===void 0&&(a=[new Set,setTimeout(()=>this.sweepBucket(i),i-Date.now())],this.timeoutBuckets.set(i,a)),a[0].add(e),this.nodeTimeoutBucket.set(e,i)}removeNodeTimeout(e){let t=this.nodeTimeoutBucket.get(e);if(t===void 0)return;this.nodeTimeoutBucket.delete(e),this.scheduleNodeRemoval(e);let[n,r]=this.timeoutBuckets.get(t);n.delete(e),n.size===0&&(clearTimeout(r),this.timeoutBuckets.delete(t))}#e=null;sweepBucket(e){let t=this.timeoutBuckets.get(e)[0];this.timeoutBuckets.delete(e),t.forEach(e=>{this.nodeTimeoutBucket.delete(e),e.canBeRemoved&&(this.nodes.delete(hz(e.atom)),this.onNodeRemoved?.(e),this.#e=e.atom.idleTTL??this.defaultIdleTTL,e.remove(),this.#e=null)})}reset(){this.timeoutBuckets.forEach(([,e])=>clearTimeout(e)),this.timeoutBuckets.clear(),this.nodeTimeoutBucket.clear(),this.nodes.forEach(e=>{e.remove(),this.onNodeRemoved?.(e)}),this.nodes.clear()}dispose(){this.disposed=!0,this.reset()}},gz={alive:1,initialized:2,waitingForValue:4},_z={uninitialized:gz.alive|gz.waitingForValue,stale:gz.alive|gz.initialized|gz.waitingForValue,valid:gz.alive|gz.initialized,removed:0},wne=class{constructor(e,t){this.registry=e,this.atom=t,this.writeContext=new One(e,this)}registry;atom;state=_z.uninitialized;lifetime;writeContext;preserveInitialValueOnBuild=!1;parents=new Set;previousParents;children=new Set;listeners=new Set;skipInvalidation=!1;building=!1;invalidatedDuringBuild=!1;currentState(){switch(this.state){case _z.uninitialized:return`uninitialized`;case _z.stale:return`stale`;case _z.valid:return`valid`;default:return`removed`}}get canBeRemoved(){return!this.atom.keepAlive&&this.listeners.size===0&&this.children.size===0&&this.state!==0}_value=void 0;value(){if((this.state&gz.waitingForValue)!==0){this.lifetime=Dne(this),this.building=!0;let e=this.atom.read(this.lifetime);if(this.building=!1,(this.state&gz.waitingForValue)!==0&&(this.preserveInitialValueOnBuild?(this.preserveInitialValueOnBuild=!1,this.state=_z.valid):this.setValue(e)),this.previousParents){let e=this.previousParents;this.previousParents=void 0;for(let t of e)t.removeChild(this),t.canBeRemoved&&this.registry.scheduleNodeRemoval(t)}}return this._value}valueOption(){return(this.state&gz.initialized)===0?Bb():Vb(this._value)}setInitialValue(e){if((this.state&gz.initialized)===0){this.preserveInitialValueOnBuild=!0,this.state=_z.stale,this._value=e,yz.phase===vz.collect?yz.notify.add(this):this.notify();return}this.setValue(e)}setValue(e){if((this.state&gz.initialized)===0){this.state=_z.valid,this._value=e,yz.phase===vz.collect?yz.notify.add(this):this.notify();return}this.state=_z.valid,!this.atom.equals(this._value,e)&&(this._value=e,this.skipInvalidation?this.skipInvalidation=!1:this.invalidateChildren(),this.listeners.size>0&&(yz.phase===vz.collect?yz.notify.add(this):this.notify()))}addParent(e){this.parents.add(e),this.previousParents!==void 0&&(this.previousParents.delete(e),this.previousParents.size===0&&(this.previousParents=void 0)),e.children.has(this)||(e.children.add(this),e.skipInvalidation&&=!1)}removeChild(e){this.children.delete(e)}invalidate(){this.building&&yz.phase===vz.collect&&(this.invalidatedDuringBuild=!0),this.state===_z.valid&&(this.state=_z.stale,this.disposeLifetime()),yz.phase===vz.collect?yz.stale.push(this):this.atom.lazy&&this.listeners.size===0&&!Tne(this.children)?(this.invalidateChildren(),this.skipInvalidation=!0):this.value()}invalidateChildren(){if(this.children.size===0)return;let e=this.children;this.children=new Set;for(let t of e)t.invalidate()}notify(){this.listeners.forEach(Sne),yz.phase===vz.commit&&yz.notify.delete(this)}disposeLifetime(){this.lifetime!==void 0&&(this.lifetime.dispose(),this.lifetime=void 0),this.parents.size!==0&&(this.previousParents=this.parents,this.parents=new Set)}remove(){if(this.state=_z.removed,this.listeners.clear(),this.lifetime===void 0||(this.disposeLifetime(),this.previousParents===void 0))return;let e=this.previousParents;this.previousParents=void 0;for(let t of e)t.removeChild(this),t.canBeRemoved&&this.registry.removeNode(t)}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}};function Tne(e){if(e.size===0)return!1;let t=e,n,r=0;for(;t!==void 0;){for(let e of t)if(!e.atom.lazy||e.listeners.size>0)return!0;else e.children.size>0&&(n===void 0?n=[e.children]:n.push(e.children));t=n?.[r++]}return!1}var Ene={get registry(){return this.node.registry},addFinalizer(e){if(this.disposed)return e();this.finalizers??=[],this.finalizers.push(e)},get(e){if(this.disposed)return this.node.registry.get(e);let t=this.node.registry.ensureNode(e),n=t.value();return this.node.addParent(t),n},result(e,t){if(this.disposed||this.isFn)return this.resultOnce(e,t);let n=this.get(e);if(t?.suspendOnWaiting&&n.waiting)return XD;switch(n._tag){case`Initial`:return XD;case`Failure`:return rD(n.cause);case`Success`:return V(n.value)}},resultOnce(e,t){return YD(n=>{let r=this.once(e);if(r._tag!==`Initial`&&!(t?.suspendOnWaiting&&r.waiting))return n(lz(r));let i=this.node.registry.subscribe(e,e=>{e._tag===`Initial`||t?.suspendOnWaiting&&e.waiting||(i(),n(lz(e)))},{immediate:!1});return qD(i)})},setResult(e,t){return this.disposed?XD:(this.node.registry.set(e,t),this.resultOnce(e,{suspendOnWaiting:!0}))},some(e){if(this.disposed||this.isFn)return this.someOnce(e);let t=this.get(e);return t._tag===`None`?XD:V(t.value)},someOnce(e){return YD(t=>{let n=this.once(e);if(Wb(n))return t(V(n.value));let r=this.node.registry.subscribe(e,e=>{Ub(e)||(r(),t(V(e.value)))},{immediate:!1});return qD(r)})},once(e){return this.node.registry.get(e)},self(){return this.disposed?Bb():this.node.valueOption()},refresh(e){this.disposed||this.node.registry.refresh(e)},refreshSelf(){this.disposed||this.node.invalidate()},mount(e){this.disposed||this.addFinalizer(this.node.registry.mount(e))},subscribe(e,t,n){this.disposed||this.addFinalizer(this.node.registry.subscribe(e,t,n))},setSelf(e){this.disposed||this.node.setValue(e)},set(e,t){this.disposed||this.node.registry.set(e,t)},stream(e,t){return this.disposed?pR:fR(n=>qD(()=>{this.subscribe(e,e=>Vk(n,e),{immediate:!t?.withoutInitialValue})}))},streamResult(e,t){return this.stream(e,t).pipe(mne(QR),xR(e=>e._tag===`Success`?V(e.value):$D(e.cause)))},dispose(){if(this.disposed=!0,this.finalizers===void 0)return;let e=this.finalizers;this.finalizers=void 0;for(let t=e.length-1;t>=0;t--)e[t]()}},Dne=e=>{function t(n){if(t.disposed||t.isFn)return e.registry.get(n);let r=e.registry.ensureNode(n),i=r.value();return e.addParent(r),i}return Object.setPrototypeOf(t,Ene),t.isFn=!1,t.disposed=!1,t.finalizers=void 0,t.node=e,t},One=class{constructor(e,t){this.registry=e,this.node=t}registry;node;get(e){return this.registry.get(e)}set(e,t){return this.registry.set(e,t)}setSelf(e){return this.node.setValue(e)}refreshSelf(){return this.node.invalidate()}},vz={disabled:0,collect:1,commit:2},yz={phase:vz.disabled,depth:0,stale:[],notify:new Set};function kne(e){yz.phase=vz.collect,yz.depth++;try{if(e(),yz.depth===1){for(let e=0;e<yz.stale.length;e++)bz(yz.stale[e]);yz.phase=vz.commit;for(let e of yz.notify)e.notify();yz.notify.clear()}}finally{yz.depth--,yz.depth===0&&(yz.phase=vz.disabled,yz.stale=[])}}function bz(e){if(e.state===_z.valid){if(!e.invalidatedDuringBuild)return;e.invalidatedDuringBuild=!1,e.state=_z.stale,e.disposeLifetime()}for(let t of e.parents)t.state!==_z.valid&&bz(t);e.state!==_z.valid&&e.value()}var xz=`~effect/reactivity/Atom`,Sz=e=>sv(e,xz),Cz=`~effect/reactivity/Atom/Writable`,wz=B(2,(e,t)=>{let n=cS(t),r=gS(n);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!r,idleTTL:r?DS(n):void 0})}),Tz=wz(0),Ez={[xz]:xz,equals:Object.is,..._y,toJSON(){return{_id:`Atom`,keepAlive:this.keepAlive,lazy:this.lazy,label:this.label}}},Ane={...Ez,atom(e,t){let n=jz(e,t);return Oz(e=>{let t=e.self(),r=e(this);return r._tag===`Success`?n(e,r.value):oz(r,t)})},fn(e,t){return arguments.length===0?(e,t)=>Dz(this,e,t):Dz(this,e,t)},pull(e,t){let n=Tz(Nz(0));return Vne(n,Oz(r=>{let i=r.self(),a=r(this);return a._tag===`Success`?Fz(r,Bne(r,n,e,t),$R(!0),a.value):oz(a,i)}))},subscriptionRef(e){return Lne(Tz(Oz(t=>{let n=t.self(),r=t(this);if(r._tag!==`Success`)return oz(r,n);let i=typeof e==`function`?e(t):e;return jR(i)?i:Fz(t,i,$R(!0),r.value)})),(e,t)=>Ine(e,t,cz(e(this))))}},Dz=(e,t,n)=>{let[r,i,a]=zne(n?.reactivityKeys?(e,r)=>{let i=t(e,r);return HD(i)?BR(i,n.reactivityKeys):wR(i,VR(n.reactivityKeys))}:t,n);return kz(t=>{t.get(a);let n=t.self(),i=t.get(e);return i._tag===`Success`?r(t,i.value):oz(i,n)},i)},jne={...Ez,[Cz]:Cz},Mne=e=>Cz in e,Oz=(e,t)=>{let n=Object.create(Ez);return n.keepAlive=!1,n.lazy=!0,n.read=e,n.refresh=t,n},kz=(e,t,n)=>{let r=Object.create(jne);return r.keepAlive=!1,r.lazy=!0,r.read=e,r.write=t,r.refresh=n,r};function Nne(e,t){e.setSelf(t)}var Az=(e,t)=>{let n=jz(e,t);return`~effect/reactivity/Atom`in n?n:Oz(n)},jz=(e,t)=>{if(typeof e==`function`&&!HD(e)&&!cR(e)){let n=e;return function(e,r){let i=n(e);switch(typeof i){case`function`:case`object`:return i===null?i:Mz in i?Pz(e,i,t,r):Pne in i?Rz(e,i,t,r):i;default:return i}}}return HD(e)?function(n,r){return Pz(n,e,t,r)}:cR(e)?function(n,r){return Rz(n,e,t,r)}:Nz(e)},Mz=`~effect/Effect`,Pne=`~effect/Stream`,Nz=e=>kz(function(t){return e},Nne),Pz=(e,t,n,r)=>Fz(e,t,n?.initialValue===void 0?$R():tz(n.initialValue),r,n?.uninterruptible);function Fz(e,t,n,r=Sx(),i=!1){let a=e.self(),o=mD();e.addFinalizer(()=>{MO(r)(yD(o,aD))});let s,c=!1,l=Iz(r.pipe(wx(pD,o),wx(pz,e.registry),wx(IS,e.registry.scheduler)),t,function(t){s=YR(t,a),c&&e.setSelf(s)},i);return c=!0,l!==void 0&&e.addFinalizer(l),s===void 0?a._tag===`Some`?XR(a):az(n):s}function Iz(e,t,n,r=!1){if(tD(t)){n(t);return}let i=MO(e)(t);i.currentDispatcher?.flush();let a=i.pollUnsafe();if(a){n(a);return}let o=i.addObserver(n);function s(){o(),r||i.interruptUnsafe()}return s}function Fne(e){let t=e?.memoMap??Tz(Az(()=>wD())),n=e=>Sz(t)?e(t):t,r=HR;function i(e){let t=Object.create(Ane);t.keepAlive=!1,t.lazy=!0,t.refresh=void 0,t.factory=i;let a=Hz(Oz(typeof e==`function`?t=>PD(e(t),r):()=>PD(e,r)));return t.layer=a,t.read=function(e){let t=e(a);return Pz(e,rO(_O,r=>ED(t,n(e),r)),{uninterruptible:!0})},t}i.memoMap=t,i.addGlobalLayer=e=>{r=PD(r,ND(e,HR))};let a=Tz(Az(e=>pO(t=>ED(HR,n(e),Ox(t,pD))).pipe(sO(Ox(LR)))));return i.withReactivity=e=>t=>Uz(t,n=>{let r=cz(n(a));return n.addFinalizer(r.registerUnsafe(e,()=>{n.refresh(t)})),n.subscribe(t,e=>n.setSelf(e)),n.once(t)},{initialValueTarget:t}),i}var Lz=Fne();Lz.withReactivity;var Rz=(e,t,n,r)=>zz(e,t,n?.initialValue===void 0?$R():tz(n.initialValue),r);function zz(e,t,n,r=Sx()){let i=e.self();r=wx(r,pz,e.registry);let a=vO(n=>rO(RA(t.channel,n),t=>Pte({while:H_,body:()=>t,step(t){e.setSelf(tz(cte(t),{waiting:!0}))}}))).pipe(uO(t=>(VD(t)?q_(e.self(),$b(sz),Gb({onNone:()=>e.setSelf(hne(new QE,{previous:e.self()})),onSome:t=>e.setSelf(tz(t))})):e.setSelf(iz(t,{previous:e.self()})),JD))),o=Iz(r.pipe(wx(pz,e.registry),wx(IS,e.registry.scheduler)),a,K_,!1);return o!==void 0&&e.addFinalizer(o),i._tag===`Some`?XR(i):az(n)}var Ine=(e,t,n=Sx())=>jR(t)?(e.addFinalizer(MR(t).pipe(ER(t=>{for(let n=0;n<t.length;n++)e.setSelf(t[n]);return JD}),Vte(n))),FO(n)(NR(t))):t._tag===`Success`?zz(e,MR(t.value),$R(!0),n):t,Lne=(e,t)=>{function n(t,n){let r=t.get(e);jR(r)?PO(FR(r,n)):ez(r)&&PO(FR(r.value,n))}return kz(n=>{let r=n(e);return jR(r)||ez(r)?t(n,r):r},n)},Rne=Symbol.for(`effect/reactivity/atom/Atom/Reset`),Bz=Symbol.for(`effect/reactivity/atom/Atom/Interrupt`);function zne(e,t){let n=Tz(Nz([0,void 0])),r=t?.initialValue===void 0?$R():tz(t.initialValue),i=t?.concurrent?Tz(Oz(e=>{let t=new Set;return e.addFinalizer(()=>t.forEach(e=>e.interruptUnsafe())),t})):void 0;function a(t,a){let o=i?t(i):void 0;t.isFn=!0;let[s,c]=t.get(n);if(s===0)return r;if(c===Bz)return iz(BE(),{previous:t.self()});let l=e(c,t);return Mz in l?(o&&(l=rO(AO(l,{startImmediately:!0}),e=>(o.add(e),e.addObserver(()=>o.delete(e)),sO(ok(o),e=>e[0])))),Fz(t,l,r,a,!1)):zz(t,l,r,a)}function o(e,t){Wne(()=>{t===Rne?e.set(n,[0,void 0]):t===Bz?e.set(n,[e.get(n)[0]+1,Bz]):e.set(n,[e.get(n)[0]+1,t]),e.refreshSelf()})}return[a,o,n]}var Bne=(e,t,n,r)=>rO(DR(typeof n==`function`?n(e):n),n=>{let i=ck().context,a=qx(),o=dO(n,{onFailure(e){return VD(e)?Kx(a)?V({done:!0,items:a}):QD(new QE(`Atom.pull: no items`)):$D(e)},onSuccess(e){let t;return r?.disableAccumulation?t=e:(t=Wx(a,e),a=t),V({done:!1,items:t})}}),s=new Set;return e.addFinalizer(()=>{for(let e of s)e()}),e.once(t),e.subscribe(t,()=>{e.setSelf(XR(e.self()));let t;t=Iz(i,o,n=>{t&&s.delete(t);let r=YR(n,e.self()),i=s.size>0;e.setSelf(i?az(r):r)}),t&&s.add(t)}),o}),Vne=(e,t)=>kz(t.read,function(t,n){t.set(e,t.get(e)+1)}),Vz=typeof WeakRef>`u`||typeof FinalizationRegistry>`u`?e=>{let t=VA();return function(n){let r=HA(t,n);if(r._tag===`Some`)return r.value;let i=e(n);return KA(t,n,i),i}}:e=>{let t=VA(),n=new FinalizationRegistry(e=>{JA(t,e)});return function(r){let i=HA(t,r).pipe(ex(e=>e.deref()));if(i._tag===`Some`)return i.value;let a=e(r);return KA(t,r,new WeakRef(a)),n.register(a,r),a}},Hz=e=>Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,keepAlive:!0}),Uz=B(e=>Sz(e[0]),(e,t,n)=>{let r=Tz(Mne(e)?kz(n=>t(n,e),function(t,n){t.set(e,n)},e.refresh??function(t){t(e)}):Oz(n=>t(n,e),e.refresh??function(t){t(e)}));return n?.initialValueTarget&&(r.initialValueTarget=Hne(n.initialValueTarget)),r}),Hne=e=>{let t=e;for(;t.initialValueTarget;)t=t.initialValueTarget;return t},Une=B(2,(e,t)=>Uz(e,n=>t(n(e)))),Wne=kne,Gne=`~effect-atom/atom/Atom/Serializable`,Wz=B(2,(e,t)=>{let n=HL(t.schema);return Object.assign(Object.create(Object.getPrototypeOf(e)),{...e,label:e.label??[t.key,Error().stack?.split(`
57
- `)[5]??``],[Gne]:{key:t.key,encode:ZF(n),decode:JF(n)}})}),Kne=`~effect-atom/atom/Atom/ServerValue`,qne=B(2,(e,t)=>`~effect-atom/atom/Atom/ServerValue`in e?e[Kne](e=>t.get(e)):t.get(e)),Gz=l(p(),1);function Jne(e){let t=Gz.unstable_scheduleCallback(4,e);return()=>Gz.unstable_cancelCallback(t)}var Kz=N.createContext(yne({scheduleTask:Jne,defaultIdleTTL:400})),qz=new WeakMap;function Yne(e,t){let n=qz.get(e);n===void 0&&(n=new WeakMap,qz.set(e,n));let r=n.get(t);if(r!==void 0)return r;let i={subscribe(n){return e.subscribe(t,n)},snapshot(){return e.get(t)},getServerSnapshot(){return qne(t,e)}};return n.set(t,i),i}function Jz(e,t){let n=Yne(e,t);return N.useSyncExternalStore(n.subscribe,n.snapshot,n.getServerSnapshot)}var Yz=(e,t)=>{let n=N.useContext(Kz);return t?Jz(n,N.useMemo(()=>Une(e,t),[e,t])):Jz(n,e)};function Xne(e,t){N.useEffect(()=>e.mount(t),[t,e])}function Xz(e,t,n){return n?.mode===`promise`||n?.mode===`promiseExit`?N.useCallback(r=>{e.set(t,r);let i=NO(bne(e,t,{suspendOnWaiting:!0}));return n.mode===`promise`?i.then(Zne):i},[e,t,n.mode]):N.useCallback(n=>{e.set(t,typeof n==`function`?n(e.get(t)):n)},[e,t])}var Zne=e=>{if(oD(e))return e.value;throw KE(e.cause)},Zz=(e,t)=>{let n=N.useContext(Kz);return Xne(n,e),Xz(n,e,t)},Qz=(e,t)=>{let n=N.useContext(Kz);return[Jz(n,e),Xz(n,e,t)]};function Qne(e){if(!e||typeof document>`u`)return;let t=document.head||document.getElementsByTagName(`head`)[0],n=document.createElement(`style`);n.type=`text/css`,t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}var $ne=e=>{switch(e){case`success`:return nre;case`info`:return ire;case`warning`:return rre;case`error`:return are;default:return null}},ere=Array(12).fill(0),tre=({visible:e,className:t})=>N.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},N.createElement(`div`,{className:`sonner-spinner`},ere.map((e,t)=>N.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),nre=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},N.createElement(`path`,{fillRule:`evenodd`,d:`M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z`,clipRule:`evenodd`})),rre=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},N.createElement(`path`,{fillRule:`evenodd`,d:`M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z`,clipRule:`evenodd`})),ire=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},N.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z`,clipRule:`evenodd`})),are=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},N.createElement(`path`,{fillRule:`evenodd`,d:`M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z`,clipRule:`evenodd`})),ore=N.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`12`,height:`12`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`},N.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),N.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),sre=()=>{let[e,t]=N.useState(document.hidden);return N.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},cre=1,lre=100,$z=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:cre++,eB=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e],this.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-lre;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=$z(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),this.error=(e,t)=>this.create({...t,message:e,type:`error`}),this.success=(e,t)=>this.create({...t,type:`success`,message:e}),this.info=(e,t)=>this.create({...t,type:`info`,message:e}),this.warning=(e,t)=>this.create({...t,type:`warning`,message:e}),this.loading=(e,t)=>this.create({...t,type:`loading`,message:e}),this.promise=(e,t)=>{if(!t)return;let n;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],N.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(dre(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!N.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=$z(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},ure=(e,t)=>eB.message(e,t),dre=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,tB=Object.assign(ure,{success:eB.success,info:eB.info,warning:eB.warning,error:eB.error,custom:eB.custom,message:eB.message,promise:eB.promise,dismiss:eB.dismiss,loading:eB.loading},{getHistory:()=>eB.toasts,getToasts:()=>eB.getActiveToasts()});Qne(`[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px;flex:1;min-width:0}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{-webkit-user-select:none;user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}`);function nB(e){return e.label!==void 0}var fre=3,pre=`24px`,mre=`16px`,rB=4e3,hre=356,gre=14,_re=45,vre=200;function iB(...e){return e.filter(Boolean).join(` `)}function yre(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var bre=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=N.useState(null),[O,k]=N.useState(null),[A,j]=N.useState(!1),[M,ee]=N.useState(!1),[te,P]=N.useState(!1),[F,ne]=N.useState(!1),[re,ie]=N.useState(!1),[ae,I]=N.useState(0),[oe,se]=N.useState(0),ce=N.useRef(n.duration||y||rB),le=N.useRef(null),ue=N.useRef(null),de=c===0,fe=c+1<=o,pe=n.type,me=pe??`default`,he=n.dismissible!==!1,ge=n.className||``,_e=n.descriptionClassName||``,ve=N.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),ye=N.useMemo(()=>n.closeButton??p,[n.closeButton,p]),be=N.useMemo(()=>n.duration||y||rB,[n.duration,y]),xe=N.useRef(0),Se=N.useRef(0),Ce=N.useRef(0),we=N.useRef(null),[Te,Ee]=b.split(`-`),De=N.useMemo(()=>s.reduce((e,t,n)=>n>=ve?e:e+t.height,0),[s,ve]),Oe=sre(),ke=N.useMemo(()=>e.swipeDirections??yre(b),[e.swipeDirections,b]),Ae=n.invert||t,je=pe===`loading`;Se.current=N.useMemo(()=>ve*x+De,[ve,De]),N.useEffect(()=>{ce.current=be},[be]),N.useEffect(()=>{j(!0)},[]),N.useEffect(()=>{let e=ue.current;if(e){let t=e.getBoundingClientRect().height;return se(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),N.useLayoutEffect(()=>{if(!A)return;let e=ue.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,se(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Me=N.useCallback(()=>{ee(!0),I(Se.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},vre)},[n,d,a,Se]);N.useEffect(()=>{if(n.promise&&pe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||Oe?(()=>{if(Ce.current<xe.current){let e=new Date().getTime()-xe.current;ce.current-=e}Ce.current=new Date().getTime()})():ce.current!==1/0&&(xe.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Me()},ce.current)),()=>clearTimeout(e)},[u,i,n,pe,Oe,Me]),N.useEffect(()=>{n.delete&&(Me(),n.onDismiss==null||n.onDismiss.call(n,n))},[Me,n.delete]);function Ne(){return w?.loading?N.createElement(`div`,{className:iB(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":pe===`loading`},w.loading):N.createElement(tre,{className:iB(C?.loader,n?.classNames?.loader),visible:pe===`loading`})}let Pe=n.icon||w?.[pe]||$ne(pe);return N.createElement(`li`,{tabIndex:0,ref:ue,className:iB(_,ge,C?.toast,n?.classNames?.toast,C?.[me],n?.classNames?.[me]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":re,"data-removed":M,"data-visible":fe,"data-y-position":Te,"data-x-position":Ee,"data-index":c,"data-front":de,"data-swiping":te,"data-dismissible":he,"data-type":pe,"data-invert":Ae,"data-swipe-out":F,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?ae:Se.current}px`,"--initial-height":S?`auto`:`${oe}px`,...m,...n.style},onDragEnd:()=>{P(!1),D(null),we.current=null},onPointerDown:e=>{e.button!==2&&(je||!he||(le.current=new Date,I(Se.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(P(!0),we.current={x:e.clientX,y:e.clientY})))},onPointerUp:()=>{if(F||!he)return;we.current=null;let e=Number(ue.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(ue.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-le.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if((E===`x`?ke.includes(e>0?`right`:`left`):ke.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=_re||a>.11)){I(Se.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Me(),ne(!0);return}var o,s;(o=ue.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=ue.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),ie(!1),P(!1),D(null)},onPointerMove:e=>{var t,n;if(!we.current||!he||window.getSelection()?.toString().length>0)return;let r=e.clientY-we.current.y,i=e.clientX-we.current.x;!E&&(Math.abs(i)>1||Math.abs(r)>1)&&D(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(ke.includes(`top`)||ke.includes(`bottom`)){if(ke.includes(`top`)&&r<0||ke.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(E===`x`&&(ke.includes(`left`)||ke.includes(`right`))){if(ke.includes(`left`)&&i<0||ke.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&ie(!0),(t=ue.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=ue.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},ye&&!n.jsx&&pe!==`loading`?N.createElement(`button`,{"aria-label":T,"data-disabled":je,"data-close-button":!0,onClick:je||!he?()=>{}:()=>{Me(),n.onDismiss==null||n.onDismiss.call(n,n)},className:iB(C?.closeButton,n?.classNames?.closeButton)},w?.close??ore):null,(pe||n.icon||n.promise)&&n.icon!==null&&(w?.[pe]!==null||n.icon)?N.createElement(`div`,{"data-icon":``,className:iB(C?.icon,n?.classNames?.icon)},pe===`loading`?n.icon||Ne():n.promise?Ne():null,pe===`loading`?null:Pe):null,N.createElement(`div`,{"data-content":``,className:iB(C?.content,n?.classNames?.content)},N.createElement(`div`,{"data-title":``,className:iB(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?N.createElement(`div`,{"data-description":``,className:iB(v,_e,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),N.isValidElement(n.cancel)?n.cancel:n.cancel&&nB(n.cancel)?N.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{nB(n.cancel)&&he&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Me())},className:iB(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,N.isValidElement(n.action)?n.action:n.action&&nB(n.action)?N.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{nB(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Me())},className:iB(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function aB(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function xre(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?mre:pre;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var Sre=N.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=fre,toastOptions:g,dir:_=aB(),gap:v=gre,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=N.useState([]),w=N.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),T=N.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=N.useState([]),[O,k]=N.useState(!1),[A,j]=N.useState(!1),[M,ee]=N.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),te=N.useRef(null),P=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),F=N.useRef(null),ne=N.useRef(!1),re=N.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||eB.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return N.useEffect(()=>eB.subscribe(e=>{if(e.dismiss){requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))});return}setTimeout(()=>{ci.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),N.useEffect(()=>{if(d!==`system`){ee(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?ee(`dark`):ee(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{ee(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{ee(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),N.useEffect(()=>{S.length<=1&&k(!1)},[S]),N.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=te.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===te.current||te.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),N.useEffect(()=>{if(te.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,ne.current=!1)}},[te.current]),N.createElement(`section`,{ref:t,"aria-label":b??`${x} ${P}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?N.createElement(`ol`,{key:t,dir:_===`auto`?aB():_,tabIndex:-1,ref:te,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${hre}px`,"--gap":`${v}px`,...m,...xre(l,u)},onBlur:e=>{ne.current&&!e.currentTarget.contains(e.relatedTarget)&&(ne.current=!1,F.current&&=(F.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||ne.current||(ne.current=!0,F.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>N.createElement(bre,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:re,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),Cre=e=>()=>{let t=BF(mI(e));return cA((e,n)=>V(rO(e,e=>t(e))))},wre={"~effect/match/Match/Matcher":{_input:B_,_filters:B_,_result:B_,_return:B_},_tag:`ValueMatcher`,add(e){return Lx(this.value)?this:e._tag===`When`&&e.guard(this.provided)===!0||e._tag===`Not`&&e.guard(this.provided)===!1?oB(this.provided,Nx(e.evaluate(this.provided))):this},pipe(){return L_(this,arguments)}};function oB(e,t){let n=Object.create(wre);return n.provided=e,n.value=t,n}var Tre=(e,t)=>({_tag:`When`,guard:e,evaluate:t}),sB=e=>{if(typeof e==`function`)return e;if(Array.isArray(e)){let t=e.map(sB),n=t.length;return e=>{if(!Array.isArray(e))return!1;for(let r=0;r<n;r++)if(t[r](e[r])===!1)return!1;return!0}}if(typeof e==`object`&&e){let t=Reflect.ownKeys(e).map(t=>[t,sB(e[t])]),n=t.length;return e=>{if(typeof e!=`object`||!e)return!1;for(let r=0;r<n;r++){let[n,i]=t[r];if(!(n in e)||i(e[n])===!1)return!1}return!0}}return t=>t===e},Ere=e=>oB(e,Px(e)),Dre=(e,t)=>n=>n.add(Tre(sB(e),t)),Ore=e=>t=>{let n=kre(t);return tte(n)?n._tag===`Success`?n.success:e(n.failure):t=>{let r=n(t);return Lx(r)?r.success:e(r.failure)}},kre=e=>{if(e._tag===`ValueMatcher`)return e.value;let t=e.cases.length;if(t===1){let t=e.cases[0];return e=>t._tag===`When`&&t.guard(e)===!0||t._tag===`Not`&&t.guard(e)===!1?Nx(t.evaluate(e)):Px(e)}return n=>{for(let r=0;r<t;r++){let t=e.cases[r];if(t._tag===`When`&&t.guard(n)===!0||t._tag===`Not`&&t.guard(n)===!1)return Nx(t.evaluate(n))}return Px(n)}},cB=Ere,lB=Dre,uB=Ore,dB=`~effect/http/Cookies`,fB=`~effect/http/Cookies/Cookie`;ID(`CookieError`);var Are={[dB]:dB,...ny,toJSON(){return{_id:`effect/Cookies`,cookies:Rx(this.cookies,e=>e.toJSON())}},pipe(){return L_(this,arguments)}},jre=e=>{let t=Object.create(Are);return t.cookies=e,t},Mre=e=>{let t={};for(let n of e)ay(t,n.name,n);return jre(t)},Nre=e=>{let t=typeof e==`string`?[e]:e,n=[];for(let e of t){let t=Pre(e.trim());t&&n.push(t)}return Mre(n)};function Pre(e){let t=e.split(`;`).map(e=>e.trim()).filter(e=>e!==``);if(t.length===0)return;let n=t[0].indexOf(`=`);if(n===-1)return;let r=t[0].slice(0,n);if(!Fre.test(r))return;let i=t[0].slice(n+1),a=Ire(i);if(t.length===1)return Object.assign(Object.create(pB),{name:r,value:a,valueEncoded:i});let o={};for(let e=1;e<t.length;e++){let n=t[e],r=n.indexOf(`=`),i=r===-1?n:n.slice(0,r).trim(),a=r===-1?void 0:n.slice(r+1).trim();switch(i.toLowerCase()){case`domain`:{if(a===void 0)break;let e=a.trim().replace(/^\./,``);e&&(o.domain=e);break}case`expires`:{if(a===void 0)break;let e=new Date(a);isNaN(e.getTime())||(o.expires=e);break}case`max-age`:{if(a===void 0)break;let e=parseInt(a,10);isNaN(e)||(o.maxAge=SS(e));break}case`path`:if(a===void 0)break;a[0]===`/`&&(o.path=a);break;case`priority`:if(a===void 0)break;switch(a.toLowerCase()){case`low`:o.priority=`low`;break;case`medium`:o.priority=`medium`;break;case`high`:o.priority=`high`}break;case`httponly`:o.httpOnly=!0;break;case`secure`:o.secure=!0;break;case`partitioned`:o.partitioned=!0;break;case`samesite`:if(a===void 0)break;switch(a.toLowerCase()){case`lax`:o.sameSite=`lax`;break;case`strict`:o.sameSite=`strict`;break;case`none`:o.sameSite=`none`}}}return Object.assign(Object.create(pB),{name:r,value:a,valueEncoded:i,options:Object.keys(o).length>0?o:void 0})}var Fre=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,pB={[fB]:fB,...ny,toJSON(){return{_id:`effect/Cookies/Cookie`,name:this.name,value:this.value,options:this.options}}},Ire=e=>{try{return decodeURIComponent(e)}catch{return e}},mB=Symbol.for(`~effect/http/Headers`),hB=Object.defineProperties(Object.create(null),{[mB]:{value:mB},[Kv]:{value(e){return SB(this,Ox(e,CB))}},toJSON:{value(){return qv(this)}},[Ov]:{value(e){return Lre(this,e)}},[uv]:{value(){return yv(this)}},toString:{value:ny.toString},[ey]:{value:ny[ey]}}),gB=e=>Object.assign(Object.create(hB),e),Lre=ste(ub()),_B=Object.create(hB),vB=e=>{if(e===void 0)return _B;if(Symbol.iterator in e){let t=Object.create(hB);for(let[n,r]of e)t[n.toLowerCase()]=r;return t}let t=Object.create(hB);for(let[n,r]of Object.entries(e))Array.isArray(r)?t[n.toLowerCase()]=r.join(`, `):r!==void 0&&(t[n.toLowerCase()]=r);return t},Rre=e=>Object.setPrototypeOf(e,hB),yB=B(3,(e,t,n)=>{let r=gB(e);return r[t.toLowerCase()]=n,r}),zre=B(2,(e,t)=>gB({...e,...vB(t)})),bB=B(2,(e,t)=>{let n=gB(e);return Object.assign(n,t),n}),xB=B(2,(e,t)=>{let n=gB(e);return delete n[t.toLowerCase()],n}),SB=B(2,(e,t)=>{let n={...e},r=t=>{if(typeof t==`string`){let r=t.toLowerCase();r in e&&(n[r]=kF(e[r]))}else for(let r in e)t.test(r)&&(n[r]=kF(e[r]))};if(Array.isArray(t))for(let e=0;e<t.length;e++)r(t[e]);else r(t);return n}),CB=jx(`effect/Headers/CurrentRedactedNames`,{defaultValue:()=>[`authorization`,`cookie`,`set-cookie`,`x-api-key`]}),wB=`~effect/http/UrlParams`,TB=e=>sv(e,wB),EB={..._y,[wB]:wB,[Symbol.iterator](){return this.params[Symbol.iterator]()},toJSON(){return{_id:`UrlParams`,params:Object.fromEntries(this.params)}},[Ov](e){return AB(this,e)},[uv](){return xv(this.params.flat())}},DB=e=>{let t=Object.create(EB);return t.params=e,t},OB=e=>{if(TB(e))return e;let t=kB(e),n=[];for(let e=0;e<t.length;e++)if(Array.isArray(t[e][0])){let[r,i]=t[e];n.push([`${r[0]}[${r.slice(1).join(`][`)}]`,i])}else n.push(t[e]);return DB(n)},kB=e=>{let t=typeof e[Symbol.iterator]==`function`?Vx(e):Object.entries(e),n=[];for(let[e,r]of t)if(Array.isArray(r))for(let t=0;t<r.length;t++)r[t]!==void 0&&n.push([e,String(r[t])]);else if(typeof r==`object`){let t=kB(r);for(let[r,i]of t)n.push([[e,...typeof r==`string`?[r]:r],i])}else r!==void 0&&n.push([e,String(r)]);return n},AB=cb((e,t)=>jB(e.params,t.params)),jB=Xx(ite([ub(),ub()])),MB=NF(TB,{representation:{id:`effect/http/UrlParams`,payload:null},toCode:()=>({runtime:`UrlParams.UrlParamsSchema`,Type:`UrlParams.UrlParams`,importDeclarations:[`import * as UrlParams from "effect/unstable/http/UrlParams"`]}),expected:`UrlParams`,toEquivalence:()=>AB,toCodec:()=>II()(K(pI([U,U])),FM({decode:DB,encode:e=>e.params}))}),NB=DB([]),PB=B(2,(e,t)=>DB(t(e.params))),FB=B(2,(e,t)=>{let n=OB(t),r=n.params,i=new Set;for(let e=0;e<r.length;e++)i.add(r[e][0]);for(let t=0;t<e.params.length;t++)i.has(e.params[t][0])||r.push(e.params[t]);return n}),IB=B(2,(e,t)=>PB(e,Wx(OB(t).params))),LB=e=>new URLSearchParams(OB(e).params).toString(),RB=MB.pipe(CI(dI(U,gI([U,mI(U)])),FM({decode:e=>{let t={};for(let[n,r]of e.params)if(!Object.hasOwn(t,n))ay(t,n,r);else{let e=t[n];typeof e==`string`?ay(t,n,[e,r]):e.push(r)}return t},encode:OB}))),zB=`~effect/http/HttpBody`,BB=e=>sv(e,zB);ID(`HttpBodyError`);var VB=class{[zB];constructor(){this[zB]=zB}[ey](){return this.toJSON()}toString(){return Zv(this,{ignoreToString:!0})}},HB=new class extends VB{_tag=`Empty`;toJSON(){return{_id:`effect/HttpBody`,_tag:`Empty`}}},UB=class extends VB{_tag=`Uint8Array`;body;contentType;contentLength;constructor(e,t,n){super(),this.body=e,this.contentType=t,this.contentLength=n}toJSON(){return{_id:`effect/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}}},WB=(e,t)=>new UB(e,t??`application/octet-stream`,e.length),GB=new TextEncoder,KB=(e,t)=>WB(GB.encode(e),t??`text/plain`),qB=(e,t)=>KB(LB(OB(e)),t??`application/x-www-form-urlencoded`),JB=class extends VB{_tag=`FormData`;contentType=void 0;contentLength=void 0;formData;constructor(e){super(),this.formData=e}toJSON(){return{_id:`effect/HttpBody`,_tag:`FormData`,formData:this.formData}}},YB=e=>new JB(e),XB=`~effect/http/HttpClientError`,ZB=e=>sv(e,XB),QB=class extends ID(`HttpClientError`){constructor(e){`cause`in e.reason?super({...e,cause:e.reason.cause}):super(e)}[XB]=XB;get request(){return this.reason.request}get response(){return`response`in this.reason?this.reason.response:void 0}get message(){return this.reason.message}},$B=e=>e.endsWith(`Error`)?e.slice(0,-5):e,eV=(e,t,n)=>t?`${e}: ${t} (${n})`:`${e} error (${n})`,tV=class extends ID(`TransportError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return eV($B(this._tag),this.description,this.methodAndUrl)}};ID(`EncodeError`);var nV=class extends ID(`InvalidUrlError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){return eV($B(this._tag),this.description,this.methodAndUrl)}},rV=class extends ID(`StatusCodeError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return eV($B(this._tag),this.description,e)}},iV=class extends ID(`DecodeError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return eV($B(this._tag),this.description,e)}},aV=class extends ID(`EmptyBodyError`){get methodAndUrl(){return`${this.request.method} ${this.request.url}`}get message(){let e=`${this.response.status} ${this.methodAndUrl}`;return eV($B(this._tag),this.description,e)}};BL(XB)({_tag:jI(`HttpError`),kind:_I([`EncodeError`,`DecodeError`,`TransportError`,`InvalidUrlError`,`StatusCodeError`,`EmptyBodyError`]),cause:H(hL())});var oV=e=>e!==`GET`&&e!==`HEAD`&&e!==`OPTIONS`&&e!==`TRACE`,sV=[[`GET`,`get`],[`POST`,`post`],[`PUT`,`put`],[`DELETE`,`del`],[`PATCH`,`patch`],[`HEAD`,`head`],[`OPTIONS`,`options`],[`TRACE`,`trace`]],cV=(e,t)=>t._tag===`Empty`||t._tag===`FormData`?xB(xB(e,`content-type`),`content-length`):(e=t.contentType===void 0?xB(e,`content-type`):yB(e,`content-type`,t.contentType),t.contentLength===void 0?xB(e,`content-length`):yB(e,`content-length`,t.contentLength.toString())),lV=class extends ID(`UrlError`){},uV=(e,t,n)=>Fx({try:()=>{let r=new URL(e,dV());for(let e=0;e<t.params.length;e++){let[n,i]=t.params[e];i!==void 0&&r.searchParams.append(n,i)}return n!==void 0&&(r.hash=n),r},catch:e=>new lV({cause:e})}),dV=()=>{if(`location`in globalThis&&globalThis.location!==void 0&&globalThis.location.origin!==void 0&&globalThis.location.pathname!==void 0)return location.origin+location.pathname},fV=`~effect/http/HttpClientRequest`,pV={[fV]:fV,...ny,toJSON(){return{_id:`HttpClientRequest`,method:this.method,url:this.url,urlParams:this.urlParams,hash:this.hash,headers:qv(this.headers),body:this.body.toJSON()}},pipe(){return L_(this,arguments)}};function mV(e,t,n,r,i,a){let o=Object.create(pV);return o.method=e,o.url=t,o.urlParams=n,o.hash=r,o.headers=i,o.body=a,o}var hV=mV(`GET`,``,NB,Bb(),_B,HB),gV=e=>(t,n)=>_V(hV,{method:e,url:t,...n??void 0}),_V=B(2,(e,t)=>{let n=e;return t.method&&(n=vV(n,t.method)),t.url&&(n=CV(n,t.url)),t.headers&&(n=bV(n,t.headers)),t.urlParams&&(n=EV(n,t.urlParams)),t.hash&&(n=OV(n,t.hash)),t.body&&(n=kV(n,t.body)),t.accept&&(n=xV(n,t.accept)),t.acceptJson&&(n=SV(n)),n}),vV=B(2,(e,t)=>mV(t,e.url,e.urlParams,e.hash,e.headers,e.body)),yV=B(3,(e,t,n)=>mV(e.method,e.url,e.urlParams,e.hash,yB(e.headers,t,n),e.body)),bV=B(2,(e,t)=>mV(e.method,e.url,e.urlParams,e.hash,zre(e.headers,t),e.body)),xV=B(2,(e,t)=>yV(e,`Accept`,t)),SV=xV(`application/json`),CV=B(2,(e,t)=>{if(typeof t==`string`)return mV(e.method,t,e.urlParams,e.hash,e.headers,e.body);let n=new URL(t.toString()),r=OB(n.searchParams),i=Jb(n.hash===``?void 0:n.hash.slice(1));return n.search=``,n.hash=``,mV(e.method,n.toString(),r,i,e.headers,e.body)}),wV=B(2,(e,t)=>t===``?e:mV(e.method,TV(t,e.url),e.urlParams,e.hash,e.headers,e.body)),TV=(e,t)=>{let n=e.endsWith(`/`),r=t.startsWith(`/`);return n&&r?e+t.slice(1):!n&&!r?e+`/`+t:e+t},EV=B(2,(e,t)=>mV(e.method,e.url,FB(e.urlParams,t),e.hash,e.headers,e.body)),DV=B(2,(e,t)=>mV(e.method,e.url,IB(e.urlParams,t),e.hash,e.headers,e.body)),OV=B(2,(e,t)=>mV(e.method,e.url,e.urlParams,Vb(t),e.headers,e.body)),kV=B(2,(e,t)=>mV(e.method,e.url,e.urlParams,e.hash,cV(e.headers,t),t)),AV=B(2,(e,t)=>kV(e,YB(t))),jV=`~effect/http/HttpIncomingMessage`,MV=(e,t)=>{let n=e.headers[`content-type`]??``,r;if(n.includes(`application/json`))try{r=PO(e.json)}catch{}else if(n.includes(`text/`)||n.includes(`urlencoded`))try{r=PO(e.text)}catch{}let i={...t,headers:qv(e.headers),remoteAddress:e.remoteAddress};return r!==void 0&&(i.body=r),i},NV=`~effect/http/HttpClientResponse`,PV=(e,t)=>new IV(e,t),FV=B(2,(e,t)=>{let 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)}),IV=class extends Jee{[jV];[NV];request;source;constructor(e,t){super(),this.request=e,this.source=t,this[jV]=jV,this[NV]=NV}toJSON(){return MV(this,{_id:`HttpClientResponse`,request:this.request.toJSON(),status:this.status})}get status(){return this.source.status}get headers(){return vB(this.source.headers)}cachedCookies;get cookies(){return this.cachedCookies?this.cachedCookies:this.cachedCookies=Nre(this.source.headers.getSetCookie())}get remoteAddress(){return Bb()}get stream(){return this.source.body?vR({evaluate:()=>this.source.body,onError:e=>new QB({reason:new iV({request:this.request,response:this,cause:e})})}):hR(new QB({reason:new aV({request:this.request,response:this,description:`can not create stream from empty body`})}))}get json(){return rO(this.text,e=>tO({try:()=>e===``?null:JSON.parse(e),catch:e=>new QB({reason:new iV({request:this.request,response:this,cause:e})})}))}textBody;get text(){return this.textBody??=sO(this.arrayBuffer,e=>new TextDecoder().decode(e))}get urlParamsBody(){return rO(this.text,e=>tO({try:()=>OB(new URLSearchParams(e)),catch:e=>new QB({reason:new iV({request:this.request,response:this,cause:e})})}))}formDataBody;get formData(){return this.formDataBody??=WD({try:()=>this.source.formData(),catch:e=>new QB({reason:new iV({request:this.request,response:this,cause:e})})}).pipe(xO,PO)}arrayBufferBody;get arrayBuffer(){return this.arrayBufferBody||=WD({try:()=>this.source.arrayBuffer(),catch:e=>new QB({reason:new iV({request:this.request,response:this,cause:e})})}).pipe(xO,PO),this.arrayBufferBody}pipe(){return L_(this,arguments)}},LV=e=>Rre({b3:`${e.traceId}-${e.spanId}-${e.sampled?`1`:`0`}${Gb(e.parent,{onNone:()=>``,onSome:e=>`-${e.spanId}`})}`,traceparent:`00-${e.traceId}-${e.spanId}-${e.sampled?`01`:`00`}`}),RV=`~effect/http/HttpClient`,zV=ix(`effect/HttpClient`),BV=B(2,(e,t)=>VV(n=>t(e.postprocess(n)),e.preprocess)),VV=(e,t)=>{let n=Object.create(HV);return n.preprocess=t,n.postprocess=e,n.execute=function(n){return e(t(n))},n},HV={[RV]:RV,pipe(){return L_(this,arguments)},...ny,toJSON(){return{_id:`effect/HttpClient`}},...Object.fromEntries(sV.map(([e,t])=>[t,function(t,n){return this.execute(gV(e)(t,n))}]))},UV=e=>VV(t=>rO(t,t=>nO(n=>{let r=QV.get(t),i=r??new AbortController,a=uV(t.url,t.urlParams,Xb(t.hash));if(Ix(a))return QD(new QB({reason:new nV({request:t,cause:a.failure})}));let o=a.success;if(n.getRef(qS)||n.getRef(KV)(t)){let a=e(t,o,i.signal,n);return r?a:TO(e=>dO(e(a),{onSuccess(e){return ZV.register(e,i),V(new $V(e,i))},onFailure(e){return XE(e)&&i.abort(),$D(e)}}))}return DO(n.getRef(YV)(t),{kind:`client`},a=>{a.attribute(`http.request.method`,t.method),a.attribute(`server.address`,o.origin),o.port!==``&&a.attribute(`server.port`,+o.port),a.attribute(`url.full`,o.toString()),a.attribute(`url.path`,o.pathname),a.attribute(`url.scheme`,o.protocol.slice(0,-1));let s=o.search.slice(1);s!==``&&a.attribute(`url.query`,s);let c=n.getRef(CB),l=n.getRef(qV),u=SB(t.headers,c);for(let e in u)l(e,`request`)&&a.attribute(`http.request.header.${e}`,String(u[e]));return t=n.getRef(JV)?bV(t,LV(a)):t,TO(s=>s(e(t,o,i.signal,n)).pipe(OO(a,{captureStackTrace:!1}),dO({onSuccess:e=>{a.attribute(`http.response.status_code`,e.status);let t=SB(e.headers,c);for(let e in t)l(e,`response`)&&a.attribute(`http.response.header.${e}`,String(t[e]));return r?V(e):(ZV.register(e,i),V(new $V(e,i)))},onFailure(e){return!r&&XE(e)&&i.abort(),$D(e)}})))})})),V),WV=B(2,(e,t)=>VV(e.postprocess,n=>sO(e.preprocess(n),t))),GV=B(2,(e,t)=>VV(e.postprocess,n=>rO(e.preprocess(n),t))),KV=jx(`effect/http/HttpClient/TracerDisabledWhen`,{defaultValue:()=>U_}),qV=jx(`effect/http/HttpClient/TracerHeaderFilter`,{defaultValue:()=>H_}),JV=jx(`effect/HttpClient/TracerPropagationEnabled`,{defaultValue:H_}),YV=jx(`effect/http/HttpClient/SpanNameGenerator`,{defaultValue:()=>e=>`http.client ${e.method}`}),XV=e=>OD(zV)(pO(t=>sO(e,e=>BV(e,hO(e=>Ax(t,e)))))),ZV=(()=>{if(`FinalizationRegistry`in globalThis&&globalThis.FinalizationRegistry){let e=new FinalizationRegistry(e=>{e.abort()});return{register(t,n){e.register(t,n,t)},unregister(t){e.unregister(t)}}}let e=new Map;return{register(t,n){e.set(t,setTimeout(()=>n.abort(),5e3))},unregister(t){let n=e.get(t);n!==void 0&&(clearTimeout(n),e.delete(t))}}})(),QV=new WeakMap,$V=class{original;controller;constructor(e,t){this.original=e,this.controller=t}[NV]=NV;[jV]=jV;applyInterrupt(e){return KD(()=>(ZV.unregister(this.original),CO(e,()=>qD(()=>{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 mR(()=>(ZV.unregister(this.original),wR(this.original.stream,qD(()=>{this.controller.abort()}))))}toJSON(){return this.original.toJSON()}[ey](){return this.original[ey]()}pipe(){return L_(this,arguments)}},eH=jx(`effect/http/FetchHttpClient/Fetch`,{defaultValue:()=>globalThis.fetch}),tH=class extends ix()(`effect/http/FetchHttpClient/RequestInit`){},nH=XV(V(UV((e,t,n,r)=>{let i=r.getRef(eH),a=Tx(r.context,tH)??{},o=a.headers?bB(vB(a.headers),e.headers):e.headers;o[`content-length`]&&(o=xB(o,`content-length`));let s=r=>sO(WD({try:()=>i(t,{...a,method:e.method,headers:o,body:r,duplex:e.body._tag===`Stream`?`half`:void 0,signal:n}),catch:t=>new QB({reason:new tV({request:e,cause:t})})}),t=>PV(e,t));switch(e.body._tag){case`Raw`:case`Uint8Array`:return s(e.body.body);case`FormData`:return s(e.body.formData);case`Stream`:return rO(kR(e.body.stream),s)}return s(void 0)})));({..._y}),ID(`HttpServerError`),ID(`RequestParseError`),ID(`RouteNotFound`),ID(`InternalError`),ID(`ResponseError`),ID(`ServeError`),ix()(`effect/http/HttpServerError/ClientAbort`);var rH=new Uint8Array(256);for(let e of"!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ")rH[e.charCodeAt(0)]=1;var iH=new Uint8Array(256);iH[9]=1;for(let e=32;e<=126;e++)iH[e]=1;for(let e=128;e<=255;e++)iH[e]=1;ID(`MultipartError`);var aH=ix(`effect/http/HttpServerRequest`);ix()(`effect/http/ParsedSearchParams`);var oH=new WeakSet,sH=e=>nO(t=>{let n=Dx(t.context,aH);return oH.add(n.source),e}),cH=ix(`effect/http/HttpRouter`);ix()(`effect/http/HttpRouter/RouteContext`);var lH=e=>e.endsWith(`/`)?e.slice(0,-1):e,uH=B(2,(e,t)=>(t=lH(t),e===`*`?`${t}/*`:e===`/`?t:t+e)),dH=`~effect/http/HttpRouter/Middleware`,fH=function(){return arguments.length===0?pH:pH(arguments[0],arguments[1])},pH=(e,t)=>t?.global?xte(ZD(function*(){let t=yield*cH,n=HD(e)?yield*e:e;yield*t.addGlobalMiddleware(n)})):new gH(HD(e)?AD(sO(e,e=>_x(new Map([[hH,e]])))):DD(_x(new Map([[hH,e]])))),mH=0,hH=`effect/http/HttpRouter/MiddlewareFn`,gH=class e{[dH]={};layerFn;dependencies;constructor(e,t){this.layerFn=e,this.dependencies=t;let n=`effect/http/HttpRouter/Middleware-${++mH}`;this.layer=AD(ZD({self:this},function*(){let e=yield*fO(),t=[Ex(e,hH)];if(this.dependencies){let n=yield*TD,r=Ox(e,pD),i=yield*ED(this.dependencies,n,r);t.push(...vH(i))}return _x(new Map([[n,t]]))})).pipe(ND(this.layerFn))}layer;combine(t){return new e(this.layerFn,this.dependencies?PD(this.dependencies,t.layer):t.layer)}},_H=new WeakMap,vH=e=>{let t=_H.get(e);if(t)return t;let n=qx(),r=0;for(let[t,i]of e.mapUnsafe)t.startsWith(`effect/http/HttpRouter/Middleware-`)&&(n.push(i),i.length>r&&(r=i.length));if(n.length===0)t=[];else{let e=new Set;for(let t=r-1;t>=0;t--)for(let r of n)t<r.length&&e.add(r[t]);t=Vx(e).reverse()}return _H.set(e,t),t};fH(sH).layer;var yH={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,OK:200,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511},bH=e=>yH[e],xH=`~effect/httpapi/HttpApiSchema/Stream`;function SH(e){let t=typeof e==`string`?bH(e):e;return e=>e.annotate({httpApiStatus:t})}var CH=(e=>lI.pipe(SH(e)))(204),wH=e=>$F(e)&&sv(e,xH),TH=e=>wH(e)&&e._tag===`StreamSse`,EH=e=>wH(e)&&e._tag===`StreamUint8Array`,DH=`~effect/httpapi/HttpApiSchema/WithHeaders`,OH=`~effect/httpapi/HttpApiSchema/WithHeadersValue`,kH=e=>({[OH]:OH,body:e.body,headers:e.headers}),AH=e=>$F(e)&&sv(e,`~effect/httpapi/HttpApiSchema/WithHeaders`);function jH(e,t,n){return QF(e.ast,{[DH]:DH,schema:t,headers:n})}function MH(e,t){return e.annotate({"~httpApiEncoding":{_tag:t._tag,contentType:t.contentType??NH(t._tag)}})}function NH(e){switch(e){case`Multipart`:return`multipart/form-data`;case`Json`:return`application/json`;case`FormUrlEncoded`:return`application/x-www-form-urlencoded`;case`Uint8Array`:return`application/octet-stream`;case`Text`:return`text/plain`}}function PH(e){return t=>MH(t,{_tag:`FormUrlEncoded`,...e})}var FH=e=>{if(HM(e)||HM(TP(e)))return!0;let t=e.encoding?.[0].to;return t!==void 0&&HM(t)},IH=VP(`~httpApiEncoding`),LH=VP(`~httpApiWithHeaders`),RH=VP(`httpApiStatus`),zH={_tag:`Json`,contentType:`application/json`},BH={_tag:`FormUrlEncoded`,contentType:`application/x-www-form-urlencoded`};function VH(e){return IH(e)??zH}function HH(e,t){return IH(e)||(oV(t)?zH:BH)}function UH(e){let t=VH(e);if(t._tag===`Multipart`)throw Error(`Multipart is not supported in response`);return t}function WH(e){return RH(e)??200}function GH(e){return AH(e)?RH(e.ast)??WH(e.schema.ast):WH(e.ast)}function KH(e){return AH(e)&&IH(e.ast)===void 0?UH(e.schema.ast):UH(e.ast)}function qH(e){return RH(e)??500}function JH(e){return AH(e)?RH(e.ast)??qH(e.schema.ast):qH(e.ast)}function YH(e){let t=e.toLowerCase().trim(),n=t.indexOf(`;`);return n===-1?t:t.slice(0,n).trim()}var XH=`~effect/httpapi/HttpApiEndpoint`;function ZH(e){let t=[];for(let{schemas:n}of e.payload.values())t.push(...n);return t}function QH(e){let t=Array.from(e.success);return Gx(t)?t:[CH]}function $H(e){let t=new Set(e.error);for(let n of e.middlewares){let e=n;for(let n of e.error)t.add(n)}return Array.from(t)}var eU={[XH]:XH,pipe(){return L_(this,arguments)},prefix(e){return nU({...tU(this),path:uH(this.path,e)})},middleware(e){return nU({...tU(this),middlewares:new Set([...this.middlewares,e])})},annotate(e,t){return nU({...tU(this),annotations:wx(this.annotations,e,t)})},annotateMerge(e){return nU({...tU(this),annotations:Ax(this.annotations,e)})}},tU=e=>({identifier:e.identifier,path:e.path,method:e.method,params:e.params,query:e.query,headers:e.headers,payload:e.payload,success:e.success,error:e.error,annotations:e.annotations,middlewares:e.middlewares});function nU(e){function t(){}return Object.setPrototypeOf(t,eU),Object.assign(t,e)}var rU=e=>(t,n,r)=>{let i=r?.disableCodecs??!1,a=i?B_:YL;return nU({identifier:t,path:n,method:e,params:iU(r?.params,a),query:iU(r?.query,a),headers:iU(r?.headers,a),payload:aU(r?.payload,e,i),success:sU(r?.success,e,i),error:lU(r?.error,i),annotations:Sx(),middlewares:new Set})};function iU(e,t){if(e!==void 0)return $F(e)?t(e):t(G(e))}function aU(e,t,n){let r=new Map;if(e===void 0)return r;let i=Array.isArray(e)?e:$F(e)?[e]:[G(e).pipe(PH())],a=n?B_:yU;for(let e of i){let n=HH(e.ast,t),i=YH(n.contentType),o=r.get(i);if(o){if(o.encoding._tag!==n._tag)throw Error(`Multiple payload encodings for content-type: ${n.contentType}`);if(o.encoding._tag===`Multipart`)throw Error(`Multiple multipart payloads for content-type: ${n.contentType}`);o.schemas.push(a(e,t))}else r.set(i,{encoding:n,schemas:[a(e,t)]})}return r}var oU=`effect/httpapi/stream/failure`;function sU(e,t,n){if(e===void 0)return new Set;let r=Hx(e);return uU(r,t),new Set(n?r:r.map(cU))}function cU(e){return wH(e)?e:AH(e)?jH(e,wH(e.schema)?e.schema:vU(e.schema,KH(e)),YL(e.headers)):_U(e)}function lU(e,t){if(e===void 0)return new Set;let n=Hx(e);for(let e of n)if(wH(AH(e)?e.schema:e))throw Error(`Streaming schemas are not supported in error responses`);return fU(n,JH),new Set(t?n:n.map(cU))}function uU(e,t){let n=!1,r=new Map;for(let i of e){let e=AH(i)?i.schema:i,a=GH(i);if(wH(e)){if(pU(e,t),n)throw Error(`Multiple streaming success responses are not supported`);n=!0;let i=dU(r,a);if(i.noContent)throw Error(`Cannot combine no-content and streaming success responses for status: ${a}`);if(i.bufferedContentTypes.has(YH(e.contentType)))throw Error(`Cannot combine buffered and streaming success responses for status ${a} and content-type: ${e.contentType}`);r.set(a,{...i,stream:e})}else{let t=dU(r,a),n=FH(e.ast);if(t.stream!==void 0){if(n)throw Error(`Cannot combine no-content and streaming success responses for status: ${a}`);let e=KH(i);if(YH(e.contentType)===YH(t.stream.contentType))throw Error(`Cannot combine buffered and streaming success responses for status ${a} and content-type: ${e.contentType}`)}n||t.bufferedContentTypes.add(YH(KH(i).contentType)),t.noContent=t.noContent||n}}fU(e,GH)}function dU(e,t){let n=e.get(t);return n===void 0&&(n={bufferedContentTypes:new Set,noContent:!1},e.set(t,n)),n}function fU(e,t){let n=new Map;for(let r of e){let e=t(r),i=LH(r.ast),a=AH(r)?r.schema:i?.body??r,o=FH(a.ast)?``:YH(wH(a)?a.contentType:KH(r).contentType),s=n.get(e);s===void 0&&(s={headerContentType:void 0,plainContentTypes:new Set},n.set(e,s));let c=()=>Error(`Cannot combine a response with headers with another response for status ${e} and content-type: ${o||`<no content>`}`);if(AH(r)||i!==void 0){if(s.headerContentType!==void 0)throw Error(`Cannot declare multiple responses with headers for status ${e}`);if(s.plainContentTypes.has(o))throw c();s.headerContentType=o}else{if(s.headerContentType===o)throw c();s.plainContentTypes.add(o)}}}function pU(e,t){if(t===`HEAD`)throw Error(`HEAD endpoints cannot declare streaming success responses`);if(TH(e)&&mU(e.events.ast))throw Error(`SSE event name is reserved: ${oU}`)}function mU(e){return hU(TP(e),new Set)}function hU(e,t){if(t.has(e))return!1;if(t.add(e),KM(e))return e.types.some(e=>hU(e,t));if(qM(e))return hU(e.thunk(),t);if(!GM(e))return!1;let n=e.propertySignatures.find(e=>e.name===`event`);return n!==void 0&&gU(n.type,t)}function gU(e,t){if(t.has(e))return!1;t.add(e);let n=TP(e);return n===e?UM(e)?e.literal===oU:KM(e)?e.types.some(e=>gU(e,t)):qM(e)?gU(e.thunk(),t):!1:gU(n,t)}function _U(e){let t=UH(e.ast),n=LH(e.ast);if(n===void 0)return vU(e,t);let r=nI(n.headers);return G({body:vU(nI(n.body),t),headers:r}).pipe(CI(e)).annotate({"~httpApiWithHeaders":{...n,headersCodec:YL(r)}})}function vU(e,t){switch(t._tag){case`Json`:return HL(e);case`FormUrlEncoded`:return YL(e);case`Text`:case`Uint8Array`:return e}}function yU(e,t){switch(HH(e.ast,t)._tag){case`Json`:return HL(e);case`FormUrlEncoded`:return YL(e);case`Text`:case`Uint8Array`:case`Multipart`:return e}}var bU=rU(`GET`),xU=rU(`POST`),SU=rU(`PUT`),CU=rU(`DELETE`),wU=`~effect/httpapi/HttpApi`,TU={[wU]:wU,pipe(){return L_(this,arguments)},add(...e){let t={...this.groups};for(let n of e)ay(t,n.identifier,n);return DU({...EU(this),groups:t})},addHttpApi(e){let t={...this.groups};for(let n of Object.keys(e.groups)){let r=e.groups[n];ay(t,n,r.annotateMerge(Ax(e.annotations,r.annotations)))}return DU({...EU(this),groups:t})},prefix(e){return DU({...EU(this),groups:Rx(this.groups,t=>t.prefix(e))})},middleware(e){return DU({...EU(this),groups:Rx(this.groups,t=>t.middleware(e))})},annotate(e,t){return DU({...EU(this),annotations:wx(this.annotations,e,t)})},annotateMerge(e){return DU({...EU(this),annotations:Ax(this.annotations,e)})}},EU=e=>({identifier:e.identifier,groups:e.groups,annotations:e.annotations}),DU=e=>{function t(){}return Object.setPrototypeOf(t,TU),Object.assign(t,e)},OU=e=>DU({identifier:e,groups:{},annotations:Sx()}),kU=(e,t)=>{let n=Object.values(e.groups);for(let r of n){let n=Ax(e.annotations,r.annotations);t.onGroup({group:r,mergedAnnotations:n});let i=Object.values(r.endpoints);for(let e of i)t.predicate&&!t.predicate({endpoint:e,group:r})||t.onEndpoint({group:r,endpoint:e,middleware:e.middlewares,mergedAnnotations:Ax(n,e.annotations),successes:AU(QH(e),GH),errors:AU($H(e),JH)})}},AU=(e,t)=>{let n=new Map;return e.forEach(r),n;function r(e){if(wH(AH(e)?e.schema:e))return;let r=t(e),i=n.get(r);i===void 0?n.set(r,[e]):i.push(e)}};ix()(`effect/httpapi/HttpApi/AdditionalSchemas`);var jU=`~effect/encoding/Sse/SseError`,MU=class extends ID(`EventTooLarge`){get message(){return`Pending SSE event exceeded the maximum size of ${this.maxEventSize}`}},NU=class extends ID(`SseError`){[jU]=jU;get message(){return this.reason.message}},PU=10485760,FU=e=>cA((t,n)=>qD(()=>{let n=[],r,i=LU(e=>{e._tag===`Retry`?r=e:n.push(e)},e),a=rO(t,e=>{for(let t=0;t<e.length;t++){let n=i.feed(e[t]);if(n!==void 0)return QD(n)}return JD});return KD(function e(){if(Gx(n)){let e=n;return n=[],V(e)}return r?QD(r):rO(a,e)})})),IU=(e,t)=>AA(FU(t),Cre(zU.pipe(CI(e)))());function LU(e,t){let n=t?.maxEventSize??PU,r,i,a,o,s,c,l,u;return d(),{feed:f,reset:d};function d(){r=!0,i=``,a=0,o=-1,s=!1,c=void 0,l=void 0,u=``}function f(e){i=i?i+e:e,r&&i.startsWith(RU)&&(i=i.slice(RU.length)),r=!1;let t=i.length,c=0;for(;c<t;){s&&=(i[c]===`
58
- `&&++c,!1);let e=-1,n=o,r;for(let o=a;e<0&&o<t;++o)r=i[o],r===`:`&&n<0?n=o-c:r===`\r`?(s=!0,e=o-c):r===`
59
- `&&(e=o-c);if(e<0){a=t-c,o=n;break}a=0,o=-1,p(i,c,n,e),c+=e+1}if(c===t?i=``:c>0&&(i=i.slice(c)),i.length+u.length>n){let e=new NU({reason:new MU({maxEventSize:n})});return d(),e}}function p(t,n,r,i){if(i===0){u.length>0&&(e({_tag:`Event`,id:c,event:l||`message`,data:u.slice(0,-1)}),u=``),l=void 0;return}let a=r<0,o=t.slice(n,n+(a?i:r)),s=0;s=a?i:t[n+r+1]===` `?r+2:r+1;let d=n+s,f=i-s,p=t.slice(d,d+f).toString();o===`data`?u+=p?`${p}\n`:`
60
- `:o===`event`?l=p:o===`id`&&!p.includes(`\0`)?c=p:o===`retry`&&/^\d+$/.test(p)&&e(new VU({duration:xS(parseInt(p,10)),lastEventId:c}))}}var RU=``,zU=G({id:H(U),event:U,data:U}),BU=`~effect/encoding/Sse/Retry`,VU=class e extends Cte(`Retry`){[BU]=BU;static is(e){return sv(e,BU)}static filter(t){return e.is(t)?Nx(t):Px(t)}},HU=`~effect/httpapi/HttpApiMiddleware`,UU=`~effect/httpapi/HttpApiMiddleware/Security`,WU=()=>(e,t)=>{let n=globalThis.Error,r=lC();uC(2);let i=new n;uC(r);class a extends ix()(e){}let o=a;if(Object.defineProperty(a,"stack",{get(){return i.stack}}),o[HU]=HU,o.error=GU(t?.error),o.requiredForClient=t?.requiredForClient??!1,t?.security!==void 0){if(Object.keys(t.security).length===0)throw Error(`HttpApiMiddleware.Service: security object must not be empty`);o[UU]=UU,o.security=t.security}return o};function GU(e){return e===void 0?new Set:new Set(Array.isArray(e)?e:[e])}var KU=(e,t)=>AD(ZD(function*(){let n=(yield*fO()).pipe(ete(pD)),r=HD(t)?yield*t:t;return _x(new Map([[`${e.key}/Client`,e=>hO(r(e),e=>Ax(n,e))]]))})),qU=(e,t)=>ZD(function*(){let n=yield*fO(),r=t.httpClient.pipe(t?.baseUrl===void 0?B_:WV(wV(t.baseUrl.toString())));function i(e,t,a,o,s){if(s===-1)return r.execute(a);let c=n.mapUnsafe.get(o[s]);return c===void 0?i(e,t,a,o,s-1):c({endpoint:t,group:e,request:a,next(n){return i(e,t,n,o,s-1)}})}kU(e,{predicate:t?.predicate,onGroup(e){t.onGroup?.(e)},onEndpoint(e){let{group:n,endpoint:r,errors:a,successes:o}=e,s=ZU(r.path),c={orElse:gW},l=FV(c),u=new Map;for(let[e,t]of a.entries()){let n=nW(t);for(let[t,r]of n.entries())eW(u,e,t,QU(r))}for(let[e,t]of u.entries()){let n=tW(t);c[e]=e=>rO(uO(n(e),t=>$D(GE(zE(new QB({reason:new rV({request:e.request,response:e})})),t))),QD)}let d=new Map;for(let[e,t]of o.entries()){let n=nW(t);for(let[t,r]of n.entries())eW(d,e,t,QU(r))}for(let e of oW(r)){let t=aW(e)?e.schema:e;eW(d,GH(e),t.contentType,sW(e))}for(let[e,t]of d.entries())c[e]=tW(t);let f=TF(r.params,YF),p=ZH(r),m=Gx(p)?oV(r.method)?YF(vW(p,r.method)):YF(gI(p)):void 0,h=TF(r.headers,YF),g=TF(r.query,YF),_=Array.from(e.middleware,e=>`${e.key}/Client`),v=LO(function*(e){let a=gV(r.method)(r.path);if(e!==void 0){if(f!==void 0){let t=yield*f(e.params);a=CV(a,s(t))}if(m!==void 0){if(oV(r.method)){if(e.payload instanceof FormData)a=AV(a,e.payload);else{let t=yield*m(e.payload);a=kV(a,t)}}else{let t=yield*m(e.payload);a=DV(a,t)}}if(h!==void 0){let t=yield*h(e.headers);a=bV(a,t)}if(g!==void 0){let t=yield*g(e.query);a=DV(a,t)}}let o=yield*i(n,r,a,_,_.length-1);if(e?.responseMode===`response-only`)return o;let c=yield*t.transformResponse===void 0?l(o):t.transformResponse(l(o));return e?.responseMode===`decoded-and-response`?[c,o]:c});t.onEndpoint({...e,endpointFn:v})}})}),JU=(e,t)=>rO(zV,n=>YU(e,{...t,httpClient:t?.transformClient?t.transformClient(n):n})),YU=(e,t)=>{let n={};return qU(e,{...t,onGroup({group:e}){e.topLevel||ay(n,e.identifier,{})},onEndpoint({endpoint:e,endpointFn:t,group:r}){ay(r.topLevel?n:n[r.identifier],e.identifier,t)}}).pipe(cO(n))},XU=/(\/?):(\w+)(\?)?/g,ZU=e=>XU.test(e)?(XU.lastIndex=0,t=>(XU.lastIndex=0,e.replace(XU,(e,n,r,i)=>{let a=t[r];if(a===void 0){if(i!==void 0)return``;throw Error(`Missing path parameter: ${r}`)}return`${n}${encodeURIComponent(a)}`}))):t=>e;function QU(e){let t=e.some(e=>AH(e)||LH(e.ast)!==void 0),n=BF(t?gI(e.map($U)):mW(e));return e=>rO(e.arrayBuffer,t?t=>n({body:t,headers:e.headers}):n)}function $U(e){let t=AH(e),n=LH(e.ast);if(n!==void 0)return G({body:hW(n.body),headers:n.headersCodec}).pipe(CI(e));let r=t?e.schema:e;return G({body:hW(r).pipe(CI(r)),headers:t?e.headers:aI}).pipe(CI(t?e:tI(e),FM({decode:e=>t?kH(e):e.body,encode:e=>t?e:{body:e,headers:void 0}})))}function eW(e,t,n,r){let i=YH(n),a=e.get(t);a===void 0?e.set(t,[{contentType:i,decode:r}]):a.push({contentType:i,decode:r})}function tW(e){let t=e[0];return e.length===1&&t!==void 0?t.decode:t=>{let n=YH(t.headers[`content-type`]??``),r=e.find(e=>e.contentType===n);return r===void 0?rW(t,n,e):r.decode(t)}}function nW(e){let t=new Map;for(let n of e){let e=FH((AH(n)?n.schema:n).ast)?``:YH(KH(n).contentType),r=t.get(e);r===void 0?t.set(e,[n]):r.push(n)}return t}function rW(e,t,n){let r=Array.from(new Set(n.map(e=>e.contentType))).join(`, `);return QD(new QB({reason:new iV({request:e.request,response:e,description:`Unsupported response content-type for status ${e.status}: ${t||`<missing>`}. Expected one of: ${r}`})}))}var iW=`effect/httpapi/stream/failure`,aW=e=>AH(e);function oW(e){let t=[];for(let n of e.success)wH(AH(n)?n.schema:n)&&t.push(n);return t}function sW(e){let t=aW(e),n=t?e.schema:e,r=EH(n)?void 0:{declaration:n,decoder:cW(n)},i=e=>sO(fO(),t=>TR(r===void 0?e.stream:lW(e.stream,r.declaration,r.decoder),t));if(!t)return i;let a=RF(e.headers);return e=>rO(a(e.headers),t=>sO(i(e),e=>kH({body:e,headers:t})))}function cW(e){return IU(gI([G({event:rI(iW),data:TL(HL(cL(e.error,hL())))}),e.events]))}function lW(e,t,n){let r=uR(e.pipe(CR,SR(n)),e=>qD(()=>{let t;return KD(()=>t===void 0?rO(e,e=>{for(let n=0;n<e.length;n++){let r=e[n];if(r.event===iW&&PE(r.data)){if(n===0)return $D(r.data);t=r.data,e=e.slice(0,n);break}}return V(e)}):$D(t))}));return t.sseMode===`data`?bR(r,e=>e.data):r}var uW=FI(globalThis.ArrayBuffer,{expected:`ArrayBuffer`}),dW=uW.pipe(CI(jL,FM({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)}}))),fW=uW.pipe(CI(U,FM({decode(e){return new TextDecoder().decode(e)},encode(e){let t=new TextEncoder().encode(e);return t.byteLength===t.buffer.byteLength?t.buffer:t.buffer.slice(t.byteOffset,t.byteOffset+t.byteLength)}}))),pW=fW.pipe(CI(gI([rI(``).pipe(CI(sI,FM({decode:()=>void 0,encode:()=>``}))),EL])));function mW(e){return gI(e.map(t));function t(e){return hW(e).pipe(CI(e))}}function hW(e){switch(UH(e.ast)._tag){case`Json`:return cne(TP(e.ast))?pW.pipe(CI(aI,FM({decode:e=>e===void 0?null:e,encode:e=>e===null?void 0:e}))):pW;case`FormUrlEncoded`:return fW.pipe(CI(RB));case`Uint8Array`:return dW;case`Text`:return fW}}var gW=e=>QD(new QB({reason:new iV({request:e.request,response:e})})),_W=NF(BB);function vW(e,t){return gI(e.map(e=>bW(e,t)))}var yW=new WeakMap;function bW(e,t){let n=e.ast,r=yW.get(n);if(r!==void 0)return r;let i=HH(n,t),a=_W.pipe(CI(e,Zte({decode(e,t){return QD(new Xj({message:`Encode only schema`},e,t))},encode(e,t){switch(i._tag){case`Multipart`:return QD(new Xj({message:`Payload must be a FormData`},e,t));case`Json`:try{return V(KB(JSON.stringify(e),i.contentType))}catch{return QD(new Jj({expected:`a JSON-serializable request body`},e,t))}case`Text`:return typeof e==`string`?V(KB(e,i.contentType)):QD(new Jj({message:`Expected a string`},e,t));case`FormUrlEncoded`:return av(e)?V(qB(OB(e),i.contentType)):QD(new Jj({message:`Expected a record`},e,t));case`Uint8Array`:return e instanceof Uint8Array?V(WB(e,i.contentType)):QD(new Jj({message:`Expected a Uint8Array`},e,t))}}})));return yW.set(n,a),a}var xW=`~effect/httpapi/HttpApiGroup`,SW={[xW]:xW,add(...e){let t={...this.endpoints};for(let n of e)ay(t,n.identifier,n);return wW({...CW(this),endpoints:t})},prefix(e){return wW({...CW(this),endpoints:Rx(this.endpoints,t=>t.prefix(e))})},middleware(e){return wW({...CW(this),endpoints:Rx(this.endpoints,t=>t.middleware(e))})},annotateMerge(e){return wW({...CW(this),annotations:Ax(this.annotations,e)})},annotate(e,t){return wW({...CW(this),annotations:wx(this.annotations,e,t)})},annotateEndpointsMerge(e){return wW({...CW(this),endpoints:Rx(this.endpoints,t=>t.annotateMerge(e))})},annotateEndpoints(e,t){return wW({...CW(this),endpoints:Rx(this.endpoints,n=>n.annotate(e,t))})},pipe(){return L_(this,arguments)}},CW=e=>({identifier:e.identifier,topLevel:e.topLevel,endpoints:e.endpoints,annotations:e.annotations}),wW=e=>{function t(){}return Object.setPrototypeOf(t,SW),t.key=`effect/httpapi/HttpApiGroup/${e.identifier}`,Object.assign(t,e)},TW=(e,t)=>wW({identifier:e,topLevel:t?.topLevel??!1,endpoints:{},annotations:Sx()}),EW=`~effect/httpapi/HttpApiSecurity`,DW={[EW]:EW,pipe(){return L_(this,arguments)}},OW=e=>Object.assign(Object.create(DW),{_tag:`ApiKey`,key:e.key,in:e.in??`header`,annotations:Sx()}),kW=()=>(e,t)=>{let n=ix()(e),r=OD(n,JU(t.api,t));n.runtime=(t.runtime??Lz)(typeof t.httpClient==`function`?e=>ND(r,t.httpClient(e)):ND(r,t.httpClient));let i=Rte(e=>IF(e)||ZB(e)?Fte(e):QD(e)),a=t.api.groups,o=Vz(({endpoint:e,group:t,responseMode:r})=>{let o=n.runtime.fn()(LO(function*(a){let o=yield*n,s=i(o[t][e]({...a,responseMode:r}));return yield*a.reactivityKeys?BR(s,a.reactivityKeys):s}));if(r===`decoded-only`){let n=a[t].endpoints[e];return Wz(o,{key:`AtomHttpApi:mutation:${t}:${e}`,schema:dz({success:gI(QH(n)),error:gI($H(n))})})}return o});n.mutation=(e,t,n)=>o({group:e,endpoint:t,responseMode:n?.responseMode??`decoded-only`});let s=Vz(e=>{let t=n.runtime.atom(n.use(t=>i(t[e.group][e.endpoint](e))));if(e.reactivityKeys&&(t=n.runtime.factory.withReactivity(e.reactivityKeys)(t)),e.responseMode===`decoded-only`&&e.serializationKey){let n=a[e.group].endpoints[e.endpoint];t=Wz(t,{key:`AtomHttpApi:${e.group}:${e.endpoint}:${e.serializationKey}`,schema:dz({success:gI(QH(n)),error:gI($H(n))})})}return e.timeToLive&&(t=gS(e.timeToLive)?wz(t,e.timeToLive):Hz(t)),t});return n.query=(e,t,n)=>{let r={group:e,endpoint:t,params:n.params,query:n.query,payload:n.payload,headers:n.headers,responseMode:n.responseMode??`decoded-only`,reactivityKeys:n.reactivityKeys,timeToLive:n.timeToLive?cS(n.timeToLive):void 0,serializationKey:n.serializationKey};return s(r)},n},AW=U.pipe(SI(`PullRequestId`)),jW=U.pipe(SI(`RepositoryName`)),MW=U.pipe(SI(`AwsProfileName`)),NW=U.pipe(SI(`AwsRegion`)),PW=U.pipe(SI(`CommentId`)),FW=U.pipe(SI(`SandboxId`)),IW=_I([`OPEN`,`CLOSED`,`MERGED`]),LW=_I([`error`,`info`,`warning`,`success`]),RW=_I([`idle`,`loading`,`error`]),zW=_I([`creating`,`cloning`,`starting`,`running`,`stopping`,`stopped`,`error`]),BW=class extends zL(`Account`)({profile:MW,region:NW,awsAccountId:H(U),repoAccountId:H(U)}){},VW=class extends zL(`ApprovalRule`)({ruleName:U,requiredApprovals:W,poolMembers:K(U),poolMemberArns:K(U).pipe(OI(V([]))),satisfied:cI,fromTemplate:H(U)}){},HW=class extends zL(`PullRequest`)({id:AW,title:U,description:H(U),author:U,repositoryName:jW,creationDate:SL,lastModifiedDate:SL,link:U,account:BW,status:IW,sourceBranch:U,destinationBranch:U,isMergeable:cI,isApproved:cI,commentCount:H(W),healthScore:H(W),fetchedAt:H(SL),approvedBy:K(U),approvedByArns:K(U).pipe(OI(V([]))),commentedBy:K(U),filesChanged:H(W),approvalRules:K(VW).pipe(OI(V([])))}){get consoleUrl(){return KW(this.account.region,this.repositoryName,this.id)}},UW=(e,t)=>{let n=e=>e.trim().toLowerCase(),r=e=>{let t=n(e).split(/[/:]/).filter(e=>e.length>0);return t[t.length-1]??``},i=n(e),a=n(t);if(i===``||a===``)return!1;if(i===a)return!0;let o=r(e),s=r(t);return o!==``&&o===s},WW=(e,t)=>t===void 0||t.length===0||e.approvedBy.some(e=>UW(t,e))?!1:e.approvalRules.some(e=>!e.satisfied&&e.poolMembers.some(e=>UW(t,e))),GW=e=>e.startsWith(`cn-`)?`console.amazonaws.cn`:e.startsWith(`us-gov-`)?`console.amazonaws-us-gov.com`:`console.aws.amazon.com`,KW=(e,t,n)=>`https://${e}.${GW(e)}/codesuite/codecommit/repositories/${t}/pull-requests/${n}?region=${e}`,qW=G({region:NW.check(BI(/^[a-z]{2}(?:-gov)?-[a-z0-9-]+-[0-9]+$/u)),repositoryName:jW.check(BI(/^[A-Za-z0-9._-]{1,100}$/u)),pullRequestId:AW.check(BI(/^[0-9]{1,200}$/u))}),JW=/^(?<region>[a-z]{2}(?:-gov)?-[a-z0-9-]+-\d+)\.(?<domain>console\.aws\.amazon\.com|console\.amazonaws\.cn|console\.amazonaws-us-gov\.com)$/u,YW=/^\/codesuite\/codecommit\/repositories\/(?<repositoryName>[A-Za-z0-9._-]{1,100})\/pull-requests\/(?<pullRequestId>[0-9]{1,200})(?:\/(?<view>activity|changes|details))?$/u,XW=e=>{if(!URL.canParse(e))return null;let t=new URL(e),n=JW.exec(t.hostname),r=YW.exec(t.pathname),i=n?.groups?.region,a=n?.groups?.domain,o=r?.groups?.repositoryName,s=r?.groups?.pullRequestId,c=r?.groups?.view,l=t.searchParams.getAll(`region`);return t.protocol!==`https:`||t.port.length>0||t.username.length>0||t.password.length>0||t.hash.length>0&&c!==`activity`||i===void 0||a===void 0||o===void 0||s===void 0||a!==GW(i)||l.length>1||l.length===1&&l[0]!==i?null:{region:NW.make(i),repositoryName:jW.make(o),pullRequestId:AW.make(s)}};U.check(zI(),eL(),tL(2048)).pipe(CI(qW,{decode:bM((e,t)=>{let n=XW(e);return n===null?QD(new Jj({expected:`an AWS CodeCommit pull-request console URL`},e,t)):V(n)}),encode:yM(({pullRequestId:e,region:t,repositoryName:n})=>KW(t,n,e))})),zL(`Sandbox`)({id:FW,pullRequestId:AW,awsAccountId:U,repositoryName:jW,region:NW,sourceBranch:U,containerId:H(U),port:H(W),workspacePath:U,status:zW,error:H(U),createdAt:SL,lastActivityAt:SL}),zL(`PRComment`)({id:PW,content:U,author:U,creationDate:SL,inReplyTo:H(PW),deleted:cI,filePath:H(U),lineNumber:H(W)});var ZW=_I([`BEFORE`,`AFTER`]),QW=G({root:G({id:U,content:U,author:U,creationDate:U,inReplyTo:H(U),deleted:cI,filePath:H(U),lineNumber:H(W)}),replies:K(bI(()=>QW))}),$W=G({filePath:H(U),beforeCommitId:H(U),afterCommitId:H(U),relativeFileVersion:H(ZW),comments:K(QW)}),eG=_I([`new_comment`,`comment_edited`,`comment_deleted`,`approval_changed`,`approval_requested`,`review_reminder`,`merge_changed`,`title_changed`,`description_changed`,`pr_merged`,`pr_closed`,`pr_reopened`]);zL(`PersistentNotification`)({id:W,pullRequestId:AW,awsAccountId:U,type:eG,message:U,createdAt:SL,read:cI}),wte(),zL(`NotificationItem`)({type:LW,title:U,message:U,timestamp:SL,profile:eI(U)});var tG=e=>V(e),nG=_I([`review`,`security`,`tests`,`explain`]),rG=nG.literals,iG=_I([`codex`,`claude`]),aG=_I([`native-codex`,`native-claude`]),oG=_I([`configured-default`,`default`,`gpt-5.6-luna`,`gpt-5.6-terra`,`gpt-5.6-sol`]),sG=iG.literals,cG=aG.literals,lG=oG.literals,uG=e=>e===`claude`?[`configured-default`,`default`]:[`configured-default`,`gpt-5.6-luna`,`gpt-5.6-terra`,`gpt-5.6-sol`],dG=G({id:U.check(zI(),eL(),tL(64),BI(/^[a-z][a-z0-9-]*$/u)),name:U.check(zI(),eL(),tL(80)),kind:nG,provider:iG.pipe(OI(tG(`codex`))),harness:aG.pipe(OI(tG(`native-codex`))),model:oG.pipe(OI(tG(`configured-default`))),skillIds:K(U.check(zI(),eL(),tL(256))).check(tL(24),nL())}).check(LI(e=>e.harness===(e.provider===`claude`?`native-claude`:`native-codex`)&&uG(e.provider).includes(e.model),{expected:`a supported reviewer provider, harness, and model`}));G({defaultProfileId:U.check(zI(),eL(),tL(64),BI(/^[a-z][a-z0-9-]*$/u)).pipe(OI(tG(`thorough`))),profiles:K(dG).check($I(1),tL(12)).pipe(OI(tG([{id:`thorough`,name:`Thorough review`,kind:`review`,provider:`codex`,harness:`native-codex`,model:`configured-default`,skillIds:[`builtin:pr-review`,`builtin:pr-review-diff`]},{id:`security`,name:`Security review`,kind:`security`,provider:`codex`,harness:`native-codex`,model:`configured-default`,skillIds:[`builtin:pr-review-diff`]},{id:`tests`,name:`Test review`,kind:`tests`,provider:`codex`,harness:`native-codex`,model:`configured-default`,skillIds:[`builtin:pr-review-diff`]},{id:`explain`,name:`Explain change`,kind:`explain`,provider:`codex`,harness:`native-codex`,model:`configured-default`,skillIds:[]}])))}).check(LI(({defaultProfileId:e,profiles:t})=>new Set(t.map(({id:e})=>e)).size===t.length&&t.some(({id:t})=>t===e),{expected:`unique review profile ids containing the default profile`}));var fG=G({author:U,prCount:W}),pG=G({author:U,commentCount:W}),mG=G({author:U,approvalCount:W}),hG=G({id:U,title:U,author:U,repositoryName:U,accountRegion:U,commentCount:W,awsAccountId:U}),gG=G({small:W,medium:W,large:W,extraLarge:W}),_G=G({filesAdded:W,filesModified:W,filesDeleted:W}),vG=G({author:U,avgFilesChanged:W,prCount:W}),yG=G({id:U,title:U,author:U,repositoryName:U,accountRegion:U,daysSinceActivity:W,awsAccountId:U}),bG=G({topContributorShare:W,uniqueContributors:W}),xG=G({prId:U,prTitle:U,author:U,repositoryName:U,accountRegion:U,awsAccountId:U,durationMs:W,fromLabel:U,toLabel:U}),SG=G({week:U,weekStart:U,weekEnd:U,dataAvailableSince:vI(U),prsCreated:W,prsMerged:W,prsClosed:W,totalComments:W,topContributors:K(fG),topReviewers:K(pG),topApprovers:K(mG),medianTimeToMerge:vI(W),medianTimeToFirstReview:vI(W),medianTimeToAddressFeedback:vI(W),mergeTimeDetails:K(xG),firstReviewDetails:K(xG),feedbackDetails:K(xG),mostActivePRs:K(hG),prSizeDistribution:gG,avgDiffSize:vI(_G),diffSizeByContributor:K(vG),stalePRs:K(yG),reviewCoverage:vI(W),approvalRate:vI(W),busFactor:vI(bG),availableRepos:K(U),availableAuthors:K(U),availableAccounts:K(U)}),CG=65536,wG=32768,TG=8e3,EG=16320,DG=new TextEncoder,OG=class extends VL()(`ApiError`,{message:U}){},kG=class extends VL()(`UnauthorizedApiError`,{message:U},{httpApiStatus:401}){},AG=class extends VL()(`ForbiddenApiError`,{message:U},{httpApiStatus:403}){},jG=class extends WU()(`@knpkv/codecommit-web/OwnerSessionAuth`,{error:[kG,AG],security:{ownerCookie:OW({in:`cookie`,key:`cc_owner`})}}){},MG=G({id:U,awsAccountId:U,accountProfile:U,accountRegion:U,title:U,description:vI(U),author:U,repositoryName:U,creationDate:U,lastModifiedDate:U,status:U,sourceBranch:U,destinationBranch:U,isMergeable:W,isApproved:W,commentCount:vI(W),link:U,fetchedAt:U}),NG=G({pullRequestId:AW,revisionId:U,baseCommit:U,headCommit:U,files:K(G({index:QI.pipe(xI(YI(0))),status:_I([`added`,`modified`,`deleted`,`renamed`]),path:U,previousPath:vI(U),beforeMode:vI(U),afterMode:vI(U)}))}),PG=G({revisionId:U,headCommit:U}),FG=G({repositoryName:U,region:NW}),IG=G({repositoryName:H(U),region:H(NW)}).check(LI(({region:e,repositoryName:t})=>t===void 0==(e===void 0),{expected:`repositoryName and region must be provided together`})),LG=G({fileIndex:QI.pipe(xI(YI(0))),revisionId:U,state:_I([`text`,`binary`,`oversized`]),before:vI(U),after:vI(U)}),RG=nG,zG=U.check(BI(/^F[1-9][0-9]{0,5}$/u)),BG=gI([zG,rI(`PR`)]),VG=U.check(zI(),eL(),tL(200)),HG=U.check(zI(),eL(),tL(256)),UG=K(HG).check(tL(24),nL()),WG=dG,GG=gI([G({scope:rI(`general`)}),G({scope:rI(`file`),filePath:U.check(eL(),tL(1024))}),G({scope:rI(`line`),filePath:U.check(eL(),tL(1024)),line:QI.pipe(xI(YI(1))),side:_I([`before`,`after`])})]),KG=G({id:zG,priority:_I([`P1`,`P2`,`P3`,`P4`]),title:U.check(zI(),eL(),tL(200)),summary:U.check(zI(),eL(),tL(500)),details:U.check(zI(),eL(),tL(4e3)),recommendation:U.check(zI(),eL(),tL(2e3)),verification:U.check(zI(),eL(),tL(1e3)),publicationTarget:_I([`pr-comment`,`line-comment`]),location:GG}).check(LI(e=>e.location.scope===`line`==(e.publicationTarget===`line-comment`),{expected:`line-comment paired with a line location and pr-comment paired with a general or file location`})),qG=U.check(zI(),eL(),tL(8e3)),JG=U.check(zI(),eL(),tL(12e3)),YG=G({...G({findings:K(KG).check(tL(50),LI(e=>new Set(e.map(e=>e.id)).size===e.length,{expected:`unique Relay finding ids`})),verdict:qG}).fields,explanation:H(JG)}).check(LI(e=>DG.encode(JSON.stringify(e)).byteLength<=CG,{expected:`a Relay review result no larger than ${String(CG)} UTF-8 bytes`}));G({findings:K(KG).check(tL(0)),verdict:qG,explanation:JG}).check(LI(e=>DG.encode(JSON.stringify(e)).byteLength<=CG,{expected:`an Explain result no larger than ${String(CG)} UTF-8 bytes`}));var XG=G({pullRequestId:AW,revisionId:U,baseCommit:U,headCommit:U,kind:RG,profile:WG,result:YG}).check(LI(e=>e.kind===e.profile.kind&&(e.kind!==`explain`||e.result.explanation!==void 0&&e.result.findings.length===0),{expected:`a response matching its profile and Explain output contract`})),ZG=U.check(zI(),eL(),tL(8e3),LI(e=>DG.encode(e).byteLength<=TG,{expected:`a Relay conversation message no larger than ${String(TG)} UTF-8 bytes`}),LI(e=>DG.encode(JSON.stringify(e)).byteLength<=EG,{expected:`a Relay conversation message retainable as one half of a completed exchange`})),QG=G({id:H(VG),findingId:BG,role:_I([`user`,`assistant`]),message:ZG}),$G=_I([`revision`,`files`,`patch`,`agent`,`validation`,`posting`]),eK=gI([G({type:rI(`progress`),phase:$G,message:U,detail:H(U)}),G({type:rI(`complete`),review:XG,reply:H(ZG)}),G({type:rI(`error`),message:U})]),tK=G({findingId:zG,operationId:U,summary:U}),nK=G({revisionId:U,baseCommit:U,headCommit:U,profile:WG}),rK=K(QG).check(tL(40),LI(e=>DG.encode(JSON.stringify(e)).byteLength<=wG,{expected:`Relay conversation turns no larger than ${String(wG)} UTF-8 bytes`})),iK=G({...nK.fields,currentReview:YG,turns:rK,findingId:BG,message:ZG}).check(LI(({findingId:e,message:t})=>LF(QG)({findingId:e,role:`user`,message:t}),{expected:`a continuation message retainable as its user conversation turn`})),aK=G({id:W,pullRequestId:U,awsAccountId:U,type:U,title:U,profile:U,repositoryName:U,accountRegion:U,message:U,createdAt:U,read:W}),oK=class extends TW(`prs`).add(bU(`list`,`/`,{success:yL(HW)})).add(xU(`refresh`,`/refresh`,{success:U})).add(bU(`search`,`/search`,{query:G({q:U,limit:H(DL.pipe(xI(XI({minimum:1,maximum:50})))),offset:H(DL.pipe(xI(YI(0))))}),success:G({items:K(MG),total:W,hasMore:cI}),error:OG})).add(xU(`refreshSingle`,`/:awsAccountId/:prId/refresh`,{params:G({awsAccountId:U,prId:AW}),query:IG,success:PG,error:OG})).add(xU(`create`,`/`,{payload:G({repositoryName:U,title:U,description:H(U),sourceBranch:U,destinationBranch:U,account:BW}),success:U,error:OG})).add(xU(`open`,`/open`,{payload:G({profile:U,link:U.pipe(xI(LI(e=>/^https:\/\/[\w-]+\.console\.aws\.amazon\.com\//.test(e))))}),success:U,error:OG})).add(bU(`comments`,`/comments`,{query:G({pullRequestId:U,repositoryName:U,profile:MW,region:NW}),success:K($W),error:OG})).add(bU(`diff`,`/:awsAccountId/:prId/diff`,{params:G({awsAccountId:U,prId:AW}),query:FG,success:NG,error:OG})).add(bU(`diffContent`,`/:awsAccountId/:prId/diff/:fileIndex`,{params:G({awsAccountId:U,prId:AW,fileIndex:DL.pipe(xI(ZI(),YI(0)))}),query:G({...FG.fields,revisionId:U,baseCommit:U,headCommit:U}),success:LG,error:OG})).add(xU(`relayReview`,`/:awsAccountId/:prId/relay-review`,{params:G({awsAccountId:U,prId:AW}),query:FG,payload:G({revisionId:U,baseCommit:U,headCommit:U,profile:WG}),success:XG,error:OG})).add(xU(`relayReviewStream`,`/:awsAccountId/:prId/relay-review/stream`,{params:G({awsAccountId:U,prId:AW}),query:FG,payload:nK,success:U,error:OG})).add(xU(`relayReviewContinueStream`,`/:awsAccountId/:prId/relay-review/continue`,{params:G({awsAccountId:U,prId:AW}),query:FG,payload:iK,success:U,error:OG})).add(xU(`postRelayFinding`,`/:awsAccountId/:prId/relay-review/findings/:findingId/post`,{params:G({awsAccountId:U,prId:AW,findingId:zG}),query:FG,payload:G({revisionId:U,baseCommit:U,headCommit:U,finding:KG}),success:tK,error:OG})).add(xU(`createApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,requiredApprovals:W,poolMembers:K(U),account:BW}),success:U,error:OG})).add(SU(`updateApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,requiredApprovals:W,poolMembers:K(U),account:BW}),success:U,error:OG})).add(CU(`deleteApprovalRule`,`/approval-rules`,{payload:G({pullRequestId:U,approvalRuleName:U,account:BW}),success:U,error:OG})).prefix(`/api/prs`){},sK=class extends TW(`events`).add(bU(`stream`,`/`,{success:U})).prefix(`/api/events`){},cK=G({hostPath:U,containerPath:U,readonly:cI}),lK=G({image:U,extensions:K(U),setupCommands:K(U),env:dI(U,U),volumeMounts:K(cK),cloneDepth:W}),uK=G({defaultProfileId:U,profiles:K(WG)}),dK=G({id:HG,name:U,description:U,source:U}),fK=G({accounts:K(G({profile:U,regions:K(U),enabled:cI})),autoDetect:cI,autoRefresh:cI,refreshIntervalSeconds:W,currentUser:H(U),review:uK,sandbox:H(lK)}),pK=G({path:U,exists:cI,modifiedAt:H(U)}),mK=G({path:U,sizeBytes:W,exists:cI,modifiedAt:H(U)}),hK=G({status:_I([`valid`,`missing`,`corrupted`]),path:U,errors:K(U)}),gK=G({accounts:K(G({profile:U,regions:K(U),enabled:cI})),autoDetect:cI,autoRefresh:cI,refreshIntervalSeconds:W,review:H(uK),sandbox:H(lK)}),_K=_I([`refreshed`,`failed`]),vK=G({backupPath:H(U),config:fK,refreshStatus:_K}),yK=class extends TW(`config`).add(bU(`list`,`/`,{success:fK})).add(bU(`path`,`/path`,{success:pK,error:OG})).add(bU(`database`,`/database`,{success:mK,error:OG})).add(bU(`validate`,`/validate`,{success:hK,error:OG})).add(bU(`reviewSkills`,`/review-skills`,{success:K(dK),error:OG})).add(xU(`save`,`/save`,{payload:gK,success:_I([`saved`,`saved-refresh-failed`]),error:OG})).add(xU(`reset`,`/reset`,{success:vK,error:OG})).prefix(`/api/config`){},bK=class extends TW(`accounts`).add(bU(`list`,`/`,{success:yL(BW)})).prefix(`/api/accounts`){},xK=kL.check(eL()),SK=G({awsAccountId:U,pullRequestId:AW,repositoryName:H(xK),region:H(xK)}).check(LI(e=>e.repositoryName===void 0==(e.region===void 0)?void 0:`repositoryName and region must be provided together`)),CK=G({awsAccountId:U,pullRequestId:U,repositoryName:vI(U),accountRegion:vI(U)}),wK=class extends TW(`subscriptions`).add(xU(`subscribe`,`/subscribe`,{payload:SK,success:U,error:OG})).add(xU(`unsubscribe`,`/unsubscribe`,{payload:SK,success:U,error:OG})).add(bU(`list`,`/`,{success:K(CK)})).prefix(`/api/subscriptions`){},TK=G({items:K(aK),nextCursor:H(W)}),EK=class extends TW(`notifications`).add(bU(`list`,`/`,{query:G({limit:H(DL.pipe(xI(XI({minimum:1,maximum:100})))),cursor:H(DL),filter:H(_I([`system`,`prs`])),unreadOnly:H(DL)}),success:TK})).add(bU(`count`,`/count`,{success:G({unread:W})})).add(xU(`markRead`,`/read`,{payload:G({id:W}),success:U})).add(xU(`markUnread`,`/unread`,{payload:G({id:W}),success:U})).add(xU(`markAllRead`,`/read-all`,{success:U})).add(xU(`ssoLogin`,`/sso-login`,{payload:G({profile:MW}),success:U,error:OG})).add(xU(`ssoLogout`,`/sso-logout`,{success:U,error:OG})).prefix(`/api/notifications`){},DK=G({id:U,pullRequestId:U,awsAccountId:U,region:vI(U),repositoryName:U,sourceBranch:U,containerId:vI(U),port:vI(W),status:zW,statusDetail:vI(U),logs:vI(U),error:vI(U),createdAt:U,lastActivityAt:U}),OK=G({password:U}),kK=G({pullRequestId:AW,awsAccountId:U,repositoryName:U,sourceBranch:U,profile:MW,region:U}),AK=G({sandboxId:FW}),jK=class extends TW(`sandbox`).add(xU(`create`,`/`,{payload:kK,success:DK,error:OG})).add(bU(`list`,`/`,{success:K(DK),error:OG})).add(bU(`get`,`/:sandboxId`,{params:AK,success:DK,error:OG})).add(bU(`credentials`,`/:sandboxId/credentials`,{params:AK,success:OK,error:OG})).add(xU(`stop`,`/:sandboxId/stop`,{params:AK,success:U,error:OG})).add(xU(`restart`,`/:sandboxId/restart`,{params:AK,success:U,error:OG})).add(CU(`delete`,`/:sandboxId`,{params:AK,success:U,error:OG})).prefix(`/api/sandbox`){},MK=class extends TW(`stats`).add(bU(`get`,`/`,{query:G({week:U.pipe(xI(BI(/^\d{4}-W\d{2}$/))),repo:H(U),author:H(U),account:H(U)}),success:SG,error:OG})).add(xU(`sync`,`/sync`,{payload:G({week:U.pipe(xI(BI(/^\d{4}-W\d{2}$/)))}),success:U,error:OG})).prefix(`/api/stats`){},NK=_I([`always_allow`,`allow`,`deny`]),PK=G({operation:U,state:NK,category:_I([`read`,`write`]),description:U}),FK=G({id:W,timestamp:U,operation:U,accountProfile:U,region:U,permissionState:U,context:U,durationMs:vI(W)}),IK=class extends TW(`permissions`).add(xU(`respond`,`/respond`,{payload:G({id:U,response:_I([`allow_once`,`always_allow`,`deny`])}),success:U,error:OG})).add(bU(`list`,`/`,{success:K(PK)})).add(xU(`update`,`/update`,{payload:G({operation:U,state:NK}),success:U,error:OG})).add(xU(`reset`,`/reset`,{success:U})).add(bU(`auditSettings`,`/audit`,{success:G({enabled:cI,retentionDays:W})})).add(xU(`updateAuditSettings`,`/audit`,{payload:G({enabled:H(cI),retentionDays:H(W)}),success:U,error:OG})).prefix(`/api/permissions`){},LK=class extends TW(`audit`).add(bU(`list`,`/`,{query:G({limit:H(DL.pipe(xI(XI({minimum:1,maximum:200})))),offset:H(DL.pipe(xI(YI(0)))),operation:H(U),accountProfile:H(U),permissionState:H(U),from:H(U),to:H(U),search:H(U)}),success:G({items:K(FK),total:W,nextCursor:H(W)}),error:OG})).add(bU(`export`,`/export`,{query:G({from:H(U),to:H(U)}),success:K(FK),error:OG})).add(CU(`clear`,`/`,{success:G({deleted:W}),error:OG})).prefix(`/api/audit`){},RK=class extends OU(`CodeCommitApi`).add(oK).add(sK).add(yK).add(bK).add(EK).add(wK).add(jK).add(MK).add(IK).add(LK).middleware(jG){},zK=`codecommit_web_csrf`,BK=G({csrfToken:U}),VK=null,HK=!1,UK={_tag:`Ready`},WK=e=>({_tag:`Failed`,message:e}),GK=()=>{try{return!zee(window)}catch{return!1}},KK=()=>{if(!GK())return null;if(HK)return VK;try{return window.localStorage.getItem(zK)}catch{return HK=!0,VK}},qK=(async()=>{if(!GK())return UK;let e=new URLSearchParams(window.location.hash.slice(1)).get(`bootstrap_token`);if(e===null)return UK;try{window.history.replaceState(null,``,`${window.location.pathname}${window.location.search}`);let t=await window.fetch(`/auth/bootstrap`,{method:`POST`,credentials:`same-origin`,headers:{Authorization:`Bearer ${e}`}});if(!t.ok)return WK(`Owner session bootstrap failed with status ${t.status}`);let n=await KF(BK)(await t.json());VK=n.csrfToken;try{window.localStorage.setItem(zK,n.csrfToken)}catch{HK=!0}return UK}catch(e){return WK(lv(e)?e.message:`Owner session bootstrap failed`)}})(),JK=ix(`@knpkv/codecommit-web/AtomHttpApiRuntimeMarker`),YK=KU(jG,RO(`OwnerSessionClient.cookie`)(function*({next:e,request:t}){return yield*e(t)})),XK=Ste(nH,bte(JK,void 0),YK),ZK=kW()(`ApiClient`,{api:RK,baseUrl:`/`,httpClient:XK,transformClient:e=>e.pipe(GV(e=>UD(()=>qK).pipe(sO(t=>{if(t._tag===`Failed`)return e;let n=KK();return n===null?e:yV(e,`x-csrf-token`,n)}))))});ZK.runtime;var QK={pullRequests:[],accounts:[],status:`idle`};ZK.query(`prs`,`list`,{reactivityKeys:[`prs`],timeToLive:`30 seconds`});var $K=ZK.query(`config`,`list`,{reactivityKeys:[`config`],timeToLive:`30 seconds`}),eq=ZK.query(`config`,`reviewSkills`,{reactivityKeys:[`config`],timeToLive:`60 seconds`});ZK.query(`accounts`,`list`,{reactivityKeys:[`accounts`],timeToLive:`60 seconds`});var tq=ZK.mutation(`prs`,`refresh`),nq=ZK.mutation(`prs`,`open`),rq=ZK.query(`config`,`path`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),iq=ZK.query(`config`,`database`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),aq=ZK.query(`config`,`validate`,{reactivityKeys:[`config`],timeToLive:`60 seconds`}),oq=ZK.mutation(`config`,`save`),sq=ZK.mutation(`config`,`reset`),cq=ZK.mutation(`notifications`,`ssoLogin`),lq=ZK.mutation(`notifications`,`ssoLogout`),uq=ZK.query(`subscriptions`,`list`,{reactivityKeys:[`subscriptions`],timeToLive:`5 seconds`}),dq=ZK.mutation(`subscriptions`,`subscribe`),fq=ZK.mutation(`subscriptions`,`unsubscribe`);ZK.query(`notifications`,`list`,{query:{},reactivityKeys:[`notifications`],timeToLive:`10 seconds`}),ZK.query(`notifications`,`count`,{reactivityKeys:[`notifications`],timeToLive:`10 seconds`});var pq=ZK.mutation(`notifications`,`list`),mq=ZK.mutation(`notifications`,`markRead`),hq=ZK.mutation(`notifications`,`markUnread`),gq=ZK.mutation(`notifications`,`markAllRead`);ZK.query(`sandbox`,`list`,{reactivityKeys:[`sandbox`],timeToLive:`5 seconds`});var _q=Vz(e=>ZK.query(`sandbox`,`credentials`,{params:{sandboxId:e},reactivityKeys:[`sandbox`],timeToLive:`30 seconds`})),vq=ZK.mutation(`sandbox`,`create`),yq=ZK.mutation(`sandbox`,`stop`),bq=ZK.mutation(`sandbox`,`restart`),xq=ZK.mutation(`sandbox`,`delete`),Sq=ZK.mutation(`stats`,`sync`);ZK.mutation(`prs`,`search`);var Cq=ZK.mutation(`prs`,`refreshSingle`),wq=ZK.mutation(`prs`,`createApprovalRule`),Tq=ZK.mutation(`prs`,`updateApprovalRule`);ZK.mutation(`prs`,`deleteApprovalRule`);var Eq=ZK.query(`permissions`,`list`,{reactivityKeys:[`permissions`],timeToLive:`30 seconds`}),Dq=ZK.mutation(`permissions`,`respond`),Oq=ZK.mutation(`permissions`,`update`),kq=ZK.mutation(`permissions`,`reset`),Aq=ZK.query(`permissions`,`auditSettings`,{reactivityKeys:[`permissions`],timeToLive:`30 seconds`}),jq=ZK.mutation(`permissions`,`updateAuditSettings`),Mq=ZK.mutation(`audit`,`list`),Nq=ZK.mutation(`audit`,`export`),Pq=ZK.mutation(`audit`,`clear`),Fq=Az(QK).pipe(Hz),Iq=U.check(zI(),eL(),tL(200)).pipe(SI(`RelaySelectorId`)),Lq=G({id:Iq,label:U.check(zI(),eL(),tL(200))}),Rq=G({modelId:Iq,models:K(Lq).check($I(1)),profileId:Iq,profiles:K(Lq).check($I(1))}),zq=e=>new Set(e.map(({id:e})=>e)).size===e.length,Bq=Rq.check(LI(({profiles:e})=>zq(e),{expected:`unique Relay profile option identifiers`}),LI(({models:e})=>zq(e),{expected:`unique Relay model option identifiers`}),LI(({profileId:e,profiles:t})=>t.some(({id:t})=>t===e),{expected:`a selected Relay profile present in the profile options`}),LI(({modelId:e,models:t})=>t.some(({id:t})=>t===e),{expected:`a selected Relay model present in the model options`})),Vq=PI({collapsed:{},expanded:{}}),Hq=G({dock:Vq,selection:Bq}),Uq=class extends VL()(`InvalidRelaySelectorState`,{reason:_I([`duplicate-model`,`duplicate-profile`,`invalid-input`,`model-not-found`,`profile-not-found`])}){},Wq=RF(Rq);RO(`RelayProduct.makeInitialRelayState`)(function*(e){let t=yield*Wq(e).pipe(zte(()=>new Uq({reason:`invalid-input`})));return zq(t.profiles)?zq(t.models)?t.profiles.some(({id:e})=>e===t.profileId)?t.models.some(({id:e})=>e===t.modelId)?Hq.make({dock:Vq.cases.collapsed.make({}),selection:Bq.make(t)}):yield*new Uq({reason:`model-not-found`}):yield*new Uq({reason:`profile-not-found`}):yield*new Uq({reason:`duplicate-model`}):yield*new Uq({reason:`duplicate-profile`})});var Gq=e=>U.check(zI(),eL(),tL(e)),Kq=e=>U.check(HI(7),BI(/^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/u,{expected:`a canonical lowercase UUID v7`})).pipe(SI(e)),qq=_I([`codecommit`,`control-center`]),Jq=_I([`continue-pull-request-conversation`,`locate-pull-request-conversation`]),Yq=Gq(200).pipe(SI(`RelayPrincipalId`)),Xq=Kq(`RelayWorkspaceId`),Zq=Kq(`RelayPluginConnectionId`),Qq=Kq(`RelayEntityId`),$q=Gq(1e3).pipe(SI(`RelayRepositoryName`)),eJ=Gq(200).pipe(SI(`RelayPullRequestId`)),tJ=Gq(200).pipe(SI(`RelayAccountId`)),nJ=Gq(100).pipe(SI(`RelayRegion`)),rJ=U.check(zI(),eL(),tL(4096),BI(/^\/(?!\/)/u,{expected:`an application-owned absolute path`}));PI({codecommit:{principalId:Yq},"control-center":{principalId:Yq,workspaceId:Xq}});var iJ=G({accountId:eI(tJ),provider:rI(`codecommit`),pullRequestId:eJ,region:nJ,repositoryName:$q}),aJ=G({pluginConnectionId:Zq,pullRequestId:eJ,repositoryName:$q,workspaceId:Xq}),oJ=G({accountId:tJ,pullRequestId:eJ,region:nJ,repositoryName:$q}),sJ=G({entityId:Qq,href:rJ}),cJ=G({accountId:tJ,href:rJ,pullRequestId:eJ,routeAccountId:eI(tJ)}),lJ=PI({codecommit:{...oJ.fields},"control-center":{...aJ.fields}}),uJ=PI({codecommit:{route:cJ,selection:Bq,thread:oJ},"control-center":{route:sJ,selection:Bq,thread:aJ}}).check(LI(e=>{switch(e._tag){case`codecommit`:return e.route.accountId===e.thread.accountId&&e.route.pullRequestId===e.thread.pullRequestId&&e.route.href===`/accounts/${encodeURIComponent(e.route.routeAccountId??e.route.accountId)}/prs/${encodeURIComponent(e.route.pullRequestId)}`;case`control-center`:return e.route.href===`/w/${e.thread.workspaceId}/items/${e.route.entityId}`}},{expected:`a product-qualified thread paired with its exact pull-request route`})),dJ=e=>{switch(e._tag){case`codecommit`:return lJ.cases.codecommit.make(e.thread);case`control-center`:return lJ.cases[`control-center`].make(e.thread)}},fJ=G({conversation:uJ,message:U.check(zI(),eL(),tL(8e3)).pipe(SI(`PullRequestContinuationMessage`)),selection:Bq});G({messageId:Gq(200).pipe(SI(`RelayContinuationMessageId`)),thread:lJ});var pJ=class extends VL()(`RelayAuthenticationRequired`,{operation:Jq,product:qq}){};VL()(`RelayAuthorizationDenied`,{operation:Jq,product:qq}),VL()(`RelayAuthenticationUnavailable`,{operation:Jq,product:qq});var mJ=class extends VL()(`PullRequestConversationNotFound`,{product:qq,pullRequestId:eJ,repositoryName:$q}){},hJ=class extends VL()(`PullRequestConversationAmbiguous`,{matches:QI.check(JI(1)),product:qq,pullRequestId:eJ,repositoryName:$q}){};VL()(`PullRequestConversationLookupFailed`,{product:qq});var gJ=class extends VL()(`PullRequestConversationRedirectFailed`,{href:rJ,product:qq}){},_J=class extends VL()(`PullRequestConversationContinuationRejected`,{product:qq,reason:_I([`conversation-busy`,`selection-unavailable`,`thread-not-found`]),thread:lJ}){},vJ=class extends VL()(`PullRequestConversationContinuationFailed`,{product:qq,thread:lJ}){};VL()(`RelayProductAdapterContractError`,{actualProduct:qq,expectedProduct:qq,operation:Jq}),VL()(`RelayProductContinuationReceiptMismatch`,{actualThread:lJ,expectedThread:lJ}),ix()(`@knpkv/relay-product/RelayProduct`);var yJ=class extends Error{_tag=`RelayProductDockProviderMissing`;constructor(){super(`Relay product dock provider is missing`)}},bJ=(0,N.createContext)(void 0),xJ=({children:e})=>{let[t,n]=(0,N.useState)(null),r=(0,N.useCallback)(e=>(n(e),()=>{n(t=>t===e?null:t)}),[]),i=(0,N.useMemo)(()=>({register:r,registration:t}),[r,t]);return(0,L.jsx)(bJ,{value:i,children:e})},SJ=e=>{let t=(0,N.useContext)(bJ);if(t===void 0)throw new yJ;(0,N.useEffect)(()=>t.register(e),[e,t.register])},CJ=()=>{let e=(0,N.useContext)(bJ);if(e===void 0)throw new yJ;return e.registration};ID(`RelayProductDockInvariantViolation`);var wJ=(0,N.lazy)(async()=>({default:(await pi(()=>Promise.resolve().then(()=>J3),void 0)).RelayDock})),TJ=class extends N.Component{state={failed:!1};static getDerivedStateFromError(e){return{failed:!0}}render(){return this.state.failed?null:this.props.children}},EJ=e=>{switch(e._tag){case`RelayAuthenticationRequired`:return`Authenticate with this product before using its Relay conversations.`;case`RelayAuthorizationDenied`:return`This session cannot use Relay for pull-request conversations.`;case`RelayAuthenticationUnavailable`:return`The product authentication boundary is unavailable.`;case`PullRequestConversationNotFound`:return`No Relay conversation matches ${e.repositoryName} PR #${e.pullRequestId}.`;case`PullRequestConversationAmbiguous`:return`${String(e.matches)} Relay conversations match this pull request; include its account.`;case`PullRequestConversationLookupFailed`:return`Relay could not search the product's pull-request conversations.`;case`PullRequestConversationRedirectFailed`:return`Relay found the conversation but could not open its exact pull-request page.`;case`PullRequestConversationContinuationRejected`:return e.reason===`conversation-busy`?`This pull-request conversation already has a run in progress.`:e.reason===`selection-unavailable`?`The selected Relay profile or model is no longer available.`:`This pull-request conversation no longer exists.`;case`PullRequestConversationContinuationFailed`:return`Relay could not continue this pull-request conversation.`;case`RelayProductAdapterContractError`:return`The active product does not own this pull-request conversation.`;case`RelayProductContinuationReceiptMismatch`:return`Relay returned a continuation receipt for another pull-request conversation.`}},DJ=e=>{let t=e.reasons.find(IE);return t===void 0?`Relay ended unexpectedly. No request was accepted.`:EJ(t.error)},OJ=()=>{let[e,t]=(0,N.useState)({description:null,pending:!1}),n=(0,N.useRef)(0);return(0,N.useEffect)(()=>()=>{n.current+=1},[]),[e,(0,N.useCallback)(e=>{n.current+=1;let r=n.current;t({description:null,pending:!0}),NO(e).then(e=>{n.current===r&&t(oD(e)?{description:null,pending:!1}:{description:DJ(e.cause),pending:!1})})},[])]},kJ=({host:e})=>{let[t,n]=(0,N.useState)(``),[r,i]=(0,N.useState)(``),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(``),[l,u]=(0,N.useState)(null),[d,f]=OJ();return(0,L.jsxs)(`form`,{"aria-label":`Find a pull request conversation`,onSubmit:n=>{n.preventDefault();let i=t.trim(),o=i.length===0?{provider:`codecommit`,pullRequestId:r.trim(),region:a.trim(),repositoryName:s.trim()}:{accountId:i,provider:`codecommit`,pullRequestId:r.trim(),region:a.trim(),repositoryName:s.trim()},c=GF(iJ)(o);if(Ix(c)){u(`Enter a region, repository, and pull-request number.`);return}u(null),f(e.locatePullRequestConversation(c.success))},children:[(0,L.jsx)(`h2`,{children:`Find a pull request conversation`}),(0,L.jsx)(`p`,{children:`Relay opens the exact product page before continuing a PR thread.`}),(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Region`}),(0,L.jsx)(`input`,{onChange:e=>o(e.currentTarget.value),value:a})]}),(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Repository`}),(0,L.jsx)(`input`,{onChange:e=>c(e.currentTarget.value),value:s})]}),(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Pull request`}),(0,L.jsx)(`input`,{inputMode:`numeric`,onChange:e=>i(e.currentTarget.value),value:r})]}),(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Account (optional)`}),(0,L.jsx)(`input`,{onChange:e=>n(e.currentTarget.value),value:t})]}),l===null&&d.description===null?null:(0,L.jsx)(`p`,{"aria-live":`assertive`,role:`alert`,children:l??d.description}),(0,L.jsx)(`button`,{disabled:d.pending,type:`submit`,children:d.pending?`Opening PR conversation…`:`Open PR conversation`})]})},AJ=({messages:e})=>e.length===0?(0,L.jsx)(`p`,{children:`No Relay turns yet. The first message starts this PR's durable thread.`}):(0,L.jsx)(`ol`,{"aria-label":`Pull request conversation`,children:e.map(e=>(0,L.jsxs)(`li`,{"data-relay-message-role":e.role,children:[(0,L.jsx)(`strong`,{children:e.role===`relay`?`Relay`:e.role===`operator`?`You`:`System`}),(0,L.jsx)(`p`,{children:e.text})]},e.id))}),jJ=(e,t)=>t.selection.profiles.some(({id:t})=>t===e.profileId)&&t.selection.models.some(({id:t})=>t===e.modelId),MJ=({registration:e,selection:t})=>{let[n,r]=(0,N.useState)(``),[i,a]=(0,N.useState)(null),[o,s]=OJ(),c=jJ(t,e);return(0,L.jsxs)(`form`,{"aria-label":`Continue pull request conversation`,onSubmit:i=>{if(i.preventDefault(),!c){a(`Rerun Relay with the selected profile or model before continuing this PR thread.`);return}let o=GF(fJ)({conversation:e.conversation,message:n.trim(),selection:t});if(Ix(o)){a(`Enter a pull-request request of 8,000 characters or fewer.`);return}a(null),s(e.continuePullRequestConversation(o.success).pipe(aO(()=>qD(()=>r(``)))))},children:[(0,L.jsxs)(`label`,{children:[(0,L.jsx)(`span`,{children:`Continue this PR thread`}),(0,L.jsx)(`textarea`,{maxLength:8e3,onChange:e=>r(e.currentTarget.value),placeholder:`Ask Relay to verify one concrete part of this pull request…`,rows:3,value:n})]}),i===null&&o.description===null?null:(0,L.jsx)(`p`,{"aria-live":`assertive`,role:`alert`,children:i??o.description}),!c&&i===null?(0,L.jsx)(`p`,{"aria-live":`polite`,children:`Rerun Relay with the selected profile or model before continuing this PR thread.`}):null,(0,L.jsx)(`button`,{disabled:o.pending||n.trim().length===0||!c,type:`submit`,children:o.pending?`Continuing on this PR…`:`Continue on this PR`})]})},NJ=(e,t)=>{if(t===null)return{content:(0,L.jsx)(kJ,{host:e}),status:`ready`};switch(t.status){case`loading`:return{description:`Loading the durable conversation for this pull request.`,status:`loading`,title:`Loading PR thread`};case`error`:return{description:t.description,status:`error`,title:`PR thread unavailable`};case`unavailable`:return{description:t.description,status:`unavailable`,title:`Relay unavailable for this PR`};case`ready`:return{content:(0,L.jsx)(AJ,{messages:t.messages}),status:`ready`}}},PJ=e=>e===null?`host`:JSON.stringify(dJ(e.conversation)),FJ=e=>JSON.stringify({modelId:e.modelId,models:e.models,profileId:e.profileId,profiles:e.profiles}),IJ=({children:e,host:t})=>(0,L.jsxs)(xJ,{children:[e,(0,L.jsx)(LJ,{host:t})]}),LJ=({host:e})=>{let t=CJ(),n=t?.selection??e.selection,r=PJ(t),i=FJ(n),[a,o]=(0,N.useState)(n);(0,N.useEffect)(()=>o(n),[i,r]);let s=e=>{let t=a.models.find(({id:t})=>t===e);if(t===void 0)return;let n=a.profiles.find(({id:e})=>e===t.id);o(n===void 0?{...a,modelId:t.id}:{...a,modelId:t.id,profileId:n.id})},c=e=>{let t=a.profiles.find(({id:t})=>t===e);if(t===void 0)return;let n=a.models.find(({id:e})=>e===t.id);o(n===void 0?{...a,profileId:t.id}:{...a,modelId:n.id,profileId:t.id})},l=t?.status===`ready`?t:null;return(0,L.jsx)(`div`,{"data-relay-product-dock-chrome":``,style:{insetBlockEnd:`max(var(--rly-space-16), env(safe-area-inset-bottom, 0px))`,insetInlineEnd:`max(var(--rly-space-16), env(safe-area-inset-right, 0px))`,position:`fixed`,zIndex:80},children:(0,L.jsx)(TJ,{children:(0,L.jsx)(N.Suspense,{fallback:null,children:(0,L.jsx)(wJ,{context:t?.context??e.context,defaultOpen:!1,footer:l===null?void 0:(0,L.jsx)(MJ,{registration:l,selection:a},r),selection:{model:{onValueChange:s,options:a.models.map(({id:e,label:t})=>({label:t,value:e})),value:a.modelId},profile:{onValueChange:c,options:a.profiles.map(({id:e,label:t})=>({label:t,value:e})),value:a.profileId}},state:NJ(e,t)})})})})},RJ=(e,t,n,r)=>`/accounts/${encodeURIComponent(e)}/prs/${encodeURIComponent(t)}?repository=${encodeURIComponent(n)}&region=${encodeURIComponent(r)}`,zJ=(e,t)=>e.account.awsAccountId===t||e.account.profile===t,BJ=(e,t)=>zJ(e,t)||e.account.repoAccountId===t,VJ=(e,t)=>String(e.id)===t.pullRequestId&&(t.accountId===void 0||zJ(e,t.accountId))&&(t.repositoryName===void 0||String(e.repositoryName)===t.repositoryName)&&(t.region===void 0||String(e.account.region)===t.region),HJ=(e,t)=>String(e.id)===t.pullRequestId&&(t.accountId===void 0||BJ(e,t.accountId))&&(t.repositoryName===void 0||String(e.repositoryName)===t.repositoryName)&&(t.region===void 0||String(e.account.region)===t.region),UJ=qF(Bq)({modelId:`configured-default`,models:[{id:`configured-default`,label:`Configured default`}],profileId:`configured-review`,profiles:[{id:`configured-review`,label:`Configured review`}]}),WJ=e=>e!==void 0&&e.length>0?e:void 0,GJ=e=>WJ(e.repoAccountId)??WJ(e.awsAccountId)??e.profile,KJ=e=>WJ(e.repoAccountId)===void 0?`credential`:`repository`,qJ=e=>WJ(e.awsAccountId)??e.profile,JJ=(e,t,n)=>{let r=GJ(t.account);return qF(uJ)({_tag:`codecommit`,route:{accountId:r,href:`/accounts/${encodeURIComponent(e)}/prs/${encodeURIComponent(t.id)}`,pullRequestId:t.id,routeAccountId:e},selection:n,thread:{accountId:r,pullRequestId:t.id,region:t.account.region,repositoryName:t.repositoryName}})},YJ=({children:e})=>{let t=Yz(Fq),n=or(),r=(0,N.useMemo)(()=>({context:[{id:`product`,label:`Product`,value:`CodeCommit`}],locatePullRequestConversation:RO(`CodeCommitRelayDock.locatePullRequestConversation`)(function*(e){if(t.currentUser===void 0)return yield*new pJ({operation:`locate-pull-request-conversation`,product:`codecommit`});let r={pullRequestId:String(e.pullRequestId),region:String(e.region),repositoryName:String(e.repositoryName)};e.accountId!==void 0&&(r={...r,accountId:e.accountId});let i=t.pullRequests.filter(e=>HJ(e,r));if(i.length===0)return yield*new mJ({product:`codecommit`,pullRequestId:e.pullRequestId,repositoryName:e.repositoryName});if(i.length>1)return yield*new hJ({matches:i.length,product:`codecommit`,pullRequestId:e.pullRequestId,repositoryName:e.repositoryName});let a=i[0];if(a===void 0)return yield*new mJ({product:`codecommit`,pullRequestId:e.pullRequestId,repositoryName:e.repositoryName});let o=RJ(qJ(a.account),String(a.id),String(a.repositoryName),String(a.account.region));yield*WD({try:async()=>{await n(o)},catch:()=>new gJ({href:o,product:`codecommit`})})}),product:`codecommit`,selection:UJ}),[n,t.currentUser,t.pullRequests]);return(0,L.jsx)(IJ,{host:r,children:e})},XJ=e=>qF(Bq)({modelId:e?.model??`configured-default`,models:[{id:e?.model??`configured-default`,label:e?.model??`Configured default`}],profileId:e?.id??`configured-review`,profiles:[{id:e?.id??`configured-review`,label:e?.name??`Configured review`}]}),ZJ=(e,t)=>e?.profile??t,QJ=e=>e===`user`?`operator`:`relay`,$J=e=>e.result.explanation===void 0?[]:[{id:`explanation:${e.revisionId}`,role:`relay`,text:e.result.explanation}],eY=(e,t)=>[{id:`review:${e.revisionId}`,role:`relay`,text:e.result.verdict},...$J(e),...t.map((e,t)=>({id:`${e.findingId}:${e.role}:${String(t)}`,role:QJ(e.role),text:e.message}))],tY=({available:e,context:t,continueReview:n,conversation:r,isReviewing:i,review:a,reviewIsStale:o=!1,selectedFindingId:s,selection:c,turns:l})=>{let u={context:t,conversation:r,selection:c};if(!e)return{...u,description:`Configure a CodeCommit Relay review profile before starting this PR thread.`,status:`unavailable`};if(a===null)return{...u,description:`Run Relay in the exact-revision review workspace to start this PR thread.`,status:`unavailable`};if(o)return{...u,description:`Re-run Relay against the current exact revision before continuing this PR thread.`,status:`unavailable`};let d=dJ(r),f=s??`PR`;return{...u,continuePullRequestConversation:e=>i?new _J({product:`codecommit`,reason:`conversation-busy`,thread:d}):e.selection.profileId!==c.profileId||e.selection.modelId!==c.modelId?new _J({product:`codecommit`,reason:`selection-unavailable`,thread:d}):WD({try:()=>n(f,e.message),catch:()=>new vJ({product:`codecommit`,thread:d})}).pipe(rO(e=>e._tag===`completed`?JD:new vJ({product:`codecommit`,thread:d}))),messages:eY(a,l),status:`ready`}},nY=({accountId:e,continueReview:t,diff:n,isReviewing:r,profile:i,pullRequest:a,review:o,reviewIsStale:s,selectedFindingId:c,turns:l})=>{let u=(0,N.useMemo)(()=>XJ(i),[i?.id,i?.model,i?.name]),d=GJ(a.account),f=(0,N.useMemo)(()=>JJ(e,a,u),[e,a.account.region,a.id,a.repositoryName,d,u]);return SJ((0,N.useMemo)(()=>tY({available:i!==void 0,context:[{id:`repository`,label:`Repository`,value:a.repositoryName},{id:`pull-request`,label:`Pull request`,value:`#${a.id}`},{id:`head`,label:`Current head`,value:n.headCommit.slice(0,12)}],continueReview:t,conversation:f,isReviewing:r,review:o,reviewIsStale:s,selectedFindingId:c,selection:u,turns:l}),[f,t,n.headCommit,r,i,a.id,a.repositoryName,o,s,c,u,l])),null},rY=()=>{try{return Notification}catch{return}},iY=e=>{let t=e.awsAccountId,n=e.pullRequestId;return t!==void 0&&t!==``&&n!==void 0&&n!==``?e.repositoryName!==void 0&&e.repositoryName!==``&&e.accountRegion!==void 0&&e.accountRegion!==``?RJ(t,n,e.repositoryName,e.accountRegion):`/accounts/${encodeURIComponent(t)}/prs/${encodeURIComponent(n)}`:`/notifications`};function aY(e){let t=(0,N.useRef)(e);t.current=e;let n=(0,N.useRef)([]),r=(0,N.useRef)(new Set);return{notify:(0,N.useCallback)(e=>{if(e.id!=null){if(r.current.has(e.id))return;if(r.current.add(e.id),r.current.size>500){let e=[...r.current];r.current=new Set(e.slice(e.length-250))}}let i=rY();if(i===void 0||i.permission!==`granted`)return;try{if(localStorage.getItem(j_.desktopNotifications)!==`true`)return}catch{return}let a=new i(e.title||`CodeCommit`,{body:e.message,icon:`/favicon.ico`});a.addEventListener(`click`,()=>{window.focus(),a.close(),t.current?.(iY(e))}),n.current.push(a),setTimeout(()=>{n.current=n.current.filter(e=>e!==a)},3e4)},[])}}var oY=36e5;function sY(e,t){try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}}function cY(e,t){try{let n=localStorage.getItem(e);return n===null?t:Number(n)||t}catch{return t}}function lY(e){let t=(0,N.useRef)(e);t.current=e,(0,N.useEffect)(()=>{let e=null,n=()=>{let t=cY(j_.reminderInterval,oY);e=setTimeout(r,t)},r=()=>{if(sY(j_.reminders,!0)&&t.current>0){tB(`You have ${t.current} PR${t.current>1?`s`:``} awaiting your review`,{duration:1e4});let e=rY();e!==void 0&&e.permission===`granted`&&sY(j_.desktopNotifications,!1)&&new e(`Review Reminder`,{body:`${t.current} PR${t.current>1?`s`:``} awaiting your review`,icon:`/favicon.ico`,tag:`review-reminder`})}n()};return n(),()=>{e&&clearTimeout(e)}},[])}var uY=G({id:U,title:U,description:H(U),author:U,repositoryName:U,creationDate:CL,lastModifiedDate:CL,link:U,account:G({profile:U,region:U,awsAccountId:H(U),repoAccountId:H(U)}),status:IW,sourceBranch:U,destinationBranch:U,isMergeable:cI,isApproved:cI,commentCount:H(W),healthScore:H(W),fetchedAt:H(CL),approvedBy:K(U).pipe(AI(V([]))),approvedByArns:K(U).pipe(AI(V([]))),commentedBy:K(U).pipe(AI(V([]))),filesChanged:H(W),approvalRules:K(G({ruleName:U,requiredApprovals:W,poolMembers:K(U),poolMemberArns:K(U).pipe(AI(V([]))),satisfied:cI,fromTemplate:H(U)})).pipe(AI(V([])))}),dY=G({id:W,pullRequestId:U,awsAccountId:U,type:U,title:U,profile:U,repositoryName:U,accountRegion:U,message:U,createdAt:U,read:W}),fY=G({id:U,pullRequestId:U,awsAccountId:U,region:vI(U),repositoryName:U,sourceBranch:U,containerId:vI(U),port:vI(W),status:U,statusDetail:vI(U),logs:vI(U),error:vI(U),createdAt:U,lastActivityAt:U}),pY=qF(TL(G({pullRequests:K(uY),accounts:K(G({profile:U,region:U,enabled:cI})),status:RW,statusDetail:H(U),error:H(U),lastUpdated:H(CL),currentUser:H(U),pendingReviewCount:W.pipe(AI(V(0))),unreadNotificationCount:H(W),notifications:H(G({items:K(dY),nextCursor:H(W)})),sandboxes:H(K(fY)),permissionPrompt:H(G({id:U,operation:U,category:U,context:U}))}))),mY=qF(MW),hY=qF(NW),gY=qF(HW),_Y=e=>({items:e.items,...e.nextCursor!==void 0&&{nextCursor:e.nextCursor}}),vY=e=>{let t=e.notifications===void 0?void 0:_Y(e.notifications);return{pullRequests:e.pullRequests.map(e=>gY(e)),accounts:e.accounts.map(e=>({profile:mY(e.profile),region:hY(e.region),enabled:e.enabled})),status:e.status,pendingReviewCount:e.pendingReviewCount,...e.statusDetail!==void 0&&{statusDetail:e.statusDetail},...e.error!==void 0&&{error:e.error},...e.lastUpdated!==void 0&&{lastUpdated:e.lastUpdated},...e.currentUser!==void 0&&{currentUser:e.currentUser},...e.unreadNotificationCount!==void 0&&{unreadNotificationCount:e.unreadNotificationCount},...t!==void 0&&{notifications:t},...e.sandboxes!==void 0&&{sandboxes:e.sandboxes},...e.permissionPrompt!==void 0&&{permissionPrompt:e.permissionPrompt}}};function yY(e,t,n){let r=(0,N.useRef)(e);r.current=e;let i=(0,N.useRef)(t);i.current=t;let a=(0,N.useRef)(n);a.current=n;let[o,s]=(0,N.useState)(`disconnected`),c=(0,N.useRef)(0);return(0,N.useEffect)(()=>{let e=null,t=0,n=null,o=!1,l=()=>{e=new EventSource(`/api/events/`),e.onopen=()=>{t=0,s(`connected`)},e.onmessage=e=>{try{let t=vY(pY(e.data)),n=t.notifications?.items??[],o=new Set([`title_changed`,`description_changed`]);if(c.current>0)for(let e of n)e.id>c.current&&!o.has(e.type)&&(tB(e.title||`New notification`,{id:`notif-${e.id}`,description:e.message,duration:8e3,action:e.awsAccountId!==``&&e.pullRequestId!==``&&e.repositoryName!==``&&e.accountRegion!==``?{label:`View`,onClick:()=>i.current?.(RJ(e.awsAccountId,e.pullRequestId,e.repositoryName,e.accountRegion))}:{label:`View`,onClick:()=>i.current?.(`/notifications`)}}),a.current?.({id:e.id,type:e.type,title:e.title||`CodeCommit`,message:e.message,awsAccountId:e.awsAccountId,pullRequestId:e.pullRequestId,repositoryName:e.repositoryName,accountRegion:e.accountRegion}));if(n.length>0){let e=Math.max(...n.map(e=>e.id));e>c.current&&(c.current=e)}r.current(t)}catch{}},e.onerror=()=>{if(e?.close(),t>=50){s(`disconnected`);return}s(`reconnecting`);let r=Math.min(1e3*2**t,3e4);n=setTimeout(()=>{t++,l()},r)}};return qK.then(e=>{o||(e._tag===`Ready`?l():s(`disconnected`))}),()=>{o=!0,e?.close(),n!=null&&clearTimeout(n)}},[]),o}var bY=[`account`,`author`,`approver`,`commenter`,`scope`,`repo`,`status`,`size`],xY=Az(!1).pipe(Hz),SY=[`accounts`,`refresh`,`relay`,`sandbox`,`notifications`,`permissions`,`audit`,`theme`,`config`,`about`];Az(`accounts`).pipe(Hz);var CY=1,wY=.9,TY=.8,EY=.17,DY=.1,OY=.999,kY=.9999,AY=.99,jY=/[\\\/_+.#"@\[\(\{&]/,MY=/[\\\/_+.#"@\[\(\{&]/g,NY=/[\s-]/,PY=/[\s-]/g;function FY(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?CY:AY;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=FY(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=CY:jY.test(e.charAt(l-1))?(d*=TY,p=e.slice(i,l-1).match(MY),p&&i>0&&(d*=OY**+p.length)):NY.test(e.charAt(l-1))?(d*=wY,m=e.slice(i,l-1).match(PY),m&&i>0&&(d*=OY**+m.length)):(d*=EY,i>0&&(d*=OY**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=kY)),(d<DY&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=FY(e,t,n,r,l+1,a+2,o),f*DY>d&&(d=f*DY)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function IY(e){return e.toLowerCase().replace(PY,` `)}function LY(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,FY(e,t,IY(e),IY(t),0,0,{})}var RY=`[cmdk-group=""]`,zY=`[cmdk-group-items=""]`,BY=`[cmdk-group-heading=""]`,VY=`[cmdk-item=""]`,HY=`${VY}:not([aria-disabled="true"])`,UY=`cmdk-item-select`,WY=`data-value`,GY=(e,t,n)=>LY(e,t,n),KY=N.createContext(void 0),qY=()=>N.useContext(KY),JY=N.createContext(void 0),YY=()=>N.useContext(JY),XY=N.createContext(void 0),ZY=N.forwardRef((e,t)=>{let n=dX(()=>({search:``,value:e.value??e.defaultValue??``,selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}})),r=dX(()=>new Set),i=dX(()=>new Map),a=dX(()=>new Map),o=dX(()=>new Set),s=lX(e),{label:c,children:l,value:u,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:g=!0,..._}=e,v=Fo(),y=Fo(),b=Fo(),x=N.useRef(null),S=mX();uX(()=>{if(u!==void 0){let e=u.trim();n.current.value=e,C.emit()}},[u]),uX(()=>{S(6,k)},[]);let C=N.useMemo(()=>({subscribe:e=>(o.current.add(e),()=>o.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var i,a,o;if(!Object.is(n.current[e],t)){if(n.current[e]=t,e===`search`)O(),E(),S(1,D);else if(e===`value`){if(document.activeElement.hasAttribute(`cmdk-input`)||document.activeElement.hasAttribute(`cmdk-root`)){let e=document.getElementById(b);e?e.focus():(i=document.getElementById(v))==null||i.focus()}if(S(7,()=>{n.current.selectedItemId=A()?.id,C.emit()}),r||S(5,k),s.current?.value!==void 0){let e=t??``;(o=(a=s.current).onValueChange)==null||o.call(a,e);return}}C.emit()}},emit:()=>{o.current.forEach(e=>e())}}),[]),w=N.useMemo(()=>({value:(e,t,r)=>{t!==a.current.get(e)?.value&&(a.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,T(t,r)),S(2,()=>{E(),C.emit()}))},item:(e,t)=>(r.current.add(e),t&&(i.current.has(t)?i.current.get(t).add(e):i.current.set(t,new Set([e]))),S(3,()=>{O(),E(),n.current.value||D(),C.emit()}),()=>{a.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=A();S(4,()=>{O(),t?.getAttribute(`id`)===e&&D(),C.emit()})}),group:e=>(i.current.has(e)||i.current.set(e,new Set),()=>{a.current.delete(e),i.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e[`aria-label`],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:v,inputId:b,labelId:y,listInnerRef:x}),[]);function T(e,t){let r=s.current?.filter??GY;return e?r(e,n.current.search,t):0}function E(){if(!n.current.search||s.current.shouldFilter===!1)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach(n=>{let r=i.current.get(n),a=0;r.forEach(t=>{let n=e.get(t);a=Math.max(n,a)}),t.push([n,a])});let r=x.current;j().sort((t,n)=>{let r=t.getAttribute(`id`),i=n.getAttribute(`id`);return(e.get(i)??0)-(e.get(r)??0)}).forEach(e=>{let t=e.closest(zY);t?t.appendChild(e.parentElement===t?e:e.closest(`${zY} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${zY} > *`))}),t.sort((e,t)=>t[1]-e[1]).forEach(e=>{let t=x.current?.querySelector(`${RY}[${WY}="${encodeURIComponent(e[0])}"]`);t?.parentElement.appendChild(t)})}function D(){let e=j().find(e=>e.getAttribute(`aria-disabled`)!==`true`)?.getAttribute(WY);C.setState(`value`,e||void 0)}function O(){if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let e=0;for(let t of r.current){let r=T(a.current.get(t)?.value??``,a.current.get(t)?.keywords??[]);n.current.filtered.items.set(t,r),r>0&&e++}for(let[e,t]of i.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=e}function k(){var e;let t=A();t&&(t.parentElement?.firstChild===t&&((e=t.closest(RY)?.querySelector(BY))==null||e.scrollIntoView({block:`nearest`})),t.scrollIntoView({block:`nearest`}))}function A(){return x.current?.querySelector(`${VY}[aria-selected="true"]`)}function j(){return Array.from(x.current?.querySelectorAll(HY)||[])}function M(e){let t=j()[e];t&&C.setState(`value`,t.getAttribute(WY))}function ee(e){var t;let n=A(),r=j(),i=r.findIndex(e=>e===n),a=r[i+e];(t=s.current)!=null&&t.loop&&(a=i+e<0?r[r.length-1]:i+e===r.length?r[0]:r[i+e]),a&&C.setState(`value`,a.getAttribute(WY))}function te(e){let t=A()?.closest(RY),n;for(;t&&!n;)t=e>0?sX(t,RY):cX(t,RY),n=t?.querySelector(HY);n?C.setState(`value`,n.getAttribute(WY)):ee(e)}let P=()=>M(j().length-1),F=e=>{e.preventDefault(),e.metaKey?P():e.altKey?te(1):ee(1)},ne=e=>{e.preventDefault(),e.metaKey?M(0):e.altKey?te(-1):ee(-1)};return N.createElement(Oa.div,{ref:t,tabIndex:-1,..._,"cmdk-root":``,onKeyDown:e=>{var t;(t=_.onKeyDown)==null||t.call(_,e);let n=e.nativeEvent.isComposing||e.keyCode===229;if(!(e.defaultPrevented||n))switch(e.key){case`n`:case`j`:g&&e.ctrlKey&&F(e);break;case`ArrowDown`:F(e);break;case`p`:case`k`:g&&e.ctrlKey&&ne(e);break;case`ArrowUp`:ne(e);break;case`Home`:e.preventDefault(),M(0);break;case`End`:e.preventDefault(),P();break;case`Enter`:{e.preventDefault();let t=A();if(t){let e=new Event(UY);t.dispatchEvent(e)}}}}},N.createElement(`label`,{"cmdk-label":``,htmlFor:w.inputId,id:w.labelId,style:_X},c),gX(e,e=>N.createElement(JY.Provider,{value:C},N.createElement(KY.Provider,{value:w},e))))}),QY=N.forwardRef((e,t)=>{let n=Fo(),r=N.useRef(null),i=N.useContext(XY),a=qY(),o=lX(e),s=o.current?.forceMount??i?.forceMount;uX(()=>{if(!s)return a.item(n,i?.id)},[s]);let c=pX(n,r,[e.value,e.children,r],e.keywords),l=YY(),u=fX(e=>e.value&&e.value===c.current),d=fX(e=>s||a.filter()===!1?!0:!e.search||e.filtered.items.get(n)>0);N.useEffect(()=>{let t=r.current;if(!(!t||e.disabled))return t.addEventListener(UY,f),()=>t.removeEventListener(UY,f)},[d,e.onSelect,e.disabled]);function f(){var e,t;p(),(t=(e=o.current).onSelect)==null||t.call(e,c.current)}function p(){l.setState(`value`,c.current,!0)}if(!d)return null;let{disabled:m,value:h,onSelect:g,forceMount:_,keywords:v,...y}=e;return N.createElement(Oa.div,{ref:oa(r,t),...y,id:n,"cmdk-item":``,role:`option`,"aria-disabled":!!m,"aria-selected":!!u,"data-disabled":!!m,"data-selected":!!u,onPointerMove:m||a.getDisablePointerSelection()?void 0:p,onClick:m?void 0:f},e.children)}),$Y=N.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:i,...a}=e,o=Fo(),s=N.useRef(null),c=N.useRef(null),l=Fo(),u=qY(),d=fX(e=>i||u.filter()===!1?!0:!e.search||e.filtered.groups.has(o));uX(()=>u.group(o),[]),pX(o,s,[e.value,e.heading,c]);let f=N.useMemo(()=>({id:o,forceMount:i}),[i]);return N.createElement(Oa.div,{ref:oa(s,t),...a,"cmdk-group":``,role:`presentation`,hidden:!d||void 0},n&&N.createElement(`div`,{ref:c,"cmdk-group-heading":``,"aria-hidden":!0,id:l},n),gX(e,e=>N.createElement(`div`,{"cmdk-group-items":``,role:`group`,"aria-labelledby":n?l:void 0},N.createElement(XY.Provider,{value:f},e))))}),eX=N.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,i=N.useRef(null),a=fX(e=>!e.search);return!n&&!a?null:N.createElement(Oa.div,{ref:oa(i,t),...r,"cmdk-separator":``,role:`separator`})}),tX=N.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,i=e.value!=null,a=YY(),o=fX(e=>e.search),s=fX(e=>e.selectedItemId),c=qY();return N.useEffect(()=>{e.value!=null&&a.setState(`search`,e.value)},[e.value]),N.createElement(Oa.input,{ref:t,...r,"cmdk-input":``,autoComplete:`off`,autoCorrect:`off`,spellCheck:!1,"aria-autocomplete":`list`,role:`combobox`,"aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:`text`,value:i?e.value:o,onChange:e=>{i||a.setState(`search`,e.target.value),n?.(e.target.value)}})}),nX=N.forwardRef((e,t)=>{let{children:n,label:r=`Suggestions`,...i}=e,a=N.useRef(null),o=N.useRef(null),s=fX(e=>e.selectedItemId),c=qY();return N.useEffect(()=>{if(o.current&&a.current){let e=o.current,t=a.current,n,r=new ResizeObserver(()=>{n=requestAnimationFrame(()=>{let n=e.offsetHeight;t.style.setProperty(`--cmdk-list-height`,n.toFixed(1)+`px`)})});return r.observe(e),()=>{cancelAnimationFrame(n),r.unobserve(e)}}},[]),N.createElement(Oa.div,{ref:oa(a,t),...i,"cmdk-list":``,role:`listbox`,tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},gX(e,e=>N.createElement(`div`,{ref:oa(o,c.listInnerRef),"cmdk-list-sizer":``},e)))}),rX=N.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:i,contentClassName:a,container:o,...s}=e;return N.createElement(tl,{open:n,onOpenChange:r},N.createElement(sl,{container:o},N.createElement(ll,{"cmdk-overlay":``,className:i}),N.createElement(pl,{"aria-label":e.label,"cmdk-dialog":``,className:a},N.createElement(ZY,{ref:t,...s}))))}),iX=N.forwardRef((e,t)=>fX(e=>e.filtered.count===0)?N.createElement(Oa.div,{ref:t,...e,"cmdk-empty":``,role:`presentation`}):null),aX=N.forwardRef((e,t)=>{let{progress:n,children:r,label:i=`Loading...`,...a}=e;return N.createElement(Oa.div,{ref:t,...a,"cmdk-loading":``,role:`progressbar`,"aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":i},gX(e,e=>N.createElement(`div`,{"aria-hidden":!0},e)))}),oX=Object.assign(ZY,{List:nX,Item:QY,Input:tX,Group:$Y,Separator:eX,Dialog:rX,Empty:iX,Loading:aX});function sX(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function cX(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function lX(e){let t=N.useRef(e);return uX(()=>{t.current=e}),t}var uX=typeof window>`u`?N.useEffect:N.useLayoutEffect;function dX(e){let t=N.useRef();return t.current===void 0&&(t.current=e()),t}function fX(e){let t=YY(),n=()=>e(t.snapshot());return N.useSyncExternalStore(t.subscribe,n,n)}function pX(e,t,n,r=[]){let i=N.useRef(),a=qY();return uX(()=>{var o;let s=(()=>{for(let e of n){if(typeof e==`string`)return e.trim();if(typeof e==`object`&&`current`in e)return e.current?e.current.textContent?.trim():i.current}})(),c=r.map(e=>e.trim());a.value(e,s,c),(o=t.current)==null||o.setAttribute(WY,s),i.current=s}),i}var mX=()=>{let[e,t]=N.useState(),n=dX(()=>new Map);return uX(()=>{n.current.forEach(e=>e()),n.current=new Map},[e]),(e,r)=>{n.current.set(e,r),t({})}};function hX(e){let t=e.type;return typeof t==`function`?t(e.props):`render`in t?t.render(e.props):e}function gX({asChild:e,children:t},n){return e&&N.isValidElement(t)?N.cloneElement(hX(t),{ref:t.ref},n(t.props.children)):n(t)}var _X={position:`absolute`,width:`1px`,height:`1px`,padding:`0`,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,whiteSpace:`nowrap`,borderWidth:`0`};function vX(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=vX(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function yX(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=vX(e))&&(r&&(r+=` `),r+=t);return r}var bX=(e,t)=>{let n=Array(e.length+t.length);for(let t=0;t<e.length;t++)n[t]=e[t];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},xX=(e,t)=>({classGroupId:e,validator:t}),SX=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),CX=`-`,wX=[],TX=`arbitrary..`,EX=e=>{let t=kX(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{if(e.startsWith(`[`)&&e.endsWith(`]`))return OX(e);let n=e.split(CX);return DX(n,+(n[0]===``&&n.length>1),t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=r[e],i=n[e];return t?i?bX(i,t):t:i||wX}return n[e]||wX}}},DX=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;let r=e[t],i=n.nextPart.get(r);if(i){let n=DX(e,t+1,i);if(n)return n}let a=n.validators;if(a===null)return;let o=t===0?e.join(CX):e.slice(t).join(CX),s=a.length;for(let e=0;e<s;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},OX=e=>e.slice(1,-1).indexOf(`:`)===-1?void 0:(()=>{let t=e.slice(1,-1),n=t.indexOf(`:`),r=t.slice(0,n);return r?TX+r:void 0})(),kX=e=>{let{theme:t,classGroups:n}=e;return AX(n,t)},AX=(e,t)=>{let n=SX();for(let r in e){let i=e[r];jX(i,n,r,t)}return n},jX=(e,t,n,r)=>{let i=e.length;for(let a=0;a<i;a++){let i=e[a];MX(i,t,n,r)}},MX=(e,t,n,r)=>{if(typeof e==`string`){NX(e,t,n);return}if(typeof e==`function`){PX(e,t,n,r);return}FX(e,t,n,r)},NX=(e,t,n)=>{let r=e===``?t:IX(t,e);r.classGroupId=n},PX=(e,t,n,r)=>{if(LX(e)){jX(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(xX(n,e))},FX=(e,t,n,r)=>{let i=Object.entries(e),a=i.length;for(let e=0;e<a;e++){let[a,o]=i[e];jX(o,IX(t,a),n,r)}},IX=(e,t)=>{let n=e,r=t.split(CX),i=r.length;for(let e=0;e<i;e++){let t=r[e],i=n.nextPart.get(t);i||(i=SX(),n.nextPart.set(t,i)),n=i}return n},LX=e=>`isThemeGetter`in e&&e.isThemeGetter===!0,RX=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null),i=(i,a)=>{n[i]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(e){let t=n[e];if(t!==void 0)return t;if((t=r[e])!==void 0)return i(e,t),t},set(e,t){e in n?n[e]=t:i(e,t)}}},zX=`!`,BX=`:`,VX=[],HX=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),UX=e=>{let{prefix:t,experimentalParseClassName:n}=e,r=e=>{let t=[],n=0,r=0,i=0,a,o=e.length;for(let s=0;s<o;s++){let o=e[s];if(n===0&&r===0){if(o===BX){t.push(e.slice(i,s)),i=s+1;continue}if(o===`/`){a=s;continue}}o===`[`?n++:o===`]`?n--:o===`(`?r++:o===`)`&&r--}let s=t.length===0?e:e.slice(i),c=s,l=!1;s.endsWith(zX)?(c=s.slice(0,-1),l=!0):s.startsWith(zX)&&(c=s.slice(1),l=!0);let u=a&&a>i?a-i:void 0;return HX(t,l,c,u)};if(t){let e=t+BX,n=r;r=t=>t.startsWith(e)?n(t.slice(e.length)):HX(VX,!1,t,void 0,!0)}if(n){let e=r;r=t=>n({className:t,parseClassName:e})}return r},WX=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,n)=>{t.set(e,1e6+n)}),e=>{let n=[],r=[];for(let i=0;i<e.length;i++){let a=e[i],o=a[0]===`[`,s=t.has(a);o||s?(r.length>0&&(r.sort(),n.push(...r),r=[]),n.push(a)):r.push(a)}return r.length>0&&(r.sort(),n.push(...r)),n}},GX=e=>({cache:RX(e.cacheSize),parseClassName:UX(e),sortModifiers:WX(e),postfixLookupClassGroupIds:KX(e),...EX(e)}),KX=e=>{let t=Object.create(null),n=e.postfixLookupClassGroups;if(n)for(let e=0;e<n.length;e++)t[n[e]]=!0;return t},qX=/\s+/,JX=(e,t)=>{let{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:a,postfixLookupClassGroupIds:o}=t,s=[],c=e.trim().split(qX),l=``;for(let e=c.length-1;e>=0;--e){let t=c[e],{isExternal:u,modifiers:d,hasImportantModifier:f,baseClassName:p,maybePostfixModifierPosition:m}=n(t);if(u){l=t+(l.length>0?` `+l:l);continue}let h=!!m,g;if(h){g=r(p.substring(0,m));let e=g&&o[g]?r(p):void 0;e&&e!==g&&(g=e,h=!1)}else g=r(p);if(!g){if(!h){l=t+(l.length>0?` `+l:l);continue}if(g=r(p),!g){l=t+(l.length>0?` `+l:l);continue}h=!1}let _=d.length===0?``:d.length===1?d[0]:a(d).join(`:`),v=f?_+zX:_,y=v+g;if(s.indexOf(y)>-1)continue;s.push(y);let b=i(g,h);for(let e=0;e<b.length;++e){let t=b[e];s.push(v+t)}l=t+(l.length>0?` `+l:l)}return l},YX=(...e)=>{let t=0,n,r,i=``;for(;t<e.length;)(n=e[t++])&&(r=XX(n))&&(i&&(i+=` `),i+=r);return i},XX=e=>{if(typeof e==`string`)return e;let t,n=``;for(let r=0;r<e.length;r++)e[r]&&(t=XX(e[r]))&&(n&&(n+=` `),n+=t);return n},ZX=(e,...t)=>{let n,r,i,a,o=o=>(n=GX(t.reduce((e,t)=>t(e),e())),r=n.cache.get,i=n.cache.set,a=s,s(o)),s=e=>{let t=r(e);if(t)return t;let a=JX(e,n);return i(e,a),a};return a=o,(...e)=>a(YX(...e))},QX=[],$X=e=>{let t=t=>t[e]||QX;return t.isThemeGetter=!0,t},eZ=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,tZ=/^\((?:(\w[\w-]*):)?(.+)\)$/i,nZ=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,rZ=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,iZ=/\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$/,aZ=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oZ=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,sZ=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,cZ=e=>nZ.test(e),lZ=e=>!!e&&!Number.isNaN(Number(e)),uZ=e=>!!e&&Number.isInteger(Number(e)),dZ=e=>e.endsWith(`%`)&&lZ(e.slice(0,-1)),fZ=e=>rZ.test(e),pZ=()=>!0,mZ=e=>iZ.test(e)&&!aZ.test(e),hZ=()=>!1,gZ=e=>oZ.test(e),_Z=e=>sZ.test(e),vZ=e=>!q(e)&&!J(e),yZ=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),bZ=e=>FZ(e,zZ,hZ),q=e=>eZ.test(e),xZ=e=>FZ(e,BZ,mZ),SZ=e=>FZ(e,VZ,lZ),CZ=e=>FZ(e,UZ,pZ),wZ=e=>FZ(e,HZ,hZ),TZ=e=>FZ(e,LZ,hZ),EZ=e=>FZ(e,RZ,_Z),DZ=e=>FZ(e,WZ,gZ),J=e=>tZ.test(e),OZ=e=>IZ(e,BZ),kZ=e=>IZ(e,HZ),AZ=e=>IZ(e,LZ),jZ=e=>IZ(e,zZ),MZ=e=>IZ(e,RZ),NZ=e=>IZ(e,WZ,!0),PZ=e=>IZ(e,UZ,!0),FZ=(e,t,n)=>{let r=eZ.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},IZ=(e,t,n=!1)=>{let r=tZ.exec(e);return r?r[1]?t(r[1]):n:!1},LZ=e=>e===`position`||e===`percentage`,RZ=e=>e===`image`||e===`url`,zZ=e=>e===`length`||e===`size`||e===`bg-size`,BZ=e=>e===`length`,VZ=e=>e===`number`,HZ=e=>e===`family-name`,UZ=e=>e===`number`||e===`weight`,WZ=e=>e===`shadow`,GZ=ZX(()=>{let e=$X(`color`),t=$X(`font`),n=$X(`text`),r=$X(`font-weight`),i=$X(`tracking`),a=$X(`leading`),o=$X(`breakpoint`),s=$X(`container`),c=$X(`spacing`),l=$X(`radius`),u=$X(`shadow`),d=$X(`inset-shadow`),f=$X(`text-shadow`),p=$X(`drop-shadow`),m=$X(`blur`),h=$X(`perspective`),g=$X(`aspect`),_=$X(`ease`),v=$X(`animate`),y=()=>[`auto`,`avoid`,`all`,`avoid-page`,`page`,`left`,`right`,`column`],b=()=>[`center`,`top`,`bottom`,`left`,`right`,`top-left`,`left-top`,`top-right`,`right-top`,`bottom-right`,`right-bottom`,`bottom-left`,`left-bottom`],x=()=>[...b(),J,q],S=()=>[`auto`,`hidden`,`clip`,`visible`,`scroll`],C=()=>[`auto`,`contain`,`none`],w=()=>[J,q,c],T=()=>[cZ,`full`,`auto`,...w()],E=()=>[uZ,`none`,`subgrid`,J,q],D=()=>[`auto`,{span:[`full`,uZ,J,q]},uZ,J,q],O=()=>[uZ,`auto`,J,q],k=()=>[`auto`,`min`,`max`,`fr`,J,q],A=()=>[`start`,`end`,`center`,`between`,`around`,`evenly`,`stretch`,`baseline`,`center-safe`,`end-safe`],j=()=>[`start`,`end`,`center`,`stretch`,`center-safe`,`end-safe`],M=()=>[`auto`,...w()],N=()=>[cZ,`auto`,`full`,`dvw`,`dvh`,`lvw`,`lvh`,`svw`,`svh`,`min`,`max`,`fit`,...w()],ee=()=>[cZ,`screen`,`full`,`dvw`,`lvw`,`svw`,`min`,`max`,`fit`,...w()],te=()=>[cZ,`screen`,`full`,`lh`,`dvh`,`lvh`,`svh`,`min`,`max`,`fit`,...w()],P=()=>[e,J,q],F=()=>[...b(),AZ,TZ,{position:[J,q]}],ne=()=>[`no-repeat`,{repeat:[``,`x`,`y`,`space`,`round`]}],re=()=>[`auto`,`cover`,`contain`,jZ,bZ,{size:[J,q]}],ie=()=>[dZ,OZ,xZ],ae=()=>[``,`none`,`full`,l,J,q],I=()=>[``,lZ,OZ,xZ],oe=()=>[`solid`,`dashed`,`dotted`,`double`],se=()=>[`normal`,`multiply`,`screen`,`overlay`,`darken`,`lighten`,`color-dodge`,`color-burn`,`hard-light`,`soft-light`,`difference`,`exclusion`,`hue`,`saturation`,`color`,`luminosity`],ce=()=>[lZ,dZ,AZ,TZ],le=()=>[``,`none`,m,J,q],ue=()=>[`none`,lZ,J,q],de=()=>[`none`,lZ,J,q],fe=()=>[lZ,J,q],pe=()=>[cZ,`full`,...w()];return{cacheSize:500,theme:{animate:[`spin`,`ping`,`pulse`,`bounce`],aspect:[`video`],blur:[fZ],breakpoint:[fZ],color:[pZ],container:[fZ],"drop-shadow":[fZ],ease:[`in`,`out`,`in-out`],font:[vZ],"font-weight":[`thin`,`extralight`,`light`,`normal`,`medium`,`semibold`,`bold`,`extrabold`,`black`],"inset-shadow":[fZ],leading:[`none`,`tight`,`snug`,`normal`,`relaxed`,`loose`],perspective:[`dramatic`,`near`,`normal`,`midrange`,`distant`,`none`],radius:[fZ],shadow:[fZ],spacing:[`px`,lZ],text:[fZ],"text-shadow":[fZ],tracking:[`tighter`,`tight`,`normal`,`wide`,`wider`,`widest`]},classGroups:{aspect:[{aspect:[`auto`,`square`,cZ,q,J,g]}],container:[`container`],"container-type":[{"@container":[``,`normal`,`size`,J,q]}],"container-named":[yZ],columns:[{columns:[lZ,q,J,s]}],"break-after":[{"break-after":y()}],"break-before":[{"break-before":y()}],"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:x()}],overflow:[{overflow:S()}],"overflow-x":[{"overflow-x":S()}],"overflow-y":[{"overflow-y":S()}],overscroll:[{overscroll:C()}],"overscroll-x":[{"overscroll-x":C()}],"overscroll-y":[{"overscroll-y":C()}],position:[`static`,`fixed`,`absolute`,`relative`,`sticky`],inset:[{inset:T()}],"inset-x":[{"inset-x":T()}],"inset-y":[{"inset-y":T()}],start:[{"inset-s":T(),start:T()}],end:[{"inset-e":T(),end:T()}],"inset-bs":[{"inset-bs":T()}],"inset-be":[{"inset-be":T()}],top:[{top:T()}],right:[{right:T()}],bottom:[{bottom:T()}],left:[{left:T()}],visibility:[`visible`,`invisible`,`collapse`],z:[{z:[uZ,`auto`,J,q]}],basis:[{basis:[cZ,`full`,`auto`,s,...w()]}],"flex-direction":[{flex:[`row`,`row-reverse`,`col`,`col-reverse`]}],"flex-wrap":[{flex:[`nowrap`,`wrap`,`wrap-reverse`]}],flex:[{flex:[lZ,cZ,`auto`,`initial`,`none`,q]}],grow:[{grow:[``,lZ,J,q]}],shrink:[{shrink:[``,lZ,J,q]}],order:[{order:[uZ,`first`,`last`,`none`,J,q]}],"grid-cols":[{"grid-cols":E()}],"col-start-end":[{col:D()}],"col-start":[{"col-start":O()}],"col-end":[{"col-end":O()}],"grid-rows":[{"grid-rows":E()}],"row-start-end":[{row:D()}],"row-start":[{"row-start":O()}],"row-end":[{"row-end":O()}],"grid-flow":[{"grid-flow":[`row`,`col`,`dense`,`row-dense`,`col-dense`]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:w()}],"gap-x":[{"gap-x":w()}],"gap-y":[{"gap-y":w()}],"justify-content":[{justify:[...A(),`normal`]}],"justify-items":[{"justify-items":[...j(),`normal`]}],"justify-self":[{"justify-self":[`auto`,...j()]}],"align-content":[{content:[`normal`,...A()]}],"align-items":[{items:[...j(),{baseline:[``,`last`]}]}],"align-self":[{self:[`auto`,...j(),{baseline:[``,`last`]}]}],"place-content":[{"place-content":A()}],"place-items":[{"place-items":[...j(),`baseline`]}],"place-self":[{"place-self":[`auto`,...j()]}],p:[{p:w()}],px:[{px:w()}],py:[{py:w()}],ps:[{ps:w()}],pe:[{pe:w()}],pbs:[{pbs:w()}],pbe:[{pbe:w()}],pt:[{pt:w()}],pr:[{pr:w()}],pb:[{pb:w()}],pl:[{pl:w()}],m:[{m:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mbs:[{mbs:M()}],mbe:[{mbe:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":w()}],"space-x-reverse":[`space-x-reverse`],"space-y":[{"space-y":w()}],"space-y-reverse":[`space-y-reverse`],size:[{size:N()}],"inline-size":[{inline:[`auto`,...ee()]}],"min-inline-size":[{"min-inline":[`auto`,...ee()]}],"max-inline-size":[{"max-inline":[`none`,...ee()]}],"block-size":[{block:[`auto`,...te()]}],"min-block-size":[{"min-block":[`auto`,...te()]}],"max-block-size":[{"max-block":[`none`,...te()]}],w:[{w:[s,`screen`,...N()]}],"min-w":[{"min-w":[s,`screen`,`none`,...N()]}],"max-w":[{"max-w":[s,`screen`,`none`,`prose`,{screen:[o]},...N()]}],h:[{h:[`screen`,`lh`,...N()]}],"min-h":[{"min-h":[`screen`,`lh`,`none`,...N()]}],"max-h":[{"max-h":[`screen`,`lh`,...N()]}],"font-size":[{text:[`base`,n,OZ,xZ]}],"font-smoothing":[`antialiased`,`subpixel-antialiased`],"font-style":[`italic`,`not-italic`],"font-weight":[{font:[r,PZ,CZ]}],"font-stretch":[{"font-stretch":[`ultra-condensed`,`extra-condensed`,`condensed`,`semi-condensed`,`normal`,`semi-expanded`,`expanded`,`extra-expanded`,`ultra-expanded`,dZ,q]}],"font-family":[{font:[kZ,wZ,t]}],"font-features":[{"font-features":[q]}],"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,J,q]}],"line-clamp":[{"line-clamp":[lZ,`none`,J,SZ]}],leading:[{leading:[a,...w()]}],"list-image":[{"list-image":[`none`,J,q]}],"list-style-position":[{list:[`inside`,`outside`]}],"list-style-type":[{list:[`disc`,`decimal`,`none`,J,q]}],"text-alignment":[{text:[`left`,`center`,`right`,`justify`,`start`,`end`]}],"placeholder-color":[{placeholder:P()}],"text-color":[{text:P()}],"text-decoration":[`underline`,`overline`,`line-through`,`no-underline`],"text-decoration-style":[{decoration:[...oe(),`wavy`]}],"text-decoration-thickness":[{decoration:[lZ,`from-font`,`auto`,J,xZ]}],"text-decoration-color":[{decoration:P()}],"underline-offset":[{"underline-offset":[lZ,`auto`,J,q]}],"text-transform":[`uppercase`,`lowercase`,`capitalize`,`normal-case`],"text-overflow":[`truncate`,`text-ellipsis`,`text-clip`],"text-wrap":[{text:[`wrap`,`nowrap`,`balance`,`pretty`]}],indent:[{indent:w()}],"tab-size":[{tab:[uZ,J,q]}],"vertical-align":[{align:[`baseline`,`top`,`middle`,`bottom`,`text-top`,`text-bottom`,`sub`,`super`,J,q]}],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`,J,q]}],"bg-attachment":[{bg:[`fixed`,`local`,`scroll`]}],"bg-clip":[{"bg-clip":[`border`,`padding`,`content`,`text`]}],"bg-origin":[{"bg-origin":[`border`,`padding`,`content`]}],"bg-position":[{bg:F()}],"bg-repeat":[{bg:ne()}],"bg-size":[{bg:re()}],"bg-image":[{bg:[`none`,{linear:[{to:[`t`,`tr`,`r`,`br`,`b`,`bl`,`l`,`tl`]},uZ,J,q],radial:[``,J,q],conic:[uZ,J,q]},MZ,EZ]}],"bg-color":[{bg:P()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:P()}],"gradient-via":[{via:P()}],"gradient-to":[{to:P()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:I()}],"border-w-x":[{"border-x":I()}],"border-w-y":[{"border-y":I()}],"border-w-s":[{"border-s":I()}],"border-w-e":[{"border-e":I()}],"border-w-bs":[{"border-bs":I()}],"border-w-be":[{"border-be":I()}],"border-w-t":[{"border-t":I()}],"border-w-r":[{"border-r":I()}],"border-w-b":[{"border-b":I()}],"border-w-l":[{"border-l":I()}],"divide-x":[{"divide-x":I()}],"divide-x-reverse":[`divide-x-reverse`],"divide-y":[{"divide-y":I()}],"divide-y-reverse":[`divide-y-reverse`],"border-style":[{border:[...oe(),`hidden`,`none`]}],"divide-style":[{divide:[...oe(),`hidden`,`none`]}],"border-color":[{border:P()}],"border-color-x":[{"border-x":P()}],"border-color-y":[{"border-y":P()}],"border-color-s":[{"border-s":P()}],"border-color-e":[{"border-e":P()}],"border-color-bs":[{"border-bs":P()}],"border-color-be":[{"border-be":P()}],"border-color-t":[{"border-t":P()}],"border-color-r":[{"border-r":P()}],"border-color-b":[{"border-b":P()}],"border-color-l":[{"border-l":P()}],"divide-color":[{divide:P()}],"outline-style":[{outline:[...oe(),`none`,`hidden`]}],"outline-offset":[{"outline-offset":[lZ,J,q]}],"outline-w":[{outline:[``,lZ,OZ,xZ]}],"outline-color":[{outline:P()}],shadow:[{shadow:[``,`none`,u,NZ,DZ]}],"shadow-color":[{shadow:P()}],"inset-shadow":[{"inset-shadow":[`none`,d,NZ,DZ]}],"inset-shadow-color":[{"inset-shadow":P()}],"ring-w":[{ring:I()}],"ring-w-inset":[`ring-inset`],"ring-color":[{ring:P()}],"ring-offset-w":[{"ring-offset":[lZ,xZ]}],"ring-offset-color":[{"ring-offset":P()}],"inset-ring-w":[{"inset-ring":I()}],"inset-ring-color":[{"inset-ring":P()}],"text-shadow":[{"text-shadow":[`none`,f,NZ,DZ]}],"text-shadow-color":[{"text-shadow":P()}],opacity:[{opacity:[lZ,J,q]}],"mix-blend":[{"mix-blend":[...se(),`plus-darker`,`plus-lighter`]}],"bg-blend":[{"bg-blend":se()}],"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":[lZ]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":P()}],"mask-image-linear-to-color":[{"mask-linear-to":P()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":P()}],"mask-image-t-to-color":[{"mask-t-to":P()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":P()}],"mask-image-r-to-color":[{"mask-r-to":P()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":P()}],"mask-image-b-to-color":[{"mask-b-to":P()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":P()}],"mask-image-l-to-color":[{"mask-l-to":P()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":P()}],"mask-image-x-to-color":[{"mask-x-to":P()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":P()}],"mask-image-y-to-color":[{"mask-y-to":P()}],"mask-image-radial":[{"mask-radial":[J,q]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":P()}],"mask-image-radial-to-color":[{"mask-radial-to":P()}],"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":b()}],"mask-image-conic-pos":[{"mask-conic":[lZ]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":P()}],"mask-image-conic-to-color":[{"mask-conic-to":P()}],"mask-mode":[{mask:[`alpha`,`luminance`,`match`]}],"mask-origin":[{"mask-origin":[`border`,`padding`,`content`,`fill`,`stroke`,`view`]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:ne()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":[`alpha`,`luminance`]}],"mask-image":[{mask:[`none`,J,q]}],filter:[{filter:[``,`none`,J,q]}],blur:[{blur:le()}],brightness:[{brightness:[lZ,J,q]}],contrast:[{contrast:[lZ,J,q]}],"drop-shadow":[{"drop-shadow":[``,`none`,p,NZ,DZ]}],"drop-shadow-color":[{"drop-shadow":P()}],grayscale:[{grayscale:[``,lZ,J,q]}],"hue-rotate":[{"hue-rotate":[lZ,J,q]}],invert:[{invert:[``,lZ,J,q]}],saturate:[{saturate:[lZ,J,q]}],sepia:[{sepia:[``,lZ,J,q]}],"backdrop-filter":[{"backdrop-filter":[``,`none`,J,q]}],"backdrop-blur":[{"backdrop-blur":le()}],"backdrop-brightness":[{"backdrop-brightness":[lZ,J,q]}],"backdrop-contrast":[{"backdrop-contrast":[lZ,J,q]}],"backdrop-grayscale":[{"backdrop-grayscale":[``,lZ,J,q]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[lZ,J,q]}],"backdrop-invert":[{"backdrop-invert":[``,lZ,J,q]}],"backdrop-opacity":[{"backdrop-opacity":[lZ,J,q]}],"backdrop-saturate":[{"backdrop-saturate":[lZ,J,q]}],"backdrop-sepia":[{"backdrop-sepia":[``,lZ,J,q]}],"border-collapse":[{border:[`collapse`,`separate`]}],"border-spacing":[{"border-spacing":w()}],"border-spacing-x":[{"border-spacing-x":w()}],"border-spacing-y":[{"border-spacing-y":w()}],"table-layout":[{table:[`auto`,`fixed`]}],caption:[{caption:[`top`,`bottom`]}],transition:[{transition:[``,`all`,`colors`,`opacity`,`shadow`,`transform`,`none`,J,q]}],"transition-behavior":[{transition:[`normal`,`discrete`]}],duration:[{duration:[lZ,`initial`,J,q]}],ease:[{ease:[`linear`,`initial`,_,J,q]}],delay:[{delay:[lZ,J,q]}],animate:[{animate:[`none`,v,J,q]}],backface:[{backface:[`hidden`,`visible`]}],perspective:[{perspective:[h,J,q]}],"perspective-origin":[{"perspective-origin":x()}],rotate:[{rotate:ue()}],"rotate-x":[{"rotate-x":ue()}],"rotate-y":[{"rotate-y":ue()}],"rotate-z":[{"rotate-z":ue()}],scale:[{scale:de()}],"scale-x":[{"scale-x":de()}],"scale-y":[{"scale-y":de()}],"scale-z":[{"scale-z":de()}],"scale-3d":[`scale-3d`],skew:[{skew:fe()}],"skew-x":[{"skew-x":fe()}],"skew-y":[{"skew-y":fe()}],transform:[{transform:[J,q,``,`none`,`gpu`,`cpu`]}],"transform-origin":[{origin:x()}],"transform-style":[{transform:[`3d`,`flat`]}],translate:[{translate:pe()}],"translate-x":[{"translate-x":pe()}],"translate-y":[{"translate-y":pe()}],"translate-z":[{"translate-z":pe()}],"translate-none":[`translate-none`],zoom:[{zoom:[uZ,J,q]}],accent:[{accent:P()}],appearance:[{appearance:[`none`,`auto`]}],"caret-color":[{caret:P()}],"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`,J,q]}],"field-sizing":[{"field-sizing":[`fixed`,`content`]}],"pointer-events":[{"pointer-events":[`auto`,`none`]}],resize:[{resize:[`none`,``,`y`,`x`]}],"scroll-behavior":[{scroll:[`auto`,`smooth`]}],"scrollbar-thumb-color":[{"scrollbar-thumb":P()}],"scrollbar-track-color":[{"scrollbar-track":P()}],"scrollbar-gutter":[{"scrollbar-gutter":[`auto`,`stable`,`both`]}],"scrollbar-w":[{scrollbar:[`auto`,`thin`,`none`]}],"scroll-m":[{"scroll-m":w()}],"scroll-mx":[{"scroll-mx":w()}],"scroll-my":[{"scroll-my":w()}],"scroll-ms":[{"scroll-ms":w()}],"scroll-me":[{"scroll-me":w()}],"scroll-mbs":[{"scroll-mbs":w()}],"scroll-mbe":[{"scroll-mbe":w()}],"scroll-mt":[{"scroll-mt":w()}],"scroll-mr":[{"scroll-mr":w()}],"scroll-mb":[{"scroll-mb":w()}],"scroll-ml":[{"scroll-ml":w()}],"scroll-p":[{"scroll-p":w()}],"scroll-px":[{"scroll-px":w()}],"scroll-py":[{"scroll-py":w()}],"scroll-ps":[{"scroll-ps":w()}],"scroll-pe":[{"scroll-pe":w()}],"scroll-pbs":[{"scroll-pbs":w()}],"scroll-pbe":[{"scroll-pbe":w()}],"scroll-pt":[{"scroll-pt":w()}],"scroll-pr":[{"scroll-pr":w()}],"scroll-pb":[{"scroll-pb":w()}],"scroll-pl":[{"scroll-pl":w()}],"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`,J,q]}],fill:[{fill:[`none`,...P()]}],"stroke-w":[{stroke:[lZ,OZ,xZ,SZ]}],stroke:[{stroke:[`none`,...P()]}],"forced-color-adjust":[{"forced-color-adjust":[`auto`,`none`]}]},conflictingClassGroups:{"container-named":[`container-type`],overflow:[`overflow-x`,`overflow-y`],overscroll:[`overscroll-x`,`overscroll-y`],inset:[`inset-x`,`inset-y`,`inset-bs`,`inset-be`,`start`,`end`,`top`,`right`,`bottom`,`left`],"inset-x":[`right`,`left`],"inset-y":[`top`,`bottom`],flex:[`basis`,`grow`,`shrink`],gap:[`gap-x`,`gap-y`],p:[`px`,`py`,`ps`,`pe`,`pbs`,`pbe`,`pt`,`pr`,`pb`,`pl`],px:[`pr`,`pl`],py:[`pt`,`pb`],m:[`mx`,`my`,`ms`,`me`,`mbs`,`mbe`,`mt`,`mr`,`mb`,`ml`],mx:[`mr`,`ml`],my:[`mt`,`mb`],size:[`w`,`h`],"font-size":[`leading`],"fvn-normal":[`fvn-ordinal`,`fvn-slashed-zero`,`fvn-figure`,`fvn-spacing`,`fvn-fraction`],"fvn-ordinal":[`fvn-normal`],"fvn-slashed-zero":[`fvn-normal`],"fvn-figure":[`fvn-normal`],"fvn-spacing":[`fvn-normal`],"fvn-fraction":[`fvn-normal`],"line-clamp":[`display`,`overflow`],rounded:[`rounded-s`,`rounded-e`,`rounded-t`,`rounded-r`,`rounded-b`,`rounded-l`,`rounded-ss`,`rounded-se`,`rounded-ee`,`rounded-es`,`rounded-tl`,`rounded-tr`,`rounded-br`,`rounded-bl`],"rounded-s":[`rounded-ss`,`rounded-es`],"rounded-e":[`rounded-se`,`rounded-ee`],"rounded-t":[`rounded-tl`,`rounded-tr`],"rounded-r":[`rounded-tr`,`rounded-br`],"rounded-b":[`rounded-br`,`rounded-bl`],"rounded-l":[`rounded-tl`,`rounded-bl`],"border-spacing":[`border-spacing-x`,`border-spacing-y`],"border-w":[`border-w-x`,`border-w-y`,`border-w-s`,`border-w-e`,`border-w-bs`,`border-w-be`,`border-w-t`,`border-w-r`,`border-w-b`,`border-w-l`],"border-w-x":[`border-w-r`,`border-w-l`],"border-w-y":[`border-w-t`,`border-w-b`],"border-color":[`border-color-x`,`border-color-y`,`border-color-s`,`border-color-e`,`border-color-bs`,`border-color-be`,`border-color-t`,`border-color-r`,`border-color-b`,`border-color-l`],"border-color-x":[`border-color-r`,`border-color-l`],"border-color-y":[`border-color-t`,`border-color-b`],translate:[`translate-x`,`translate-y`,`translate-none`],"translate-none":[`translate`,`translate-x`,`translate-y`,`translate-z`],"scroll-m":[`scroll-mx`,`scroll-my`,`scroll-ms`,`scroll-me`,`scroll-mbs`,`scroll-mbe`,`scroll-mt`,`scroll-mr`,`scroll-mb`,`scroll-ml`],"scroll-mx":[`scroll-mr`,`scroll-ml`],"scroll-my":[`scroll-mt`,`scroll-mb`],"scroll-p":[`scroll-px`,`scroll-py`,`scroll-ps`,`scroll-pe`,`scroll-pbs`,`scroll-pbe`,`scroll-pt`,`scroll-pr`,`scroll-pb`,`scroll-pl`],"scroll-px":[`scroll-pr`,`scroll-pl`],"scroll-py":[`scroll-pt`,`scroll-pb`],touch:[`touch-x`,`touch-y`,`touch-pz`],"touch-x":[`touch`],"touch-y":[`touch`],"touch-pz":[`touch`]},conflictingClassGroupModifiers:{"font-size":[`leading`]},postfixLookupClassGroups:[`container-type`],orderSensitiveModifiers:[`*`,`**`,`after`,`backdrop`,`before`,`details-content`,`file`,`first-letter`,`first-line`,`marker`,`placeholder`,`selection`]}});function KZ(...e){return GZ(yX(e))}function qZ({...e}){return(0,L.jsx)(tl,{"data-slot":`dialog`,...e})}function JZ({...e}){return(0,L.jsx)(sl,{"data-slot":`dialog-portal`,...e})}function YZ({className:e,...t}){return(0,L.jsx)(ll,{"data-slot":`dialog-overlay`,className:KZ(`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 XZ({children:e,className:t,showCloseButton:n=!0,...r}){return(0,L.jsxs)(JZ,{"data-slot":`dialog-portal`,children:[(0,L.jsx)(YZ,{}),(0,L.jsxs)(pl,{"data-slot":`dialog-content`,className:KZ(`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&&(0,L.jsxs)(Sl,{"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:[(0,L.jsx)(C_,{}),(0,L.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function ZZ({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`dialog-header`,className:KZ(`flex flex-col gap-2 text-center sm:text-left`,e),...t})}function QZ({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`dialog-footer`,className:KZ(`flex flex-col-reverse gap-2 sm:flex-row sm:justify-end`,e),...t})}function $Z({className:e,...t}){return(0,L.jsx)(vl,{"data-slot":`dialog-title`,className:KZ(`text-lg leading-none font-semibold`,e),...t})}function eQ({className:e,...t}){return(0,L.jsx)(bl,{"data-slot":`dialog-description`,className:KZ(`text-muted-foreground text-sm`,e),...t})}function tQ({className:e,...t}){return(0,L.jsx)(oX,{"data-slot":`command`,className:KZ(`bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md`,e),...t})}function nQ({children:e,className:t,description:n=`Search for a command to run...`,showCloseButton:r=!0,title:i=`Command Palette`,...a}){return(0,L.jsxs)(qZ,{...a,children:[(0,L.jsxs)(ZZ,{className:`sr-only`,children:[(0,L.jsx)($Z,{children:i}),(0,L.jsx)(eQ,{children:n})]}),(0,L.jsx)(XZ,{className:KZ(`overflow-hidden p-0`,t),showCloseButton:r,children:(0,L.jsx)(tQ,{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 rQ({className:e,...t}){return(0,L.jsxs)(`div`,{"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b px-3`,children:[(0,L.jsx)(__,{className:`size-4 shrink-0 opacity-50`}),(0,L.jsx)(oX.Input,{"data-slot":`command-input`,className:KZ(`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 iQ({className:e,...t}){return(0,L.jsx)(oX.List,{"data-slot":`command-list`,className:KZ(`max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto`,e),...t})}function aQ({...e}){return(0,L.jsx)(oX.Empty,{"data-slot":`command-empty`,className:`py-6 text-center text-sm`,...e})}function oQ({className:e,...t}){return(0,L.jsx)(oX.Group,{"data-slot":`command-group`,className:KZ(`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 sQ({className:e,...t}){return(0,L.jsx)(oX.Separator,{"data-slot":`command-separator`,className:KZ(`bg-border -mx-1 h-px`,e),...t})}function cQ({className:e,...t}){return(0,L.jsx)(oX.Item,{"data-slot":`command-item`,className:KZ(`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})}var lQ={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repo`,status:`Status`,size:`Size`};function uQ(){let e=Yz(xY),t=Zz(xY),n=or(),r=Zz(tq),i=e=>{n(e?`/settings/${e}`:`/settings`),t(!1)};return(0,N.useEffect)(()=>{let e=e=>{e.key===`p`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),t(e=>!e))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t]),(0,L.jsxs)(nQ,{open:e,onOpenChange:t,showCloseButton:!1,children:[(0,L.jsx)(rQ,{placeholder:`Type a command...`}),(0,L.jsxs)(iQ,{children:[(0,L.jsx)(aQ,{children:`No results found.`}),(0,L.jsxs)(oQ,{heading:`Actions`,children:[(0,L.jsxs)(cQ,{onSelect:()=>{r({}),t(!1)},children:[(0,L.jsx)(h_,{}),`Refresh PRs`]}),(0,L.jsxs)(cQ,{onSelect:()=>{n(`/`),t(!1)},children:[(0,L.jsx)(t_,{}),`View: PR List`]}),(0,L.jsxs)(cQ,{onSelect:()=>{n(`/notifications`),t(!1)},children:[(0,L.jsx)(Mg,{}),`View: Notifications`]})]}),(0,L.jsx)(sQ,{}),(0,L.jsxs)(oQ,{heading:`Settings`,children:[(0,L.jsxs)(cQ,{onSelect:()=>i(),children:[(0,L.jsx)(v_,{}),`Open Settings`]}),(0,L.jsxs)(cQ,{onSelect:()=>i(`accounts`),children:[(0,L.jsx)(v_,{}),`Settings: Accounts`]}),(0,L.jsxs)(cQ,{onSelect:()=>i(`theme`),children:[(0,L.jsx)(v_,{}),`Settings: Theme`]}),(0,L.jsxs)(cQ,{onSelect:()=>i(`config`),children:[(0,L.jsx)(v_,{}),`Settings: Config`]}),(0,L.jsxs)(cQ,{onSelect:()=>i(`about`),children:[(0,L.jsx)(v_,{}),`Settings: About`]})]}),(0,L.jsx)(sQ,{}),(0,L.jsxs)(oQ,{heading:`Filters`,children:[(0,L.jsxs)(cQ,{onSelect:()=>{n(`/?hot=1`),t(!1)},children:[(0,L.jsx)(e_,{}),`Hot`]}),bY.map(e=>(0,L.jsxs)(cQ,{onSelect:()=>{n(`/?f=${e}:`),t(!1)},children:[(0,L.jsx)(t_,{}),`Filter: `,lQ[e]]},e))]})]})]})}var dQ=e=>`${e.getDate().toString().padStart(2,`0`)}.${(e.getMonth()+1).toString().padStart(2,`0`)}.${e.getFullYear()}`,fQ=(e,t,n=`Updated`)=>cB(Math.max(0,Math.floor((t.getTime()-e.getTime())/1e3))).pipe(lB(e=>e<60,e=>`${n} ${e}s ago`),lB(e=>e<3600,e=>`${n} ${Math.floor(e/60)}m ago`),lB(e=>e<86400,e=>`${n} ${Math.floor(e/3600)}h ago`),uB(()=>`${n} on ${dQ(e)}`)),pQ=e=>{let t=/^(\d{4})-W(\d{2})$/.exec(e);if(!t)return Bb();let n=parseInt(t[1],10),r=parseInt(t[2],10);if(r<1||r>53)return Bb();let i=new Date(Date.UTC(n,0,4)),a=i.getUTCDay()||7,o=new Date(i.getTime()+((r-1)*7-(a-1))*864e5);return Vb({week:e,start:o,end:new Date(o.getTime()+6048e5)})},mQ=e=>{let t=new Date(Date.UTC(e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate())),n=t.getUTCDay()||7;t.setUTCDate(t.getUTCDate()+4-n);let r=new Date(Date.UTC(t.getUTCFullYear(),0,1)),i=Math.ceil(((t.getTime()-r.getTime())/864e5+1)/7);return`${t.getUTCFullYear()}-W${i.toString().padStart(2,`0`)}`},hQ=e=>{let t=e.week.split(`-W`),n=e.start.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`}),r=e.end.toLocaleString(`en-US`,{month:`short`,timeZone:`UTC`}),i=e.start.getUTCDate(),a=e.end.getUTCDate(),o=n===r?`${n} ${i} – ${a}`:`${n} ${i} – ${r} ${a}`;return`W${t[1]} ${t[0]} · ${o}`},gQ=e=>{let t=OS(xS(e));return t<1?`${Math.round(t*60)}m`:t<24?`${Math.floor(t)}h`:`${Math.round(t/24*10)/10}d`},_Q=e=>Object.prototype.toString.call(e),vQ=e=>e===!0||e===!1,yQ=e=>_Q(Object(e))===`[object Function]`,bQ=e=>_Q(Object(e))===`[object Number]`&&Object.is(Object(e).valueOf(),e),xQ=e=>e!==null&&Object(e)===e&&!yQ(e),SQ=e=>_Q(Object(e))===`[object String]`&&Object(e).valueOf()===e,CQ=e=>e,wQ=(e,t)=>{let n=e[t];if(n===void 0)throw Error(`Missing CSS Module class: ${t}`);return n},TQ=(...e)=>e.filter(e=>SQ(e)&&e.length>0).join(` `),Y=(e,t)=>{if(e.trim().length===0)throw Error(`${t} must contain visible text`);return e},EQ=new WeakMap,DQ=new WeakMap,OQ=(0,N.createContext)(null),kQ=0,AQ=(e,t)=>{let n=(0,N.useRef)({open:e,value:t}),r=e&&!n.current.open?t:n.current.value;return(0,N.useLayoutEffect)(()=>{e?n.current.open||(n.current={open:!0,value:t}):n.current={open:!1,value:t}},[e,t]),r},jQ=e=>`inert`in e&&vQ(e.inert),MQ=e=>e!==null&&jQ(e),NQ=({children:e})=>{let[t,n]=(0,N.useState)(!1);return(0,N.createElement)(OQ.Provider,{value:{isContentMounted:t,setContentMounted:n}},e)},PQ=()=>(0,N.useContext)(OQ)?.isContentMounted??!0,FQ=()=>(0,N.useContext)(OQ)!==null,IQ=()=>{let e=(0,N.useContext)(OQ)?.setContentMounted;(0,N.useLayoutEffect)(()=>(e?.(!0),()=>e?.(!1)),[e])},LQ=e=>{let t=EQ.get(e);if(t===void 0){EQ.set(e,{count:1,previous:e.inert}),e.inert=!0;return}t.count+=1},RQ=e=>{let t=EQ.get(e);if(t!==void 0){if(t.count>1){--t.count;return}e.inert=t.previous,EQ.delete(e)}},zQ=(e,t)=>{(0,N.useLayoutEffect)(()=>{if(!t)return;let n=e.current;if(n===null)return;let r=new Set,i=new Set,a=n.ownerDocument.defaultView?.MutationObserver,o=null,s=()=>{let e=n;for(;e!==e.ownerDocument.body;){let t=e.parentNode;if(t===null)break;i.has(t)||(o?.observe(t,{childList:!0}),i.add(t));let n=!1;for(let i of t.children){if(i===e){n=!0;continue}!(n&&i.hasAttribute(`data-rly-modal-layer`))&&MQ(i)&&!r.has(i)&&(LQ(i),r.add(i))}let a=e.parentElement;if(a!==null){e=a;continue}if(!(`host`in t))break;let s=t.host;if(!xQ(s)||!jQ(s))break;e=s}};return a!==void 0&&(o=new a(s)),s(),()=>{o?.disconnect();for(let e of r)RQ(e)}},[t,e])},BQ=e=>{let t=DQ.get(e);if(t!==void 0){t.count+=1;return}let n=e.documentElement;DQ.set(e,{count:1,overflow:n.style.overflow,overscrollBehavior:n.style.overscrollBehavior}),n.style.overflow=`hidden`,n.style.overscrollBehavior=`none`},VQ=e=>{let t=DQ.get(e);if(t===void 0)return;if(t.count>1){--t.count;return}let n=e.documentElement;n.style.overflow=t.overflow,n.style.overscrollBehavior=t.overscrollBehavior,DQ.delete(e)},HQ=(e,t)=>{(0,N.useLayoutEffect)(()=>{if(!t)return;let n=e.current?.ownerDocument;if(n!==void 0)return BQ(n),()=>VQ(n)},[t,e])},UQ=()=>{kQ+=1},WQ=e=>{let t=++kQ;setTimeout(()=>{kQ===t&&e!==null&&e.isConnected===!0&&e.focus()},0)},GQ={layer:`rly_Sheet-module__layer`,trigger:`rly_Sheet-module__trigger`,close:`rly_Sheet-module__close`,iconClose:`rly_Sheet-module__iconClose`,overlay:`rly_Sheet-module__overlay`,"rly-sheet-overlay-out":`rly_Sheet-module__rly-sheet-overlay-out`,"rly-sheet-overlay-in":`rly_Sheet-module__rly-sheet-overlay-in`,content:`rly_Sheet-module__content`,end:`rly_Sheet-module__end`,"rly-sheet-end-out":`rly_Sheet-module__rly-sheet-end-out`,"rly-sheet-end-in":`rly_Sheet-module__rly-sheet-end-in`,start:`rly_Sheet-module__start`,"rly-sheet-start-out":`rly_Sheet-module__rly-sheet-start-out`,"rly-sheet-start-in":`rly_Sheet-module__rly-sheet-start-in`,header:`rly_Sheet-module__header`,heading:`rly_Sheet-module__heading`,title:`rly_Sheet-module__title`,description:`rly_Sheet-module__description`,body:`rly_Sheet-module__body`,footer:`rly_Sheet-module__footer`},KQ=e=>wQ(GQ,e),qQ=CQ({side:{end:{className:KQ(`end`),purpose:`Supporting detail that follows the current reading flow`,tokens:[`color-surface-1`,`radius-overlay`,`motion-standard`]},start:{className:KQ(`start`),purpose:`Navigation or context that precedes the current reading flow`,tokens:[`color-surface-1`,`radius-overlay`,`motion-standard`]}}}),JQ=CQ({side:`end`}),YQ=(0,N.createContext)(null),XQ=()=>{let e=(0,N.useContext)(YQ);if(e===null)throw Error(`Sheet compound components must be nested inside Sheet.Root`);return e},ZQ=({children:e,entryMotion:t})=>{let n=XQ(),r=(0,N.useRef)(null);return IQ(),zQ(r,n.open),(0,L.jsx)(`div`,{className:KQ(`layer`),"data-rly-modal-layer":``,"data-rly-sheet-entry-motion":t,"data-rly-sheet-layer":``,ref:r,children:e})},QQ=(e,t)=>(SQ(e)&&Y(e,`${t} children`),e),$Q=Object.freeze({Body:({className:e,...t})=>(0,L.jsx)(`div`,{...t,className:TQ(KQ(`body`),e)}),Close:({children:e,className:t,type:n,...r})=>(0,L.jsx)(Sl,{...r,className:TQ(KQ(`close`),t),type:n??`button`,children:QQ(e,`Sheet.Close`)}),Content:({children:e,className:t,closeLabel:n,description:r,entryMotion:i=`intrinsic`,initialFocusRef:a,ref:o,side:s=JQ.side,tabIndex:c,title:l,...u})=>{let d=XQ(),f=AQ(d.open,i),p=Y(l,`Sheet title`),m=r===void 0?void 0:Y(r,`Sheet description`),h=Y(n??`Close ${p}`,`Sheet closeLabel`),g=(0,N.useRef)(null),_=(0,N.useCallback)(e=>{g.current=e,yQ(o)?o(e):o!=null&&(o.current=e)},[o]);return(0,L.jsx)(O_,{children:n=>(0,L.jsx)(sl,{container:n,children:(0,L.jsxs)(ZQ,{entryMotion:f,children:[(0,L.jsx)(ll,{className:KQ(`overlay`),"data-rly-sheet-overlay":``,onPointerDown:()=>d.requestOpenChange(!1)}),(0,L.jsxs)(pl,{...u,...m===void 0?{"aria-describedby":void 0}:{},className:TQ(KQ(`content`),qQ.side[s].className,t),"data-rly-sheet-side":s,onCloseAutoFocus:e=>e.preventDefault(),onOpenAutoFocus:e=>{e.preventDefault();let t=g.current?.ownerDocument.activeElement??null;d.restoreFocusRef.current===null&&MQ(t)&&(d.restoreFocusRef.current=t);let n=a?.current??g.current;n?.focus(),n!==g.current&&n?.ownerDocument.activeElement!==n&&g.current?.focus()},ref:_,tabIndex:c??-1,children:[(0,L.jsxs)(`div`,{className:KQ(`header`),children:[(0,L.jsxs)(`div`,{className:KQ(`heading`),children:[(0,L.jsx)(vl,{className:KQ(`title`),children:p}),m===void 0?null:(0,L.jsx)(bl,{className:KQ(`description`),children:m})]}),(0,L.jsx)(Sl,{"aria-label":h,className:KQ(`iconClose`),type:`button`,children:(0,L.jsx)(w_,{decorative:!0,name:`close`,size:`default`})})]}),e]})]})})})},Footer:({className:e,...t})=>(0,L.jsx)(`footer`,{...t,className:TQ(KQ(`footer`),e)}),Root:e=>{let{children:t,defaultOpen:n=!1,onOpenChange:r,open:i}=e,[a,o]=(0,N.useState)(n),s=PQ(),c=(0,N.useRef)(null),l=(i??a)&&s,u=(0,N.useRef)(l),d=e=>{i===void 0&&o(e),r?.(e)};return(0,N.useLayoutEffect)(()=>{u.current!==l&&(u.current=l,l?UQ():WQ(c.current))},[l]),(0,L.jsx)(NQ,{children:(0,L.jsx)(YQ.Provider,{value:{open:l,requestOpenChange:d,restoreFocusRef:c},children:(0,L.jsx)(tl,{modal:!0,onOpenChange:d,open:l,children:t})})})},Trigger:({children:e,className:t,onClick:n,type:r,...i})=>{let a=XQ();return(0,L.jsx)(rl,{...i,className:TQ(KQ(`trigger`),t),onClick:e=>{a.restoreFocusRef.current=e.currentTarget,n?.(e)},type:r??`button`,children:QQ(e,`Sheet.Trigger`)})}}),e$={root:`rly_Button-module__root`,primary:`rly_Button-module__primary`,secondary:`rly_Button-module__secondary`,quiet:`rly_Button-module__quiet`,compact:`rly_Button-module__compact`,defaultSize:`rly_Button-module__defaultSize`,principal:`rly_Button-module__principal`,stretch:`rly_Button-module__stretch`,content:`rly_Button-module__content`,label:`rly_Button-module__label`,loadingContent:`rly_Button-module__loadingContent`,loader:`rly_Button-module__loader`},t$=e=>wQ(e$,e),n$=CQ({variant:{primary:{className:t$(`primary`),purpose:`Single principal action`,tokens:[`color-action-background`,`color-action-foreground`]},secondary:{className:t$(`secondary`),purpose:`Default supporting action`,tokens:[`color-surface-1`,`color-border-2`]},quiet:{className:t$(`quiet`),purpose:`Low-emphasis contextual action`,tokens:[`color-text-1`,`color-surface-2`]}},size:{compact:{className:t$(`compact`),purpose:`Dense text action`,tokens:[`space-40`]},default:{className:t$(`defaultSize`),purpose:`Standard action`,tokens:[`space-48`]},principal:{className:t$(`principal`),purpose:`Prominent consequential action`,tokens:[`space-48`,`space-8`]}}}),r$=({"aria-label":e,"aria-labelledby":t,children:n,className:r,disabled:i,leadingIcon:a,loading:o=!1,size:s=`default`,stretch:c=!1,trailingIcon:l,type:u,variant:d=`secondary`,...f})=>{if(!bQ(n)&&!SQ(n)||SQ(n)&&n.trim().length===0)throw Error(`Button children must contain visible content`);return(0,L.jsxs)(`button`,{...f,"aria-busy":o?`true`:void 0,"aria-label":o&&!t?.trim()?e?.trim()?e:String(n):e,"aria-labelledby":t,className:TQ(t$(`root`),n$.variant[d].className,n$.size[s].className,c&&t$(`stretch`),r),"data-loading":o?`true`:void 0,disabled:i||o,type:u??`button`,children:[(0,L.jsxs)(`span`,{className:TQ(t$(`content`),o&&t$(`loadingContent`)),children:[a===void 0?null:(0,L.jsx)(w_,{decorative:!0,name:a,size:s===`compact`?`small`:`default`}),(0,L.jsx)(`span`,{className:t$(`label`),children:n}),l===void 0?null:(0,L.jsx)(w_,{decorative:!0,name:l,size:s===`compact`?`small`:`default`})]}),o?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:t$(`loader`),children:(0,L.jsx)(w_,{decorative:!0,name:`loader`,size:s===`compact`?`small`:`default`})}):null]})},i$={root:`rly_StateLabel-module__root`,neutral:`rly_StateLabel-module__neutral`,positive:`rly_StateLabel-module__positive`,critical:`rly_StateLabel-module__critical`,caution:`rly_StateLabel-module__caution`,progress:`rly_StateLabel-module__progress`,compact:`rly_StateLabel-module__compact`,defaultSize:`rly_StateLabel-module__defaultSize`},a$=e=>wQ(i$,e),o$=CQ({tone:{neutral:{className:a$(`neutral`),purpose:`Neutral or unavailable state`,tokens:[`color-text-2`,`color-surface-2`]},positive:{className:a$(`positive`),purpose:`Positive state`,tokens:[`color-success-ink`,`color-success-tint`]},critical:{className:a$(`critical`),purpose:`Critical state`,tokens:[`color-blocked-ink`,`color-blocked-tint`]},caution:{className:a$(`caution`),purpose:`Caution state`,tokens:[`color-held-ink`,`color-held-tint`]},progress:{className:a$(`progress`),purpose:`Work in progress`,tokens:[`color-deploying-ink`,`color-deploying-tint`]}},size:{compact:{className:a$(`compact`),purpose:`Dense metadata state`,tokens:[`type-meta`]},default:{className:a$(`defaultSize`),purpose:`Standard explicit state`,tokens:[`type-label`]}}}),s$={neutral:`minus`,positive:`check`,critical:`alert`,caution:`clock`,progress:`loader`},c$=({className:e,icon:t,label:n,size:r=`default`,tone:i=`neutral`,...a})=>(0,L.jsxs)(`span`,{...a,className:TQ(a$(`root`),o$.tone[i].className,o$.size[r].className,e),children:[(0,L.jsx)(w_,{decorative:!0,name:t??s$[i],size:`small`}),(0,L.jsx)(`span`,{children:Y(n,`StateLabel label`)})]}),l$={root:`rly_Avatar-module__root`,small:`rly_Avatar-module__small`,defaultSize:`rly_Avatar-module__defaultSize`,large:`rly_Avatar-module__large`,hero:`rly_Avatar-module__hero`,circle:`rly_Avatar-module__circle`,roundedSquare:`rly_Avatar-module__roundedSquare`,image:`rly_Avatar-module__image`,fallback:`rly_Avatar-module__fallback`},u$=e=>wQ(l$,e),d$=CQ({size:{small:{className:u$(`small`),purpose:`Compact supporting identity`,tokens:[`space-24`]},default:{className:u$(`defaultSize`),purpose:`Standard identity`,tokens:[`space-32`]},large:{className:u$(`large`),purpose:`Prominent identity`,tokens:[`space-40`]},hero:{className:u$(`hero`),purpose:`Page-level identity`,tokens:[`space-48`,`space-8`]}},form:{circle:{className:u$(`circle`),purpose:`Human or general identity`,tokens:[`radius-round`]},"rounded-square":{className:u$(`roundedSquare`),purpose:`Non-human or system identity`,tokens:[`radius-field`]}}}),f$=({className:e,decorative:t,fallback:n,form:r=`circle`,label:i,size:a=`default`,src:o,...s})=>{let c=t?void 0:Y(i,`Avatar label`),l=Y(n,`Avatar fallback`);return(0,L.jsxs)(Ml,{...s,"aria-hidden":t?`true`:void 0,"aria-label":c,className:TQ(u$(`root`),d$.size[a].className,d$.form[r].className,e),role:t?void 0:`img`,children:[o===void 0?null:(0,L.jsx)(Pl,{alt:``,className:u$(`image`),decoding:`async`,loading:`lazy`,src:o}),(0,L.jsx)(Il,{"aria-hidden":`true`,className:u$(`fallback`),children:l})]})},p$={root:`rly_Skeleton-module__root`,text:`rly_Skeleton-module__text`,block:`rly_Skeleton-module__block`,circle:`rly_Skeleton-module__circle`},m$=e=>wQ(p$,e),h$=CQ({variant:{text:{className:m$(`text`),purpose:`A line of unavailable copy`,tokens:[`type-body`,`radius-tag`]},block:{className:m$(`block`),purpose:`A rectangular unavailable region`,tokens:[`space-64`,`radius-control`]},circle:{className:m$(`circle`),purpose:`A circular unavailable image`,tokens:[`radius-round`]}}}),g$=({className:e,decorative:t=!0,height:n,label:r,style:i,variant:a=`text`,width:o,...s})=>{if(!t&&r===void 0)throw Error(`Skeleton label must contain visible text`);let c=t||r===void 0?void 0:Y(r,`Skeleton label`),l={...n!==void 0&&{blockSize:n},...o!==void 0&&{inlineSize:o}};return(0,L.jsx)(`div`,{...s,"aria-busy":t?void 0:`true`,"aria-hidden":t?`true`:void 0,"aria-label":c,className:TQ(m$(`root`),h$.variant[a].className,e),role:t?`presentation`:`status`,style:{...i,...l}})},_$={root:`rly_StatePanel-module__root`,neutral:`rly_StatePanel-module__neutral`,positive:`rly_StatePanel-module__positive`,critical:`rly_StatePanel-module__critical`,caution:`rly_StatePanel-module__caution`,progress:`rly_StatePanel-module__progress`,rail:`rly_StatePanel-module__rail`,icon:`rly_StatePanel-module__icon`,content:`rly_StatePanel-module__content`,title:`rly_StatePanel-module__title`,description:`rly_StatePanel-module__description`,action:`rly_StatePanel-module__action`},v$=e=>wQ(_$,e),y$=CQ({tone:{neutral:{className:v$(`neutral`),purpose:`Neutral explanatory state`,tokens:[`color-text-2`,`color-surface-2`]},positive:{className:v$(`positive`),purpose:`Positive outcome`,tokens:[`color-success-ink`,`color-success-tint`]},critical:{className:v$(`critical`),purpose:`Critical outcome requiring attention`,tokens:[`color-blocked-ink`,`color-blocked-tint`]},caution:{className:v$(`caution`),purpose:`Held outcome requiring review`,tokens:[`color-held-ink`,`color-held-tint`]},progress:{className:v$(`progress`),purpose:`Work currently in progress`,tokens:[`color-deploying-ink`,`color-deploying-tint`]}}}),b$={neutral:`minus`,positive:`check`,critical:`alert`,caution:`clock`,progress:`loader`},x$=({action:e,announce:t=`off`,className:n,description:r,icon:i,title:a,tone:o=`neutral`,...s})=>{let c=t===`assertive`?`alert`:t===`polite`?`status`:void 0;return(0,L.jsxs)(`section`,{...s,"aria-live":t===`off`?void 0:t,className:TQ(v$(`root`),y$.tone[o].className,n),role:c,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:v$(`rail`)}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:v$(`icon`),children:(0,L.jsx)(w_,{decorative:!0,name:i??b$[o]})}),(0,L.jsxs)(`div`,{className:v$(`content`),children:[(0,L.jsx)(`strong`,{className:v$(`title`),children:Y(a,`StatePanel title`)}),r===void 0?null:(0,L.jsx)(`div`,{className:v$(`description`),children:r}),e===void 0?null:(0,L.jsx)(`div`,{className:v$(`action`),children:e})]})]})},S$=new WeakSet,C$=e=>(S$.add(e),e),w$=e=>S$.has(e),T$={root:`rly_Field-module__root`,label:`rly_Field-module__label`,required:`rly_Field-module__required`,description:`rly_Field-module__description`,error:`rly_Field-module__error`,controlSlot:`rly_Field-module__controlSlot`,control:`rly_Field-module__control`,compact:`rly_Field-module__compact`,defaultSize:`rly_Field-module__defaultSize`},E$=e=>wQ(T$,e),D$=[`aria-describedby`,`aria-errormessage`,`aria-invalid`,`aria-labelledby`,`aria-required`,`id`,`required`],O$=new Set([`button`,`input`,`select`,`textarea`]),k$=CQ({size:{compact:{className:E$(`compact`),purpose:`Dense form rows`,tokens:[`space-40`,`type-meta`]},default:{className:E$(`defaultSize`),purpose:`Standard form controls`,tokens:[`space-48`,`type-label`]}}}),A$=CQ({size:`default`}),j$=({children:e,className:t,controlId:n,description:r,error:i,label:a,required:o=!1,size:s=A$.size,...c})=>{let l=(0,N.useId)(),u=n??`rly-field-${l}`,d=`${u}-label`,f=r===void 0?void 0:`${u}-description`,p=i===void 0?void 0:`${u}-error`,m={"aria-describedby":[f,p].filter(e=>e!==void 0).join(` `)||void 0,"aria-errormessage":p,"aria-invalid":i!==void 0||void 0,"aria-labelledby":d,"aria-required":o?!0:void 0,className:E$(`control`),id:u},h=o?{...m,required:!0}:m,g=e(h),_=g.type;if(!(SQ(_)?O$.has(_):(yQ(_)||xQ(_))&&_!==null&&w$(_)))throw Error(`Field children must render one concrete or rly-owned control`);for(let e of D$)if(g.props[e]!==h[e])throw Error(`Field control must apply ${e}`);if(!g.props.className.split(` `).includes(h.className))throw Error(`Field control must apply className`);return(0,L.jsxs)(`div`,{...c,className:TQ(E$(`root`),k$.size[s].className,t),"data-error":i===void 0?void 0:`true`,children:[(0,L.jsxs)(`label`,{className:E$(`label`),htmlFor:u,id:d,children:[Y(a,`Field label`),o?(0,L.jsx)(`span`,{className:E$(`required`),children:`Required`}):null]}),r===void 0?null:(0,L.jsx)(`p`,{className:E$(`description`),id:f,children:Y(r,`Field description`)}),(0,L.jsx)(`div`,{className:E$(`controlSlot`),children:g}),i===void 0?null:(0,L.jsx)(`p`,{className:E$(`error`),id:p,role:`alert`,children:Y(i,`Field error`)})]})},M$={trigger:`rly_Select-module__trigger`,compact:`rly_Select-module__compact`,defaultSize:`rly_Select-module__defaultSize`,triggerIcon:`rly_Select-module__triggerIcon`,content:`rly_Select-module__content`,viewport:`rly_Select-module__viewport`,item:`rly_Select-module__item`,itemIndicator:`rly_Select-module__itemIndicator`,scrollButton:`rly_Select-module__scrollButton`},N$=e=>wQ(M$,e),P$=CQ({size:{compact:{className:N$(`compact`),purpose:`Dense form rows`,tokens:[`space-40`,`type-meta`]},default:{className:N$(`defaultSize`),purpose:`Standard selection control`,tokens:[`space-48`,`type-body`]}}}),F$=CQ({size:`default`}),I$=(e,t)=>{if(!t&&!e.some(e=>!e.disabled))throw Error(`Select options must contain at least one enabled option`);let n=new Set;for(let t of e){Y(t.label,`Select option label`);let e=Y(t.value,`Select option value`);if(n.has(e))throw Error(`Duplicate Select option value: ${e}`);n.add(e)}},L$=C$(e=>{let t=`value`in e,{"aria-describedby":n,"aria-errormessage":r,"aria-invalid":i,"aria-label":a,"aria-labelledby":o,"aria-required":s,autoComplete:c,className:l,defaultOpen:u,defaultValue:d,disabled:f=!1,form:p,id:m,name:h,onBlur:g,onFocus:_,onKeyDown:v,onOpenChange:y,onValueChange:b,open:x,options:S,placeholder:C=`Select an option`,ref:w,required:T=!1,size:E=F$.size,tabIndex:D,value:O}=e;I$(S,f),Y(a??o,a===void 0?`Select aria-labelledby`:`Select aria-label`);let k=Y(C,`Select placeholder`),A=O??d;if(A!==void 0&&!S.some(e=>e.value===A))throw Error(`Select value does not match an option: ${A}`);return(0,L.jsxs)(rh,{...c===void 0?{}:{autoComplete:c},...u===void 0?{}:{defaultOpen:u},...d===void 0?{}:{defaultValue:d},disabled:f,...p===void 0?{}:{form:p},...h===void 0?{}:{name:h},...y===void 0?{}:{onOpenChange:y},...b===void 0?{}:{onValueChange:b},...x===void 0?{}:{open:x},required:T,...t?{value:O??``}:{},children:[(0,L.jsxs)(ah,{"aria-describedby":n,"aria-errormessage":r,"aria-invalid":i,"aria-label":a,"aria-labelledby":o,"aria-required":s??(T?!0:void 0),className:TQ(N$(`trigger`),P$.size[E].className,l),id:m,onBlur:g,onFocus:_,onKeyDown:v,ref:w,tabIndex:D,children:[(0,L.jsx)(sh,{placeholder:k}),(0,L.jsx)(ch,{asChild:!0,children:(0,L.jsx)(`span`,{"aria-hidden":`true`,className:N$(`triggerIcon`),children:(0,L.jsx)(w_,{decorative:!0,name:`chevron-down`,size:`small`})})})]}),(0,L.jsx)(O_,{children:e=>(0,L.jsx)(dh,{container:e,children:(0,L.jsxs)(ph,{align:`start`,className:TQ(N$(`content`),P$.size[E].className),position:`popper`,sideOffset:6,children:[(0,L.jsx)(Nh,{"aria-hidden":`true`,className:N$(`scrollButton`),children:(0,L.jsx)(w_,{decorative:!0,name:`chevron-up`,size:`small`})}),(0,L.jsx)(Th,{className:N$(`viewport`),children:S.map(e=>(0,N.createElement)(Oh,{className:N$(`item`),...e.disabled===void 0?{}:{disabled:e.disabled},key:e.value,textValue:e.label,value:e.value},(0,L.jsx)(Ah,{children:e.label}),(0,L.jsx)(jh,{className:N$(`itemIndicator`),children:(0,L.jsx)(w_,{decorative:!0,name:`check`,size:`small`})})))}),(0,L.jsx)(Fh,{"aria-hidden":`true`,className:N$(`scrollButton`),children:(0,L.jsx)(w_,{decorative:!0,name:`chevron-down`,size:`small`})})]})})})]})}),R$={layer:`rly_Dialog-module__layer`,overlay:`rly_Dialog-module__overlay`,content:`rly_Dialog-module__content`,defaultSize:`rly_Dialog-module__defaultSize`,wide:`rly_Dialog-module__wide`,header:`rly_Dialog-module__header`,title:`rly_Dialog-module__title`,description:`rly_Dialog-module__description`,body:`rly_Dialog-module__body`,"dialog-fade-in":`rly_Dialog-module__dialog-fade-in`,"dialog-fade-out":`rly_Dialog-module__dialog-fade-out`,"dialog-enter":`rly_Dialog-module__dialog-enter`,"dialog-exit":`rly_Dialog-module__dialog-exit`,"dialog-compact-in":`rly_Dialog-module__dialog-compact-in`,"dialog-compact-out":`rly_Dialog-module__dialog-compact-out`},z$=e=>wQ(R$,e),B$=(0,N.createContext)(null),V$=()=>{let e=(0,N.useContext)(B$);if(e===null)throw Error(`Dialog compound components must be nested inside Dialog`);return e},H$=(e,t)=>{yQ(e)?e(t):e!=null&&(e.current=t)},U$=()=>{try{return MQ(document.activeElement)?document.activeElement:null}catch{return null}},W$=CQ({size:{default:{className:z$(`defaultSize`),purpose:`Focused decision or short form`,tokens:[`radius-overlay`,`space-32`]},wide:{className:z$(`wide`),purpose:`Detailed comparison or multi-section form`,tokens:[`radius-overlay`,`space-64`]}}}),G$=({children:e,entryMotion:t})=>{let n=V$(),r=(0,N.useRef)(null);return IQ(),zQ(r,n.open),(0,L.jsx)(`div`,{className:z$(`layer`),"data-rly-dialog-entry-motion":t,"data-rly-dialog-layer":``,"data-rly-modal-layer":``,ref:r,children:e})},K$=Object.freeze({Close:e=>(0,L.jsx)(Sl,{asChild:!0,children:(0,L.jsx)(r$,{...e})}),Content:({children:e,className:t,description:n,entryMotion:r=`intrinsic`,initialFocusRef:i,size:a=`default`,title:o,...s})=>{let c=V$(),l=AQ(c.open,r),u=Y(o,`Dialog title`),d=n===void 0?void 0:Y(n,`Dialog description`);return(0,L.jsx)(O_,{children:n=>(0,L.jsx)(sl,{container:n,children:(0,L.jsxs)(G$,{entryMotion:l,children:[(0,L.jsx)(ll,{className:z$(`overlay`),"data-rly-dialog-overlay":``,onPointerDown:()=>{c.requestOpenChange(!1)}}),(0,L.jsxs)(pl,{...s,...d===void 0?{"aria-describedby":void 0}:{},className:TQ(z$(`content`),W$.size[a].className,t),onCloseAutoFocus:e=>{e.preventDefault()},onOpenAutoFocus:e=>{let t=U$();c.triggerRef.current===null&&t!==null&&(c.restoreTargetRef.current=t);let n=i?.current;n!=null&&(e.preventDefault(),n.focus())},children:[(0,L.jsxs)(`header`,{className:z$(`header`),children:[(0,L.jsx)(vl,{className:z$(`title`),children:u}),d===void 0?null:(0,L.jsx)(bl,{className:z$(`description`),children:d})]}),(0,L.jsx)(`div`,{className:z$(`body`),children:e})]})]})})})},Root:({children:e,defaultOpen:t=!1,onOpenChange:n,open:r})=>{let[i,a]=(0,N.useState)(t),o=PQ(),s=(r??i)&&o,c=(0,N.useRef)(s),l=(0,N.useRef)(null),u=(0,N.useRef)(s?U$():null);s&&!c.current&&(u.current=l.current??U$());let d=e=>{e&&(u.current=l.current??U$()),r===void 0&&a(e),n?.(e)};return(0,N.useLayoutEffect)(()=>{c.current!==s&&(c.current=s,s?UQ():WQ(u.current))},[s]),(0,L.jsx)(NQ,{children:(0,L.jsx)(B$.Provider,{value:{open:s,requestOpenChange:d,restoreTargetRef:u,triggerRef:l},children:(0,L.jsx)(tl,{modal:!0,onOpenChange:d,open:s,children:e})})})},Trigger:({ref:e,...t})=>{let n=V$();return(0,L.jsx)(rl,{asChild:!0,children:(0,L.jsx)(r$,{...t,ref:t=>{n.triggerRef.current=t,H$(e,t)}})})}}),q$={root:`rly_Divider-module__root`,horizontal:`rly_Divider-module__horizontal`,vertical:`rly_Divider-module__vertical`,subtle:`rly_Divider-module__subtle`,strong:`rly_Divider-module__strong`},J$=e=>wQ(q$,e);J$(`horizontal`),J$(`vertical`),J$(`subtle`),J$(`strong`);var Y$={root:`rly_IconButton-module__root`,primary:`rly_IconButton-module__primary`,secondary:`rly_IconButton-module__secondary`,quiet:`rly_IconButton-module__quiet`,compact:`rly_IconButton-module__compact`,defaultSize:`rly_IconButton-module__defaultSize`,principal:`rly_IconButton-module__principal`},X$=e=>wQ(Y$,e),Z$=CQ({variant:{primary:{className:X$(`primary`),purpose:`Principal icon action`,tokens:[`color-action-background`,`color-action-foreground`]},secondary:{className:X$(`secondary`),purpose:`Default icon action`,tokens:[`color-surface-1`,`color-border-2`]},quiet:{className:X$(`quiet`),purpose:`Low-emphasis icon action`,tokens:[`color-text-1`,`color-surface-2`]}},size:{compact:{className:X$(`compact`),purpose:`Minimum accessible icon target`,tokens:[`space-40`,`space-4`]},default:{className:X$(`defaultSize`),purpose:`Standard icon target`,tokens:[`space-48`]},principal:{className:X$(`principal`),purpose:`Prominent icon target`,tokens:[`space-48`,`space-8`]}}}),Q$=({className:e,disabled:t,icon:n,label:r,loading:i=!1,size:a=`default`,type:o,variant:s=`secondary`,...c})=>(0,L.jsx)(`button`,{...c,"aria-busy":i?`true`:void 0,"aria-label":Y(r,`IconButton label`),className:TQ(X$(`root`),Z$.variant[s].className,Z$.size[a].className,e),"data-loading":i?`true`:void 0,disabled:t||i,type:o??`button`,children:(0,L.jsx)(w_,{decorative:!0,name:i?`loader`:n,size:a===`compact`?`small`:`default`})}),$$={root:`rly_Surface-module__root`,tonePrimary:`rly_Surface-module__tonePrimary`,toneSecondary:`rly_Surface-module__toneSecondary`,toneTertiary:`rly_Surface-module__toneTertiary`,shapeCard:`rly_Surface-module__shapeCard`,shapeGrouped:`rly_Surface-module__shapeGrouped`,paddingNone:`rly_Surface-module__paddingNone`,paddingCompact:`rly_Surface-module__paddingCompact`,paddingDefault:`rly_Surface-module__paddingDefault`,paddingSpacious:`rly_Surface-module__paddingSpacious`},e1=e=>wQ($$,e),t1=CQ({tone:{primary:{className:e1(`tonePrimary`),purpose:`Primary bordered surface`,tokens:[`color-surface-1`,`color-border-1`]},secondary:{className:e1(`toneSecondary`),purpose:`Quiet secondary surface`,tokens:[`color-surface-2`]},tertiary:{className:e1(`toneTertiary`),purpose:`Inset tertiary surface`,tokens:[`color-surface-3`]}},form:{card:{className:e1(`shapeCard`),purpose:`Standard card geometry`,tokens:[`radius-control`]},grouped:{className:e1(`shapeGrouped`),purpose:`Grouped content geometry`,tokens:[`radius-group`]}},padding:{none:{className:e1(`paddingNone`),purpose:`Caller-owned internal layout`,tokens:[`space-0`]},compact:{className:e1(`paddingCompact`),purpose:`Dense supporting content`,tokens:[`space-16`]},default:{className:e1(`paddingDefault`),purpose:`Standard content`,tokens:[`space-24`]},spacious:{className:e1(`paddingSpacious`),purpose:`Prominent grouped content`,tokens:[`space-32`]}}}),n1=({as:e,children:t,className:n,form:r=`card`,padding:i=`default`,ref:a,tone:o=`primary`,...s})=>(0,N.createElement)(e??`div`,{...s,className:TQ(e1(`root`),t1.tone[o].className,t1.form[r].className,t1.padding[i].className,n),ref:a},t),r1={root:`rly_Tabs-module__root`,list:`rly_Tabs-module__list`,trigger:`rly_Tabs-module__trigger`,defaultSize:`rly_Tabs-module__defaultSize`,large:`rly_Tabs-module__large`,panel:`rly_Tabs-module__panel`},i1=e=>wQ(r1,e);i1(`defaultSize`),i1(`large`);var a1={root:`rly_Text-module__root`,verdict:`rly_Text-module__verdict`,pageTitle:`rly_Text-module__pageTitle`,sectionTitle:`rly_Text-module__sectionTitle`,cardTitle:`rly_Text-module__cardTitle`,bodyLarge:`rly_Text-module__bodyLarge`,body:`rly_Text-module__body`,label:`rly_Text-module__label`,meta:`rly_Text-module__meta`,code:`rly_Text-module__code`,tonePrimary:`rly_Text-module__tonePrimary`,toneSecondary:`rly_Text-module__toneSecondary`,toneTertiary:`rly_Text-module__toneTertiary`,toneInherit:`rly_Text-module__toneInherit`},o1=e=>wQ(a1,e),s1=CQ({variant:{verdict:{className:o1(`verdict`),purpose:`One restrained verdict thesis`,tokens:[`type-verdict`]},"page-title":{className:o1(`pageTitle`),purpose:`Primary page title`,tokens:[`type-page-title`]},"section-title":{className:o1(`sectionTitle`),purpose:`Section heading`,tokens:[`type-section-title`]},"card-title":{className:o1(`cardTitle`),purpose:`Card or panel heading`,tokens:[`type-card-title`]},"body-large":{className:o1(`bodyLarge`),purpose:`Leading explanatory copy`,tokens:[`type-body-large`]},body:{className:o1(`body`),purpose:`Default interface copy`,tokens:[`type-body`]},label:{className:o1(`label`),purpose:`Control and metadata labels`,tokens:[`type-label`]},meta:{className:o1(`meta`),purpose:`Supporting metadata`,tokens:[`type-meta`]},code:{className:o1(`code`),purpose:`Code and tabular data`,tokens:[`type-code`]}},tone:{primary:{className:o1(`tonePrimary`),purpose:`Primary readable text`,tokens:[`color-text-1`]},secondary:{className:o1(`toneSecondary`),purpose:`Supporting text`,tokens:[`color-text-2`]},tertiary:{className:o1(`toneTertiary`),purpose:`Restricted tertiary text`,tokens:[`color-text-3`]},inherit:{className:o1(`toneInherit`),purpose:`Inherit semantic context`,tokens:[]}}}),c1=CQ({variant:`body`,tone:`primary`}),l1=e=>e===`code`?`code`:e===`verdict`?`p`:e===`label`||e===`meta`?`span`:`p`,u1=({as:e,children:t,className:n,ref:r,tone:i=c1.tone,variant:a=c1.variant,...o})=>(0,N.createElement)(e??l1(a),{...o,className:TQ(o1(`root`),s1.variant[a].className,s1.tone[i].className,n),ref:r},t),d1={header:`_header_sb6or_1`,brand:`_brand_sb6or_15`,brandMark:`_brandMark_sb6or_28`,brandName:`_brandName_sb6or_45`,navigation:`_navigation_sb6or_51`,navLink:`_navLink_sb6or_61`,navCount:`_navCount_sb6or_88`,utilities:`_utilities_sb6or_106`,status:`_status_sb6or_115`,statusDot:`_statusDot_sb6or_127`,"status-pulse":`_status-pulse_sb6or_1`,statusErrorDetail:`_statusErrorDetail_sb6or_148`,commandButton:`_commandButton_sb6or_156`,iconButton:`_iconButton_sb6or_157`,userButton:`_userButton_sb6or_158`,notificationCount:`_notificationCount_sb6or_200`,avatar:`_avatar_sb6or_232`,userName:`_userName_sb6or_247`,userChevron:`_userChevron_sb6or_254`,menu:`_menu_sb6or_259`,menuIdentity:`_menuIdentity_sb6or_268`,menuSeparator:`_menuSeparator_sb6or_286`,menuIcon:`_menuIcon_sb6or_292`,shortcut:`_shortcut_sb6or_301`,menuCount:`_menuCount_sb6or_302`,spinning:`_spinning_sb6or_323`,"icon-spin":`_icon-spin_sb6or_1`,statusCopy:`_statusCopy_sb6or_392`};function f1({...e}){return(0,L.jsx)(fm,{"data-slot":`dropdown-menu`,...e})}function p1({...e}){return(0,L.jsx)(pm,{"data-slot":`dropdown-menu-trigger`,...e})}function m1({align:e=`end`,className:t,sideOffset:n=4,...r}){return(0,L.jsx)(mm,{children:(0,L.jsx)(hm,{"data-slot":`dropdown-menu-content`,align:e,sideOffset:n,className:KZ(`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 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-md`,t),...r})})}function h1({className:e,...t}){return(0,L.jsx)(gm,{"data-slot":`dropdown-menu-item`,className:KZ(`focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 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`,e),...t})}function g1({className:e,...t}){return(0,L.jsx)(`kbd`,{"data-slot":`kbd`,className:KZ(`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})}var _1=[{active:e=>e===`/`||e.startsWith(`/accounts/`),label:`Pull requests`,to:`/`},{active:e=>e===`/sandboxes`||e.startsWith(`/sandbox/`),label:`Sandboxes`,to:`/sandboxes`},{active:e=>e===`/notifications`||e===`/audit`,label:`Activity`,to:`/notifications`},{active:e=>e.startsWith(`/settings`),label:`Settings`,to:`/settings`}],v1=e=>e===void 0?``:e.split(/[.@_\s-]+/).filter(e=>e.length>0).slice(0,2).map(e=>e[0]?.toUpperCase()).join(``)||`U`;function y1({detail:e,label:t,state:n}){return(0,L.jsxs)(`span`,{"aria-label":`${t}. ${e}`,className:d1.status,role:`status`,title:e,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:d1.statusDot,"data-state":n}),(0,L.jsx)(`span`,{className:d1.statusCopy,children:t}),n===`error`?(0,L.jsx)(`span`,{className:d1.statusErrorDetail,children:e}):null]})}function b1(){let e=Yz(Fq),t=Zz(tq),n=Zz(lq),r=Zz(xY),i=or(),{pathname:a}=ir(),{setTheme:o,theme:s}=I_(),c=e.status===`loading`,l=e.status===`error`,u=e.unreadNotificationCount??0,d=e.pendingReviewCount??0,f=(e.sandboxes??[]).filter(e=>e.status===`running`||e.status===`creating`||e.status===`cloning`||e.status===`starting`).length,p=e.lastUpdated?fQ(e.lastUpdated,new Date):`No completed sync yet`,m=l?`error`:c?`loading`:e.lastUpdated?`live`:`connecting`,h=l?`Sync issue`:c?`Syncing`:e.lastUpdated?`Live`:`Connecting`,g=l?e.error??`Unable to refresh pull requests`:e.statusDetail??p,_=s===`dark`?`light`:s===`light`?`system`:`dark`,v=s===`dark`?p_:s===`light`?b_:f_;return(0,L.jsxs)(`header`,{className:d1.header,children:[(0,L.jsxs)(Ri,{"aria-label":`CodeCommit pull requests`,className:d1.brand,to:`/`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:d1.brandMark,children:(0,L.jsx)(i_,{})}),(0,L.jsx)(`span`,{className:d1.brandName,children:`CodeCommit`})]}),(0,L.jsx)(`nav`,{"aria-label":`Primary`,className:d1.navigation,children:_1.map(e=>{let t=e.active(a),n=e.to===`/`?d:e.to===`/sandboxes`?f:0,r=e.to===`/`?`needing your review`:`active`;return(0,L.jsxs)(Ri,{"aria-current":t?`page`:void 0,"aria-label":n>0?`${e.label}, ${n} ${r}`:void 0,className:d1.navLink,to:e.to,children:[(0,L.jsx)(`span`,{children:e.label}),n>0?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:d1.navCount,children:n>99?`99+`:n}):null]},e.label)})}),(0,L.jsxs)(`div`,{className:d1.utilities,children:[(0,L.jsx)(y1,{detail:g,label:h,state:m}),(0,L.jsx)(Q$,{className:d1.commandButton,icon:`search`,label:`Open command palette`,onClick:()=>r(!0),size:`compact`,variant:`quiet`}),(0,L.jsxs)(`button`,{"aria-label":u>0?`Notifications, ${u} unread`:`Notifications`,className:d1.iconButton,onClick:()=>i(`/notifications`),title:`Notifications`,type:`button`,children:[(0,L.jsx)(Mg,{"aria-hidden":`true`}),u>0?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:d1.notificationCount,children:u>99?`99+`:u}):null]}),(0,L.jsxs)(f1,{children:[(0,L.jsx)(p1,{asChild:!0,children:(0,L.jsx)(`button`,{"aria-label":e.currentUser?`Open account menu for ${e.currentUser}`:`Open application menu`,className:d1.userButton,type:`button`,children:e.currentUser?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:d1.avatar,children:v1(e.currentUser)}),(0,L.jsx)(`span`,{className:d1.userName,children:e.currentUser}),(0,L.jsx)(Lg,{"aria-hidden":`true`,className:d1.userChevron})]}):(0,L.jsx)(Yg,{"aria-hidden":`true`})})}),(0,L.jsxs)(m1,{"aria-label":`Application actions`,className:d1.menu,sideOffset:10,children:[e.currentUser?(0,L.jsxs)(`div`,{className:d1.menuIdentity,children:[(0,L.jsx)(`span`,{children:`Signed in as`}),(0,L.jsx)(`strong`,{children:e.currentUser})]}):null,(0,L.jsxs)(h1,{onSelect:()=>r(!0),children:[(0,L.jsx)(`span`,{className:d1.menuIcon,"aria-hidden":`true`,children:`⌘`}),`Command palette`,(0,L.jsx)(g1,{className:d1.shortcut,children:`⌘P`})]}),(0,L.jsxs)(h1,{disabled:c,onSelect:()=>t({}),children:[(0,L.jsx)(h_,{className:c?d1.spinning:void 0}),c?`Refreshing…`:`Refresh pull requests`]}),d>0?(0,L.jsxs)(h1,{onSelect:()=>i(`/?review=1`),children:[(0,L.jsx)(Qg,{}),`Needs my review`,(0,L.jsx)(`span`,{className:d1.menuCount,children:d})]}):null,(0,L.jsx)(`div`,{className:d1.menuSeparator,role:`separator`}),(0,L.jsxs)(h1,{onSelect:()=>i(`/stats`),children:[(0,L.jsx)(Fg,{}),`Statistics`]}),(0,L.jsxs)(h1,{onSelect:()=>i(`/audit`),children:[(0,L.jsx)(g_,{}),`Audit log`]}),(0,L.jsxs)(h1,{"aria-label":`Cycle theme. Current theme: ${s}. Next theme: ${_}.`,onSelect:()=>o(_),children:[(0,L.jsx)(v,{}),`Theme: `,s]}),e.currentUser?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:d1.menuSeparator,role:`separator`}),(0,L.jsxs)(h1,{onSelect:()=>n({}),children:[(0,L.jsx)(l_,{}),`Log out`]})]}):null]})]})]})]})}var x1=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,S1=yX,C1=(e,t)=>n=>{if(t?.variants==null)return S1(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=x1(t)||x1(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return S1(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},w1=C1(`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 T1({asChild:e=!1,className:t,variant:n=`default`,...r}){let i=e?da:`span`;return(0,L.jsx)(i,{"data-slot":`badge`,"data-variant":n,className:KZ(w1({variant:n}),t),...r})}var E1=C1(`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 D1({asChild:e=!1,className:t,size:n=`default`,variant:r=`default`,...i}){let a=e?da:`button`;return(0,L.jsx)(a,{"data-slot":`button`,"data-variant":r,"data-size":n,className:KZ(E1({variant:r,size:n,className:t})),...i})}function O1({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`button-group`,className:KZ(`inline-flex items-stretch rounded-md border overflow-hidden [&>*]:rounded-none [&>*]:border-0 [&>*]:shadow-none [&>*:not(:last-child)]:border-r`,e),...t})}function k1({prompt:e}){let t=Zz(Dq),n=n=>t({payload:{id:e.id,response:n}});return(0,L.jsx)(qZ,{open:!0,children:(0,L.jsxs)(XZ,{showCloseButton:!1,children:[(0,L.jsxs)(ZZ,{children:[(0,L.jsxs)($Z,{className:`flex items-center gap-2`,children:[(0,L.jsx)(y_,{className:`size-5`}),`API Permission Required`]}),(0,L.jsx)(eQ,{children:e.context})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md bg-muted px-3 py-2`,children:[(0,L.jsx)(T1,{variant:e.category===`write`?`destructive`:`secondary`,children:e.category}),(0,L.jsx)(`code`,{className:`text-xs font-mono`,children:e.operation})]}),(0,L.jsxs)(QZ,{children:[(0,L.jsx)(D1,{variant:`outline`,onClick:()=>n(`deny`),children:`Deny`}),(0,L.jsx)(D1,{variant:`secondary`,onClick:()=>n(`allow_once`),children:`Allow Once`}),(0,L.jsx)(D1,{onClick:()=>n(`always_allow`),children:`Always Allow`})]})]})})}var A1={root:`_root_dn6e5_1`,fullWidthRoot:`_fullWidthRoot_dn6e5_9`,main:`_main_dn6e5_14`,fullWidthMain:`_fullWidthMain_dn6e5_21`};function j1(){let e=Zz(Fq),t=Yz(Fq),n=or(),r=(0,N.useCallback)(e=>n(e??`/notifications`),[n]),{notify:i}=aY(e=>n(e));yY(t=>e(t),r,i),lY(t.pendingReviewCount??0);let a=Rde(),{theme:o}=I_();return(0,L.jsx)(YJ,{children:(0,L.jsxs)(`div`,{className:`${A1.root} ${a?A1.fullWidthRoot:``}`,children:[(0,L.jsx)(b1,{}),(0,L.jsx)(`main`,{className:a?A1.fullWidthMain:A1.main,children:(0,L.jsx)(Vr,{})}),(0,L.jsx)(Vi,{storageKey:`codecommit-web-scroll-positions`}),(0,L.jsx)(uQ,{}),(0,L.jsx)(Sre,{theme:o}),t.permissionPrompt&&(0,L.jsx)(k1,{prompt:t.permissionPrompt})]})})}var M1=(e,t)=>({category:e,description:t}),N1={getCallerIdentity:M1(`read`,`Get current user identity`),listRepositories:M1(`read`,`List all repositories`),getRepository:M1(`read`,`Get repository identity`),listPullRequests:M1(`read`,`List PR IDs for a repo`),getPullRequests:M1(`read`,`Fetch PR details`),getPullRequest:M1(`read`,`Single PR detail`),evaluatePullRequestApprovalRules:M1(`read`,`Check approval status`),getPullRequestApprovalStates:M1(`read`,`Get who approved`),getMergeConflicts:M1(`read`,`Check merge conflicts`),getCommentsForPullRequest:M1(`read`,`Fetch PR comments`),listBranches:M1(`read`,`List branches`),getDifferences:M1(`read`,`Diff stats`),getBlob:M1(`read`,`Read immutable file content`),createPullRequest:M1(`write`,`Create a pull request`),updatePullRequestTitle:M1(`write`,`Edit PR title`),updatePullRequestDescription:M1(`write`,`Edit PR description`),postPullRequestComment:M1(`write`,`Post a comment to a pull request`),createApprovalRule:M1(`write`,`Create approval rule`),updateApprovalRule:M1(`write`,`Update approval rule`),deleteApprovalRule:M1(`write`,`Delete approval rule`)},P1=new Map(Object.entries(N1)),F1=()=>[...P1.entries()];function I1({className:e,type:t,...n}){return(0,L.jsx)(`input`,{type:t,"data-slot":`input`,className:KZ(`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 L1({...e}){return(0,L.jsx)(rh,{"data-slot":`select`,...e})}function R1({...e}){return(0,L.jsx)(sh,{"data-slot":`select-value`,...e})}function z1({children:e,className:t,size:n=`default`,...r}){return(0,L.jsxs)(ah,{"data-slot":`select-trigger`,"data-size":n,className:KZ(`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,(0,L.jsx)(ch,{asChild:!0,children:(0,L.jsx)(Lg,{className:`size-4 opacity-50`})})]})}function B1({align:e=`center`,children:t,className:n,position:r=`item-aligned`,...i}){return(0,L.jsx)(dh,{children:(0,L.jsxs)(ph,{"data-slot":`select-content`,className:KZ(`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:[(0,L.jsx)(H1,{}),(0,L.jsx)(Th,{className:KZ(`p-1`,r===`popper`&&`h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1`),children:t}),(0,L.jsx)(U1,{})]})})}function V1({children:e,className:t,...n}){return(0,L.jsxs)(Oh,{"data-slot":`select-item`,className:KZ(`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:[(0,L.jsx)(`span`,{"data-slot":`select-item-indicator`,className:`absolute right-2 flex size-3.5 items-center justify-center`,children:(0,L.jsx)(jh,{children:(0,L.jsx)(Ig,{className:`size-4`})})}),(0,L.jsx)(Ah,{children:e})]})}function H1({className:e,...t}){return(0,L.jsx)(Nh,{"data-slot":`select-scroll-up-button`,className:KZ(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,L.jsx)(Bg,{className:`size-4`})})}function U1({className:e,...t}){return(0,L.jsx)(Fh,{"data-slot":`select-scroll-down-button`,className:KZ(`flex cursor-default items-center justify-center py-1`,e),...t,children:(0,L.jsx)(Lg,{className:`size-4`})})}var W1=50,G1=`secondary`,K1=`default`,q1=`destructive`,J1=`outline`,Y1=()=>[`all`,...F1().map(([e])=>e)],X1=LF(G({id:W,timestamp:U,operation:U,accountProfile:U,region:U,permissionState:U,context:U,durationMs:vI(W)})),Z1=e=>{switch(e){case`always_allowed`:return G1;case`allowed`:return K1;case`denied`:return q1;case`timed_out`:return J1;default:return J1}};function Q1(){let e=or(),[,t]=Qz(Mq,{mode:`promise`}),[,n]=Qz(Nq,{mode:`promise`}),[r,i]=(0,N.useState)([]),[a,o]=(0,N.useState)(0),[s,c]=(0,N.useState)(!0),[l,u]=(0,N.useState)(0),[d,f]=(0,N.useState)(``),[p,m]=(0,N.useState)(``),[h,g]=(0,N.useState)(``),_=(0,N.useMemo)(()=>({limit:W1,offset:l,...d&&{search:d},...p&&{operation:p},...h&&{permissionState:h}}),[l,d,p,h]);(0,N.useEffect)(()=>{let e=!1;return c(!0),t({query:_}).then(t=>{e||(i(t.items.filter(X1)),o(t.total),c(!1))}).catch(()=>c(!1)),()=>{e=!0}},[t,_]);let v=l+W1<a,y=(0,N.useCallback)(()=>{n({query:{}}).then(e=>{let t=new Blob([JSON.stringify(e,null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=`audit-log-${new Date().toISOString().slice(0,10)}.json`,r.click(),URL.revokeObjectURL(n)}).catch(()=>{})},[n]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-4`,children:[(0,L.jsxs)(D1,{variant:`ghost`,size:`sm`,className:`gap-2`,onClick:()=>e(`/`),children:[(0,L.jsx)(Og,{className:`size-4`}),`Back`]}),(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Audit Log`}),(0,L.jsxs)(`span`,{className:`text-sm text-muted-foreground`,children:[a,` entries`]}),(0,L.jsx)(`div`,{className:`ml-auto`,children:(0,L.jsxs)(D1,{variant:`outline`,size:`sm`,className:`gap-2`,onClick:y,children:[(0,L.jsx)(Jg,{className:`size-3`}),`Export JSON`]})})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsxs)(`div`,{className:`relative flex-1`,children:[(0,L.jsx)(__,{className:`absolute left-2.5 top-2.5 size-4 text-muted-foreground`}),(0,L.jsx)(I1,{placeholder:`Search operations and context...`,value:d,onChange:e=>{f(e.target.value),u(0)},className:`pl-9`})]}),(0,L.jsxs)(L1,{value:p||`all`,onValueChange:e=>{m(e===`all`?``:e),u(0)},children:[(0,L.jsx)(z1,{className:`w-48`,children:(0,L.jsx)(R1,{placeholder:`Operation`})}),(0,L.jsx)(B1,{children:Y1().map(e=>(0,L.jsx)(V1,{value:e,children:e===`all`?`All operations`:e},e))})]}),(0,L.jsxs)(L1,{value:h||`all`,onValueChange:e=>{g(e===`all`?``:e),u(0)},children:[(0,L.jsx)(z1,{className:`w-40`,children:(0,L.jsx)(R1,{placeholder:`State`})}),(0,L.jsxs)(B1,{children:[(0,L.jsx)(V1,{value:`all`,children:`All states`}),(0,L.jsx)(V1,{value:`always_allowed`,children:`Always allowed`}),(0,L.jsx)(V1,{value:`allowed`,children:`Allowed`}),(0,L.jsx)(V1,{value:`denied`,children:`Denied`}),(0,L.jsx)(V1,{value:`timed_out`,children:`Timed out`})]})]})]}),(0,L.jsx)(`div`,{className:`rounded-md border`,children:(0,L.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,L.jsx)(`thead`,{children:(0,L.jsxs)(`tr`,{className:`border-b bg-muted/50`,children:[(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Timestamp`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Operation`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Account`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`State`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-right font-medium`,children:`Duration`}),(0,L.jsx)(`th`,{className:`px-3 py-2 text-left font-medium`,children:`Context`})]})}),(0,L.jsxs)(`tbody`,{children:[s&&r.length===0&&(0,L.jsx)(`tr`,{children:(0,L.jsx)(`td`,{colSpan:6,className:`px-3 py-8 text-center text-muted-foreground`,children:`Loading...`})}),!s&&r.length===0&&(0,L.jsx)(`tr`,{children:(0,L.jsx)(`td`,{colSpan:6,className:`px-3 py-8 text-center text-muted-foreground`,children:`No entries`})}),r.map(e=>(0,L.jsxs)(`tr`,{className:`border-b last:border-0 hover:bg-muted/30`,children:[(0,L.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs text-muted-foreground whitespace-nowrap`,children:new Date(e.timestamp).toLocaleString()}),(0,L.jsx)(`td`,{className:`px-3 py-2 font-mono text-xs`,children:e.operation}),(0,L.jsx)(`td`,{className:`px-3 py-2 text-xs`,children:e.accountProfile||`-`}),(0,L.jsx)(`td`,{className:`px-3 py-2`,children:(0,L.jsx)(T1,{variant:Z1(e.permissionState),className:`text-xs`,children:e.permissionState})}),(0,L.jsx)(`td`,{className:`px-3 py-2 text-right font-mono text-xs text-muted-foreground`,children:e.durationMs==null?`-`:`${e.durationMs}ms`}),(0,L.jsx)(`td`,{className:`px-3 py-2 text-xs text-muted-foreground truncate max-w-[200px]`,children:e.context})]},e.id))]})]})}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:a>0?`${l+1}–${Math.min(l+W1,a)} of ${a}`:`0 entries`}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(D1,{variant:`outline`,size:`sm`,disabled:l===0,onClick:()=>u(Math.max(0,l-W1)),children:`Previous`}),(0,L.jsx)(D1,{variant:`outline`,size:`sm`,disabled:!v,onClick:()=>u(l+W1),children:`Next`})]})]})]})}function $1(e={}){let{filter:t,unreadOnly:n}=e,r=t!==void 0||n===!0,i=Yz(Fq).notifications,[a,o]=(0,N.useState)([]),[s,c]=(0,N.useState)(null),[l,u]=Qz(pq,{mode:`promise`}),d=(0,N.useRef)(`${t}:${n}`),f=`${t}:${n}`;d.current!==f&&(d.current=f,o([]),c(null));let p=i?.items[0]?.id,m=(0,N.useRef)(p);!r&&m.current!==p&&(m.current=p,a.length>0&&o([]));let h=(0,N.useMemo)(()=>({limit:20,...t&&{filter:t},...n&&{unreadOnly:1}}),[t,n]);(0,N.useEffect)(()=>{if(!r)return;let e=!1;return u({query:h}).then(t=>{e||c({items:t.items,...t.nextCursor!==void 0&&{nextCursor:t.nextCursor}})}).catch(()=>{}),()=>{e=!0}},[r,h,u]);let g=r?s:i,_=a.length>0?a[a.length-1].nextCursor:g?.nextCursor,v=_!==void 0,y=l.waiting,b=(0,N.useCallback)(async()=>{if(!(!v||y||_===void 0))try{let e=await u({query:{...h,cursor:_}}),t={items:e.items,...e.nextCursor!==void 0&&{nextCursor:e.nextCursor}};o(e=>[...e,t])}catch{}},[v,y,_,u,h]);return{items:(0,N.useMemo)(()=>{let e=g?.items??[];return a.length===0?e:[...e,...a.flatMap(e=>e.items)]},[g?.items,a]),hasMore:v,isLoading:y,loadMore:b}}function e0(e,t){let n=(0,N.useRef)(null),r=(0,N.useRef)(e);return r.current=e,(0,N.useCallback)(e=>{n.current?.disconnect(),n.current=null,e&&(n.current=new IntersectionObserver(e=>{e[0]?.isIntersecting&&r.current()},t),n.current.observe(e))},[JSON.stringify(t)])}function t0(e){let[t,n]=(0,N.useState)(null),r=(0,N.useRef)(e);return r.current!==e&&(r.current=e,t!==null&&n(null)),[t??e,n]}function n0(e){let[t,n]=(0,N.useState)(new Set),r=(0,N.useRef)(e);return r.current!==e&&(r.current=e,t.size>0&&n(new Set)),[t,(0,N.useCallback)(e=>{n(t=>new Set(t).add(e))},[]),(0,N.useCallback)(e=>{n(new Set(e))},[]),(0,N.useCallback)(e=>{n(t=>{let n=new Set(t);return n.delete(e),n})},[])]}function r0({className:e,decorative:t=!0,orientation:n=`horizontal`,...r}){return(0,L.jsx)(Jh,{"data-slot":`separator`,decorative:t,orientation:n,className:KZ(`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})}var i0=C1(`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`}}),a0=N.createContext({size:`default`,variant:`default`,spacing:0});function o0({children:e,className:t,size:n,spacing:r=0,variant:i,...a}){return(0,L.jsx)(ig,{"data-slot":`toggle-group`,"data-variant":i,"data-size":n,"data-spacing":r,className:KZ(`group/toggle-group flex w-fit items-center rounded-md`,t),...a,children:(0,L.jsx)(a0,{value:{variant:i,size:n,spacing:r},children:e})})}function s0({children:e,className:t,size:n,variant:r,...i}){let a=N.useContext(a0);return(0,L.jsx)(pg,{"data-slot":`toggle-group-item`,"data-variant":a.variant||r,"data-size":a.size||n,"data-spacing":a.spacing,className:KZ(i0({variant:a.variant||r,size:a.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})}var c0=e=>/ExpiredToken|Unauthorized|AuthFailure|SSO|token|credentials|expired/i.test(e),l0=e=>e===`system`||e===`prs`,u0=e=>{switch(e){case`error`:return(0,L.jsx)(Vg,{className:`size-4 text-destructive shrink-0`});case`warning`:return(0,L.jsx)(Oee,{className:`size-4 text-yellow-500 shrink-0`});case`success`:return(0,L.jsx)(Hg,{className:`size-4 text-green-500 shrink-0`});default:return(0,L.jsx)(a_,{className:`size-4 text-blue-500 shrink-0`})}},d0=WF(TL(G({operation:H(U),profile:H(U),region:H(U),cause:H(U),error:H(U),message:H(U)}))),f0=e=>qb(d0(e),()=>Vb({cause:e})),p0=e=>{let t=f0(e);if(Ub(t))return e;let{cause:n,error:r,message:i,operation:a}=t.value,o=n??r??i,s=[];return a!==void 0&&s.push(a),o!==void 0&&s.push(o),s.length>0?s.join(` — `):e},m0=e=>{let t=new Date(e),n=new Date().getTime()-t.getTime();return n<6e4?`just now`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()};function h0(){let[e,t]=(0,N.useState)(void 0),[n,r]=(0,N.useState)(!0),[i,a]=(0,N.useState)(new Set),o=e=>a(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),s=Yz(Fq),c=or(),{hasMore:l,isLoading:u,items:d,loadMore:f}=$1({filter:e,unreadOnly:n}),p=Zz(mq),m=Zz(hq),h=Zz(gq),g=Zz(cq),_=Zz(lq),[v,y,b]=n0(d[0]?.id),[x,S,,C]=n0(d[0]?.id),w=e0(()=>{l&&!u&&f()}),T=d.map(e=>x.has(e.id)?{...e,read:0}:v.has(e.id)?{...e,read:1}:e),E=s.unreadNotificationCount??0,D=e=>e.pullRequestId===``,O=e=>{e.read===0&&(y(e.id),C(e.id),p({payload:{id:e.id}})),D(e)?o(e.id):c(e.repositoryName!==``&&e.accountRegion!==``?RJ(e.awsAccountId,e.pullRequestId,e.repositoryName,e.accountRegion):`/accounts/${encodeURIComponent(e.awsAccountId)}/prs/${e.pullRequestId}`)};return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Notifications`}),(0,L.jsx)(D1,{variant:`ghost`,size:`sm`,onClick:()=>c(`/`),children:`Back`})]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsxs)(o0,{type:`single`,value:e??`all`,onValueChange:e=>t(l0(e)?e:void 0),variant:`outline`,size:`sm`,children:[(0,L.jsx)(s0,{value:`all`,children:`All`}),(0,L.jsx)(s0,{value:`system`,children:`System`}),(0,L.jsx)(s0,{value:`prs`,children:`PRs`})]}),(0,L.jsx)(D1,{variant:n?`secondary`:`ghost`,size:`sm`,onClick:()=>r(e=>!e),children:`Unread only`})]}),(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`div`,{className:`flex items-center gap-2`,children:E>0&&(0,L.jsxs)(T1,{variant:`destructive`,children:[E,` unread`]})}),E>0&&(0,L.jsxs)(D1,{variant:`ghost`,size:`sm`,onClick:()=>{b(T.map(e=>e.id)),h({})},children:[(0,L.jsx)(Ig,{className:`size-3.5 mr-1`}),`Mark all read`]})]}),T.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground py-4 text-center`,children:`No notifications`}):(0,L.jsx)(`div`,{className:`divide-y rounded-md border`,children:T.map(e=>{let t=p0(e.message),n=i.has(e.id);return(0,L.jsxs)(`div`,{className:`flex ${e.read===0?`border-l-2 border-l-blue-500`:``}`,children:[(0,L.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,L.jsxs)(`div`,{className:`flex items-start gap-3 px-3 py-2.5 cursor-pointer hover:bg-accent/50 transition-colors`,role:`button`,tabIndex:0,onClick:()=>O(e),onKeyDown:t=>{t.key===`Enter`&&O(e)},children:[u0(e.type),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,L.jsx)(`span`,{className:`text-sm truncate ${e.read===0?`font-medium`:`text-muted-foreground`}`,children:e.title||(D(e)?e.type:`PR #${e.pullRequestId}`)}),(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:m0(e.createdAt)})]}),!n&&(0,L.jsx)(`p`,{className:`mt-0.5 text-xs text-muted-foreground line-clamp-1`,children:t})]})]}),n&&(0,L.jsxs)(`div`,{className:`px-3 pb-2.5 ml-7 space-y-2 min-w-0 overflow-hidden`,children:[Gb(f0(e.message),{onNone:()=>(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground break-words`,children:e.message}),onSome:e=>(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground space-y-0.5`,children:[e.operation&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`operation:`}),` `,e.operation]}),e.profile&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`profile:`}),` `,e.profile]}),e.region&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`region:`}),` `,e.region]}),e.cause&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`cause:`}),` `,e.cause]}),e.error&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`error:`}),` `,e.error]}),e.message&&(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`span`,{className:`font-medium`,children:`message:`}),` `,e.message]})]})}),(0,L.jsxs)(O1,{children:[(0,L.jsx)(D1,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs`,onClick:()=>{e.read===0?(y(e.id),C(e.id),p({payload:{id:e.id}})):(S(e.id),m({payload:{id:e.id}}))},children:e.read===0?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(yee,{className:`size-3`}),` Mark as read`]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(bee,{className:`size-3`}),` Mark as unread`]})}),D(e)&&c0(e.message)&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(D1,{variant:`default`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{try{let t=JF(MW)(e.profile||e.title);g({payload:{profile:t}})}catch{}},children:`Login`}),(0,L.jsx)(D1,{variant:`ghost`,size:`sm`,className:`h-7 px-2.5 text-xs`,onClick:()=>{_({})},children:`Logout`})]})]})]})]}),(0,L.jsx)(`button`,{className:`shrink-0 px-3 flex items-center hover:bg-accent/50 transition-colors border-l border-border`,onClick:()=>o(e.id),title:n?`Collapse`:`Expand`,children:(0,L.jsx)(zg,{className:`size-4 text-muted-foreground transition-transform ${n?`rotate-90`:``}`})})]},e.id)})}),(0,L.jsx)(`div`,{ref:w,className:`h-1`}),u&&(0,L.jsx)(`div`,{className:`flex justify-center py-2`,children:(0,L.jsx)(c_,{className:`size-4 animate-spin text-muted-foreground`})})]})]})}var g0=864e5,_0=`green`,v0=`yellow`,y0=`red`,b0=e=>Math.round(e*10)/10,x0=(e,t,n)=>Math.min(t,Math.max(e,n)),S0=(e,t)=>Math.max(0,(t.getTime()-e.getTime())/g0),C0=e=>/^\w+(\([^)]+\))?:/.test(e)||/^[A-Z]+-\d+:/.test(e),w0=(e,t)=>{let n=S0(e.lastModifiedDate,t),r=S0(e.creationDate,t),i=e.commentCount??0,a=C0(e.title),o=!!e.description&&e.description.trim().length>0,s=-(n*1),c=-(r*.5),l=i*1,u=e.isApproved?2:0,d=e.isMergeable?0:-3,f=a?.5:0,p=o?.5:0;return Vb({total:b0(x0(0,10,10+s+c+l+u+d+f+p)),breakdown:[{label:`Base`,value:10},{label:`Time decay`,value:b0(s)},{label:`Age`,value:b0(c)},{label:`Comments`,value:b0(l)},{label:`Approval`,value:u},{label:`Conflicts`,value:d},{label:`Scope`,value:f},{label:`Description`,value:p}],categories:[{label:`Activity`,description:`-1 per day since last update (${Math.round(n)}d ago)`,value:b0(s),...n<2?{status:`positive`,statusLabel:`ACTIVE`}:n<=7?{status:`neutral`,statusLabel:`SLOWING`}:{status:`negative`,statusLabel:`STALE`}},{label:`Age`,description:`-0.5 per day since creation (${Math.round(r)}d old)`,value:b0(c),...r<3?{status:`positive`,statusLabel:`FRESH`}:r<=14?{status:`neutral`,statusLabel:`AGING`}:{status:`negative`,statusLabel:`OLD`}},{label:`Engagement`,description:`+1 per comment (${i} comments)`,value:b0(l),...i>=3?{status:`positive`,statusLabel:`ACTIVE`}:i>=1?{status:`neutral`,statusLabel:`QUIET`}:{status:`negative`,statusLabel:`SILENT`}},{label:`Approval`,description:e.isApproved?`+2 bonus for approval`:`No approval yet (+2 when approved)`,value:u,...e.isApproved?{status:`positive`,statusLabel:`APPROVED`}:{status:`neutral`,statusLabel:`PENDING`}},{label:`Mergeable`,description:e.isMergeable?`No merge conflicts`:`-3 penalty for merge conflicts`,value:d,...e.isMergeable?{status:`positive`,statusLabel:`CLEAN`}:{status:`negative`,statusLabel:`CONFLICT`}},{label:`Scope`,description:a?`+0.5 bonus — conventional commit or ticket prefix detected`:`No scope prefix found (e.g. feat(auth): or JIRA-123:)`,value:f,...a?{status:`positive`,statusLabel:`DETECTED`}:{status:`negative`,statusLabel:`MISSING`}},{label:`Description`,description:o?`+0.5 bonus — PR description provided`:`No PR description provided`,value:p,...o?{status:`positive`,statusLabel:`PROVIDED`}:{status:`negative`,statusLabel:`MISSING`}}]})},T0=e=>cB(e).pipe(lB(e=>e>=7,()=>_0),lB(e=>e>=4,()=>v0),uB(()=>y0)),E0={root:`rly_AgentContextButton-module__root`,mark:`rly_AgentContextButton-module__mark`,glyph:`rly_AgentContextButton-module__glyph`,copy:`rly_AgentContextButton-module__copy`,contextRow:`rly_AgentContextButton-module__contextRow`,action:`rly_AgentContextButton-module__action`,agent:`rly_AgentContextButton-module__agent`,contextLabel:`rly_AgentContextButton-module__contextLabel`,context:`rly_AgentContextButton-module__context`,job:`rly_AgentContextButton-module__job`,count:`rly_AgentContextButton-module__count`},D0=e=>wQ(E0,e),O0=()=>(0,L.jsx)(`span`,{"aria-hidden":`true`,className:D0(`mark`),children:(0,L.jsx)(`svg`,{className:D0(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{d:`M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z`,fill:`currentColor`})})}),k0=({actionLabel:e=`Ask agent`,agentName:t,className:n,context:r,contextLabel:i=`Context`,job:a,type:o,...s})=>{let c=Y(e,`AgentContextButton actionLabel`),l=Y(t,`AgentContextButton agentName`),u=Y(r,`AgentContextButton context`),d=Y(i,`AgentContextButton contextLabel`),f=a===void 0?void 0:Y(a.status,`AgentContextButton job status`);if(a?.count!==void 0&&(!Number.isInteger(a.count)||a.count<0))throw Error(`AgentContextButton job count must be a non-negative integer`);return(0,L.jsxs)(`button`,{...s,className:TQ(D0(`root`),n),"data-rly-agent-context-button":``,type:o??`button`,children:[(0,L.jsx)(O0,{}),(0,L.jsxs)(`span`,{className:D0(`copy`),children:[(0,L.jsx)(`span`,{className:D0(`action`),children:c}),(0,L.jsx)(`span`,{className:D0(`agent`),children:l}),(0,L.jsxs)(`span`,{className:D0(`contextRow`),children:[(0,L.jsx)(`span`,{className:D0(`contextLabel`),children:d}),(0,L.jsx)(`span`,{className:D0(`context`),children:u})]})]}),f===void 0?null:(0,L.jsxs)(`span`,{className:D0(`job`),"data-rly-agent-job":``,children:[f,a?.count===void 0?null:(0,L.jsx)(`span`,{className:D0(`count`),children:a.count})]})]})},A0={drawer:`rly_AgentDrawer-module__drawer`,body:`rly_AgentDrawer-module__body`,slot:`rly_AgentDrawer-module__slot`,slotContent:`rly_AgentDrawer-module__slotContent`,identityCopy:`rly_AgentDrawer-module__identityCopy`,contextSlot:`rly_AgentDrawer-module__contextSlot`,identity:`rly_AgentDrawer-module__identity`,mark:`rly_AgentDrawer-module__mark`,glyph:`rly_AgentDrawer-module__glyph`,eyebrow:`rly_AgentDrawer-module__eyebrow`,slotTitle:`rly_AgentDrawer-module__slotTitle`,contextSummary:`rly_AgentDrawer-module__contextSummary`},j0=e=>wQ(A0,e),M0=()=>(0,L.jsx)(`span`,{"aria-hidden":`true`,className:j0(`mark`),children:(0,L.jsx)(`svg`,{className:j0(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{d:`M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z`,fill:`currentColor`})})}),N0=({children:e,label:t,name:n})=>(0,L.jsxs)(`section`,{className:j0(`slot`),"data-rly-agent-drawer-slot":n,children:[(0,L.jsx)(`h2`,{className:j0(`slotTitle`),children:t}),(0,L.jsx)(`div`,{className:j0(`slotContent`),children:e})]}),P0=({agentName:e,capabilities:t,className:n,composer:r,context:i,contextSummary:a,evidence:o,onOpenChange:s,open:c,thread:l,title:u,...d})=>{let f=Y(e,`AgentDrawer agentName`),p=Y(a,`AgentDrawer contextSummary`),m=Y(u,`AgentDrawer title`),h=(0,N.useRef)(null);return(0,L.jsx)($Q.Root,{onOpenChange:s,open:c,children:(0,L.jsx)($Q.Content,{className:TQ(j0(`drawer`),n),description:`Context-aware session with ${f}`,initialFocusRef:h,title:m,children:(0,L.jsxs)($Q.Body,{...d,className:j0(`body`),children:[(0,L.jsxs)(`section`,{className:TQ(j0(`slot`),j0(`contextSlot`)),"data-rly-agent-drawer-slot":`context`,ref:h,tabIndex:-1,children:[(0,L.jsxs)(`div`,{className:j0(`identity`),children:[(0,L.jsx)(M0,{}),(0,L.jsxs)(`div`,{className:j0(`identityCopy`),children:[(0,L.jsx)(`span`,{className:j0(`eyebrow`),children:f}),(0,L.jsx)(`h2`,{className:j0(`contextSummary`),children:p})]})]}),(0,L.jsx)(`div`,{className:j0(`slotContent`),children:i})]}),(0,L.jsx)(N0,{label:`Evidence`,name:`evidence`,children:o}),(0,L.jsx)(N0,{label:`Capabilities`,name:`capabilities`,children:t}),(0,L.jsxs)(`section`,{"aria-live":`polite`,"aria-relevant":`additions text`,className:j0(`slot`),"data-rly-agent-drawer-slot":`thread`,children:[(0,L.jsx)(`h2`,{className:j0(`slotTitle`),children:`Thread`}),(0,L.jsx)(`div`,{className:j0(`slotContent`),children:l})]}),(0,L.jsx)(N0,{label:`Message`,name:`composer`,children:r})]})})})},F0={root:`rly_AgentJob-module__root`,header:`rly_AgentJob-module__header`,agentGlyph:`rly_AgentJob-module__agentGlyph`,titleBlock:`rly_AgentJob-module__titleBlock`,eyebrow:`rly_AgentJob-module__eyebrow`,progressLabel:`rly_AgentJob-module__progressLabel`,metadata:`rly_AgentJob-module__metadata`,progressBlock:`rly_AgentJob-module__progressBlock`,slot:`rly_AgentJob-module__slot`,footer:`rly_AgentJob-module__footer`,outcome:`rly_AgentJob-module__outcome`},I0=e=>wQ(F0,e),L0=(e,t)=>{if(e==null||vQ(e))throw Error(`${t} must contain renderable content`);SQ(e)&&Y(e,t)},R0={queued:{label:`Queued`,tone:`neutral`},running:{label:`Running`,tone:`progress`},"cancel-requested":{label:`Cancel requested`,tone:`caution`},succeeded:{label:`Succeeded`,tone:`positive`},failed:{label:`Failed`,tone:`critical`},cancelled:{label:`Cancelled`,tone:`neutral`}},z0=e=>{if(e!==void 0&&(!Number.isFinite(e)||e<0||e>100))throw Error(`AgentJob progress must be between 0 and 100`)},B0=({cancelLabel:e=`Request cancellation`,capability:t,className:n,context:r,evidence:i,heading:a,onCancel:o,outcome:s,progress:c,provider:l,revision:u,sandbox:d,state:f,...p})=>{let m=Y(a,`AgentJob heading`),h=Y(l,`AgentJob provider`),g=Y(t,`AgentJob capability`),_=Y(e,`AgentJob cancelLabel`);L0(r,`AgentJob context`),L0(i,`AgentJob evidence`),(f===`succeeded`||f===`failed`||f===`cancelled`)&&L0(s,`AgentJob terminal outcome`),d!==void 0&&Y(d,`AgentJob sandbox`),u!==void 0&&Y(u,`AgentJob revision`),z0(c);let v=R0[f],y=f===`queued`||f===`running`,b=`rly-agent-job-progress-${(0,N.useId)()}`;return(0,L.jsxs)(`article`,{...p,"aria-busy":f===`queued`||f===`running`||f===`cancel-requested`,className:TQ(I0(`root`),n),"data-rly-agent-job-state":f,children:[(0,L.jsxs)(`header`,{className:I0(`header`),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:I0(`agentGlyph`),children:`AI`}),(0,L.jsxs)(`span`,{className:I0(`titleBlock`),children:[(0,L.jsxs)(`span`,{className:I0(`eyebrow`),children:[h,` · `,g]}),(0,L.jsx)(`h2`,{children:m})]}),(0,L.jsx)(c$,{label:v.label,size:`compact`,tone:v.tone})]}),c===void 0?null:(0,L.jsxs)(`div`,{className:I0(`progressBlock`),children:[(0,L.jsxs)(`span`,{className:I0(`progressLabel`),id:b,children:[`Progress `,(0,L.jsxs)(`strong`,{children:[Math.round(c),`%`]})]}),(0,L.jsx)(`progress`,{"aria-labelledby":b,max:100,value:c})]}),(0,L.jsxs)(`dl`,{className:I0(`metadata`),children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Provider`}),(0,L.jsx)(`dd`,{children:h})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Capability`}),(0,L.jsx)(`dd`,{children:g})]}),d===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Sandbox`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(`code`,{children:d})})]}),u===void 0?null:(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Revision`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(`code`,{children:u})})]})]}),(0,L.jsxs)(`section`,{className:I0(`slot`),"data-rly-agent-job-context":``,children:[(0,L.jsx)(`h3`,{children:`Exact context`}),r]}),(0,L.jsxs)(`section`,{className:I0(`slot`),"data-rly-agent-job-evidence":``,children:[(0,L.jsx)(`h3`,{children:`Evidence`}),i]}),s===void 0?null:(0,L.jsxs)(`section`,{className:TQ(I0(`slot`),I0(`outcome`)),"data-rly-agent-job-outcome":f,children:[(0,L.jsx)(`h3`,{children:`Terminal outcome`}),s]}),y&&o!==void 0?(0,L.jsx)(`footer`,{className:I0(`footer`),children:(0,L.jsx)(r$,{onClick:o,size:`compact`,variant:`quiet`,children:_})}):null]})},V0={root:`rly_AgentProposal-module__root`,header:`rly_AgentProposal-module__header`,agentIdentity:`rly_AgentProposal-module__agentIdentity`,agentText:`rly_AgentProposal-module__agentText`,eyebrow:`rly_AgentProposal-module__eyebrow`,heading:`rly_AgentProposal-module__heading`,agentRole:`rly_AgentProposal-module__agentRole`,proposalReference:`rly_AgentProposal-module__proposalReference`,context:`rly_AgentProposal-module__context`,boundary:`rly_AgentProposal-module__boundary`,evidence:`rly_AgentProposal-module__evidence`,outcome:`rly_AgentProposal-module__outcome`,state:`rly_AgentProposal-module__state`,facts:`rly_AgentProposal-module__facts`},H0=e=>wQ(V0,e),U0=e=>{Y(e.id,`AgentProposal agent id`),Y(e.name,`AgentProposal agent name`),Y(e.role,`AgentProposal agent role`),Y(e.avatarFallback,`AgentProposal agent avatarFallback`),e.avatarSrc!==void 0&&Y(e.avatarSrc,`AgentProposal agent avatarSrc`)},W0=e=>{if(Y(e.id,`AgentProposal id`),U0(e.agent),Y(e.capability,`AgentProposal capability`),Y(e.context,`AgentProposal context`),Y(e.expectedRevision,`AgentProposal expectedRevision`),Y(e.impact,`AgentProposal impact`),Y(e.target,`AgentProposal target`),e.evidence.length===0)throw Error(`AgentProposal evidence must contain at least one reference`);let t=new Set;for(let n of e.evidence){let e=Y(n.id,`AgentProposal evidence id`);if(t.has(e))throw Error(`AgentProposal evidence ids must be unique: ${e}`);t.add(e),Y(n.label,`AgentProposal evidence label for ${e}`),Y(n.reference,`AgentProposal evidence reference for ${e}`)}return e},G0=({className:e,outcome:t,proposal:n,state:r,...i})=>{let a=W0(n),o=`rly-agent-proposal-${(0,N.useId)()}`,s=`rly-agent-proposal-reference-${(0,N.useId)()}`;return(0,L.jsxs)(`section`,{...i,"aria-labelledby":`${o} ${s}`,className:TQ(H0(`root`),e),"data-rly-agent-proposal-id":a.id,children:[(0,L.jsxs)(`header`,{className:H0(`header`),children:[(0,L.jsxs)(`div`,{className:H0(`agentIdentity`),children:[(0,L.jsx)(f$,{decorative:!0,fallback:a.agent.avatarFallback,form:`rounded-square`,...a.agent.avatarSrc===void 0?{}:{src:a.agent.avatarSrc}}),(0,L.jsxs)(`div`,{className:H0(`agentText`),children:[(0,L.jsx)(`p`,{className:H0(`eyebrow`),children:`Agent proposal`}),(0,L.jsx)(`h2`,{className:H0(`heading`),id:o,children:a.agent.name}),(0,L.jsx)(`p`,{className:H0(`agentRole`),children:a.agent.role}),(0,L.jsx)(`code`,{className:H0(`proposalReference`),id:s,children:a.id})]})]}),(0,L.jsx)(`div`,{className:H0(`state`),"data-rly-agent-proposal-slot":`state`,children:r})]}),(0,L.jsx)(`p`,{className:H0(`boundary`),children:`This is an agent proposal. It is not human authorization.`}),(0,L.jsxs)(`p`,{className:H0(`context`),children:[(0,L.jsx)(`span`,{children:`Context`}),a.context]}),(0,L.jsxs)(`dl`,{className:H0(`facts`),children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Capability`}),(0,L.jsx)(`dd`,{children:a.capability})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Target`}),(0,L.jsx)(`dd`,{children:a.target})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Expected revision`}),(0,L.jsx)(`dd`,{children:a.expectedRevision})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Impact`}),(0,L.jsx)(`dd`,{children:a.impact})]})]}),(0,L.jsxs)(`div`,{className:H0(`evidence`),"data-rly-agent-proposal-evidence":``,children:[(0,L.jsx)(`h3`,{children:`Evidence`}),(0,L.jsx)(`ul`,{children:a.evidence.map(e=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`code`,{children:e.reference})]},e.id))})]}),(0,L.jsxs)(`div`,{className:H0(`outcome`),"data-rly-agent-proposal-slot":`outcome`,children:[(0,L.jsx)(`h3`,{children:`Outcome`}),t]})]})},K0={root:`rly_AgentThread-module__root`,header:`rly_AgentThread-module__header`,messageHead:`rly_AgentThread-module__messageHead`,actor:`rly_AgentThread-module__actor`,actions:`rly_AgentThread-module__actions`,agentGlyph:`rly_AgentThread-module__agentGlyph`,avatar:`rly_AgentThread-module__avatar`,context:`rly_AgentThread-module__context`,composer:`rly_AgentThread-module__composer`,conceptLabel:`rly_AgentThread-module__conceptLabel`,messages:`rly_AgentThread-module__messages`,message:`rly_AgentThread-module__message`,agent:`rly_AgentThread-module__agent`,human:`rly_AgentThread-module__human`,system:`rly_AgentThread-module__system`,actorText:`rly_AgentThread-module__actorText`,empty:`rly_AgentThread-module__empty`,content:`rly_AgentThread-module__content`,evidence:`rly_AgentThread-module__evidence`,visuallyHidden:`rly_AgentThread-module__visuallyHidden`},q0=e=>wQ(K0,e),J0=(e,t)=>{if(e==null||vQ(e))throw Error(`${t} must contain renderable content`);SQ(e)&&Y(e,t)},Y0=e=>{let t=e.trim().split(/\s+/u),n=Array.from(t[0]??``)[0]??``,r=Array.from(t[t.length-1]??``)[0]??``;return Y(`${n}${t.length>1?r:``}`,`AgentThread actor fallback`)},X0=e=>{if(e.kind===`human`){Y(e.person.id,`AgentThread human id`),Y(e.person.name,`AgentThread human name`),Y(e.person.role,`AgentThread human role`),e.person.avatarFallback!==void 0&&Y(e.person.avatarFallback,`AgentThread human avatarFallback`),e.person.avatarSrc!==void 0&&Y(e.person.avatarSrc,`AgentThread human avatarSrc`);return}Y(e.id,`AgentThread ${e.kind} id`),Y(e.name,`AgentThread ${e.kind} name`),e.kind===`agent`&&(Y(e.role,`AgentThread agent role`),e.avatarFallback!==void 0&&Y(e.avatarFallback,`AgentThread agent avatarFallback`))},Z0=e=>{let t=e.kind===`human`?e.person.name:e.name,n=e.kind===`human`?e.person.role:e.kind===`agent`?e.role:`System event`,r=e.kind===`human`?e.person.avatarFallback??Y0(t):e.kind===`agent`?e.avatarFallback??Y0(t):`·`,i=e.kind===`human`?e.person.avatarSrc:void 0;return(0,L.jsxs)(`div`,{className:TQ(q0(`actor`),q0(e.kind)),"data-rly-agent-thread-actor":e.kind,children:[(0,L.jsx)(f$,{className:q0(`avatar`),"data-rly-agent-thread-avatar-form":e.kind===`human`?`circle`:`rounded-square`,decorative:!0,fallback:r,form:e.kind===`human`?`circle`:`rounded-square`,size:`default`,...i===void 0?{}:{src:i}}),(0,L.jsxs)(`span`,{className:q0(`actorText`),children:[(0,L.jsx)(`strong`,{children:t}),(0,L.jsx)(`span`,{children:n})]})]})},Q0=({announcement:e,className:t,composer:n,context:r,emptyLabel:i=`No messages yet.`,heading:a,messages:o,...s})=>{let c=Y(a,`AgentThread heading`),l=Y(i,`AgentThread emptyLabel`);J0(r,`AgentThread context`),J0(n,`AgentThread composer`),e!==void 0&&Y(e,`AgentThread announcement`);let u=new Set;for(let e of o){let t=Y(e.id,`AgentThread message id`);if(u.has(t))throw Error(`AgentThread message ids must be unique: ${t}`);u.add(t),X0(e.actor),J0(e.content,`AgentThread message content for ${t}`),Y(e.dateTime,`AgentThread message dateTime for ${t}`),Y(e.time,`AgentThread message time for ${t}`)}return(0,L.jsxs)(`section`,{...s,className:TQ(q0(`root`),t),"data-rly-agent-thread":``,children:[(0,L.jsxs)(`header`,{className:q0(`header`),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:q0(`agentGlyph`),children:`AI`}),(0,L.jsx)(`h2`,{children:c})]}),(0,L.jsxs)(`div`,{className:q0(`context`),"data-rly-agent-thread-context":``,children:[(0,L.jsx)(`span`,{className:q0(`conceptLabel`),children:`Exact context`}),r]}),o.length===0?(0,L.jsx)(`p`,{className:q0(`empty`),children:l}):(0,L.jsx)(`ol`,{"aria-label":`${c} messages`,className:q0(`messages`),children:o.map(e=>(0,L.jsxs)(`li`,{className:q0(`message`),"data-rly-agent-thread-message":e.id,children:[(0,L.jsxs)(`div`,{className:q0(`messageHead`),children:[Z0(e.actor),(0,L.jsx)(`time`,{dateTime:e.dateTime,children:e.time})]}),(0,L.jsx)(`div`,{className:q0(`content`),children:e.content}),e.evidence===void 0?null:(0,L.jsx)(`div`,{className:q0(`evidence`),"data-rly-agent-thread-evidence":``,children:e.evidence}),e.actions===void 0?null:(0,L.jsx)(`div`,{className:q0(`actions`),"data-rly-agent-thread-actions":``,children:e.actions})]},e.id))}),(0,L.jsx)(`p`,{"aria-atomic":`true`,"aria-live":`polite`,className:q0(`visuallyHidden`),children:e}),(0,L.jsx)(`div`,{className:q0(`composer`),"data-rly-agent-thread-composer":``,children:n})]})},$0={root:`rly_Person-module__root`,compact:`rly_Person-module__compact`,defaultSize:`rly_Person-module__defaultSize`,identity:`rly_Person-module__identity`,name:`rly_Person-module__name`,role:`rly_Person-module__role`},e2=e=>wQ($0,e),t2=CQ({size:{compact:{className:e2(`compact`),purpose:`Dense identity row with complete attribution`,tokens:[`space-24`,`type-meta`]},default:{className:e2(`defaultSize`),purpose:`Standard identity row with complete attribution`,tokens:[`space-32`,`type-label`,`type-meta`]}}}),n2=CQ({size:`default`}),r2=e=>{let t=e.trim().split(/\s+/u),n=t[0]??``,r=t[t.length-1]??n,i=Array.from(n);return Y(`${i[0]??``}${t.length>1?Array.from(r)[0]??``:i[1]??``}`,`Person avatar fallback`)},i2=e=>(Y(e.id,`Person id`),Y(e.name,`Person name`),Y(e.role,`Person role`),e.avatarFallback!==void 0&&Y(e.avatarFallback,`Person avatarFallback`),e.avatarSrc!==void 0&&Y(e.avatarSrc,`Person avatarSrc`),e),a2=({className:e,person:t,size:n=`default`,...r})=>{let i=i2(t),a=i.avatarFallback??r2(i.name);return(0,L.jsxs)(`div`,{...r,className:TQ(e2(`root`),t2.size[n].className,e),"data-rly-person-size":n,children:[(0,L.jsx)(f$,{decorative:!0,fallback:a,size:n===`compact`?`small`:`default`,...i.avatarSrc===void 0?{}:{src:i.avatarSrc}}),(0,L.jsxs)(`span`,{className:e2(`identity`),children:[(0,L.jsx)(`span`,{className:e2(`name`),children:i.name}),(0,L.jsx)(`span`,{className:e2(`role`),children:i.role})]})]})},o2={root:`rly_PeopleStrip-module__root`,compact:`rly_PeopleStrip-module__compact`,defaultSize:`rly_PeopleStrip-module__defaultSize`,personItem:`rly_PeopleStrip-module__personItem`,controlItem:`rly_PeopleStrip-module__controlItem`,overflow:`rly_PeopleStrip-module__overflow`},s2=e=>wQ(o2,e),c2=CQ({size:{compact:{className:s2(`compact`),purpose:`Dense attributed people list for narrow surfaces`,tokens:[`space-8`,`space-40`]},default:{className:s2(`defaultSize`),purpose:`Standard attributed people list`,tokens:[`space-12`,`space-40`]}}}),l2=CQ({size:`default`}),u2=e=>{if(!Number.isInteger(e)||e<1)throw Error(`PeopleStrip limit must be a positive integer`);return e},d2=e=>{let t=new Set;for(let n of e){let e=Y(n.id,`PeopleStrip person id`);if(Y(n.name,`PeopleStrip name for ${e}`),Y(n.role,`PeopleStrip role for ${e}`),t.has(e))throw Error(`PeopleStrip person ids must be unique: ${e}`);t.add(e)}},f2=({"aria-label":e,className:t,expanded:n,limit:r=3,onExpandedChange:i,people:a,size:o=`default`,...s})=>{let c=Y(e,`PeopleStrip aria-label`),l=u2(r);d2(a);let u=Math.max(a.length-l,0),d=n?a:a.slice(0,l);return(0,L.jsxs)(`ul`,{...s,"aria-label":c,className:TQ(s2(`root`),c2.size[o].className,t),"data-rly-people-strip-size":o,children:[d.map(e=>(0,L.jsx)(`li`,{className:s2(`personItem`),children:(0,L.jsx)(a2,{person:e,size:o})},e.id)),u===0?null:(0,L.jsx)(`li`,{className:s2(`controlItem`),children:(0,L.jsx)(`button`,{"aria-expanded":n,"aria-label":n?`Show fewer people`:`Show ${u} more people`,className:s2(`overflow`),onClick:()=>i(!n),type:`button`,children:n?`Show fewer`:`+${u} people`})})]})},p2={root:`rly_CollaboratorGroup-module__root`,compact:`rly_CollaboratorGroup-module__compact`,defaultSize:`rly_CollaboratorGroup-module__defaultSize`,heading:`rly_CollaboratorGroup-module__heading`,lanes:`rly_CollaboratorGroup-module__lanes`,lane:`rly_CollaboratorGroup-module__lane`,laneHeading:`rly_CollaboratorGroup-module__laneHeading`,empty:`rly_CollaboratorGroup-module__empty`},m2=e=>wQ(p2,e),h2=CQ({size:{compact:{className:m2(`compact`),purpose:`Narrow entity attribution with explicit role lanes`,tokens:[`space-12`,`type-label`]},default:{className:m2(`defaultSize`),purpose:`Standard entity attribution with explicit role lanes`,tokens:[`space-20`,`type-card-title`]}}}),g2=CQ({size:`default`}),_2=({approvers:e=[],authors:t=[],className:n,emptyLabel:r=`No collaborators assigned.`,expandedCategories:i,heading:a,limit:o=3,onCategoryExpandedChange:s,operators:c=[],owners:l=[],reviewers:u=[],size:d=`default`,...f})=>{let p=Y(a,`CollaboratorGroup heading`),m=Y(r,`CollaboratorGroup emptyLabel`),h=`rly-collaborators-${(0,N.useId)()}`,g=new Set(i),_=[{category:`authors`,label:`Authors`,people:t},{category:`owners`,label:`Owners`,people:l},{category:`reviewers`,label:`Reviewers`,people:u},{category:`operators`,label:`Operators`,people:c},{category:`approvers`,label:`Approvers`,people:e}].filter(e=>e.people.length>0);return(0,L.jsxs)(`section`,{...f,"aria-labelledby":h,className:TQ(m2(`root`),h2.size[d].className,n),"data-rly-collaborator-group-size":d,children:[(0,L.jsx)(`h2`,{className:m2(`heading`),id:h,children:p}),_.length===0?(0,L.jsx)(`p`,{className:m2(`empty`),children:m}):(0,L.jsx)(`div`,{className:m2(`lanes`),children:_.map(e=>(0,L.jsxs)(`section`,{className:m2(`lane`),children:[(0,L.jsx)(`h3`,{className:m2(`laneHeading`),children:e.label}),(0,L.jsx)(f2,{"aria-label":`${p}: ${e.label}`,expanded:g.has(e.category),limit:o,onExpandedChange:t=>s(e.category,t),people:e.people,size:d})]},e.category))})]})},v2={root:`rly_FreshnessStamp-module__root`,stateWord:`rly_FreshnessStamp-module__stateWord`,separator:`rly_FreshnessStamp-module__separator`,time:`rly_FreshnessStamp-module__time`,compact:`rly_FreshnessStamp-module__compact`,defaultSize:`rly_FreshnessStamp-module__defaultSize`,current:`rly_FreshnessStamp-module__current`,cached:`rly_FreshnessStamp-module__cached`,missing:`rly_FreshnessStamp-module__missing`,stale:`rly_FreshnessStamp-module__stale`,unavailable:`rly_FreshnessStamp-module__unavailable`},y2=e=>wQ(v2,e),b2=CQ({state:{current:{className:y2(`current`),purpose:`Current source observation`,tokens:[`color-success-ink`,`color-success-tint`]},cached:{className:y2(`cached`),purpose:`Valid cached source observation`,tokens:[`color-text-2`,`color-surface-2`]},stale:{className:y2(`stale`),purpose:`Source observation beyond its supplied freshness threshold`,tokens:[`color-held-ink`,`color-held-tint`]},missing:{className:y2(`missing`),purpose:`Provider authoritatively reported no object`,tokens:[`color-text-2`,`color-surface-2`]},unavailable:{className:y2(`unavailable`),purpose:`No valid source observation is available`,tokens:[`color-blocked-ink`,`color-blocked-tint`]}},size:{compact:{className:y2(`compact`),purpose:`Dense freshness metadata`,tokens:[`type-meta`]},default:{className:y2(`defaultSize`),purpose:`Standard freshness metadata`,tokens:[`type-label`,`type-meta`]}}}),x2=CQ({size:`default`}),S2={current:`Current`,cached:`Cached`,stale:`Stale`,missing:`Missing`,unavailable:`Unavailable`},C2={current:`check`,cached:`clock`,stale:`clock`,missing:`minus`,unavailable:`alert`},w2=({className:e,dateTime:t,size:n=`default`,state:r,time:i,...a})=>{let o=i===void 0?void 0:Y(i,`FreshnessStamp time`),s=t===void 0?void 0:Y(t,`FreshnessStamp dateTime`);return(0,L.jsxs)(`span`,{...a,className:TQ(y2(`root`),b2.state[r].className,b2.size[n].className,e),"data-rly-freshness-state":r,children:[(0,L.jsxs)(`span`,{className:y2(`stateWord`),children:[(0,L.jsx)(w_,{decorative:!0,name:C2[r],size:`small`}),(0,L.jsx)(`span`,{children:S2[r]})]}),o===void 0||s===void 0?null:(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:y2(`separator`),children:`·`}),(0,L.jsx)(`time`,{className:y2(`time`),dateTime:s,children:o})]})]})},T2={root:`rly_ServiceMark-module__root`,rail:`rly_ServiceMark-module__rail`,glyph:`rly_ServiceMark-module__glyph`,name:`rly_ServiceMark-module__name`,compact:`rly_ServiceMark-module__compact`,defaultSize:`rly_ServiceMark-module__defaultSize`,codecommit:`rly_ServiceMark-module__codecommit`,codepipeline:`rly_ServiceMark-module__codepipeline`,jira:`rly_ServiceMark-module__jira`,confluence:`rly_ServiceMark-module__confluence`,clockify:`rly_ServiceMark-module__clockify`},E2=e=>wQ(T2,e),D2=CQ({service:{codecommit:{className:E2(`codecommit`),purpose:`CodeCommit provenance`,tokens:[`color-service-codecommit`]},codepipeline:{className:E2(`codepipeline`),purpose:`CodePipeline provenance`,tokens:[`color-service-codepipeline`]},jira:{className:E2(`jira`),purpose:`Jira provenance`,tokens:[`color-service-jira`]},confluence:{className:E2(`confluence`),purpose:`Confluence provenance`,tokens:[`color-service-confluence`]},clockify:{className:E2(`clockify`),purpose:`Clockify provenance`,tokens:[`color-service-clockify`]}},size:{compact:{className:E2(`compact`),purpose:`Dense provenance metadata`,tokens:[`space-24`,`type-meta`]},default:{className:E2(`defaultSize`),purpose:`Standard provenance identity`,tokens:[`space-32`,`type-label`]}}}),O2=CQ({size:`default`}),k2={codecommit:`CodeCommit`,codepipeline:`CodePipeline`,jira:`Jira`,confluence:`Confluence`,clockify:`Clockify`},A2={codecommit:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:E2(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`path`,{d:`M6 5.5h7.5a3 3 0 0 1 3 3v7`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.8`}),(0,L.jsx)(`circle`,{cx:`6`,cy:`5.5`,fill:`currentColor`,r:`2`}),(0,L.jsx)(`circle`,{cx:`16.5`,cy:`17.5`,fill:`currentColor`,r:`2`}),(0,L.jsx)(`path`,{d:`m10 12 2-2 2 2-2 2Z`,fill:`none`,stroke:`currentColor`,strokeLinejoin:`round`,strokeWidth:`1.6`})]}),codepipeline:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:E2(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`rect`,{fill:`none`,height:`5`,rx:`1`,stroke:`currentColor`,strokeWidth:`1.7`,width:`5`,x:`2.5`,y:`9.5`}),(0,L.jsx)(`rect`,{fill:`none`,height:`5`,rx:`1`,stroke:`currentColor`,strokeWidth:`1.7`,width:`5`,x:`16.5`,y:`9.5`}),(0,L.jsx)(`path`,{d:`M8 12h7m-2.5-2.5L15 12l-2.5 2.5`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.8`})]}),jira:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:E2(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`path`,{d:`m12 2.8 8.8 8.8a.6.6 0 0 1 0 .8L12 21.2l-8.8-8.8a.6.6 0 0 1 0-.8Z`,fill:`currentColor`}),(0,L.jsx)(`path`,{d:`m12 7.2 4.8 4.8-4.8 4.8L7.2 12Z`,fill:`var(--rly-color-surface-1)`}),(0,L.jsx)(`path`,{d:`m12 9.8 2.2 2.2-2.2 2.2L9.8 12Z`,fill:`currentColor`})]}),confluence:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:E2(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`path`,{d:`M4 7.2c3.6 2.1 6.8 2.4 9.6.9L17 6.3l2.7 4.3-3.4 1.8c-4.6 2.4-9.5 1.8-14-1.5Z`,fill:`currentColor`}),(0,L.jsx)(`path`,{d:`M20 16.8c-3.6-2.1-6.8-2.4-9.6-.9L7 17.7l-2.7-4.3 3.4-1.8c4.6-2.4 9.5-1.8 14 1.5Z`,fill:`currentColor`})]}),clockify:()=>(0,L.jsxs)(`svg`,{"aria-hidden":`true`,className:E2(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:[(0,L.jsx)(`circle`,{cx:`11`,cy:`13`,fill:`none`,r:`7`,stroke:`currentColor`,strokeWidth:`1.8`}),(0,L.jsx)(`path`,{d:`M11 9v4l3 2m1.5-10.7 1.8-1.8M18 7l2-2`,fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeWidth:`1.8`})]})},j2=({className:e,service:t,size:n=`default`,...r})=>{let i=A2[t],a=k2[t];return(0,L.jsxs)(`span`,{...r,"aria-label":a,className:TQ(E2(`root`),D2.service[t].className,D2.size[n].className,e),"data-rly-service":t,role:`img`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:E2(`rail`)}),(0,L.jsx)(i,{}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:E2(`name`),children:a})]})},M2={root:`rly_Verdict-module__root`,verdict:`rly_Verdict-module__verdict`,caution:`rly_Verdict-module__caution`,critical:`rly_Verdict-module__critical`,neutral:`rly_Verdict-module__neutral`,positive:`rly_Verdict-module__positive`,progress:`rly_Verdict-module__progress`,reasonPanel:`rly_Verdict-module__reasonPanel`,icon:`rly_Verdict-module__icon`,reason:`rly_Verdict-module__reason`},N2=e=>wQ(M2,e),P2=CQ({tone:{caution:{className:N2(`caution`),purpose:`Intentional hold or caution requiring attention`,tokens:[`color-held-ink`,`color-held-tint`]},critical:{className:N2(`critical`),purpose:`Explicit blocker or failed prerequisite`,tokens:[`color-blocked-ink`,`color-blocked-tint`]},neutral:{className:N2(`neutral`),purpose:`Neutral, missing, or unavailable outcome`,tokens:[`color-text-2`,`color-surface-2`]},positive:{className:N2(`positive`),purpose:`Satisfied readiness or successful outcome`,tokens:[`color-success-ink`,`color-success-tint`]},progress:{className:N2(`progress`),purpose:`Active work or delivery progress`,tokens:[`color-deploying-ink`,`color-deploying-tint`]}}}),F2={caution:`clock`,critical:`alert`,neutral:`minus`,positive:`check`,progress:`loader`},I2=({className:e,reason:t,tone:n,verdict:r,...i})=>{let a=Y(t,`Verdict reason`),o=Y(r,`Verdict verdict`);return(0,L.jsxs)(`section`,{...i,className:TQ(N2(`root`),P2.tone[n].className,e),"data-rly-verdict-tone":n,children:[(0,L.jsx)(`h2`,{className:N2(`verdict`),children:o}),(0,L.jsxs)(`div`,{className:N2(`reasonPanel`),children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:N2(`icon`),children:(0,L.jsx)(w_,{decorative:!0,name:F2[n],size:`large`})}),(0,L.jsx)(`p`,{className:N2(`reason`),children:a})]})]})},L2={root:`rly_EntityShell-module__root`,navigation:`rly_EntityShell-module__navigation`,header:`rly_EntityShell-module__header`,identity:`rly_EntityShell-module__identity`,title:`rly_EntityShell-module__title`,hero:`rly_EntityShell-module__hero`,body:`rly_EntityShell-module__body`,headerAside:`rly_EntityShell-module__headerAside`,freshness:`rly_EntityShell-module__freshness`,headerSlot:`rly_EntityShell-module__headerSlot`,slotLabel:`rly_EntityShell-module__slotLabel`,content:`rly_EntityShell-module__content`,relationships:`rly_EntityShell-module__relationships`,activity:`rly_EntityShell-module__activity`,asideSlot:`rly_EntityShell-module__asideSlot`,aside:`rly_EntityShell-module__aside`},R2=e=>wQ(L2,e),z2=({actions:e,activity:t,agentEntry:n,className:r,collaborators:i,content:a,evidence:o,facts:s,freshness:c,freshnessDateTime:l,freshnessTime:u,navigation:d,reason:f,relationships:p,service:m,title:h,tone:g,verdict:_,...v})=>{let y=Y(h,`EntityShell title`);if(l===void 0!=(u===void 0))throw Error(`EntityShell freshnessDateTime and freshnessTime must be supplied together`);let b=`rly-entity-shell-${(0,N.useId)()}`;return(0,L.jsxs)(`article`,{...v,"aria-labelledby":b,className:TQ(R2(`root`),r),"data-rly-entity-shell":``,children:[d===void 0?null:(0,L.jsx)(`nav`,{"aria-label":`${y} navigation`,className:R2(`navigation`),"data-rly-entity-shell-slot":`navigation`,children:d}),(0,L.jsxs)(`header`,{className:R2(`header`),children:[(0,L.jsxs)(`div`,{className:R2(`identity`),children:[(0,L.jsx)(j2,{service:m}),(0,L.jsx)(`h1`,{className:R2(`title`),id:b,children:y})]}),(0,L.jsxs)(`div`,{className:R2(`hero`),children:[(0,L.jsx)(I2,{reason:f,tone:g,verdict:_}),(0,L.jsxs)(`div`,{className:R2(`headerAside`),children:[(0,L.jsxs)(`div`,{className:R2(`freshness`),"data-rly-entity-shell-slot":`freshness`,children:[(0,L.jsx)(`span`,{className:R2(`slotLabel`),children:`Freshness`}),l===void 0||u===void 0?(0,L.jsx)(w2,{state:c}):(0,L.jsx)(w2,{dateTime:l,state:c,time:u})]}),(0,L.jsx)(`div`,{className:R2(`headerSlot`),"data-rly-entity-shell-slot":`actions`,children:e}),(0,L.jsx)(`div`,{className:R2(`headerSlot`),"data-rly-entity-shell-slot":`agent-entry`,children:n})]})]})]}),(0,L.jsxs)(`div`,{className:R2(`body`),children:[(0,L.jsx)(`section`,{className:R2(`content`),"data-rly-entity-shell-slot":`content`,children:a}),(0,L.jsxs)(`aside`,{className:R2(`aside`),children:[s===void 0?null:(0,L.jsx)(`section`,{className:R2(`asideSlot`),"data-rly-entity-shell-slot":`facts`,children:s}),o===void 0?null:(0,L.jsx)(`section`,{className:R2(`asideSlot`),"data-rly-entity-shell-slot":`evidence`,children:o}),(0,L.jsx)(`section`,{className:R2(`asideSlot`),"data-rly-entity-shell-slot":`collaborators`,children:i})]})]}),(0,L.jsx)(`section`,{className:R2(`relationships`),"data-rly-entity-shell-slot":`relationships`,children:p}),t===void 0?null:(0,L.jsx)(`section`,{className:R2(`activity`),"data-rly-entity-shell-slot":`activity`,children:t})]})},B2={root:`rly_EntityTable-module__root`,heading:`rly_EntityTable-module__heading`,loading:`rly_EntityTable-module__loading`,stateLabel:`rly_EntityTable-module__stateLabel`,table:`rly_EntityTable-module__table`,head:`rly_EntityTable-module__head`,sortControls:`rly_EntityTable-module__sortControls`,sortLabel:`rly_EntityTable-module__sortLabel`,sortButton:`rly_EntityTable-module__sortButton`,cell:`rly_EntityTable-module__cell`,row:`rly_EntityTable-module__row`,body:`rly_EntityTable-module__body`},V2=e=>wQ(B2,e),H2=e=>{let t=new Set;for(let n of e){let e=Y(n.id,`EntityTable column id`);if(t.has(e))throw Error(`EntityTable column ids must be unique: ${e}`);t.add(e),Y(n.label,`EntityTable column label for ${e}`)}return t},U2=(e,t)=>{let n=new Set;for(let r of e){let e=Y(r.id,`EntityTable row id`);if(n.has(e))throw Error(`EntityTable row ids must be unique: ${e}`);n.add(e);let i=new Set;for(let n of r.cells){let r=Y(n.columnId,`EntityTable cell column id for ${e}`);if(!t.has(r))throw Error(`EntityTable row ${e} has an unknown column: ${r}`);if(i.has(r))throw Error(`EntityTable row ${e} repeats column: ${r}`);i.add(r)}for(let n of t)if(!i.has(n))throw Error(`EntityTable row ${e} is missing column: ${n}`)}},W2=e=>e.state===`ready`||e.state===`stale`||e.state===`partial`||e.state===`error`||e.state===`unavailable`?e.rows:[],G2=({direction:e})=>(0,L.jsx)(w_,{decorative:!0,name:e===`ascending`?`arrow-up`:e===`descending`?`arrow-down`:`minus`,size:`small`}),K2=({className:e,columns:t,data:n,heading:r,onSortChange:i,...a})=>{let o=Y(r,`EntityTable heading`),s=H2(t),c=W2(n);if(U2(c,s),n.state===`ready`&&c.length===0)throw Error(`EntityTable ready state must contain at least one row; use the empty state instead`);if(n.state===`loading`){Y(n.label,`EntityTable loading label`);let e=n.skeletonRows??3;if(!Number.isInteger(e)||e<1||e>20)throw Error(`EntityTable skeletonRows must be an integer from 1 to 20`)}if((n.state===`empty`||n.state===`not-found`)&&(Y(n.title,`EntityTable state title`),n.description!==void 0&&Y(n.description,`EntityTable state description`)),(n.state===`stale`||n.state===`partial`||n.state===`error`||n.state===`unavailable`)&&(Y(n.title,`EntityTable cached state title`),Y(n.description,`EntityTable cached state description`),c.length===0))throw Error(`EntityTable ${n.state} state must retain at least one cached row`);let l=`rly-entity-table-${(0,N.useId)()}`,u=new Map(t.map(e=>[e.id,e])),d=n.state===`stale`||n.state===`partial`||n.state===`error`||n.state===`unavailable`?(0,L.jsx)(x$,{description:n.description,title:n.title,tone:n.tone}):null;return(0,L.jsxs)(`section`,{...a,"aria-busy":n.state===`loading`?`true`:void 0,"aria-labelledby":l,className:TQ(V2(`root`),e),"data-rly-entity-table-state":n.state,children:[(0,L.jsx)(`h2`,{className:V2(`heading`),id:l,children:o}),n.state===`loading`?(0,L.jsxs)(`div`,{"aria-label":n.label,className:V2(`loading`),role:`status`,children:[(0,L.jsx)(`span`,{className:V2(`stateLabel`),children:n.label}),Array.from({length:n.skeletonRows??3},(e,t)=>(0,L.jsx)(g$,{height:`48px`,variant:`block`},t))]}):n.state===`empty`||n.state===`not-found`?(0,L.jsx)(x$,{description:n.description,title:n.title}):(0,L.jsxs)(L.Fragment,{children:[d,(0,L.jsxs)(`div`,{"aria-label":`${o} sorting`,className:V2(`sortControls`),role:`group`,children:[(0,L.jsx)(`span`,{className:V2(`sortLabel`),children:`Sort`}),t.map(e=>e.sortable?(0,L.jsxs)(`button`,{"aria-label":`Sort by ${e.label}, currently ${e.sortDirection}`,className:V2(`sortButton`),onClick:()=>i(e.id),type:`button`,children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(G2,{direction:e.sortDirection})]},e.id):null)]}),(0,L.jsxs)(`table`,{"aria-labelledby":l,className:V2(`table`),children:[(0,L.jsx)(`thead`,{className:V2(`head`),children:(0,L.jsx)(`tr`,{children:t.map(e=>(0,L.jsx)(`th`,{"aria-sort":e.sortable?e.sortDirection:void 0,scope:`col`,children:e.label},e.id))})}),(0,L.jsx)(`tbody`,{className:V2(`body`),children:c.map(e=>{let n=new Map(e.cells.map(e=>[e.columnId,e.content]));return(0,L.jsx)(`tr`,{className:V2(`row`),"data-rly-entity-row-id":e.id,children:t.map(e=>(0,L.jsx)(`td`,{className:V2(`cell`),"data-label":u.get(e.id)?.label,children:n.get(e.id)},e.id))},e.id)})})]})]})]})},q2={root:`rly_EvidenceStamp-module__root`,source:`rly_EvidenceStamp-module__source`,freshness:`rly_EvidenceStamp-module__freshness`,conceptLabel:`rly_EvidenceStamp-module__conceptLabel`,sourceDetail:`rly_EvidenceStamp-module__sourceDetail`,reference:`rly_EvidenceStamp-module__reference`},J2=e=>wQ(q2,e),Y2=({className:e,freshness:t,freshnessDateTime:n,freshnessTime:r,reference:i,service:a,...o})=>{let s=Y(i,`EvidenceStamp reference`),c=n===void 0||r===void 0?(0,L.jsx)(w2,{size:`compact`,state:t}):(0,L.jsx)(w2,{dateTime:n,size:`compact`,state:t,time:r});return(0,L.jsxs)(`div`,{...o,className:TQ(J2(`root`),e),"data-rly-evidence-stamp":``,children:[(0,L.jsxs)(`div`,{className:J2(`source`),"data-rly-evidence-source":a,children:[(0,L.jsx)(`span`,{className:J2(`conceptLabel`),children:`Evidence source`}),(0,L.jsxs)(`div`,{className:J2(`sourceDetail`),children:[(0,L.jsx)(j2,{service:a,size:`compact`}),(0,L.jsx)(`code`,{className:J2(`reference`),children:s})]})]}),(0,L.jsxs)(`div`,{className:J2(`freshness`),"data-rly-evidence-freshness":t,children:[(0,L.jsx)(`span`,{className:J2(`conceptLabel`),children:`Freshness`}),c]})]})},X2={root:`rly_GovernedActionReview-module__root`,header:`rly_GovernedActionReview-module__header`,eyebrow:`rly_GovernedActionReview-module__eyebrow`,heading:`rly_GovernedActionReview-module__heading`,boundary:`rly_GovernedActionReview-module__boundary`,confirmationHelp:`rly_GovernedActionReview-module__confirmationHelp`,reviewer:`rly_GovernedActionReview-module__reviewer`,facts:`rly_GovernedActionReview-module__facts`,evidence:`rly_GovernedActionReview-module__evidence`,outcome:`rly_GovernedActionReview-module__outcome`,proposalReference:`rly_GovernedActionReview-module__proposalReference`,decision:`rly_GovernedActionReview-module__decision`,confirmation:`rly_GovernedActionReview-module__confirmation`,actions:`rly_GovernedActionReview-module__actions`},Z2=e=>wQ(X2,e),Q2={pending:{label:`Awaiting human decision`,tone:`caution`},rejected:{label:`Rejected by human reviewer`,tone:`critical`},authorized:{label:`Authorized by human reviewer`,tone:`positive`},executing:{label:`Authorized action executing`,tone:`progress`},succeeded:{label:`Authorized action succeeded`,tone:`positive`},failed:{label:`Authorized action failed`,tone:`critical`},cancelled:{label:`Authorized action cancelled`,tone:`neutral`}},$2=({authorizeLabel:e=`Authorize exact action`,className:t,confirmationLabel:n,isConfirmed:r,onAuthorize:i,onConfirmationChange:a,onReject:o,outcome:s,proposal:c,rejectLabel:l=`Reject proposal`,reviewer:u,state:d,...f})=>{let p=W0(c),m=Y(e,`GovernedActionReview authorizeLabel`),h=Y(n,`GovernedActionReview confirmationLabel`),g=Y(l,`GovernedActionReview rejectLabel`);Y(u.id,`GovernedActionReview reviewer id`),Y(u.name,`GovernedActionReview reviewer name`),Y(u.role,`GovernedActionReview reviewer role`);let _=`rly-governed-action-${(0,N.useId)()}`,v=`rly-governed-action-reference-${(0,N.useId)()}`,y=`rly-governed-confirmation-${(0,N.useId)()}`,b=Q2[d],x=()=>{d===`pending`&&r&&i()};return(0,L.jsxs)(`section`,{...f,"aria-labelledby":`${_} ${v}`,className:TQ(Z2(`root`),t),"data-rly-governed-action-state":d,children:[(0,L.jsxs)(`header`,{className:Z2(`header`),children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:Z2(`eyebrow`),children:`Human authorization`}),(0,L.jsx)(`h2`,{className:Z2(`heading`),id:_,children:`Review exact proposed action`}),(0,L.jsx)(`code`,{className:Z2(`proposalReference`),id:v,children:p.id})]}),(0,L.jsx)(c$,{label:b.label,tone:b.tone})]}),(0,L.jsx)(`p`,{className:Z2(`boundary`),children:`The agent proposed this action. Only the named human reviewer can authorize it.`}),(0,L.jsxs)(`div`,{className:Z2(`reviewer`),children:[(0,L.jsx)(`span`,{children:`Human reviewer`}),(0,L.jsx)(a2,{person:u})]}),(0,L.jsxs)(`dl`,{className:Z2(`facts`),children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Proposal`}),(0,L.jsx)(`dd`,{children:p.capability})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Target`}),(0,L.jsx)(`dd`,{children:p.target})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Expected revision`}),(0,L.jsx)(`dd`,{children:p.expectedRevision})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`dt`,{children:`Impact`}),(0,L.jsx)(`dd`,{children:p.impact})]})]}),(0,L.jsxs)(`div`,{className:Z2(`evidence`),"data-rly-governed-action-evidence":``,children:[(0,L.jsx)(`h3`,{children:`Evidence reviewed before decision`}),(0,L.jsx)(`ul`,{children:p.evidence.map(e=>(0,L.jsxs)(`li`,{children:[(0,L.jsx)(`span`,{children:e.label}),(0,L.jsx)(`code`,{children:e.reference})]},e.id))})]}),d===`pending`?(0,L.jsxs)(`form`,{className:Z2(`decision`),onSubmit:e=>e.preventDefault(),children:[(0,L.jsxs)(`label`,{className:Z2(`confirmation`),htmlFor:y,children:[(0,L.jsx)(`input`,{checked:r,id:y,onChange:e=>a(e.currentTarget.checked),type:`checkbox`}),(0,L.jsx)(`span`,{children:h})]}),(0,L.jsx)(`p`,{className:Z2(`confirmationHelp`),children:`Confirm the exact proposal, target, revision, impact, and evidence above.`}),(0,L.jsxs)(`div`,{className:Z2(`actions`),children:[(0,L.jsx)(r$,{onClick:o,variant:`secondary`,children:g}),(0,L.jsx)(r$,{disabled:!r,onClick:x,variant:`primary`,children:m})]})]}):null,(0,L.jsxs)(`div`,{className:Z2(`outcome`),"data-rly-governed-action-outcome":``,children:[(0,L.jsx)(`h3`,{children:`Recorded outcome`}),s]})]})},e4={missing:{icon:`alert`,label:`Missing`},inferred:{icon:`search`,label:`Inferred`},proposed:{icon:`plus`,label:`Proposed`},verified:{icon:`check`,label:`Verified`},governed:{icon:`link`,label:`Governed`},rejected:{icon:`close`,label:`Rejected`},superseded:{icon:`arrow-right`,label:`Superseded`}},t4={forward:{arrow:`→`,label:`Forward`},reverse:{arrow:`←`,label:`Reverse`},bidirectional:{arrow:`↔`,label:`Bidirectional`}},n4=(e,t)=>{Y(e.id,`${t} person id`),Y(e.name,`${t} person name`),Y(e.role,`${t} person role`),e.avatarFallback!==void 0&&Y(e.avatarFallback,`${t} person avatarFallback`),e.avatarSrc!==void 0&&Y(e.avatarSrc,`${t} person avatarSrc`)},r4=(e,t)=>{if(!Object.hasOwn(D2.service,e))throw Error(`${t} service must be a supported rly service`)},i4=(e,t)=>{if(e.state===`present`){Y(e.id,`${t} id`),Y(e.title,`${t} title`),Y(e.reference,`${t} reference`),r4(e.service,t),e.href!==void 0&&Y(e.href,`${t} href`),e.person!==void 0&&n4(e.person,t);return}if(e.state===`missing`){Y(e.label,`${t} missing label`),Y(e.reason,`${t} missing reason`),e.service!==void 0&&r4(e.service,t);return}throw Error(`${t} state must be present or missing`)},a4=e=>{let t=new Set;for(let n of e){let e=Y(n.id,`Relationship id`);if(t.has(e))throw Error(`Relationship ids must be unique: ${e}`);if(t.add(e),Y(n.kind,`Relationship kind for ${e}`),!Object.hasOwn(t4,n.direction))throw Error(`Relationship direction for ${e} must be supported`);if(!Object.hasOwn(e4,n.lifecycle))throw Error(`Relationship lifecycle for ${e} must be supported`);i4(n.source,`Relationship ${e} source`),i4(n.target,`Relationship ${e} target`),n.evidence!==void 0&&Y(n.evidence,`Relationship evidence for ${e}`),n.actor!==void 0&&n4(n.actor,`Relationship ${e} actor`)}},o4={root:`rly_RelationshipChain-module__root`,heading:`rly_RelationshipChain-module__heading`,empty:`rly_RelationshipChain-module__empty`,list:`rly_RelationshipChain-module__list`,item:`rly_RelationshipChain-module__item`,endpoint:`rly_RelationshipChain-module__endpoint`,endpointLink:`rly_RelationshipChain-module__endpointLink`,identity:`rly_RelationshipChain-module__identity`,missingIdentity:`rly_RelationshipChain-module__missingIdentity`,title:`rly_RelationshipChain-module__title`,missingLabel:`rly_RelationshipChain-module__missingLabel`,kind:`rly_RelationshipChain-module__kind`,reference:`rly_RelationshipChain-module__reference`,direction:`rly_RelationshipChain-module__direction`,evidence:`rly_RelationshipChain-module__evidence`,fieldLabel:`rly_RelationshipChain-module__fieldLabel`,missingEndpoint:`rly_RelationshipChain-module__missingEndpoint`,relationship:`rly_RelationshipChain-module__relationship`,arrow:`rly_RelationshipChain-module__arrow`,actor:`rly_RelationshipChain-module__actor`},s4=e=>wQ(o4,e),c4=({endpoint:e})=>{if(e.state===`missing`)return(0,L.jsxs)(`div`,{className:TQ(s4(`endpoint`),s4(`missingEndpoint`)),"data-rly-endpoint-state":`missing`,children:[e.service===void 0?null:(0,L.jsx)(j2,{service:e.service,size:`compact`}),(0,L.jsxs)(`span`,{className:s4(`missingIdentity`),children:[(0,L.jsxs)(`span`,{className:s4(`missingLabel`),children:[(0,L.jsx)(w_,{decorative:!0,name:`alert`,size:`small`}),e.label]}),(0,L.jsx)(`span`,{className:s4(`reference`),children:e.reason})]})]});let t=(0,L.jsxs)(`span`,{className:s4(`identity`),children:[(0,L.jsx)(`span`,{className:s4(`title`),children:e.title}),(0,L.jsx)(`span`,{className:s4(`reference`),children:e.reference})]});return(0,L.jsxs)(`div`,{className:s4(`endpoint`),"data-rly-endpoint-id":e.id,"data-rly-endpoint-state":`present`,children:[(0,L.jsx)(j2,{service:e.service,size:`compact`}),e.href===void 0?t:(0,L.jsx)(A_,{className:s4(`endpointLink`),href:e.href,children:t}),e.person===void 0?null:(0,L.jsx)(a2,{person:e.person,size:`compact`})]})},l4=({className:e,emptyLabel:t=`No relationships recorded.`,heading:n,relationships:r,...i})=>{let a=Y(n,`RelationshipChain heading`),o=Y(t,`RelationshipChain emptyLabel`);a4(r);let s=`${(0,N.useId)()}-heading`;return(0,L.jsxs)(`section`,{...i,"aria-labelledby":s,className:TQ(s4(`root`),e),children:[(0,L.jsx)(`h2`,{className:s4(`heading`),id:s,children:a}),r.length===0?(0,L.jsx)(`p`,{className:s4(`empty`),children:o}):(0,L.jsx)(`ol`,{className:s4(`list`),children:r.map(e=>{let t=t4[e.direction],n=e4[e.lifecycle];return(0,L.jsxs)(`li`,{className:s4(`item`),"data-rly-relationship-id":e.id,"data-rly-relationship-direction":e.direction,"data-rly-relationship-kind":e.kind,"data-rly-relationship-lifecycle":e.lifecycle,children:[(0,L.jsx)(c4,{endpoint:e.source}),(0,L.jsxs)(`div`,{className:s4(`relationship`),"data-rly-relationship-detail":``,children:[(0,L.jsxs)(`span`,{className:s4(`direction`),children:[(0,L.jsx)(`span`,{children:t.label}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:s4(`arrow`),children:t.arrow})]}),(0,L.jsx)(`span`,{className:s4(`kind`),children:e.kind}),(0,L.jsx)(c$,{icon:n.icon,label:n.label,size:`compact`,tone:`neutral`}),e.actor===void 0?null:(0,L.jsxs)(`div`,{className:s4(`actor`),"data-rly-relationship-actor":e.actor.id,children:[(0,L.jsx)(`span`,{className:s4(`fieldLabel`),children:`Actor`}),(0,L.jsx)(a2,{person:e.actor,size:`compact`})]})]}),(0,L.jsx)(c4,{endpoint:e.target}),(0,L.jsxs)(`p`,{className:s4(`evidence`),children:[(0,L.jsx)(`span`,{className:s4(`fieldLabel`),children:`Evidence`}),(0,L.jsx)(`span`,{"data-rly-relationship-evidence":``,children:e.evidence??`No evidence recorded.`})]})]},e.id)})})]})},u4={root:`rly_RelationshipTable-module__root`,heading:`rly_RelationshipTable-module__heading`,empty:`rly_RelationshipTable-module__empty`,table:`rly_RelationshipTable-module__table`,head:`rly_RelationshipTable-module__head`,cell:`rly_RelationshipTable-module__cell`,endpoint:`rly_RelationshipTable-module__endpoint`,identity:`rly_RelationshipTable-module__identity`,relationship:`rly_RelationshipTable-module__relationship`,actor:`rly_RelationshipTable-module__actor`,endpointLink:`rly_RelationshipTable-module__endpointLink`,title:`rly_RelationshipTable-module__title`,missingLabel:`rly_RelationshipTable-module__missingLabel`,kind:`rly_RelationshipTable-module__kind`,reference:`rly_RelationshipTable-module__reference`,direction:`rly_RelationshipTable-module__direction`,evidence:`rly_RelationshipTable-module__evidence`,fieldLabel:`rly_RelationshipTable-module__fieldLabel`,missingEndpoint:`rly_RelationshipTable-module__missingEndpoint`,arrow:`rly_RelationshipTable-module__arrow`,body:`rly_RelationshipTable-module__body`,row:`rly_RelationshipTable-module__row`},d4=e=>wQ(u4,e),f4=({endpoint:e})=>{if(e.state===`missing`)return(0,L.jsxs)(`div`,{className:TQ(d4(`endpoint`),d4(`missingEndpoint`)),"data-rly-endpoint-state":`missing`,children:[e.service===void 0?null:(0,L.jsx)(j2,{service:e.service,size:`compact`}),(0,L.jsxs)(`span`,{className:d4(`identity`),children:[(0,L.jsxs)(`span`,{className:d4(`missingLabel`),children:[(0,L.jsx)(w_,{decorative:!0,name:`alert`,size:`small`}),e.label]}),(0,L.jsx)(`span`,{className:d4(`reference`),children:e.reason})]})]});let t=(0,L.jsxs)(`span`,{className:d4(`identity`),children:[(0,L.jsx)(`span`,{className:d4(`title`),children:e.title}),(0,L.jsx)(`span`,{className:d4(`reference`),children:e.reference})]});return(0,L.jsxs)(`div`,{className:d4(`endpoint`),"data-rly-endpoint-id":e.id,"data-rly-endpoint-state":`present`,children:[(0,L.jsx)(j2,{service:e.service,size:`compact`}),e.href===void 0?t:(0,L.jsx)(A_,{className:d4(`endpointLink`),href:e.href,children:t}),e.person===void 0?null:(0,L.jsx)(a2,{person:e.person,size:`compact`})]})},p4=({className:e,emptyLabel:t=`No relationships recorded.`,heading:n,relationships:r,...i})=>{let a=Y(n,`RelationshipTable heading`),o=Y(t,`RelationshipTable emptyLabel`);a4(r);let s=`${(0,N.useId)()}-heading`;return(0,L.jsxs)(`section`,{...i,"aria-labelledby":s,className:TQ(d4(`root`),e),children:[(0,L.jsx)(`h2`,{className:d4(`heading`),id:s,children:a}),r.length===0?(0,L.jsx)(`p`,{className:d4(`empty`),children:o}):(0,L.jsxs)(`table`,{"aria-labelledby":s,className:d4(`table`),children:[(0,L.jsx)(`thead`,{className:d4(`head`),children:(0,L.jsxs)(`tr`,{children:[(0,L.jsx)(`th`,{scope:`col`,children:`Source`}),(0,L.jsx)(`th`,{scope:`col`,children:`Relationship`}),(0,L.jsx)(`th`,{scope:`col`,children:`Target`}),(0,L.jsx)(`th`,{scope:`col`,children:`Evidence`})]})}),(0,L.jsx)(`tbody`,{className:d4(`body`),children:r.map(e=>{let t=t4[e.direction],n=e4[e.lifecycle];return(0,L.jsxs)(`tr`,{className:d4(`row`),"data-rly-relationship-id":e.id,"data-rly-relationship-direction":e.direction,"data-rly-relationship-kind":e.kind,"data-rly-relationship-lifecycle":e.lifecycle,children:[(0,L.jsx)(`td`,{className:d4(`cell`),"data-label":`Source`,children:(0,L.jsx)(f4,{endpoint:e.source})}),(0,L.jsx)(`td`,{className:d4(`cell`),"data-label":`Relationship`,children:(0,L.jsxs)(`div`,{className:d4(`relationship`),"data-rly-relationship-detail":``,children:[(0,L.jsxs)(`span`,{className:d4(`direction`),children:[(0,L.jsx)(`span`,{children:t.label}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:d4(`arrow`),children:t.arrow})]}),(0,L.jsx)(`span`,{className:d4(`kind`),children:e.kind}),(0,L.jsx)(c$,{icon:n.icon,label:n.label,size:`compact`,tone:`neutral`}),e.actor===void 0?null:(0,L.jsxs)(`div`,{className:d4(`actor`),"data-rly-relationship-actor":e.actor.id,children:[(0,L.jsx)(`span`,{className:d4(`fieldLabel`),children:`Actor`}),(0,L.jsx)(a2,{person:e.actor,size:`compact`})]})]})}),(0,L.jsx)(`td`,{className:d4(`cell`),"data-label":`Target`,children:(0,L.jsx)(f4,{endpoint:e.target})}),(0,L.jsx)(`td`,{className:d4(`cell`),"data-label":`Evidence`,children:(0,L.jsx)(`span`,{className:d4(`evidence`),"data-rly-relationship-evidence":``,children:e.evidence??`No evidence recorded.`})})]},e.id)})})]})]})},m4={root:`rly_RelayDock-module__root`,trigger:`rly_RelayDock-module__trigger`,close:`rly_RelayDock-module__close`,mark:`rly_RelayDock-module__mark`,markLine:`rly_RelayDock-module__markLine`,markGlyph:`rly_RelayDock-module__markGlyph`,layer:`rly_RelayDock-module__layer`,overlay:`rly_RelayDock-module__overlay`,panel:`rly_RelayDock-module__panel`,sheet:`rly_RelayDock-module__sheet`,rail:`rly_RelayDock-module__rail`,railHeader:`rly_RelayDock-module__railHeader`,railHeading:`rly_RelayDock-module__railHeading`,title:`rly_RelayDock-module__title`,description:`rly_RelayDock-module__description`,fixedContext:`rly_RelayDock-module__fixedContext`,contents:`rly_RelayDock-module__contents`,context:`rly_RelayDock-module__context`,selection:`rly_RelayDock-module__selection`,sectionLabel:`rly_RelayDock-module__sectionLabel`,chipList:`rly_RelayDock-module__chipList`,chip:`rly_RelayDock-module__chip`,chipLabel:`rly_RelayDock-module__chipLabel`,chipValue:`rly_RelayDock-module__chipValue`,selectionGrid:`rly_RelayDock-module__selectionGrid`,body:`rly_RelayDock-module__body`,ready:`rly_RelayDock-module__ready`,state:`rly_RelayDock-module__state`,footer:`rly_RelayDock-module__footer`},h4=e=>wQ(m4,e),g4=`(max-width: 40rem), (max-height: 40rem) and (pointer: coarse)`,_4=[`a[href]`,`button:not([disabled])`,`iframe:not([tabindex="-1"])`,`input:not([disabled])`,`select:not([disabled])`,`details > summary:first-of-type`,`textarea:not([disabled])`,`[contenteditable]:not([contenteditable="false"])`,`[tabindex]:not([tabindex="-1"])`].join(`,`),v4=`button, fieldset, input, object, optgroup, option, output, select, textarea`,y4=e=>`activeElement`in e,b4=e=>`host`in e&&xQ(e.host),x4=e=>{let t=e.activeElement;return t===null?null:t.shadowRoot===null?t:x4(t.shadowRoot)??t},S4=e=>{let t=e.getRootNode();return y4(t)?x4(t):e.ownerDocument.activeElement},C4=e=>{let t=e.getRootNode();return b4(t)&&MQ(t.host)?t.host:null},w4=e=>`assignedSlot`in e,T4=e=>e.nodeType===1,E4=(e,t)=>{if(t!==void 0&&t.has(e)){let n=t.get(e);return n!=null&&T4(n)?n:null}return(w4(e)?e.assignedSlot:null)??e.parentElement??C4(e)},D4=(e,t,n)=>{if(t===null)return!1;if(e.contains(t))return!0;let r=new Set,i=t;for(;!r.has(i);){r.add(i);let t=E4(i,n);if(t===null)return!1;if(t===e||e.contains(t))return!0;i=t}return!1},O4=(e,t)=>D4(e,t),k4=e=>{let t=e.activeElement;return MQ(t)?t.shadowRoot===null?t:k4(t.shadowRoot)??t:null},A4=e=>{let t=k4(e);return t===e.body||t===e.documentElement?null:t},j4=(e,t)=>{if(e.matches(`:disabled`))return!1;let n=e.ownerDocument.defaultView;if(n===null)return!MQ(e)||e.hidden===!1;let r=n.getComputedStyle(e).visibility;if(r===`hidden`||r===`collapse`)return!1;let i=e;for(;i!==null;){if(MQ(i)&&i.inert)return!1;if(i.tagName===`DETAILS`&&!i.hasAttribute(`open`)){let n=i.querySelector(`:scope > summary:first-of-type`);if(n===null||!D4(n,e,t))return!1}if(i!==e&&i.tagName===`FIELDSET`&&i.hasAttribute(`disabled`)&&e.matches(v4)){let n=i.querySelector(`:scope > legend:first-of-type`);if(n===null||!D4(n,e,t))return!1}let r=n.getComputedStyle(i);if(MQ(i)&&i.hidden!==!1||r.display===`none`||i===e&&r.display===`contents`||i!==e&&r.contentVisibility===`hidden`)return!1;i=E4(i,t)}return!0},M4=(e,t)=>{let n=e.getRootNode(),r=new Set,i=E4(e,t);for(;i!==null&&!r.has(i);){if(r.add(i),i.getRootNode()!==n)return!1;if(MQ(i)&&i.isContentEditable)return!0;i=E4(i,t)}return!1},N4=e=>MQ(e)&&e.tagName===`INPUT`&&e.getAttribute(`type`)?.toLowerCase()===`radio`,P4=e=>`tabIndex`in e&&bQ(e.tabIndex),F4=`http://www.w3.org/2000/svg`,I4=e=>{if(e.namespaceURI===F4&&e.localName===`a`&&e.hasAttribute(`href`)){let t=e.getAttribute(`tabindex`);if(t===null)return 0;let n=Number.parseInt(t,10);return Number.isNaN(n)?0:n}return P4(e)?e.tabIndex:null},L4=e=>e.tagName===`SLOT`&&`assignedElements`in e,R4=e=>L4(e)&&b4(e.getRootNode()),z4=(e,t)=>{let n=I4(e)??-1,r=I4(t)??-1,i=n>0,a=r>0;return i===a?i&&a&&n!==r?n-r:0:i?-1:1},B4=e=>{let t=I4(e);return t!==null&&e.hasAttribute(`tabindex`)&&t<0},V4=e=>B4(e)&&(L4(e)||MQ(e)&&e.shadowRoot?.delegatesFocus===!0),H4=(e,t,n,r)=>{if(e.name.length===0)return!0;let i=n.filter(({element:n,nativeRoot:i})=>i===t&&N4(n)&&n.name===e.name&&n.form===e.form&&j4(n,r)).map(({element:e})=>e).filter(N4).find(e=>e.checked);return i===void 0?e.tabIndex>=0:i===e},U4=e=>{let t=(e,r,i)=>{let a=[],o=new Map,s=(e,i)=>{if(a.push({composedParent:i,element:e,focusScope:r,nativeRoot:e.getRootNode()}),R4(e)){let n=e.assignedNodes({flatten:!1}),r=e.assignedElements({flatten:!1}),i=[...e.children];o.set(e,t(n.length>0?r:i,e,e));return}if(L4(e)){o.set(e,t([...e.children],e,e));return}if(e.shadowRoot!==null&&(!B4(e)||e.shadowRoot.delegatesFocus===!0))o.set(e,n(e.shadowRoot,e.shadowRoot,e));else if(e.shadowRoot===null)for(let t of e.children)s(t,e)};for(let t of e)s(t,i);return{entries:a,nested:o}},n=(e,n,r)=>t([...e.children],n,r),r=e=>{let t=[...e.entries].sort((e,t)=>z4(e.element,t.element)),n=[];for(let i of t){n.push(i);let t=e.nested.get(i.element);if(t!==void 0)for(let e of r(t))n.push(e)}return n};return r(n(e,e,e))},W4=(e,t,n)=>t.filter(r=>{let{element:i,nativeRoot:a}=r;if(i.tagName===`SLOT`)return!1;let o=I4(i);if(o===null)return!1;let s=i,c=new Set;for(;!c.has(s);){c.add(s);let t=E4(s,n);if(t===null||t===e)break;if(V4(t))return!1;s=t}return!i.matches(_4)||i.shadowRoot?.delegatesFocus===!0||!j4(i,n)||N4(i)&&!H4(i,a,t,n)?!1:o>=0||MQ(i)&&i.isContentEditable&&!i.hasAttribute(`tabindex`)&&!M4(i,n)||i.matches(`details > summary:first-of-type`)&&!B4(i)}).map(({element:e})=>e),G4=e=>xQ(e)&&`tagName`in e&&e.tagName===`IFRAME`&&`contentDocument`in e,K4=e=>xQ(e)&&`nodeType`in e&&e.nodeType===1,q4=e=>[...e.querySelectorAll(_4)].filter(e=>{let t=I4(e);return t!==null&&t>=0||MQ(e)&&e.isContentEditable&&!e.hasAttribute(`tabindex`)&&!M4(e,new Map)}),J4=e=>{let t=e.ownerDocument,n=new Map,r=(t,n)=>{let r=U4(e),i=W4(e,r,new Map(r.map(({composedParent:e,element:t})=>[t,e]))),a=i.findIndex(e=>e===t),o=n?i[i.length-1]:i[0];((a<0?void 0:i[a+(n?-1:1)])??o)?.focus()},i=e=>{let t=n.get(e),i=e.contentDocument;if(t?.frameDocument!==null&&t?.frameDocument!==void 0&&t.frameDocument.removeEventListener(`keydown`,t.onKeyDown,!0),t===void 0)return;if(i===null){n.set(e,{...t,frameDocument:null});return}let a=t=>{if(t.defaultPrevented||t.key!==`Tab`)return;let n=q4(i),a=K4(t.target)?t.target:i.activeElement,o=n[0],s=n[n.length-1];(t.shiftKey?a===o:a===s)&&(t.preventDefault(),r(e,t.shiftKey))};i.addEventListener(`keydown`,a,!0),n.set(e,{...t,frameDocument:i,onKeyDown:a})},a=e=>{if(n.has(e)){i(e);return}let t=()=>i(e);n.set(e,{frameDocument:null,onKeyDown:()=>void 0,onLoad:t}),e.addEventListener(`load`,t),i(e)},o=()=>{for(let{element:t}of U4(e))t.tagName===`IFRAME`&&G4(t)&&a(t)},s=e=>{G4(e.target)&&a(e.target)};t.addEventListener(`focusin`,s,!0),o();let c=t.defaultView?.MutationObserver,l=c===void 0?null:new c(o);return l?.observe(e,{childList:!0,subtree:!0}),()=>{t.removeEventListener(`focusin`,s,!0),l?.disconnect();for(let[e,t]of n)e.removeEventListener(`load`,t.onLoad),t.frameDocument!==null&&t.frameDocument.removeEventListener(`keydown`,t.onKeyDown,!0)}},Y4=(e,t)=>{if(e===null||!(`matchMedia`in e))return()=>void 0;let n=e.matchMedia(g4);return n.addEventListener(`change`,t),()=>n.removeEventListener(`change`,t)},X4=e=>e!==null&&`matchMedia`in e&&e.matchMedia(g4).matches,Z4=()=>!1,Q4=e=>{let t=(0,N.useCallback)(t=>Y4(e,t),[e]),n=(0,N.useCallback)(()=>X4(e),[e]);return(0,N.useSyncExternalStore)(t,n,Z4)},$4=()=>(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:h4(`mark`),children:[(0,L.jsx)(`span`,{className:h4(`markLine`)}),(0,L.jsx)(`svg`,{className:h4(`markGlyph`),focusable:`false`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{d:`M12 3.5 14 10l6.5 2-6.5 2-2 6.5L10 14l-6.5-2 6.5-2Z`,fill:`currentColor`})})]}),e3=({context:e,labelId:t})=>{if(e.length===0)throw Error(`RelayDock context must contain at least one chip`);let n=new Set;return(0,L.jsxs)(`section`,{"aria-labelledby":t,className:h4(`context`),children:[(0,L.jsx)(`h2`,{className:h4(`sectionLabel`),id:t,children:`Context`}),(0,L.jsx)(`ul`,{className:h4(`chipList`),children:e.map(e=>{let t=Y(e.id,`RelayDock context chip id`);if(n.has(t))throw Error(`Duplicate RelayDock context chip id: ${t}`);return n.add(t),(0,L.jsxs)(`li`,{className:h4(`chip`),"data-rly-relay-dock-context":t,children:[(0,L.jsx)(`span`,{className:h4(`chipLabel`),children:Y(e.label,`RelayDock context chip label`)}),(0,L.jsx)(`span`,{className:h4(`chipValue`),children:Y(e.value,`RelayDock context chip value`)})]},t)})})]})},t3=({labelId:e,selection:t})=>{let n=(0,N.useId)(),r=(0,N.useId)();return(0,L.jsxs)(`section`,{"aria-labelledby":e,className:h4(`selection`),children:[(0,L.jsx)(`h2`,{className:h4(`sectionLabel`),id:e,children:`Run with`}),(0,L.jsxs)(`div`,{className:h4(`selectionGrid`),children:[(0,L.jsx)(j$,{controlId:`rly-relay-dock-profile-${n}`,label:`Profile`,size:`compact`,children:e=>(0,L.jsx)(L$,{...e,...t.profile.disabled===void 0?{}:{disabled:t.profile.disabled},onValueChange:t.profile.onValueChange,options:t.profile.options,size:`compact`,value:t.profile.value})}),(0,L.jsx)(j$,{controlId:`rly-relay-dock-model-${r}`,label:`Model`,size:`compact`,children:e=>(0,L.jsx)(L$,{...e,...t.model.disabled===void 0?{}:{disabled:t.model.disabled},onValueChange:t.model.onValueChange,options:t.model.options,size:`compact`,value:t.model.value})})]})]})},n3=({state:e})=>{if(e.status===`ready`)return(0,L.jsx)(`section`,{"aria-live":`polite`,className:h4(`ready`),"data-rly-relay-dock-state":`ready`,children:e.content});let t=e.status===`error`?`assertive`:`polite`,n=e.status===`loading`?`progress`:e.status===`error`?`critical`:`neutral`;return(0,L.jsx)(x$,{action:`action`in e?e.action:void 0,announce:t,className:h4(`state`),"data-rly-relay-dock-state":e.status,description:e.description,title:Y(e.title,`RelayDock ${e.status} title`),tone:n})},r3=({context:e,footer:t,selection:n,state:r})=>{let i=(0,N.useId)(),a=(0,N.useId)();return(0,L.jsxs)(`div`,{className:h4(`contents`),"data-rly-relay-dock-scroll":``,children:[(0,L.jsxs)(`div`,{className:h4(`fixedContext`),children:[(0,L.jsx)(e3,{context:e,labelId:i}),(0,L.jsx)(t3,{labelId:a,selection:n})]}),(0,L.jsx)(`section`,{"aria-label":`Relay thread`,className:h4(`body`),tabIndex:0,children:(0,L.jsx)(n3,{state:r})}),t==null?null:(0,L.jsx)(`footer`,{className:h4(`footer`),children:t})]})},i3=({restoreDocument:e,restoreTarget:t,target:n})=>{let r=(0,N.useRef)(!1);return(0,N.useLayoutEffect)(()=>{let i=n.current;i!==null&&(r.current||=(t.current=A4(e??i.ownerDocument),!0),i.focus())},[e,t,n]),null},a3=({children:e,modal:t,modalLayer:n})=>{let r=(0,N.useRef)(null);return IQ(),zQ(r,t),HQ(r,t),(0,L.jsx)(`div`,{className:h4(`layer`),"data-rly-modal-layer":n?``:void 0,"data-rly-relay-dock-modal":t?`true`:`false`,ref:r,children:e})},o3=({closeRef:e,compactViewport:t,context:n,description:r,footer:i,headingId:a,modal:o,onClose:s,parentModalPresent:c,restoreDocument:l,restoreTargetRef:u,selection:d,state:f,title:p})=>{let m=`${a}-description`,h=(0,N.useRef)(null);(0,N.useLayoutEffect)(()=>{let e=h.current;if(!(!o||e===null))return J4(e)},[o]);let g=e=>{let t=e.currentTarget;if(!e.nativeEvent.composedPath().includes(t)||e.defaultPrevented)return;if(e.key===`Escape`){if(e.nativeEvent.isComposing)return;e.stopPropagation(),s();return}if(!o||e.key!==`Tab`)return;let n=U4(t),r=new Map(n.map(({composedParent:e,element:t})=>[t,e])),i=e=>{let t=new Set,n=e;for(;!t.has(n);){t.add(n);let e=E4(n,r);if(e===null)return null;if(MQ(e)&&e.shadowRoot?.delegatesFocus===!0)return e;n=e}return null},a=W4(t,n,r),c=a[0]??t,l=a[a.length-1]??t,u=S4(t),d=new Set(a),f=u!==null&&O4(t,u)&&!a.some(e=>e===u),p=e=>{let t=new Set,i=e;for(;!t.has(i);){t.add(i);let e=n.findIndex(({element:e})=>e===i);if(e>=0)return e;let a=E4(i,r);if(a===null)return-1;i=a}return-1},m=f&&u!==null?i(u):null,h=f&&u!==null?p(u):-1,g=f?(e=>{if(h<0)return null;for(let t=h+e;t>=0&&t<n.length;t+=e){let e=n[t]?.element;if(e!==void 0&&d.has(e)&&P4(e))return e}return null})(e.shiftKey?-1:1):null,_=m!==null&&g!==null&&D4(m,g,r),v=f&&!_&&(g===null||!O4(t,g)),y=e.shiftKey&&(u===c||!O4(t,u)||_||v),b=!e.shiftKey&&(u===l||!O4(t,u)||_||v);!y&&!b||(e.preventDefault(),(_&&g!==null?g:e.shiftKey?l:c).focus())};return(0,L.jsx)(O_,{children:_=>(0,L.jsx)(Ss,{container:_,children:(0,L.jsxs)(a3,{modal:o,modalLayer:o||c,children:[o?(0,L.jsx)(`div`,{"aria-hidden":`true`,className:h4(`overlay`),"data-rly-relay-dock-overlay":``,onPointerDown:s}):null,(0,L.jsxs)(`section`,{"aria-describedby":m,"aria-labelledby":a,"aria-modal":o?!0:void 0,className:TQ(h4(`panel`),h4(o?`sheet`:`rail`)),"data-rly-relay-dock-presentation":t?`mobile-sheet`:o?`overlay`:`rail`,onKeyDown:g,ref:h,role:o?`dialog`:`complementary`,tabIndex:-1,children:[(0,L.jsxs)(`header`,{className:h4(`railHeader`),children:[(0,L.jsxs)(`div`,{className:h4(`railHeading`),children:[(0,L.jsx)(`h1`,{className:h4(`title`),id:a,children:p}),(0,L.jsx)(`p`,{className:h4(`description`),id:m,children:r})]}),(0,L.jsx)(`button`,{"aria-label":`Close ${p}`,className:h4(`close`),onClick:s,ref:e,type:`button`,children:(0,L.jsx)(w_,{decorative:!0,name:`close`})})]}),(0,L.jsx)(i3,{restoreDocument:l,restoreTarget:u,target:e}),(0,L.jsx)(r3,{context:n,footer:i,selection:d,state:f})]})]})})})},s3=e=>{let{className:t,context:n,defaultOpen:r=!1,description:i=`Ask in this context or prepare approval-bound work.`,desktopPresentation:a=`overlay`,footer:o,onOpenChange:s,open:c,ref:l,selection:u,state:d,title:f=`Relay`,triggerLabel:p=`Open Relay`,...m}=e,[h,g]=(0,N.useState)(r),_=FQ(),v=PQ(),y=D_(),b=(c??h)&&v&&y.available,x=Q4(y.available?y.container.ownerDocument.defaultView:null),S=x||a===`overlay`,C=(0,N.useRef)(null),w=(0,N.useRef)(null),T=(0,N.useRef)(null),E=(0,N.useRef)({modal:S,open:!1}),D=(0,N.useId)(),O=Y(i,`RelayDock description`),k=Y(f,`RelayDock title`),A=Y(p,`RelayDock triggerLabel`),j=e=>{c===void 0&&g(e),s?.(e)};return(0,N.useLayoutEffect)(()=>{let e=E.current;E.current={modal:S,open:b},!e.open&&b?(UQ(),w.current?.focus()):e.open&&b&&e.modal!==S?w.current?.focus():e.open&&!b&&(WQ(T.current??C.current),T.current=null)},[S,b]),(0,L.jsxs)(`div`,{...m,className:TQ(h4(`root`),t),"data-rly-relay-dock":``,"data-rly-relay-dock-open":b?`true`:`false`,ref:l,children:[(0,L.jsxs)(`button`,{"aria-expanded":b,"aria-haspopup":S?`dialog`:void 0,className:h4(`trigger`),"data-rly-relay-dock-trigger":``,hidden:b,onClick:e=>{e.currentTarget.focus(),j(!0)},ref:C,type:`button`,children:[(0,L.jsx)($4,{}),(0,L.jsx)(`span`,{children:A})]}),b?(0,L.jsx)(NQ,{children:(0,L.jsx)(o3,{closeRef:w,compactViewport:x,context:n,description:O,footer:o,headingId:D,modal:S,onClose:()=>j(!1),parentModalPresent:_,restoreDocument:C.current?.ownerDocument??null,restoreTargetRef:T,selection:u,state:d,title:k})}):null]})},c3=/^(?:--[A-Za-z0-9_\-\u0080-\uD7FF\uE000-\u{10ffff}]*|-?[A-Za-z_\u0080-\uD7FF\uE000-\u{10ffff}][A-Za-z0-9_\-\u0080-\uD7FF\uE000-\u{10ffff}]*)$/u,l3=new Set([`auto`,`default`,`inherit`,`initial`,`match-element`,`none`,`revert`,`revert-layer`,`unset`]),u3=e=>{if(e===void 0)return;let t={relay:e.relay,verdict:e.verdict,version:e.version},n=[[`relay`,t.relay],[`verdict`,t.verdict],[`version`,t.version]],r=new Set;for(let[e,t]of n){let n=Y(t,`Release transition ${e} name`);if(n===`root`||l3.has(n.toLowerCase()))throw Error(`Release transition ${e} name must not use a reserved CSS value: ${n}`);if(!c3.test(n))throw Error(`Release transition ${e} name must be a valid unescaped CSS custom identifier: ${n}`);if(r.has(n))throw Error(`Release transition names must be unique: ${n}`);r.add(n)}return Object.freeze(t)},d3={blocked:!0,ready:!0,deploying:!0,building:!0,shipped:!0,held:!0,unknown:!0},f3=e=>{if(Y(e.id,`Release presentation id`),Y(e.version,`Release presentation version`),Y(e.codename,`Release presentation codename`),Y(e.algorithm,`Release presentation algorithm`),Y(e.verdict,`Release presentation verdict`),Y(e.reason,`Release presentation reason`),!Object.hasOwn(d3,e.state))throw Error(`Release presentation state must be supported`);e.freshnessDateTime!==void 0&&(Y(e.freshnessDateTime,`Release presentation freshnessDateTime`),Y(e.freshnessTime,`Release presentation freshnessTime`));let t=new Set;for(let n of e.facts){let e=Y(n.id,`Release presentation fact id`);if(t.has(e))throw Error(`Release presentation fact ids must be unique: ${e}`);t.add(e),Y(n.label,`Release presentation fact label for ${e}`),Y(n.value,`Release presentation fact value for ${e}`)}return e},p3={root:`rly_ReleaseRelay-module__root`,tiles:`rly_ReleaseRelay-module__tiles`,handoff:`rly_ReleaseRelay-module__handoff`,tile:`rly_ReleaseRelay-module__tile`,glyph:`rly_ReleaseRelay-module__glyph`,identity:`rly_ReleaseRelay-module__identity`,codename:`rly_ReleaseRelay-module__codename`,algorithm:`rly_ReleaseRelay-module__algorithm`,compact:`rly_ReleaseRelay-module__compact`,hero:`rly_ReleaseRelay-module__hero`},m3=e=>wQ(p3,e),h3=CQ({0:{name:`orbit`},1:{name:`split`},2:{name:`brace`},3:{name:`wave`},4:{name:`gate`},5:{name:`fork`},6:{name:`bridge`},7:{name:`beacon`},8:{name:`loop`},9:{name:`pulse`},10:{name:`anchor`},11:{name:`ladder`},12:{name:`knot`},13:{name:`spark`},14:{name:`stack`},15:{name:`compass`}}),g3=CQ({size:{compact:{className:m3(`compact`),purpose:`Release rows and compact previews`,tokens:[`space-32`,`space-8`,`type-label`]},hero:{className:m3(`hero`),purpose:`Page-level release identity`,tokens:[`space-48`,`space-4`,`space-8`,`type-card-title`]}}}),_3=CQ({size:`compact`}),v3={0:`M12 4a8 8 0 1 1-6.9 4M5.1 8H9V4.1`,1:`M5 5v4c0 2 1 3 3 3h8c2 0 3 1 3 3v4M12 12V5`,2:`M9 4H7v5l-3 3 3 3v5h2M15 4h2v5l3 3-3 3v5h-2`,3:`M3 9c3-4 6-4 9 0s6 4 9 0M3 15c3-4 6-4 9 0s6 4 9 0`,4:`M5 19V8l7-4 7 4v11M9 19v-7h6v7`,5:`M12 20V9M12 12 6 6M12 12l6-6M6 6v4M18 6v4`,6:`M3 17h18M5 17v-5c4-5 10-5 14 0v5M8 17v-3M16 17v-3`,7:`M12 3v3M5.6 5.6l2.1 2.1M18.4 5.6l-2.1 2.1M6 20h12l-2-9H8Z`,8:`M8 8a4 4 0 0 1 8 0v8a4 4 0 0 1-8 0V8Zm0 4h8`,9:`M3 13h4l2-6 4 12 2-6h6`,10:`M12 3v15M8 7h8M5 14c0 4 3 7 7 7s7-3 7-7M5 14l-2 2M19 14l2 2`,11:`M7 3v18M17 3v18M7 7h10M7 12h10M7 17h10`,12:`M8 5a4 4 0 0 1 4 4v6a4 4 0 1 0 4-4H8a4 4 0 1 0 4 4V9a4 4 0 0 1 4-4`,13:`M12 3v5M12 16v5M3 12h5M16 12h5M5.6 5.6l3.5 3.5M14.9 14.9l3.5 3.5M18.4 5.6l-3.5 3.5M9.1 14.9l-3.5 3.5`,14:`m4 8 8-4 8 4-8 4Zm0 4 8 4 8-4M4 16l8 4 8-4`,15:`m12 3 3 6 6 3-6 3-3 6-3-6-6-3 6-3Zm0 6v6M9 12h6`},y3=e=>{if(e.length!==3)throw Error(`ReleaseRelay symbolIndices must contain exactly three indices`);let t=new Set;for(let n of e){if(!Number.isInteger(n)||n<0||n>15)throw Error(`ReleaseRelay symbol indices must be integers from 0 through 15`);if(t.has(n))throw Error(`ReleaseRelay symbol indices must be distinct`);t.add(n)}return e},b3=({algorithm:e,className:t,codename:n,size:r=`compact`,symbolIndices:i,...a})=>{let o=Y(e,`ReleaseRelay algorithm`),s=Y(n,`ReleaseRelay codename`),c=y3(i),l=`Release relay, ${s}, symbols ${c.map(e=>h3[e].name).join(`, `)}.`;return(0,L.jsxs)(`figure`,{...a,className:TQ(m3(`root`),g3.size[r].className,t),"data-rly-release-relay-size":r,children:[(0,L.jsxs)(`span`,{"aria-label":l,className:m3(`tiles`),role:`img`,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:m3(`handoff`),"data-rly-release-relay-handoff":``}),c.map((e,t)=>(0,L.jsx)(`span`,{"aria-hidden":`true`,className:m3(`tile`),"data-rly-release-relay-position":t,"data-rly-release-symbol-index":e,"data-rly-release-symbol-name":h3[e].name,children:(0,L.jsx)(`svg`,{className:m3(`glyph`),focusable:`false`,viewBox:`0 0 24 24`,children:(0,L.jsx)(`path`,{d:v3[e],fill:`none`,stroke:`currentColor`,strokeLinecap:`round`,strokeLinejoin:`round`,strokeWidth:`1.7`,vectorEffect:`non-scaling-stroke`})})},e))]}),(0,L.jsxs)(`figcaption`,{className:m3(`identity`),children:[(0,L.jsx)(`span`,{className:m3(`codename`),children:s}),(0,L.jsxs)(`span`,{className:m3(`algorithm`),children:[`Identity algorithm: `,o]})]})]})},x3={body:`rly_ReleasePreview-module__body`,summary:`rly_ReleasePreview-module__summary`,releaseMeta:`rly_ReleasePreview-module__releaseMeta`,personGroup:`rly_ReleasePreview-module__personGroup`,fact:`rly_ReleasePreview-module__fact`,dialogSurface:`rly_ReleasePreview-module__dialogSurface`,dialogFrame:`rly_ReleasePreview-module__dialogFrame`,dialogScroll:`rly_ReleasePreview-module__dialogScroll`,identityRow:`rly_ReleasePreview-module__identityRow`,version:`rly_ReleasePreview-module__version`,people:`rly_ReleasePreview-module__people`,eyebrow:`rly_ReleasePreview-module__eyebrow`,unassigned:`rly_ReleasePreview-module__unassigned`,facts:`rly_ReleasePreview-module__facts`,slot:`rly_ReleasePreview-module__slot`,dialogFooter:`rly_ReleasePreview-module__dialogFooter`,sheetFooter:`rly_ReleasePreview-module__sheetFooter`,dialogClose:`rly_ReleasePreview-module__dialogClose`,fullViewButton:`rly_ReleasePreview-module__fullViewButton`},S3=e=>wQ(x3,e),C3=({agentEntry:e,collaborators:t,entryMotion:n=`intrinsic`,evidence:r,onOpenChange:i,onOpenFullView:a,open:o,openFullViewLabel:s=`Open full view`,presentation:c=`dialog`,primaryAction:l,release:u,stages:d,transitionNames:f,workset:p})=>{let m=f3(u),h=u3(f),g=Y(s,`ReleasePreview openFullViewLabel`),_=(0,N.useRef)(null),v=m.freshnessDateTime===void 0?(0,L.jsx)(w2,{state:m.freshness}):(0,L.jsx)(w2,{dateTime:m.freshnessDateTime,state:m.freshness,time:m.freshnessTime}),y=`Release preview: ${m.version} ${m.codename}`,b=(0,L.jsxs)(`div`,{className:S3(`body`),"data-rly-release-preview-presentation":c,"data-rly-release-state":m.state,children:[(0,L.jsxs)(`section`,{"aria-label":`Release summary`,className:S3(`summary`),"data-rly-release-preview-summary":``,ref:_,tabIndex:-1,children:[(0,L.jsxs)(`div`,{className:S3(`identityRow`),children:[(0,L.jsx)(b3,{algorithm:m.algorithm,codename:m.codename,"data-rly-release-transition-name":h?.relay,"data-rly-release-transition-part":`relay`,size:`hero`,style:h===void 0?void 0:{viewTransitionName:h.relay},symbolIndices:m.symbolIndices}),(0,L.jsxs)(`div`,{className:S3(`releaseMeta`),children:[(0,L.jsx)(`p`,{className:S3(`version`),"data-rly-release-transition-name":h?.version,"data-rly-release-transition-part":`version`,style:h===void 0?void 0:{viewTransitionName:h.version},children:m.version}),v]})]}),(0,L.jsxs)(`div`,{className:S3(`people`),children:[(0,L.jsxs)(`div`,{className:S3(`personGroup`),children:[(0,L.jsx)(`span`,{className:S3(`eyebrow`),children:`Owner`}),m.owner===void 0?(0,L.jsx)(`span`,{className:S3(`unassigned`),"data-rly-release-owner":`unassigned`,children:`Unassigned`}):(0,L.jsx)(a2,{person:m.owner})]}),(0,L.jsxs)(`div`,{className:S3(`personGroup`),children:[(0,L.jsx)(`span`,{className:S3(`eyebrow`),children:`Approver`}),m.approver===void 0?(0,L.jsx)(`span`,{className:S3(`unassigned`),"data-rly-release-approver":`unassigned`,children:`Unassigned`}):(0,L.jsx)(a2,{person:m.approver})]})]}),(0,L.jsx)(I2,{"data-rly-release-transition-name":h?.verdict,"data-rly-release-transition-part":`verdict`,reason:m.reason,style:h===void 0?void 0:{viewTransitionName:h.verdict},tone:m.tone,verdict:m.verdict}),(0,L.jsx)(`dl`,{className:S3(`facts`),children:m.facts.map(e=>(0,L.jsxs)(`div`,{className:S3(`fact`),children:[(0,L.jsx)(`dt`,{children:e.label}),(0,L.jsx)(`dd`,{children:e.value})]},e.id))})]}),t===void 0?null:(0,L.jsx)(`div`,{className:S3(`slot`),"data-rly-release-preview-slot":`collaborators`,children:t}),(0,L.jsx)(`div`,{className:S3(`slot`),"data-rly-release-preview-slot":`primary-action`,children:l}),(0,L.jsx)(`div`,{className:S3(`slot`),"data-rly-release-preview-slot":`stages`,children:d}),(0,L.jsx)(`div`,{className:S3(`slot`),"data-rly-release-preview-slot":`workset`,children:p}),(0,L.jsx)(`div`,{className:S3(`slot`),"data-rly-release-preview-slot":`evidence`,children:r}),(0,L.jsx)(`div`,{className:S3(`slot`),"data-rly-release-preview-slot":`agent-entry`,children:e})]}),x=(0,L.jsx)(r$,{className:S3(`fullViewButton`),onClick:a,size:`default`,variant:`secondary`,children:g});return c===`sheet`?(0,L.jsx)($Q.Root,{onOpenChange:i,open:o,children:(0,L.jsxs)($Q.Content,{entryMotion:n,initialFocusRef:_,title:y,children:[(0,L.jsx)($Q.Body,{"data-rly-release-preview-scroll":`sheet`,children:b}),(0,L.jsx)($Q.Footer,{className:S3(`sheetFooter`),"data-rly-release-preview-footer":`sheet`,children:x})]})}):(0,L.jsx)(K$.Root,{onOpenChange:i,open:o,children:(0,L.jsx)(K$.Content,{className:S3(`dialogSurface`),entryMotion:n,initialFocusRef:_,size:`wide`,title:y,children:(0,L.jsxs)(`div`,{className:S3(`dialogFrame`),children:[(0,L.jsx)(`div`,{className:S3(`dialogClose`),children:(0,L.jsx)(K$.Close,{size:`compact`,variant:`quiet`,children:`Close preview`})}),(0,L.jsx)(`div`,{className:S3(`dialogScroll`),"data-rly-release-preview-scroll":`dialog`,children:b}),(0,L.jsx)(`footer`,{className:S3(`dialogFooter`),"data-rly-release-preview-footer":`dialog`,children:x})]})})})},w3={root:`rly_ReleaseRow-module__root`,identity:`rly_ReleaseRow-module__identity`,verdictBlock:`rly_ReleaseRow-module__verdictBlock`,people:`rly_ReleaseRow-module__people`,actions:`rly_ReleaseRow-module__actions`,personGroup:`rly_ReleaseRow-module__personGroup`,fact:`rly_ReleaseRow-module__fact`,version:`rly_ReleaseRow-module__version`,verdict:`rly_ReleaseRow-module__verdict`,reason:`rly_ReleaseRow-module__reason`,eyebrow:`rly_ReleaseRow-module__eyebrow`,unassigned:`rly_ReleaseRow-module__unassigned`,facts:`rly_ReleaseRow-module__facts`,agentEntry:`rly_ReleaseRow-module__agentEntry`,previewButton:`rly_ReleaseRow-module__previewButton`},T3=e=>wQ(w3,e),E3=({agentEntry:e,className:t,onPreview:n,previewLabel:r=`Preview release`,release:i,transitionNames:a,...o})=>{let s=f3(i),c=u3(a),l=Y(r,`ReleaseRow previewLabel`),u=`rly-release-row-verdict-${(0,N.useId)()}`,d=s.freshnessDateTime===void 0?(0,L.jsx)(w2,{size:`compact`,state:s.freshness}):(0,L.jsx)(w2,{dateTime:s.freshnessDateTime,size:`compact`,state:s.freshness,time:s.freshnessTime});return(0,L.jsxs)(`article`,{...o,className:TQ(T3(`root`),t),"data-rly-release-id":s.id,"data-rly-release-state":s.state,children:[(0,L.jsxs)(`div`,{className:T3(`identity`),children:[(0,L.jsx)(b3,{algorithm:s.algorithm,codename:s.codename,"data-rly-release-transition-name":c?.relay,"data-rly-release-transition-part":`relay`,size:`compact`,style:c===void 0?void 0:{viewTransitionName:c.relay},symbolIndices:s.symbolIndices}),(0,L.jsx)(`p`,{className:T3(`version`),"data-rly-release-transition-name":c?.version,"data-rly-release-transition-part":`version`,style:c===void 0?void 0:{viewTransitionName:c.version},children:s.version}),d]}),(0,L.jsxs)(`section`,{"aria-labelledby":u,className:T3(`verdictBlock`),"data-rly-release-transition-name":c?.verdict,"data-rly-release-transition-part":`verdict`,style:c===void 0?void 0:{viewTransitionName:c.verdict},children:[(0,L.jsx)(`h2`,{className:T3(`verdict`),id:u,children:s.verdict}),(0,L.jsx)(`p`,{className:T3(`reason`),children:s.reason})]}),(0,L.jsxs)(`div`,{className:T3(`people`),children:[(0,L.jsxs)(`div`,{className:T3(`personGroup`),children:[(0,L.jsx)(`span`,{className:T3(`eyebrow`),children:`Owner`}),s.owner===void 0?(0,L.jsx)(`span`,{className:T3(`unassigned`),"data-rly-release-owner":`unassigned`,children:`Unassigned`}):(0,L.jsx)(a2,{person:s.owner,size:`compact`})]}),s.approver===void 0?null:(0,L.jsxs)(`div`,{className:T3(`personGroup`),children:[(0,L.jsx)(`span`,{className:T3(`eyebrow`),children:`Approver`}),(0,L.jsx)(a2,{person:s.approver,size:`compact`})]})]}),(0,L.jsx)(`dl`,{className:T3(`facts`),children:s.facts.map(e=>(0,L.jsxs)(`div`,{className:T3(`fact`),"data-rly-release-fact":e.id,children:[(0,L.jsx)(`dt`,{children:e.label}),(0,L.jsx)(`dd`,{children:e.value})]},e.id))}),(0,L.jsxs)(`div`,{className:T3(`actions`),children:[(0,L.jsx)(r$,{className:T3(`previewButton`),onClick:n,size:`default`,children:l}),e===void 0?null:(0,L.jsx)(`div`,{className:T3(`agentEntry`),children:e})]})]})},D3={root:`rly_StageRail-module__root`,heading:`rly_StageRail-module__heading`,list:`rly_StageRail-module__list`,item:`rly_StageRail-module__item`,marker:`rly_StageRail-module__marker`,connector:`rly_StageRail-module__connector`,content:`rly_StageRail-module__content`,name:`rly_StageRail-module__name`,reason:`rly_StageRail-module__reason`,empty:`rly_StageRail-module__empty`,compact:`rly_StageRail-module__compact`,defaultSize:`rly_StageRail-module__defaultSize`,long:`rly_StageRail-module__long`},O3=e=>wQ(D3,e),k3=CQ({size:{compact:{className:O3(`compact`),purpose:`Dense release and entity stage summaries`,tokens:[`space-24`,`space-8`,`type-label`,`type-meta`]},default:{className:O3(`defaultSize`),purpose:`Standard stage progression with supporting context`,tokens:[`space-24`,`space-12`,`type-card-title`,`type-body`]}}}),A3=CQ({size:`default`}),j3=e=>{let t=new Set;for(let n of e){let e=Y(n.id,`StageRail stage id`);if(Y(n.name,`StageRail name for ${e}`),Y(n.state,`StageRail state for ${e}`),n.reason!==void 0&&Y(n.reason,`StageRail reason for ${e}`),t.has(e))throw Error(`StageRail stage ids must be unique: ${e}`);t.add(e)}return e},M3=({className:e,emptyLabel:t=`No stages recorded.`,heading:n,size:r=`default`,stages:i,...a})=>{let o=Y(n,`StageRail heading`),s=Y(t,`StageRail emptyLabel`),c=j3(i),l=`rly-stage-rail-${(0,N.useId)()}`;return(0,L.jsxs)(`section`,{...a,"aria-labelledby":l,className:TQ(O3(`root`),k3.size[r].className,c.length>6&&O3(`long`),e),"data-rly-stage-rail-size":r,children:[(0,L.jsx)(`h2`,{className:O3(`heading`),id:l,children:o}),c.length===0?(0,L.jsx)(`p`,{className:O3(`empty`),children:s}):(0,L.jsx)(`ol`,{className:O3(`list`),children:c.map((e,t)=>(0,L.jsxs)(`li`,{className:O3(`item`),"data-rly-stage-id":e.id,children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:O3(`marker`),"data-rly-stage-marker":``,children:t+1}),t===c.length-1?null:(0,L.jsx)(`span`,{"aria-hidden":`true`,className:O3(`connector`),"data-rly-stage-connector":``}),(0,L.jsxs)(`div`,{className:O3(`content`),children:[(0,L.jsx)(`h3`,{className:O3(`name`),children:e.name}),(0,L.jsx)(c$,{label:e.state,size:r===`compact`?`compact`:`default`,tone:e.tone}),e.reason===void 0?null:(0,L.jsx)(`p`,{className:O3(`reason`),children:e.reason}),e.owner===void 0?null:(0,L.jsx)(a2,{person:e.owner,size:r})]})]},e.id))})]})},N3={root:`rly_TimelineRow-module__root`,time:`rly_TimelineRow-module__time`,marker:`rly_TimelineRow-module__marker`,dot:`rly_TimelineRow-module__dot`,connector:`rly_TimelineRow-module__connector`,content:`rly_TimelineRow-module__content`,meta:`rly_TimelineRow-module__meta`,title:`rly_TimelineRow-module__title`,link:`rly_TimelineRow-module__link`,detail:`rly_TimelineRow-module__detail`,actorKind:`rly_TimelineRow-module__actorKind`,actor:`rly_TimelineRow-module__actor`},P3=e=>wQ(N3,e),F3={human:`Human`,agent:`Agent`,plugin:`Plugin`,system:`System`},I3=e=>{if(Y(e.id,`TimelineRow event id`),Y(e.title,`TimelineRow event title`),Y(e.detail,`TimelineRow event detail`),Y(e.dateTime,`TimelineRow event dateTime`),Y(e.time,`TimelineRow event time`),e.href!==void 0&&Y(e.href,`TimelineRow event href`),!Object.hasOwn(F3,e.actorKind))throw Error(`TimelineRow event actorKind must be human, agent, plugin, or system`);return e},L3=({className:e,continued:t,event:n,...r})=>{let i=I3(n),a=`rly-timeline-row-${(0,N.useId)()}`,o=(0,L.jsx)(`h2`,{className:P3(`title`),id:a,children:i.title});return(0,L.jsxs)(`li`,{...r,className:TQ(P3(`root`),e),"data-rly-timeline-actor":i.actorKind,"data-rly-timeline-event-id":i.id,children:[(0,L.jsx)(`time`,{className:P3(`time`),dateTime:i.dateTime,children:i.time}),(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:P3(`marker`),children:[(0,L.jsx)(`span`,{className:P3(`dot`)}),t?(0,L.jsx)(`span`,{className:P3(`connector`),"data-rly-timeline-connector":``}):null]}),(0,L.jsxs)(`article`,{"aria-labelledby":a,className:P3(`content`),children:[i.href===void 0?o:(0,L.jsx)(A_,{className:P3(`link`),href:i.href,children:o}),(0,L.jsx)(`p`,{className:P3(`detail`),children:i.detail})]}),(0,L.jsxs)(`div`,{className:P3(`meta`),children:[(0,L.jsx)(`span`,{className:P3(`actorKind`),children:F3[i.actorKind]}),i.service===void 0?null:(0,L.jsx)(j2,{service:i.service,size:`compact`}),i.actor===void 0?null:(0,L.jsx)(`div`,{className:P3(`actor`),children:i.actor})]})]})},R3={root:`rly_WorksetCard-module__root`,heading:`rly_WorksetCard-module__heading`,dimensions:`rly_WorksetCard-module__dimensions`,dimension:`rly_WorksetCard-module__dimension`,dimensionHeading:`rly_WorksetCard-module__dimensionHeading`,gaps:`rly_WorksetCard-module__gaps`,list:`rly_WorksetCard-module__list`,gapList:`rly_WorksetCard-module__gapList`,keyList:`rly_WorksetCard-module__keyList`,item:`rly_WorksetCard-module__item`,gap:`rly_WorksetCard-module__gap`,identity:`rly_WorksetCard-module__identity`,link:`rly_WorksetCard-module__link`,itemTitle:`rly_WorksetCard-module__itemTitle`,reference:`rly_WorksetCard-module__reference`,empty:`rly_WorksetCard-module__empty`,conceptLabel:`rly_WorksetCard-module__conceptLabel`,emptyLink:`rly_WorksetCard-module__emptyLink`,linkedWork:`rly_WorksetCard-module__linkedWork`},z3=e=>wQ(R3,e),B3=(e,t)=>{e!==void 0&&Y(e,`${t} href`)},V3=(e,t,n)=>{let r=Y(e,`${n} id`);if(t.has(r))throw Error(`${n} ids must be unique: ${r}`);return t.add(r),r},H3=e=>{let t=new Set;for(let n of e){let e=V3(n.id,t,`WorksetCard Jira item`);Y(n.key,`WorksetCard Jira key for ${e}`),Y(n.title,`WorksetCard Jira title for ${e}`),Y(n.state,`WorksetCard Jira state for ${e}`),B3(n.href,`WorksetCard Jira item ${e}`)}},U3=e=>{let t=new Set;for(let n of e){let e=V3(n.id,t,`WorksetCard pull request group`);Y(n.title,`WorksetCard pull request title for ${e}`),Y(n.reference,`WorksetCard pull request reference for ${e}`),Y(n.state,`WorksetCard pull request state for ${e}`),B3(n.href,`WorksetCard pull request group ${e}`);for(let t of n.linkedJiraKeys)Y(t,`WorksetCard linked Jira key for ${e}`)}},W3=e=>{let t=new Set;for(let n of e){let e=V3(n.id,t,`WorksetCard gap`);if(Y(n.label,`WorksetCard gap label for ${e}`),Y(n.reason,`WorksetCard gap reason for ${e}`),!Object.hasOwn(D2.service,n.service))throw Error(`WorksetCard gap service for ${e} must be supported`)}},G3=e=>{let t=new Set;for(let n of e){let e=V3(n.id,t,`WorksetCard pipeline`);Y(n.title,`WorksetCard pipeline title for ${e}`),Y(n.reference,`WorksetCard pipeline reference for ${e}`),Y(n.state,`WorksetCard pipeline state for ${e}`),B3(n.href,`WorksetCard pipeline ${e}`)}},K3=({href:e,reference:t,title:n})=>{let r=(0,L.jsxs)(`span`,{className:z3(`identity`),children:[(0,L.jsx)(`span`,{className:z3(`itemTitle`),children:n}),(0,L.jsx)(`span`,{className:z3(`reference`),children:t})]});return e===void 0?r:(0,L.jsx)(A_,{className:z3(`link`),href:e,children:r})},q3=({className:e,gapEmptyLabel:t=`No relationship gaps recorded.`,gaps:n,heading:r,jiraEmptyLabel:i=`No Jira work recorded.`,jiraItems:a,pipelineEmptyLabel:o=`No pipeline delivery recorded.`,pipelines:s,pullRequestEmptyLabel:c=`No pull request groups recorded.`,pullRequestGroups:l,...u})=>{let d=Y(r,`WorksetCard heading`),f=Y(i,`WorksetCard jiraEmptyLabel`),p=Y(c,`WorksetCard pullRequestEmptyLabel`),m=Y(t,`WorksetCard gapEmptyLabel`),h=Y(o,`WorksetCard pipelineEmptyLabel`);H3(a),U3(l),W3(n),G3(s);let g=`rly-workset-${(0,N.useId)()}`;return(0,L.jsxs)(`section`,{...u,"aria-labelledby":g,className:TQ(z3(`root`),e),children:[(0,L.jsx)(`h2`,{className:z3(`heading`),id:g,children:d}),(0,L.jsxs)(`div`,{className:z3(`dimensions`),children:[(0,L.jsxs)(`section`,{className:z3(`dimension`),"data-rly-workset-dimension":`jira`,children:[(0,L.jsxs)(`div`,{className:z3(`dimensionHeading`),children:[(0,L.jsx)(j2,{service:`jira`,size:`compact`}),(0,L.jsx)(`h3`,{children:`Jira work`})]}),a.length===0?(0,L.jsx)(`p`,{className:z3(`empty`),children:f}):(0,L.jsx)(`ul`,{className:z3(`list`),children:a.map(e=>(0,L.jsxs)(`li`,{className:z3(`item`),"data-rly-workset-jira-id":e.id,children:[(0,L.jsx)(K3,{...e.href===void 0?{}:{href:e.href},reference:e.key,title:e.title}),(0,L.jsx)(c$,{label:e.state,size:`compact`,tone:e.tone}),e.owner===void 0?null:(0,L.jsx)(a2,{person:e.owner,size:`compact`})]},e.id))})]}),(0,L.jsxs)(`section`,{className:z3(`dimension`),"data-rly-workset-dimension":`pull-requests`,children:[(0,L.jsxs)(`div`,{className:z3(`dimensionHeading`),children:[(0,L.jsx)(j2,{service:`codecommit`,size:`compact`}),(0,L.jsx)(`h3`,{children:`Pull request groups`})]}),l.length===0?(0,L.jsx)(`p`,{className:z3(`empty`),children:p}):(0,L.jsx)(`ul`,{className:z3(`list`),children:l.map(e=>(0,L.jsxs)(`li`,{className:z3(`item`),"data-rly-workset-pr-id":e.id,children:[(0,L.jsx)(K3,{...e.href===void 0?{}:{href:e.href},reference:e.reference,title:e.title}),(0,L.jsx)(c$,{label:e.state,size:`compact`,tone:e.tone}),(0,L.jsxs)(`div`,{className:z3(`linkedWork`),children:[(0,L.jsx)(`span`,{className:z3(`conceptLabel`),children:`Linked Jira work`}),e.linkedJiraKeys.length===0?(0,L.jsx)(`span`,{className:z3(`emptyLink`),children:`No Jira links recorded.`}):(0,L.jsx)(`ul`,{className:z3(`keyList`),children:e.linkedJiraKeys.map((e,t)=>(0,L.jsx)(`li`,{"data-rly-linked-jira-key":e,children:e},`${e}-${t}`))})]}),e.author===void 0?null:(0,L.jsx)(a2,{person:e.author,size:`compact`})]},e.id))}),(0,L.jsxs)(`div`,{className:z3(`gaps`),children:[(0,L.jsx)(`h4`,{children:`Relationship gaps`}),n.length===0?(0,L.jsx)(`p`,{className:z3(`empty`),children:m}):(0,L.jsx)(`ul`,{className:z3(`gapList`),children:n.map(e=>(0,L.jsxs)(`li`,{className:z3(`gap`),"data-rly-workset-gap-id":e.id,children:[(0,L.jsx)(j2,{service:e.service,size:`compact`}),(0,L.jsx)(`strong`,{children:e.label}),(0,L.jsx)(`span`,{children:e.reason})]},e.id))})]})]}),(0,L.jsxs)(`section`,{className:z3(`dimension`),"data-rly-workset-dimension":`pipelines`,children:[(0,L.jsxs)(`div`,{className:z3(`dimensionHeading`),children:[(0,L.jsx)(j2,{service:`codepipeline`,size:`compact`}),(0,L.jsx)(`h3`,{children:`Pipeline delivery`})]}),s.length===0?(0,L.jsx)(`p`,{className:z3(`empty`),children:h}):(0,L.jsx)(`ul`,{className:z3(`list`),children:s.map(e=>(0,L.jsxs)(`li`,{className:z3(`item`),"data-rly-workset-pipeline-id":e.id,children:[(0,L.jsx)(K3,{...e.href===void 0?{}:{href:e.href},reference:e.reference,title:e.title}),(0,L.jsx)(c$,{label:e.state,size:`compact`,tone:e.tone}),e.operator===void 0?null:(0,L.jsx)(a2,{person:e.operator,size:`compact`}),e.approver===void 0?null:(0,L.jsx)(a2,{person:e.approver,size:`compact`}),(0,L.jsx)(M3,{heading:`${e.reference} stages`,size:`compact`,stages:e.stages})]},e.id))})]})]})]})},J3=s({AgentContextButton:()=>k0,AgentDrawer:()=>P0,AgentJob:()=>B0,AgentProposal:()=>G0,AgentThread:()=>Q0,CollaboratorGroup:()=>_2,EntityShell:()=>z2,EntityTable:()=>K2,EvidenceStamp:()=>Y2,FreshnessStamp:()=>w2,GovernedActionReview:()=>$2,PeopleStrip:()=>f2,Person:()=>a2,RLY_COLLABORATOR_GROUP_DEFAULT_VARIANTS:()=>g2,RLY_COLLABORATOR_GROUP_VARIANTS:()=>h2,RLY_FRESHNESS_STAMP_DEFAULT_VARIANTS:()=>x2,RLY_FRESHNESS_STAMP_VARIANTS:()=>b2,RLY_PEOPLE_STRIP_DEFAULT_VARIANTS:()=>l2,RLY_PEOPLE_STRIP_VARIANTS:()=>c2,RLY_PERSON_DEFAULT_VARIANTS:()=>n2,RLY_PERSON_VARIANTS:()=>t2,RLY_RELATIONSHIP_DIRECTION_PRESENTATION:()=>t4,RLY_RELATIONSHIP_LIFECYCLE_PRESENTATION:()=>e4,RLY_RELEASE_RELAY_DEFAULT_VARIANTS:()=>_3,RLY_RELEASE_RELAY_SYMBOLS:()=>h3,RLY_RELEASE_RELAY_VARIANTS:()=>g3,RLY_SERVICE_MARK_DEFAULT_VARIANTS:()=>O2,RLY_SERVICE_MARK_VARIANTS:()=>D2,RLY_STAGE_RAIL_DEFAULT_VARIANTS:()=>A3,RLY_STAGE_RAIL_VARIANTS:()=>k3,RLY_VERDICT_VARIANTS:()=>P2,RelationshipChain:()=>l4,RelationshipTable:()=>p4,RelayDock:()=>s3,ReleasePreview:()=>C3,ReleaseRelay:()=>b3,ReleaseRow:()=>E3,ServiceMark:()=>j2,StageRail:()=>M3,TimelineRow:()=>L3,Verdict:()=>I2,WorksetCard:()=>q3});function Y3(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var X3=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Z3=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Q3={};function $3(e,t){return((t||Q3).jsx?Z3:X3).test(e)}var e6=/[ \t\n\f\r]/g;function t6(e){return typeof e==`object`?e.type===`text`&&n6(e.value):n6(e)}function n6(e){return e.replace(e6,``)===``}var r6=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};r6.prototype.normal={},r6.prototype.property={},r6.prototype.space=void 0;function i6(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new r6(n,r,t)}function a6(e){return e.toLowerCase()}var o6=class{constructor(e,t){this.attribute=t,this.property=e}};o6.prototype.attribute=``,o6.prototype.booleanish=!1,o6.prototype.boolean=!1,o6.prototype.commaOrSpaceSeparated=!1,o6.prototype.commaSeparated=!1,o6.prototype.defined=!1,o6.prototype.mustUseProperty=!1,o6.prototype.number=!1,o6.prototype.overloadedBoolean=!1,o6.prototype.property=``,o6.prototype.spaceSeparated=!1,o6.prototype.space=void 0;var s6=s({boolean:()=>l6,booleanish:()=>u6,commaOrSpaceSeparated:()=>m6,commaSeparated:()=>p6,number:()=>X,overloadedBoolean:()=>d6,spaceSeparated:()=>f6}),c6=0,l6=h6(),u6=h6(),d6=h6(),X=h6(),f6=h6(),p6=h6(),m6=h6();function h6(){return 2**++c6}var g6=Object.keys(s6),_6=class extends o6{constructor(e,t,n,r){let i=-1;if(super(e,t),v6(this,`space`,r),typeof n==`number`)for(;++i<g6.length;){let e=g6[i];v6(this,g6[i],(n&s6[e])===s6[e])}}};_6.prototype.defined=!0;function v6(e,t,n){n&&(e[t]=n)}function y6(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new _6(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[a6(r)]=r,n[a6(a.attribute)]=r}return new r6(t,n,e.space)}var b6=y6({properties:{ariaActiveDescendant:null,ariaAtomic:u6,ariaAutoComplete:null,ariaBusy:u6,ariaChecked:u6,ariaColCount:X,ariaColIndex:X,ariaColSpan:X,ariaControls:f6,ariaCurrent:null,ariaDescribedBy:f6,ariaDetails:null,ariaDisabled:u6,ariaDropEffect:f6,ariaErrorMessage:null,ariaExpanded:u6,ariaFlowTo:f6,ariaGrabbed:u6,ariaHasPopup:null,ariaHidden:u6,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:f6,ariaLevel:X,ariaLive:null,ariaModal:u6,ariaMultiLine:u6,ariaMultiSelectable:u6,ariaOrientation:null,ariaOwns:f6,ariaPlaceholder:null,ariaPosInSet:X,ariaPressed:u6,ariaReadOnly:u6,ariaRelevant:null,ariaRequired:u6,ariaRoleDescription:f6,ariaRowCount:X,ariaRowIndex:X,ariaRowSpan:X,ariaSelected:u6,ariaSetSize:X,ariaSort:null,ariaValueMax:X,ariaValueMin:X,ariaValueNow:X,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function x6(e,t){return t in e?e[t]:t}function S6(e,t){return x6(e,t.toLowerCase())}var C6=y6({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:p6,acceptCharset:f6,accessKey:f6,action:null,allow:null,allowFullScreen:l6,allowPaymentRequest:l6,allowUserMedia:l6,alpha:l6,alt:null,as:null,async:l6,autoCapitalize:null,autoComplete:f6,autoFocus:l6,autoPlay:l6,blocking:f6,capture:null,charSet:null,checked:l6,cite:null,className:f6,closedBy:null,colorSpace:null,cols:X,colSpan:X,command:null,commandFor:null,content:null,contentEditable:u6,controls:l6,controlsList:f6,coords:X|p6,crossOrigin:null,data:null,dateTime:null,decoding:null,default:l6,defer:l6,dir:null,dirName:null,disabled:l6,download:d6,draggable:u6,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:l6,formTarget:null,headers:f6,height:X,hidden:d6,high:X,href:null,hrefLang:null,htmlFor:f6,httpEquiv:f6,id:null,imageSizes:null,imageSrcSet:null,inert:l6,inputMode:null,integrity:null,is:null,isMap:l6,itemId:null,itemProp:f6,itemRef:f6,itemScope:l6,itemType:f6,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:l6,low:X,manifest:null,max:null,maxLength:X,media:null,method:null,min:null,minLength:X,multiple:l6,muted:l6,name:null,nonce:null,noModule:l6,noValidate:l6,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:l6,optimum:X,pattern:null,ping:f6,placeholder:null,playsInline:l6,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:l6,referrerPolicy:null,rel:f6,required:l6,reversed:l6,rows:X,rowSpan:X,sandbox:f6,scope:null,scoped:l6,seamless:l6,selected:l6,shadowRootClonable:l6,shadowRootCustomElementRegistry:l6,shadowRootDelegatesFocus:l6,shadowRootMode:null,shadowRootSerializable:l6,shape:null,size:X,sizes:null,slot:null,span:X,spellCheck:u6,src:null,srcDoc:null,srcLang:null,srcSet:null,start:X,step:null,style:null,tabIndex:X,target:null,title:null,translate:null,type:null,typeMustMatch:l6,useMap:null,value:u6,width:X,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:f6,axis:null,background:null,bgColor:null,border:X,borderColor:null,bottomMargin:X,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:l6,declare:l6,event:null,face:null,frame:null,frameBorder:null,hSpace:X,leftMargin:X,link:null,longDesc:null,lowSrc:null,marginHeight:X,marginWidth:X,noResize:l6,noHref:l6,noShade:l6,noWrap:l6,object:null,profile:null,prompt:null,rev:null,rightMargin:X,rules:null,scheme:null,scrolling:u6,standby:null,summary:null,text:null,topMargin:X,valueType:null,version:null,vAlign:null,vLink:null,vSpace:X,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:l6,disablePictureInPicture:l6,disableRemotePlayback:l6,exportParts:p6,part:f6,prefix:null,property:null,results:X,security:null,unselectable:null},space:`html`,transform:S6}),w6=y6({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`,maskType:`mask-type`,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:m6,accentHeight:X,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:X,amplitude:X,arabicForm:null,ascent:X,attributeName:null,attributeType:null,azimuth:X,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:X,by:null,calcMode:null,capHeight:X,className:f6,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:X,diffuseConstant:X,direction:null,display:null,dur:null,divisor:X,dominantBaseline:null,download:l6,dx:null,dy:null,edgeMode:null,editable:null,elevation:X,enableBackground:null,end:null,event:null,exponent:X,externalResourcesRequired:null,fill:null,fillOpacity:X,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:p6,g2:p6,glyphName:p6,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:X,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:X,horizOriginX:X,horizOriginY:X,id:null,ideographic:X,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:X,k:X,k1:X,k2:X,k3:X,k4:X,kernelMatrix:m6,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:X,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:X,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:X,overlineThickness:X,paintOrder:null,panose1:null,path:null,pathLength:X,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:f6,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:X,pointsAtY:X,pointsAtZ:X,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:m6,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:m6,rev:m6,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:m6,requiredFeatures:m6,requiredFonts:m6,requiredFormats:m6,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:X,specularExponent:X,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:X,strikethroughThickness:X,string:null,stroke:null,strokeDashArray:m6,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:X,strokeOpacity:X,strokeWidth:null,style:null,surfaceScale:X,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:m6,tabIndex:X,tableValues:null,target:null,targetX:X,targetY:X,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:m6,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:X,underlineThickness:X,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:X,values:null,vAlphabetic:X,vMathematical:X,vectorEffect:null,vHanging:X,vIdeographic:X,version:null,vertAdvY:X,vertOriginX:X,vertOriginY:X,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:X,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:x6}),T6=y6({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()}}),E6=y6({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:S6}),D6=y6({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),O6={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`},k6=/[A-Z]/g,A6=/-[a-z]/g,j6=/^data[-\w.:]+$/i;function M6(e,t){let n=a6(t),r=t,i=o6;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&j6.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(A6,P6);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!A6.test(e)){let n=e.replace(k6,N6);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=_6}return new i(r,t)}function N6(e){return`-`+e.toLowerCase()}function P6(e){return e.charAt(1).toUpperCase()}var F6=i6([b6,C6,T6,E6,D6],`html`),I6=i6([b6,w6,T6,E6,D6],`svg`);function L6(e){return e.join(` `).trim()}var R6=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(`
61
- `);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),z6=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(R6());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),B6=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),V6=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(z6()),r=B6();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),H6=W6(`end`),U6=W6(`start`);function W6(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function G6(e){let t=U6(e),n=H6(e);if(t&&n)return{start:t,end:n}}function K6(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?J6(e.position):`start`in e||`end`in e?J6(e):`line`in e||`column`in e?q6(e):``}function q6(e){return Y6(e&&e.line)+`:`+Y6(e&&e.column)}function J6(e){return q6(e&&e.start)+`-`+q6(e&&e.end)}function Y6(e){return e&&typeof e==`number`?e:1}var X6=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=K6(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};X6.prototype.file=``,X6.prototype.name=``,X6.prototype.reason=``,X6.prototype.message=``,X6.prototype.stack=``,X6.prototype.column=void 0,X6.prototype.line=void 0,X6.prototype.ancestors=void 0,X6.prototype.cause=void 0,X6.prototype.fatal=void 0,X6.prototype.place=void 0,X6.prototype.ruleId=void 0,X6.prototype.source=void 0;var Z6=l(V6(),1),Q6={}.hasOwnProperty,$6=new Map,e8=/[A-Z]/g,t8=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),n8=new Set([`td`,`th`]);function r8(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=m8(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=p8(n,t.jsx,t.jsxs)}let 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`?I6:F6,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=i8(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function i8(e,t,n){if(t.type===`element`)return a8(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return o8(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return c8(e,t,n);if(t.type===`mdxjsEsm`)return s8(e,t);if(t.type===`root`)return l8(e,t,n);if(t.type===`text`)return u8(e,t)}function a8(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=I6,e.schema=i),e.ancestors.push(t);let a=b8(e,t.tagName,!1),o=h8(e,t),s=_8(e,t);return t8.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!t6(e)})),d8(e,o,a,t),f8(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function o8(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}x8(e,t.position)}function s8(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);x8(e,t.position)}function c8(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=I6,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:b8(e,t.name,!0),o=g8(e,t),s=_8(e,t);return d8(e,o,a,t),f8(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function l8(e,t,n){let r={};return f8(r,_8(e,t)),e.create(t,e.Fragment,r,n)}function u8(e,t){return t.value}function d8(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function f8(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function p8(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function m8(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=U6(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function h8(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Q6.call(t.properties,i)){let a=v8(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&n8.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function g8(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else x8(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else x8(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function _8(e,t){let n=[],r=-1,i=e.passKeys?new Map:$6;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=i8(e,a,o);s!==void 0&&n.push(s)}return n}function v8(e,t,n){let r=M6(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Y3(n):L6(n)),r.property===`style`){let t=typeof n==`object`?n:y8(e,String(n));return e.stylePropertyNameCase===`css`&&(t=Bre(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?O6[r.property]||r.property:r.attribute,n]}}function y8(e,t){try{return(0,Z6.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new X6("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-parse-style-attribute`,r}}function b8(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=$3(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=$3(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Q6.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);x8(e)}function x8(e,t){let n=new X6("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=`https://github.com/syntax-tree/hast-util-to-jsx-runtime#cannot-handle-mdx-estrees-without-createevaluater`,n}function Bre(e){let t={},n;for(n in e)Q6.call(e,n)&&(t[Vre(n)]=e[n]);return t}function Vre(e){let t=e.replace(e8,Hre);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function Hre(e){return`-`+e.toLowerCase()}var S8={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`]},Ure={};function C8(e,t){let n=t||Ure;return w8(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function w8(e,t,n){if(Wre(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 T8(e.children,t,n)}return Array.isArray(e)?T8(e,t,n):``}function T8(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=w8(e[i],t,n);return r.join(``)}function Wre(e){return!!(e&&typeof e==`object`)}var E8=document.createElement(`i`);function D8(e){let t=`&`+e+`;`;E8.innerHTML=t;let n=E8.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`?!1:n!==t&&n}function O8(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function k8(e,t){return e.length>0?(O8(e,e.length,0,t),e):t}var A8={}.hasOwnProperty;function j8(e){let t={},n=-1;for(;++n<e.length;)Gre(t,e[n]);return t}function Gre(e,t){let n;for(n in t){let r=(A8.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){A8.call(r,a)||(r[a]=[]);let e=i[a];Kre(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Kre(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);O8(e,0,0,r)}function M8(e,t){let 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 N8(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var P8=U8(/[A-Za-z]/),F8=U8(/[\dA-Za-z]/),qre=U8(/[#-'*+\--9=?A-Z^-~]/);function I8(e){return e!==null&&(e<32||e===127)}var L8=U8(/\d/),Jre=U8(/[\dA-Fa-f]/),Yre=U8(/[!-/:-@[-`{-~]/);function R8(e){return e!==null&&e<-2}function z8(e){return e!==null&&(e<0||e===32)}function B8(e){return e===-2||e===-1||e===32}var V8=U8(/\p{P}|\p{S}/u),H8=U8(/\s/);function U8(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function W8(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&F8(e.charCodeAt(n+1))&&F8(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function G8(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return B8(r)?(e.enter(n),s(r)):t(r)}function s(r){return B8(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Xre={tokenize:Zre};function Zre(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),G8(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return R8(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Qre={tokenize:$re},K8={tokenize:eie};function $re(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return O8(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(K8,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(K8,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return R8(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;O8(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function eie(e,t,n){return G8(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function q8(e){if(e===null||z8(e)||H8(e))return 1;if(V8(e))return 2}function J8(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Y8={name:`attention`,resolveAll:tie,tokenize:nie};function tie(e,t){let n=-1,r,i,a,o,s,c,l,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;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};X8(d,-c),X8(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=k8(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=k8(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=k8(l,J8(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=k8(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=k8(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,O8(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function nie(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=q8(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=q8(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function X8(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var rie={name:`autolink`,tokenize:iie};function iie(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return P8(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||F8(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||F8(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||I8(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):qre(t)?(e.consume(t),l):n(t)}function u(e){return F8(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||F8(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Z8={partial:!0,tokenize:aie};function aie(e,t,n){return r;function r(t){return B8(t)?G8(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||R8(e)?t(e):n(e)}}var Q8={continuation:{tokenize:sie},exit:cie,name:`blockQuote`,tokenize:oie};function oie(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return B8(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function sie(e,t,n){let r=this;return i;function i(t){return B8(t)?G8(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Q8,t,n)(r)}}function cie(e){e.exit(`blockQuote`)}var $8={name:`characterEscape`,tokenize:lie};function lie(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Yre(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var e5={name:`characterReference`,tokenize:uie};function uie(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=F8,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Jre,u):(e.enter(`characterReferenceValue`),a=7,o=L8,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===F8&&!D8(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var t5={partial:!0,tokenize:fie},n5={concrete:!0,name:`codeFenced`,tokenize:die};function die(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),B8(t)?G8(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||R8(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(t5,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||R8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):B8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),G8(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||R8(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||R8(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&B8(t)?G8(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||R8(t)?e.check(t5,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||R8(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),B8(t)?G8(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),B8(t)?G8(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||R8(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function fie(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var r5={name:`codeIndented`,tokenize:mie},pie={partial:!0,tokenize:hie};function mie(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),G8(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):R8(t)?e.attempt(pie,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||R8(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function hie(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):R8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):G8(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):R8(e)?i(e):n(e)}}var gie={name:`codeText`,previous:vie,resolve:_ie,tokenize:yie};function _ie(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 vie(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function yie(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):R8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||R8(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var bie=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&i5(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),i5(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),i5(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);i5(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);i5(this.left,t.reverse())}}}};function i5(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 a5(e){let t={},n=-1,r,i,a,o,s,c,l,u=new bie(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`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,xie(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return O8(e,0,1/0,u.slice(0)),!l}function xie(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var Sie={resolve:wie,tokenize:Tie},Cie={partial:!0,tokenize:Eie};function wie(e){return a5(e),e}function Tie(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):R8(t)?e.check(Cie,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Eie(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),G8(e,a,`linePrefix`)}function a(i){if(i===null||R8(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function o5(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||I8(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||R8(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||z8(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||I8(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function s5(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):R8(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||R8(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!B8(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function c5(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):R8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),G8(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||R8(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function l5(e,t){let n;return r;function r(i){return R8(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):B8(i)?G8(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Die={name:`definition`,tokenize:kie},Oie={partial:!0,tokenize:Aie};function kie(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return s5.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=N8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return z8(t)?l5(e,l)(t):l(t)}function l(t){return o5(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(Oie,d,d)(t)}function d(t){return B8(t)?G8(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||R8(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Aie(e,t,n){return r;function r(t){return z8(t)?l5(e,i)(t):n(t)}function i(t){return c5(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return B8(t)?G8(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||R8(e)?t(e):n(e)}}var jie={name:`hardBreakEscape`,tokenize:Mie};function Mie(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return R8(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Nie={name:`headingAtx`,resolve:Pie,tokenize:Fie};function Pie(e,t){let n=e.length-2,r=3,i,a;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},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},O8(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Fie(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||z8(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||R8(n)?(e.exit(`atxHeading`),t(n)):B8(n)?G8(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||z8(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Iie=`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`.split(`.`),u5=[`pre`,`script`,`style`,`textarea`],Lie={concrete:!0,name:`htmlFlow`,resolveTo:Bie,tokenize:Vie},Rie={partial:!0,tokenize:Uie},zie={partial:!0,tokenize:Hie};function Bie(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 Vie(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:P):P8(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):P8(a)?(e.consume(a),i=4,r.interrupt?t:P):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:P):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return P8(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||z8(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&u5.includes(l)?(i=1,r.interrupt?t(s):O(s)):Iie.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||F8(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return B8(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||P8(t)?(e.consume(t),b):B8(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||F8(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):B8(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):B8(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||R8(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||z8(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||B8(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||R8(t)?O(t):B8(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),P):t===93&&i===5?(e.consume(t),te):R8(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Rie,ne,k)(t)):t===null||R8(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(zie,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||R8(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),P):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return u5.includes(n)?(e.consume(t),F):O(t)}return P8(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function te(t){return t===93?(e.consume(t),P):O(t)}function P(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),P):O(t)}function F(t){return t===null||R8(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function Hie(e,t,n){let r=this;return i;function i(t){return R8(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Uie(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Z8,t,n)}}var Wie={name:`htmlText`,tokenize:Gie};function Gie(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):P8(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):P8(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):R8(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):R8(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):R8(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):R8(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return P8(t)?(e.consume(t),S):n(t)}function S(t){return t===45||F8(t)?(e.consume(t),S):C(t)}function C(t){return R8(t)?(o=C,N(t)):B8(t)?(e.consume(t),C):M(t)}function w(t){return t===45||F8(t)?(e.consume(t),w):t===47||t===62||z8(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||P8(t)?(e.consume(t),E):R8(t)?(o=T,N(t)):B8(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||F8(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):R8(t)?(o=D,N(t)):B8(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):R8(t)?(o=O,N(t)):B8(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):R8(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||z8(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||z8(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return B8(t)?G8(e,te,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):te(t)}function te(t){return e.enter(`htmlTextData`),o(t)}}var d5={name:`labelEnd`,resolveAll:Yie,resolveTo:Xie,tokenize:Zie},Kie={tokenize:Qie},qie={tokenize:$ie},Jie={tokenize:eae};function Yie(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&O8(e,0,e.length,n),e}function Xie(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=k8(s,e.slice(a+1,a+r+3)),s=k8(s,[[`enter`,u,t]]),s=k8(s,J8(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=k8(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=k8(s,e.slice(o+1)),s=k8(s,[[`exit`,c,t]]),O8(e,a,e.length,s),e}function Zie(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(N8(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Kie,u,o?u:d)(t):t===91?e.attempt(qie,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(Jie,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function Qie(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return z8(t)?l5(e,a)(t):a(t)}function a(t){return t===41?u(t):o5(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return z8(t)?l5(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?c5(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return z8(t)?l5(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function $ie(e,t,n){let r=this;return i;function i(t){return s5.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(N8(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function eae(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var tae={name:`labelStartImage`,resolveAll:d5.resolveAll,tokenize:nae};function nae(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var rae={name:`labelStartLink`,resolveAll:d5.resolveAll,tokenize:iae};function iae(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var f5={name:`lineEnding`,tokenize:aae};function aae(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),G8(e,t,`linePrefix`)}}var p5={name:`thematicBreak`,tokenize:oae};function oae(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||R8(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),B8(t)?G8(e,s,`whitespace`)(t):s(t))}}var m5={continuation:{tokenize:uae},exit:fae,name:`list`,tokenize:lae},sae={partial:!0,tokenize:pae},cae={partial:!0,tokenize:dae};function lae(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:L8(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(p5,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return L8(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Z8,r.interrupt?n:u,e.attempt(sae,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return B8(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function uae(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Z8,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,G8(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!B8(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(cae,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,G8(e,e.attempt(m5,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function dae(e,t,n){let r=this;return G8(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function fae(e){e.exit(this.containerState.type)}function pae(e,t,n){let r=this;return G8(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!B8(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var h5={name:`setextUnderline`,resolveTo:mae,tokenize:hae};function mae(e,t){let n=e.length,r,i,a;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),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function hae(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),B8(t)?G8(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||R8(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var gae={tokenize:_ae};function _ae(e){let t=this,n=e.attempt(Z8,r,e.attempt(this.parser.constructs.flowInitial,i,G8(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Sie,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var vae={resolveAll:_5()},yae=g5(`string`),bae=g5(`text`);function g5(e){return{resolveAll:_5(e===`text`?xae:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function _5(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function xae(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Sae=s({attentionMarkers:()=>Aae,contentInitial:()=>wae,disable:()=>jae,document:()=>Cae,flow:()=>Eae,flowInitial:()=>Tae,insideSpan:()=>kae,string:()=>Dae,text:()=>Oae}),Cae={42:m5,43:m5,45:m5,48:m5,49:m5,50:m5,51:m5,52:m5,53:m5,54:m5,55:m5,56:m5,57:m5,62:Q8},wae={91:Die},Tae={[-2]:r5,[-1]:r5,32:r5},Eae={35:Nie,42:p5,45:[h5,p5],60:Lie,61:h5,95:p5,96:n5,126:n5},Dae={38:e5,92:$8},Oae={[-5]:f5,[-4]:f5,[-3]:f5,33:tae,38:e5,42:Y8,60:[rie,Wie],91:rae,92:[jie,$8],93:d5,95:Y8,96:gie},kae={null:[Y8,vae]},Aae={null:[42,95]},jae={null:[]};function Mae(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=k8(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=J8(a,l.events,l),l.events):[]}function f(e,t){return Pae(p(e),t)}function p(e){return Nae(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){R8(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&O8(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Nae(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Pae(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
62
- `;break;case-3:o=`\r
63
- `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function Fae(e){let t={constructs:j8([Sae,...(e||{}).extensions||[]]),content:n(Xre),defined:[],document:n(Qre),flow:n(gae),lazy:{},string:n(yae),text:n(bae)};return t;function n(e){return n;function n(n){return Mae(t,e,n)}}}function Iae(e){for(;!a5(e););return e}var v5=/[\0\t\n\r]/g;function Lae(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){let s=[],c,l,u,d,f;for(i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i)),u=0,t=``,n&&=(i.charCodeAt(0)===65279&&u++,void 0);u<i.length;){if(v5.lastIndex=u,c=v5.exec(i),d=c&&c.index!==void 0?c.index:i.length,f=i.charCodeAt(d),!c){t=i.slice(u);break}if(f===10&&u===d&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),u<d&&(s.push(i.slice(u,d)),e+=d-u),f){case 0:s.push(65533),e++;break;case 9:for(l=Math.ceil(e/4)*4,s.push(-2);e++<l;)s.push(-1);break;case 10:s.push(-4),e=1;break;default:r=!0,e=1}u=d+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Rae=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function zae(e){return e.replace(Rae,Bae)}function Bae(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return M8(n.slice(t?2:1),t?16:10)}return D8(n)||e}var y5={}.hasOwnProperty;function Vae(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),Hae(n)(Iae(Fae(n).document().write(Lae()(e,t,!0))))}function Hae(e){let t={transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:a(ve),autolinkProtocol:T,autolinkEmail:T,atxHeading:a(me),blockQuote:a(le),characterEscape:T,characterReference:T,codeFenced:a(ue),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:a(ue,o),codeText:a(de,o),codeTextData:T,data:T,codeFlowValue:T,definition:a(fe),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:a(pe),hardBreakEscape:a(he),hardBreakTrailing:a(he),htmlFlow:a(ge,o),htmlFlowData:T,htmlText:a(ge,o),htmlTextData:T,image:a(_e),label:o,link:a(ve),listItem:a(be),listItemValue:f,listOrdered:a(ye,d),listUnordered:a(ye),paragraph:a(xe),reference:re,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:a(me),strong:a(Se),thematicBreak:a(we)},exit:{atxHeading:c(),atxHeadingSequence:x,autolink:c(),autolinkEmail:ce,autolinkProtocol:se,blockQuote:c(),characterEscapeValue:E,characterReferenceMarkerHexadecimal:ae,characterReferenceMarkerNumeric:ae,characterReferenceValue:I,characterReference:oe,codeFenced:c(g),codeFencedFence:h,codeFencedFenceInfo:p,codeFencedFenceMeta:m,codeFlowValue:E,codeIndented:c(_),codeText:c(j),codeTextData:E,data:E,definition:c(),definitionDestinationString:b,definitionLabelString:v,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(O),hardBreakTrailing:c(O),htmlFlow:c(k),htmlFlowData:E,htmlText:c(A),htmlTextData:E,image:c(N),label:te,labelText:ee,lineEnding:D,link:c(M),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:P,resourceTitleString:F,resource:ne,setextHeading:c(w),setextHeadingLineSequence:C,setextHeadingText:S,strong:c(),thematicBreak:c()}};x5(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[]},a={stack:[r],tokenStack:[],config:t,enter:s,exit:l,buffer:o,resume:u,data:n},c=[],d=-1;for(;++d<e.length;)(e[d][1].type===`listOrdered`||e[d][1].type===`listUnordered`)&&(e[d][0]===`enter`?c.push(d):d=i(e,c.pop(),d));for(d=-1;++d<e.length;){let n=t[e[d][0]];y5.call(n,e[d][1].type)&&n[e[d][1].type].call(Object.assign({sliceSerialize:e[d][2].sliceSerialize},a),e[d][1])}if(a.tokenStack.length>0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||S5).call(a,void 0,e[0])}for(r.position={start:b5(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:b5(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d<t.transforms.length;)r=t.transforms[d](r)||r;return r}function i(e,t,n){let r=t-1,i=-1,a=!1,o,s,c,l;for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let i=r;for(s=void 0;i--;){let t=e[i];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=i}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),e.splice(s||r,0,[`exit`,o,t[2]]),r++,n++}if(t[1].type===`listItemPrefix`){let i={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=i,e.splice(r,0,[`enter`,i,t[2]]),r++,n++,c=void 0,l=!0}}}return e[t][1]._spread=a,n}function a(e,t){return n;function n(n){s.call(this,e(n),n),t&&t.call(this,n)}}function o(){this.stack.push({type:`fragment`,children:[]})}function s(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:b5(t.start),end:void 0}}function c(e){return t;function t(t){e&&e.call(this,t),l.call(this,t)}}function l(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(r)r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||S5).call(this,e,r[0]));else throw Error("Cannot close `"+e.type+"` ("+K6({start:e.start,end:e.end})+`): it’s not open`);n.position.end=b5(e.end)}function u(){return C8(this.stack.pop())}function d(){this.data.expectingFirstListItemValue=!0}function f(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function p(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function h(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function g(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function v(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=N8(this.sliceSerialize(e)).toLowerCase()}function y(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function x(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function S(){this.data.setextHeadingSlurpLineEnding=!0}function C(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function w(){this.data.setextHeadingSlurpLineEnding=void 0}function T(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];(!n||n.type!==`text`)&&(n=Ce(),n.position={start:b5(e.start),end:void 0},t.push(n)),this.stack.push(n)}function E(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=b5(e.end)}function D(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=b5(e.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(T.call(this,e),E.call(this,e))}function O(){this.data.atHardBreak=!0}function k(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=zae(t),n.identifier=N8(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function P(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function ne(){this.data.inReference=void 0}function re(){this.data.referenceType=`collapsed`}function ie(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=N8(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function ae(e){this.data.characterReferenceType=e.type}function I(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=M8(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=D8(t);let i=this.stack[this.stack.length-1];i.value+=r}function oe(e){let t=this.stack.pop();t.position.end=b5(e.end)}function se(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ce(e){E.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function le(){return{type:`blockquote`,children:[]}}function ue(){return{type:`code`,lang:null,meta:null,value:``}}function de(){return{type:`inlineCode`,value:``}}function fe(){return{type:`definition`,identifier:``,label:null,title:null,url:``}}function pe(){return{type:`emphasis`,children:[]}}function me(){return{type:`heading`,depth:0,children:[]}}function he(){return{type:`break`}}function ge(){return{type:`html`,value:``}}function _e(){return{type:`image`,title:null,url:``,alt:null}}function ve(){return{type:`link`,title:null,url:``,children:[]}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[]}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[]}}function xe(){return{type:`paragraph`,children:[]}}function Se(){return{type:`strong`,children:[]}}function Ce(){return{type:`text`,value:``}}function we(){return{type:`thematicBreak`}}}function b5(e){return{line:e.line,column:e.column,offset:e.offset}}function x5(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?x5(e,r):Uae(e,r)}}function Uae(e,t){let n;for(n in t)if(y5.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function S5(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+K6({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+K6({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+K6({start:t.start,end:t.end})+`) is still open`)}function Wae(e){let t=this;t.parser=n;function n(n){return Vae(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Gae(e,t){let n={type:`element`,tagName:`blockquote`,properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function Kae(e,t){let n={type:`element`,tagName:`br`,properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:`text`,value:`
64
- `}]}function qae(e,t){let n=t.value?t.value+`
65
- `:``,r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Jae(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Yae(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Xae(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=W8(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Zae(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Qae(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function C5(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function $ae(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return C5(e,t);let i={src:W8(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function eoe(e,t){let n={src:W8(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function toe(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function noe(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return C5(e,t);let i={href:W8(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function roe(e,t){let n={href:W8(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function ioe(e,t,n){let r=e.all(t),i=n?aoe(n):w5(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s<r.length;){let e=r[s];(i||s!==0||e.type!==`element`||e.tagName!==`p`)&&o.push({type:`text`,value:`
66
- `}),e.type===`element`&&e.tagName===`p`&&!i?o.push(...e.children):o.push(e)}let c=r[r.length-1];c&&(i||c.type!==`element`||c.tagName!==`p`)&&o.push({type:`text`,value:`
67
- `});let l={type:`element`,tagName:`li`,properties:a,children:o};return e.patch(t,l),e.applyData(t,l)}function aoe(e){let t=!1;if(e.type===`list`){t=e.spread||!1;let n=e.children,r=-1;for(;!t&&++r<n.length;)t=w5(n[r])}return t}function w5(e){return e.spread??e.children.length>1}function ooe(e,t){let n={},r=e.all(t),i=-1;for(typeof t.start==`number`&&t.start!==1&&(n.start=t.start);++i<r.length;){let e=r[i];if(e.type===`element`&&e.tagName===`li`&&e.properties&&Array.isArray(e.properties.className)&&e.properties.className.includes(`task-list-item`)){n.className=[`contains-task-list`];break}}let a={type:`element`,tagName:t.ordered?`ol`:`ul`,properties:n,children:e.wrap(r,!0)};return e.patch(t,a),e.applyData(t,a)}function soe(e,t){let n={type:`element`,tagName:`p`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function coe(e,t){let n={type:`root`,children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function loe(e,t){let n={type:`element`,tagName:`strong`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function uoe(e,t){let n=e.all(t),r=n.shift(),i=[];if(r){let n={type:`element`,tagName:`thead`,properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],n),i.push(n)}if(n.length>0){let r={type:`element`,tagName:`tbody`,properties:{},children:e.wrap(n,!0)},a=U6(t.children[1]),o=H6(t.children[t.children.length-1]);a&&o&&(r.position={start:a,end:o}),i.push(r)}let a={type:`element`,tagName:`table`,properties:{},children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function doe(e,t,n){let r=n?n.children:void 0,i=(r?r.indexOf(t):1)===0?`th`:`td`,a=n&&n.type===`table`?n.align:void 0,o=a?a.length:t.children.length,s=-1,c=[];for(;++s<o;){let n=t.children[s],r={},o=a?a[s]:void 0;o&&(r.align=o);let l={type:`element`,tagName:i,properties:r,children:[]};n&&(l.children=e.all(n),e.patch(n,l),l=e.applyData(n,l)),c.push(l)}let l={type:`element`,tagName:`tr`,properties:{},children:e.wrap(c,!0)};return e.patch(t,l),e.applyData(t,l)}function foe(e,t){let n={type:`element`,tagName:`td`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var T5=9,E5=32;function poe(e){let t=String(e),n=/\r?\n|\r/g,r=n.exec(t),i=0,a=[];for(;r;)a.push(D5(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return a.push(D5(t.slice(i),i>0,!1)),a.join(``)}function D5(e,t,n){let r=0,i=e.length;if(t){let t=e.codePointAt(r);for(;t===T5||t===E5;)r++,t=e.codePointAt(r)}if(n){let t=e.codePointAt(i-1);for(;t===T5||t===E5;)i--,t=e.codePointAt(i-1)}return i>r?e.slice(r,i):``}function moe(e,t){let n={type:`text`,value:poe(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function hoe(e,t){let n={type:`element`,tagName:`hr`,properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var goe={blockquote:Gae,break:Kae,code:qae,delete:Jae,emphasis:Yae,footnoteReference:Xae,heading:Zae,html:Qae,imageReference:$ae,image:eoe,inlineCode:toe,linkReference:noe,link:roe,listItem:ioe,list:ooe,paragraph:soe,root:coe,strong:loe,table:uoe,tableCell:foe,tableRow:doe,text:moe,thematicBreak:hoe,toml:O5,yaml:O5,definition:O5,footnoteDefinition:O5};function O5(){}var k5=typeof self==`object`?self:globalThis,A5=(e,t)=>{switch(e){case`Function`:case`SharedWorker`:case`Worker`:case`eval`:case`setInterval`:case`setTimeout`:throw TypeError(`unable to deserialize `+e)}return new k5[e](t)},_oe=(e,t)=>{let n=(t,n)=>(e.set(n,t),t),r=i=>{if(e.has(i))return e.get(i);let[a,o]=t[i];switch(a){case 0:case-1:return n(o,i);case 1:{let e=n([],i);for(let t of o)e.push(r(t));return e}case 2:{let e=n({},i);for(let[t,n]of o)e[r(t)]=r(n);return e}case 3:return n(new Date(o),i);case 4:{let{source:e,flags:t}=o;return n(new RegExp(e,t),i)}case 5:{let e=n(new Map,i);for(let[t,n]of o)e.set(r(t),r(n));return e}case 6:{let e=n(new Set,i);for(let t of o)e.add(r(t));return e}case 7:{let{name:e,message:t}=o;return n(typeof k5[e]==`function`?A5(e,t):Error(t),i)}case 8:return n(BigInt(o),i);case`BigInt`:return n(Object(BigInt(o)),i);case`ArrayBuffer`:return n(new Uint8Array(o).buffer,o);case`DataView`:{let{buffer:e}=new Uint8Array(o);return n(new DataView(e),o)}}return n(A5(a,o),i)};return r},j5=e=>_oe(new Map,e)(0),M5=``,{toString:voe}={},{keys:yoe}=Object,N5=e=>{let t=typeof e;if(t!==`object`||!e)return[0,t];let n=voe.call(e).slice(8,-1);switch(n){case`Array`:return[1,M5];case`Object`:return[2,M5];case`Date`:return[3,M5];case`RegExp`:return[4,M5];case`Map`:return[5,M5];case`Set`:return[6,M5];case`DataView`:return[1,n]}return n.includes(`Array`)?[1,n]:e instanceof Error?[7,e.name||`Error`]:[2,n]},P5=([e,t])=>e===0&&(t===`function`||t===`symbol`),boe=(e,t,n,r)=>{let i=(e,t)=>{let i=r.push(e)-1;return n.set(t,i),i},a=r=>{if(n.has(r))return n.get(r);let[o,s]=N5(r);switch(o){case 0:{let t=r;switch(s){case`bigint`:o=8,t=r.toString();break;case`function`:case`symbol`:if(e)throw TypeError(`unable to serialize `+s);t=null;break;case`undefined`:return i([-1],r)}return i([o,t],r)}case 1:{if(s){let e=r;return s===`DataView`?e=new Uint8Array(r.buffer):s===`ArrayBuffer`&&(e=new Uint8Array(r)),i([s,[...e]],r)}let e=[],t=i([o,e],r);for(let t of r)e.push(a(t));return t}case 2:{if(s)switch(s){case`BigInt`:return i([s,r.toString()],r);case`Boolean`:case`Number`:case`String`:return i([s,r.valueOf()],r)}if(t&&`toJSON`in r)return a(r.toJSON());let n=[],c=i([o,n],r);for(let t of yoe(r))(e||!P5(N5(r[t])))&&n.push([a(t),a(r[t])]);return c}case 3:return i([o,isNaN(r.getTime())?M5:r.toISOString()],r);case 4:{let{source:e,flags:t}=r;return i([o,{source:e,flags:t}],r)}case 5:{let t=[],n=i([o,t],r);for(let[n,i]of r)(e||!(P5(N5(n))||P5(N5(i))))&&t.push([a(n),a(i)]);return n}case 6:{let t=[],n=i([o,t],r);for(let n of r)(e||!P5(N5(n)))&&t.push(a(n));return n}}let{message:c}=r;return i([o,{name:s,message:c}],r)};return a},F5=(e,{json:t,lossy:n}={})=>{let r=[];return boe(!(t||n),!!t,new Map,r)(e),r},I5=typeof structuredClone==`function`?(e,t)=>t&&(`json`in t||`lossy`in t)?j5(F5(e,t)):structuredClone(e):(e,t)=>j5(F5(e,t));function xoe(e,t){let n=[{type:`text`,value:`↩`}];return t>1&&n.push({type:`element`,tagName:`sup`,properties:{},children:[{type:`text`,value:String(t)}]}),n}function Soe(e,t){return`Back to reference `+(e+1)+(t>1?`-`+t:``)}function Coe(e){let t=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,n=e.options.footnoteBackContent||xoe,r=e.options.footnoteBackLabel||Soe,i=e.options.footnoteLabel||`Footnotes`,a=e.options.footnoteLabelTagName||`h2`,o=e.options.footnoteLabelProperties||{className:[`sr-only`]},s=[],c=-1;for(;++c<e.footnoteOrder.length;){let i=e.footnoteById.get(e.footnoteOrder[c]);if(!i)continue;let a=e.all(i),o=String(i.identifier).toUpperCase(),l=W8(o.toLowerCase()),u=0,d=[],f=e.footnoteCounts.get(o);for(;f!==void 0&&++u<=f;){d.length>0&&d.push({type:`text`,value:` `});let e=typeof n==`string`?n:n(c,u);typeof e==`string`&&(e={type:`text`,value:e}),d.push({type:`element`,tagName:`a`,properties:{href:`#`+t+`fnref-`+l+(u>1?`-`+u:``),dataFootnoteBackref:``,ariaLabel:typeof r==`string`?r:r(c,u),className:[`data-footnote-backref`]},children:Array.isArray(e)?e:[e]})}let p=a[a.length-1];if(p&&p.type===`element`&&p.tagName===`p`){let e=p.children[p.children.length-1];e&&e.type===`text`?e.value+=` `:p.children.push({type:`text`,value:` `}),p.children.push(...d)}else a.push(...d);let m={type:`element`,tagName:`li`,properties:{id:t+`fn-`+l},children:e.wrap(a,!0)};e.patch(i,m),s.push(m)}if(s.length!==0)return{type:`element`,tagName:`section`,properties:{dataFootnotes:!0,className:[`footnotes`]},children:[{type:`element`,tagName:a,properties:{...I5(o),id:`footnote-label`},children:[{type:`text`,value:i}]},{type:`text`,value:`
68
- `},{type:`element`,tagName:`ol`,properties:{},children:e.wrap(s,!0)},{type:`text`,value:`
69
- `}]}}var L5=(function(e){if(e==null)return Doe;if(typeof e==`function`)return R5(e);if(typeof e==`object`)return Array.isArray(e)?woe(e):Toe(e);if(typeof e==`string`)return Eoe(e);throw Error(`Expected function, string, or object as test`)});function woe(e){let t=[],n=-1;for(;++n<e.length;)t[n]=L5(e[n]);return R5(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Toe(e){let t=e;return R5(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Eoe(e){return R5(t);function t(t){return t&&t.type===e}}function R5(e){return t;function t(t,n,r){return!!(Ooe(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Doe(){return!0}function Ooe(e){return typeof e==`object`&&!!e&&`type`in e}function koe(e){return e}var z5=[];function B5(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=L5(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+koe(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=z5,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=Aoe(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function Aoe(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?z5:[e]}function V5(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),B5(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}var H5={}.hasOwnProperty,joe={};function Moe(e,t){let n=t||joe,r=new Map,i=new Map,a={all:s,applyData:Poe,definitionById:r,footnoteById:i,footnoteCounts:new Map,footnoteOrder:[],handlers:{...goe,...n.handlers},one:o,options:n,patch:Noe,wrap:Ioe};return V5(e,function(e){if(e.type===`definition`||e.type===`footnoteDefinition`){let t=e.type===`definition`?r:i,n=String(e.identifier).toUpperCase();t.has(n)||t.set(n,e)}}),a;function o(e,t){let n=e.type,r=a.handlers[n];if(H5.call(a.handlers,n)&&r)return r(a,e,t);if(a.options.passThrough&&a.options.passThrough.includes(n)){if(`children`in e){let{children:t,...n}=e,r=I5(n);return r.children=a.all(e),r}return I5(e)}return(a.options.unknownHandler||Foe)(a,e,t)}function s(e){let t=[];if(`children`in e){let n=e.children,r=-1;for(;++r<n.length;){let i=a.one(n[r],e);if(i){if(r&&n[r-1].type===`break`&&(!Array.isArray(i)&&i.type===`text`&&(i.value=U5(i.value)),!Array.isArray(i)&&i.type===`element`)){let e=i.children[0];e&&e.type===`text`&&(e.value=U5(e.value))}Array.isArray(i)?t.push(...i):t.push(i)}}}return t}}function Noe(e,t){e.position&&(t.position=G6(e))}function Poe(e,t){let n=t;if(e&&e.data){let t=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;typeof t==`string`&&(n.type===`element`?n.tagName=t:n={type:`element`,tagName:t,properties:{},children:`children`in n?n.children:[n]}),n.type===`element`&&i&&Object.assign(n.properties,I5(i)),`children`in n&&n.children&&r!=null&&(n.children=r)}return n}function Foe(e,t){let n=t.data||{},r=`value`in t&&!(H5.call(n,`hProperties`)||H5.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 Ioe(e,t){let n=[],r=-1;for(t&&n.push({type:`text`,value:`
70
- `});++r<e.length;)r&&n.push({type:`text`,value:`
71
- `}),n.push(e[r]);return t&&e.length>0&&n.push({type:`text`,value:`
72
- `}),n}function U5(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function W5(e,t){let n=Moe(e,t),r=n.one(e,void 0),i=Coe(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:`
73
- `},i)),a}function Loe(e,t){return e&&`run`in e?async function(n,r){let i=W5(n,{file:r,...t});await e.run(i,r)}:function(n,r){return W5(n,{file:r,...e||t})}}function G5(e){if(e)throw e}var Roe=o(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function K5(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zoe(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a){r(a);return}for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?Boe(s,i)(...o):r(null,...o)}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function Boe(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var q5={basename:Voe,dirname:Hoe,extname:Uoe,join:Woe,sep:`/`};function Voe(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);J5(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function Hoe(e){if(J5(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||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function Uoe(e){J5(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function Woe(...e){let t=-1,n;for(;++t<e.length;)J5(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:Goe(n)}function Goe(e){J5(e);let t=e.codePointAt(0)===47,n=Koe(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function Koe(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function J5(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var qoe={cwd:Joe};function Joe(){return`/`}function Y5(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Yoe(e){if(typeof e==`string`)e=new URL(e);else if(!Y5(e)){let t=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:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Xoe(e)}function Xoe(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var X5=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Z5=class{constructor(e){let t;t=e?Y5(e)?{path:e}:typeof e==`string`||Zoe(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:qoe.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<X5.length;){let e=X5[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)X5.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?q5.basename(this.path):void 0}set basename(e){$5(e,`basename`),Q5(e,`basename`),this.path=q5.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?q5.dirname(this.path):void 0}set dirname(e){e7(this.basename,`dirname`),this.path=q5.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?q5.extname(this.path):void 0}set extname(e){if(Q5(e,`extname`),e7(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=q5.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){Y5(e)&&(e=Yoe(e)),$5(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?q5.basename(this.path,this.extname):void 0}set stem(e){$5(e,`stem`),Q5(e,`stem`),this.path=q5.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new X6(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function Q5(e,t){if(e&&e.includes(q5.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+q5.sep+"`")}function $5(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function e7(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Zoe(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Qoe=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),t7=l(Roe(),1),$oe={}.hasOwnProperty,ese=new class e extends Qoe{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=zoe()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,t7.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(i7(`data`,this.frozen),this.namespace[e]=t,this):$oe.call(this.namespace,e)&&this.namespace[e]||void 0:e?(i7(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=s7(e),n=this.parser||this.Parser;return n7(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),n7(`process`,this.parser||this.Parser),r7(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=s7(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);nse(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),n7(`processSync`,this.parser||this.Parser),r7(`processSync`,this.compiler||this.Compiler),this.process(e,r),o7(`processSync`,`process`,t),n;function r(e,r){t=!0,G5(e),n=r}}run(e,t,n){a7(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=s7(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),o7(`runSync`,`run`,n),r;function i(e,t){G5(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=s7(t),r=this.compiler||this.Compiler;return r7(`stringify`,r),a7(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(i7(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw 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(e.plugins),e.settings&&(r.settings=(0,t7.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];K5(o)&&K5(r)&&(r=(0,t7.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function n7(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function r7(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function i7(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function a7(e){if(!K5(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function o7(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function s7(e){return tse(e)?e:new Z5(e)}function tse(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function nse(e){return typeof e==`string`||rse(e)}function rse(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var c7=[],l7={allowDangerousHtml:!0},ise=/^(https?|ircs?|mailto|xmpp)$/i,ase=[{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 u7(e){let t=ose(e),n=sse(e);return cse(t.runSync(t.parse(n),n),e)}function ose(e){let t=e.rehypePlugins||c7,n=e.remarkPlugins||c7,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...l7}:l7;return ese().use(Wae).use(n).use(Loe,r).use(t)}function sse(e){let t=e.children||``,n=new Z5;return typeof t==`string`?n.value=t:``+t,n}function cse(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||lse;for(let e of ase)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return V5(e,l),r8(e,{Fragment:L.Fragment,components:i,ignoreInvalidStyle:!0,jsx:L.jsx,jsxs:L.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in S8)if(Object.hasOwn(S8,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=S8[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function lse(e){let 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||ise.test(e.slice(0,t))?e:``}var d7=[`ariaDescribedBy`,`ariaLabel`,`ariaLabelledBy`],f7={ancestors:{tbody:[`table`],td:[`table`],th:[`table`],thead:[`table`],tfoot:[`table`],tr:[`table`]},attributes:{a:[...d7,`dataFootnoteBackref`,`dataFootnoteRef`,[`className`,`data-footnote-backref`],`href`],blockquote:[`cite`],code:[[`className`,/^language-./]],del:[`cite`],div:[`itemScope`,`itemType`],dl:[...d7],h2:[[`className`,`sr-only`]],img:[...d7,`longDesc`,`src`],input:[[`disabled`,!0],[`type`,`checkbox`]],ins:[`cite`],li:[[`className`,`task-list-item`]],ol:[...d7,[`className`,`contains-task-list`]],q:[`cite`],section:[`dataFootnotes`,[`className`,`footnotes`]],source:[`srcSet`],summary:[...d7],table:[...d7],ul:[...d7,[`className`,`contains-task-list`]],"*":`abbr.accept.acceptCharset.accessKey.action.align.alt.axis.border.cellPadding.cellSpacing.char.charOff.charSet.checked.clear.colSpan.color.cols.compact.coords.dateTime.dir.encType.frame.hSpace.headers.height.hrefLang.htmlFor.id.isMap.itemProp.label.lang.maxLength.media.method.multiple.name.noHref.noShade.noWrap.open.prompt.readOnly.rev.rowSpan.rows.rules.scope.selected.shape.size.span.start.summary.tabIndex.title.useMap.vAlign.value.width`.split(`.`)},clobber:[`ariaDescribedBy`,`ariaLabelledBy`,`id`,`name`],clobberPrefix:`user-content-`,protocols:{cite:[`http`,`https`],href:[`http`,`https`,`irc`,`ircs`,`mailto`,`xmpp`],longDesc:[`http`,`https`],src:[`http`,`https`]},required:{input:{disabled:!0,type:`checkbox`}},strip:[`script`],tagNames:`a.b.blockquote.br.code.dd.del.details.div.dl.dt.em.h1.h2.h3.h4.h5.h6.hr.i.img.input.ins.kbd.li.ol.p.picture.pre.q.rp.rt.ruby.s.samp.section.source.span.strike.strong.sub.summary.sup.table.tbody.td.tfoot.th.thead.tr.tt.ul.var`.split(`.`)},p7={}.hasOwnProperty;function use(e,t){let n={type:`root`,children:[]},r=m7({schema:t?{...f7,...t}:f7,stack:[]},e);return r&&(Array.isArray(r)?r.length===1?n=r[0]:n.children=r:n=r),n}function m7(e,t){if(t&&typeof t==`object`){let n=t;switch(typeof n.type==`string`?n.type:``){case`comment`:return dse(e,n);case`doctype`:return fse(e,n);case`element`:return pse(e,n);case`root`:return mse(e,n);case`text`:return hse(e,n)}}}function dse(e,t){if(e.schema.allowComments){let e=typeof t.value==`string`?t.value:``,n=e.indexOf(`-->`),r={type:`comment`,value:n<0?e:e.slice(0,n)};return v7(r,t),r}}function fse(e,t){if(e.schema.allowDoctypes){let e={type:`doctype`};return v7(e,t),e}}function pse(e,t){let n=typeof t.tagName==`string`?t.tagName:``;e.stack.push(n);let r=h7(e,t.children),i=gse(e,t.properties);e.stack.pop();let a=!1;if(n&&n!==`*`&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&p7.call(e.schema.ancestors,n))){let t=e.schema.ancestors[n],r=-1;for(a=!1;++r<t.length;)e.stack.includes(t[r])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;let o={type:`element`,tagName:n,properties:i,children:r};return v7(o,t),o}function mse(e,t){let n={type:`root`,children:h7(e,t.children)};return v7(n,t),n}function hse(e,t){let n={type:`text`,value:typeof t.value==`string`?t.value:``};return v7(n,t),n}function h7(e,t){let n=[];if(Array.isArray(t)){let r=t,i=-1;for(;++i<r.length;){let t=m7(e,r[i]);t&&(Array.isArray(t)?n.push(...t):n.push(t))}}return n}function gse(e,t){let n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,a=r&&p7.call(r,n)?r[n]:void 0,o=r&&p7.call(r,`*`)?r[`*`]:void 0,s=t&&typeof t==`object`?t:{},c={},l;for(l in s)if(p7.call(s,l)){let t=s[l],n=g7(e,y7(a,l),l,t);n??=g7(e,y7(o,l),l,t),n!=null&&(c[l]=n)}if(i&&p7.call(i,n)){let e=i[n];for(l in e)p7.call(e,l)&&!p7.call(c,l)&&(c[l]=e[l])}return c}function g7(e,t,n,r){return t?Array.isArray(r)?_se(e,t,n,r):_7(e,t,n,r):void 0}function _se(e,t,n,r){let i=-1,a=[];for(;++i<r.length;){let o=_7(e,t,n,r[i]);(typeof o==`number`||typeof o==`string`)&&a.push(o)}return a}function _7(e,t,n,r){if((typeof r==`boolean`||typeof r==`number`||typeof r==`string`)&&vse(e,n,r)){if(typeof t==`object`&&t.length>1){let e=!1,n=0;for(;++n<t.length;){let i=t[n];if(i&&typeof i==`object`&&`flags`in i){if(i.test(String(r))){e=!0;break}}else if(i===r){e=!0;break}}if(!e)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function vse(e,t,n){let r=e.schema.protocols&&p7.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;let i=String(n),a=i.indexOf(`:`),o=i.indexOf(`?`),s=i.indexOf(`#`),c=i.indexOf(`/`);if(a<0||c>-1&&a>c||o>-1&&a>o||s>-1&&a>s)return!0;let l=-1;for(;++l<r.length;){let e=r[l];if(a===e.length&&i.slice(0,e.length)===e)return!0}return!1}function v7(e,t){let n=G6(t);t.data&&(e.data=I5(t.data)),n&&(e.position=n)}function y7(e,t){let n,r=-1;if(e)for(;++r<e.length;){let i=e[r],a=typeof i==`string`?i:i[0];if(a===t)return i;a===`data*`&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()===`data`)return n}function b7(e){return function(t){return use(t,e)}}function x7(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function yse(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function bse(e,t,n){let r=L5((n||{}).ignore||[]),i=xse(t),a=-1;for(;++a<i.length;)B5(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&u.push({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length}}function xse(e){let t=[];if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([Sse(e[0]),Cse(e[1])])}return t}function Sse(e){return typeof e==`string`?new RegExp(yse(e),`g`):e}function Cse(e){return typeof e==`function`?e:function(){return e}}var S7=`phrasing`,C7=[`autolink`,`link`,`image`,`label`];function wse(){return{transforms:[jse],enter:{literalAutolink:Ese,literalAutolinkEmail:w7,literalAutolinkHttp:w7,literalAutolinkWww:w7},exit:{literalAutolink:Ase,literalAutolinkEmail:kse,literalAutolinkHttp:Dse,literalAutolinkWww:Ose}}}function Tse(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:S7,notInConstruct:C7},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:S7,notInConstruct:C7},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:S7,notInConstruct:C7}]}}function Ese(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function w7(e){this.config.enter.autolinkProtocol.call(this,e)}function Dse(e){this.config.exit.autolinkProtocol.call(this,e)}function Ose(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function kse(e){this.config.exit.autolinkEmail.call(this,e)}function Ase(e){this.exit(e)}function jse(e){bse(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Mse],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Nse]],{ignore:[`link`,`linkReference`]})}function Mse(e,t,n,r,i){let a=``;if(!T7(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!Pse(n)))return!1;let o=Fse(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function Nse(e,t,n,r){return!T7(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function Pse(e){let 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 Fse(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=x7(e,`(`),a=x7(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function T7(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||H8(n)||V8(n))&&(!t||n!==47)}E7.peek=Wse;function Ise(){this.buffer()}function Lse(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Rse(){this.buffer()}function zse(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Bse(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=N8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Vse(e){this.exit(e)}function Hse(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=N8(this.sliceSerialize(e)).toLowerCase(),n.label=t}function Use(e){this.exit(e)}function Wse(){return`[`}function E7(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Gse(){return{enter:{gfmFootnoteCallString:Ise,gfmFootnoteCall:Lse,gfmFootnoteDefinitionLabelString:Rse,gfmFootnoteDefinition:zse},exit:{gfmFootnoteCallString:Bse,gfmFootnoteCall:Vse,gfmFootnoteDefinitionLabelString:Hse,gfmFootnoteDefinition:Use}}}function Kse(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:E7},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
74
- `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?D7:qse))),s(),o}}function qse(e,t,n){return t===0?e:D7(e,t,n)}function D7(e,t,n){return(n?``:` `)+e}var Jse=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];O7.peek=$se;function Yse(){return{canContainEols:[`delete`],enter:{strikethrough:Zse},exit:{strikethrough:Qse}}}function Xse(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Jse}],handlers:{delete:O7}}}function Zse(e){this.enter({type:`delete`,children:[]},e)}function Qse(e){this.exit(e)}function O7(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function $se(){return`~`}function ece(e){return e.length}function tce(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||ece,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=nce(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=k7(r[d]);else{let e=k7(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding!==!1&&(n.alignDelimiters!==!1||i!==``)&&(n.delimiterStart!==!1||d)&&r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
75
- `)}function nce(e){return e==null?``:String(e)}function k7(e){let 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 rce(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),ice);return i(),o}function ice(e,t,n){return`>`+(n?``:` `)+e}function ace(e,t){return A7(e,t.inConstruct,!0)&&!A7(e,t.notInConstruct,!1)}function A7(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 j7(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
76
- `&&ace(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?``:` `;return`\\
77
- `}function oce(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function sce(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 cce(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function lce(e,t,n,r){let i=cce(n),a=e.value||``,o=i==="`"?`GraveAccent`:`Tilde`;if(sce(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,uce);return e(),t}let s=n.createTracker(r),c=i.repeat(Math.max(oce(a,i)+1,3)),l=n.enter(`codeFenced`),u=s.move(c);if(e.lang){let t=n.enter(`codeFencedLang${o}`);u+=s.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...s.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${o}`);u+=s.move(` `),u+=s.move(n.safe(e.meta,{before:u,after:`
78
- `,encode:["`"],...s.current()})),t()}return u+=s.move(`
79
- `),a&&(u+=s.move(a+`
80
- `)),u+=s.move(c),l(),u}function uce(e,t,n){return(n?``:` `)+e}function M7(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function dce(e,t,n,r){let i=M7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
81
- `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function fce(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function N7(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function P7(e,t,n){let r=q8(e),i=q8(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}}F7.peek=pce;function F7(e,t,n,r){let i=fce(n),a=n.enter(`emphasis`),o=n.createTracker(r),s=o.move(i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=P7(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=N7(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=P7(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+N7(d));let p=o.move(i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function pce(e,t,n){return n.options.emphasis||`*`}function mce(e,t){let n=!1;return V5(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&C8(e)&&(t.options.setext||n))}function hce(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(mce(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
82
- `,after:`
83
- `});return r(),t(),o+`
84
- `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
85
- `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
86
- `,...a.current()});return/^[\t ]/.test(l)&&(l=N7(l.charCodeAt(0))+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}I7.peek=gce;function I7(e){return e.value||``}function gce(){return`<`}L7.peek=_ce;function L7(e,t,n,r){let i=M7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function _ce(){return`!`}R7.peek=vce;function R7(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function vce(){return`!`}z7.peek=yce;function z7(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e),i;if(e.atBreak)for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function yce(){return"`"}function B7(e,t){let n=C8(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))}V7.peek=bce;function V7(e,t,n,r){let i=M7(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(B7(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function bce(e,t,n){return B7(e,n)?`<`:`[`}H7.peek=xce;function H7(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function xce(){return`[`}function U7(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Sce(e){let t=U7(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Cce(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function W7(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function wce(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Cce(n):U7(n),s=e.ordered?o===`.`?`)`:`.`:Sce(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.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&&(c=!0),W7(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Tce(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ece(e,t,n,r){let i=Tce(n),a=n.bulletCurrent||U7(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Dce(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Oce=L5([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function kce(e,t,n,r){return(e.children.some(function(e){return Oce(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Ace(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}G7.peek=jce;function G7(e,t,n,r){let i=Ace(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=P7(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=N7(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=P7(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+N7(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function jce(e,t,n){return n.options.strong||`*`}function Mce(e,t,n,r){return n.safe(e.value,r)}function Nce(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Pce(e,t,n){let r=(W7(n)+(n.options.ruleSpaces?` `:``)).repeat(Nce(n));return n.options.ruleSpaces?r.slice(0,-1):r}var K7={blockquote:rce,break:j7,code:lce,definition:dce,emphasis:F7,hardBreak:j7,heading:hce,html:I7,image:L7,imageReference:R7,inlineCode:z7,link:V7,linkReference:H7,list:wce,listItem:Ece,paragraph:Dce,root:kce,strong:G7,text:Mce,thematicBreak:Pce};function Fce(){return{enter:{table:Ice,tableData:J7,tableHeader:J7,tableRow:Rce},exit:{codeText:zce,table:Lce,tableData:q7,tableHeader:q7,tableRow:q7}}}function Ice(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Lce(e){this.exit(e),this.data.inTable=void 0}function Rce(e){this.enter({type:`tableRow`,children:[]},e)}function q7(e){this.exit(e)}function J7(e){this.enter({type:`tableCell`,children:[]},e)}function zce(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Bce));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Bce(e,t){return t===`|`?t:e}function Vce(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
87
- `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
88
- `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return tce(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=K7.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function Hce(){return{exit:{taskListCheckValueChecked:Y7,taskListCheckValueUnchecked:Y7,paragraph:Wce}}}function Uce(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:Gce}}}function Y7(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function Wce(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function Gce(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=K7.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function Kce(){return[wse(),Gse(),Yse(),Fce(),Hce()]}function qce(e){return{extensions:[Tse(),Kse(e),Xse(),Vce(e),Uce()]}}var Jce={tokenize:ele,partial:!0},X7={tokenize:tle,partial:!0},Z7={tokenize:nle,partial:!0},Q7={tokenize:rle,partial:!0},Yce={tokenize:ile,partial:!0},$7={name:`wwwAutolink`,tokenize:Qce,previous:i9},e9={name:`protocolAutolink`,tokenize:$ce,previous:a9},t9={name:`emailAutolink`,tokenize:Zce,previous:o9},n9={};function Xce(){return{text:n9}}for(var r9=48;r9<123;)n9[r9]=t9,r9++,r9===58?r9=65:r9===91&&(r9=97);n9[43]=t9,n9[45]=t9,n9[46]=t9,n9[95]=t9,n9[72]=[t9,e9],n9[104]=[t9,e9],n9[87]=[t9,$7],n9[119]=[t9,$7];function Zce(e,t,n){let r=this,i,a;return o;function o(t){return!s9(t)||!o9.call(r,r.previous)||c9(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return s9(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(Yce,u,l)(t):t===45||t===95||F8(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&P8(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Qce(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!i9.call(r,r.previous)||c9(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(Jce,e.attempt(X7,e.attempt(Z7,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function $ce(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&a9.call(r,r.previous)&&!c9(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(P8(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||I8(t)||z8(t)||H8(t)||V8(t)?n(t):e.attempt(X7,e.attempt(Z7,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ele(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function tle(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(Q7,c,s)(t):t===null||z8(t)||H8(t)||t!==45&&V8(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function nle(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(Q7,t,a)(o):o===null||z8(o)||H8(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function rle(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),a):o===93?(e.consume(o),i):o===60||o===null||z8(o)||H8(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||z8(e)||H8(e)?t(e):r(e)}function a(e){return P8(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):P8(t)?(e.consume(t),o):n(t)}}function ile(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return F8(e)?n(e):t(e)}}function i9(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||z8(e)}function a9(e){return!P8(e)}function o9(e){return!(e===47||s9(e))}function s9(e){return e===43||e===45||e===46||e===95||F8(e)}function c9(e){let t=e.length,n=!1;for(;t--;){let 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}var ale={tokenize:ple,partial:!0};function ole(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:ule,continuation:{tokenize:dle},exit:fle}},text:{91:{name:`gfmFootnoteCall`,tokenize:lle},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:sle,resolveTo:cle}}}}function sle(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=N8(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function cle(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`;let 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++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function lle(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||z8(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(N8(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return z8(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function ule(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||z8(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=N8(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return z8(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),G8(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function dle(e,t,n){return e.check(Z8,t,e.attempt(ale,t,n))}function fle(e){e.exit(`gfmFootnoteDefinition`)}function ple(e,t,n){let r=this;return G8(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function mle(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&O8(o,o.length,0,J8(s,e.slice(r+1,n),t)),O8(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),O8(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=q8(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=q8(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var hle=class{constructor(){this.map=[]}add(e,t,n){gle(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function gle(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 _le(e,t){let n=!1,r=[];for(;t<e.length;){let 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`){let e=r.length-1;r[e]=r[e]===`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 vle(){return{flow:{null:{name:`table`,tokenize:yle,resolveAll:ble}}}}function yle(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):R8(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):B8(t)?G8(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||z8(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,B8(t)?G8(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return B8(t)?G8(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||R8(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return B8(t)?G8(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||R8(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||R8(n)?(e.exit(`tableRow`),t(n)):B8(n)?G8(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||z8(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function ble(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new hle;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(u9(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=l9(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=l9(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=l9(f,t,o,i,n,d)):(o[0]=o[1],d=l9(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&u9(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=_le(t.events,n))}return e}function l9(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},d9(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=d9(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=d9(t.events,n[2]),a=d9(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},d9(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function u9(e,t,n,r,i){let a=[],o=d9(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function d9(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var xle={name:`tasklistCheck`,tokenize:Cle};function Sle(){return{text:{91:xle}}}function Cle(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return z8(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return R8(r)?t(r):B8(r)?e.check({tokenize:wle},t,n)(r):n(r)}}function wle(e,t,n){return G8(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Tle(e){return j8([Xce(),ole(),mle(e),vle(),Sle()])}var Ele={};function f9(e){let t=this,n=e||Ele,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Tle(n)),a.push(Kce()),o.push(qce(n))}function p9(e){let t=e.refreshGeneration??0,n={pullRequestId:e.pullRequestId,repositoryName:e.repositoryName,profile:e.profile,region:e.region};return Yz((0,N.useMemo)(()=>ZK.query(`prs`,`comments`,{query:n,serializationKey:`${e.profile}:${e.region}:${e.repositoryName}:${e.pullRequestId}:${String(t)}`,timeToLive:`60 seconds`}),[e.pullRequestId,e.repositoryName,e.profile,e.region,t]))}function m9(e){let[t,n]=(0,N.useState)(!1),[r,i]=(0,N.useState)(!1),a=()=>localStorage.getItem(e)===`true`,o=(0,N.useCallback)(()=>!a()&&(n(!0),!0),[e]),s=(0,N.useCallback)(()=>{r&&localStorage.setItem(e,`true`),n(!1)},[r,e]);return{cancel:(0,N.useCallback)(()=>{n(!1)},[]),dismiss:s,dontRemind:r,isDismissed:a,setDontRemind:i,show:o,visible:t}}function Dle({items:e,onRefresh:t,permissionPrompt:n,stableKey:r}){let[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(null),c=(0,N.useRef)(!1),l=(0,N.useRef)(null),u=(0,N.useRef)(t);u.current=t;let d=(0,N.useCallback)(()=>u.current(),[]);return(0,N.useEffect)(()=>{n?c.current=!0:c.current&&(c.current=!1,d())},[n,d]),(0,N.useEffect)(()=>{if((i||o)&&!n){let e=500,t=Date.now(),n=()=>{if(Date.now()-t>3e4){a(null),s(null);return}d(),e=Math.min(e*1.5,3e3),l.current=setTimeout(n,e)};return l.current=setTimeout(n,e),()=>{l.current&&clearTimeout(l.current)}}},[i,o,n,d]),(0,N.useEffect)(()=>{a(null),s(null),l.current&&=(clearTimeout(l.current),null)},[r]),{pendingAdd:i,pendingRemove:o,add:e=>a(e),remove:e=>s(e)}}var Ole=`cc1_`,h9=kL.check(eL(),tL(180)),kle=G({accountId:h9,pullRequestId:AW,repositoryName:jW,region:NW}).check(LI(e=>gj(JSON.stringify([e.accountId,e.pullRequestId,e.repositoryName,e.region])).length+4<=1024?void 0:`Pull-request coordinate token exceeds the router parameter limit`));pI([h9,h9,h9,h9]),G({accountId:h9,pullRequestId:h9,repositoryName:h9,region:h9}),ID(`PullRequestCoordinateDecodeError`);var Ale=e=>{let t=qF(kle)(e);return`${Ole}${gj(JSON.stringify([t.accountId,t.pullRequestId,t.repositoryName,t.region]))}`},g9=(e,t)=>{let n=t.filePath??e.filePath;return n===void 0||t.lineNumber===void 0||!Number.isInteger(t.lineNumber)||t.lineNumber<1||e.beforeCommitId===void 0||e.afterCommitId===void 0||e.relativeFileVersion===void 0?null:{afterCommitId:e.afterCommitId,author:t.author,beforeCommitId:e.beforeCommitId,commentId:t.id,content:t.content,filePath:n,lineNumber:t.lineNumber,side:e.relativeFileVersion===`AFTER`?`after`:`before`}},jle=(e,t)=>e.beforeCommitId===t.baseCommit&&e.afterCommitId===t.headCommit,Mle=(e,t)=>e.find(e=>t.side===`after`?e.status!==`deleted`&&e.path===t.filePath:e.status!==`added`&&(e.previousPath??e.path)===t.filePath)?.index,_9=e=>{let t=e.match(/^\w+\(([^)]+)\):/);if(t?.[1])return t[1];let n=e.match(/^([A-Z]+-\d+):/);return n?.[1]?n[1]:null},Z={page:`_page_1ww23_1`,hero:`_hero_1ww23_2`,decisionWorkspace:`_decisionWorkspace_1ww23_3`,actionRail:`_actionRail_1ww23_4`,actionGroup:`_actionGroup_1ww23_5`,revisionCard:`_revisionCard_1ww23_6`,revisionHeading:`_revisionHeading_1ww23_7`,branchPair:`_branchPair_1ww23_8`,reviewWorkspace:`_reviewWorkspace_1ww23_9`,contentColumn:`_contentColumn_1ww23_10`,contentSection:`_contentSection_1ww23_11`,sectionHeading:`_sectionHeading_1ww23_12`,evidenceColumn:`_evidenceColumn_1ww23_13`,approvalSection:`_approvalSection_1ww23_14`,approverCard:`_approverCard_1ww23_15`,approverBody:`_approverBody_1ww23_16`,approverPicker:`_approverPicker_1ww23_17`,scoreBreakdown:`_scoreBreakdown_1ww23_18`,scoreCategories:`_scoreCategories_1ww23_19`,scoreCategoryCopy:`_scoreCategoryCopy_1ww23_20`,comments:`_comments_1ww23_21`,commentLocations:`_commentLocations_1ww23_22`,commentLocation:`_commentLocation_1ww23_22`,commentBody:`_commentBody_1ww23_24`,loadingState:`_loadingState_1ww23_37`,backNavigation:`_backNavigation_1ww23_44`,eyebrow:`_eyebrow_1ww23_53`,heroMeta:`_heroMeta_1ww23_54`,actionHeading:`_actionHeading_1ww23_55`,approverHeading:`_approverHeading_1ww23_56`,approverTitle:`_approverTitle_1ww23_57`,approverSuggestions:`_approverSuggestions_1ww23_58`,suggestedApprovers:`_suggestedApprovers_1ww23_59`,approverMembers:`_approverMembers_1ww23_60`,commentMeta:`_commentMeta_1ww23_61`,scoreSummary:`_scoreSummary_1ww23_62`,factStates:`_factStates_1ww23_64`,title:`_title_1ww23_76`,textLink:`_textLink_1ww23_89`,codeLink:`_codeLink_1ww23_90`,stateLink:`_stateLink_1ww23_104`,disclosureTrigger:`_disclosureTrigger_1ww23_105`,iconAction:`_iconAction_1ww23_106`,suggestionChoice:`_suggestionChoice_1ww23_107`,suggestedApprover:`_suggestedApprover_1ww23_59`,removeApprover:`_removeApprover_1ww23_109`,approverInput:`_approverInput_1ww23_110`,verdict:`_verdict_1ww23_123`,actionButton:`_actionButton_1ww23_146`,facts:`_facts_1ww23_201`,commentPath:`_commentPath_1ww23_202`,description:`_description_1ww23_286`,markdown:`_markdown_1ww23_287`,disclosure:`_disclosure_1ww23_105`,disclosureIcon:`_disclosureIcon_1ww23_352`,disclosureContent:`_disclosureContent_1ww23_363`,approverPickerActions:`_approverPickerActions_1ww23_413`,approverField:`_approverField_1ww23_420`,approverMember:`_approverMember_1ww23_60`,scoreTrack:`_scoreTrack_1ww23_514`,scoreFill:`_scoreFill_1ww23_522`,scoreCategory:`_scoreCategory_1ww23_20`,scoreDelta:`_scoreDelta_1ww23_561`,comment:`_comment_1ww23_21`,commentReply:`_commentReply_1ww23_598`,commentJump:`_commentJump_1ww23_633`},Nle=(0,N.lazy)(()=>pi(()=>import(`./pr-review-workspace-Ca3Vmiye.js`).then(e=>({default:e.PullRequestReviewWorkspace})),__vite__mapDeps([0,1]))),v9=e=>e.account.awsAccountId!==void 0&&e.account.awsAccountId.length>0?e.account.awsAccountId:e.account.profile,y9=(e,t)=>e.awsAccountId===v9(t)&&e.pullRequestId===String(t.id)&&e.repositoryName===String(t.repositoryName)&&e.region===String(t.account.region),Ple=(e,t)=>e.status!==`stopped`&&e.status!==`stopping`&&e.status!==`error`&&y9(e,t),Fle=(e,t)=>e.status===`stopping`&&y9(e,t),Ile=(e,t)=>(t.account.awsAccountId===void 0||t.account.awsAccountId.length===0)&&e.some(e=>/^\d{12}$/u.test(e.awsAccountId)&&e.awsAccountId!==t.account.profile&&e.status!==`stopped`&&e.status!==`error`&&e.pullRequestId===String(t.id)&&e.repositoryName===String(t.repositoryName)&&e.region===String(t.account.region)),b9=e=>e.account.awsAccountId===void 0||e.account.awsAccountId.length===0?e.account.profile:Ale({accountId:e.account.awsAccountId,pullRequestId:e.id,repositoryName:e.repositoryName,region:e.account.region}),Lle=(e,t,n,r)=>JSON.stringify([e??``,t??``,n??``,r??``]),Rle=(e,t)=>{let n=e.filter(e=>VJ(e,t));return{pullRequest:n.length===1?n[0]??null:null,ambiguous:n.length>1}},x9=e=>e===`green`?`positive`:e===`yellow`?`caution`:`critical`,zle=e=>e===`positive`?`positive`:e===`neutral`?`neutral`:`critical`,Ble=e=>{let t=lv(e)?e.message.trim():``;return t.length>0?t:`Try the refresh again.`},Vle=e=>{let t=sv(e,`tagName`)?e.tagName:void 0;return t===`INPUT`||t===`TEXTAREA`},Hle=e=>{let t=new Date(e),n=t.toLocaleString(void 0,{month:`short`,day:`numeric`,hour:`2-digit`,minute:`2-digit`}),r=Date.now()-t.getTime(),i=Math.floor(r/6e4);if(i<1)return`${n} · just now`;if(i<60)return`${n} · ${i}m ago`;let a=Math.floor(i/60);return a<24?`${n} · ${a}h ago`:`${n} · ${Math.floor(a/24)}d ago`},S9=e=>e.comments.length===0?0:Math.min(...e.comments.map(e=>new Date(e.root.creationDate).getTime())),C9=e=>1+e.replies.reduce((e,t)=>e+C9(t),0),w9=e=>e.root.deleted?0:1+e.replies.reduce((e,t)=>e+w9(t),0),T9=e=>[e.root.id,...e.replies.flatMap(T9)];function Ule({onCountChange:e,snapshot:t}){let n=(0,N.useRef)(``);return(0,N.useEffect)(()=>{let r=`${String(t.count)}:${t.commentIds.join(`\0`)}`;n.current!==r&&(n.current=r,e(t))}),null}function Wle({score:e}){if(e===void 0)return null;let t=T0(e.total);return(0,L.jsx)(c$,{label:`Health ${e.total.toFixed(1)} / 10`,size:`compact`,tone:x9(t)})}function Gle({score:e}){if(e===void 0)return(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:`Waiting for comment count…`});let t=T0(e.total);return(0,L.jsxs)(`div`,{className:Z.scoreBreakdown,children:[(0,L.jsxs)(`div`,{className:Z.scoreSummary,children:[(0,L.jsx)(`strong`,{"data-tone":x9(t),children:e.total.toFixed(1)}),(0,L.jsx)(`span`,{children:`/ 10`}),(0,L.jsx)(`div`,{"aria-label":`Health score ${e.total.toFixed(1)} out of 10`,"aria-valuemax":10,"aria-valuemin":0,"aria-valuenow":e.total,className:Z.scoreTrack,role:`progressbar`,children:(0,L.jsx)(`div`,{className:Z.scoreFill,"data-tone":x9(t),style:{width:`${e.total*10}%`}})})]}),(0,L.jsx)(`ul`,{className:Z.scoreCategories,children:e.categories.map(e=>(0,L.jsxs)(`li`,{className:Z.scoreCategory,children:[(0,L.jsx)(`span`,{className:Z.scoreDelta,"data-direction":e.value>0?`up`:e.value<0?`down`:`flat`,children:e.value>0?`+${e.value}`:e.value}),(0,L.jsxs)(`div`,{className:Z.scoreCategoryCopy,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(u1,{as:`strong`,variant:`label`,children:e.label}),(0,L.jsx)(c$,{label:e.statusLabel,size:`compact`,tone:zle(e.status)})]}),(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:e.description})]})]},e.label))})]})}function E9({depth:e,location:t,navigation:n,onNavigateToDiff:r,thread:i,visible:a}){let o=e===0?g9(t,i.root):null,s=n?.destination===`comment`&&n.target.commentId===i.root.id,c=(0,N.useRef)(null);return(0,N.useEffect)(()=>{!s||!a||c.current===null||(c.current.scrollIntoView({behavior:`smooth`,block:`center`}),c.current.focus({preventScroll:!0}))},[s,a]),i.root.deleted?null:(0,L.jsxs)(`article`,{className:e>0?Z.commentReply:Z.comment,"data-active":s?`true`:void 0,ref:c,tabIndex:s?-1:void 0,children:[(0,L.jsxs)(`div`,{className:Z.commentBody,children:[(0,L.jsxs)(`div`,{className:Z.commentMeta,children:[(0,L.jsx)(`strong`,{children:i.root.author}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,L.jsx)(`time`,{dateTime:i.root.creationDate,children:Hle(i.root.creationDate)}),o===null?null:(0,L.jsxs)(`button`,{className:Z.commentJump,onClick:()=>r(o),type:`button`,children:[(0,L.jsx)(Kg,{"aria-hidden":`true`}),` View in diff`]})]}),(0,L.jsx)(`div`,{className:`${Z.markdown??``} prose prose-sm dark:prose-invert max-w-none break-words [&_a]:text-primary [&_img]:inline [&_img]:h-5 [&_img]:w-auto`,children:(0,L.jsx)(u7,{remarkPlugins:[f9],rehypePlugins:[b7],children:i.root.content})})]}),i.replies.map(i=>(0,L.jsx)(E9,{depth:e+1,location:t,navigation:n,onNavigateToDiff:r,thread:i,visible:a},i.root.id))]})}function Kle({commentsRefreshGeneration:e,navigation:t,onCountChange:n,onNavigateToDiff:r,pr:i,visible:a}){return uz(p9({pullRequestId:i.id,repositoryName:i.repositoryName,profile:i.account.profile,region:i.account.region,refreshGeneration:e})).onInitialOrWaiting(()=>(0,L.jsx)(x$,{announce:`polite`,description:`Reading the current CodeCommit conversation.`,title:`Loading comments`,tone:`progress`})).onError(()=>(0,L.jsx)(x$,{announce:`polite`,description:`Refresh the pull request to try reading the conversation again.`,title:`Comments unavailable`,tone:`critical`})).onDefect(()=>(0,L.jsx)(x$,{announce:`polite`,description:`Refresh the pull request to try reading the conversation again.`,title:`Comments unavailable`,tone:`critical`})).onSuccess(e=>{let i=e.reduce((e,t)=>e+t.comments.reduce((e,t)=>e+C9(t),0),0),o=e.flatMap(e=>e.comments.flatMap(T9)).sort(),s=e.reduce((e,t)=>e+t.comments.reduce((e,t)=>e+w9(t),0),0);return(0,L.jsxs)(`div`,{className:Z.comments,children:[(0,L.jsx)(Ule,{onCountChange:n,snapshot:{commentIds:o,count:i}}),e.length===0&&(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:`No comments`}),s>0&&(0,L.jsx)(`div`,{className:Z.commentLocations,children:[...e].sort((e,t)=>S9(t)-S9(e)).map((n,i)=>(0,L.jsxs)(`section`,{className:Z.commentLocation,children:[n.filePath&&(0,L.jsx)(`code`,{className:Z.commentPath,children:n.filePath}),n.comments.map(e=>(0,L.jsx)(E9,{depth:0,location:n,navigation:t,onNavigateToDiff:r,thread:e,visible:a},e.root.id)),i<e.length-1&&(0,L.jsx)(r0,{className:`my-2`})]},n.filePath??`loc-${i}`))})]})}).render()}function D9({pr:e}){let t=p9({pullRequestId:e.id,repositoryName:e.repositoryName,profile:e.account.profile,region:e.account.region}),n=e.status===`MERGED`?e.lastModifiedDate.getTime()-e.creationDate.getTime():null,{timeToAddressFeedback:r,timeToFirstReview:i}=(0,N.useMemo)(()=>{if(!ez(t))return{timeToFirstReview:null,timeToAddressFeedback:null};let n=[];for(let e of t.value){let t=e=>{for(let r of e)n.push({author:r.root.author,date:new Date(r.root.creationDate)}),t(r.replies)};t(e.comments)}n.sort((e,t)=>e.date.getTime()-t.date.getTime());let r=n.find(t=>t.author!==e.author),i=r===void 0?null:r.date.getTime()-e.creationDate.getTime(),a=e.isApproved&&e.approvedBy.some(t=>t!==e.author)?e.lastModifiedDate.getTime()-e.creationDate.getTime():null,o=i!=null&&a!=null?Math.min(i,a):i??a,s=[];for(let t=0;t<n.length;t++)if(n[t].author!==e.author){let r=n.slice(t+1).find(t=>t.author===e.author);r!==void 0&&s.push(r.date.getTime()-n[t].date.getTime())}return{timeToFirstReview:o,timeToAddressFeedback:s.length>0?s.reduce((e,t)=>e+t,0)/s.length:null}},[t,e.author,e.creationDate,e.lastModifiedDate,e.isApproved,e.approvedBy]);return n==null&&i==null&&r==null?null:(0,L.jsxs)(L.Fragment,{children:[n!=null&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{children:`Time to merge`}),(0,L.jsx)(`dd`,{children:gQ(n)})]}),i!=null&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{children:`Time to first review`}),(0,L.jsx)(`dd`,{children:gQ(i)})]}),r!=null&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{children:`Time to address feedback`}),(0,L.jsx)(`dd`,{children:gQ(r)})]})]})}function O9({children:e,count:t,keepMounted:n=!1,openRequestKey:r,title:i}){let[a,o]=(0,N.useState)(!1);(0,N.useEffect)(()=>{r!==void 0&&o(!0)},[r]);let s=e(a);return(0,L.jsxs)(n1,{as:`section`,className:Z.disclosure,padding:`none`,form:`grouped`,children:[(0,L.jsxs)(`button`,{"aria-expanded":a,className:Z.disclosureTrigger,onClick:()=>o(!a),type:`button`,children:[(0,L.jsx)(Lg,{"aria-hidden":`true`,className:Z.disclosureIcon,"data-open":a?`true`:`false`}),(0,L.jsx)(`span`,{children:i}),t!==void 0&&(0,L.jsx)(`small`,{children:t})]}),(a||n)&&(0,L.jsx)(`div`,{className:Z.disclosureContent,hidden:!a,children:s})]})}var qle=`Required approvers`,Jle=`Optional approvers`,Yle=(e,t)=>{let n=e.trim();if(n.length!==0&&t.length!==0)return n.startsWith(`CodeCommitApprovers:`)?n:`CodeCommitApprovers:${t}:${n}`};function Xle({approvalRules:e,approvedBy:t,currentUser:n,knownUserArns:r,onRefresh:i,onSetApprovers:a,permissionPrompt:o,repoAccountId:s,required:c,ruleName:l,title:u}){let[d,f]=(0,N.useState)(!1),[p,m]=(0,N.useState)(``),h=e.flatMap(e=>e.poolMembers).join(`,`),g=Dle({items:e.flatMap(e=>e.poolMembers),stableKey:h,permissionPrompt:o,onRefresh:i}),{pendingAdd:_,pendingRemove:v}=g,y=(0,N.useMemo)(()=>{let t=new Set;for(let n of e)if(n.fromTemplate!==void 0||n.ruleName===l)for(let e of n.poolMembers)t.add(e);return[...t]},[e,l]),b=e.find(e=>e.ruleName===l&&e.fromTemplate===void 0),x=b?.poolMemberArns??[],S=b?.poolMembers??[],C=(0,N.useMemo)(()=>[...r.entries()].filter(([e])=>!y.includes(e)&&e!==_),[r,y,_]),w=s.length>0?`CodeCommitApprovers:${s}:`:``,T=e=>{let t=Yle(e,s);if(t===void 0)return;let n=/^CodeCommitApprovers:[^:]*:(.+)$/.exec(t);g.add(n===null?e:n[1]),a([...x,t]),f(!1)},E=e=>{g.remove(e);let t=S.indexOf(e);t>=0&&a(x.filter((e,n)=>n!==t))},D=e.length>0&&e.every(e=>e.satisfied);return(0,L.jsxs)(n1,{as:`section`,className:Z.approverCard,padding:`default`,form:`grouped`,tone:`secondary`,children:[(0,L.jsxs)(`header`,{className:Z.approverHeading,children:[(0,L.jsxs)(`div`,{className:Z.approverTitle,children:[(0,L.jsx)(u1,{as:`h3`,variant:`card-title`,children:u}),c&&e.length>0&&(D?(0,L.jsx)(c$,{label:`Satisfied`,size:`compact`,tone:`positive`}):(0,L.jsx)(c$,{label:`Pending`,size:`compact`,tone:`caution`}))]}),(0,L.jsx)(D1,{"aria-expanded":d,"aria-label":d?`Close ${u.toLocaleLowerCase()} editor`:`Add ${u.toLocaleLowerCase()}`,className:Z.iconAction,onClick:()=>f(!d),size:`icon-sm`,variant:`ghost`,children:(0,L.jsx)(m_,{className:`size-4`})})]}),(0,L.jsxs)(`div`,{className:Z.approverBody,children:[d&&(0,L.jsxs)(`div`,{className:Z.approverPicker,children:[C.length>0&&(0,L.jsx)(`div`,{className:Z.approverSuggestions,children:C.map(([e])=>(0,L.jsx)(D1,{className:Z.suggestionChoice,onClick:()=>m(e),size:`sm`,variant:`outline`,children:e},e))}),(0,L.jsxs)(`div`,{className:Z.approverPickerActions,children:[(0,L.jsx)(j$,{className:Z.approverField,description:`Enter a known user or the complete CodeCommit approver identity.`,label:`Approver`,size:`compact`,children:e=>(0,L.jsx)(`input`,{...e,className:`${e.className} ${Z.approverInput??``}`,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Enter`&&p.trim().length>0&&w.length>0&&(T(p.trim()),m(``))},placeholder:w.length>0?`${w}USERNAME`:`username`,value:p})}),(0,L.jsx)(r$,{disabled:p.trim().length===0||w.length===0,onClick:()=>{T(p.trim()),m(``)},size:`compact`,variant:`primary`,children:`Add`})]})]}),!d&&w.length>0&&C.length>0&&(0,L.jsxs)(`div`,{className:Z.suggestedApprovers,children:[(0,L.jsx)(u1,{tone:`tertiary`,variant:`meta`,children:`Suggested`}),C.slice(0,5).map(([e,t])=>(0,L.jsxs)(`button`,{className:Z.suggestedApprover,onClick:()=>T(t),type:`button`,children:[(0,L.jsx)(m_,{"aria-hidden":`true`}),e]},e))]}),(y.length>0||_)&&(0,L.jsxs)(`div`,{className:Z.approverMembers,children:[y.map(e=>{let r=t.includes(e),i=S.includes(e),a=e===v;return(0,L.jsxs)(T1,{className:`${Z.approverMember??``} ${r?`border-green-500/30 text-green-600 dark:text-green-400`:``} ${a?`opacity-50`:``}`,variant:e===n?`default`:r?`outline`:`secondary`,children:[a&&(0,L.jsx)(c_,{className:`size-3 animate-spin`}),!a&&r&&(0,L.jsx)(Ig,{className:`size-3`}),e,i&&!a&&(0,L.jsx)(`button`,{"aria-label":`Remove ${e} from ${u.toLocaleLowerCase()}`,className:Z.removeApprover,onClick:()=>E(e),type:`button`,children:(0,L.jsx)(x_,{className:`size-3`})})]},e)}),_&&!y.includes(_)&&(0,L.jsxs)(T1,{className:`${Z.approverMember??``} opacity-70`,variant:`secondary`,children:[(0,L.jsx)(c_,{className:`size-3 animate-spin`}),_]})]})]})]})}var Zle=e=>{switch(e.status){case`MERGED`:return{reason:`CodeCommit reports this pull request merged into ${e.destinationBranch}.`,tone:`positive`,verdict:`Merged.`};case`CLOSED`:return{reason:`CodeCommit reports this pull request closed without a merge.`,tone:`neutral`,verdict:`Closed.`};case`OPEN`:return e.isMergeable?e.isApproved?{reason:`CodeCommit reports a clean merge and the provider approval is satisfied.`,tone:`positive`,verdict:`Ready to merge.`}:{reason:`The branch is mergeable, but its provider approval is still pending.`,tone:`caution`,verdict:`Review pending.`}:{reason:`Resolve the conflict between ${e.sourceBranch} and ${e.destinationBranch} before merging.`,tone:`critical`,verdict:`Resolve conflicts.`}}},Qle=e=>e===`MERGED`?`positive`:e===`CLOSED`?`neutral`:`progress`;function $le(){let{accountId:e,prId:t}=ur(),[n]=Ki(),r=Yz(Fq),i=Zz(Cq),a=Zz(Cq,{mode:`promise`}),o=Zz(wq),s=Zz(Tq),c=(0,N.useRef)(null),l=(0,N.useMemo)(()=>{if(t===void 0||t.length===0)return{pullRequest:null,ambiguous:!1};let i={pullRequestId:t};return e!==void 0&&(i={...i,accountId:e}),n.has(`region`)&&(i={...i,region:n.get(`region`)??``}),n.has(`repository`)&&(i={...i,repositoryName:n.get(`repository`)??``}),Rle(r.pullRequests,i)},[e,t,n,r.pullRequests]),u=l.pullRequest,d=n.has(`repository`)!==n.has(`region`)||l.ambiguous,f=u===null?e:b9(u),p=u===null?n.get(`repository`)??void 0:String(u.repositoryName),m=u===null?n.get(`region`)??void 0:String(u.account.region),h=u?.account?.repoAccountId||``,g=(0,N.useMemo)(()=>{let e=new Map,t=t=>{t.length!==0&&t!==`*`&&(e.has(t)||e.set(t,h.length>0?`CodeCommitApprovers:${h}:${t}`:t))};for(let e of r.pullRequests){t(e.author);for(let n of e.approvedBy)t(n);for(let n of e.commentedBy)t(n);for(let n of e.approvalRules)for(let e of n.poolMembers)t(e)}return e},[r.pullRequests,h]);(0,N.useEffect)(()=>{if(d||u!==null||f===void 0||f.length===0||t===void 0||t.length===0)return;let e=`${f}:${t}:${p??``}:${m??``}`;c.current!==e&&(c.current=e,i({params:{awsAccountId:f,prId:AW.make(t)},query:p!==void 0&&m!==void 0?{repositoryName:p,region:NW.make(m)}:{}}))},[u,t,f,m,p,i,d]);let _=(0,N.useMemo)(()=>u===null?void 0:Xb(w0(u,new Date)),[u]),v=or(),y=Zz(nq),b=m9(j_.grantedDismissed),x=m9(j_.dockerDismissed),S=Yz(uq),C=Zz(dq),w=Zz(fq),T=u?.account.awsAccountId??u?.account.profile,E=u===null?void 0:{repositoryName:String(u.repositoryName),region:u.account.region},[D,O]=t0((0,N.useMemo)(()=>ez(S)&&T!==void 0&&T.length>0?S.value.some(e=>e.awsAccountId===T&&e.pullRequestId===t&&e.repositoryName===E?.repositoryName&&e.accountRegion===E?.region):!1,[S,T,t,E])),k=(0,N.useCallback)(()=>{if(T===void 0||T.length===0||u===null)return;let e={awsAccountId:T,pullRequestId:u.id,repositoryName:String(u.repositoryName),region:u.account.region};O(!D),D?w({payload:e}):C({payload:e})},[T,D,u,C,w]),[A,j]=(0,N.useState)(!1),[M,ee]=(0,N.useState)(0),[te,P]=(0,N.useState)(0),F=(0,N.useRef)(new Set),ne=Lle(T??e,t,u===null?p:String(u.repositoryName),u===null?m:String(u.account.region)),[re,ie]=(0,N.useState)(null),ae=u?.commentCount,I=ae===void 0||re?.identity!==ne?ae:Math.max(ae,re.count),[oe,se]=(0,N.useState)(null),ce=oe?.identity===ne?oe.navigation:null,le=(0,N.useRef)(0),ue=(0,N.useCallback)((e,t)=>{le.current+=1,se({identity:ne,navigation:{destination:e,requestId:le.current,target:t}})},[ne]),de=(0,N.useRef)(null),fe=(0,N.useCallback)((e,n)=>{let r=`${T??``}:${t??``}:${e.revisionId}:${e.headCommit}`,i=de.current!==r;de.current=r,(n||i)&&ee(e=>e+1)},[T,t]);(0,N.useEffect)(()=>()=>{for(let e of F.current)window.clearTimeout(e);F.current.clear()},[]),(0,N.useEffect)(()=>{ae!==void 0&&ie(e=>e?.identity!==ne||ae===e.baseCount?e:e.pendingCommentIds.length>0?{...e,baseCount:ae,count:Math.max(e.count,ae)}:ae<e.count?{...e,baseCount:ae}:null)},[ae,ne]);let pe=(0,N.useCallback)(e=>{let t=u?.commentCount??0;ie(n=>{if(n?.identity!==ne)return n;let r=new Set(e.commentIds),i=n.pendingCommentIds.filter(e=>!r.has(e)),a=e.count+i.length;return i.length===0&&a<=t?null:{...n,baseCount:t,count:Math.max(t,a),pendingCommentIds:i}})},[ne,u?.commentCount]),me=(0,N.useCallback)(e=>{let t=e.startsWith(`comment:`)?e.slice(8):e;ie(e=>{let n=u?.commentCount??0;return e?.identity===ne?{...e,baseCount:n,count:Math.max(e.count,n)+1,pendingCommentIds:[...e.pendingCommentIds,t]}:{baseCount:n,count:n+1,identity:ne,pendingCommentIds:[t]}}),P(e=>e+1);for(let e of[1500,5e3]){let t=window.setTimeout(()=>{F.current.delete(t),P(e=>e+1)},e);F.current.add(t)}},[ne,u?.commentCount]),he=(0,N.useCallback)(()=>{f!==void 0&&f.length!==0&&t!==void 0&&t.length!==0&&a({params:{awsAccountId:f,prId:AW.make(t)},query:p!==void 0&&m!==void 0?{repositoryName:p,region:NW.make(m)}:{}}).then(e=>fe(e,!1),()=>{})},[fe,t,f,m,p,a]),ge=(0,N.useCallback)(()=>{f===void 0||f.length===0||t===void 0||t.length===0||A||(j(!0),a({params:{awsAccountId:f,prId:AW.make(t)},query:p!==void 0&&m!==void 0?{repositoryName:p,region:NW.make(m)}:{}}).then(e=>{fe(e,!0),j(!1)},e=>{j(!1),tB.error(`Unable to refresh pull request`,{description:Ble(e)})}))},[fe,A,t,f,m,p,a]),_e=u===null?``:u.link.length>0?u.link:`https://${u.account.region}.console.aws.amazon.com/codesuite/codecommit/repositories/${u.repositoryName}/pull-requests/${u.id}?region=${u.account.region}`,[ve,ye]=(0,N.useState)(!1),be=(0,N.useCallback)(()=>{_e.length!==0&&navigator.clipboard.writeText(_e).then(()=>{ye(!0),setTimeout(()=>ye(!1),2e3)},()=>{})},[_e]),xe=Zz(vq,{mode:`promiseExit`}),Se=(0,N.useMemo)(()=>u===null?void 0:r.sandboxes?.find(e=>Ple(e,u)),[u,r.sandboxes]),Ce=(0,N.useMemo)(()=>u===null?void 0:r.sandboxes?.find(e=>Fle(e,u)),[u,r.sandboxes]),we=(0,N.useMemo)(()=>u!==null&&Ile(r.sandboxes??[],u),[u,r.sandboxes]),[Te,Ee]=(0,N.useState)(!1);(0,N.useEffect)(()=>{Te&&Se!==void 0&&(Ee(!1),v(`/sandbox/${Se.id}`))},[Te,Se,v]);let De=(0,N.useCallback)(()=>{if(u===null)return;let e=v9(u),t=xe({payload:{pullRequestId:u.id,awsAccountId:e,repositoryName:u.repositoryName,sourceBranch:u.sourceBranch,profile:u.account.profile,region:u.account.region}});Ee(!0),t.then(e=>{if(sD(e)){Ee(!1);let t=Gb(cD(e),{onNone:()=>`Try again once the current sandbox has stopped.`,onSome:e=>lv(e)?e.message:`Try again once the current sandbox has stopped.`});tB.error(`Unable to create sandbox`,{description:t})}})},[u,xe]),Oe=(0,N.useCallback)(()=>{if(u!==null){if(we){tB.info(`AWS account discovery is unavailable. Refresh before creating a sandbox.`);return}if(Ce!==void 0){tB.info(`Sandbox is still stopping. Try again once it has stopped.`);return}if(Se!==void 0){v(`/sandbox/${Se.id}`);return}x.show()||De()}},[u,we,Ce,Se,x,De,v]),ke=()=>{x.dismiss(),De()},Ae=(0,N.useCallback)(()=>{u!==null&&_e.length!==0&&y({payload:{profile:u.account.profile,link:_e}})},[_e,y,u]),je=(0,N.useCallback)(()=>{u!==null&&(b.show()||Ae())},[b,u,Ae]),Me=()=>{b.dismiss(),Ae()};if((0,N.useEffect)(()=>{let e=e=>{Vle(e.target)||(e.key===`Escape`?(e.preventDefault(),v(`/`)):(e.key===`Enter`||e.key===`o`)&&_e.length>0?je():e.key===`.`&&u!==null&&(e.preventDefault(),Oe()))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[_e,je,Oe,v,u]),d)return(0,L.jsx)(`section`,{className:Z.loadingState,children:(0,L.jsx)(x$,{announce:`assertive`,description:`Choose both repository and region to identify this pull request.`,title:`Pull request coordinates are ambiguous`,tone:`critical`})});if(u===null)return(0,L.jsx)(`section`,{className:Z.loadingState,children:(0,L.jsx)(x$,{announce:`polite`,description:`Reading the current provider facts and approval state from CodeCommit.`,title:`Loading pull request`,tone:`progress`})});let Ne=Zle(u),Pe=_9(u.title),Fe=u.status===`OPEN`?`Open`:u.status===`MERGED`?`Merged`:`Closed`;return(0,L.jsxs)(`article`,{className:Z.page,children:[(0,L.jsx)(`nav`,{"aria-label":`Pull request navigation`,className:Z.backNavigation,children:(0,L.jsx)(r$,{leadingIcon:`arrow-left`,onClick:()=>v(`/`),size:`compact`,variant:`quiet`,children:`Back`})}),(0,L.jsxs)(`header`,{className:Z.hero,children:[(0,L.jsxs)(`div`,{className:Z.eyebrow,children:[(0,L.jsx)(j2,{service:`codecommit`,size:`compact`}),(0,L.jsxs)(u1,{tone:`secondary`,variant:`label`,children:[`Pull request `,u.id]})]}),(0,L.jsx)(u1,{as:`h1`,className:Z.title,variant:`page-title`,children:u.title}),(0,L.jsxs)(`div`,{className:Z.heroMeta,children:[(0,L.jsx)(Ri,{className:Z.textLink,to:`/?f=author:${encodeURIComponent(u.author)}`,children:u.author}),(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,L.jsx)(`time`,{dateTime:u.creationDate.toISOString(),children:dQ(u.creationDate)}),u.fetchedAt&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`·`}),(0,L.jsx)(`span`,{children:fQ(u.fetchedAt,new Date,`Fetched`)})]})]})]}),(0,L.jsxs)(`section`,{"aria-label":`Pull request decision and actions`,className:Z.decisionWorkspace,children:[(0,L.jsx)(I2,{className:Z.verdict,reason:Ne.reason,tone:Ne.tone,verdict:Ne.verdict}),(0,L.jsxs)(`aside`,{className:Z.actionRail,children:[(0,L.jsxs)(`div`,{className:Z.actionHeading,children:[(0,L.jsx)(u1,{tone:`secondary`,variant:`label`,children:`Actions`}),(0,L.jsx)(c$,{label:Fe,size:`compact`,tone:Qle(u.status)})]}),(0,L.jsxs)(`div`,{className:Z.actionGroup,children:[(0,L.jsxs)(D1,{className:Z.actionButton,disabled:A,onClick:ge,size:`sm`,variant:`outline`,children:[(0,L.jsx)(h_,{className:`size-3.5 ${A?`animate-spin`:``}`}),`Refresh`]}),(0,L.jsxs)(D1,{className:Z.actionButton,onClick:k,size:`sm`,variant:`outline`,children:[D?(0,L.jsx)(jg,{className:`size-3.5`}):(0,L.jsx)(Mg,{className:`size-3.5`}),D?`Unsubscribe`:`Subscribe`]}),(0,L.jsxs)(D1,{className:Z.actionButton,onClick:Oe,size:`sm`,variant:`outline`,children:[(0,L.jsx)(Kg,{className:`size-3.5`}),Ce===void 0?Se===void 0?`Sandbox`:`Open Sandbox`:`Stopping…`]}),(0,L.jsx)(r$,{className:Z.actionButton,leadingIcon:ve?`check`:`link`,onClick:be,size:`compact`,variant:`secondary`,children:ve?`Copied`:`Copy Link`}),(0,L.jsx)(r$,{className:Z.actionButton,leadingIcon:`external-link`,onClick:je,size:`compact`,variant:`primary`,children:`Open in Console`})]}),(0,L.jsx)(u1,{tone:`tertiary`,variant:`meta`,children:`Enter or O opens CodeCommit · . opens the sandbox · Esc returns to the list`})]})]}),(0,L.jsxs)(n1,{as:`section`,className:Z.revisionCard,padding:`spacious`,form:`grouped`,tone:`secondary`,children:[(0,L.jsxs)(`header`,{className:Z.revisionHeading,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(u1,{tone:`secondary`,variant:`label`,children:`Current revision`}),(0,L.jsx)(u1,{as:`h2`,variant:`section-title`,children:u.repositoryName})]}),(0,L.jsx)(Wle,{score:_})]}),(0,L.jsxs)(`div`,{"aria-label":`${u.sourceBranch} into ${u.destinationBranch}`,className:Z.branchPair,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:`Source`}),(0,L.jsx)(`code`,{children:u.sourceBranch})]}),(0,L.jsx)(kg,{"aria-hidden":`true`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:`Destination`}),(0,L.jsx)(`code`,{children:u.destinationBranch})]})]}),(0,L.jsxs)(`dl`,{className:Z.facts,children:[(0,L.jsx)(`dt`,{children:`Account`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(Ri,{className:Z.codeLink,to:`/?f=account:${encodeURIComponent(u.account.profile)}`,children:u.account.profile})}),(0,L.jsx)(`dt`,{children:`Repository`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(Ri,{className:Z.codeLink,to:`/?f=repo:${encodeURIComponent(u.repositoryName)}`,children:u.repositoryName})}),(0,L.jsx)(`dt`,{children:`Author`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(Ri,{className:Z.textLink,to:`/?f=author:${encodeURIComponent(u.author)}`,children:u.author})}),Pe&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`dt`,{children:`Scope`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(Ri,{className:Z.textLink,to:`/?f=scope:${encodeURIComponent(Pe)}`,children:Pe})})]}),(0,L.jsx)(`dt`,{children:`Status`}),(0,L.jsx)(`dd`,{className:Z.factStates,children:u.status===`MERGED`?(0,L.jsx)(Ri,{className:Z.stateLink,to:`/?f=status:merged`,children:(0,L.jsx)(c$,{label:`Merged`,size:`compact`,tone:`positive`})}):u.status===`CLOSED`?(0,L.jsx)(Ri,{className:Z.stateLink,to:`/?f=status:closed`,children:(0,L.jsx)(c$,{label:`Closed`,size:`compact`,tone:`neutral`})}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ri,{className:Z.stateLink,to:`/?f=status:${u.isApproved?`approved`:`pending`}`,children:(0,L.jsx)(c$,{label:u.isApproved?`Approved`:`Pending approval`,size:`compact`,tone:u.isApproved?`positive`:`caution`})}),(0,L.jsx)(Ri,{className:Z.stateLink,to:`/?f=status:${u.isMergeable?`mergeable`:`conflicts`}`,children:(0,L.jsx)(c$,{label:u.isMergeable?`Mergeable`:`Conflict`,size:`compact`,tone:u.isMergeable?`positive`:`critical`})})]})}),(0,L.jsx)(`dt`,{children:`Pull request ID`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(`code`,{children:u.id})}),(0,L.jsx)(`dt`,{children:`Last activity`}),(0,L.jsx)(`dd`,{children:(0,L.jsx)(`time`,{dateTime:u.lastModifiedDate.toISOString(),children:dQ(u.lastModifiedDate)})}),(0,L.jsx)(D9,{pr:u})]})]}),(0,L.jsx)(N.Suspense,{fallback:(0,L.jsx)(x$,{announce:`polite`,description:`Preparing the exact-revision review workbench.`,title:`Loading diff tools`,tone:`progress`}),children:(0,L.jsx)(Nle,{accountId:b9(u),commentsRefreshGeneration:te,commentNavigation:ce,onFindingPosted:me,onNavigateToComment:e=>ue(`comment`,e),pullRequest:u,refreshGeneration:M})}),(0,L.jsxs)(`div`,{className:Z.reviewWorkspace,children:[(0,L.jsxs)(`section`,{"aria-label":`Pull request narrative and comments`,className:Z.contentColumn,children:[u.description&&(0,L.jsxs)(n1,{as:`section`,className:Z.contentSection,padding:`spacious`,form:`grouped`,children:[(0,L.jsxs)(`header`,{className:Z.sectionHeading,children:[(0,L.jsx)(u1,{as:`h2`,variant:`section-title`,children:`Description`}),(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:`What the author says this revision changes`})]}),(0,L.jsx)(`div`,{className:`${Z.description??``} prose prose-sm dark:prose-invert max-w-none`,children:(0,L.jsx)(u7,{remarkPlugins:[f9],rehypePlugins:[b7],children:u.description})})]}),(0,L.jsx)(O9,{...ce?.destination===`comment`?{openRequestKey:`${ce.target.commentId}:${String(ce.requestId)}`}:{},keepMounted:!0,title:`Comments`,...I===void 0?{}:{count:I},children:e=>(0,L.jsx)(Kle,{commentsRefreshGeneration:te,navigation:ce,onCountChange:pe,onNavigateToDiff:e=>ue(`diff`,e),pr:u,visible:e},u.id)})]}),(0,L.jsxs)(`aside`,{className:Z.evidenceColumn,children:[(0,L.jsxs)(`section`,{className:Z.approvalSection,children:[(0,L.jsxs)(`header`,{className:Z.sectionHeading,children:[(0,L.jsx)(u1,{as:`h2`,variant:`section-title`,children:`Decision evidence`}),(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:`Provider approval rules for this pull request`})]}),[{title:`Required Approvers`,ruleName:qle,required:!0},{title:`Optional Approvers`,ruleName:Jle,required:!1}].map(e=>(0,L.jsx)(Xle,{approvalRules:u.approvalRules,approvedBy:u.approvedBy,currentUser:r.currentUser,knownUserArns:g,onRefresh:he,onSetApprovers:t=>{let n=u.approvalRules.find(t=>t.ruleName===e.ruleName&&t.fromTemplate===void 0);n===void 0?t.length>0&&o({payload:{account:u.account,approvalRuleName:e.ruleName,poolMembers:t,pullRequestId:u.id,requiredApprovals:e.required?t.length:0}}):s({payload:{account:u.account,approvalRuleName:n.ruleName,poolMembers:t.length>0?t:[`*`],pullRequestId:u.id,requiredApprovals:e.required&&t.length>0?t.length:0}})},permissionPrompt:r.permissionPrompt!==void 0,repoAccountId:h,required:e.required,ruleName:e.ruleName,title:e.title},e.ruleName))]}),(0,L.jsx)(O9,{title:`Health Score Breakdown`,children:()=>(0,L.jsx)(Gle,{score:_})})]})]}),(0,L.jsx)(qZ,{open:b.visible,onOpenChange:b.cancel,children:(0,L.jsxs)(XZ,{children:[(0,L.jsxs)(ZZ,{children:[(0,L.jsx)($Z,{children:`Granted CLI Required`}),(0,L.jsxs)(eQ,{children:[`"Open in Console" uses`,` `,(0,L.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`,` `,(0,L.jsx)(`code`,{className:`rounded bg-muted px-1 py-0.5 font-mono text-xs`,children:`assume`}),` CLI is installed and configured before continuing.`]})]}),(0,L.jsxs)(QZ,{children:[(0,L.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground mr-auto`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:b.dontRemind,onChange:e=>b.setDontRemind(e.target.checked),className:`accent-primary`}),`Don't remind again`]}),(0,L.jsx)(D1,{variant:`ghost`,onClick:b.cancel,children:`Cancel`}),(0,L.jsx)(D1,{onClick:Me,children:`Continue`})]})]})}),(0,L.jsx)(qZ,{open:x.visible,onOpenChange:x.cancel,children:(0,L.jsxs)(XZ,{children:[(0,L.jsxs)(ZZ,{children:[(0,L.jsx)($Z,{children:`Docker Required`}),(0,L.jsx)(eQ,{children:`Sandbox uses Docker to run a code-server container. Make sure Docker is started before continuing.`})]}),(0,L.jsxs)(QZ,{children:[(0,L.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-muted-foreground mr-auto`,children:[(0,L.jsx)(`input`,{type:`checkbox`,checked:x.dontRemind,onChange:e=>x.setDontRemind(e.target.checked),className:`accent-primary`}),`Don't show again`]}),(0,L.jsx)(D1,{onClick:ke,children:`OK`})]})]})})]})}var eue=e=>bY.some(t=>t===e),k9=[{key:`status`,value:`open`}],A9=k9.map(e=>`${e.key}:${e.value}`);function tue(e){let t=e.getAll(`f`);if(t.length===0)return k9;let n=[];for(let e of t){let t=e.indexOf(`:`);if(t<1)continue;let r=e.slice(0,t),i=e.slice(t+1);!eue(r)||!i||n.some(e=>e.key===r&&e.value===i)||n.push({key:r,value:i})}return n}function j9(){let[e,t]=Ki();return{state:(0,N.useMemo)(()=>{let t=e.get(`mineScope`),n=e.get(`from`),r=e.get(`to`);return{filters:tue(e),hot:e.get(`sortBy`)===`updated`,...e.has(`groupBy`)&&{groupBy:e.get(`groupBy`)},mine:e.has(`mine`),review:e.has(`review`),...t!=null&&{mineScope:t},q:e.get(`q`)??``,...n!=null&&{from:n},...r!=null&&{to:r}}},[e]),toggleFilter:(0,N.useCallback)((e,n)=>{t(t=>{let r=t.getAll(`f`),i=`${e}:${n}`;if(r.length===0){for(let e of A9)t.append(`f`,e);r=t.getAll(`f`)}let a=r.includes(i);t.delete(`f`);for(let e of r)e!==i&&e!==``&&t.append(`f`,e);return a||t.append(`f`,i),t.getAll(`f`).length===0&&a&&t.append(`f`,``),t},{preventScrollReset:!0,replace:!0})},[t]),removeFilterKey:(0,N.useCallback)(e=>{t(t=>{let n=t.getAll(`f`);if(n.length===0){for(let e of A9)t.append(`f`,e);n=t.getAll(`f`)}t.delete(`f`);for(let r of n)r!==``&&r.slice(0,r.indexOf(`:`))!==e&&t.append(`f`,r);return t.getAll(`f`).length===0&&t.append(`f`,``),t},{preventScrollReset:!0,replace:!0})},[t]),toggleHot:(0,N.useCallback)(()=>{t(e=>(e.get(`sortBy`)===`updated`?e.delete(`sortBy`):e.set(`sortBy`,`updated`),e),{preventScrollReset:!0,replace:!0})},[t]),toggleReview:(0,N.useCallback)(()=>{t(e=>(e.has(`review`)?e.delete(`review`):e.set(`review`,`1`),e),{preventScrollReset:!0,replace:!0})},[t]),toggleMine:(0,N.useCallback)(()=>{t(e=>(e.has(`mine`)?(e.delete(`mine`),e.delete(`mineScope`)):e.set(`mine`,`1`),e),{preventScrollReset:!0,replace:!0})},[t]),setMineScope:(0,N.useCallback)(e=>{t(t=>(e?t.set(`mineScope`,e):t.delete(`mineScope`),t),{preventScrollReset:!0,replace:!0})},[t]),setFilterText:(0,N.useCallback)(e=>{t(t=>(e?t.set(`q`,e):t.delete(`q`),t),{preventScrollReset:!0,replace:!0})},[t]),clearAll:(0,N.useCallback)(()=>{t(e=>(e.delete(`f`),e.delete(`sortBy`),e.delete(`groupBy`),e.delete(`mine`),e.delete(`review`),e.delete(`mineScope`),e.delete(`q`),e.delete(`from`),e.delete(`to`),e),{preventScrollReset:!0,replace:!0})},[t])}}function nue({...e}){return(0,L.jsx)(Rm,{"data-slot":`popover`,...e})}function rue({...e}){return(0,L.jsx)(zm,{"data-slot":`popover-trigger`,...e})}function iue({align:e=`start`,className:t,sideOffset:n=4,...r}){return(0,L.jsx)(Bm,{children:(0,L.jsx)(Vm,{"data-slot":`popover-content`,align:e,sideOffset:n,className:KZ(`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 z-50 w-[200px] origin-(--radix-popover-content-transform-origin) overflow-hidden rounded-md border p-0 shadow-md outline-hidden`,t),...r})})}var Q={page:`_page_cz5jb_1`,hero:`_hero_cz5jb_7`,eyebrow:`_eyebrow_cz5jb_13`,title:`_title_cz5jb_19`,lede:`_lede_cz5jb_23`,facets:`_facets_cz5jb_27`,facet:`_facet_cz5jb_27`,facetLabel:`_facetLabel_cz5jb_72`,facetCount:`_facetCount_cz5jb_77`,queueSection:`_queueSection_cz5jb_86`,accountGroups:`_accountGroups_cz5jb_87`,accountGroup:`_accountGroup_cz5jb_87`,emptyStack:`_emptyStack_cz5jb_89`,activitySection:`_activitySection_cz5jb_90`,sectionHeading:`_sectionHeading_cz5jb_99`,activityHeading:`_activityHeading_cz5jb_100`,accountHeading:`_accountHeading_cz5jb_101`,controls:`_controls_cz5jb_108`,searchBar:`_searchBar_cz5jb_113`,searchInputWrap:`_searchInputWrap_cz5jb_120`,searchIcon:`_searchIcon_cz5jb_127`,searchInput:`_searchInput_cz5jb_120`,clearSearch:`_clearSearch_cz5jb_162`,filterTrigger:`_filterTrigger_cz5jb_163`,filterChip:`_filterChip_cz5jb_164`,activityMore:`_activityMore_cz5jb_165`,activeFilters:`_activeFilters_cz5jb_188`,filterPanel:`_filterPanel_cz5jb_222`,modeGroup:`_modeGroup_cz5jb_232`,modeButton:`_modeButton_cz5jb_241`,structuredFilters:`_structuredFilters_cz5jb_246`,filterLegend:`_filterLegend_cz5jb_255`,filterCount:`_filterCount_cz5jb_292`,clearFilters:`_clearFilters_cz5jb_304`,filterPopover:`_filterPopover_cz5jb_309`,commandSeparator:`_commandSeparator_cz5jb_317`,childOption:`_childOption_cz5jb_323`,groupOption:`_groupOption_cz5jb_327`,optionCheck:`_optionCheck_cz5jb_331`,queueSurface:`_queueSurface_cz5jb_353`,prRow:`_prRow_cz5jb_357`,prMain:`_prMain_cz5jb_385`,prKicker:`_prKicker_cz5jb_391`,prByline:`_prByline_cz5jb_392`,prNumber:`_prNumber_cz5jb_403`,prTitle:`_prTitle_cz5jb_410`,prDescription:`_prDescription_cz5jb_422`,metaSeparator:`_metaSeparator_cz5jb_432`,commentCount:`_commentCount_cz5jb_436`,prFacts:`_prFacts_cz5jb_451`,prFact:`_prFact_cz5jb_451`,prDecision:`_prDecision_cz5jb_482`,health:`_health_cz5jb_489`,healthScore:`_healthScore_cz5jb_495`,scorePositive:`_scorePositive_cz5jb_503`,scoreCaution:`_scoreCaution_cz5jb_507`,scoreCritical:`_scoreCritical_cz5jb_511`,approvalCount:`_approvalCount_cz5jb_515`,openReview:`_openReview_cz5jb_519`,queueState:`_queueState_cz5jb_556`,emptyActions:`_emptyActions_cz5jb_564`,ssoActions:`_ssoActions_cz5jb_565`,ssoPanel:`_ssoPanel_cz5jb_575`,ssoButton:`_ssoButton_cz5jb_586`,ssoWatermark:`_ssoWatermark_cz5jb_590`,activityTitle:`_activityTitle_cz5jb_604`,activityList:`_activityList_cz5jb_622`,activityItem:`_activityItem_cz5jb_628`,activityIcon:`_activityIcon_cz5jb_656`,activityNeutral:`_activityNeutral_cz5jb_670`,activityPositive:`_activityPositive_cz5jb_675`,activityCaution:`_activityCaution_cz5jb_680`,activityCritical:`_activityCritical_cz5jb_685`,activityProgress:`_activityProgress_cz5jb_690`,activityCopy:`_activityCopy_cz5jb_695`,activityItemTitle:`_activityItemTitle_cz5jb_701`,visuallyHidden:`_visuallyHidden_cz5jb_708`},aue=(e,t)=>e.review?`review`:e.hot?`hot`:t!==void 0&&e.filters.some(e=>e.key===`author`&&e.value===t)?`mine`:`all`,M9=new Set([`approved`,`pending`,`mergeable`,`conflicts`]),oue=new Set([`open`,`merged`,`closed`,...M9]),sue={open:`lifecycle`,merged:`lifecycle`,closed:`lifecycle`,approved:`approval`,pending:`approval`,mergeable:`merge`,conflicts:`merge`},N9={account:`Account`,author:`Author`,approver:`Approver`,commenter:`Commenter`,scope:`Scope`,repo:`Repository`,status:`Status`,size:`Size`},P9=(e,t)=>{switch(t.key){case`account`:return e.account.profile===t.value;case`author`:return e.author===t.value;case`scope`:return _9(e.title)===t.value;case`repo`:return e.repositoryName===t.value;case`approver`:return e.approvedBy.some(e=>e===t.value);case`commenter`:return e.commentedBy.some(e=>e===t.value);case`size`:{let n=e.filesChanged;if(n==null)return!1;switch(t.value){case`small`:return n<5;case`medium`:return n>=5&&n<=15;case`large`:return n>=16&&n<=30;case`xlarge`:return n>30;default:return!0}}case`status`:switch(t.value){case`approved`:return e.status===`OPEN`&&e.isApproved;case`pending`:return e.status===`OPEN`&&!e.isApproved;case`mergeable`:return e.status===`OPEN`&&e.isMergeable;case`conflicts`:return e.status===`OPEN`&&!e.isMergeable;case`merged`:return e.status===`MERGED`;case`closed`:return e.status===`CLOSED`;case`open`:return e.status===`OPEN`;default:return!0}default:return!0}},F9=e=>{let t=new Map;for(let n of e){let e=n.key===`status`?`status:${sue[n.value]??n.value}`:n.key,r=t.get(e);r?r.push(n):t.set(e,[n])}return t},cue=e=>{let t=new Set,n=new Set,r=new Set,i=new Set,a=new Set,o=new Set;for(let s of e){t.add(s.author),n.add(s.account.profile),i.add(s.repositoryName);let e=_9(s.title);e&&r.add(e);for(let e of s.commentedBy)e&&a.add(e);for(let e of s.approvedBy)e&&o.add(e)}return{account:[...n].sort(),author:[...t].sort(),approver:[...o].sort(),commenter:[...a].sort(),scope:[...r].sort(),repo:[...i].sort(),status:[`open`,`approved`,`pending`,`mergeable`,`conflicts`,`merged`,`closed`],size:[`small`,`medium`,`large`,`xlarge`]}},lue=({filters:e,review:t})=>{if(t)return`review`;let n=new Set(e.filter(e=>e.key===`status`).map(e=>e.value).filter(e=>oue.has(e)));if(n.size===1){if(n.has(`open`))return`open`;if(n.has(`approved`))return`approved`;if(n.has(`pending`))return`pending`}if(n.size===M9.size&&[...M9].every(e=>n.has(e)))return`open`},uue=(e,t,n)=>!(ev(t)&&Number.isFinite(t)&&e<t||ev(n)&&Number.isFinite(n)&&e>=n),I9=[`status`,`author`,`repo`,`scope`,`account`,`approver`,`commenter`,`size`];function due({selected:e}){return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:Q.optionCheck,"data-selected":e?`true`:void 0,children:e?(0,L.jsx)(Ig,{}):null}),(0,L.jsx)(`span`,{className:Q.visuallyHidden,children:e?`Selected`:`Not selected`})]})}function fue({filterKey:e,groups:t,label:n,onToggle:r,options:i,selected:a}){let[o,s]=(0,N.useState)(!1),c=a.length,l=(0,N.useMemo)(()=>new Set(t?Object.values(t).flat():[]),[t]),u=(0,N.useMemo)(()=>{let e=new Map;if(t)for(let[n,r]of Object.entries(t))for(let t of r)e.set(t,n);return e},[t]);return(0,L.jsxs)(nue,{onOpenChange:s,open:o,children:[(0,L.jsx)(rue,{asChild:!0,children:(0,L.jsxs)(`button`,{className:Q.filterTrigger,"data-active":c>0?`true`:void 0,type:`button`,children:[(0,L.jsx)(`span`,{children:n}),c>0?(0,L.jsx)(`span`,{className:Q.filterCount,children:c}):null,(0,L.jsx)(Lg,{"aria-hidden":`true`})]})}),(0,L.jsx)(iue,{align:`start`,className:Q.filterPopover,side:`bottom`,children:(0,L.jsxs)(tQ,{children:[(0,L.jsx)(rQ,{placeholder:`Search ${n.toLowerCase()}…`}),(0,L.jsxs)(iQ,{children:[(0,L.jsx)(aQ,{children:`No matching options.`}),(0,L.jsx)(oQ,{children:i.map((n,o)=>{let s=t!==void 0&&n in t,c=l.has(n),d=u.get(n),f=s?(t[n]?.every(e=>a.includes(e))??!1)||a.includes(n):a.includes(n)||d!==void 0&&a.includes(d),p=o>0?i[o-1]:void 0,m=!c&&!s&&p!==void 0&&l.has(p);return(0,L.jsxs)(`div`,{children:[m?(0,L.jsx)(`div`,{className:Q.commandSeparator}):null,(0,L.jsxs)(cQ,{className:c?Q.childOption:void 0,onSelect:()=>r(e,n),children:[(0,L.jsx)(due,{selected:f}),(0,L.jsx)(`span`,{className:s?Q.groupOption:void 0,children:n})]})]},n)})})]})]})})]})}function pue(){let e=Yz(Fq),{clearAll:t,state:n,toggleFilter:r}=j9(),[,i]=Ki(),a=e.pullRequests,o=e.currentUser;(0,N.useEffect)(()=>{i(e=>{let t=e.getAll(`f`).some(e=>e.startsWith(`author:`));return!e.has(`sortBy`)&&!e.has(`groupBy`)&&!e.has(`review`)&&!t&&e.set(`sortBy`,`updated`),e},{preventScrollReset:!0,replace:!0})},[i]);let s=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=e.get(t.key);n?n.push(t.value):e.set(t.key,[t.value])}return e},[n.filters]),c=(0,N.useCallback)((e,t)=>{e===`status`&&t===`open`?i(e=>{let t=e.getAll(`f`);if(t.length===0&&(e.append(`f`,`status:open`),t=e.getAll(`f`)),t.includes(`status:open`)){e.delete(`f`);for(let n of t)n!==`status:open`&&n!==``&&e.append(`f`,n);return e.getAll(`f`).length===0&&e.append(`f`,``),e}let n=[...M9].map(e=>`status:${e}`),r=new Set([`status:merged`,`status:closed`]),i=n.every(e=>t.includes(e));e.delete(`f`);for(let i of t)n.includes(i)||r.has(i)||e.append(`f`,i);if(!i)for(let t of n)e.append(`f`,t);return e.getAll(`f`).length===0&&e.append(`f`,``),e},{preventScrollReset:!0,replace:!0}):e===`status`&&M9.has(t)&&s.get(`status`)?.includes(`open`)?i(e=>{let n=e.getAll(`f`);n.length===0&&(e.append(`f`,`status:open`),n=e.getAll(`f`)),e.delete(`f`);for(let t of n)t!==`status:open`&&t!==``&&e.append(`f`,t);for(let n of M9)n!==t&&e.append(`f`,`status:${n}`);return e},{preventScrollReset:!0,replace:!0}):r(e,t)},[s,i,r]),l=(0,N.useMemo)(()=>{let e=F9(n.filters),t=()=>[],r={account:t(),author:t(),approver:t(),commenter:t(),scope:t(),repo:t(),status:t(),size:t()};for(let t of I9){let n=[...e.entries()].filter(([e])=>e!==t&&!e.startsWith(`${t}:`));r[t]=cue(n.length===0?a:a.filter(e=>n.every(([,t])=>t.some(t=>P9(e,t)))))[t]}return r},[a,n.filters]),u=aue(n,o),d=n.filters.length>0||n.hot||n.review||n.q.length>0||!!(n.from||n.to),f=(0,N.useCallback)(e=>{i(t=>{t.delete(`sortBy`),t.delete(`groupBy`),t.delete(`review`);let n=t.getAll(`f`).filter(e=>!o||e!==`author:${o}`);t.delete(`f`);for(let e of n)t.append(`f`,e);switch(e===u?`hot`:e){case`hot`:t.set(`sortBy`,`updated`);break;case`all`:t.set(`groupBy`,`account`);break;case`mine`:t.set(`groupBy`,`account`),o&&t.append(`f`,`author:${o}`);break;case`review`:t.set(`review`,`1`)}return!t.getAll(`f`).some(e=>e.startsWith(`status:`))&&t.getAll(`f`).length>0&&t.append(`f`,`status:open`),t},{preventScrollReset:!0,replace:!0})},[u,o,i]),p=[{id:`hot`,label:`Hot`,visible:!0},{id:`all`,label:`All`,visible:!0},{id:`mine`,label:`Mine`,visible:o!==void 0},{id:`review`,label:`Review`,visible:o!==void 0}];return(0,L.jsxs)(`section`,{"aria-label":`Queue views and filters`,className:Q.filterPanel,children:[(0,L.jsx)(`div`,{className:Q.modeGroup,role:`group`,"aria-label":`Queue view`,children:p.filter(e=>e.visible).map(e=>(0,L.jsx)(r$,{"aria-pressed":u===e.id,className:Q.modeButton,onClick:()=>f(e.id),size:`compact`,variant:u===e.id?`primary`:`quiet`,children:e.label},e.id))}),(0,L.jsxs)(`div`,{className:Q.structuredFilters,children:[(0,L.jsx)(u1,{className:Q.filterLegend,tone:`tertiary`,variant:`meta`,children:`Filter by`}),I9.map(e=>(0,L.jsx)(fue,{filterKey:e,label:N9[e],onToggle:c,options:l[e],selected:s.get(e)??[],...e===`status`?{groups:{open:[...M9]}}:{}},e))]}),d?(0,L.jsx)(r$,{className:Q.clearFilters,onClick:t,size:`compact`,variant:`quiet`,children:`Reset view`}):null]})}var mue=e=>{switch(e.status){case`MERGED`:return{actionLabel:`View pull request`,summary:`Merged`};case`CLOSED`:return{actionLabel:`View pull request`,summary:`Closed`};case`OPEN`:{if(!e.isMergeable)return{actionLabel:`Inspect conflict`,summary:`Merge blocked`};let t=e.approvedBy.length;return{actionLabel:`Open review`,summary:`${t} ${t===1?`approval`:`approvals`}`}}}},hue=(e,t)=>t?e.lastModifiedDate:e.creationDate,gue=(e,t,n)=>t?fQ(e.lastModifiedDate,n):`Opened ${dQ(e.creationDate)}`,_ue=e=>e.status===`MERGED`?{label:`Merged`,tone:`progress`}:e.status===`CLOSED`?{label:`Closed`,tone:`neutral`}:e.isMergeable?e.isApproved?{label:`Approved`,tone:`positive`}:{label:`Pending`,tone:`caution`}:{label:`Conflict`,tone:`critical`},vue=e=>{switch(e){case`green`:return Q.scorePositive??``;case`yellow`:return Q.scoreCaution??``;default:return Q.scoreCritical??``}};function L9({currentUser:e,pr:t,showUpdated:n,to:r}){let i=WW(t,e),a=(0,N.useMemo)(()=>Xb(w0(t,new Date)),[t]),o=_ue(t),s=mue(t),c=t.description?.split(`
89
- `).slice(0,2).join(` `);return(0,L.jsxs)(Ri,{className:Q.prRow,to:r,children:[(0,L.jsxs)(`div`,{className:Q.prMain,children:[(0,L.jsxs)(`div`,{className:Q.prKicker,children:[(0,L.jsx)(j2,{service:`codecommit`,size:`compact`}),(0,L.jsxs)(u1,{className:Q.prNumber,tone:`inherit`,variant:`code`,children:[`PR #`,t.id]}),(0,L.jsx)(c$,{label:o.label,size:`compact`,tone:o.tone}),i?(0,L.jsx)(c$,{label:`Needs your review`,size:`compact`,tone:`caution`}):null]}),(0,L.jsx)(u1,{as:`h3`,className:Q.prTitle,variant:`card-title`,children:t.title}),c?(0,L.jsx)(u1,{className:Q.prDescription,tone:`secondary`,variant:`meta`,children:c}):null,(0,L.jsxs)(`div`,{className:Q.prByline,children:[(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:t.author}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:Q.metaSeparator,children:`·`}),(0,L.jsx)(u1,{as:`time`,dateTime:hue(t,n===!0).toISOString(),tone:`tertiary`,variant:`meta`,children:gue(t,n===!0,new Date)}),t.commentCount!==void 0&&t.commentCount>0?(0,L.jsxs)(`span`,{"aria-label":`${t.commentCount} comments`,className:Q.commentCount,children:[(0,L.jsx)(d_,{"aria-hidden":`true`}),t.commentCount]}):null]})]}),(0,L.jsxs)(`dl`,{className:Q.prFacts,children:[(0,L.jsxs)(`div`,{className:Q.prFact,children:[(0,L.jsx)(`dt`,{children:`Repository`}),(0,L.jsx)(`dd`,{children:t.repositoryName})]}),(0,L.jsxs)(`div`,{className:Q.prFact,children:[(0,L.jsx)(`dt`,{children:`Revision`}),(0,L.jsxs)(`dd`,{title:`${t.sourceBranch} to ${t.destinationBranch}`,children:[t.sourceBranch,` → `,t.destinationBranch]})]})]}),(0,L.jsxs)(`div`,{className:Q.prDecision,children:[a?(0,L.jsxs)(`div`,{className:Q.health,children:[(0,L.jsx)(u1,{tone:`tertiary`,variant:`meta`,children:`Health`}),(0,L.jsx)(`span`,{className:`${Q.healthScore??``} ${vue(T0(a.total))}`,children:a.total.toFixed(1)})]}):null,(0,L.jsx)(u1,{className:Q.approvalCount,tone:`tertiary`,variant:`meta`,children:s.summary}),(0,L.jsxs)(`span`,{className:Q.openReview,children:[s.actionLabel,(0,L.jsx)(kg,{"aria-hidden":`true`})]})]})]})}var yue={new_comment:{icon:d_,tone:`progress`},comment_edited:{icon:d_,tone:`neutral`},comment_deleted:{icon:d_,tone:`neutral`},approval_changed:{icon:Ug,tone:`positive`},approval_requested:{icon:Qg,tone:`caution`},pr_merged:{icon:r_,tone:`positive`},pr_closed:{icon:Wg,tone:`critical`},pr_reopened:{icon:h_,tone:`progress`},merge_changed:{icon:n_,tone:`progress`}},bue={icon:Mg,tone:`neutral`},xue=e=>{switch(e){case`positive`:return Q.activityPositive??``;case`caution`:return Q.activityCaution??``;case`critical`:return Q.activityCritical??``;case`progress`:return Q.activityProgress??``;default:return Q.activityNeutral??``}};function Sue({notifications:e}){let t=e.filter(e=>e.pullRequestId!==``).slice(0,5);if(t.length===0)return null;let n=new Date;return(0,L.jsxs)(`section`,{"aria-labelledby":`recent-activity-heading`,className:Q.activitySection,children:[(0,L.jsxs)(`div`,{className:Q.activityHeading,children:[(0,L.jsxs)(`div`,{className:Q.activityTitle,children:[(0,L.jsx)(j2,{service:`codecommit`,size:`compact`}),(0,L.jsx)(u1,{as:`h2`,id:`recent-activity-heading`,variant:`section-title`,children:`Recent activity`})]}),(0,L.jsxs)(Ri,{className:Q.activityMore,to:`/notifications`,children:[`View all activity`,(0,L.jsx)(`span`,{"aria-hidden":`true`,children:`→`})]})]}),(0,L.jsx)(n1,{className:Q.activityList,padding:`none`,form:`grouped`,children:t.map(e=>{let t=yue[e.type]??bue,r=t.icon,i=e.awsAccountId!==``&&e.pullRequestId!==``&&e.repositoryName!==``&&e.accountRegion!==``?RJ(e.awsAccountId,e.pullRequestId,e.repositoryName,e.accountRegion):void 0,a=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`${Q.activityIcon??``} ${xue(t.tone)}`,children:(0,L.jsx)(r,{"aria-hidden":`true`})}),(0,L.jsxs)(`span`,{className:Q.activityCopy,children:[(0,L.jsx)(u1,{className:Q.activityItemTitle,variant:`label`,children:e.title||e.message}),(0,L.jsxs)(u1,{tone:`tertiary`,variant:`meta`,children:[fQ(new Date(e.createdAt),n),e.profile!==void 0&&e.profile!==``?` · ${e.profile}`:``]})]})]});return i===void 0?(0,L.jsx)(`div`,{className:Q.activityItem,children:a},e.id):(0,L.jsx)(Ri,{className:Q.activityItem,to:i,children:a},e.id)})})]})}function Cue(){let{clearAll:e,setFilterText:t,state:n,toggleFilter:r}=j9(),[,i]=Ki(),a=(0,N.useMemo)(()=>{let e=new Map;for(let t of n.filters){let n=e.get(t.key);n?n.push(t.value):e.set(t.key,[t.value])}return e},[n.filters]),o=!!(n.from||n.to),s=n.filters.length>0||n.review||n.q.length>0||o,c=n.filters.length>0||o,l=()=>{i(e=>(e.delete(`from`),e.delete(`to`),e),{preventScrollReset:!0,replace:!0})};return(0,L.jsxs)(`div`,{className:Q.searchBar,children:[(0,L.jsxs)(`label`,{className:Q.searchInputWrap,children:[(0,L.jsx)(u1,{className:Q.visuallyHidden,variant:`meta`,children:`Search pull requests`}),(0,L.jsx)(w_,{className:Q.searchIcon??``,decorative:!0,name:`search`,size:`small`}),(0,L.jsx)(`input`,{className:Q.searchInput,onChange:e=>t(e.target.value),placeholder:c?`Refine by title, author, or branch`:`Search title, author, or branch`,type:`search`,value:n.q})]}),c?(0,L.jsxs)(`div`,{"aria-label":`Active filters`,className:Q.activeFilters,children:[[...a.entries()].flatMap(([e,t])=>t.map(t=>(0,L.jsxs)(`button`,{"aria-label":`Remove ${N9[e]} filter ${t}`,className:Q.filterChip,onClick:()=>r(e,t),type:`button`,children:[(0,L.jsxs)(`span`,{children:[N9[e],`:`]}),` `,t,(0,L.jsx)(w_,{decorative:!0,name:`close`,size:`small`})]},`${e}:${t}`))),o?(0,L.jsxs)(`button`,{"aria-label":`Remove date range filter`,className:Q.filterChip,onClick:l,type:`button`,children:[(0,L.jsx)(`span`,{children:`Date:`}),` `,n.from??`Any`,` → `,n.to??`Any`,(0,L.jsx)(w_,{decorative:!0,name:`close`,size:`small`})]}):null]}):null,s?(0,L.jsxs)(`button`,{"aria-label":`Clear search and filters`,className:Q.clearSearch,onClick:e,type:`button`,children:[`Clear all`,(0,L.jsx)(w_,{decorative:!0,name:`close`,size:`small`})]}):null]})}var R9=e=>RJ(e.account.profile,String(e.id),String(e.repositoryName),String(e.account.region)),z9=e=>`${e.account.awsAccountId??e.account.profile}:${String(e.id)}:${String(e.repositoryName)}:${String(e.account.region)}`,wue=(e,t)=>{let n=e.getAll(`f`).filter(e=>!e.startsWith(`status:`)&&e!==``);e.delete(`f`);for(let t of n)e.append(`f`,t);e.append(`f`,`status:${t}`)};function Tue(){let e=Yz(Fq),t=Zz(cq),{state:n,toggleFilter:r}=j9(),[,i]=Ki(),a=e.pullRequests,o=e.status===`loading`,s=(0,N.useMemo)(()=>{let t=0,n=0,r=0,i=0;for(let o of a)o.status===`OPEN`&&(i+=1,o.isApproved?r+=1:n+=1,WW(o,e.currentUser)&&(t+=1));return{approved:r,open:i,pending:n,review:t}},[e.currentUser,a]),c=(0,N.useMemo)(()=>{if(a.length===0)return[];let{filters:t,from:r,q:i,review:o,to:s}=n,c=i.toLowerCase(),l=F9(t),u=t.some(e=>e.key===`status`&&M9.has(e.value)),d=t.some(e=>e.key===`status`&&[`open`,`merged`,`closed`].includes(e.value)),f=u&&!d,p=r!==void 0&&r!==``?new Date(r).getTime():void 0,m=s!==void 0&&s!==``?new Date(s).getTime():void 0,h=t.find(e=>e.key===`status`);return a.filter(t=>i.length>0&&!t.repositoryName.toLowerCase().includes(c)&&!t.title.toLowerCase().includes(c)&&!t.author.toLowerCase().includes(c)&&!t.sourceBranch.toLowerCase().includes(c)&&!(t.description?.toLowerCase().includes(c)??!1)||f&&t.status!==`OPEN`||![...l.values()].every(e=>e.some(e=>P9(t,e)))||(Number.isFinite(p)||Number.isFinite(m))&&!uue(h?.value===`merged`||h?.value===`closed`?t.lastModifiedDate.getTime():t.creationDate.getTime(),p,m)?!1:!o||WW(t,e.currentUser)).sort((e,t)=>t.lastModifiedDate.getTime()-e.lastModifiedDate.getTime())},[e.currentUser,n,a]),l=lue(n),u=(0,N.useCallback)(t=>{i(n=>{if(n.delete(`groupBy`),n.delete(`mine`),n.delete(`mineScope`),n.delete(`review`),n.set(`sortBy`,`updated`),e.currentUser!==void 0&&e.currentUser!==``){let t=n.getAll(`f`).filter(t=>t!==`author:${e.currentUser}`&&t!==``);n.delete(`f`);for(let e of t)n.append(`f`,e)}return wue(n,t===`review`?`open`:t),t===`review`&&n.set(`review`,`1`),n},{preventScrollReset:!0,replace:!0})},[e.currentUser,i]),d=(0,N.useMemo)(()=>[...new Set(e.accounts.filter(e=>e.enabled).map(e=>e.profile))],[e.accounts]),f=a.length===0&&d.length>0,p=new Set(c.map(e=>e.account.profile)).size,m=e.currentUser!==void 0&&e.currentUser!==``?e.notifications?.items??[]:[],h=(()=>{if(c.length===0&&o)return(0,L.jsx)(x$,{announce:`polite`,className:Q.queueState,description:a.length>0?`${a.length} pull requests are available; the current view hides them while refresh continues.`:`Reading configured CodeCommit accounts and preparing the decision queue.`,title:`Loading pull requests`,tone:`progress`});if(c.length===0){let e=a.length>0;return(0,L.jsxs)(`div`,{className:Q.emptyStack,children:[(0,L.jsx)(x$,{className:Q.queueState,description:e?`${a.length} pull requests are cached, but none match the current search and filters.`:f?`A configured AWS session may have expired. Sign in to load its pull requests.`:`No pull requests are available from the configured accounts yet.`,title:e?`No pull requests match this view`:`The queue is empty`}),e?(0,L.jsxs)(`div`,{className:Q.emptyActions,children:[(0,L.jsx)(r$,{onClick:()=>r(`status`,`merged`),size:`compact`,children:`Show merged`}),(0,L.jsx)(r$,{onClick:()=>r(`status`,`closed`),size:`compact`,children:`Show closed`})]}):null,f?(0,L.jsxs)(n1,{className:Q.ssoPanel,padding:`compact`,form:`grouped`,children:[(0,L.jsx)(u1,{as:`h3`,variant:`card-title`,children:`Restore AWS sessions`}),(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:`Sign in with each profile that should contribute to this queue.`}),(0,L.jsx)(`div`,{className:Q.ssoActions,children:d.map(e=>(0,L.jsx)(r$,{className:Q.ssoButton,leadingIcon:`user`,onClick:()=>t({payload:{profile:e}}),size:`compact`,children:e},e))}),(0,L.jsx)(u_,{"aria-hidden":`true`,className:Q.ssoWatermark})]}):null]})}if(n.groupBy!==`account`)return(0,L.jsx)(n1,{className:Q.queueSurface,padding:`none`,form:`grouped`,children:c.map(t=>(0,L.jsx)(L9,{currentUser:e.currentUser,pr:t,showUpdated:!0,to:R9(t)},z9(t)))});let i=new Map;for(let e of c){let t=e.account?.profile??`unknown`,n=i.get(t);n===void 0?i.set(t,[e]):n.push(e)}return(0,L.jsx)(`div`,{className:Q.accountGroups,children:[...i.entries()].map(([t,n],r)=>(0,L.jsxs)(`section`,{"aria-labelledby":`account-group-${r}`,className:Q.accountGroup,children:[(0,L.jsxs)(`div`,{className:Q.accountHeading,children:[(0,L.jsx)(u1,{as:`h3`,id:`account-group-${r}`,variant:`label`,children:t}),(0,L.jsxs)(u1,{tone:`tertiary`,variant:`meta`,children:[n.length,` `,n.length===1?`pull request`:`pull requests`]})]}),(0,L.jsx)(n1,{className:Q.queueSurface,padding:`none`,form:`grouped`,children:n.map(t=>(0,L.jsx)(L9,{currentUser:e.currentUser,pr:t,to:R9(t)},z9(t)))})]},t))})})(),g=[{count:s.review,id:`review`,label:`Needs your review`},{count:s.pending,id:`pending`,label:`Waiting on others`},{count:s.approved,id:`approved`,label:`Approved`},{count:s.open,id:`open`,label:`All open`}];return(0,L.jsxs)(`div`,{className:Q.page,children:[(0,L.jsxs)(`header`,{className:Q.hero,children:[(0,L.jsxs)(`div`,{className:Q.eyebrow,children:[(0,L.jsx)(j2,{service:`codecommit`,size:`compact`}),(0,L.jsx)(u1,{tone:`secondary`,variant:`meta`,children:`Review queue`})]}),(0,L.jsx)(u1,{as:`h1`,className:Q.title,variant:`page-title`,children:`What needs a decision.`}),(0,L.jsx)(u1,{className:Q.lede,tone:`secondary`,variant:`body-large`,children:`Open pull requests, ordered around your review work rather than repository noise.`})]}),(0,L.jsx)(`div`,{"aria-label":`Pull request facets`,className:Q.facets,role:`group`,children:g.map(e=>(0,L.jsxs)(`button`,{"aria-pressed":l===e.id,className:Q.facet,onClick:()=>u(e.id),type:`button`,children:[(0,L.jsx)(`span`,{className:Q.facetLabel,children:e.label}),(0,L.jsx)(`span`,{"aria-label":`${e.count} pull requests`,className:Q.facetCount,children:e.count})]},e.id))}),(0,L.jsxs)(`section`,{"aria-labelledby":`review-queue-heading`,className:Q.queueSection,children:[(0,L.jsxs)(`div`,{className:Q.sectionHeading,children:[(0,L.jsx)(u1,{as:`h2`,id:`review-queue-heading`,variant:`section-title`,children:`Review queue`}),(0,L.jsxs)(u1,{"aria-live":`polite`,tone:`tertiary`,variant:`meta`,children:[c.length,` `,c.length===1?`result`:`results`,p>0?` · ${p} ${p===1?`AWS account`:`AWS accounts`}`:``]})]}),(0,L.jsxs)(`div`,{className:Q.controls,children:[(0,L.jsx)(Cue,{}),(0,L.jsx)(pue,{})]}),h]}),m.length>0?(0,L.jsx)(Sue,{notifications:m}):null]})}var Eue=e=>e===`127.0.0.1`?`localhost`:`127.0.0.1`,Due=(e,t)=>`http://${Eue(e)}:${t}/`,$={page:`_page_1ps52_1`,hero:`_hero_1ps52_8`,heroCopy:`_heroCopy_1ps52_15`,eyebrow:`_eyebrow_1ps52_21`,title:`_title_1ps52_42`,lede:`_lede_1ps52_43`,sectionTitle:`_sectionTitle_1ps52_44`,emptyTitle:`_emptyTitle_1ps52_45`,emptyDescription:`_emptyDescription_1ps52_46`,workspaceTitle:`_workspaceTitle_1ps52_47`,workspaceMeta:`_workspaceMeta_1ps52_48`,statusDetail:`_statusDetail_1ps52_49`,errorMessage:`_errorMessage_1ps52_50`,inventory:`_inventory_1ps52_64`,sectionHeader:`_sectionHeader_1ps52_69`,sandboxList:`_sandboxList_1ps52_76`,sandboxRow:`_sandboxRow_1ps52_84`,sandboxIdentity:`_sandboxIdentity_1ps52_101`,sandboxOpen:`_sandboxOpen_1ps52_107`,sandboxHeading:`_sandboxHeading_1ps52_125`,repository:`_repository_1ps52_132`,branch:`_branch_1ps52_142`,sandboxId:`_sandboxId_1ps52_101`,port:`_port_1ps52_144`,logTimestamp:`_logTimestamp_1ps52_145`,logMessage:`_logMessage_1ps52_146`,credentialCode:`_credentialCode_1ps52_147`,sandboxMeta:`_sandboxMeta_1ps52_164`,statusDetailInline:`_statusDetailInline_1ps52_174`,metaSeparator:`_metaSeparator_1ps52_180`,rowActions:`_rowActions_1ps52_184`,workspaceActions:`_workspaceActions_1ps52_185`,viewActions:`_viewActions_1ps52_186`,credentialActions:`_credentialActions_1ps52_187`,empty:`_empty_1ps52_45`,emptyAction:`_emptyAction_1ps52_209`,workspace:`_workspace_1ps52_47`,workspaceHeader:`_workspaceHeader_1ps52_221`,workspaceIdentity:`_workspaceIdentity_1ps52_231`,backButton:`_backButton_1ps52_239`,workspaceHeading:`_workspaceHeading_1ps52_243`,credentialBar:`_credentialBar_1ps52_272`,credentialFailure:`_credentialFailure_1ps52_273`,credentialLabel:`_credentialLabel_1ps52_293`,credentialButton:`_credentialButton_1ps52_308`,workspaceContent:`_workspaceContent_1ps52_331`,workspaceNotice:`_workspaceNotice_1ps52_340`,logs:`_logs_1ps52_353`,logLine:`_logLine_1ps52_367`,noLogs:`_noLogs_1ps52_384`,editorFrame:`_editorFrame_1ps52_392`,loadingPage:`_loadingPage_1ps52_401`,loadingPanel:`_loadingPanel_1ps52_410`},Oue=new Set([`creating`,`cloning`,`starting`]),kue=e=>{switch(e){case`running`:return`positive`;case`creating`:case`cloning`:case`starting`:case`stopping`:return`progress`;case`error`:return`critical`;default:return`neutral`}},Aue=e=>e.length===0?`Unknown`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`,jue=({logs:e})=>{let t=(0,N.useRef)(null);(0,N.useEffect)(()=>{t.current!==null&&(t.current.scrollTop=t.current.scrollHeight)},[e]);let n=e.trimEnd().split(`
90
- `);return(0,L.jsx)(`div`,{"aria-label":`Sandbox logs`,className:$.logs,ref:t,role:`log`,children:n.map((e,t)=>{let n=e.match(/^\[([^\]]+)\]\s*(.*)$/),r=n?.[1],i=n?.[2]??e;return(0,L.jsxs)(`div`,{className:$.logLine,children:[r===void 0?null:(0,L.jsx)(`span`,{className:$.logTimestamp,children:r}),(0,L.jsx)(`span`,{className:$.logMessage,children:i})]},`${r??`line`}-${String(t)}`)})})},Mue=({sandboxId:e})=>{let t=Yz(_q(e)),[n,r]=(0,N.useState)(!1);if(nz(t))return(0,L.jsx)(`div`,{className:$.credentialFailure,role:`alert`,children:`Unable to load the code-server password. Reload the sandbox after checking the owner session.`});let i=ez(t)?t.value.password:null;return(0,L.jsxs)(`div`,{className:$.credentialBar,children:[(0,L.jsx)(`span`,{className:$.credentialLabel,children:`Authenticated owner access`}),(0,L.jsx)(`code`,{className:$.credentialCode,children:i===null?`Loading…`:n?i:`••••••••••••`}),(0,L.jsxs)(`div`,{"aria-label":`Sandbox credential actions`,className:$.credentialActions,role:`group`,children:[(0,L.jsx)(`button`,{"aria-label":n?`Hide code-server password`:`Reveal code-server password`,className:$.credentialButton,disabled:i===null,onClick:()=>r(e=>!e),type:`button`,children:n?(0,L.jsx)(Zg,{"aria-hidden":`true`,size:16}):(0,L.jsx)(Qg,{"aria-hidden":`true`,size:16})}),(0,L.jsx)(`button`,{"aria-label":`Copy code-server password`,className:$.credentialButton,disabled:i===null,onClick:()=>{i!==null&&navigator.clipboard.writeText(i)},type:`button`,children:(0,L.jsx)(qg,{"aria-hidden":`true`,size:16})})]})]})};function Nue(){let{sandboxId:e}=ur(),[t,n]=Ki(),r=Yz(Fq),i=Zz(yq),a=Zz(bq),o=Zz(xq),s=or();return(0,L.jsx)(Pue,{deleteSandbox:o,initialView:t.get(`view`)===`logs`?`logs`:`editor`,navigate:s,onViewChange:e=>n(e===`logs`?{view:`logs`}:{},{preventScrollReset:!0,replace:!0}),renderCredentials:e=>(0,L.jsx)(Mue,{sandboxId:e}),restartSandbox:a,sandboxId:e,state:r,stopSandbox:i})}function Pue({deleteSandbox:e,initialView:t,navigate:n,onViewChange:r,renderCredentials:i,restartSandbox:a,sandboxId:o,state:s,stopSandbox:c}){let[l,u]=(0,N.useState)(t===`logs`),d=(0,N.useMemo)(()=>s.sandboxes?.find(e=>e.id===o)??null,[o,s.sandboxes]),f=(0,N.useCallback)(e=>{u(e===`logs`),r(e)},[r]),p=(0,N.useCallback)(()=>{o!==void 0&&c({params:{sandboxId:FW.make(o)}})},[o,c]);if(d===null)return(0,L.jsx)(`div`,{className:$.loadingPage,children:(0,L.jsx)(x$,{announce:`polite`,className:$.loadingPanel,description:`CodeCommit is loading the isolated review workspace and its current lifecycle state.`,title:`Loading sandbox`,tone:`progress`})});let m=d.status===`running`,h=Oue.has(d.status),g=l||!m,_=(d.status===`stopped`||d.status===`error`)&&d.containerId!==null,v=d.status===`stopped`||d.status===`error`,y=m||h,b=d.region===null?`/accounts/${d.awsAccountId}/prs/${d.pullRequestId}`:RJ(d.awsAccountId,d.pullRequestId,d.repositoryName,d.region);return(0,L.jsxs)(`div`,{className:$.workspace,children:[(0,L.jsxs)(`header`,{className:$.workspaceHeader,children:[(0,L.jsxs)(`div`,{className:$.workspaceIdentity,children:[(0,L.jsx)(r$,{className:$.backButton,leadingIcon:`arrow-left`,onClick:()=>n(b),size:`compact`,variant:`quiet`,children:`Back to PR`}),(0,L.jsxs)(`div`,{className:$.workspaceHeading,children:[(0,L.jsxs)(`p`,{className:$.workspaceTitle,children:[(0,L.jsx)(`span`,{className:$.sandboxId,children:d.repositoryName}),` / `,d.sourceBranch]}),(0,L.jsxs)(`p`,{className:$.workspaceMeta,children:[`PR #`,d.pullRequestId,` · `,d.id]})]}),(0,L.jsx)(c$,{label:Aue(d.status),size:`compact`,tone:kue(d.status)})]}),(0,L.jsxs)(`div`,{"aria-label":`Sandbox workspace actions`,className:$.workspaceActions,role:`group`,children:[d.logs===null?null:(0,L.jsxs)(`div`,{"aria-label":`Workspace view`,className:$.viewActions,role:`group`,children:[m?(0,L.jsx)(r$,{"aria-pressed":!g,onClick:()=>f(`editor`),size:`compact`,variant:g?`quiet`:`primary`,children:`Editor`}):null,(0,L.jsx)(r$,{"aria-pressed":g,onClick:()=>f(`logs`),size:`compact`,variant:g?`primary`:`quiet`,children:`Logs`})]}),_?(0,L.jsx)(r$,{onClick:()=>a({params:{sandboxId:FW.make(d.id)}}),size:`compact`,variant:`secondary`,children:`Restart`}):null,v?(0,L.jsx)(r$,{onClick:()=>{e({params:{sandboxId:FW.make(d.id)}}),n(`/sandboxes`)},size:`compact`,variant:`quiet`,children:`Delete`}):null,y?(0,L.jsx)(r$,{onClick:p,size:`compact`,variant:`secondary`,children:`Stop`}):null]})]}),m&&!g?i(FW.make(d.id)):null,g?(0,L.jsxs)(`div`,{className:$.workspaceContent,children:[d.statusDetail===null&&d.error===null?null:(0,L.jsxs)(`div`,{className:$.workspaceNotice,children:[d.statusDetail===null?null:(0,L.jsx)(`p`,{className:$.statusDetail,children:d.statusDetail}),d.error===null?null:(0,L.jsx)(x$,{announce:`assertive`,description:d.error,title:`Sandbox stopped before readiness`,tone:`critical`})]}),d.logs===null?(0,L.jsx)(`div`,{className:$.noLogs,children:(0,L.jsx)(x$,{description:h?`Logs will appear as the reviewed revision is cloned and prepared.`:`This sandbox did not retain lifecycle logs.`,title:h?`Preparing the revision`:`No logs available`,tone:h?`progress`:`neutral`})}):(0,L.jsx)(jue,{logs:d.logs})]}):(0,L.jsx)(`iframe`,{className:$.editorFrame,src:d.port===null?void 0:Due(window.location.hostname,d.port),title:`${d.repositoryName} code sandbox`})]})}var Fue=new Set([`creating`,`cloning`,`starting`]),B9=e=>Fue.has(e),Iue=e=>{switch(e){case`running`:return`positive`;case`creating`:case`cloning`:case`starting`:case`stopping`:return`progress`;case`error`:return`critical`;default:return`neutral`}},Lue=e=>e.length===0?`Unknown`:`${e.slice(0,1).toUpperCase()}${e.slice(1)}`,Rue=e=>{let t=new Date(e),n=Date.now()-t.getTime();return n<6e4?`just now`:n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:`${Math.floor(n/864e5)}d ago`};function zue(){let e=Yz(Fq),t=Zz(yq),n=Zz(bq),r=Zz(xq),i=or();return(0,L.jsx)(Bue,{deleteSandbox:r,navigate:i,restartSandbox:n,state:e,stopSandbox:t})}function Bue({deleteSandbox:e,navigate:t,restartSandbox:n,state:r,stopSandbox:i}){let a=r.sandboxes??[],o=a.filter(({status:e})=>e===`running`).length;return(0,L.jsxs)(`div`,{className:$.page,children:[(0,L.jsxs)(`header`,{className:$.hero,children:[(0,L.jsxs)(`div`,{className:$.heroCopy,children:[(0,L.jsx)(`span`,{className:$.eyebrow,children:`Isolated review environments`}),(0,L.jsx)(u1,{as:`h1`,className:$.title,variant:`page-title`,children:`Sandboxes`}),(0,L.jsx)(u1,{className:$.lede,tone:`secondary`,variant:`body-large`,children:`Open a revision in its own authenticated workspace, then keep lifecycle and logs in view.`})]}),(0,L.jsx)(c$,{label:o===1?`1 running`:`${String(o)} running`,tone:o>0?`positive`:`neutral`})]}),a.length===0?(0,L.jsx)(x$,{action:(0,L.jsx)(r$,{className:$.emptyAction,onClick:()=>t(`/`),variant:`secondary`,children:`Open pull requests`}),className:$.empty,description:`Choose a pull request, then select "Sandbox" or press "." to create an isolated review workspace.`,title:`No sandboxes yet`}):(0,L.jsxs)(`section`,{"aria-labelledby":`sandbox-inventory-heading`,className:$.inventory,children:[(0,L.jsxs)(`div`,{className:$.sectionHeader,children:[(0,L.jsx)(u1,{as:`h2`,className:$.sectionTitle,id:`sandbox-inventory-heading`,variant:`section-title`,children:`Review environments`}),(0,L.jsx)(u1,{tone:`tertiary`,variant:`meta`,children:a.length===1?`1 sandbox`:`${String(a.length)} sandboxes`})]}),(0,L.jsx)(`div`,{className:$.sandboxList,children:a.map(r=>{let a=r.status===`running`||B9(r.status),o=(r.status===`stopped`||r.status===`error`)&&r.containerId,s=r.status===`stopped`||r.status===`error`;return(0,L.jsxs)(`article`,{className:$.sandboxRow,children:[(0,L.jsxs)(`div`,{className:$.sandboxIdentity,children:[(0,L.jsxs)(`button`,{"aria-label":`Open ${r.repositoryName} sandbox for pull request ${r.pullRequestId}`,className:$.sandboxOpen,onClick:()=>t(`/sandbox/${r.id}`),type:`button`,children:[(0,L.jsxs)(`span`,{className:$.sandboxHeading,children:[(0,L.jsx)(`span`,{className:$.repository,children:r.repositoryName}),(0,L.jsx)(`span`,{className:$.branch,children:r.sourceBranch}),(0,L.jsx)(c$,{label:Lue(r.status),size:`compact`,tone:Iue(r.status)})]}),(0,L.jsxs)(`span`,{className:$.sandboxMeta,children:[(0,L.jsxs)(`span`,{children:[`PR #`,r.pullRequestId]}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:$.metaSeparator,children:`·`}),(0,L.jsx)(`span`,{children:Rue(r.createdAt)}),r.port!==null&&r.status===`running`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:$.metaSeparator,children:`·`}),(0,L.jsxs)(`span`,{className:$.port,children:[`port `,r.port]})]}):null,r.statusDetail!==null&&B9(r.status)?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{"aria-hidden":`true`,className:$.metaSeparator,children:`·`}),(0,L.jsx)(`span`,{className:$.statusDetailInline,children:r.statusDetail})]}):null]})]}),r.error===null?null:(0,L.jsx)(`p`,{className:$.errorMessage,children:r.error})]}),(0,L.jsxs)(`div`,{"aria-label":`Actions for ${r.repositoryName}`,className:$.rowActions,role:`group`,children:[r.logs===null?null:(0,L.jsx)(r$,{onClick:()=>t(`/sandbox/${r.id}?view=logs`),size:`compact`,variant:`quiet`,children:`Logs`}),a?(0,L.jsx)(r$,{onClick:()=>i({params:{sandboxId:FW.make(r.id)}}),size:`compact`,variant:`secondary`,children:`Stop`}):null,o?(0,L.jsx)(r$,{onClick:()=>n({params:{sandboxId:FW.make(r.id)}}),size:`compact`,variant:`secondary`,children:`Restart`}):null,s?(0,L.jsx)(r$,{onClick:()=>e({params:{sandboxId:FW.make(r.id)}}),size:`compact`,variant:`quiet`,children:`Delete`}):null]})]},r.id)})})]})]})}var Vue=[{key:`Esc`,desc:`Back / Close`},{key:`R`,desc:`Refresh PRs`},{key:`/`,desc:`Filter PRs`},{key:`1-7`,desc:`Quick filters`},{key:`Enter`,desc:`Open PR details`},{key:`Cmd+P`,desc:`Command palette`}];function Hue(){return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`About`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Keyboard shortcuts and info`})]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,L.jsx)(`p`,{className:`text-xs font-medium text-muted-foreground`,children:`Keyboard Shortcuts`}),Vue.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between py-0.5`,children:[(0,L.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:e.desc}),(0,L.jsx)(`kbd`,{className:`rounded border bg-muted px-1.5 py-0.5 font-mono text-xs`,children:e.key})]},e.key))]})]})}var Uue=[`all`,`on`,`off`];function Wue(){let e=Yz($K),t=Yz(Fq),n=Zz(oq),r=Zz(cq),i=Zz(lq),[a,o]=(0,N.useState)(``),[s,c]=(0,N.useState)(`all`),[l,u]=(0,N.useState)({}),d=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{d.current&&clearTimeout(d.current)},[]);let f=(0,N.useCallback)(e=>{d.current&&clearTimeout(d.current),d.current=setTimeout(()=>{n({payload:e})},500)},[n]),p=(0,N.useCallback)((e,t)=>{let n=!(l[e]??t.accounts.find(t=>t.profile===e)?.enabled??!0),r={...l,[e]:n};u(r),f({accounts:t.accounts.map(t=>({profile:t.profile,regions:[...t.regions],enabled:t.profile===e?n:r[t.profile]??t.enabled})),autoDetect:t.autoDetect,autoRefresh:t.autoRefresh,refreshIntervalSeconds:t.refreshIntervalSeconds})},[f,l]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Accounts`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`AWS profiles configured for CodeCommit`})]}),(0,L.jsx)(r0,{}),uz(e).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(e=>(0,L.jsx)(Gue,{currentUser:t.currentUser,data:e,overrides:l,search:a,setSearch:o,statusFilter:s,setStatusFilter:c,toggleAccount:p,onSsoLogin:e=>{try{r({payload:{profile:JF(MW)(e)}})}catch{}},onSsoLogout:()=>i({})})).render()]})}function Gue({currentUser:e,data:t,onSsoLogin:n,onSsoLogout:r,overrides:i,search:a,setSearch:o,setStatusFilter:s,statusFilter:c,toggleAccount:l}){let u=(0,N.useMemo)(()=>t.accounts.map(e=>({...e,enabled:i[e.profile]??e.enabled})),[t.accounts,i]),d=(0,N.useMemo)(()=>{let e=a.toLowerCase();return u.filter(t=>!(c===`on`&&!t.enabled||c===`off`&&t.enabled||e&&!t.profile.toLowerCase().includes(e)&&!t.regions.some(t=>t.toLowerCase().includes(e))))},[u,a,c]),f=u.filter(e=>e.enabled),p=f.length;return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,L.jsx)(S_,{className:`size-4 text-muted-foreground`}),e?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Current user:`}),(0,L.jsx)(`span`,{className:`font-medium`,children:e}),(0,L.jsx)(D1,{variant:`ghost`,size:`sm`,className:`h-6 px-1.5 text-xs`,title:`SSO Logout`,onClick:()=>r(),children:(0,L.jsx)(l_,{className:`size-3`})})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Not logged in`}),f[0]&&(()=>{let e=f[0].profile;return(0,L.jsx)(D1,{variant:`ghost`,size:`sm`,className:`h-6 px-1.5 text-xs`,title:`SSO Login`,onClick:()=>n(e),children:(0,L.jsx)(u_,{className:`size-3`})})})()]})]}),u.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground py-4`,children:`No accounts configured. Edit the config file to add AWS profiles.`}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(`div`,{className:`relative flex-1`,children:[(0,L.jsx)(__,{className:`absolute left-2.5 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground`}),(0,L.jsx)(I1,{placeholder:`Search profiles...`,value:a,onChange:e=>o(e.target.value),className:`h-8 pl-8 text-sm`})]}),(0,L.jsx)(O1,{children:Uue.map(e=>(0,L.jsx)(D1,{variant:c===e?`default`:`outline`,size:`sm`,className:`h-8 px-2.5 text-xs capitalize`,onClick:()=>s(e),children:e},e))})]}),(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground`,children:[p,`/`,u.length,` enabled`,d.length!==u.length&&` · ${d.length} shown`]}),(0,L.jsxs)(`div`,{className:`divide-y rounded-md border`,children:[d.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between px-3 py-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,L.jsx)(Eee,{className:`size-3.5 text-muted-foreground shrink-0`}),(0,L.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e.profile}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground truncate`,children:e.regions.join(`, `)||`default`})]}),(0,L.jsx)(D1,{variant:e.enabled?`default`:`outline`,size:`sm`,className:`ml-2 h-6 px-2 text-xs shrink-0`,onClick:()=>l(e.profile,t),children:e.enabled?`On`:`Off`})]},e.profile)),d.length===0&&(0,L.jsx)(`p`,{className:`px-3 py-4 text-center text-sm text-muted-foreground`,children:`No matching accounts`})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,L.jsx)(a_,{className:`size-3`}),`Auto-detect: `,t.autoDetect?`enabled`:`disabled`]})]})}function Kue(){let e=or(),t=Yz(Aq),n=Zz(jq),r=Zz(Pq),[i,a]=(0,N.useState)(!0),[o,s]=(0,N.useState)(30),[c,l]=(0,N.useState)(!1);(0,N.useEffect)(()=>{ez(t)&&(a(t.value.enabled),s(t.value.retentionDays),l(!1))},[t]);let[u,d]=(0,N.useState)(!1);return(0,N.useEffect)(()=>{u&&ez(t)&&(d(!1),l(!1))},[u,t]),(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`text-lg font-semibold`,children:`Audit Log`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Record every AWS API call made by the app`})]}),(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`label`,{className:`flex items-center justify-between rounded-md border px-3 py-3`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm font-medium`,children:`Enable audit logging`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Log all API calls with permission state and duration`})]}),(0,L.jsx)(`button`,{role:`switch`,"aria-checked":i,onClick:()=>{a(!i),l(!0)},className:`relative inline-flex h-5 w-9 shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors ${i?`bg-primary`:`bg-muted`}`,children:(0,L.jsx)(`span`,{className:`pointer-events-none block size-4 rounded-full bg-background shadow-lg transition-transform ${i?`translate-x-4`:`translate-x-0`}`})})]}),(0,L.jsxs)(`div`,{className:`rounded-md border px-3 py-3 space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Retention period (days)`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Entries older than this are pruned on server start`}),(0,L.jsxs)(L1,{value:String(o),onValueChange:e=>{s(Number(e)),l(!0)},children:[(0,L.jsx)(z1,{className:`w-36`,children:(0,L.jsx)(R1,{})}),(0,L.jsxs)(B1,{children:[(0,L.jsx)(V1,{value:`7`,children:`7 days`}),(0,L.jsx)(V1,{value:`14`,children:`14 days`}),(0,L.jsx)(V1,{value:`30`,children:`30 days`}),(0,L.jsx)(V1,{value:`60`,children:`60 days`}),(0,L.jsx)(V1,{value:`90`,children:`90 days`}),(0,L.jsx)(V1,{value:`180`,children:`180 days`}),(0,L.jsx)(V1,{value:`365`,children:`365 days`})]})]})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-0 rounded-md border w-fit`,children:[(0,L.jsx)(D1,{size:`sm`,disabled:!c,onClick:()=>{n({payload:{enabled:i,retentionDays:o}}),d(!0)},className:`rounded-r-none border-0`,children:`Save`}),(0,L.jsx)(D1,{variant:`outline`,size:`sm`,onClick:()=>e(`/audit`),className:`rounded-l-none border-0 border-l`,children:`View Audit Log`})]}),(0,L.jsx)(D1,{variant:`destructive`,size:`sm`,onClick:()=>r({}),children:`Clear All Logs`})]})]})}var que=e=>e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1048576).toFixed(1)} MB`;function V9({copied:e,copyKey:t,detail:n,label:r,onCopy:i,path:a}){return(0,L.jsxs)(`div`,{className:`flex items-baseline gap-3 py-1.5`,children:[(0,L.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground w-24`,children:r}),(0,L.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`code`,{className:`truncate text-xs font-mono`,children:a}),(0,L.jsx)(`button`,{onClick:()=>i(a,t),className:`shrink-0 rounded p-0.5 hover:bg-muted`,children:e===t?(0,L.jsx)(Hg,{className:`size-3 text-green-500`}):(0,L.jsx)(qg,{className:`size-3 text-muted-foreground`})})]}),(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:n})]})]})}function Jue(){let e=Yz(rq),t=Yz(aq),n=Yz(iq),r=Zz(sq),[i,a]=(0,N.useState)(null),[o,s]=(0,N.useState)(!1),c=(0,N.useCallback)((e,t)=>{navigator.clipboard.writeText(e).then(()=>{a(t),setTimeout(()=>a(null),2e3)},()=>{})},[]),l=(0,N.useCallback)(async()=>{s(!0);try{await r({})}finally{s(!1)}},[r]),u=e=>e?`Modified ${fQ(new Date(e),new Date,``).trim()}`:``;return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Configuration`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`File locations, validation, and storage`})]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`space-y-1`,children:[uz(e).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground py-1`,children:`Loading config path...`})).onError(()=>(0,L.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load config path`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load config path`})).onSuccess(e=>{let n=ez(t)?` · ${t.value.status}`:``,r=e.exists?`${u(e.modifiedAt)}${n}`:`Not created yet${n}`;return(0,L.jsx)(V9,{label:`Config file`,path:e.path,detail:r,copyKey:`config`,copied:i,onCopy:c})}).render(),uz(t).onInitialOrWaiting(()=>null).onError(()=>null).onDefect(()=>null).onSuccess(e=>e.errors.length>0?(0,L.jsx)(`div`,{className:`ml-27 rounded bg-destructive/10 px-2 py-1 text-[11px] text-destructive`,children:e.errors.map((e,t)=>(0,L.jsx)(`p`,{children:e},t))}):null).render(),(0,L.jsx)(r0,{}),uz(n).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground py-1`,children:`Loading database info...`})).onError(()=>(0,L.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load database info`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-xs text-destructive py-1`,children:`Failed to load database info`})).onSuccess(e=>{let t=e.exists?`${que(e.sizeBytes)} · ${u(e.modifiedAt)}`:`Not created yet`;return(0,L.jsx)(V9,{label:`Cache database`,path:e.path,detail:t,copyKey:`db`,copied:i,onCopy:c})}).render()]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex-1`,children:[(0,L.jsx)(`p`,{className:`text-sm font-medium`,children:`Reset to Defaults`}),(0,L.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Backs up current config, then re-detects AWS profiles`})]}),(0,L.jsxs)(D1,{variant:`outline`,size:`sm`,onClick:l,disabled:o,className:`shrink-0 gap-2`,children:[(0,L.jsx)(Tee,{className:KZ(`size-3.5`,o&&`animate-spin`)}),o?`Resetting...`:`Reset`]})]})]})}var H9=(e,t)=>{try{let n=localStorage.getItem(e);return n===null?t:n===`true`}catch{return t}},Yue=(e,t)=>{try{let n=localStorage.getItem(e);return n===null?t:Number(n)||t}catch{return t}},Xue=[{label:`30 min`,ms:18e5},{label:`1 hour`,ms:36e5},{label:`2 hours`,ms:72e5},{label:`4 hours`,ms:144e5}];function Zue(){let[e,t]=(0,N.useState)(()=>H9(j_.desktopNotifications,!1)),[n,r]=(0,N.useState)(()=>H9(j_.reminders,!0)),[i,a]=(0,N.useState)(()=>Yue(j_.reminderInterval,36e5)),[o,s]=(0,N.useState)(rY()?.permission??`unsupported`),c=(0,N.useCallback)(async()=>{if(!e&&o==="default"){let e=rY();if(e===void 0){s(`unsupported`);return}let t=await e.requestPermission();if(s(t),t!==`granted`)return}let n=!e;t(n);try{localStorage.setItem(j_.desktopNotifications,String(n))}catch{}},[e,o]),l=(0,N.useCallback)(()=>{let e=!n;r(e);try{localStorage.setItem(j_.reminders,String(e))}catch{}},[n]),u=(0,N.useCallback)(e=>{a(e);try{localStorage.setItem(j_.reminderInterval,String(e))}catch{}},[]);return(0,N.useEffect)(()=>{let e=()=>{let e=rY();e!==void 0&&s(e.permission)};return window.addEventListener(`focus`,e),()=>window.removeEventListener(`focus`,e)},[]),(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Notifications`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Desktop notifications and review reminders`})]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(Mg,{className:`size-5 text-muted-foreground`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm font-medium`,children:`Desktop Notifications`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:o===`unsupported`?`Not available in this browser`:o===`denied`?`Blocked by browser — enable in site settings`:`Show browser notifications for approval requests and PR updates`})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[o===`granted`&&(0,L.jsx)(T1,{variant:`outline`,className:`text-xs`,children:`Granted`}),(0,L.jsx)(`button`,{role:`switch`,"aria-checked":e,onClick:c,disabled:o===`unsupported`||o===`denied`,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors ${e?`bg-primary`:`bg-muted`} ${o===`unsupported`||o===`denied`?`opacity-50 cursor-not-allowed`:`cursor-pointer`}`,children:(0,L.jsx)(`span`,{className:`inline-block size-4 rounded-full bg-white transition-transform ${e?`translate-x-6`:`translate-x-1`}`})})]})]}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between rounded-lg border p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,L.jsx)(Gg,{className:`size-5 text-muted-foreground`}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`p`,{className:`text-sm font-medium`,children:`Review Reminders`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Periodic reminders for PRs awaiting your review`})]})]}),(0,L.jsx)(`button`,{role:`switch`,"aria-checked":n,onClick:l,className:`relative inline-flex h-6 w-11 items-center rounded-full transition-colors cursor-pointer ${n?`bg-primary`:`bg-muted`}`,children:(0,L.jsx)(`span`,{className:`inline-block size-4 rounded-full bg-white transition-transform ${n?`translate-x-6`:`translate-x-1`}`})})]}),n&&(0,L.jsxs)(`div`,{className:`rounded-lg border p-4`,children:[(0,L.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Reminder Interval`}),(0,L.jsx)(`div`,{className:`flex gap-2`,children:Xue.map(e=>(0,L.jsx)(`button`,{"aria-pressed":i===e.ms,onClick:()=>u(e.ms),className:`rounded-md px-3 py-1.5 text-xs font-medium transition-colors ${i===e.ms?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:bg-muted/80`}`,children:e.label},e.ms))})]})]})]})}var Que=`always_allow`,$ue=e=>e===`always_allow`||e===`allow`||e===`deny`;function ede(){let e=Yz(Eq),t=Zz(Oq),n=Zz(kq),r=ez(e)?e.value:[],i=r.filter(e=>e.category===`read`),a=r.filter(e=>e.category===`write`),o=()=>{for(let e of r)e.state!==`always_allow`&&t({payload:{operation:e.operation,state:Que}})},s=(e,n)=>(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`h4`,{className:`text-sm font-medium text-muted-foreground`,children:e}),n.map(e=>(0,L.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border px-3 py-2`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,L.jsx)(T1,{variant:e.category===`write`?`destructive`:`secondary`,className:`text-xs shrink-0`,children:e.category}),(0,L.jsxs)(`div`,{className:`min-w-0`,children:[(0,L.jsx)(`code`,{className:`text-xs font-mono`,children:e.operation}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground truncate`,children:e.description})]})]}),(0,L.jsxs)(L1,{value:e.state,onValueChange:n=>{$ue(n)&&t({payload:{operation:e.operation,state:n}})},children:[(0,L.jsx)(z1,{className:`w-36 shrink-0`,children:(0,L.jsx)(R1,{})}),(0,L.jsxs)(B1,{children:[(0,L.jsx)(V1,{value:`always_allow`,children:`Always Allow`}),(0,L.jsx)(V1,{value:`allow`,children:`Ask Each Time`}),(0,L.jsx)(V1,{value:`deny`,children:`Deny`})]})]})]},e.operation))]});return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`text-lg font-semibold`,children:`API Permissions`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Control which AWS API calls the app can make`})]}),(0,L.jsxs)(`div`,{className:`flex gap-2`,children:[(0,L.jsx)(D1,{variant:`outline`,size:`sm`,onClick:o,children:`Always Allow All`}),(0,L.jsx)(D1,{variant:`outline`,size:`sm`,onClick:()=>n({}),children:`Reset (Clear All)`})]}),ZR(e)?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`}):(0,L.jsxs)(`div`,{className:`space-y-6`,children:[s(`Read Operations`,i),s(`Write Operations`,a)]})]})}var tde=[{label:`1 min`,value:60},{label:`5 min`,value:300},{label:`10 min`,value:600},{label:`15 min`,value:900},{label:`30 min`,value:1800}];function nde(){let e=Yz($K),t=Zz(oq),n=(0,N.useRef)(null),r=(0,N.useRef)(null),[i,a]=(0,N.useState)({});(0,N.useEffect)(()=>{ez(e)&&(r.current=e.value)},[e]),(0,N.useEffect)(()=>{let e=new BroadcastChannel(`codecommit-config`);return n.current=e,e.onmessage=e=>{a(t=>({...t,...e.data}))},()=>e.close()},[]);let o=(0,N.useCallback)(e=>{let i=r.current;i&&(a(t=>({...t,...e})),n.current?.postMessage(e),t({payload:{accounts:i.accounts.map(e=>({profile:e.profile,regions:[...e.regions],enabled:e.enabled})),autoDetect:i.autoDetect,autoRefresh:e.autoRefresh??i.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds??i.refreshIntervalSeconds}}))},[t]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Auto-refresh`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Periodically fetch PR updates from AWS`})]}),(0,L.jsx)(r0,{}),uz(e).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(e=>{let t=i.autoRefresh??e.autoRefresh,n=i.refreshIntervalSeconds??e.refreshIntervalSeconds;return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,L.jsx)(h_,{className:`size-4 text-muted-foreground`}),(0,L.jsx)(`span`,{children:`Auto-refresh`})]}),(0,L.jsx)(D1,{variant:t?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>o({autoRefresh:!t}),children:t?`On`:`Off`})]}),t&&(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Refresh interval`}),(0,L.jsx)(O1,{children:tde.map(e=>(0,L.jsx)(D1,{variant:n===e.value?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>o({refreshIntervalSeconds:e.value}),children:e.label},e.value))})]})]})}).render()]})}var rde=(e,t,n)=>{let r=e.skillIds.includes(t);return n?r||e.skillIds.length>=24?e:{...e,skillIds:[...e.skillIds,t]}:r?{...e,skillIds:e.skillIds.filter(e=>e!==t)}:e},ide=(e,t)=>!e.skillIds.includes(t)&&e.skillIds.length>=24,ade=(e,t)=>{let n=new Set(t.map(({id:e})=>e));return[...t.map(e=>({...e,available:!0})),...e.skillIds.filter(e=>!n.has(e)).map(e=>({id:e,name:e,description:`No longer available in this environment; deselect it to repair the profile`,source:`unavailable`,available:!1}))]};function ode({disabled:e=!1,onSkillChange:t,profile:n,skills:r}){return(0,L.jsx)(`div`,{className:`grid gap-2 md:grid-cols-2`,children:ade(n,r).map(r=>(0,L.jsxs)(`label`,{className:`flex items-start gap-2 rounded-md border p-3 text-sm`,children:[(0,L.jsx)(`input`,{checked:n.skillIds.includes(r.id),disabled:e||ide(n,r.id),onChange:e=>t(r.id,e.target.checked),type:`checkbox`}),(0,L.jsxs)(`span`,{children:[(0,L.jsx)(`b`,{children:r.name}),(0,L.jsxs)(`small`,{className:`block text-muted-foreground`,children:[r.description,` · `,r.source]})]})]},r.id))})}function sde(){let e=Yz($K),t=Yz(eq),n=Zz(oq,{mode:`promiseExit`}),r=or();return(0,L.jsx)(lde,{config:e,onReload:()=>void r(0),saveConfig:n,skills:t})}var cde=e=>Gb(cD(e),{onNone:()=>`Failed to save Relay profiles`,onSome:e=>e.message});function lde({config:e,onReload:t=()=>void 0,saveConfig:n,skills:r}){let i=(0,N.useRef)(null),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(null),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(null),[p,m]=(0,N.useState)(!1);(0,N.useEffect)(()=>{ez(e)&&(i.current=e.value,a===null&&(o(e.value.review),c(e.value.review)))},[e,a]);let h=(0,N.useCallback)((e,t,n)=>{m(!1),o(r=>r===null?null:{...r,profiles:r.profiles.map(r=>r.id===e?rde(r,t,n):r)})},[]),g=(0,N.useCallback)((e,t)=>{m(!1),o(n=>n===null?null:{...n,profiles:n.profiles.map(n=>n.id===e?{...n,...t}:n)})},[]),_=(0,N.useCallback)(async()=>{let e=i.current;if(e===null||a===null)return;u(!0),f(null),m(!1);let t={accounts:e.accounts.map(({enabled:e,profile:t,regions:n})=>({enabled:e,profile:t,regions:[...n]})),autoDetect:e.autoDetect,autoRefresh:e.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds,review:a},r=await n({payload:e.sandbox===void 0?t:{...t,sandbox:e.sandbox},reactivityKeys:[`config`]});oD(r)?(c(a),r.value===`saved-refresh-failed`?f(`Relay profiles were saved, but pull-request refresh failed; reload before running Relay`):m(!0)):f(cde(r)),u(!1)},[a,n]),v=a!==null&&s!==null&&JSON.stringify(a)!==JSON.stringify(s);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Relay review profiles`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Default focus and prompt-only skills for Diff & Relay`})]}),ez(e)&&a!==null?(0,L.jsx)(D1,{disabled:!v||l,onClick:()=>void _(),size:`sm`,children:l?`Saving…`:p?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ig,{className:`size-3.5`}),` Saved`]}):`Save`}):null]}),d===null?null:(0,L.jsx)(`p`,{className:`text-sm text-destructive`,role:`alert`,children:d}),(0,L.jsx)(r0,{}),nz(e)?(0,L.jsxs)(`div`,{className:`space-y-2 rounded-lg border border-destructive/40 bg-destructive/5 p-4`,role:`alert`,children:[(0,L.jsx)(`p`,{className:`text-sm font-medium text-destructive`,children:`Could not load Relay profiles`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Check the server connection, then reload this page to retry.`}),(0,L.jsx)(D1,{onClick:t,size:`sm`,variant:`outline`,children:`Reload`})]}):!ez(e)||a===null?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading profiles…`}):(0,L.jsxs)(`div`,{className:`space-y-5`,children:[(0,L.jsxs)(`label`,{className:`grid gap-2 text-sm font-medium`,children:[`Default profile`,(0,L.jsx)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:e=>{m(!1),o(t=>t===null?null:{...t,defaultProfileId:e.target.value})},value:a.defaultProfileId,children:a.profiles.map(e=>(0,L.jsx)(`option`,{value:e.id,children:e.name},e.id))})]}),nz(r)?(0,L.jsx)(`p`,{className:`rounded-md border border-destructive/40 bg-destructive/5 p-3 text-xs text-destructive`,role:`alert`,children:`Environment skills could not be loaded. Reload this page to retry.`}):null,a.profiles.map(e=>(0,L.jsxs)(`section`,{className:`space-y-3 rounded-lg border p-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.provider,` · `,e.harness,` · `,e.model]})]}),(0,L.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,L.jsxs)(`label`,{className:`grid gap-1 text-xs font-medium`,children:[`Review kind`,(0,L.jsxs)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:t=>{let n=rG.find(e=>e===t.target.value);n!==void 0&&g(e.id,{kind:n})},value:e.kind,children:[(0,L.jsx)(`option`,{value:`review`,children:`Full review`}),(0,L.jsx)(`option`,{value:`security`,children:`Security`}),(0,L.jsx)(`option`,{value:`tests`,children:`Tests`}),(0,L.jsx)(`option`,{value:`explain`,children:`Explain`})]})]}),(0,L.jsxs)(`label`,{className:`grid gap-1 text-xs font-medium`,children:[`Provider`,(0,L.jsx)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:t=>{let n=sG.find(e=>e===t.target.value);n!==void 0&&g(e.id,{provider:n,harness:n===`claude`?`native-claude`:`native-codex`,model:n===`claude`?e.model==="default"||e.model===`configured-default`?e.model:`configured-default`:e.model==="default"?`configured-default`:e.model})},value:e.provider,children:sG.map(e=>(0,L.jsx)(`option`,{children:e},e))})]}),(0,L.jsxs)(`label`,{className:`grid gap-1 text-xs font-medium`,children:[`Harness`,(0,L.jsx)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:t=>{let n=cG.find(e=>e===t.target.value);n!==void 0&&g(e.id,{harness:n})},value:e.harness,children:cG.filter(t=>t===(e.provider===`claude`?`native-claude`:`native-codex`)).map(e=>(0,L.jsx)(`option`,{children:e},e))})]}),(0,L.jsxs)(`label`,{className:`grid gap-1 text-xs font-medium`,children:[`Model`,(0,L.jsx)(`select`,{className:`h-9 rounded-md border bg-transparent px-3 text-sm`,disabled:l,onChange:t=>{let n=lG.find(e=>e===t.target.value);n!==void 0&&g(e.id,{model:n})},value:e.model,children:uG(e.provider).map(e=>(0,L.jsx)(`option`,{children:e},e))})]})]}),(0,L.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[e.skillIds.length,`/`,24,` prompt-only methods selected`]}),ez(r)?(0,L.jsx)(ode,{disabled:l,onSkillChange:(t,n)=>h(e.id,t,n),profile:e,skills:r.value}):nz(r)?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Skill selection unavailable.`}):(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Loading environment skills…`})]},e.id)),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Skills are injected as prompt-only review methods. Relay cannot run their tools or open referenced files.`})]})]})}var U9=`/tmp/.local/share`,ude=[{label:`Node 22`,cmd:`export NVM_DIR="$HOME/.nvm" && curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | sh && . "$NVM_DIR/nvm.sh" && nvm install 22`},{label:`pnpm`,cmd:`npm install --global --prefix "$HOME/.local" pnpm && echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$HOME/.profile"`},{label:`Bun`,cmd:`curl -fsSL https://bun.sh/install | bash && echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.bashrc && echo 'export PATH="$HOME/.bun/bin:$PATH"' >> ~/.profile`}],dde=[{label:`VS Code Extensions`,mount:{hostPath:`~/.codecommit/sandbox-volumes/extensions`,containerPath:`${U9}/code-server/extensions`,readonly:!1}},{label:`VS Code Settings`,mount:{hostPath:`~/.codecommit/sandbox-volumes/settings.json`,containerPath:`${U9}/code-server/User/settings.json`,readonly:!0}},{label:`VS Code Keybindings`,mount:{hostPath:`~/.codecommit/sandbox-volumes/keybindings.json`,containerPath:`${U9}/code-server/User/keybindings.json`,readonly:!0}}],fde={image:`codercom/code-server@sha256:b88ed46a6ace76a0294a17a24f39aa88032ed0a3692c3d8ab5433b47ab57ccbf`,extensions:[],setupCommands:[],env:{},volumeMounts:[],cloneDepth:0};function pde(){let e=Yz($K),t=Zz(oq,{mode:`promise`});return(0,L.jsx)(mde,{config:e,saveConfig:t})}function mde({config:e,saveConfig:t}){let n=(0,N.useRef)(null),[r,i]=(0,N.useState)(null),[a,o]=(0,N.useState)(null),[s,c]=(0,N.useState)(!1),[l,u]=(0,N.useState)(!1),[d,f]=(0,N.useState)(null),p=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{p.current!==null&&clearTimeout(p.current)},[]),(0,N.useEffect)(()=>{if(ez(e)&&(n.current=e.value,!r)){let t=e.value.sandbox??fde;i(t),o(t)}},[e,r]);let m=(0,N.useMemo)(()=>r!==null&&a!==null&&JSON.stringify(r)!==JSON.stringify(a),[r,a]),h=(0,N.useCallback)(e=>{u(!1),f(null),i(t=>t&&{...t,...e})},[]),g=(0,N.useCallback)(async()=>{let e=n.current;if(!(!e||!r)){c(!0),u(!1),f(null);try{await t({payload:{accounts:e.accounts.map(e=>({profile:e.profile,regions:[...e.regions],enabled:e.enabled})),autoDetect:e.autoDetect,autoRefresh:e.autoRefresh,refreshIntervalSeconds:e.refreshIntervalSeconds,sandbox:r}}),o(r),u(!0),p.current!==null&&clearTimeout(p.current),p.current=setTimeout(()=>u(!1),600)}catch(e){f(lv(e)?e.message:`Failed to save sandbox settings`)}finally{c(!1)}}},[t,r]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Sandbox`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Docker sandbox defaults for code review environments`})]}),r&&(0,L.jsx)(D1,{size:`sm`,className:`h-8 gap-1.5 px-3`,disabled:!m||s,onClick:g,children:s?`Saving…`:l?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(Ig,{className:`size-3.5`}),` Saved`]}):`Save`})]}),d!==null&&(0,L.jsx)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:d}),(0,L.jsx)(r0,{}),uz(e).onInitialOrWaiting(()=>(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Loading...`})).onDefect(()=>(0,L.jsx)(`p`,{className:`text-sm text-destructive`,children:`Failed to load config`})).onSuccess(()=>r&&(0,L.jsx)(hde,{settings:r,onChange:h})).render()]})}function hde({onChange:e,settings:t}){let[n,r]=(0,N.useState)(``),[i,a]=(0,N.useState)(``),[o,s]=(0,N.useState)(``),[c,l]=(0,N.useState)(``),[u,d]=(0,N.useState)(``),[f,p]=(0,N.useState)(``),[m,h]=(0,N.useState)(!1);return(0,L.jsxs)(`div`,{className:`space-y-6`,children:[(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Docker Image`}),(0,L.jsx)(I1,{value:t.image,placeholder:`codercom/code-server@sha256:…`,onChange:t=>e({image:t.target.value}),className:`h-8 text-sm`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Digest-pinned base image for sandboxes. Must have code-server or install via setup commands.`})]}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Clone Depth`}),(0,L.jsx)(`div`,{className:`flex gap-1.5`,children:[{label:`Full`,value:0},{label:`1`,value:1},{label:`10`,value:10},{label:`50`,value:50},{label:`100`,value:100}].map(n=>(0,L.jsx)(D1,{variant:t.cloneDepth===n.value?`default`:`outline`,size:`sm`,className:`h-7 px-3 text-xs`,onClick:()=>e({cloneDepth:n.value}),children:n.label},n.value))}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`0 = full history. Higher values speed up clone but limit git log.`})]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`VS Code Extensions`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Installed via code-server --install-extension`}),(0,L.jsx)(_de,{settings:t,onChange:e}),(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:t.extensions.map(n=>(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs`,children:[(0,L.jsx)(Ng,{className:`size-3 text-muted-foreground`}),n,(0,L.jsx)(`button`,{className:`ml-0.5 text-muted-foreground hover:text-foreground`,onClick:()=>e({extensions:t.extensions.filter(e=>e!==n)}),children:(0,L.jsx)(C_,{className:`size-3`})})]},n))}),(0,L.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,L.jsx)(I1,{value:n,placeholder:`publisher.extension-id`,onChange:e=>r(e.target.value),onKeyDown:i=>{i.key===`Enter`&&n.trim()&&(e({extensions:[...t.extensions,n.trim()]}),r(``))},className:`h-8 text-sm flex-1`}),(0,L.jsx)(D1,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!n.trim(),onClick:()=>{e({extensions:[...t.extensions,n.trim()]}),r(``)},children:(0,L.jsx)(m_,{className:`size-3.5`})})]})]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Setup Commands`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Shell commands run in container after ready`}),(0,L.jsx)(vde,{settings:t,onChange:e}),(0,L.jsx)(`div`,{className:`space-y-1.5`,children:t.setupCommands.map((n,r)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n}),(0,L.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>e({setupCommands:t.setupCommands.filter((e,t)=>t!==r)}),children:(0,L.jsx)(x_,{className:`size-3.5`})})]},r))}),(0,L.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,L.jsx)(I1,{value:i,placeholder:`npm i -g tsx`,onChange:e=>a(e.target.value),onKeyDown:n=>{n.key===`Enter`&&i.trim()&&(e({setupCommands:[...t.setupCommands,i.trim()]}),a(``))},className:`h-8 text-sm font-mono flex-1`}),(0,L.jsx)(D1,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!i.trim(),onClick:()=>{e({setupCommands:[...t.setupCommands,i.trim()]}),a(``)},children:(0,L.jsx)(m_,{className:`size-3.5`})})]})]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Environment Variables`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Extra env vars injected into sandbox container`}),(0,L.jsx)(`div`,{className:`space-y-1.5`,children:Object.entries(t.env).map(([n,r])=>(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`code`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono`,children:n}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`=`}),(0,L.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:r}),(0,L.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>{let r={...t.env};delete r[n],e({env:r})},children:(0,L.jsx)(x_,{className:`size-3.5`})})]},n))}),(0,L.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,L.jsx)(I1,{value:o,placeholder:`KEY`,onChange:e=>s(e.target.value),className:`h-8 text-sm font-mono w-32`}),(0,L.jsx)(`span`,{className:`flex items-center text-xs text-muted-foreground`,children:`=`}),(0,L.jsx)(I1,{value:c,placeholder:`value`,onChange:e=>l(e.target.value),onKeyDown:n=>{n.key===`Enter`&&o.trim()&&(e({env:{...t.env,[o.trim()]:c}}),s(``),l(``))},className:`h-8 text-sm font-mono flex-1`}),(0,L.jsx)(D1,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!o.trim(),onClick:()=>{e({env:{...t.env,[o.trim()]:c}}),s(``),l(``)},children:(0,L.jsx)(m_,{className:`size-3.5`})})]})]}),(0,L.jsx)(r0,{}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`label`,{className:`text-sm font-medium`,children:`Volume Mounts`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Map host paths into the container`}),(0,L.jsx)(yde,{settings:t,onChange:e}),(0,L.jsx)(`div`,{className:`space-y-1.5`,children:t.volumeMounts.map((n,r)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,L.jsx)(`code`,{className:`rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n.hostPath}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`:`}),(0,L.jsx)(`code`,{className:`flex-1 rounded-md bg-muted px-2 py-1 text-xs font-mono truncate`,children:n.containerPath}),n.readonly&&(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`(ro)`}),(0,L.jsx)(`button`,{className:`text-muted-foreground hover:text-destructive shrink-0`,onClick:()=>e({volumeMounts:t.volumeMounts.filter((e,t)=>t!==r)}),children:(0,L.jsx)(x_,{className:`size-3.5`})})]},r))}),(0,L.jsxs)(`div`,{className:`flex gap-1.5 items-center`,children:[(0,L.jsx)(I1,{value:u,placeholder:`/host/path`,onChange:e=>d(e.target.value),className:`h-8 text-sm font-mono flex-1`}),(0,L.jsx)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:`:`}),(0,L.jsx)(I1,{value:f,placeholder:`/container/path`,onChange:e=>p(e.target.value),onKeyDown:n=>{n.key===`Enter`&&u.trim()&&f.trim()&&(e({volumeMounts:[...t.volumeMounts,{hostPath:u.trim(),containerPath:f.trim(),readonly:m}]}),d(``),p(``),h(!1))},className:`h-8 text-sm font-mono flex-1`}),(0,L.jsx)(D1,{variant:m?`default`:`outline`,size:`sm`,className:`h-8 px-2 text-xs shrink-0`,onClick:()=>h(!m),title:`Read-only`,children:`RO`}),(0,L.jsx)(D1,{variant:`outline`,size:`sm`,className:`h-8`,disabled:!u.trim()||!f.trim(),onClick:()=>{e({volumeMounts:[...t.volumeMounts,{hostPath:u.trim(),containerPath:f.trim(),readonly:m}]}),d(``),p(``),h(!1)},children:(0,L.jsx)(m_,{className:`size-3.5`})})]})]})]})}var gde=[{label:`ESLint`,id:`dbaeumer.vscode-eslint`},{label:`Prettier`,id:`esbenp.prettier-vscode`},{label:`GitLens`,id:`eamodio.gitlens`},{label:`Error Lens`,id:`usernamehw.errorlens`}];function _de({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>gde.filter(e=>!t.extensions.includes(e.id)),[t.extensions]);return n.length===0?null:(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,L.jsxs)(D1,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({extensions:[...t.extensions,n.id]}),children:[(0,L.jsx)(m_,{className:`size-3`}),n.label]},n.id))})}function vde({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>ude.filter(e=>!t.setupCommands.some(t=>t===e.cmd)),[t.setupCommands]);return n.length===0?null:(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,L.jsxs)(D1,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({setupCommands:[...t.setupCommands,n.cmd]}),children:[(0,L.jsx)(m_,{className:`size-3`}),n.label]},n.label))})}function yde({onChange:e,settings:t}){let n=(0,N.useMemo)(()=>dde.filter(e=>!t.volumeMounts.some(t=>t.hostPath===e.mount.hostPath)),[t.volumeMounts]);return n.length===0?null:(0,L.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:n.map(n=>(0,L.jsxs)(D1,{variant:`outline`,size:`sm`,className:`h-7 gap-1 px-2 text-xs`,onClick:()=>e({volumeMounts:[...t.volumeMounts,n.mount]}),children:[(0,L.jsx)(m_,{className:`size-3`}),n.label]},n.label))})}function bde(){let{setTheme:e,theme:t}=I_();return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`h2`,{className:`text-lg font-semibold`,children:`Theme`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Choose your preferred appearance`})]}),(0,L.jsx)(r0,{}),(0,L.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:[{id:`light`,label:`Light`,icon:(0,L.jsx)(b_,{className:`size-5`})},{id:`dark`,label:`Dark`,icon:(0,L.jsx)(p_,{className:`size-5`})},{id:`system`,label:`System`,icon:(0,L.jsx)(f_,{className:`size-5`})}].map(n=>(0,L.jsxs)(`button`,{onClick:()=>e(n.id),className:KZ(`flex flex-col items-center gap-2 rounded-lg border p-4 transition-colors`,t===n.id?`border-primary bg-primary/5`:`border-border hover:border-primary/50`),children:[n.icon,(0,L.jsx)(`span`,{className:`text-sm font-medium`,children:n.label})]},n.id))})]})}var W9={layout:`_layout_1spyr_1`,sidebar:`_sidebar_1spyr_9`,backButton:`_backButton_1spyr_17`,tabList:`_tabList_1spyr_22`,tab:`_tab_1spyr_22`,content:`_content_1spyr_71`},xde={accounts:(0,L.jsx)(S_,{className:`size-4`}),refresh:(0,L.jsx)(h_,{className:`size-4`}),relay:(0,L.jsx)(wee,{className:`size-4`}),sandbox:(0,L.jsx)(Ng,{className:`size-4`}),notifications:(0,L.jsx)(Mg,{className:`size-4`}),permissions:(0,L.jsx)(y_,{className:`size-4`}),audit:(0,L.jsx)(g_,{className:`size-4`}),theme:(0,L.jsx)(Cee,{className:`size-4`}),config:(0,L.jsx)($g,{className:`size-4`}),about:(0,L.jsx)(a_,{className:`size-4`})},G9={accounts:`Accounts`,refresh:`Refresh`,relay:`Relay`,sandbox:`Sandbox`,notifications:`Notifications`,permissions:`Permissions`,audit:`Audit`,theme:`Theme`,config:`Config`,about:`About`},Sde=e=>SY.some(t=>t===e);function Cde(){let{tab:e}=ur(),t=Sde(e)?e:`accounts`,n=or();return(0,L.jsxs)(`div`,{className:W9.layout,children:[(0,L.jsxs)(`nav`,{"aria-label":`Settings`,className:W9.sidebar,children:[(0,L.jsxs)(D1,{className:W9.backButton,onClick:()=>n(`/`),size:`sm`,variant:`ghost`,children:[(0,L.jsx)(Og,{className:`size-4`}),`Back to PRs`]}),(0,L.jsx)(`div`,{className:W9.tabList,children:SY.map(e=>(0,L.jsxs)(Ri,{"aria-current":t===e?`page`:void 0,className:W9.tab,"data-active":t===e?`true`:void 0,to:`/settings/${e}`,children:[xde[e],(0,L.jsx)(`span`,{children:G9[e]})]},e))})]}),(0,L.jsxs)(`section`,{"aria-label":`${G9[t]} settings`,className:W9.content,children:[t===`accounts`&&(0,L.jsx)(Wue,{}),t===`refresh`&&(0,L.jsx)(nde,{}),t===`relay`&&(0,L.jsx)(sde,{}),t===`sandbox`&&(0,L.jsx)(pde,{}),t===`notifications`&&(0,L.jsx)(Zue,{}),t===`permissions`&&(0,L.jsx)(ede,{}),t===`audit`&&(0,L.jsx)(Kue,{}),t===`theme`&&(0,L.jsx)(bde,{}),t===`config`&&(0,L.jsx)(Jue,{}),t===`about`&&(0,L.jsx)(Hue,{})]})]})}var wde=(e,t)=>ZK.query(`stats`,`get`,{query:{week:e,...t},timeToLive:`30 seconds`});function Tde(e,t){return Yz((0,N.useMemo)(()=>wde(e,t),[e,t.repo,t.author,t.account]))}function K9({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`card`,className:KZ(`bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm`,e),...t})}function q9({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`card-header`,className:KZ(`@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 J9({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`card-title`,className:KZ(`leading-none font-semibold`,e),...t})}function Y9({className:e,...t}){return(0,L.jsx)(`div`,{"data-slot":`card-content`,className:KZ(`px-6`,e),...t})}function X9(e){return e==null?`—`:gQ(e)}function Z9({icon:e,label:t,onClick:n,value:r}){return(0,L.jsx)(K9,{className:n===void 0?void 0:`cursor-pointer transition-colors hover:bg-accent/50`,onClick:n,children:(0,L.jsxs)(Y9,{className:`flex items-center gap-3 p-4`,children:[(0,L.jsx)(`div`,{className:`rounded-md bg-muted p-2`,children:(0,L.jsx)(e,{className:`size-4 text-muted-foreground`})}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-2xl font-bold tabular-nums`,children:r}),(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:t})]})]})})}function Ede({highlight:e,label:t,onClick:n,pct:r,value:i}){return(0,L.jsxs)(`div`,{className:`group relative flex items-center gap-2 rounded-md px-2 py-1.5${n===void 0?``:` cursor-pointer`}`,onClick:n,children:[(0,L.jsx)(`div`,{className:`absolute inset-0 rounded-md transition-colors ${e===!0?`bg-amber-400/[0.08] group-hover:bg-amber-400/[0.14]`:`bg-foreground/[0.06] dark:bg-foreground/[0.08] group-hover:bg-foreground/[0.10] dark:group-hover:bg-foreground/[0.14]`}`,style:{width:`${r}%`}}),e===!0&&(0,L.jsx)(Dee,{"aria-hidden":`true`,className:`relative z-10 size-3 shrink-0 text-amber-400 fill-amber-400`,style:{animation:`star-in 400ms ease-out`}},t),(0,L.jsx)(`span`,{className:`relative z-10 flex-1 truncate text-xs${e===!0?` text-amber-400 font-medium`:``}`,children:t}),(0,L.jsx)(`span`,{className:`relative z-10 shrink-0 text-xs tabular-nums ${e===!0?`text-amber-400/60`:`text-muted-foreground`}`,children:i})]})}function Q9({data:e,labelKey:t,onItemClick:n,title:r,valueKey:i}){let a=e.reduce((e,t)=>Math.max(e,Number(t[i])||0),0);return(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm`,children:r})}),(0,L.jsx)(Y9,{children:e.length===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No data`}):(0,L.jsx)(`div`,{className:`space-y-1.5`,children:e.map((e,r)=>{let o=String(e[t]),s=Number(e[i])||0,c=a>0?s/a*100:0;return(0,L.jsx)(Ede,{label:o,value:s,pct:c,highlight:r===0,onClick:n===void 0?void 0:()=>n(o)},o)})})})]})}function Dde({dist:e,onBarClick:t}){let n=[{key:`small`,label:`S`,sub:`<5 files`,count:e.small},{key:`medium`,label:`M`,sub:`5–15`,count:e.medium},{key:`large`,label:`L`,sub:`15–30`,count:e.large},{key:`xlarge`,label:`XL`,sub:`30+`,count:e.extraLarge}],r=n.reduce((e,t)=>e+t.count,0),i=Math.max(...n.map(e=>e.count),1);return(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm`,children:`PR Size Distribution`})}),(0,L.jsx)(Y9,{children:r===0?(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No diff data`}):(0,L.jsx)(`div`,{className:`flex items-end gap-2 h-[120px]`,children:n.map(e=>(0,L.jsxs)(`div`,{className:`flex flex-1 flex-col items-center gap-1${t!==void 0&&e.count>0?` cursor-pointer`:``}`,onClick:t!==void 0&&e.count>0?()=>t(e.key):void 0,children:[(0,L.jsx)(`span`,{className:`text-xs tabular-nums text-muted-foreground`,children:e.count}),(0,L.jsx)(`div`,{className:`w-full flex items-end`,style:{height:80},children:(0,L.jsx)(`div`,{className:`w-full rounded-t bg-foreground/[0.12] dark:bg-foreground/[0.16] transition-all hover:bg-foreground/[0.18] dark:hover:bg-foreground/[0.22]`,style:{height:`${e.count/i*100}%`,minHeight:e.count>0?4:0}})}),(0,L.jsxs)(`div`,{className:`text-center`,children:[(0,L.jsx)(`div`,{className:`text-xs font-medium`,children:e.label}),(0,L.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:e.sub})]})]},e.key))})})]})}function Ode({onPRClick:e,prs:t}){return t.length===0?null:(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm`,children:`Most Active PRs`})}),(0,L.jsx)(Y9,{children:(0,L.jsx)(`div`,{className:`space-y-2`,children:t.map(t=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>e(t.awsAccountId,t.id,t.repositoryName,t.accountRegion),children:[(0,L.jsxs)(`span`,{className:`text-muted-foreground font-mono`,children:[`#`,t.id]}),(0,L.jsx)(`span`,{className:`truncate flex-1`,children:t.title}),(0,L.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t.author}),(0,L.jsx)(T1,{variant:`secondary`,className:`text-xs`,children:t.repositoryName}),(0,L.jsxs)(`span`,{className:`text-xs tabular-nums`,children:[t.commentCount,` comments`]})]},`${t.awsAccountId}:${t.id}:${t.repositoryName}:${t.accountRegion}`))})})]})}function kde({onPRClick:e,prs:t}){return t.length===0?null:(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm flex items-center gap-1`,children:`Stale PRs`})}),(0,L.jsx)(Y9,{children:(0,L.jsx)(`div`,{className:`space-y-1`,children:t.map(t=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-sm cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>e(t.awsAccountId,t.id,t.repositoryName,t.accountRegion),children:[(0,L.jsxs)(`span`,{className:`text-muted-foreground font-mono`,children:[`#`,t.id]}),(0,L.jsx)(`span`,{className:`truncate flex-1`,children:t.title}),(0,L.jsx)(`span`,{className:`text-muted-foreground text-xs`,children:t.author}),(0,L.jsxs)(T1,{variant:`destructive`,className:`text-xs`,children:[t.daysSinceActivity,`d idle`]})]},`${t.awsAccountId}:${t.id}:${t.repositoryName}:${t.accountRegion}`))})})]})}function Ade({data:e}){return(0,L.jsxs)(K9,{children:[(0,L.jsx)(q9,{className:`pb-2`,children:(0,L.jsx)(J9,{className:`text-sm`,children:`Health`})}),(0,L.jsx)(Y9,{children:(0,L.jsxs)(`div`,{className:`grid grid-cols-4 gap-4`,children:[(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Review Coverage`}),(0,L.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.reviewCoverage==null?`—`:`${(e.reviewCoverage*100).toFixed(0)}%`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Approval Rate`}),(0,L.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.approvalRate==null?`—`:`${(e.approvalRate*100).toFixed(0)}%`})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Stale PRs`}),(0,L.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.stalePRs.length})]}),(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Bus Factor`}),(0,L.jsx)(`div`,{className:`text-lg font-bold tabular-nums`,children:e.busFactor===null?`—`:`${e.busFactor.uniqueContributors} (${(e.busFactor.topContributorShare*100).toFixed(0)}%)`})]})]})})]})}function jde({author:e,data:t,repo:n,setFilter:r}){return(0,L.jsxs)(L.Fragment,{children:[t.availableRepos.length>0&&(0,L.jsxs)(L1,{value:n||`__all__`,onValueChange:e=>r(`repo`,e===`__all__`?void 0:e),children:[(0,L.jsx)(z1,{className:`w-[140px] h-8 text-xs`,children:(0,L.jsx)(R1,{placeholder:`All repos`})}),(0,L.jsxs)(B1,{children:[(0,L.jsx)(V1,{value:`__all__`,children:`All repos`}),t.availableRepos.map(e=>(0,L.jsx)(V1,{value:e,children:e},e))]})]}),t.availableAuthors.length>0&&(0,L.jsxs)(L1,{value:e||`__all__`,onValueChange:e=>r(`author`,e===`__all__`?void 0:e),children:[(0,L.jsx)(z1,{className:`w-[140px] h-8 text-xs`,children:(0,L.jsx)(R1,{placeholder:`All authors`})}),(0,L.jsxs)(B1,{children:[(0,L.jsx)(V1,{value:`__all__`,children:`All authors`}),t.availableAuthors.map(e=>(0,L.jsx)(V1,{value:e,children:e},e))]})]})]})}function Mde({details:e,goToPR:t}){return e.length===0?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground py-2`,children:`No data points`}):(0,L.jsx)(`div`,{className:`space-y-1 mt-2`,children:e.map((e,n)=>(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-xs cursor-pointer hover:bg-accent rounded px-2 py-1`,onClick:()=>t(e.awsAccountId,e.prId,e.repositoryName,e.accountRegion),children:[(0,L.jsxs)(`span`,{className:`text-muted-foreground font-mono shrink-0`,children:[`#`,e.prId]}),(0,L.jsx)(`span`,{className:`truncate flex-1`,children:e.prTitle}),(0,L.jsx)(`span`,{className:`text-muted-foreground shrink-0`,children:e.author}),(0,L.jsx)(T1,{variant:`secondary`,className:`text-[10px] shrink-0`,children:e.repositoryName}),(0,L.jsx)(`span`,{className:`font-mono tabular-nums shrink-0`,children:X9(e.durationMs)}),(0,L.jsxs)(`span`,{className:`text-muted-foreground shrink-0 text-[10px]`,children:[e.fromLabel,` → `,e.toLabel]})]},`${e.awsAccountId}:${e.prId}:${n}`))})}function Nde({data:e,goToPR:t}){let[n,r]=(0,N.useState)(null),i=e=>r(t=>t===e?null:e),a=[{key:`merge`,label:`Median Time to Merge`,value:e.medianTimeToMerge,details:e.mergeTimeDetails},{key:`review`,label:`Median Time to First Review`,value:e.medianTimeToFirstReview,details:e.firstReviewDetails},{key:`feedback`,label:`Median Time to Address Feedback`,value:e.medianTimeToAddressFeedback,details:e.feedbackDetails}];return(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(`div`,{className:`grid grid-cols-3 gap-3`,children:a.map(e=>(0,L.jsx)(K9,{className:`cursor-pointer transition-colors hover:bg-accent/50 ${n===e.key?`ring-1 ring-ring`:``}`,onClick:()=>i(e.key),children:(0,L.jsxs)(Y9,{className:`p-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:e.label}),(0,L.jsx)(Lg,{className:`size-3 text-muted-foreground transition-transform ${n===e.key?`rotate-180`:``}`})]}),(0,L.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,L.jsx)(`div`,{className:`text-xl font-bold tabular-nums`,children:X9(e.value)}),e.details.length>0&&(0,L.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[e.details.length,` PRs`]})]})]})},e.key))}),n&&(0,L.jsx)(K9,{children:(0,L.jsxs)(Y9,{className:`p-3`,children:[(0,L.jsxs)(`div`,{className:`text-xs font-medium mb-1`,children:[a.find(e=>e.key===n)?.label,` — Detail`]}),(0,L.jsx)(Mde,{details:a.find(e=>e.key===n)?.details??[],goToPR:t})]})})]})}function Pde({data:e,goToPR:t,handleSync:n,navigate:r,syncing:i}){return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,L.jsx)(Z9,{label:`PRs Created`,value:e.prsCreated,icon:i_,onClick:()=>r(`/?from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,L.jsx)(Z9,{label:`PRs Merged`,value:e.prsMerged,icon:i_,onClick:()=>r(`/?f=status:merged&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,L.jsx)(Z9,{label:`Comments`,value:e.totalComments,icon:d_})]}),(0,L.jsx)(Nde,{data:e,goToPR:t}),(0,L.jsxs)(`div`,{className:`grid grid-cols-3 gap-3`,children:[(0,L.jsx)(Q9,{data:e.topContributors,labelKey:`author`,valueKey:`prCount`,title:`Top Contributors`,onItemClick:t=>r(`/?f=author:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,L.jsx)(Q9,{data:e.topReviewers,labelKey:`author`,valueKey:`commentCount`,title:`Top Commenters`,onItemClick:t=>r(`/?f=commenter:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),(0,L.jsx)(Q9,{data:e.topApprovers,labelKey:`author`,valueKey:`approvalCount`,title:`Top Approvers`,onItemClick:t=>r(`/?f=approver:${encodeURIComponent(t)}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)})]}),(0,L.jsxs)(`div`,{className:`grid grid-cols-2 gap-3`,children:[(0,L.jsx)(Dde,{dist:e.prSizeDistribution,onBarClick:t=>r(`/?f=size:${t}&from=${e.weekStart.slice(0,10)}&to=${e.weekEnd.slice(0,10)}`)}),e.avgDiffSize&&(0,L.jsx)(K9,{children:(0,L.jsxs)(Y9,{className:`space-y-2 p-4`,children:[(0,L.jsx)(`div`,{className:`text-sm font-medium`,children:`Average Diff Size`}),(0,L.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Files added`}),(0,L.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesAdded.toFixed(1)})]}),(0,L.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Files modified`}),(0,L.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesModified.toFixed(1)})]}),(0,L.jsxs)(`div`,{className:`flex justify-between text-sm`,children:[(0,L.jsx)(`span`,{className:`text-muted-foreground`,children:`Files deleted`}),(0,L.jsx)(`span`,{className:`font-mono`,children:e.avgDiffSize.filesDeleted.toFixed(1)})]})]})})]}),(0,L.jsx)(Ode,{prs:e.mostActivePRs,onPRClick:t}),(0,L.jsx)(Ade,{data:e}),(0,L.jsx)(kde,{prs:e.stalePRs,onPRClick:t}),e.dataAvailableSince&&(0,L.jsxs)(`div`,{className:`text-xs text-muted-foreground text-center py-2`,children:[`Data available since `,dQ(new Date(e.dataAvailableSince))]}),e.prsCreated===0&&e.prsMerged===0&&e.totalComments===0&&(0,L.jsxs)(`div`,{className:`text-center py-8 text-muted-foreground`,children:[(0,L.jsx)(`p`,{className:`text-sm`,children:`No activity for this week.`}),(0,L.jsxs)(D1,{variant:`outline`,size:`sm`,className:`mt-2`,onClick:n,disabled:i,children:[(0,L.jsx)(h_,{className:`size-3 mr-1 ${i?`animate-spin`:``}`}),`Sync this week`]})]})]})}function Fde(){let e=or(),[t,n]=Ki(),r=Zz(Sq),i=(0,N.useMemo)(()=>mQ(new Date),[]),a=t.get(`week`)||i,o=t.get(`repo`)||void 0,s=t.get(`author`)||void 0,c=t.get(`account`)||void 0,l=Tde(a,{repo:o,author:s,account:c}),u=Yz(Fq),d=u.status===`loading`,f=(0,N.useRef)(d);(0,N.useEffect)(()=>{f.current&&!d&&n(e=>(e.set(`_t`,Date.now().toString()),e)),f.current=d},[d,n]);let p=(0,N.useMemo)(()=>pQ(a),[a]),m=(0,N.useMemo)(()=>p._tag===`None`?a:hQ(p.value),[a,p]),h=(0,N.useCallback)(e=>{if(p._tag===`None`)return;let t=mQ(new Date(p.value.start.getTime()+e*7*864e5));t>i||n(e=>(e.set(`week`,t),e))},[p,i,n]),g=(0,N.useCallback)((e,t)=>{n(n=>(t!==void 0&&t!==``?n.set(e,t):n.delete(e),n))},[n]),_=(0,N.useCallback)(()=>{r({payload:{week:a}})},[a,r]),v=(0,N.useCallback)((t,n,r,i)=>{e(r!==void 0&&i!==void 0?RJ(t,n,r,i):`/accounts/${t}/prs/${n}`)},[e]);return(0,L.jsxs)(`div`,{className:`space-y-4`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,L.jsx)(D1,{variant:`ghost`,size:`icon-sm`,onClick:()=>e(`/`),children:(0,L.jsx)(Rg,{className:`size-4`})}),(0,L.jsx)(`h1`,{className:`text-lg font-semibold`,children:`Statistics`}),(0,L.jsx)(T1,{variant:`secondary`,className:`text-[10px] tracking-wide uppercase font-normal text-muted-foreground/60`,children:`🚧 Experimental`})]}),(0,L.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,L.jsx)(D1,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(-1),children:(0,L.jsx)(Og,{className:`size-4`})}),(0,L.jsx)(`span`,{className:`text-sm font-medium min-w-[220px] text-center`,children:m}),(0,L.jsx)(D1,{variant:`ghost`,size:`icon-sm`,onClick:()=>h(1),disabled:a>=i,children:(0,L.jsx)(kg,{className:`size-4`})}),(0,L.jsxs)(D1,{variant:`outline`,size:`sm`,onClick:()=>n(e=>(e.set(`week`,i),e)),disabled:a===i,children:[(0,L.jsx)(Pg,{className:`size-3 mr-1`}),` Today`]}),(0,L.jsxs)(`div`,{className:`ml-auto flex items-center gap-2`,children:[uz(l).onSuccess(e=>(0,L.jsx)(jde,{data:e,repo:o,author:s,setFilter:g})).render(),(0,L.jsxs)(D1,{variant:`outline`,size:`sm`,onClick:_,disabled:d,children:[(0,L.jsx)(h_,{className:`size-3 mr-1 ${d?`animate-spin`:``}`}),`Sync`]})]})]}),d&&u.statusDetail&&(0,L.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:u.statusDetail}),(o!==void 0||s!==void 0||c!==void 0)&&(0,L.jsxs)(`div`,{className:`flex gap-1 flex-wrap`,children:[o&&(0,L.jsxs)(T1,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`repo`,void 0),children:[`repo: `,o,` ×`]}),s&&(0,L.jsxs)(T1,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`author`,void 0),children:[`author: `,s,` ×`]}),c&&(0,L.jsxs)(T1,{variant:`secondary`,className:`cursor-pointer`,onClick:()=>g(`account`,void 0),children:[`account: `,c,` ×`]})]}),(0,L.jsx)(r0,{}),uz(l).onInitialOrWaiting(()=>(0,L.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,L.jsx)(c_,{className:`size-5 animate-spin text-muted-foreground`})})).onError(()=>(0,L.jsx)(`div`,{className:`text-sm text-destructive py-4`,children:`Failed to load stats`})).onDefect(()=>(0,L.jsx)(`div`,{className:`text-sm text-destructive py-4`,children:`Failed to load stats`})).onSuccess(t=>(0,L.jsx)(Pde,{data:t,navigate:e,goToPR:v,handleSync:_,syncing:d})).render()]})}var Ide=e=>e!=null&&sv(e,`fullWidth`),Lde=e=>Ide(e.handle)&&e.handle.fullWidth===!0,Rde=()=>Dr().some(Lde),zde=Fi([{element:(0,L.jsx)(j1,{}),children:[{index:!0,element:(0,L.jsx)(Tue,{})},{path:`accounts/:accountId/prs/:prId`,element:(0,L.jsx)($le,{})},{path:`sandboxes`,element:(0,L.jsx)(zue,{})},{path:`sandbox/:sandboxId`,element:(0,L.jsx)(Nue,{}),handle:{fullWidth:!0}},{path:`settings/:tab?`,element:(0,L.jsx)(Cde,{})},{path:`notifications`,element:(0,L.jsx)(h0,{})},{path:`stats`,element:(0,L.jsx)(Fde,{})},{path:`audit`,element:(0,L.jsx)(Q1,{})},{path:`*`,element:(0,L.jsx)(Br,{to:`/`,replace:!0})}]}]),Bde=class extends N.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}render(){return this.state.hasError?(0,L.jsxs)(`div`,{style:{padding:`2rem`,textAlign:`center`},children:[(0,L.jsx)(`h1`,{children:`Something went wrong`}),(0,L.jsx)(`button`,{onClick:()=>window.location.reload(),style:{marginTop:`1rem`},children:`Reload`})]}):this.props.children}},$9=document.getElementById(`root`);$9&&li.createRoot($9).render((0,L.jsx)(N.StrictMode,{children:(0,L.jsx)(Bde,{children:(0,L.jsx)(F_,{children:(0,L.jsx)(Ir,{router:zde})})})}));export{y_ as $,ez as A,TL as B,UG as C,Yz as D,Zz as E,U as F,eI as G,JI as H,G as I,Ix as J,ID as K,MI as L,QI as M,_I as N,nz as O,dI as P,cv as Q,KF as R,rK as S,wG as T,eL as U,LF as V,zI as W,Fx as X,Nx as Y,lv as Z,ZK as _,n1 as a,Lg as at,XG as b,c$ as c,or as ct,Y as d,s_ as et,wQ as f,$K as g,ZJ as h,p9 as i,Bg as it,JR as j,ZR as k,x$ as l,d as lt,KJ as m,jle as n,Ug as nt,u1 as o,z as ot,nY as p,Px as q,g9 as r,Vg as rt,r$ as s,Ta as st,Mle as t,Wg as tt,TQ as u,l as ut,qK as v,eK as w,QG as x,KK as y,GF as z};