pinomad 0.7.0 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -58
- package/dist/{chunk-8yme2wep.js → chunk-014b7ne7.js} +1 -1
- package/dist/{chunk-07769pqx.js → chunk-0tesv2sr.js} +8 -8
- package/dist/{chunk-ywmm63ks.js → chunk-3p1eysm9.js} +4 -2
- package/dist/chunk-4sepcfpy.js +2994 -0
- package/dist/{chunk-0xh6cy9v.js → chunk-5gp9svzs.js} +5 -3
- package/dist/{chunk-12kaxggg.js → chunk-76pvsg2d.js} +2 -2
- package/dist/{chunk-1nyzr0mg.js → chunk-ctzgjctt.js} +2395 -839
- package/dist/{chunk-e4ahjbmz.js → chunk-jgd38rna.js} +210 -7
- package/dist/{chunk-7qb9tq54.js → chunk-khcpv54k.js} +64 -310
- package/dist/{chunk-1t58fh0k.js → chunk-m824ds0q.js} +5 -5
- package/dist/{chunk-sz3rzk55.js → chunk-qgexy01f.js} +5 -5
- package/dist/chunk-sygeb9qb.js +430 -0
- package/dist/{chunk-b1h374jr.js → chunk-v414b5pp.js} +8 -2
- package/dist/{chunk-m4c5gvce.js → chunk-vax4zspw.js} +22 -5
- package/dist/{chunk-6ysezfy5.js → chunk-vxmj0200.js} +305 -23
- package/dist/{chunk-rtwxjb90.js → chunk-vyvyaavr.js} +1 -1
- package/dist/{chunk-r6w5aqkw.js → chunk-wb10efyq.js} +17 -0
- package/dist/{chunk-fbkd73zr.js → chunk-yhf7bj5q.js} +9 -9
- package/dist/pinomad.js +10 -10
- package/package.json +12 -8
- package/web/assets/index-1g60bhv2.js +395 -0
- package/web/assets/{index-C0rwAo0H.css → index-DoyHMPwf.css} +1 -1
- package/web/index.html +2 -2
- package/dist/chunk-sj7rnvh4.js +0 -719
- package/dist/chunk-znhn8af7.js +0 -33
- package/web/assets/index-DGee2kNU.js +0 -394
|
@@ -1,394 +0,0 @@
|
|
|
1
|
-
var uT=Object.defineProperty;var nv=e=>{throw TypeError(e)};var dT=(e,t,n)=>t in e?uT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ie=(e,t,n)=>dT(e,typeof t!="symbol"?t+"":t,n),K1=(e,t,n)=>t.has(e)||nv("Cannot "+n);var B=(e,t,n)=>(K1(e,t,"read from private field"),n?n.call(e):t.get(e)),ve=(e,t,n)=>t.has(e)?nv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ye=(e,t,n,s)=>(K1(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),U=(e,t,n)=>(K1(e,t,"access private method"),n);var Gd=(e,t,n,s)=>({set _(r){ye(e,t,r,n)},get _(){return B(e,t,s)}});function fT(e,t){for(var n=0;n<t.length;n++){const s=t[n];if(typeof s!="string"&&!Array.isArray(s)){for(const r in s)if(r!=="default"&&!(r in e)){const i=Object.getOwnPropertyDescriptor(s,r);i&&Object.defineProperty(e,r,i.get?i:{enumerable:!0,get:()=>s[r]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))s(r);new MutationObserver(r=>{for(const i of r)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const i={};return r.integrity&&(i.integrity=r.integrity),r.referrerPolicy&&(i.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?i.credentials="include":r.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function s(r){if(r.ep)return;r.ep=!0;const i=n(r);fetch(r.href,i)}})();function hT(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var l4={exports:{}},Fx={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var xT=Symbol.for("react.transitional.element"),pT=Symbol.for("react.fragment");function c4(e,t,n){var s=null;if(n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:xT,type:e,key:s,ref:t!==void 0?t:null,props:n}}Fx.Fragment=pT;Fx.jsx=c4;Fx.jsxs=c4;l4.exports=Fx;var a=l4.exports,u4={exports:{}},je={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ry=Symbol.for("react.transitional.element"),gT=Symbol.for("react.portal"),mT=Symbol.for("react.fragment"),yT=Symbol.for("react.strict_mode"),kT=Symbol.for("react.profiler"),bT=Symbol.for("react.consumer"),vT=Symbol.for("react.context"),wT=Symbol.for("react.forward_ref"),jT=Symbol.for("react.suspense"),ST=Symbol.for("react.memo"),d4=Symbol.for("react.lazy"),CT=Symbol.for("react.activity"),$T=Symbol.for("react.view_transition"),sv=Symbol.iterator;function ET(e){return e===null||typeof e!="object"?null:(e=sv&&e[sv]||e["@@iterator"],typeof e=="function"?e:null)}var f4={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h4=Object.assign,x4={};function Jl(e,t,n){this.props=e,this.context=t,this.refs=x4,this.updater=n||f4}Jl.prototype.isReactComponent={};Jl.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")};Jl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function p4(){}p4.prototype=Jl.prototype;function iy(e,t,n){this.props=e,this.context=t,this.refs=x4,this.updater=n||f4}var oy=iy.prototype=new p4;oy.constructor=iy;h4(oy,Jl.prototype);oy.isPureReactComponent=!0;var rv=Array.isArray;function Ag(){}var tt={H:null,A:null,T:null,S:null},g4=Object.prototype.hasOwnProperty;function ay(e,t,n){var s=n.ref;return{$$typeof:ry,type:e,key:t,ref:s!==void 0?s:null,props:n}}function TT(e,t){return ay(e.type,t,e.props)}function ly(e){return typeof e=="object"&&e!==null&&e.$$typeof===ry}function NT(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var iv=/\/+/g;function X1(e,t){return typeof e=="object"&&e!==null&&e.key!=null?NT(""+e.key):t.toString(36)}function AT(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Ag,Ag):(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 Da(e,t,n,s,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"bigint":case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case ry:case gT:o=!0;break;case d4:return o=e._init,Da(o(e._payload),t,n,s,r)}}if(o)return r=r(e),o=s===""?"."+X1(e,0):s,rv(r)?(n="",o!=null&&(n=o.replace(iv,"$&/")+"/"),Da(r,t,n,"",function(u){return u})):r!=null&&(ly(r)&&(r=TT(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(iv,"$&/")+"/")+o)),t.push(r)),1;o=0;var l=s===""?".":s+":";if(rv(e))for(var c=0;c<e.length;c++)s=e[c],i=l+X1(s,c),o+=Da(s,t,n,i,r);else if(c=ET(e),typeof c=="function")for(e=c.call(e),c=0;!(s=e.next()).done;)s=s.value,i=l+X1(s,c++),o+=Da(s,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return Da(AT(e),t,n,s,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return o}function Vd(e,t,n){if(e==null)return e;var s=[],r=0;return Da(e,s,"","",function(i){return t.call(n,i,r++)}),s}function MT(e){if(e._status===-1){var t=e._result,n=t();n.then(function(s){(e._status===0||e._status===-1)&&(e._status=1,e._result=s,n.status===void 0&&(n.status="fulfilled",n.value=s))},function(s){(e._status===0||e._status===-1)&&(e._status=2,e._result=s,n.status===void 0&&(n.status="rejected",n.reason=s))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ov=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)};function m4(e){var t=tt.T,n={};n.types=t!==null?t.types:null,tt.T=n;try{var s=e(),r=tt.S;r!==null&&r(n,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(Ag,ov)}catch(i){ov(i)}finally{t!==null&&n.types!==null&&(t.types=n.types),tt.T=t}}function y4(e){var t=tt.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else m4(y4.bind(null,e))}var zT={map:Vd,forEach:function(e,t,n){Vd(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Vd(e,function(){t++}),t},toArray:function(e){return Vd(e,function(t){return t})||[]},only:function(e){if(!ly(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};je.Activity=CT;je.Children=zT;je.Component=Jl;je.Fragment=mT;je.Profiler=kT;je.PureComponent=iy;je.StrictMode=yT;je.Suspense=jT;je.ViewTransition=$T;je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=tt;je.__COMPILER_RUNTIME={__proto__:null,c:function(e){return tt.H.useMemoCache(e)}};je.addTransitionType=y4;je.cache=function(e){return function(){return e.apply(null,arguments)}};je.cacheSignal=function(){return null};je.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=h4({},e.props),r=e.key;if(t!=null)for(i in t.key!==void 0&&(r=""+t.key),t)!g4.call(t,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&t.ref===void 0||(s[i]=t[i]);var i=arguments.length-2;if(i===1)s.children=n;else if(1<i){for(var o=Array(i),l=0;l<i;l++)o[l]=arguments[l+2];s.children=o}return ay(e.type,r,s)};je.createContext=function(e){return e={$$typeof:vT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:bT,_context:e},e};je.createElement=function(e,t,n){var s,r={},i=null;if(t!=null)for(s in t.key!==void 0&&(i=""+t.key),t)g4.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(r[s]=t[s]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var l=Array(o),c=0;c<o;c++)l[c]=arguments[c+2];r.children=l}if(e&&e.defaultProps)for(s in o=e.defaultProps,o)r[s]===void 0&&(r[s]=o[s]);return ay(e,i,r)};je.createRef=function(){return{current:null}};je.forwardRef=function(e){return{$$typeof:wT,render:e}};je.isValidElement=ly;je.lazy=function(e){return{$$typeof:d4,_payload:{_status:-1,_result:e},_init:MT}};je.memo=function(e,t){return{$$typeof:ST,type:e,compare:t===void 0?null:t}};je.startTransition=m4;je.unstable_useCacheRefresh=function(){return tt.H.useCacheRefresh()};je.use=function(e){return tt.H.use(e)};je.useActionState=function(e,t,n){return tt.H.useActionState(e,t,n)};je.useCallback=function(e,t){return tt.H.useCallback(e,t)};je.useContext=function(e){return tt.H.useContext(e)};je.useDebugValue=function(){};je.useDeferredValue=function(e,t){return tt.H.useDeferredValue(e,t)};je.useEffect=function(e,t){return tt.H.useEffect(e,t)};je.useEffectEvent=function(e){return tt.H.useEffectEvent(e)};je.useId=function(){return tt.H.useId()};je.useImperativeHandle=function(e,t,n){return tt.H.useImperativeHandle(e,t,n)};je.useInsertionEffect=function(e,t){return tt.H.useInsertionEffect(e,t)};je.useLayoutEffect=function(e,t){return tt.H.useLayoutEffect(e,t)};je.useMemo=function(e,t){return tt.H.useMemo(e,t)};je.useOptimistic=function(e,t){return tt.H.useOptimistic(e,t)};je.useReducer=function(e,t,n){return tt.H.useReducer(e,t,n)};je.useRef=function(e){return tt.H.useRef(e)};je.useState=function(e){return tt.H.useState(e)};je.useSyncExternalStore=function(e,t,n){return tt.H.useSyncExternalStore(e,t,n)};je.useTransition=function(){return tt.H.useTransition()};je.version="19.3.0";u4.exports=je;var x=u4.exports;const Gx=hT(x),k4=fT({__proto__:null,default:Gx},[x]);var zc={},av;function RT(){if(av)return zc;av=1,Object.defineProperty(zc,"__esModule",{value:!0}),zc.styleq=void 0;var e=new WeakMap,t="$$css";function n(r){var i,o,l;return r!=null&&(i=r.disableCache===!0,o=r.disableMix===!0,l=r.transform),function(){for(var u=[],d="",h=null,f="",p=i?null:e,g=new Array(arguments.length),b=0;b<arguments.length;b++)g[b]=arguments[b];for(;g.length>0;){var y=g.pop();if(!(y==null||y===!1)){if(Array.isArray(y)){for(var m=0;m<y.length;m++)g.push(y[m]);continue}var k=l!=null?l(y):y;if(k.$$css!=null){var w="";if(p!=null&&p.has(k)){var v=p.get(k);v!=null&&(w=v[0],f=v[2],u.push.apply(u,v[1]),p=v[3])}else{var j=[];for(var C in k){var $=k[C];if(C===t){var T=k[C];T!==!0&&(f=f?T+"; "+f:T);continue}typeof $=="string"||$===null?u.includes(C)||(u.push(C),p!=null&&j.push(C),typeof $=="string"&&(w+=w?" "+$:$)):console.error("styleq: ".concat(C," typeof ").concat(String($),' is not "string" or "null".'))}if(p!=null){var A=new WeakMap;p.set(k,[w,j,f,A]),p=A}}w&&(d=d?w+" "+d:w)}else if(o)h==null&&(h={}),h=Object.assign({},k,h);else{var S=null;for(var _ in k){var M=k[_];M!==void 0&&(u.includes(_)||(M!=null&&(h==null&&(h={}),S==null&&(S={}),S[_]=M),u.push(_),p=null))}S!=null&&(h=Object.assign(S,h))}}}var z=[d,h,f];return z}}var s=zc.styleq=n();return s.factory=n,zc}var IT=RT();function q(...e){const[t,n,s]=IT.styleq(e),r={};return t!=null&&t!==""&&(r.className=t),n!=null&&Object.keys(n).length>0&&(r.style=n),s!=null&&s!==""&&(r["data-style-src"]=s),r}const _T={"--color-accent":"light-dark(#0064E0, #2694FE)","--color-accent-muted":"light-dark(#0082FB33, #0082FB3F)","--color-on-accent":"light-dark(#FFFFFF, #FFFFFF)","--color-neutral":"light-dark(rgba(5, 54, 89, 0.1), rgba(223, 226, 229, 0.2))","--color-background-surface":"light-dark(#FFFFFF, #1F1F22)","--color-background-body":"light-dark(#F1F4F7, #111112)","--color-overlay":"light-dark(#01122866, #11111299)","--color-overlay-hover":"light-dark(#0536590C, #FFFFFF0C)","--color-overlay-pressed":"light-dark(#05365919, #FFFFFF19)","--color-background-muted":"light-dark(#0536590C, #1111127F)","--color-text-primary":"light-dark(#0A1317, #DFE2E5)","--color-text-secondary":"light-dark(#4E606F, #AAAFB5)","--color-text-disabled":"light-dark(#A4B0BC, #6F747C)","--color-text-accent":"light-dark(#0064E0, #3E9EFB)","--color-on-dark":"light-dark(#FFFFFF, #FFFFFF)","--color-on-light":"light-dark(#000000, #000000)","--color-icon-accent":"light-dark(#0064E0, #2694FE)","--color-icon-primary":"light-dark(#0A1317, #DFE2E5)","--color-icon-secondary":"light-dark(#4E606F, #AAAFB5)","--color-icon-disabled":"light-dark(#A4B0BC, #6F747C)","--color-background-card":"light-dark(#FFFFFF, #1F1F22)","--color-background-popover":"light-dark(#FFFFFF, #28292C)","--color-background-inverted":"light-dark(#0A1317, #FFFFFF)","--color-background-error-inverted":"light-dark(#AA071E, #E3193B)","--color-success":"light-dark(#0D8626, #0D8626)","--color-success-muted":"light-dark(#0B991F33, #0B991F3F)","--color-on-success":"light-dark(#FFFFFF, #FFFFFF)","--color-error":"light-dark(#E3193B, #F5394F)","--color-error-muted":"light-dark(#E3193B33, #F5394F3F)","--color-on-error":"light-dark(#FFFFFF, #FFFFFF)","--color-warning":"light-dark(#E9AF08, #F2C00B)","--color-warning-muted":"light-dark(#E2A40033, #E2A4003F)","--color-on-warning":"light-dark(#0A1317, #0A1317)","--color-border":"light-dark(#05365919, #F2F4F619)","--color-border-emphasized":"light-dark(#CCD3DB, #494D53)","--color-skeleton":"light-dark(#CCD3DB, #5A5E66)","--color-track":"light-dark(#CCD3DB, #5A5E66)","--color-shadow":"light-dark(rgba(5, 54, 89, 0.1), rgba(0, 0, 0, 0.3))","--color-tint-hover":"light-dark(black, white)","--color-background-blue":"light-dark(#0171E333, #0171E333)","--color-border-blue":"light-dark(#0064E0, #2694FE)","--color-icon-blue":"light-dark(#0064E0, #2694FE)","--color-text-blue":"light-dark(#042F97, #AFD7FF)","--color-background-cyan":"light-dark(#03A7D733, #03A7D733)","--color-border-cyan":"light-dark(#089DD0, #0171A4)","--color-icon-cyan":"light-dark(#00ACC1, #26C6DA)","--color-text-cyan":"light-dark(#014975, #A1EEF9)","--color-background-gray":"light-dark(#0A131733, #666A724C)","--color-border-gray":"light-dark(#647685, #748695)","--color-icon-gray":"light-dark(#4E606F, #AAAFB5)","--color-text-gray":"light-dark(#0A1317, #E7EAED)","--color-background-green":"light-dark(#24BB5E33, #24BB5E33)","--color-border-green":"light-dark(#0D8626, #0B991F)","--color-icon-green":"light-dark(#0D8626, #26A756)","--color-text-green":"light-dark(#09441F, #A5F690)","--color-background-orange":"light-dark(#F2790233, #F2790233)","--color-border-orange":"light-dark(#EB6E00, #B34A01)","--color-icon-orange":"light-dark(#E9690B, #FB8C00)","--color-text-orange":"light-dark(#6B2203, #FDB876)","--color-background-pink":"light-dark(#E638B333, #E638B333)","--color-border-pink":"light-dark(#F351C0, #C02294)","--color-icon-pink":"light-dark(#C2185B, #EC407A)","--color-text-pink":"light-dark(#650053, #FEADE3)","--color-background-purple":"light-dark(#7952FF33, #7952FF33)","--color-border-purple":"light-dark(#9081FF, #7340FE)","--color-icon-purple":"light-dark(#5B08D8, #7952FF)","--color-text-purple":"light-dark(#3E0697, #B3B0FE)","--color-background-red":"light-dark(#E3193B33, #E3193B33)","--color-border-red":"light-dark(#E3193B, #F5394F)","--color-icon-red":"light-dark(#D31130, #E3193B)","--color-text-red":"light-dark(#7B0210, #FFB2B8)","--color-background-teal":"light-dark(#0DB7AF33, #0DB7AF33)","--color-border-teal":"light-dark(#08A3A3, #08767D)","--color-icon-teal":"light-dark(#009688, #26A69A)","--color-text-teal":"light-dark(#083943, #40DCCD)","--color-background-yellow":"light-dark(#E2A40033, #E2A40033)","--color-border-yellow":"light-dark(#C58600, #B47700)","--color-icon-yellow":"light-dark(#FBC02D, #FFEE58)","--color-text-yellow":"light-dark(#753F07, #FBCE03)"},LT={"--spacing-0":"0px","--spacing-0-5":"2px","--spacing-1":"4px","--spacing-1-5":"6px","--spacing-2":"8px","--spacing-3":"12px","--spacing-4":"16px","--spacing-5":"20px","--spacing-6":"24px","--spacing-7":"28px","--spacing-8":"32px","--spacing-9":"36px","--spacing-10":"40px","--spacing-11":"44px","--spacing-12":"48px"},ms={"--spacing-1":"var(--spacing-1)","--spacing-2":"var(--spacing-2)"},OT={"--size-element-sm":"28px","--size-element-md":"32px","--size-element-lg":"36px"},DT={"--radius-none":"0px","--radius-inner":"4px","--radius-element":"8px","--radius-container":"12px","--radius-page":"28px","--radius-chat":"28px","--radius-full":"9999px"},BT={"--shadow-low":"0px 1px 1px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 2px 8px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2))","--shadow-med":"0px 1px 2px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 2px 12px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2))","--shadow-high":"0px 2px 2px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2)), 0px 8px 24px light-dark(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.3))","--shadow-inset-hover":"inset 0px 0px 0px 2px light-dark(rgba(5, 54, 89, 0.15), rgba(223, 226, 229, 0.2))","--shadow-inset-selected":"inset 0px 0px 0px 2px rgba(1, 113, 227, 0.5)","--shadow-inset-success":"inset 0px 0px 0px 2px rgba(38, 167, 86, 0.3)","--shadow-inset-warning":"inset 0px 0px 0px 2px rgba(226, 164, 0, 0.3)","--shadow-inset-error":"inset 0px 0px 0px 2px rgba(227, 25, 59, 0.3)"},qT={"--duration-fast-min":"130ms","--duration-fast":"175ms","--duration-fast-max":"230ms","--duration-medium-min":"310ms","--duration-medium":"410ms","--duration-medium-max":"550ms","--duration-slow-min":"730ms","--duration-slow":"975ms","--duration-slow-max":"1300ms"},HT={"--ease-standard":"cubic-bezier(0.24, 1, 0.4, 1)"},PT={"--font-family-body":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-code":'"SF Mono", Monaco, Consolas, monospace',"--font-family-heading":'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif'},UT={"--font-size-4xs":"0.375rem","--font-size-3xs":"0.4375rem","--font-size-2xs":"0.5rem","--font-size-xs":"0.625rem","--font-size-sm":"0.75rem","--font-size-base":"0.875rem","--font-size-lg":"1.0625rem","--font-size-xl":"1.25rem","--font-size-2xl":"1.5rem","--font-size-3xl":"1.8125rem","--font-size-4xl":"2.1875rem","--font-size-5xl":"2.625rem"},FT={"--font-weight-normal":"400","--font-weight-medium":"500","--font-weight-semibold":"600","--font-weight-bold":"700"},GT={"--text-heading-1-size":"var(--font-size-2xl)","--text-heading-1-weight":"var(--font-weight-semibold)","--text-heading-1-leading":"1.3333","--text-heading-2-size":"var(--font-size-xl)","--text-heading-2-weight":"var(--font-weight-semibold)","--text-heading-2-leading":"1.4","--text-heading-3-size":"var(--font-size-lg)","--text-heading-3-weight":"var(--font-weight-semibold)","--text-heading-3-leading":"1.4118","--text-heading-4-size":"var(--font-size-base)","--text-heading-4-weight":"var(--font-weight-semibold)","--text-heading-4-leading":"1.4286","--text-heading-5-size":"var(--font-size-sm)","--text-heading-5-weight":"var(--font-weight-semibold)","--text-heading-5-leading":"1.6667","--text-heading-6-size":"var(--font-size-xs)","--text-heading-6-weight":"var(--font-weight-semibold)","--text-heading-6-leading":"1.6","--text-body-size":"var(--font-size-base)","--text-body-weight":"var(--font-weight-normal)","--text-body-leading":"1.4286","--text-large-size":"var(--font-size-lg)","--text-large-weight":"var(--font-weight-semibold)","--text-large-leading":"1.4118","--text-label-size":"var(--font-size-base)","--text-label-weight":"var(--font-weight-medium)","--text-label-leading":"1.4286","--text-code-size":"var(--font-size-base)","--text-code-weight":"var(--font-weight-normal)","--text-code-leading":"1.4286","--text-supporting-size":"var(--font-size-sm)","--text-supporting-weight":"var(--font-weight-normal)","--text-supporting-leading":"1.6667","--text-display-1-size":"var(--font-size-5xl)","--text-display-1-weight":"var(--font-weight-normal)","--text-display-1-leading":"1.2381","--text-display-2-size":"var(--font-size-4xl)","--text-display-2-weight":"var(--font-weight-normal)","--text-display-2-leading":"1.2571","--text-display-3-size":"var(--font-size-3xl)","--text-display-3-weight":"var(--font-weight-normal)","--text-display-3-leading":"1.2414"},cy=x.createContext(null);cy.displayName="LayoutAreaContext";const VT={hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1},Vx=x.createContext(VT);Vx.displayName="LayoutSlotsContext";const Wx=x.createContext(null);Wx.displayName="LayoutDividerContext";const WT={center:{kGNEyG:"x6s0dn4",$$css:!0},end:{kGNEyG:"xuk3077",$$css:!0},start:{kGNEyG:"x1cy8zhl",$$css:!0},stretch:{kGNEyG:"x1qjc9v5",$$css:!0}},KT={start:{kjj79g:"x1nhvcw1",$$css:!0},center:{kjj79g:"xl56j7k",$$css:!0},end:{kjj79g:"x13a6bvl",$$css:!0},between:{kjj79g:"x1qughib",$$css:!0},around:{kjj79g:"x1l1ennw",$$css:!0},evenly:{kjj79g:"xaw8158",$$css:!0}},XT={horizontal:{kXwgrk:"x1q0g3np",$$css:!0},vertical:{kXwgrk:"xdt5ytf",$$css:!0}},ZT={nowrap:{kwnvtZ:"xozqiw3",$$css:!0},wrap:{kwnvtZ:"x1a02dak",$$css:!0},"wrap-reverse":{kwnvtZ:"x8hhl5t",$$css:!0}},YT={stack:{k1xSpc:"x78zum5",$$css:!0}},QT={0:{k1C7PZ:"x1o57wo1",khm7nJ:"x6yxi7o",$$css:!0},1:{k1C7PZ:"x1lfs0n9",khm7nJ:"x1ngg2t4",$$css:!0},2:{k1C7PZ:"xak3so",khm7nJ:"x1x7z4sm",$$css:!0},3:{k1C7PZ:"xewh9hi",khm7nJ:"x4olc9o",$$css:!0},4:{k1C7PZ:"xty4p9g",khm7nJ:"xtx9w7w",$$css:!0},5:{k1C7PZ:"x1eqhezk",khm7nJ:"x1iu6piu",$$css:!0},6:{k1C7PZ:"x3qlgwd",khm7nJ:"xczp1bk",$$css:!0},8:{k1C7PZ:"xicv188",khm7nJ:"xgx0vcf",$$css:!0},10:{k1C7PZ:"x1p37tyl",khm7nJ:"x1xpicb7",$$css:!0},"0.5":{k1C7PZ:"x1kihgfc",khm7nJ:"x1tw44j4",$$css:!0},"1.5":{k1C7PZ:"x1thn6ci",khm7nJ:"xhq53yo",$$css:!0}};function Mg({crossAlign:e,direction:t,gap:n,mainAlign:s,wrap:r}){return[YT.stack,XT[t],n!=null&&QT[n],e!=null&&WT[e],s!=null&&KT[s],r!=null&&ZT[r]]}const JT={reset:{kAzted:"x2lwn1j",k7Eaqz:"xeuugli",$$css:!0}},eN={center:{kSGwAc:"xamitd3",$$css:!0},end:{kSGwAc:"xpvyfi4",$$css:!0},start:{kSGwAc:"xqcrz7y",$$css:!0},stretch:{kSGwAc:"xkh2ocl",$$css:!0}},tN={fill:{kzQI83:"x1iyjqo2",$$css:!0},static:{kzQI83:"x1c4vz4f",kmuXW:"x2lah0s",$$css:!0}};function nN({crossAlignSelf:e,size:t}={}){return[JT.reset,tN[t??"static"],e!=null&&eN[e]]}function uy(e){return e==="base"?"":e.split("+").map(t=>{const[n,s]=t.split(":");return s===void 0?`.${n}`:/^\d/.test(s)?`.${n}-${s}`:`.${s}`}).join("")}function sN(e,t){return e!=null?`id:${e}`:`fallback:${typeof t=="function"?t():t}`}function Wd(e,t){const n={...e,...t},s=[e.className,t.className].filter(Boolean).join(" ");s?n.className=s:delete n.className;const r=t.style&&e.style?{...e.style,...t.style}:t.style||e.style;return r?n.style=r:delete n.style,n}function K(e,t,n,s){if(typeof e=="string"){const l=e,c=t??{className:""},u=n;let d=c.className?`${l} ${c.className}`:l;u&&(d=`${d} ${u}`);const h=s&&c.style?{...c.style,...s}:s||c.style;return{...c,className:d,style:h}}let o=Wd(e,typeof t=="string"?{className:t}:t??{});return typeof n=="string"?o=Wd(o,{className:n}):n!=null&&(o=Wd(o,{style:n})),s!=null&&(o=Wd(o,{style:s})),o}function mt(...e){return t=>{const n=[];for(const s of e)if(typeof s=="function"){const r=s(t);typeof r=="function"&&n.push(r)}else s!=null&&(s.current=t);if(n.length>0)return()=>{for(const s of n)s()}}}function Kx(...e){return t=>{for(const n of e)if(n==null||n(t),t.defaultPrevented)return}}const dy="astryx",b4=dy,Xx=dy,rN=dy;function zg(e){return`${b4}-${e}`}function _n(e){return`data-${Xx}-${e}`}function iN(e){return`--${rN}-${e}`}function oN(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}function aN(e,t){return/^\d/.test(t)?`${e}-${t}`:t}function lN(e,t){const n=[zg(e)];if(t)for(const[s,r]of Object.entries(t))r!=null&&n.push(aN(s,String(r)));return n.join(" ")}function cN(e){const t={};if(e)for(const[n,s]of Object.entries(e))s!=null&&(t[oN(n)]=String(s));return t}function W(e,t){return{className:lN(e,t),...cN(t)}}function lv(e){const t=e.auxiliaryData;return typeof(t==null?void 0:t.group)=="string"?t.group:void 0}function uN(e){var o;if(!e.some(l=>lv(l)!=null))return[{heading:null,items:e}];const n=[],s=new Map,r=[];for(const l of e){const c=lv(l);c!=null?(s.has(c)||(n.push(c),s.set(c,[])),(o=s.get(c))==null||o.push(l)):r.push(l)}const i=n.map(l=>({heading:l,items:s.get(l)??[]}));return r.length>0&&i.push({heading:null,items:r}),i}let Eo=null;const Ih=new Map;function dN(){return Eo||(Eo=new ResizeObserver(e=>{for(const t of e){const n=Ih.get(t.target);n&&n(t)}})),Eo}function fy(e,t){Ih.set(e,t),dN().observe(e),t({target:e})}function hy(e){Ih.delete(e),Eo&&(Eo.unobserve(e),Ih.size===0&&(Eo.disconnect(),Eo=null))}function Z1(e){return e!=null&&typeof e!="boolean"&&e!==""}function cv(...e){const t=e.flatMap(n=>typeof n=="string"?n.trim().split(/\s+/):[]).filter(Boolean);if(t.length!==0)return Array.from(new Set(t)).join(" ")}function v4(e,t=[],n){return{ariaLabelledBy:n?cv(n.labelID,e):void 0,ariaDescribedBy:cv(n==null?void 0:n.describedByIDs,...t)}}const fN={transparent:{r:0,g:0,b:0,a:0},black:{r:0,g:0,b:0,a:1},white:{r:255,g:255,b:255,a:1}},_h=(e,t,n)=>Math.max(t,Math.min(n,e));function hN(e){return e.split("").map(t=>t+t).join("")}function xN(e){if(typeof e!="string")return null;const t=e.trim().replace(/^#/,""),n=t.length===3||t.length===4?hN(t):t;return n.length!==6&&n.length!==8||!/^[0-9a-fA-F]+$/.test(n)?null:{r:parseInt(n.slice(0,2),16),g:parseInt(n.slice(2,4),16),b:parseInt(n.slice(4,6),16),a:n.length===8?parseInt(n.slice(6,8),16)/255:1}}function pN(e){const t=e.indexOf("(");if(t===-1||!e.trim().endsWith(")"))return null;const s=e.slice(t+1,e.lastIndexOf(")")).replace(/\//g," ").split(/[\s,]+/).map(u=>u.trim()).filter(Boolean);if(s.length<3)return null;const r=u=>{const d=u.endsWith("%")?parseFloat(u)/100*255:parseFloat(u);return _h(d,0,255)},i=r(s[0]),o=r(s[1]),l=r(s[2]);if([i,o,l].some(Number.isNaN))return null;let c=1;if(s.length>=4){const u=s[3];if(c=u.endsWith("%")?parseFloat(u)/100:parseFloat(u),Number.isNaN(c))return null;c=_h(c,0,1)}return{r:i,g:o,b:l,a:c}}function uv(e){const t=e.trim(),n=fN[t.toLowerCase()];return n?{...n}:t.startsWith("#")?xN(t):/^rgba?\(/i.test(t)?pN(t):null}function gN(e,t,n){const s=r=>_h(Math.round(r),0,255).toString(16).padStart(2,"0").toUpperCase();return`#${s(e)}${s(t)}${s(n)}`}function mN({r:e,g:t,b:n,a:s}){if(s>=1)return gN(e,t,n);const r=i=>_h(Math.round(i),0,255);return`rgba(${r(e)}, ${r(t)}, ${r(n)}, ${parseFloat(s.toFixed(4))})`}function yN(e,t){return`${e}: ${t}`}function qo(e,t,...n){}function w4(e,t,...n){console.error(yN(e,t),...n)}function xy(e,t,n,...s){}const kN={kbCHJM:"x1nrll8i",k3aq6I:"xsqj5wx",$$css:!0},_l={mirror:{k3aq6I:"xgtlewx",$$css:!0},centerInline:e=>[kN,{"--x-transform":`translate(-50%, ${e})`!=null?`translate(-50%, ${e})`:void 0}]},j4={0:"spacing0",.5:"spacing0_5",1:"spacing1",1.5:"spacing1_5",2:"spacing2",3:"spacing3",4:"spacing4",5:"spacing5",6:"spacing6",8:"spacing8",10:"spacing10"},ec={0:{kZCmMZ:"x18gyask",kwRFfy:"x1s0aq8i",kLKAdn:"x1ydh6w3",kGO01o:"x1l20ajd",$$css:!0},1:{kZCmMZ:"x1vsv5vr",kwRFfy:"x1nryj5t",kLKAdn:"xfsso4q",kGO01o:"xy143xn",$$css:!0},2:{kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",kLKAdn:"x1xye8es",kGO01o:"x1wesfrj",$$css:!0},3:{kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",kLKAdn:"x1vlblms",kGO01o:"xvmdzux",$$css:!0},4:{kZCmMZ:"x1rey3nv",kwRFfy:"xnjyzlh",kLKAdn:"x1oa1p4a",kGO01o:"x1awphl8",$$css:!0},5:{kZCmMZ:"x1blguxw",kwRFfy:"xdbrk9v",kLKAdn:"xx7rijo",kGO01o:"x1hk98q",$$css:!0},6:{kZCmMZ:"x31w388",kwRFfy:"x1we12cn",kLKAdn:"x1adxfkp",kGO01o:"xjpqqx5",$$css:!0},8:{kZCmMZ:"x1j3hnjz",kwRFfy:"x1q91b2g",kLKAdn:"xoxd1wu",kGO01o:"x2oz4g1",$$css:!0},10:{kZCmMZ:"xqp078j",kwRFfy:"x160ivqr",kLKAdn:"xk6660b",kGO01o:"x2izi54",$$css:!0},"0.5":{kZCmMZ:"x138rykx",kwRFfy:"x1le3yxw",kLKAdn:"xbx876j",kGO01o:"xij103a",$$css:!0},"1.5":{kZCmMZ:"xfti1ec",kwRFfy:"x17hk9do",kLKAdn:"x1kwdpsa",kGO01o:"x1opdxmq",$$css:!0}},tc={0:{"--container-padding-inline-start":"x1gu2k80","--container-padding-inline-end":"x91ghl5",$$css:!0},1:{"--container-padding-inline-start":"x1cvlban","--container-padding-inline-end":"x2oyxnl",$$css:!0},2:{"--container-padding-inline-start":"x1xlrr2o","--container-padding-inline-end":"xcas3b9",$$css:!0},3:{"--container-padding-inline-start":"xfdwxua","--container-padding-inline-end":"xu0ipoa",$$css:!0},4:{"--container-padding-inline-start":"x1dlhslv","--container-padding-inline-end":"xs0pscg",$$css:!0},5:{"--container-padding-inline-start":"x1s81nki","--container-padding-inline-end":"xgkj7vj",$$css:!0},6:{"--container-padding-inline-start":"x1ep0dkj","--container-padding-inline-end":"x94cj42",$$css:!0},8:{"--container-padding-inline-start":"xw1diwv","--container-padding-inline-end":"x1b9k1pi",$$css:!0},10:{"--container-padding-inline-start":"xserb3f","--container-padding-inline-end":"xx5lg5w",$$css:!0},"0.5":{"--container-padding-inline-start":"x14ws0sr","--container-padding-inline-end":"x1wz3t3y",$$css:!0},"1.5":{"--container-padding-inline-start":"x176g23i","--container-padding-inline-end":"xntetml",$$css:!0}},nc={0:{"--container-padding-block-start":"x1i3qcxz",$$css:!0},1:{"--container-padding-block-start":"xnsckjb",$$css:!0},2:{"--container-padding-block-start":"xa8b4fq",$$css:!0},3:{"--container-padding-block-start":"x11k4f5r",$$css:!0},4:{"--container-padding-block-start":"xm01sq8",$$css:!0},5:{"--container-padding-block-start":"xp8wdkl",$$css:!0},6:{"--container-padding-block-start":"x1hmud4d",$$css:!0},8:{"--container-padding-block-start":"xfv60at",$$css:!0},10:{"--container-padding-block-start":"x17h9kl7",$$css:!0},"0.5":{"--container-padding-block-start":"xvdf9ev",$$css:!0},"1.5":{"--container-padding-block-start":"x1kbx601",$$css:!0}},sc={0:{"--container-padding-block-end":"xkunwnr",$$css:!0},1:{"--container-padding-block-end":"x57a7ii",$$css:!0},2:{"--container-padding-block-end":"x1lsgcmx",$$css:!0},3:{"--container-padding-block-end":"x1q3ppug",$$css:!0},4:{"--container-padding-block-end":"x4hfsld",$$css:!0},5:{"--container-padding-block-end":"xbib2ws",$$css:!0},6:{"--container-padding-block-end":"x1q8d17g",$$css:!0},8:{"--container-padding-block-end":"x8lgq76",$$css:!0},10:{"--container-padding-block-end":"x15vxphk",$$css:!0},"0.5":{"--container-padding-block-end":"x1cao3zv",$$css:!0},"1.5":{"--container-padding-block-end":"xv53x8y",$$css:!0}},bN={0:{"--layout-padding-outer-x":"xswhm3q",$$css:!0},1:{"--layout-padding-outer-x":"xc96xmq",$$css:!0},2:{"--layout-padding-outer-x":"x15dxnc0",$$css:!0},3:{"--layout-padding-outer-x":"xadgj3j",$$css:!0},4:{"--layout-padding-outer-x":"x1v56qcf",$$css:!0},5:{"--layout-padding-outer-x":"x1nzs0gl",$$css:!0},6:{"--layout-padding-outer-x":"x1c3n52a",$$css:!0},8:{"--layout-padding-outer-x":"x1t3kfz",$$css:!0},10:{"--layout-padding-outer-x":"x1jdf5a4",$$css:!0},"0.5":{"--layout-padding-outer-x":"xihiwg7",$$css:!0},"1.5":{"--layout-padding-outer-x":"x1u93lgd",$$css:!0}},vN={0:{"--layout-padding-outer-y":"x1mzf5mb",$$css:!0},1:{"--layout-padding-outer-y":"x1gpfxoh",$$css:!0},2:{"--layout-padding-outer-y":"x10pz7y9",$$css:!0},3:{"--layout-padding-outer-y":"x1p6yq3h",$$css:!0},4:{"--layout-padding-outer-y":"xx738ci",$$css:!0},5:{"--layout-padding-outer-y":"x6yxws5",$$css:!0},6:{"--layout-padding-outer-y":"x180vrwl",$$css:!0},8:{"--layout-padding-outer-y":"xid7e43",$$css:!0},10:{"--layout-padding-outer-y":"x26l4wa",$$css:!0},"0.5":{"--layout-padding-outer-y":"x1vj96e0",$$css:!0},"1.5":{"--layout-padding-outer-y":"xd3dqby",$$css:!0}},wN={0:{kZCmMZ:"x18gyask",kwRFfy:"x1s0aq8i",$$css:!0},1:{kZCmMZ:"x1vsv5vr",kwRFfy:"x1nryj5t",$$css:!0},2:{kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",$$css:!0},3:{kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",$$css:!0},4:{kZCmMZ:"x1rey3nv",kwRFfy:"xnjyzlh",$$css:!0},5:{kZCmMZ:"x1blguxw",kwRFfy:"xdbrk9v",$$css:!0},6:{kZCmMZ:"x31w388",kwRFfy:"x1we12cn",$$css:!0},8:{kZCmMZ:"x1j3hnjz",kwRFfy:"x1q91b2g",$$css:!0},10:{kZCmMZ:"xqp078j",kwRFfy:"x160ivqr",$$css:!0},"0.5":{kZCmMZ:"x138rykx",kwRFfy:"x1le3yxw",$$css:!0},"1.5":{kZCmMZ:"xfti1ec",kwRFfy:"x17hk9do",$$css:!0}},jN={0:{kLKAdn:"x1ydh6w3",kGO01o:"x1l20ajd",$$css:!0},1:{kLKAdn:"xfsso4q",kGO01o:"xy143xn",$$css:!0},2:{kLKAdn:"x1xye8es",kGO01o:"x1wesfrj",$$css:!0},3:{kLKAdn:"x1vlblms",kGO01o:"xvmdzux",$$css:!0},4:{kLKAdn:"x1oa1p4a",kGO01o:"x1awphl8",$$css:!0},5:{kLKAdn:"xx7rijo",kGO01o:"x1hk98q",$$css:!0},6:{kLKAdn:"x1adxfkp",kGO01o:"xjpqqx5",$$css:!0},8:{kLKAdn:"xoxd1wu",kGO01o:"x2oz4g1",$$css:!0},10:{kLKAdn:"xk6660b",kGO01o:"x2izi54",$$css:!0},"0.5":{kLKAdn:"xbx876j",kGO01o:"xij103a",$$css:!0},"1.5":{kLKAdn:"x1kwdpsa",kGO01o:"x1opdxmq",$$css:!0}},ci={layoutOuter:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",$$css:!0},layoutInner:{"--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},fill:{kZKoxP:"x12qplqi",kskxy:"xenllk4",$$css:!0},auto:{kAzted:"x1us19tq",$$css:!0},middle:{kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},fullBleed:{"--layout-padding-outer-x":"x1wbjvqu","--layout-padding-outer-y":"xzxxx64",$$css:!0}},SN={kzqmXN:"xh8yej3",kUOVxO:"xvueqy4",$$css:!0},dv={contentWidthVar:e=>[{"--layout-content-width":(typeof e=="number"?`${e}px`:e)!=null?"x4906uf":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x---layout-content-width":(typeof e=="number"?`${e}px`:e)!=null?typeof e=="number"?`${e}px`:e:void 0}],contentWidth:e=>[SN,{ks0D6T:(typeof e=="number"?`${e}px`:e)!=null?"xf68679":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function Rc({area:e,children:t}){return t==null?null:a.jsx(cy,{value:e,children:t})}const CN={"x-default-marker":"x-default-marker",$$css:!0};function Ks({children:e,content:t,contentWidth:n,defaultHasDividers:s,end:r,footer:i,header:o,height:l="fill",padding:c,ref:u,start:d,xstyle:h,className:f,style:p}){const g=l==="fill",b=t??e,y=x.useMemo(()=>s!=null?{defaultHasDividers:s}:null,[s]),m=o!=null,k=i!=null,w=d!=null,v=r!=null,j=x.useMemo(()=>({hasHeader:m,hasFooter:k,hasStart:w,hasEnd:v}),[m,k,w,v]),C=a.jsx(Vx,{value:j,children:a.jsx("div",{ref:u,...K(W("layout",{height:l}),q(ci.layoutOuter,g?ci.fill:ci.auto,h),f,p),children:a.jsxs("div",{...q(CN,ci.layoutInner,...Mg({direction:"vertical"}),g?ci.fill:ci.auto,c===0&&ci.fullBleed,c!=null&&bN[c],c!=null&&vN[c],n!=null&&dv.contentWidthVar(n)),children:[a.jsx(Rc,{area:"header",children:o}),a.jsxs("div",{...q(...Mg({direction:"horizontal"}),ci.middle,n!=null&&dv.contentWidth(n)),children:[a.jsx(Rc,{area:"start",children:d}),a.jsx("div",{...q(...nN({size:"fill"})),children:a.jsx(Rc,{area:"content",children:b})}),a.jsx(Rc,{area:"end",children:r})]}),a.jsx(Rc,{area:"footer",children:i})]})})});return y!=null?a.jsx(Wx,{value:y,children:C}):C}Ks.displayName="Layout";const Kd={header:{kmuXW:"x2lah0s",$$css:!0},inner:{kB7OPa:"x9f619",ks0D6T:"xjl2t3p",kUOVxO:"xvueqy4",kZCmMZ:"x139j0dd",kwRFfy:"xpc6k2p",kLKAdn:"x81pis9",kGO01o:"xg476vw","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r","--container-padding-block-start":"xzz8v79","--container-padding-block-end":"xi9ns85",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},divider:{kt9PQ7:"xso031l",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},$N={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Lh({children:e,hasDivider:t,height:n,label:s,padding:r,role:i,xstyle:o,className:l,style:c,ref:u,...d}){const h=x.use(Wx),f=t??(h==null?void 0:h.defaultHasDividers)??!1,p=r===0;return a.jsx("div",{ref:u,role:i,"aria-label":s,"data-divider":f||void 0,...K(W("layout-header"),q(Kd.header,$N.sizing(n??null),f&&Kd.divider,o),l,c),...d,children:a.jsx("div",{...q(Kd.inner,p&&Kd.fullBleed,r!=null&&ec[r],r!=null&&tc[r],r!=null&&nc[r],r!=null&&sc[r]),children:e})})}Lh.displayName="LayoutHeader";const Is={panel:{kB7OPa:"x9f619",kmuXW:"x2lah0s",kVQacm:"x7giv3",kZCmMZ:"xwjyata",kwRFfy:"x1peupej",kLKAdn:"xqty4a",kGO01o:"xg476vw","--container-padding-inline-start":"x408pgh","--container-padding-inline-end":"xikqloz","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"xi9ns85",$$css:!0},startPanel:{kZCmMZ:"x139j0dd",$$css:!0},endPanel:{kwRFfy:"xpc6k2p",$$css:!0},noHeader:{kLKAdn:"x81pis9",$$css:!0},noFooter:{kGO01o:"xon7vh3",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0},dividerEnd:{ke9TFa:"x1lun4ml",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0},dividerStart:{k2ei4v:"xpilrb4",kVhnKS:"x1t7ytsu",kGJrpR:"x1j92z86",$$css:!0},collapseStart:{keTefX:"x1wim8z0",$$css:!0},collapseEnd:{k71WvV:"x1kpg4um",$$css:!0}},EN={sizing:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function py({children:e,hasDivider:t=!1,isScrollable:n=!0,label:s,padding:r,role:i,width:o,resizable:l,xstyle:c,className:u,style:d,ref:h,...f}){const p=x.use(cy),{hasHeader:g,hasFooter:b}=x.use(Vx),y=l?l._size:o,m=p==="start",k=p==="end",w=r===0,v=!t&&!w&&r==null,j=m?Is.dividerEnd:k?Is.dividerStart:null,C=m?Is.collapseEnd:k?Is.collapseStart:null;return a.jsx("div",{ref:h,role:i,"aria-label":s,...K(W("layout-panel"),q(Is.panel,EN.sizing(y??null),m&&!w&&r==null&&Is.startPanel,k&&!w&&r==null&&Is.endPanel,!g&&!w&&r==null&&Is.noHeader,!b&&!w&&r==null&&Is.noFooter,n&&Is.scrollable,w&&Is.fullBleed,r!=null&&ec[r],r!=null&&tc[r],r!=null&&nc[r],r!=null&&sc[r],t&&j,v&&C,c),u,d),...f,children:e})}py.displayName="LayoutPanel";const ao={content:{kB7OPa:"x9f619",kZKoxP:"x5yr21d",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",kVQacm:"x7giv3",kZCmMZ:"xwjyata",kwRFfy:"x1peupej",kLKAdn:"xqty4a x1ioh5az",kGO01o:"xg476vw xsg11nj","--container-padding-inline-start":"x408pgh","--container-padding-inline-end":"xikqloz","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"xi9ns85",$$css:!0},noStart:{kZCmMZ:"x139j0dd","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r",$$css:!0},noEnd:{kwRFfy:"xpc6k2p",$$css:!0},noHeader:{kLKAdn:"x81pis9","--container-padding-block-start":"xzz8v79",$$css:!0},noFooter:{kGO01o:"xon7vh3","--container-padding-block-end":"x1xjq73n",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0}};function Xs({children:e,isScrollable:t=!0,padding:n,label:s,role:r,xstyle:i,className:o,style:l,ref:c,...u}){const{hasHeader:d,hasFooter:h,hasStart:f,hasEnd:p}=x.use(Vx),g=n===0;return a.jsx("div",{ref:c,role:r,"aria-label":s,...K(W("layout-content"),q(ao.content,!f&&!g&&n==null&&ao.noStart,!p&&!g&&n==null&&ao.noEnd,!d&&!g&&n==null&&ao.noHeader,!h&&!g&&n==null&&ao.noFooter,t&&ao.scrollable,g&&ao.fullBleed,n!=null&&ec[n],n!=null&&tc[n],n!=null&&nc[n],n!=null&&sc[n],i),o,l),...u,children:e})}Xs.displayName="LayoutContent";function S4(e){return(e.style.anchorName??"").split(",").map(n=>n.trim()).filter(Boolean)}function C4(e,t){e.style.anchorName=t.join(", ")}function TN(e,t){const n=S4(e);n.includes(t)||(n.push(t),C4(e,n))}function NN(e,t){C4(e,S4(e).filter(n=>n!==t))}const Y1={base:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x1lziwak",k71WvV:"x14z9mp",kLKAdn:"xexx8yu",kGO01o:"x18d9i69",kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kMzoRj:"xc342km",ksu8eU:"xng3xce",kVQacm:"x1rea2x4",kMv6JI:"x9ynric",kWkggS:"xjbqb8w",$$css:!0},fixed:{kVAEAm:"xixxii4",$$css:!0}};function AN(e="above",t="center"){if(e==="above"||e==="below"){const s=e==="above"?"self-block-start":"self-block-end";return t==="start"?`${s} span-self-inline-end`:t==="end"?`${s} span-self-inline-start`:s}const n=e==="start"?"self-inline-start":"self-inline-end";return t==="start"?`${n} span-self-block-end`:t==="end"?`${n} span-self-block-start`:n}function MN(e="above",t="center"){const n="flip-block, flip-inline, flip-block flip-inline";if(t!=="center")return n;if(e==="above"||e==="below"){const[i,o]=e==="above"?["top","bottom"]:["bottom","top"];return`${n}, ${i} span-left, ${i} span-right, ${o} span-left, ${o} span-right`}const[s,r]=e==="start"?["left","right"]:["right","left"];return`${n}, ${s} span-top, ${s} span-bottom, ${r} span-top, ${r} span-bottom`}function rc(e){const{mode:t,onShow:n,onHide:s,lightDismiss:r=!1}=e,i=x.useId(),o=`--astryx-layer-${i.replace(/:/g,"")}`,[l,c]=x.useState(!1),u=x.useRef(null),d=x.useRef(null),h=x.useRef(!1),f=x.useCallback(()=>{const C=u.current;C&&!h.current&&(typeof C.showPopover=="function"?C.showPopover():C.style.display="block",h.current=!0,c(!0),n==null||n())},[n]),p=x.useCallback(()=>{if(h.current){const C=u.current;C&&(typeof C.hidePopover=="function"?C.hidePopover():C.style.display="none"),h.current=!1,c(!1),s==null||s()}},[s]),g=t==="context"?C=>{d.current&&d.current!==C&&NN(d.current,o),C&&TN(C,o),d.current=C}:void 0,b=x.useCallback(C=>{C.newState==="closed"&&h.current&&(h.current=!1,c(!1),s==null||s())},[s]),y=x.useRef(null),m=x.useRef(null),k=x.useCallback((C,$)=>{y.current&&m.current&&(y.current!==C||m.current!==$)&&(y.current.removeEventListener("toggle",m.current),y.current=null,m.current=null),C&&y.current!==C&&(C.addEventListener("toggle",$),y.current=C,m.current=$)},[]),w=x.useCallback(C=>{u.current=C,k(C,b)},[b,k]);x.useEffect(()=>(u.current&&k(u.current,b),()=>{y.current&&m.current&&(y.current.removeEventListener("toggle",m.current),y.current=null,m.current=null)}),[b,k]);const v=x.useCallback((C,$)=>{const{placement:T="above",alignment:A="center",positioning:S="anchor",role:_,"aria-label":M,xstyle:z,className:O,style:I,as:E="div",onMouseEnter:N,onMouseLeave:R}=$||{},L=S==="custom"?{positionAnchor:o}:{positionAnchor:o,positionArea:AN(T,A),positionTryFallbacks:MN(T,A)},D=q(Y1.base,z),P=O?`${O} ${D.className??""}`:D.className;return a.jsx(E,{ref:w,id:i,role:_,"aria-label":M,popover:r?"auto":"manual",className:P,style:{...D.style,...L,...I},onMouseEnter:N,onMouseLeave:R,children:C})},[o,i,r,w]),j=x.useCallback((C,$)=>{const{x:T,y:A,xstyle:S,className:_,style:M}=$,z={top:A,left:T},O=q(Y1.base,Y1.fixed,S),I=_?`${_} ${O.className??""}`:O.className;return a.jsx("div",{ref:w,id:i,popover:r?"auto":"manual",className:I,style:{...O.style,...z,...M},children:C})},[w,i,r]);return t==="context"?{ref:g,anchorId:o,show:f,hide:p,isOpen:l,id:i,render:v}:{ref:void 0,show:f,hide:p,isOpen:l,id:i,render:j}}const Ur={below:{kKVMdj:"xl1vlw0 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},above:{kKVMdj:"x3psbcj x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},end:{kKVMdj:"x1i331go x1vxsm5i x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},start:{kKVMdj:"xck01x9 x18lne9g x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0}},zN=100,Q1={container:{kWkggS:"x19aspcf",kMwMTN:"xrkvqaz",kaIpWk:"x1hviunn",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},marginBlock:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",keTefX:"x1lziwak",k71WvV:"x14z9mp",$$css:!0},marginInline:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0}};function RN(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function ls(e={}){const{placement:t="above",alignment:n="center",delay:s=200,hideDelay:r=0,focusTrigger:i="auto",isEnabled:o=!0,isOpen:l,isDefaultOpen:c=!1,onShow:u,onHide:d}=e,h=t==="above"||t==="below"?Q1.marginBlock:Q1.marginInline,f=rc({mode:"context",onShow:u,onHide:d}),p=x.useMemo(()=>[Q1.container,h],[h]),g=x.useRef(null),b=x.useRef(null),y=x.useRef(null),m=x.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),k=x.useCallback(()=>{!o||l===!1||(m(),g.current=setTimeout(()=>{f.show()},s))},[o,l,m,f,s]),w=x.useCallback(()=>{if(l===!0)return;m();const z=r>0?r:zN;b.current=setTimeout(()=>{f.hide()},z)},[l,m,f,r]),v=x.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null)},[]),j=x.useCallback(()=>{typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(hover: none)").matches||k()},[k]),C=x.useCallback(()=>{w()},[w]),$=x.useCallback(z=>{!o||!z.target.matches(":focus-visible")||(m(),f.show())},[o,m,f]),T=x.useCallback(()=>{w()},[w]),A=x.useCallback(()=>{l===void 0&&(m(),f.hide())},[l,m,f]),S=x.useCallback(z=>{y.current&&(y.current.removeEventListener("mouseenter",j),y.current.removeEventListener("mouseleave",C),y.current.removeEventListener("focusin",$),y.current.removeEventListener("focusout",T),y.current.removeEventListener("pointerdown",A)),z&&(z.addEventListener("mouseenter",j),z.addEventListener("mouseleave",C),z.addEventListener("pointerdown",A),(i==="always"||i==="auto"&&RN(z))&&(z.addEventListener("focusin",$),z.addEventListener("focusout",T))),y.current=z},[i,j,C,$,T,A]),_=x.useCallback(z=>{f.ref(z),S(z)},[f,S]);x.useEffect(()=>()=>{m()},[m]),x.useEffect(()=>{c&&f.show()},[]),x.useEffect(()=>{l!==void 0&&(l?(m(),f.show()):(m(),f.hide()))},[l,m,f]),x.useEffect(()=>{if(l!==void 0)return;const z=O=>{O.key==="Escape"&&(O.isComposing||O.keyCode===229||(m(),f.hide()))};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[l,f,m]);const M=x.useCallback((z,O)=>{const I=(O==null?void 0:O.placement)??t,E={placement:I,alignment:(O==null?void 0:O.alignment)??n,role:"tooltip",xstyle:[p,Ur[I]],className:W("tooltip").className,onMouseEnter:v,onMouseLeave:w};return f.render(a.jsx("div",{className:"xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe",children:z}),E)},[f,t,n,p,v,w]);return{ref:_,positionRef:f.ref,interactionRef:S,anchorId:f.anchorId,describedBy:f.id,renderTooltip:M}}const gy={"--color-syntax-keyword":"var(--color-text-accent)","--color-syntax-string":"var(--color-text-green)","--color-syntax-comment":"var(--color-text-secondary)","--color-syntax-number":"var(--color-text-orange)","--color-syntax-function":"var(--color-text-blue)","--color-syntax-type":"var(--color-text-purple)","--color-syntax-variable":"var(--color-text-primary)","--color-syntax-operator":"var(--color-text-cyan)","--color-syntax-constant":"var(--color-text-orange)","--color-syntax-tag":"var(--color-text-red)","--color-syntax-attribute":"var(--color-text-teal)","--color-syntax-property":"var(--color-text-cyan)","--color-syntax-punctuation":"var(--color-text-disabled)","--color-syntax-background":"var(--color-background-muted)"},IN={"--color-data-categorical-blue":"light-dark(#0171E3, #0171E3)","--color-data-categorical-orange":"light-dark(#EB6E00, #EB6E00)","--color-data-categorical-purple":"light-dark(#6B1EFD, #6B1EFD)","--color-data-categorical-green":"light-dark(#0B991F, #0B991F)","--color-data-categorical-pink":"light-dark(#F351C0, #F351C0)","--color-data-categorical-cyan":"light-dark(#0171A4, #0171A4)","--color-data-categorical-red":"light-dark(#F5394F, #F5394F)","--color-data-categorical-teal":"light-dark(#08A3A3, #08A3A3)","--color-data-categorical-brown":"light-dark(#965E03, #965E03)","--color-data-categorical-indigo":"light-dark(#6F8AFF, #6F8AFF)","--color-data-neutral":"light-dark(#8494A3, #8C939B)","--color-data-blue-5":"light-dark(#02165E, #02165E)","--color-data-blue-4":"light-dark(#004CBC, #004CBC)","--color-data-blue-3":"light-dark(#2694FE, #2694FE)","--color-data-blue-2":"light-dark(#78BEFF, #78BEFF)","--color-data-blue-1":"light-dark(#DBECFF, #DBECFF)","--color-data-shamrock-5":"light-dark(#0B603D, #0B603D)","--color-data-shamrock-4":"light-dark(#138546, #138546)","--color-data-shamrock-3":"light-dark(#24BB5E, #24BB5E)","--color-data-shamrock-2":"light-dark(#8EF7AA, #8EF7AA)","--color-data-shamrock-1":"light-dark(#D6FEE4, #D6FEE4)","--color-data-orange-5":"light-dark(#A13F04, #A13F04)","--color-data-orange-4":"light-dark(#D66100, #D66100)","--color-data-orange-3":"light-dark(#FD9537, #FD9537)","--color-data-orange-2":"light-dark(#FDB876, #FDB876)","--color-data-orange-1":"light-dark(#FFE6CF, #FFE6CF)","--color-data-pink-5":"light-dark(#8E1073, #8E1073)","--color-data-pink-4":"light-dark(#D123A1, #D123A1)","--color-data-pink-3":"light-dark(#F989D3, #F989D3)","--color-data-pink-2":"light-dark(#FEADE3, #FEADE3)","--color-data-pink-1":"light-dark(#FCE3F4, #FCE3F4)","--color-data-purple-5":"light-dark(#3E0697, #3E0697)","--color-data-purple-4":"light-dark(#6B1EFD, #6B1EFD)","--color-data-purple-3":"light-dark(#9081FF, #9081FF)","--color-data-purple-2":"light-dark(#B3B0FE, #B3B0FE)","--color-data-purple-1":"light-dark(#E8E8FB, #E8E8FB)","--color-data-red-5":"light-dark(#9D0519, #9D0519)","--color-data-red-4":"light-dark(#D31130, #D31130)","--color-data-red-3":"light-dark(#FB7D87, #FB7D87)","--color-data-red-2":"light-dark(#FFB2B8, #FFB2B8)","--color-data-red-1":"light-dark(#FEE4E6, #FEE4E6)","--color-data-teal-5":"light-dark(#08767D, #08767D)","--color-data-teal-4":"light-dark(#0C9293, #0C9293)","--color-data-teal-3":"light-dark(#0DB7AF, #0DB7AF)","--color-data-teal-2":"light-dark(#6CE6D8, #6CE6D8)","--color-data-teal-1":"light-dark(#D7FCF8, #D7FCF8)","--color-data-yellow-5":"light-dark(#8A5001, #8A5001)","--color-data-yellow-4":"light-dark(#D69804, #D69804)","--color-data-yellow-3":"light-dark(#FBCE03, #FBCE03)","--color-data-yellow-2":"light-dark(#FCEC85, #FCEC85)","--color-data-yellow-1":"light-dark(#FDF6BA, #FDF6BA)","--color-data-gray-5":"light-dark(#25363F, #333338)","--color-data-gray-4":"light-dark(#5D6C7B, #666A72)","--color-data-gray-3":"light-dark(#AFB9C4, #B2B8BE)","--color-data-gray-2":"light-dark(#CCD3DB, #D0D3D6)","--color-data-gray-1":"light-dark(#F1F4F7, #F2F4F6)"},_N={...gy,...IN},$4=new Map;function LN(e){$4.set(e.name,e)}function E4(e){return e==null||e===""?null:$4.get(e)??null}const ON={avatar:[{property:"fontSize",vars:["--_avatar-fallback-font-size"]},{property:"fontWeight",vars:["--_avatar-fallback-font-weight"]},{property:"color",vars:["--_avatar-fallback-color"]},{property:"backgroundColor",vars:["--_avatar-fallback-background"]}],banner:[{property:"borderRadius",vars:["--_banner-radius"]}],button:[{property:"borderRadius",vars:["--_button-radius"]}],card:[{property:"borderRadius",vars:["--_card-radius"]},{property:"padding",expand:"container"}],chat:[{property:"borderRadius",vars:["--_chat-composer-radius"]},{property:"padding",vars:["--_chat-composer-padding"]}],dialog:[{property:"borderRadius",vars:["--_dialog-radius"]},{property:"padding",expand:"container"}],"dropdown-menu":[{property:"borderRadius",vars:["--_dropdown-menu-radius"]},{property:"padding",vars:["--_dropdown-menu-padding"]}],field:[{property:"borderRadius",vars:["--_field-radius"]}],hovercard:[{property:"borderRadius",vars:["--_hovercard-radius"]}],popover:[{property:"borderRadius",vars:["--_popover-radius"]}],section:[{property:"padding",expand:"container"}],"segmented-control":[{property:"borderRadius",vars:["--_segmented-control-radius"]},{property:"padding",vars:["--_segmented-control-padding"]}]};function fv(e,t){const n=ON[e];return n?n.filter(s=>s.property===t):[]}function T4(e){return`[data-${Xx}-theme="${e}"]`}const N4=`[data-${Xx}-theme]`;function hv(e){return`[data-${Xx}-media="${e}"]`}function rl(e,t){return`.${b4}-${e}${t}`}function A4(e,t){const n=[];let s=0,r=0;for(let i=0;i<e.length;i++){const o=e[i];o==="("?s++:o===")"?s=Math.max(0,s-1):o===","&&s===0&&(n.push(e.slice(r,i).trim()),r=i+1)}return n.push(e.slice(r).trim()),n.map(i=>`${i}${t}`).join(", ")}function Oh(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const Xd=new Set(["padding","paddingBlock","paddingInline","paddingBlockStart","paddingBlockEnd","paddingInlineStart","paddingInlineEnd"]);function DN(e){const t={};for(const[n,s]of e)switch(n){case"padding":{const r=s.trim().split(/\s+/);r.length===1?(t.blockStart=r[0],t.blockEnd=r[0],t.inline=r[0]):r.length===2?(t.blockStart=r[0],t.blockEnd=r[0],t.inline=r[1]):r.length>=3&&(t.blockStart=r[0],t.inline=r[1],t.blockEnd=r[2]);break}case"paddingBlock":{const r=s.trim().split(/\s+/);t.blockStart=r[0],t.blockEnd=r[1]??r[0];break}case"paddingInline":{const r=s.trim().split(/\s+/);r.length===1?t.inline=r[0]:(t.inlineStart=r[0],t.inlineEnd=r[1]);break}case"paddingBlockStart":t.blockStart=s;break;case"paddingBlockEnd":t.blockEnd=s;break;case"paddingInlineStart":t.inlineStart=s;break;case"paddingInlineEnd":t.inlineEnd=s;break}return t}function BN(e,t){const n=iN(`${e}-padding`),s=[],r=t.inlineStart??t.inline,i=t.inlineEnd??t.inline;return r!=null&&i!=null&&r===i&&t.blockStart!=null&&t.blockEnd!=null&&r===t.blockStart&&t.blockStart===t.blockEnd?(s.push([n,r??""]),s):(t.inlineStart!=null||t.inlineEnd!=null?(r!=null&&s.push([`${n}-inline-start`,r]),i!=null&&s.push([`${n}-inline-end`,i])):t.inline!=null&&s.push([`${n}-inline`,t.inline]),t.blockStart!=null&&s.push([`${n}-block-start`,t.blockStart]),t.blockEnd!=null&&s.push([`${n}-block-end`,t.blockEnd]),s)}function qN(e){const t=[],n=e.tokens,s=i=>n[i]||`var(${i})`,r=Object.entries(n);if(r.length>0){const i=r.map(([o,l])=>` ${o}: ${l};`).join(`
|
|
18
|
-
`);t.push(` :scope {
|
|
19
|
-
${i}
|
|
20
|
-
}`)}return e.components&&HN(e.components,t),PN(s,t),UN(e.components||{},t),GN(e.components||{},t),t}function HN(e,t){for(const[n,s]of Object.entries(e))for(const[r,i]of Object.entries(s)){const o=Object.entries(i);if(o.length===0)continue;const l=uy(r),c=rl(n,l),u=[],d=[];for(const[g,b]of o)g.startsWith(":")&&typeof b=="object"?d.push([g,b]):u.push([g,b]);let h=u;const f=[];let p=!1;for(const[g,b]of u){const y=fv(n,g),m=Xd.has(g)&&g!=="padding"?fv(n,"padding"):[];for(const k of[...y,...m])if(k.expand==="container"&&Xd.has(g)&&(p=!0),k.vars)for(const w of k.vars)f.push([w,b])}if(p){const g=u.filter(([k])=>Xd.has(k)),b=u.filter(([k])=>!Xd.has(k)),y=DN(g),m=BN(n,y);h=[...b,...m]}if(f.length>0&&(h=[...h,...f]),h.length>0){const g=h.map(([b,y])=>` ${Oh(b)}: ${y};`).join(`
|
|
21
|
-
`);t.push(` ${c} {
|
|
22
|
-
${g}
|
|
23
|
-
}`)}for(const[g,b]of d){const y=Object.entries(b);if(y.length>0){const m=y.map(([k,w])=>` ${Oh(k)}: ${w};`).join(`
|
|
24
|
-
`);t.push(` ${A4(c,g)} {
|
|
25
|
-
${m}
|
|
26
|
-
}`)}}}}function PN(e,t){t.push(` :where(h1, h2, h3, h4, h5, h6) {
|
|
27
|
-
font-family: var(--font-family-heading);
|
|
28
|
-
color: var(--color-text-primary);
|
|
29
|
-
}`);for(let n=1;n<=6;n++)t.push(` :where(h${n}) {
|
|
30
|
-
font-size: ${e(`--text-heading-${n}-size`)};
|
|
31
|
-
font-weight: ${e(`--text-heading-${n}-weight`)};
|
|
32
|
-
line-height: ${e(`--text-heading-${n}-leading`)};
|
|
33
|
-
}`);t.push(` :where(p) {
|
|
34
|
-
font-family: var(--font-family-body);
|
|
35
|
-
font-size: ${e("--text-body-size")};
|
|
36
|
-
font-weight: ${e("--text-body-weight")};
|
|
37
|
-
line-height: ${e("--text-body-leading")};
|
|
38
|
-
color: var(--color-text-primary);
|
|
39
|
-
}`),t.push(` :where(small) {
|
|
40
|
-
font-size: ${e("--text-supporting-size")};
|
|
41
|
-
font-weight: ${e("--text-supporting-weight")};
|
|
42
|
-
line-height: ${e("--text-supporting-leading")};
|
|
43
|
-
color: var(--color-text-secondary);
|
|
44
|
-
}`),t.push(` :where(code, pre) {
|
|
45
|
-
font-family: var(--font-family-code);
|
|
46
|
-
font-size: ${e("--text-code-size")};
|
|
47
|
-
line-height: ${e("--text-code-leading")};
|
|
48
|
-
}`),t.push(` :where(hr) {
|
|
49
|
-
border: none;
|
|
50
|
-
border-top: 1px solid var(--color-border);
|
|
51
|
-
}`)}function UN(e,t){const n={primary:"var(--color-text-primary)",secondary:"var(--color-text-secondary)",disabled:"var(--color-text-disabled)",placeholder:"var(--color-text-secondary)",accent:"var(--color-text-accent)"},s="text"in e,r="heading"in e,i="link"in e;if(s||r||i)for(const[o,l]of Object.entries(n))s&&t.push(` ${rl("text",`.${o}`)} { color: ${l}; }`),r&&t.push(` ${rl("heading",`.${o}`)} { color: ${l}; }`),i&&t.push(` ${rl("link",`.${o}`)} { color: ${l}; }`)}const FN={"4xs":"var(--font-size-4xs)","3xs":"var(--font-size-3xs)","2xs":"var(--font-size-2xs)",xsm:"var(--font-size-xs)",sm:"var(--font-size-sm)",base:"var(--font-size-base)",lg:"var(--font-size-lg)",xl:"var(--font-size-xl)","2xl":"var(--font-size-2xl)","3xl":"var(--font-size-3xl)","4xl":"var(--font-size-4xl)"};function GN(e,t){if("text"in e)for(const[n,s]of Object.entries(FN)){const r=uy(`size:${n}`);t.push(` ${rl("text",r)} { font-size: ${s}; }`)}}function VN(e){const t=qN(e),n=[],s=[];for(const r of t)r.trimStart().startsWith(":where(")?n.push(r):s.push(r);return{component:s,prose:n}}function WN(e){const t=[],n=T4(e.name);for(const r of["dark","light"]){const i=r==="dark"?e.__onDark:e.__onLight;if(!i)continue;const o=Object.entries(i.tokens);if(o.length>0){const l=o.map(([c,u])=>` ${c}: ${u};`).join(`
|
|
52
|
-
`);t.push(` ${hv(r)} {
|
|
53
|
-
${l}
|
|
54
|
-
}`)}if(i.components)for(const[l,c]of Object.entries(i.components))for(const[u,d]of Object.entries(c)){const h=Object.entries(d);if(h.length===0)continue;const f=uy(u),p=`:is(${hv(r)}) :is(${rl(l,f)})`,g=[],b=[];for(const[y,m]of h)y.startsWith(":")&&typeof m=="object"?b.push([y,m]):g.push([y,m]);if(g.length>0){const y=g.map(([m,k])=>` ${Oh(m)}: ${k};`).join(`
|
|
55
|
-
`);t.push(` ${p} {
|
|
56
|
-
${y}
|
|
57
|
-
}`)}for(const[y,m]of b){const k=Object.entries(m);if(k.length>0){const w=k.map(([v,j])=>` ${Oh(v)}: ${j};`).join(`
|
|
58
|
-
`);t.push(` ${A4(p,y)} {
|
|
59
|
-
${w}
|
|
60
|
-
}`)}}}}if(t.length===0)return"";const s=t.join(`
|
|
61
|
-
|
|
62
|
-
`);return`@scope (${n}) to (${N4}) {
|
|
63
|
-
${s}
|
|
64
|
-
}`}function KN(e){const{component:t,prose:n}=VN(e),s=T4(e.name),r=N4;let i="";if(n.length>0){const c=n.join(`
|
|
65
|
-
|
|
66
|
-
`);i=`@scope (${s}) to (${r}) {
|
|
67
|
-
${c}
|
|
68
|
-
}`}let o="";if(t.length>0){const c=t.join(`
|
|
69
|
-
|
|
70
|
-
`);o=`@scope (${s}) to (${r}) {
|
|
71
|
-
${c}
|
|
72
|
-
}`}const l=WN(e);return l&&(o=o?`${o}
|
|
73
|
-
|
|
74
|
-
${l}`:l),{prose:i,component:o}}const M4={..._T,...LT,...OT,...DT,...BT,...qT,...HT,...PT,...UT,...FT,...GT,..._N};function XN(e){return`var(${e})`}Object.fromEntries(Object.keys(M4).map(e=>[e,XN(e)]));function my(e){let t=0,n=null,s=!1;for(let r=0;r<e.length;r++){const i=e[r];if(n!==null){s?s=!1:i==="\\"?s=!0:i===n&&(n=null);continue}if(i==='"'||i==="'"){n=i;continue}if(i==="("){t++;continue}if(i===")"){t=Math.max(0,t-1);continue}if(i===","&&t===0)return[e.slice(0,r).trim(),e.slice(r+1).trim()]}return null}function ZN(e){const t=e.trim(),n="light-dark(";if(!t.startsWith(n)||!t.endsWith(")"))return null;const s=t.slice(n.length,-1);return my(s)}function J1(e,t){if(Array.isArray(e))return t==="dark"?e[1]:e[0];const n=ZN(e);return n!==null?t==="dark"?n[1]:n[0]:e}function z4(e,t){let n=0;for(let s=t;s<e.length;s++){const r=e[s];if(r==="(")n++;else if(r===")"&&(n--,n===0))return s}return-1}function xv(e){const t=e.trim(),n=t.match(/\s+([\d.]+)%$/);return n?{color:t.slice(0,n.index).trim(),percentage:parseFloat(n[1])}:{color:t,percentage:null}}function YN(e){const t=e.match(/^in\s+([\w-]+)\s*,\s*(.+)$/s);if(!t)return null;const[,n,s]=t;if(n.toLowerCase()!=="srgb")return null;const r=my(s);if(r===null)return null;const i=xv(r[0]),o=xv(r[1]);if(i===null||o===null)return null;const l=uv(i.color),c=uv(o.color);if(l===null||c===null)return null;let u,d;i.percentage!==null&&o.percentage!==null?(u=i.percentage,d=o.percentage):i.percentage!==null?(u=i.percentage,d=100-u):o.percentage!==null?(d=o.percentage,u=100-d):(u=50,d=50);const h=u+d;if(h<=0)return null;const f=u/h,p=d/h,g=h<100?h/100:1,b=f*l.a+p*c.a,y=(j,C)=>f*j*l.a+p*C*c.a,m=y(l.r,c.r),k=y(l.g,c.g),w=y(l.b,c.b),v=b===0?{r:0,g:0,b:0}:{r:m/b,g:k/b,b:w/b};return mN({...v,a:b*g})}function Rg(e){const t=e.indexOf("color-mix(");if(t===-1)return e;const n=t+9,s=z4(e,n);if(s===-1)return e;const r=Rg(e.slice(n+1,s)),o=YN(r)??`color-mix(${r})`;return e.slice(0,t)+o+Rg(e.slice(s+1))}function Ig(e,t,n,s){const r=e.indexOf("var(");if(r===-1)return e;const i=r+3,o=z4(e,i);if(o===-1)return e;const l=e.slice(i+1,o),c=my(l),u=(c?c[0]:l).trim(),d=c?c[1]:null;let h;s.has(u)?h=e.slice(r,o+1):u in t?(s.add(u),h=R4(u,t,n,s),s.delete(u)):d!==null?h=Ig(d.trim(),t,n,s):h=e.slice(r,o+1);const f=Ig(e.slice(o+1),t,n,s);return e.slice(0,r)+h+f}function QN(e,t,n,s){if(!e.includes("var(")&&!e.includes("color-mix("))return e;const r=Ig(e,t,n,s);return Rg(r)}function R4(e,t,n,s){if(e in n)return n[e];const r=t[e];if(r===void 0)return"";const i=QN(r,t,n,s);return n[e]=i,i}function pv(e){const t={};for(const n of Object.keys(e))R4(n,e,t,new Set);return t}function JN(e,t){const{mode:n}=t,s={};for(const[r,i]of Object.entries(M4))s[r]=J1(i,n);if(e==null)return pv(s);for(const[r,i]of Object.entries(e.tokens))s[r]=J1(i,n);if(e.__inputTokens)for(const[r,i]of Object.entries(e.__inputTokens))i!==void 0&&(s[r]=J1(i,n));return pv(s)}function ua(e,t=!1){const n=x.useCallback(i=>{const o=window.matchMedia(e);return o.addEventListener("change",i),()=>o.removeEventListener("change",i)},[e]),s=x.useCallback(()=>window.matchMedia(e).matches,[e]),r=x.useCallback(()=>t,[t]);return x.useSyncExternalStore(n,s,r)}const Zx=x.createContext(null);Zx.displayName="ThemeContext";function eA(){if(typeof document>"u")return null;const e=document.documentElement.getAttribute("data-theme");return e==="light"||e==="dark"?e:null}function tA(){return null}function nA(){return typeof document>"u"?null:document.documentElement.getAttribute(_n("theme"))}function sA(){return null}function I4(){return null}const Zc=new Set;let Ic=null;const Yc=new Set;let _c=null;function rA(){for(const e of Zc)e()}function iA(e){return Zc.add(e),Zc.size===1&&typeof MutationObserver<"u"&&(Ic=new MutationObserver(rA),Ic.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})),()=>{Zc.delete(e),Zc.size===0&&Ic&&(Ic.disconnect(),Ic=null)}}function oA(){for(const e of Yc)e()}function aA(e){return Yc.add(e),Yc.size===1&&typeof MutationObserver<"u"&&(_c=new MutationObserver(oA),_c.observe(document.documentElement,{attributes:!0,attributeFilter:[_n("theme")]})),()=>{Yc.delete(e),Yc.size===0&&_c&&(_c.disconnect(),_c=null)}}function _4(){return()=>{}}function lA(e){return x.useSyncExternalStore(e?_4:iA,e?I4:eA,tA)}function L4(e){return x.useSyncExternalStore(e?_4:aA,e?I4:nA,sA)}function O4(){const e=x.use(Zx),t=e!=null,n=L4(t);return(e==null?void 0:e.theme.name)??n}function Yx(){const e=x.use(Zx),t=e!=null,n=lA(t),s=L4(t),r=ua("(prefers-color-scheme: dark)"),i=(e==null?void 0:e.mode)??n??"system",o=(e==null?void 0:e.theme)??E4(s),l=i==="system"?r?"dark":"light":i,c=x.useMemo(()=>JN(o,{mode:l}),[o,l]),u=d=>c[d]??"";return{name:(o==null?void 0:o.name)??"default",mode:l,token:u,tokens:c}}const cA="modulepreload",uA=function(e){return"/"+e},gv={},D4=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const o=document.querySelector("meta[property=csp-nonce]"),l=(o==null?void 0:o.nonce)||(o==null?void 0:o.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=uA(c),c in gv)return;gv[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const h=document.createElement("link");if(h.rel=u?"stylesheet":cA,u||(h.as="script"),h.crossOrigin="",h.href=c,l&&h.setAttribute("nonce",l),document.head.appendChild(h),u)return new Promise((f,p)=>{h.addEventListener("load",f),h.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function i(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},yy={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},disabled:{kMwMTN:"xnbbluu",$$css:!0},placeholder:{kMwMTN:"xv1l7n4",$$css:!0},accent:{kMwMTN:"xjse4m1",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},dA={normal:{k63SB2:"x1sodnla",$$css:!0},medium:{k63SB2:"x1e4wzip",$$css:!0},semibold:{k63SB2:"x2mo6ok",$$css:!0},bold:{k63SB2:"x1lvx875",$$css:!0}},B4={body:{k63SB2:"xxovm9e",$$css:!0},large:{k63SB2:"x149oux8",$$css:!0},label:{k63SB2:"xmhvcl5",$$css:!0},code:{k63SB2:"xx3eeay",$$css:!0},supporting:{k63SB2:"xv8on6e",$$css:!0},"display-1":{k63SB2:"x1txul5o",$$css:!0},"display-2":{k63SB2:"x1y36c3f",$$css:!0},"display-3":{k63SB2:"x1on40hk",$$css:!0},inherit:{k63SB2:"x1pd3egz",$$css:!0}},ky={body:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},large:{kGuDYH:"x18juvz8",kLWn49:"xf74fhv",$$css:!0},label:{kGuDYH:"xcr08ib",kLWn49:"x1kq96og",$$css:!0},code:{kGuDYH:"xp03k98",kLWn49:"x17iicif",kMv6JI:"x9m5x89",$$css:!0},supporting:{kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},"display-1":{kGuDYH:"xsub3ws",kLWn49:"x112ttwr",$$css:!0},"display-2":{kGuDYH:"x1yego12",kLWn49:"xh0iwvy",$$css:!0},"display-3":{kGuDYH:"xlgnzhf",kLWn49:"x1ujwuaq",$$css:!0},inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}},fA={"4xs":{kGuDYH:"xxc45ev",$$css:!0},"3xs":{kGuDYH:"x10p7juq",$$css:!0},"2xs":{kGuDYH:"x16a80zy",$$css:!0},xsm:{kGuDYH:"x51wmvv",$$css:!0},sm:{kGuDYH:"x1eqnyfr",$$css:!0},base:{kGuDYH:"x1j29vfg",$$css:!0},lg:{kGuDYH:"xc7cgfe",$$css:!0},xl:{kGuDYH:"x1wqms48",$$css:!0},"2xl":{kGuDYH:"xhs0kqb",$$css:!0},"3xl":{kGuDYH:"x10srzze",$$css:!0},"4xl":{kGuDYH:"xqcvi3d",$$css:!0}},hA={1:{kGuDYH:"xcg7oai",kLWn49:"xfmsba7",k63SB2:"x1v68xuy",$$css:!0},2:{kGuDYH:"x1xvnhcw",kLWn49:"x1cpk1wn",k63SB2:"x12yy4cs",$$css:!0},3:{kGuDYH:"xii13ha",kLWn49:"xwjzt0u",k63SB2:"x1jcxfy8",$$css:!0},4:{kGuDYH:"x8tkxat",kLWn49:"xqerer",k63SB2:"x2hcmsi",$$css:!0},5:{kGuDYH:"xsgqta0",kLWn49:"xo3gurs",k63SB2:"xno150v",$$css:!0},6:{kGuDYH:"xw5ohdf",kLWn49:"xeixjfn",k63SB2:"x1pw4frv",$$css:!0}},q4={inline:{k1xSpc:"xt0psk2",$$css:!0},block:{k1xSpc:"x1lliihq",$$css:!0}},Dh={singleLine:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",k1xSpc:"x1lliihq",$$css:!0},multiLine:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},H4={"break-word":{kTgw9:"x1lldw8n",kHjlTd:"x1mzt3pk",$$css:!0},"break-all":{kTgw9:"x1yn0g08",$$css:!0}},P4={wrap:{kN2L0X:"xk4td0m",$$css:!0},nowrap:{kN2L0X:"xebhuq6",$$css:!0},balance:{kN2L0X:"x1w2vvpw",$$css:!0},pretty:{kN2L0X:"x1fzhlzt",$$css:!0}},U4={enabled:{kxwWH2:"x1b2iylo",kzeHkT:"xwgcxoh",k1xSpc:"x1lliihq",$$css:!0}},F4={strikethrough:{kybGjl:"xmqliwb",$$css:!0}},xA={enabled:{kcqcaj:"xss6m8b",$$css:!0}},G4={start:{k9WMMc:"x1yc453h",$$css:!0},center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},V4={content:{ks0D6T:"xw5ewwj",kTgw9:"x13faqbe",$$css:!0}};function W4(e){const{maxLines:t}=e,[n,s]=x.useState(!1),[r,i]=x.useState(""),o=x.useRef(null),l=x.useCallback(u=>{if(t===0){s(!1);return}if(i(u.textContent??""),t===1)s(u.scrollWidth>u.offsetWidth);else{let d=u.scrollHeight;try{const h=document.createRange();h.selectNodeContents(u),d=h.getBoundingClientRect().height,h.detach()}catch{}s(d>u.offsetHeight)}},[t]);return{ref:x.useCallback(u=>{o.current&&hy(o.current),o.current=u,u&&t>0?typeof ResizeObserver<"u"?fy(u,()=>{l(u)}):l(u):(s(!1),i(""))},[t,l]),isTruncated:n,fullText:r}}const pA=x.lazy(async()=>D4(()=>Promise.resolve().then(()=>T6),void 0).then(e=>({default:e.Tooltip}))),gA={body:"primary",large:"primary",label:"primary",supporting:"secondary",code:"primary","display-1":"primary","display-2":"primary","display-3":"primary",inherit:"inherit"};function mA(e){return e in ky?e:"body"}function K4(e){return e in yy?e:"primary"}function re({type:e="body",size:t,color:n,weight:s,display:r="inline",maxLines:i=0,hasTruncateTooltip:o=!0,wordBreak:l,textWrap:c,justify:u="start",hasCapsize:d=!1,hasStrikethrough:h=!1,hasTabularNumbers:f=!1,xstyle:p,className:g,style:b,as:y="span",children:m,ref:k,...w}){const v=n??gA[e]??"primary",j=mA(e),C=K4(v),$=l??(i===1?"break-all":"break-word"),T=i>0||d?"block":r,A=W4({maxLines:i}),S=typeof o=="string"?o:"above",_=i>0&&o!==!1&&A.isTruncated,M=x.useRef(null),z=i>1?{WebkitLineClamp:i}:void 0;return a.jsxs(a.Fragment,{children:[a.jsx(y,{ref:mt(k,A.ref,M),...K(W("text",{type:e,size:t,color:v}),q(yy[C],ky[j],t&&fA[t],B4[j],s&&dA[s],i===1?Dh.singleLine:i>1?Dh.multiLine:q4[T],i>0&&H4[$],c&&P4[c],u!=="start"&&G4[u],d&&U4.enabled,h&&F4.strikethrough,f&&xA.enabled,p),g,{...b,...z}),title:_?A.fullText:void 0,...w,children:m}),_&&a.jsx(x.Suspense,{fallback:null,children:a.jsx(pA,{anchorRef:M,content:a.jsx("span",{...q(V4.content),children:A.fullText}),placement:S})})]})}re.displayName="Text";const yA=.75,mv=1.5,yv={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},kv={wrapper:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},spinner:{k1xSpc:"xwz0xwf",kgQiWS:"x1ku5rj1",kVQacm:"xb3r6kr",kXLuUW:"xxymvpz",$$css:!0}};function un({size:e="md",shade:t="default",label:n,xstyle:s,className:r,style:i,"aria-label":o,"data-testid":l,ref:c,...u}){const d=x.useRef(null),{tokens:h}=Yx();x.useEffect(()=>{const v=d.current;if(v==null)return;const j=v.getContext("2d");if(!j)return;const{border:C,diameter:$}=yv[e],T=window.devicePixelRatio||1,A=t==="inherit"?getComputedStyle(v).color:null,S=t==="inherit"?A:t==="onMedia"?h["--color-on-dark"]:t==="subtle"?h["--color-text-secondary"]:h["--color-accent"],_=t==="inherit"?A:t==="onMedia"?`${h["--color-on-dark"]}4D`:h["--color-track"],M=$+C*2,z=Math.round(M*T),O=z+z%2,I=O/M,E=$/2*I,N=C*I;v.height=v.width=O,v.style.width=v.style.height=M+"px",j.lineCap="round",j.lineWidth=N;const R=O/2;j.beginPath(),j.arc(R,R,E,0,2*Math.PI),j.strokeStyle=_,t==="inherit"&&(j.globalAlpha=.3),j.stroke(),j.globalAlpha=1,j.beginPath(),j.arc(R,R,E,mv*Math.PI,(mv+yA)%2*Math.PI),j.strokeStyle=S,j.stroke()},[t,e,h]);const{border:f,diameter:p}=yv[e],g=p+f*2,b=n!=null,y=x.useId(),m=b&&typeof n=="string"&&o==null,k=o??(typeof n=="string"?n:void 0)??"Loading",w=a.jsx("span",{ref:b?void 0:c,role:"status","aria-label":m?void 0:k,"aria-labelledby":m?y:void 0,"data-testid":b?void 0:l,...b?{}:u,...K(b?"":W("spinner",{size:e,shade:t}),q(kv.spinner,!b&&s),b?void 0:r,{...b?{}:i,width:g,height:g}),children:a.jsx("canvas",{ref:d,className:"xlp1x4z x1lliihq x1so62im x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782"})});return b?a.jsxs("div",{ref:c,"data-testid":l,...u,...K(W("spinner",{size:e,shade:t}),q(kv.wrapper,s),r,i),children:[w,typeof n=="string"?a.jsx(re,{id:y,type:"body",weight:"bold",children:n}):n]}):w}un.displayName="Spinner";function si({children:e,as:t="span",ref:n,...s}){return x.createElement(t,{ref:n,...s,className:"x10l6tqk x1i1rx1s xjm9jq1 xkdpibf x1717udv xb3r6kr xzpqnlu xuxw1ft xng3xce x13vifvy x1o0tod x47corl x87ps6o"},e)}si.displayName="VisuallyHidden";const Bh="data-astryx-edge-comp",kA={keTefX:"x1kftj4p",k71WvV:"x92e2el",$$css:!0},bA={inset:e=>[kA,{"--x-126w13d":(t=>typeof t=="number"?t+"px":t??void 0)(`calc(-1 * ${e})`),"--x-4drmnv":(t=>typeof t=="number"?t+"px":t??void 0)(`calc(-1 * ${e})`)}]},by=x.createContext(null);by.displayName="SizeContext";function da(e,t="md"){const n=x.use(by);return e??n??t}by.Provider;const X4=x.createContext(null);X4.displayName="ButtonGroupContext";function vA(){return x.use(X4)}const Z4=x.createContext(null);Z4.displayName="LinkContext";function wA(e){function t({href:n,ref:s,...r}){return x.createElement(e,{ref:s,href:n,to:n,...r})}return t.displayName=`LinkWithTo(${typeof e=="string"?e:e.displayName||e.name||"Component"})`,t}function eo(e){const t=x.use(Z4),n=e??(t==null?void 0:t.component)??"a";return x.useMemo(()=>n==="a"?"a":wA(n),[n])}const Y4=x.createContext({locale:"en",direction:"ltr",messages:{}});Y4.displayName="InternationalizationContext";function ep(e,t){const n=t&&t.cache?t.cache:NA,s=t&&t.serializer?t.serializer:EA;return(t&&t.strategy?t.strategy:CA)(e,{cache:n,serializer:s})}function jA(e){return e==null||typeof e=="number"||typeof e=="boolean"}function SA(e,t,n,s){const r=jA(s)?s:n(s);let i=t.get(r);return typeof i>"u"&&(i=e.call(this,s),t.set(r,i)),i}function Q4(e,t,n){const s=Array.prototype.slice.call(arguments,3),r=n(s);let i=t.get(r);return typeof i>"u"&&(i=e.apply(this,s),t.set(r,i)),i}function J4(e,t,n,s,r){return n.bind(t,e,s,r)}function CA(e,t){const n=e.length===1?SA:Q4;return J4(e,this,n,t.cache.create(),t.serializer)}function $A(e,t){return J4(e,this,Q4,t.cache.create(),t.serializer)}const EA=function(){return JSON.stringify(arguments)};var TA=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}};const NA={create:function(){return new TA}},tp={variadic:$A},AA=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g;function MA(e){const t={};return e.replace(AA,n=>{const s=n.length;switch(n[0]){case"G":t.era=s===4?"long":s===5?"narrow":"short";break;case"y":t.year=s===2?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw new RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw new RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":t.month=["numeric","2-digit","short","long","narrow"][s-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][s-1];break;case"D":case"F":case"g":throw new RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":t.weekday=s===4?"long":s===5?"narrow":"short";break;case"e":if(s<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][s-3];break;case"c":if(s<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][s-3];break;case"a":t.hour12=!0;break;case"b":case"B":throw new RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":t.hourCycle="h12",t.hour=["numeric","2-digit"][s-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][s-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][s-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][s-1];break;case"j":case"J":case"C":throw new RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":t.minute=["numeric","2-digit"][s-1];break;case"s":t.second=["numeric","2-digit"][s-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=s<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw new RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),t}const zA=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function RA(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");const t=e.split(zA).filter(s=>s.length>0),n=[];for(const s of t){let r=s.split("/");if(r.length===0)throw new Error("Invalid number skeleton");const[i,...o]=r;for(const l of o)if(l.length===0)throw new Error("Invalid number skeleton");n.push({stem:i,options:o})}return n}function IA(e){return e.replace(/^(.*?)-/,"")}const bv=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,e6=/^(@+)?(\+|#+)?[rs]?$/g,_A=/(\*)(0+)|(#+)(0+)|(0+)/g,t6=/^(0+)$/;function vv(e){const t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(e6,function(n,s,r){return typeof r!="string"?(t.minimumSignificantDigits=s.length,t.maximumSignificantDigits=s.length):r==="+"?t.minimumSignificantDigits=s.length:s[0]==="#"?t.maximumSignificantDigits=s.length:(t.minimumSignificantDigits=s.length,t.maximumSignificantDigits=s.length+(typeof r=="string"?r.length:0)),""}),t}function n6(e){switch(e){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function LA(e){let t;if(e[0]==="E"&&e[1]==="E"?(t={notation:"engineering"},e=e.slice(2)):e[0]==="E"&&(t={notation:"scientific"},e=e.slice(1)),t){const n=e.slice(0,2);if(n==="+!"?(t.signDisplay="always",e=e.slice(2)):n==="+?"&&(t.signDisplay="exceptZero",e=e.slice(2)),!t6.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function wv(e){const t={},n=n6(e);return n||t}function OA(e){let t={};for(const n of e){switch(n.stem){case"percent":case"%":t.style="percent";continue;case"%x100":t.style="percent",t.scale=100;continue;case"currency":t.style="currency",t.currency=n.options[0];continue;case"group-off":case",_":t.useGrouping=!1;continue;case"precision-integer":case".":t.maximumFractionDigits=0;continue;case"measure-unit":case"unit":t.style="unit",t.unit=IA(n.options[0]);continue;case"compact-short":case"K":t.notation="compact",t.compactDisplay="short";continue;case"compact-long":case"KK":t.notation="compact",t.compactDisplay="long";continue;case"scientific":t={...t,notation:"scientific",...n.options.reduce((i,o)=>({...i,...wv(o)}),{})};continue;case"engineering":t={...t,notation:"engineering",...n.options.reduce((i,o)=>({...i,...wv(o)}),{})};continue;case"notation-simple":t.notation="standard";continue;case"unit-width-narrow":t.currencyDisplay="narrowSymbol",t.unitDisplay="narrow";continue;case"unit-width-short":t.currencyDisplay="code",t.unitDisplay="short";continue;case"unit-width-full-name":t.currencyDisplay="name",t.unitDisplay="long";continue;case"unit-width-iso-code":t.currencyDisplay="symbol";continue;case"scale":t.scale=parseFloat(n.options[0]);continue;case"rounding-mode-floor":t.roundingMode="floor";continue;case"rounding-mode-ceiling":t.roundingMode="ceil";continue;case"rounding-mode-down":t.roundingMode="trunc";continue;case"rounding-mode-up":t.roundingMode="expand";continue;case"rounding-mode-half-even":t.roundingMode="halfEven";continue;case"rounding-mode-half-down":t.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":t.roundingMode="halfExpand";continue;case"integer-width":if(n.options.length>1)throw new RangeError("integer-width stems only accept a single optional option");n.options[0].replace(_A,function(i,o,l,c,u,d){if(o)t.minimumIntegerDigits=l.length;else{if(c&&u)throw new Error("We currently do not support maximum integer digits");if(d)throw new Error("We currently do not support exact integer digits")}return""});continue}if(t6.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(bv.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(bv,function(o,l,c,u,d,h){return c==="*"?t.minimumFractionDigits=l.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:d&&h?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+h.length):(t.minimumFractionDigits=l.length,t.maximumFractionDigits=l.length),""});const i=n.options[0];i==="w"?t={...t,trailingZeroDisplay:"stripIfInteger"}:i&&(t={...t,...vv(i)});continue}if(e6.test(n.stem)){t={...t,...vv(n.stem)};continue}const s=n6(n.stem);s&&(t={...t,...s});const r=LA(n.stem);r&&(t={...t,...r})}return t}let DA=function(e){return e[e.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",e[e.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",e[e.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",e[e.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",e[e.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",e[e.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",e[e.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",e[e.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",e[e.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",e[e.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",e[e.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",e[e.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",e[e.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",e[e.INVALID_TAG=23]="INVALID_TAG",e[e.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",e[e.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",e[e.UNCLOSED_TAG=27]="UNCLOSED_TAG",e}({});function jv(e){return e.type===0}function BA(e){return e.type===1}function s6(e){return e.type===2}function r6(e){return e.type===3}function i6(e){return e.type===4}function o6(e){return e.type===5}function a6(e){return e.type===6}function qA(e){return e.type===7}function l6(e){return e.type===8}function c6(e){return!!(e&&typeof e=="object"&&e.type===0)}function _g(e){return!!(e&&typeof e=="object"&&e.type===1)}const u6=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Lc={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]};function HA(e,t){let n="";for(let s=0;s<e.length;s++){const r=e.charAt(s);if(r==="j"){let i=0;for(;s+1<e.length&&e.charAt(s+1)===r;)i++,s++;let o=1+(i&1),l=i<2?1:3+(i>>1),c="a",u=PA(t);for((u=="H"||u=="k")&&(l=0);l-- >0;)n+=c;for(;o-- >0;)n=u+n}else r==="J"?n+="H":n+=r}return n}function PA(e){var r,i;let t=e.hourCycle;if(t===void 0){const o=e;t=((r=o.getHourCycles)==null?void 0:r.call(o)[0])??((i=o.hourCycles)==null?void 0:i[0])}if(t)switch(t){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw new Error("Invalid hourCycle")}const n=e.language;let s;return n!=="root"&&(s=e.maximize().region),(Lc[`${n}-${s}`]||Lc[s||""]||Lc[n||""]||Lc[`${n}-001`]||Lc["001"])[0].charAt(0)}const UA=new RegExp(`^${u6.source}*`),FA=new RegExp(`${u6.source}*$`);function Ie(e,t){return{start:e,end:t}}const GA=!!Object.fromEntries,VA=!!String.prototype.trimStart,WA=!!String.prototype.trimEnd,Sv=GA?Object.fromEntries:function(t){const n={};for(const[s,r]of t)n[s]=r;return n},KA=VA?function(t){return t.trimStart()}:function(t){return t.replace(UA,"")},XA=WA?function(t){return t.trimEnd()}:function(t){return t.replace(FA,"")},Cv=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");function ZA(e,t){return Cv.lastIndex=t,Cv.exec(e)[1]??""}function YA(e){if(e.length===0)return null;let t=1,n=1;for(let s=0;s<e.length;){const r=e.charCodeAt(s);switch(r){case 35:case 39:case 60:case 123:case 125:return null}if(r===10)t++,n=1,s++;else if(n++,r>=55296&&r<=56319&&s+1<e.length){const i=e.charCodeAt(s+1);s+=i>=56320&&i<=57343?2:1}else s++}return{offset:e.length,line:t,column:n}}var QA=class{constructor(e,t={}){this.message=e,this.position={offset:0,line:1,column:1},this.ignoreTag=!!t.ignoreTag,this.locale=t.locale,this.requiresOtherClause=!!t.requiresOtherClause,this.shouldParseSkeletons=!!t.shouldParseSkeletons}parse(){if(this.offset()!==0)throw Error("parser can only be used once");if(this.message.length>0){const e=this.message.charCodeAt(0);if(e!==35&&e!==39&&e!==60&&e!==123&&e!==125){const t=YA(this.message);if(t){const n=this.clonePosition();return this.position=t,{val:[{type:0,value:this.message,location:Ie(n,this.clonePosition())}],err:null}}}}return this.parseMessage(0,"",!1)}parseMessage(e,t,n){let s=[];for(;!this.isEOF();){const r=this.char();if(r===123){const i=this.parseArgument(e,n);if(i.err)return i;s.push(i.val)}else{if(r===125&&e>0)break;if(r===35&&(t==="plural"||t==="selectordinal")){const i=this.clonePosition();this.bump(),s.push({type:7,location:Ie(i,this.clonePosition())})}else if(r===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,Ie(this.clonePosition(),this.clonePosition()))}else if(r===60&&!this.ignoreTag&&Lg(this.peek()||0)){const i=this.parseTag(e,t);if(i.err)return i;s.push(i.val)}else{const i=this.parseLiteral(e,t);if(i.err)return i;s.push(i.val)}}}return{val:s,err:null}}parseTag(e,t){const n=this.clonePosition();this.bump();const s=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:0,value:`<${s}/>`,location:Ie(n,this.clonePosition())},err:null};if(this.bumpIf(">")){const r=this.parseMessage(e+1,t,!0);if(r.err)return r;const i=r.val,o=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!Lg(this.char()))return this.error(23,Ie(o,this.clonePosition()));const l=this.clonePosition();return s!==this.parseTagName()?this.error(26,Ie(l,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:8,value:s,children:i,location:Ie(n,this.clonePosition())},err:null}:this.error(23,Ie(o,this.clonePosition())))}else return this.error(27,Ie(n,this.clonePosition()))}else return this.error(23,Ie(n,this.clonePosition()))}parseTagName(){const e=this.offset();for(this.bump();!this.isEOF()&&eM(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){const n=this.clonePosition();let s="";for(;;){const i=this.tryParseQuote(t);if(i){s+=i;continue}const o=this.tryParseUnquoted(e,t);if(o){s+=o;continue}const l=this.tryParseLeftAngleBracket();if(l){s+=l;continue}break}const r=Ie(n,this.clonePosition());return{val:{type:0,value:s,location:r},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!JA(this.peek()||0))?(this.bump(),"<"):null}tryParseQuote(e){if(this.isEOF()||this.char()!==39)return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if(e==="plural"||e==="selectordinal")break;return null;default:return null}this.bump();const t=[this.char()];for(this.bump();!this.isEOF();){const n=this.char();if(n===39)if(this.peek()===39)t.push(39),this.bump();else{this.bump();break}else t.push(n);this.bump()}return String.fromCodePoint(...t)}tryParseUnquoted(e,t){if(this.isEOF())return null;const n=this.char();return n===60||n===123||n===35&&(t==="plural"||t==="selectordinal")||n===125&&e>0?null:(this.bump(),String.fromCodePoint(n))}parseArgument(e,t){const n=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(1,Ie(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,Ie(n,this.clonePosition()));let s=this.parseIdentifierIfPossible().value;if(!s)return this.error(3,Ie(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,Ie(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:s,location:Ie(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,Ie(n,this.clonePosition())):this.parseArgumentOptions(e,t,s,n);default:return this.error(3,Ie(n,this.clonePosition()))}}parseIdentifierIfPossible(){const e=this.clonePosition(),t=this.offset(),n=ZA(this.message,t),s=t+n.length;return this.bumpTo(s),{value:n,location:Ie(e,this.clonePosition())}}parseArgumentOptions(e,t,n,s){let r=this.clonePosition(),i=this.parseIdentifierIfPossible().value,o=this.clonePosition();switch(i){case"":return this.error(4,Ie(r,o));case"number":case"date":case"time":{this.bumpSpace();let l=null;if(this.bumpIf(",")){this.bumpSpace();const d=this.clonePosition(),h=this.parseSimpleArgStyleIfPossible();if(h.err)return h;const f=XA(h.val);if(f.length===0)return this.error(6,Ie(this.clonePosition(),this.clonePosition()));l={style:f,styleLocation:Ie(d,this.clonePosition())}}const c=this.tryParseArgumentClose(s);if(c.err)return c;const u=Ie(s,this.clonePosition());if(l&&l.style.startsWith("::")){let d=KA(l.style.slice(2));if(i==="number"){const h=this.parseNumberSkeletonFromString(d,l.styleLocation);return h.err?h:{val:{type:2,value:n,location:u,style:h.val},err:null}}else{if(d.length===0)return this.error(10,u);let h=d;this.locale&&(h=HA(d,this.locale));const f={type:1,pattern:h,location:l.styleLocation,parsedOptions:this.shouldParseSkeletons?MA(h):{}};return{val:{type:i==="date"?3:4,value:n,location:u,style:f},err:null}}}return{val:{type:i==="number"?2:i==="date"?3:4,value:n,location:u,style:(l==null?void 0:l.style)??null},err:null}}case"plural":case"selectordinal":case"select":{const l=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(12,Ie(l,{...l}));this.bumpSpace();let c=this.parseIdentifierIfPossible(),u=0;if(i!=="select"&&c.value==="offset"){if(!this.bumpIf(":"))return this.error(13,Ie(this.clonePosition(),this.clonePosition()));this.bumpSpace();const p=this.tryParseDecimalInteger(13,14);if(p.err)return p;this.bumpSpace(),c=this.parseIdentifierIfPossible(),u=p.val}const d=this.tryParsePluralOrSelectOptions(e,i,t,c);if(d.err)return d;const h=this.tryParseArgumentClose(s);if(h.err)return h;const f=Ie(s,this.clonePosition());return i==="select"?{val:{type:5,value:n,options:Sv(d.val),location:f},err:null}:{val:{type:6,value:n,options:Sv(d.val),offset:u,pluralType:i==="plural"?"cardinal":"ordinal",location:f},err:null}}default:return this.error(5,Ie(r,o))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,Ie(e,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let e=0;const t=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let n=this.clonePosition();if(!this.bumpUntil("'"))return this.error(11,Ie(n,this.clonePosition()));this.bump();break}case 123:e+=1,this.bump();break;case 125:if(e>0)e-=1;else return{val:this.message.slice(t.offset,this.offset()),err:null};break;default:this.bump()}return{val:this.message.slice(t.offset,this.offset()),err:null}}parseNumberSkeletonFromString(e,t){let n=[];try{n=RA(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?OA(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,s){let r=!1;const i=[],o=new Set;let{value:l,location:c}=s;for(;;){if(l.length===0){const f=this.clonePosition();if(t!=="select"&&this.bumpIf("=")){const p=this.tryParseDecimalInteger(16,19);if(p.err)return p;c=Ie(f,this.clonePosition()),l=this.message.slice(f.offset,this.offset())}else break}if(o.has(l))return this.error(t==="select"?21:20,c);l==="other"&&(r=!0),this.bumpSpace();const u=this.clonePosition();if(!this.bumpIf("{"))return this.error(t==="select"?17:18,Ie(this.clonePosition(),this.clonePosition()));const d=this.parseMessage(e+1,t,n);if(d.err)return d;const h=this.tryParseArgumentClose(u);if(h.err)return h;i.push([l,{value:d.val,location:Ie(u,this.clonePosition())}]),o.add(l),this.bumpSpace(),{value:l,location:c}=this.parseIdentifierIfPossible()}return i.length===0?this.error(t==="select"?15:16,Ie(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!r?this.error(22,Ie(this.clonePosition(),this.clonePosition())):{val:i,err:null}}tryParseDecimalInteger(e,t){let n=1;const s=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);let r=!1,i=0;for(;!this.isEOF();){const l=this.char();if(l>=48&&l<=57)r=!0,i=i*10+(l-48),this.bump();else break}const o=Ie(s,this.clonePosition());return r?(i*=n,Number.isSafeInteger(i)?{val:i,err:null}:this.error(t,o)):this.error(e,o)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){const e=this.position.offset;if(e>=this.message.length)throw Error("out of bound");const t=this.message.codePointAt(e);if(t===void 0)throw Error(`Offset ${e} is at invalid UTF-16 code unit boundary`);return t}error(e,t){return{val:null,err:{kind:e,message:this.message,location:t}}}bump(){if(this.isEOF())return;const e=this.char();e===10?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=e<65536?1:2)}bumpIf(e){if(this.message.startsWith(e,this.offset())){for(let t=0;t<e.length;t++)this.bump();return!0}return!1}bumpUntil(e){const t=this.offset(),n=this.message.indexOf(e,t);return n>=0?(this.bumpTo(n),!0):(this.bumpTo(this.message.length),!1)}bumpTo(e){if(this.offset()>e)throw Error(`targetOffset ${e} must be greater than or equal to the current offset ${this.offset()}`);for(e=Math.min(e,this.message.length);;){const t=this.offset();if(t===e)break;if(t>e)throw Error(`targetOffset ${e} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(;!this.isEOF()&&tM(this.char());)this.bump()}peek(){if(this.isEOF())return null;const e=this.char(),t=this.offset();return this.message.charCodeAt(t+(e>=65536?2:1))??null}};function Lg(e){return e>=97&&e<=122||e>=65&&e<=90}function JA(e){return Lg(e)||e===47}function eM(e){return e===45||e===46||e>=48&&e<=57||e===95||e>=97&&e<=122||e>=65&&e<=90||e==183||e>=192&&e<=214||e>=216&&e<=246||e>=248&&e<=893||e>=895&&e<=8191||e>=8204&&e<=8205||e>=8255&&e<=8256||e>=8304&&e<=8591||e>=11264&&e<=12271||e>=12289&&e<=55295||e>=63744&&e<=64975||e>=65008&&e<=65533||e>=65536&&e<=983039}function tM(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function Og(e){e.forEach(t=>{if(delete t.location,o6(t)||a6(t))for(const n in t.options)delete t.options[n].location,Og(t.options[n].value);else s6(t)&&c6(t.style)||(r6(t)||i6(t))&&_g(t.style)?delete t.style.location:l6(t)&&Og(t.children)})}function nM(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};const n=new QA(e,t).parse();if(n.err){const s=SyntaxError(DA[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return t!=null&&t.captureLocation||Og(n.val),n.val}var Qx=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},$v=class extends Qx{constructor(e,t,n,s){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join('", "')}"`,"INVALID_VALUE",s)}},sM=class extends Qx{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,"INVALID_VALUE",n)}},rM=class extends Qx{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,"MISSING_VALUE",t)}};function iM(e){return e.length<2?e:e.reduce((t,n)=>{const s=t[t.length-1];return!s||s.type!==0||n.type!==0?t.push(n):s.value+=n.value,t},[])}function oM(e){return typeof e=="function"}function Jf(e,t,n,s,r,i,o){if(e.length===1&&jv(e[0]))return[{type:0,value:e[0].value}];const l=[];for(const c of e){if(jv(c)){l.push({type:0,value:c.value});continue}if(qA(c)){typeof i=="number"&&l.push({type:0,value:n.getNumberFormat(t).format(i)});continue}const{value:u}=c;if(!(r&&u in r))throw new rM(u,o);let d=r[u];if(BA(c)){(!d||typeof d=="string"||typeof d=="number"||typeof d=="bigint")&&(d=typeof d=="string"||typeof d=="number"||typeof d=="bigint"?String(d):""),l.push({type:typeof d=="string"?0:1,value:d});continue}if(r6(c)){const h=typeof c.style=="string"?s.date[c.style]:_g(c.style)?c.style.parsedOptions:void 0;l.push({type:0,value:n.getDateTimeFormat(t,h).format(d)});continue}if(i6(c)){const h=typeof c.style=="string"?s.time[c.style]:_g(c.style)?c.style.parsedOptions:s.time.medium;l.push({type:0,value:n.getDateTimeFormat(t,h).format(d)});continue}if(s6(c)){const h=typeof c.style=="string"?s.number[c.style]:c6(c.style)?c.style.parsedOptions:void 0;if(h&&h.scale){const f=h.scale||1;if(typeof d=="bigint"){if(!Number.isInteger(f))throw new TypeError(`Cannot apply fractional scale ${f} to bigint value. Scale must be an integer when formatting bigint.`);d=d*BigInt(f)}else d=d*f}l.push({type:0,value:n.getNumberFormat(t,h).format(d)});continue}if(l6(c)){const{children:h,value:f}=c,p=r[f];if(!oM(p))throw new sM(f,"function",o);let g=p(Jf(h,t,n,s,r,i).map(b=>b.value));Array.isArray(g)||(g=[g]),l.push(...g.map(b=>({type:typeof b=="string"?0:1,value:b})))}if(o6(c)){const h=d,f=(Object.prototype.hasOwnProperty.call(c.options,h)?c.options[h]:void 0)||c.options.other;if(!f)throw new $v(c.value,d,Object.keys(c.options),o);l.push(...Jf(f.value,t,n,s,r));continue}if(a6(c)){const h=`=${d}`;let f=Object.prototype.hasOwnProperty.call(c.options,h)?c.options[h]:void 0;if(!f){if(!Intl.PluralRules)throw new Qx(`Intl.PluralRules is not available in this environment.
|
|
75
|
-
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
76
|
-
`,"MISSING_INTL_API",o);const g=typeof d=="bigint"?Number(d):d,b=n.getPluralRules(t,{type:c.pluralType}).select(g-(c.offset||0));f=(Object.prototype.hasOwnProperty.call(c.options,b)?c.options[b]:void 0)||c.options.other}if(!f)throw new $v(c.value,d,Object.keys(c.options),o);const p=typeof d=="bigint"?Number(d):d;l.push(...Jf(f.value,t,n,s,r,p-(c.offset||0)));continue}}return iM(l)}function aM(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,s)=>(n[s]={...e[s],...t[s]},n),{})}:e}function lM(e,t){return t?Object.keys(e).reduce((n,s)=>(n[s]=aM(e[s],t[s]),n),{...e}):e}function np(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function cM(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:ep((...t)=>new Intl.NumberFormat(...t),{cache:np(e.number),strategy:tp.variadic}),getDateTimeFormat:ep((...t)=>new Intl.DateTimeFormat(...t),{cache:np(e.dateTime),strategy:tp.variadic}),getPluralRules:ep((...t)=>new Intl.PluralRules(...t),{cache:np(e.pluralRules),strategy:tp.variadic})}}var nn,uM=(nn=class{constructor(t,n=nn.defaultLocale,s,r){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=i=>{const o=this.formatToParts(i);if(o.length===1)return o[0].value;const l=o.reduce((c,u)=>(!c.length||u.type!==0||typeof c[c.length-1]!="string"?c.push(u.value):c[c.length-1]+=u.value,c),[]);return l.length<=1?l[0]||"":l},this.formatToParts=i=>Jf(this.ast,this.locales,this.formatters,this.formats,i,void 0,this.message),this.resolvedOptions=()=>{var i;return{locale:((i=this.resolvedLocale)==null?void 0:i.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=nn.resolveLocale(n),typeof t=="string"){if(this.message=t,!nn.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...i}=r||{};this.ast=nn.__parse(t,{...i,locale:this.resolvedLocale})}else this.ast=t;if(!Array.isArray(this.ast))throw new TypeError("A message must be provided as a String or AST.");this.formats=lM(nn.formats,s),this.formatters=r&&r.formatters||cM(this.formatterCache)}static get defaultLocale(){return nn.memoizedDefaultLocale||(nn.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),nn.memoizedDefaultLocale}},nn.memoizedDefaultLocale=null,nn.resolveLocale=t=>{if(typeof Intl.Locale>"u")return;const n=Intl.NumberFormat.supportedLocalesOf(t);return n.length>0?new Intl.Locale(n[0]):new Intl.Locale(typeof t=="string"?t:t[0])},nn.__parse=nM,nn.formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}},nn),dM=uM;const fM={"@astryx.pagination.label":{defaultMessage:"Pagination",description:"Aria label for the pagination navigation region."},"@astryx.pagination.previous":{defaultMessage:"Go to previous page",description:"Aria label for the previous-page button."},"@astryx.pagination.next":{defaultMessage:"Go to next page",description:"Aria label for the next-page button."},"@astryx.pagination.previousBy":{defaultMessage:"Go back {step, number} {step, plural, one {page} other {pages}}",description:"Aria label for the previous button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.nextBy":{defaultMessage:"Go forward {step, number} {step, plural, one {page} other {pages}}",description:"Aria label for the next button when it advances more than one page per click (the `step` prop > 1). `step` is the number of pages skipped."},"@astryx.pagination.first":{defaultMessage:"Go to first page",description:"Aria label for the first-page button (« double chevron) in the input pagination variant."},"@astryx.pagination.last":{defaultMessage:"Go to last page",description:"Aria label for the last-page button (» double chevron) in the input pagination variant."},"@astryx.pagination.goToPage":{defaultMessage:"Go to page {page, number}",description:"Aria label for an individual page-number button. `page` is 1-based."},"@astryx.pagination.goToPageInput":{defaultMessage:"Go to page",description:"Aria label for the editable page/row number box in the input pagination variant. No number — the box holds the value itself."},"@astryx.pagination.pageLabel":{defaultMessage:"Page",description:'Visible label before the editable box in the input pagination variant. Example: "Page [ 1 ] / 10".'},"@astryx.pagination.ofTotalPages":{defaultMessage:"/ {total, number}",description:'Visible total shown after the editable box in the input pagination variant. Example: the "/ 10" in "Page [ 1 ] / 10".'},"@astryx.pagination.pageIndicators":{defaultMessage:"Page indicators",description:"Aria label for the dots-variant page-indicator group."},"@astryx.pagination.itemsPerPage":{defaultMessage:"Items per page",description:"Label for the page-size selector."},"@astryx.pagination.count":{defaultMessage:"{from, number}–{to, number} of {total, number}",description:`Visible range-of-total text on a pagination bar. Example: "1–20 of 347"; the en-dash is translator's choice.`},"@astryx.pagination.pageOfTotal":{defaultMessage:"Page {current, number} of {total, number}",description:'Visible "Page X of Y" text on the compact pagination variant; also announced by screen readers. Keep short — sits in a compact toolbar.'},"@astryx.pagination.pageAnnounce":{defaultMessage:"Page {current, number}",description:"Screen-reader announcement when a page changes and total is unknown."},"@astryx.powersearch.editor.field":{defaultMessage:"Field",description:"Noun form-label above the field-picker dropdown in the PowerSearch filter-builder popover (which data column to filter on). Not an action."},"@astryx.powersearch.editor.operator":{defaultMessage:"Operator",description:'Noun form-label above the operator dropdown in the PowerSearch filter-builder popover. Refers to a comparison verb ("is", "contains"), not a math or phone operator.'},"@astryx.powersearch.editor.addFilter":{defaultMessage:"+ Add filter",description:'Button label inside a group in the PowerSearch filter-builder; adds another filter row (e.g. "Status = Active"). The leading "+ " is a plus-sign character.'},"@astryx.powersearch.editor.removeFilter":{defaultMessage:"Remove filter",description:'Screen-reader-only label on the "×" icon button next to a filter row in the PowerSearch editor; removes that row. Imperative verb.'},"@astryx.powersearch.editor.groupOperator":{defaultMessage:"Group operator",description:'Screen-reader-only label for the AND/OR toggle that combines sibling filters inside a filter group. Sighted users see just "AND" or "OR".'},"@astryx.powersearch.editor.group":{defaultMessage:"Group",description:'Fallback noun label shown on a nested filter-group chip when no AND/OR combining operator has been chosen. Use the noun ("a cluster"), not the verb "to group".'},"@astryx.powersearch.editor.delete":{defaultMessage:"Delete",description:"Button label inside the PowerSearch filter-editor popover; deletes the currently-edited filter row. Imperative verb form."},"@astryx.powersearch.editor.cancel":{defaultMessage:"Cancel",description:"Button label inside the PowerSearch filter-editor popover; closes the popover and discards pending edits. Imperative verb form."},"@astryx.powersearch.editor.apply":{defaultMessage:"Apply",description:'Primary button label inside the PowerSearch filter-editor popover; confirms the edited filter. Imperative verb; consumers may override to "Save".'},"@astryx.powersearch.valueEditor.value":{defaultMessage:"Value",description:'Noun form-label above a single free-text/number input in the PowerSearch value editor (e.g. the "acme" in `Name contains acme`). Not a verb or "worth".'},"@astryx.powersearch.valueEditor.values":{defaultMessage:"Values",description:"Plural noun form-label above a multi-value chip input in the PowerSearch value editor. Should match its singular counterpart `Value` in your language."},"@astryx.powersearch.valueEditor.time":{defaultMessage:"Time",description:"Noun form-label above a time-of-day (HH:MM) picker in the PowerSearch value editor. Clock time, not duration or era."},"@astryx.powersearch.valueEditor.date":{defaultMessage:"Date",description:"Noun form-label above a calendar-date picker in the PowerSearch value editor. Calendar date, not romantic date or fruit."},"@astryx.powersearch.valueEditor.relativeDate":{defaultMessage:"Relative date",description:'Label for the relative-date selector (e.g. "Last 7 days") in the PowerSearch value editor.'},"@astryx.powersearch.valueEditor.startDate":{defaultMessage:"Start date",description:"Noun form-label above the start-of-range date picker in the PowerSearch value editor. Pairs with `End date` — keep the two parallel in your language."},"@astryx.powersearch.valueEditor.endDate":{defaultMessage:"End date",description:"Noun form-label above the end-of-range date picker in the PowerSearch value editor. Pairs with `Start date` — keep the two parallel."},"@astryx.powersearch.valueEditor.entities":{defaultMessage:"Entities",description:'"Entities" is jargon — plural noun form-label above an entity picker (people, teams, projects). Prefer a natural collective like "items" if your language has no equivalent.'},"@astryx.powersearch.valueEditor.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input in the PowerSearch entity/typeahead picker. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterValuePlaceholder":{defaultMessage:"Enter value…",description:"Placeholder inside a free-text single-value input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.addValuesPlaceholder":{defaultMessage:"Add values…",description:"Placeholder inside a multi-value chip input where the user types items and presses Enter to add each as a chip. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.enterNumberPlaceholder":{defaultMessage:"Enter number…",description:"Placeholder inside a numeric input in the PowerSearch value editor. Imperative verb; trailing `…` is one character."},"@astryx.powersearch.valueEditor.selectValuesPlaceholder":{defaultMessage:"Select values…",description:"Placeholder on a dropdown for choosing values from a fixed enum list in the PowerSearch value editor. Imperative verb (user selects, not types)."},"@astryx.powersearch.operator.contains":{defaultMessage:"contains",description:"PowerSearch string operator, rendered inline as `<field> contains <value>` (e.g. `Name contains acme`). Lowercase verb form."},"@astryx.powersearch.operator.notContains":{defaultMessage:"does not contain",description:"PowerSearch negated string operator. Example: `Name does not contain test`. Lowercase; pairs with `contains`."},"@astryx.powersearch.operator.startsWith":{defaultMessage:"starts with",description:"PowerSearch string prefix operator. Example: `Email starts with admin@`. Lowercase."},"@astryx.powersearch.operator.notStartsWith":{defaultMessage:"does not start with",description:"PowerSearch negated prefix operator. Example: `Email does not start with test`. Lowercase; pairs with `starts with`."},"@astryx.powersearch.operator.endsWith":{defaultMessage:"ends with",description:"PowerSearch string suffix operator. Example: `Email ends with @meta.com`. Lowercase."},"@astryx.powersearch.operator.notEndsWith":{defaultMessage:"does not end with",description:"PowerSearch negated suffix operator. Example: `Email does not end with @gmail.com`. Lowercase; pairs with `ends with`."},"@astryx.powersearch.operator.is":{defaultMessage:"is",description:"PowerSearch equality operator for strings/enums. Example: `Status is Active`. Separate from `operator.equals` (numbers) — translations may diverge."},"@astryx.powersearch.operator.isNot":{defaultMessage:"is not",description:"PowerSearch inequality operator for strings/enums. Example: `Status is not Draft`. Pairs with `is`; separate from `operator.notEquals`."},"@astryx.powersearch.operator.equals":{defaultMessage:"is",description:'PowerSearch numeric equality operator. Example: `Age is 30`. Ships same English "is" as `operator.is` but is separate so numbers may diverge (e.g. "equals").'},"@astryx.powersearch.operator.notEquals":{defaultMessage:"is not",description:"PowerSearch numeric inequality operator. Example: `Count is not 0`. Same divergence option as `operator.equals`."},"@astryx.powersearch.operator.greaterThan":{defaultMessage:"is greater than",description:"PowerSearch numeric operator, strictly greater than. Example: `Age is greater than 18`. Lowercase."},"@astryx.powersearch.operator.lessThan":{defaultMessage:"is less than",description:"PowerSearch numeric operator, strictly less than. Example: `Priority is less than 5`. Lowercase."},"@astryx.powersearch.operator.greaterThanOrEqual":{defaultMessage:"is greater than or equal to",description:'PowerSearch numeric operator, ≥. Example: `Age is greater than or equal to 21`. A shorter form (e.g. "≥") is fine if idiomatic.'},"@astryx.powersearch.operator.lessThanOrEqual":{defaultMessage:"is less than or equal to",description:"PowerSearch numeric operator, ≤. Example: `Priority is less than or equal to 3`. A shorter form is fine if idiomatic."},"@astryx.powersearch.operator.before":{defaultMessage:"is before",description:"PowerSearch date operator, strictly earlier. Example: `Created is before 2024-01-01`. Temporal, not spatial."},"@astryx.powersearch.operator.after":{defaultMessage:"is after",description:"PowerSearch date operator, strictly later. Example: `Updated is after 2024-06-01`. Temporal."},"@astryx.powersearch.operator.between":{defaultMessage:"is between",description:"PowerSearch date operator, inclusive range. Example: `Created is between 2024-01-01 and 2024-06-30`. The `and <end>` portion is composed separately."},"@astryx.powersearch.operator.isTrue":{defaultMessage:"is true",description:"PowerSearch boolean operator: matches truthy. Example: `Is admin is true`. Pairs with `is false`; field may be affirmative or a yes/no question."},"@astryx.powersearch.operator.isFalse":{defaultMessage:"is false",description:"PowerSearch boolean operator: matches falsy. Example: `Is admin is false`. Pairs with `is true`."},"@astryx.powersearch.operator.isAnyOf":{defaultMessage:"is any of",description:"PowerSearch list operator: value is in the set. Example: `Status is any of [Active, Paused, Draft]`. The value list is composed separately; pairs with `is none of`."},"@astryx.powersearch.operator.isNoneOf":{defaultMessage:"is none of",description:"PowerSearch negated list operator: value not in the set. Example: `Status is none of [Archived, Deleted]`. Pairs with `is any of`."},"@astryx.powersearch.valueEditor.itemsCount":{defaultMessage:"{count, number} {count, plural, one {item} other {items}}",description:"Overflow summary on a compact filter chip when the list of selected items is too long. Example: `3 items` or `1 item`."},"@astryx.powersearch.valueEditor.entitiesCount":{defaultMessage:"{count, number} {count, plural, one {entity} other {entities}}",description:"Overflow summary on a compact filter chip when the list of selected entities is too long. Example: `5 entities` or `1 entity`. Pair with `itemsCount` translation."},"@astryx.powersearch.valueEditor.dateRange":{defaultMessage:"date range",description:"Fallback lowercase noun rendered inline in a filter chip when a date-range value can't be formatted (e.g. `Created is between date range`). Keep lowercase."},"@astryx.powersearch.valueEditor.filtersCount":{defaultMessage:"{count, number} {count, plural, one {filter} other {filters}}",description:"Summary inside a filter chip when the value is a nested set of filters. Example: `3 filters` or `1 filter`."},"@astryx.powersearch.resultCount":{defaultMessage:"{count, number} {count, plural, one {result} other {results}}",description:"Live result-count text next to the PowerSearch input, announced to screen readers on change. Example: `12 results`, `1 result`; keep compact."},"@astryx.alertDialog.cancel":{defaultMessage:"Cancel",description:"Button label on the secondary/dismiss button of an AlertDialog (modal confirmation). Imperative verb; consumers usually override with task-specific text."},"@astryx.appShell.mobileNavigation":{defaultMessage:"Mobile navigation",description:'Screen-reader-only accessible name for the mobile-only navigation region on small viewports. "Mobile" = phone/tablet (small screen), not "movable".'},"@astryx.appShell.skipToContent":{defaultMessage:"Skip to content",description:"Text of the skip link — the first focusable element on the page, visible only while keyboard-focused. Activating it jumps focus past the navigation to the main content area. Imperative verb; keep short."},"@astryx.avatar.nameWithStatus":{defaultMessage:"{name}, {status}",description:`Screen-reader accessible name for an Avatar showing a status indicator; composes the person's name with the status label, e.g. "Jane Doe, Online". {name} = the avatar's name/alt text, {status} = the status dot's label. Adjust separator and order per locale.`},"@astryx.avatarGroup.label":{defaultMessage:"Avatars",description:'Screen-reader-only fallback name for a horizontal cluster of user avatar images. Plural noun; consumers usually override with "Team members", "Attendees", etc.'},"@astryx.avatarGroup.keyboardHint":{defaultMessage:"Use arrow keys to move between avatars",description:"Screen-reader-only instruction attached (via aria-describedby) to a group of interactive avatars that share a single Tab stop. Tells keyboard users the Left/Right arrow keys move focus between the avatars. Only announced when the group has interactive (link/button) avatars."},"@astryx.avatarGroup.overflow":{defaultMessage:"{count, number} more",description:'Accessible name for the "+N" overflow indicator at the end of an AvatarGroup — announces how many additional avatars are not shown. Example: `5 more`. The visible "+N" text is unaffected; this is the aria-label only.'},"@astryx.banner.dismiss":{defaultMessage:"Dismiss",description:'"Dismiss" = close/hide this notification (not "reject a person"). Aria label AND tooltip on the small X button on a Banner.'},"@astryx.calendar.previousMonth":{defaultMessage:"Previous month",description:"Screen-reader-only label on the left-arrow button in a Calendar's month header (navigates one month back). Pairs with `calendar.nextMonth`."},"@astryx.calendar.nextMonth":{defaultMessage:"Next month",description:"Screen-reader-only label on the right-arrow button in a Calendar's month header (navigates one month forward). Pairs with `calendar.previousMonth`."},"@astryx.calendar.daySelected":{defaultMessage:"{date}, selected",description:'Accessible name for the Calendar day button that is the current single-mode selection. `{date}` is the localized full date, e.g. "Thursday, January 15, 2026". The trailing state word tells screen-reader users the focused day is selected.'},"@astryx.calendar.dayRangeStart":{defaultMessage:"{date}, range start",description:"Accessible name for the Calendar day button that begins the selected date range (or the first pick of an in-progress range). `{date}` is the localized full date."},"@astryx.calendar.dayRangeEnd":{defaultMessage:"{date}, range end",description:"Accessible name for the Calendar day button that ends the selected date range. `{date}` is the localized full date. Pairs with `calendar.dayRangeStart`."},"@astryx.calendar.dayRangeStartAndEnd":{defaultMessage:"{date}, range start and range end",description:"Accessible name for a Calendar day button that both begins and ends a completed one-day range. `{date}` is the localized full date."},"@astryx.calendar.dayInRange":{defaultMessage:"{date}, in range",description:"Accessible name for a Calendar day button strictly inside the selected date range (not an endpoint). `{date}` is the localized full date."},"@astryx.calendar.rangeStartAnnounce":{defaultMessage:"Start date {date}. Select an end date.",description:"Screen-reader announcement after the first pick of a Calendar range selection. `{date}` is the localized full date. Prompts the user that a second pick completes the range."},"@astryx.calendar.rangeCompleteAnnounce":{defaultMessage:"Selected range: {start} to {end}.",description:"Screen-reader announcement after the second pick completes a Calendar range selection. `{start}` and `{end}` are localized full dates in chronological order."},"@astryx.carousel.label":{defaultMessage:"Carousel",description:'Screen-reader-only fallback name for a horizontally-scrolling row of items. If "carousel" is unfamiliar in your locale, prefer the standard term (e.g. "slider").'},"@astryx.carousel.scrollLeft":{defaultMessage:"Scroll left",description:"Screen-reader-only label on the left arrow button in a Carousel. Pairs with `carousel.scrollRight`; in RTL locales, coordinate the two so left/right match layout."},"@astryx.carousel.scrollRight":{defaultMessage:"Scroll right",description:"Screen-reader-only label on the right arrow button in a Carousel. Pairs with `carousel.scrollLeft`; same RTL note."},"@astryx.carousel.slideLabel":{defaultMessage:"Slide {current, number} of {total, number}",description:"Screen-reader accessible name for one slide in a Carousel, giving its position. `current` is the 1-based slide number; `total` is the slide count."},"@astryx.chat.status.sending":{defaultMessage:"Sending",description:"Chat send-status caption under an outgoing message while it is being transmitted. Part of the set sending → sent → delivered → read (or failed) — keep tense/aspect consistent."},"@astryx.chat.status.sent":{defaultMessage:"Sent",description:"Chat send-status caption shown once the message reaches the server. Part of the set sending → **sent** → delivered → read (or failed) — keep tense consistent."},"@astryx.chat.status.delivered":{defaultMessage:"Delivered",description:"Chat send-status caption shown once the recipient's device received the message. Part of the set sending → sent → **delivered** → read (or failed)."},"@astryx.chat.status.read":{defaultMessage:"Read",description:'Chat send-status caption shown once the recipient opened the message. English past-participle ("has been read", /rɛd/), not the present verb — part of the set sending → sent → delivered → **read**.'},"@astryx.chat.status.failed":{defaultMessage:"Failed",description:"Chat send-status caption shown when the send attempt errored. Part of the set — the terminal failure branch, orthogonal to the sent → delivered → read success track."},"@astryx.chat.messageAriaLabel":{defaultMessage:"Message {status}",description:"Screen-reader-only accessible name for a chat message row. `{status}` interpolates the localized status word (e.g. `Message sent`, `Message delivered`) — reorder if needed."},"@astryx.chat.pastedText.expand":{defaultMessage:"Expand",description:'Button label on a chip in the chat composer representing a long pasted text block; clicking reveals full content. "Expand" here means reveal more, not grow physically.'},"@astryx.checkboxList.item.checkbox":{defaultMessage:"Checkbox",description:"Screen-reader-only last-ditch fallback name for a checkbox inside a list item when no label is provided. Should almost never render — consumers should supply a real label."},"@astryx.commandPalette.emptySearch":{defaultMessage:"No results",description:"Fallback empty-state text inside a CommandPalette when the user's query has no matches. Very short (2 words); neutral tone."},"@astryx.commandPalette.emptyBootstrap":{defaultMessage:"Type to search",description:"Onboarding empty-state text shown inside a CommandPalette on first open, before the user has typed anything. Imperative sentence fragment."},"@astryx.commandPalette.resultCount":{defaultMessage:"{count, number} {count, plural, one {result} other {results}}",description:"Screen-reader-only announcement of how many commands match the CommandPalette query as the user types. Example: `12 results`, `1 result`; keep compact."},"@astryx.commandPalette.noResultsFor":{defaultMessage:"No results for {query}",description:"Screen-reader-only announcement when a CommandPalette query matches nothing. `{query}` is the user's verbatim search text; keep it last if your language allows so truncation-by-AT still conveys the outcome."},"@astryx.commandPalette.loading":{defaultMessage:"Loading",description:"Screen-reader-only announcement that a CommandPalette search has started and results are being fetched. Present-progressive form; matches the visible spinner."},"@astryx.dateRangeInput.presetDateRanges":{defaultMessage:"Preset date ranges",description:'Screen-reader-only accessible name for the sidebar of quick-pick preset ranges inside a DateRangeInput popover (e.g. "Last 7 days", "This month").'},"@astryx.dateTimeInput.timePlaceholder":{defaultMessage:"Select a time",description:'Grey placeholder inside the empty time-of-day slot in a DateTimeInput. "Time" = clock time (HH:MM), not duration.'},"@astryx.dialog.close":{defaultMessage:"Close",description:'"Close" = shut/dismiss the dialog, not "nearby" (English homograph). Aria label AND tooltip on the X at the top-right of a Dialog.'},"@astryx.dropdownMenu.label":{defaultMessage:"Menu",description:'Screen-reader-only fallback name for a dropdown menu popover. Very generic; consumers usually override. Noun ("a menu"), not the imperative.'},"@astryx.lightbox.close":{defaultMessage:"Close",description:'"Close" = shut/dismiss (not "nearby"). Screen-reader-only label on the X button that dismisses a Lightbox.'},"@astryx.lightbox.previous":{defaultMessage:"Previous",description:"Screen-reader-only label on the left-arrow button in a Lightbox (navigates to previous media item). Pairs with `lightbox.next`."},"@astryx.lightbox.next":{defaultMessage:"Next",description:"Screen-reader-only label on the right-arrow button in a Lightbox (navigates to next media item). Pairs with `lightbox.previous`."},"@astryx.markdown.taskList":{defaultMessage:"Task list",description:"Screen-reader-only accessible name for a GitHub-flavored Markdown task list (rendered from `- [ ] item` / `- [x] done` syntax)."},"@astryx.markdown.table":{defaultMessage:"Table",description:'Screen-reader-only accessible name for a table rendered inside a Markdown block. Noun ("a table"), not the verb. Separate from `@astryx.table.label` — translations may diverge.'},"@astryx.mobileNav.closeNavigation":{defaultMessage:"Close navigation",description:"Screen-reader-only label on the X/close button that dismisses the MobileNav overlay. Pairs with `mobileNav.toggle.open`."},"@astryx.multiSelector.selectAll":{defaultMessage:"Select all",description:'Label on the checkbox/toggle at the top of a MultiSelector dropdown that selects every option. "All" is a determiner here (as in "all the options"), not the pronoun.'},"@astryx.multiSelector.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input at the top of a MultiSelector's dropdown panel. Imperative verb; trailing `…` is one character."},"@astryx.multiSelector.searchOptions":{defaultMessage:"Search options",description:"Screen-reader-only accessible name for that same search input inside a MultiSelector."},"@astryx.multiSelector.selectAllPartiallySelected":{defaultMessage:"{label}, partially selected",description:'Accessible name for the MultiSelector select-all option while only some options are selected. `{label}` is the visible select-all label (e.g. "Select all"). ARIA forbids aria-selected="mixed" on options, so the indeterminate state is conveyed through the name instead. "Partially" = some but not all.'},"@astryx.popover.close":{defaultMessage:"Close popover",description:'"Close" = shut/dismiss, not "nearby". Screen-reader-only label on the close button inside a Popover.'},"@astryx.selector.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside the search input at the top of a Selector's dropdown panel (for filtering options). Imperative verb; trailing `…` is one character."},"@astryx.selector.searchOptions":{defaultMessage:"Search options",description:'"Options" = the list of choices in the dropdown. Screen-reader-only accessible name for the search input inside a Selector.'},"@astryx.sideNav.label":{defaultMessage:"Side navigation",description:"Screen-reader-only accessible name for the primary vertical sidebar nav (usually on the left)."},"@astryx.sideNav.resizeSidebar":{defaultMessage:"Resize sidebar",description:"Screen-reader-only label on the vertical drag handle at the right edge of the SideNav that lets the user resize the sidebar's width."},"@astryx.sideNav.heading.openMenu":{defaultMessage:"Open menu",description:"Screen-reader-only label on the `⋯` overflow-menu button embedded in a SideNav section heading. Same string as `topNav.heading.openMenu` — translations may share."},"@astryx.tabList.label":{defaultMessage:"Tabs",description:'Screen-reader-only fallback name for a horizontal tab bar. Plural noun; "Tabs" here = UI tab panels, not browser tabs or the Tab key.'},"@astryx.table.label":{defaultMessage:"Table",description:'Fallback screen-reader-only accessible name for a data-table region when the consumer provides none. Noun ("a table"), not the verb "to table".'},"@astryx.table.noData":{defaultMessage:"No data",description:'Fallback empty-state text in the table body when there are zero rows. Neutral tone (not error-y); consumers commonly override with something specific like "No results".'},"@astryx.table.filter.allPlaceholder":{defaultMessage:"All",description:'Placeholder on a per-column filter dropdown when nothing is selected, meaning "no filter — all rows match". Determiner form (as in "all values"), not the pronoun.'},"@astryx.table.filter.reset":{defaultMessage:"Reset",description:"Button label inside a table's filter panel/popover; clears pending filter values back to defaults. Imperative verb."},"@astryx.table.filter.apply":{defaultMessage:"Apply",description:"Primary button label inside a table's filter panel/popover; commits pending filter values. Imperative verb; pairs with `Reset`."},"@astryx.table.selection.selectAllRows":{defaultMessage:"Select all rows",description:'Aria label for the "select all rows" checkbox in a Table header.'},"@astryx.table.selection.selectRow":{defaultMessage:"Select row",description:'Aria label for the "select row" checkbox on a Table row.'},"@astryx.table.selection.selectRowNamed":{defaultMessage:"Select {label}",description:"Aria label for a Table row's selection checkbox when a per-row label is available (via getRowLabel). `label` is the row's human-readable identity, e.g. \"Alice\"."},"@astryx.table.sort.ascending":{defaultMessage:"Sort ascending",description:"Screen-reader-only label on a column header button that will sort the column ascending. Part of a set with `sort.descending` and `sort.clear` — keep parallel."},"@astryx.table.sort.descending":{defaultMessage:"Sort descending",description:"Screen-reader-only label on a column header button that will sort the column descending. Part of a set with `sort.ascending` and `sort.clear`."},"@astryx.table.sort.clear":{defaultMessage:"Clear sort",description:'Screen-reader-only label on a column header button that will remove the current sort. "Clear" here means remove, not transparent. Part of the sort set.'},"@astryx.table.sort.direction.ascending":{defaultMessage:"ascending",description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.direction.descending":{defaultMessage:"descending",description:"Localized direction word interpolated as `direction` into @astryx.table.sort.sortedBy and @astryx.table.sort.sortedByWithPriority."},"@astryx.table.sort.sortBy":{defaultMessage:"Sort by {label}",description:"Aria label for a sortable Table header button when the column is unsorted. `label` is the column header text."},"@astryx.table.sort.sortedBy":{defaultMessage:"Sort by {label}, sorted {direction}",description:"Aria label for a sorted Table header button. `direction` is the localized direction word from @astryx.table.sort.direction.*."},"@astryx.table.sort.sortedByWithPriority":{defaultMessage:"Sort by {label}, sorted {direction}, priority {rank, number} of {total, number}",description:"Aria label for a sorted Table header button in multi-sort. `rank` is the 1-based position of this column in the sort order; `total` is the number of sorted columns."},"@astryx.toast.dismiss":{defaultMessage:"Dismiss notification",description:"Screen-reader-only label on the X button of a Toast (transient notification popup). Distinct from `banner.dismiss` (persistent banner)."},"@astryx.toast.viewport":{defaultMessage:"Notifications",description:"Screen-reader-only accessible name for the invisible landmark region hosting the stack of Toast popups (usually pinned to a screen corner)."},"@astryx.tokenizer.clearAll":{defaultMessage:"Clear all",description:'Label on the "×" button that removes every token/chip from a Tokenizer input. Imperative verb + determiner "all"; short.'},"@astryx.topNav.heading.openMenu":{defaultMessage:"Open menu",description:"Screen-reader-only label on the `⋯` overflow button in a TopNav section heading. Kept separate from `sideNav.heading.openMenu` so translations may diverge."},"@astryx.topNav.landmarkLabel":{defaultMessage:"Top navigation",description:"Default accessible name (aria-label) for the <nav> landmark rendered by TopNav when no label is provided."},"@astryx.treeList.toggleChildren":{defaultMessage:"Toggle children",description:'"Children" = child nodes in the tree, not human children. Screen-reader-only label on the chevron next to a TreeList item that has children — toggles the sub-list.'},"@astryx.typeahead.emptySearchResults":{defaultMessage:"No results found",description:"Fallback empty-state message inside a Typeahead's suggestion popover when the current query has no matches. Neutral tone (not error-y)."},"@astryx.typeahead.loading":{defaultMessage:"Loading",description:"Screen-reader-only name for a spinner shown inside a Typeahead dropdown while suggestions are being fetched. Present-progressive form."},"@astryx.typeahead.searchResults":{defaultMessage:"Search results",description:"Screen-reader-only accessible name for the list of suggestions inside a Typeahead dropdown."},"@astryx.typeahead.clearSelection":{defaultMessage:"Clear selection",description:'"Selection" = the chosen value (not highlighted text). Screen-reader-only label on the X that clears the currently-selected value from a Typeahead.'},"@astryx.breadcrumbs.label":{defaultMessage:"Breadcrumb",description:"Screen-reader-only fallback name for the breadcrumb trail (e.g. `Home > Section > Page`). Singular in English per ARIA convention; plural is fine if natural in your locale."},"@astryx.chat.composer.placeholder":{defaultMessage:"Type a message…",description:"Grey placeholder text inside the empty chat composer textarea. Imperative verb; trailing `…` is one character."},"@astryx.chat.composerDrawer.label":{defaultMessage:"Items",description:'Fallback aria label for the ChatComposerDrawer — a horizontal list of attachment/tool chips. Consumers usually override with "Attachments", "Tools", etc.'},"@astryx.chat.composerInput.label":{defaultMessage:"Message input",description:'Screen-reader-only accessible name for the chat composer textarea. Reorder freely if your language uses one word for "message field".'},"@astryx.chat.speechRecognition.noSpeechDetected":{defaultMessage:"No speech was detected.",description:"Full-sentence error shown inline in the chat composer after voice input captured silence. Soft-error tone (not alarming); keep terminal period."},"@astryx.commandPalette.label":{defaultMessage:"Command palette",description:'Screen-reader-only fallback name for a keyboard-driven command menu (usually opened with Cmd/Ctrl-K). If unfamiliar, prefer a natural equivalent like "quick actions".'},"@astryx.commandPalette.input.placeholder":{defaultMessage:"Search…",description:"Grey placeholder inside the CommandPalette's search input. Imperative verb; trailing `…` is one character."},"@astryx.commandPalette.list.label":{defaultMessage:"Commands",description:'"Command" = an app action a user can invoke (metaphor from CLI), not a Unix command. Screen-reader-only name for the matching-commands list.'},"@astryx.contextMenu.label":{defaultMessage:"Context menu",description:'Screen-reader-only fallback name for the right-click / long-press popup menu. "Context" = context-specific to the activated element, not linguistic context.'},"@astryx.dateInput.placeholder":{defaultMessage:"Select a date",description:'Grey placeholder inside an empty DateInput field. "Date" = calendar date, not romantic or fruit. Imperative verb.'},"@astryx.dateInput.dialogLabel":{defaultMessage:"Choose date",description:"Screen-reader-only accessible name for the popover dialog opened from a DateInput's calendar toggle. Imperative verb + noun."},"@astryx.dateInput.closeCalendar":{defaultMessage:"Close calendar",description:"Screen-reader-only label on the X inside the DateInput calendar popover (dismisses the popover). Distinct from `dateInput.toggleCalendarClose`, which labels the outer toggle."},"@astryx.dateInput.openCalendar":{defaultMessage:"Open calendar",description:"Aria label for the DateInput / DateRangeInput / DateTimeInput calendar toggle button when the popover is closed."},"@astryx.dateInput.toggleCalendarClose":{defaultMessage:"Close calendar",description:"Aria label for the DateInput / DateRangeInput / DateTimeInput calendar toggle button when the popover is open. Distinct from closeCalendar (which labels the X inside the popover) so translators can differentiate the toggle vs the close-X UI."},"@astryx.dateInput.clear":{defaultMessage:"Clear {label}",description:"Aria label for the clear-value button in DateInput / DateRangeInput / DateTimeInput. `{label}` is the field's own label so screen readers announce e.g. 'Clear Start date'."},"@astryx.dateTimeInput.timeSuffix":{defaultMessage:"{label} time",description:'Screen-reader-only accessible name for the time-of-day slot in a DateTimeInput. Example: `Start date time`; reorder freely (e.g. "time of {label}").'},"@astryx.dateRangeInput.placeholder":{defaultMessage:"Select date range",description:"Grey placeholder inside an empty DateRangeInput field. Represents picking a start–end date pair. Imperative verb."},"@astryx.dateRangeInput.dialogLabel":{defaultMessage:"Choose date range",description:"Screen-reader-only accessible name for the popover dialog opened from a DateRangeInput. Imperative verb + noun phrase."},"@astryx.dateTimeInput.placeholder":{defaultMessage:"Select a date",description:'Grey placeholder inside an empty DateTimeInput field. Note: the English says only "date" though the field is date+time — do not add "and time" unless natural.'},"@astryx.dateTimeInput.dialogLabel":{defaultMessage:"Choose date",description:`Screen-reader-only accessible name for the DateTimeInput picker dialog. Same English-only "date" phrasing as the placeholder — don't add "and time" unless natural.`},"@astryx.link.newTab":{defaultMessage:"(opens in new tab)",description:"Visually-hidden (screen-reader-only) suffix appended to a Link's accessible name when it opens in a new tab. Example: `Documentation (opens in new tab)`."},"@astryx.mobileNav.toggle.open":{defaultMessage:"Open navigation",description:"Screen-reader-only label on the hamburger button that opens the MobileNav overlay (rendered when the overlay is closed). Pairs with `mobileNav.closeNavigation`."},"@astryx.moreMenu.label":{defaultMessage:"More options",description:"Screen-reader-only name for the small `⋯` (three-dots) overflow button that opens a menu of additional actions. Very short — sits on a tiny icon button."},"@astryx.multiSelector.selectPlaceholder":{defaultMessage:"Select…",description:'Placeholder on an empty MultiSelector trigger button. Same English as `selector.placeholder` but a separate key — plural phrasing like "Choose items…" is fine.'},"@astryx.outline.label":{defaultMessage:"Table of contents",description:"Screen-reader-only fallback name for a page's outline / table-of-contents sidebar (list of in-page headings). Rendered as `aria-label` on a `<nav>` landmark."},"@astryx.powersearch.label":{defaultMessage:"Search",description:"Screen-reader-only accessible name for the PowerSearch input (a filter-builder). The visible placeholder is separate; noun form often reads better than the verb."},"@astryx.powersearch.placeholder":{defaultMessage:"Search…",description:"Grey placeholder text inside the empty PowerSearch input. Imperative verb; trailing `…` is one character."},"@astryx.resizable.collapsed":{defaultMessage:"Collapsed",description:"aria-valuetext for the Resizable drag handle (role=separator) while its panel is collapsed to zero size. Replaces the numeric value announcement, since the numeric value is clamped to the minimum while collapsed. Adjective describing the panel state, not a verb/command."},"@astryx.resizable.handle.label":{defaultMessage:"Resize handle",description:"Screen-reader-only accessible name for the small draggable divider between two Resizable panels (users drag it to change the split ratio)."},"@astryx.selector.placeholder":{defaultMessage:"Select…",description:"Placeholder text on an empty Selector trigger button (a dropdown). Imperative verb; trailing `…` is one character. Very short — appears on the button face."},"@astryx.sideNav.heading.dialogLabel":{defaultMessage:"Navigation menu",description:"Screen-reader-only accessible name for the dropdown dialog opened from a SideNavHeading's overflow menu."},"@astryx.table.pagination.label":{defaultMessage:"Table pagination",description:"Screen-reader-only accessible name for the pagination `<nav>` appended below a data table. Kept separate from `@astryx.pagination.label` so translations may diverge."},"@astryx.timeInput.placeholder":{defaultMessage:"Select a time",description:'"Time" = clock time (HH:MM), not duration or era. Grey placeholder inside an empty TimeInput field; imperative verb.'},"@astryx.topNav.heading.dialogLabel":{defaultMessage:"Navigation menu",description:"Screen-reader-only accessible name for the dropdown dialog opened from a TopNavHeading's overflow menu. Kept separate from the SideNav sibling."},"@astryx.typeahead.searchPlaceholder":{defaultMessage:"Search…",description:"Placeholder inside an empty Typeahead input (a search field that suggests results as the user types). Imperative verb; trailing `…` is one character."},"@astryx.banner.collapse":{defaultMessage:"Collapse",description:'"Collapse" = fold up, not crumble. Aria label AND tooltip on the Banner expand/collapse toggle when currently expanded. Pairs with `banner.expand`.'},"@astryx.banner.expand":{defaultMessage:"Expand",description:'"Expand" = reveal more, not grow physically. Aria label AND tooltip on the same toggle when currently collapsed. Pairs with `banner.collapse`.'},"@astryx.button.loading":{defaultMessage:"Loading",description:'Screen-reader-only live-region announcement while a Button is in its loading state (spinner shown, action in flight). Progressive sense ("work in progress"), not a noun. Kept separate from `typeahead.loading` — translations may diverge.'},"@astryx.chatComposerDrawer.expand":{defaultMessage:"Expand {label}",description:"Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is collapsed. `{label}` is the drawer's visible name — example: `Expand Attachments`. Pairs with `collapse`."},"@astryx.chatComposerDrawer.collapse":{defaultMessage:"Collapse {label}",description:"Screen-reader-only label on the ChatComposerDrawer toggle when the drawer is expanded. Example: `Collapse Attachments`. Pairs with `expand`."},"@astryx.chatDictationButton.startDictation":{defaultMessage:"Start dictation",description:"Accessible label for the microphone button when idle (not listening)."},"@astryx.chatDictationButton.stopDictation":{defaultMessage:"Stop dictation",description:"Accessible label for the microphone button when actively listening."},"@astryx.chatLayout.newMessages":{defaultMessage:"New messages",description:"Text on a floating pill at the bottom of a chat viewport when unseen messages arrive below the fold; clicking scrolls to bottom. Keep short — narrow pill."},"@astryx.chatLayoutScrollButton.scrollToBottom":{defaultMessage:"Scroll to bottom",description:"Visible tooltip AND screen-reader label for a small down-arrow button that scrolls the chat viewport to its latest message."},"@astryx.chatMessage.messageFrom":{defaultMessage:"Message from {sender}",description:"Screen-reader-only accessible name for a chat message when the sender name isn't visible. Example: `Message from Sarah`, `Message from Bot` — reorder freely."},"@astryx.chatSendButton.stop":{defaultMessage:"Stop",description:"Button label that replaces `Send` on the chat send button while an AI response is streaming; clicking aborts generation. Short — appears on a small button."},"@astryx.chatSendButton.send":{defaultMessage:"Send",description:"Primary button label on the chat submit button (paperplane icon). Imperative verb; pairs with `Stop`. Very short."},"@astryx.chatToolCalls.error":{defaultMessage:"Error: {message}",description:"Screen-reader text for a tool call that failed. {message} is the error detail."},"@astryx.chatToolCalls.groupLabel":{defaultMessage:"{count} tool calls",description:"Summary label shown in the group header when multiple tool calls are expanded. {count} is the number of calls."},"@astryx.chatTriggerMenu.suggestions":{defaultMessage:"Suggestions",description:"Screen-reader-only fallback label for the popover listbox opened by a trigger character (`@`, `/`) in the chat composer when the trigger provides no specific label."},"@astryx.citation.label":{defaultMessage:"Citation {number}: {title}",description:"Screen-reader-only accessible name for a Citation chip (a small numbered link to a source). Example: `Citation 1: OpenAI research paper`. Reorder freely."},"@astryx.codeBlock.copied":{defaultMessage:"Copied",description:'Screen-reader-only label on the CodeBlock copy button for ~2s after a successful copy. Past-participle ("has been copied"); pairs with `codeBlock.copyCode`.'},"@astryx.codeBlock.copyCode":{defaultMessage:"Copy code",description:'"Code" = source code. Aria label AND tooltip on the CodeBlock copy button in its default state. Pairs with `codeBlock.copied` (post-click state).'},"@astryx.codeBlock.code":{defaultMessage:"Code",description:`Screen-reader-only fallback name for a code-snippet scroll container when the code's language is unknown. "Code" = source code, not secret code or code of conduct.`},"@astryx.field.optional":{defaultMessage:"Optional",description:"Visible indicator shown next to a form field's label when the field is optional (isOptional). Mutually exclusive with the required indicator. Very short — appears inline after the label text."},"@astryx.field.required":{defaultMessage:"Required",description:"Visible indicator shown next to a form field's label when the field must be filled in (isRequired). Mutually exclusive with the optional indicator. Very short — appears inline after the label text."},"@astryx.fileInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that removes the selected file from a FileInput. Example: `Clear Attachment`, `Clear Résumé`."},"@astryx.fileInput.required":{defaultMessage:"Required",description:'Screen-reader-only description on the FileInput trigger indicating the field must be filled in. Mirrors the visible `Required` indicator next to the field label; conveyed via description because aria-required is not supported on role="button".'},"@astryx.fileInput.triggerWithFiles":{defaultMessage:"{label}, {fileNames}",description:"Accessible name for a FileInput trigger that has files attached, composing the field label with the selected filenames. Example: `Attachments, report.pdf, notes.txt`."},"@astryx.keyboardHint.toNavigate":{defaultMessage:"to navigate",description:"Trailing text in the keyboard-hint badge, shown after arrow-key icons — reads as `← → to navigate`. Lowercase sentence fragment completing the visual phrase; the badge is aria-hidden, so this is for sighted users only."},"@astryx.lightbox.mediaViewer":{defaultMessage:"Media viewer",description:"Screen-reader-only fallback name for the Lightbox dialog when the current media item has no alt text. Should rarely render — consumers should provide alt."},"@astryx.lightbox.zoom":{defaultMessage:"Zoom",description:'Screen-reader-only label on the Lightbox image acting as a zoom toggle button (aria-pressed reflects zoomed state). Verb ("to zoom"), very short.'},"@astryx.lightbox.zoomedIn":{defaultMessage:"Zoomed in, use arrow keys to pan",description:"Polite screen-reader announcement after zooming into a Lightbox image, including a hint that arrow keys pan while zoomed. Pairs with `lightbox.zoomedOut`."},"@astryx.lightbox.zoomedOut":{defaultMessage:"Zoomed out",description:"Polite screen-reader announcement after zooming back out of a Lightbox image. Pairs with `lightbox.zoomedIn`."},"@astryx.metadataList.showMore":{defaultMessage:"Show more",description:"Button label under a MetadataList that reveals items hidden beyond the configured maximum. Toggles with `metadataList.showLess` — keep the pair parallel in your language."},"@astryx.metadataList.showLess":{defaultMessage:"Show less",description:"Button label under a MetadataList that re-hides the extra items revealed by `metadataList.showMore`. Keep the pair parallel."},"@astryx.mobileNav.navigation":{defaultMessage:"Navigation",description:"Screen-reader-only fallback name for the MobileNav overlay dialog when no explicit label was passed."},"@astryx.multiSelector.clearAll":{defaultMessage:"Clear all {label}",description:"Screen-reader-only label on the X that clears every selected value from a MultiSelector. Example: `Clear all Countries`. `{label}` is typically already plural in English."},"@astryx.input.statusButton.error":{defaultMessage:"Error details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is error. Activating or focusing the button reveals the error message in a tooltip. Keep it short — it labels an icon-only button."},"@astryx.input.statusButton.warning":{defaultMessage:"Warning details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is warning. Activating or focusing the button reveals the warning message in a tooltip."},"@astryx.input.statusButton.success":{defaultMessage:"Success details",description:"Accessible name for the focusable status icon button inside an input when statusVariant is 'tooltip' and the status type is success. Activating or focusing the button reveals the success message in a tooltip."},"@astryx.numberInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a NumberInput. Example: `Clear Age`, `Clear Quantity`."},"@astryx.selector.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the selected value from a Selector. `{label}` is the selector's visible label — example: `Clear Country`."},"@astryx.sideNavCollapseButton.expandSidebar":{defaultMessage:"Expand sidebar",description:"Aria label AND tooltip on the SideNav collapse/expand toggle when the sidebar is currently collapsed (clicking expands it). Pairs with `collapseSidebar`."},"@astryx.sideNavCollapseButton.collapseSidebar":{defaultMessage:"Collapse sidebar",description:"Aria label AND tooltip on the same toggle when the sidebar is currently expanded (clicking collapses it). Pairs with `expandSidebar`."},"@astryx.sideNavItem.expand":{defaultMessage:"Expand {label}",description:"Screen-reader-only label on the chevron next to a SideNav item with children when the group is collapsed. Example: `Expand Settings`. Pairs with `sideNavItem.collapse`."},"@astryx.sideNavItem.collapse":{defaultMessage:"Collapse {label}",description:"Screen-reader-only label on the same chevron when the group is expanded. Example: `Collapse Settings`. Pairs with `sideNavItem.expand`."},"@astryx.tableFiltering.filterByColumn":{defaultMessage:"Filter {header}",description:"Triple-use string on per-column filter controls: visible label, placeholder, AND aria label. `{header}` is the column header — example: `Filter Name`. Keep short."},"@astryx.tableGroupedRows.expandGroup":{defaultMessage:"Expand group {groupKey}",description:"Screen-reader-only label on the chevron next to a grouped table's group header when collapsed. Example: `Expand group Q1 2024`. Pairs with `collapseGroup`."},"@astryx.tableGroupedRows.collapseGroup":{defaultMessage:"Collapse group {groupKey}",description:"Screen-reader-only label on the same chevron when the group is expanded. Example: `Collapse group Q1 2024`. Pairs with `expandGroup`."},"@astryx.tableRowExpansion.collapseRow":{defaultMessage:"Collapse row",description:"Screen-reader-only label on the row-expand chevron when the row is currently expanded. Part of the four-way expand/collapse set."},"@astryx.tableRowExpansion.expandRow":{defaultMessage:"Expand row",description:"Screen-reader-only label on the row-expand chevron when the row is currently collapsed. Part of a four-way set with `collapseRow`, `expandAllRows`, `collapseAllRows`."},"@astryx.tableRowExpansion.collapseAllRows":{defaultMessage:"Collapse all rows",description:"Screen-reader-only label on the same header button when every row is expanded. Part of the four-way set."},"@astryx.tableRowExpansion.expandAllRows":{defaultMessage:"Expand all rows",description:"Screen-reader-only label on the header expand-all/collapse-all button when at least one row is collapsed (clicking expands every expandable row). Part of the four-way set."},"@astryx.step.goToStep":{defaultMessage:"Go to step {stepNumber, number}: {label}",description:"Accessible name for a clickable step in the lab Stepper. {stepNumber} is the 1-based position, {label} is the step's visible label."},"@astryx.step.goToStepWithStatus":{defaultMessage:"Go to step {stepNumber, number}: {label}, {status}",description:"Accessible name for a clickable lab Stepper step that also carries a status. {status} is one of the translated `step.status.*` words (completed/warning/error). Keep the pattern parallel to `step.goToStep`."},"@astryx.step.status.completed":{defaultMessage:"completed",description:"Screen-reader-only status word rendered next to a lab Stepper step label when the step is done (either progress-completed or status=success). Lowercase adjective; it is read mid-sentence after the step label."},"@astryx.step.status.warning":{defaultMessage:"warning",description:"Screen-reader-only status word rendered next to a lab Stepper step label when status=warning. Lowercase noun/adjective; read mid-sentence after the step label."},"@astryx.step.status.error":{defaultMessage:"error",description:"Screen-reader-only status word rendered next to a lab Stepper step label when status=error. Lowercase noun; read mid-sentence after the step label."},"@astryx.tableTree.collapseRow":{defaultMessage:"Collapse row",description:"Aria label for the Table tree-data expander chevron when the row is currently expanded."},"@astryx.tableTree.expandRow":{defaultMessage:"Expand row",description:"Aria label for the Table tree-data expander chevron when the row is currently collapsed."},"@astryx.tableTree.collapseAllRows":{defaultMessage:"Collapse all rows",description:"Aria label for the Table tree-data header toggle when all rows are expanded and clicking it collapses them."},"@astryx.tableTree.expandAllRows":{defaultMessage:"Expand all rows",description:"Aria label for the Table tree-data header toggle when rows are collapsed and clicking it expands them."},"@astryx.textArea.charactersRemaining":{defaultMessage:"{count, number} {count, plural, one {character} other {characters}} remaining",description:"Screen-reader-only announcement of how many characters the user can still type before hitting a TextArea's maxLength. Announced politely as the count nears the limit. `{count}` is the number remaining — example: `12 characters remaining`."},"@astryx.textArea.charactersOverLimit":{defaultMessage:"{count, number} {count, plural, one {character} other {characters}} over the limit",description:"Screen-reader-only assertive announcement when the user has typed past a TextArea's maxLength. `{count}` is how many characters over — example: `3 characters over the limit`."},"@astryx.textInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a TextInput. Example: `Clear Email`, `Clear Name`."},"@astryx.thumbnail.remove":{defaultMessage:"Remove {accessibleName}",description:'Screen-reader-only label on the "×" on a Thumbnail (image preview chip). `{accessibleName}` is the thumbnail\'s name — example: `Remove profile.jpg`.'},"@astryx.thumbnail.open":{defaultMessage:"Open {accessibleName}",description:'"Open" = launch/reveal (not "unfold" or the adjective). Screen-reader-only name on a clickable Thumbnail — example: `Open Sunset photo`.'},"@astryx.thumbnail.fallbackName":{defaultMessage:"Thumbnail",description:"Generic screen-reader name for a Thumbnail (image preview) that has no `alt` or `label`. Last-resort fallback so the control is never nameless; prefer a real name via `alt` or `label`."},"@astryx.timeInput.clearLabel":{defaultMessage:"Clear {label}",description:"Screen-reader-only label on the X that clears the value from a TimeInput. Example: `Clear Start time`."},"@astryx.timestamp.copyValue":{defaultMessage:"Copy {value}",description:"Aria label on a Timestamp copyable-hover-card row's copy button, in its default state. `value` is the formatted instant that row shows (e.g. `Copy February 19, 2026 at 5:00:00 PM UTC`). Imperative verb. Pairs with `timestamp.copied` (post-click state)."},"@astryx.timestamp.copy":{defaultMessage:"Copy",description:"Short label shown in the tooltip on a Timestamp copyable-hover-card row's copy button (hover/focus), in its default state. Imperative verb. Pairs with `timestamp.copied` (post-click state). The full `copyValue` string remains the button's aria-label for assistive tech."},"@astryx.timestamp.copied":{defaultMessage:"Copied",description:'Aria label on a Timestamp copy button for ~1.5s after a successful copy, and the text announced to a polite live region. Past-participle ("has been copied"); pairs with `timestamp.copyValue`.'},"@astryx.timestamp.detailsLabel":{defaultMessage:"Timestamp details",description:"Accessible name for the Timestamp copyable hover card popup, which lists the instant in the configured time zones/formats with a copy button per row."},"@astryx.token.remove":{defaultMessage:"Remove {label}",description:'Screen-reader-only label on the "×" on an individual Token/chip. Example: `Remove John Smith`, `Remove Active`. Imperative verb.'}},hM=fM,Ev=new Map;function xM(e,t){const n=`${t}::${e}`;let s=Ev.get(n);return s===void 0&&(s=new dM(e,t),Ev.set(n,s)),s}function pM(e){let t;try{t=new Intl.Locale(e).baseName}catch{t=e}const n=t.split("-"),s=[];for(let r=n.length;r>0;r--)s.push(n.slice(0,r).join("-"));return s}function gM(e,t,n,s){var o,l;const r=pM(t);if(s!==void 0)for(const c of r){const u=(o=s[c])==null?void 0:o[e];if(u!==void 0)return u}for(const c of r){const u=(l=n[c])==null?void 0:l[e];if(u!==void 0)return u.defaultMessage}const i=hM[e];return i!==void 0?i.defaultMessage:null}function mM(e,t,n,s,r){const i=gM(e,n,s,r);return i===null?(xy(),e):t===void 0?i:xM(i,n).format(t)}function Se(){const e=x.use(Y4);return x.useCallback((t,n)=>mM(t,n,e.locale,e.messages,e.overrides),[e.locale,e.messages,e.overrides])}const ui={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x1txdalj",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"x1jxw6zd",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",kkrTdU:"x1ypdohk",k1ekBW:"xrafxwg",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},pressable:{k3aq6I:"x3oybdh xk4oym4",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kKwaWg:"x18o3ruo",k3aq6I:"x1c071of x1pdlv7q",$$css:!0},ariaDisabled:{kKwaWg:"x18o3ruo x8o3jvd xuqm82a",$$css:!0},iconOnly:{"--button-icon-only-aspect":"x1v15ycx",kOBAk4:"xioom0i",kg3NbH:"xnjsko4",k8WAf4:"xt970qd",$$css:!0},iconWrapper:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0},contentWrapper:{k1xSpc:"xjp7ctv",$$css:!0},link:{kybGjl:"x1hl2dhg",$$css:!0}},yM={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},kM={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},bM={sm:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kGuDYH:"x1j61zf2",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kGuDYH:"x1j61zf2",$$css:!0},lg:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",kGuDYH:"xwsyq91",$$css:!0}},vM={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}},wM={primary:{kWkggS:"x1ewilqj",kMwMTN:"x17wrial",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},secondary:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},ghost:{kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0},destructive:{kWkggS:"x1pjz0fi",kMwMTN:"x1m024r3",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x1p73he7","--button-focus-offset":"xkzo27j",kInvED:"x1wfwxd8 x13aywxo",$$css:!0}},Tv={hiddenContent:{kMwMTN:"x19co3pv",$$css:!0},hiddenContentDelayed:{kKVMdj:"x1ffowhz",k44tkh:"xjlvqhv",kWV6AL:"x10e4vud",kKxzle:"x17yabm6 x14q22ui",$$css:!0}},Zd={horizontal:{krdFHd:"x15mokao x8eehn2",kVL7Gh:"xbiv7yw x1xrp5p4",kfmiAY:"x1ga7v0g xbfdvlp",kT0f0o:"x16uus16 xajhecq",k2ei4v:"xgbv0en x1pjv70x",kVhnKS:"x1t7ytsu xyf0ibl",kGJrpR:"x1j92z86",$$css:!0},vertical:{krdFHd:"x15mokao x8eehn2",kfmiAY:"x1ga7v0g x2qxyot",kVL7Gh:"xbiv7yw x12tyzlf",kT0f0o:"x16uus16 xajhecq",kEafiO:"x11xkdxz x1g31smg",kPef9Z:"x13fuv20 x1d9v4yf",kLZC3w:"x1pc3f07",$$css:!0},onSolidHorizontal:{kGJrpR:"xrvmtm5",$$css:!0},onSolidVertical:{kLZC3w:"x11npmm7",$$css:!0}};function ne({label:e,variant:t="secondary",size:n,type:s="button",isDisabled:r=!1,isLoading:i=!1,isInterruptible:o=!1,clickAction:l,icon:c,isIconOnly:u=!1,width:d,elevation:h="none",children:f,endContent:p,tooltip:g,href:b,as:y,target:m,rel:k,xstyle:w,className:v,style:j,ref:C,...$}){const T=Se(),A=da(n,"md"),S=vA(),[_,M]=x.useTransition(),z=x.useRef(!1),O=i||_,I=_||o,E=(S==null?void 0:S.isDisabled)??!1,N=r||E||O&&!o,R=eo(y),L=b!=null&&!N,D=g!=null&&N,P=ls({placement:"above",isEnabled:g!=null}),F=ce=>{var J;if(N||z.current&&!o){ce.preventDefault();return}(J=$.onClick)==null||J.call($,ce),l&&!ce.defaultPrevented&&(z.current=!0,M(async()=>{try{await l(ce)}finally{z.current=!1}}))},X=D?ce=>{var J;ce.key==="Enter"||ce.key===" "?ce.preventDefault():(J=$.onKeyDown)==null||J.call($,ce)}:void 0,Q=t==="ghost"?{[Bh]:""}:null,ee=q(ui.base,kM[A],wM[t],u&&ui.iconOnly,N&&ui.disabled,D&&ui.ariaDisabled,L&&ui.link,!S&&ui.pressable,S&&(S.orientation==="horizontal"?Zd.horizontal:Zd.vertical),S&&(t==="primary"||t==="destructive")&&(S.orientation==="horizontal"?Zd.onSolidHorizontal:Zd.onSolidVertical),!S&&vM[h],d!=null&&yM.width(d),w),Y=K(W("button",{variant:t,size:A}),ee,v,j),V=a.jsxs(a.Fragment,{children:[O&&a.jsx("span",{...{0:{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x1ey2m1c xrvj5dj x1ku5rj1"},1:{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x1ey2m1c xrvj5dj x1ku5rj1 xqcmdr3 xb2rp9n xskzprw x17yabm6 x14q22ui"}}[!!I<<0],"aria-hidden":"true",children:a.jsx(un,{size:"sm",shade:"inherit"})}),a.jsxs("span",{...q(ui.contentWrapper,O&&(I?Tv.hiddenContentDelayed:Tv.hiddenContent)),"aria-hidden":O||void 0,children:[c&&a.jsx("span",{...q(ui.iconWrapper,bM[A]),children:c}),u?null:a.jsx("span",{className:"xb3r6kr xlyipyv xeuugli",children:f??e}),!u&&p&&a.jsx("span",{className:"x3nfvp2 x6s0dn4 x1heor9g",children:p})]}),a.jsx(si,{role:"status","aria-live":"polite",children:O?T("@astryx.button.loading"):""})]}),le=u&&e!==""||O&&!u||f!=null&&f!==e?{"aria-label":e}:null,me=g!=null?{"aria-describedby":[$["aria-describedby"],P.describedBy].filter(Boolean).join(" ")||void 0}:null,se=mt(C,g!=null?P.ref:void 0);let he;return L?he=a.jsx(R,{ref:se,href:b,target:m,rel:k,...Y,...$,...le,...me,...Q,"aria-busy":O||void 0,onClick:F,children:V}):he=a.jsx("button",{ref:se,type:s,disabled:D?void 0:N,...Y,...$,...le,...me,...Q,"aria-busy":O||void 0,"aria-disabled":D||void 0,onClick:F,...X?{onKeyDown:X}:null,children:V}),g?a.jsxs(a.Fragment,{children:[he,P.renderTooltip(g)]}):he}ne.displayName="Button";const xt={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",width:"1em",height:"1em","aria-hidden":!0},$a={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-hidden":!0},jM={close:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M6 6l12 12M6 18L18 6"})}),chevronDown:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M6 9l6 6 6-6"})}),chevronLeft:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M15 6l-6 6 6 6"})}),chevronRight:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M9 6l6 6-6 6"})}),chevronsLeft:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M18 6l-6 6 6 6M11 6l-6 6 6 6"})}),chevronsRight:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M6 6l6 6-6 6M13 6l6 6-6 6"})}),check:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M5 13l4 4L19 7"})}),success:a.jsx("svg",{...$a,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm4.06 6.56a.75.75 0 00-1.12-1l-3.94 4.4-1.94-1.94a.75.75 0 00-1.06 1.06l2.5 2.5a.75.75 0 001.09-.03l4.47-5z"})}),error:a.jsx("svg",{...$a,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm-2.47 5.47a.75.75 0 00-1.06 1.06L10.94 12l-2.47 2.47a.75.75 0 101.06 1.06L12 13.06l2.47 2.47a.75.75 0 101.06-1.06L13.06 12l2.47-2.47a.75.75 0 00-1.06-1.06L12 10.94l-2.47-2.47z"})}),warning:a.jsx("svg",{...$a,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.29 3.86L2.07 19.05A2 2 0 003.78 22h16.44a2 2 0 001.71-2.95L13.71 3.86a2 2 0 00-3.42 0zM12 9a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 9zm0 9a1 1 0 100-2 1 1 0 000 2z"})}),info:a.jsx("svg",{...$a,children:a.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 3a9 9 0 100 18 9 9 0 000-18zm0 4a1 1 0 100 2 1 1 0 000-2zm-.75 3.75a.75.75 0 011.5 0v5.5a.75.75 0 01-1.5 0v-5.5z"})}),calendar:a.jsxs("svg",{...xt,children:[a.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),a.jsx("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),clock:a.jsxs("svg",{...xt,children:[a.jsx("circle",{cx:"12",cy:"12",r:"9"}),a.jsx("path",{d:"M12 7v5l3 3"})]}),externalLink:a.jsxs("svg",{...xt,children:[a.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),a.jsx("path",{d:"M15 3h6v6"}),a.jsx("path",{d:"M10 14L21 3"})]}),menu:a.jsx("svg",{...xt,strokeWidth:2,children:a.jsx("path",{d:"M4 6h16M4 12h16M4 18h16"})}),moreHorizontal:a.jsxs("svg",{...$a,children:[a.jsx("circle",{cx:"5",cy:"12",r:"1.5"}),a.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),a.jsx("circle",{cx:"19",cy:"12",r:"1.5"})]}),search:a.jsxs("svg",{...xt,children:[a.jsx("circle",{cx:"11",cy:"11",r:"8"}),a.jsx("path",{d:"M21 21l-4.35-4.35"})]}),arrowUp:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M12 19V5m0 0l-7 7m7-7l7 7"})}),arrowDown:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M12 5v14m0 0l7-7m-7 7l-7-7"})}),arrowsUpDown:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M3 7.5L7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5"})}),funnel:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 01-.659 1.591l-5.432 5.432a2.25 2.25 0 00-.659 1.591v2.927a2.25 2.25 0 01-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 00-.659-1.591L3.659 7.409A2.25 2.25 0 013 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0112 3z"})}),eyeSlash:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M3.98 8.223A10.477 10.477 0 001.934 12c1.292 4.338 5.31 7.5 10.066 7.5.993 0 1.953-.138 2.863-.395M6.228 6.228A10.45 10.45 0 0112 4.5c4.756 0 8.773 3.162 10.065 7.498a10.523 10.523 0 01-4.293 5.774M6.228 6.228L3 3m3.228 3.228l3.65 3.65m7.894 7.894L21 21m-3.228-3.228l-3.65-3.65m0 0a3 3 0 10-4.243-4.243m4.242 4.242L9.88 9.88"})}),viewColumns:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M9 4.5v15m6-15v15m-10.875 0h15.75c.621 0 1.125-.504 1.125-1.125V5.625c0-.621-.504-1.125-1.125-1.125H4.125C3.504 4.5 3 5.004 3 5.625v12.75c0 .621.504 1.125 1.125 1.125z"})}),copy:a.jsxs("svg",{...xt,children:[a.jsx("path",{d:"M8 4v12a2 2 0 002 2h8a2 2 0 002-2V7.242a2 2 0 00-.602-1.43L16.083 2.57A2 2 0 0014.685 2H10a2 2 0 00-2 2z"}),a.jsx("path",{d:"M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2"})]}),checkDouble:a.jsxs("svg",{...xt,children:[a.jsx("path",{d:"M2 13l4 4L14 7"}),a.jsx("path",{d:"M9 13l4 4L21 7"})]}),wrench:a.jsx("svg",{...xt,children:a.jsx("path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"})}),stop:a.jsx("svg",{...$a,children:a.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),microphone:a.jsxs("svg",{...xt,children:[a.jsx("path",{d:"M12 2a3 3 0 00-3 3v6a3 3 0 006 0V5a3 3 0 00-3-3z"}),a.jsx("path",{d:"M19 10v1a7 7 0 01-14 0v-1"}),a.jsx("path",{d:"M12 18v4m-4 0h8"})]})};let SM={};function CM(e){var t;return e==null?null:typeof e=="string"?((t=E4(e))==null?void 0:t.icons)??null:e.icons??null}function d6(e,t){const n=CM(t);return(n==null?void 0:n[e])??SM[e]??jM[e]}const f6={root:{kmuXW:"x2lah0s",$$css:!0},span:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},h6={primary:{kMwMTN:"xtbr613",$$css:!0},secondary:{kMwMTN:"xv9yike",$$css:!0},tertiary:{kMwMTN:"xv9yike",$$css:!0},disabled:{kMwMTN:"xqa6c3m",$$css:!0},accent:{kMwMTN:"xqwr325",$$css:!0},success:{kMwMTN:"xtjic6",$$css:!0},error:{kMwMTN:"xjt36v0",$$css:!0},warning:{kMwMTN:"xs3pv69",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0},blue:{kMwMTN:"x1fns2mt",$$css:!0},red:{kMwMTN:"xeffzf7",$$css:!0},green:{kMwMTN:"xmxeech",$$css:!0},gray:{kMwMTN:"x1eyinzz",$$css:!0},cyan:{kMwMTN:"x157w0xa",$$css:!0},teal:{kMwMTN:"x1f3zxcb",$$css:!0},yellow:{kMwMTN:"x1g6zdft",$$css:!0},orange:{kMwMTN:"xxu74a4",$$css:!0},pink:{kMwMTN:"x1kxxfg5",$$css:!0},purple:{kMwMTN:"xzdw94u",$$css:!0}},$M={xsm:{kzqmXN:"x1jw3ynk",kZKoxP:"xvle69y",$$css:!0},sm:{kzqmXN:"xcdlrvm",kZKoxP:"x1l36t39",$$css:!0},md:{kzqmXN:"xwqq7k2",kZKoxP:"xmll18r",$$css:!0},lg:{kzqmXN:"xp8d6y2",kZKoxP:"xam5rvr",$$css:!0}},EM={xsm:{kzqmXN:"x1jw3ynk",kZKoxP:"xvle69y",kGuDYH:"xboafo0",$$css:!0},sm:{kzqmXN:"xcdlrvm",kZKoxP:"x1l36t39",kGuDYH:"x1jchvi3",$$css:!0},md:{kzqmXN:"xwqq7k2",kZKoxP:"xmll18r",kGuDYH:"x1603h9y",$$css:!0},lg:{kzqmXN:"xp8d6y2",kZKoxP:"xam5rvr",kGuDYH:"xngnso2",$$css:!0}};function TM(e){return e!=null&&e!==""?{role:"img","aria-label":e}:{"aria-hidden":"true"}}function Te({icon:e,color:t="inherit",size:n="md",label:s,ref:r,className:i,style:o,xstyle:l,...c}){const u=TM(s);if(typeof e=="string")return a.jsx(NM,{name:e,color:t,size:n,a11yProps:u,className:i,style:o,xstyle:l,spanProps:c});const d=e;return a.jsx(d,{ref:r,...u,...K(W("icon",{size:n,color:t}),q(f6.root,h6[t],$M[n],l),i??void 0,o),...c})}Te.displayName="Icon";function NM({name:e,color:t,size:n,a11yProps:s,className:r,style:i,xstyle:o,spanProps:l}){const c=O4(),u=d6(e,c);if(u==null)return null;const d=l??{};return a.jsx("span",{...s,...d,...K(W("icon",{size:n,color:t}),q(f6.span,h6[t],EM[n],o),r??void 0,i),children:u})}function yr(e,t){return typeof e=="string"?a.jsx(Te,{icon:e,...t}):typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e?a.jsx(Te,{icon:e,...t}):e}function Ll(e){const t=O4();return d6(e,t)}const AM={isMobile:!1,isMobileNavOpen:!1,toggleMobileNav:()=>{},openMobileNav:()=>{},closeMobileNav:()=>{},isMobileNavEnabled:!1,hasAutoToggle:!0},vy=x.createContext(AM);vy.displayName="AppShellMobileContext";function Jx(){return x.use(vy)}function x6({ref:e,children:t,label:n,"data-testid":s,xstyle:r,className:i,style:o}){const l=Se(),c=n??l("@astryx.mobileNav.toggle.open"),{isMobile:u,isMobileNavEnabled:d,isMobileNavOpen:h,mobileNavId:f,toggleMobileNav:p}=Jx();return!u||!d?null:a.jsx(ne,{ref:e,variant:"ghost",label:c,icon:t??a.jsx(Te,{icon:"menu",color:"inherit"}),onClick:p,"aria-expanded":h,"aria-controls":f||void 0,"data-testid":s??"mobile-nav-toggle",xstyle:r,className:i,style:o,isIconOnly:!0})}x6.displayName="MobileNavToggle";const Fa=x.createContext("default");Fa.displayName="SideNavRenderContext";function p6(){return x.use(Fa)}const Dg=x.createContext("default");Dg.displayName="TopNavRenderContext";const Bg=x.createContext(null);Bg.displayName="TopNavMobileContentContext";const MM=typeof Gx.Activity<"u",zM=MM?({mode:e,children:t})=>a.jsx(Gx.Activity,{mode:e,children:t}):({children:e})=>a.jsx(a.Fragment,{children:e}),RM={sm:640,md:768,lg:1024,none:0},sp="astryx-app-shell-main",Dt={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kVAEAm:"x1n2onr6",$$css:!0},variantWash:{kWkggS:"x1eiddq6",$$css:!0},variantSurface:{kWkggS:"x10xzikg",$$css:!0},variantSection:{kWkggS:"x10xzikg",$$css:!0},variantElevated:{kWkggS:"x1eiddq6",$$css:!0},rootFill:{kZKoxP:"xtdtrs8",$$css:!0},rootAuto:{kAzted:"x1ov3xa9",$$css:!0},mainFocusTarget:{kI3sdo:"x1uvtmcs",$$css:!0},contentBgSurface:{kWkggS:"x10xzikg",$$css:!0},contentBgWash:{kWkggS:"x1eiddq6",$$css:!0},contentBgTransparent:{kWkggS:"xjbqb8w",kHBbk8:"xc8icb0",$$css:!0},navAreaWash:{kWkggS:"x1eiddq6",$$css:!0},navAreaSurface:{kWkggS:"x10xzikg",$$css:!0},banner:{kmuXW:"x2lah0s",$$css:!0},headerSticky:{kVAEAm:"x7wzq59",k87sOh:"x13vifvy",kY2c9j:"x1vjfegm",$$css:!0},panelAutoFill:{kUk6DE:"x98rzlu",kVQacm:"xysyzu8",$$css:!0}};function g6({variant:e="elevated",banner:t,children:n,contentPadding:s,"data-testid":r,height:i="fill",mobileNav:o,sideNav:l,topNav:c,xstyle:u,className:d,style:h,ref:f,...p}){const g=Se(),b=o===!1,y=o!=null&&o!==!1&&typeof o=="object"&&!x.isValidElement(o)?o:null,m=(y==null?void 0:y.breakpoint)??"md",k=o!=null&&o!==!1&&(x.isValidElement(o)||typeof o=="string")?o:null,w=(y==null?void 0:y.content)??null,v=(y==null?void 0:y.hasToggle)!==!1,j=(y==null?void 0:y.isOpen)!==void 0,C=m==="none"?"(max-width: 0px)":`(max-width: ${RM[m]}px)`,$=ua(C,y==null?void 0:y.defaultIsMobile),[T,A]=x.useState(!1),S=(y==null?void 0:y.isOpen)??T,_=x.useCallback(kt=>{var kn;j||A(kt),(kn=y==null?void 0:y.onOpenChange)==null||kn.call(y,kt)},[j,y]),M=x.useCallback(()=>{var kt;(kt=document.getElementById(sp))==null||kt.focus()},[]),z=i==="fill",O=i==="auto",I=Z1(t),E=Z1(c),N=Z1(l),L=!b&&(E||N)&&k==null,D=e==="section",P=e==="elevated",F=e==="wash"||e==="elevated"?Dt.navAreaWash:e==="surface"?Dt.navAreaSurface:void 0,X=e==="wash"?Dt.contentBgWash:e==="elevated"&&E&&N&&!$?Dt.contentBgTransparent:e==="surface"||e==="elevated"?Dt.contentBgSurface:void 0,G=F??Dt.navAreaSurface,Q=x.useRef(null),ee=x.useRef(null);x.useEffect(()=>{if(!O||!Q.current||!ee.current)return;const kt=Q.current,kn=ee.current,fs=()=>{const zs=kt.getBoundingClientRect().height;kn.style.setProperty("--appshell-header-height",`${zs}px`)};return fy(kt,()=>fs()),()=>hy(kt)},[O]);const Y=N&&!$,V=k!=null,oe=L&&w!=null&&$,le=x.useId(),me=x.useMemo(()=>({isMobile:$,isMobileNavOpen:S,mobileNavId:le,toggleMobileNav:()=>L&&_(!S),openMobileNav:()=>L&&_(!0),closeMobileNav:()=>_(!1),isMobileNavEnabled:L,hasAutoToggle:v}),[$,S,le,_,L,v]),se=N&&v?a.jsx(Fa,{value:"drawer-content",children:l}):null,he=N?a.jsx(Fa,{value:"drawer-content",children:l}):null,ce=E?$&&!b&&k==null?a.jsx(Bg,{value:se,children:a.jsx(Dg,{value:"mobile-bar",children:c})}):c:null,J=E||I?a.jsxs(Lh,{padding:0,hasDivider:D&&E,children:[I&&a.jsx("div",{...q(Dt.banner,F),children:t}),E&&ce]}):void 0,ke=J!=null?a.jsx("div",{ref:Q,role:"banner",...K(W("app-shell-header",{variant:e}),q(F,O&&Dt.headerSticky)),children:J}):void 0,ue=Y?a.jsx(py,{padding:0,hasDivider:D,isScrollable:z,...W("app-shell-sidenav",{variant:e}),xstyle:[F,O&&G,O&&Dt.panelAutoFill],children:l}):void 0,ge=ue!=null&&O?a.jsx("div",{className:"x2lah0s x7giv3 x7wzq59 xepuwc7 x16zugyo x78zum5 xdt5ytf",children:ue}):ue,Re=P&&E&&Y,ae=a.jsx(Xs,{padding:s??0,role:"main",id:sp,tabIndex:-1,isScrollable:z,xstyle:[X,Dt.mainFocusTarget],children:n}),Tt=Re?a.jsxs("div",{className:"x1n2onr6 x78zum5 x98rzlu x2lwn1j x5yr21d",children:[a.jsx("div",{className:"x10l6tqk x10a8y8t x10xzikg x183tx6i x47corl"}),ae]}):ae,Pn=!b&&v&&$&&!E&&N?a.jsx("div",{...K(W("app-shell-header",{variant:e}),q(F,O&&Dt.headerSticky)),children:a.jsx(Lh,{padding:0,hasDivider:D,children:a.jsxs("div",{className:"x78zum5 x6s0dn4 x1k15mir xf314gf",role:"navigation","aria-label":g("@astryx.appShell.mobileNavigation"),children:[a.jsx(Fa,{value:"topbar",children:l}),a.jsx(x6,{})]})})}):void 0;return a.jsx(vy,{value:me,children:a.jsxs("div",{...p,ref:mt(f,ee),"data-testid":r,...K(W("app-shell",{variant:e}),q(Dt.root,e==="wash"?Dt.variantWash:e==="surface"?Dt.variantSurface:e==="section"?Dt.variantSection:Dt.variantElevated,z?Dt.rootFill:Dt.rootAuto,u),d,h),children:[a.jsx("a",{href:`#${sp}`,onClick:M,className:"x10l6tqk x1xrnuwo x1i1rx1s x1jqxupm xjm9jq1 x15cytp8 xt970qd xh2mrf5 xnjsko4 x1cf3d6k xkdpibf x1y5lnwp xb3r6kr xomzh7y x1hyvwdk x1rsz1da xuxw1ft x1hbpcn8 xc342km x13vifvy x1rw3289 x1o0tod xodanix x10xzikg xjse4m1 x1q2oy4v x1hl2dhg x2mo6ok xjm74w1","data-testid":"skip-to-content",children:g("@astryx.appShell.skipToContent")}),a.jsx(Ks,{height:i,padding:0,header:a.jsxs(a.Fragment,{children:[ke,Pn]}),start:ge,content:Tt}),V&&k,oe&&w,$&&!b&&k==null&&!w&&a.jsxs(zM,{mode:S?"visible":"hidden",children:[N&&!E&&a.jsx(Fa,{value:"drawer",children:l}),E&&a.jsx(Bg,{value:he,children:a.jsx(Dg,{value:"drawer",children:c})})]})]})})}g6.displayName="AppShell";const m6=x.createContext(36);m6.displayName="AvatarSizeContext";const y6=x.createContext(null);y6.displayName="AvatarGroupContext";function IM(){return x.use(y6)}const Nv=(1-1/Math.SQRT2)/2,_M=.4;function LM(e){if(typeof e=="number")return e;switch(e){case"xsm":return 20;case"sm":return 24;case"md":return 36;case"lg":return 48;case"xl":return 128}}const Ea={wrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kmuXW:"x2lah0s",kaIpWk:"xjspbzw",$$css:!0},content:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xjspbzw",kVQacm:"xb3r6kr",kfSwDN:"x87ps6o",$$css:!0},fallback:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kzqmXN:"xh8yej3",kZKoxP:"x5yr21d",kWkggS:"xelv01g",kMwMTN:"xicfil",kMv6JI:"x9ynric",k63SB2:"xi08x9w",kP9fke:"xtvhhri",$$css:!0},status:{kVAEAm:"x10l6tqk",$$css:!0},focusable:{kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},interactive:{kysU6D:"xjyslct",kmVPX3:"x1717udv",kogj98:"x1ghz6dp",kMzoRj:"xc342km",ksu8eU:"xng3xce",kWkggS:"xjbqb8w",kMwMTN:"x1heor9g",kVVagm:"xln7xf2",kybGjl:"x1hl2dhg",kkrTdU:"x1ypdohk",kaIpWk:"xjspbzw",kMeerF:"x1k57tk5 x784prv",k3XXqK:"x1t137rt x9v5kkp",kjBf7l:"xzunyri",kInvED:"x1wfwxd8 x7s97pk",$$css:!0}},OM={kGuDYH:"xdmh292",$$css:!0},DM={krVfgx:"x1nqzi6q",kt4wiu:"xqxgn94",k3aq6I:"x4v1no5 xqgnvz5",$$css:!0},rp={size:e=>[{kzqmXN:e!=null?"x5lhr3w":e,kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],fontSize:e=>[OM,{"--x-fontSize":(t=>typeof t=="number"?t+"px":t??void 0)(`var(--_avatar-fallback-font-size, ${e*_M}px)`)}],statusPosition:e=>[DM,{"--x-bottom":(t=>typeof t=="number"?t+"px":t??void 0)(e*Nv),"--x-insetInlineEnd":(t=>typeof t=="number"?t+"px":t??void 0)(e*Nv)}]},Av={ring:{kaIpWk:"xjspbzw",kMzoRj:"xdh2fpr",ksu8eU:"x1y0btm7",kVAM5u:"x1touxvs",kWkggS:"x10xzikg",kB7OPa:"x1afcbsf",$$css:!0},overlap:{keTefX:"x1sik18w",$$css:!0}},BM={"--_avatar-group-overlap":"xlz5hwt",$$css:!0},qM={overlap:e=>[BM,{"--x---_avatar-group-overlap":`${e}px`!=null?`${e}px`:void 0}]};function HM(e){const t=e.trim().split(/\s+/);return t.length===0?"":t.length===1?t[0].charAt(0).toUpperCase():(t[0].charAt(0)+t[t.length-1].charAt(0)).toUpperCase()}function PM(e){if(!x.isValidElement(e))return;const{label:t}=e.props;return typeof t=="string"&&t!==""?t:void 0}function UM({size:e}){return a.jsx("svg",{width:e*.6,height:e*.6,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:a.jsx("path",{d:"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"})})}function k6({alt:e,"data-testid":t,fallbackSrc:n,name:s,size:r="md",src:i,status:o,tooltip:l=!0,href:c,as:u,target:d,rel:h,onClick:f,xstyle:p,className:g,style:b,ref:y,...m}){const[k,w]=x.useState(void 0),[v,j]=x.useState(void 0),C=i&&k!==i,$=!C&&n&&v!==n,T=!C&&!$&&s,A=!C&&!$&&!s,S=Se(),_=e||s,M=PM(o),z=_&&M?S("@astryx.avatar.nameWithStatus",{name:_,status:M}):_||M,O=!z,I=IM(),E=(I==null?void 0:I.size)??r,N=x.useMemo(()=>LM(E),[E]),R=l===!1?void 0:typeof l=="string"?l:s,L=R==null?void 0:R.trim(),D=L!=null&&L!=="",P=typeof l=="string",F=ls({placement:"above",isEnabled:D}),X=mt(y,D?F.ref:void 0),G=D&&P?{"aria-describedby":[m["aria-describedby"],F.describedBy].filter(Boolean).join(" ")||void 0}:null,Q=c!=null,ee=!Q&&f!=null,Y=Q||ee,V=eo(u);Y&&!z&&console.warn("Avatar: an interactive avatar (with `href` or `onClick`) needs a meaningful accessible name. Pass `alt` or `name`.");const oe=a.jsxs(a.Fragment,{children:[a.jsxs("div",{...q(Ea.content,rp.size(N)),children:[C&&a.jsx("img",{src:i,alt:"",onError:()=>w(i),className:"xh8yej3 x5yr21d xl1xv1r"}),$&&a.jsx("img",{src:n,alt:"",onError:()=>j(n),className:"xh8yej3 x5yr21d xl1xv1r"}),T&&a.jsx("div",{...q(Ea.fallback,rp.fontSize(N)),children:HM(s)}),A&&a.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xelv01g xicfil x9ynric xi08x9w xtvhhri",children:a.jsx(UM,{size:N})})]}),o&&a.jsx("div",{...q(Ea.status,rp.statusPosition(N)),children:o})]}),le=K(W("avatar",{size:E}),q(Ea.wrapper,Y&&Ea.interactive,!Y&&D&&!I&&Ea.focusable,I&&Av.ring,I&&Av.overlap,I&&qM.overlap(-I.overlap),p),g,b);let me;const se=m;Q?me=a.jsx(V,{...se,...G,ref:X,href:c,target:d,rel:h,"aria-label":z,"data-avatar-item":"","data-testid":t,onClick:f,...le,children:oe}):ee?me=a.jsx("button",{...se,...G,ref:X,type:"button","aria-label":z,"data-avatar-item":"","data-testid":t,onClick:f,...le,children:oe}):me=a.jsx("div",{...m,ref:X,role:O?"presentation":"img","aria-label":O?void 0:z,"aria-hidden":O||void 0,tabIndex:D&&!I?0:void 0,"data-testid":t,...G,...le,children:oe});const he=a.jsx(m6,{value:N,children:me});return a.jsxs(a.Fragment,{children:[he,D?F.renderTooltip(L):null]})}k6.displayName="Avatar";function FM(e){return!e||typeof window>"u"?!1:window.getComputedStyle(e).direction==="rtl"}const xr=typeof window<"u"?x.useLayoutEffect:x.useEffect,GM=new Set(["text","search","url","tel","email","password","number"]);function VM(e){if(e.isContentEditable)return e;const t=e.closest("[contenteditable]");return t&&t.getAttribute("contenteditable")!=="false"?t:null}function Mv(e,t){if(!(e instanceof HTMLElement))return!1;const n=VM(e);if(n){const u=typeof window<"u"?window.getSelection():null;return u&&u.rangeCount>0&&!u.isCollapsed?!0:(n.textContent??"").length>0}const s=e.tagName==="TEXTAREA",r=e.tagName==="INPUT"&&GM.has(e.type);if(!s&&!r)return!1;const i=e,{selectionStart:o,selectionEnd:l,value:c}=i;return o!==l||o==null?!0:t==="ArrowLeft"||t==="ArrowUp"||t==="Home"?o>0:t==="ArrowRight"||t==="ArrowDown"||t==="End"?o<c.length:!1}function ic(e={}){const{itemSelector:t='[role="menuitem"]',boundarySelector:n,wrap:s=!0,onEscape:r,orientation:i="vertical",hasHomeEnd:o=!0,isRtl:l,hasRovingTabIndex:c=!1,hasCaretGuard:u=!1}=e,d=x.useRef(null),h=x.useCallback(T=>T.getAttribute("aria-disabled")==="true"||T.disabled===!0||T.hasAttribute("disabled"),[]),f=x.useCallback(()=>{const T=d.current;if(!T)return[];const A=Array.from(T.querySelectorAll(t));return n?A.filter(S=>S.closest(n)===T):A},[t,n]),p=x.useCallback(T=>{const A=d.current;if(!A||!n)return!0;const S=T.target;return S?S.closest(n)===A:!0},[n]),g=x.useCallback((T,A,S,_)=>{const M=T.length;if(M===0)return-1;let z=A;for(let O=0;O<M;O++){if(z<0||z>=M){if(!_)return-1;z=(z+M)%M}const I=T[z];if(I&&!h(I))return z;z+=S}return-1},[h]),b=x.useCallback(()=>{const T=f(),A=document.activeElement;return T.findIndex(S=>S===A||S.contains(A))},[f]),y=x.useCallback((T,A)=>{T.getAttribute("tabindex")!==String(A)&&T.setAttribute("tabindex",String(A))},[]),m=x.useCallback(()=>{const T=f(),A=T.filter(M=>!h(M));if(A.length===0)return;const _=A.find(M=>M.getAttribute("tabindex")==="0")??A[0];for(const M of T)y(M,M===_?0:-1)},[f,h,y]);xr(()=>{c&&m()});const k=x.useCallback((T,A)=>{const S=T[A];if(S){if(c)for(const _ of T)y(_,_===S?0:-1);S.focus()}},[c,y]),w=x.useCallback(T=>{const A=f();if(A.length===0)return;const S=Math.max(0,Math.min(T,A.length-1));k(A,S)},[f,k]),v=x.useCallback(()=>{const T=f(),A=g(T,0,1,!1);return A!==-1?(k(T,A),!0):!1},[f,g,k]),j=x.useCallback(()=>{const T=f(),A=g(T,T.length-1,-1,!1);return A!==-1?(k(T,A),!0):!1},[f,g,k]),C=x.useCallback(()=>{c&&m()},[c,m]),$=x.useCallback(T=>{if(T.ctrlKey||T.metaKey||T.altKey||!p(T))return;if(T.key==="Escape"){T.preventDefault(),r==null||r();return}const A=i==="horizontal"||i==="both",S=i==="vertical"||i==="both",_=[],M=[];if(A){const L=T.key==="ArrowLeft"||T.key==="ArrowRight"?l??FM(d.current):!1;_.push(L?"ArrowLeft":"ArrowRight"),M.push(L?"ArrowRight":"ArrowLeft")}S&&(_.push("ArrowDown"),M.push("ArrowUp"));const z=_.includes(T.key),O=M.includes(T.key),I=o&&T.key==="Home",E=o&&T.key==="End";if(!z&&!O&&!I&&!E||u&&(Mv(T.target,T.key)||Mv(document.activeElement,T.key)))return;const N=b(),R=f();if(z){const L=N===-1?0:N+1,D=g(R,L,1,s);D!==-1&&k(R,D)}else if(O){const L=N===-1?R.length-1:N-1,D=g(R,L,-1,s);D!==-1&&k(R,D)}else I?v():E&&j();T.preventDefault()},[b,f,s,i,l,o,u,g,k,v,j,r,p]);return{listRef:d,handleKeyDown:$,handleFocus:C,focusItem:w,focusFirst:v,focusLast:j,ownsEvent:p,getItems:f}}const WM={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kZKoxP:"x1grt7ep",k8WAf4:"xt970qd",kg3NbH:"xf314gf",kaIpWk:"xjspbzw",kMv6JI:"xjb2p0i",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",$$css:!0}},KM={neutral:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},info:{kWkggS:"x1ewilqj",kMwMTN:"x17wrial",$$css:!0},success:{kWkggS:"xdsz4j9",kMwMTN:"xri61p4",$$css:!0},warning:{kWkggS:"x1q8g9m5",kMwMTN:"xrebv38",$$css:!0},error:{kWkggS:"x1pjz0fi",kMwMTN:"x1m024r3",$$css:!0},blue:{kWkggS:"x1o0wnni",kMwMTN:"x1vvqiwl",$$css:!0},cyan:{kWkggS:"x1rgj867",kMwMTN:"x1txnczv",$$css:!0},green:{kWkggS:"x1sqjeoo",kMwMTN:"xltfdvo",$$css:!0},orange:{kWkggS:"x1e9xt6e",kMwMTN:"xm47u9q",$$css:!0},pink:{kWkggS:"xnpoty2",kMwMTN:"xiuofww",$$css:!0},purple:{kWkggS:"x16i6n6f",kMwMTN:"x1m9wyeb",$$css:!0},red:{kWkggS:"x1cibrc5",kMwMTN:"x1joocv1",$$css:!0},teal:{kWkggS:"x1jtji5o",kMwMTN:"x9x0lbs",$$css:!0},yellow:{kWkggS:"x1bo7t0x",kMwMTN:"xdhq94a",$$css:!0}};function yd({variant:e="neutral",label:t,icon:n,xstyle:s,className:r,style:i,ref:o,...l}){return a.jsxs("span",{ref:o,...K(W("badge",{variant:e}),q(WM.base,KM[e],s),r,i),...l,children:[n,t]})}yd.displayName="Badge";const XM={info:"info",warning:"warning",error:"error",success:"success"},ZM={info:"status",warning:"alert",error:"alert",success:"status"},YM={info:"accent",warning:"warning",error:"error",success:"success"},lo={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kMv6JI:"xjb2p0i",$$css:!0},rootElevatedCard:{kaIpWk:"x1hviunn",$$css:!0},header:{k1xSpc:"x78zum5",kGNEyG:"x1cy8zhl",kOIVth:"x1txdalj",k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},headerCardStandalone:{kaIpWk:"x1hviunn",$$css:!0},headerCardWithContent:{krdFHd:"x81l70g",kfmiAY:"x7hs6f1",kVL7Gh:"xbiv7yw",kT0f0o:"x16uus16",$$css:!0},headerCentered:{kGNEyG:"x6s0dn4",$$css:!0},endArea:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kmuXW:"x2lah0s",keTefX:"xvc5jky",kqGvvJ:"x81ka23",$$css:!0}},QM={info:{kWkggS:"xgcxg3y",$$css:!0},warning:{kWkggS:"x24i8r5",$$css:!0},error:{kWkggS:"x1pritpl",$$css:!0},success:{kWkggS:"xu13z74",$$css:!0}},JM={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}};function wt({status:e,title:t,description:n,icon:s,isDismissable:r=!1,onDismiss:i,endContent:o,container:l="card",elevation:c="none",defaultIsExpanded:u=!1,children:d,xstyle:h,className:f,style:p,ref:g,...b}){const y=Se(),[m,k]=x.useState(!1),[w,v]=x.useState(u),j=x.useId(),C=XM[e],$=ZM[e],T=YM[e],A=d!=null;if(m)return null;const S=()=>{k(!0),i==null||i()},_=()=>{v(N=>!N)},M=o!=null||r||A,z=o!=null||r,O=n==null&&z,I=A&&w,E=l==="card";return a.jsxs("div",{ref:g,role:$,...K(q(lo.root,JM[c],E&&c!=="none"&&lo.rootElevatedCard,h),f,p),...b,children:[a.jsxs("div",{...K(W("banner",{container:l,status:e}),q(lo.header,O&&lo.headerCentered,QM[e],E&&(I?lo.headerCardWithContent:lo.headerCardStandalone))),children:[a.jsx("div",{...K(W("banner-icon",{status:e}),{className:"x78zum5 x6s0dn4 x2lah0s"}),"aria-hidden":"true",children:s??a.jsx(Te,{icon:C,size:"md",color:T})}),a.jsxs("div",{className:"x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli",children:[a.jsx("div",{className:"x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0",children:t}),n!=null&&a.jsx("div",{className:"x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4",children:n})]}),M&&a.jsxs("div",{...q(lo.endArea,bA.inset(ms["--spacing-2"])),children:[o,A&&a.jsx(ne,{variant:"ghost",size:"sm",label:y(w?"@astryx.banner.collapse":"@astryx.banner.expand"),tooltip:y(w?"@astryx.banner.collapse":"@astryx.banner.expand"),icon:a.jsx("span",{...{0:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92"},1:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92 x19jd1h0"}}[!!w<<0],children:a.jsx(Te,{icon:"chevronDown",size:"sm",color:"inherit"})}),onClick:_,"aria-expanded":w,"aria-controls":I?j:void 0,isIconOnly:!0}),r&&a.jsx(ne,{variant:"ghost",size:"sm",label:y("@astryx.banner.dismiss"),tooltip:y("@astryx.banner.dismiss"),icon:a.jsx(Te,{icon:"close",size:"sm",color:"inherit"}),onClick:S,isIconOnly:!0})]})]}),I&&a.jsx("div",{id:j,...K(W("banner-content",{container:l,status:e}),{0:{className:"x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh"},1:{className:"x1de1mus x8o8v82 x1pzlopt xgbv0en xw8tdv1 x92x3c3 x1t7ytsu x18b5jzi x1q0q8m5 x1j92z86 x1gejf6u xw8gpjh x14k8p9y xiaxfje"}}[!!E<<0]),children:d})]})}wt.displayName="Banner";const ez={root:{k2ei4v:"xtpqe59",kVhnKS:"x1t7ytsu",kGJrpR:"x14ydlgx",kZCmMZ:"x1rey3nv",kMwMTN:"xv1l7n4",keTefX:"x1lziwak",k71WvV:"x14z9mp",keoZOQ:"xdj266r",k1K539:"xat24cr",$$css:!0}};function b6({children:e,cite:t,xstyle:n,className:s,style:r,ref:i,...o}){return a.jsxs("blockquote",{ref:i,...K(W("blockquote"),q(ez.root,n),s,r),...o,children:[e,t!=null&&a.jsx("footer",{children:a.jsx("cite",{className:"x1lliihq xtbrsbv x141an7d x1ltkj2j x1j61x8r",children:t})})]})}b6.displayName="Blockquote";const tz='button:not([disabled]), a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"]):not([disabled]), [contenteditable]:not([contenteditable="false"]), audio[controls], video[controls], iframe, details > summary:first-child',Dr=[];function nz(e){Dr.push(e)}function sz(e){for(let t=Dr.length-1;t>=0;t--)if(Dr[t].handler===e){Dr.splice(t,1);return}}function rz(e){if(Dr.length===0)return!1;let t=Dr[0];for(let n=1;n<Dr.length;n++){const s=Dr[n],r=t.getContainer(),i=s.getContainer();r!=null&&i!=null&&i!==r&&i.contains(r)||(t=s)}return t.handler===e}function zv(){return Dr.length>0}function v6(e){return e.isComposing===!0||e.keyCode===229}function iz(e){if(e.hasAttribute("inert")||e.closest("[inert]")||e.hidden||e.closest("[hidden]")||e.closest('[aria-hidden="true"]'))return!1;if(typeof window<"u"&&window.getComputedStyle){const t=window.getComputedStyle(e);if(t.visibility==="hidden"||t.display==="none")return!1}return!0}function wy(e){return Array.from(e.querySelectorAll(tz)).filter(iz)}function w6(e){try{e.focus()}catch{}return document.activeElement===e}function Rv(e){const t=wy(e);for(const n of t)if(w6(n))return!0;return!1}function oz(e){const t=wy(e);for(let n=t.length-1;n>=0;n--)if(w6(t[n]))return!0;return!1}function az(e){const{isActive:t,onEscape:n}=e,s=x.useRef(null),r=x.useRef(null),i=x.useRef(!1),o=x.useCallback(()=>{s.current&&Rv(s.current)},[]);return x.useEffect(()=>{if(!t)return;const l=document.activeElement,c=s.current;return()=>{const u=document.activeElement;(u==null||u===document.body||u===document.documentElement||c!=null&&c.contains(u))&&l!=null&&l.isConnected&&typeof l.focus=="function"&&l.focus()}},[t]),x.useEffect(()=>{if(!t)return;const l=c=>{const u=s.current;if(!u)return;const d=c.target;u.contains(d)?r.current=d:i.current&&(Rv(u),r.current===document.activeElement&&oz(u),r.current=document.activeElement),i.current=!1};return document.addEventListener("focus",l,!0),()=>{document.removeEventListener("focus",l,!0)}},[t]),x.useEffect(()=>{if(!t)return;const l=()=>{n==null||n()};n&&nz({handler:l,getContainer:()=>s.current});const c=u=>{const d=s.current;if(d){if(u.key==="Escape"&&n){if(u.defaultPrevented||v6(u)||!rz(l))return;u.preventDefault(),u.stopPropagation(),n();return}if(u.key==="Tab"){i.current=!0;const h=wy(d);if(h.length===0)return;const f=h[0],p=h[h.length-1];u.shiftKey?document.activeElement===f&&(u.preventDefault(),p.focus()):document.activeElement===p&&(u.preventDefault(),f.focus())}}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),n&&sz(l)}},[t,n]),{containerRef:s,focusFirst:o}}function oc(e,t,n=!0){const s=x.useRef(!1);x.useEffect(()=>{n&&!s.current&&(s.current=!0,qo())},[e,t,n])}const ip={surface:{kWkggS:"x1prclbq",kaIpWk:"x1hviunn",kGVxlE:"x1i5ehqx",$$css:!0},contentWrapper:{kVAEAm:"x1n2onr6",$$css:!0},closeButtonWrapper:{kVAEAm:"x10l6tqk",krVfgx:"x1ey2m1c",kY2c9j:"x1vjfegm",kzqmXN:"x1i1rx1s x10okhzq",kZKoxP:"xjm9jq1 x132qfvm",kVQacm:"xb3r6kr x1dordxg",kz4h6p:"x1hyvwdk x10wafsz",kfzvcC:"x47corl xbt4iw",kLKAdn:"xexx8yu x1kw28su",$$css:!0}};function kd(e={}){const{onShow:t,onHide:n,xstyle:s,hasLightDismiss:r=!0,hasEscapeDismiss:i=!0,hasAutoFocus:o=!0,hasSurface:l=!0,hasCloseButton:c=!0,closeButtonLabel:u,dialogLabel:d,role:h="dialog",isModal:f=!0}=e,p=Se(),g=u??p("@astryx.popover.close"),b=x.useRef(null),y=x.useRef(!1),m=rc({mode:"context",lightDismiss:r,onShow:t,onHide:n}),{containerRef:k,focusFirst:w}=az({isActive:m.isOpen,onEscape:i||r?m.hide:void 0});x.useEffect(()=>{m.isOpen&&o&&!y.current&&requestAnimationFrame(()=>{w()}),m.isOpen||(y.current=!1)},[m.isOpen,o,w]);const v=x.useCallback(A=>{b.current=A,m.ref(A)},[m]),j=x.useCallback(A=>{y.current=(A==null?void 0:A.skipAutoFocus)??!1,m.show()},[m]),C=x.useCallback(()=>{m.isOpen?m.hide():j()},[m,j]),$={"aria-haspopup":h==="dialog"?"dialog":"true","aria-expanded":m.isOpen,"aria-controls":m.id};oc("usePopover",'role="dialog" without a `dialogLabel` renders an unnamed dialog. Pass `dialogLabel`, or use `role: "none"` for listbox/menu popups whose content already carries its own role.',h==="dialog"&&!d);const T=x.useCallback((A,S)=>m.render(a.jsxs("div",{ref:k,role:h==="dialog"?"dialog":void 0,"aria-modal":h==="dialog"&&f?!0:void 0,"aria-label":h==="dialog"?d:void 0,...q(ip.contentWrapper,l&&ip.surface,s),children:[A,c&&a.jsx("div",{...q(ip.closeButtonWrapper,_l.centerInline("100%")),children:a.jsx(ne,{variant:"secondary",label:g,onClick:m.hide})})]}),{...S,xstyle:S==null?void 0:S.xstyle}),[m,c,l,g,k,d,h,f,s]);return{triggerRef:v,contentRef:k,anchorId:m.anchorId,show:j,hide:m.hide,toggle:C,isOpen:m.isOpen,id:m.id,render:T,triggerProps:$}}function lz(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key!==" "}function jy(e){const{getItemLabels:t,onMatch:n,getCurrentIndex:s,resetMs:r=750,isDisabled:i}=e,o=x.useRef(""),l=x.useRef(void 0),c=x.useCallback(()=>{o.current="",l.current&&(clearTimeout(l.current),l.current=void 0)},[]),u=x.useCallback(()=>{l.current&&clearTimeout(l.current),l.current=setTimeout(()=>{o.current="",l.current=void 0},r)},[r]);return{onKeyDown:x.useCallback(h=>{const f=h.key===" "&&o.current.length>0;if(!lz(h)&&!f)return!1;const p=t();if(p.length===0)return!1;const g=h.key.toLowerCase(),b=o.current.length>0&&o.current.split("").every(v=>v===g),y=b?g:o.current+g;o.current=y,u();const m=(s==null?void 0:s())??-1,k=p.length,w=b?1:0;for(let v=0;v<k;v++){const j=(m+w+v+k)%k;if(i!=null&&i(j))continue;const C=p[j];if(C!=null&&C.trim().toLowerCase().startsWith(y))return n(j),!0}return!0},[t,n,s,u,i]),reset:c}}const Iv={horizontal:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kzqmXN:"xh8yej3",$$css:!0},vertical:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kZKoxP:"x5yr21d",$$css:!0}},Ta={horizontalLine:{kZKoxP:"xsyqizj",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",$$css:!0},verticalLine:{kzqmXN:"xjk4fl7",kzQI83:"x1iyjqo2",kmuXW:"xs83m0k",$$css:!0},subtle:{kWkggS:"x1m4xfpy",$$css:!0},strong:{kWkggS:"x7njt3n",$$css:!0}},_v={horizontal:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",$$css:!0},vertical:{keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",kZKoxP:"x12qplqi",$$css:!0}};function Tu({orientation:e="horizontal",label:t,variant:n="subtle",isFullBleed:s=!1,xstyle:r,className:i,style:o,ref:l,"aria-label":c,"aria-labelledby":u,...d}){const h=e==="horizontal",f=x.useId(),p=u??(t&&c==null?f:void 0);return a.jsxs("div",{ref:l,...d,role:"separator","aria-orientation":e,"aria-label":c,"aria-labelledby":p,...K(W("divider",{variant:n,orientation:e}),q(h?Iv.horizontal:Iv.vertical,s&&(h?_v.horizontal:_v.vertical),r),i,o),children:[a.jsx("div",{...q(h?Ta.horizontalLine:Ta.verticalLine,Ta[n])}),t&&a.jsx("div",{id:f,...{0:{className:"x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4"},1:{className:"x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82"}}[!h<<0],children:t}),t&&a.jsx("div",{...q(h?Ta.horizontalLine:Ta.verticalLine,Ta[n])})]})}Tu.displayName="Divider";const cz=["noopener","noreferrer"];function j6(e,t){if(e!=="_blank")return{target:e,rel:t};const n=(t==null?void 0:t.split(/\s+/).filter(Boolean))??[];for(const s of cz)n.includes(s)||n.push(s);return{target:e,rel:n.join(" ")}}const S6=["button","a","input","select","textarea",'[role="button"]','[role="link"]','[role="checkbox"]','[role="radio"]','[role="switch"]','[role="tab"]','[role="menuitem"]','[role="option"]','[role="combobox"]','[role="listbox"]','[role="slider"]','[role="spinbutton"]',"[data-pressable-container]"].join(","),uz='[aria-readonly="true"]';function Lv(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(S6)&&!n.matches(uz))return!0;n=n.parentElement}return!1}function dz(e){if(typeof document>"u"||!("getSelection"in document))return!1;const t=document.getSelection();return t==null||t.isCollapsed?!1:e.contains(t.anchorNode)}function Sy({containerRef:e,interactiveRef:t,onClick:n,href:s,target:r,disabled:i=!1}){x.useEffect(()=>{const c=e.current;c&&c.setAttribute("data-pressable-container","true")},[e]);const o=x.useCallback(c=>{if(i)return;const u=e.current;if(!u||dz(u))return;const d=c.target;if(d instanceof Element&&!(d!==c.currentTarget&&Lv(d,u))&&(n==null||n(c),!c.defaultPrevented&&(s!=null&&(r==="_blank"||c.ctrlKey||c.metaKey?window.open(s,"_blank","noopener"):t!=null&&t.current?t.current.click():window.location.href=s),s==null&&n==null&&(t!=null&&t.current)))){const h=new MouseEvent("click",{bubbles:c.bubbles,cancelable:c.cancelable,ctrlKey:c.ctrlKey,metaKey:c.metaKey,shiftKey:c.shiftKey,altKey:c.altKey,button:c.button});t.current.dispatchEvent(h),c.stopPropagation()}},[e,t,n,s,r,i]),l=x.useCallback(c=>{if(i)return;const u=e.current;if(!u)return;const d=c.target;if(!(d instanceof Element))return;c.button===1&&s!=null&&(d===c.currentTarget||!Lv(d,u))&&window.open(s,"_blank","noopener")},[e,s,i]);return{onClick:o,onMouseUp:l}}const fz=new Set(["option","tab","row","gridcell","columnheader","rowheader","treeitem"]),bn={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kg3NbH:"xf314gf",kVAEAm:"x1n2onr6",kB7OPa:"x9f619",k9WMMc:"x1yc453h",kaIpWk:"xh6dtrn",$$css:!0},alignStart:{kGNEyG:"x1cy8zhl",$$css:!0},interactive:{kkrTdU:"x1ypdohk",k1ekBW:"x15406qy",kIyJzY:"xkvfbh3",kAMwcw:"xlr8y92",kWkggS:"xjbqb8w xe9uy6x xyxi2l3",$$css:!0},focusVisibleOutline:{kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",$$css:!0},highlighted:{kWkggS:"x1lmrjuc",$$css:!0},selected:{kWkggS:"xgcxg3y",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kfzvcC:"x47corl",$$css:!0},label:{kMwMTN:"x1tgivj0",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},labelSingleTruncate:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},labelMultiTruncate:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0},description:{kMwMTN:"xv1l7n4",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},descriptionSingleTruncate:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",$$css:!0},descriptionMultiTruncate:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},Ov={lineClamp:e=>[{kJFfOR:e!=null?"x1yhjpo9":e,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},hz={compact:{k8WAf4:"xu0wf1k",$$css:!0},balanced:{k8WAf4:"xce4md1",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"xrrkdod",$$css:!0}};function ac({as:e="div",marker:t,startContent:n,label:s,description:r,endContent:i,align:o="center",density:l="balanced",labelLines:c,descriptionLines:u,onClick:d,interactiveRef:h,href:f,target:p,rel:g,isHighlighted:b=!1,isSelected:y=!1,isDisabled:m=!1,xstyle:k,className:w,style:v,ref:j,role:C,...$}){const T=eo(),A=h!=null,S=x.useRef(null),{onClick:_}=Sy({containerRef:S,interactiveRef:h??void 0,disabled:m});oc("Item","`interactiveRef` is mutually exclusive with `onClick`/`href`. In delegation mode the row only forwards clicks to the referenced control, so `onClick`/`href` are ignored. Drop one of them.",A&&(d!=null||f!=null));const M=d!=null||f!=null||A,{target:z,rel:O}=j6(p,g),I=C!=null,E=C!=null&&fz.has(C),N=typeof s=="string",R=typeof r=="string",L=c!=null?c===1?bn.labelSingleTruncate:bn.labelMultiTruncate:N?bn.labelSingleTruncate:null,D=u!=null?u===1?bn.descriptionSingleTruncate:bn.descriptionMultiTruncate:R?bn.descriptionSingleTruncate:null,P=a.jsxs(a.Fragment,{children:[a.jsx("span",{...q(bn.label,L,c!=null&&c>1&&Ov.lineClamp(c)),children:s}),r!=null&&a.jsx("span",{...q(bn.description,D,u!=null&&u>1&&Ov.lineClamp(u)),children:r})]}),F=G=>{m||G.target.closest("button, a, input, select, textarea")||d==null||d(G)},X=a.jsxs(a.Fragment,{children:[t,n!=null&&a.jsx("span",{className:"x3psx0u x78zum5",children:n}),I||A?a.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!m<<0],children:P}):f!=null?a.jsx(T,{href:f,target:z,rel:O,"aria-disabled":m||void 0,tabIndex:m?-1:void 0,...{0:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz"},1:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1hl2dhg x1a2a7pz xbyyjgo"}}[!!m<<0],children:P}):d!=null?a.jsx("button",{type:"button",onClick:d,disabled:m,...{0:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz"},1:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo"}}[!!m<<0],children:P}):a.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!m<<0],children:P}),i!=null&&a.jsx("span",{...{0:{className:"x3psx0u x78zum5 xvc5jky"},1:{className:"x3psx0u x78zum5 xvc5jky xbyyjgo"}}[!!m<<0],children:i})]});return a.jsx(e,{ref:A?mt(j,S):j,...$,"aria-selected":E&&y||void 0,"aria-current":$["aria-current"]??(y&&!E?!0:void 0),"aria-disabled":m||void 0,...K(W("item",{density:l,align:o}),q(bn.root,hz[l],o==="start"&&bn.alignStart,M&&bn.interactive,M&&bn.focusVisibleOutline,b&&bn.highlighted,y&&bn.selected,m&&!I&&bn.disabled,k),w,v),role:C,onClick:A?_:I?d:M?F:void 0,children:X})}ac.displayName="Item";const bd=x.createContext(null);bd.displayName="DropdownMenuContext";function C6(){return x.use(bd)}const xz=x.createContext(null);xz.displayName="DropdownMenuRadioGroupContext";function $6(e,t){if(t||e.pointerType!=="mouse")return;const n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus()}const Dv={root:{kB7OPa:"x9f619",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"x1ws5lxm",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},pz={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}};function Nu({icon:e,label:t,description:n,onClick:s,isDisabled:r=!1,endContent:i,xstyle:o,className:l,style:c}){const u=C6(),d=(u==null?void 0:u.menuSize)??"md",h=x.useCallback(()=>{r||!s||(s(),u==null||u.closeMenu())},[r,s,u]),f=x.useCallback(p=>$6(p,r),[r]);return a.jsx(ac,{role:"menuitem",tabIndex:r?void 0:-1,onPointerMove:f,startContent:e?yr(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:i,onClick:h,isDisabled:r,xstyle:[Dv.root,pz[d],r&&Dv.disabled,o],...K(W("dropdown-menu-item",{size:d}),{className:l,style:c})})}Nu.displayName="DropdownMenuItem";function gz(e){const{show:t,hide:n,isOpen:s,isEnabled:r,showDelay:i=150,hideDelay:o=200}=e,l=ua("(hover: hover)"),c=x.useRef(null),u=x.useRef(null),d=x.useRef(null),h=x.useRef(!1),f=x.useRef(!1),p=x.useRef(s);p.current&&!s&&(h.current=!1),p.current=s;const g=x.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current&&(clearTimeout(u.current),u.current=null)},[]),{listRef:b,handleKeyDown:y,focusFirst:m}=ic({onEscape:()=>{g(),n()}});x.useEffect(()=>()=>g(),[g]);const k=x.useCallback(()=>{g(),s?(f.current=!0,n()):(f.current=!1,t(),requestAnimationFrame(()=>m()))},[s,g,t,n,m]),w=x.useCallback(()=>{if(l){if(f.current){f.current=!1;return}h.current=!0,g(),i>0?c.current=setTimeout(()=>{t({skipAutoFocus:!0})},i):t({skipAutoFocus:!0})}},[l,g,t,i]),v=x.useCallback(()=>{h.current&&(g(),u.current=setTimeout(()=>{n()},o))},[g,n,o]),j=x.useCallback(()=>{g()},[g]),C=x.useCallback(S=>{d.current=S},[]),$=x.useCallback(()=>{},[]),T=x.useCallback(S=>{},[]),A=x.useCallback(S=>{},[]);return r?{triggerProps:{onClick:k,onMouseEnter:w,onMouseLeave:v},contentProps:{onMouseEnter:j,onMouseLeave:v,onKeyDown:y},menuRef:b,focusFirst:m,setTriggerEl:C}:{triggerProps:{onClick:$,onMouseEnter:$,onMouseLeave:$},contentProps:{onMouseEnter:$,onMouseLeave:$,onKeyDown:A},menuRef:b,focusFirst:m,setTriggerEl:T}}const e1=new Set(["menuitem","menuitemradio","menuitemcheckbox"]),Cy=[...e1].map(e=>`[role="${e}"]:not([aria-disabled="true"])`).join(","),$y='[role="menu"]',op={root:{kB7OPa:"x9f619",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"x1ws5lxm",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},open:{kWkggS:"x1lmrjuc",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},mz={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},yz={keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},Bv={popover:{k7Eaqz:"x5w4yej",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[yz,{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function E6(e){const{icon:t,label:n,description:s,isDisabled:r=!1,hasSpinner:i=!1,menuWidth:o,onOpenChange:l,children:c,xstyle:u,className:d,style:h,"data-testid":f,menuDataTestId:p}=e,g=C6(),b=(g==null?void 0:g.menuSize)??"md",y=!r,m=x.useId(),k=x.useId(),w=x.useRef(null),[v,j]=x.useState(!1),C=rc({mode:"context",lightDismiss:!1,onShow:x.useCallback(()=>{j(!0),l==null||l(!0)},[l]),onHide:x.useCallback(()=>{j(!1),l==null||l(!1)},[l])}),$=x.useCallback(()=>{y&&C.show()},[y,C]),T=x.useCallback(()=>{C.hide()},[C]),{listRef:A,handleKeyDown:S,focusFirst:_,focusItem:M,ownsEvent:z,getItems:O}=ic({itemSelector:Cy,boundarySelector:$y,wrap:!1,onEscape:()=>L({focusTrigger:!0})}),I=jy({getItemLabels:()=>O().map(V=>V.textContent),onMatch:M,getCurrentIndex:()=>O().findIndex(V=>V===document.activeElement||V.contains(document.activeElement))}),{triggerProps:E,contentProps:N}=gz({show:$,hide:T,isOpen:v,isEnabled:y}),R=x.useCallback(V=>{y&&(C.show(),V!=null&&V.focusFirst&&requestAnimationFrame(()=>{var le;_()||(le=A.current)==null||le.focus()}))},[y,C,_,A]),L=x.useCallback(V=>{var oe;C.hide(),(V==null?void 0:V.focusTrigger)!==!1&&((oe=w.current)==null||oe.focus())},[C]),D=x.useCallback(V=>{w.current=V,C.ref(V)},[C]),P=x.useCallback(()=>{r||(v?L({focusTrigger:!0}):R({focusFirst:!0}))},[r,v,R,L]),F=x.useCallback(V=>{if(r)return;const le=(typeof window<"u"&&w.current?window.getComputedStyle(w.current).direction==="rtl":!1)?"ArrowLeft":"ArrowRight";(V.key===le||V.key==="Enter"||V.key===" ")&&(V.preventDefault(),V.stopPropagation(),R({focusFirst:!0}))},[r,R]),X=x.useCallback(V=>$6(V,r),[r]),G=x.useCallback(V=>{if(!z(V))return;if(V.key==="Escape"){V.preventDefault(),V.stopPropagation(),L({focusTrigger:!0});return}if(V.key==="Enter"||V.key===" "){V.preventDefault();const me=document.activeElement;me&&e1.has(me.getAttribute("role")??"")&&me.click();return}const le=(typeof window<"u"&&A.current?window.getComputedStyle(A.current).direction==="rtl":!1)?"ArrowRight":"ArrowLeft";if(V.key===le){V.preventDefault(),L({focusTrigger:!0});return}if(I.onKeyDown(V)){V.preventDefault();return}S(V)},[z,L,S,I,A]),Q=x.useMemo(()=>({menuSize:b,closeMenu:()=>{L({focusTrigger:!1}),g==null||g.closeMenu()}}),[b,L,g]),ee=i?a.jsx("span",{...K(W("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:a.jsx(un,{size:"sm"})}):a.jsx("span",{...K(W("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:a.jsx(Te,{icon:"chevronRight",size:"sm",color:"secondary"})}),Y=o?Bv.popoverCustomWidth(o):Bv.popover;return a.jsxs(a.Fragment,{children:[a.jsx(ac,{ref:V=>D(V),id:k,role:"menuitem",tabIndex:r?void 0:-1,"aria-haspopup":"menu","aria-expanded":v,"aria-controls":v?m:void 0,"aria-disabled":r||void 0,"data-testid":f,onMouseEnter:E.onMouseEnter,onMouseLeave:E.onMouseLeave,onPointerMove:X,startContent:t?yr(t,{size:"sm",color:"secondary"}):void 0,label:n,description:s,endContent:ee,onClick:P,onKeyDown:F,isDisabled:r,xstyle:[op.root,mz[b],v&&op.open,r&&op.disabled,u],...K(W("dropdown-menu-item",{size:b}),{className:d,style:h})}),C.render(a.jsx("div",{ref:A,id:m,role:"menu",tabIndex:-1,"aria-labelledby":k,onKeyDown:G,onMouseEnter:N.onMouseEnter,onMouseLeave:N.onMouseLeave,"data-testid":p,...K(W("dropdown-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92"}),children:a.jsx(bd,{value:Q,children:c})}),{placement:"end",alignment:"start",xstyle:[Y,Ur.end]})]})}E6.displayName="DropdownMenuSubMenu";const kz={divider:{kqGvvJ:"xsq74q5",$$css:!0}};function ap(e){return`item-${e.label}`}function bz(e,t){return`section-${e.title??t}`}function Ey(e){const t=[];for(let n=0;n<e.length;n++){const s=e[n];"type"in s&&s.type==="divider"?t.push(a.jsx(Tu,{xstyle:kz.divider,...W("dropdown-menu-divider")},`divider-${n}`)):"type"in s&&s.type==="section"?t.push(a.jsxs("div",{role:"group","aria-label":s.title,children:[s.title&&a.jsx("div",{"aria-hidden":"true",...K(W("dropdown-menu-section-heading"),{className:"xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o"}),children:s.title}),s.items.map(r=>a.jsx(Nu,{icon:r.icon,label:r.label,onClick:r.onClick,isDisabled:r.isDisabled},ap(r)))]},bz(s,n))):"type"in s||(s.items&&s.items.length>0?t.push(a.jsx(E6,{icon:s.icon,label:s.label,isDisabled:s.isDisabled,children:Ey(s.items)},ap(s))):t.push(a.jsx(Nu,{icon:s.icon,label:s.label,onClick:s.onClick,isDisabled:s.isDisabled},ap(s))))}return t}function vz(e){return typeof e=="string"||typeof e=="number"}function qv(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function to({children:e,anchorRef:t,content:n,placement:s="above",alignment:r="center",delay:i=200,hideDelay:o=0,focusTrigger:l="auto",isEnabled:c=!0,onOpenChange:u,hasHoverIndication:d="auto",isOpen:h,isDefaultOpen:f}){const p=x.useRef(null),g=e!=null?vz(e):!1,b=d===!0||d==="auto"&&g,y=x.useCallback(()=>{u==null||u(!0)},[u]),m=x.useCallback(()=>{u==null||u(!1)},[u]),k=ls({placement:s,alignment:r,delay:i,hideDelay:o,focusTrigger:l,isEnabled:c,isOpen:h,isDefaultOpen:f,onShow:y,onHide:m});return xr(()=>{if(!t)return;const w=t.current;if(!w)return;k.ref(w);const v=w.getAttribute("aria-describedby");return w.setAttribute("aria-describedby",qv(v,k.describedBy)??""),()=>{k.ref(null),v?w.setAttribute("aria-describedby",v):w.removeAttribute("aria-describedby")}},[t,k.ref,k.describedBy]),xr(()=>{if(t||g)return;const w=p.current;if(!w)return;const v=w.firstElementChild;if(!v)return;k.ref(v);const j=v.getAttribute("aria-describedby");return v.setAttribute("aria-describedby",qv(j,k.describedBy)??""),()=>{k.ref(null),j?v.setAttribute("aria-describedby",j):v.removeAttribute("aria-describedby")}},[t,g,k.ref,k.describedBy]),t&&e==null?a.jsx(a.Fragment,{children:k.renderTooltip(n)}):g?a.jsxs(a.Fragment,{children:[a.jsx("span",{ref:k.ref,tabIndex:0,"aria-describedby":k.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 xrys4gj"}}[!!b<<0],children:e}),k.renderTooltip(n)]}):a.jsxs(a.Fragment,{children:[a.jsx("div",{ref:p,className:"xjp7ctv",children:e}),k.renderTooltip(n)]})}to.displayName="Tooltip";const T6=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:to},Symbol.toStringTag,{value:"Module"})),wz="data-astryx-live-region",jz="position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;inset-block-start:0;inset-inline-start:0;pointer-events:none;user-select:none;",Sz=2e3,qh={polite:null,assertive:null};function N6(e){const t=qh[e];t!=null&&(clearTimeout(t),qh[e]=null)}function Cz(e,t){N6(e),qh[e]=setTimeout(()=>{qh[e]=null,t.textContent=""},Sz)}let qs=null;function Hv(e){const t=document.createElement("div");return t.setAttribute(wz,e),t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.setAttribute("role",e==="assertive"?"alert":"status"),t.style.cssText=jz,document.body.appendChild(t),t}function $z(){return typeof document>"u"?null:qs?(qs.polite.isConnected||document.body.appendChild(qs.polite),qs.assertive.isConnected||document.body.appendChild(qs.assertive),qs):(qs={polite:Hv("polite"),assertive:Hv("assertive")},qs)}function Ez(e,t){const n=$z();if(!n)return;const s=t==="assertive"?n.assertive:n.polite;s.textContent="",requestAnimationFrame(()=>{s.textContent=e}),Cz(t,s)}function Tz(e){if(N6(e),!qs)return;const t=e==="assertive"?qs.assertive:qs.polite;t.textContent=""}function lc(){return x.useCallback((e,t="polite")=>{if(!e){Tz(t);return}Ez(e,t)},[])}const Nz={wrapper:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kmuXW:"x2lah0s",$$css:!0}},Az={ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",escape:"Esc",tab:"⇥",up:"↑",down:"↓",left:"←",right:"→",plus:"+"};function Mz(e,t){return e==="mod"?t?"⌘":"Ctrl":Az[e]??e.toUpperCase()}const zz={ctrl:"Control",alt:"Alt",shift:"Shift",enter:"Enter",backspace:"Backspace",escape:"Escape",tab:"Tab",up:"Up arrow",down:"Down arrow",left:"Left arrow",right:"Right arrow",plus:"Plus"};function Rz(e,t){return e==="mod"?t?"Command":"Control":zz[e]??e.toUpperCase()}function Iz(){return()=>{}}function _z(){return!1}function Lz(){if(typeof navigator>"u")return!1;const e="userAgentData"in navigator?navigator.userAgentData:null;return e&&typeof e=="object"&&"platform"in e?/mac/i.test(e.platform??""):/Mac|iPhone|iPad|iPod/.test(navigator.platform??"")}function A6({keys:e,ref:t,xstyle:n,className:s,style:r,...i}){const o=x.useSyncExternalStore(Iz,Lz,_z),l=e.split("+").map(u=>u.trim().toLowerCase()),c=l.map(u=>Rz(u,o)).join(" + ");return a.jsx("span",{...i,ref:t,role:"img","aria-label":c,...K(W("kbd"),q(Nz.wrapper,n),s,r),children:l.map(u=>a.jsx("kbd",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x16asifk x1grt7ep x7a5moj xx3sua9 x17x4s8c xlxy82 x1q0q8m5 xib2hle xv1l7n4 x9ynric x141an7d x1e4wzip x1ltkj2j x87ps6o",children:Mz(u,o)},u))})}A6.displayName="Kbd";const Oz=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),Dz={horizontal:["left","right"],vertical:["up","down"],both:["left","right","up","down"]},Bz={hint:{kVAEAm:"xixxii4",kpwlN0:"x1anvkwx",kogj98:"x1ghz6dp",kWkggS:"x1prclbq",kaIpWk:"xh6dtrn",kGVxlE:"x1i5ehqx",kLKAdn:"xfsso4q",kGO01o:"xy143xn",kZCmMZ:"x12gdq22",kwRFfy:"x1djylfy",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",khDVqt:"xuxw1ft",kSiTet:"xg01cxk xofkqq2",k1ekBW:"xsm4mo9",kIyJzY:"xx6bhzk",kzIqYQ:"xd00j3c",kfzvcC:"x47corl",$$css:!0}};function M6(e={}){const{orientation:t="horizontal",dismissAfterMs:n=3e3,isEnabled:s=!0}=e,r=Se(),i=x.useRef(null),o=x.useRef(!1),l=x.useRef(!1),c=x.useRef(()=>{}),u=x.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]),d=x.useCallback(()=>{l.current=!0},[]),h=x.useCallback(()=>{l.current=!1,u(),c.current(null)},[u]),f=rc({mode:"context",onShow:d,onHide:h});c.current=f.ref;const p=x.useCallback(()=>{o.current=!0,u(),f.hide(),l.current=!1,c.current(null)},[u,f]),g=x.useCallback(v=>{o.current||!s||(c.current(v),f.show(),u(),i.current=setTimeout(()=>{p()},n))},[u,p,n,s,f]);x.useEffect(()=>()=>{u(),c.current(null)},[u]);const b=x.useCallback(v=>{if(o.current||!s)return;const j=v.target;if(!j.matches(":focus-visible"))return;const C=v.currentTarget;v.relatedTarget instanceof Node&&C.contains(v.relatedTarget)||g(j)},[g,s]),y=x.useCallback(v=>{if(!l.current)return;const j=v.currentTarget;if(v.relatedTarget instanceof Node&&j.contains(v.relatedTarget)){!o.current&&v.relatedTarget instanceof HTMLElement&&c.current(v.relatedTarget);return}p()},[p]),m=x.useCallback(v=>{l.current&&Oz.has(v.key)&&p()},[p]),k=a.jsx("span",{className:"x3nfvp2 x6s0dn4 xzye2dw",children:Dz[t].map(v=>a.jsx(A6,{keys:v},v))});return{hintElement:f.render(a.jsxs("span",{"aria-hidden":"true",children:[k,a.jsx("span",{className:"x11g1kdw",children:r("@astryx.keyboardHint.toNavigate")})]}),{placement:"below",alignment:"start",xstyle:Bz.hint,style:{marginBlockStart:ms["--spacing-2"]}}),onFocus:b,onBlur:y,onKeyDown:m}}function z6(e){x.useEffect(()=>{if(!e)return;const t=window.scrollX,n=window.scrollY,{body:s}=document,r=s.style.overflow,i=s.style.position,o=s.style.top,l=s.style.left,c=s.style.right;return s.style.overflow="hidden",s.style.position="fixed",s.style.top=`-${n}px`,s.style.left="0",s.style.right="0",()=>{s.style.overflow=r,s.style.position=i,s.style.top=o,s.style.left=l,s.style.right=c,window.scrollTo(t,n)}},[e])}let R6=!1;typeof window<"u"&&requestAnimationFrame(()=>{R6=!0});const qz={slideDown:{kKVMdj:"x1srr2gu x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},slideUp:{kKVMdj:"x1dvww92 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},fadeIn:{kKVMdj:"xqcmdr3 x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0},scaleIn:{kKVMdj:"x97zbip x1aquc0h",k44tkh:"x9uej1z",kyAemX:"x128ha8g",kWV6AL:"xskzprw",$$css:!0}};function Hz(e="slideDown"){const[t]=x.useState(()=>R6);return t?qz[e]:null}const Pz=50;function Uz(e){const t=e.match(/^([\d.]+)ms$/);if(t)return parseFloat(t[1]);const n=e.match(/^([\d.]+)s$/);return n?parseFloat(n[1])*1e3:null}const Fz={natural:10,fast:4,instant:1/0};function Gz(e,t,n){const s="natural",r=Fz[s],{token:i}=Yx(),o=x.useMemo(()=>{const y=Uz(i("--duration-fast-min"));if(y==null)return Pz;const m=y/10;return Math.max(4,Math.round(m))},[i,s]),[l,c]=x.useState(0),u=x.useRef(e),d=x.useRef(0),h=x.useRef(0),f=x.useRef(null);u.current=e;const p=x.useRef(e.length);e.length!==p.current&&(p.current=e.length,e.length===0&&l!==0&&(d.current=0,c(0)));const g=x.useRef(t);t!==g.current&&(g.current=t,!t&&e.length>0&&(d.current=e.length,c(e.length)));const b=ua("(prefers-reduced-motion: reduce)");return x.useEffect(()=>{if(!t||s==="instant"||b)return;function y(m){if(m-h.current>=o){h.current=m;const w=u.current,v=d.current;if(v<w.length){const j=Math.min(v+r,w.length);d.current=j,c(j)}}f.current=requestAnimationFrame(y)}return f.current=requestAnimationFrame(y),()=>{f.current!==null&&(cancelAnimationFrame(f.current),f.current=null)}},[t,r,o,s,b]),!t||s==="instant"||b?e:e.slice(0,l)}const Vz=new Set(["text","password","email","number","search","tel","url","date","datetime-local","month","time","week"]),Wz=new Set(["true","menu","listbox","tree","grid","dialog"]);function Kz(e){if(e.getAttribute("role")==="combobox")return!0;const t=e.getAttribute("aria-haspopup");return t!=null&&Wz.has(t)}function Ty({containerRef:e,inputRef:t,disabled:n=!1}){const s=x.useCallback(()=>{const r=t.current;r!=null&&(r instanceof HTMLElement&&Kz(r)?r.click():r instanceof HTMLInputElement&&Vz.has(r.type)||r instanceof HTMLTextAreaElement?r.focus():r instanceof HTMLElement?r.click():"focus"in r&&r.focus())},[t]);return Sy({containerRef:e,interactiveRef:t,onClick:s,disabled:n})}const Xz={warning:"warning",error:"error",success:"success"},Zz={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function I6({status:e,statusVariant:t="attached",isInGroup:n=!1,size:s="md"}){const r=Se(),o=t==="tooltip"&&!!(e!=null&&e.message),[l,c]=x.useState(void 0),u=ls({placement:"above",isEnabled:o,isOpen:l}),d=x.useCallback(()=>{c(void 0)},[]),h=x.useCallback(()=>{typeof window>"u"||typeof window.matchMedia!="function"||!window.matchMedia("(hover: none)").matches||c(g=>g!==!0)},[]);if(x.useEffect(()=>{if(l!==!0)return;const g=b=>{b.key==="Escape"&&c(void 0)};return document.addEventListener("keydown",g),()=>document.removeEventListener("keydown",g)},[l]),!(!!e&&!n&&t!=="detached"))return{statusIcon:null,describedBy:void 0};const p=a.jsx(Te,{icon:Xz[e.type],size:s,color:e.type,...W("input-status-icon",{size:s,status:e.type})});return o?{statusIcon:a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",ref:u.ref,"aria-label":r(Zz[e.type]),"aria-describedby":u.describedBy,onClick:h,onBlur:d,className:"x3nfvp2 x6s0dn4 xl56j7k x1717udv x1ghz6dp x1heor9g x1ypdohk xjspbzw x784prv x9v5kkp xzunyri x7s97pk",children:p}),u.renderTooltip(e.message)]}),describedBy:u.describedBy}:{statusIcon:p,describedBy:void 0}}const Ny=x.createContext(null);Ny.displayName="InteractiveRoleContext";function Yz(){return x.use(Ny)}function _6({href:e,onClick:t,isDisabled:n=!1}){const s=Yz();return e!=null&&!n?"link":t!=null?"button":s??"inert"}const Qz=500,Jz=10;function eR(e){const{onLongPress:t,disabled:n=!1,delayMs:s=Qz,moveCancelPx:r=Jz}=e,i=x.useRef(null),o=x.useRef(null),l=x.useRef(t);l.current=t;const c=x.useCallback(()=>{i.current!=null&&(clearTimeout(i.current),i.current=null),o.current=null},[]),u=x.useCallback(h=>{if(n||h.touches.length!==1)return;const f=h.touches[0];c(),o.current={x:f.clientX,y:f.clientY},i.current=setTimeout(()=>{const p=o.current;p!=null&&l.current({x:p.x,y:p.y})},s)},[n,s,c]),d=x.useCallback(h=>{const f=o.current;if(f==null||h.touches.length!==1)return;const p=h.touches[0];(Math.abs(p.clientX-f.x)>r||Math.abs(p.clientY-f.y)>r)&&c()},[r,c]);return x.useEffect(()=>c,[c]),{onTouchStart:u,onTouchMove:d,onTouchEnd:c,onTouchCancel:c}}const Ay=6,tR={x177fznd:"x177fznd",$$css:!0},Yd={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x1ue31p x134zogi x7so5qh x1eb35i0",kSiTet:"xg01cxk xz63v9m x1ceiq2s xhva3ql",kVAEAm:"x10l6tqk xd2i8i8 xw895rg x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xz63v9m x1ceiq2s xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1d23w33",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1d23w33",$$css:!0}},nR={x1e36hu2:"x1e36hu2",$$css:!0},Qd={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xqw8whb x1xhgmdq x7so5qh x1eb35i0",kSiTet:"xg01cxk x7g73g2 x8e9lel xhva3ql",kVAEAm:"x10l6tqk x13sqjsa xxj8d0r x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x7g73g2 x8e9lel xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x19f70rm",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x19f70rm",$$css:!0}},sR={x10zkftw:"x10zkftw",$$css:!0},Jd={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xrhii57 xeozflw x7so5qh x1eb35i0",kSiTet:"xg01cxk xe0m1oz xtpmopf xhva3ql",kVAEAm:"x10l6tqk x1k2a1sm xs5no71 x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xe0m1oz xtpmopf xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xramsae",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xramsae",$$css:!0}},rR={xbjq1vy:"xbjq1vy",$$css:!0},ef={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu xtj9ir3 x1okg2q x7so5qh x1eb35i0",kSiTet:"xg01cxk xnsjgr4 x1y0vk26 xhva3ql",kVAEAm:"x10l6tqk x1cuf62g x1qy2sty x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk xnsjgr4 x1y0vk26 xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x177ftvf",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x177ftvf",$$css:!0}},iR={x3z7t8n:"x3z7t8n",$$css:!0},tf={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x1ybz0u4 x1fpm3bq x7so5qh x1eb35i0",kSiTet:"xg01cxk x1qps2i7 x1a7n03g xhva3ql",kVAEAm:"x10l6tqk xeilikp x1xz04m3 x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x1qps2i7 x1a7n03g xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1k1siky",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr x1k1siky",$$css:!0}},oR={x6dglqq:"x6dglqq",$$css:!0},nf={reveal:{k1ekBW:"x1n1p2mu",kIyJzY:"x1tw3moq xsr0bmt",kAMwcw:"xlr8y92",kzIqYQ:"xd00j3c",kIr0Dl:"x11ixquu x17lvmk x192eg1j x7so5qh x1eb35i0",kSiTet:"xg01cxk x52nu6g xt179ik xhva3ql",kVAEAm:"x10l6tqk x8j1s1q x8gw32m x4k19zs",$$css:!0},revealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"xg01cxk x52nu6g xt179ik xhva3ql",$$css:!0},conceal:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xenj0cg",$$css:!0},concealLayoutPreserved:{k1ekBW:"x19991ni",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kSiTet:"x1hc1fzr xenj0cg",$$css:!0}},aR=[{marker:tR,reveal:Yd.reveal,revealLayoutPreserved:Yd.revealLayoutPreserved,conceal:Yd.conceal,concealLayoutPreserved:Yd.concealLayoutPreserved},{marker:nR,reveal:Qd.reveal,revealLayoutPreserved:Qd.revealLayoutPreserved,conceal:Qd.conceal,concealLayoutPreserved:Qd.concealLayoutPreserved},{marker:sR,reveal:Jd.reveal,revealLayoutPreserved:Jd.revealLayoutPreserved,conceal:Jd.conceal,concealLayoutPreserved:Jd.concealLayoutPreserved},{marker:rR,reveal:ef.reveal,revealLayoutPreserved:ef.revealLayoutPreserved,conceal:ef.conceal,concealLayoutPreserved:ef.concealLayoutPreserved},{marker:iR,reveal:tf.reveal,revealLayoutPreserved:tf.revealLayoutPreserved,conceal:tf.conceal,concealLayoutPreserved:tf.concealLayoutPreserved},{marker:oR,reveal:nf.reveal,revealLayoutPreserved:nf.revealLayoutPreserved,conceal:nf.conceal,concealLayoutPreserved:nf.concealLayoutPreserved}],qg=new Array(Ay).fill(!1);function lR(){for(let e=0;e<Ay;e++)if(!qg[e])return qg[e]=!0,{index:e,isExhausted:!1};return{index:0,isExhausted:!0}}function cR(e,t){t||(qg[e]=!1)}const Pv=Object.freeze({});function uR(e={}){const{isEnabled:t=!0}=e,[n]=x.useState(()=>t?lR():null);if(x.useEffect(()=>{if(n!=null)return()=>cR(n.index,n.isExhausted)},[n]),oc("useContainerReveal",`More than ${Ay} reveal containers are mounted at once; nested containers beyond the pool may share a marker. Add markers to containerReveal.pool.stylex.ts and raise POOL_SIZE.`,(n==null?void 0:n.isExhausted)??!1),n==null)return{getContainerProps:()=>Pv,getContentRevealProps:()=>Pv};const s=aR[n.index];return{getContainerProps:()=>q(s.marker),getContentRevealProps:(r={})=>{const{isRevealInverted:i=!1,isLayoutPreserved:o=!1}=r,l=i?o?s.concealLayoutPreserved:s.conceal:o?s.revealLayoutPreserved:s.reveal;return q(l)}}}const lp={label:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",$$css:!0},labelDisabled:{kMwMTN:"xnbbluu",kkrTdU:"x1h6gzvc",$$css:!0},srOnly:{ksu8eU:"xng3xce",kMcinP:"xzpqnlu",kZKoxP:"xjm9jq1",kLqNvP:"x1o0tod",kogj98:"xkdpibf",kVQacm:"xb3r6kr",kmVPX3:"x1717udv",kfzvcC:"x47corl",kVAEAm:"x10l6tqk",k87sOh:"x13vifvy",kfSwDN:"x87ps6o",khDVqt:"xuxw1ft",kzqmXN:"x1i1rx1s",$$css:!0}};function t1({label:e,inputID:t,labelID:n,isGroupLabel:s=!1,isLabelHidden:r=!1,isDisabled:i=!1,isOptional:o=!1,isRequired:l=!1,labelIcon:c,labelTooltip:u,description:d,descriptionID:h,className:f,style:p,xstyle:g,ref:b,...y}){const m=Se(),k=o?m("@astryx.field.optional"):l?m("@astryx.field.required"):null,w=s?"span":"label",v=!s&&t!=null,j=x.useRef(null),C=x.useMemo(()=>({get current(){var A;return t==null?null:((A=j.current)==null?void 0:A.ownerDocument.getElementById(t))??null},set current(A){}}),[t]),$=Ty({containerRef:j,inputRef:C,disabled:!v}),T=a.jsxs(a.Fragment,{children:[c&&yr(c,{size:"sm",color:"inherit"}),e,k&&a.jsxs("span",{className:"x1sodnla x141an7d x1ltkj2j xv1l7n4",children:[a.jsx("span",{"aria-hidden":"true",children:" ∙ "}),k]}),u&&a.jsx(to,{content:u,placement:"above",children:a.jsx(Te,{icon:"info",size:"sm",color:"inherit"})})]});return a.jsxs(a.Fragment,{children:[a.jsx(w,{ref:b,id:n,htmlFor:s?void 0:t,...y,...K(W("field-label"),q(lp.label,i&&lp.labelDisabled,r&&lp.srOnly,g),f,p),children:T}),d&&a.jsx("span",{ref:v?j:void 0,id:h,...v?$:void 0,...{0:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4"},2:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk"},1:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s"},3:{className:"x9ynric x141an7d x1ltkj2j x1sodnla xv1l7n4 x1ypdohk xng3xce xzpqnlu xjm9jq1 x1o0tod xkdpibf xb3r6kr x1717udv x47corl x10l6tqk x13vifvy x87ps6o xuxw1ft x1i1rx1s"}}[!!v<<1|!!r<<0],children:d})]})}t1.displayName="FieldLabel";const dR={warning:"warning",error:"error",success:"success"},cp={base:{kMv6JI:"x9ynric",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0},attached:{keoZOQ:"x1c40v9y",kLKAdn:"x1ak3mig",kGO01o:"x1wesfrj",kg3NbH:"xf314gf",kVL7Gh:"xquck67",kT0f0o:"x14i3lts",$$css:!0},detached:{keoZOQ:"xcsaf9d",k8WAf4:"xce4md1",kg3NbH:"xf314gf",kaIpWk:"xh6dtrn",$$css:!0}},fR={warning:{kWkggS:"x24i8r5",kMwMTN:"xdhq94a",$$css:!0},error:{kWkggS:"x1pritpl",kMwMTN:"x1joocv1",$$css:!0},success:{kWkggS:"xu13z74",kMwMTN:"xltfdvo",$$css:!0}};function n1({ref:e,type:t,message:n,id:s,variant:r="attached",xstyle:i,className:o,style:l,...c}){const u=Hz("slideDown"),d=lc();return x.useEffect(()=>{n&&d(n,t==="error"?"assertive":"polite")},[d,n,t]),a.jsx("div",{ref:e,id:s,...c,...K(W("field-status",{type:t,variant:r}),q(cp.base,u,r==="attached"?cp.attached:cp.detached,fR[t],i),o,l),children:r==="detached"?a.jsxs("span",{className:"x78zum5 x1cy8zhl xzye2dw",children:[a.jsx("span",{className:"x3nfvp2 x6s0dn4 x14o5nre x2lah0s",children:a.jsx(Te,{icon:dR[t],size:"sm",color:"inherit",...W("field-status-icon",{type:t})})}),a.jsx("span",{children:n})]}):n})}n1.displayName="FieldStatus";const hR={x1tspnpo:"x1tspnpo",$$css:!0},s1=x.createContext(null);s1.displayName="CheckboxListContext";const vn={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},containerLabelHidden:{kOIVth:"xxhr3t",$$css:!0},checkboxWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},checkbox:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"xx3sua9",k1ekBW:"xts7igz",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},checkboxFocus:{kI3sdo:"x1a2a7pz xkri23q",kInvED:"x81n7kt",$$css:!0},checkboxUnchecked:{kMwMTN:"xqwr325",kVAM5u:"xvy26l8 x1jtjlen",kWkggS:"x10xzikg xrsv7h",$$css:!0},checkboxChecked:{kMwMTN:"x17wrial",kVAM5u:"xad5do x1od6ugu",kWkggS:"x1ewilqj x6aeo4j",$$css:!0},checkboxDisabled:{kSiTet:"xbyyjgo",kVAM5u:"x14i3s5s xmt8yqp",$$css:!0},checkboxDisabledUnchecked:{kWkggS:"xwmxj5m x1cjfj8k",$$css:!0},checkmark:{k1xSpc:"x1s85apg",kMwMTN:"x17wrial xs5hli",$$css:!0},checkmarkVisible:{k1xSpc:"x1lliihq",$$css:!0},indeterminateMark:{k1xSpc:"x1s85apg",kWkggS:"x1azo05 xwvh9j7",kaIpWk:"xjspbzw",$$css:!0},indeterminateMarkVisible:{k1xSpc:"x1lliihq",$$css:!0}},Uv={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},xR={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},pR={sm:{kzqmXN:"xsmyaan",kZKoxP:"x1kpxq89",$$css:!0},md:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0}},gR={sm:{kzqmXN:"x1fsd2vl",kZKoxP:"x36qwtl",$$css:!0},md:{kzqmXN:"xsmyaan",kZKoxP:"x36qwtl",$$css:!0}},mR={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function L6({label:e,isLabelHidden:t=!1,description:n,onChange:s,changeAction:r,isLoading:i=!1,value:o,isDisabled:l=!1,htmlName:c,disabledMessage:u,isReadOnly:d=!1,isOptional:h=!1,isRequired:f=!1,size:p="md",onFocus:g,onBlur:b,labelIcon:y,status:m,width:k,xstyle:w,className:v,style:j,ref:C,...$}){const T=x.useId(),A=x.useId(),S=x.useId(),[,_]=x.useTransition(),[M,z]=x.useOptimistic(o),O=i||M!==o,I=l&&!!u,E=x.use(s1),N=l&&(I||((E==null?void 0:E.hasDisabledMessage)??!1)),R=ls({placement:"above",focusTrigger:"always",isEnabled:I}),L=M==="indeterminate",D=M===!0,P=D||L,F=x.useCallback(Q=>{Q&&(Q.indeterminate=L)},[L]),X=[];n&&X.push(A),m!=null&&m.message&&X.push(S),I&&X.push(R.describedBy);const G=X.length>0?X.join(" "):void 0;return a.jsxs("div",{...K(W("checkbox-input",{size:p}),q(k!=null&&mR.width(k),w),v,j),children:[a.jsxs("div",{ref:Q=>{R.interactionRef(Q)},...q(vn.container,t&&vn.containerLabelHidden,!l&&hR),children:[a.jsxs("div",{...q(vn.checkboxWrapper,Uv[p]),children:[a.jsx("input",{...$,ref:mt(C,F,R.positionRef),id:T,type:"checkbox",name:l?void 0:c,checked:D,disabled:l&&!N,"aria-disabled":N?"true":void 0,readOnly:d,required:f,onChange:Q=>{if(l||O||d)return;const ee=Q.target.checked;s==null||s(ee,Q),r&&!Q.defaultPrevented&&_(async()=>{z(ee),await r(ee,Q)})},onFocus:g,onBlur:b,"aria-readonly":d||void 0,"aria-describedby":G,"aria-invalid":(m==null?void 0:m.type)==="error"?!0:void 0,"aria-busy":O||void 0,...q(vn.input,Uv[p],l&&vn.inputDisabled)}),a.jsx("div",{"aria-hidden":"true",...K(W("checkbox",{size:p,checked:D?"checked":L?"indeterminate":null,disabled:l?"disabled":null}),q(vn.checkbox,xR[p],!l&&vn.checkboxFocus,P?vn.checkboxChecked:vn.checkboxUnchecked,l&&vn.checkboxDisabled,l&&!P&&vn.checkboxDisabledUnchecked)),children:O?a.jsx(un,{size:"sm",shade:"inherit"}):a.jsxs(a.Fragment,{children:[a.jsx("svg",{viewBox:"0 0 10 10",...q(vn.checkmark,pR[p],D&&vn.checkmarkVisible),children:a.jsx("path",{d:"M8.5 2.5L4 7.5L1.5 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}),a.jsx("div",{...q(vn.indeterminateMark,gR[p],L&&vn.indeterminateMarkVisible)})]})})]}),a.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:a.jsx(t1,{label:e,inputID:T,isLabelHidden:t,isDisabled:l,isOptional:h,isRequired:f,labelIcon:y,description:n,descriptionID:A})})]}),(m==null?void 0:m.message)&&a.jsx(n1,{type:m.type,message:m.message,id:S,variant:"detached"}),I&&R.renderTooltip(u)]})}L6.displayName="CheckboxInput";function En({icon:e,...t}){return a.jsx(ne,{...t,icon:e,isIconOnly:!0})}En.displayName="IconButton";const Fv={container:{kB7OPa:"x9f619",kZCmMZ:"x1c35znw",kwRFfy:"x64h4k7",kLKAdn:"x14m0hsi",kGO01o:"xc1wllq",$$css:!0}},yR={containerPaddingInlineStart:{"--container-padding-inline-start":"xjmlhfd",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"x1ihxwbr",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x1rqz8me",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1omyuck",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x14rzhog",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"xjej9fs",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x4poyjn",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"x1u1kw4e",$$css:!0}},kR={containerPaddingInlineStart:{"--container-padding-inline-start":"xrgx2ny",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"xyk0j9o",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x876hks",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1u89lk7",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x12sptzx",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"xo78phr",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x1we69p7",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"xsdnkbz",$$css:!0}},bR={containerPaddingInlineStart:{"--container-padding-inline-start":"x1tewnwq",$$css:!0},containerPaddingInlineEnd:{"--container-padding-inline-end":"x11h1f2o",$$css:!0},containerPaddingBlockStart:{"--container-padding-block-start":"x1g2kccc",$$css:!0},containerPaddingBlockEnd:{"--container-padding-block-end":"x1gvthzm",$$css:!0},layoutPaddingOuterX:{"--layout-padding-outer-x":"x1hsjncj",$$css:!0},layoutPaddingOuterY:{"--layout-padding-outer-y":"x1pui4bz",$$css:!0},layoutPaddingInnerX:{"--layout-padding-inner-x":"x2so38",$$css:!0},layoutPaddingInnerY:{"--layout-padding-inner-y":"xinu7xd",$$css:!0}},vR={card:yR,section:kR,dialog:bR},wR={spacing0:{"--container-padding-inline-start":"x1gu2k80",$$css:!0},spacing0_5:{"--container-padding-inline-start":"x14ws0sr",$$css:!0},spacing1:{"--container-padding-inline-start":"x1cvlban",$$css:!0},spacing1_5:{"--container-padding-inline-start":"x176g23i",$$css:!0},spacing2:{"--container-padding-inline-start":"x1xlrr2o",$$css:!0},spacing3:{"--container-padding-inline-start":"xfdwxua",$$css:!0},spacing4:{"--container-padding-inline-start":"x1dlhslv",$$css:!0},spacing5:{"--container-padding-inline-start":"x1s81nki",$$css:!0},spacing6:{"--container-padding-inline-start":"x1ep0dkj",$$css:!0},spacing7:{"--container-padding-inline-start":"x157xojc",$$css:!0},spacing8:{"--container-padding-inline-start":"xw1diwv",$$css:!0},spacing9:{"--container-padding-inline-start":"xraca2a",$$css:!0},spacing10:{"--container-padding-inline-start":"xserb3f",$$css:!0},spacing11:{"--container-padding-inline-start":"xziclwo",$$css:!0},spacing12:{"--container-padding-inline-start":"x1iiwihq",$$css:!0}},jR={spacing0:{"--container-padding-inline-end":"x91ghl5",$$css:!0},spacing0_5:{"--container-padding-inline-end":"x1wz3t3y",$$css:!0},spacing1:{"--container-padding-inline-end":"x2oyxnl",$$css:!0},spacing1_5:{"--container-padding-inline-end":"xntetml",$$css:!0},spacing2:{"--container-padding-inline-end":"xcas3b9",$$css:!0},spacing3:{"--container-padding-inline-end":"xu0ipoa",$$css:!0},spacing4:{"--container-padding-inline-end":"xs0pscg",$$css:!0},spacing5:{"--container-padding-inline-end":"xgkj7vj",$$css:!0},spacing6:{"--container-padding-inline-end":"x94cj42",$$css:!0},spacing7:{"--container-padding-inline-end":"x11tj35w",$$css:!0},spacing8:{"--container-padding-inline-end":"x1b9k1pi",$$css:!0},spacing9:{"--container-padding-inline-end":"x19w02kr",$$css:!0},spacing10:{"--container-padding-inline-end":"xx5lg5w",$$css:!0},spacing11:{"--container-padding-inline-end":"x1nmgbqg",$$css:!0},spacing12:{"--container-padding-inline-end":"x1wsfsk2",$$css:!0}},SR={spacing0:{"--container-padding-block-start":"x1i3qcxz",$$css:!0},spacing0_5:{"--container-padding-block-start":"xvdf9ev",$$css:!0},spacing1:{"--container-padding-block-start":"xnsckjb",$$css:!0},spacing1_5:{"--container-padding-block-start":"x1kbx601",$$css:!0},spacing2:{"--container-padding-block-start":"xa8b4fq",$$css:!0},spacing3:{"--container-padding-block-start":"x11k4f5r",$$css:!0},spacing4:{"--container-padding-block-start":"xm01sq8",$$css:!0},spacing5:{"--container-padding-block-start":"xp8wdkl",$$css:!0},spacing6:{"--container-padding-block-start":"x1hmud4d",$$css:!0},spacing7:{"--container-padding-block-start":"x1c00sag",$$css:!0},spacing8:{"--container-padding-block-start":"xfv60at",$$css:!0},spacing9:{"--container-padding-block-start":"x14fzdu7",$$css:!0},spacing10:{"--container-padding-block-start":"x17h9kl7",$$css:!0},spacing11:{"--container-padding-block-start":"x1rdjxae",$$css:!0},spacing12:{"--container-padding-block-start":"xecwdl6",$$css:!0}},CR={spacing0:{"--container-padding-block-end":"xkunwnr",$$css:!0},spacing0_5:{"--container-padding-block-end":"x1cao3zv",$$css:!0},spacing1:{"--container-padding-block-end":"x57a7ii",$$css:!0},spacing1_5:{"--container-padding-block-end":"xv53x8y",$$css:!0},spacing2:{"--container-padding-block-end":"x1lsgcmx",$$css:!0},spacing3:{"--container-padding-block-end":"x1q3ppug",$$css:!0},spacing4:{"--container-padding-block-end":"x4hfsld",$$css:!0},spacing5:{"--container-padding-block-end":"xbib2ws",$$css:!0},spacing6:{"--container-padding-block-end":"x1q8d17g",$$css:!0},spacing7:{"--container-padding-block-end":"x1yqogew",$$css:!0},spacing8:{"--container-padding-block-end":"x8lgq76",$$css:!0},spacing9:{"--container-padding-block-end":"x1f7f9rt",$$css:!0},spacing10:{"--container-padding-block-end":"x15vxphk",$$css:!0},spacing11:{"--container-padding-block-end":"x4bg2x9",$$css:!0},spacing12:{"--container-padding-block-end":"x186mjxr",$$css:!0}},$R={spacing0:{"--layout-padding-outer-x":"xswhm3q",$$css:!0},spacing0_5:{"--layout-padding-outer-x":"xihiwg7",$$css:!0},spacing1:{"--layout-padding-outer-x":"xc96xmq",$$css:!0},spacing1_5:{"--layout-padding-outer-x":"x1u93lgd",$$css:!0},spacing2:{"--layout-padding-outer-x":"x15dxnc0",$$css:!0},spacing3:{"--layout-padding-outer-x":"xadgj3j",$$css:!0},spacing4:{"--layout-padding-outer-x":"x1v56qcf",$$css:!0},spacing5:{"--layout-padding-outer-x":"x1nzs0gl",$$css:!0},spacing6:{"--layout-padding-outer-x":"x1c3n52a",$$css:!0},spacing7:{"--layout-padding-outer-x":"x1gfiokx",$$css:!0},spacing8:{"--layout-padding-outer-x":"x1t3kfz",$$css:!0},spacing9:{"--layout-padding-outer-x":"xzr4qsh",$$css:!0},spacing10:{"--layout-padding-outer-x":"x1jdf5a4",$$css:!0},spacing11:{"--layout-padding-outer-x":"x1hct0t0",$$css:!0},spacing12:{"--layout-padding-outer-x":"x11cyqoe",$$css:!0}},ER={spacing0:{"--layout-padding-outer-y":"x1mzf5mb",$$css:!0},spacing0_5:{"--layout-padding-outer-y":"x1vj96e0",$$css:!0},spacing1:{"--layout-padding-outer-y":"x1gpfxoh",$$css:!0},spacing1_5:{"--layout-padding-outer-y":"xd3dqby",$$css:!0},spacing2:{"--layout-padding-outer-y":"x10pz7y9",$$css:!0},spacing3:{"--layout-padding-outer-y":"x1p6yq3h",$$css:!0},spacing4:{"--layout-padding-outer-y":"xx738ci",$$css:!0},spacing5:{"--layout-padding-outer-y":"x6yxws5",$$css:!0},spacing6:{"--layout-padding-outer-y":"x180vrwl",$$css:!0},spacing7:{"--layout-padding-outer-y":"x1q6rme1",$$css:!0},spacing8:{"--layout-padding-outer-y":"xid7e43",$$css:!0},spacing9:{"--layout-padding-outer-y":"x1t5kicu",$$css:!0},spacing10:{"--layout-padding-outer-y":"x26l4wa",$$css:!0},spacing11:{"--layout-padding-outer-y":"x10zktp0",$$css:!0},spacing12:{"--layout-padding-outer-y":"x1yz3n6a",$$css:!0}},TR={spacing0:{"--layout-padding-inner-x":"xj1bl4l",$$css:!0},spacing0_5:{"--layout-padding-inner-x":"xlriy2h",$$css:!0},spacing1:{"--layout-padding-inner-x":"x6uuyak",$$css:!0},spacing1_5:{"--layout-padding-inner-x":"xd38f90",$$css:!0},spacing2:{"--layout-padding-inner-x":"xxqksqd",$$css:!0},spacing3:{"--layout-padding-inner-x":"x1fyui2f",$$css:!0},spacing4:{"--layout-padding-inner-x":"x1i2ajwi",$$css:!0},spacing5:{"--layout-padding-inner-x":"x1tac27u",$$css:!0},spacing6:{"--layout-padding-inner-x":"x1ntgf3t",$$css:!0},spacing7:{"--layout-padding-inner-x":"xhjd9tl",$$css:!0},spacing8:{"--layout-padding-inner-x":"xn7c84u",$$css:!0},spacing9:{"--layout-padding-inner-x":"xeqkbsz",$$css:!0},spacing10:{"--layout-padding-inner-x":"x1vf4qco",$$css:!0},spacing11:{"--layout-padding-inner-x":"xsmamsf",$$css:!0},spacing12:{"--layout-padding-inner-x":"x2xk2xj",$$css:!0}},NR={spacing0:{"--layout-padding-inner-y":"xwuefyo",$$css:!0},spacing0_5:{"--layout-padding-inner-y":"x180h0y5",$$css:!0},spacing1:{"--layout-padding-inner-y":"xmpug6m",$$css:!0},spacing1_5:{"--layout-padding-inner-y":"x1g8jpzm",$$css:!0},spacing2:{"--layout-padding-inner-y":"x1lksgje",$$css:!0},spacing3:{"--layout-padding-inner-y":"x4j7gld",$$css:!0},spacing4:{"--layout-padding-inner-y":"x1s3ehtl",$$css:!0},spacing5:{"--layout-padding-inner-y":"x1rj5eim",$$css:!0},spacing6:{"--layout-padding-inner-y":"x1ftgg6u",$$css:!0},spacing7:{"--layout-padding-inner-y":"x1ho74vh",$$css:!0},spacing8:{"--layout-padding-inner-y":"xm2cs6f",$$css:!0},spacing9:{"--layout-padding-inner-y":"x1vsq92b",$$css:!0},spacing10:{"--layout-padding-inner-y":"x18gbwmk",$$css:!0},spacing11:{"--layout-padding-inner-y":"x14zymzj",$$css:!0},spacing12:{"--layout-padding-inner-y":"xzfpkx9",$$css:!0}},AR={containerMaxHeight:e=>[{"--container-max-height":e!=null?"x18nyedi":e,$$css:!0},{"--x---container-max-height":e??void 0}]};function O6({padding:e="spacing4",paddingOuterX:t,paddingOuterY:n,paddingInnerX:s,paddingInnerY:r,useThemeDefault:i,maxHeight:o}){const l=t??e,c=n??e,u=s??e,d=r??e,h=o?AR.containerMaxHeight(o):null;if(i){const f=vR[i];return[Fv.container,f.containerPaddingInlineStart,f.containerPaddingInlineEnd,f.containerPaddingBlockStart,f.containerPaddingBlockEnd,f.layoutPaddingOuterX,f.layoutPaddingOuterY,f.layoutPaddingInnerX,f.layoutPaddingInnerY,h]}return[Fv.container,wR[l],jR[l],SR[c],CR[c],$R[l],ER[c],TR[u],NR[d],h]}const up={card:{"--_card-radius":"x2kkz0m",kaIpWk:"x153u1i6",kVQacm:"x7giv3",kGVxlE:"x1p8z4y0",$$css:!0},withBorder:{kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",kZCmMZ:"xs19ii7",kwRFfy:"x12frdag",kLKAdn:"x1nex4ik",kGO01o:"xbv1mwh",$$css:!0},scrollable:{kVQacm:"xysyzu8",$$css:!0}},MR={default:{kWkggS:"x1de1mus",$$css:!0},transparent:{kWkggS:"xjbqb8w",$$css:!0},muted:{kWkggS:"xwmxj5m",$$css:!0},blue:{kWkggS:"x1o0wnni",$$css:!0},cyan:{kWkggS:"x1rgj867",$$css:!0},gray:{kWkggS:"xspzpui",$$css:!0},green:{kWkggS:"x1sqjeoo",$$css:!0},orange:{kWkggS:"x1e9xt6e",$$css:!0},pink:{kWkggS:"xnpoty2",$$css:!0},purple:{kWkggS:"x16i6n6f",$$css:!0},red:{kWkggS:"x1cibrc5",$$css:!0},teal:{kWkggS:"x1jtji5o",$$css:!0},yellow:{kWkggS:"x1bo7t0x",$$css:!0}},zR={none:{"--_card-elevation":"xw28qpl",$$css:!0},low:{"--_card-elevation":"x1nn8khe",$$css:!0},med:{"--_card-elevation":"x1ovzxg0",$$css:!0},high:{"--_card-elevation":"xnpe7fx",$$css:!0}},RR={sizing:(e,t,n,s)=>[{kzqmXN:e!=null?"x5lhr3w":e,kZKoxP:t!=null?"x16ye13r":t,ks0D6T:n!=null?"xf68679":n,kAzted:s!=null?"x82snj4":s,$$css:!0},{"--x-width":(r=>typeof r=="number"?r+"px":r??void 0)(e),"--x-height":(r=>typeof r=="number"?r+"px":r??void 0)(t),"--x-maxWidth":(r=>typeof r=="number"?r+"px":r??void 0)(n),"--x-minHeight":(r=>typeof r=="number"?r+"px":r??void 0)(s)}]};function r1({width:e,height:t,maxWidth:n,minHeight:s,children:r,padding:i,variant:o="default",elevation:l="none",xstyle:c,className:u,style:d,ref:h,...f}){const p=t!=null&&t!=="auto",g=i==null,b=i??4,y=j4[b];return a.jsx("div",{ref:h,...K(W("card",{variant:o}),q(up.card,MR[o],zR[l],p&&up.scrollable,RR.sizing(e??null,t??null,n??null,s??null),...O6(g?{useThemeDefault:"card"}:{paddingInnerX:y,paddingInnerY:y,paddingOuterX:y,paddingOuterY:y}),!g&&b!==4&&ec[b],!g&&b!==4&&tc[b],!g&&b!==4&&nc[b],!g&&b!==4&&sc[b],o==="default"&&up.withBorder,c),u,d),...f,children:r})}r1.displayName="Card";const sf={base:{k1xSpc:"xjp7ctv",kMwMTN:"x1tgivj0",kMv6JI:"x9ynric",$$css:!0},light:{kQNsl9:"x19aimcq",$$css:!0},dark:{kQNsl9:"xntwwlm",$$css:!0},system:{kQNsl9:"x108lcm5",$$css:!0}},Hg=Gx.createContext(!1);Hg.displayName="ThemeNestingContext";const dp=new Set;function IR(e){const t=x.useId();x.useInsertionEffect(()=>{if(e.__built)return;const n=`astryx-theme-${e.name}`;if(dp.has(n))return;xy(`theme-injection:${e.name}`,"Theme",`"${e.name}" is using runtime style injection. For better performance, use the pre-built theme:
|
|
77
|
-
|
|
78
|
-
import {${e.name}Theme} from '@astryxdesign/theme-${e.name}/built';
|
|
79
|
-
import '@astryxdesign/theme-${e.name}/theme.css';
|
|
80
|
-
|
|
81
|
-
For custom themes, run \`npx @astryxdesign/cli theme build <file>\` to generate the built artifacts.`);const{prose:s,component:r}=KN(e);if(!(!s&&!r)){if(s){const i=document.createElement("style");i.setAttribute(_n("theme-prose"),e.name),i.setAttribute(_n("id"),t),i.textContent=`@layer reset {
|
|
82
|
-
${s}
|
|
83
|
-
}`,document.head.appendChild(i)}if(r){const i=document.createElement("style");i.setAttribute(_n("theme"),e.name),i.setAttribute(_n("id"),t),i.textContent=`@layer astryx-theme {
|
|
84
|
-
${r}
|
|
85
|
-
}`,document.head.appendChild(i)}return dp.add(n),()=>{const i=document.querySelector(`style[${_n("theme-prose")}="${e.name}"][${_n("id")}="${t}"]`),o=document.querySelector(`style[${_n("theme")}="${e.name}"][${_n("id")}="${t}"]`);i==null||i.remove(),o==null||o.remove(),dp.delete(n)}}},[e,t])}function _R(e,t,n){xr(()=>{if(!e&&!(typeof document>"u"))return t==="light"||t==="dark"?document.documentElement.setAttribute("data-theme",t):document.documentElement.removeAttribute("data-theme"),document.documentElement.setAttribute(_n("theme"),n),()=>{document.documentElement.removeAttribute("data-theme"),document.documentElement.removeAttribute(_n("theme"))}},[e,t,n])}function D6({theme:e,mode:t="system",children:n}){const s=x.use(Hg);LN(e),IR(e),_R(s,t,e.name);const r=t==="dark"?sf.dark:t==="light"?sf.light:sf.system,i=x.useMemo(()=>({theme:e,mode:t}),[e,t]);return a.jsx(Zx,{value:i,children:a.jsx(Hg,{value:!0,children:a.jsx("div",{...q(sf.base,r),"data-astryx-theme":e.name,"data-theme":t==="system"?void 0:t,children:n})})})}D6.displayName="Theme";function B6({mode:e,children:t}){return a.jsx("div",{[_n("media")]:e,className:"xjp7ctv x1tgivj0",children:t})}B6.displayName="MediaTheme";const q6="--color-syntax-";function LR(e){return q6+e}const OR=Object.keys(gy).map(e=>e.replace(q6,""));function DR(e){const t={};for(const n of OR)t[LR(n)]=e.tokens[n];return t}const H6=x.createContext(null);H6.displayName="SyntaxThemeContext";function P6({theme:e,children:t}){const n=x.useMemo(()=>DR(e),[e]),s=x.useMemo(()=>({theme:e}),[e]);return a.jsx(H6,{value:s,children:a.jsx("div",{style:n,"data-astryx-syntax-theme":e.name,children:t})})}P6.displayName="SyntaxTheme";function U6({type:e,body:t,endContent:n,isAutoHide:s,autoHideDuration:r,isExiting:i=!1,onDismiss:o}){const l=Se(),c=x.useRef(null),u=x.useRef(!1),d=x.useRef(r),h=x.useRef(null),f=x.useRef(o);f.current=o;const p=x.useCallback(()=>{!s||u.current||(c.current&&clearTimeout(c.current),h.current=Date.now(),c.current=setTimeout(()=>{f.current("auto")},d.current))},[s]),g=x.useCallback(()=>{if(!(!s||u.current)&&(u.current=!0,c.current&&(clearTimeout(c.current),c.current=null),h.current!=null)){const v=Date.now()-h.current;d.current=Math.max(d.current-v,1e3)}},[s]),b=x.useCallback(()=>{!s||!u.current||(u.current=!1,p())},[s,p]);x.useEffect(()=>(d.current=r,p(),()=>{c.current&&clearTimeout(c.current)}),[r,p]),x.useEffect(()=>{if(s)return window.addEventListener("blur",g),window.addEventListener("focus",b),()=>{window.removeEventListener("blur",g),window.removeEventListener("focus",b)}},[s,g,b]);const y=x.useCallback(()=>{o("manual")},[o]),m=e==="error",{mode:k}=Yx(),w=m||k==="light"?"dark":"light";return a.jsx("div",{role:m?"alert":"status","aria-live":m?"assertive":"polite","aria-atomic":"true",onMouseEnter:g,onMouseLeave:b,onFocusCapture:g,onBlurCapture:b,...K(W("toast",{type:e}),{0:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x1hc1fzr x9ynric xjm74w1 xw6l6zx xnn1q72 x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 xenstv7"},2:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x1hc1fzr x9ynric xjm74w1 xw6l6zx xnn1q72 x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 x1l5t2a3"},1:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 xenstv7 xg01cxk x1lm5u"},3:{className:"x1na6nto x1pzlopt x1hviunn x1l2rt3b xxtfdz8 x14hfi27 x9ynric xjm74w1 xw6l6zx x6o7n8i xuedmi6 xsagj69 xlr8y92 x4itv7f x1tswlu5 x1l5t2a3 xg01cxk x1lm5u"}}[!!m<<1|!!i<<0]),children:a.jsx(B6,{mode:w,children:a.jsxs("div",{className:"x78zum5 x1cy8zhl xjcht0a xh8yej3",children:[a.jsx("div",{className:"x98rzlu xeuugli",children:t}),a.jsxs("div",{className:"x2lah0s x78zum5 x6s0dn4 x1txdalj xacfrgf xmequkd",children:[n,a.jsx(ne,{variant:"ghost",size:"sm",icon:a.jsx(Te,{icon:"close",size:"sm",color:"inherit"}),label:l("@astryx.toast.dismiss"),onClick:y,isIconOnly:!0})]})]})})})}U6.displayName="Toast";const i1=x.createContext(null);i1.displayName="ToastContext";const Oc={viewport:{kVAEAm:"xixxii4",kY2c9j:"x6cuj84",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kmVPX3:"x1shk3sm",kfzvcC:"x47corl",kpwlN0:"xh3736h",kogj98:"x1ghz6dp",kWkggS:"xjbqb8w",kVQacm:"x1rea2x4",$$css:!0},bottomEnd:{krVfgx:"x1ey2m1c",kt4wiu:"xtijo5x",kGNEyG:"xuk3077",$$css:!0},bottomStart:{krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kGNEyG:"x1cy8zhl",$$css:!0},topEnd:{k87sOh:"x13vifvy",kt4wiu:"xtijo5x",kGNEyG:"xuk3077",kXwgrk:"x3ieub6",$$css:!0},topStart:{k87sOh:"x13vifvy",kLqNvP:"x1o0tod",kGNEyG:"x1cy8zhl",kXwgrk:"x3ieub6",$$css:!0}};function Pg(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(Pg).filter(Boolean).join(" ");if(x.isValidElement(e)){const{children:t}=e.props;return Pg(t)}return""}function My({position:e="bottomEnd",maxVisible:t=5,inset:n,isTopLayer:s=!0,children:r}){const i=Se(),[o,l]=x.useState([]),[c,u]=x.useState(new Set),d=x.useRef(o);d.current=o;const h=x.useRef(null),f=x.useRef(new Set),p=x.useRef(null),g=x.useRef(null),b=x.useRef(null),y=x.useCallback(_=>{if(!_)return null;const M=_.querySelectorAll(S6);for(const z of M)if(!(z.getAttribute("tabindex")==="-1"||z.hasAttribute("disabled")||z.getAttribute("aria-disabled")==="true"))return z;return null},[]),m=lc(),k=x.useCallback(_=>{const{uniqueID:M,collisionBehavior:z="overwrite"}=_.options;if(M&&z==="ignore"&&d.current.some(I=>I.options.uniqueID===M))return;const O=Pg(_.options.body);O&&m(O,_.options.type==="error"?"assertive":"polite"),l(I=>M&&I.find(N=>N.options.uniqueID===M)?I.map(N=>N.options.uniqueID===M?_:N):[...I,_])},[m]),w=x.useCallback((_,M)=>{var N,R;if(f.current.has(_))return;f.current.add(_);const z=d.current.find(L=>L.id===_);z&&((R=(N=z.options).onHide)==null||R.call(N,M));const O=h.current,I=document.activeElement,E=(O==null?void 0:O.querySelector(`[data-toast-id="${_}"]`))??null;if(E&&I instanceof Node&&E.contains(I))if(g.current=_,d.current.filter(D=>D.id!==_).length>0){const D=d.current.findIndex(F=>F.id===_),P=d.current[D+1]??d.current[D-1];b.current=P?P.id:"restore"}else b.current="restore";u(L=>L.has(_)?L:new Set(L).add(_))},[]),v=x.useCallback(_=>{f.current.delete(_),u(M=>{if(!M.has(_))return M;const z=new Set(M);return z.delete(_),z}),l(M=>M.filter(z=>z.id!==_))},[]);x.useLayoutEffect(()=>{const _=g.current,M=b.current;if(_==null||M==null||o.some(I=>I.id===_))return;g.current=null,b.current=null;const z=h.current;if(M!=="restore"&&z){const I=z.querySelector(`[data-toast-id="${M}"]`),E=y(I)??I;if(E){E.focus();return}}const O=p.current;p.current=null,O&&O.isConnected?O.focus():z&&z.focus()},[o,y]);const j=x.useCallback(_=>d.current.find(M=>M.options.uniqueID===_),[]),C=x.useMemo(()=>({addToast:k,removeToast:w,findByUniqueID:j}),[k,w,j]),$=o.slice(-t),T={};n!=null&&n.top&&(T.top=n.top),n!=null&&n.bottom&&(T.bottom=n.bottom),n!=null&&n.start&&(T.insetInlineStart=n.start),n!=null&&n.end&&(T.insetInlineEnd=n.end),x.useEffect(()=>{if(!s)return;const _=h.current;if(_&&typeof _.showPopover=="function")try{_.showPopover()}catch{}},[s]);const A=o.length>0;x.useEffect(()=>{if(!A)return;const _=M=>{if(M.key!=="F6")return;const z=h.current;if(!z)return;const O=document.activeElement;if(O instanceof Node&&z.contains(O))return;M.preventDefault(),O instanceof HTMLElement&&(p.current=O);const I=z.querySelectorAll("[data-toast-id]"),E=I[I.length-1]??null;(y(E)??E??z).focus()};return document.addEventListener("keydown",_),()=>{document.removeEventListener("keydown",_)}},[A,y]);const S=e==="topEnd"?Oc.topEnd:e==="topStart"?Oc.topStart:e==="bottomStart"?Oc.bottomStart:Oc.bottomEnd;return a.jsxs(i1,{value:C,children:[r,a.jsx("div",{ref:h,role:"region","aria-label":i("@astryx.toast.viewport"),tabIndex:-1,popover:s?"manual":void 0,...K(q(Oc.viewport,S),{style:Object.keys(T).length>0?T:void 0}),children:$.map(_=>{const M=_.options,z=M.type??"info",O=M.isAutoHide??z!=="error",I=M.autoHideDuration??5e3,E=c.has(_.id);return a.jsx("div",{"data-toast-id":_.id,...{0:{className:"x67bb7w xrvj5dj x1tu4anv xvmdzux xjshnde xuedmi6 xsagj69 xlr8y92 x1sopeo2 x5rzir7"},1:{className:"x67bb7w xrvj5dj xjshnde xuedmi6 xsagj69 xlr8y92 x1sopeo2 x5rzir7 xihq33y x18d9i69"}}[!!E<<0],onTransitionEnd:E?N=>{N.propertyName==="grid-template-rows"&&v(_.id)}:void 0,children:a.jsx("div",{className:"xb3r6kr",children:a.jsx(U6,{type:z,body:M.body,endContent:M.endContent,isAutoHide:O,autoHideDuration:I,isExiting:E,onDismiss:N=>w(_.id,N)})})},_.id)})})]})}My.displayName="ToastViewport";const Gv='button, [role="button"]';function Vv(e){return e.matches(Gv)?e:e.querySelector(Gv)}const di={contentPadding:{kLKAdn:"x1vlblms",kGO01o:"xvmdzux",kZCmMZ:"x126nfab",kwRFfy:"x1t818jl",$$css:!0},gap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},customWidth:e=>[{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}],matchTrigger:{k7Eaqz:"xrzjruh",$$css:!0}};function F6({children:e,anchorRef:t,content:n,placement:s="below",alignment:r="start",isOpen:i,onOpenChange:o,isEnabled:l=!0,width:c,label:u,role:d="dialog",isModal:h,hasCloseButton:f,closeButtonLabel:p,hasAutoFocus:g,hasLightDismiss:b=!0,hasEscapeDismiss:y=!0,xstyle:m,className:k,style:w,"data-testid":v}){const j=x.useRef(null),C=i!==void 0,$=x.useRef(0),T=x.useCallback(()=>{o==null||o(!0)},[o]),A=x.useCallback(()=>{$.current=Date.now(),o==null||o(!1)},[o]),S=kd({dialogLabel:u,role:d,isModal:h,hasLightDismiss:b,hasEscapeDismiss:y,hasCloseButton:f,closeButtonLabel:p,hasAutoFocus:g,onShow:T,onHide:A}),_=x.useCallback(()=>{l&&(Date.now()-$.current<50||S.toggle())},[l,S]),M=x.useCallback(E=>{(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),_())},[_]),z=x.useCallback(E=>{E.setAttribute("aria-haspopup",S.triggerProps["aria-haspopup"]),E.setAttribute("aria-expanded",String(S.triggerProps["aria-expanded"])),E.setAttribute("aria-controls",S.triggerProps["aria-controls"]),E.addEventListener("click",_);const N=E.tagName!=="BUTTON"&&E.getAttribute("role")==="button";return N&&E.addEventListener("keydown",M),()=>{E.removeAttribute("aria-haspopup"),E.removeAttribute("aria-expanded"),E.removeAttribute("aria-controls"),E.removeEventListener("click",_),N&&E.removeEventListener("keydown",M)}},[S,_,M]);xr(()=>{if(!t)return;const E=t.current;if(!E)return;const N=Vv(E);if(N||qo(),!N)return;S.triggerRef(E);const R=z(N);return()=>{S.triggerRef(null),R()}},[t,S,z]),xr(()=>{if(t||typeof e=="function")return;const E=j.current;if(!E)return;S.triggerRef(E);const N=Vv(E);if(N||qo(),!N)return;const R=z(N);return()=>{S.triggerRef(null),R()}},[t,S,z]),xr(()=>{C&&(i&&!S.isOpen?S.show():!i&&S.isOpen&&S.hide())},[i,C,S]);const O=c?di.customWidth(c):di.matchTrigger;if(t&&e==null)return a.jsx(a.Fragment,{children:S.render(a.jsx("div",{"data-testid":v,...K(W("popover"),q(di.contentPadding,m),k,w),children:n}),{placement:s,alignment:r,xstyle:[O,di.gap,Ur[s]]})});if(typeof e=="function"){const E={ref:S.triggerRef,onClick:_,"aria-haspopup":"dialog","aria-expanded":S.isOpen,"aria-controls":S.id};return a.jsxs(a.Fragment,{children:[e(E),S.render(a.jsx("div",{"data-testid":v,...K(W("popover"),q(di.contentPadding,m),k,w),children:n}),{placement:s,alignment:r,xstyle:[O,di.gap,Ur[s]]})]})}return a.jsxs(a.Fragment,{children:[a.jsx(Ny,{value:"button",children:a.jsx("div",{ref:j,className:"x3nfvp2",children:e})}),S.render(a.jsx("div",{"data-testid":v,...K(W("popover"),q(di.contentPadding,m),k,w),children:n}),{placement:s,alignment:r,xstyle:[O,di.gap,Ur[s]]})]})}F6.displayName="Popover";const fp={container:{kWkggS:"x10xzikg","--_hovercard-radius":"xqwz7mz",kaIpWk:"x7a53xk",kGVxlE:"x14hfi27",$$css:!0},marginBlock:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",keTefX:"x1lziwak",k71WvV:"x14z9mp",$$css:!0},marginInline:{keoZOQ:"xdj266r",k1K539:"xat24cr",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0}};function BR(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function qR(e={}){const{placement:t="above",alignment:n="center",delay:s=300,hideDelay:r=200,focusTrigger:i="auto",isEnabled:o=!0,label:l,isOpen:c,isDefaultOpen:u=!1,onShow:d,onHide:h}=e,f=t==="above"||t==="below"?fp.marginBlock:fp.marginInline,p=rc({mode:"context",onShow:d,onHide:h}),g=x.useMemo(()=>[fp.container,f],[f]),b=x.useRef(null),y=x.useRef(null),m=x.useRef(null),k=x.useRef(!1),w=x.useRef(!1),v=x.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),y.current&&(clearTimeout(y.current),y.current=null)},[]),j=x.useCallback(()=>{!o||c===!1||(v(),b.current=setTimeout(()=>{p.show()},s))},[o,c,v,p,s]),C=x.useCallback(()=>{c!==!0&&(v(),y.current=setTimeout(()=>{k.current||p.hide()},r))},[c,v,p,r]),$=x.useCallback(()=>{j()},[j]),T=x.useCallback(()=>{C()},[C]),A=x.useCallback(()=>{if(o){if(w.current){w.current=!1;return}v(),p.show()}},[o,v,p]),S=x.useCallback(I=>{const E=I.relatedTarget,N=document.getElementById(p.id);N!=null&&N.contains(E)||C()},[p.id,C]),_=x.useCallback(I=>{I.key==="Escape"&&(I.stopPropagation(),v(),p.hide())},[v,p]),M=x.useCallback(I=>{m.current&&(m.current.removeEventListener("mouseenter",$),m.current.removeEventListener("mouseleave",T),m.current.removeEventListener("focusin",A),m.current.removeEventListener("focusout",S),m.current.removeEventListener("keydown",_)),I&&(I.addEventListener("mouseenter",$),I.addEventListener("mouseleave",T),(i==="always"||i==="auto"&&BR(I))&&(I.addEventListener("focusin",A),I.addEventListener("focusout",S)),I.addEventListener("keydown",_)),m.current=I},[i,$,T,A,S,_]),z=x.useCallback(I=>{p.ref(I),M(I)},[p,M]);x.useEffect(()=>()=>{v()},[v]),x.useEffect(()=>{u&&p.show()},[]),x.useEffect(()=>{c!==void 0&&(c?(v(),p.show()):(v(),p.hide()))},[c,v,p]);const O=x.useCallback((I,E)=>{const N=(E==null?void 0:E.placement)??t,R=W("hovercard").className,L={placement:N,alignment:(E==null?void 0:E.alignment)??n,role:l?"dialog":"group","aria-label":l||void 0,xstyle:[g,Ur[N],E==null?void 0:E.xstyle],className:E!=null&&E.className?`${R} ${E.className}`:R,style:E==null?void 0:E.style,as:"span"};return p.render(a.jsx("span",{className:"x1lliihq x1vlblms xvmdzux x126nfab x1t818jl",onMouseEnter:()=>{k.current=!0,v()},onMouseLeave:()=>{k.current=!1,C()},onKeyDown:D=>{var P;D.key==="Escape"&&(D.stopPropagation(),w.current=!0,v(),p.hide(),(P=m.current)==null||P.focus())},onBlur:D=>{var X;const P=D.relatedTarget;D.currentTarget.contains(P)||(X=m.current)!=null&&X.contains(P)||C()},children:I}),L)},[p,t,n,l,v,C,g]);return{ref:z,positionRef:p.ref,interactionRef:M,anchorId:p.anchorId,describedBy:p.id,renderHoverCard:O,show:p.show,hide:p.hide}}function HR(e){return typeof e=="string"||typeof e=="number"}function PR(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function G6({children:e,content:t,placement:n="above",alignment:s="center",delay:r=300,hideDelay:i=200,focusTrigger:o="auto",isEnabled:l=!0,label:c,onOpenChange:u,hasHoverIndication:d="auto",isOpen:h,isDefaultOpen:f,xstyle:p,className:g,style:b}){const y=x.useRef(null),m=HR(e),k=d===!0||d==="auto"&&m,w=x.useCallback(()=>{u==null||u(!0)},[u]),v=x.useCallback(()=>{u==null||u(!1)},[u]),j=qR({placement:n,alignment:s,delay:r,hideDelay:i,focusTrigger:o,isEnabled:l,label:c,isOpen:h,isDefaultOpen:f,onShow:w,onHide:v});xr(()=>{if(m)return;const $=y.current;if(!$)return;const T=$.firstElementChild;if(!T)return;j.ref(T);const A=T.getAttribute("aria-describedby");return T.setAttribute("aria-describedby",PR(A,j.describedBy)??""),()=>{j.ref(null),A?T.setAttribute("aria-describedby",A):T.removeAttribute("aria-describedby")}},[m,j.ref,j.describedBy]);const C=j.renderHoverCard(t,{xstyle:p,className:g,style:b});return m?a.jsxs(a.Fragment,{children:[a.jsx("span",{ref:j.ref,tabIndex:0,"aria-describedby":j.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 x11b3rvo"}}[!!k<<0],children:e}),C]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{ref:y,className:"xjp7ctv",children:e}),C]})}G6.displayName="HoverCard";const Wv=new Map,UR=/\b(const|let|var|function|class|if|else|for|while|return|import|export|from|default|async|await|try|catch|throw|new|typeof|instanceof|interface|type|enum|extends|implements|switch|case|break|continue|do|in|of|void|null|undefined|true|false|this|super|yield|delete|static|public|private|protected|readonly|abstract|as|is|keyof|declare|module|namespace|require)\b/,FR=/\b(def|class|if|elif|else|for|while|return|import|from|as|with|try|except|raise|True|False|None|and|or|not|in|is|lambda|yield|async|await|pass|break|continue|del|global|nonlocal|assert|finally|print|self|cls)\b/,GR=/\b(if|then|else|elif|fi|for|do|done|while|until|case|esac|function|in|select|return|exit|local|export|source|alias|unalias|readonly|shift|eval|exec|set|unset|trap|wait|read|echo|printf|test|true|false)\b/,VR=/\b(important|inherit|initial|unset|revert|auto|none)\b/,WR=/\b(function|class|if|else|elseif|for|foreach|while|return|echo|public|private|protected|static|new|try|catch|throw|namespace|use|require|require_once|include|include_once|extends|implements|interface|abstract|final|const|var|true|false|null|array|isset|unset|empty|list|match|enum|switch|case|break|continue|do|yield|fn)\b/,KR=/\b(function|class|if|else|for|foreach|while|return|echo|public|private|protected|static|new|try|catch|throw|namespace|use|require|include|extends|implements|interface|abstract|final|const|shape|vec|dict|keyset|async|await|concurrent|enum|type|newtype|tuple|inout)\b/;function V6(e){const t=Wv.get(e);if(t!==void 0)return t;const n=XR(e);return Wv.set(e,n),n}function XR(e){const t=ZR(e);return t?{defaultType:t.defaultType,patterns:t.patterns.map(n=>{const s=n.regex.flags.replace(/[gy]/g,"")+"y";return{...n,anchored:new RegExp(n.regex.source,s)}})}:null}function ZR(e){switch(e){case"typescript":case"javascript":case"tsx":case"jsx":case"ts":case"js":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/`(?:[^`\\]|\\.)*`/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/@[\w]+/},{type:"number",regex:/\b0[xX][0-9a-fA-F_]+\b/},{type:"number",regex:/\b0[bB][01_]+\b/},{type:"number",regex:/\b0[oO][0-7_]+\b/},{type:"number",regex:/\b\d[\d_]*\.?[\d_]*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:UR},{type:"function",regex:/\b[a-zA-Z_$][\w$]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~?:]+/},{type:"punctuation",regex:/[{}()\[\];,.]/},{type:"variable",regex:/\b[a-zA-Z_$][\w$]*\b/}]};case"json":return{defaultType:"punctuation",patterns:[{type:"property",regex:/"(?:[^"\\]|\\.)*"(?=\s*:)/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"number",regex:/-?\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"constant",regex:/\b(true|false|null)\b/},{type:"punctuation",regex:/[{}()\[\]:,]/}]};case"html":case"xml":case"svg":return{defaultType:"variable",patterns:[{type:"comment",regex:/<!--[\s\S]*?-->/},{type:"keyword",regex:/<!DOCTYPE[^>]*>/i},{type:"tag",regex:/<\/[a-zA-Z][\w-]*\s*>/},{type:"tag",regex:/<[a-zA-Z][\w-]*/},{type:"tag",regex:/\/?>/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"attribute",regex:/\b[a-zA-Z_:][\w:.-]*(?=\s*=)/},{type:"operator",regex:/=/}]};case"css":case"scss":case"less":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/--[a-zA-Z_-][\w-]*/},{type:"number",regex:/-?\b\d+\.?\d*(?:px|em|rem|%|vh|vw|vmin|vmax|ch|ex|deg|rad|turn|s|ms|fr)?\b/},{type:"constant",regex:/#[0-9a-fA-F]{3,8}\b/},{type:"keyword",regex:VR},{type:"keyword",regex:/@[a-zA-Z][\w-]*/},{type:"tag",regex:/[.#][a-zA-Z_-][\w-]*/},{type:"keyword",regex:/::?[a-zA-Z][\w-]*/},{type:"function",regex:/\b[a-zA-Z_-][\w-]*(?=\s*\()/},{type:"property",regex:/[a-zA-Z_-][\w-]*(?=\s*:)/},{type:"punctuation",regex:/[{}()\[\];:,]/},{type:"operator",regex:/[+~>*=|^$]/}]};case"python":case"py":return{defaultType:"variable",patterns:[{type:"string",regex:/"""[\s\S]*?"""/},{type:"string",regex:/'''[\s\S]*?'''/},{type:"string",regex:/f"(?:[^"\\]|\\.)*"/},{type:"string",regex:/f'(?:[^'\\]|\\.)*'/},{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/@[\w.]+/},{type:"number",regex:/\b0[xX][0-9a-fA-F_]+\b/},{type:"number",regex:/\b0[bB][01_]+\b/},{type:"number",regex:/\b0[oO][0-7_]+\b/},{type:"number",regex:/\b\d[\d_]*\.?[\d_]*(?:[eE][+-]?\d+)?j?\b/},{type:"keyword",regex:FR},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~@:]+/},{type:"punctuation",regex:/[{}()\[\];,.]/},{type:"variable",regex:/\b[a-zA-Z_][\w]*\b/}]};case"bash":case"sh":case"zsh":case"shell":return{defaultType:"variable",patterns:[{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'[^']*'/},{type:"variable",regex:/\$\{[^}]+\}/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"variable",regex:/\$[0-9@#?*!$-]/},{type:"number",regex:/\b\d+\b/},{type:"keyword",regex:GR},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"operator",regex:/[|&<>;!]+/},{type:"punctuation",regex:/[{}()\[\]]/}]};case"php":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"number",regex:/\b0[xX][0-9a-fA-F]+\b/},{type:"number",regex:/\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:WR},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"operator",regex:/[+\-*/%=!<>&|^~?:.]+/},{type:"constant",regex:/@[\w]+/},{type:"punctuation",regex:/[{}()\[\];,.]/}]};case"hack":return{defaultType:"variable",patterns:[{type:"comment",regex:/\/\*[\s\S]*?\*\//},{type:"comment",regex:/\/\/[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"variable",regex:/\$[a-zA-Z_][\w]*/},{type:"number",regex:/\b0[xX][0-9a-fA-F]+\b/},{type:"number",regex:/\b\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"keyword",regex:KR},{type:"type",regex:/\b[A-Z][a-zA-Z0-9_]*\b/},{type:"function",regex:/\b[a-zA-Z_][\w]*(?=\s*\()/},{type:"property",regex:new RegExp("(?<=->|::)\\b[a-zA-Z_][\\w]*\\b")},{type:"operator",regex:/[+\-*/%=!<>&|^~?:.]+/},{type:"constant",regex:/<<[\w]+/},{type:"punctuation",regex:/[{}()\[\];,.]/}]};case"yaml":case"yml":return{defaultType:"variable",patterns:[{type:"comment",regex:/#[^\n]*/},{type:"string",regex:/"(?:[^"\\]|\\.)*"/},{type:"string",regex:/'(?:[^'\\]|\\.)*'/},{type:"constant",regex:/\b(true|false|yes|no|on|off|null|~)\b/i},{type:"variable",regex:/[&*][\w]+/},{type:"type",regex:/!!\w+/},{type:"number",regex:/\b-?\d+\.?\d*(?:[eE][+-]?\d+)?\b/},{type:"property",regex:/^[ \t]*[\w][\w ./-]*(?=\s*:)/m},{type:"keyword",regex:/---/},{type:"keyword",regex:/\.\.\./},{type:"operator",regex:/[:|>\-?]/},{type:"punctuation",regex:/[{}()\[\],]/},{type:"variable",regex:/\b[a-zA-Z_][\w]*\b/}]};case"markdown":case"md":return{defaultType:"variable",patterns:[{type:"keyword",regex:/^```[\w]*$/m},{type:"keyword",regex:/^#{1,6}\s+.*/m},{type:"keyword",regex:/^---$/m},{type:"keyword",regex:/^\*\*\*$/m},{type:"string",regex:/\*\*(?:[^*]|\*(?!\*))+\*\*/},{type:"string",regex:/\*(?:[^*])+\*/},{type:"constant",regex:/`[^`]+`/},{type:"function",regex:/\[(?:[^\]])+\]\([^)]+\)/},{type:"comment",regex:/^>\s+.*/m},{type:"operator",regex:/^\s*[-*+]\s/m},{type:"number",regex:/^\s*\d+\.\s/m}]};default:return null}}const Kv=2e3,YR=800;async function QR(){return typeof scheduler<"u"&&typeof scheduler.yield=="function"?scheduler.yield():new Promise(e=>setTimeout(e,0))}function W6(e,t,n,s){const r=[];let i=n;const o=Math.min(s,e.length);for(;i<o;){let l=!1;for(const c of t.patterns){c.anchored.lastIndex=i;const u=c.anchored.exec(e);if(u&&u.index===i&&u[0].length>0){c.type!==t.defaultType&&r.push({type:c.type,start:i-n,end:i-n+u[0].length}),i+=u[0].length,l=!0;break}}l||i++}return r}function JR(e,t){const n=V6(t);if(!n)return[];const s=[];let r=0;for(let i=0;i<=e.length;i++)(i===e.length||e[i]===`
|
|
86
|
-
`)&&(s.push(W6(e,n,r,i)),r=i+1);return s}async function eI(e,t,n){const s=V6(t);if(!s)return[];const r=[];let i=0,o=0;for(let l=0;l<=e.length;l++)if((l===e.length||e[l]===`
|
|
87
|
-
`)&&(r.push(W6(e,s,i,l)),o+=l-i+1,i=l+1,o>=YR&&l<e.length)){if(n!=null&&n.aborted)return r;o=0,await QR()}return r}function tI(e,t){const n=[0];for(let i=0;i<t.length;i++)t[i]===`
|
|
88
|
-
`&&n.push(i+1);const s=Array.from({length:n.length},()=>[]);let r=0;for(const i of e){for(;r<n.length-1&&i.start>=n[r+1];)r++;const o=n[r];s[r].push({type:i.type,start:i.start-o,end:i.end-o})}return s}const nI=`:root {
|
|
89
|
-
${Object.entries(gy).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
90
|
-
`)}
|
|
91
|
-
}`,sI=`
|
|
92
|
-
${nI}
|
|
93
|
-
|
|
94
|
-
.astryx-codeblock code::highlight(astryx-keyword),
|
|
95
|
-
.astryx-codeeditor code::highlight(astryx-keyword) { color: var(--color-syntax-keyword); }
|
|
96
|
-
.astryx-codeblock code::highlight(astryx-string),
|
|
97
|
-
.astryx-codeeditor code::highlight(astryx-string) { color: var(--color-syntax-string); }
|
|
98
|
-
.astryx-codeblock code::highlight(astryx-comment),
|
|
99
|
-
.astryx-codeeditor code::highlight(astryx-comment) { color: var(--color-syntax-comment); }
|
|
100
|
-
.astryx-codeblock code::highlight(astryx-number),
|
|
101
|
-
.astryx-codeeditor code::highlight(astryx-number) { color: var(--color-syntax-number); }
|
|
102
|
-
.astryx-codeblock code::highlight(astryx-function),
|
|
103
|
-
.astryx-codeeditor code::highlight(astryx-function) { color: var(--color-syntax-function); }
|
|
104
|
-
.astryx-codeblock code::highlight(astryx-type),
|
|
105
|
-
.astryx-codeeditor code::highlight(astryx-type) { color: var(--color-syntax-type); }
|
|
106
|
-
.astryx-codeblock code::highlight(astryx-tag),
|
|
107
|
-
.astryx-codeeditor code::highlight(astryx-tag) { color: var(--color-syntax-tag); }
|
|
108
|
-
.astryx-codeblock code::highlight(astryx-attribute),
|
|
109
|
-
.astryx-codeeditor code::highlight(astryx-attribute) { color: var(--color-syntax-attribute); }
|
|
110
|
-
.astryx-codeblock code::highlight(astryx-property),
|
|
111
|
-
.astryx-codeeditor code::highlight(astryx-property) { color: var(--color-syntax-property); }
|
|
112
|
-
.astryx-codeblock code::highlight(astryx-operator),
|
|
113
|
-
.astryx-codeeditor code::highlight(astryx-operator) { color: var(--color-syntax-operator); }
|
|
114
|
-
.astryx-codeblock code::highlight(astryx-constant),
|
|
115
|
-
.astryx-codeeditor code::highlight(astryx-constant) { color: var(--color-syntax-constant); }
|
|
116
|
-
.astryx-codeblock code::highlight(astryx-punctuation),
|
|
117
|
-
.astryx-codeeditor code::highlight(astryx-punctuation) { color: var(--color-syntax-punctuation); }
|
|
118
|
-
.astryx-codeblock code::highlight(astryx-variable),
|
|
119
|
-
.astryx-codeeditor code::highlight(astryx-variable) { color: var(--color-syntax-variable); }
|
|
120
|
-
|
|
121
|
-
/* Span-based fallback classes — used when highlightMode='spans' or
|
|
122
|
-
when the CSS Custom Highlight API is not available. */
|
|
123
|
-
.astryx-token-keyword { color: var(--color-syntax-keyword); }
|
|
124
|
-
.astryx-token-string { color: var(--color-syntax-string); }
|
|
125
|
-
.astryx-token-comment { color: var(--color-syntax-comment); }
|
|
126
|
-
.astryx-token-number { color: var(--color-syntax-number); }
|
|
127
|
-
.astryx-token-function { color: var(--color-syntax-function); }
|
|
128
|
-
.astryx-token-type { color: var(--color-syntax-type); }
|
|
129
|
-
.astryx-token-tag { color: var(--color-syntax-tag); }
|
|
130
|
-
.astryx-token-attribute { color: var(--color-syntax-attribute); }
|
|
131
|
-
.astryx-token-property { color: var(--color-syntax-property); }
|
|
132
|
-
.astryx-token-operator { color: var(--color-syntax-operator); }
|
|
133
|
-
.astryx-token-constant { color: var(--color-syntax-constant); }
|
|
134
|
-
.astryx-token-punctuation { color: var(--color-syntax-punctuation); }
|
|
135
|
-
.astryx-token-variable { color: var(--color-syntax-variable); }
|
|
136
|
-
`;let Xv=!1;function o1(){if(Xv||typeof document>"u")return;const e=document.createElement("style");e.setAttribute("data-astryx-highlight-styles",""),e.textContent=sI,document.head.appendChild(e),Xv=!0}const rI=["keyword","string","comment","number","function","type","tag","attribute","property","operator","constant","punctuation","variable"],Zv=new Set(rI);let rf=null;function iI(e){if(Zv.has(e)||(Zv.add(e),o1(),typeof document>"u"))return;if(!rf){const s=document.createElement("style");if(s.setAttribute("data-astryx-highlight-dynamic",""),document.head.appendChild(s),rf=s.sheet??null,!rf)return}const t=`astryx-${e}`,n=`var(--color-syntax-${e}, currentColor)`;rf.insertRule(`.astryx-codeblock code::highlight(${t}), .astryx-codeeditor code::highlight(${t}) { color: ${n}; }`)}function oI(){const e=new Map;return t=>{let n=e.get(t);if(n)return n;iI(t);const s=`astryx-${t}`;return n=CSS.highlights.get(s),n||(n=new Highlight,CSS.highlights.set(s,n)),e.set(t,n),n}}function K6(e,t,n,s){if(t.length===0)return;const r=e.firstChild;if(!r||r.nodeType!==Node.TEXT_NODE)return;const i=r.length;for(const o of t){if(o.start>=i||o.end<=0)continue;const l=Math.min(o.start,i),c=Math.min(o.end,i),u=s(o.type);try{const d=new Range;d.setStart(r,l),d.setEnd(r,c),u.add(d),n.push({range:d,highlight:u})}catch{}}}function hp(e){for(const{range:t,highlight:n}of e)n.delete(t)}function aI(e,t,n,s){const r=[],i=e.querySelectorAll("[data-line]");for(let o=0;o<i.length;o++){const l=n+o,c=t[l];c&&c.length>0&&K6(i[o],c,r,s)}return r}function lI(e,t){o1();const n=oI(),s=[],r=[];let i=0;for(let d=0;d<e.children.length;d++){const h=e.children[d],f=h.querySelectorAll("[data-line]");f.length>0&&h.tagName==="DIV"&&!h.hasAttribute("data-line")&&(s.push(h),r.push(i),i+=f.length)}if(s.length===0){const d=[],h=e.querySelectorAll("[data-line]");for(let f=0;f<h.length;f++){const p=t[f];p&&p.length>0&&K6(h[f],p,d,n)}return()=>hp(d)}const o=new Map,l=new Map;function c(d,h){if(o.has(d))return;const f=aI(d,t,r[h],n);o.set(d,f)}function u(d){const h=o.get(d);h&&(hp(h),o.delete(d))}for(let d=0;d<s.length;d++){const h=s[d],f=g=>{g.skipped?u(h):c(h,d)};h.addEventListener("contentvisibilityautostatechange",f),l.set(h,f);const p=h;typeof p.checkVisibility=="function"?p.checkVisibility({checkVisibilityCSS:!0,contentVisibilityAuto:!0})&&c(h,d):d<5&&c(h,d)}return function(){for(const[h,f]of l)h.removeEventListener("contentvisibilityautostatechange",f);l.clear();for(const h of o.values())hp(h);o.clear()}}const cI={card:{kaIpWk:"xh6dtrn",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",$$css:!0},section:{kaIpWk:"x2u8bby",kMzoRj:"xc342km",ksu8eU:"xng3xce",kVAM5u:"x9r1u3d","--color-syntax-background":"x1mtvhk1",$$css:!0}},uI={"--_codeblock-gutter-width":"xtk08jq",$$css:!0},zy={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,k7Eaqz:(e==="fit-content"?"min(100%, 400px)":null)!=null?"xkj4a21":e==="fit-content"?"min(100%, 400px)":null,ks0D6T:(e==="fit-content"?"100%":null)!=null?"xf68679":e==="fit-content"?"100%":null,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e),"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e==="fit-content"?"min(100%, 400px)":null),"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e==="fit-content"?"100%":null)}],gutterWidth:e=>[uI,{"--x---_codeblock-gutter-width":`${e}ch`!=null?`${e}ch`:void 0}]},Fr={root:{kVAEAm:"x1n2onr6",kHBbk8:"xc8icb0",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kogj98:"x1ghz6dp",kWkggS:"xzyc27v",kVQacm:"xb3r6kr",$$css:!0},code:{k1xSpc:"x1lliihq",kUk6DE:"x98rzlu",k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kogj98:"x1ghz6dp",kMv6JI:"x9m5x89",kMwMTN:"xdfisg",kKi2Bq:"xeq4nuv",khDVqt:"x1sdyfia",kTgw9:"x1lldw8n",kHjlTd:"x1h4wwuj",$$css:!0},codeWrapped:{khDVqt:"x126k92a",kTgw9:"x1yn0g08",kHjlTd:"x1mzt3pk",$$css:!0},codeNumbered:{kVAEAm:"x1n2onr6",k5JduY:"x1s928wv",kwXMNM:"x1j6awrg",kSy8m5:"xd54j2p",kc1e00:"x1km86hw",kkgrvl:"xkj6t0a",kQlJh0:"x1p96cux",k6vLHU:"xvsnedh",kkQ525:"xnnzo76",kloYau:"x2q1x1w",$$css:!0},sizeSm:{kGuDYH:"x141an7d",$$css:!0},sizeMd:{kGuDYH:"xp03k98",$$css:!0}},dI=20,fI=100,Yv=x.memo(function({lines:t,startIndex:n,highlightSet:s,renderLineContent:r,lineNumbers:i}){return a.jsx(a.Fragment,{children:t.map((o,l)=>{const c=n+l;return a.jsx("div",{"data-line":c+1,...{0:{className:"x17iicif"},2:{className:"x17iicif xrvj5dj x1xx4m37 xf5zn4v x46gnpd x17gn2l9 x19ds33d x1wnbjh8 xtkarl4 x1rbqspl x3nzp0f"},1:{className:"x17iicif xgcxg3y x1ng9b9t x1pzlopt"},3:{className:"x17iicif xrvj5dj x1xx4m37 xf5zn4v x46gnpd x17gn2l9 x19ds33d x1wnbjh8 xtkarl4 x1rbqspl x3nzp0f xgcxg3y x1ng9b9t x1pzlopt"}}[!!i<<1|!!((s==null?void 0:s.has(c+1))??!1)<<0],children:r(o,c)},c)})})});function X6(e,t,n,s,r=dI){if(r=Math.max(1,Math.floor(r)),e.length<fI)return a.jsx(Yv,{lines:e,startIndex:0,highlightSet:t,renderLineContent:n,lineNumbers:s});const i=[];for(let o=0;o<e.length;o+=r){const l=Math.min(o+r,e.length),c=e.slice(o,l),u=`${c.length}lh`;i.push(a.jsx("div",{...K({className:"xb5mbof"},{style:{containIntrinsicBlockSize:`auto ${u}`}}),children:a.jsx(Yv,{lines:c,startIndex:o,highlightSet:t,renderLineContent:n,lineNumbers:s})},o))}return i}function Z6(){return typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u"}function hI(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}function xI(e,t,n){const[s,r]=x.useState(null),i=x.useMemo(()=>n?tI(n(e,t),e):e.length>=Kv?null:JR(e,t),[e,t,n]);return x.useEffect(()=>{if(e.length<Kv||n)return;const o=new AbortController;async function l(){try{const c=await eI(e,t,o.signal);o.signal.aborted||r({code:e,language:t,tokens:c})}catch{o.signal.aborted||r({code:e,language:t,tokens:[]})}}return l(),()=>{o.abort()}},[e,t,n]),i??((s==null?void 0:s.code)===e&&s.language===t?s.tokens:[])}function pI(e,t){if(t.length===0)return e||"";const n=[];let s=0;for(const r of t){r.start>s&&n.push(e.slice(s,r.start));const i=Math.min(r.end,e.length);n.push(a.jsx("span",{className:`astryx-token-${r.type} xds-token-${r.type}`,children:e.slice(r.start,i)},`${r.start}-${r.type}`)),s=i}return s<e.length&&n.push(e.slice(s)),n.length>0?n:""}function gI({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:i,maxDigits:o}){x.useInsertionEffect(()=>{o1()},[]);const l=x.useCallback((c,u)=>{const d=t[u]??[];return a.jsx("span",{className:"xeuugli",children:pI(c,d)})},[t]);return a.jsx("code",{...q(Fr.code,r,s&&Fr.codeWrapped,i&&Fr.codeNumbered,i&&zy.gutterWidth(o)),children:X6(e,n,l,i)})}function mI({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:i,maxDigits:o}){const l=x.useRef(null);x.useEffect(()=>{if(!Z6())return;o1();const u=l.current;if(!(!u||t.length===0))return lI(u,t)},[t]);const c=x.useCallback(u=>u||"",[]);return a.jsx("code",{ref:l,...q(Fr.code,r,s&&Fr.codeWrapped,i&&Fr.codeNumbered,i&&zy.gutterWidth(o)),children:X6(e,n,c,i)})}function Ry({code:e,language:t="plaintext",title:n,hasLanguageLabel:s=!0,hasLineNumbers:r=!1,highlightLines:i,hasCopyButton:o=!0,onCopy:l,isWrapped:c=!1,maxHeight:u,isCollapsible:d=!1,collapsibleThreshold:h=10,size:f="md",width:p="fit-content",container:g="card",tokenizer:b,highlightMode:y="auto",syntaxTheme:m,xstyle:k,className:w,style:v,ref:j,...C}){const $=Se(),[T,A]=x.useState(!1),S=x.useRef(null),_=lc();x.useEffect(()=>()=>{S.current!=null&&clearTimeout(S.current)},[]);const M=y==="spans"||y==="auto"&&!Z6()||y==="auto"&&hI(),z=x.useMemo(()=>{const se=e.split(`
|
|
137
|
-
`);return se.length>1&&se[se.length-1]===""&&se.pop(),se},[e]),O=xI(e,t,b),I=x.useMemo(()=>i?new Set(i):null,[i]),E=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),A(!0),_($("@astryx.codeBlock.copied")),l==null||l(),S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{S.current=null,A(!1)},2e3)}catch{}},[e,l,_,$]),N=f==="sm"?Fr.sizeSm:Fr.sizeMd,R=String(z.length).length,L=s&&t!=="plaintext"?t:null,D=n!=null||L!=null,P=d&&z.length>=h,[F,X]=x.useState(!1),G=x.useId(),Q=x.useRef(null),ee=u?{maxHeight:typeof u=="number"?`${u}px`:u}:void 0,Y=a.jsx(Te,{icon:T?"check":"copy",size:"sm",color:"inherit"}),V=o?a.jsx("button",{type:"button",onClick:se=>{se.stopPropagation(),E()},"aria-label":$(T?"@astryx.codeBlock.copied":"@astryx.codeBlock.copyCode"),...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x9epnlk x3kzqx6 xx3sua9 xjbqb8w xe9uy6x x1mjzq1q x1ypdohk x14ju556 x10l6tqk xctzyg x72tfeb"}}[!D<<0],children:Y}):null,oe=D?a.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1qughib x1pzlopt xzyc27v x7wzq59 x13vifvy x1vjfegm xce4md1"},1:{className:"x78zum5 x6s0dn4 x1qughib x1pzlopt xzyc27v x7wzq59 x13vifvy x1vjfegm xce4md1 x92x3c3 x1q0q8m5 xw8gpjh"}}[!!r<<0],children:[a.jsx("div",{role:P?"button":void 0,tabIndex:P?0:void 0,"aria-expanded":P?!F:void 0,"aria-controls":P?G:void 0,onClick:P?()=>X(se=>!se):void 0,onKeyDown:P?se=>{(se.key==="Enter"||se.key===" ")&&(se.preventDefault(),X(he=>!he))}:void 0,...{0:{className:"x78zum5 x6s0dn4 x98rzlu xeuugli x1717udv xjbqb8w x1heor9g xln7xf2 x1yc453h"},1:{className:"x78zum5 x6s0dn4 x98rzlu xeuugli x1717udv xjbqb8w x1heor9g xln7xf2 x1yc453h x1ypdohk x87ps6o x17nn4n9 x1wfwxd8 x7s97pk"}}[!!P<<0],children:a.jsxs("span",{className:"x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j",children:[P&&a.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnur1sd xb3r6kr x1mjzq1q x1gbn2au x1aquc0h x12wqnr7 x128ha8g x11xpdln xuedmi6 xlr8y92 x1iffjtl"}}[!F<<0],children:a.jsx(Te,{icon:"chevronRight",size:"xsm",color:"inherit"})}),n,n&&L?" — ":"",L]})}),V]}):null,le=a.jsx("div",{ref:Q,tabIndex:0,role:"group","aria-label":L??$("@astryx.codeBlock.code"),...K({className:"xw2csxc x1odjw0f"},{style:ee}),children:a.jsx("div",{...{0:{className:"x78zum5 x1pshirs"},1:{className:"x78zum5 x1pshirs x1ajqlyv"}}[!!(D&&!r)<<0],children:M?a.jsx(gI,{lines:z,tokenLines:O,highlightSet:I,isWrapped:c,sizeStyle:N,hasLineNumbers:r,maxDigits:R}):a.jsx(mI,{lines:z,tokenLines:O,highlightSet:I,isWrapped:c,sizeStyle:N,hasLineNumbers:r,maxDigits:R})})}),me=a.jsxs("pre",{ref:j,...K(W("codeblock",{size:f,language:t,container:g}),q(Fr.root,zy.width(p),cI[g],k),w,v),...C,children:[oe,P?a.jsx("div",{id:G,inert:F?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!F<<0],children:a.jsx("div",{className:"xb3r6kr x2lwn1j",children:le})}):le,!D&&V]});return m?a.jsx(P6,{theme:m,children:me}):me}Ry.displayName="CodeBlock";const yI={base:{kMv6JI:"x9m5x89",kGuDYH:"xp03k98",kLWn49:"x15bjb6t",kWkggS:"xwmxj5m",kg3NbH:"x7a5moj",k8WAf4:"x1hp7d8q",kaIpWk:"xx3sua9",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0}},kI={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},bI={inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}};function Iy({children:e,color:t="primary",size:n,xstyle:s,className:r,style:i,ref:o,...l}){return a.jsx("code",{ref:o,...l,...K(W("code",{color:t}),q(yI.base,kI[t],n&&bI[n],s),r,i),children:e})}Iy.displayName="Code";const _y=x.createContext(null);_y.displayName="DialogContext";function vI(){return x.use(_y)}function wI(e,t=16){const n=e.getBoundingClientRect(),s=n.left+n.width/2-window.innerWidth/2,r=n.top+n.height/2-window.innerHeight/2,i=Math.sqrt(s*s+r*r)||1;return{x:Math.round(s/i*t),y:Math.round(r/i*t)}}const co={dialog:{kVAEAm:"xixxii4",kogj98:"x1bpp3o7",kmVPX3:"x1717udv",kWkggS:"x10xzikg","--_dialog-radius":"xvuvksw",kaIpWk:"xuacgfc",kGVxlE:"x1kcpxr7",k1xSpc:"x1s85apg",kXwgrk:"xdt5ytf",kZKoxP:"xg7h5cd",kZeWKH:"xish69e",kSiTet:"xg01cxk",k44tkh:"xqgcaz",kyAemX:"x128ha8g",kWV6AL:"xskzprw",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},open:{k1xSpc:"x78zum5",kSiTet:"x1hc1fzr",kKVMdj:"x1ewfqum x1aquc0h",$$css:!0},backdrop:{kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",$$css:!0},fullscreen:{kzqmXN:"x1o6l61p",kZKoxP:"xtdtrs8",ks0D6T:"xlbgzzq",kskxy:"x1wj9ous",kaIpWk:"x2u8bby",kogj98:"x1ghz6dp",kpwlN0:"x10a8y8t",$$css:!0},inner:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x12lumcd",kAzted:"x2lwn1j",kVQacm:"xb3r6kr",kaIpWk:"x1pjcqnp",$$css:!0},inlineWrapper:{kmVPX3:"x1717udv",kWkggS:"x10xzikg","--_dialog-radius":"xvuvksw",kaIpWk:"xuacgfc",kGVxlE:"x1kcpxr7",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kZKoxP:"xg7h5cd",kZeWKH:"xish69e",$$css:!0}},jI={ks0D6T:"x95b5qq",$$css:!0},SI={kogj98:"x1ghz6dp",$$css:!0},xp={sizing:(e,t)=>[jI,{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,kskxy:(typeof t=="number"?`${t}px`:t)!=null?"x1jols5v":typeof t=="number"?`${t}px`:t,$$css:!0},{"--x-width":(n=>typeof n=="number"?n+"px":n??void 0)(typeof e=="number"?`${e}px`:e),"--x-maxHeight":(n=>typeof n=="number"?n+"px":n??void 0)(typeof t=="number"?`${t}px`:t)}],position:(e,t,n,s)=>[SI,{k87sOh:e!=null?"xjbys53":e,kLqNvP:t!=null?"x1lxsm33":t,kt4wiu:n!=null?"xqxgn94":n,krVfgx:s!=null?"x1nqzi6q":s,$$css:!0},{"--x-top":(r=>typeof r=="number"?r+"px":r??void 0)(e),"--x-insetInlineStart":(r=>typeof r=="number"?r+"px":r??void 0)(t),"--x-insetInlineEnd":(r=>typeof r=="number"?r+"px":r??void 0)(n),"--x-bottom":(r=>typeof r=="number"?r+"px":r??void 0)(s)}]};function of(e){return typeof e=="number"?`${e}px`:e}function CI(e){const{top:t,bottom:n,start:s,end:r}=e;return{top:t!==void 0?of(t):"auto",bottom:n!==void 0?of(n):"auto",insetInlineStart:s!==void 0?of(s):"auto",insetInlineEnd:r!==void 0?of(r):"auto"}}function vr({isOpen:e,isInline:t=!1,onOpenChange:n,width:s=400,maxHeight:r="75vh",position:i,variant:o="standard",purpose:l="info",padding:c,children:u,xstyle:d,className:h,style:f,ref:p,...g}){const b=c==null,y=c??4,m=j4[y],k=o==="fullscreen",w=x.useId(),v=x.useMemo(()=>({isInline:t,titleId:w}),[t,w]),j=g["aria-label"]!=null||g["aria-labelledby"]!=null,C=x.useRef(null),$=x.useCallback(R=>{if(C.current=R,!R||j)return;R.querySelector(`#${CSS.escape(w)}`)!=null?R.setAttribute("aria-labelledby",w):R.removeAttribute("aria-labelledby")},[w,j]),T=x.useRef(null),A=l!=="required",S=l==="info";x.useEffect(()=>{var L;if(t)return;const R=C.current;if(R)if(e){T.current=document.activeElement;const D=T.current;if(D&&D!==document.body){const P=wI(D);R.style.setProperty("--dialog-dir-x",`${P.x}px`),R.style.setProperty("--dialog-dir-y",`${P.y}px`)}else R.style.setProperty("--dialog-dir-x","0px"),R.style.setProperty("--dialog-dir-y","16px");if(!R.open){R.showModal();const P=R.querySelector("[data-autofocus]");P&&P.focus()}}else R.open&&R.close(),(L=T.current)==null||L.focus(),T.current=null},[e,t]),z6(e&&!t),x.useEffect(()=>{if(t)return;const R=C.current;if(!R||!e)return;const L=D=>{if(D.key==="Escape"){if(v6(D)||zv())return;D.preventDefault(),A&&n(!1)}};return R.addEventListener("keydown",L),()=>R.removeEventListener("keydown",L)},[e,t,A,n]);const _=x.useRef(!1);x.useEffect(()=>{var L;const R=((L=C.current)==null?void 0:L.querySelector(`#${CSS.escape(w)}`))!=null;e&&!t&&!j&&!R&&!_.current&&(_.current=!0,qo())},[e,t,j,w]);const M=R=>{R.target===R.currentTarget&&S&&n(!1)},z=R=>{R.preventDefault(),!zv()&&A&&n(!1)},O=a.jsx("div",{...q(co.inner,...O6(b?{useThemeDefault:"dialog",maxHeight:k?void 0:typeof r=="number"?`${r}px`:r}:{paddingInnerX:m,paddingInnerY:m,paddingOuterX:m,paddingOuterY:m,maxHeight:k?void 0:typeof r=="number"?`${r}px`:r}),!b&&y!==4&&ec[y],!b&&y!==4&&tc[y],!b&&y!==4&&nc[y],!b&&y!==4&&sc[y]),children:a.jsx(_y,{value:v,children:u})}),I=i!=null&&!k,{open:E,...N}=g;return t?e?a.jsx("div",{...N,...K(W("dialog",{variant:o}),q(co.inlineWrapper,!k&&xp.sizing(s,r),k&&co.fullscreen,d),h,f),"data-testid":g["data-testid"],children:O}):null:a.jsx("dialog",{ref:mt(p,$),...N,...K(W("dialog",{variant:o}),q(co.dialog,e&&co.open,co.backdrop,!k&&xp.sizing(s,r),I&&(()=>{const R=CI(i);return xp.position(R.top,R.insetInlineStart,R.insetInlineEnd,R.bottom)})(),k&&co.fullscreen,d),h,f),onClick:M,onCancel:z,"aria-modal":"true",...l==="required"?{role:"alertdialog"}:void 0,children:O})}vr.displayName="Dialog";const $I=x.lazy(async()=>D4(()=>Promise.resolve().then(()=>T6),void 0).then(e=>({default:e.Tooltip}))),EI={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"};function wr({level:e,type:t,accessibilityLevel:n,color:s="primary",display:r="block",maxLines:i=0,hasTruncateTooltip:o=!0,wordBreak:l,textWrap:c,justify:u="start",hasCapsize:d=!1,hasStrikethrough:h=!1,xstyle:f,className:p,style:g,children:b,ref:y,...m}){const k=EI[e],w=n&&n!==e?{"aria-level":n}:{},v=l??(i===1?"break-all":"break-word"),j=i>0||d?"block":r,C=W4({maxLines:i}),$=typeof o=="string"?o:"above",T=i>0&&o!==!1&&C.isTruncated,A=x.useRef(null),S=i>1?{WebkitLineClamp:i}:void 0;return a.jsxs(a.Fragment,{children:[a.jsx(k,{ref:mt(y,C.ref,A),...K(W("heading",{level:e,color:s,...t&&{type:t}}),q(yy[K4(s)],t?ky[t]:hA[e],t&&B4[t],i===1?Dh.singleLine:i>1?Dh.multiLine:q4[j],i>0&&H4[v],c&&P4[c],u!=="start"&&G4[u],d&&U4.enabled,h&&F4.strikethrough,f),p,{...g,...S}),title:T?C.fullText:void 0,...w,...m,children:b}),T&&a.jsx(x.Suspense,{fallback:null,children:a.jsx($I,{anchorRef:A,content:a.jsx("span",{...q(V4.content),children:C.fullText}),placement:$})})]})}wr.displayName="Heading";const TI={titleFocusable:{kI3sdo:"x1a2a7pz",$$css:!0}};function jr({title:e,subtitle:t,onOpenChange:n,startContent:s,endContent:r,hasDivider:i,xstyle:o,className:l,style:c,ref:u,...d}){const h=Se(),f=x.useRef(null),p=vI(),g=(p==null?void 0:p.isInline)!==!0,b=p==null?void 0:p.titleId;return x.useEffect(()=>{g&&f.current&&f.current.focus()},[g]),a.jsx(Lh,{ref:u,hasDivider:i,xstyle:o,className:l,style:c,...d,children:a.jsxs("div",{className:"x78zum5 x1cy8zhl x1qughib xjcht0a",children:[s&&a.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s",children:s}),a.jsxs("div",{className:"x98rzlu xeuugli xqixskq",children:[a.jsx(wr,{ref:f,id:b,level:2,tabIndex:-1,xstyle:TI.titleFocusable,children:e}),t&&a.jsx(re,{type:"body",size:"sm",color:"secondary",children:t})]}),(r||n)&&a.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s"},1:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s xhzvc8f x3kzqx6"}}[!!n<<0],children:[r,n&&a.jsx(ne,{variant:"ghost",label:h("@astryx.dialog.close"),tooltip:h("@astryx.dialog.close"),icon:a.jsx(Te,{icon:"close",color:"inherit"}),onClick:()=>{n==null||n(!1)},isIconOnly:!0})]})]})})}jr.displayName="DialogHeader";const NI={scrollable:{kVQacm:"xysyzu8",$$css:!0}};function Ly({direction:e="vertical",hAlign:t,vAlign:n,justify:s,align:r,gap:i,padding:o,paddingInline:l,paddingBlock:c,isScrollable:u,width:d,height:h,maxWidth:f,minHeight:p,wrap:g,as:b="div",xstyle:y,className:m,style:k,children:w,ref:v,...j}){const C=t??(e==="horizontal"?s:r),$=n??(e==="horizontal"?r:s),T=e==="horizontal"?C:$,A=e==="horizontal"?$:C,S=l??o,_=c??o,M=q(...Mg({direction:e,crossAlign:A,mainAlign:T,gap:i,wrap:g}),S!=null&&wN[S],_!=null&&jN[_],u&&NI.scrollable,y),z={...d!=null&&{width:typeof d=="number"?`${d}px`:d},...h!=null&&{height:typeof h=="number"?`${h}px`:h},...f!=null&&{maxWidth:typeof f=="number"?`${f}px`:f},...p!=null&&{minHeight:typeof p=="number"?`${p}px`:p}};return x.createElement(b,{ref:v,...K(W("stack",{direction:e,gap:i,wrap:g}),M,m,{...k,...z}),...j},w)}Ly.displayName="Stack";function $e({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...i}){return a.jsx(Ly,{...i,direction:"horizontal",hAlign:s??t,vAlign:r??n,ref:e})}$e.displayName="HStack";function fe({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...i}){return a.jsx(Ly,{...i,direction:"vertical",hAlign:s??n,vAlign:r??t,ref:e})}fe.displayName="VStack";const af={footer:{kmuXW:"x2lah0s",$$css:!0},inner:{kB7OPa:"x9f619",ks0D6T:"xjl2t3p",kUOVxO:"xvueqy4",kZCmMZ:"x139j0dd",kwRFfy:"xpc6k2p",kLKAdn:"xqty4a",kGO01o:"xon7vh3","--container-padding-inline-start":"xdvaxxn","--container-padding-inline-end":"xqpvj4r","--container-padding-block-start":"xjmgx01","--container-padding-block-end":"x1xjq73n",$$css:!0},fullBleed:{kZCmMZ:"x1c1uobl",kwRFfy:"xyri2b",kLKAdn:"xexx8yu",kGO01o:"x18d9i69","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},divider:{kEafiO:"x178xt8z",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}},AI={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function fa({children:e,hasDivider:t,height:n,label:s,padding:r,role:i,xstyle:o,className:l,style:c,ref:u,...d}){const h=x.use(Wx),f=t??(h==null?void 0:h.defaultHasDividers)??!1,p=r===0;return a.jsx("div",{ref:u,role:i,"aria-label":s,"data-divider":f||void 0,...K(W("layout-footer"),q(af.footer,AI.sizing(n??null),f&&af.divider,o),l,c),...d,children:a.jsx("div",{...q(af.inner,p&&af.fullBleed,r!=null&&ec[r],r!=null&&tc[r],r!=null&&nc[r],r!=null&&sc[r]),children:e})})}fa.displayName="LayoutFooter";const Y6=x.createContext({direction:"vertical"});Y6.displayName="FormLayoutContext";const pp={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},containerGap:{kOIVth:"xzye2dw",$$css:!0},horizontalLabels:{k1xSpc:"xjp7ctv",$$css:!0}},MI={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function cc({label:e,isLabelHidden:t=!1,description:n,inputID:s,labelID:r,isGroupLabel:i=!1,descriptionID:o,isOptional:l=!1,isRequired:c=!1,isDisabled:u=!1,labelIcon:d,status:h,labelTooltip:f,statusVariant:p="attached",width:g,xstyle:b,children:y,className:m,style:k,ref:w,...v}){const{direction:j}=x.use(Y6),C=j==="horizontal-labels",$=o??(n?`${s}-desc`:void 0),T=(h==null?void 0:h.messageID)??(h!=null&&h.message?`${s}-status`:void 0);oc("Field","isOptional and isRequired are mutually exclusive. isOptional takes precedence.",l&&c);const A=a.jsx(t1,{label:e,inputID:s,labelID:r,isGroupLabel:i,isLabelHidden:t,isDisabled:u,isOptional:l,isRequired:c,labelIcon:d,labelTooltip:f,description:C?void 0:n,descriptionID:C?void 0:$}),S=h!=null&&h.message&&p!=="tooltip"?a.jsx(n1,{type:h.type,message:h.message,id:T,variant:p}):null;return C?a.jsxs("div",{ref:w,...K(W("field",{layout:"horizontal-labels"}),q(pp.horizontalLabels,b),m,k),...v,children:[a.jsx("div",{className:"x1enrzb7",children:A}),a.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[n&&a.jsx(re,{type:"supporting",display:"block",id:$,children:n}),y,S]})]}):a.jsxs("div",{ref:w,...K(W("field"),q(pp.container,!t&&pp.containerGap,g!=null&&MI.width(g),b),m,k),...v,children:[A,p==="attached"?a.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[y,S]}):a.jsxs(a.Fragment,{children:[y,S]})]})}cc.displayName="Field";const Ol={base:{kB7OPa:"x9f619",kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"xvy26l8 x6q1khz","--_field-radius":"x1832zxr",kaIpWk:"xvdfih8",kWkggS:"x10xzikg",k1ekBW:"x12zzom9",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kGVxlE:"x1gnnqk1 x12y27fx xuihb5h",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kVAM5u:"xvy26l8",kGVxlE:"x1gnnqk1",$$css:!0}},Oy={warning:{kVAM5u:"x8wg1ba",$$css:!0},error:{kVAM5u:"x1ofxpqo",$$css:!0},success:{kVAM5u:"x16m2moy",$$css:!0}},Dy={warning:{kGVxlE:"x1gnnqk1 xnoa3fc",$$css:!0},error:{kGVxlE:"x1gnnqk1 xl68szm",$$css:!0},success:{kGVxlE:"x1gnnqk1 xig9bu2",$$css:!0}},Q6={warning:{kVAM5u:"x8wg1ba xa1yw2k",$$css:!0},error:{kVAM5u:"x1ofxpqo xk2sxw7",$$css:!0},success:{kVAM5u:"x16m2moy xyq33ac",$$css:!0}},J6={inGroup:{kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",kZKoxP:"x5yr21d",keTefX:"xd10s4z x1pwwqoy",krdFHd:"x15mokao x8eehn2",kVL7Gh:"xbiv7yw x1xrp5p4",kfmiAY:"x1ga7v0g x11xp8u1 xpufgd0 x1ir7nn6",kT0f0o:"x16uus16 x747jw7 xxd14kb x1vej5at",kXnDq0:"x1rm9qnc",$$css:!0}},ej=x.createContext(null);ej.displayName="InputGroupContext";function tj(){return x.use(ej)}const zI={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}};function ns({type:e="text",label:t,isLabelHidden:n=!1,description:s,isOptional:r=!1,isRequired:i=!1,isDisabled:o=!1,disabledMessage:l,startIcon:c,status:u,statusVariant:d="attached",size:h,onChange:f,changeAction:p,isLoading:g=!1,value:b,placeholder:y,labelTooltip:m,hasClear:k=!1,hasAutoFocus:w=!1,htmlName:v,onEnter:j,onKeyDown:C,width:$,xstyle:T,className:A,style:S,ref:_,...M}){const z=Se(),O=da(h,"md"),I=x.useId(),E=x.useId(),N=x.useId(),R=x.useId(),L=x.useRef(null),D=x.useRef(null),P=tj(),[,F]=x.useTransition(),[X,G]=x.useOptimistic(b),Q=g||X!==b,ee=o&&!!l,Y=ls({placement:"above",focusTrigger:"always",isEnabled:ee}),{statusIcon:V,describedBy:oe}=I6({status:u,statusVariant:d,isInGroup:!!P}),{ariaLabelledBy:le,ariaDescribedBy:me}=v4(E,[s?N:null,!P&&d!=="tooltip"&&(u!=null&&u.message)?R:null,oe,ee?Y.describedBy:null],P),se=ue=>{if(o)return;const ge=ue.target.value;f==null||f(ge,ue),p&&!ue.defaultPrevented&&F(async()=>{G(ge),await p(ge,ue)})},he=x.useCallback(()=>{var ue;f==null||f("",null),(ue=L.current)==null||ue.focus()},[f]),{onClick:ce,onMouseUp:J}=Ty({containerRef:D,inputRef:L,disabled:o}),ke=a.jsxs("div",{ref:ue=>{D.current=ue,Y.ref(ue)},onClick:ce,onMouseUp:J,...K(W("text-input",{size:O,status:(u==null?void 0:u.type)??null}),q(Ol.base,zI[O],o&&Ol.disabled,u&&Oy[u.type],u&&!o&&Dy[u.type],u&&Q6[u.type],P&&J6.inGroup,T),A,S),children:[c&&yr(c,{size:"sm",color:"secondary"}),P&&a.jsx(si,{id:E,children:t}),a.jsx("input",{...M,ref:mt(_,L),id:I,name:v,type:e,value:X,onChange:se,onKeyDown:j||C?ue=>{ue.key==="Enter"&&(j==null||j()),C==null||C(ue)}:void 0,placeholder:y,disabled:o&&!ee,"aria-disabled":ee?"true":void 0,readOnly:ee||void 0,autoFocus:w,"data-autofocus":w||void 0,"aria-describedby":me,"aria-required":i===!0?"true":void 0,"aria-invalid":(u==null?void 0:u.type)==="error"?"true":void 0,"aria-busy":Q||void 0,"aria-labelledby":le,...{0:{className:"x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5"},1:{className:"x1lliihq x98rzlu xeuugli xc342km xng3xce x1717udv x9ynric xjm74w1 x6pjikd xw6l6zx x1tgivj0 xjbqb8w x1a2a7pz xeyghm5 x1h6gzvc"}}[!!o<<0]}),k&&b!==""&&!o&&a.jsx("button",{type:"button",onClick:he,"aria-label":z("@astryx.textInput.clearLabel",{label:t}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:a.jsx(Te,{icon:"close",size:"sm",color:"secondary"})}),Q&&a.jsx(un,{size:"sm"}),V]});return P?a.jsxs(a.Fragment,{children:[ke,ee&&Y.renderTooltip(l)]}):a.jsxs(cc,{label:t,isLabelHidden:n,description:s,inputID:I,descriptionID:s?N:void 0,isOptional:r,isRequired:i,isDisabled:o,status:u?{type:u.type,message:u.message,messageID:u.message?R:void 0}:void 0,statusVariant:d,labelTooltip:m,width:$,children:[ke,ee&&Y.renderTooltip(l)]})}ns.displayName="TextInput";function nj(e){return typeof e=="string"?!0:!("type"in e)}function RI(e){return typeof e=="object"&&"type"in e&&e.type==="divider"}function sj(e){return typeof e=="object"&&"type"in e&&e.type==="section"}function Hh(e){return typeof e=="string"?{value:e,label:e}:{...e,label:e.label??e.value}}function II(e){const t=[];for(const n of e)if(nj(n))t.push(Hh(n));else if(sj(n))for(const s of n.options)t.push(Hh(s));return t}function _I({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:s,triggerRef:r}){const[i,o]=x.useState(0),[l,c]=x.useState(!1),u=x.useCallback((d,h)=>{o(d),c(h)},[]);return xr(()=>{if(!e){u(0,!1);return}if(!s.current||!r.current){u(0,!0);return}const d=t>=0?t:0,h=`${n}-item-${d}`,f=document.getElementById(h);if(!f){u(0,!0);return}const p=s.current.getBoundingClientRect(),g=f.getBoundingClientRect(),b=r.current.getBoundingClientRect(),y=p.height;if(y<=0){u(0,!0);return}const m=g.top-p.top+g.height/2,w=b.top+b.height/2-m,v=window.innerHeight,j=Math.max(0,v-y),C=Math.min(Math.max(w,0),j),$=Math.max(0,b.bottom-C);u($,!0)},[e,t,n,s,r,u]),{offset:i,isPositioned:l}}function LI({selectableItems:e,value:t,isDisabled:n=!1,isOpen:s,hasSearch:r=!1,onOpen:i,onClose:o,onSelect:l,onClear:c,listboxId:u}){const[d,h]=x.useState(-1),[f,p]=x.useState(""),g=x.useRef(void 0),b=x.useCallback($=>`${u}-item-${$}`,[u]),y=x.useCallback(()=>e.map(($,T)=>$.disabled?-1:T).filter($=>$>=0),[e]),m=x.useCallback(()=>e.findIndex($=>$.value===t),[e,t]),k=x.useCallback(()=>{h(-1),o()},[o]),w=x.useCallback($=>{$.disabled||(l==null||l($.value),k())},[l,k]),v=x.useCallback(()=>{if(!n){if(s)k();else if(i(),!r){const $=m();h($>=0?$:0)}}},[n,s,i,k,m,r]),j=x.useCallback(($,T)=>{$.disabled||h(T)},[]),C=x.useCallback($=>{if(n)return;const T=y();switch($.key){case"ArrowDown":if($.preventDefault(),!s)i(),h(0);else{const A=T.indexOf(d),S=Math.min(A+1,T.length-1);h(T[S]??d)}break;case"ArrowUp":if($.preventDefault(),!s)i(),h(e.length-1);else{const A=T.indexOf(d),S=Math.max(A-1,0);h(T[S]??d)}break;case" ":if(r)break;case"Enter":if($.preventDefault(),s&&d>=0){const A=e[d];A&&!A.disabled&&w(A)}else if(!s&&(i(),!r)){const A=m();h(A>=0?A:0)}break;case"Escape":s&&($.preventDefault(),k());break;case"Tab":s&&k();break;case"Home":$.preventDefault(),s&&T.length>0&&h(T[0]);break;case"End":$.preventDefault(),s&&T.length>0&&h(T[T.length-1]);break;case"PageUp":$.preventDefault(),s&&T.length>0&&h(T[0]);break;case"PageDown":$.preventDefault(),s&&T.length>0&&h(T[T.length-1]);break;case"Delete":case"Backspace":!r&&!s&&c!=null&&t!=null&&($.preventDefault(),c());break;default:if(!r&&$.key.length===1&&!$.ctrlKey&&!$.metaKey){const A=f+$.key.toLowerCase();p(A),g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{p("")},500);const S=e.findIndex(_=>{var M;return!_.disabled&&((M=_.label)==null?void 0:M.toLowerCase().startsWith(A))});S>=0&&(s||i(),h(S))}break}},[n,s,i,k,e,d,w,m,y,f,r,c,t]);return{highlightedIndex:d,setHighlightedIndex:h,getItemId:b,onTriggerClick:v,onKeyDown:C,onItemSelect:w,onItemMouseEnter:j}}const OI={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",$$css:!0}};function rj({icon:e,label:t,description:n,endContent:s,xstyle:r,className:i,style:o}){return a.jsx(ac,{startContent:e?yr(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:s,xstyle:[OI.root,r],...K(W("selector-option"),{className:i,style:o})})}rj.displayName="SelectorOption";const _s={triggerContainer:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kMv6JI:"x9ynric",kGuDYH:"xcr08ib xdk3u5w",kLWn49:"x1kq96og",kMwMTN:"x1tgivj0",kkrTdU:"x1ypdohk",$$css:!0},triggerPlaceholder:{kMwMTN:"xv1l7n4",$$css:!0},triggerGhost:{kzqmXN:"x14atkfc",kMzoRj:"xc342km",kWkggS:"xjbqb8w",kKwaWg:"x1ilzqfv xq8i9tn",kGVxlE:"x1gnnqk1 x1irk71m x15ysqaf",k63SB2:"x1e4wzip",kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xscfbxq",k1ekBW:"xrafxwg",k3aq6I:"x3oybdh xk4oym4",$$css:!0},triggerGhostDisabled:{kKwaWg:"x18o3ruo",k3aq6I:"x1c071of x1pdlv7q",$$css:!0},popover:{k7Eaqz:"xrzjruh",$$css:!0},sectionDivider:{kqGvvJ:"xsq74q5",$$css:!0},divider:{kqGvvJ:"xsq74q5",$$css:!0},item:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",kmVPX3:"xlsj2fj",kaIpWk:"xh6dtrn",kMv6JI:"x9ynric",kGuDYH:"xcr08ib",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w",kkrTdU:"x1ypdohk",k9WMMc:"x1yc453h",kI3sdo:"x1a2a7pz",$$css:!0},itemHighlighted:{kWkggS:"x1lmrjuc",$$css:!0},itemSelected:{k63SB2:"x1e4wzip",$$css:!0},itemDisabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0}},DI={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},BI={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},Qv={warning:"warning",error:"error",success:"success"},Jv={warning:"warning",error:"error",success:"success"},qI={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function HI({option:e}){return a.jsx(rj,{icon:e.icon,label:e.label??e.value})}function Ug(e,t){return t?(e.label??e.value).toLowerCase().includes(t.toLowerCase()):!0}function e2(e,t){return t?e.filter(n=>Ug(n,t)):e}function Au(e){const t=Se(),{label:n,isLabelHidden:s=!1,description:r,isOptional:i=!1,isRequired:o=!1,isDisabled:l=!1,disabledMessage:c,options:u,value:d,onChange:h,changeAction:f,isLoading:p=!1,placeholder:g,size:b,variant:y="input",status:m,statusVariant:k="attached",labelTooltip:w,startIcon:v,htmlName:j,renderOption:C,hasSearch:$=!1,searchPlaceholder:T,placement:A,isDefaultOpen:S=!1,"data-testid":_,width:M,xstyle:z,className:O,style:I,hasClear:E,...N}=e,R=g??t("@astryx.selector.placeholder"),L=T??t("@astryx.selector.searchPlaceholder"),D=E===!0,P=da(b,"md"),F=y==="ghost"&&k==="attached"?"detached":k,X=d===null?void 0:d,G=x.useId(),Q=x.useId(),ee=x.useId(),Y=x.useId(),V=x.useId(),oe=x.useId(),le=x.useRef(null),me=x.useRef(null),se=tj(),[he,ce]=x.useState(""),J=he.length>0,[,ke]=x.useTransition(),[ue,ge]=x.useOptimistic(X),Re=p||ue!==X,ae=l&&!!c,Tt=ls({placement:"above",focusTrigger:"always",isEnabled:ae}),Yt=ls({placement:"above",isEnabled:F==="tooltip"&&!!(m!=null&&m.message)}),{ariaLabelledBy:Pn,ariaDescribedBy:kt}=v4(V,[r?ee:null,!se&&F!=="tooltip"&&(m!=null&&m.message)?Y:null,F==="tooltip"&&(m!=null&&m.message)?Yt.describedBy:null,ae?Tt.describedBy:null],se),kn=x.useMemo(()=>II(u),[u]),fs=x.useMemo(()=>e2(kn,he),[kn,he]),zs=x.useMemo(()=>kn.findIndex(pe=>pe.value===ue),[kn,ue]),va=x.useMemo(()=>zs>=0?kn[zs]:void 0,[kn,zs]),Cc=x.useRef(null),hn=lc(),Bd=x.useCallback(()=>{var pe;ce(""),hn(""),(pe=le.current)==null||pe.focus()},[hn]),Nt=kd({onHide:Bd,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>{S&&Nt.show()},[]);const $c=x.useCallback(pe=>{if(ce(pe),pe.length===0){hn("");return}const Qt=e2(kn,pe).length;hn(Qt===0?"No results found":`${Qt} result${Qt===1?"":"s"}`)},[hn,kn]),wa=A==null&&!$,{offset:qd,isPositioned:Hd}=_I({isOpen:Nt.isOpen&&wa,selectedItemIndex:zs,listboxId:Q,listboxRef:Cc,triggerRef:le}),Ec=wa?qd:0,Pd=wa?Hd:!0,Tc=A??"below",Ud=Ec>0?{marginBlockStart:`-${Ec}px`}:void 0,ja=x.useCallback(()=>{h==null||h(null),f&&ke(async()=>{ge(void 0),await f(null)})},[h,f,ke,ge]),{highlightedIndex:Un,getItemId:Ys,onTriggerClick:Fd,onKeyDown:ai,onItemSelect:Nc,onItemMouseEnter:te}=LI({selectableItems:fs,value:X,isDisabled:l,isOpen:Nt.isOpen,hasSearch:$,onOpen:x.useCallback(()=>{Nt.show(),$&&requestAnimationFrame(()=>{var pe;(pe=me.current)==null||pe.focus()})},[Nt,$]),onClose:Nt.hide,onSelect:x.useCallback(pe=>{h==null||h(pe),f&&ke(async()=>{ge(pe),await f(pe)})},[h,f,ke,ge]),onClear:D?ja:void 0,listboxId:Q});x.useEffect(()=>{var pe,Qt;!Nt.isOpen||Un<0||(Qt=(pe=document.getElementById(Ys(Un)))==null?void 0:pe.scrollIntoView)==null||Qt.call(pe,{block:"nearest"})},[Nt.isOpen,Un,Ys]);const it=x.useCallback(pe=>{pe.stopPropagation(),ja()},[ja]),Ot=x.useCallback(()=>$?a.jsx("div",{className:"x78zum5 x6s0dn4 xf314gf xu0wf1k",onKeyDown:pe=>{pe.target!==me.current&&pe.key==="Tab"&&!pe.shiftKey&&ai(pe)},children:a.jsx(ns,{ref:me,id:oe,label:t("@astryx.selector.searchOptions"),isLabelHidden:!0,startIcon:"search",hasClear:!0,size:"sm",width:"100%",role:"combobox","aria-expanded":Nt.isOpen,"aria-controls":Q,"aria-autocomplete":"list","aria-activedescendant":Nt.isOpen&&Un>=0?Ys(Un):void 0,value:he,onChange:$c,onKeyDown:pe=>{if(pe.key==="ArrowDown"||pe.key==="ArrowUp"||pe.key==="PageUp"||pe.key==="PageDown"||pe.key==="Enter"||pe.key==="Escape"){ai(pe);return}pe.key==="Tab"&&(pe.shiftKey||!J)&&ai(pe)},placeholder:L})}):null,[$,oe,Q,he,J,L,$c,ai,Nt.isOpen,Un,Ys,t]),Rs=x.useCallback((pe,Qt)=>{const oo=Qt===Un,Qs=pe.value===X;return a.jsxs("div",{id:Ys(Qt),role:"option","aria-selected":Qs,"aria-disabled":pe.disabled,onClick:()=>Nc(pe),onMouseEnter:()=>te(pe,Qt),...q(_s.item,BI[P],oo&&_s.itemHighlighted,Qs&&_s.itemSelected,pe.disabled&&_s.itemDisabled),children:[a.jsx("span",{className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli",children:C?C(pe):a.jsx(HI,{option:pe})}),Qs&&a.jsx(Te,{icon:"check",size:"sm",color:"accent"})]},pe.value)},[C,Un,P,X,Ys,Nc,te]),io=x.useCallback(()=>{const pe=$&&!!he;if(pe&&fs.length===0)return[a.jsx("div",{role:"presentation",className:"x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib",children:"No results found"},"empty")];let Qt=0;const oo=[];for(let Qs=0;Qs<u.length;Qs++){const li=u[Qs];if(RI(li)){if(pe)continue;oo.push(a.jsx(Tu,{xstyle:_s.divider},`divider-${Qs}`))}else if(sj(li)){const Ca=[];for(const cT of li.options){const tv=Hh(cT);pe&&!Ug(tv,he)||(Ca.push(Rs(tv,Qt)),Qt++)}if(Ca.length===0)continue;li.title&&oo.push(a.jsx(Tu,{label:li.title,xstyle:_s.sectionDivider},`section-divider-${Qs}`)),oo.push(a.jsx("div",{role:"group","aria-label":li.title,children:Ca},`section-${Qs}`))}else if(nj(li)){const Ca=Hh(li);if(pe&&!Ug(Ca,he))continue;oo.push(Rs(Ca,Qt)),Qt++}}return oo},[u,Rs,$,he,fs]),Sa=m!=null&&F!=="detached",Ac=m!=null&&F==="tooltip"&&!!m.message,Mc=a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:pe=>{Nt.triggerRef(pe),Tt.ref(pe)},onClick:Fd,"data-testid":_,...K(W("selector",{variant:y,size:P,status:(m==null?void 0:m.type)??null}),q(Ol.base,_s.triggerContainer,DI[P],y==="ghost"&&_s.triggerGhost,l&&Ol.disabled,y==="ghost"&&l&&_s.triggerGhostDisabled,!va&&_s.triggerPlaceholder,y!=="ghost"&&m&&Oy[m.type],y!=="ghost"&&m&&!l&&Dy[m.type],y!=="ghost"&&se&&J6.inGroup,z),O,I),children:[v&&yr(v,{size:"sm",color:"secondary"}),se&&a.jsx(si,{id:V,children:n}),a.jsx("button",{ref:le,id:G,type:"button",role:$?void 0:"combobox",...N,"aria-haspopup":"listbox","aria-expanded":Nt.isOpen,"aria-controls":Q,"aria-activedescendant":!$&&Nt.isOpen&&Un>=0?Ys(Un):void 0,"aria-describedby":kt,"aria-labelledby":Pn,"aria-required":o?"true":void 0,"aria-invalid":(m==null?void 0:m.type)==="error"?"true":void 0,"aria-busy":Re||void 0,disabled:l&&!ae,"aria-disabled":ae?"true":void 0,onKeyDown:ai,tabIndex:l&&!ae?-1:0,className:"x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x1a2a7pz",children:a.jsx("span",{className:"x1iyjqo2 xeuugli xb3r6kr xlyipyv xuxw1ft x1yc453h",children:(va==null?void 0:va.label)??R})}),j!=null&&a.jsx("input",{type:"hidden",name:j,value:d??"",disabled:l}),Re&&a.jsx(un,{size:"sm"}),D&&d!=null&&!l&&a.jsx("button",{type:"button",onClick:it,"aria-label":t("@astryx.selector.clearLabel",{label:n}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:a.jsx(Te,{icon:"close",size:"sm",color:"secondary",...W("selector-clear-icon")})}),a.jsx("span",{...{0:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike"},2:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike x19jd1h0"},1:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike xq2gx43"},3:{className:"x2lah0s x78zum5 x6s0dn4 xl56j7k x1kky2od xlup9mm x11xpdln xuedmi6 xlr8y92 x1g0ag68 xv9yike x19jd1h0 xq2gx43"}}[!!(!Sa&&Nt.isOpen)<<1|!!Sa<<0],children:Sa?Ac?a.jsx("button",{ref:Yt.ref,type:"button","aria-label":t(qI[m.type]),"aria-describedby":Yt.describedBy,onClick:pe=>pe.stopPropagation(),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:a.jsx(Te,{icon:Qv[m.type],size:"sm",color:Jv[m.type]})}):a.jsx(Te,{icon:Qv[m.type],size:"sm",color:Jv[m.type]}):a.jsx(Te,{icon:"chevronDown",size:"sm",color:"inherit",...W("selector-indicator-icon",{state:Nt.isOpen?"expanded":"collapsed"})})})]}),Nt.render($?a.jsxs("div",{children:[Ot(),a.jsx("div",{ref:Cc,id:Q,role:"listbox","aria-labelledby":G,className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo",children:io()})]}):a.jsx("div",{ref:Cc,id:Q,role:"listbox","aria-labelledby":G,...{0:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo"},1:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk xg01cxk xq2gx43"}}[!Pd<<0],children:io()}),{placement:Tc,alignment:"start",xstyle:[_s.popover,Ur[Tc]],style:Ud}),Ac&&Yt.renderTooltip((m==null?void 0:m.message)??""),ae&&Tt.renderTooltip(c)]});return se?Mc:a.jsx(cc,{label:n,isLabelHidden:s,description:r,inputID:G,descriptionID:r?ee:void 0,isOptional:i,isRequired:o,isDisabled:l,status:m?{type:m.type,message:m.message,messageID:m.message?Y:void 0}:void 0,statusVariant:F,labelTooltip:w,width:M,children:Mc})}Au.displayName="Selector";var ij={exports:{}},yn={};/**
|
|
138
|
-
* @license React
|
|
139
|
-
* react-dom.production.js
|
|
140
|
-
*
|
|
141
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
142
|
-
*
|
|
143
|
-
* This source code is licensed under the MIT license found in the
|
|
144
|
-
* LICENSE file in the root directory of this source tree.
|
|
145
|
-
*/var PI=x;function oj(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 fi(){}var Tn={d:{f:fi,r:function(){throw Error(oj(522))},D:fi,C:fi,L:fi,m:fi,X:fi,S:fi,M:fi},p:0,findDOMNode:null},UI=Symbol.for("react.portal"),FI=Symbol.for("react.recoverable"),t2=Symbol.for("react.optimistic_key");function GI(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:UI,key:s==null?null:s===t2?t2:""+s,children:e,containerInfo:t,implementation:n}}var au=PI.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function a1(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}yn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Tn;yn.browser=function(e){return{$$typeof:FI,_reason:e}};yn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(oj(299));return GI(e,t,null,n)};yn.flushSync=function(e){var t=au.T,n=Tn.p;try{if(au.T=null,Tn.p=2,e)return e()}finally{au.T=t,Tn.p=n,Tn.d.f()}};yn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Tn.d.C(e,t))};yn.prefetchDNS=function(e){typeof e=="string"&&Tn.d.D(e)};yn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,s=a1(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Tn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:s,integrity:r,fetchPriority:i}):n==="script"&&Tn.d.X(e,{crossOrigin:s,integrity:r,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};yn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=a1(t.as,t.crossOrigin);Tn.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}}else t==null&&Tn.d.M(e)};yn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,s=a1(n,t.crossOrigin);Tn.d.L(e,n,{crossOrigin:s,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})}};yn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=a1(t.as,t.crossOrigin);Tn.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,nonce:typeof t.nonce=="string"?t.nonce:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0})}else Tn.d.m(e)};yn.requestFormReset=function(e){Tn.d.r(e)};yn.unstable_batchedUpdates=function(e,t){return e(t)};yn.useFormState=function(e,t,n){return au.H.useFormState(e,t,n)};yn.useFormStatus=function(){return au.H.useHostTransitionStatus()};yn.version="19.3.0";function aj(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aj)}catch(e){console.error(e)}}aj(),ij.exports=yn;var Mu=ij.exports;const n2={popoverSurface:{k7Eaqz:"xfb3i0g",$$css:!0},popoverGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0}};function VI(e){const t=window.getSelection();if(!t||t.rangeCount===0)return null;const n=t.getRangeAt(0);if(!n.collapsed||!e.contains(n.startContainer))return null;const s=n.startContainer;return s.nodeType===Node.TEXT_NODE?(s.textContent??"").slice(0,n.startOffset):null}function WI(e,t){for(let n=e.length-1;n>=0;n--){const s=e[n];if(s===" "||s===`
|
|
146
|
-
`)return null;for(const r of t)if(s===r.character){const i=n>0?e[n-1]:null;if(i===null||i===" "||i===`
|
|
147
|
-
`){const o=e.slice(n+1);return{trigger:r,query:o,triggerStart:n}}}}return null}function KI(e,t){const n=window.getSelection();if(!n||n.rangeCount===0)return;const s=n.getRangeAt(0),r=s.startContainer;if(r.nodeType!==Node.TEXT_NODE)return;const i=r.textContent??"",o=s.startOffset,l=i.slice(0,t),c=i.slice(o);r.textContent=l+c;const u=document.createRange();u.setStart(r,t),u.collapse(!0),n.removeAllRanges(),n.addRange(u)}function XI(e){const t=Se(),{triggers:n,editableRef:s,onInsertToken:r,onInsertText:i,onEmitChange:o,debounceMs:l=150}=e,c=x.useId(),[u,d]=x.useState({isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}),h=x.useRef(-1),f=x.useRef(null),p=x.useRef(null),g=x.useCallback(()=>{p.current&&(p.current.remove(),p.current=null)},[]),b=kd({onHide:x.useCallback(()=>{g(),d(S=>({...S,isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}))},[g]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>()=>{f.current&&clearTimeout(f.current),g()},[g]);const y=x.useCallback(()=>{var _,M;f.current&&(clearTimeout(f.current),f.current=null);const S=u.activeTrigger;S!=null&&S.searchSource&&((M=(_=S.searchSource).cancel)==null||M.call(_)),g(),b.hide(),h.current=-1},[b,u.activeTrigger,g]),m=x.useCallback(()=>{const S=s.current;if(!S)return;const _=window.getSelection();if(!_||_.rangeCount===0){b.triggerRef(S);return}g();const M=_.getRangeAt(0).cloneRange();M.collapse(!0);const z=typeof M.getBoundingClientRect=="function"?M.getBoundingClientRect():null;if(!z||z.width===0&&z.height===0&&z.top===0&&z.left===0){b.triggerRef(S);return}const O=document.createElement("span");O.setAttribute("aria-hidden","true"),O.setAttribute("data-astryx-trigger-anchor",""),O.style.position="fixed",O.style.left=`${z.left}px`,O.style.top=`${z.top}px`,O.style.width=`${Math.max(z.width,1)}px`,O.style.height=`${z.height}px`,O.style.pointerEvents="none",O.style.opacity="0",document.body.appendChild(O),p.current=O,b.triggerRef(O)},[s,b,g]),k=x.useCallback((S,_)=>{f.current&&(clearTimeout(f.current),f.current=null);const M=()=>{var z,O;if(S.searchSource){(O=(z=S.searchSource).cancel)==null||O.call(z),d(E=>({...E,isLoading:!0}));const I=S.searchSource.search(_);Promise.resolve(I).then(E=>{d(N=>({...N,items:E,highlightedIndex:E.length>0?0:-1,isLoading:!1}))},()=>{d(E=>({...E,items:[],highlightedIndex:-1,isLoading:!1}))})}};S.searchSource&&(S.searchSource.search("")instanceof Promise&&l>0?(d(I=>({...I,isLoading:!0})),f.current=setTimeout(M,l)):M())},[l]),w=x.useCallback(S=>{const _=u.activeTrigger;if(!_)return;const M=s.current;if(!M)return;g(),KI(M,h.current);const z=_.onSelect(S);typeof z=="string"?i(z):r(z),o(),y()},[u.activeTrigger,s,g,i,r,o,y]),v=x.useCallback(()=>{if(!n||n.length===0)return;const S=s.current;if(!S)return;const _=VI(S);if(_===null){u.isActive&&y();return}const M=WI(_,n);if(!M){u.isActive&&y();return}const{trigger:z,query:O,triggerStart:I}=M;!u.isActive||u.activeTrigger!==z?(h.current=I,d(E=>({...E,isActive:!0,activeTrigger:z,query:O,highlightedIndex:0})),m(),k(z,O),b.show()):u.query!==O&&(d(E=>({...E,query:O})),k(z,O))},[n,s,u.isActive,u.activeTrigger,u.query,y,m,k,b]),j=x.useCallback(S=>{if(!u.isActive||!b.isOpen)return!1;switch(S.key){case"ArrowDown":return S.preventDefault(),d(_=>({..._,highlightedIndex:_.highlightedIndex<_.items.length-1?_.highlightedIndex+1:0})),!0;case"ArrowUp":return S.preventDefault(),d(_=>({..._,highlightedIndex:_.highlightedIndex>0?_.highlightedIndex-1:_.items.length-1})),!0;case"Enter":case"Tab":return u.highlightedIndex>=0&&u.highlightedIndex<u.items.length?(S.preventDefault(),w(u.items[u.highlightedIndex]),!0):!1;case"Escape":return S.preventDefault(),y(),!0;default:return!1}},[u.isActive,u.highlightedIndex,u.items,b.isOpen,w,y]),C=x.useCallback(S=>`${c}-option-${S}`,[c]);x.useEffect(()=>{if(!b.isOpen||u.highlightedIndex<0)return;const S=document.getElementById(C(u.highlightedIndex));S==null||S.scrollIntoView({block:"nearest"})},[u.highlightedIndex,b.isOpen,C]);const T=((n==null?void 0:n.length)??0)>0?u.isActive&&b.isOpen?{role:"combobox","aria-expanded":!0,"aria-controls":c,"aria-activedescendant":u.highlightedIndex>=0?C(u.highlightedIndex):void 0,"aria-haspopup":"listbox"}:{role:"combobox","aria-expanded":!1,"aria-haspopup":"listbox"}:{role:"textbox"},A=x.useCallback(()=>{const S=u.activeTrigger,_=(S==null?void 0:S.emptySearchResultsText)??"No results",M=(S==null?void 0:S.loadingText)??"Searching…";let z;if(u.isLoading)z=a.jsx("div",{role:"status",className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:M});else if(u.items.length===0&&u.isActive)z=a.jsx("div",{className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:_});else{const O=uN(u.items);let I=0;z=O.map(E=>{const N=E.items.map(R=>{const L=I++;return a.jsx("div",{id:C(L),role:"option","aria-selected":L===u.highlightedIndex,tabIndex:-1,onMouseDown:D=>{D.preventDefault(),w(R)},onMouseEnter:()=>d(D=>({...D,highlightedIndex:L})),...{0:{className:"x9f619 x78zum5 x6s0dn4 xh8yej3 xlsj2fj xh6dtrn x1ypdohk x1a2a7pz xjbqb8w x1yc453h x9ynric xjm74w1 xw6l6zx x1tgivj0"},1:{className:"x9f619 x78zum5 x6s0dn4 xh8yej3 xlsj2fj xh6dtrn x1ypdohk x1a2a7pz x1yc453h x9ynric xjm74w1 xw6l6zx x1tgivj0 x1lmrjuc"}}[(L===u.highlightedIndex)<<0],children:S!=null&&S.renderItem?S.renderItem(R):a.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:R.label})},R.id)});return E.heading?a.jsxs("div",{role:"group","aria-label":E.heading,children:[a.jsx("div",{"aria-hidden":"true",className:"xf314gf x1xye8es xy143xn x141an7d x1ltkj2j xv1l7n4 x87ps6o",children:E.heading}),N]},`group-${E.heading}`):N})}return b.render(a.jsx("div",{id:c,role:"listbox","aria-label":(S==null?void 0:S.menuLabel)??t("@astryx.chatTriggerMenu.suggestions"),...K(W("trigger-menu"),{className:"x9f619 x1xiyphd x1odjw0f x9epnlk xfb3i0g"}),children:z}),{placement:"above",alignment:"start",xstyle:[n2.popoverSurface,n2.popoverGap]})},[b,c,u,w,C,t]);return{state:u,handleInput:v,handleKeyDown:j,renderMenu:A,reset:y,ariaProps:T}}function Ph(e){const t=window.getSelection();if(!t)return null;if(t.rangeCount>0){const s=t.getRangeAt(0);if(e.contains(s.startContainer))return t}const n=document.createRange();return n.selectNodeContents(e),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t}function Fg(e,t){const n=Ph(e);if(!n||n.rangeCount===0)return!1;const s=n.getRangeAt(0);s.deleteContents();const r=document.createTextNode(t);return s.insertNode(r),s.setStartAfter(r),s.collapse(!0),n.removeAllRanges(),n.addRange(s),!0}function ZI(e){return"render"in e&&typeof e.render=="function"}function YI(e){let t=e;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute("data-astryx-token"))return t;t=t.parentNode}return null}function QI({editableRef:e,onEmitChange:t}){const[n,s]=x.useState([]),r=x.useCallback(u=>{const d=e.current;if(!d)return;const h=Ph(d);if(!h||h.rangeCount===0)return;const f=h.getRangeAt(0),p=document.createElement("span"),g=`token-${Date.now()}-${Math.random().toString(36).slice(2,6)}`;p.setAttribute("data-astryx-token",""),p.setAttribute("data-astryx-token-value",u.value),p.setAttribute("data-astryx-token-id",g),p.contentEditable="false",p.style.display="inline-flex",p.style.verticalAlign="baseline",f.deleteContents(),f.insertNode(p);const b=document.createTextNode(" ");p.after(b);const y=document.createRange();return y.setStartAfter(b),y.collapse(!0),h.removeAllRanges(),h.addRange(y),s(m=>[...m,{id:g,span:p,token:u}]),g},[e]),i=x.useCallback(u=>{if(u.key!=="Backspace")return!1;const d=window.getSelection();if(!d||!d.isCollapsed||d.rangeCount===0)return!1;const h=d.getRangeAt(0),{startContainer:f,startOffset:p}=h;if(f.nodeType===Node.TEXT_NODE&&p===0&&f.previousSibling instanceof HTMLElement&&f.previousSibling.hasAttribute("data-astryx-token"))return!1;if(f.nodeType===Node.TEXT_NODE&&f.textContent===" "&&p<=1&&f.previousSibling instanceof HTMLElement&&f.previousSibling.hasAttribute("data-astryx-token")){u.preventDefault();const g=f.previousSibling,b=f.parentNode;return b&&(b.removeChild(f),b.removeChild(g)),t(),!0}return!1},[t]),o=x.useCallback(u=>{const d=e.current;if(!d)return!1;const h=Ph(d);if(!h||h.rangeCount===0)return!1;const f=h.getRangeAt(0),p=YI(f.startContainer);if(p){u.preventDefault();const g=u.clipboardData.getData("text/plain"),b=p.nextSibling,y=document.createRange();return b&&b.nodeType===Node.TEXT_NODE?y.setStartAfter(b):y.setStartAfter(p),y.collapse(!0),h.removeAllRanges(),h.addRange(y),Fg(d,g),t(),!0}return!1},[e,t]),l=x.useCallback(u=>{if(!e.current)return;const h=n.find(m=>m.id===u);if(!h)return;const{span:f}=h,p=f.getAttribute("data-astryx-token-value")??"",g=document.createTextNode(p),b=f.nextSibling;(b==null?void 0:b.nodeType)===Node.TEXT_NODE&&b.textContent===" "&&b.remove(),f.replaceWith(g);const y=window.getSelection();if(y){const m=document.createRange();m.setStartAfter(g),m.collapse(!0),y.removeAllRanges(),y.addRange(m)}s(m=>m.filter(k=>k.id!==u)),t()},[e,n,t]),c=x.useCallback(()=>{s(u=>u.filter(d=>{var h;return(h=e.current)==null?void 0:h.contains(d.span)}))},[e]);return{tokenPortals:n,expandToken:l,insertToken:r,handleKeyDown:i,handlePaste:o,cleanupPortals:c}}function JI(e){const t=e.split(`
|
|
148
|
-
`).length,n=e.length;return t>1?`${t} lines, ${n} chars`:`${n} chars`}function lj({text:e,onExpand:t}){const n=Se(),s=JI(e),r=a.jsxs("div",{className:"x78zum5 xdt5ytf x1txdalj x17fpy1y",children:[a.jsx("div",{className:"x9m5x89 x141an7d x1ltkj2j x1tgivj0 x126k92a x13faqbe x1xiyphd x1odjw0f",children:e}),a.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj",children:[a.jsx("span",{className:"x141an7d xv1l7n4",children:s}),t&&a.jsx(ne,{label:n("@astryx.chat.pastedText.expand"),variant:"ghost",size:"sm",onClick:t})]})]});return a.jsx(G6,{content:r,placement:"above",alignment:"start",hasHoverIndication:!1,children:a.jsx(yd,{label:s,variant:"neutral"})})}lj.displayName="ChatPastedTextToken";function e_(e){const t=e.split(`
|
|
149
|
-
`).length,n=e.length,s=t>1?`${t} lines, ${n} chars`:`${n} chars`;return{value:e,label:s,variant:"neutral"}}function t_({inputRef:e,threshold:t=200,toToken:n=e_}){return{onPaste:x.useCallback((r,i)=>{var l;if(i.length<=t)return!1;const o=n(i);return(l=e.current)==null||l.insertToken(o),!0},[e,t,n])}}const By=x.createContext(null);By.displayName="ChatMessageContext";function n_(){return x.use(By)}const qy=x.createContext(null);qy.displayName="ChatListContext";function s_(){return x.use(qy)}const Hy=x.createContext(null);Hy.displayName="ChatComposerContext";function cj(){return x.use(Hy)}const Py=x.createContext(null);Py.displayName="ChatLayoutContext";function r_(){return x.use(Py)}const i_=22,s2={root:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"xe0957l",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function gp(e){const t=window.getSelection();if(!t)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}function Ba(e){let t="";for(const n of Array.from(e.childNodes))n.nodeType===Node.TEXT_NODE?t+=n.textContent??"":n instanceof HTMLElement&&(n.hasAttribute("data-astryx-token")?t+=n.getAttribute("data-astryx-token-value")??"":n.tagName==="BR"?t+=`
|
|
150
|
-
`:t+=Ba(n));return t}function Uy(e){const t=Se(),n=cj(),s=e.value!==void 0,{ref:r,handleRef:i,value:o=n==null?void 0:n.value,onChange:l,placeholder:c,maxRows:u=8,triggers:d,debounceMs:h=150,hasHistory:f=!0,label:p,isDisabled:g=(n==null?void 0:n.isDisabled)??!1,onPaste:b,pasteAsToken:y,onFiles:m,onSubmit:k=n==null?void 0:n.onSubmit,onKeyDown:w,xstyle:v,className:j,style:C,...$}=e,T=p??t("@astryx.chat.composerInput.label"),A=c??(n==null?void 0:n.placeholder)??t("@astryx.chat.composer.placeholder"),S=n==null?void 0:n.onChange,_=x.useCallback(J=>{if(s){l==null||l(J);return}S==null||S(J),l!==S&&(l==null||l(J))},[S,s,l]),M=x.useRef(null),z=x.useRef(null),[O,I]=x.useState(!0),E=x.useRef([]),N=x.useRef(-1),R=x.useRef(""),L=x.useRef(void 0),D=x.useRef(()=>{}),P=x.useRef(()=>{}),F={insertToken:J=>D.current(J),expandToken:J=>ee.expandToken(J),insertText:J=>P.current(J),focus:()=>{var J;return(J=M.current)==null?void 0:J.focus()},getValue:()=>Ba(M.current??document.createElement("div"))};z.current=F,x.useImperativeHandle(i,()=>F);const X=n==null?void 0:n.inputControlRef;x.useEffect(()=>{if(X)return X.current={focus:()=>{var J;return(J=M.current)==null?void 0:J.focus()}},()=>{X.current=null}},[X]),x.useEffect(()=>{if(o===void 0||!M.current)return;if(o===L.current){L.current=void 0;return}const J=M.current;if(Ba(J)!==o){L.current=void 0;const ke=document.activeElement===J;if(J.textContent=o,ke){const ue=window.getSelection();if(ue){const ge=document.createRange();ge.selectNodeContents(J),ge.collapse(!1),ue.removeAllRanges(),ue.addRange(ge)}}I(o.length===0)}else L.current=void 0},[o]);const G=x.useRef(null),Q=x.useCallback(()=>{var Re;if(!M.current)return;const J=Ba(M.current),ke=M.current.querySelector("[data-astryx-token], [data-astryx-dictation-interim]")!=null,ue=J.trim().length===0&&!ke,ge=ue?"":J;L.current=ge,I(ue),_==null||_(ge),(Re=G.current)==null||Re.call(G)},[_]),ee=QI({editableRef:M,onEmitChange:Q});G.current=ee.cleanupPortals;const Y=t_({inputRef:z}),V=y===!1?null:y??Y,oe=x.useCallback(J=>{const ke=M.current;ke&&Fg(ke,J)},[]);D.current=ee.insertToken,P.current=oe;const le=XI({triggers:d,editableRef:M,onInsertToken:ee.insertToken,onInsertText:oe,onEmitChange:Q,debounceMs:h}),me=x.useCallback(()=>{Q(),le.handleInput()},[Q,le]),se=x.useCallback(J=>{if(!le.handleKeyDown(J)&&(w==null||w(J),!J.defaultPrevented)){if(J.key==="Backspace"){const ke=window.getSelection();if(ke&&ke.isCollapsed&&ke.rangeCount>0){const ue=ke.getRangeAt(0),{startContainer:ge,startOffset:Re}=ue;if(!(ge.nodeType===Node.TEXT_NODE&&Re===0&&ge.previousSibling instanceof HTMLElement&&ge.previousSibling.hasAttribute("data-astryx-token"))){if(ge.nodeType===Node.TEXT_NODE&&ge.textContent===" "&&Re<=1&&ge.previousSibling instanceof HTMLElement&&ge.previousSibling.hasAttribute("data-astryx-token")){J.preventDefault();const ae=ge.previousSibling,Tt=ge.parentNode;Tt&&(Tt.removeChild(ge),Tt.removeChild(ae)),Q();return}}}}if(J.key==="Enter"&&!J.shiftKey){if(J.nativeEvent.isComposing||J.nativeEvent.keyCode===229||(J.preventDefault(),!M.current))return;const ke=Ba(M.current).trim();if(!ke)return;f&&(E.current.push(ke),N.current=-1,R.current=""),k==null||k(ke),M.current.textContent="",I(!0),_==null||_("");return}if(f&&(J.key==="ArrowUp"||J.key==="ArrowDown")){if(!M.current)return;const ke=Ba(M.current),ue=E.current;if(ue.length===0)return;if(J.key==="ArrowUp"){N.current===-1&&(R.current=ke);const ge=N.current===-1?ue.length-1:Math.max(0,N.current-1);N.current=ge,M.current.textContent=ue[ge],gp(M.current),Q(),J.preventDefault()}else if(J.key==="ArrowDown"&&N.current!==-1){const ge=N.current+1;ge>=ue.length?(N.current=-1,M.current.textContent=R.current,R.current&&gp(M.current)):(N.current=ge,M.current.textContent=ue[ge],gp(M.current)),Q(),J.preventDefault()}}}},[f,k,_,Q,le,w]),he=x.useCallback(J=>{const ke=M.current;if(!ke||(Ph(ke),ee.handlePaste(J)))return;const ue=Array.from(J.clipboardData.files);if(ue.length>0){J.preventDefault(),m==null||m(ue);return}J.preventDefault();const ge=J.clipboardData.getData("text/plain");if(V!=null&&V.onPaste(J,ge)){Q();return}if(b==null?void 0:b(J,ge)){Q();return}Fg(ke,ge),Q()},[m,b,Q,ee,V]),ce=u*i_;return a.jsxs("div",{ref:r,...K(W("chat-composer-input"),q(s2.root,g&&s2.disabled,v),j,C),...$,children:[O&&a.jsx("div",{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x47corl xv1l7n4 xjm74w1 x6pjikd x19v9tvf x9ynric x87ps6o x9epnlk","aria-hidden":"true",children:A}),a.jsx("div",{ref:M,"aria-multiline":"true","aria-label":T,contentEditable:!g,suppressContentEditableWarning:!0,onInput:me,onKeyDown:se,onPaste:he,...le.ariaProps,...K({className:"x1a2a7pz x126k92a x13faqbe x1odjw0f xjm74w1 x6pjikd x19v9tvf x9ynric x1tgivj0 xxugrtn x9epnlk"},{style:{maxHeight:`${ce}px`}})}),le.renderMenu(),ee.tokenPortals.filter(({span:J})=>J.isConnected).map(({id:J,span:ke,token:ue})=>Mu.createPortal(ZI(ue)?a.jsx("span",{children:ue.render()},J):ue.value.length>(V===null?1/0:200)?a.jsx(lj,{text:ue.value,onExpand:()=>ee.expandToken(J)},J):a.jsx(yd,{label:ue.label,variant:ue.variant,icon:ue.icon},J),ke))]})}Uy.displayName="ChatComposerInput";const o_={root:{kaIpWk:"xy0xnkn",kmuXW:"x2lah0s",$$css:!0}};function Fy(e){const t=Se(),n=cj(),{isStopShown:s=(n==null?void 0:n.isStopShown)??!1,isDisabled:r=!((n==null?void 0:n.canSend)??!1),onSend:i,onStop:o=n==null?void 0:n.onStop,sendIcon:l,stopIcon:c,size:u="md",xstyle:d,className:h,style:f,ref:p,...g}=e,b=i??(()=>n==null?void 0:n.onSubmit("")),y=Ll("stop"),m=Ll("arrowUp");return a.jsx(ne,{ref:p,label:t(s?"@astryx.chatSendButton.stop":"@astryx.chatSendButton.send"),variant:s?"secondary":"primary",size:u,icon:s?c??y:l??m,isIconOnly:!0,isDisabled:!s&&r,onClick:s?o:b,...g,...W("chat-send-button"),className:h,style:f,xstyle:[o_.root,d]})}Fy.displayName="ChatSendButton";const r2={body:{kVAEAm:"x1n2onr6",kY2c9j:"xhtitgo",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kmVPX3:"x18oj4ui",kOIVth:"x1txdalj",kaIpWk:"x1xunbrq",kWkggS:"x1prclbq",kkrTdU:"x1ed109x",kmkexE:"xrg7dcy",$$css:!0},compact:{"--_chat-composer-padding":"x18zce08",kOIVth:"xzye2dw",$$css:!0}},a_={low:{kGVxlE:"x1i5ehqx xhouywz",knuKkz:"xyavpck",$$css:!0},none:{kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"xvy26l8 x6q1khz",kmVPX3:"x1b50gpf",kGVxlE:"x1gnnqk1 x12y27fx xuihb5h",$$css:!0}};function uj(e){const t=Se(),{ref:n,onSubmit:s,onStop:r,isStopShown:i=!1,value:o,onChange:l,placeholder:c,isDisabled:u=!1,density:d="balanced",elevation:h="low",drawer:f,headerActions:p,headerContext:g,input:b,footerActions:y,sendActions:m,sendButton:k,status:w,statusPosition:v="bottom",xstyle:j,className:C,style:$,...T}=e,A=c??t("@astryx.chat.composer.placeholder"),[S,_]=x.useState(""),M=o!==void 0,z=M?o:S,O=x.useCallback(F=>{M||_(F),l==null||l(F)},[M,l]),I=x.useCallback(()=>{const F=z.trim();!F||u||(s(F),O(""))},[z,u,s,O]),E=z.trim().length>0&&!u,N=x.useRef(null),R=x.useRef(null),L=x.useCallback(F=>{var Q;if(F.target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]'))return;if(R.current){R.current.focus();return}const G=(Q=N.current)==null?void 0:Q.querySelector('[contenteditable="true"], textarea');G==null||G.focus()},[]),D=w?a.jsxs("div",{role:w.type==="error"?"alert":"status",...{0:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c"},4:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz"},2:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x1pritpl x1joocv1"},6:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x1pritpl x1joocv1"},1:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x24i8r5 xdhq94a"},5:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x24i8r5 xdhq94a"},3:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x1htvmrp xvpcij2 xckg3cf xkvxy4d x6k0y1c x24i8r5 xdhq94a"},7:{className:"x1n2onr6 x1ja2u2z x78zum5 x6s0dn4 x1txdalj x1pzlopt x141an7d x1ltkj2j x9ynric x2gtn7z x9jihrk x1z0f2p2 xy7p8pm xzc3kxz x24i8r5 xdhq94a"}}[(v==="top")<<2|(w.type==="error")<<1|(w.type==="warning")<<0],children:[a.jsx(Te,{icon:w.type==="error"?"error":"warning",size:"md",color:w.type==="error"?"error":"warning"}),w.message]}):null,P=x.useMemo(()=>({value:z,onChange:O,onSubmit:I,placeholder:A,isDisabled:u,isStopShown:i,canSend:E,onStop:r,inputControlRef:R}),[z,O,I,A,u,i,E,r]);return a.jsx(Hy,{value:P,children:a.jsxs("div",{ref:n,...K(W("chat-composer",{density:d}),{0:{className:"x1n2onr6 x1ja2u2z xc8icb0 x78zum5 xdt5ytf xx161y6 xk0ittl xcw7vlg"},1:{className:"x1n2onr6 x1ja2u2z xc8icb0 x78zum5 xdt5ytf xx161y6 xk0ittl xcw7vlg x197sbye x47corl"}}[!!u<<0],C,$),...T,children:[v==="top"&&D,f,a.jsxs("div",{ref:N,onClick:L,...q(r2.body,a_[h],d==="compact"&&r2.compact,j),children:[(p||g)&&a.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj xe0p6wg",children:[a.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:p}),a.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj xvc5jky x141an7d x1ltkj2j xv1l7n4",children:g})]}),a.jsx("div",{className:"x78zum5 xdt5ytf",children:b??a.jsx(Uy,{})}),a.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj x21xpn4",children:[a.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:y}),a.jsxs("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:[m,k??a.jsx(Fy,{})]})]})]}),v==="bottom"&&D]})})}uj.displayName="ChatComposer";const l_={root:{kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kVQacm:"xb3r6kr",kg3NbH:"x1pzlopt",kLKAdn:"x1vlblms",kGO01o:"xxbfulo",k1K539:"x1cdrix3",kWkggS:"x10xzikg",kKwaWg:"x1vrk509",krdFHd:"x1n70msy",kfmiAY:"xg0tfu",$$css:!0}};function dj({ref:e,children:t,count:n,label:s,isCollapsed:r,defaultIsCollapsed:i=!1,onCollapsedChange:o,xstyle:l,className:c,style:u,"data-testid":d,...h}){const f=Se(),p=s??f("@astryx.chat.composerDrawer.label"),[g,b]=x.useState(i),y=r!==void 0,m=y?r:g,k=n!=null,w=x.useId(),v=()=>{const j=!m;y||b(j),o==null||o(j)};return a.jsxs("div",{ref:e,"data-testid":d,...K(W("chat-composer-drawer",{collapsed:m?"collapsed":null}),q(l_.root,l),c,u),...h,children:[k&&a.jsxs("div",{...{0:{className:"xrvj5dj x1y6fwsi x6s0dn4 x1grt7ep x1pzlopt x1ng9b9t x1ypdohk x87ps6o x-default-marker"},1:{className:"xrvj5dj x1y6fwsi x6s0dn4 x1grt7ep x1pzlopt x1ng9b9t x1ypdohk x87ps6o x-default-marker"}}[!!m<<0],role:"button",tabIndex:0,"aria-expanded":!m,"aria-controls":w,"aria-label":m?f("@astryx.chatComposerDrawer.expand",{label:p}):f("@astryx.chatComposerDrawer.collapse",{label:p}),onClick:v,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),v())},children:[a.jsxs("div",{...{0:{className:"x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x1grt7ep x1txdalj xjspbzw x1hc1fzr x19991ni xuedmi6 xlr8y92"},1:{className:"x1ms6mhf xgkxs2y x1lqcxt8 x3nfvp2 x6s0dn4 x1grt7ep x1txdalj xjspbzw x19991ni xuedmi6 xlr8y92 xg01cxk x47corl"}}[!m<<0],children:[a.jsx(yd,{variant:"neutral",label:n}),a.jsx("span",{className:"xv1l7n4 x1t9gxa6 xjm74w1 x7acx1w xt3l3uh xuedmi6 xlr8y92",children:p})]}),a.jsx("div",{...{0:{className:"x1ms6mhf xgkxs2y x7v7x1q x1y8v6su xfyiiit x1b2l0oc xjspbzw x1q5y3ey x1pe4z86 x1hc1fzr x1e8aii2 xuedmi6 xlr8y92"},1:{className:"x1ms6mhf xgkxs2y x7v7x1q x1y8v6su xfyiiit x1b2l0oc xjspbzw x1q5y3ey x1pe4z86 x1e8aii2 xuedmi6 xlr8y92 xg01cxk x47corl"}}[!!m<<0]})]}),a.jsx("div",{id:w,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!(k&&m)<<0],children:a.jsx("div",{...{0:{className:"x2lwn1j x78zum5 x1a02dak xzye2dw x1cy8zhl x1hc1fzr x19991ni x80gvsz x10b1n17 xlr8y92"},1:{className:"x2lwn1j x78zum5 x1a02dak xzye2dw x1cy8zhl x19991ni xlr8y92 xg01cxk x1ahifba xuedmi6"}}[!!(k&&m)<<0],children:t})})]})}dj.displayName="ChatComposerDrawer";const Dc={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},inner:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",kAzted:"x2lwn1j",$$css:!0},gapCompact:{kOIVth:"x1txdalj",k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},gapBalanced:{kOIVth:"x18g69wz",k8WAf4:"x1na6nto",kg3NbH:"x1pzlopt",$$css:!0},gapSpacious:{kOIVth:"x1qh66ti",k8WAf4:"xq6koh6",kg3NbH:"xm7rs69",$$css:!0}},c_={0:{kOIVth:"xsn7fz1",$$css:!0},1:{kOIVth:"xzye2dw",$$css:!0},2:{kOIVth:"x1txdalj",$$css:!0},3:{kOIVth:"xjcht0a",$$css:!0},4:{kOIVth:"x18g69wz",$$css:!0},5:{kOIVth:"x9mgr7n",$$css:!0},6:{kOIVth:"x1qh66ti",$$css:!0},8:{kOIVth:"x4t41sb",$$css:!0},10:{kOIVth:"x3hoi3v",$$css:!0},"0.5":{kOIVth:"x1lsbc85",$$css:!0},"1.5":{kOIVth:"x1s4dlld",$$css:!0}};function fj({children:e,emptyState:t,scrollToTopAction:n,density:s="balanced",gap:r,isStreaming:i=!1,xstyle:o,className:l,style:c,"data-testid":u,ref:d,...h}){const f=r_(),p=x.useRef(null),g=x.useRef(null),[b,y]=x.useTransition();x.useEffect(()=>{if(f!=null&&f.contentRef&&g.current)return f.contentRef(g.current),()=>f.contentRef(null)},[f]);const m=e!=null&&e!==!1&&!(Array.isArray(e)&&e.length===0);x.useEffect(()=>{var $;const j=($=f==null?void 0:f.scrollContainerRef)==null?void 0:$.current;if(!n||!p.current)return;const C=new IntersectionObserver(T=>{var A;(A=T[0])!=null&&A.isIntersecting&&y(async()=>{await n()})},{root:j??null,threshold:0});return C.observe(p.current),()=>C.disconnect()},[n,f]);const k=x.useMemo(()=>({density:s}),[s]),w=s==="compact"?Dc.gapCompact:s==="spacious"?Dc.gapSpacious:Dc.gapBalanced,v=r==null?null:c_[r];return a.jsx(qy,{value:k,children:a.jsx("div",{...h,ref:d,role:"log","aria-live":"polite","aria-busy":i||void 0,tabIndex:0,"data-testid":u,...K(W("chat-message-list",{density:s}),q(Dc.root,o),l,c),children:a.jsxs("div",{ref:g,...q(Dc.inner,w,v),children:[n&&a.jsx("div",{ref:p,"aria-hidden":!0}),b&&a.jsx("div",{className:"x78zum5 xl56j7k x8o8v82",children:a.jsx(un,{size:"md"})}),a.jsx("div",{className:"x98rzlu x2lwn1j","aria-hidden":!0}),m?e:t?a.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu x2lwn1j",children:t}):null]})})})}fj.displayName="ChatMessageList";const Bt={root:{k1xSpc:"x78zum5",kGNEyG:"x1cy8zhl",ks0D6T:"x193iq5w",$$css:!0},rootGapCompact:{kOIVth:"x1s4dlld",$$css:!0},rootGapBalanced:{kOIVth:"x1txdalj",$$css:!0},rootGapSpacious:{kOIVth:"xjcht0a",$$css:!0},rootAssistant:{kXwgrk:"x1q0g3np",kjj79g:"x1nhvcw1",$$css:!0},rootUser:{kXwgrk:"x15zctf7",kjj79g:"x1nhvcw1",$$css:!0},rootSystem:{kXwgrk:"x1q0g3np",kjj79g:"xl56j7k",$$css:!0},contentColumn:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0},contentColumnSystem:{ks0D6T:"xq8v1hd",kGNEyG:"x6s0dn4",$$css:!0},contentColumnAssistant:{kGNEyG:"x1cy8zhl",$$css:!0},contentColumnUser:{kGNEyG:"xuk3077",$$css:!0},childrenWrap:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k7Eaqz:"xeuugli",kzqmXN:"xh8yej3",$$css:!0},childrenAssistant:{kGNEyG:"x1cy8zhl",$$css:!0},childrenUser:{kGNEyG:"xuk3077",$$css:!0},childrenSystem:{kGNEyG:"x6s0dn4",$$css:!0},childrenGapCompact:{kOIVth:"x1lsbc85",$$css:!0},childrenGapBalanced:{kOIVth:"xzye2dw",$$css:!0},childrenGapSpacious:{kOIVth:"x1s4dlld",$$css:!0}};function Gy({sender:e,children:t,avatar:n,name:s,metadata:r,density:i,xstyle:o,className:l,style:c,"data-testid":u,ref:d,...h}){const f=Se(),p=s_(),g=i??(p==null?void 0:p.density)??"balanced",b=x.useMemo(()=>({sender:e,density:g}),[e,g]),y=g==="compact"?Bt.rootGapCompact:g==="spacious"?Bt.rootGapSpacious:Bt.rootGapBalanced,m=g==="compact"?Bt.childrenGapCompact:g==="spacious"?Bt.childrenGapSpacious:Bt.childrenGapBalanced,k=e==="system"?Bt.rootSystem:e==="user"?Bt.rootUser:Bt.rootAssistant,w=e==="system"?Bt.contentColumnSystem:e==="user"?Bt.contentColumnUser:Bt.contentColumnAssistant,v=e==="system"?Bt.childrenSystem:e==="user"?Bt.childrenUser:Bt.childrenAssistant,j=e==="system",C=n!=null&&!j,$=s!=null&&!j,T=x.useId();return a.jsx(By,{value:b,children:a.jsxs("article",{...h,ref:d,"data-testid":u,"aria-label":$?void 0:f("@astryx.chatMessage.messageFrom",{sender:e}),"aria-labelledby":$?T:void 0,...K(W("chat-message",{sender:e,density:g}),q(Bt.root,k,C&&y,o),l,c),children:[C&&a.jsx("div",{className:"x2lah0s x5du68j",children:n}),a.jsxs("div",{...q(Bt.contentColumn,w),children:[$&&a.jsx("div",{id:T,className:"x141an7d x2mo6ok xv1l7n4 x1ltkj2j x14cgwvg",children:s}),a.jsx("div",{...q(Bt.childrenWrap,v,m),children:t}),r!=null&&!j&&a.jsx("div",{children:r})]})]})})}Gy.displayName="ChatMessage";const ct={content:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",ks0D6T:"xl6temz",kaIpWk:"xashgol",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0},radiusCompact:{kaIpWk:"x1hviunn",$$css:!0},paddingCompact:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},paddingBalanced:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0},paddingSpacious:{k8WAf4:"x1na6nto",kg3NbH:"xzz68wx",$$css:!0},paddingBlockNone:{k8WAf4:"xt970qd",$$css:!0},metadataPaddingCompact:{kg3NbH:"x1pzlopt",$$css:!0},metadataPaddingBalanced:{kg3NbH:"x1pzlopt",$$css:!0},metadataPaddingSpacious:{kg3NbH:"xzz68wx",$$css:!0},metadataReducedGap:{keoZOQ:"x1c40v9y",$$css:!0},headerReducedGap:{k1K539:"xdrfirk",$$css:!0},nameRow:{kZKoxP:"x1grt7ep",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",$$css:!0},alignEnd:{k9WMMc:"xp4054r",$$css:!0},assistant:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},user:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},ghost:{kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",$$css:!0},groupFirstAssistant:{kVL7Gh:"xrfs2vl",$$css:!0},groupMiddleAssistant:{krdFHd:"x3qb8m",kVL7Gh:"xrfs2vl",$$css:!0},groupLastAssistant:{krdFHd:"x3qb8m",$$css:!0},groupFirstUser:{kT0f0o:"x1whkvtz",$$css:!0},groupMiddleUser:{kfmiAY:"x126per9",kT0f0o:"x1whkvtz",$$css:!0},groupLastUser:{kfmiAY:"x126per9",$$css:!0}};function hj({children:e,variant:t="filled",name:n,metadata:s,group:r,xstyle:i,className:o,style:l,"data-testid":c,ref:u,...d}){const h=n_(),f=(h==null?void 0:h.sender)??"assistant",p=(h==null?void 0:h.density)??"balanced",g=p==="compact"?ct.paddingCompact:p==="spacious"?ct.paddingSpacious:ct.paddingBalanced,b=f==="user",y=t==="ghost"?ct.ghost:b?ct.user:ct.assistant,m=r==="first"?b?ct.groupFirstUser:ct.groupFirstAssistant:r==="middle"?b?ct.groupMiddleUser:ct.groupMiddleAssistant:r==="last"?b?ct.groupLastUser:ct.groupLastAssistant:null,k=p==="compact"?ct.metadataPaddingCompact:p==="spacious"?ct.metadataPaddingSpacious:ct.metadataPaddingBalanced;return a.jsxs(a.Fragment,{children:[n&&a.jsx("div",{"data-chat-name":!0,...q(k,ct.nameRow,ct.headerReducedGap,b&&ct.alignEnd),children:n}),a.jsx("div",{...d,ref:u,"data-testid":c,...K(W("chat-message-bubble",{sender:f,variant:t,density:p}),q(ct.content,p==="compact"&&ct.radiusCompact,y,g,t==="ghost"&&ct.paddingBlockNone,m,i),o,l),children:e}),s&&a.jsx("div",{...q(k,ct.metadataReducedGap,b&&ct.alignEnd),children:s})]})}hj.displayName="ChatMessageBubble";const i2={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"x1txdalj",k8WAf4:"xu0wf1k",kMv6JI:"x9ynric",kGuDYH:"x141an7d",k63SB2:"x1sodnla",kMwMTN:"xv1l7n4",k9WMMc:"x2b8uid",$$css:!0},dividerWrap:{kzqmXN:"xh8yej3",$$css:!0}};function Uh({children:e,variant:t="default",icon:n,xstyle:s,className:r,style:i,ref:o,...l}){return t==="divider"?a.jsx("div",{ref:o,...K(W("chat-system-message",{variant:t}),q(i2.dividerWrap,s),r,i),...l,role:"status",children:a.jsx(Tu,{label:e})}):a.jsx("div",{ref:o,...K(W("chat-system-message",{variant:t}),q(i2.root,s),r,i),...l,role:"status",children:a.jsxs("span",{className:"x3nfvp2 x6s0dn4 x1s4dlld x2lah0s xuxw1ft",children:[n!=null&&a.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:n}),e]})})}Uh.displayName="ChatSystemMessage";const u_=1e3/60;function d_({scrollRef:e,enabled:t=!0,lockThreshold:n=10,buttonThreshold:s=100,damping:r=.7,stiffness:i=.05,mass:o=1.25}){const[l,c]=x.useState(!1),[u,d]=x.useState(!0),h=x.useRef(!0),f=x.useRef(!0),p=x.useRef(0),g=x.useRef(!1),b=x.useRef(void 0),y=x.useRef(0),m=x.useRef(0),k=x.useRef(0),w=x.useCallback(()=>{const z=e.current;if(!z||!h.current){g.current=!1,b.current=void 0,p.current=0;return}if(z.scrollHeight<=z.clientHeight){g.current=!1,b.current=void 0,p.current=0;return}const O=z.scrollHeight-z.clientHeight,I=O-z.scrollTop;if(Math.abs(I)<.5&&Math.abs(p.current)<.1){z.scrollTop=O,g.current=!1,b.current=void 0,p.current=0;return}const E=performance.now(),N=b.current?(E-b.current)/u_:1;b.current=E,p.current=(r*p.current+i*I)/o,z.scrollTop+=p.current*N,requestAnimationFrame(w)},[e,r,i,o]),v=x.useCallback(()=>{const z=e.current;z&&(g.current=!1,p.current=0,b.current=void 0,z.scrollTop=z.scrollHeight-z.clientHeight,y.current=z.scrollTop)},[e]),j=ua("(prefers-reduced-motion: reduce)"),C=x.useCallback(()=>{if(h.current){if(j){v();return}g.current||(g.current=!0,b.current=void 0,requestAnimationFrame(w))}},[w,v,j]),$=x.useCallback(z=>{if(h.current=!0,d(!0),c(!1),f.current=!1,(z==null?void 0:z.behavior)==="instant"){v();return}C()},[C,v]),T=x.useCallback(z=>{const O=e.current;if(!O)return;const I=O.getBoundingClientRect(),N=z.getBoundingClientRect().top-I.top+O.scrollTop;O.scrollTo({top:N,behavior:"instant"}),y.current=O.scrollTop},[e]),A=x.useCallback(()=>{const z=e.current;if(!z)return;const O=z.getElementsByClassName("astryx-chat-message"),I=O[O.length-1];I instanceof HTMLElement&&T(I)},[e,T]),S=x.useCallback(()=>{h.current=!0,d(!0),c(!1),C()},[C]),_=x.useCallback(()=>{h.current=!1,g.current=!1,d(!1)},[]),M=x.useCallback(()=>{if(!t||!h.current)return;const z=e.current;if(f.current&&z&&z.scrollHeight>z.clientHeight){f.current=!1,v();return}C()},[t,C,v,e]);return x.useEffect(()=>{const z=e.current;if(!z||!t)return;y.current=z.scrollTop,m.current=z.scrollHeight,k.current=z.offsetHeight;const O=()=>{const{scrollTop:R,scrollHeight:L,offsetHeight:D}=z,P=L-R-D;c(P>s);const F=L!==m.current,X=D!==k.current;if(m.current=L,k.current=D,F||X){y.current=R;return}const G=R<y.current;y.current=R,G&&h.current&&(h.current=!1,g.current=!1,d(!1))},I=()=>{z.scrollHeight-z.scrollTop-z.offsetHeight<=n&&(h.current=!0,d(!0))},E=R=>{R.deltaY<0&&g.current&&(h.current=!1,g.current=!1,d(!1))},N=()=>{g.current&&(h.current=!1,g.current=!1,d(!1))};return z.addEventListener("scroll",O,{passive:!0}),z.addEventListener("scrollend",I),z.addEventListener("wheel",E,{passive:!0}),z.addEventListener("touchmove",N,{passive:!0}),requestAnimationFrame(()=>{z.scrollHeight>z.clientHeight&&(z.scrollTop=z.scrollHeight-z.clientHeight,y.current=z.scrollTop,f.current=!1)}),()=>{z.removeEventListener("scroll",O),z.removeEventListener("scrollend",I),z.removeEventListener("wheel",E),z.removeEventListener("touchmove",N)}},[e,t,n,s]),{isScrolledUp:l,isLocked:u,scrollToBottom:$,scrollToMessage:T,lock:S,unlock:_,scrollIfLocked:M,scrollToLastMessage:A}}function f_({isLocked:e,onResize:t}){const[n,s]=x.useState(!1),r=x.useRef(null),i=x.useRef(e);i.current=e;const o=x.useRef(t);o.current=t;const l=x.useRef(null),c=x.useRef(null),u=x.useCallback(p=>{fy(p,()=>{var y;(y=o.current)==null||y.call(o);const g=p.getElementsByClassName("astryx-chat-message"),b=g.length>0?g[g.length-1]:null;b&&b!==r.current&&(r.current=b,i.current||s(!0))}),c.current=()=>hy(p)},[]),d=x.useCallback(()=>{var p;(p=c.current)==null||p.call(c),c.current=null},[]),h=x.useCallback(p=>{p!==l.current&&(d(),l.current=p,p&&u(p))},[u,d]);x.useEffect(()=>()=>d(),[d]);const f=x.useCallback(()=>{s(!1)},[]);return{hasNewMessages:n,dismiss:f,contentRef:h}}const Br={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",keoZOQ:"xtbrsbv",$$css:!0},statusIcon:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",kaIpWk:"xjspbzw",$$css:!0},nodePill:{kmuXW:"x2lah0s",$$css:!0},colorPending:{kMwMTN:"xnbbluu",$$css:!0},colorRunning:{kMwMTN:"xqwr325",$$css:!0},colorComplete:{kMwMTN:"xtjic6",$$css:!0},colorError:{kMwMTN:"xjt36v0",$$css:!0}},xj={pending:"clock",running:null,complete:"check",error:"close"},pj={pending:Br.colorPending,running:Br.colorRunning,complete:Br.colorComplete,error:Br.colorError};function h_(e){return sN(e.key,()=>{var t,n;return[e.name,e.status??"complete",e.target??"",e.node??"",e.duration??"",((t=e.additions)==null?void 0:t.toString())??"",((n=e.deletions)==null?void 0:n.toString())??"",e.errorMessage??""].join("")})}function o2({call:e}){const t=Se(),n=e.status??"complete",s=e.resultDetail!=null,[r,i]=x.useState(!1),o=x.useId(),l=s?()=>i(u=>!u):void 0,c=a.jsxs("div",{role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?r:void 0,"aria-controls":s&&r?o:void 0,onClick:l,onKeyDown:s?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),l==null||l())}:void 0,...{0:{className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw"},1:{className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk xh6dtrn x7a5moj xtedp8i xe9uy6x"}}[!!s<<0],children:[a.jsxs("span",{title:n==="error"?e.errorMessage:void 0,...q(Br.statusIcon,pj[n]),children:[n==="running"?a.jsx(un,{size:"sm",shade:"subtle"}):n==="pending"?a.jsx(un,{size:"sm",shade:"subtle"}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),a.jsx("span",{className:"x1n2onr6 x3nfvp2",children:a.jsx(Te,{icon:xj[n]??"check",size:"xsm",color:"inherit"})})]}),n==="error"&&e.errorMessage!=null&&a.jsx(si,{children:t("@astryx.chatToolCalls.error",{message:e.errorMessage??""})})]}),a.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:e.name}),e.node!=null&&a.jsx(yd,{label:e.node,variant:"neutral",xstyle:Br.nodePill}),e.target!=null&&a.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:e.target}),(e.additions!=null||e.deletions!=null||e.stats!=null)&&a.jsxs("span",{className:"x78zum5 x6s0dn4 xzye2dw x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:[e.additions!=null&&a.jsxs("span",{className:"xtjic6",children:["+",e.additions]}),e.deletions!=null&&a.jsxs("span",{className:"xjt36v0",children:["-",e.deletions]}),e.stats]}),e.duration!=null&&n==="complete"&&a.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft x2lah0s",children:e.duration}),s&&a.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb xvc5jky"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb xvc5jky x19jd1h0"}}[!!r<<0],children:a.jsx(Te,{icon:"chevronDown",size:"xsm",color:"inherit"})})]});return s?a.jsxs("div",{children:[c,r&&a.jsx("div",{id:o,className:"x1f43n9v x1wesfrj",children:e.resultDetail})]}):c}function gj(e){const t=Se(),{calls:n,label:s,isExpanded:r,defaultIsExpanded:i,onExpandedChange:o,xstyle:l,className:c,style:u,ref:d,...h}=e,f=i??!1,[p,g]=x.useState(f),b=x.useId(),y=r!==void 0,m=y?r:p,k=x.useCallback(()=>{const j=!m;y||g(j),o==null||o(j)},[m,y,o]);if(n.length===0)return null;if(n.length===1)return a.jsx("div",{ref:d,...K(W("chat-tool-calls"),q(Br.root,l),c,u),...h,children:a.jsx(o2,{call:n[0]})});const w=n[n.length-1],v=w.status??"complete";return a.jsxs("div",{ref:d,...K(W("chat-tool-calls"),q(Br.root,l),c,u),...h,children:[a.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":m,"aria-controls":b,onClick:k,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),k())},className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk",children:[m?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1kky2od xlup9mm xv1l7n4",children:a.jsx(Te,{icon:"wrench",size:"sm",color:"inherit"})}),a.jsx("span",{className:"x141an7d x1ltkj2j x9ynric x1e4wzip xv1l7n4",children:t("@astryx.chatToolCalls.groupLabel",{count:n.length})})]}):a.jsxs(a.Fragment,{children:[a.jsx("span",{...q(Br.statusIcon,pj[v]),children:v==="running"?a.jsx(un,{size:"sm",shade:"subtle"}):v==="pending"?a.jsx(un,{size:"sm",shade:"subtle"}):a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),a.jsx("span",{className:"x1n2onr6 x3nfvp2",children:a.jsx(Te,{icon:xj[v]??"check",size:"xsm",color:"inherit"})})]})}),a.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:w.name}),w.target!=null&&a.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:w.target})]}),a.jsx("span",{className:"x3nfvp2 x6s0dn4 x1lsbc85 x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:!m&&a.jsxs(a.Fragment,{children:[a.jsx(Te,{icon:"wrench",size:"xsm",color:"inherit"}),n.length]})}),a.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x6jxa94 x1v9usgg xnbbluu x1ob6yzd x9kvfbb x19jd1h0"}}[!!m<<0],children:a.jsx(Te,{icon:"chevronDown",size:"xsm",color:"inherit"})})]}),a.jsx("div",{id:b,...{0:{className:"xrvj5dj xihq33y xb0j27v x9kvfbb"},1:{className:"xrvj5dj xb0j27v x9kvfbb x1tu4anv"}}[!!m<<0],children:a.jsx("div",{className:"xb3r6kr x2lwn1j",children:a.jsx("div",{className:"x78zum5 xdt5ytf x7a5moj xtedp8i",children:n.map(j=>a.jsx(o2,{call:j},h_(j)))})})})]})}gj.displayName="ChatToolCalls";const mp={wrapper:{k1xSpc:"x78zum5",kjj79g:"xl56j7k",kGO01o:"xvmdzux",$$css:!0},button:{"--radius-element":"xnpej1e",khDVqt:"xuxw1ft",kg3NbH:"xf314gf",$$css:!0},buttonWithLabel:{kwRFfy:"x1t818jl",$$css:!0}};function mj({ref:e,isVisible:t,label:n,onClick:s,xstyle:r,className:i,style:o,...l}){const c=Se();return a.jsx("div",{ref:e,...K(q(mp.wrapper,r),i,o),...l,children:a.jsx("div",{...{0:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl x1x67gh"},2:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w x1x67gh"},1:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk xg01cxk x47corl x1ncir08"},3:{className:"xawy1a7 xb3r6kr xjspbzw x1prclbq x14hfi27 x10w6t97 x1apppo2 xlr8y92 x2rcmwa x12w9bfk x1hc1fzr x67bb7w x1ncir08"}}[!!t<<1|!!n<<0],children:a.jsx(ne,{label:n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),"aria-label":n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),icon:a.jsx(Te,{icon:"chevronDown",size:"md"}),variant:"ghost",size:"md",onClick:s,xstyle:[mp.button,n?mp.buttonWithLabel:null],children:n??void 0})})})}mj.displayName="ChatLayoutScrollButton";const qt={root:{kVAEAm:"x1n2onr6",k9g6sI:"x12h1iku",kAzted:"x2lwn1j",kUk6DE:"x98rzlu",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},rootScrollable:{kORKVm:"x1odjw0f",kXHlph:"x6ikm8r",k5wCbM:"x1mqgsch",$$css:!0},messageArea:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kUOVxO:"xvueqy4",kzQI83:"x1iyjqo2",kmuXW:"x2lah0s",kCS8Yb:"xdl72j9",kGO01o:"xjpqqx5",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},blurLayer:{kVAEAm:"x10l6tqk",krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kfzvcC:"x47corl",k6WDB:"xvn2z4z",keRtuK:"x67t5t6",kZKoxP:"xpyat2d",kX1K2I:"xw26lqc",kAExgp:"x1bv1mxo",$$css:!0},dock:{kVAEAm:"x1n2onr6",kY2c9j:"x1vjfegm",kfzvcC:"x67bb7w",kg3NbH:"xrrkdod",kGO01o:"xvmdzux",$$css:!0},dockInner:{kUOVxO:"xvueqy4",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",$$css:!0},messageAreaCompact:{ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},messageAreaBalanced:{ks0D6T:"x193iq5w",kg3NbH:"xnjsko4",$$css:!0},messageAreaSpacious:{ks0D6T:"x1ap80js",kg3NbH:"x1pzlopt",$$css:!0},blurLayerCompact:{kZKoxP:"xwzfr38",kX1K2I:"xkm2don",kAExgp:"xiy8rlo",$$css:!0},blurLayerBalanced:{kZKoxP:"xpyat2d",kX1K2I:"xw26lqc",kAExgp:"x1bv1mxo",$$css:!0},blurLayerSpacious:{kZKoxP:"x1wkxgih",kX1K2I:"xr5yg4x",kAExgp:"xo9xo30",$$css:!0},dockCompact:{kg3NbH:"xf314gf",kGO01o:"x1wesfrj",$$css:!0},dockBalanced:{kg3NbH:"xrrkdod",kGO01o:"xvmdzux",$$css:!0},dockSpacious:{kg3NbH:"x1pzlopt",kGO01o:"xvmdzux",$$css:!0},dockInnerCompact:{ks0D6T:"x193iq5w",$$css:!0},dockInnerBalanced:{ks0D6T:"x193iq5w",$$css:!0},dockInnerSpacious:{ks0D6T:"x1ap80js",$$css:!0}};function x_(e){return!(e==null||e===!1||Array.isArray(e)&&e.length===0)}function yj({children:e,composer:t,density:n="balanced",emptyState:s,scrollButton:r,scrollRef:i,xstyle:o,className:l,style:c,"data-testid":u,ref:d,...h}){const f=Se(),p=x.useRef(null),g=i??p,b=!i,y=d_({scrollRef:g}),m=f_({isLocked:y.isLocked,onResize:y.scrollIfLocked}),k=a.jsx(mj,{isVisible:y.isScrolledUp||m.hasNewMessages,label:m.hasNewMessages?f("@astryx.chatLayout.newMessages"):void 0,onClick:()=>{m.dismiss(),y.scrollToBottom()}}),w=x.useMemo(()=>({scrollContainerRef:g,contentRef:m.contentRef}),[g,m.contentRef]),v=!x_(e),C={compact:{messageArea:qt.messageAreaCompact,blurLayer:qt.blurLayerCompact,dock:qt.dockCompact,dockInner:qt.dockInnerCompact},balanced:{messageArea:qt.messageAreaBalanced,blurLayer:qt.blurLayerBalanced,dock:qt.dockBalanced,dockInner:qt.dockInnerBalanced},spacious:{messageArea:qt.messageAreaSpacious,blurLayer:qt.blurLayerSpacious,dock:qt.dockSpacious,dockInner:qt.dockInnerSpacious}}[n];return a.jsx(Py,{value:w,children:a.jsxs("div",{...h,ref:mt(d,p),"data-testid":u,...K(W("chat-layout",{density:n}),q(qt.root,b&&qt.rootScrollable,o),l,c),children:[a.jsx("div",{...q(qt.messageArea,C.messageArea),children:v&&s?a.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu xz65tgg",children:s}):e}),a.jsxs("div",{...{0:{className:"x1ey2m1c x1o0tod xtijo5x x1ja2u2z xc8icb0 x47corl x2lah0s xixxii4"},1:{className:"x1ey2m1c x1o0tod xtijo5x x1ja2u2z xc8icb0 x47corl x2lah0s x7wzq59"}}[!!b<<0],children:[r===void 0?k:r,a.jsx("div",{...q(qt.blurLayer,C.blurLayer)}),a.jsx("div",{...q(qt.dock,C.dock),children:a.jsx("div",{...q(qt.dockInner,C.dockInner),children:t})})]})]})})}yj.displayName="ChatLayout";const zu=x.createContext(null);zu.displayName="ListContext";const yp={list:{kogj98:"x1ghz6dp",kZCmMZ:"x1c1uobl",kH6xsr:"x3ct3a4",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",$$css:!0},withDividers:{kOIVth:"xxhr3t",$$css:!0},withCounter:{kt6KFK:"xif0320",$$css:!0}},p_={kt6KFK:"x1khind5",$$css:!0},g_={counterStart:e=>[p_,{"--x-counterReset":`astryx-list ${e}`!=null?`astryx-list ${e}`:void 0}]};function Mt({children:e,density:t="balanced",hasDividers:n=!1,header:s,listStyle:r="none",start:i,xstyle:o,className:l,style:c,"data-testid":u,ref:d}){const h=x.useId(),f=r==="decimal",p=f?"ol":"ul",g=x.useMemo(()=>({density:t,hasDividers:n,listStyle:r}),[t,n,r]),b=a.jsx(p,{ref:d,"data-testid":u,"aria-labelledby":s!=null?h:void 0,...f&&i!=null&&i!==1?{start:i}:{},role:"list",...K(W("list",{density:t,listStyle:r}),q(yp.list,n&&yp.withDividers,r!=="none"&&(i!=null&&i!==1?g_.counterStart(i-1):yp.withCounter),o),l,c),children:e});return s==null?a.jsx(zu,{value:g,children:b}):a.jsx(zu,{value:g,children:a.jsxs("div",{className:"x78zum5 xdt5ytf",children:[a.jsx("div",{id:h,className:"x1p37lm5",children:s}),b]})})}Mt.displayName="List";const m_=[];function Vy({label:e,isLabelHidden:t=!1,description:n,status:s,value:r,onChange:i,changeAction:o,density:l="balanced",hasDividers:c=!1,isDisabled:u=!1,disabledMessage:d,isReadOnly:h=!1,children:f,ref:p,width:g,xstyle:b,className:y,style:m,"data-testid":k,...w}){const v=x.useId(),j=x.useId(),C=x.useId(),$=x.useId(),[,T]=x.useTransition(),A=r!==void 0,S=r??m_,[_,M]=x.useOptimistic(S),[z,O]=x.useOptimistic(null),I=u&&!!d,E=ls({placement:"above",focusTrigger:"always",isEnabled:I}),N=x.useCallback((L,D)=>{i==null||i(L),o&&T(async()=>{M(L),D!==void 0&&O(D),await o(L)})},[i,o,T,M,O]),R=x.useMemo(()=>({value:A?_:void 0,onChange:A?N:void 0,isDisabled:u,hasDisabledMessage:I,isReadOnly:h,loadingValue:z}),[A,_,N,u,I,h,z]);return a.jsxs(cc,{...w,ref:p,"data-testid":k,label:e,isLabelHidden:t,description:n,inputID:v,labelID:j,isGroupLabel:!0,descriptionID:n?C:void 0,isDisabled:u,status:s?{type:s.type,message:s.message,messageID:s.message?$:void 0}:void 0,statusVariant:"detached",width:g,xstyle:b,...K(W("checkbox-list"),{className:y,style:m}),children:[a.jsx(s1,{value:R,children:a.jsx("div",{ref:L=>{E.ref(L)},role:"group","aria-labelledby":j,"aria-describedby":[n?C:null,s!=null&&s.message?$:null,I?E.describedBy:null].filter(Boolean).join(" ")||void 0,children:a.jsx(Mt,{density:l,hasDividers:c,children:f})})}),I&&E.renderTooltip(d)]})}Vy.displayName="CheckboxList";const a2={withCounter:{kAmcRD:"xfrknyr",$$css:!0},withDivider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},y_={noRadius:{kaIpWk:"x2u8bby",$$css:!0}};function rt({label:e,description:t,startContent:n,endContent:s,onClick:r,interactiveRef:i,href:o,target:l,rel:c,isDisabled:u=!1,isSelected:d=!1,xstyle:h,className:f,style:p,ref:g,...b}){const y=x.use(zu),m=(y==null?void 0:y.density)??"balanced",k=(y==null?void 0:y.hasDividers)??!1,w=(y==null?void 0:y.listStyle)??"none",v=w!=="none",j=w==="disc"?a.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:a.jsx("span",{className:"x1v4s8kt xols6we x16rqkct x19aspcf"})}):w==="circle"?a.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:a.jsx("span",{className:"x1v4s8kt xols6we x16rqkct xmkeg23 x1y0btm7 xqcx1ss xjbqb8w"})}):w==="decimal"?a.jsx("span",{className:"xoi2r2e x2lah0s x1tgivj0 xjm74w1 xw6l6zx x12xnipv xc2ndz5"}):null;return a.jsx(ac,{as:"li",ref:g,marker:j,startContent:n,label:e,description:t,endContent:s,onClick:r,interactiveRef:i,href:o,target:l,rel:c,isDisabled:u,isSelected:d,density:m,xstyle:[v&&a2.withCounter,k&&a2.withDivider,k&&y_.noRadius,h],...K(W("list-item"),{className:f,style:p}),...b})}rt.displayName="ListItem";const k_={selected:{kWkggS:"xgcxg3y",$$css:!0}};function Fh({label:e,"aria-label":t,value:n,description:s,endContent:r,isDisabled:i=!1,isLoading:o=!1,isChecked:l,onCheck:c,ref:u,xstyle:d,className:h,style:f,onClick:p,...g}){const b=Se(),y=x.use(s1);if(y&&y.value!==void 0&&n===void 0)throw new Error("CheckboxListItem requires a `value` prop when used inside CheckboxList with a value array.");const m=t??(typeof e=="string"?e:b("@astryx.checkboxList.item.checkbox"));oc("CheckboxListItem",'`label` is a ReactNode, so the checkbox falls back to the generic accessible name "Checkbox". Pass `aria-label` with a concise string equivalent of the visible label so screen readers can tell items apart.',typeof e!="string"&&t==null);const k=x.use(zu),v=((k==null?void 0:k.density)??"balanced")==="compact"?"sm":"md",j=((y==null?void 0:y.isDisabled)??!1)||i,C=(y==null?void 0:y.isReadOnly)??!1,$=o||((y==null?void 0:y.loadingValue)!=null&&n!==void 0?y.loadingValue===n:!1);let T=!1;y&&y.value!==void 0&&n!==void 0?T=y.value.includes(n):l!==void 0&&(T=l);const A=!C&&(y!=null||c!=null),S=x.useRef(null),_=A||p!=null,M=()=>{var z,O;if(!(j||C||$))if(y&&y.value!==void 0&&n!==void 0)y.value.includes(n)?(z=y.onChange)==null||z.call(y,y.value.filter(E=>E!==n),n):(O=y.onChange)==null||O.call(y,[...y.value,n],n);else{const I=T!==!0;c==null||c(I)}};return a.jsx(rt,{...g,ref:u,label:e,description:s,endContent:r,isDisabled:j,interactiveRef:_?S:void 0,"aria-busy":$||void 0,xstyle:[T===!0&&!j&&!C&&k_.selected,d],className:h,style:f,startContent:a.jsx(L6,{ref:S,label:m,isLabelHidden:!0,value:T,onChange:()=>M(),onClick:p,isDisabled:j,isReadOnly:C,isLoading:$,size:v})})}Fh.displayName="CheckboxListItem";const Gg=120;function b_(e){let t=0,n=0;const s=[];for(const l of e){const c=l.width;if((c==null?void 0:c.type)==="pixel")n+=c.value;else{const u=(c==null?void 0:c.value)??1,d=c!=null?c.minWidth??Gg:0;t+=u,s.push({key:l.key,proportion:u,minWidth:d})}}let r=0;if(t>0)for(const l of s){const c=l.minWidth*t/l.proportion;c>r&&(r=c)}const i=n+r,o=new Map;for(const l of e){const c=l.width,u={};if((c==null?void 0:c.type)==="pixel")u.width=`${c.value}px`,u.minWidth=`${c.value}px`;else{const d=(c==null?void 0:c.value)??1;if(t>0&&(u.width=`${d/t*100}%`),c!=null){const h=c.minWidth??Gg;u.minWidth=`${h}px`}}o.set(l.key,{style:u})}return{columns:o,tableMinWidth:i}}function v_(e=1,t){return{type:"proportional",value:e,minWidth:(t==null?void 0:t.minWidth)??Gg}}function l2(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function w_(e,t){const n=e[t];return n==null?"":n instanceof Date?n.toISOString():typeof n=="string"||typeof n=="number"||typeof n=="boolean"||typeof n=="bigint"?String(n):""}function j_(e){return e==null?0:typeof e=="string"?e.length:typeof e=="number"||typeof e=="boolean"?String(e).length:0}function S_(e){if(e==null||typeof e!="string"&&typeof e!="number"&&typeof e!="boolean")return 0;const t=String(e);let n=0,s=0;for(let r=0;r<=t.length;r++)r===t.length||t[r]===" "||t[r]===" "||t[r]===`
|
|
151
|
-
`?(s>n&&(n=s),s=0):s++;return n}const C_=60,$_=8;function E_(e){if(e.length===0)return[];const t=e[0],n=Object.keys(t),s=e.slice(0,Math.min(5,e.length));return n.map(i=>{const o=l2(i).length;let l=o,c=o;for(const u of s){const d=j_(u[i]);d>l&&(l=d);const h=S_(u[i]);h>c&&(c=h)}return{key:i,headerLen:o,maxContentLen:l,maxWordLen:c}}).map(i=>{const o=i.maxContentLen<=6?1:i.maxContentLen<=15?2:3,l=Math.max(Math.max(i.headerLen,i.maxWordLen)*$_,C_);return{key:i.key,header:l2(i.key),width:v_(o,{minWidth:l})}})}const c2={x139im0d:"x139im0d",$$css:!0},kj={cell:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",ks0D6T:"x1m189uc",$$css:!0}},T_={cell:{kVQacm:"xb3r6kr",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",ks0D6T:"x1m189uc",$$css:!0}},bj={compact:{kZCmMZ:"x5uh4xs",kwRFfy:"xbg7gas",$$css:!0},balanced:{kZCmMZ:"x9bi00s",kwRFfy:"xpilulx",$$css:!0},spacious:{kZCmMZ:"x18c6q21",kwRFfy:"x1wzlfcn",$$css:!0}},l1=x.createContext(null);l1.displayName="TableContext";const N_={row:{kWkggS:"x1dnou9g","--table-row-overlay":"x1rht92",$$css:!0}},A_={row:{kWkggS:"xe9uy6x","--table-row-overlay":"x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}},M_={row:{kWkggS:"x1dnou9g xe9uy6x","--table-row-overlay":"x1rht92 x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}};function Gh({children:e,xstyle:t,ref:n,isHeaderRow:s=!1,...r}){const i=x.use(l1);if(!i)return a.jsx("tr",{ref:n,...r,...K(W("table-row"),q(c2,t)),children:e});const o=[];return s||(i.isStriped&&i.hasHover?o.push(M_.row):i.isStriped?o.push(N_.row):i.hasHover&&o.push(A_.row)),i.dividers==="rows"||i.dividers,t&&o.push(...t),a.jsx("tr",{ref:n,...r,...K(W("table-row"),q(c2,...o)),children:e})}Gh.displayName="TableRow";const lf={trigger:{kVAEAm:"x1n2onr6",k7VYTy:"xpdipgo",$$css:!0},menu:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kskxy:"xuyqlj2",kORKVm:"x1odjw0f","--_dropdown-menu-radius":"x1fcsqxe","--_dropdown-menu-padding":"xgory14",kmVPX3:"x9epnlk",kaIpWk:"x1n97fys",kWkggS:"x1prclbq",kGVxlE:"x1i5ehqx",kSiTet:"x1hc1fzr",k1ekBW:"x19991ni",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kfSwDN:"x87ps6o",$$css:!0},popover:{k7Eaqz:"x5w4yej",$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]};function Wy({children:e,menuWidth:t,size:n="md",label:s,isDisabled:r=!1,onOpenChange:i,ref:o,className:l,style:c,xstyle:u,triggerXstyle:d,"data-testid":h,...f}){const p=Se(),g=s??p("@astryx.contextMenu.label"),{items:b,menuContent:y,...m}=f,k=b??[],w=y,v=x.useId(),j=x.useRef({x:0,y:0}),C=x.useRef(null),$=x.useRef(null),T=x.useRef(null),[A,S]=x.useState(!1),_=rc({mode:"context",onHide:x.useCallback(()=>{S(!1),i==null||i(!1);const Y=T.current;T.current=null,Y&&document.contains(Y)&&Y.focus()},[i]),onShow:x.useCallback(()=>{S(!0),i==null||i(!0)},[i]),lightDismiss:!1}),M=x.useCallback(()=>{_.hide()},[_]),{listRef:z,handleKeyDown:O,focusFirst:I,focusItem:E,ownsEvent:N,getItems:R}=ic({itemSelector:Cy,boundarySelector:$y,wrap:!1,onEscape:M}),L=jy({getItemLabels:()=>R().map(Y=>Y.textContent),onMatch:E,getCurrentIndex:()=>R().findIndex(Y=>Y===document.activeElement||Y.contains(document.activeElement))});x.useEffect(()=>{if(!A)return;const Y=V=>{const oe=z.current;oe&&!oe.contains(V.target)&&M()};return document.addEventListener("mousedown",Y),()=>{document.removeEventListener("mousedown",Y)}},[A,M,z]),x.useEffect(()=>{if(!A)return;const Y=V=>{V.key==="Escape"&&(V.isComposing||V.keyCode===229||(V.preventDefault(),M()))};return document.addEventListener("keydown",Y),()=>{document.removeEventListener("keydown",Y)}},[A,M]);const D=x.useCallback(Y=>{if(N(Y)){if(Y.key==="Enter"||Y.key===" "){Y.preventDefault();const V=document.activeElement;V&&e1.has(V.getAttribute("role")??"")&&V.click();return}if(Y.key==="Tab"){M();return}if(L.onKeyDown(Y)){Y.preventDefault();return}O(Y)}},[O,M,L,N]),P=x.useCallback((Y,V,oe)=>{j.current={x:Y,y:V};const le=C.current;le&&(le.style.left=`${Y}px`,le.style.top=`${V}px`),T.current=document.activeElement instanceof HTMLElement?document.activeElement:oe,_.show(),requestAnimationFrame(()=>I())},[_,I]),F=x.useCallback(Y=>{if(r)return;Y.preventDefault();const V=$.current,oe=V==null?void 0:V.getBoundingClientRect(),le=Y.clientX===0&&Y.clientY===0&&Y.detail===0,me=le||!oe?0:Y.clientX-oe.left,se=le||!oe?(oe==null?void 0:oe.height)??0:Y.clientY-oe.top;P(me,se,Y.currentTarget)},[r,P]),X=eR({disabled:r,onLongPress:x.useCallback(Y=>{var oe;const V=(oe=$.current)==null?void 0:oe.getBoundingClientRect();P(V?Y.x-V.left:Y.x,V?Y.y-V.top:Y.y,$.current)},[P])}),G=t?lf.popoverCustomWidth(t):lf.popover,Q=x.useMemo(()=>({closeMenu:M,menuSize:n}),[M,n]),ee=b!==void 0?Ey(k):w;return a.jsxs(a.Fragment,{children:[a.jsxs("div",{ref:mt(o,$),onContextMenu:F,...X,...m,"data-testid":h,...q(lf.trigger,...d?Array.isArray(d)?d:[d]:[]),children:[e,a.jsx("span",{ref:mt(C,_.ref),"aria-hidden":"true",...K({className:"x10l6tqk xnalus7 xqtp20y x47corl"},{style:{left:`${j.current.x}px`,top:`${j.current.y}px`}})})]}),_.render(a.jsx("div",{ref:z,id:v,role:"menu","aria-label":g,onKeyDown:D,onContextMenu:Y=>Y.preventDefault(),...K(W("context-menu"),q(lf.menu,u),l,c),children:a.jsx(bd,{value:Q,children:ee})}),{placement:"below",alignment:"start",xstyle:[G,Ur.below]})]})}Wy.displayName="ContextMenu";function vj(e){const t=[],n=new Map;for(const r of e){const i=r.group??"__ungrouped__";let o=n.get(i);o||(o=[],n.set(i,o),t.push(i)),o.push(r)}const s=[];return t.forEach((r,i)=>{i>0&&s.push({type:"divider"});for(const o of n.get(r)??[])s.push({label:typeof o.label=="string"?o.label:o.id,icon:o.checked?a.jsx(Te,{icon:"check",size:"xsm","aria-hidden":!0}):o.icon,isDisabled:o.disabled,onClick:o.onSelect})}),s}function z_({element:e,getActions:t,triggerXstyle:n}){const[s,r]=x.useState(null);return a.jsx(Wy,{items:s??[],triggerXstyle:n,onOpenChange:i=>{r(i?vj(t()):null)},children:e})}function wj(e,t,n){return typeof t=="function"?a.jsx(z_,{element:e,getActions:t,triggerXstyle:n}):!t||t.length===0?e:a.jsx(Wy,{items:vj(t),triggerXstyle:n,children:e})}function R_(e,t,n){const s=[];return(e.dividers==="rows"||e.dividers==="grid")&&s.push(t),(e.dividers==="columns"||e.dividers==="grid")&&s.push(n),s}function jj(e,t){return t?Array.isArray(t)?[...e,...t]:[...e,t]:e}function Sj(){return x.use(l1)}const I_={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},__={compact:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},L_={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0}},u2={fill:{k1xSpc:"x1lliihq",kB7OPa:"x9f619",kZKoxP:"x5yr21d",kzqmXN:"xh8yej3",$$css:!0}},O_={cell:{kZKoxP:"x5yr21d",$$css:!0}},D_={cell:{kt9PQ7:"x92x3c3 x1wp2rvj",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},B_={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}},q_={middle:{kXLuUW:"xxymvpz",$$css:!0},top:{kXLuUW:"x16dsc37",$$css:!0},bottom:{kXLuUW:"x3ajldb",$$css:!0}};function Ky({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:i,...o}){const l=Sj(),c=typeof i=="function"||Array.isArray(i)&&i.length>0,u=l?[c?__[l.density]:I_[l.density],l.textOverflow==="truncate"?kj.cell:T_.cell,bj[l.density],q_[l.verticalAlign],...R_(l,D_.cell,B_.cell),...c?[O_.cell]:[]]:[],d=c&&l?[u2.fill,L_[l.density]]:c?u2.fill:void 0,h=wj(e,i,d);return a.jsx("td",{ref:n,...o,...K(W("table-cell",{density:l==null?void 0:l.density}),q(...jj(u,t)),s,r),children:h})}Ky.displayName="TableCell";const H_={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",kGuDYH:"xcr08ib",kB7OPa:"x9f619",$$css:!0}},P_={cell:{k63SB2:"x2mo6ok",kMwMTN:"xv1l7n4",k9WMMc:"x1yc453h",$$css:!0}},U_={cell:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},F_={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}};function Xy({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:i,...o}){const l=Sj(),c=[];l&&(c.push(P_.cell,H_[l.density],U_.cell,kj.cell,bj[l.density]),(l.dividers==="columns"||l.dividers==="grid")&&c.push(F_.cell));const u=wj(e,i);return a.jsx("th",{ref:n,...o,...K(W("table-header-cell",{density:l==null?void 0:l.density}),q(...jj(c,t)),s,r),children:u})}Xy.displayName="TableHeaderCell";function Zy({ref:e,children:t,xstyle:n,className:s,style:r,...i}){return a.jsx("thead",{ref:e,...K(W("table-header"),q(n),s,r),...i,children:t})}Zy.displayName="TableHeader";function Yy({ref:e,children:t,xstyle:n,className:s,style:r,...i}){return a.jsx("tbody",{ref:e,...K(W("table-body"),q(n),s,r),...i,children:t})}Yy.displayName="TableBody";const d2={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",k9WMMc:"x2b8uid",kOIVth:"x18g69wz",k8WAf4:"xmfvnks",kg3NbH:"xm7rs69",$$css:!0},containerCompact:{kOIVth:"x1txdalj",k8WAf4:"x1na6nto",kg3NbH:"x1pzlopt",$$css:!0}};function Wi({title:e,description:t,icon:n,actions:s,headingLevel:r=3,isCompact:i=!1,xstyle:o,className:l,style:c,ref:u,...d}){const h=`h${r}`;return a.jsxs("div",{ref:u,role:"status",...K(W("empty-state",{variant:i?"compact":null}),q(d2.container,i&&d2.containerCompact,o),l,c),...d,children:[n!=null&&a.jsx("div",{"aria-hidden":"true",children:n}),a.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 xxc7z9f",children:[x.createElement(h,{0:{className:"x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0"},1:{className:"x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib"}}[!!i<<0],e),t!=null&&a.jsx("div",{...{0:{className:"x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4"},1:{className:"x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d"}}[!!i<<0],children:t})]}),s!=null&&a.jsx("div",{...{0:{className:"x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d"},1:{className:"x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf"}}[!!i<<0],children:s})]})}Wi.displayName="EmptyState";const kp={table:{kzqmXN:"xh8yej3",kLvRdT:"x1mwwwfo",kheTzg:"x1gukg7c",kPzzVL:"x140o2bo",$$css:!0},tableAutoLayout:{kPzzVL:"x1drmoe9",$$css:!0}};function jo(e,t,n,...s){return e.reduce((r,i,o)=>{const l=t(i);if(!l)return r;try{return l(r,...s)}catch(c){return w4("Table",`Plugin at index ${o} threw in transform:`,c),r}},n)}const G_=[];function V_(e,t){if(e===t)return!0;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 W_({item:e,rowIndex:t,rowKey:n,columns:s,plugins:r,textOverflow:i,RowComponent:o,CellComponent:l,ariaRowIndex:c}){const u=s.map((f,p)=>{var v;const g={};f.align&&(g.style={textAlign:f.align});const y=jo(r,j=>j.transformBodyCell,{htmlProps:g,xstyle:[],columnIndex:p,columns:s},f,e,p,s),m=!f.renderCell,k=m?w_(e,f.key):((v=f.renderCell)==null?void 0:v.call(f,e))??null;let w;return m&&i==="truncate"&&typeof k=="string"&&k.length>0?w=a.jsx(re,{type:"body",maxLines:1,children:k}):w=k,a.jsx(l,{...y.htmlProps,contextMenuActions:y.contextMenuActions,xstyle:y.xstyle,children:w},f.key)}),d=jo(r,f=>f.transformBodyRow,{htmlProps:c==null?{}:{"aria-rowindex":c},xstyle:[],children:a.jsx(a.Fragment,{children:u})},e,t);return a.jsx(o,{ref:d.ref,...d.htmlProps,xstyle:d.xstyle,children:d.children},n)}function K_(e,t){if(e.rowKey!==t.rowKey||e.rowIndex!==t.rowIndex||e.ariaRowIndex!==t.ariaRowIndex||e.columns!==t.columns||e.plugins!==t.plugins||e.textOverflow!==t.textOverflow||e.RowComponent!==t.RowComponent||e.CellComponent!==t.CellComponent)return!1;if(e.item===t.item)return!0;const n=e.item,s=t.item,r=Object.keys(s);if(Object.keys(n).length!==r.length)return!1;for(const i of r)if(n[i]!==s[i])return!1;return!0}const X_=x.memo(W_,K_);function Z_({data:e,columns:t,idKey:n,plugins:s,children:r,textOverflow:i="wrap",scrollWrapper:o,emptyState:l,rowIndexStart:c,rowCount:u,xstyle:d,className:h,style:f,ref:p,...g}){const b=Se(),y=s??G_,m=c!=null||u!=null,k=c??1,w=m?u??-1:void 0,v=Gh,j=Ky,C=Xy,$=t??(e?E_(e):[]),T=jo(y,L=>L.transformColumns,$),A=x.useRef(T);V_(A.current,T)||(A.current=T);const S=A.current,_=b_(S),M=jo(y,L=>L.transformTable,{htmlProps:{},xstyle:r?[kp.table,kp.tableAutoLayout]:[kp.table]}),z=S.map((L,D)=>{var ke;const P=L.header??L.key,F={"data-column-key":L.key,scope:"col"};L.align&&(F.style={textAlign:L.align});const G=jo(y,ue=>ue.transformHeaderCell,{htmlProps:F,xstyle:[],content:P,columnIndex:D,columns:S},L,D,S),Q=((ke=_.columns.get(L.key))==null?void 0:ke.style)??{},ee=G.htmlProps.style,Y={...G.htmlProps,style:ee?{...Q,...ee}:Q},V=G.content??P,oe=typeof V=="string"&&V.length>0?{title:V}:{},{before:le,after:me,overlay:se,below:he}=G,J=le!=null||me!=null||se!=null||he!=null?a.jsxs(a.Fragment,{children:[le,me!=null?a.jsxs("div",{className:"x3nfvp2 x6s0dn4 xzye2dw xeuugli",children:[V,me]}):V,se,he]}):V;return a.jsx(C,{...Y,...oe,contextMenuActions:G.contextMenuActions,xstyle:G.xstyle,children:J},L.key)}),O=jo(y,L=>L.transformHeaderRow,{htmlProps:{},xstyle:[],children:a.jsx(a.Fragment,{children:z})}),I=e!=null&&e.length>0,E=S.length>0,N={...M.htmlProps.style,...f,..._.tableMinWidth>0?{minWidth:`${_.tableMinWidth}px`}:null};let R=a.jsx("table",{ref:p,...w!=null?{"aria-rowcount":w}:null,...M.htmlProps,...K(W("base-table"),q(...M.xstyle,d),[M.htmlProps.className,h].filter(Boolean).join(" ")||void 0,N),...g,children:r||a.jsxs(a.Fragment,{children:[E&&a.jsx(Zy,{children:a.jsx(v,{...O.htmlProps,isHeaderRow:!0,xstyle:O.xstyle,children:O.children})}),a.jsx(Yy,{children:I?e.map((L,D)=>{const P=n==null?D:typeof n=="function"?n(L):String(L[n]);return a.jsx(X_,{item:L,rowIndex:D,rowKey:P,columns:S,plugins:y,textOverflow:i,RowComponent:v,CellComponent:j,ariaRowIndex:m?k+D:void 0},P)}):e!=null&&l!==!1&&a.jsx("tr",{children:a.jsx("td",{colSpan:S.length,children:l??a.jsx(Wi,{title:b("@astryx.table.noData"),isCompact:!0})})})})]})});if(o){const L=jo(y,D=>D.transformScrollWrapper,{htmlProps:{},xstyle:[]});R=a.jsx(o,{htmlProps:L.htmlProps,xstyle:L.xstyle,beforeTable:L.beforeTable,afterTable:L.afterTable,children:R})}for(let L=y.length-1;L>=0;L--){const D=y[L];if(D.transformTableContext)try{R=D.transformTableContext(R)}catch(P){w4("Table","Plugin threw in transformTableContext:",P)}}return R}const Cj=Z_;Cj.displayName="BaseTable";const $j=["columnSettings","sort","tree","selection","pagination"],f2=new Map($j.map((e,t)=>[e,t]));function Y_(e){const t=$j.length;return e.sort(([n],[s])=>{const r=f2.get(n)??t,i=f2.get(s)??t;return r-i})}const cf=new Set(["transformColumns","transformTable","transformHeaderRow","transformHeaderCell","transformBodyRow","transformBodyCell","transformScrollWrapper","transformTableContext"]);function Q_(e,t){const n=Object.keys(t);for(const r of n)cf.has(r)||qo("Table",`Plugin "${e}" has unknown key "${r}". Valid keys: ${[...cf].join(", ")}. This key will be ignored.`);for(const r of n)if(cf.has(r)){const i=t[r];i!=null&&typeof i!="function"&&qo()}n.some(r=>cf.has(r)&&typeof t[r]=="function")||qo()}function J_(e,t){const n=x.useRef(null);if(n.current!=null){const i=n.current;if(i.basePlugins===e&&i.userPlugins===t)return i.result;if(i.basePlugins===e&&eL(i.userPlugins,t))return i.userPlugins=t,i.result}const s=t?Y_(Object.entries(t)).map(([,i])=>i):[],r=[...e,...s];if(t)for(const[i,o]of Object.entries(t))Q_(i,o);return n.current={basePlugins:e,userPlugins:t,result:r},r}function eL(e,t){if(e===t)return!0;if(e==null||t==null)return!1;const n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(const r of n)if(e[r]!==t[r])return!1;return!0}const tL={base:{kMv6JI:"xjb2p0i",kMwMTN:"x1tgivj0",$$css:!0}},h2={base:{kXHlph:"xw2csxc",kuHK5b:"x5lxg6s",$$css:!0},containerBleed:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",keoZOQ:"xkibk3",k1K539:"xlayyun",$$css:!0}};function nL({children:e,htmlProps:t,xstyle:n,beforeTable:s,afterTable:r}){const i=Se(),{ref:o,...l}=t??{};return a.jsxs("div",{ref:o,tabIndex:0,role:"group","aria-label":i("@astryx.table.label"),...l,...K(W("table-scroll-wrapper"),q(h2.base,h2.containerBleed,...n??[])),children:[s,e,r]})}function sL(){return{transformTable(e){const t=e.htmlProps.className??"",n=W("table").className;return{...e,htmlProps:{...e.htmlProps,className:t?`${t} ${n}`:n},xstyle:[...e.xstyle,tL.base]}}}}function rL({density:e="balanced",dividers:t="rows",isStriped:n=!1,hasHover:s=!1,verticalAlign:r="middle",textOverflow:i="wrap",plugins:o,columns:l,data:c,ref:u,...d}){const h=x.useMemo(()=>sL(),[]),f=x.useMemo(()=>[h],[h]),p=J_(f,o),g=x.useMemo(()=>({density:e,dividers:t,isStriped:n,hasHover:s,verticalAlign:r,textOverflow:i}),[e,t,n,s,r,i]);return a.jsx(l1,{value:g,children:a.jsx(Cj,{ref:u,data:c,columns:l,plugins:p,textOverflow:i,scrollWrapper:nL,...d})})}const Ej=rL;Ej.displayName="Table";function iL(e,t,n){if(e.length===0||t>e[e.length-1]){const s=[...e,t];for(;s.length>n;)s.shift();return s}return e}function oL(e,t,n,s){const r=t+e.length;if(n.length===0)return null;const i=n[0];if(r<=i)return null;const o=[];let l=t;l<i&&i<r&&(o.push({key:`settled-${s}`,text:e.slice(0,i-t),fading:!1}),l=i);for(let c=0;c<n.length;c++){const u=n[c],d=c+1<n.length?n[c+1]:r;if(u>=r||d<=l)continue;const h=Math.max(u,l),f=Math.min(d,r);h>=f||(o.push({key:`fade-${s}-b${u}`,text:e.slice(h-t,f-t),fading:!0}),l=f)}return o.length>0?o:null}const uo={label:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kXLuUW:"x11njtxf",kZKoxP:"x1grt7ep",kGuDYH:"x141an7d",k63SB2:"xv8on6e",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",kaIpWk:"xh6dtrn",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kVAM5u:"x14i3s5s",kg3NbH:"xf314gf",keTefX:"xladpz9",kybGjl:"x1hl2dhg",k1ekBW:"x1eaenvl",kIyJzY:"x2rcmwa",kAMwcw:"xlr8y92",ks0D6T:"x55n99s",kVQacm:"xb3r6kr",$$css:!0},labelWithIcon:{kZCmMZ:"x138rykx",$$css:!0},labelInteractive:{kkrTdU:"x1ypdohk",$$css:!0},labelHover:{kWkggS:"xe9uy6x",kMwMTN:"xv1l7n4 x140uwzg",$$css:!0},number:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kXLuUW:"x1v0h343",kGuDYH:"x141an7d",k63SB2:"x2mo6ok",kLWn49:"x1ltkj2j",kMwMTN:"xv1l7n4",kWkggS:"xgcxg3y",kaIpWk:"xjspbzw",k7Eaqz:"x16asifk",kZKoxP:"x1grt7ep",kg3NbH:"x7a5moj",kybGjl:"x1hl2dhg",k1ekBW:"x15406qy",kIyJzY:"x2rcmwa",kAMwcw:"xlr8y92",$$css:!0},numberInteractive:{kkrTdU:"x1ypdohk",$$css:!0},numberHover:{kWkggS:"xgcxg3y xe9uy6x",$$css:!0}};function Tj({ref:e,source:t,number:n,variant:s="label",xstyle:r,className:i,style:o,"data-testid":l,...c}){const u=Se(),d=t.title??String(n),h=t.url,f=t.icon!=null&&typeof t.icon!="string"?t.icon:null,p=t.src??(typeof t.icon=="string"?t.icon:void 0),g=f!=null||p!=null,b=h?"a":"span",y=h?"doc-noteref":void 0,m=h?{href:h,target:"_blank",rel:"noopener noreferrer",title:d}:{title:d},k=e;return s==="number"?a.jsx(b,{...c,ref:k,role:y,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":l,...m,...K(W("citation",{variant:s}),q(uo.number,h!=null&&uo.numberHover,h!=null&&uo.numberInteractive,r),i,o),children:n}):a.jsxs(b,{...c,ref:k,role:y,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":l,...m,...K(W("citation",{variant:s}),q(uo.label,g&&uo.labelWithIcon,h!=null&&uo.labelHover,h!=null&&uo.labelInteractive,r),i,o),children:[g&&a.jsx("span",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x12xnipv x6b6gus xjspbzw x10xzikg x1litavf x1y0btm7 x14i3s5s xb3r6kr x2lah0s",children:f!=null?yr(f,{size:"sm"}):a.jsx("img",{src:p,alt:"",className:"x1ad1g3v x9gl9lo"})}),a.jsx("span",{className:"xb3r6kr xlyipyv xuxw1ft xeuugli",children:d})]})}Tj.displayName="Citation";const aL={sourceIds:void 0,autolink:void 0};function Qy(e){if(e==null)return aL;if(typeof e.has=="function")return{sourceIds:e,autolink:void 0};const t=e;return{sourceIds:t.sourceIds,autolink:t.autolink}}const lL=/^ {0,3}\[([^\]^](?:\\.|[^\]\\])*)\]:[ \t]*(?:<([^<>\n]*)>|(\S+))([ \t]+(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\)))?[ \t]*$/,cL=/^ {0,3}(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\))[ \t]*$/;function Ru(e){return e.trim().replace(/\s+/g," ").toLowerCase()}function uL(e){const t=lL.exec(e);if(t==null)return null;const n=Ru(t[1]),s=t[2]!=null?t[2]:t[3];return n===""||s==null?null:{label:n,destination:s,hasTitle:t[4]!=null}}function Nj(e){const t=e.split(`
|
|
152
|
-
`),n=new Map,s=new Array(t.length).fill(!0);let r=!0,i=!1,o="";for(let c=0;c<t.length;c++){const u=t[c];if(i){u.startsWith(o)?(i=!1,o="",r=!0):r=!1;continue}const d=u.match(/^(`{3,}|~{3,})/);if(d){i=!0,o=d[1],r=!1;continue}if(u.trim()===""){r=!0;continue}if(r){const h=uL(u);if(h!=null){n.has(h.label)||n.set(h.label,h.destination),s[c]=!1,!h.hasTitle&&c+1<t.length&&cL.test(t[c+1])&&(s[c+1]=!1,c++);continue}}r=/^ {0,3}#{1,6}(?: |\t|$)/.test(u)||Jy(u)}if(n.size===0)return{defs:n,cleaned:e};const l=t.filter((c,u)=>s[u]).join(`
|
|
153
|
-
`);return{defs:n,cleaned:l}}function dL(e){return e.size===0?"":[...e].sort((t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0).map(([t,n])=>`${t}\0${n}`).join("")}function fL(e,t,n,s){const r=e.indexOf("]",t+1);if(r===-1)return null;const i=e.slice(t+1,r);if(e[r+1]==="["){const l=e.indexOf("]",r+2);if(l!==-1){const c=e.slice(r+2,l),u=c===""?i:c,d=n.get(Ru(u));if(d!=null)return{node:{type:"link",href:d,children:wi(i,s)},end:l+1}}}if(i.trim()==="")return null;const o=n.get(Ru(i));return o==null?null:{node:{type:"link",href:o,children:wi(i,s)},end:r+1}}function hL(e,t,n){const s=e.indexOf("]",t+2);if(s===-1)return null;const r=e.slice(t+2,s);if(e[s+1]==="["){const o=e.indexOf("]",s+2);if(o!==-1){const l=e.slice(s+2,o),c=l===""?r:l,u=n.get(Ru(c));if(u!=null)return{node:{type:"image",src:u,alt:r},end:o+1}}}if(r.trim()==="")return null;const i=n.get(Ru(r));return i==null?null:{node:{type:"image",src:i,alt:r},end:s+1}}function x2(e,t){let n=1;for(let s=t;s<e.length;s++)if(e[s]==="(")n++;else if(e[s]===")"&&(n--,n===0))return s;return-1}function Na(e){return e==null?!1:/\w/.test(e)}function xL(e,t,n){if(!n.sourceIds||e[t]!=="【")return null;const s=e.indexOf("】",t+1);if(s===-1)return null;const r=e.slice(t+1,s);return r.length===0||!n.sourceIds.has(r)?null:{sourceId:r,end:s+1}}function pL(e,t,n){if(!n.sourceIds||e[t]!=="[")return null;const s=e.indexOf("]",t+1);if(s===-1||e[s+1]==="(")return null;const r=e.slice(t+1,s);return r.length===0||!n.sourceIds.has(r)?null:{sourceId:r,end:s+1}}function gL(e,t){return Iu(e,Qy(t))}function Iu(e,t){const n=wi(e,t);return t.autolink==="gfm"?Rj(n):n}function wi(e,t){const n=[];let s=0;for(;s<e.length;){if(e[s]==="\\"&&s+1<e.length){n.push({type:"text",content:e[s+1]}),s+=2;continue}if(e[s]==="`"){const l=e[s+1]==="`"?e[s+2]==="`"?3:2:1,c=s+l,u=e.indexOf("`".repeat(l),c);if(u!==-1){n.push({type:"code",content:e.slice(c,u)}),s=u+l;continue}}{const l=xL(e,s,t);if(l){n.push({type:"citation",sourceId:l.sourceId}),s=l.end;continue}}if(e[s]==="!"&&e[s+1]==="["){const l=e.indexOf("]",s+2);if(l!==-1&&e[l+1]==="("){const c=x2(e,l+2);if(c!==-1){n.push({type:"image",src:e.slice(l+2,c),alt:e.slice(s+2,l)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="!"&&e[s+1]==="["){const l=hL(e,s,t.linkDefs);if(l){n.push(l.node),s=l.end;continue}}{const l=pL(e,s,t);if(l){n.push({type:"citation",sourceId:l.sourceId}),s=l.end;continue}}if(e[s]==="["){const l=e.indexOf("]",s+1);if(l!==-1&&e[l+1]==="("){const c=x2(e,l+2);if(c!==-1){n.push({type:"link",href:e.slice(l+2,c),children:wi(e.slice(s+1,l),t)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="["){const l=fL(e,s,t.linkDefs,t);if(l){n.push(l.node),s=l.end;continue}}if(e[s]==="*"&&e[s+1]==="*"&&e[s+2]==="*"||e[s]==="_"&&e[s+1]==="_"&&e[s+2]==="_"){const l=e.slice(s,s+3),c=e[s]==="_";if(!(c&&Na(e[s-1]))){const u=e.indexOf(l,s+3);if(u!==-1&&(!c||!Na(e[u+3]))){n.push({type:"bold",children:[{type:"italic",children:wi(e.slice(s+3,u),t)}]}),s=u+3;continue}}}if(e[s]==="*"&&e[s+1]==="*"||e[s]==="_"&&e[s+1]==="_"){const l=e.slice(s,s+2),c=e[s]==="_";if(!(c&&Na(e[s-1]))){const u=e.indexOf(l,s+2);if(u!==-1&&(!c||!Na(e[u+2]))){n.push({type:"bold",children:wi(e.slice(s+2,u),t)}),s=u+2;continue}}}if(e[s]==="~"&&e[s+1]==="~"){const l=e.indexOf("~~",s+2);if(l!==-1){n.push({type:"strikethrough",children:wi(e.slice(s+2,l),t)}),s=l+2;continue}}if(e[s]==="*"||e[s]==="_"){const l=e[s]==="_";if(!(l&&Na(e[s-1]))){const c=e.indexOf(e[s],s+1);if(c!==-1&&c>s+1&&(!l||!Na(e[c+1]))){n.push({type:"italic",children:wi(e.slice(s+1,c),t)}),s=c+1;continue}}}let r=s+1;for(;r<e.length&&!"*_~`[!\\\n【".includes(e[r]);)r++;const i=e.slice(s,r);if(r<e.length&&e[r]===`
|
|
154
|
-
`){const l=i.replace(/ +$/,"");if(i.length-l.length>=2){if(l.length>0){const c=n[n.length-1];(c==null?void 0:c.type)==="text"?c.content+=l:n.push({type:"text",content:l})}n.push({type:"break"}),s=r+1;continue}}const o=n[n.length-1];(o==null?void 0:o.type)==="text"?o.content+=i:n.push({type:"text",content:i}),s=r}return n}const Aj="[^\\s<]+",mL="https?:\\/\\/",Mj="[A-Za-z0-9._%+-]+",p2="[A-Za-z0-9-]+",zj=`${p2}(?:\\.${p2})+`,yL="[a-zA-Z][a-zA-Z0-9+.-]*",kL="[^<>\\s]*",bL=new RegExp(`${mL}${Aj}`,"g"),vL=new RegExp(`www\\.${Aj}`,"g"),wL=new RegExp(`${Mj}@${zj}`,"g"),jL=new RegExp(`<(${yL}:${kL})>`,"g"),SL=new RegExp(`<(${Mj}@${zj})>`,"g"),g2=new Set("?!.,:*_~"),CL=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._%+-@");function m2(e){let t=e;for(;t.length>0;){if(g2.has(t[t.length-1])){let n=t.length-1;for(;n>0&&g2.has(t[n-1]);)n--;t=t.slice(0,n);continue}if(t.endsWith(")")){let n=0,s=0;for(let r=0;r<t.length;r++)t[r]==="("?n++:t[r]===")"&&s++;if(s>n){t=t.slice(0,-1);continue}}break}return t}const $L=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/=");function y2(e){return e==null?!0:!$L.has(e)}function EL(e){const t=[];{const r=new RegExp(jL.source,"g");let i;for(;(i=r.exec(e))!==null;){const o=i[1];t.push({start:i.index,end:i.index+i[0].length,href:o,display:o})}}{const r=new RegExp(SL.source,"g");let i;for(;(i=r.exec(e))!==null;){const o=i[1];t.push({start:i.index,end:i.index+i[0].length,href:`mailto:${o}`,display:o})}}{const r=new RegExp(bL.source,"g");let i;for(;(i=r.exec(e))!==null;){const o=e[i.index-1];if(!y2(o)||e.slice(i.index-2,i.index)==="](")continue;const l=m2(i[0]);l.length!==0&&t.push({start:i.index,end:i.index+l.length,href:l,display:l})}}{const r=new RegExp(vL.source,"g");let i;for(;(i=r.exec(e))!==null;){const o=e[i.index-1];if(!y2(o)||e.slice(i.index-3,i.index)==="://")continue;const l=m2(i[0]);l.length!==0&&t.push({start:i.index,end:i.index+l.length,href:`http://${l}`,display:l})}}{const r=new RegExp(wL.source,"g");let i;for(;(i=r.exec(e))!==null;){const o=e[i.index-1];o!=null&&CL.has(o)||e.slice(Math.max(0,i.index-7),i.index)!=="mailto:"&&t.push({start:i.index,end:i.index+i[0].length,href:`mailto:${i[0]}`,display:i[0]})}}t.sort((r,i)=>r.start-i.start);const n=[];let s=0;for(const r of t)r.start>=s&&(n.push(r),s=r.end);return n}function TL(e){const t=EL(e);if(t.length===0)return[{type:"text",content:e}];const n=[];let s=0;for(const r of t)r.start>s&&n.push({type:"text",content:e.slice(s,r.start)}),n.push({type:"link",href:r.href,children:[{type:"text",content:r.display}]}),s=r.end;return s<e.length&&n.push({type:"text",content:e.slice(s)}),n}function Rj(e){const t=[];for(const n of e)if(n.type==="text"){const s=TL(n.content);for(const r of s){const i=t[t.length-1];r.type==="text"&&(i==null?void 0:i.type)==="text"?i.content+=r.content:t.push(r)}}else n.type==="bold"||n.type==="italic"||n.type==="strikethrough"?t.push({...n,children:Rj(n.children)}):t.push(n);return t}function bp(e){let t=0;for(;t<e.length&&e[t]===" ";)t++;return t}function Jy(e){const t=e.trim();if(t.length<3)return!1;const n=t.replace(/ /g,"");if(n.length<3)return!1;const s=n[0];if(s!=="-"&&s!=="*"&&s!=="_")return!1;for(let r=1;r<n.length;r++)if(n[r]!==s)return!1;return!0}function eh(e){if(!e.includes("|"))return!1;const n=e.split("|").map(s=>s.trim()).filter(s=>s.length>0);return n.length>0&&n.every(s=>/^:?-+:?$/.test(s))}function NL(e){return!!(/^#{1,6} /.test(e)||/^(`{3,}|~{3,})/.test(e)||Jy(e)||e.startsWith("> ")||e===">"||/^ {0,9}[-*+] /.test(e)||/^ {0,9}0*1[.)] /.test(e)||e.includes("|"))}function vp(e){let t=0,n=e.length;if(e.startsWith("|"))for(t=1;t<n&&e[t]===" ";)t++;for(;n>t&&e[n-1]===" ";)n--;n>t&&e[n-1]==="|"&&n--;const s=e.slice(t,n),r=[];let i="";for(let o=0;o<s.length;o++)s[o]==="\\"&&o+1<s.length&&s[o+1]==="|"?(i+="\\|",o++):s[o]==="|"?(r.push(i.trim()),i=""):i+=s[o];return r.push(i.trim()),r}function AL(e,t,n){const s=vp(e[t]).map(l=>({children:Iu(l,n)})),r=vp(e[t+1]).map(l=>{const c=l.trim(),u=c.startsWith(":"),d=c.endsWith(":");return u&&d?"center":d?"right":u?"left":null}),i=[];let o=t+2;for(;o<e.length&&e[o].includes("|")&&e[o].trim()!=="";)i.push(vp(e[o]).map(l=>({children:Iu(l,n)}))),o++;return{node:{type:"table",headers:s,alignments:r,rows:i},nextIndex:o}}function k2(e,t,n,s){const r=[],i=bp(e[t]),o=n?e[t].match(/^ *(\d+)([.)]) /):null,l=o?o[2]:".",c=`\\${l}`,u=n?new RegExp(`^ {${i}}\\d+${c} `):new RegExp(`^ {${i}}[-*+] `),d=o?parseInt(o[1],10):void 0;let h=!1,f=t;for(;f<e.length&&u.test(e[f]);){const p=n?e[f].replace(new RegExp(`^ *\\d+${c} `),""):e[f].replace(/^ *[-*+] /,""),g=p.match(/^\[([ xX])\] (.*)/);let b,y;g?(b=g[1].toLowerCase()==="x",y=g[2]):y=p,f++;const m=[];for(;f<e.length&&e[f].trim()!==""&&bp(e[f])>i;)m.push(e[f]),f++;if(m.length>0){const w=Math.min(...m.map(j=>bp(j))),v=m.map(j=>j.slice(w));y+=`
|
|
155
|
-
`+v.join(`
|
|
156
|
-
`)}r.push({checked:b,children:To(y,s)});let k=f;for(;k<e.length&&e[k].trim()==="";)k++;k>f&&k<e.length&&u.test(e[k])&&(h=!0,f=k)}return{node:{type:"list",ordered:n,start:d,delimiter:n?l:void 0,loose:h||void 0,items:r},nextIndex:f}}function ML(e,t){return To(e,Qy(t))}function To(e,t){const{defs:n,cleaned:s}=Nj(e),r=t.linkDefs;let i;n.size===0?i=r:r==null?i=n:i=new Map([...n,...r]);const o=i!=null?{...t,linkDefs:i}:t,l=s.split(`
|
|
157
|
-
`),c=[];let u=0;for(;u<l.length;){const d=l[u];if(d.trim()===""){u++;continue}const h=d.match(/^(`{3,}|~{3,})(\w*)/);if(h){const b=h[1],y=h[2]||"plaintext",m=[];for(u++;u<l.length&&!l[u].startsWith(b);)m.push(l[u]),u++;u++,c.push({type:"codeblock",language:y,content:m.join(`
|
|
158
|
-
`)});continue}const f=d.match(/^(#{1,6}) +(.*)/);if(f){c.push({type:"heading",level:f[1].length,children:Iu(f[2],o)}),u++;continue}if(Jy(d)){c.push({type:"hr"}),u++;continue}const p=d.match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(p&&d.trim()===p[0]){c.push({type:"image",alt:p[1],src:p[2]}),u++;continue}if(u+1<l.length&&d.includes("|")&&eh(l[u+1])){const b=AL(l,u,o);c.push(b.node),u=b.nextIndex;continue}if(d.startsWith("> ")||d===">"){const b=[];for(;u<l.length&&(l[u].startsWith("> ")||l[u]===">");)b.push(l[u].replace(/^> ?/,"")),u++;c.push({type:"blockquote",children:To(b.join(`
|
|
159
|
-
`),o)});continue}if(/^ {0,9}[-*+] /.test(d)){const b=k2(l,u,!1,o);c.push(b.node),u=b.nextIndex;continue}if(/^ {0,9}\d+[.)] /.test(d)){const b=k2(l,u,!0,o);c.push(b.node),u=b.nextIndex;continue}const g=[d];for(u++;u<l.length&&!NL(l[u])&&l[u].trim()!=="";)g.push(l[u]),u++;c.push({type:"paragraph",children:Iu(g.join(`
|
|
160
|
-
`),o)})}return c}function wp(){return{prevInput:"",settledText:"",settledBlocks:[],settledUpTo:0}}function zL(e){let t=!1,n="",s=-1;for(let r=0;r<e.length;r++){const i=e[r],o=i.match(/^(`{3,}|~{3,})/);o&&(t?o[1].startsWith(n[0])&&o[1].length>=n.length&&(t=!1,n=""):(t=!0,n=o[1])),!t&&i.trim()===""&&r>0&&(s=r)}return t?-1:s}function b2(e){const t=e.lastIndexOf(`
|
|
161
|
-
`),n=t===-1?"":e.slice(0,t+1);let s=t===-1?e:e.slice(t+1);const r=s.lastIndexOf("[");if(r!==-1){const o=s.slice(r);if(!(o.includes("](")&&o.includes(")"))){const c=r>0&&s[r-1]==="!"?r-1:r;s=s.slice(0,c)}}let i=s.length;for(;i>0&&s[i-1]==="`";)i--;if(i<s.length&&i>0){const o=s.length-i;s.lastIndexOf("`".repeat(o),i-1)===-1&&(s=s.slice(0,i))}for(i=s.length;i>0&&s[i-1]==="*";)i--;if(i<s.length&&i>0){const o=s.length-i;o<=3&&s.lastIndexOf("*".repeat(o),i-1)===-1&&(s=s.slice(0,i))}{let o=0;const l=[];for(;o<s.length;){const u=s.indexOf("*",o);if(u===-1)break;let d=1;for(;u+d<s.length&&s[u+d]==="*";)d++;if(d>3){o=u+d;continue}l.push({pos:u,len:d}),o=u+d}const c=new Set;for(let u=0;u<l.length;u++)if(!c.has(u)){for(let d=u+1;d<l.length;d++)if(!c.has(d)&&l[d].len===l[u].len){c.add(u),c.add(d);break}}for(let u=l.length-1;u>=0;u--)if(!c.has(u)){const d=l[u];d.pos+d.len<s.length?s=s+"*".repeat(d.len):s=s.slice(0,d.pos)}}if(s.length>=2&&s.endsWith("~~"))s.lastIndexOf("~~",s.length-3)===-1&&(s=s.slice(0,-2));else if(s.endsWith("~")){const o=s.length-2;o>=0&&s[o]!=="~"&&(s=s.slice(0,-1))}{let o=0,l=0;const c=[];for(;;){const u=s.indexOf("~~",l);if(u===-1)break;c.push(u),o++,l=u+2}o%2===1&&(s=s.slice(0,c[c.length-1]))}return n+s}function RL(e){const t=e.split(`
|
|
162
|
-
`);for(;t.length>0;){const n=t[t.length-1],s=n.trim();if(s===""){t.pop();continue}if(/^ {0,9}[-*+] $/.test(n)||/^ {0,9}\d+[.)] $/.test(n)){t.pop();continue}if(s.includes("|")&&!eh(n)){let r=!1;for(let i=t.length-2;i>=1;i--)if(eh(t[i])&&t[i-1].includes("|")){r=!0;break}if(!r){t.pop();continue}}if(eh(n)&&(t.length<2||!t[t.length-2].includes("|"))){t.pop();continue}break}return t.join(`
|
|
163
|
-
`)}function v2(e,t){if(e.length===0||t.length===0)return[...e,...t];const n=e[e.length-1],s=t[0];if(n.type==="list"&&s.type==="list"&&n.ordered===s.ordered&&n.delimiter===s.delimiter){const r={type:"list",ordered:n.ordered,start:n.start,delimiter:n.delimiter,loose:!0,items:[...n.items,...s.items]};return[...e.slice(0,-1),r,...t.slice(1)]}return[...e,...t]}function IL(e,t,n){const s=Qy(n);if(t.autolink!==s.autolink&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.autolink=s.autolink),e==="")return t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=void 0,[];const{defs:r}=Nj(e),i=dL(r);t.linkDefsKey!==i&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=i);const o=r.size>0?{...s,linkDefs:r}:s,l=e.split(`
|
|
164
|
-
`),c=zL(l);if(c<0)return t.prevInput=e,To(e,o);const u=l.slice(0,c).join(`
|
|
165
|
-
`),d=l.slice(c).join(`
|
|
166
|
-
`).trim(),h=RL(d);let f;if(u===t.settledText)f=t.settledBlocks;else if(t.settledText.length>0&&u.startsWith(t.settledText)){const g=u.slice(t.settledText.length),b=To(g,o);f=v2(t.settledBlocks,b)}else f=To(u,o);const p=h?To(h,o):[];return t.settledText=u,t.settledBlocks=f,t.settledUpTo=c,t.prevInput=e,v2(f,p)}const uf={start:"0",center:"auto"},jp={start:null,center:"auto"},_L={k7Eaqz:"xkj4a21",$$css:!0},Fn={proseWidth:e=>[{ks0D6T:e!=null?"xf68679":e,$$css:!0},{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],proseAlign:e=>[{kUOVxO:e!=null?"xvlecxo":e,$$css:!0},{"--x-marginInline":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],blockWidth:e=>[_L,{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`min(${e}, 100%)`)}],blockAlign:e=>[{kUOVxO:e!=null?"xvlecxo":e,$$css:!0},{"--x-marginInline":(t=>typeof t=="number"?t+"px":t??void 0)(e)}],cellMinWidth:e=>[{k7Eaqz:e!=null?"xkj4a21":e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},df={center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},be={root:{kMv6JI:"x9ynric",kMwMTN:"x1tgivj0",kLWn49:"xw6l6zx",kGuDYH:"xjm74w1",kzqmXN:"xh8yej3",ks0D6T:"x193iq5w",k7Eaqz:"xeuugli",kHjlTd:"x1mzt3pk",$$css:!0},inlineRoot:{k1xSpc:"xt0psk2",kzqmXN:"x14atkfc",ks0D6T:"x1x1rfll",kMv6JI:"xjb2p0i",kMwMTN:"x1heor9g",kLWn49:"x15bjb6t",kGuDYH:"x1qlqyl8",$$css:!0},headingBase:{kMv6JI:"x1g81bgm",kMwMTN:"x1tgivj0",$$css:!0},h1:{kGuDYH:"xcg7oai",k63SB2:"x1v68xuy",kLWn49:"xfmsba7",$$css:!0},h2:{kGuDYH:"x1xvnhcw",k63SB2:"x12yy4cs",kLWn49:"x1cpk1wn",$$css:!0},h3:{kGuDYH:"xii13ha",k63SB2:"x1jcxfy8",kLWn49:"xwjzt0u",$$css:!0},h4:{kGuDYH:"x8tkxat",k63SB2:"x2hcmsi",kLWn49:"xqerer",$$css:!0},h5:{kGuDYH:"xsgqta0",k63SB2:"xno150v",kLWn49:"xo3gurs",$$css:!0},h6:{kGuDYH:"xw5ohdf",k63SB2:"x1pw4frv",kLWn49:"xeixjfn",$$css:!0},spacingHeadingMajorDefault:{keoZOQ:"x13rv44w",k1K539:"xep27e5",$$css:!0},spacingHeadingMinorDefault:{keoZOQ:"x1s1qpeq",k1K539:"x1p37lm5",$$css:!0},spacingParagraphDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingCodeblockDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingBlockquoteDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingListDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingTableDefault:{keoZOQ:"x1s1qpeq",k1K539:"xwh1t77",$$css:!0},spacingHrDefault:{keoZOQ:"x13rv44w",k1K539:"x4d5cxa",$$css:!0},spacingImageDefault:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingHeadingMajorCompact:{keoZOQ:"x1s1qpeq",k1K539:"x1p37lm5",$$css:!0},spacingHeadingMinorCompact:{keoZOQ:"xj6sv8s",k1K539:"x14cgwvg",$$css:!0},spacingParagraphCompact:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},spacingCodeblockCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingBlockquoteCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingListCompact:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},spacingTableCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},spacingHrCompact:{keoZOQ:"xj6sv8s",k1K539:"xep27e5",$$css:!0},spacingImageCompact:{keoZOQ:"xtbrsbv",k1K539:"x1p37lm5",$$css:!0},noMarginBlockStart:{keoZOQ:"xdj266r",$$css:!0},noMarginBlockEnd:{k1K539:"xat24cr",$$css:!0},codeBlockWrapper:{ks0D6T:"x193iq5w",$$css:!0},tableWrapper:{kXHlph:"xw2csxc",ks0D6T:"x193iq5w","--container-padding-inline-start":"xrhngw9","--container-padding-inline-end":"xjsfl84","--container-padding-block-start":"x1047aw6","--container-padding-block-end":"xax9j7h",$$css:!0},blockIndent:{kUOVxO:"x1ho7dyk",$$css:!0},hr:{kMzoRj:"xc342km",kEafiO:"x11xkdxz",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}};function w2(e){const t=e.match(/^([\d.]+)ms$/);if(t)return parseFloat(t[1]);const n=e.match(/^([\d.]+)s$/);return n?parseFloat(n[1])*1e3:null}function Ho(e){let t=0;for(const n of e)switch(n.type){case"text":t+=n.content.length;break;case"code":t+=n.content.length;break;case"image":t+=n.alt.length;break;case"bold":case"italic":case"strikethrough":case"link":t+=Ho(n.children);break;case"break":t+=1;break;case"citation":t+=1;break}return t}function Vg(e){let t=0;for(const n of e)switch(n.type){case"heading":case"paragraph":t+=Ho(n.children);break;case"codeblock":t+=n.content.length;break;case"blockquote":t+=Vg(n.children);break;case"list":for(const s of n.items)t+=Vg(s.children);break;case"table":for(const s of n.headers)t+=Ho(s.children);for(const s of n.rows)for(const r of s)t+=Ho(r.children);break;case"hr":break;case"image":t+=n.alt.length;break}return t}const LL={1:be.h1,2:be.h2,3:be.h3,4:be.h4,5:be.h5,6:be.h6},OL=/^(javascript|data|vbscript):/i;function Wg(e){const t=e.trim();return t.length===0||OL.test(t)?null:t}function DL(e,t){const n=[];for(const l of t){l.pattern.lastIndex=0;let c;for(;(c=l.pattern.exec(e))!==null;){let u;if(l.getEndIndex){const d=l.getEndIndex(e,c);if(d===!1)continue;u=d}else u=c.index+c[0].length;n.push({start:c.index,end:u,match:c,plugin:l})}}n.sort((l,c)=>l.start-c.start);const s=[];let r=0;for(const l of n)l.start>=r&&(s.push(l),r=l.end);if(s.length===0)return[{type:"text",content:e}];const i=[];let o=0;for(let l=0;l<s.length;l++){const c=s[l];c.start>o&&i.push({type:"text",content:e.slice(o,c.start)}),i.push({type:"plugin",element:c.plugin.render(c.match,`plugin-${l}`),matchLength:c.end-c.start}),o=c.end}return o<e.length&&i.push({type:"text",content:e.slice(o)}),i}function j2(e,t,n){const s=t.offset;if(t.offset+=e.length,!t.active)return e;const r=oL(e,s,t.boundaries,n);if(r==null)return e;const i=r.map(o=>o.fading?a.jsx("span",{className:"x1hc1fzr x19991ni x80gvsz x12w9bfk xlr8y92 x4itv7f",children:o.text},o.key):a.jsx("span",{children:o.text},o.key));return a.jsx("span",{children:i},`wrap-${n}`)}function BL(e,t){let n=e.numberMap.get(t);return n==null&&(n=e.nextNumber++,e.numberMap.set(t,n)),n}function Zn(e,t,n,s,r,i="a",o,l){switch(e.type){case"text":{if(o&&o.length>0){const c=DL(e.content,o);if(!(c.length===1&&c[0].type==="text")){const u=[];for(let d=0;d<c.length;d++){const h=c[d];h.type==="text"?u.push(j2(h.content,s,`${t}-seg-${d}`)):(s.offset+=h.matchLength,u.push(a.jsx(x.Fragment,{children:h.element},`plugin-${t}-${d}`)))}return a.jsx(x.Fragment,{children:u},t)}}return j2(e.content,s,t)}case"bold":return a.jsx("strong",{className:"x2mo6ok",children:e.children.map((c,u)=>Zn(c,u,n,s,r,i,o,l))},t);case"italic":return a.jsx("em",{children:e.children.map((c,u)=>Zn(c,u,n,s,r,i,o,l))},t);case"strikethrough":return a.jsx("del",{className:"xv1l7n4",children:e.children.map((c,u)=>Zn(c,u,n,s,r,i,o,l))},t);case"code":{s.offset+=e.content.length;const c=l==null?void 0:l.inlineCode;return c?a.jsx(c,{children:e.content},t):a.jsx(Iy,{children:e.content},t)}case"link":{const c=Wg(e.href);if(c==null)return a.jsx("span",{children:e.children.map((p,g)=>Zn(p,g,n,s,r,i,o,l))},t);const u=l==null?void 0:l.link;if(u)return a.jsx(u,{href:c,children:e.children.map((p,g)=>Zn(p,g,n,s,r,i,o,l))},t);const d=c.startsWith("https://")||c.startsWith("http://"),h=n?p=>{n(c,p)===!1&&p.preventDefault()}:void 0,f=d?"a":i;return a.jsx(f,{href:c,onClick:h,...d?{target:"_blank",rel:"noopener noreferrer"}:{},className:"xjse4m1 x1bvjpef",children:e.children.map((p,g)=>Zn(p,g,n,s,r,i,o,l))},t)}case"image":{const c=Wg(e.src);if(c==null)return a.jsxs("span",{children:["[",e.alt,"]"]},t);const u=l==null?void 0:l.image;return u?a.jsx(u,{src:c,alt:e.alt},t):a.jsx("img",{src:c,alt:e.alt,className:"x193iq5w xh6dtrn"},t)}case"break":return s.offset+=1,a.jsx("br",{},t);case"citation":{if(s.offset+=1,!r)return a.jsxs("span",{children:["[",e.sourceId,"]"]},t);const c=BL(r,e.sourceId),u=r.sources[e.sourceId]??{title:e.sourceId},d=r.style==="number"?"number":"label",h=l==null?void 0:l.citation;return h?a.jsx(h,{source:u,number:c,variant:d},t):a.jsx(Tj,{source:u,number:c,variant:d},t)}}}function qL(e,t){const n=t==="compact";switch(e.type){case"heading":return e.level<=3?n?be.spacingHeadingMajorCompact:be.spacingHeadingMajorDefault:n?be.spacingHeadingMinorCompact:be.spacingHeadingMinorDefault;case"paragraph":return n?be.spacingParagraphCompact:be.spacingParagraphDefault;case"codeblock":return n?be.spacingCodeblockCompact:be.spacingCodeblockDefault;case"blockquote":return n?be.spacingBlockquoteCompact:be.spacingBlockquoteDefault;case"list":return n?be.spacingListCompact:be.spacingListDefault;case"table":return n?be.spacingTableCompact:be.spacingTableDefault;case"hr":return n?be.spacingHrCompact:be.spacingHrDefault;case"image":return n?be.spacingImageCompact:be.spacingImageDefault}}function HL(e){return e.headers.map((t,n)=>{let s=Ho(t.children);for(const r of e.rows)if(r[n]){const i=Ho(r[n].children);i>s&&(s=i)}return s<=6?60:s<=15?80:120})}function Qc(e,t,n,s,r,i,o,l,c,u,d="a",h,f,p){const g=jp[u],b=g!=null?Fn.blockAlign(g):null,y=qL(e,s),m=t===0,k=t===n-1;switch(e.type){case"heading":{const w=Math.min(e.level+r-1,6),v=e.children.map(($,T)=>Zn($,T,i,o,l,d,h,f)),j=f==null?void 0:f.heading;if(j)return a.jsx(j,{level:w,children:v},t);const C=`h${w}`;return a.jsx(C,{...K(W("markdown-heading",{density:s,level:w}),q(be.headingBase,LL[w],y,c!=null?Fn.proseWidth(c):null,u!=="start"?Fn.proseAlign(uf[u]):null,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd)),children:v},t)}case"paragraph":{const w=e.children.map((j,C)=>Zn(j,C,i,o,l,d,h,f)),v=f==null?void 0:f.paragraph;return v?a.jsx(v,{children:w},t):a.jsx("div",{role:"paragraph",...K(W("markdown-paragraph",{density:s}),q(y,c!=null?Fn.proseWidth(c):null,u!=="start"?Fn.proseAlign(uf[u]):null,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd)),children:w},t)}case"codeblock":{o.offset+=e.content.length;const w=f==null?void 0:f.code;return w?a.jsx(w,{code:e.content,language:e.language},t):a.jsx("div",{...K(W("markdown-codeblock",{density:s}),q(y,be.codeBlockWrapper,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd)),children:a.jsx(Ry,{code:e.content,language:e.language,isCollapsible:!0,xstyle:[c!=null?Fn.blockWidth(c):void 0,b]})},t)}case"blockquote":{const w=f==null?void 0:f.blockquote;if(w){const v=e.children.map((j,C)=>Qc(j,C,e.children.length,s,r,i,o,l,c,u,d,h,f,p));return a.jsx(w,{children:v},t)}return a.jsx(b6,{...W("markdown-blockquote",{density:s}),xstyle:[y,c!=null?Fn.proseWidth(c):void 0,u!=="start"?Fn.proseAlign(uf[u]):void 0,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd],children:e.children.map((v,j)=>Qc(v,j,e.children.length,s,r,i,o,l,c,u,d,h,f,p))},t)}case"list":{if(e.items.length>0&&e.items.every(v=>v.checked!=null)){const v=e.items.map((j,C)=>({item:j,key:`task-${C}`})).filter(({item:j})=>j.checked).map(({key:j})=>j);return a.jsx("div",{...K(W("markdown-list",{density:s}),q(y,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd)),children:a.jsx(Vy,{label:p("@astryx.markdown.taskList"),isLabelHidden:!0,value:v,xstyle:be.blockIndent,isReadOnly:!0,density:"compact",children:e.items.map((j,C)=>{const $=j.children[0],A=j.children.length===1&&($==null?void 0:$.type)==="paragraph"?a.jsx(a.Fragment,{children:$.children.map((S,_)=>Zn(S,_,i,o,l,d,h,f))}):a.jsx(a.Fragment,{children:j.children.map((S,_)=>Qc(S,_,j.children.length,s,r,i,o,l,c,u,d,h,f,p))});return a.jsx(Fh,{value:`task-${C}`,label:A},C)})})},t)}return a.jsx("div",{...K(W("markdown-list",{density:s}),q(y,c!=null?Fn.proseWidth(c):null,u!=="start"?Fn.proseAlign(uf[u]):null,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd)),children:a.jsx(Mt,{listStyle:e.ordered?"decimal":"disc",density:"compact",start:e.ordered?e.start:void 0,xstyle:be.blockIndent,children:e.items.map((v,j)=>{const C=v.children[0],T=v.children.length===1&&(C==null?void 0:C.type)==="paragraph"?a.jsx(a.Fragment,{children:C.children.map((A,S)=>Zn(A,S,i,o,l,d,h,f))}):a.jsx(a.Fragment,{children:v.children.map((A,S)=>Qc(A,S,v.children.length,s,r,i,o,l,c,u,d,h,f,p))});return a.jsx(rt,{label:T},j)})})},t)}case"table":{const w=HL(e);return a.jsx("div",{tabIndex:0,role:"group","aria-label":p("@astryx.markdown.table"),...K(W("markdown-table",{density:s}),q(be.tableWrapper,y,c!=null?Fn.blockWidth(c):null,jp[u]!=null?Fn.blockAlign(jp[u]):null,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd)),children:a.jsxs(Ej,{dividers:"rows",textOverflow:"wrap",children:[a.jsx(Zy,{children:a.jsx(Gh,{children:e.headers.map((v,j)=>a.jsx(Xy,{xstyle:[Fn.cellMinWidth(`${w[j]}px`),e.alignments[j]==="center"&&df.center,e.alignments[j]==="right"&&df.end],children:v.children.map((C,$)=>Zn(C,$,i,o,l,d,h,f))},j))})}),a.jsx(Yy,{children:e.rows.map((v,j)=>{const C=v.map(($,T)=>a.jsx(Ky,{xstyle:[e.alignments[T]==="center"&&df.center,e.alignments[T]==="right"&&df.end],children:$.children.map((A,S)=>Zn(A,S,i,o,l,d,h,f))},T));return a.jsx(Gh,{children:C},j)})})]})},t)}case"hr":{const w=f==null?void 0:f.hr;return w?a.jsx(w,{},t):a.jsx("hr",{...K(W("markdown-hr",{density:s}),q(be.hr,y,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd))},t)}case"image":{const w=Wg(e.src);if(w==null)return a.jsxs("div",{...K(W("markdown-image",{density:s}),q(y,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd)),children:["[",e.alt,"]"]},t);const v=f==null?void 0:f.image;return v?a.jsx(v,{src:w,alt:e.alt},t):a.jsx("div",{...K(W("markdown-image",{density:s}),q(y,m&&be.noMarginBlockStart,k&&be.noMarginBlockEnd)),children:a.jsx("img",{src:w,alt:e.alt,className:"x193iq5w xh6dtrn"})},t)}}}function ek({ref:e,children:t,display:n="block",density:s="default",headingLevelStart:r=1,isStreaming:i=!1,onLinkClick:o,sources:l,citationStyle:c="label",contentWidth:u=680,contentAlign:d="start",components:h,inlinePlugins:f,autolink:p,xstyle:g,className:b,style:y,"data-testid":m}){const k=Se(),w=eo(),v=x.useMemo(()=>l?new Set(Object.keys(l)):void 0,[l]),j=x.useMemo(()=>({sourceIds:v,autolink:p}),[v,p]),C=Gz(t,i),$=x.useRef(wp()),T=x.useRef(p);T.current!==p&&($.current=wp(),T.current=p);const A=x.useMemo(()=>{if(n==="inline")return[];if(i){if(C==="")return $.current=wp(),[];const P=b2(C);return IL(P,$.current,j)}return ML(t,j)},[n,C,t,i,j]),S=x.useMemo(()=>{if(n!=="inline")return[];const P=i?b2(C):t;return gL(P,j)},[n,C,t,i,j]),{token:_}=Yx(),M=x.useMemo(()=>{const P=w2(_("--duration-fast-max"))??230,F=w2(_("--duration-fast-min")),X=F!=null?Math.max(4,Math.round(F/10)):50;return Math.min(Math.ceil(P/X),12)},[_]),z=x.useRef([]),O=x.useRef([]),I=x.useRef([]),E=C.length,R={offset:0,boundaries:x.useMemo(()=>{const P=n==="inline"?Ho(O.current):Vg(z.current),F=iL(I.current,P,M);return I.current=F,F},[n,E,M]),active:i},L=l?{sources:l,numberMap:new Map,nextNumber:1,style:c}:null;if(n==="inline"){const P=a.jsx("span",{ref:e,"data-testid":m,...K(W("markdown",{density:s}),q(be.root,be.inlineRoot,g),b,y),children:S.map((F,X)=>Zn(F,X,o,R,L,w,f,h))});return O.current=S,z.current=[],P}const D=a.jsx("div",{role:"document",ref:e,"data-testid":m,...K(W("markdown",{density:s}),q(be.root,g),b,y),children:A.map((P,F)=>Qc(P,F,A.length,s,r,o,R,L,u?typeof u=="number"?`${u}px`:u:null,d,w,f,h,k))});return z.current=A,O.current=[],D}ek.displayName="Markdown";const Ij=x.createContext(null);Ij.displayName="CollapsibleGroupContext";const Kg=x.createContext(null);Kg.displayName="CollapsibleGroupPresentationContext";function PL(e){const{isCollapsible:t,value:n}=e,s=x.use(Ij),r=s!=null&&n!=null,i=t===!0?{}:t||null,o=i!=null,[l,c]=x.useState(()=>r?!0:(i==null?void 0:i.isOpen)!==void 0?i.isOpen:(i==null?void 0:i.defaultIsOpen)??!0);let u;return r&&n!=null?u=s.isOpen(n):(i==null?void 0:i.isOpen)!==void 0?u=i.isOpen:u=l,{isEnabled:o,isOpen:u,toggle:()=>{var f;if(r&&n!=null){s.toggle(n);return}const h=!u;(i==null?void 0:i.isOpen)===void 0&&c(h),(f=i==null?void 0:i.onOpenChange)==null||f.call(i,h)}}}const Aa={root:{kzqmXN:"xh8yej3",$$css:!0},trigger:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kzqmXN:"xh8yej3",kkrTdU:"x1ypdohk",kMv6JI:"x9ynric",kGuDYH:"x18juvz8",k63SB2:"x2mo6ok",kMwMTN:"x1tgivj0",k9WMMc:"x1yc453h",k8WAf4:"xt970qd",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},triggerDisabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",$$css:!0},contentHidden:{k1xSpc:"x1s85apg",$$css:!0},content:{kLKAdn:"xfsso4q",kMv6JI:"x9ynric",kGuDYH:"xjm74w1",k63SB2:"xxovm9e",kLWn49:"xw6l6zx",kMwMTN:"x1tgivj0",$$css:!0},divided:{kEafiO:"x11xkdxz x1g31smg",kPef9Z:"x13fuv20",kLZC3w:"x1pc3f07",$$css:!0}},il={triggerCompact:{k8WAf4:"xu0wf1k",$$css:!0},triggerBalanced:{k8WAf4:"xce4md1",$$css:!0},triggerSpacious:{k8WAf4:"x8o8v82",$$css:!0},contentCompact:{kGO01o:"xy143xn",$$css:!0},contentBalanced:{kGO01o:"x1wesfrj",$$css:!0},contentSpacious:{kGO01o:"xvmdzux",$$css:!0}},UL={compact:il.triggerCompact,balanced:il.triggerBalanced,spacious:il.triggerSpacious},FL={compact:il.contentCompact,balanced:il.contentBalanced,spacious:il.contentSpacious};function _j({trigger:e,children:t,defaultIsOpen:n,isOpen:s,isDisabled:r=!1,onOpenChange:i,value:o,ref:l,xstyle:c,className:u,style:d,...h}){const f=s!==void 0?{isOpen:s,onOpenChange:i}:{defaultIsOpen:n??!0,onOpenChange:i},{isOpen:p,toggle:g}=PL({isCollapsible:f,value:o}),b=()=>{r||g()},y=x.use(Kg),m=(y==null?void 0:y.hasDividers)??!1,k=(y==null?void 0:y.density)??null,w=Ll("chevronDown"),v=x.useId();return a.jsxs("div",{ref:l,...K(W("collapsible",{density:k??void 0}),q(Aa.root,m&&Aa.divided,c),u,d),...h,children:[a.jsxs("button",{type:"button",onClick:b,"aria-disabled":r||void 0,"aria-expanded":p,"aria-controls":v,tabIndex:r?-1:void 0,...K(W("collapsible-trigger",{density:k??void 0}),q(Aa.trigger,k!=null&&UL[k],r&&Aa.triggerDisabled)),children:[a.jsx("span",{className:"x1b2iylo xwgcxoh",children:e}),a.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x11xpdln xuedmi6 xlr8y92 xv9yike x7p49u4"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x11xpdln xuedmi6 xlr8y92 xv9yike x19jd1h0"}}[!!p<<0],children:w})]}),a.jsx("div",{id:v,...K(W("collapsible-content",{density:k??void 0}),q(Aa.content,k!=null&&FL[k],!p&&Aa.contentHidden)),children:y!=null?a.jsx(Kg,{value:null,children:t}):t})]})}_j.displayName="Collapsible";const tk=x.createContext(null);tk.displayName="RadioListContext";function Lj({ref:e,label:t,isLabelHidden:n=!1,description:s,value:r,onChange:i,orientation:o="vertical",isDisabled:l=!1,disabledMessage:c,isRequired:u=!1,isOptional:d=!1,size:h="md",status:f,labelTooltip:p,width:g,xstyle:b,className:y,style:m,"data-testid":k,htmlName:w,children:v}){const j=x.useId(),C=w??j,$=x.useId(),T=x.useId(),A=x.useId(),S=x.useId(),_=x.useRef(null),M=l&&!!c,z=ls({placement:"above",focusTrigger:"always",isEnabled:M}),O=x.useMemo(()=>({name:C,value:r,onChange:i,isDisabled:l,hasDisabledMessage:M,isRequired:u,size:h,status:f}),[C,r,i,l,M,u,h,f]),I=x.useCallback(E=>{if(r!=="")return;const N=_.current;if(!N)return;const R=E.relatedTarget;if(R){if(N.contains(R))return}else if(document.activeElement&&document.activeElement!==E.target&&N.contains(document.activeElement))return;const L=Array.from(N.querySelectorAll('input[type="radio"]:not([disabled])'));if(L.length===0)return;const D=E.target,P=L.findIndex(G=>G===D);if(P===-1)return;const X=P===L.length-1?L[L.length-1]:L[0];D!==X&&X.focus()},[r]);return a.jsxs(cc,{ref:e,"data-testid":k,label:t,isLabelHidden:n,description:s,inputID:$,labelID:T,isGroupLabel:!0,descriptionID:s?A:void 0,isOptional:d,isRequired:u,isDisabled:l,status:f?{type:f.type,message:f.message,messageID:f.message?S:void 0}:void 0,labelTooltip:p,statusVariant:"detached",width:g,xstyle:b,className:y,style:m,children:[a.jsx("div",{ref:E=>{_.current=E,z.ref(E)},role:"radiogroup","aria-labelledby":T,onFocus:I,"aria-describedby":[s?A:null,f!=null&&f.message?S:null,M?z.describedBy:null].filter(Boolean).join(" ")||void 0,"aria-invalid":(f==null?void 0:f.type)==="error"?!0:void 0,"aria-required":u||void 0,...K(W("radio-list",{orientation:o,size:h}),{0:{className:"x78zum5 x1q0g3np x9mgr7n"},1:{className:"x78zum5 xdt5ytf x1txdalj"}}[(o==="vertical")<<0]),children:a.jsx(tk,{value:O,children:v})}),M&&z.renderTooltip(c)]})}Lj.displayName="RadioList";const GL={xklqth5:"xklqth5",$$css:!0},Ls={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},radioWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},radio:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"x16rqkct",k1ekBW:"xts7igz",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kB7OPa:"x9f619",$$css:!0},radioUnchecked:{kVAM5u:"xvy26l8 x70talc",kWkggS:"x10xzikg xy1ay1n",$$css:!0},radioChecked:{kVAM5u:"xad5do xaq2ahg",kWkggS:"x1ewilqj xwnx32n",$$css:!0},radioWrapperFocus:{kI3sdo:"x1a2a7pz x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",kaIpWk:"x16rqkct",$$css:!0},radioDisabled:{kSiTet:"xbyyjgo",kVAM5u:"x14i3s5s",$$css:!0},radioDisabledUnchecked:{kWkggS:"xwmxj5m",$$css:!0},innerDot:{kaIpWk:"x16rqkct",kWkggS:"x1azo05 xwvh9j7",$$css:!0}},S2={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},VL={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},WL={sm:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},md:{kzqmXN:"x1fsd2vl",kZKoxP:"x170jfvy",$$css:!0}},KL={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0}};function Xg({ref:e,label:t,value:n,description:s,isDisabled:r=!1,startContent:i,endContent:o,xstyle:l,className:c,style:u,...d}){const h=x.use(tk);if(!h)throw new Error("RadioListItem must be used within an RadioList");const f=x.useId(),p=x.useId(),g=h.isDisabled||r,b=h.hasDisabledMessage&&!r,y=h.value===n,m=h.size,k=a.jsxs("div",{...q(Ls.radioWrapper,S2[m],!g&&Ls.radioWrapperFocus),children:[a.jsx("input",{id:f,type:"radio",name:h.name,value:n,checked:y,disabled:g&&!b,"aria-disabled":b?"true":void 0,form:b?"":void 0,required:h.isRequired,onChange:()=>{g||h.onChange(n)},"aria-describedby":s?p:void 0,...q(Ls.input,S2[m],g&&Ls.inputDisabled)}),a.jsx("div",{"aria-hidden":"true",...K(W("radio",{size:m,checked:y?"checked":null,disabled:g?"disabled":null}),q(Ls.radio,VL[m],y?Ls.radioChecked:Ls.radioUnchecked,g&&Ls.radioDisabled,g&&!y&&Ls.radioDisabledUnchecked)),children:y&&a.jsx("div",{...K(W("radio-dot",{size:m}),q(Ls.innerDot,WL[m]))})})]}),w=i!=null?a.jsxs(a.Fragment,{children:[k,i]}):k;return a.jsx("div",{ref:e,...K(W("radio-list-item"),q(Ls.container,!g&&GL,l),c,u),...d,children:a.jsx(ac,{startContent:w,label:a.jsx("label",{htmlFor:f,...{0:{},1:{className:"xnbbluu x1h6gzvc"}}[!!g<<0],children:t}),description:s!=null?a.jsx("span",{id:p,children:s}):void 0,endContent:o,xstyle:KL.root})})}Xg.displayName="RadioListItem";const XL=50,ZL=40,Oj="astryx-resizable:";function ff(e,t,n,s){const r=Math.min(n,Math.max(t,e));if(s.length>0){let i=s[0],o=Math.abs(r-i);for(let l=1;l<s.length;l++){const c=Math.abs(r-s[l]);c<o&&(i=s[l],o=c)}return Math.min(n,Math.max(t,i))}return r}function YL(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(Oj+e);if(t!=null){const n=JSON.parse(t);if(typeof n=="number")return n}}catch{}return null}function QL(e,t){if(!(typeof window>"u"))try{localStorage.setItem(Oj+e,JSON.stringify(t))}catch{}}function JL(e){if(e==null)return 250;if(typeof e=="number")return e;if(e.endsWith("%")){const t=parseFloat(e);if(!isNaN(t)){const n=typeof window<"u"?window.innerWidth:1200;return Math.round(t/100*n)}}return 250}function Dj(e){const{defaultSize:t,minSizePx:n=XL,maxSizePx:s=1/0,collapsible:r=!1,collapsedSize:i=ZL,snaps:o=[],autoSaveId:l,onSizeChange:c,onCollapseChange:u}=e,d=JL(t),h=l?YL(l):null,f=h??d,[p,g]=x.useState(()=>ff(f,n,s,o)),[b,y]=x.useState(()=>h===0&&r),m=x.useRef(p),k=x.useRef(p);x.useEffect(()=>{l&&QL(l,b?0:p)},[p,b,l]);const w=x.useCallback(()=>{r&&(m.current=p,y(!0),g(0),u==null||u(!0),c==null||c(0))},[r,p,u,c]),v=x.useCallback(()=>{y(!1);const S=m.current||d,_=ff(S,n,s,o);g(_),u==null||u(!1),c==null||c(_)},[d,n,s,o,u,c]),j=x.useCallback(S=>{const _=ff(S,n,s,o);g(_),y(!1),c==null||c(_)},[n,s,o,c]),C=x.useCallback(()=>{k.current=b?0:p},[p,b]),$=x.useCallback(S=>{const _=k.current+S;if(r&&_<i){b||(m.current=p,u==null||u(!0)),y(!0),g(0),c==null||c(0);return}b&&_>=i&&(y(!1),u==null||u(!1));const M=ff(_,n,s,o);g(M),c==null||c(M)},[r,i,b,p,n,s,o,c,u]),T=x.useCallback(()=>{},[]);return{size:b?0:p,isCollapsed:b,collapse:w,expand:v,resize:j,props:{_size:b?0:p,_isCollapsed:b,_onResizeStart:C,_onResizeMove:$,_onResizeEnd:T,_minSizePx:n,_maxSizePx:s,_snaps:o,_collapsedSize:i,_collapsible:r,_isResizableProps:!0}}}function eO(e){const{regions:t,autoSaveId:n}=e,s=Object.entries(t),r=s.map(([o,l])=>Dj({...l,autoSaveId:n?`${n}:${o}`:void 0})),i={};return s.forEach(([o],l)=>{i[o]=r[l]}),i}function Bj(e){return"regions"in e?eO(e):Dj(e)}const tO=10,nO=50;function sO(e,t,n){if(e!=="auto")return e;const s=t?"end":"start";return n?s==="start"?"end":"start":s}function rO(e){return e==="center"?null:e==="start"?-1:1}const ut={handle:{kVAEAm:"x1n2onr6",kmuXW:"x2lah0s",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kWkggS:"x1m4xfpy",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x1a2a7pz x17nn4n9",kInvED:"xh2nty3",$$css:!0},overlay:{kVAEAm:"x10l6tqk",kY2c9j:"xhtitgo",kWkggS:"xjbqb8w",$$css:!0},overlayHorizontal:{kt4wiu:"xtijo5x",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",kzqmXN:"xkhob8h",$$css:!0},overlayVertical:{krVfgx:"x1ey2m1c",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kZKoxP:"x5kfih4",$$css:!0},horizontal:{kzqmXN:"x1i1rx1s",kZKoxP:"x5yr21d",kkrTdU:"xicojor",$$css:!0},vertical:{kZKoxP:"xjm9jq1",kzqmXN:"xh8yej3",kkrTdU:"xyozgr7",$$css:!0},noDividerHorizontal:{kWkggS:"xjbqb8w",kzqmXN:"xnalus7",$$css:!0},noDividerVertical:{kWkggS:"xjbqb8w",kZKoxP:"xqtp20y",$$css:!0},handleHover:{kWkggS:"x1m4xfpy",$$css:!0},handleActive:{kWkggS:"x7njt3n",$$css:!0},disabled:{kkrTdU:"xt0e3qv",kfzvcC:"x47corl",$$css:!0},hitArea:{kVAEAm:"x10l6tqk",kY2c9j:"x1vjfegm",kFalU9:"x5ve5x3",kfSwDN:"x87ps6o",$$css:!0},hitAreaHorizontal:{kzqmXN:"x12xnipv",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",kkrTdU:"xicojor",$$css:!0},hitAreaVertical:{kZKoxP:"x6b6gus",kLqNvP:"x1o0tod",kt4wiu:"xtijo5x",kkrTdU:"xyozgr7",$$css:!0},hitAreaCenteredY:{k87sOh:"xwa60dl",k3aq6I:"x1cb1t30",$$css:!0},pill:{kVAEAm:"x10l6tqk",kY2c9j:"xhtitgo",kfzvcC:"x47corl",kaIpWk:"xjspbzw",kWkggS:"x1m4xfpy",k1ekBW:"x1wbls7o",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",k87sOh:"xwa60dl",$$css:!0},pillHorizontal:{kzqmXN:"x1g8rjiy",kZKoxP:"x18to7ep",$$css:!0},pillVertical:{kzqmXN:"xgc8j7m",kZKoxP:"xuoj239",$$css:!0},pillHidden:{kSiTet:"xg01cxk",$$css:!0},pillVisible:{kSiTet:"x1hc1fzr",$$css:!0},pillHover:{kSiTet:"x1hc1fzr",kWkggS:"x1m4xfpy",$$css:!0},pillActive:{kSiTet:"x1hc1fzr",kWkggS:"x7njt3n",$$css:!0}},iO={kLqNvP:"x1o0tod",k3aq6I:"x11wx31z x75qhwu",$$css:!0},oO={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},aO={kLqNvP:"x1o0tod",k3aq6I:"xsqj5wx",$$css:!0},lO={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},hf={hitAreaOffsetX:e=>[iO,{"--x-qthpiu":`translate(calc(${e} * (3px + ${ms["--spacing-1"]}) - 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${ms["--spacing-1"]}) - 6.5px), -50%)`:void 0,"--x-sj6hyi":`translate(calc(${e} * (3px + ${ms["--spacing-1"]}) + 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${ms["--spacing-1"]}) + 6.5px), -50%)`:void 0}],hitAreaOffsetY:e=>[oO,{"--x-transform":`translate(-50%, calc(${e} * (3px + ${ms["--spacing-1"]}) - 6.5px))`!=null?`translate(-50%, calc(${e} * (3px + ${ms["--spacing-1"]}) - 6.5px))`:void 0}],pillOffsetX:e=>[aO,{"--x-transform":`translate(calc(${e} * (100% + ${ms["--spacing-1"]})), -50%)`!=null?`translate(calc(${e} * (100% + ${ms["--spacing-1"]})), -50%)`:void 0}],pillOffsetY:e=>[lO,{"--x-transform":`translate(-50%, calc(${e} * (100% + ${ms["--spacing-1"]})))`!=null?`translate(-50%, calc(${e} * (100% + ${ms["--spacing-1"]})))`:void 0}]};function nk({direction:e="horizontal",position:t="inline",isReversed:n=!1,isDisabled:s=!1,hasDivider:r=!1,isAlwaysVisible:i=!0,pillPlacement:o="auto",label:l,resizable:c,children:u,xstyle:d,className:h,ref:f,...p}){const g=Se(),b=l??g("@astryx.resizable.handle.label"),y=x.useRef(null),m=x.useRef(null),[k,w]=x.useState(!1),[v,j]=x.useState(!1),[C,$]=x.useState(!1),T=e==="horizontal",A=t==="overlay",S=n?-1:1,_=sO(o,n,(c==null?void 0:c._isCollapsed)??!1),M=rO(_),z=x.useCallback(()=>{const X=y.current;return X&&getComputedStyle(X).direction==="rtl"?-1:1},[]),O=v||C,I=x.useCallback(X=>{if(s||!c)return;X.preventDefault(),X.stopPropagation(),w(!0),c._onResizeStart();const G=T?X.clientX:X.clientY,Q=T?z():1;document.body.style.cursor=T?"col-resize":"row-resize",document.body.style.userSelect="none";const ee=le=>{const se=((T?le.clientX:le.clientY)-G)*Q*S;c._onResizeMove(se)},Y=()=>{oe(),w(!1),c._onResizeEnd(),document.body.style.cursor="",document.body.style.userSelect=""},V=()=>{oe(),w(!1),document.body.style.cursor="",document.body.style.userSelect=""};function oe(){window.removeEventListener("pointermove",ee),window.removeEventListener("pointerup",Y),window.removeEventListener("pointercancel",V),m.current=null}window.addEventListener("pointermove",ee),window.addEventListener("pointerup",Y),window.addEventListener("pointercancel",V),m.current=oe},[s,c,T,z,S]),E=x.useCallback(X=>{if(s||!c)return;const G=X.shiftKey?nO:tO,Q=T?z():1;switch(X.key){case"ArrowRight":case"ArrowDown":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(G*(T?Q:1)*S),c._onResizeEnd();break}case"ArrowLeft":case"ArrowUp":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(-G*(T?Q:1)*S),c._onResizeEnd();break}case"Home":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(c._minSizePx-c._size),c._onResizeEnd();break}case"End":{X.preventDefault(),c._maxSizePx!==1/0&&(c._onResizeStart(),c._onResizeMove(c._maxSizePx-c._size),c._onResizeEnd());break}case"Enter":{X.preventDefault(),c._collapsible&&(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd());break}}},[s,c,T,z,S]),N=x.useCallback(()=>{s||!c||!c._collapsible||(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd())},[s,c]);x.useEffect(()=>()=>{m.current&&(m.current(),document.body.style.cursor="",document.body.style.userSelect="")},[]);const R=(c==null?void 0:c._isCollapsed)??!1,L=c?R?Math.max(c._size,c._minSizePx):c._size:void 0,D=c?c._minSizePx:void 0,P=c&&c._maxSizePx!==1/0?c._maxSizePx:void 0,F=c&&R?g("@astryx.resizable.collapsed"):void 0;return a.jsxs("div",{ref:mt(f,y),role:"separator","aria-orientation":T?"vertical":"horizontal","aria-valuenow":L,"aria-valuemin":D,"aria-valuemax":P,"aria-valuetext":F,"aria-label":b,"aria-disabled":s||void 0,tabIndex:s?-1:0,onDoubleClick:N,onFocus:()=>$(!0),onBlur:()=>$(!1),"data-resizing":k||void 0,...K(W("resize-handle"),q(ut.handle,A&&ut.overlay,A&&(T?ut.overlayHorizontal:ut.overlayVertical),!A&&(T?ut.horizontal:ut.vertical),!A&&!r&&(T?ut.noDividerHorizontal:ut.noDividerVertical),!A&&r&&O&&!k&&ut.handleHover,!A&&r&&k&&ut.handleActive,s&&ut.disabled,d),h),...p,onKeyDown:X=>{var G;(G=p.onKeyDown)==null||G.call(p,X),E(X)},children:[a.jsx("div",{...q(ut.hitArea,T?ut.hitAreaHorizontal:ut.hitAreaVertical,M==null?T?_l.centerInline("0px"):ut.hitAreaCenteredY:T?hf.hitAreaOffsetX(M):hf.hitAreaOffsetY(M),s&&ut.disabled),onPointerDown:I,onPointerEnter:()=>j(!0),onPointerLeave:()=>{k||j(!1)}}),u??a.jsx("div",{...K(W("resize-handle-pill"),q(ut.pill,T?ut.pillHorizontal:ut.pillVertical,_==="center"?_l.centerInline("-50%"):T?hf.pillOffsetX(_==="start"?-1:1):hf.pillOffsetY(_==="start"?-1:1),i?ut.pillVisible:ut.pillHidden,O&&!k&&ut.pillHover,k&&ut.pillActive))})]})}nk.displayName="ResizeHandle";const Ma={dialog:{kVAEAm:"xixxii4",kpwlN0:"x10a8y8t",kzqmXN:"xn9wirt",kZKoxP:"x1dr59a3",ks0D6T:"x1x1rfll",kskxy:"x7ab17h",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kWkggS:"xjbqb8w",kVQacm:"xb3r6kr",kI3sdo:"x1a2a7pz",kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",$$css:!0},image:{ks0D6T:"x193iq5w",kskxy:"xmz0i5r",kVIFPx:"x19kjcj4",kfzvcC:"x47corl",k1ekBW:"x11xpdln",kIyJzY:"x13dflua x12w9bfk",kAMwcw:"x9lcvmn",$$css:!0},imageDragging:{k1ekBW:"x13b0p5u",$$css:!0},controlButton:{kMwMTN:"x9e3rv5",$$css:!0}},cO={imageTransform:e=>[{k3aq6I:e!=null?"xsqj5wx":e,$$css:!0},{"--x-transform":e??void 0}]},xf=50,C2={ArrowLeft:[xf,0],ArrowRight:[-xf,0],ArrowUp:[0,xf],ArrowDown:[0,-xf]};function qj({isOpen:e,onOpenChange:t,media:n,index:s,defaultIndex:r=0,onIndexChange:i,hasZoom:o=!1,hasAutoPlay:l=!1,xstyle:c,className:u,style:d,ref:h,onClick:f,onKeyDown:p,...g}){const b=Se(),y=x.useRef(null),m=x.useRef(null),k=x.useRef(null),w=x.useRef(null),v=s!==void 0,[j,C]=x.useState(r),$=v?s:j,T=x.useCallback(ae=>{v||C(ae),i==null||i(ae)},[v,i,C]),[A,S]=x.useState(1),[_,M]=x.useState({x:0,y:0}),[z,O]=x.useState(!1),I=x.useRef({x:0,y:0,panX:0,panY:0}),E=x.useMemo(()=>Array.isArray(n)?n:[n],[n]),N=E.length>1,R=E.length>0?E[Math.min($,E.length-1)]:null,D=((R==null?void 0:R.type)??"image")==="video",P=N&&$>0,F=N&&$<E.length-1;z6(e),x.useEffect(()=>{S(1),M({x:0,y:0})},[$,R==null?void 0:R.src]);const X=lc(),G=x.useRef($),Q=x.useRef(e);x.useEffect(()=>{const ae=G.current!==$,Tt=Q.current;if(G.current=$,Q.current=e,!ae||!e||!Tt)return;const Yt=E[Math.min($,E.length-1)],Pn=`${$+1} of ${E.length}`;X(Yt!=null&&Yt.alt?`${Yt.alt}, ${Pn}`:`Image ${Pn}`)},[$,e,X,E]),xr(()=>{const ae=y.current;ae&&(e&&!ae.open?(w.current=document.activeElement,ae.showModal()):!e&&ae.open&&(ae.close(),w.current instanceof HTMLElement&&w.current.focus()))},[e]);const ee=x.useCallback(()=>{t(!1)},[t]),Y=x.useCallback(ae=>{ae.preventDefault(),ee()},[ee]),V=x.useRef(!1),oe=x.useCallback(ae=>{if(V.current){V.current=!1;return}(ae.target===ae.currentTarget||ae.target===m.current)&&ee()},[ee]),le=x.useCallback(()=>{P&&T($-1)},[P,$,T]),me=x.useCallback(()=>{F&&T($+1)},[F,$,T]),se=x.useCallback(ae=>{!o||D||ae===A||(S(ae),M({x:0,y:0}),X(ae>1?b("@astryx.lightbox.zoomedIn"):b("@astryx.lightbox.zoomedOut")))},[o,D,A,X,b]),he=x.useCallback(()=>{se(A===1?2:1)},[se,A]),ce=x.useCallback(ae=>{if(o&&!D){if(ae.key==="+"||ae.key==="="){ae.preventDefault(),se(2);return}if(ae.key==="-"){ae.preventDefault(),se(1);return}if(A>1&&C2[ae.key]!==void 0){ae.preventDefault();const[Tt,Yt]=C2[ae.key];M(Pn=>({x:Pn.x+Tt,y:Pn.y+Yt}));return}}ae.key==="ArrowLeft"?(ae.preventDefault(),le()):ae.key==="ArrowRight"&&(ae.preventDefault(),me())},[o,D,A,se,le,me]),J=x.useCallback(ae=>{(ae.key==="Enter"||ae.key===" ")&&(ae.preventDefault(),he())},[he]),ke=x.useCallback(ae=>{A<=1||!o||(O(!0),V.current=!1,I.current={x:ae.clientX,y:ae.clientY,panX:_.x,panY:_.y})},[A,o,_]);x.useEffect(()=>{if(!z)return;const ae=Yt=>{V.current=!0;const Pn=Yt.clientX-I.current.x,kt=Yt.clientY-I.current.y;M({x:I.current.panX+Pn,y:I.current.panY+kt})},Tt=()=>{O(!1)};return window.addEventListener("pointermove",ae),window.addEventListener("pointerup",Tt),()=>{window.removeEventListener("pointermove",ae),window.removeEventListener("pointerup",Tt)}},[z]);const ue=A>1,ge=o&&!D,Re=A===1?null:`scale(${A}) translate(${_.x/A}px, ${_.y/A}px)`;return R?a.jsx("dialog",{ref:mt(h,y),onCancel:Y,onClick:ae=>{oe(ae),f==null||f(ae)},onKeyDown:ae=>{ce(ae),p==null||p(ae)},"aria-label":R.alt||b("@astryx.lightbox.mediaViewer"),...K(W("lightbox"),q(Ma.dialog,c),u,d),...g,children:a.jsxs("div",{ref:m,className:"x78zum5 xdt5ytf x6s0dn4 xl56j7k xh8yej3 x5yr21d x1n2onr6",children:[a.jsx("div",{className:"x10l6tqk xyx6v2t x1mcfs9z x1vjfegm",children:a.jsx(En,{icon:a.jsx(Te,{icon:"close",size:"sm",color:"inherit"}),label:b("@astryx.lightbox.close"),variant:"ghost",onClick:ee,xstyle:Ma.controlButton})}),N&&a.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1ybfrjj",children:a.jsx(En,{icon:a.jsx("span",{...q(_l.mirror),children:a.jsx(Te,{icon:"chevronLeft",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.previous"),variant:"ghost",isDisabled:!P,onClick:le,xstyle:Ma.controlButton})}),a.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 x193iq5w xmz0i5r xb3r6kr",children:[a.jsx("div",{ref:k,role:ge?"button":void 0,tabIndex:ge?0:void 0,"aria-pressed":ge?ue:void 0,"aria-label":ge?b("@astryx.lightbox.zoom"):void 0,...{0:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr xt0e3qv x87ps6o x2lwn1j"},8:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr xt0e3qv x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk"},4:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1huxd7x x2dt3px"},12:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1huxd7x x2dt3px"},2:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1jm3nie"},10:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1jm3nie"},6:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1jm3nie"},14:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk x1jm3nie"},1:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},9:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},5:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},13:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},3:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},11:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"},7:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j xi9pz9s"},15:{className:"x78zum5 x6s0dn4 xl56j7k xb3r6kr x87ps6o x2lwn1j x1a2a7pz x17nn4n9 x1wfwxd8 x7s97pk xi9pz9s"}}[!!ge<<3|!!(!D&&o&&!ue)<<2|!!(!D&&ue)<<1|!!(!D&&z)<<0],onDoubleClick:D?void 0:he,onKeyDown:ge?J:void 0,onPointerDown:D?void 0:ke,children:D?a.jsx("video",{src:R.src,"aria-label":R.alt,controls:!0,autoPlay:l,className:"x193iq5w xmz0i5r x19kjcj4 x1a2a7pz"}):a.jsx("img",{src:R.src,alt:R.alt,draggable:!1,...q(Ma.image,z&&Ma.imageDragging,Re!=null&&cO.imageTransform(Re))})}),R.caption&&a.jsx("div",{className:"x9e3rv5 x18juvz8 xf74fhv x2b8uid x1xye8es x18d9i69 xrrkdod xrlsmeg x2lah0s",children:R.caption})]}),N&&a.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1mcfs9z",children:a.jsx(En,{icon:a.jsx("span",{...q(_l.mirror),children:a.jsx(Te,{icon:"chevronRight",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.next"),variant:"ghost",isDisabled:!F,onClick:me,xstyle:Ma.controlButton})}),N&&E.length>1&&a.jsxs("div",{className:"x10l6tqk xyx6v2t x1ybfrjj x9e3rv5 xjm74w1 xw6l6zx x1vjfegm",children:[$+1," / ",E.length]})]})}):null}qj.displayName="Lightbox";const Gn={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"x1lsbc85",kMv6JI:"xjb2p0i",kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",k63SB2:"x1pd3egz",kybGjl:"x1hl2dhg x4ohgrr",kkrTdU:"x1ypdohk",k1ekBW:"x1mpt4pi",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},buttonReset:{kWkggS:"xjbqb8w",ksu8eU:"xng3xce",kmVPX3:"x1717udv",kfzvcC:"x67bb7w",kVAEAm:"x1n2onr6",$$css:!0},hasUnderline:{kybGjl:"x1bvjpef",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},standalone:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0}},Sp={primary:{kMwMTN:"x1tgivj0 x4z56r7",$$css:!0},secondary:{kMwMTN:"xv1l7n4 x7ruf5d",$$css:!0},disabled:{kMwMTN:"xnbbluu",$$css:!0},placeholder:{kMwMTN:"xv1l7n4",$$css:!0},accent:{kMwMTN:"xjse4m1 x17qfo7y",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}};function uO(e){e.preventDefault()}function Hj({as:e,label:t,href:n,hasUnderline:s=!1,isDisabled:r=!1,isExternalLink:i=!1,newTabLabel:o,target:l,onClick:c,tooltip:u,isStandalone:d=!1,type:h="body",size:f,weight:p,color:g="accent",display:b="inline",maxLines:y=0,children:m,rel:k,xstyle:w,className:v,style:j,ref:C,...$}){const T=Se(),A=o??T("@astryx.link.newTab"),S=eo(e),_=_6({href:n,onClick:c,isDisabled:r}),{target:M,rel:z}=j6(i?"_blank":l,k),O=_==="button"||_==="inert"&&n==null,I=a.jsxs(a.Fragment,{children:[a.jsx(re,{type:h,size:f,weight:p,color:g,display:b,maxLines:y,children:m}),i&&!O&&a.jsxs(a.Fragment,{children:[a.jsx(Te,{icon:"externalLink",size:"xsm",color:"inherit"}),a.jsx(si,{children:A})]})]});let E;return O?E=a.jsx("button",{ref:C,type:"button",onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,disabled:r,...K(W("link",{color:g}),q(Gn.base,Gn.buttonReset,Sp[g],s&&Gn.hasUnderline,d&&Gn.standalone,r&&Gn.disabled,w),v,j),...$,children:I}):r?E=a.jsx("a",{ref:C,onClick:uO,"aria-label":t||void 0,"aria-disabled":!0,tabIndex:-1,...K(W("link",{color:g}),q(Gn.base,Sp[g],s&&Gn.hasUnderline,d&&Gn.standalone,Gn.disabled,w),v,j),...$,children:I}):E=a.jsx(S,{ref:C,href:n,target:M,rel:z,onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,...K(W("link",{color:g}),q(Gn.base,Sp[g],s&&Gn.hasUnderline,d&&Gn.standalone,r&&Gn.disabled,w),v,j),...$,children:I}),u?a.jsx(to,{content:u,placement:"above",children:E}):E}Hj.displayName="Link";const dO={x1iwu4tg:"x1iwu4tg",$$css:!0},fO={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",$$css:!0}},hO={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",$$css:!0}},xO={sm:{kzqmXN:"x1td3qas",kZKoxP:"x1qx5ct2",kmVPX3:"x1i3ajwb",$$css:!0},md:{kzqmXN:"x100vrsf",kZKoxP:"xxk0z11",kmVPX3:"xfawy5m",$$css:!0}},pO={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",k3aq6I:"xbryuvx",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",k3aq6I:"xbryuvx",$$css:!0}},gO={sm:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",k3aq6I:"xv5t66b xi9aj42",$$css:!0},md:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",k3aq6I:"x15481yp x12xz5k6",$$css:!0}},mO={sm:{kAzted:"xisnujt",$$css:!0},md:{kAzted:"xjwf9q1",$$css:!0}},xn={container:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},containerSpread:{kjj79g:"x1qughib",kzqmXN:"xh8yej3",$$css:!0},switchWrapper:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},input:{kVAEAm:"x10l6tqk",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",kSiTet:"xg01cxk",kkrTdU:"x1ypdohk",kY2c9j:"x1vjfegm",$$css:!0},inputDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},inputBusy:{kfzvcC:"x47corl",$$css:!0},track:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kaIpWk:"xjspbzw",k1ekBW:"x15406qy",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kB7OPa:"x9f619",kMzoRj:"xc342km x13rsnn2",ksu8eU:"xng3xce xx61lck",kVAM5u:"x1w1tqly",$$css:!0},trackFocus:{kI3sdo:"x1a2a7pz x1gj1ihy",kInvED:"x1edzap1",$$css:!0},trackOff:{kWkggS:"xspzpui x1a8ae7b x9yvj25",$$css:!0},trackOn:{kWkggS:"x1ewilqj xcgwt1n x1jzqe4",$$css:!0},trackDisabled:{kSiTet:"xbyyjgo",kVAM5u:"xmnqt3w",$$css:!0},trackDisabledOff:{kWkggS:"xspzpui",$$css:!0},thumb:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kaIpWk:"xjspbzw",k1ekBW:"xh3q6i0",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",$$css:!0},thumbOff:{kWkggS:"x10xzikg xwvh9j7",$$css:!0},thumbOn:{kWkggS:"x10xzikg x1sir5s4",$$css:!0},labelWrapper:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kjj79g:"xl56j7k",$$css:!0}},yO={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Pj({label:e,isLabelHidden:t=!1,description:n,onChange:s,changeAction:r,isLoading:i=!1,value:o,isDisabled:l=!1,htmlName:c,disabledMessage:u,isOptional:d=!1,isRequired:h=!1,onFocus:f,onBlur:p,labelIcon:g,labelTooltip:b,labelPosition:y="end",labelSpacing:m="hug",status:k,size:w="md",width:v,xstyle:j,className:C,style:$,ref:T,...A}){const S=x.useId(),_=x.useId(),M=x.useId(),[,z]=x.useTransition(),[O,I]=x.useOptimistic(o),E=i||O!==o,N=O===!0,R=l&&!!u,L=ls({placement:"above",focusTrigger:"always",isEnabled:R}),D=[];n&&D.push(_),k!=null&&k.message&&D.push(M),R&&D.push(L.describedBy);const P=D.length>0?D.join(" "):void 0,F=a.jsxs("div",{...q(xn.switchWrapper,fO[w]),children:[a.jsx("input",{ref:mt(T,L.positionRef),id:S,type:"checkbox",role:"switch",name:l?void 0:c,checked:N,disabled:l&&!R,"aria-disabled":R?"true":void 0,required:h,onChange:G=>{if(l||E)return;const Q=G.target.checked;s==null||s(Q,G),r&&!G.defaultPrevented&&z(async()=>{I(Q),await r(Q,G)})},onFocus:f,onBlur:p,"aria-describedby":P,"aria-invalid":(k==null?void 0:k.type)==="error"?!0:void 0,"aria-busy":E||void 0,...q(xn.input,hO[w],l&&xn.inputDisabled,E&&xn.inputBusy)}),a.jsx("div",{"aria-hidden":"true",...K(W("switch",{checked:N?"checked":null,disabled:l?"disabled":null,size:w}),q(xn.track,xO[w],N?xn.trackOn:xn.trackOff,!l&&xn.trackFocus,l&&xn.trackDisabled,l&&!N&&xn.trackDisabledOff)),children:a.jsx("div",{...K(W("switch-thumb",{checked:N?"checked":null,size:w}),q(xn.thumb,N?gO[w]:pO[w],N?xn.thumbOn:xn.thumbOff)),children:E&&a.jsx(un,{size:"sm"})})}),E&&a.jsx(si,{role:"status",children:"Loading"})]}),X=a.jsx("div",{...q(xn.labelWrapper,mO[w]),children:a.jsx(t1,{label:e,inputID:S,isLabelHidden:t,isDisabled:l,isOptional:d,isRequired:h,labelIcon:g,labelTooltip:b,description:n,descriptionID:_})});return a.jsxs("div",{...K(W("switch-field",{labelPosition:y!=="end"?y:void 0,labelSpacing:m!=="hug"?m:void 0}),q(v!=null&&yO.width(v),j),C,$),...A,children:[a.jsxs("div",{ref:G=>{L.interactionRef(G)},...q(xn.container,m==="spread"&&xn.containerSpread,!l&&dO),children:[" ",y==="start"?a.jsxs(a.Fragment,{children:[X,F]}):a.jsxs(a.Fragment,{children:[F,X]})]}),(k==null?void 0:k.message)&&a.jsx("div",{className:"xtbrsbv",children:a.jsx(n1,{type:k.type,message:k.message,id:M,variant:"detached"})}),R&&L.renderTooltip(u)]})}Pj.displayName="Switch";const sk=x.createContext(null);sk.displayName="SegmentedControlContext";function kO(){const e=x.use(sk);if(e==null)throw new Error("useSegmentedControlContext must be used within SegmentedControl. Wrap your SegmentedControlItem in <SegmentedControl>.");return e}const pf={container:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"x1lsbc85","--_segmented-control-padding":"x18jk3ff",kmVPX3:"xpoxszi",kWkggS:"x17x4s8c",$$css:!0},fill:{k1xSpc:"x78zum5",kzqmXN:"xh8yej3",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},disabledWithMessage:{kSiTet:"xbyyjgo",$$css:!0}},bO={sm:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0},md:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0},lg:{"--_segmented-control-radius":"x9icjy1",kaIpWk:"x1hapoqb",$$css:!0}};function Uj({ref:e,value:t,onChange:n,label:s,size:r,layout:i="hug",isDisabled:o=!1,disabledMessage:l,children:c,xstyle:u,className:d,style:h,onKeyDown:f,onFocus:p,onBlur:g,...b}){const y=da(r,"md"),m=o&&!!l,k=ls({placement:"above",focusTrigger:"always",isEnabled:m}),{listRef:w,handleKeyDown:v,handleFocus:j}=ic({itemSelector:'[role="radio"]:not([aria-disabled="true"])',hasRovingTabIndex:!0,wrap:!0,orientation:"horizontal"}),C=M6({orientation:"horizontal",isEnabled:!o}),$=x.useCallback(S=>{f==null||f(S),!S.defaultPrevented&&(C.onKeyDown(S),v(S))},[f,C,v]),T=x.useCallback(S=>{var z;if(p==null||p(S),S.defaultPrevented||(C.onFocus(S),j(S),o)||!S.currentTarget.contains(S.relatedTarget))return;const _=(z=S.target)==null?void 0:z.closest('[role="radio"][data-value]');if(!_||_.getAttribute("aria-disabled")==="true")return;const M=_.dataset.value;M!=null&&M!==t&&n(M)},[p,C,j,o,n,t]),A=x.useMemo(()=>({value:t,onChange:n,size:y,layout:i,isDisabled:o,hasDisabledMessage:m}),[t,n,y,i,o,m]);return a.jsxs(sk,{value:A,children:[a.jsxs("div",{ref:mt(e,w,k.ref),...b,role:"radiogroup","aria-label":s,"aria-disabled":o||void 0,"aria-describedby":m?k.describedBy:void 0,onKeyDown:$,onFocus:T,onBlur:Kx(g,C.onBlur),...K(W("segmented-control",{size:y}),q(pf.container,bO[y],i==="fill"&&pf.fill,o&&(m?pf.disabledWithMessage:pf.disabled),u),d,h),children:[c,C.hintElement]}),m&&k.renderTooltip(l)]})}Uj.displayName="SegmentedControl";const za={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kg3NbH:"xrrkdod",kWkggS:"xjbqb8w",kMzoRj:"xc342km",ksu8eU:"xng3xce",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1e4wzip",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",k1ekBW:"x1vix5yk",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},hover:{kWkggS:"xe9uy6x",$$css:!0},selected:{kAXs8y:"x1kzknox",kMwMTN:"x1tgivj0 x1k5gbb1",k63SB2:"x2mo6ok",kWkggS:"x10xzikg x1jzqe4",kGVxlE:"x1i5ehqx",$$css:!0},disabled:{kkrTdU:"xt0e3qv",kMwMTN:"xnbbluu",$$css:!0},fill:{kUk6DE:"x98rzlu",kjj79g:"xl56j7k",$$css:!0},icon:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},vO={sm:{kZKoxP:"xzj98nu",kaIpWk:"xc910v0",kg3NbH:"xf314gf",kGuDYH:"x141an7d",$$css:!0},md:{kZKoxP:"x184gfjb",kaIpWk:"xc910v0",kg3NbH:"xrrkdod",$$css:!0},lg:{kZKoxP:"x1uiybsj",kaIpWk:"xc910v0",kg3NbH:"xrrkdod",$$css:!0}},wO={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function Zg({ref:e,value:t,label:n,isLabelHidden:s=!1,icon:r,isDisabled:i=!1,onClick:o,xstyle:l,...c}){const u=kO(),d=u.value===t,h=i||u.isDisabled,f=d&&(u.hasDisabledMessage??!1)&&!i,p=u.size,g=u.layout==="fill",b=Kx(o,()=>{!h&&!d&&u.onChange(t)}),y=r?a.jsx("span",{...q(za.icon,wO[p]),children:r}):null;return a.jsxs("button",{ref:e,...c,type:"button",role:"radio","aria-checked":d,"aria-disabled":h||void 0,"aria-label":s?n:void 0,"data-value":t,tabIndex:d&&!h||f?0:-1,onClick:b,...K(W("segmented-control-item",{size:p,selected:d?"selected":null,disabled:h?"disabled":null}),q(za.base,vO[p],g&&za.fill,d&&za.selected,!d&&!h&&za.hover,h&&za.disabled,l)),children:[y,!s&&a.jsx("span",{children:n})]})}Zg.displayName="SegmentedControlItem";const rk=x.createContext(null);rk.displayName="TabListContext";function jO(){const e=x.use(rk);if(e==null)throw new Error("useTabListContext must be used within TabList. Wrap your Tab/TabMenu in <TabList>.");return e}const SO="[data-tab-value],[data-tab-menu]",Cp={nav:{k1xSpc:"x78zum5",kGNEyG:"x1qjc9v5",kOIVth:"x1lsbc85",ks0D6T:"x193iq5w",k7Eaqz:"xeuugli",$$css:!0},fill:{kzqmXN:"xh8yej3",$$css:!0},divider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",kGO01o:"xy143xn","--_tab-indicator-bottom":"xficto1",$$css:!0}};function Fj({ref:e,value:t,onChange:n,size:s,layout:r="hug",hasDivider:i=!1,xstyle:o,className:l,style:c,children:u,onKeyDown:d,onFocus:h,onBlur:f,"aria-label":p,"aria-orientation":g,[Bh]:b,...y}){const m=Se(),k=p??m("@astryx.tabList.label"),w=da(s,"md"),{listRef:v,handleKeyDown:j,handleFocus:C}=ic({itemSelector:SO,orientation:"both",hasRovingTabIndex:!0}),{hintElement:$,onKeyDown:T,onFocus:A,onBlur:S}=M6(),_=x.useMemo(()=>({value:t,onChange:n,size:w,layout:r}),[t,n,w,r]),M=x.useCallback(I=>{d==null||d(I),!I.defaultPrevented&&(T(I),j(I))},[d,T,j]),z=x.useCallback(I=>{h==null||h(I),!I.defaultPrevented&&(A(I),C(I))},[h,A,C]),O=x.useCallback(I=>{f==null||f(I),!I.defaultPrevented&&S(I)},[f,S]);return a.jsx(rk,{value:_,children:a.jsxs("nav",{ref:mt(e,v),...y,"aria-label":k,onKeyDown:M,onFocus:z,onBlur:O,[Bh]:"",...K(W("tab-list",{size:w}),q(Cp.nav,r==="fill"&&Cp.fill,i&&Cp.divider,o),l,c),children:[u,$]})})}Fj.displayName="TabList";const CO={x1u3b27q:"x1u3b27q",$$css:!0},gf={base:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kOIVth:"xzye2dw",kg3NbH:"xrrkdod",kWkggS:"xjbqb8w",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"xh6dtrn",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",kLWn49:"x1kq96og",k63SB2:"x1sodnla",kMwMTN:"xv1l7n4",kkrTdU:"x1ypdohk",kybGjl:"x1hl2dhg",khDVqt:"xuxw1ft",k1ekBW:"xt3l3uh",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},hoverBg:{kVAEAm:"x10l6tqk",kpwlN0:"x10a8y8t",kogj98:"x1bpp3o7",kzqmXN:"xh8yej3",kaIpWk:"xh6dtrn",kfzvcC:"x47corl",kWkggS:"xjbqb8w x1a1zr74",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0},selected:{kMwMTN:"x1tgivj0",k63SB2:"x2mo6ok",$$css:!0},icon:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},$O={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},EO={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},TO={fill:{kUk6DE:"x98rzlu",kjj79g:"xl56j7k",$$css:!0}},NO={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function Yg({as:e,ref:t,value:n,label:s,isLabelHidden:r=!1,href:i,icon:o,selectedIcon:l,endContent:c,xstyle:u,className:d,style:h,...f}){const p=jO(),g=eo(e),b=p.value===n,y=p.size,m=p.layout==="fill",k=b&&l?l:o,w=!r&&s!=="",v=x.useCallback(()=>{p.onChange(n)},[p,n]),j=k?a.jsx("span",{...q(gf.icon,NO[y]),children:k}):null,C={...f,...r?{"aria-label":s}:{},[Bh]:"","data-tab-value":n,"aria-current":b?"page":void 0,tabIndex:b?0:-1,...K(W("tab",{selected:b?"selected":null}),q(gf.base,$O[y],b&&gf.selected,m&&TO.fill,CO,u),d,h)},$=a.jsx("span",{"aria-hidden":"true",...q(gf.hoverBg,EO[y])}),T=a.jsx("span",{...K(W("tab-indicator",{selected:b?"selected":null}),{0:{className:"x10l6tqk xyi47jn x1ybfrjj x1mcfs9z x36qwtl xjspbzw x47corl xnpjden xuedmi6 xlr8y92 xjbqb8w xg01cxk"},1:{className:"x10l6tqk xyi47jn x1ybfrjj x1mcfs9z x36qwtl xjspbzw x47corl xnpjden xuedmi6 xlr8y92 x1ewilqj x1hc1fzr"}}[!!b<<0])}),A=w?a.jsxs("span",{className:"xwz0xwf",children:[a.jsx("span",{className:"x1agbcgv xcrlgei",children:s}),a.jsx("span",{"aria-hidden":"true",className:"x1agbcgv xcrlgei xlshs6z x47corl x2mo6ok",children:s})]}):null,S=c?a.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:c}):null;return i!=null?a.jsxs(g,{ref:t,href:i,onClick:v,...C,children:[$,j,A,S,T]}):a.jsxs("button",{ref:t,type:"button",onClick:v,...C,children:[$,j,A,S,T]})}Yg.displayName="Tab";const AO=.8,fo={wrapper:{kY2c9j:"x1vjfegm",k1xSpc:"x1lliihq",kmVPX3:"x1717udv","--_textarea-inline-padding":"x1kdpo6e",$$css:!0},textarea:{k1xSpc:"x1lliihq",kzqmXN:"xh8yej3",kB7OPa:"x9f619",k7Eaqz:"xeuugli",kMzoRj:"xc342km",ksu8eU:"xng3xce",k8WAf4:"xu0wf1k",kg3NbH:"x1w6f3ag",kMv6JI:"x9ynric",kGuDYH:"xjm74w1 x6pjikd",kLWn49:"xw6l6zx",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w",kI3sdo:"x1a2a7pz",k8Qsv1:"xeyghm5",kHenm0:"x288g5",$$css:!0},textareaDisabled:{kkrTdU:"x1h6gzvc",$$css:!0},textareaWithStartIcon:{kZCmMZ:"x1b6te9z",$$css:!0},textareaWithStatus:{kwRFfy:"xp2dy4z",$$css:!0},textareaWithBusyStatus:{kwRFfy:"x1g2apga",$$css:!0},textareaWithCounter:{kGO01o:"xekm6fs",$$css:!0}},MO={sm:{$$css:!0},md:{$$css:!0},lg:{k8WAf4:"xce4md1",$$css:!0}};function Gj({label:e,isLabelHidden:t=!1,description:n,isOptional:s=!1,isRequired:r=!1,onChange:i,changeAction:o,isLoading:l=!1,value:c,placeholder:u,rows:d=3,isDisabled:h=!1,disabledMessage:f,status:p,statusVariant:g="attached",labelTooltip:b,startIcon:y,hasSpellCheck:m=!0,onPaste:k,maxLength:w,hasAutoFocus:v=!1,size:j,htmlName:C,onFocus:$,onBlur:T,width:A,xstyle:S,className:_,style:M,ref:z,...O}){const I=da(j,"md"),E=Se(),N=lc(),R=x.useId(),L=x.useId(),D=x.useId(),P=x.useId(),F=x.useRef(null),X=x.useRef(null),G=x.useRef(null),[,Q]=x.useTransition(),[ee,Y]=x.useOptimistic(c),V=l||ee!==c,oe=h&&!!f,le=ls({placement:"above",focusTrigger:"always",isEnabled:oe}),{statusIcon:me,describedBy:se}=I6({status:p,statusVariant:g}),he=[n?L:null,g!=="tooltip"&&(p!=null&&p.message)?D:null,se,w!=null?P:null,oe?le.describedBy:null].filter(Boolean).join(" ")||void 0,ce=x.useCallback(Re=>{if(w==null)return;const ae=Re>w?"over":Re>=w*AO?"near":"under";ae!==G.current&&(G.current=ae,ae==="over"?N(E("@astryx.textArea.charactersOverLimit",{count:Re-w}),"assertive"):ae==="near"&&N(E("@astryx.textArea.charactersRemaining",{count:w-Re})))},[N,E,w]),J=Re=>{if(h)return;const ae=Re.target.value;ce(ae.length),i==null||i(ae,Re),o&&!Re.defaultPrevented&&Q(async()=>{Y(ae),await o(ae,Re)})},ke=h||V,{onClick:ue,onMouseUp:ge}=Ty({containerRef:X,inputRef:F,disabled:ke});return a.jsxs(cc,{label:e,isLabelHidden:t,description:n,inputID:R,descriptionID:n?L:void 0,isOptional:s,isRequired:r,isDisabled:h,status:p?{type:p.type,message:p.message,messageID:p.message?D:void 0}:void 0,statusVariant:g,labelTooltip:b,width:A,children:[a.jsxs("div",{ref:Re=>{X.current=Re,le.ref(Re)},onClick:ue,onMouseUp:ge,...K(W("textarea",{size:I,status:(p==null?void 0:p.type)??null}),q(Ol.base,fo.wrapper,h&&Ol.disabled,p&&Oy[p.type],p&&!h&&Dy[p.type],p&&Q6[p.type],S),_,M),children:[y&&a.jsx("span",{className:"x10l6tqk xctzyg x1kiyvbf x47corl x78zum5",children:yr(y,{size:"sm",color:"secondary"})}),a.jsx("textarea",{...O,ref:mt(z,F),id:R,name:C,value:ee,onChange:J,onPaste:k,onFocus:$,onBlur:T,placeholder:u,rows:d,disabled:h&&!oe,"aria-disabled":oe?"true":void 0,readOnly:oe||void 0,spellCheck:m,autoFocus:v,"data-autofocus":v||void 0,"aria-describedby":he,"aria-required":r&&!s?"true":void 0,"aria-invalid":(p==null?void 0:p.type)==="error"||w!=null&&ee.length>w?"true":void 0,"aria-busy":V||void 0,...q(fo.textarea,MO[I],h&&fo.textareaDisabled,!!y&&fo.textareaWithStartIcon,(p||V)&&fo.textareaWithStatus,V&&!!me&&fo.textareaWithBusyStatus,w!=null&&fo.textareaWithCounter)}),(V||me)&&a.jsxs("span",{className:"x10l6tqk xctzyg x13oyzgk x47corl x78zum5 x6s0dn4 x1txdalj",children:[V&&a.jsx(un,{size:"sm"}),me]}),w!=null&&a.jsxs("div",{id:P,...{0:{className:"x10l6tqk x112dmjn x13oyzgk x47corl x78zum5 x6s0dn4 xzye2dw x9ynric x141an7d x1ltkj2j xv1l7n4"},1:{className:"x10l6tqk x112dmjn x13oyzgk x47corl x78zum5 x6s0dn4 xzye2dw x9ynric x141an7d x1ltkj2j xjt36v0"}}[(ee.length>w)<<0],children:[ee.length>w&&a.jsx(Te,{icon:"warning",size:"sm"}),ee.length,"/",w]})]}),oe&&le.renderTooltip(f)]})}Gj.displayName="TextArea";function Vj({ref:e,href:t,isDisabled:n,LinkComponent:s,linkStyleProps:r,labelContent:i,icon:o,endContent:l,removeButton:c,...u}){const d=x.useRef(null),h=x.useRef(null),{onClick:f,onMouseUp:p}=Sy({containerRef:d,interactiveRef:h,href:t,disabled:n});return a.jsxs("span",{ref:mt(e,d),onClick:n?void 0:f,onMouseUp:n?void 0:p,...u,children:[o,a.jsx(s,{ref:h,href:t,"aria-disabled":n||void 0,...r,children:i}),l,c]})}Vj.displayName="TokenLink";const Vn={base:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",k8WAf4:"xt970qd",kMzoRj:"xc342km",ksu8eU:"xng3xce",kaIpWk:"xx3sua9",kMv6JI:"xjb2p0i",kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",k63SB2:"x1e4wzip",khDVqt:"xuxw1ft",kybGjl:"x1hl2dhg",ks0D6T:"x193iq5w",kVQacm:"xb3r6kr",$$css:!0},interactive:{kkrTdU:"x1ypdohk",k1ekBW:"x12qzo2w",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",kKwaWg:"x1ilzqfv xq8i9tn",kI3sdo:"x17nn4n9",kInvED:"x1wfwxd8 x7s97pk",$$css:!0},disabled:{kkrTdU:"x1h6gzvc",kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0},focusVisibleOutline:{kI3sdo:"x1irc7jg",kInvED:"x1wfwxd8 xdjuwb3",$$css:!0}},mf={sm:{kZKoxP:"xzydfjl",kGuDYH:"x141an7d",kg3NbH:"xf314gf",$$css:!0},md:{kZKoxP:"xrmxcn7",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"x102lyln",kg3NbH:"xf314gf",$$css:!0}},yf={default:{kWkggS:"x17x4s8c",kMwMTN:"x1tgivj0",$$css:!0},red:{kWkggS:"x1cibrc5",kMwMTN:"x1joocv1",$$css:!0},orange:{kWkggS:"x1e9xt6e",kMwMTN:"xm47u9q",$$css:!0},yellow:{kWkggS:"x1bo7t0x",kMwMTN:"xdhq94a",$$css:!0},green:{kWkggS:"x1sqjeoo",kMwMTN:"xltfdvo",$$css:!0},teal:{kWkggS:"x1jtji5o",kMwMTN:"x9x0lbs",$$css:!0},cyan:{kWkggS:"x1rgj867",kMwMTN:"x1txnczv",$$css:!0},blue:{kWkggS:"x1o0wnni",kMwMTN:"x1vvqiwl",$$css:!0},purple:{kWkggS:"x16i6n6f",kMwMTN:"x1m9wyeb",$$css:!0},pink:{kWkggS:"xnpoty2",kMwMTN:"xiuofww",$$css:!0},gray:{kWkggS:"xspzpui",kMwMTN:"xru1t7f",$$css:!0}};function Nn({label:e,size:t="md",color:n="default",icon:s,isDisabled:r=!1,onRemove:i,onClick:o,href:l,description:c,endContent:u,isLabelHidden:d=!1,xstyle:h,className:f,style:p,"data-testid":g,ref:b}){const y=Se(),m=eo(),k=_6({href:l,onClick:o,isDisabled:r}),w=o??(k==="button"?()=>{}:null),v=i!=null&&a.jsx("button",{type:"button","aria-label":y("@astryx.token.remove",{label:e}),onClick:$=>{$.stopPropagation(),i($)},disabled:r,className:"x3nfvp2 x6s0dn4 xl56j7k x1n2onr6 x1717udv xkd40ry x1ypdohk xjspbzw x1kky2od xlup9mm x1heor9g x17nn4n9 x1s928wv x1j6awrg x1xsm0q9",children:a.jsx(Te,{icon:"close",size:"xsm",color:"inherit"})}),j=a.jsxs(a.Fragment,{children:[s,a.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e}),u,v]}),C={"data-testid":g,"aria-label":d?e:void 0,"aria-description":c};if(k==="link")return i==null?a.jsx(m,{ref:b,href:l,"aria-disabled":r||void 0,...C,...K(W("token",{color:n,size:t}),q(Vn.base,mf[t],yf[n],Vn.interactive,r&&Vn.disabled,h),f,p),children:j}):a.jsx(Vj,{ref:b,href:l,isDisabled:r,LinkComponent:m,icon:s,endContent:u,removeButton:v,linkStyleProps:{className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli"},labelContent:a.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e}),...C,...K(W("token",{color:n,size:t}),q(Vn.base,mf[t],yf[n],Vn.interactive,Vn.focusVisibleOutline,r&&Vn.disabled,h),f,p)});if(w!=null){const $=T=>{T.target.closest("button, a")||w(T)};return a.jsxs("span",{ref:b,onClick:r?void 0:$,...C,...K(W("token",{color:n,size:t}),q(Vn.base,mf[t],yf[n],Vn.interactive,Vn.focusVisibleOutline,r&&Vn.disabled,h),f,p),children:[s,a.jsx("button",{type:"button",onClick:w,disabled:r,className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli",children:a.jsx("span",{...{0:{className:"xb3r6kr xlyipyv xuxw1ft xeuugli"},1:{className:"xlyipyv xeuugli x10l6tqk x1i1rx1s xjm9jq1 x1717udv xkdpibf xb3r6kr x1hyvwdk xuxw1ft xc342km"}}[!!d<<0],children:e})}),u,v]})}return a.jsx("span",{ref:b,...C,...K(W("token",{color:n,size:t}),q(Vn.base,mf[t],yf[n],r&&Vn.disabled,h),f,p),children:j})}Nn.displayName="Token";const zO=1e3,RO=100,$2={root:{kWkggS:"xprdx6m x1j0df82 x1o55y2u",kSiTet:"xvpkmg4 x1tbh5bv",$$css:!0},animate:{kILWW9:"xpz12be",k44tkh:"xqgcaz",ko0y90:"xa4qsjk",kKVMdj:"xeuoslp x1aquc0h",kyAemX:"x193epu2",$$css:!0}},IO={0:{kaIpWk:"xwksslw",$$css:!0},1:{kaIpWk:"xx3sua9",$$css:!0},2:{kaIpWk:"xh6dtrn",$$css:!0},3:{kaIpWk:"x1hviunn",$$css:!0},4:{kaIpWk:"x1hviunn",$$css:!0},none:{kaIpWk:"x2u8bby",$$css:!0},rounded:{kaIpWk:"xjspbzw",$$css:!0}},_O={kKxzle:"xvo38ju",$$css:!0},E2={animationDelay:e=>[_O,{"--x-animationDelay":(t=>typeof t=="number"?t+"ms":t??void 0)(`${zO+RO*e}ms`)}],dimensions:(e,t)=>[{kzqmXN:(typeof e=="number"?`${e}px`:e)!=null?"x5lhr3w":typeof e=="number"?`${e}px`:e,kZKoxP:(typeof t=="number"?`${t}px`:t)!=null?"x16ye13r":typeof t=="number"?`${t}px`:t,$$css:!0},{"--x-width":(n=>typeof n=="number"?n+"px":n??void 0)(typeof e=="number"?`${e}px`:e),"--x-height":(n=>typeof n=="number"?n+"px":n??void 0)(typeof t=="number"?`${t}px`:t)}]};function ik({width:e="100%",height:t="100%",radius:n=3,index:s=0,"data-testid":r,xstyle:i,className:o,style:l,ref:c,...u}){return a.jsx("div",{ref:c,"aria-hidden":"true","data-testid":r,...K(W("skeleton"),q($2.root,$2.animate,IO[n],E2.dimensions(e,t),E2.animationDelay(s),i),o,l),...u})}ik.displayName="Skeleton";const $p={root:{kVAEAm:"x1n2onr6",k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kzqmXN:"x1fu8urw",kmuXW:"x2lah0s",kHBbk8:"xc8icb0",$$css:!0},removeButtonOverrides:{"--_button-radius":"xh8ntw8",kZKoxP:"x1qx5ct2",k7Eaqz:"xt4ypqs",kWkggS:"x1u4601x",kMwMTN:"x9e3rv5",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function LO(){return a.jsx("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:a.jsx("path",{d:"M21 19V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2M8.5 13.5l2.5 3 3.5-4.5 4.5 6H5l3.5-5.5z"})})}function Vh({src:e,alt:t,label:n,onRemove:s,onClick:r,isLoading:i=!1,isDisabled:o=!1,showRemoveOn:l="hover",xstyle:c,className:u,style:d,"data-testid":h,ref:f,...p}){const g=Se(),[b,y]=x.useState(void 0),m=e!=null,k=m&&b===e,w=i&&!m,v=m&&!w&&!k,j=i&&m,C=!i&&!m||k,$=r!=null&&!o&&!i,T=s!=null&&!o,A=T&&l==="hover",{getContainerProps:S,getContentRevealProps:_}=uR({isEnabled:A}),M=n&&t?`${n} — ${t}`:n??t??g("@astryx.thumbnail.fallbackName"),z=!t,O=t!=null||n!=null||p["aria-label"]!=null||p["aria-labelledby"]!=null;oc("Thumbnail",'`src` is set without `alt` or `label`. The image is treated as decorative and hidden from assistive technology, and the thumbnail falls back to a generic "thumbnail" name. Pass `alt` to describe the image content, or `label` (file name) to name the thumbnail.',m&&!O);const I=a.jsxs(a.Fragment,{children:[v&&a.jsx("img",{src:e,alt:t??"",role:z?"presentation":void 0,"aria-hidden":z||void 0,onError:()=>y(e),className:"xh8yej3 x5yr21d xl1xv1r x1lliihq"}),w&&a.jsx(ik,{radius:2}),C&&a.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xv9yike",children:a.jsx(LO,{})})]}),E=T?a.jsx("div",{...K({className:"x10l6tqk x8d4r5l xy3asu9 x1vjfegm x14ju556"},A?_({isLayoutPreserved:!0}):{}),children:a.jsx(ne,{icon:a.jsx(Te,{icon:"close",size:"xsm"}),label:g("@astryx.thumbnail.remove",{accessibleName:M}),variant:"secondary",size:"sm",isIconOnly:!0,onClick:R=>{R.stopPropagation(),s(R)},xstyle:$p.removeButtonOverrides})}):null,N=a.jsx("div",{ref:f,"data-testid":h,role:"group","aria-label":M,...K(W("thumbnail"),q($p.root,o&&$p.disabled,c),u,d),...p,children:a.jsxs("div",{...K({0:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c"},4:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3"},2:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig"},6:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig"},1:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c xi14tyy"},5:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 xi14tyy"},3:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig xi14tyy"},7:{className:"x1n2onr6 xh8yej3 x1plog1 xh6dtrn xb3r6kr x17x4s8c x1ypdohk x1irc7jg x1wfwxd8 xdjuwb3 x1s928wv x1j6awrg xarstr8 x1k48kgn x2q1x1w x1ywzrc5 x97pup0 x1dlmc9c xyhc2n1 x1k7wiig xi14tyy"}}[!!$<<2|!!$<<1|!!$<<0],A?S():{}),children:[$?a.jsx("button",{type:"button",onClick:r,"aria-label":g("@astryx.thumbnail.open",{accessibleName:M}),className:"x1ypdohk x1lliihq xh8yej3 x5yr21d xh6dtrn xb3r6kr",children:I}):I,v&&a.jsx("div",{className:"x10l6tqk x10a8y8t x1pjcqnp x1er153n x47corl"}),j&&a.jsx("div",{className:"x10l6tqk x10a8y8t x78zum5 x6s0dn4 xl56j7k x1u4601x x1pjcqnp x1vjfegm x14ju556",children:a.jsx(un,{size:"sm",shade:"onMedia"})}),E]})});return n!=null?a.jsx(to,{content:n,children:N}):N}Vh.displayName="Thumbnail";const Bc={dropdown:{kB7OPa:"x9f619",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kOIVth:"x1lsbc85",kskxy:"xuyqlj2",kORKVm:"x1odjw0f","--_dropdown-menu-radius":"x1fcsqxe","--_dropdown-menu-padding":"xgory14",kmVPX3:"x9epnlk",kaIpWk:"x1n97fys",kSiTet:"x1hc1fzr",k1ekBW:"x19991ni",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0},popover:{k7Eaqz:"xrzjruh",$$css:!0},popoverBlockGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0},popoverInlineGap:{keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[{k7Eaqz:(typeof e=="number"?`${e}px`:e)!=null?"xkj4a21":typeof e=="number"?`${e}px`:e,$$css:!0},{"--x-minWidth":(t=>typeof t=="number"?t+"px":t??void 0)(typeof e=="number"?`${e}px`:e)}]},OO="@astryx.dropdownMenu.label";function uc({button:e,isMenuOpen:t,onOpenChange:n,menuWidth:s,onClick:r,hasChevron:i=!0,placement:o="below",alignment:l="start",className:c,style:u,xstyle:d,"data-testid":h,...f}){const p=Se(),g=e??{label:p(OO)},b=("items"in f?f.items:void 0)??[],y=f.children,{items:m,children:k,...w}=f,v=x.useId(),j=g.size??"md",C=x.useRef(null),[$,T]=x.useState(!1),A=t!==void 0,S=A?t:$,_=x.useRef(0),M=x.useCallback(()=>{var ce;_.current=Date.now(),n==null||n(!1),A||T(!1),(ce=C.current)==null||ce.focus()},[A,n]),z=x.useRef(!1),O=x.useCallback(()=>{n==null||n(!0),A||T(!0)},[A,n]),I=kd({onHide:M,onShow:O,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),E=x.useCallback(()=>{I.hide()},[I]),{listRef:N,handleKeyDown:R,focusFirst:L,focusItem:D,ownsEvent:P,getItems:F}=ic({itemSelector:Cy,boundarySelector:$y,wrap:!1,onEscape:E}),X=jy({getItemLabels:()=>F().map(ce=>ce.textContent),onMatch:D,getCurrentIndex:()=>F().findIndex(ce=>ce===document.activeElement||ce.contains(document.activeElement))});x.useEffect(()=>{A&&(t&&!I.isOpen?(z.current=!0,I.show()):!t&&I.isOpen&&I.hide())},[t,A,I]),x.useEffect(()=>{!I.isOpen||!z.current||(z.current=!1,requestAnimationFrame(()=>L()))},[I.isOpen,L]);const G=x.useCallback(ce=>{if(P(ce)){if(ce.key==="Enter"||ce.key===" "){ce.preventDefault();const J=document.activeElement;J&&e1.has(J.getAttribute("role")??"")&&J.click();return}if(ce.key==="Tab"){E();return}if(X.onKeyDown(ce)){ce.preventDefault();return}R(ce)}},[R,E,X,P]),Q=x.useCallback(()=>{z.current=!0,I.show()},[I]),ee=x.useCallback(()=>{Date.now()-_.current<50||(r==null||r(),A?n==null||n(!t):I.isOpen?I.hide():Q())},[r,A,n,t,I,Q]),Y=x.useCallback(ce=>{I.isOpen||(ce.key==="ArrowDown"||ce.key==="Enter"||ce.key===" ")&&(ce.preventDefault(),Q())},[I.isOpen,Q]),V=g.isIconOnly===!0,oe=g.endContent??(i&&!V?a.jsx(Te,{icon:"chevronDown",size:"sm",color:"inherit"}):void 0),le=s?Bc.popoverCustomWidth(s):Bc.popover,me=o==="above"||o==="below"?Bc.popoverBlockGap:Bc.popoverInlineGap,se=x.useMemo(()=>({closeMenu:E,menuSize:j}),[E,j]),he=f.items!==void 0?Ey(b):y;return a.jsxs(a.Fragment,{children:[a.jsx(ne,{...g,ref:ce=>{C.current=ce,I.triggerRef(ce);const J=g.ref;typeof J=="function"?J(ce):J&&(J.current=ce)},tooltip:S?void 0:g.tooltip,endContent:oe,onClick:ee,onKeyDown:Y,"aria-haspopup":"menu","aria-expanded":S,"aria-controls":v,"data-testid":h}),I.render(a.jsx("div",{...w,ref:N,id:v,role:"menu","aria-label":g.label,onKeyDown:G,...K(W("dropdown-menu"),q(Bc.dropdown,d),c,u),children:a.jsx(bd,{value:se,children:he})}),{placement:o,alignment:l,xstyle:[le,me,Ur[o]]})]})}uc.displayName="DropdownMenu";function c1({items:e,label:t,variant:n="ghost",size:s,icon:r,isDisabled:i=!1,isMenuOpen:o,onOpenChange:l,xstyle:c,className:u,style:d,"data-testid":h,ref:f}){const p=Se(),g=t??p("@astryx.moreMenu.label"),b=da(s,"md"),y=Ll("moreHorizontal");return a.jsx(uc,{className:u?`${zg("more-menu")} ${u}`:zg("more-menu"),xstyle:c,style:d,isMenuOpen:o,onOpenChange:l,button:{label:g,icon:r??y,variant:n,size:b,isDisabled:i,tooltip:g,isIconOnly:!0,ref:f},items:e,hasChevron:!1,"data-testid":h})}c1.displayName="MoreMenu";const Er={dialog:{kVAEAm:"xixxii4",kogj98:"x1ghz6dp",kmVPX3:"x1717udv",ks0D6T:"x1x1rfll",kskxy:"x7ab17h",kpwlN0:"x10a8y8t",kzqmXN:"xn9wirt",kZKoxP:"xtdtrs8",kWkggS:"xjbqb8w",kVQacm:"xb3r6kr",kZeWKH:"xish69e",kFalU9:"x5ve5x3",kI3sdo:"x1a2a7pz",k1xSpc:"x1s85apg",$$css:!0},open:{k1xSpc:"x78zum5",$$css:!0},backdrop:{kGyWv1:"xnixb3f",kba3nw:"x1abwkk1",k5sjJv:"xph5o2a",kND0Po:"x167zut7",k9an0g:"xft5bk6",kb4ib:"x15h3t91",kA5Tbj:"x1viac0w",$$css:!0},backdropOpen:{k5sjJv:"xb3n6bw",$$css:!0},drawer:{kVAEAm:"x10l6tqk",k87sOh:"x13vifvy",krVfgx:"x1ey2m1c",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kWkggS:"x10xzikg",kB7OPa:"x9f619",kVQacm:"xb3r6kr",k1ekBW:"x11xpdln",kIyJzY:"x80gvsz",kAMwcw:"xlr8y92",kI3sdo:"x1a2a7pz",k6CgDc:"xzg1mie",$$css:!0},drawerStart:{kLqNvP:"x1o0tod",ke9TFa:"xw8tdv1",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",k3aq6I:"x5i6ehr xttggg",$$css:!0},drawerStartOpen:{k3aq6I:"xbryuvx",$$css:!0},drawerEnd:{kt4wiu:"xtijo5x",k2ei4v:"xgbv0en",kVhnKS:"x1t7ytsu",kGJrpR:"x1j92z86",k3aq6I:"xumwmo6 x1df3fe5",$$css:!0},drawerEndOpen:{k3aq6I:"xbryuvx",$$css:!0}},DO={kzqmXN:"xn9wirt",ks0D6T:"xf68679",$$css:!0},BO={width:e=>[DO,{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`${e}px`)}]};function ok({isOpen:e,onOpenChange:t,children:n,header:s,width:r=320,side:i="auto",label:o,"data-testid":l,xstyle:c,className:u,style:d,onClick:h,ref:f,...p}){const g=Se(),b=Jx(),y=e??b.isMobileNavOpen,m=x.useId(),k=b.mobileNavId||m,w=x.useMemo(()=>t??(_=>{_?b.openMobileNav():b.closeMobileNav()}),[t,b]),v=x.useRef(null),j=x.useRef(null),[C,$]=x.useState(i==="auto"?"end":i);x.useEffect(()=>{const _=v.current;if(_){if(j.current&&(clearTimeout(j.current),j.current=null),y){if(i==="auto"){const M=document.activeElement;if(M&&M!==document.body){const z=M.getBoundingClientRect(),O=z.left+z.width/2;$(O<window.innerWidth/2?"start":"end")}}else $(i);_.open||_.showModal(),document.documentElement.style.overflow="clip"}else if(_.open){document.documentElement.style.overflow="";const M=window.matchMedia("(prefers-reduced-motion: reduce)").matches?10:250;j.current=setTimeout(()=>{_.close()},M)}return()=>{j.current&&(clearTimeout(j.current),j.current=null),document.documentElement.style.overflow="",_.open&&_.close()}}},[y,i]);const T=x.useCallback(_=>{_.preventDefault(),w(!1)},[w]),A=x.useCallback(_=>{_.target===_.currentTarget&&w(!1)},[w]),S=C==="start";return a.jsx("dialog",{ref:mt(f,v),id:k,...K(W("mobile-nav",{side:C}),q(Er.dialog,y&&Er.open,Er.backdrop,y&&Er.backdropOpen,c),u,d),...p,"data-testid":l,"aria-label":o??(typeof s=="string"?s:g("@astryx.mobileNav.navigation")),onClick:Kx(h,A),onCancel:T,children:a.jsxs("div",{tabIndex:-1,...q(Er.drawer,BO.width(r),S&&Er.drawerStart,S&&y&&Er.drawerStartOpen,!S&&Er.drawerEnd,!S&&y&&Er.drawerEndOpen),children:[a.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1qughib x1k15mir xf314gf x2lah0s x92x3c3 x1q0q8m5 xw8gpjh"},1:{className:"x78zum5 x6s0dn4 x1k15mir xf314gf x2lah0s x92x3c3 x1q0q8m5 xw8gpjh x13a6bvl"}}[!s<<0],children:[typeof s=="string"?a.jsx("span",{className:"x11g1kdw",children:a.jsx(wr,{level:2,children:s})}):s??null,a.jsx(ne,{variant:"ghost",label:g("@astryx.mobileNav.closeNavigation"),icon:a.jsx(Te,{icon:"close",color:"inherit"}),onClick:()=>w(!1),isIconOnly:!0})]}),a.jsx("div",{className:"x98rzlu x1odjw0f x6ikm8r xish69e xx69xxh xf314gf xce4md1",children:n})]})})}ok.displayName="MobileNav";const hi={item:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",kzqmXN:"xh8yej3",kZKoxP:"x1ueg155",kg3NbH:"xf314gf",k8WAf4:"xt970qd",kaIpWk:"xh6dtrn",kMzoRj:"xc342km",ksu8eU:"xng3xce",kWkggS:"xjbqb8w",kMwMTN:"x1tgivj0",kybGjl:"x1hl2dhg",kkrTdU:"x1ypdohk",kMv6JI:"xjb2p0i",kGuDYH:"xcr08ib",k63SB2:"x1sodnla",kLWn49:"x1kq96og",k9WMMc:"x1yc453h",kB7OPa:"x9f619",kHE3J0:"xe9uy6x",kSReZ0:"xyxi2l3",$$css:!0},selected:{kWkggS:"x17x4s8c",k63SB2:"x1e4wzip",kHE3J0:"x1sua13m",kSReZ0:"xjtnuge",$$css:!0},disabled:{kMwMTN:"xnbbluu",kkrTdU:"x1h6gzvc",kfzvcC:"x47corl",$$css:!0},sm:{kZKoxP:"x6k0iem",kg3NbH:"x7a5moj",$$css:!0},md:{kZKoxP:"x1ueg155",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"xssyfek",kg3NbH:"xf314gf",$$css:!0}},u1=x.createContext({isCollapsed:!1,toggle:()=>{},isCollapsible:!1});u1.displayName="SideNavCollapseContext";function ak(){return x.use(u1)}function Wj({ref:e,handleRef:t,label:n,children:s,onClick:r,...i}){const o=Se(),l=Ll("chevronLeft"),{isCollapsed:c,toggle:u,isCollapsible:d}=qO(t),{isMobile:h}=Jx();return!d||h?null:a.jsx(ne,{ref:e,label:n??o(c?"@astryx.sideNavCollapseButton.expandSidebar":"@astryx.sideNavCollapseButton.collapseSidebar"),variant:"ghost",...i,onClick:Kx(r,u),icon:s??a.jsx("span",{...q(_l.mirror),children:a.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92"},1:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92 x19jd1h0"}}[!!c<<0],children:l})}),isIconOnly:!0})}Wj.displayName="SideNavCollapseButton";function qO(e){var s;const t=ak();if(e==null)return t;const n=((s=e.current)==null?void 0:s.getCollapseState())??null;return{isCollapsed:(n==null?void 0:n.isCollapsed)??!1,toggle:()=>{var r,i;(i=(r=e.current)==null?void 0:r.getCollapseState())==null||i.toggle()},isCollapsible:(n==null?void 0:n.isCollapsible)??!0}}const HO=160,Ep={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kZKoxP:"x5yr21d",kzqmXN:"x1hfn5x7",kWkggS:"xgcd1z6",kB7OPa:"x9f619",kVQacm:"xb3r6kr",$$css:!0},rootCollapsed:{kzqmXN:"xhgvbfk",$$css:!0},topbar:{k1xSpc:"x78zum5",kXwgrk:"x1q0g3np",kGNEyG:"x6s0dn4",kjj79g:"x1qughib",kZKoxP:"xsdox4t",kzqmXN:"xh8yej3",kWkggS:"xgcd1z6",kB7OPa:"x9f619",kVQacm:"xb3r6kr",$$css:!0}};function lk({header:e,topContent:t,children:n,footer:s,footerIcons:r,collapsible:i=!1,resizable:o=!1,xstyle:l,className:c,style:u,"data-testid":d,ref:h,handleRef:f,...p}){const g=Se(),b=typeof i=="object"?i:{},y=!!i,m=b.hasButton??!0,k=b.defaultIsCollapsed??!1,w=b.isCollapsed,v=b.onCollapsedChange,j=typeof o=="object"?o:{},C=!!o,$=w!==void 0,[T,A]=x.useState(k),S=$?w:T,_=x.useRef(null),M=x.useRef({isCollapsed:S,toggle:()=>{},isCollapsible:y}),z=x.useCallback(ee=>{$||A(ee),v==null||v(ee)},[$,v]),O=Bj({defaultSize:j.defaultWidth??260,minSizePx:j.minWidth??180,maxSizePx:j.maxWidth??480,collapsible:y,collapsedSize:HO,autoSaveId:j.autoSaveId,onSizeChange:j.onWidthChange,onCollapseChange:y?z:void 0}),I=x.useCallback(()=>{const ee=!S;M.current={...M.current,isCollapsed:ee},z(ee),C&&(ee?O.collapse():O.expand())},[S,z,C,O]),E=C&&!S;M.current={isCollapsed:S,toggle:I,isCollapsible:y};const N={isCollapsed:S,toggle:I,isCollapsible:y};x.useImperativeHandle(f,()=>({getCollapseState:()=>M.current}),[]);const R=p6();if(R==="topbar")return a.jsxs("div",{"data-testid":d,...K(W("side-nav",{mode:"topbar"}),q(Ep.topbar,l),c,u),children:[e,a.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw xvc5jky",children:r})]});const L=!!(s||r);if(R==="drawer")return a.jsxs(ok,{header:e,"data-testid":d,children:[t,n,L&&a.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&a.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});if(R==="drawer-content")return a.jsxs(a.Fragment,{children:[t,n,L&&a.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&a.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});const D=!!(e||t),P=!!(s||r),F=y&&m,X=C?{...u??{},width:S?void 0:O.size}:u,G=a.jsxs("nav",{ref:mt(h,_),role:"navigation","aria-label":g("@astryx.sideNav.label"),"data-testid":d,...K(W("side-nav"),q(Ep.root,S&&Ep.rootCollapsed,l),c,X),...p,children:[D&&a.jsxs("div",{...{0:{className:"x78zum5 xdt5ytf x2lah0s x7wzq59 x13vifvy x1vjfegm xgcd1z6 x1xye8es x1wesfrj xf314gf x1txdalj"},1:{className:"x78zum5 xdt5ytf x2lah0s x7wzq59 x13vifvy x1vjfegm xgcd1z6 x1xye8es x1wesfrj xf314gf x1txdalj x6s0dn4"}}[!!S<<0],children:[e,t&&a.jsx("div",{children:t})]}),a.jsx("div",{...{0:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x1xye8es x1wesfrj"},4:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 x1xye8es x1wesfrj"},2:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf xfsso4q x1wesfrj"},6:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 xfsso4q x1wesfrj"},1:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x1xye8es xy143xn"},5:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 x1xye8es xy143xn"},3:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf xfsso4q xy143xn"},7:{className:"x98rzlu x1odjw0f x6ikm8r xf314gf x78zum5 xdt5ytf x6s0dn4 xfsso4q xy143xn"}}[!!S<<2|!!D<<1|!!P<<0],children:n}),(P||F)&&a.jsxs("div",{...{0:{className:"x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf xfsso4q x1wesfrj"},1:{className:"x78zum5 xdt5ytf x2lah0s xr1yuqi x7wzq59 x1ey2m1c xgcd1z6 x1txdalj xf314gf x1wesfrj xexx8yu"}}[!!S<<0],children:[s,a.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw"},1:{className:"x78zum5 x6s0dn4 xzye2dw x3ieub6"}}[!!S<<0],children:[F&&a.jsx(Wj,{}),r]})]})]}),Q=E?a.jsxs("div",{className:"x1n2onr6 x78zum5 x2lah0s x5yr21d",children:[G,a.jsx(nk,{"data-testid":"astryx-sidenav-resize-handle",direction:"horizontal",position:"overlay",pillPlacement:"end",isAlwaysVisible:!1,resizable:O.props,label:g("@astryx.sideNav.resizeSidebar")})]}):G;return y?a.jsx(u1,{value:N,children:Q}):Q}lk.displayName="SideNav";const Ra={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kzqmXN:"xh8yej3",$$css:!0},itemCollapsed:{kjj79g:"xl56j7k",kzqmXN:"x805d0l",kg3NbH:"xnjsko4",$$css:!0},itemCollapsedSm:{kzqmXN:"x1fvqzum",$$css:!0},itemCollapsedLg:{kzqmXN:"x1m747yf",$$css:!0}},PO={isCollapsed:!1,toggle:()=>{},isCollapsible:!1};function Tp({href:e,as:t,isDisabled:n,onClick:s,ref:r,children:i,...o}){const l=eo(t);return e&&!n?a.jsx(l,{ref:r,href:e,onClick:s,...o,children:i}):a.jsx("button",{ref:r,type:"button",onClick:s,disabled:n,...o,children:i})}function ji({as:e,label:t,icon:n,selectedIcon:s,isSelected:r=!1,isDisabled:i=!1,href:o,onClick:l,endContent:c,children:u,collapsible:d,size:h="md","data-testid":f,ref:p,xstyle:g}){const b=Se(),y=Ll("chevronDown"),{isCollapsed:m}=ak(),k=p6(),{closeMobileNav:w}=Jx(),v=k==="drawer"||k==="drawer-content",j=x.useId(),C=!!u,$=x.useRef(null),T=kd({hasLightDismiss:!0,hasAutoFocus:!0,hasCloseButton:!1,dialogLabel:`${t} submenu`}),A=x.useMemo(()=>typeof d=="object"?d:{},[d]),S=C&&d!==!1,_=A.isCollapsed,M=_!==void 0,[z,O]=x.useState(A.defaultIsCollapsed??!1),I=M?_:z,E=x.useCallback(()=>{var ce;const he=!I;M||O(he),(ce=A.onCollapsedChange)==null||ce.call(A,he)},[I,M,A]),N=r&&s?s:n,L=S&&(!!o||!!l)&&!m,D=he=>{if(i){he.preventDefault();return}if(S&&!L&&!m){he.preventDefault(),E();return}l==null||l(he),v&&w()},P=he=>{he.preventDefault(),he.stopPropagation(),E()},F=x.useRef(null),X=x.useRef(null),G=x.useCallback(()=>{F.current&&(clearTimeout(F.current),F.current=null),X.current&&(clearTimeout(X.current),X.current=null)},[]),Q=x.useCallback(()=>{G(),F.current=setTimeout(()=>{T.show({skipAutoFocus:!0})},150)},[G,T]),ee=x.useCallback(()=>{G(),X.current=setTimeout(()=>{T.hide()},200)},[G,T]),Y=x.useCallback(()=>{Q()},[Q]),V=x.useCallback(()=>{ee()},[ee]);if(m&&!n)return null;if(m){const he=N&&yr(N,{size:"sm",color:r?"primary":i?"disabled":"secondary"}),ce=K(W("side-nav-item",{size:h,selected:r?"selected":null}),q(hi.item,hi[h],Ra.itemCollapsed,h==="sm"&&Ra.itemCollapsedSm,h==="lg"&&Ra.itemCollapsedLg,r&&hi.selected,i&&hi.disabled));if(C)return a.jsxs("div",{...q(Ra.root,g),children:[a.jsx("button",{ref:mt(p,T.triggerRef),type:"button",onClick:T.toggle,onMouseEnter:Y,onMouseLeave:V,"aria-label":t,"data-testid":f,...T.triggerProps,...ce,children:he}),T.render(a.jsxs("div",{className:"x1litavf x1y0btm7 x14i3s5s xu0wf1k x7a5moj x11g1kdw xfb3i0g",onMouseEnter:Y,onMouseLeave:V,onClick:()=>T.hide(),children:[a.jsx("div",{className:"xf314gf xu0wf1k x141an7d x2mo6ok xv1l7n4 x1ltkj2j",children:t}),a.jsx(u1,{value:PO,children:u})]}),{placement:"end",alignment:"start"})]});const J={"aria-current":r?"page":void 0,"aria-disabled":i||void 0,"aria-label":t,"data-testid":f},ke=a.jsx(Tp,{ref:p,href:o,as:e,isDisabled:i,onClick:D,...J,...ce,children:he});return a.jsxs("div",{ref:$,...q(Ra.root,g),children:[ke,a.jsx(to,{content:t,placement:"end",anchorRef:$})]})}const oe=a.jsxs(a.Fragment,{children:[N&&yr(N,{size:"sm",color:r?"primary":i?"disabled":"secondary"}),!m&&a.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:t}),!m&&c&&a.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:c}),!m&&S&&!L&&a.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s x19jd1h0"}}[!I<<0],children:y})]}),le=K(W("side-nav-item",{size:h,selected:r?"selected":null}),q(hi.item,hi[h],r&&hi.selected,i&&hi.disabled));let me;if(L)me=a.jsxs("div",{"data-testid":f,...le,children:[a.jsx(Tp,{ref:p,href:o,as:e,isDisabled:i,onClick:D,"aria-current":r?"page":void 0,className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli x1heor9g x1hl2dhg x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1yc453h x1ypdohk",children:oe}),a.jsx("button",{type:"button",onClick:P,"aria-label":I?b("@astryx.sideNavItem.expand",{label:t}):b("@astryx.sideNavItem.collapse",{label:t}),"aria-expanded":!I,"aria-controls":`${j}-children`,className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn xe9uy6x xyxi2l3",children:a.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s"},1:{className:"x3nfvp2 x6s0dn4 xl56j7k x1mtvzj0 xvpftlf x11xpdln xuedmi6 xlr8y92 x2lah0s x19jd1h0"}}[!I<<0],children:y})})]});else{const he={"aria-current":r?"page":void 0,"aria-disabled":i||void 0,"aria-expanded":S?!I:void 0,"aria-controls":S?`${j}-children`:void 0,"data-testid":f};me=a.jsx(Tp,{ref:p,href:o,as:e,isDisabled:i,onClick:D,...he,...le,children:oe})}return a.jsxs("div",{ref:$,...q(Ra.root,g),children:[me,C&&!m&&a.jsx("div",{id:`${j}-children`,role:"group","aria-labelledby":`${j}-label`,"aria-hidden":I,inert:I?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!I<<0],children:a.jsxs("div",{className:"xb3r6kr x2lwn1j x31w388",children:[a.jsx("span",{id:`${j}-label`,hidden:!0,children:t}),u]})})]})}ji.displayName="SideNavItem";const UO={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k8WAf4:"xu0wf1k",$$css:!0}};function lu({ref:e,title:t,subtitle:n,children:s,endContent:r,isHeaderHidden:i=!1,xstyle:o,className:l,style:c,"data-testid":u,...d}){const{isCollapsed:h}=ak(),p=`${x.useId()}-title`,g=a.jsxs(a.Fragment,{children:[a.jsxs("span",{className:"x78zum5 xdt5ytf x98rzlu xeuugli",children:[a.jsx("span",{id:p,className:"x141an7d x2mo6ok x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:t}),n&&a.jsx("span",{className:"x141an7d x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:n})]}),r&&a.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:r})]}),b=i||h,y=b?{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:0}:{};return a.jsxs("div",{ref:e,...K(W("side-nav-section"),q(UO.root,o),l,c),...d,role:"group","aria-labelledby":p,"data-testid":u,children:[a.jsx("div",{...K({className:"x78zum5 x6s0dn4 x1txdalj xf314gf xu0wf1k xt0e3qv x87ps6o"},{style:b?y:void 0}),children:g}),a.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:s})]})}lu.displayName="SideNavSection";var Kj={exports:{}},d1={},Xj={exports:{}},Zj={};/**
|
|
167
|
-
* @license React
|
|
168
|
-
* scheduler.production.js
|
|
169
|
-
*
|
|
170
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the MIT license found in the
|
|
173
|
-
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*/(function(e){function t(E,N){var R=E.length;E.push(N);e:for(;0<R;){var L=R-1>>>1,D=E[L];if(0<r(D,N))E[L]=N,E[R]=D,R=L;else break e}}function n(E){return E.length===0?null:E[0]}function s(E){if(E.length===0)return null;var N=E[0],R=E.pop();if(R!==N){E[0]=R;e:for(var L=0,D=E.length,P=D>>>1;L<P;){var F=2*(L+1)-1,X=E[F],G=F+1,Q=E[G];if(0>r(X,R))G<D&&0>r(Q,X)?(E[L]=Q,E[G]=R,L=G):(E[L]=X,E[F]=R,L=F);else if(G<D&&0>r(Q,R))E[L]=Q,E[G]=R,L=G;else break e}}return N}function r(E,N){var R=E.sortIndex-N.sortIndex;return R!==0?R:E.id-N.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,l=o.now();e.unstable_now=function(){return o.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,g=!1,b=!1,y=!1,m=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,w=typeof setImmediate<"u"?setImmediate:null;function v(E){for(var N=n(u);N!==null;){if(N.callback===null)s(u);else if(N.startTime<=E)s(u),N.sortIndex=N.expirationTime,t(c,N);else break;N=n(u)}}function j(E){if(b=!1,v(E),!g)if(n(c)!==null)g=!0,C||(C=!0,M());else{var N=n(u);N!==null&&I(j,N.startTime-E)}}var C=!1,$=-1,T=5,A=-1;function S(){return y?!0:!(e.unstable_now()-A<T)}function _(){if(y=!1,C){var E=e.unstable_now();A=E;var N=!0;try{e:{g=!1,b&&(b=!1,k($),$=-1),p=!0;var R=f;try{t:{for(v(E),h=n(c);h!==null&&!(h.expirationTime>E&&S());){var L=h.callback;if(typeof L=="function"){h.callback=null,f=h.priorityLevel;var D=L(h.expirationTime<=E);if(E=e.unstable_now(),typeof D=="function"){h.callback=D,v(E),N=!0;break t}h===n(c)&&s(c),v(E)}else s(c);h=n(c)}if(h!==null)N=!0;else{var P=n(u);P!==null&&I(j,P.startTime-E),N=!1}}break e}finally{h=null,f=R,p=!1}N=void 0}}finally{N?M():C=!1}}}var M;if(typeof w=="function")M=function(){w(_)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,O=z.port2;z.port1.onmessage=_,M=function(){O.postMessage(null)}}else M=function(){m(_,0)};function I(E,N){$=m(function(){E(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"):T=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 N=3;break;default:N=f}var R=f;f=N;try{return E()}finally{f=R}},e.unstable_requestPaint=function(){y=!0},e.unstable_runWithPriority=function(E,N){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var R=f;f=E;try{return N()}finally{f=R}},e.unstable_scheduleCallback=function(E,N,R){var L=e.unstable_now();switch(typeof R=="object"&&R!==null?(R=R.delay,R=typeof R=="number"&&0<R?L+R:L):R=L,E){case 1:var D=-1;break;case 2:D=250;break;case 5:D=1073741823;break;case 4:D=1e4;break;default:D=5e3}return D=R+D,E={id:d++,callback:N,priorityLevel:E,startTime:R,expirationTime:D,sortIndex:-1},R>L?(E.sortIndex=R,t(u,E),n(c)===null&&E===n(u)&&(b?(k($),$=-1):b=!0,I(j,R-L))):(E.sortIndex=D,t(c,E),g||p||(g=!0,C||(C=!0,M()))),E},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(E){var N=f;return function(){var R=f;f=N;try{return E.apply(this,arguments)}finally{f=R}}}})(Zj);Xj.exports=Zj;var FO=Xj.exports;/**
|
|
175
|
-
* @license React
|
|
176
|
-
* react-dom-client.production.js
|
|
177
|
-
*
|
|
178
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the MIT license found in the
|
|
181
|
-
* LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/var Rt=FO,Yj=x,GO=Mu;function Z(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 Qj(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function vd(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function Jj(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 e8(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 T2(e){if(vd(e)!==e)throw Error(Z(188))}function VO(e){var t=e.alternate;if(!t){if(t=vd(e),t===null)throw Error(Z(188));return t!==e?null:e}for(var n=e,s=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return T2(r),e;if(i===s)return T2(r),t;i=i.sibling}throw Error(Z(188))}if(n.return!==s.return)n=r,s=i;else{for(var o=!1,l=r.child;l;){if(l===n){o=!0,n=r,s=i;break}if(l===s){o=!0,s=r,n=i;break}l=l.sibling}if(!o){for(l=i.child;l;){if(l===n){o=!0,n=i,s=r;break}if(l===s){o=!0,s=i,n=r;break}l=l.sibling}if(!o)throw Error(Z(189))}}if(n.alternate!==s)throw Error(Z(190))}if(n.tag!==3)throw Error(Z(188));return n.stateNode.current===n?e:t}function t8(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=t8(e),t!==null)return t;e=e.sibling}return null}function Bn(e,t,n,s,r,i){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,s,r,i)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&Bn(e.child,t,n,s,r,i))return!0;e=e.sibling}return!1}function ha(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function N2(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),!(e.tag===3||e.tag===5||e.tag===27));)e=e.return;return t}function n8(e){var t=[null,null],n=ha(e);return n===null||s8(t,e,n.child,{foundSelf:!1}),t}function s8(e,t,n,s){for(;n!==null;){if(n===t)s.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(s.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&s8(e,t,n.child,s))return!0;n=n.sibling}return!1}function zt(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(Z(559))}}var Ga=null,Qg=null;function WO(e,t,n){return e===n?!0:e===t?(Ga=e,!0):!1}function KO(e,t,n){return e===n?(Qg=e,!1):e===t?(Qg!==null&&(Ga=e),!0):!1}function A2(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function Jg(e,t,n){for(var s=0,r=e;r;r=n(r))s++;r=0;for(var i=t;i;i=n(i))r++;for(;0<s-r;)e=n(e),s--;for(;0<r-s;)t=n(t),r--;for(;s--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Qe=Object.assign,XO=Symbol.for("react.element"),kf=Symbol.for("react.transitional.element"),Jc=Symbol.for("react.portal"),Va=Symbol.for("react.fragment"),r8=Symbol.for("react.strict_mode"),em=Symbol.for("react.profiler"),i8=Symbol.for("react.consumer"),ur=Symbol.for("react.context"),ck=Symbol.for("react.forward_ref"),tm=Symbol.for("react.suspense"),nm=Symbol.for("react.suspense_list"),uk=Symbol.for("react.memo"),bi=Symbol.for("react.lazy"),sm=Symbol.for("react.activity"),ZO=Symbol.for("react.legacy_hidden"),YO=Symbol.for("react.memo_cache_sentinel"),rm=Symbol.for("react.view_transition"),QO=Symbol.for("react.recoverable"),M2=Symbol.iterator;function qc(e){return e===null||typeof e!="object"?null:(e=M2&&e[M2]||e["@@iterator"],typeof e=="function"?e:null)}var JO=Symbol.for("react.client.reference");function im(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===JO?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Va:return"Fragment";case em:return"Profiler";case r8:return"StrictMode";case tm:return"Suspense";case nm:return"SuspenseList";case sm:return"Activity";case rm:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case Jc:return"Portal";case ur:return e.displayName||"Context";case i8:return(e._context.displayName||"Context")+".Consumer";case ck:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case uk:return t=e.displayName||null,t!==null?t:im(e.type)||"Memo";case bi:t=e._payload,e=e._init;try{return im(e(t))}catch{}}return null}var eu=Array.isArray,we=Yj.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,qe=GO.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Po={pending:!1,data:null,method:null,action:null},om=[],Wa=-1;function Sr(e){return{current:e}}function an(e){0>Wa||(e.current=om[Wa],om[Wa]=null,Wa--)}function nt(e,t){Wa++,om[Wa]=e.current,e.current=t}var pr=Sr(null),_u=Sr(null),Li=Sr(null),Wh=Sr(null);function Kh(e,t){switch(nt(Li,t),nt(_u,e),nt(pr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?F5(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=F5(t),e=E9(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}an(pr),nt(pr,e)}function Dl(){an(pr),an(_u),an(Li)}function am(e){var t=e.memoizedState;t!==null&&(Kl._currentValue=t.memoizedState,nt(Wh,e)),t=pr.current;var n=E9(t,e.type);t!==n&&(nt(_u,e),nt(pr,n))}function Xh(e){_u.current===e&&(an(pr),an(_u)),Wh.current===e&&(an(Wh),Kl._currentValue=Po)}var Np,z2;function mi(e){if(Np===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Np=t&&t[1]||"",z2=-1<n.stack.indexOf(`
|
|
183
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
184
|
-
`+Np+e+z2}var Ap=!1;function Mp(e,t){if(!e||Ap)return"";Ap=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[])}catch(g){var f=g}Reflect.construct(e,[],h)}else{try{h.call()}catch(g){f=g}h=!1;try{var p=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),h=!0,new e}finally{h&&(p!==void 0?Object.defineProperty(e.prototype,"props",p):delete e.prototype.props)}}}else{try{throw Error()}catch(g){f=g}(h=e())&&typeof h.catch=="function"&&h.catch(function(){})}}catch(g){if(g&&f&&typeof g.stack=="string")return[g.stack,f.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=s.DetermineComponentFrameRoot(),o=i[0],l=i[1];if(o&&l){var c=o.split(`
|
|
185
|
-
`),u=l.split(`
|
|
186
|
-
`);for(r=s=0;s<c.length&&!c[s].includes("DetermineComponentFrameRoot");)s++;for(;r<u.length&&!u[r].includes("DetermineComponentFrameRoot");)r++;if(s===c.length||r===u.length)for(s=c.length-1,r=u.length-1;1<=s&&0<=r&&c[s]!==u[r];)r--;for(;1<=s&&0<=r;s--,r--)if(c[s]!==u[r]){if(s!==1||r!==1)do if(s--,r--,0>r||c[s]!==u[r]){var d=`
|
|
187
|
-
`+c[s].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=s&&0<=r);break}}}finally{Ap=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?mi(n):""}function eD(e,t){switch(e.tag){case 26:case 27:case 5:return mi(e.type);case 16:return mi("Lazy");case 13:return e.child!==t&&t!==null?mi("Suspense Fallback"):mi("Suspense");case 19:return mi("SuspenseList");case 0:case 15:return Mp(e.type,!1);case 11:return Mp(e.type.render,!1);case 1:return Mp(e.type,!0);case 31:return mi("Activity");case 30:return mi("ViewTransition");default:return""}}function R2(e){try{var t="",n=null;do t+=eD(e,n),n=e,e=e.return;while(e);return t}catch(s){return`
|
|
188
|
-
Error generating stack: `+s.message+`
|
|
189
|
-
`+s.stack}}var lm=Object.prototype.hasOwnProperty,dk=Rt.unstable_scheduleCallback,zp=Rt.unstable_cancelCallback,tD=Rt.unstable_shouldYield,nD=Rt.unstable_requestPaint,ss=Rt.unstable_now,sD=Rt.unstable_getCurrentPriorityLevel,o8=Rt.unstable_ImmediatePriority,a8=Rt.unstable_UserBlockingPriority,Zh=Rt.unstable_NormalPriority,rD=Rt.unstable_LowPriority,l8=Rt.unstable_IdlePriority,iD=Rt.log,oD=Rt.unstable_setDisableYieldValue,wd=null,rs=null;function Ni(e){if(typeof iD=="function"&&oD(e),rs&&typeof rs.setStrictMode=="function")try{rs.setStrictMode(wd,e)}catch{}}var is=Math.clz32?Math.clz32:cD,aD=Math.log,lD=Math.LN2;function cD(e){return e>>>=0,e===0?32:31-(aD(e)/lD|0)|0}var bf=256,vf=262144,wf=4194304;function yo(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&-e;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 f1(e,t,n){var s=e.pendingLanes;if(s===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var l=s&134217727;return l!==0?(s=l&~i,s!==0?r=yo(s):(o&=l,o!==0?r=yo(o):n||(n=l&~e,n!==0&&(r=yo(n))))):(l=s&~i,l!==0?r=yo(l):o!==0?r=yo(o):n||(n=s&~e,n!==0&&(r=yo(n)))),r===0?0:t!==0&&t!==r&&!(t&i)&&(i=r&-r,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:r}function jd(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function c8(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var s=31-is(n),r=1<<s;t|=e[s],n&=~r}return t}function uD(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 u8(){var e=wf;return wf<<=1,!(wf&62914560)&&(wf=4194304),e}function Rp(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Sd(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dD(e,t,n,s,r,i){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 l=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=o&~n;0<n;){var d=31-is(n),h=1<<d;l[d]=0,c[d]=-1;var f=u[d];if(f!==null)for(u[d]=null,d=0;d<f.length;d++){var p=f[d];p!==null&&(p.lane&=-536870913)}n&=~h}s!==0&&d8(e,s,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function d8(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-is(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|n&261930}function f8(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-is(n),r=1<<s;r&t|e[s]&t&&(e[s]|=t),n&=~r}}function h8(e,t){var n=t&-t;return n=n&42?1:fk(n),n&(e.suspendedLanes|t)?0:n}function fk(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 hk(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function x8(){var e=qe.p;return e!==0?e:(e=window.event,e===void 0?32:K9(e.type))}function I2(e,t){var n=qe.p;try{return qe.p=e,t()}finally{qe.p=n}}var ri=Math.random().toString(36).slice(2),rn="__reactFiber$"+ri,qn="__reactProps$"+ri,dc="__reactContainer$"+ri,_2="__reactEvents$"+ri,fD="__reactListeners$"+ri,hD="__reactHandles$"+ri,L2="__reactResources$"+ri,Cd="__reactMarker$"+ri,Yh="__reactLoad$"+ri;function h1(e){delete e[rn],delete e[qn],delete e[fD],delete e[hD]}function No(e){var t;if(t=e[rn])return t;for(var n=e.parentNode;n;){if(t=n[dc]||n[rn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Q5(e);e!==null;){if(n=e[rn])return n;e=Q5(e)}return t}e=n,n=e.parentNode}return null}function fc(e){if(e=e[rn]||e[dc]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function tu(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(Z(33))}function ol(e){var t=e[L2];return t||(t=e[L2]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Vt(e){e[Cd]=!0}function p8(e){e[Yh]=void 0}var g8=new Set,m8={};function xa(e,t){Bl(e,t),Bl(e+"Capture",t)}function Bl(e,t){for(m8[e]=t,e=0;e<t.length;e++)g8.add(t[e])}var xD=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]*$"),O2={},D2={};function pD(e){return lm.call(D2,e)?!0:lm.call(O2,e)?!1:xD.test(e)?D2[e]=!0:(O2[e]=!0,!1)}var De=!1;function B2(){var e=De;return De=!1,e}function th(e,t,n){if(pD(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function jf(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 Tr(e,t,n,s){if(s===null)e.removeAttribute(n);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,s)}}function Xn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function y8(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gD(e,t,n){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,i=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function cm(e){if(!e._valueTracker){var t=y8(e)?"checked":"value";e._valueTracker=gD(e,t,""+e[t])}}function k8(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=y8(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}var mD=/[\n"\\]/g;function Ss(e){return e.replace(mD,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function um(e,t,n,s,r,i,o,l){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Xn(t)):e.value!==""+Xn(t)&&(e.value=""+Xn(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?o==="number"&&e.value==t?Ip(e,Xn(e.value)):Ip(e,Xn(t)):n!=null?Ip(e,Xn(n)):s!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+Xn(l):e.removeAttribute("name")}function b8(e,t,n,s,r,i,o,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){cm(e);return}n=n!=null?""+Xn(n):"",t=t!=null?""+Xn(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=l?e.checked:!!s,e.defaultChecked=!!s,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),cm(e)}function Ip(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function al(e,t,n,s){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&s&&(e[n].defaultSelected=!0)}else{for(n=""+Xn(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function v8(e,t,n){if(t!=null&&(t=""+Xn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Xn(n):""}function w8(e,t,n,s){if(t==null){if(s!=null){if(n!=null)throw Error(Z(92));if(eu(s)){if(1<s.length)throw Error(Z(93));s=s[0]}n=s}n==null&&(n=""),t=n}n=Xn(t),e.defaultValue=n,s=e.textContent,s===n&&s!==""&&s!==null&&(e.value=s),cm(e)}function ql(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var yD=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 q2(e,t,n){var s=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,n):typeof n!="number"||n===0||yD.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function j8(e,t,n){if(t!=null&&typeof t!="object")throw Error(Z(62));if(e=e.style,n!=null){for(var s in n)!n.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="",De=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&n[r]!==s&&(q2(e,r,s),De=!0)}else for(var i in t)t.hasOwnProperty(i)&&q2(e,i,t[i])}function xk(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 kD=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"],["maskType","mask-type"],["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"]]),bD=/^[\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 nh(e){return bD.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function dr(){}var dm=null;function pk(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ka=null,ll=null;function H2(e){var t=fc(e);if(t&&(e=t.stateNode)){var n=e[qn]||null;e:switch(e=t.stateNode,t.type){case"input":if(um(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="'+Ss(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var r=s[qn]||null;if(!r)throw Error(Z(90));um(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)s=n[t],s.form===e.form&&k8(s)}break e;case"textarea":v8(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&al(e,!!n.multiple,t,!1)}}}var _p=!1;function S8(e,t,n){if(_p)return e(t,n);_p=!0;try{var s=e(t);return s}finally{if(_p=!1,(Ka!==null||ll!==null)&&(E1(),Ka&&(t=Ka,e=ll,ll=Ka=null,H2(t),e)))for(t=0;t<e.length;t++)H2(e[t])}}function Lu(e,t){var n=e.stateNode;if(n===null)return null;var s=n[qn]||null;if(s===null)return null;n=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(Z(231,t,typeof n));return n}var Xr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),fm=!1;if(Xr)try{var Hc={};Object.defineProperty(Hc,"passive",{get:function(){fm=!0}}),window.addEventListener("test",Hc,Hc),window.removeEventListener("test",Hc,Hc)}catch{fm=!1}var Ai=null,gk=null,sh=null;function C8(){if(sh)return sh;var e,t=gk,n=t.length,s,r="value"in Ai?Ai.value:Ai.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var o=n-e;for(s=1;s<=o&&t[n-s]===r[i-s];s++);return sh=r.slice(e,1<s?1-s:void 0)}function rh(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 Sf(){return!0}function P2(){return!1}function Mn(e){function t(n,s,r,i,o){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Sf:P2,this.isPropagationStopped=P2,this}return Qe(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Sf)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Sf)},persist:function(){},isPersistent:Sf}),t}var no={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},x1=Mn(no),$d=Qe({},no,{view:0,detail:0}),vD=Mn($d),Lp,Op,Pc,p1=Qe({},$d,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:mk,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!==Pc&&(Pc&&e.type==="mousemove"?(Lp=e.screenX-Pc.screenX,Op=e.screenY-Pc.screenY):Op=Lp=0,Pc=e),Lp)},movementY:function(e){return"movementY"in e?e.movementY:Op}}),U2=Mn(p1),wD=Qe({},p1,{dataTransfer:0}),jD=Mn(wD),SD=Qe({},$d,{relatedTarget:0}),Dp=Mn(SD),CD=Qe({},no,{animationName:0,elapsedTime:0,pseudoElement:0}),$D=Mn(CD),ED=Qe({},no,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),TD=Mn(ED),ND=Qe({},no,{data:0}),F2=Mn(ND),AD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},MD={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"},zD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function RD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zD[e])?!!t[e]:!1}function mk(){return RD}var ID=Qe({},$d,{key:function(e){if(e.key){var t=AD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=rh(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?MD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:mk,charCode:function(e){return e.type==="keypress"?rh(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?rh(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_D=Mn(ID),LD=Qe({},p1,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),G2=Mn(LD),OD=Qe({},no,{submitter:0}),DD=Mn(OD),BD=Qe({},$d,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:mk}),qD=Mn(BD),HD=Qe({},no,{propertyName:0,elapsedTime:0,pseudoElement:0}),PD=Mn(HD),UD=Qe({},p1,{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}),FD=Mn(UD),GD=Qe({},no,{newState:0,oldState:0,source:0}),VD=Mn(GD),WD=[9,13,27,32],yk=Xr&&"CompositionEvent"in window,cu=null;Xr&&"documentMode"in document&&(cu=document.documentMode);var KD=Xr&&"TextEvent"in window&&!cu,$8=Xr&&(!yk||cu&&8<cu&&11>=cu),V2=" ",W2=!1;function E8(e,t){switch(e){case"keyup":return WD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function T8(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Xa=!1;function XD(e,t){switch(e){case"compositionend":return T8(t);case"keypress":return t.which!==32?null:(W2=!0,V2);case"textInput":return e=t.data,e===V2&&W2?null:e;default:return null}}function ZD(e,t){if(Xa)return e==="compositionend"||!yk&&E8(e,t)?(e=C8(),sh=gk=Ai=null,Xa=!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 $8&&t.locale!=="ko"?null:t.data;default:return null}}var YD={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 K2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!YD[e.type]:t==="textarea"}function N8(e,t,n,s){Ka?ll?ll.push(s):ll=[s]:Ka=s,t=kx(t,"onChange"),0<t.length&&(n=new x1("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var uu=null,Ou=null;function QD(e){S9(e,0)}function g1(e){var t=tu(e);if(k8(t))return e}function X2(e,t){if(e==="change")return t}var A8=!1;if(Xr){var Bp;if(Xr){var qp="oninput"in document;if(!qp){var Z2=document.createElement("div");Z2.setAttribute("oninput","return;"),qp=typeof Z2.oninput=="function"}Bp=qp}else Bp=!1;A8=Bp&&(!document.documentMode||9<document.documentMode)}function Y2(){uu&&(uu.detachEvent("onpropertychange",M8),Ou=uu=null)}function M8(e){if(e.propertyName==="value"&&g1(Ou)){var t=[];N8(t,Ou,e,pk(e)),S8(QD,t)}}function JD(e,t,n){e==="focusin"?(Y2(),uu=t,Ou=n,uu.attachEvent("onpropertychange",M8)):e==="focusout"&&Y2()}function eB(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return g1(Ou)}function tB(e,t){if(e==="click")return g1(t)}function nB(e,t){if(e==="input"||e==="change")return g1(t)}function sB(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var cs=typeof Object.is=="function"?Object.is:sB;function Du(e,t){if(cs(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),s=Object.keys(t);if(n.length!==s.length)return!1;for(s=0;s<n.length;s++){var r=n[s];if(!lm.call(t,r)||!cs(e[r],t[r]))return!1}return!0}function hm(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Q2(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function J2(e,t){var n=Q2(e);e=0;for(var s;n;){if(n.nodeType===3){if(s=e+n.textContent.length,e<=t&&s>=t)return{node:n,offset:t-e};e=s}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Q2(n)}}function z8(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?z8(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function R8(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=hm(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=hm(e.document)}return t}function kk(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 rB=Xr&&"documentMode"in document&&11>=document.documentMode,Za=null,xm=null,du=null,pm=!1;function e5(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;pm||Za==null||Za!==hm(s)||(s=Za,"selectionStart"in s&&kk(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),du&&Du(du,s)||(du=s,s=kx(xm,"onSelect"),0<s.length&&(t=new x1("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=Za)))}function ho(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ya={animationend:ho("Animation","AnimationEnd"),animationiteration:ho("Animation","AnimationIteration"),animationstart:ho("Animation","AnimationStart"),transitionrun:ho("Transition","TransitionRun"),transitionstart:ho("Transition","TransitionStart"),transitioncancel:ho("Transition","TransitionCancel"),transitionend:ho("Transition","TransitionEnd")},Hp={},I8={};Xr&&(I8=document.createElement("div").style,"AnimationEvent"in window||(delete Ya.animationend.animation,delete Ya.animationiteration.animation,delete Ya.animationstart.animation),"TransitionEvent"in window||delete Ya.transitionend.transition);function pa(e){if(Hp[e])return Hp[e];if(!Ya[e])return e;var t=Ya[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in I8)return Hp[e]=t[n];return e}var _8=pa("animationend"),L8=pa("animationiteration"),O8=pa("animationstart"),iB=pa("transitionrun"),oB=pa("transitionstart"),aB=pa("transitioncancel"),D8=pa("transitionend"),B8=new Map,gm="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError 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(" ");gm.push("scrollEnd");function Zs(e,t){B8.set(e,t),xa(t,[e])}var lB=0;function Zr(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=Vs.identifierPrefix;var n=lB++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function t5(e){if(e==null||typeof e=="string")return e;var t=null,n=pl;if(n!==null)for(var s=0;s<n.length;s++){var r=e[n[s]];if(r!=null){if(r==="none")return"none";t=t==null?r:t+(" "+r)}}return t??e.default}function ii(e,t){return e=t5(e),t=t5(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Qh=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},vs=[],Qa=0,bk=0;function m1(){for(var e=Qa,t=bk=Qa=0;t<e;){var n=vs[t];vs[t++]=null;var s=vs[t];vs[t++]=null;var r=vs[t];vs[t++]=null;var i=vs[t];if(vs[t++]=null,s!==null&&r!==null){var o=s.pending;o===null?r.next=r:(r.next=o.next,o.next=r),s.pending=r}i!==0&&q8(n,r,i)}}function y1(e,t,n,s){vs[Qa++]=e,vs[Qa++]=t,vs[Qa++]=n,vs[Qa++]=s,bk|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function vk(e,t,n,s){return y1(e,t,n,s),Jh(e)}function ga(e,t){return y1(e,null,null,t),Jh(e)}function q8(e,t,n){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n);for(var r=!1,i=e.return;i!==null;)i.childLanes|=n,s=i.alternate,s!==null&&(s.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-is(n),e=i.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=n|536870912),i):null}function Jh(e){if(50<vu)throw vu=0,xh=null,Error(Z(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ja={};function cB(e,t,n,s){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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function On(e,t,n,s){return new cB(e,t,n,s)}function wk(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gr(e,t){var n=e.alternate;return n===null?(n=On(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&1206910976,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 H8(e,t){e.flags&=1206910978;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 ih(e,t,n,s,r,i){var o=0;if(s=e,typeof s=="function")wk(s)&&(o=1);else if(typeof s=="string")o=Oq(e,n,pr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case sm:return e=On(31,n,t,r),e.elementType=sm,e.lanes=i,e;case Va:return Uo(n.children,r,i,t);case r8:o=8,r|=24;break;case em:return e=On(12,n,t,r|2),e.elementType=em,e.lanes=i,e;case tm:return e=On(13,n,t,r),e.elementType=tm,e.lanes=i,e;case nm:return e=On(19,n,t,r),e.elementType=nm,e.lanes=i,e;case ZO:case rm:return e=r|32,e=On(30,n,t,e),e.elementType=rm,e.lanes=i,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case ur:o=10;break e;case i8:o=9;break e;case ck:o=11;break e;case uk:o=14;break e;case bi:o=16,s=null;break e}o=29,n=Error(Z(130,e===null?"null":typeof e,"")),s=null}return t=On(o,n,t,r),t.elementType=e,t.type=s,t.lanes=i,t}function Uo(e,t,n,s){return e=On(7,e,s,t),e.lanes=n,e}function Pp(e,t,n){return e=On(6,e,null,t),e.lanes=n,e}function P8(e){var t=On(18,null,null,0);return t.stateNode=e,t}function Up(e,t,n){return t=On(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var n5=new WeakMap;function Cs(e,t){if(typeof e=="object"&&e!==null){var n=n5.get(e);return n!==void 0?n:(t={value:e,source:t,stack:R2(t)},n5.set(e,t),t)}return{value:e,source:t,stack:R2(t)}}var el=[],tl=0,ex=null,Bu=0,ws=[],js=0,Ki=null,fr=1,hr="";function Rr(e,t){el[tl++]=Bu,el[tl++]=ex,ex=e,Bu=t}function U8(e,t,n){ws[js++]=fr,ws[js++]=hr,ws[js++]=Ki,Ki=e;var s=fr;e=hr;var r=32-is(s)-1;s&=~(1<<r),n+=1;var i=32-is(t)+r;if(30<i){var o=r-r%5;i=(s&(1<<o)-1).toString(32),s>>=o,r-=o,fr=1<<32-is(t)+r|n<<r|s,hr=i+e}else fr=1<<i|n<<r|s,hr=e}function k1(e){e.return!==null&&(Rr(e,1),U8(e,1,0))}function jk(e){for(;e===ex;)ex=el[--tl],el[tl]=null,Bu=el[--tl],el[tl]=null;for(;e===Ki;)Ki=ws[--js],ws[js]=null,hr=ws[--js],ws[js]=null,fr=ws[--js],ws[js]=null}function F8(e,t){ws[js++]=fr,ws[js++]=hr,ws[js++]=Ki,fr=t.id,hr=t.overflow,Ki=e}var Kt=null,et=null,Ne=!1,Oi=null,$s=!1,mm=Error(Z(519));function Xi(e){var t=Error(Z(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw qu(Cs(t,e)),mm}function s5(e){var t=e.stateNode,n=e.type,s=e.memoizedProps;switch(t[rn]=e,t[qn]=s,n){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(n=0;n<Fu.length;n++)Ae(Fu[n],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),b8(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),w8(t,s.value,s.defaultValue,s.children)}n=s.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||s.suppressHydrationWarning===!0||$9(t.textContent,n)?(s.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),s.onScroll!=null&&Ae("scroll",t),s.onScrollEnd!=null&&Ae("scrollend",t),s.onClick!=null&&(t.onclick=dr),t=!0):t=!1,t||Xi(e,!0)}function tx(e){for(Kt=e.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:$s=!1;return;case 27:case 3:$s=!0;return;default:Kt=Kt.return}}function Ia(e){if(e!==Kt)return!1;if(!Ne)return tx(e),Ne=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||t0(e.type,e.memoizedProps)),n=!n),n&&et&&Xi(e),tx(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Z(317));et=Y5(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Z(317));et=Y5(e)}else t===27?(t=et,so(e.type)?(e=i0,i0=null,et=e):et=t):et=Kt?Ts(e.stateNode.nextSibling):null;return!0}function Zo(){et=Kt=null,Ne=!1}function Fp(){var e=Oi;return e!==null&&(In===null?In=e:In.push.apply(In,e),Oi=null),e}function qu(e){Oi===null?Oi=[e]:Oi.push(e)}var ym=Sr(null),ma=null,qr=null;function Mi(e,t,n){nt(ym,t._currentValue),t._currentValue=n}function Vr(e){e._currentValue=ym.current,an(ym)}function oh(e,t,n){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===n)break;e=e.return}}function km(e,t,n,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var o=r.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=r;for(var c=0;c<t.length;c++)if(l.context===t[c]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),oh(i.return,n,e),s||(o=null);break e}i=l.next}}else if(r.tag===18){if(o=r.return,o===null)throw Error(Z(341));o.lanes|=n,i=o.alternate,i!==null&&(i.lanes|=n),oh(o,n,e),o=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=n,o=r.alternate,o!==null&&(o.lanes|=n),oh(r.return,n,e),o=r.child,o=o!==null?o.sibling:null):o=r.child;if(o!==null)o.return=r;else for(o=r;o!==null;){if(o===e){o=null;break}if(r=o.sibling,r!==null){r.return=o.return,o=r;break}o=o.return}r=o}}function Yo(e,t,n,s){e=null;for(var r=t,i=!1;r!==null;){if(!i){if(r.flags&524288)i=!0;else if(r.flags&262144)break}if(r.tag===10){var o=r.alternate;if(o===null)throw Error(Z(387));if(o=o.memoizedProps,o!==null){var l=r.type;cs(r.pendingProps.value,o.value)||(e!==null?e.push(l):e=[l])}}else if(r===Wh.current){if(o=r.alternate,o===null)throw Error(Z(387));o.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Kl):e=[Kl])}r=r.return}return e!==null&&km(t,e,n,s),t.flags|=262144,e!==null}function nx(e){for(e=e.firstContext;e!==null;){if(!cs(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qo(e){ma=e,qr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function on(e){return G8(ma,e)}function Cf(e,t){return ma===null&&Qo(e),G8(e,t)}function G8(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},qr===null){if(e===null)throw Error(Z(308));qr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else qr=qr.next=t;return n}var uB=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},dB=Rt.unstable_scheduleCallback,fB=Rt.unstable_NormalPriority,St={$$typeof:ur,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sk(){return{controller:new uB,data:new Map,refCount:0}}function Ed(e){e.refCount--,e.refCount===0&&dB(fB,function(){e.controller.abort()})}function r5(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var s=t[e];n.indexOf(s)===-1&&n.push(s)}}}var nu=null;function hB(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var fu=null,bm=0,Jo=0,cl=null;function xB(e,t){if(fu===null){var n=fu=[];bm=0,Jo=Qk(),cl={status:"pending",value:void 0,then:function(s){n.push(s)}}}return bm++,t.then(i5,i5),t}function i5(){if(--bm===0&&(nu=null,fu!==null)){cl!==null&&(cl.status="fulfilled");var e=fu;fu=null,Jo=0,cl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function pB(e,t){var n=[],s={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),s}var o5=we.S;we.S=function(e,t){if(c9=ss(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&xB(e,t),nu!==null)for(var n=Gl;n!==null;)r5(n,nu),n=n.next;if(n=e.types,n!==null){for(var s=Gl;s!==null;)r5(s,n),s=s.next;if(Jo!==0){s=nu,s===null&&(s=nu=[]);for(var r=0;r<n.length;r++){var i=n[r];s.indexOf(i)===-1&&s.push(i)}}}o5!==null&&o5(e,t)};var Fo=Sr(null);function Ck(){var e=Fo.current;return e!==null?e:Ye.pooledCache}function ah(e,t){t===null?nt(Fo,Fo.current):nt(Fo,t.pool)}function V8(){var e=Ck();return e===null?null:{parent:St._currentValue,pool:e}}var hc=Error(Z(460)),$k=Error(Z(474)),b1=Error(Z(542)),sx={then:function(){}};function a5(e){return e=e.status,e==="fulfilled"||e==="rejected"}function W8(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(dr,dr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,c5(e),e===void 0&&!("reason"in t)?Error(Z(600)):e;default:if(typeof t.status=="string")t.then(dr,dr);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(Z(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,c5(e),e}throw Go=t,hc}}function ko(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Go=n,hc):n}}var Go=null;function l5(){if(Go===null)throw Error(Z(459));var e=Go;return Go=null,e}function c5(e){if(e===hc||e===b1)throw Error(Z(483))}var ul=null,Hu=0;function $f(e){var t=Hu;return Hu+=1,ul===null&&(ul=[]),W8(ul,e,t)}function xi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ef(e,t){throw t.$$typeof===XO?Error(Z(525)):(e=Object.prototype.toString.call(t),Error(Z(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function K8(e){function t(m,k){if(e){var w=m.deletions;w===null?(m.deletions=[k],m.flags|=16):w.push(k)}}function n(m,k){if(!e)return null;for(;k!==null;)t(m,k),k=k.sibling;return null}function s(m){for(var k=new Map;m!==null;)m.key===null?k.set(m.index,m):k.set(m.key,m),m=m.sibling;return k}function r(m,k){return m=Gr(m,k),m.index=0,m.sibling=null,m}function i(m,k,w){return m.index=w,e?(w=m.alternate,w!==null?(w=w.index,w<k?(m.flags|=2,k):w):(m.flags|=134217730,k)):(m.flags|=1048576,k)}function o(m){return e&&m.alternate===null&&(m.flags|=134217730),m}function l(m,k,w,v){return k===null||k.tag!==6?(k=Pp(w,m.mode,v),k.return=m,k):(k=r(k,w),k.return=m,k)}function c(m,k,w,v){var j=w.type;return j===Va?(m=d(m,k,w.props.children,v,w.key),xi(m,w),m):k!==null&&(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===bi&&ko(j)===k.type)?(k=r(k,w.props),xi(k,w),k.return=m,k):(k=ih(w.type,w.key,w.props,null,m.mode,v),xi(k,w),k.return=m,k)}function u(m,k,w,v){return k===null||k.tag!==4||k.stateNode.containerInfo!==w.containerInfo||k.stateNode.implementation!==w.implementation?(k=Up(w,m.mode,v),k.return=m,k):(k=r(k,w.children||[]),k.return=m,k)}function d(m,k,w,v,j){return k===null||k.tag!==7?(k=Uo(w,m.mode,v,j),k.return=m,k):(k=r(k,w),k.return=m,k)}function h(m,k,w){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=Pp(""+k,m.mode,w),k.return=m,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case kf:return w=ih(k.type,k.key,k.props,null,m.mode,w),xi(w,k),w.return=m,w;case Jc:return k=Up(k,m.mode,w),k.return=m,k;case bi:return k=ko(k),h(m,k,w)}if(eu(k)||qc(k))return k=Uo(k,m.mode,w,null),k.return=m,k;if(typeof k.then=="function")return h(m,$f(k),w);if(k.$$typeof===ur)return h(m,Cf(m,k),w);Ef(m,k)}return null}function f(m,k,w,v){var j=k!==null?k.key:null;if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return j!==null?null:l(m,k,""+w,v);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case kf:return w.key===j?c(m,k,w,v):null;case Jc:return w.key===j?u(m,k,w,v):null;case bi:return w=ko(w),f(m,k,w,v)}if(eu(w)||qc(w))return j!==null?null:d(m,k,w,v,null);if(typeof w.then=="function")return f(m,k,$f(w),v);if(w.$$typeof===ur)return f(m,k,Cf(m,w),v);Ef(m,w)}return null}function p(m,k,w,v,j){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return m=m.get(w)||null,l(k,m,""+v,j);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case kf:return m=m.get(v.key===null?w:v.key)||null,c(k,m,v,j);case Jc:return m=m.get(v.key===null?w:v.key)||null,u(k,m,v,j);case bi:return v=ko(v),p(m,k,w,v,j)}if(eu(v)||qc(v))return m=m.get(w)||null,d(k,m,v,j,null);if(typeof v.then=="function")return p(m,k,w,$f(v),j);if(v.$$typeof===ur)return p(m,k,w,Cf(k,v),j);Ef(k,v)}return null}function g(m,k,w,v){for(var j=null,C=null,$=k,T=k=0,A=null;$!==null&&T<w.length;T++){$.index>T?(A=$,$=null):A=$.sibling;var S=f(m,$,w[T],v);if(S===null){$===null&&($=A);break}e&&$&&S.alternate===null&&t(m,$),k=i(S,k,T),C===null?j=S:C.sibling=S,C=S,$=A}if(T===w.length)return n(m,$),Ne&&Rr(m,T),j;if($===null){for(;T<w.length;T++)$=h(m,w[T],v),$!==null&&(k=i($,k,T),C===null?j=$:C.sibling=$,C=$);return Ne&&Rr(m,T),j}for($=s($);T<w.length;T++)A=p($,m,T,w[T],v),A!==null&&(e&&(S=A.alternate,S!==null&&$.delete(S.key===null?T:S.key)),k=i(A,k,T),C===null?j=A:C.sibling=A,C=A);return e&&$.forEach(function(_){return t(m,_)}),Ne&&Rr(m,T),j}function b(m,k,w,v){if(w==null)throw Error(Z(151));for(var j=null,C=null,$=k,T=k=0,A=null,S=w.next();$!==null&&!S.done;T++,S=w.next()){$.index>T?(A=$,$=null):A=$.sibling;var _=f(m,$,S.value,v);if(_===null){$===null&&($=A);break}e&&$&&_.alternate===null&&t(m,$),k=i(_,k,T),C===null?j=_:C.sibling=_,C=_,$=A}if(S.done)return n(m,$),Ne&&Rr(m,T),j;if($===null){for(;!S.done;T++,S=w.next())S=h(m,S.value,v),S!==null&&(k=i(S,k,T),C===null?j=S:C.sibling=S,C=S);return Ne&&Rr(m,T),j}for($=s($);!S.done;T++,S=w.next())S=p($,m,T,S.value,v),S!==null&&(e&&(A=S.alternate,A!==null&&$.delete(A.key===null?T:A.key)),k=i(S,k,T),C===null?j=S:C.sibling=S,C=S);return e&&$.forEach(function(M){return t(m,M)}),Ne&&Rr(m,T),j}function y(m,k,w,v){if(typeof w=="object"&&w!==null&&w.type===Va&&w.key===null&&w.props.ref===void 0&&(w=w.props.children),typeof w=="object"&&w!==null){switch(w.$$typeof){case kf:e:{for(var j=w.key;k!==null;){if(k.key===j){if(j=w.type,j===Va){if(k.tag===7){n(m,k.sibling),v=r(k,w.props.children),xi(v,w),v.return=m,m=v;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===bi&&ko(j)===k.type){n(m,k.sibling),v=r(k,w.props),xi(v,w),v.return=m,m=v;break e}n(m,k);break}else t(m,k);k=k.sibling}w.type===Va?(v=Uo(w.props.children,m.mode,v,w.key),xi(v,w),v.return=m,m=v):(v=ih(w.type,w.key,w.props,null,m.mode,v),xi(v,w),v.return=m,m=v)}return o(m);case Jc:e:{for(j=w.key;k!==null;){if(k.key===j)if(k.tag===4&&k.stateNode.containerInfo===w.containerInfo&&k.stateNode.implementation===w.implementation){n(m,k.sibling),v=r(k,w.children||[]),v.return=m,m=v;break e}else{n(m,k);break}else t(m,k);k=k.sibling}v=Up(w,m.mode,v),v.return=m,m=v}return o(m);case bi:return w=ko(w),y(m,k,w,v)}if(eu(w))return g(m,k,w,v);if(qc(w)){if(j=qc(w),typeof j!="function")throw Error(Z(150));return w=j.call(w),b(m,k,w,v)}if(typeof w.then=="function")return y(m,k,$f(w),v);if(w.$$typeof===ur)return y(m,k,Cf(m,w),v);Ef(m,w)}return typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint"?(w=""+w,k!==null&&k.tag===6?(n(m,k.sibling),v=r(k,w),v.return=m,m=v):(n(m,k),v=Pp(w,m.mode,v),v.return=m,m=v),o(m)):n(m,k)}return function(m,k,w,v){try{Hu=0;var j=y(m,k,w,v);return ul=null,j}catch($){if($===hc||$===b1)throw $;var C=On(29,$,null,m.mode);return C.lanes=v,C.return=m,C}finally{}}}var ea=K8(!0),X8=K8(!1),vi=!1;function Ek(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function vm(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 Di(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Bi(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Be&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Jh(e),q8(e,null,n),t}return y1(e,s,t,n),Jh(e)}function hu(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,f8(e,n)}}function Gp(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?r=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:s.shared,callbacks:s.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var wm=!1;function xu(){if(wm){var e=cl;if(e!==null)throw e}}function pu(e,t,n,s){wm=!1;var r=e.updateQueue;vi=!1;var i=r.firstBaseUpdate,o=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var c=l,u=c.next;c.next=null,o===null?i=u:o.next=u,o=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==o&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(i!==null){var h=r.baseState;o=0,d=u=c=null,l=i;do{var f=l.lane&-536870913,p=f!==l.lane;if(p?(ze&f)===f:(s&f)===f){f!==0&&f===Jo&&(wm=!0),d!==null&&(d=d.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var g=e,b=l;f=t;var y=n;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){h=g.call(y,h,f);break e}h=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,f=typeof g=="function"?g.call(y,h,f):g,f==null)break e;h=Qe({},h,f);break e;case 2:vi=!0}}f=l.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[f]:p.push(f))}else p={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=p,c=h):d=d.next=p,o|=f;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;p=l,l=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);d===null&&(c=h),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=d,i===null&&(r.shared.lanes=0),Qi|=o,e.lanes=o,e.memoizedState=h}}function Z8(e,t){if(typeof e!="function")throw Error(Z(191,e));e.call(t)}function Y8(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Z8(n[e],t)}var Zi=Sr(null),rx=Sr(0);function u5(e,t){e=ei,nt(rx,e),nt(Zi,t),ei=e|t.baseLanes}function jm(){nt(rx,ei),nt(Zi,Zi.current)}function Tk(){ei=rx.current,an(Zi),an(rx)}var dn=Sr(null),pn=null;function qi(e){var t=e.alternate;nt(ln,ln.current&1),nt(dn,e),pn===null&&(t===null||Zi.current!==null||t.memoizedState!==null)&&(pn=e)}function Sm(e){nt(ln,ln.current),nt(dn,e),pn===null&&(pn=e)}function Q8(e){e.tag===22?(nt(ln,ln.current),nt(dn,e),pn===null&&(pn=e)):Hi()}function Hi(){nt(ln,ln.current),nt(dn,dn.current)}function Yn(e){an(dn),pn===e&&(pn=null),an(ln)}var ln=Sr(0);function Pu(e,t){nt(dn,dn.current),nt(ln,t)}function Nk(e){an(ln),an(dn),pn===e&&(pn=null)}function ix(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||r0(n)||nb(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!=="independent"){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 Yr=0,Ee=null,Ke=null,jt=null,ox=!1,dl=!1,ta=!1,ax=0,Uu=0,fl=null,gB=0;function pt(){throw Error(Z(321))}function Ak(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!cs(e[n],t[n]))return!1;return!0}function Mk(e,t,n,s,r,i){return Yr=i,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,we.H=e===null||e.memoizedState===null?N7:A7,ta=!1,i=n(s,r),ta=!1,dl&&(i=e7(t,n,s,r)),J8(e),i}function J8(e){we.H=lx;var t=Ke!==null&&Ke.next!==null;if(Yr=0,jt=Ke=Ee=null,ox=!1,Uu=0,fl=null,t)throw Error(Z(300));e===null||Ct||(e=e.dependencies,e!==null&&nx(e)&&(Ct=!0))}function e7(e,t,n,s){Ee=e;var r=0;do{if(dl&&(fl=null),Uu=0,dl=!1,25<=r)throw Error(Z(301));if(r+=1,jt=Ke=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}we.H=SB,i=t(n,s)}while(dl);return i}function mB(){var e=we.H,t=e.useState()[0];return t=typeof t.then=="function"?Td(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(Ee.flags|=1024),t}function zk(){var e=ax!==0;return ax=0,e}function Rk(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ik(e){if(ox){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ox=!1}Yr=0,jt=Ke=Ee=null,dl=!1,Uu=ax=0,fl=null}function $n(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Ee.memoizedState=jt=e:jt=jt.next=e,jt}function vt(){if(Ke===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=jt===null?Ee.memoizedState:jt.next;if(t!==null)jt=t,Ke=e;else{if(e===null)throw Ee.alternate===null?Error(Z(467)):Error(Z(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},jt===null?Ee.memoizedState=jt=e:jt=jt.next=e}return jt}function v1(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Td(e){var t=Uu;return Uu+=1,fl===null&&(fl=[]),e=W8(fl,e,t),t=Ee,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,we.H=t===null||t.memoizedState===null?N7:A7),e}function w1(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Td(e);if(e.$$typeof===QO)return;if(e.$$typeof===ur)return on(e)}throw Error(Z(438,String(e)))}function _k(e){var t=null,n=Ee.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var s=Ee.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=v1(),Ee.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),s=0;s<e;s++)n[s]=YO;return t.index++,n}function Qr(e,t){return typeof t=="function"?t(e):t}function lh(e){var t=vt();return Lk(t,Ke,e)}function Lk(e,t,n){var s=e.queue;if(s===null)throw Error(Z(311));s.lastRenderedReducer=n;var r=e.baseQueue,i=s.pending;if(i!==null){if(r!==null){var o=r.next;r.next=i.next,i.next=o}t.baseQueue=r=i,s.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var l=o=null,c=null,u=t,d=!1;do{var h=u.lane&-536870913;if(h!==u.lane?(ze&h)===h:(Yr&h)===h){var f=u.revertLane;if(f===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),h===Jo&&(d=!0);else if((Yr&f)===f){u=u.next,f===Jo&&(d=!0);continue}else h={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=h,o=i):c=c.next=h,Ee.lanes|=f,Qi|=f;h=u.action,ta&&n(i,h),i=u.hasEagerState?u.eagerState:n(i,h)}else f={lane:h,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=f,o=i):c=c.next=f,Ee.lanes|=h,Qi|=h;u=u.next}while(u!==null&&u!==t);if(c===null?o=i:c.next=l,!cs(i,e.memoizedState)&&(Ct=!0,d&&(n=cl,n!==null)))throw n;e.memoizedState=i,e.baseState=o,e.baseQueue=c,s.lastRenderedState=i}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function Vp(e){var t=vt(),n=t.queue;if(n===null)throw Error(Z(311));n.lastRenderedReducer=e;var s=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var o=r=r.next;do i=e(i,o.action),o=o.next;while(o!==r);cs(i,t.memoizedState)||(Ct=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,s]}function t7(e,t,n){var s=Ee,r=vt(),i=Ne;if(i){if(n===void 0)throw Error(Z(407));n=n()}else n=t();var o=!cs((Ke||r).memoizedState,n);if(o&&(r.memoizedState=n,Ct=!0),r=r.queue,Ok(r7.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||o||jt!==null&&(jt.memoizedState.tag&1)!==0,Hl(e?9:8,{destroy:void 0},s7.bind(null,s,r,n,t),null),e){if(s.flags|=2048,Ye===null)throw Error(Z(349));i||Yr&127||n7(s,t,n)}return n}function n7(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ee.updateQueue,t===null?(t=v1(),Ee.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function s7(e,t,n,s){t.value=n,t.getSnapshot=s,i7(t)&&o7(e)}function r7(e,t,n){return n(function(){i7(t)&&o7(e)})}function i7(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!cs(e,n)}catch{return!0}}function o7(e){var t=ga(e,2);t!==null&&Dn(t,e,2)}function Cm(e){var t=$n();if(typeof e=="function"){var n=e;if(e=n(),ta){Ni(!0);try{n()}finally{Ni(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qr,lastRenderedState:e},t}function a7(e,t,n,s){return e.baseState=n,Lk(e,Ke,typeof s=="function"?s:Qr)}function yB(e,t,n,s,r){if(S1(e))throw Error(Z(485));if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};we.T!==null?n(!0):i.isTransition=!1,s(i),n=t.pending,n===null?(i.next=t.pending=i,l7(t,i)):(i.next=n.next,t.pending=n.next=i)}}function l7(e,t){var n=t.action,s=t.payload,r=e.state;if(t.isTransition){var i=we.T,o={};o.types=i!==null?i.types:null,we.T=o;try{var l=n(r,s),c=we.S;c!==null&&c(o,l),d5(e,t,l)}catch(u){$m(e,t,u)}finally{i!==null&&o.types!==null&&(i.types=o.types),we.T=i}}else try{i=n(r,s),d5(e,t,i)}catch(u){$m(e,t,u)}}function d5(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){f5(e,t,s)},function(s){return $m(e,t,s)}):f5(e,t,n)}function f5(e,t,n){t.status="fulfilled",t.value=n,c7(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,l7(e,n)))}function $m(e,t,n){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=n,c7(t),t=t.next;while(t!==s)}e.action=null}function c7(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function u7(e,t){return t}function h5(e,t){if(Ne){var n=Ye.formState;if(n!==null){e:{var s=Ee;if(Ne){if(et){t:{for(var r=et,i=$s;r.nodeType!==8;){if(!i){r=null;break t}if(r=Ts(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){et=Ts(r.nextSibling),s=r.data==="F!";break e}}Xi(s)}s=!1}s&&(t=n[0])}}return n=$n(),n.memoizedState=n.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:u7,lastRenderedState:t},n.queue=s,n=$7.bind(null,Ee,s),s.dispatch=n,s=Cm(!1),i=Hk.bind(null,Ee,!1,s.queue),s=$n(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,n=yB.bind(null,Ee,r,i,n),r.dispatch=n,s.memoizedState=e,[t,n,!1]}function x5(e){var t=vt();return d7(t,Ke,e)}function d7(e,t,n){if(t=Lk(e,t,u7)[0],e=lh(Qr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Td(t)}catch(o){throw o===hc?b1:o}else s=t;t=vt();var r=t.queue,i=r.dispatch;return n!==t.memoizedState&&(Ee.flags|=2048,Hl(9,{destroy:void 0},kB.bind(null,r,n),null)),[s,i,e]}function kB(e,t){e.action=t}function p5(e){var t=vt(),n=Ke;if(n!==null)return d7(t,n,e);vt(),t=t.memoizedState,n=vt();var s=n.queue.dispatch;return n.memoizedState=e,[t,s,!1]}function Hl(e,t,n,s){return e={tag:e,create:n,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=v1(),Ee.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(s=n.next,n.next=e,e.next=s,t.lastEffect=e),e}function f7(){return vt().memoizedState}function ch(e,t,n,s){var r=$n();Ee.flags|=e,r.memoizedState=Hl(1|t,{destroy:void 0},n,s===void 0?null:s)}function j1(e,t,n,s){var r=vt();s=s===void 0?null:s;var i=r.memoizedState.inst;Ke!==null&&s!==null&&Ak(s,Ke.memoizedState.deps)?r.memoizedState=Hl(t,i,n,s):(Ee.flags|=e,r.memoizedState=Hl(1|t,i,n,s))}function g5(e,t){ch(8390656,8,e,t)}function Ok(e,t){j1(2048,8,e,t)}function bB(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=v1(),Ee.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function h7(e){var t=vt().memoizedState;return bB({ref:t,nextImpl:e}),function(){if(Be&2)throw Error(Z(440));return t.impl.apply(void 0,arguments)}}function x7(e,t){return j1(4,2,e,t)}function p7(e,t){return j1(4,4,e,t)}function g7(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 m7(e,t,n){n=n!=null?n.concat([e]):null,j1(4,4,g7.bind(null,t,e),n)}function Dk(){}function y7(e,t){var n=vt();t=t===void 0?null:t;var s=n.memoizedState;return t!==null&&Ak(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function k7(e,t){var n=vt();t=t===void 0?null:t;var s=n.memoizedState;if(t!==null&&Ak(t,s[1]))return s[0];if(s=e(),ta){Ni(!0);try{e()}finally{Ni(!1)}}return n.memoizedState=[s,t],s}function Bk(e,t,n){return n===void 0||Yr&1073741824&&!(ze&261930)?e.memoizedState=t:(e.memoizedState=n,e=d9(),Ee.lanes|=e,Qi|=e,n)}function b7(e,t,n,s){return cs(n,t)?n:Zi.current!==null?(e=Bk(e,n,s),cs(e,t)||(Ct=!0),e):!(Yr&106)||Yr&1073741824&&!(ze&261930)?(Ct=!0,e.memoizedState=n):(e=d9(),Ee.lanes|=e,Qi|=e,t)}function v7(e,t,n,s,r){var i=qe.p;qe.p=i!==0&&8>i?i:8;var o=we.T,l={};l.types=o!==null?o.types:null,we.T=l,Hk(e,!1,t,n);try{var c=r(),u=we.S;if(u!==null&&u(l,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=pB(c,s);gu(e,t,d,os(e))}else gu(e,t,s,os(e))}catch(h){gu(e,t,{then:function(){},status:"rejected",reason:h},os())}finally{qe.p=i,o!==null&&l.types!==null&&(o.types=l.types),we.T=o}}function vB(){}function Em(e,t,n,s){if(e.tag!==5)throw Error(Z(476));var r=w7(e).queue;v7(e,r,t,Po,n===null?vB:function(){return j7(e),n(s)})}function w7(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Po,baseState:Po,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qr,lastRenderedState:Po},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qr,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function j7(e){var t=w7(e);t.next===null&&(t=e.alternate.memoizedState),gu(e,t.next.queue,{},os())}function qk(){return on(Kl)}function S7(){return vt().memoizedState}function C7(){return vt().memoizedState}function wB(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=os();e=Di(n);var s=Bi(t,e,n);s!==null&&(Dn(s,t,n),hu(s,t,n)),t={cache:Sk()},e.payload=t;return}t=t.return}}function jB(e,t,n){var s=os();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},S1(e)?E7(t,n):(n=vk(e,t,n,s),n!==null&&(Dn(n,e,s),T7(n,t,s)))}function $7(e,t,n){var s=os();gu(e,t,n,s)}function gu(e,t,n,s){var r={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(S1(e))E7(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,l=i(o,n);if(r.hasEagerState=!0,r.eagerState=l,cs(l,o))return y1(e,t,r,0),Ye===null&&m1(),!1}catch{}finally{}if(n=vk(e,t,r,s),n!==null)return Dn(n,e,s),T7(n,t,s),!0}return!1}function Hk(e,t,n,s){if(s={lane:2,revertLane:Qk(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},S1(e)){if(t)throw Error(Z(479))}else t=vk(e,n,s,2),t!==null&&Dn(t,e,2)}function S1(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function E7(e,t){dl=ox=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function T7(e,t,n){if(n&4194048){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,f8(e,n)}}var lx={readContext:on,use:w1,useCallback:pt,useContext:pt,useEffect:pt,useImperativeHandle:pt,useLayoutEffect:pt,useInsertionEffect:pt,useMemo:pt,useReducer:pt,useRef:pt,useState:pt,useDebugValue:pt,useDeferredValue:pt,useTransition:pt,useSyncExternalStore:pt,useId:pt,useHostTransitionStatus:pt,useFormState:pt,useActionState:pt,useOptimistic:pt,useMemoCache:pt,useCacheRefresh:pt,useEffectEvent:pt},N7={readContext:on,use:w1,useCallback:function(e,t){return $n().memoizedState=[e,t===void 0?null:t],e},useContext:on,useEffect:g5,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ch(4194308,4,g7.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ch(4194308,4,e,t)},useInsertionEffect:function(e,t){ch(4,2,e,t)},useMemo:function(e,t){var n=$n();t=t===void 0?null:t;var s=e();if(ta){Ni(!0);try{e()}finally{Ni(!1)}}return n.memoizedState=[s,t],s},useReducer:function(e,t,n){var s=$n();if(n!==void 0){var r=n(t);if(ta){Ni(!0);try{n(t)}finally{Ni(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=jB.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=$n();return e={current:e},t.memoizedState=e},useState:function(e){e=Cm(e);var t=e.queue,n=$7.bind(null,Ee,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Dk,useDeferredValue:function(e,t){var n=$n();return Bk(n,e,t)},useTransition:function(){var e=Cm(!1);return e=v7.bind(null,Ee,e.queue,!0,!1),$n().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var s=Ee,r=$n();if(Ne){if(n===void 0)throw Error(Z(407));n=n()}else{if(n=t(),Ye===null)throw Error(Z(349));ze&127||n7(s,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,g5(r7.bind(null,s,i,e),[e]),s.flags|=2048,Hl(9,{destroy:void 0},s7.bind(null,s,i,n,t),null),n},useId:function(){var e=$n(),t=Ye.identifierPrefix;if(Ne){var n=hr,s=fr;n=(s&~(1<<32-is(s)-1)).toString(32)+n,t="_"+t+"R_"+n,n=ax++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=gB++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:qk,useFormState:h5,useActionState:h5,useOptimistic:function(e){var t=$n();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Hk.bind(null,Ee,!0,n),n.dispatch=t,[e,t]},useMemoCache:_k,useCacheRefresh:function(){return $n().memoizedState=wB.bind(null,Ee)},useEffectEvent:function(e){var t=$n(),n={impl:e};return t.memoizedState=n,function(){if(Be&2)throw Error(Z(440));return n.impl.apply(void 0,arguments)}}},A7={readContext:on,use:w1,useCallback:y7,useContext:on,useEffect:Ok,useImperativeHandle:m7,useInsertionEffect:x7,useLayoutEffect:p7,useMemo:k7,useReducer:lh,useRef:f7,useState:function(){return lh(Qr)},useDebugValue:Dk,useDeferredValue:function(e,t){var n=vt();return b7(n,Ke.memoizedState,e,t)},useTransition:function(){var e=lh(Qr)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Td(e),t]},useSyncExternalStore:t7,useId:S7,useHostTransitionStatus:qk,useFormState:x5,useActionState:x5,useOptimistic:function(e,t){var n=vt();return a7(n,Ke,e,t)},useMemoCache:_k,useCacheRefresh:C7,useEffectEvent:h7},SB={readContext:on,use:w1,useCallback:y7,useContext:on,useEffect:Ok,useImperativeHandle:m7,useInsertionEffect:x7,useLayoutEffect:p7,useMemo:k7,useReducer:Vp,useRef:f7,useState:function(){return Vp(Qr)},useDebugValue:Dk,useDeferredValue:function(e,t){var n=vt();return Ke===null?Bk(n,e,t):b7(n,Ke.memoizedState,e,t)},useTransition:function(){var e=Vp(Qr)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Td(e),t]},useSyncExternalStore:t7,useId:S7,useHostTransitionStatus:qk,useFormState:p5,useActionState:p5,useOptimistic:function(e,t){var n=vt();return Ke!==null?a7(n,Ke,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:_k,useCacheRefresh:C7,useEffectEvent:h7};function Wp(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:Qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Tm={enqueueSetState:function(e,t,n){e=e._reactInternals;var s=os(),r=Di(s);r.payload=t,n!=null&&(r.callback=n),t=Bi(e,r,s),t!==null&&(Dn(t,e,s),hu(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=os(),r=Di(s);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=Bi(e,r,s),t!==null&&(Dn(t,e,s),hu(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=os(),s=Di(n);s.tag=2,t!=null&&(s.callback=t),t=Bi(e,s,n),t!==null&&(Dn(t,e,n),hu(t,e,n))}};function m5(e,t,n,s,r,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,i,o):t.prototype&&t.prototype.isPureReactComponent?!Du(n,s)||!Du(r,i):!0}function y5(e,t,n,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,s),t.state!==e&&Tm.enqueueReplaceState(t,t.state,null)}function na(e,t){var n=t;if("ref"in t){n={};for(var s in t)s!=="ref"&&(n[s]=t[s])}if(e=e.defaultProps){n===t&&(n=Qe({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function M7(e){Qh(e)}function z7(e){console.error(e)}function R7(e){Qh(e)}function cx(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function k5(e,t,n){try{var s=e.onCaughtError;s(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Nm(e,t,n){return n=Di(n),n.tag=3,n.payload={element:null},n.callback=function(){cx(e,t)},n}function I7(e){return e=Di(e),e.tag=3,e}function _7(e,t,n,s){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=s.value;e.payload=function(){return r(i)},e.callback=function(){k5(t,n,s)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){k5(t,n,s),typeof r!="function"&&(Pi===null?Pi=new Set([this]):Pi.add(this));var l=s.stack;this.componentDidCatch(s.value,{componentStack:l!==null?l:""})})}function CB(e,t,n,s,r){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=n.alternate,t!==null&&Yo(t,n,r,!0),n=dn.current,n!==null){switch(n.tag){case 31:case 13:case 19:return pn===null?mx():n.alternate===null&>===0&&(gt=3),n.flags&=-257,n.flags|=65536,n.lanes=r,s===sx?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([s]):t.add(s),eg(e,s,r)),!1;case 22:return n.flags|=65536,s===sx?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([s]):n.add(s)),eg(e,s,r)),!1}throw Error(Z(435,n.tag))}return eg(e,s,r),mx(),!1}if(Ne)return t=dn.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==mm&&(e=Error(Z(422),{cause:s}),qu(Cs(e,n)))):(s!==mm&&(t=Error(Z(423),{cause:s}),qu(Cs(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Cs(s,n),r=Nm(e.stateNode,s,r),Gp(e,r),gt!==4&&(gt=2)),!1;var i=Error(Z(520),{cause:s});if(i=Cs(i,n),bu===null?bu=[i]:bu.push(i),gt!==4&&(gt=2),t===null)return!0;s=Cs(s,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Nm(n.stateNode,s,e),Gp(n,e),!1;case 1:if(t=n.type,i=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Pi===null||!Pi.has(i))))return n.flags|=65536,r&=-r,n.lanes|=r,r=I7(r),_7(r,e,n,s),Gp(n,r),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Pk=Error(Z(461)),Ct=!1;function At(e,t,n,s){t.child=e===null?X8(t,null,n,s):ea(t,e.child,n,s)}function b5(e,t,n,s,r){n=n.render;var i=t.ref;if("ref"in s){var o={};for(var l in s)l!=="ref"&&(o[l]=s[l])}else o=s;return Qo(t),s=Mk(e,t,n,o,i,r),l=zk(),e!==null&&!Ct?(Rk(e,t,r),Jr(e,t,r)):(Ne&&l&&k1(t),t.flags|=1,At(e,t,s,r),t.child)}function v5(e,t,n,s,r){if(e===null){var i=n.type;return typeof i=="function"&&!wk(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,L7(e,t,i,s,r)):(e=ih(n.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Fk(e,r)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Du,n(o,s)&&e.ref===t.ref)return Jr(e,t,r)}return t.flags|=1,e=Gr(i,s),e.ref=t.ref,e.return=t,t.child=e}function L7(e,t,n,s,r){if(e!==null){var i=e.memoizedProps;if(Du(i,s)&&e.ref===t.ref)if(Ct=!1,t.pendingProps=s=i,Fk(e,r))e.flags&131072&&(Ct=!0);else return t.lanes=e.lanes,Jr(e,t,r)}return Am(e,t,n,s,r)}function O7(e,t,n,s){var r=s.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if(t.flags&128){if(i=i!==null?i.baseLanes|n:n,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~i}else s=0,t.child=null;return w5(e,t,i,n,s)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ah(t,i!==null?i.cachePool:null),i!==null?u5(t,i):jm(),Q8(t);else return s=t.lanes=536870912,w5(e,t,i!==null?i.baseLanes|n:n,n,s)}else i!==null?(ah(t,i.cachePool),u5(t,i),Hi(),t.memoizedState=null):(e!==null&&ah(t,null),jm(),Hi());return At(e,t,r,n),t.child}function mu(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function w5(e,t,n,s,r){var i=Ck();return i=i===null?null:{parent:St._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&ah(t,null),jm(),Q8(t),e!==null&&Yo(e,t,s,!0),t.childLanes=r,null}function uh(e,t){return t=C1({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function j5(e,t,n){return ea(t,e.child,null,n),e=uh(t,t.pendingProps),e.flags|=2,Yn(t),t.memoizedState=null,e}function $B(e,t,n){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(s.mode==="hidden")return e=uh(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},mu(null,e);if(Sm(t),(e=et)?(e=L9(e,$s),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki!==null?{id:fr,overflow:hr}:null,retryLane:536870912,hydrationErrors:null},n=P8(e),n.return=t,t.child=n,Kt=t,et=null)):e=null,e===null)throw Xi(t);return t.lanes=536870912,null}return uh(t,s)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if(Sm(t),r)if(t.flags&256)t.flags&=-257,t=j5(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(Z(558));else if(Ct||Yo(e,t,n,!1),r=(n&e.childLanes)!==0,Ct||r){if(Zi.current===null){if(s=Ye,s!==null&&(o=h8(s,n),o!==0&&o!==i.retryLane))throw i.retryLane=o,ga(e,o),Dn(s,e,o),Pk;mx()}t=j5(e,t,n)}else e=i.treeContext,et=Ts(o.nextSibling),Kt=t,Ne=!0,Oi=null,$s=!1,e!==null&&F8(t,e),t=uh(t,s),t.flags|=134221824;return t}return e=Gr(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function qa(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(Z(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Am(e,t,n,s,r){return Qo(t),n=Mk(e,t,n,s,void 0,r),s=zk(),e!==null&&!Ct?(Rk(e,t,r),Jr(e,t,r)):(Ne&&s&&k1(t),t.flags|=1,At(e,t,n,r),t.child)}function S5(e,t,n,s,r,i){return Qo(t),t.updateQueue=null,n=e7(t,s,n,r),J8(e),s=zk(),e!==null&&!Ct?(Rk(e,t,i),Jr(e,t,i)):(Ne&&s&&k1(t),t.flags|=1,At(e,t,n,i),t.child)}function C5(e,t,n,s,r){if(Qo(t),t.stateNode===null){var i=Ja,o=n.contextType;typeof o=="object"&&o!==null&&(i=on(o)),i=new n(s,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Tm,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=s,i.state=t.memoizedState,i.refs={},Ek(t),o=n.contextType,i.context=typeof o=="object"&&o!==null?on(o):Ja,i.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o=="function"&&(Wp(t,n,o,s),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&Tm.enqueueReplaceState(i,i.state,null),pu(t,s,i,r),xu(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,c=na(n,l);i.props=c;var u=i.context,d=n.contextType;o=Ja,typeof d=="object"&&d!==null&&(o=on(d));var h=n.getDerivedStateFromProps;d=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,d||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||u!==o)&&y5(t,i,s,o),vi=!1;var f=t.memoizedState;i.state=f,pu(t,s,i,r),xu(),u=t.memoizedState,l||f!==u||vi?(typeof h=="function"&&(Wp(t,n,h,s),u=t.memoizedState),(c=vi||m5(t,n,c,s,f,u,o))?(d||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=u),i.props=s,i.state=u,i.context=o,s=c):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{i=t.stateNode,vm(e,t),o=t.memoizedProps,d=na(n,o),i.props=d,h=t.pendingProps,f=i.context,u=n.contextType,c=Ja,typeof u=="object"&&u!==null&&(c=on(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==h||f!==c)&&y5(t,i,s,c),vi=!1,f=t.memoizedState,i.state=f,pu(t,s,i,r),xu();var p=t.memoizedState;o!==h||f!==p||vi||e!==null&&e.dependencies!==null&&nx(e.dependencies)?(typeof l=="function"&&(Wp(t,n,l,s),p=t.memoizedState),(d=vi||m5(t,n,d,s,f,p,c)||e!==null&&e.dependencies!==null&&nx(e.dependencies))?(u||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(s,p,c),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(s,p,c)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=p),i.props=s,i.state=p,i.context=c,s=d):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),s=!1)}return i=s,qa(e,t),s=(t.flags&128)!==0,i||s?(i=t.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&s?(t.child=ea(t,e.child,null,r),t.child=ea(t,null,n,r)):At(e,t,n,r),t.memoizedState=i.state,e=t.child):e=Jr(e,t,r),e}function $5(e,t,n,s){return Zo(),t.flags|=256,At(e,t,n,s),t.child}var Mm={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function zm(e){return{baseLanes:e,cachePool:V8()}}function Rm(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Jn),e}function D7(e,t,n){var s=t.pendingProps,r=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(ln.current&2)!==0),o&&(r=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(r?qi(t):Hi(),(e=et)?(e=L9(e,$s),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki!==null?{id:fr,overflow:hr}:null,retryLane:536870912,hydrationErrors:null},n=P8(e),n.return=t,t.child=n,Kt=t,et=null)):e=null,e===null)throw Xi(t);return nb(e)?t.lanes=32:t.lanes=536870912,null}return i=s.children,s=s.fallback,r?(Hi(),r=t.mode,i=C1({mode:"hidden",children:i},r),s=Uo(s,r,n,null),i.return=t,s.return=t,i.sibling=s,t.child=i,s=t.child,s.memoizedState=zm(n),s.childLanes=Rm(e,o,n),t.memoizedState=Mm,mu(null,s)):(qi(t),Uk(t,i))}var l=e.memoizedState;if(l!==null){var c=l.dehydrated;if(c!==null)return EB(e,t,i,o,s,c,l,n)}return r?(Hi(),r=s.fallback,i=t.mode,l=e.child,c=l.sibling,s=Gr(l,{mode:"hidden",children:s.children}),s.subtreeFlags=l.subtreeFlags&1206910976,c!==null?r=Gr(c,r):(r=Uo(r,i,n,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,mu(null,s),s=t.child,r=e.child.memoizedState,r===null?r=zm(n):(i=r.cachePool,i!==null?(l=St._currentValue,i=i.parent!==l?{parent:l,pool:l}:i):i=V8(),r={baseLanes:r.baseLanes|n,cachePool:i}),s.memoizedState=r,s.childLanes=Rm(e,o,n),t.memoizedState=Mm,mu(e.child,s)):(qi(t),n=e.child,e=n.sibling,n=Gr(n,{mode:"visible",children:s.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Uk(e,t){return t=C1({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function C1(e,t){return e=On(22,e,null,t),e.lanes=0,e}function Tf(e,t,n){return ea(t,e.child,null,n),e=Uk(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function EB(e,t,n,s,r,i,o,l){if(n)return t.flags&256?(qi(t),t.flags&=-257,Tf(e,t,l)):t.memoizedState!==null?(Hi(),t.child=e.child,t.flags|=128,null):(Hi(),i=r.fallback,o=t.mode,r=C1({mode:"visible",children:r.children},o),i=Uo(i,o,l,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,ea(t,e.child,null,l),r=t.child,r.memoizedState=zm(l),r.childLanes=Rm(e,s,l),t.memoizedState=Mm,mu(null,r));if(qi(t),nb(i)){if(s=i.nextSibling&&i.nextSibling.dataset,s)var c=s.dgst;return s=c,s!==""&&(r=Error(Z(419)),r.stack="",r.digest=s,qu({value:r,source:null,stack:null})),Tf(e,t,l)}if(Ct||Yo(e,t,l,!1),s=(l&e.childLanes)!==0,Ct||s){if(Zi.current!==null)return Tf(e,t,l);if(s=Ye,s!==null&&(r=h8(s,l),r!==0&&r!==o.retryLane))throw o.retryLane=r,ga(e,r),Dn(s,e,r),Pk;return r0(i)||mx(),Tf(e,t,l)}return r0(i)?(t.flags|=192,t.child=e.child,null):(e=o.treeContext,et=Ts(i.nextSibling),Kt=t,Ne=!0,Oi=null,$s=!1,e!==null&&F8(t,e),t=Uk(t,r.children),t.flags|=134221824,t)}function E5(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),oh(e.return,t,n)}function T5(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&ix(n)===null&&(t=e),e=e.sibling}return t}function Nf(e,t,n,s,r,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=s,o.tail=n,o.tailMode=r,o.treeForkCount=i)}function Kp(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function Im(e,t,n){var s=t.pendingProps,r=s.revealOrder,i=s.tail;s=s.children;var o=ln.current;if(t.flags&128)return Pu(t,o),null;var l=(o&2)!==0;if(l?(o=o&1|2,t.flags|=128):o&=1,Pu(t,o),r==="backwards"&&e!==null?(Kp(e),At(e,t,s,n),Kp(e)):At(e,t,s,n),s=Ne?Bu:0,!l&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&E5(e,n,t);else if(e.tag===19)E5(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"backwards":n=T5(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null,Kp(t)),Nf(t,!0,r,null,i,s);break;case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&ix(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Nf(t,!0,n,null,i,s);break;case"together":Nf(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:n=T5(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Nf(t,!1,r,n,i,s)}return t.child}function N5(e,t,n){var s=t.pendingProps;return Mi(t,t.type,s.value),At(e,t,s.children,n),t.child}function Jr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Qi|=t.lanes,!(n&t.childLanes))if(e!==null){if(Yo(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(Z(153));if(t.child!==null){for(e=t.child,n=Gr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Gr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Fk(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&nx(e)))}function TB(e,t,n){switch(t.tag){case 3:Kh(t,t.stateNode.containerInfo),Mi(t,St,e.memoizedState.cache),Zo();break;case 27:case 5:am(t);break;case 4:Kh(t,t.stateNode.containerInfo);break;case 10:Mi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Sm(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return qi(t),t.flags|=128,null;s=Yo(e,t,n,!1);var r=t.child.childLanes;return s||n&r?D7(e,t,n):(qi(t),e=Jr(e,t,n),e!==null?e.sibling:null)}qi(t);break;case 19:if(t.flags&128)return Im(e,t,n);if(r=(e.flags&128)!==0,s=(n&t.childLanes)!==0,s||(Yo(e,t,n,!1),s=(n&t.childLanes)!==0),r){if(s)return Im(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Pu(t,ln.current),s)break;return null;case 22:return t.lanes=0,O7(e,t,n,t.pendingProps);case 24:Mi(t,St,e.memoizedState.cache)}return Jr(e,t,n)}function B7(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ct=!0;else{if(!Fk(e,n)&&!(t.flags&128))return Ct=!1,TB(e,t,n);Ct=!!(e.flags&131072)}else Ct=!1,Ne&&t.flags&1048576&&U8(t,Bu,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ko(t.elementType),t.type=e,typeof e=="function")wk(e)?(s=na(e,s),t.tag=1,t=C5(null,t,e,s,n)):(t.tag=0,t=Am(null,t,e,s,n));else{if(e!=null){var r=e.$$typeof;if(r===ck){t.tag=11,t=b5(null,t,e,s,n);break e}else if(r===uk){t.tag=14,t=v5(null,t,e,s,n);break e}else if(r===ur){t.tag=10,t.type=e,t=N5(null,t,n);break e}}throw t=im(e)||e,Error(Z(306,t,""))}}return t;case 0:return Am(e,t,t.type,t.pendingProps,n);case 1:return s=t.type,r=na(s,t.pendingProps),C5(e,t,s,r,n);case 3:e:{if(Kh(t,t.stateNode.containerInfo),e===null)throw Error(Z(387));s=t.pendingProps;var i=t.memoizedState;r=i.element,vm(e,t),pu(t,s,null,n);var o=t.memoizedState;if(s=o.cache,Mi(t,St,s),s!==i.cache&&km(t,[St],n,!0),xu(),s=o.element,i.isDehydrated)if(i={element:s,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=$5(e,t,s,n);break e}else if(s!==r){r=Cs(Error(Z(424)),t),qu(r),t=$5(e,t,s,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(et=Ts(e.firstChild),Kt=t,Ne=!0,Oi=null,$s=!0,n=X8(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Zo(),s===r){t=Jr(e,t,n);break e}At(e,t,s,n)}t=t.child}return t;case 26:return qa(e,t),e===null?(n=ew(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ne||(t.stateNode=T9(t.type,t.pendingProps,Li.current,t)):t.memoizedState=ew(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return am(t),e===null&&Ne&&(s=t.stateNode=O9(t.type,t.pendingProps,Li.current),Kt=t,$s=!0,r=et,so(t.type)?(i0=r,et=Ts(s.firstChild)):et=r),At(e,t,t.pendingProps.children,n),qa(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((r=s=et)&&(s=wq(s,t.type,t.pendingProps,$s),s!==null?(t.stateNode=s,Kt=t,et=Ts(s.firstChild),$s=!1,r=!0):r=!1),r||Xi(t)),am(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,t0(r,i)?s=null:o!==null&&t0(r,o)&&(t.flags|=32),t.memoizedState!==null&&(r=Mk(e,t,mB,null,null,n),Kl._currentValue=r),qa(e,t),At(e,t,s,n),t.child;case 6:return e===null&&Ne&&((e=n=et)&&(n=jq(n,t.pendingProps,$s),n!==null?(t.stateNode=n,Kt=t,et=null,e=!0):e=!1),e||Xi(t)),null;case 13:return D7(e,t,n);case 4:return Kh(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ea(t,null,s,n):At(e,t,s,n),t.child;case 11:return b5(e,t,t.type,t.pendingProps,n);case 7:return s=t.pendingProps,qa(e,t),At(e,t,s,n),t.child;case 8:return At(e,t,t.pendingProps.children,n),t.child;case 12:return At(e,t,t.pendingProps.children,n),t.child;case 10:return N5(e,t,n);case 9:return r=t.type._context,s=t.pendingProps.children,Qo(t),r=on(r),s=s(r),t.flags|=1,At(e,t,s,n),t.child;case 14:return v5(e,t,t.type,t.pendingProps,n);case 15:return L7(e,t,t.type,t.pendingProps,n);case 19:return Im(e,t,n);case 31:return $B(e,t,n);case 22:return O7(e,t,n,t.pendingProps);case 24:return Qo(t),s=on(St),e===null?(r=Ck(),r===null&&(r=Ye,i=Sk(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=n),r=i),t.memoizedState={parent:s,cache:r},Ek(t),Mi(t,St,r)):(e.lanes&n&&(vm(e,t),pu(t,null,null,n),xu()),r=e.memoizedState,i=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),Mi(t,St,s)):(s=i.cache,Mi(t,St,s),s!==r.cache&&km(t,[St],n,!0))),At(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),s=t.pendingProps,s.name!=null&&s.name!=="auto"?t.flags|=e===null?18882560:18874368:Ne&&k1(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:qa(e,t),At(e,t,s.children,n),t.child;case 29:throw t.pendingProps}throw Error(Z(156,t.tag))}function Nr(e){e.flags|=4}function Xp(e,t,n,s,r){var i;if((i=(e.mode&32)!==0)&&(i=n===null?sw(t,s):sw(t,s)&&(s.src!==n.src||s.srcSet!==n.srcSet)),i){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(x9())e.flags|=8192;else throw Go=sx,$k}else e.flags&=-16777217}function A5(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!H9(t))if(x9())e.flags|=8192;else throw Go=sx,$k}function Af(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?u8():536870912,e.lanes|=t,Pl|=t)}function Uc(e,t){if(!Ne)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,s=null;n!==null;)n.alternate!==null&&(s=n),n=n.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function Je(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,s=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags&1206910976,s|=r.flags&1206910976,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=n,t}function NB(e,t,n){var s=t.pendingProps;switch(jk(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Je(t),null;case 1:return Je(t),null;case 3:return n=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Vr(St),Dl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ia(t)?Nr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Fp())),Je(t),null;case 26:var r=t.type,i=t.memoizedState;return e===null?(Nr(t),i!==null?(Je(t),A5(t,i)):(Je(t),Xp(t,r,null,s,n))):i?i!==e.memoizedState?(Nr(t),Je(t),A5(t,i)):(Je(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Nr(t),Je(t),Xp(t,r,e,s,n)),null;case 27:if(Xh(t),n=Li.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nr(t);else{if(!s){if(t.stateNode===null)throw Error(Z(166));return Je(t),t.subtreeFlags&=-33554433,null}e=pr.current,Ia(t)?s5(t):(e=O9(r,s,n),t.stateNode=e,Nr(t))}return Je(t),t.subtreeFlags&=-33554433,null;case 5:if(Xh(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Nr(t);else{if(!s){if(t.stateNode===null)throw Error(Z(166));return Je(t),t.subtreeFlags&=-33554433,null}if(i=pr.current,Ia(t))s5(t);else{var o=Vu(Li.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof s.is=="string"?o.createElement("select",{is:s.is}):o.createElement("select"),s.multiple?i.multiple=!0:s.size&&(i.size=s.size);break;default:i=typeof s.is=="string"?o.createElement(r,{is:s.is}):o.createElement(r)}}i[rn]=t,i[qn]=s;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(cn(i,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&Nr(t)}}return Je(t),t.subtreeFlags&=-33554433,Xp(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Nr(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(Z(166));if(e=Li.current,Ia(t)){if(e=t.stateNode,n=t.memoizedProps,s=null,r=Kt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[rn]=t,e=!!(e.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||$9(e.nodeValue,n)),e||Xi(t,!0)}else e=Vu(e).createTextNode(s),e[rn]=t,t.stateNode=e}return Je(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ia(t),n!==null){if(e===null){if(!s)throw Error(Z(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Z(557));e[rn]=t}else Zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),e=!1}else n=Fp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Yn(t),t):(Yn(t),null);if(t.flags&128)throw Error(Z(558))}return Je(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ia(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(Z(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(Z(317));r[rn]=t}else Zo(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Je(t),r=!1}else r=Fp(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Yn(t),t):(Yn(t),null)}return Yn(t),t.flags&128?(t.lanes=n,t):(n=s!==null,e=e!==null&&e.memoizedState!==null,n&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==r&&(s.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Af(t,t.updateQueue),Je(t),null);case 4:return Dl(),e===null&&Jk(t.stateNode.containerInfo),t.flags|=67108864,Je(t),null;case 10:return Vr(t.type),Je(t),null;case 19:if(Nk(t),s=t.memoizedState,s===null)return Je(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Uc(s,!1);else{if(gt!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(i=ix(e),i!==null){for(t.flags|=128,Uc(s,!1),e=i.updateQueue,t.updateQueue=e,Af(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)H8(n,e),n=n.sibling;return Pu(t,ln.current&1|2),Ne&&Rr(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&ss()>px&&(t.flags|=128,r=!0,Uc(s,!1),t.lanes=4194304)}else{if(!r)if(e=ix(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Af(t,e),Uc(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!i.alternate&&!Ne)return Je(t),null}else 2*ss()-s.renderingStartTime>px&&n!==536870912&&(t.flags|=128,r=!0,Uc(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(e=s.last,e!==null?e.sibling=i:t.child=i,s.last=i)}if(s.tail!==null){e=s.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return s.rendering=e,s.tail=e.sibling,s.renderingStartTime=ss(),e.sibling=null,i=ln.current,i=r?i&1|2:i&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!n||Ne?Pu(t,i):(n=i,nt(dn,t),nt(ln,n),pn===null&&(pn=t)),Ne&&Rr(t,s.treeForkCount),e}return Je(t),null;case 22:case 23:return Yn(t),Tk(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?n&536870912&&!(t.flags&128)&&(Je(t),t.subtreeFlags&6&&(t.flags|=8192)):Je(t),n=t.updateQueue,n!==null&&Af(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==n&&(t.flags|=2048),e!==null&&an(Fo),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vr(St),Je(t),null;case 25:return null;case 30:return t.flags|=33554432,Je(t),null}throw Error(Z(156,t.tag))}function AB(e,t){switch(jk(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vr(St),Dl(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Xh(t),null;case 31:if(t.memoizedState!==null){if(Yn(t),t.alternate===null)throw Error(Z(340));Zo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Yn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Z(340));Zo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Nk(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Dl(),null;case 10:return Vr(t.type),null;case 22:case 23:return Yn(t),Tk(),e!==null&&an(Fo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vr(St),null;case 25:return null;default:return null}}function q7(e,t){switch(jk(t),t.tag){case 3:Vr(St),Dl();break;case 26:case 27:case 5:Xh(t);break;case 4:Dl();break;case 31:t.memoizedState!==null&&Yn(t);break;case 13:Yn(t);break;case 19:Nk(t);break;case 10:Vr(t.type);break;case 22:case 23:Yn(t),Tk(),e!==null&&an(Fo);break;case 24:Vr(St)}}function Nd(e,t){try{var n=t.updateQueue,s=n!==null?n.lastEffect:null;if(s!==null){var r=s.next;n=r;do{if((n.tag&e)===e){s=void 0;var i=n.create,o=n.inst;s=i(),o.destroy=s}n=n.next}while(n!==r)}}catch(l){Ge(t,t.return,l)}}function Yi(e,t,n){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var i=r.next;s=i;do{if((s.tag&e)===e){var o=s.inst,l=o.destroy;if(l!==void 0){o.destroy=void 0,r=t;var c=n,u=l;try{u()}catch(d){Ge(r,c,d)}}}s=s.next}while(s!==i)}}catch(d){Ge(t,t.return,d)}}function H7(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Y8(t,n)}catch(s){Ge(e,e.return,s)}}}function P7(e,t,n){n.props=na(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(s){Ge(e,t,s)}}function or(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:var r=e.stateNode,i=Zr(e.memoizedProps,r);(r.ref===null||r.ref.name!==i)&&(r.ref=M9(i)),s=r.ref;break;case 7:if(e.stateNode===null){var o=new ds(e);Bn(e.child,!1,bq,o,void 0,void 0),e.stateNode=o}s=e.stateNode;break;default:s=e.stateNode}typeof n=="function"?e.refCleanup=n(s):n.current=s}}catch(l){Ge(e,t,l)}}function sn(e,t){var n=e.ref,s=e.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(r){Ge(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){Ge(e,t,r)}else n.current=null}function ux(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)_9(e.stateNode,t[n])}function M5(e){for(var t=e.return;t!==null&&(Vk(t)&&_9(e.stateNode,t.stateNode),!Gk(t));)t=t.return}function yu(e){for(var t=e.return;t!==null&&(Vk(t)&&vq(e.stateNode,t.stateNode),!Gk(t));)t=t.return}function Gk(e){return e.tag===5||e.tag===3||e.tag===27}function Vk(e){return e&&e.tag===7&&e.stateNode!==null}function _m(e){var t=e.type,n=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&s.focus();break e;case"img":n.src?s.src=n.src:n.srcSet&&(s.srcset=n.srcSet)}}catch(r){Ge(e,e.return,r)}}function Zp(e,t,n){try{var s=e.stateNode;nq(s,e.type,n,t),s[qn]=t}catch(r){Ge(e,e.return,r)}}function U7(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&so(e.type)||e.tag===4}function Yp(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||U7(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&&so(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Lm(e,t,n,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(r,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(r),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=dr)),ux(e,s),De=!0;else if(r!==4&&(r===27&&(ux(e,s),s=null,so(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Lm(e,t,n,s),e=e.sibling;e!==null;)Lm(e,t,n,s),e=e.sibling}function dx(e,t,n,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?n.insertBefore(r,t):n.appendChild(r),ux(e,s),De=!0;else if(r!==4&&(r===27&&(ux(e,s),s=null,so(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(dx(e,t,n,s),e=e.sibling;e!==null;)dx(e,t,n,s),e=e.sibling}function F7(e){var t=e.stateNode,n=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);cn(t,s,n),t[rn]=e,t[qn]=n}catch(i){Ge(e,e.return,i)}}var fx=!1,Qn=null;function z5(e){(e.tag===30||e.subtreeFlags&33554432)&&(fx=!0)}var lr=null;function R5(){var e=lr;return lr=null,e}var Ln=0;function xc(e,t,n,s,r){return Ln=0,G7(e.child,t,n,s,r)}function G7(e,t,n,s,r){for(var i=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(s!==null){var l=n0(o);s.push(l),l.view&&(i=!0)}else i||n0(o).view&&(i=!0);fx=!0,N9(o,Ln===0?t:t+"_"+Ln,n),Ln++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||G7(e.child,t,n,s,r)&&(i=!0));e=e.sibling}return i}function kr(e,t){for(;e!==null;)e.tag===5?A9(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||kr(e.child,t)),e=e.sibling}function dh(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(dh(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(Z(544));var n=t.name;t=ii(t.default,t.share),t!=="none"&&(xc(e,n,t,null,!1)||kr(e.child,!1))}e=e.sibling}}function Om(e,t){if(e.tag===30){var n=e.stateNode,s=e.memoizedProps,r=Zr(s,n),i=ii(s.default,n.paired?s.share:s.enter);i!=="none"?xc(e,r,i,null,!1)?(dh(e),n.paired||t||Ul(e,s.onEnter)):kr(e.child,!1):dh(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Om(e,t),e=e.sibling;else dh(e)}function Dm(e){if(Qn!==null&&Qn.size!==0){var t=Qn;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,s=n.name;if(s!=null&&s!=="auto"){var r=t.get(s);if(r!==void 0){var i=ii(n.default,n.share);if(i!=="none"&&(xc(e,s,i,null,!1)?(i=e.stateNode,r.paired=i,i.paired=r,Ul(e,n.onShare)):kr(e.child,!1)),t.delete(s),t.size===0)break}}}Dm(e)}e=e.sibling}}}function Bm(e){if(e.tag===30){var t=e.memoizedProps,n=Zr(t,e.stateNode),s=Qn!==null?Qn.get(n):void 0,r=ii(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(xc(e,n,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,Qn.delete(n),Ul(e,t.onShare)):Ul(e,t.onExit):kr(e.child,!1)),Qn!==null&&Dm(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Bm(e),e=e.sibling;else Qn!==null&&Dm(e)}function V7(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Zr(t,e.stateNode);t=ii(t.default,t.update),e.flags&=-5,t!=="none"&&xc(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&V7(e);e=e.sibling}}function qm(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,kr(e.child,!1))}qm(e)}e=e.sibling}}function fh(e){if(e.tag===30)e.stateNode.paired=null,kr(e.child,!1),qm(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)fh(e),e=e.sibling;else qm(e)}function W7(e){for(e=e.child;e!==null;)e.tag===30?kr(e.child,!1):e.subtreeFlags&33554432&&W7(e),e=e.sibling}function Wk(e,t,n,s,r,i,o){for(var l=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(i!==null&&Ln<i.length){var u=i[Ln],d=n0(c);(u.view||d.view)&&(l=!0);var h;if(h=(e.flags&4)===0)if(d.clip)h=!0;else{h=u.rect;var f=d.rect;h=h.y!==f.y||h.x!==f.x||h.height!==f.height||h.width!==f.width}h&&(e.flags|=4),d.abs?d=!u.abs:(u=u.rect,d=d.rect,d=u.height!==d.height||u.width!==d.width),d&&(e.flags|=32)}else e.flags|=32;e.flags&4&&N9(c,Ln===0?n:n+"_"+Ln,r),l&&e.flags&4||(lr===null&&(lr=[]),lr.push(c,Ln===0?s:s+"_"+Ln,t.memoizedProps)),Ln++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:Wk(e,t.child,n,s,r,i,o)&&(l=!0));t=t.sibling}return l}function K7(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,s=e.stateNode,r=Zr(n,s),i=ii(n.default,n.update),o;o=e.memoizedState,e.memoizedState=null,s=e;var l=e.child;Ln=0,r=Wk(s,l,r,r,i,o,!1),e.flags&4&&r&&Ul(e,n.onUpdate)}else e.subtreeFlags&33554432&&K7(e);e=e.sibling}}var Ut=!1,He=!1,Js=!1,Qp=!1,I5=typeof WeakSet=="function"?WeakSet:Set,Gt=null,er=!1,su=!1,hx=!1,Hm=!1;function MB(e,t,n){if(e=e.containerInfo,Jm=Xl,e=R8(e),kk(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{s.nodeType,o.nodeType}catch{s=null;break e}var l=0,c=-1,u=-1,d=0,h=0,f=e,p=null;t:for(;;){for(var g;f!==s||i!==0&&f.nodeType!==3||(c=l+i),f!==o||r!==0&&f.nodeType!==3||(u=l+r),f.nodeType===3&&(l+=f.nodeValue.length),(g=f.firstChild)!==null;)p=f,f=g;for(;;){if(f===e)break t;if(p===s&&++d===i&&(c=l),p===o&&++h===r&&(u=l),(g=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=g}s=c===-1||u===-1?null:{start:c,end:u}}else s=null}s=s||{start:0,end:0}}else s=null;for(e0={focusedElem:e,selectionRange:s},Xl=!1,n=(n&335544064)===n,Gt=t,t=n?9270:1024;Gt!==null;){if(e=Gt,n&&(s=e.deletions,s!==null))for(i=0;i<s.length;i++)n&&Bm(s[i]);if(e.alternate===null&&e.flags&2)n&&z5(e),Mf(n);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&n&&Bm(s),Mf(n);continue}else if(s!==null&&s.memoizedState!==null){n&&z5(e),Mf(n);continue}}s=e.child,e.subtreeFlags&t&&s!==null?(s.return=e,Gt=s):(n&&V7(e),Mf(n))}}Qn=null}function Mf(e){for(;Gt!==null;){var t=Gt,n=e,s=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(r&1024&&s!==null){n=void 0,r=s.memoizedProps,s=s.memoizedState;var i=t.stateNode;try{var o=na(t.type,r);n=i.getSnapshotBeforeUpdate(o,s),i.__reactInternalSnapshotBeforeUpdate=n}catch(l){Ge(t,t.return,l)}}break;case 3:if(r&1024){if(s=t.stateNode.containerInfo,n=s.nodeType,n===9)s0(s);else if(n===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":s0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&s!==null&&(n=Zr(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=ii(r.default,r.update),r!=="none"&&xc(s,n,r,s.memoizedState=[],!0));break;default:if(r&1024)throw Error(Z(163))}if(s=t.sibling,s!==null){s.return=t.return,Gt=s;break}Gt=t.return}}function X7(e,t,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:tr(e,n),s&4&&Nd(5,n);break;case 1:if(tr(e,n),s&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){Ge(n,n.return,o)}else{var r=na(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Ge(n,n.return,o)}}s&64&&H7(n),s&512&&or(n,n.return);break;case 3:if(tr(e,n),s&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{Y8(e,t)}catch(o){Ge(n,n.return,o)}}break;case 27:t===null&&s&4&&F7(n);case 26:case 5:tr(e,n),t===null&&s&4&&_m(n),s&512&&or(n,n.return);break;case 12:tr(e,n);break;case 31:tr(e,n),s&4&&J7(e,n);break;case 13:tr(e,n),s&4&&e9(e,n),s&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=UB.bind(null,n),Sq(e,n))));break;case 22:if(s=n.memoizedState!==null||Ut,!s){var i=t!==null&&t.memoizedState!==null||He;t=Ut,r=He,Ut=s,(He=i)&&!r?(s=2,n.subtreeFlags&8772&&(s|=1),Ds(e,n,s)):tr(e,n),Ut=t,He=r}break;case 30:tr(e,n),s&512&&or(n,n.return);break;case 7:s&512&&or(n,n.return);default:tr(e,n)}}function Pm(e,t){for(e=e.child;e!==null;)Z7(e,t),e=e.sibling}function Z7(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var s=n.style;typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none"}else{var r=e.stateNode,i=e.memoizedProps.style,o=i!=null&&i.hasOwnProperty("display")?i.display:null;r.style.display=o==null||typeof o=="boolean"?"":(""+o).trim()}}catch(c){Ge(e,e.return,c)}Um(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,De=!0}catch(c){Ge(e,e.return,c)}break;case 18:try{var l=e.stateNode;t?K5(l,!0):K5(e.stateNode,!1)}catch(c){Ge(e,e.return,c)}break;case 22:case 23:e.memoizedState===null&&Pm(e,t);break;default:Pm(e,t)}}function Um(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,s=t;switch(n.tag){case 4:Z7(n,s);break e;case 22:n.memoizedState===null&&Um(n,s);break e;default:Um(n,s)}}e=e.sibling}}function Y7(e){var t=e.alternate;t!==null&&(e.alternate=null,Y7(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&h1(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 ot=null,Rn=!1;function Os(e,t,n){for(n=n.child;n!==null;)Q7(e,t,n),n=n.sibling}function Q7(e,t,n){if(rs&&typeof rs.onCommitFiberUnmount=="function")try{rs.onCommitFiberUnmount(wd,n)}catch{}switch(n.tag){case 26:He||sn(n,t),Os(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!He&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:He||sn(n,t),yu(n);var s=ot,r=Rn;so(n.type)&&(ot=n.stateNode,Rn=!1),Os(e,t,n),D9(n.stateNode,n.type,n.memoizedProps),ot=s,Rn=r;break;case 5:He||sn(n,t),yu(n);case 6:if(n.tag===6&&yu(n),s=ot,r=Rn,ot=null,Os(e,t,n),ot=s,Rn=r,ot!==null)if(Rn)try{(ot.nodeType===9?ot.body:ot.nodeName==="HTML"?ot.ownerDocument.body:ot).removeChild(n.stateNode),De=!0}catch(i){Ge(n,t,i)}else try{ot.removeChild(n.stateNode),De=!0}catch(i){Ge(n,t,i)}break;case 18:ot!==null&&(Rn?(e=ot,W5(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Zl(e)):W5(ot,n.stateNode));break;case 4:s=ot,r=Rn,ot=n.stateNode.containerInfo,Rn=!0,Os(e,t,n),ot=s,Rn=r;break;case 0:case 11:case 14:case 15:Yi(2,n,t),He||Yi(4,n,t),Os(e,t,n);break;case 1:He||(sn(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"&&P7(n,t,s)),Os(e,t,n);break;case 21:Os(e,t,n);break;case 22:He=(s=He)||n.memoizedState!==null,Os(e,t,n),He=s;break;case 30:sn(n,t),Os(e,t,n);break;case 7:He||sn(n,t),Os(e,t,n);break;default:Os(e,t,n)}}function J7(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Zl(e)}catch(n){Ge(t,t.return,n)}}}function e9(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Zl(e)}catch(n){Ge(t,t.return,n)}}function zB(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new I5),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new I5),t;default:throw Error(Z(435,e.tag))}}function zf(e,t){var n=zB(e);t.forEach(function(s){if(!n.has(s)){n.add(s);var r=FB.bind(null,e,s);s.then(r,r)}})}function wn(e,t,n){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var i=s[r],o=e,l=t,c=l;e:for(;c!==null;){switch(c.tag){case 27:if(so(c.type)){ot=c.stateNode,Rn=!1;break e}break;case 5:ot=c.stateNode,Rn=!1;break e;case 3:case 4:ot=c.stateNode.containerInfo,Rn=!0;break e}c=c.return}if(ot===null)throw Error(Z(160));Q7(o,l,i),ot=null,Rn=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)t9(t,e,n),t=t.sibling}var Us=null;function t9(e,t,n){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(r&4&&(s=e.updateQueue,s=s!==null?s.events:null,s!==null))for(var i=0;i<s.length;i++){var o=s[i];o.ref.impl=o.nextImpl}wn(t,e,n),jn(e),r&4&&(Yi(3,e,e.return),Nd(3,e),Yi(5,e,e.return));break;case 1:wn(t,e,n),jn(e),r&512&&(He||s===null||sn(s,s.return)),r&64&&Ut&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(i=Us,wn(t,e,n),jn(e),r&512&&(He||s===null||sn(s,s.return)),r&4)if(r=s!==null?s.memoizedState:null,n=e.memoizedState,s===null)if(n===null)if(e.stateNode===null)if(Ut)e.stateNode=T9(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,r=i.ownerDocument||i;t:switch(t){case"title":s=r.getElementsByTagName("title")[0],(!s||s[Cd]||s[rn]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),cn(s,t,n),s[rn]=e,Vt(s),t=s;break e;case"link":if(i=nw("link","href",r).get(t+(n.href||""))){for(o=0;o<i.length;o++)if(s=i[o],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){i.splice(o,1);break t}}s=r.createElement(t),cn(s,t,n),r.head.appendChild(s);break;case"meta":if(i=nw("meta","content",r).get(t+(n.content||""))){for(o=0;o<i.length;o++)if(s=i[o],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){i.splice(o,1);break t}}s=r.createElement(t),cn(s,t,n),r.head.appendChild(s);break;default:throw Error(Z(468,t))}s[rn]=e,Vt(s),t=s}e.stateNode=t}else Ut||o0(i,e.type,e.stateNode);else e.stateNode=tw(i,n,e.memoizedProps);else r!==n?(r===null?(t=s.stateNode,t===null||He||t.parentNode.removeChild(t)):r.count--,n===null?Ut||o0(i,e.type,e.stateNode):tw(i,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Zp(e,e.memoizedProps,s.memoizedProps);break;case 27:wn(t,e,n),jn(e),r&512&&(He||s===null||sn(s,s.return)),s!==null&&r&4&&Zp(e,e.memoizedProps,s.memoizedProps);break;case 5:if(i=Js,Js=!1,wn(t,e,n),Js=i,jn(e),r&512&&(He||s===null||sn(s,s.return)),e.flags&32){t=e.stateNode;try{ql(t,""),De=!0}catch(d){Ge(e,e.return,d)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,Zp(e,t,s!==null?s.memoizedProps:t)),r&1024&&(Qp=!0);break;case 6:if(wn(t,e,n),jn(e),r&4){if(e.stateNode===null)throw Error(Z(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,De=!0}catch(d){Ge(e,e.return,d)}}break;case 3:if(De=!1,gh=null,i=Us,Us=Wu(t.containerInfo),wn(t,e,n),Us=i,jn(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Zl(t.containerInfo)}catch(d){Ge(e,e.return,d)}Qp&&(Qp=!1,n9(e)),De=!1;break;case 4:r=Js,Js=Ut,s=B2(),i=Us,Us=Wu(e.stateNode.containerInfo),wn(t,e,n),jn(e),Us=i,De&&su&&(hx=!0),De=s,Js=r;break;case 12:wn(t,e,n),jn(e);break;case 31:wn(t,e,n),jn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zf(e,t)));break;case 13:wn(t,e,n),jn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&($1=ss()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zf(e,t)));break;case 22:i=e.memoizedState!==null,o=s!==null&&s.memoizedState!==null;var l=Ut,c=He,u=Js;Ut=l||i,Js=u||i,He=c||o,wn(t,e,n),He=c,Js=u,Ut=l,jn(e),r&8192&&(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,!i||s===null||o||Ut||He||(t=o||He,n=Ut,s=He,Ut=i||Ut,He=t,yi(e,2),Ut=n,He=s),!i&&Js||Pm(e,i)),r&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,zf(e,n))));break;case 19:wn(t,e,n),jn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zf(e,t)));break;case 30:r&512&&(He||s===null||sn(s,s.return)),r=B2(),i=su,o=(n&335544064)===n,l=e.memoizedProps,su=o&&ii(l.default,l.update)!=="none",wn(t,e,n),jn(e),o&&s!==null&&De&&(e.flags|=4),su=i,De=r;break;case 21:break;case 7:r&512&&(He||s===null||sn(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:wn(t,e,n),jn(e)}}function jn(e){var t=e.flags;if(t&2){try{for(var n,s=e.return;s!==null;){if(U7(s)){n=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(Vk(r)){var i=r.stateNode;s===null?s=[i]:s.push(i)}if(Gk(r))break;r=r.return}var o=s;if(n==null)throw Error(Z(160));switch(n.tag){case 27:var l=n.stateNode,c=Yp(e);dx(e,c,l,o);break;case 5:var u=n.stateNode;n.flags&32&&(ql(u,""),n.flags&=-33);var d=Yp(e);dx(e,d,u,o);break;case 3:case 4:var h=n.stateNode.containerInfo,f=Yp(e);Lm(e,f,h,o);break;default:throw Error(Z(161))}}catch(p){Ge(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function n9(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;n9(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,Xl=!0,t.reset(),Xl=!1),e=e.sibling}}function _a(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)s9(t,e),t=t.sibling;else K7(t)}function s9(e,t){var n=e.alternate;if(n===null)Om(e,!1);else switch(e.tag){case 3:if(Hm=er=!1,R5(),_a(t,e),!er&&!hx){if(e=lr,e!==null)for(var s=0;s<e.length;s+=3){n=e[s];var r=e[s+1];A9(n,e[s+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+r+")"})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===""&&(e.style.viewTransitionName="none",e.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),Hm=!0}lr=null;break;case 5:_a(t,e);break;case 4:s=er,er=!1,_a(t,e),er&&(hx=!0),er=s;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?Om(e,!1):_a(t,e));break;case 30:s=er,r=R5(),er=!1,_a(t,e),er&&(e.flags|=4);var i=e.memoizedProps,o=e.stateNode;t=Zr(i,o),o=Zr(n.memoizedProps,o);var l=ii(i.default,i.update);l==="none"?t=!1:(i=n.memoizedState,n.memoizedState=null,n=e.child,Ln=0,t=Wk(e,n,t,o,l,i,!0),Ln!==(i===null?0:i.length)&&(e.flags|=32)),e.flags&4&&t?(Ul(e,e.memoizedProps.onUpdate),lr=r):r!==null&&(r.push.apply(r,lr),lr=r),er=e.flags&32?!0:s;break;default:_a(t,e)}}function tr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)X7(e,t.alternate,t),t=t.sibling}function yi(e,t){for(e=e.child;e!==null;){var n=e,s=t;switch(n.tag){case 0:case 11:case 14:case 15:Yi(4,n,n.return),yi(n,s);break;case 1:sn(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&P7(n,n.return,r),yi(n,s);break;case 27:s&2&&D9(n.stateNode,n.type,n.memoizedProps);case 5:sn(n,n.return),n.tag!==5&&n.tag!==27||yu(n),yi(n,s);break;case 6:yu(n);break;case 26:sn(n,n.return),r=n.stateNode,n.memoizedState!==null||r===null||He||r.parentNode.removeChild(r),yi(n,s);break;case 22:n.memoizedState===null&&yi(n,s);break;case 30:sn(n,n.return),yi(n,s);break;case 7:sn(n,n.return);default:yi(n,s)}e=e.sibling}}function Ds(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var s=t.alternate,r=e,i=t,o=i.flags,l=(n&1)!==0;switch(i.tag){case 0:case 11:case 15:Ds(r,i,n),Nd(4,i);break;case 1:if(Ds(r,i,n),s=i,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(d){Ge(s,s.return,d)}if(s=i,r=s.updateQueue,r!==null){var c=s.stateNode;try{var u=r.shared.hiddenCallbacks;if(u!==null)for(r.shared.hiddenCallbacks=null,r=0;r<u.length;r++)Z8(u[r],c)}catch(d){Ge(s,s.return,d)}}l&&o&64&&H7(i),or(i,i.return);break;case 27:n&2&&F7(i);case 5:i.tag!==5&&i.tag!==27||M5(i),Ds(r,i,n),l&&s===null&&o&4&&_m(i),or(i,i.return);break;case 6:M5(i);break;case 26:c=i.stateNode,i.memoizedState!==null||c===null||Ut||o0(Wu(c.ownerDocument),i.type,c),Ds(r,i,n),l&&s===null&&o&4&&_m(i),or(i,i.return);break;case 12:Ds(r,i,n);break;case 31:Ds(r,i,n),l&&o&4&&J7(r,i);break;case 13:Ds(r,i,n),l&&o&4&&e9(r,i);break;case 22:i.memoizedState===null&&Ds(r,i,n),or(i,i.return);break;case 30:Ds(r,i,n),or(i,i.return);break;case 7:or(i,i.return);default:Ds(r,i,n)}t=t.sibling}}function Kk(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&&Ed(n))}function Xk(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ed(e))}function hs(e,t,n,s){var r=(n&335544064)===n;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)r9(e,t,n,s),t=t.sibling;else r&&W7(t)}function r9(e,t,n,s){var r=(n&335544064)===n;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&fh(t);var i=t.flags;switch(t.tag){case 0:case 11:case 15:hs(e,t,n,s),i&2048&&Nd(9,t);break;case 1:hs(e,t,n,s);break;case 3:hs(e,t,n,s),r&&Hm&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,e.style.viewTransitionName==="root"&&(e.style.viewTransitionName=""),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName==="none"&&(e.style.viewTransitionName="")),i&2048&&(i=null,t.alternate!==null&&(i=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==i&&(t.refCount++,i!=null&&Ed(i)));break;case 12:if(i&2048){hs(e,t,n,s),i=t.stateNode;try{var o=t.memoizedProps,l=o.id,c=o.onPostCommit;typeof c=="function"&&c(l,t.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(u){Ge(t,t.return,u)}}else hs(e,t,n,s);break;case 31:hs(e,t,n,s);break;case 13:hs(e,t,n,s);break;case 23:break;case 22:o=t.stateNode,l=t.alternate,t.memoizedState!==null?(r&&l!==null&&l.memoizedState===null&&fh(l),o._visibility&2?hs(e,t,n,s):ku(e,t)):(r&&l!==null&&l.memoizedState!==null&&fh(t),o._visibility&2?hs(e,t,n,s):(o._visibility|=2,Ha(e,t,n,s,(t.subtreeFlags&10256)!==0||!1))),i&2048&&Kk(l,t);break;case 24:hs(e,t,n,s),i&2048&&Xk(t.alternate,t);break;case 30:r&&(i=t.alternate,i!==null&&(kr(i.child,!0),kr(t.child,!0))),hs(e,t,n,s);break;default:hs(e,t,n,s)}}function Ha(e,t,n,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,l=n,c=s,u=o.flags;switch(o.tag){case 0:case 11:case 15:Ha(i,o,l,c,r),Nd(8,o);break;case 23:break;case 22:var d=o.stateNode;o.memoizedState!==null?d._visibility&2?Ha(i,o,l,c,r):ku(i,o):(d._visibility|=2,Ha(i,o,l,c,r)),r&&u&2048&&Kk(o.alternate,o);break;case 24:Ha(i,o,l,c,r),r&&u&2048&&Xk(o.alternate,o);break;default:Ha(i,o,l,c,r)}t=t.sibling}}function ku(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,s=t,r=s.flags;switch(s.tag){case 22:ku(n,s),r&2048&&Kk(s.alternate,s);break;case 24:ku(n,s),r&2048&&Xk(s.alternate,s);break;default:ku(n,s)}t=t.sibling}}var bo=8192;function xo(e,t,n){if(e.subtreeFlags&bo)for(e=e.child;e!==null;)i9(e,t,n),e=e.sibling}function i9(e,t,n){switch(e.tag){case 26:xo(e,t,n),e.flags&bo&&(e.memoizedState!==null?Dq(n,Us,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&rw(n,e)));break;case 5:xo(e,t,n),e.flags&bo&&(e=e.stateNode,(t&335544128)===t&&rw(n,e));break;case 3:case 4:var s=Us;Us=Wu(e.stateNode.containerInfo),xo(e,t,n),Us=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=bo,bo=16777216,xo(e,t,n),bo=s):xo(e,t,n));break;case 30:if(e.flags&bo&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,Qn===null&&(Qn=new Map),Qn.set(s,r)}xo(e,t,n);break;default:xo(e,t,n)}}function o9(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 Fc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];Gt=s,l9(s,e)}o9(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)a9(e),e=e.sibling}function a9(e){switch(e.tag){case 0:case 11:case 15:Fc(e),e.flags&2048&&Yi(9,e,e.return);break;case 3:Fc(e);break;case 12:Fc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hh(e)):Fc(e);break;default:Fc(e)}}function hh(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];Gt=s,l9(s,e)}o9(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yi(8,t,t.return),hh(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,hh(t));break;default:hh(t)}e=e.sibling}}function l9(e,t){for(;Gt!==null;){var n=Gt;switch(n.tag){case 0:case 11:case 15:Yi(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var s=n.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:Ed(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,Gt=s;else e:for(n=e;Gt!==null;){s=Gt;var r=s.sibling,i=s.return;if(Y7(s),s===n){Gt=null;break e}if(r!==null){r.return=i,Gt=r;break e}Gt=i}}}var RB={getCacheForType:function(e){var t=on(St),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return on(St).controller.signal}},IB=typeof WeakMap=="function"?WeakMap:Map,Be=0,Ye=null,Me=null,ze=0,Ue=0,Kn=null,zi=!1,pc=!1,Zk=!1,ei=0,gt=0,Qi=0,Vo=0,xx=0,Jn=0,Pl=0,bu=null,In=null,Fm=!1,$1=0,c9=0,px=1/0,gx=null,Pi=null,ft=0,Vs=null,sa=null,gr=0,Gm=0,Vm=null,u9=null,hl=null,xl=null,pl=null,vu=0,xh=null;function os(){return Be&2&&ze!==0?ze&-ze:we.T!==null?Qk():x8()}function d9(){if(Jn===0)if(!(ze&536870912)||Ne){var e=vf;vf<<=1,!(vf&3932160)&&(vf=262144),Jn=e}else Jn=536870912;return e=dn.current,e!==null&&(e.flags|=32),Jn}function Ul(e,t){if(t!=null){var n=e.stateNode,s=n.ref;s===null&&(s=n.ref=M9(Zr(e.memoizedProps,n))),xl===null&&(xl=[]),xl.push(t.bind(null,s))}}function Dn(e,t,n){(e===Ye&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(Fl(e,0),Ri(e,ze,Jn,!1)),Sd(e,n),(!(Be&2)||e!==Ye)&&(e===Ye&&(!(Be&2)&&(Vo|=n),gt===4&&Ri(e,ze,Jn,!1)),Cr(e))}function f9(e,t,n){if(Be&6)throw Error(Z(327));var s=!n&&(t&127)===0&&(t&e.expiredLanes)===0||jd(e,t),r=s?OB(e,t):Jp(e,t,!0),i=s;do{if(r===0){pc&&!s&&Ri(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!_B(n)){r=Jp(e,t,!1),i=!1;continue}if(r===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var l=e;r=bu;var c=l.current.memoizedState.isDehydrated;if(c&&(Fl(l,o).flags|=256),o=Jp(l,o,!1),o!==2&&o!==6){if(Zk&&!c){l.errorRecoveryDisabledLanes|=i,Vo|=i,r=4;break e}i=In,In=r,i!==null&&(In===null?In=i:In.push.apply(In,i))}r=o}if(i=!1,r!==2)continue}}if(r===1){Fl(e,0),Ri(e,t,0,!0);break}e:{switch(s=e,i=r,i){case 0:case 1:throw Error(Z(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ri(s,t,Jn,!zi);break e;case 2:In=null;break;case 3:case 5:break;default:throw Error(Z(329))}if((t&62914560)===t&&(r=$1+300-ss(),10<r)){if(Ri(s,t,Jn,!zi),f1(s,0,!0)!==0)break e;gr=t,s.timeoutHandle=eb(_5.bind(null,s,n,In,gx,Fm,t,Jn,Vo,Pl,zi,i,"Throttled",-0,0),r);break e}_5(s,n,In,gx,Fm,t,Jn,Vo,Pl,zi,i,null,-0,0)}}break}while(!0);Cr(e)}function _5(e,t,n,s,r,i,o,l,c,u,d,h,f,p){e.timeoutHandle=-1;var g=t.subtreeFlags,b=(i&335544064)===i;if(h=null,(b||g&8192||(g&16785408)===16785408)&&(h={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:dr},Qn=null,i9(t,i,h),b&&(g=h,b=e.containerInfo,b=(b.nodeType===9?b:b.ownerDocument).__reactViewTransition,b!=null&&(g.count++,g.waitingForViewTransition=!0,g=Ku.bind(g),b.finished.then(g,g))),g=(i&62914560)===i?$1-ss():(i&4194048)===i?c9-ss():0,g=Bq(h,g),g!==null)){gr=i,e.cancelPendingCommit=g(O5.bind(null,e,t,i,n,s,r,o,l,c,u,d,h,null,f,p)),Ri(e,i,o,!u);return}O5(e,t,i,n,s,r,o,l,c,u,d,h)}function _B(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 s=0;s<n.length;s++){var r=n[s],i=r.getSnapshot;r=r.value;try{if(!cs(i(),r))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 Ri(e,t,n,s){t=c8(e,t),t&=~xx,t&=~Vo,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var i=31-is(r),o=1<<i;s[i]=-1,r&=~o}n!==0&&d8(e,n,t)}function E1(){return Be&6?!0:(Ad(0),!1)}function Yk(){if(Me!==null){if(Ue===0)var e=Me.return;else e=Me,qr=ma=null,Ik(e),ul=null,Hu=0,e=Me;for(;e!==null;)q7(e.alternate,e),e=e.return;Me=null}}function Fl(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,iq(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),gr=0,Yk(),Ye=e,Me=n=Gr(e.current,null),ze=t,Ue=0,Kn=null,zi=!1,pc=jd(e,t),Zk=!1,Pl=Jn=xx=Vo=Qi=gt=0,In=bu=null,Fm=!1,ei=c8(e,t),m1(),n}function h9(e,t){Ee=null,we.H=lx,t===hc||t===b1?(t=l5(),Ue=3):t===$k?(t=l5(),Ue=4):Ue=t===Pk?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Kn=t,Me===null&&(gt=1,cx(e,Cs(t,e.current)))}function x9(){var e=dn.current;return e===null?!0:(ze&4194048)===ze?pn===null:(ze&62914560)===ze||ze&536870912?e===pn:!1}function p9(){var e=we.H;return we.H=lx,e===null?lx:e}function g9(){var e=we.A;return we.A=RB,e}function mx(){gt=4,zi||(ze&4194048)!==ze&&dn.current!==null||(pc=!0),!(Qi&134217727)&&!(Vo&134217727)||Ye===null||Ri(Ye,ze,Jn,!1)}function Jp(e,t,n){var s=Be;Be|=2;var r=p9(),i=g9();(Ye!==e||ze!==t)&&(gx=null,Fl(e,t)),t=!1;var o=gt;e:do try{if(Ue!==0&&Me!==null){var l=Me,c=Kn;switch(Ue){case 8:Yk(),o=6;break e;case 3:case 2:case 9:case 6:dn.current===null&&(t=!0);var u=Ue;if(Ue=0,Kn=null,nl(e,l,c,u),n&&pc){o=0;break e}break;default:u=Ue,Ue=0,Kn=null,nl(e,l,c,u)}}LB(),o=gt;break}catch(d){h9(e,d)}while(!0);return t&&e.shellSuspendCounter++,qr=ma=null,Be=s,we.H=r,we.A=i,Me===null&&(Ye=null,ze=0,m1()),o}function LB(){for(;Me!==null;)m9(Me)}function OB(e,t){var n=Be;Be|=2;var s=p9(),r=g9();Ye!==e||ze!==t?(gx=null,px=ss()+500,Fl(e,t)):pc=jd(e,t);e:do try{if(Ue!==0&&Me!==null){t=Me;var i=Kn;t:switch(Ue){case 1:Ue=0,Kn=null,nl(e,t,i,1);break;case 2:case 9:if(a5(i)){Ue=0,Kn=null,L5(t);break}t=function(){Ue!==2&&Ue!==9||Ye!==e||(Ue=7),Cr(e)},i.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:a5(i)?(Ue=0,Kn=null,L5(t)):(Ue=0,Kn=null,nl(e,t,i,7));break;case 5:var o=null;switch(Me.tag){case 26:o=Me.memoizedState;case 5:case 27:var l=Me;if(o?H9(o):l.stateNode.complete){Ue=0,Kn=null;var c=l.sibling;if(c!==null)Me=c;else{var u=l.return;u!==null?(Me=u,T1(u)):Me=null}break t}}Ue=0,Kn=null,nl(e,t,i,5);break;case 6:Ue=0,Kn=null,nl(e,t,i,6);break;case 8:Yk(),gt=6;break e;default:throw Error(Z(462))}}DB();break}catch(d){h9(e,d)}while(!0);return qr=ma=null,we.H=s,we.A=r,Be=n,Me!==null?0:(Ye=null,ze=0,m1(),gt)}function DB(){for(;Me!==null&&!tD();)m9(Me)}function m9(e){var t=B7(e.alternate,e,ei);e.memoizedProps=e.pendingProps,t===null?T1(e):Me=t}function L5(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=S5(n,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=S5(n,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Ik(t);var s=t;s===Kt&&(Ne?(tx(s),s.tag===5&&s.stateNode!=null&&(et=s.stateNode)):(tx(s),Ne=!0));default:q7(n,t),t=Me=H8(t,ei),t=B7(n,t,ei)}e.memoizedProps=e.pendingProps,t===null?T1(e):Me=t}function nl(e,t,n,s){qr=ma=null,Ik(t),ul=null,Hu=0;var r=t.return;try{if(CB(e,r,t,n,ze)){gt=1,cx(e,Cs(n,e.current)),Me=null;return}}catch(i){if(r!==null)throw Me=r,i;gt=1,cx(e,Cs(n,e.current)),Me=null;return}t.flags&32768?(Ne||s===1?e=!0:pc||ze&536870912?e=!1:(zi=e=!0,(s===2||s===9||s===3||s===6)&&(s=dn.current,s!==null&&s.tag===13&&(s.flags|=16384))),y9(t,e)):T1(t)}function T1(e){var t=e;do{if(t.flags&32768){y9(t,zi);return}e=t.return;var n=NB(t.alternate,t,ei);if(n!==null){Me=n;return}if(t=t.sibling,t!==null){Me=t;return}Me=t=e}while(t!==null);gt===0&&(gt=5)}function y9(e,t){do{var n=AB(e.alternate,e);if(n!==null){n.flags&=32767,Me=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Me=e;return}Me=e=n}while(e!==null);gt=6,Me=null}function O5(e,t,n,s,r,i,o,l,c,u,d,h){e.cancelPendingCommit=null;do N1();while(ft!==0);if(Be&6)throw Error(Z(327));if(t!==null){if(t===e.current)throw Error(Z(177));e===Ye&&(Me=Ye=null,ze=0),sa=t,Vs=e,gr=n,Vm=r,u9=s,BB(e,t,n,o,l,c,h)}}function BB(e,t,n,s,r,i,o){var l=t.lanes|t.childLanes;if(Gm=l,l|=bk,dD(e,n,l,s,r,i),xl=null,(n&335544064)===n?(pl=hB(e),s=10262):(pl=null,s=10256),t.subtreeFlags&s||t.flags&s?(e.callbackNode=null,e.callbackPriority=0,GB(Zh,function(){return Zm(),null})):(e.callbackNode=null,e.callbackPriority=0),fx=!1,s=(t.flags&13878)!==0,t.subtreeFlags&13878||s){s=we.T,we.T=null,r=qe.p,qe.p=2,i=Be,Be|=4;try{MB(e,t,n)}finally{Be=i,qe.p=r,we.T=s}}ft=1,fx?hl=dq(o,e.containerInfo,pl,Wm,Km,HB,Xm,Zm,qB):(Wm(),Km(),Xm())}function qB(e){if(ft!==0){var t=Vs.onRecoverableError;t(e,{componentStack:null})}}function HB(){ft===3&&(ft=0,s9(sa,Vs),ft=4)}function Wm(){if(ft===1){ft=0;var e=Vs,t=sa,n=gr,s=(t.flags&13878)!==0;if(t.subtreeFlags&13878||s){s=we.T,we.T=null;var r=qe.p;qe.p=2;var i=Be;Be|=4;try{su=hx=!1,t9(t,e,n),n=e0;var o=R8(e.containerInfo),l=n.focusedElem,c=n.selectionRange;if(o!==l&&l&&l.ownerDocument&&z8(l.ownerDocument.documentElement,l)){if(c!==null&&kk(l)){var u=c.start,d=c.end;if(d===void 0&&(d=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(d,l.value.length);else{var h=l.ownerDocument||document,f=h&&h.defaultView||window;if(f.getSelection){var p=f.getSelection(),g=l.textContent.length,b=Math.min(c.start,g),y=c.end===void 0?b:Math.min(c.end,g);!p.extend&&b>y&&(o=y,y=b,b=o);var m=J2(l,b),k=J2(l,y);if(m&&k&&(p.rangeCount!==1||p.anchorNode!==m.node||p.anchorOffset!==m.offset||p.focusNode!==k.node||p.focusOffset!==k.offset)){var w=h.createRange();w.setStart(m.node,m.offset),p.removeAllRanges(),b>y?(p.addRange(w),p.extend(k.node,k.offset)):(w.setEnd(k.node,k.offset),p.addRange(w))}}}}for(h=[],p=l;p=p.parentNode;)p.nodeType===1&&h.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<h.length;l++){var v=h[l];v.element.scrollLeft=v.left,v.element.scrollTop=v.top}}Xl=!!Jm,e0=Jm=null}finally{Be=i,qe.p=r,we.T=s}}e.current=t,ft=2}}function Km(){if(ft===2){ft=0;var e=Vs,t=sa,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=we.T,we.T=null;var s=qe.p;qe.p=2;var r=Be;Be|=4;try{X7(e,t.alternate,t)}finally{Be=r,qe.p=s,we.T=n}}ft=3}}function Xm(){if(ft===4||ft===3){ft=0;var e=hl;hl=null,nD();var t=Vs,n=sa,s=gr,r=u9,i=(s&335544064)===s?10262:10256;if(n.subtreeFlags&i||n.flags&i?ft=5:(ft=0,sa=Vs=null,k9(t,t.pendingLanes)),i=t.pendingLanes,i===0&&(Pi=null),hk(s),n=n.stateNode,rs&&typeof rs.onCommitFiberRoot=="function")try{rs.onCommitFiberRoot(wd,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=we.T,i=qe.p,qe.p=2,we.T=null;try{for(var o=t.onRecoverableError,l=0;l<r.length;l++){var c=r[l];o(c.value,{componentStack:c.stack})}}finally{we.T=n,qe.p=i}}if(r=xl,o=pl,pl=null,r!==null&&(xl=null,o===null&&(o=[]),e!==null))for(c=0;c<r.length;c++)n=(0,r[c])(o),n!==void 0&&e.finished.finally(n);gr&3&&N1(),Cr(t),i=t.pendingLanes,s&261930&&i&42?t===xh?vu++:(vu=0,xh=t):(vu=0,xh=null),Ad(0)}}function k9(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ed(t)))}function N1(){return hl!==null&&(hl.skipTransition(),hl=null),Wm(),Km(),Xm(),Zm()}function Zm(){if(ft!==5)return!1;var e=Vs,t=Gm;Gm=0;var n=hk(gr),s=we.T,r=qe.p;try{qe.p=32>n?32:n,we.T=null,n=Vm,Vm=null;var i=Vs,o=gr;if(ft=0,sa=Vs=null,gr=0,Be&6)throw Error(Z(331));var l=Be;if(Be|=4,a9(i.current),r9(i,i.current,o,n),Be=l,Ad(0,!1),rs&&typeof rs.onPostCommitFiberRoot=="function")try{rs.onPostCommitFiberRoot(wd,i)}catch{}return!0}finally{qe.p=r,we.T=s,k9(e,t)}}function D5(e,t,n){t=Cs(n,t),t=Nm(e.stateNode,t,2),e=Bi(e,t,2),e!==null&&(Sd(e,2),Cr(e))}function Ge(e,t,n){if(e.tag===3)D5(e,e,n);else for(;t!==null;){if(t.tag===3){D5(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Pi===null||!Pi.has(s))){e=Cs(n,e),n=I7(2),s=Bi(t,n,2),s!==null&&(_7(n,s,t,e),Sd(s,2),Cr(s));break}}t=t.return}}function eg(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new IB;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(n)||(Zk=!0,r.add(n),e=PB.bind(null,e,t,n),t.then(e,e))}function PB(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(ze&n)===n&&(gt===4||gt===3&&(ze&62914560)===ze&&300>ss()-$1?Be&2?xx|=n:Fl(e,0):xx|=n,Pl===ze&&(Pl=0)),Cr(e)}function b9(e,t){t===0&&(t=u8()),e=ga(e,t),e!==null&&(Sd(e,t),Cr(e))}function UB(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),b9(e,n)}function FB(e,t){var n=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(Z(314))}s!==null&&s.delete(t),b9(e,n)}function GB(e,t){return dk(e,t)}var Gl=null,Pa=null,Ym=!1,yx=!1,tg=!1,Ii=0;function Cr(e){e!==Pa&&e.next===null&&(Pa===null?Gl=Pa=e:Pa=Pa.next=e),yx=!0,Ym||(Ym=!0,WB())}function Ad(e,t){if(!tg&&yx){tg=!0;do for(var n=!1,s=Gl;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var i=0;else{var o=s.suspendedLanes,l=s.pingedLanes;i=(1<<31-is(42|e)+1)-1,i&=r&~(o&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,B5(s,i))}else i=ze,i=f1(s,s===Ye?i:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),!(i&3)||jd(s,i)||(n=!0,B5(s,i));s=s.next}while(n);tg=!1}}function VB(){v9()}function v9(){yx=Ym=!1;var e=0;Ii!==0&&rq()&&(e=Ii);for(var t=ss(),n=null,s=Gl;s!==null;){var r=s.next,i=w9(s,t);i===0?(s.next=null,n===null?Gl=r:n.next=r,r===null&&(Pa=n)):(n=s,(e!==0||i&3)&&(yx=!0)),s=r}ft!==0&&ft!==5||Ad(e),Ii!==0&&(Ii=0)}function w9(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-is(i),l=1<<o,c=r[o];c===-1?(!(l&n)||l&s)&&(r[o]=uD(l,t)):c<=t&&(e.expiredLanes|=l),i&=~l}if(t=Ye,n=ze,n=f1(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,n===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&zp(s),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||jd(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(s!==null&&zp(s),hk(n)){case 2:case 8:n=a8;break;case 32:n=Zh;break;case 268435456:n=l8;break;default:n=Zh}return s=j9.bind(null,e),n=dk(n,s),e.callbackPriority=t,e.callbackNode=n,t}return s!==null&&s!==null&&zp(s),e.callbackPriority=2,e.callbackNode=null,2}function j9(e,t){if(ft!==0&&ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(N1()&&e.callbackNode!==n)return null;var s=ze;return s=f1(e,e===Ye?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(f9(e,s,t),w9(e,ss()),e.callbackNode!=null&&e.callbackNode===n?j9.bind(null,e):null)}function B5(e,t){if(N1())return null;f9(e,t,!0)}function WB(){oq(function(){Be&6?dk(o8,VB):v9()})}function Qk(){if(Ii===0){var e=Jo;e===0&&(e=bf,bf<<=1,!(bf&261888)&&(bf=256)),Ii=e}return Ii}function q5(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:nh(e)}function KB(e,t,n,s,r){if(t==="submit"&&n&&n.stateNode===r){var i=q5((r[qn]||null).action),o=s.submitter;o&&(t=(t=o[qn]||null)?q5(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var l=new x1("action","action",null,s,r);e.push({event:l,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ii!==0){var c=new FormData(r,o);Em(n,{pending:!0,data:c,method:r.method,action:i},null,c)}}else typeof i=="function"&&(l.preventDefault(),c=new FormData(r,o),Em(n,{pending:!0,data:c,method:r.method,action:i},i,c))},currentTarget:r}]})}}for(var ng=0;ng<gm.length;ng++){var sg=gm[ng],XB=sg.toLowerCase(),ZB=sg[0].toUpperCase()+sg.slice(1);Zs(XB,"on"+ZB)}Zs(_8,"onAnimationEnd");Zs(L8,"onAnimationIteration");Zs(O8,"onAnimationStart");Zs("dblclick","onDoubleClick");Zs("focusin","onFocus");Zs("focusout","onBlur");Zs(iB,"onTransitionRun");Zs(oB,"onTransitionStart");Zs(aB,"onTransitionCancel");Zs(D8,"onTransitionEnd");Bl("onMouseEnter",["mouseout","mouseover"]);Bl("onMouseLeave",["mouseout","mouseover"]);Bl("onPointerEnter",["pointerout","pointerover"]);Bl("onPointerLeave",["pointerout","pointerover"]);xa("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));xa("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));xa("onBeforeInput",["compositionend","keypress","textInput","paste"]);xa("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));xa("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));xa("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fu="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(" "),YB=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fu));function S9(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var s=e[n],r=s.event;s=s.listeners;e:{var i=void 0;if(t)for(var o=s.length-1;0<=o;o--){var l=s[o],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=u;try{i(r)}catch(d){Qh(d)}r.currentTarget=null,i=c}else for(o=0;o<s.length;o++){if(l=s[o],c=l.instance,u=l.currentTarget,l=l.listener,c!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=u;try{i(r)}catch(d){Qh(d)}r.currentTarget=null,i=c}}}}function Ae(e,t){var n=t[_2];n===void 0&&(n=t[_2]=new Set);var s=e+"__bubble";n.has(s)||(C9(t,e,2,!1),n.add(s))}function rg(e,t,n){var s=0;t&&(s|=4),C9(n,e,s,t)}var Rf="_reactListening"+Math.random().toString(36).slice(2);function Jk(e){if(!e[Rf]){e[Rf]=!0,g8.forEach(function(n){n!=="selectionchange"&&(YB.has(n)||rg(n,!1,e),rg(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Rf]||(t[Rf]=!0,rg("selectionchange",!1,t))}}function C9(e,t,n,s){switch(K9(t)){case 2:var r=Uq;break;case 8:r=Fq;break;default:r=ob}n=r.bind(null,t,n,e),r=void 0,!fm||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function ig(e,t,n,s,r){var i=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var o=s.tag;if(o===3||o===4){var l=s.stateNode.containerInfo;if(l===r)break;if(o===4)for(o=s.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===r)return;o=o.return}for(;l!==null;){if(o=No(l),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){s=i=o;continue e}l=l.parentNode}}s=s.return}S8(function(){var u=i,d=pk(n),h=[];e:{var f=B8.get(e);if(f!==void 0){var p=x1,g=e;switch(e){case"keypress":if(rh(n)===0)break e;case"keydown":case"keyup":p=_D;break;case"focusin":g="focus",p=Dp;break;case"focusout":g="blur",p=Dp;break;case"beforeblur":case"afterblur":p=Dp;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=U2;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=jD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=qD;break;case _8:case L8:case O8:p=$D;break;case D8:p=PD;break;case"scroll":case"scrollend":p=vD;break;case"wheel":p=FD;break;case"copy":case"cut":case"paste":p=TD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=G2;break;case"submit":p=DD;break;case"toggle":case"beforetoggle":p=VD}var b=(t&4)!==0,y=!b&&(e==="scroll"||e==="scrollend"),m=b?f!==null?f+"Capture":null:f;b=[];for(var k=u,w;k!==null;){var v=k;if(w=v.stateNode,v=v.tag,v!==5&&v!==26&&v!==27||w===null||m===null||(v=Lu(k,m),v!=null&&b.push(Gu(k,v,w))),y)break;k=k.return}0<b.length&&(f=new p(f,g,null,n,d),h.push({event:f,listeners:b}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",p&&n!==dm&&(g=n.relatedTarget||n.fromElement)&&(No(g)||g[dc]))break e;(f||p)&&(g=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,f?(p=n.relatedTarget||n.toElement,f=u,p=p?No(p):null,p!==null&&(y=vd(p),b=p.tag,p!==y||b!==5&&b!==27&&b!==6)&&(p=null)):(f=null,p=u),f!==p&&(b=U2,v="onMouseLeave",m="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(b=G2,v="onPointerLeave",m="onPointerEnter",k="pointer"),y=f==null?g:tu(f),w=p==null?g:tu(p),g=new b(v,k+"leave",f,n,d),g.target=y,g.relatedTarget=w,v=null,No(d)===u&&(b=new b(m,k+"enter",p,n,d),b.target=w,b.relatedTarget=y,v=b),y=v,b=f&&p?Jg(f,p,QB):null,f!==null&&H5(h,g,f,b,!1),p!==null&&y!==null&&H5(h,y,p,b,!0)))}e:{if(f=u?tu(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var j=X2;else if(K2(f))if(A8)j=nB;else{j=eB;var C=JD}else p=f.nodeName,!p||p.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?u&&xk(u.elementType)&&(j=X2):j=tB;if(j&&(j=j(e,u))){N8(h,j,n,d);break e}C&&C(e,f,u)}switch(C=u?tu(u):window,e){case"focusin":(K2(C)||C.contentEditable==="true")&&(Za=C,xm=u,du=null);break;case"focusout":du=xm=Za=null;break;case"mousedown":pm=!0;break;case"contextmenu":case"mouseup":case"dragend":pm=!1,e5(h,n,d);break;case"selectionchange":if(rB)break;case"keydown":case"keyup":e5(h,n,d)}var $;if(yk)e:{switch(e){case"compositionstart":var T="onCompositionStart";break e;case"compositionend":T="onCompositionEnd";break e;case"compositionupdate":T="onCompositionUpdate";break e}T=void 0}else Xa?E8(e,n)&&(T="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(T="onCompositionStart");T&&($8&&n.locale!=="ko"&&(Xa||T!=="onCompositionStart"?T==="onCompositionEnd"&&Xa&&($=C8()):(Ai=d,gk="value"in Ai?Ai.value:Ai.textContent,Xa=!0)),C=kx(u,T),0<C.length&&(T=new F2(T,e,null,n,d),h.push({event:T,listeners:C}),$?T.data=$:($=T8(n),$!==null&&(T.data=$)))),($=KD?XD(e,n):ZD(e,n))&&(T=kx(u,"onBeforeInput"),0<T.length&&(C=new F2("onBeforeInput","beforeinput",null,n,d),h.push({event:C,listeners:T}),C.data=$)),KB(h,e,u,n,d)}S9(h,t)})}function Gu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function kx(e,t){for(var n=t+"Capture",s=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=Lu(e,n),r!=null&&s.unshift(Gu(e,r,i)),r=Lu(e,t),r!=null&&s.push(Gu(e,r,i))),e.tag===3)return s;e=e.return}return[]}function QB(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function H5(e,t,n,s,r){for(var i=t._reactName,o=[];n!==null&&n!==s;){var l=n,c=l.alternate,u=l.stateNode;if(l=l.tag,c!==null&&c===s)break;l!==5&&l!==26&&l!==27||u===null||(c=u,r?(u=Lu(n,i),u!=null&&o.unshift(Gu(n,u,c))):r||(u=Lu(n,i),u!=null&&o.push(Gu(n,u,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var JB=/\r\n?/g,eq=/\u0000|\uFFFD/g;function P5(e){return(typeof e=="string"?e:""+e).replace(JB,`
|
|
190
|
-
`).replace(eq,"")}function $9(e,t){return t=P5(t),P5(e)===t}function Fe(e,t,n,s,r,i){switch(n){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||ql(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&ql(e,""+s);else return;break;case"className":jf(e,"class",s);break;case"tabIndex":jf(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":jf(e,n,s);break;case"style":j8(e,s,i);return;case"data":if(t!=="object"){jf(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=nh(s),e.setAttribute(n,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Fe(e,t,"name",r.name,r,null),Fe(e,t,"formEncType",r.formEncType,r,null),Fe(e,t,"formMethod",r.formMethod,r,null),Fe(e,t,"formTarget",r.formTarget,r,null)):(Fe(e,t,"encType",r.encType,r,null),Fe(e,t,"method",r.method,r,null),Fe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=nh(s),e.setAttribute(n,s);break;case"onClick":s!=null&&(e.onclick=dr);return;case"onScroll":s!=null&&Ae("scroll",e);return;case"onScrollEnd":s!=null&&Ae("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(Z(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(Z(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}n=nh(s),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":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,s):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":s===!0?e.setAttribute(n,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(n,s):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(n,s):e.removeAttribute(n);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(n):e.setAttribute(n,s);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),th(e,"popover",s);break;case"xlinkActuate":Tr(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":Tr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":Tr(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":Tr(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":Tr(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":Tr(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":Tr(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":Tr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":Tr(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":th(e,"is",s);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=kD.get(n)||n,th(e,n,s);else return}De=!0}function Qm(e,t,n,s,r,i){switch(n){case"style":j8(e,s,i);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(Z(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(Z(60));(i!=null?i.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof s=="string")ql(e,s);else if(typeof s=="number"||typeof s=="bigint")ql(e,""+s);else return;break;case"onScroll":s!=null&&Ae("scroll",e);return;case"onScrollEnd":s!=null&&Ae("scrollend",e);return;case"onClick":s!=null&&(e.onclick=dr);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!m8.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),i=n.slice(2,r?n.length-7:void 0),t=e[qn]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(i,t,r),typeof s=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(i,s,r);break e}De=!0,n in e?e[n]=s:s===!0?e.setAttribute(n,""):th(e,n,s)}return}De=!0}function cn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var s=!1,r=!1,i;for(i in n)if(n.hasOwnProperty(i)){var o=n[i];if(o!=null)switch(i){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Z(137,t));default:Fe(e,t,i,o,n,null)}}r&&Fe(e,t,"srcSet",n.srcSet,n,null),s&&Fe(e,t,"src",n.src,n,null);return;case"input":Ae("invalid",e);var l=i=o=r=null,c=null,u=null;for(s in n)if(n.hasOwnProperty(s)){var d=n[s];if(d!=null)switch(s){case"name":r=d;break;case"type":o=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":i=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(Z(137,t));break;default:Fe(e,t,s,d,n,null)}}b8(e,i,l,c,u,o,r,!1);return;case"select":Ae("invalid",e),s=o=i=null;for(r in n)if(n.hasOwnProperty(r)&&(l=n[r],l!=null))switch(r){case"value":i=l;break;case"defaultValue":o=l;break;case"multiple":s=l;default:Fe(e,t,r,l,n,null)}t=i,n=o,e.multiple=!!s,t!=null?al(e,!!s,t,!1):n!=null&&al(e,!!s,n,!0);return;case"textarea":Ae("invalid",e),i=r=s=null;for(o in n)if(n.hasOwnProperty(o)&&(l=n[o],l!=null))switch(o){case"value":s=l;break;case"defaultValue":r=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(Z(91));break;default:Fe(e,t,o,l,n,null)}w8(e,s,r,i);return;case"option":for(c in n)if(n.hasOwnProperty(c)&&(s=n[c],s!=null))switch(c){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:Fe(e,t,c,s,n,null)}return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(s=0;s<Fu.length;s++)Ae(Fu[s],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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)&&(s=n[u],s!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(Z(137,t));default:Fe(e,t,u,s,n,null)}return;default:if(xk(t)){for(d in n)n.hasOwnProperty(d)&&(s=n[d],s!==void 0&&Qm(e,t,d,s,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(s=n[l],s!=null&&Fe(e,t,l,s,n,null))}var tq={};function nq(e,t,n,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,i=null,o=null,l=null,c=null,u=null,d=null;for(p in n){var h=n[p];if(n.hasOwnProperty(p)&&h!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":c=h;default:s.hasOwnProperty(p)||Fe(e,t,p,null,s,h)}}for(var f in s){var p=s[f];if(h=n[f],s.hasOwnProperty(f)&&(p!=null||h!=null))switch(f){case"type":p!==h&&(De=!0),i=p;break;case"name":p!==h&&(De=!0),r=p;break;case"checked":p!==h&&(De=!0),u=p;break;case"defaultChecked":p!==h&&(De=!0),d=p;break;case"value":p!==h&&(De=!0),o=p;break;case"defaultValue":p!==h&&(De=!0),l=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(Z(137,t));break;default:p!==h&&Fe(e,t,f,p,s,h)}}um(e,o,l,c,u,d,i,r);return;case"select":p=o=l=f=null;for(i in n)if(c=n[i],n.hasOwnProperty(i)&&c!=null)switch(i){case"value":break;case"multiple":p=c;default:s.hasOwnProperty(i)||Fe(e,t,i,null,s,c)}for(r in s)if(i=s[r],c=n[r],s.hasOwnProperty(r)&&(i!=null||c!=null))switch(r){case"value":i!==c&&(De=!0),f=i;break;case"defaultValue":i!==c&&(De=!0),l=i;break;case"multiple":i!==c&&(De=!0),o=i;default:i!==c&&Fe(e,t,r,i,s,c)}t=l,n=o,s=p,f!=null?al(e,!!n,f,!1):!!s!=!!n&&(t!=null?al(e,!!n,t,!0):al(e,!!n,n?[]:"",!1));return;case"textarea":p=f=null;for(l in n)if(r=n[l],n.hasOwnProperty(l)&&r!=null&&!s.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:Fe(e,t,l,null,s,r)}for(o in s)if(r=s[o],i=n[o],s.hasOwnProperty(o)&&(r!=null||i!=null))switch(o){case"value":r!==i&&(De=!0),f=r;break;case"defaultValue":r!==i&&(De=!0),p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(Z(91));break;default:r!==i&&Fe(e,t,o,r,s,i)}v8(e,f,p);return;case"option":for(var g in n)if(f=n[g],n.hasOwnProperty(g)&&f!=null&&!s.hasOwnProperty(g))switch(g){case"selected":e.selected=!1;break;default:Fe(e,t,g,null,s,f)}for(c in s)if(f=s[c],p=n[c],s.hasOwnProperty(c)&&f!==p&&(f!=null||p!=null))switch(c){case"selected":f!==p&&(De=!0),e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Fe(e,t,c,f,s,p)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var b in n)f=n[b],n.hasOwnProperty(b)&&f!=null&&!s.hasOwnProperty(b)&&Fe(e,t,b,null,s,f);for(u in s)if(f=s[u],p=n[u],s.hasOwnProperty(u)&&f!==p&&(f!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(Z(137,t));break;default:Fe(e,t,u,f,s,p)}return;default:if(xk(t)){for(var y in n)f=n[y],n.hasOwnProperty(y)&&f!==void 0&&!s.hasOwnProperty(y)&&Qm(e,t,y,void 0,s,f);for(d in s)f=s[d],p=n[d],!s.hasOwnProperty(d)||f===p||f===void 0&&p===void 0||Qm(e,t,d,f,s,p);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!s.hasOwnProperty(m)&&Fe(e,t,m,null,s,f);for(h in s)f=s[h],p=n[h],!s.hasOwnProperty(h)||f===p||f==null&&p==null||Fe(e,t,h,f,s,p)}function U5(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function sq(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),s=0;s<n.length;s++){var r=n[s],i=r.transferSize,o=r.initiatorType,l=r.duration;if(i&&l&&U5(o)){for(o=0,l=r.responseEnd,s+=1;s<n.length;s++){var c=n[s],u=c.startTime;if(u>l)break;var d=c.transferSize,h=c.initiatorType;d&&U5(h)&&(c=c.responseEnd,o+=d*(c<l?1:(l-u)/(c-u)))}if(--s,t+=8*(i+o)/(r.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 Jm=null,e0=null;function Vu(e){return e.nodeType===9?e:e.ownerDocument}function F5(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 E9(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 T9(e,t,n,s){return n=Vu(n).createElement(e),n[rn]=s,n[qn]=t,cn(n,e,t),Vt(n),n}function t0(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 og=null;function rq(){var e=window.event;return e&&e.type==="popstate"?e===og?!1:(og=e,!0):(og=null,!1)}var eb=typeof setTimeout=="function"?setTimeout:void 0,iq=typeof clearTimeout=="function"?clearTimeout:void 0,G5=typeof Promise=="function"?Promise:void 0,V5=typeof requestAnimationFrame=="function"?requestAnimationFrame:eb,oq=typeof queueMicrotask=="function"?queueMicrotask:typeof G5<"u"?function(e){return G5.resolve(null).then(e).catch(aq)}:eb;function aq(e){setTimeout(function(){throw e})}function so(e){return e==="head"}function W5(e,t){var n=t,s=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"||n==="/&"){if(s===0){e.removeChild(r),Zl(t);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")lg(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,lg(n);for(var i=n.firstChild;i;){var o=i.nextSibling,l=i.nodeName;i[Cd]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=o}}else n==="body"&&lg(e.ownerDocument.body);n=r}while(n);Zl(t)}function K5(e,t){var n=e;e=0;do{var s=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||""),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=s}while(n)}function N9(e,t,n){if(t=CSS.escape(t)!==t?"r-"+btoa(t).replace(/=/g,""):t,e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display==="inline"){if(t=e.getClientRects(),t.length===1)var s=1;else for(var r=s=0;r<t.length;r++){var i=t[r];0<i.width&&0<i.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function A9(e,t){e=e.style,t=t.style;var n=t!=null?t.hasOwnProperty("viewTransitionName")?t.viewTransitionName:t.hasOwnProperty("view-transition-name")?t["view-transition-name"]:null:null;e.viewTransitionName=n==null||typeof n=="boolean"?"":(""+n).trim(),n=t!=null?t.hasOwnProperty("viewTransitionClass")?t.viewTransitionClass:t.hasOwnProperty("view-transition-class")?t["view-transition-class"]:null:null,e.viewTransitionClass=n==null||typeof n=="boolean"?"":(""+n).trim(),e.display==="inline-block"&&(t==null?e.display=e.margin="":(n=t.display,e.display=n==null||typeof n=="boolean"?"":n,n=t.margin,n!=null?e.margin=n:(n=t.hasOwnProperty("marginTop")?t.marginTop:t["margin-top"],e.marginTop=n==null||typeof n=="boolean"?"":n,t=t.hasOwnProperty("marginBottom")?t.marginBottom:t["margin-bottom"],e.marginBottom=t==null||typeof t=="boolean"?"":t)))}function lq(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position==="absolute"||t.position==="fixed",clip:t.clipPath!=="none"||t.overflow!=="visible"||t.filter!=="none"||t.mask!=="none"||t.mask!=="none"||t.borderRadius!=="0px",view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function n0(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return lq(t,n,e)}function cq(e){return e.documentElement.clientHeight}function uq(e){this.addEventListener("load",e),this.addEventListener("error",e)}function dq(e,t,n,s,r,i,o,l,c){var u=t.nodeType===9?t:t.ownerDocument;try{var d=u.startViewTransition({update:function(){var f=u.defaultView,p=f.navigation&&f.navigation.transition,g=u.fonts.status;s();var b=[];if(g==="loaded"&&(cq(u),u.fonts.status==="loading"&&b.push(u.fonts.ready)),g=b.length,e!==null)for(var y=e.suspenseyImages,m=0,k=0;k<y.length;k++){var w=y[k];if(!w.complete){var v=w.getBoundingClientRect();if(0<v.bottom&&0<v.right&&v.top<f.innerHeight&&v.left<f.innerWidth){if(m+=P9(w),m>mh){b.length=g;break}w=new Promise(uq.bind(w)),b.push(w)}}}if(0<b.length)return f=Promise.race([Promise.all(b),new Promise(function(j){return setTimeout(j,500)})]).then(r,r),(p?Promise.allSettled([p.finished,f]):f).then(i,i);if(r(),p)return p.finished.then(i,i);i()},types:n});u.__reactViewTransition=d;var h=[];return d.ready.then(function(){for(var f=u.documentElement.getAnimations({subtree:!0}),p=0;p<f.length;p++){var g=f[p],b=g.effect,y=b.pseudoElement;if(y!=null&&y.startsWith("::view-transition")){h.push(g),g=b.getKeyframes();for(var m=y=void 0,k=!0,w=0;w<g.length;w++){var v=g[w],j=v.width;if(y===void 0)y=j;else if(y!==j){k=!1;break}if(j=v.height,m===void 0)m=j;else if(m!==j){k=!1;break}delete v.width,delete v.height,v.transform==="none"&&delete v.transform}k&&y!==void 0&&m!==void 0&&(b.setKeyframes(g),k=getComputedStyle(b.target,b.pseudoElement),k.width!==y||k.height!==m)&&(k=g[0],k.width=y,k.height=m,k=g[g.length-1],k.width=y,k.height=m,b.setKeyframes(g))}}o()},function(f){u.__reactViewTransition===d&&(u.__reactViewTransition=null);try{if(typeof f=="object"&&f!==null)switch(f.name){case"InvalidStateError":(f.message==="View transition was skipped because document visibility state is hidden."||f.message==="Skipping view transition because document visibility state has become hidden."||f.message==="Skipping view transition because viewport size changed."||f.message==="Transition was aborted because of invalid state")&&(f=null)}f!==null&&c(f)}finally{s(),r(),o()}}),d.finished.finally(function(){for(var f=0;f<h.length;f++)h[f].cancel();u.__reactViewTransition===d&&(u.__reactViewTransition=null),l()}),d}catch{return s(),r(),o(),null}}function Ao(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Ao.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Qe({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};Ao.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),s=[],r=0;r<n.length;r++){var i=n[r].effect;i!==null&&i.target===e&&i.pseudoElement===t&&s.push(n[r])}return s};Ao.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function M9(e){return{name:e,group:new Ao("group",e),imagePair:new Ao("image-pair",e),old:new Ao("old",e),new:new Ao("new",e)}}function ds(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}ds.prototype.addEventListener=function(e,t,n){var s=null,r=null;if(!(n!=null&&typeof n!="boolean"&&(s=n.signal||null,s!==null&&s.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var i=this._eventListeners;if(z9(i,e,t,n)===-1){var o=this,l=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(l=function(c){o.removeEventListener(e,t,n),typeof t=="function"?t.call(this,c):t.handleEvent(c)}),s!==null&&(r=o.removeEventListener.bind(o,e,t,n),s.addEventListener("abort",r,{once:!0}),r=s.removeEventListener.bind(s,"abort",r)),s=Vl(n),i.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:l,cleanup:r}),Bn(this._fragmentFiber.child,!1,fq,e,l,s)}this._eventListeners=i}};function fq(e,t,n,s){return zt(e).addEventListener(t,n,s),!1}ds.prototype.removeEventListener=function(e,t,n){var s=this._eventListeners;if(s!==null&&(t=z9(s,e,t,n),t!==-1)){var r=s[t];n=r.attachedListener;var i=r.cleanup;r=Vl(r.optionsOrUseCapture),Bn(this._fragmentFiber.child,!1,hq,e,n,r),s.splice(t,1),i!==null&&i()}};function hq(e,t,n,s){return zt(e).removeEventListener(t,n,s),!1}function Vl(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function X5(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function z9(e,t,n,s){if(e.length===0)return-1;s=X5(s);for(var r=0;r<e.length;r++){var i=e[r];if(i.type===t&&i.listener===n&&X5(i.optionsOrUseCapture)===s)return r}return-1}ds.prototype.dispatchEvent=function(e){var t=ha(this._fragmentFiber);if(t===null)return!0;t=zt(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var s=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var r=0;r<n.length;r++){var i=n[r];s.addEventListener(i.type,i.attachedListener,Vl(i.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),n)for(r=0;r<n.length;r++)i=n[r],s.removeEventListener(i.type,i.attachedListener,Vl(i.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)};ds.prototype.focus=function(e){Bn(this._fragmentFiber.child,!0,R9,e,void 0,void 0)};function R9(e,t){return e.tag===6?!1:(e=zt(e),Cq(e,t))}ds.prototype.focusLast=function(e){var t=[];Bn(this._fragmentFiber.child,!0,tb,t,void 0,void 0);for(var n=t.length-1;0<=n&&!R9(t[n],e);n--);};function tb(e,t){return t.push(e),!1}ds.prototype.blur=function(){var e=ha(this._fragmentFiber);e!==null&&(e=zt(e),e=Vu(e).activeElement,e!==null&&Bn(this._fragmentFiber.child,!1,xq,e,void 0,void 0))};function xq(e,t){return e.tag===6?!1:(e=zt(e),e===t||e.contains(t)?(t.blur(),!0):!1)}ds.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),Bn(this._fragmentFiber.child,!1,pq,e,void 0,void 0)};function pq(e,t){return e.tag===6||(e=zt(e),t.observe(e)),!1}ds.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),Bn(this._fragmentFiber.child,!1,gq,e,void 0,void 0);for(var n=t=0;n<Fs.length;n++){var s=Fs[n];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Fs[t++]=s}Fs.length=t}};function gq(e,t){return e.tag===6||(e=zt(e),t.unobserve(e)),!1}var Fs=[],ag=!1;function mq(e,t,n){Fs.push({fragmentInstance:e,observer:t,instance:n}),ag||(ag=!0,$q(function(){ag=!1;var s=Fs;Fs=[];for(var r=0;r<s.length;r++){var i=s[r];i.observer.unobserve(i.instance)}}))}ds.prototype.getClientRects=function(){var e=[];return Bn(this._fragmentFiber.child,!1,yq,e,void 0,void 0),e};function yq(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=zt(e),t.push.apply(t,e.getClientRects());return!1}ds.prototype.getRootNode=function(e){var t=ha(this._fragmentFiber);return t===null?this:zt(t).getRootNode(e)};ds.prototype.compareDocumentPosition=function(e){var t=ha(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];Bn(this._fragmentFiber.child,!1,tb,n,void 0,void 0);var s=zt(t);if(n.length===0){if(n=s,N2(this._fragmentFiber)){e:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break e}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var r=s=n.compareDocumentPosition(e);return n===e?r=Node.DOCUMENT_POSITION_CONTAINS:s&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=n8(t)[1],n===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=zt(n).compareDocumentPosition(e),r=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),r|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=zt(n[0]),r=zt(n[n.length-1]);var i=N2(this._fragmentFiber)?t.parentElement:s;if(i==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,i=i.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),l=r.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||l&Node.DOCUMENT_POSITION_CONTAINED_BY;return l=s&&i&&o&Node.DOCUMENT_POSITION_FOLLOWING&&l&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||i&&r===e||c||l?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!i&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||kq(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function kq(e,t,n,s,r){var i=No(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!i)e:{for(;i!==null;){if(i.tag===7&&(i===t||i.alternate===t)){n=!0;break e}i=i.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(i===null)return i=r.ownerDocument,r===i||r===i.documentElement||r===i.body;e:{for(i=t,t=ha(t);i!==null;){if(!(i.tag!==5&&i.tag!==3&&i.tag!==27||i!==t&&i.alternate!==t)){i=!0;break e}i=i.return}i=!1}return i}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!i)&&!(t=i===n)&&(t=Jg(n,i,A2),t===null?t=!1:(Bn(t,!0,WO,i,n),i=Ga,Ga=null,t=i!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!i)&&!(t=i===s)&&(t=Jg(s,i,A2),t===null?t=!1:(Bn(t,!0,KO,i,s),i=Ga,Qg=Ga=null,t=i!==null)),t):!1}function Z5(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}ds.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(Z(566));var t=[];Bn(this._fragmentFiber.child,!1,tb,t,void 0,void 0);var n=e!==!1;if(t.length===0){var s=n8(this._fragmentFiber);if(s=n?s[1]||s[0]||ha(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=zt(s),Z5(e,n);return}if(s=zt(s),s.nodeType!==9){if(s.nodeType===11){n="host"in s?s.host:null,n!==null&&n.scrollIntoView(e);return}s.scrollIntoView(e)}}for(s=n?t.length-1:0;s!==(n?-1:t.length);){var r=t[s];r.tag===6?(r=zt(r),Z5(r,n)):zt(r).scrollIntoView(e),s+=n?-1:1}};function bq(e,t){return e=zt(e),I9(e,t),!1}function I9(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function _9(e,t){var n=t._eventListeners;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];e.addEventListener(r.type,r.attachedListener,Vl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){for(var o=0,l=0;l<Fs.length;l++){var c=Fs[l];(c.fragmentInstance!==t||c.observer!==i||c.instance!==e)&&(Fs[o++]=c)}Fs.length=o,i.observe(e)}),I9(e,t))}function vq(e,t){var n=t._eventListeners;if(n!==null)for(var s=0;s<n.length;s++){var r=n[s];e.removeEventListener(r.type,r.attachedListener,Vl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(i){typeof i.rootMargin=="string"?mq(t,i,e):i.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function s0(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":s0(n),h1(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function wq(e,t,n,s){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[Cd])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Ts(e.nextSibling),e===null)break}return null}function jq(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ts(e.nextSibling),e===null))return null;return e}function L9(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ts(e.nextSibling),e===null))return null;return e}function r0(e){return e.data==="$?"||e.data==="$~"}function nb(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Sq(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var s=function(){t(),n.removeEventListener("DOMContentLoaded",s)};n.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Ts(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 i0=null;function Y5(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ts(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Q5(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 Cq(e,t){function n(){s=!0}if(e.ownerDocument.activeElement===e)return!0;var s=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return s}function $q(e){V5(function(){V5(function(t){return e(t)})})}function O9(e,t,n){switch(t=Vu(n),e){case"html":if(e=t.documentElement,!e)throw Error(Z(452));return e;case"head":if(e=t.head,!e)throw Error(Z(453));return e;case"body":if(e=t.body,!e)throw Error(Z(454));return e;default:throw Error(Z(451))}}function D9(e,t,n){for(var s in n){var r=n[s];n.hasOwnProperty(s)&&r!=null&&Fe(e,t,s,null,tq,r)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===dr&&(e.onclick=null),h1(e)}function lg(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);h1(e)}var As=new Map,J5=new Set;function Wu(e){if(typeof e.getRootNode=="function"){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var oi=qe.d;qe.d={f:Eq,r:Tq,D:Nq,C:Aq,L:Mq,m:zq,X:Iq,S:Rq,M:_q};function Eq(){var e=oi.f(),t=E1();return e||t}function Tq(e){var t=fc(e);t!==null&&t.tag===5&&t.type==="form"?j7(t):oi.r(e)}var gc=typeof document>"u"?null:document;function B9(e,t,n){var s=gc;if(s&&typeof t=="string"&&t){var r=Ss(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),J5.has(r)||(J5.add(r),e={rel:e,crossOrigin:n,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),cn(t,"link",e),Vt(t),s.head.appendChild(t)))}}function Nq(e){oi.D(e),B9("dns-prefetch",e,null)}function Aq(e,t){oi.C(e,t),B9("preconnect",e,t)}function Mq(e,t,n){oi.L(e,t,n);var s=gc;if(s&&e&&t){var r='link[rel="preload"][as="'+Ss(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+Ss(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+Ss(n.imageSizes)+'"]')):r+='[href="'+Ss(e)+'"]';var i=r;switch(t){case"style":i=Wl(e);break;case"script":i=mc(e)}if(!(As.has(i)||(e=Qe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),As.set(i,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Md(i))||t==="script"&&s.querySelector(zd(i))))){var o=s.createElement("link");cn(o,"link",e),t==="style"&&(o[Yh]=!0,o.onload=o.onerror=function(){p8(o)}),Vt(o),s.head.appendChild(o)}}}function zq(e,t){oi.m(e,t);var n=gc;if(n&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ss(s)+'"][href="'+Ss(e)+'"]',i=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=mc(e)}if(!As.has(i)&&(e=Qe({rel:"modulepreload",href:e},t),As.set(i,e),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(zd(i)))return}s=n.createElement("link"),cn(s,"link",e),Vt(s),n.head.appendChild(s)}}}function Rq(e,t,n){oi.S(e,t,n);var s=gc;if(s&&e){var r=ol(s).hoistableStyles,i=Wl(e);t=t||"default";var o=r.get(i);if(!o){var l={loading:0,preload:null};if(o=s.querySelector(Md(i)))l.loading=5;else{e=Qe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=As.get(i))&&sb(e,n);var c=o=s.createElement("link");Vt(c),cn(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){l.loading|=1}),c.addEventListener("error",function(){l.loading|=2}),l.loading|=4,ph(o,t,s)}o={type:"stylesheet",instance:o,count:1,state:l},r.set(i,o)}}}function Iq(e,t){oi.X(e,t);var n=gc;if(n&&e){var s=ol(n).hoistableScripts,r=mc(e),i=s.get(r);i||(i=n.querySelector(zd(r)),i||(e=Qe({src:e,async:!0},t),(t=As.get(r))&&rb(e,t),i=n.createElement("script"),Vt(i),cn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}function _q(e,t){oi.M(e,t);var n=gc;if(n&&e){var s=ol(n).hoistableScripts,r=mc(e),i=s.get(r);i||(i=n.querySelector(zd(r)),i||(e=Qe({src:e,async:!0,type:"module"},t),(t=As.get(r))&&rb(e,t),i=n.createElement("script"),Vt(i),cn(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}function ew(e,t,n,s){var r=(r=Li.current)?Wu(r):null;if(!r)throw Error(Z(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=Wl(n.href),t=ol(r).hoistableStyles,s=t.get(n),s||(s={type:"style",instance:null,count:0,state:null},t.set(n,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Wl(n.href);var i=ol(r).hoistableStyles,o=i.get(e);if(o||(r=r.ownerDocument||r,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=r.querySelector(Md(e)))?i._p||(o.instance=i,o.state.loading=5):(i=As.get(e),i||(i={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},As.set(e,i)),Lq(r,e,i,o.state))),t&&s===null)throw Error(Z(528,""));return o}if(t&&s!==null)throw Error(Z(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=mc(n),t=ol(r).hoistableScripts,s=t.get(n),s||(s={type:"script",instance:null,count:0,state:null},t.set(n,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(Z(444,e))}}function Wl(e){return'href="'+Ss(e)+'"'}function Md(e){return'link[rel="stylesheet"]['+e+"]"}function q9(e){return Qe({},e,{"data-precedence":e.precedence,precedence:null})}function Lq(e,t,n,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Yh]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[Yh]=!0,t.onload=t.onerror=p8.bind(null,t),cn(t,"link",n),Vt(t),e.head.appendChild(t);s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2})}function mc(e){return'[src="'+Ss(e)+'"]'}function zd(e){return"script[async]"+e}function tw(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ss(n.href)+'"]');if(s)return t.instance=s,Vt(s),s;var r=Qe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),Vt(s),cn(s,"style",r),ph(s,n.precedence,e),t.instance=s;case"stylesheet":r=Wl(n.href);var i=e.querySelector(Md(r));if(i)return t.state.loading|=4,t.instance=i,Vt(i),i;s=q9(n),(r=As.get(r))&&sb(s,r),i=(e.ownerDocument||e).createElement("link"),Vt(i);var o=i;return o._p=new Promise(function(l,c){o.onload=l,o.onerror=c}),cn(i,"link",s),t.state.loading|=4,ph(i,n.precedence,e),t.instance=i;case"script":return i=mc(n.src),(r=e.querySelector(zd(i)))?(t.instance=r,Vt(r),r):(s=n,(r=As.get(i))&&(s=Qe({},n),rb(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),Vt(r),cn(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(Z(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(s=t.instance,t.state.loading|=4,ph(s,n.precedence,e));return t.instance}function ph(e,t,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,i=r,o=0;o<s.length;o++){var l=s[o];if(l.dataset.precedence===t)i=l;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function sb(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function rb(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gh=null;function nw(e,t,n){if(gh===null){var s=new Map,r=gh=new Map;r.set(n,s)}else r=gh,s=r.get(n),s||(s=new Map,r.set(n,s));if(s.has(e))return s;for(s.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var i=n[r];if(!(i[Cd]||i[rn]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var l=s.get(o);l?l.push(i):s.set(o,[i])}}return s}function o0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Oq(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 sw(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function H9(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function P9(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function rw(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=P9(t),e.suspenseyImages.push(t)),e=qq.bind(e),t.decode().then(e,e))}function Dq(e,t,n,s){if(n.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var r=Wl(s.href),i=t.querySelector(Md(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ku.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Vt(i);return}i=t.ownerDocument||t,s=q9(s),(r=As.get(r))&&sb(s,r),i=i.createElement("link"),Vt(i);var o=i;o._p=new Promise(function(l,c){o.onload=l,o.onerror=c}),cn(i,"link",s),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Ku.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var mh=0;function Bq(e,t){return e.stylesheets&&e.count===0&&yh(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var s=setTimeout(function(){if(e.stylesheets&&yh(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&mh===0&&(mh=62500*sq());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yh(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>mh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function U9(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)yh(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function Ku(){this.count--,U9(this)}function qq(){this.imgCount--,U9(this)}var bx=null;function yh(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bx=new Map,t.forEach(Hq,e),bx=null,Ku.call(e))}function Hq(e,t){if(!(t.state.loading&4)){var n=bx.get(e);if(n)var s=n.get(null);else{n=new Map,bx.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var o=r[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(n.set(o.dataset.precedence,o),s=o)}s&&n.set(null,s)}r=t.instance,o=r.getAttribute("data-precedence"),i=n.get(o)||s,i===s&&n.set(null,r),n.set(o,r),this.count++,s=Ku.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Kl={$$typeof:ur,Provider:null,Consumer:null,_currentValue:Po,_currentValue2:Po,_threadCount:0};function Pq(e,t,n,s,r,i,o,l,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=Rp(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rp(0),this.hiddenUpdates=Rp(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function F9(e,t,n,s,r,i,o,l,c,u,d,h){return e=new Pq(e,t,n,o,c,u,d,h,l),t=1,i===!0&&(t|=24),i=On(3,null,null,t),e.current=i,i.stateNode=e,t=Sk(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:s,isDehydrated:n,cache:t},Ek(i),e}function G9(e){return e?(e=Ja,e):Ja}function V9(e,t,n,s,r,i){r=G9(r),s.context===null?s.context=r:s.pendingContext=r,s=Di(t),s.payload={element:n},i=i===void 0?null:i,i!==null&&(s.callback=i),n=Bi(e,s,t),n!==null&&(Dn(n,e,t),hu(n,e,t))}function iw(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ib(e,t){iw(e,t),(e=e.alternate)&&iw(e,t)}function W9(e){if(e.tag===13||e.tag===31){var t=ga(e,67108864);t!==null&&Dn(t,e,67108864),ib(e,67108864)}}function ow(e){if(e.tag===13||e.tag===31){var t=os();t=fk(t);var n=ga(e,t);n!==null&&Dn(n,e,t),ib(e,t)}}var Xl=!0;function Uq(e,t,n,s){var r=we.T;we.T=null;var i=qe.p;try{qe.p=2,ob(e,t,n,s)}finally{qe.p=i,we.T=r}}function Fq(e,t,n,s){var r=we.T;we.T=null;var i=qe.p;try{qe.p=8,ob(e,t,n,s)}finally{qe.p=i,we.T=r}}function ob(e,t,n,s){if(Xl){var r=a0(s);if(r===null)ig(e,t,s,vx,n),aw(e,s);else if(Vq(r,e,t,n,s))s.stopPropagation();else if(aw(e,s),t&4&&-1<Gq.indexOf(e)){for(;r!==null;){var i=fc(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=yo(i.pendingLanes);if(o!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;o;){var c=1<<31-is(o);l.entanglements[1]|=c,o&=~c}Cr(i),!(Be&6)&&(px=ss()+500,Ad(0))}}break;case 31:case 13:l=ga(i,2),l!==null&&Dn(l,i,2),E1(),ib(i,2)}if(i=a0(s),i===null&&ig(e,t,s,vx,n),i===r)break;r=i}r!==null&&s.stopPropagation()}else ig(e,t,s,null,n)}}function a0(e){return e=pk(e),ab(e)}var vx=null;function ab(e){if(vx=null,e=No(e),e!==null){var t=vd(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=Jj(t),e!==null)return e;e=null}else if(n===31){if(e=e8(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 vx=e,null}function K9(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"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"fullscreenerror":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"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sD()){case o8:return 2;case a8:return 8;case Zh:case rD:return 32;case l8:return 268435456;default:return 32}default:return 32}}var l0=!1,Ui=null,Fi=null,Gi=null,Xu=new Map,Zu=new Map,Si=[],Gq="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 aw(e,t){switch(e){case"focusin":case"focusout":Ui=null;break;case"dragenter":case"dragleave":Fi=null;break;case"mouseover":case"mouseout":Gi=null;break;case"pointerover":case"pointerout":Xu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zu.delete(t.pointerId)}}function Gc(e,t,n,s,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:i,targetContainers:[r]},t!==null&&(t=fc(t),t!==null&&W9(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Vq(e,t,n,s,r){switch(t){case"focusin":return Ui=Gc(Ui,e,t,n,s,r),!0;case"dragenter":return Fi=Gc(Fi,e,t,n,s,r),!0;case"mouseover":return Gi=Gc(Gi,e,t,n,s,r),!0;case"pointerover":var i=r.pointerId;return Xu.set(i,Gc(Xu.get(i)||null,e,t,n,s,r)),!0;case"gotpointercapture":return i=r.pointerId,Zu.set(i,Gc(Zu.get(i)||null,e,t,n,s,r)),!0}return!1}function X9(e){var t=No(e.target);if(t!==null){var n=vd(t);if(n!==null){if(t=n.tag,t===13){if(t=Jj(n),t!==null){e.blockedOn=t,I2(e.priority,function(){ow(n)});return}}else if(t===31){if(t=e8(n),t!==null){e.blockedOn=t,I2(e.priority,function(){ow(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 kh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=a0(e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);dm=s,n.target.dispatchEvent(s),dm=null}else return t=fc(n),t!==null&&W9(t),e.blockedOn=n,!1;t.shift()}return!0}function lw(e,t,n){kh(e)&&n.delete(t)}function Wq(){l0=!1,Ui!==null&&kh(Ui)&&(Ui=null),Fi!==null&&kh(Fi)&&(Fi=null),Gi!==null&&kh(Gi)&&(Gi=null),Xu.forEach(lw),Zu.forEach(lw)}function If(e,t){e.blockedOn===t&&(e.blockedOn=null,l0||(l0=!0,Rt.unstable_scheduleCallback(Rt.unstable_NormalPriority,Wq)))}var _f=null;function cw(e){_f!==e&&(_f=e,Rt.unstable_scheduleCallback(Rt.unstable_NormalPriority,function(){_f===e&&(_f=null);for(var t=0;t<e.length;t+=3){var n=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(ab(s||n)===null)continue;break}var i=fc(n);i!==null&&(e.splice(t,3),t-=3,Em(i,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function Zl(e){function t(c){return If(c,e)}Ui!==null&&If(Ui,e),Fi!==null&&If(Fi,e),Gi!==null&&If(Gi,e),Xu.forEach(t),Zu.forEach(t);for(var n=0;n<Si.length;n++){var s=Si[n];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Si.length&&(n=Si[0],n.blockedOn===null);)X9(n),n.blockedOn===null&&Si.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var r=n[s],i=n[s+1],o=r[qn]||null;if(typeof i=="function")o||cw(n);else if(o){var l=null;if(i&&i.hasAttribute("formAction")){if(r=i,o=i[qn]||null)l=o.formAction;else if(ab(r)!==null)continue}else l=o.action;typeof l=="function"?n[s+1]=l:(n.splice(s,3),s-=3),cw(n)}}}function Z9(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return r=o})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function lb(e){this._internalRoot=e}A1.prototype.render=lb.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Z(409));var n=t.current,s=os();V9(n,s,e,t,null,null)};A1.prototype.unmount=lb.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;V9(e.current,2,null,e,null,null),E1(),t[dc]=null}};function A1(e){this._internalRoot=e}A1.prototype.unstable_scheduleHydration=function(e){if(e){var t=x8();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Si.length&&t!==0&&t<Si[n].priority;n++);Si.splice(n,0,e),n===0&&X9(e)}};var uw=Yj.version;if(uw!=="19.3.0")throw Error(Z(527,uw,"19.3.0"));qe.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Z(188)):(e=Object.keys(e).join(","),Error(Z(268,e)));return e=VO(t),e=e!==null?t8(e):null,e=e===null?null:e.stateNode,e};var Kq={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:we,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Lf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Lf.isDisabled&&Lf.supportsFiber)try{wd=Lf.inject(Kq),rs=Lf}catch{}}d1.createRoot=function(e,t){if(!Qj(e))throw Error(Z(299));var n=!1,s="",r=M7,i=z7,o=R7;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=F9(e,1,!1,null,null,n,s,null,r,i,o,Z9),e[dc]=t.current,Jk(e),new lb(t)};d1.hydrateRoot=function(e,t,n){if(!Qj(e))throw Error(Z(299));var s=!1,r="",i=M7,o=z7,l=R7,c=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=F9(e,1,!0,t,n??null,s,r,c,i,o,l,Z9),t.context=G9(null),n=t.current,s=os(),s=fk(s),r=Di(s),r.callback=null,Bi(n,r,s),n=s,t.current.lanes=n,Sd(t,n),Cr(t),e[dc]=t.current,Jk(e),new A1(t)};d1.version="19.3.0";function Y9(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Y9)}catch(e){console.error(e)}}Y9(),Kj.exports=d1;var Q9=Kj.exports;let Wn=null,dw=null;const fw=["data-theme",_n("theme")];function Xq(e){const t=()=>{let s=null;for(const r of fw){const i=document.documentElement.getAttribute(r);i==null?e.removeAttribute(r):(e.setAttribute(r,i),r==="data-theme"&&(s=i))}s==="light"||s==="dark"?e.style.colorScheme=s:e.style.removeProperty("color-scheme")};t(),new MutationObserver(t).observe(document.documentElement,{attributes:!0,attributeFilter:[...fw]})}function Zq(){if(Wn)return Wn;if(typeof document>"u")throw new Error("useToast: Cannot create fallback viewport during SSR. Wrap your app with <LayerProvider> or <AppShell>.");xy();const e=document.createElement("div");e.setAttribute("data-astryx-toast-fallback",""),document.body.appendChild(e),Xq(e);let t;const n=new Promise(o=>{t=o}),s=()=>{const o=x.use(i1),l=x.useRef(!1);return x.useEffect(()=>{o&&!l.current&&(l.current=!0,Wn=o,t==null||t(o))},[o]),null};dw=Q9.createRoot(e),dw.render(a.jsx(My,{children:a.jsx(s,{})}));const r=[],i={addToast:o=>{Wn&&Wn!==i?Wn.addToast(o):(r.push(o),n.then(l=>{for(const c of r)l.addToast(c);r.length=0}))},removeToast:(o,l)=>{Wn&&Wn!==i&&Wn.removeToast(o,l)},findByUniqueID:o=>{if(Wn&&Wn!==i)return Wn.findByUniqueID(o)}};return Wn=i,i}let Yq=0;function Qq(){return`astryx-toast-${++Yq}`}function J9(){const e=x.use(i1);return x.useCallback(n=>{const s=e??Zq(),r=Qq(),i={id:r,options:n,createdAt:Date.now()};return s.addToast(i),()=>s.removeToast(r,"manual")},[e])}const cg={base:{k1xSpc:"x1rg5ohu",kaIpWk:"x16rqkct",kmuXW:"x2lah0s",kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},pulsing:{kKVMdj:"x1mta51n",k44tkh:"x1c74tu6",kyAemX:"x4hg4is",ko0y90:"xa4qsjk",$$css:!0},reducedMotion:{kjO2d4:"x1aquc0h",$$css:!0}},Jq={success:{kWkggS:"xdsz4j9",$$css:!0},warning:{kWkggS:"x1q8g9m5",$$css:!0},error:{kWkggS:"x1pjz0fi",$$css:!0},accent:{kWkggS:"x1ewilqj",$$css:!0},neutral:{kWkggS:"x1q5y3ey",$$css:!0}};function br({variant:e,label:t,isPulsing:n=!1,tooltip:s,xstyle:r,className:i,style:o,ref:l,...c}){const u=a.jsx("span",{ref:l,role:"img","aria-label":t,...K(W("statusdot",{variant:e}),q(cg.base,Jq[e],n&&cg.pulsing,n&&cg.reducedMotion,r),i,o),...c});return s?a.jsx(to,{content:s,children:u}):u}br.displayName="StatusDot";/**
|
|
191
|
-
* @license lucide-react v1.52.0 - ISC
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the ISC license.
|
|
194
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const eH=e=>e==null?void 0:e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
196
|
-
* @license lucide-react v1.52.0 - ISC
|
|
197
|
-
*
|
|
198
|
-
* This source code is licensed under the ISC license.
|
|
199
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/function tH(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:eH(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}/**
|
|
201
|
-
* @license lucide-react v1.52.0 - ISC
|
|
202
|
-
*
|
|
203
|
-
* This source code is licensed under the ISC license.
|
|
204
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
205
|
-
*/const nH=e=>{let t="",n=!1;for(const s of e){if(s==="-"||s==="_"||s<=" "){n=t.length>0;continue}t.length===0?t+=s.toLowerCase():t+=n?s.toUpperCase():s,n=!1}return t};/**
|
|
206
|
-
* @license lucide-react v1.52.0 - ISC
|
|
207
|
-
*
|
|
208
|
-
* This source code is licensed under the ISC license.
|
|
209
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const sH=e=>{const t=nH(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
211
|
-
* @license lucide-react v1.52.0 - ISC
|
|
212
|
-
*
|
|
213
|
-
* This source code is licensed under the ISC license.
|
|
214
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const c0=(...e)=>e.filter((t,n,s)=>!!t&&t.trim()!==""&&s.indexOf(t)===n).join(" ").trim();/**
|
|
216
|
-
* @license lucide-react v1.52.0 - ISC
|
|
217
|
-
*
|
|
218
|
-
* This source code is licensed under the ISC license.
|
|
219
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
220
|
-
*/const po={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
|
|
221
|
-
* @license lucide-react v1.52.0 - ISC
|
|
222
|
-
*
|
|
223
|
-
* This source code is licensed under the ISC license.
|
|
224
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/function ug(e){return e!=null}function rH(e,t={}){var f,p;const n=t.attributeNames??{},s=g=>n[g]??g,r=e.size??e.width??po.width,i=e.size??e.height??po.height,o=((f=e.aliases)==null?void 0:f.filter(g=>typeof g=="string"&&g.trim()!=="").map(g=>`lucide-${g}`))??[],l=[...e.name?[`lucide-${e.name}`]:[],...o],c=((p=t.className)==null?void 0:p.split(" ").filter(Boolean))??[],u=t.includeDefaultClasses===!1?c0(...c):c0("lucide",...l,...c),d=t.absoluteStrokeWidth?Number(t.strokeWidth??po["stroke-width"])*Number(e.size??e.width??po.width)/Number(t.size??t.width??po.width):t.strokeWidth??po["stroke-width"];return["svg",{...Object.entries(po).reduce((g,[b,y])=>(g[s(b)]=y,g),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&ug(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&ug(t.width)&&{[s("width")]:t.width},..."height"in t&&ug(t.height)&&{[s("height")]:t.height},[s("stroke-width")]:d,...u&&{[s("class")]:u},[s("viewBox")]:`0 0 ${r} ${i}`,...t.hasA11yProp===!1?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(g=>{const[b,y,m]=g,k=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...y}:y;return m?[b,k,m]:[b,k]})]}/**
|
|
226
|
-
* @license lucide-react v1.52.0 - ISC
|
|
227
|
-
*
|
|
228
|
-
* This source code is licensed under the ISC license.
|
|
229
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
230
|
-
*/function iH(e,t={}){return rH(e,{...t,attributeNames:{...t.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
|
|
231
|
-
* @license lucide-react v1.52.0 - ISC
|
|
232
|
-
*
|
|
233
|
-
* This source code is licensed under the ISC license.
|
|
234
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
235
|
-
*/const oH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},aH=x.createContext({}),lH=()=>x.useContext(aH),cH=x.forwardRef(({color:e,size:t,width:n,height:s,strokeWidth:r,absoluteStrokeWidth:i,nonScalingStroke:o,className:l="",children:c,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...h},f)=>{const{size:p=24,strokeWidth:g=2,absoluteStrokeWidth:b=!1,nonScalingStroke:y=!1,color:m="currentColor",className:k=""}=lH()??{},w=!!c||oH(h),[v,j,C=[]]=iH(d,{color:e??m,width:n??t??p,height:s??t??p,strokeWidth:r??g,absoluteStrokeWidth:i??b,nonScalingStroke:o??y,className:c0(k,l),hasA11yProp:w,attributes:h});return x.createElement(v,{ref:f,...j},[...C.map(([$,T])=>x.createElement($,T)),...Array.isArray(c)?c:[c]])});/**
|
|
236
|
-
* @license lucide-react v1.52.0 - ISC
|
|
237
|
-
*
|
|
238
|
-
* This source code is licensed under the ISC license.
|
|
239
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
240
|
-
*/function Xe(e,t=[],n=[]){const s=typeof e=="string"?tH(e,t,n):e,r=x.forwardRef(({className:i,...o},l)=>x.createElement(cH,{ref:l,icon:s,className:i,...o}));return s.name&&(r.displayName=sH(s.name)),r}/**
|
|
241
|
-
* @license lucide-react v1.52.0 - ISC
|
|
242
|
-
*
|
|
243
|
-
* This source code is licensed under the ISC license.
|
|
244
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
-
*/const eS={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};eS.node;const uH=Xe(eS);/**
|
|
246
|
-
* @license lucide-react v1.52.0 - ISC
|
|
247
|
-
*
|
|
248
|
-
* This source code is licensed under the ISC license.
|
|
249
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
250
|
-
*/const tS={name:"arrow-up-down",size:24,node:[["path",{d:"m21 16-4 4-4-4",key:"f6ql7i"}],["path",{d:"M17 20V4",key:"1ejh1v"}],["path",{d:"m3 8 4-4 4 4",key:"11wl7u"}],["path",{d:"M7 4v16",key:"1glfcx"}]]};tS.node;const dH=Xe(tS);/**
|
|
251
|
-
* @license lucide-react v1.52.0 - ISC
|
|
252
|
-
*
|
|
253
|
-
* This source code is licensed under the ISC license.
|
|
254
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
255
|
-
*/const nS={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};nS.node;const fH=Xe(nS);/**
|
|
256
|
-
* @license lucide-react v1.52.0 - ISC
|
|
257
|
-
*
|
|
258
|
-
* This source code is licensed under the ISC license.
|
|
259
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
260
|
-
*/const sS={name:"calendar",size:24,node:[["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"}]]};sS.node;const hH=Xe(sS);/**
|
|
261
|
-
* @license lucide-react v1.52.0 - ISC
|
|
262
|
-
*
|
|
263
|
-
* This source code is licensed under the ISC license.
|
|
264
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
265
|
-
*/const rS={name:"check-check",size:24,node:[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]};rS.node;const xH=Xe(rS);/**
|
|
266
|
-
* @license lucide-react v1.52.0 - ISC
|
|
267
|
-
*
|
|
268
|
-
* This source code is licensed under the ISC license.
|
|
269
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
270
|
-
*/const iS={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};iS.node;const pH=Xe(iS);/**
|
|
271
|
-
* @license lucide-react v1.52.0 - ISC
|
|
272
|
-
*
|
|
273
|
-
* This source code is licensed under the ISC license.
|
|
274
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
275
|
-
*/const oS={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};oS.node;const gH=Xe(oS);/**
|
|
276
|
-
* @license lucide-react v1.52.0 - ISC
|
|
277
|
-
*
|
|
278
|
-
* This source code is licensed under the ISC license.
|
|
279
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
-
*/const aS={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};aS.node;const mH=Xe(aS);/**
|
|
281
|
-
* @license lucide-react v1.52.0 - ISC
|
|
282
|
-
*
|
|
283
|
-
* This source code is licensed under the ISC license.
|
|
284
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
285
|
-
*/const lS={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};lS.node;const yH=Xe(lS);/**
|
|
286
|
-
* @license lucide-react v1.52.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/const cS={name:"chevrons-left",size:24,node:[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]]};cS.node;const kH=Xe(cS);/**
|
|
291
|
-
* @license lucide-react v1.52.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/const uS={name:"chevrons-right",size:24,node:[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]};uS.node;const bH=Xe(uS);/**
|
|
296
|
-
* @license lucide-react v1.52.0 - ISC
|
|
297
|
-
*
|
|
298
|
-
* This source code is licensed under the ISC license.
|
|
299
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
300
|
-
*/const dS={name:"circle-check-big",size:24,node:[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],aliases:["check-circle"]};dS.node;const vH=Xe(dS);/**
|
|
301
|
-
* @license lucide-react v1.52.0 - ISC
|
|
302
|
-
*
|
|
303
|
-
* This source code is licensed under the ISC license.
|
|
304
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
305
|
-
*/const fS={name:"circle-x",size:24,node:[["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"}]],aliases:["x-circle"]};fS.node;const wH=Xe(fS);/**
|
|
306
|
-
* @license lucide-react v1.52.0 - ISC
|
|
307
|
-
*
|
|
308
|
-
* This source code is licensed under the ISC license.
|
|
309
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
310
|
-
*/const hS={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};hS.node;const jH=Xe(hS);/**
|
|
311
|
-
* @license lucide-react v1.52.0 - ISC
|
|
312
|
-
*
|
|
313
|
-
* This source code is licensed under the ISC license.
|
|
314
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
315
|
-
*/const xS={name:"columns-2",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]],aliases:["columns"]};xS.node;const SH=Xe(xS);/**
|
|
316
|
-
* @license lucide-react v1.52.0 - ISC
|
|
317
|
-
*
|
|
318
|
-
* This source code is licensed under the ISC license.
|
|
319
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
320
|
-
*/const pS={name:"copy",size:24,node:[["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"}]]};pS.node;const CH=Xe(pS);/**
|
|
321
|
-
* @license lucide-react v1.52.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/const gS={name:"ellipsis",size:24,node:[["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"}]],aliases:["more-horizontal"]};gS.node;const $H=Xe(gS);/**
|
|
326
|
-
* @license lucide-react v1.52.0 - ISC
|
|
327
|
-
*
|
|
328
|
-
* This source code is licensed under the ISC license.
|
|
329
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
330
|
-
*/const mS={name:"external-link",size:24,node:[["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"}]]};mS.node;const EH=Xe(mS);/**
|
|
331
|
-
* @license lucide-react v1.52.0 - ISC
|
|
332
|
-
*
|
|
333
|
-
* This source code is licensed under the ISC license.
|
|
334
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
335
|
-
*/const yS={name:"eye-off",size:24,node:[["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"}]]};yS.node;const TH=Xe(yS);/**
|
|
336
|
-
* @license lucide-react v1.52.0 - ISC
|
|
337
|
-
*
|
|
338
|
-
* This source code is licensed under the ISC license.
|
|
339
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
340
|
-
*/const kS={name:"funnel",size:24,node:[["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"}]],aliases:["filter"]};kS.node;const NH=Xe(kS);/**
|
|
341
|
-
* @license lucide-react v1.52.0 - ISC
|
|
342
|
-
*
|
|
343
|
-
* This source code is licensed under the ISC license.
|
|
344
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
345
|
-
*/const bS={name:"info",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]};bS.node;const AH=Xe(bS);/**
|
|
346
|
-
* @license lucide-react v1.52.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/const vS={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};vS.node;const MH=Xe(vS);/**
|
|
351
|
-
* @license lucide-react v1.52.0 - ISC
|
|
352
|
-
*
|
|
353
|
-
* This source code is licensed under the ISC license.
|
|
354
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
355
|
-
*/const wS={name:"mic",size:24,node:[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]};wS.node;const zH=Xe(wS);/**
|
|
356
|
-
* @license lucide-react v1.52.0 - ISC
|
|
357
|
-
*
|
|
358
|
-
* This source code is licensed under the ISC license.
|
|
359
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
360
|
-
*/const jS={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};jS.node;const RH=Xe(jS);/**
|
|
361
|
-
* @license lucide-react v1.52.0 - ISC
|
|
362
|
-
*
|
|
363
|
-
* This source code is licensed under the ISC license.
|
|
364
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
365
|
-
*/const SS={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};SS.node;const IH=Xe(SS);/**
|
|
366
|
-
* @license lucide-react v1.52.0 - ISC
|
|
367
|
-
*
|
|
368
|
-
* This source code is licensed under the ISC license.
|
|
369
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
370
|
-
*/const CS={name:"triangle-alert",size:24,node:[["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"}]],aliases:["alert-triangle"]};CS.node;const _H=Xe(CS);/**
|
|
371
|
-
* @license lucide-react v1.52.0 - ISC
|
|
372
|
-
*
|
|
373
|
-
* This source code is licensed under the ISC license.
|
|
374
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
375
|
-
*/const $S={name:"wrench",size:24,node:[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]]};$S.node;const LH=Xe($S);/**
|
|
376
|
-
* @license lucide-react v1.52.0 - ISC
|
|
377
|
-
*
|
|
378
|
-
* This source code is licensed under the ISC license.
|
|
379
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
380
|
-
*/const ES={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};ES.node;const OH=Xe(ES);var We={size:"1em","aria-hidden":!0},DH={close:a.jsx(OH,{...We}),chevronDown:a.jsx(gH,{...We}),chevronLeft:a.jsx(mH,{...We}),chevronRight:a.jsx(yH,{...We}),chevronsLeft:a.jsx(kH,{...We}),chevronsRight:a.jsx(bH,{...We}),check:a.jsx(pH,{...We}),success:a.jsx(vH,{...We}),error:a.jsx(wH,{...We}),warning:a.jsx(_H,{...We}),info:a.jsx(AH,{...We}),calendar:a.jsx(hH,{...We}),clock:a.jsx(jH,{...We}),externalLink:a.jsx(EH,{...We}),menu:a.jsx(MH,{...We}),moreHorizontal:a.jsx($H,{...We}),search:a.jsx(RH,{...We}),arrowUp:a.jsx(fH,{...We}),arrowDown:a.jsx(uH,{...We}),arrowsUpDown:a.jsx(dH,{...We}),funnel:a.jsx(NH,{...We}),eyeSlash:a.jsx(TH,{...We}),viewColumns:a.jsx(SH,{...We}),copy:a.jsx(CH,{...We}),checkDouble:a.jsx(xH,{...We}),wrench:a.jsx(LH,{...We}),stop:a.jsx(IH,{...We}),microphone:a.jsx(zH,{...We})};const BH={name:"neutral",__built:!0,tokens:{"--font-size-4xs":"0.375rem","--font-size-3xs":"0.4375rem","--font-size-2xs":"0.5rem","--font-size-xs":"0.625rem","--font-size-sm":"0.75rem","--font-size-base":"0.875rem","--font-size-lg":"1.0625rem","--font-size-xl":"1.25rem","--font-size-2xl":"1.5rem","--font-size-3xl":"1.8125rem","--font-size-4xl":"2.1875rem","--font-size-5xl":"2.625rem","--text-heading-1-size":"var(--font-size-2xl)","--text-heading-1-weight":"var(--font-weight-semibold)","--text-heading-1-leading":"1.3333","--text-heading-2-size":"var(--font-size-xl)","--text-heading-2-weight":"var(--font-weight-semibold)","--text-heading-2-leading":"1.4","--text-heading-3-size":"var(--font-size-lg)","--text-heading-3-weight":"var(--font-weight-bold)","--text-heading-3-leading":"1.4118","--text-heading-4-size":"var(--font-size-base)","--text-heading-4-weight":"var(--font-weight-bold)","--text-heading-4-leading":"1.4286","--text-heading-5-size":"var(--font-size-sm)","--text-heading-5-weight":"var(--font-weight-semibold)","--text-heading-5-leading":"1.6667","--text-heading-6-size":"var(--font-size-xs)","--text-heading-6-weight":"var(--font-weight-semibold)","--text-heading-6-leading":"1.6","--text-body-size":"var(--font-size-base)","--text-body-weight":"var(--font-weight-normal)","--text-body-leading":"1.4286","--text-large-size":"var(--font-size-lg)","--text-large-weight":"var(--font-weight-semibold)","--text-large-leading":"1.4118","--text-label-size":"var(--font-size-base)","--text-label-weight":"var(--font-weight-medium)","--text-label-leading":"1.4286","--text-code-size":"var(--font-size-base)","--text-code-weight":"var(--font-weight-normal)","--text-code-leading":"1.4286","--text-supporting-size":"var(--font-size-sm)","--text-supporting-weight":"var(--font-weight-normal)","--text-supporting-leading":"1.6667","--text-display-1-size":"var(--font-size-5xl)","--text-display-1-weight":"var(--font-weight-normal)","--text-display-1-leading":"1.2381","--text-display-2-size":"var(--font-size-4xl)","--text-display-2-weight":"var(--font-weight-normal)","--text-display-2-leading":"1.2571","--text-display-3-size":"var(--font-size-3xl)","--text-display-3-weight":"var(--font-weight-normal)","--text-display-3-leading":"1.3793","--duration-fast-min":"95ms","--duration-fast":"125ms","--duration-fast-max":"165ms","--duration-medium-min":"225ms","--duration-medium":"300ms","--duration-medium-max":"400ms","--duration-slow-min":"525ms","--duration-slow":"700ms","--duration-slow-max":"935ms","--font-family-body":'Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-heading":'Figtree, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',"--font-family-code":'ui-monospace, "SF Mono", Monaco, Consolas, "Liberation Mono", "Courier New", monospace',"--color-syntax-keyword":"light-dark(#700084, #efa8ff)","--color-syntax-string":"light-dark(#005600, #a6d2a2)","--color-syntax-comment":"light-dark(#737373, #a3a3a3)","--color-syntax-number":"light-dark(#6e3500, #ffb37f)","--color-syntax-function":"light-dark(#00458c, #a0caff)","--color-syntax-type":"light-dark(#700084, #efa8ff)","--color-syntax-variable":"light-dark(#171717, #e5e5e5)","--color-syntax-operator":"light-dark(#737373, #a3a3a3)","--color-syntax-constant":"light-dark(#6e3500, #ffb37f)","--color-syntax-tag":"light-dark(#89001a, #ffaeaa)","--color-syntax-attribute":"light-dark(#584400, #eec12f)","--color-syntax-property":"light-dark(#005348, #83dac9)","--color-syntax-punctuation":"light-dark(#a3a3a3, #525252)","--color-syntax-background":"light-dark(#fafafa, #0a0a0a)","--color-background-surface":"light-dark(#ffffff, #262626)","--color-background-body":"light-dark(#f1f1f1, #1b1b1b)","--color-background-card":"light-dark(#ffffff, #1b1b1b)","--color-background-popover":"light-dark(#ffffff, #1b1b1b)","--color-background-muted":"light-dark(#f1f1f1, #1b1b1b)","--color-accent":"light-dark(#262626, #ebebeb)","--color-accent-muted":"light-dark(#f1f1f1, #262626)","--color-neutral":"light-dark(#0000000F, #FFFFFF1A)","--color-overlay":"light-dark(#00000080, #000000CC)","--color-overlay-hover":"light-dark(#0000000D, #FFFFFF0D)","--color-overlay-pressed":"light-dark(#0000001A, #FFFFFF1A)","--color-text-primary":"light-dark(#171717, #fafafa)","--color-text-secondary":"light-dark(#525252, #a3a3a3)","--color-text-disabled":"light-dark(#a3a3a3, #525252)","--color-text-accent":"light-dark(#262626, #ebebeb)","--color-on-dark":"#ffffff","--color-on-light":"#171717","--color-on-accent":"light-dark(#ffffff, #171717)","--color-on-success":"light-dark(#ffffff, #171717)","--color-on-error":"light-dark(#ffffff, #171717)","--color-on-warning":"#171717","--color-icon-accent":"light-dark(#262626, #ebebeb)","--color-icon-primary":"light-dark(#171717, #fafafa)","--color-icon-secondary":"light-dark(#737373, #a3a3a3)","--color-icon-disabled":"light-dark(#a3a3a3, #525252)","--color-success":"light-dark(#007004, #9fe59b)","--color-error":"light-dark(#a50c25, #ffc6c1)","--color-warning":"light-dark(#745b00, #fdcf4f)","--color-success-muted":"light-dark(#c5e5c0, #84c9803D)","--color-error-muted":"light-dark(#facecb, #ff9e973D)","--color-warning-muted":"light-dark(#f8da9d, #deb4333D)","--color-border":"light-dark(#00000014, #FFFFFF1A)","--color-border-emphasized":"light-dark(#d4d4d4, #525252)","--color-skeleton":"light-dark(#ebebeb, #525252)","--color-shadow":"light-dark(#0000001A, #0000004D)","--color-tint-hover":"light-dark(black, white)","--color-background-red":"light-dark(#facecb, #ff9e973D)","--color-border-red":"light-dark(#e6bab8, #ff6f6c)","--color-icon-red":"light-dark(#89001a, #ff9e97)","--color-text-red":"light-dark(#89001a, #ffc6c1)","--color-background-orange":"light-dark(#fad0b5, #ffa2583D)","--color-border-orange":"light-dark(#e6bda2, #e2883e)","--color-icon-orange":"light-dark(#6e3500, #ffa258)","--color-text-orange":"light-dark(#6e3500, #ffc9a2)","--color-background-yellow":"light-dark(#f8da9d, #deb4333D)","--color-border-yellow":"light-dark(#e4c279, #c0990e)","--color-icon-yellow":"light-dark(#584400, #deb433)","--color-text-yellow":"light-dark(#584400, #fdcf4f)","--color-background-green":"light-dark(#c5e5c0, #84c9803D)","--color-border-green":"light-dark(#b2d1ac, #69ad67)","--color-icon-green":"light-dark(#0c5700, #84c980)","--color-text-green":"light-dark(#0c5700, #9fe59b)","--color-background-teal":"light-dark(#a5e3d6, #7ec6b83D)","--color-border-teal":"light-dark(#94d6c8, #63ab9d)","--color-icon-teal":"light-dark(#005348, #7ec6b8)","--color-text-teal":"light-dark(#005348, #99e2d3)","--color-background-cyan":"light-dark(#a3e0ef, #83c2d43D)","--color-border-cyan":"light-dark(#91d3e3, #67a7b8)","--color-icon-cyan":"light-dark(#00505f, #83c2d4)","--color-text-cyan":"light-dark(#00505f, #9edef0)","--color-background-blue":"light-dark(#c4ddfb, #9eb7ff3D)","--color-border-blue":"light-dark(#b1c9e7, #6d9cfe)","--color-icon-blue":"light-dark(#00458c, #9eb7ff)","--color-text-blue":"light-dark(#00458c, #c7d3ff)","--color-background-purple":"light-dark(#eccef3, #f297ff3D)","--color-border-purple":"light-dark(#d8bbdf, #dd74f0)","--color-icon-purple":"light-dark(#700084, #f297ff)","--color-text-purple":"light-dark(#700084, #fac1ff)","--color-background-pink":"light-dark(#fccadc, #ff99c33D)","--color-border-pink":"light-dark(#e7b7c8, #f273aa)","--color-icon-pink":"light-dark(#83004b, #ff99c3)","--color-text-pink":"light-dark(#83004b, #ffc3da)","--color-background-gray":"light-dark(#e5e5e5, var(--color-neutral))","--color-border-gray":"light-dark(#d4d4d4, #262626)","--color-icon-gray":"light-dark(#525252, #a3a3a3)","--color-text-gray":"light-dark(#262626, #e5e5e5)","--radius-none":"0.25rem","--radius-inner":"0.375rem","--radius-element":"0.625rem","--radius-container":"0.75rem","--radius-page":"1.75rem","--radius-full":"9999px","--shadow-low":"0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 25%)), 0 4px 8px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 40%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 8%))","--shadow-med":"0 2px 4px light-dark(oklch(0 0 0 / 5%), oklch(0 0 0 / 35%)), 0 4px 12px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 12%))","--shadow-high":"0 4px 6px light-dark(oklch(0 0 0 / 10%), oklch(0 0 0 / 50%)), 0 12px 24px light-dark(oklch(0 0 0 / 15%), oklch(0 0 0 / 70%)), inset 0 0 0 1px light-dark(transparent, oklch(1 0 0 / 15%))","--shadow-inset-hover":"inset 0px 0px 0px 2px #0074e24D","--shadow-inset-selected":"inset 0px 0px 0px 2px #0074e280","--shadow-inset-success":"inset 0px 0px 0px 2px #1981004D","--shadow-inset-warning":"inset 0px 0px 0px 2px #ffce2f4D","--shadow-inset-error":"inset 0px 0px 0px 2px #e33f4a4D"},icons:DH},qH=["image/jpeg","image/png","image/gif","image/webp"];function TS(e){return"data"in e?e:{ref:e.ref}}const HH=new TextEncoder;async function PH(e){const t=await globalThis.crypto.subtle.digest("SHA-256",HH.encode(`${e.mimeType}
|
|
381
|
-
${e.data}`));return Array.from(new Uint8Array(t),n=>n.toString(16).padStart(2,"0")).join("")}const wu=4,UH=5*1024*1024,FH=/^[A-Za-z0-9+/]*={0,2}$/;function GH(e){if(e.length>wu)return`At most ${wu} images per message`;for(let t=0;t<e.length;t++){const n=e[t];if(!qH.includes(n.mimeType))return`Unsupported image type: ${n.mimeType} (use JPEG, PNG, GIF or WebP)`;if(n.data===""||n.data.length%4!==0||!FH.test(n.data))return`Image ${t+1} is not valid base64`;const s=n.data.endsWith("==")?2:n.data.endsWith("=")?1:0;if(n.data.length*3/4-s>UH)return`Image ${t+1} is larger than 5 MB`}}function VH(e,t){const n=new Map(t.map(d=>[d.id,d])),s=new Map,r=new Map;for(const d of e.conversations){const h=d.home;if(h.kind==="project"&&!e.projects.some(p=>p.path===h.path))continue;const f=n.get(d.id);f!==void 0&&(r.set(d.id,d),s.set(d.id,{summary:f,children:[]}))}for(const d of t){const h=[d];let f=d;for(;!r.has(f.id);){const p=f.parent===void 0?void 0:n.get(f.parent);if(p===void 0||h.includes(p))break;h.push(p),f=p}if(r.has(f.id))for(let p=h.length-1;p>=0;p--){const g=h[p];if(s.has(g.id)||s.set(g.id,{summary:g,children:[]}),p<h.length-1){const b=s.get(h[p+1].id),y=s.get(g.id);b.children.includes(y)||b.children.push(y)}}}const i=(d,h)=>d.summary.id-h.summary.id,o=d=>l(s.get(d.id)),l=d=>({summary:d.summary,children:[...d.children].sort(i).map(l)}),c=[...r.values()].sort((d,h)=>h.createdAt-d.createdAt),u=c.filter(d=>d.archived!==!0);return{chats:u.filter(d=>d.home.kind==="chat").map(o),projects:[...e.projects].sort((d,h)=>h.addedAt-d.addedAt).map(d=>({project:d,conversations:u.filter(h=>h.home.kind==="project"&&h.home.path===d.path).map(o)})),archived:c.filter(d=>d.archived===!0).map(d=>{const h=d.home,f=h.kind==="project"?e.projects.find(p=>p.path===h.path):void 0;return{node:o(d),...f===void 0?{}:{project:f}}})}}function mr(e,t){const n=s=>{for(const r of s){if(r.summary.id===t)return r;const i=n(r.children);if(i!==void 0)return i}};return n([...e.chats,...e.projects.flatMap(s=>s.conversations)])}function WH(e,t,n){var l,c;const s=(l=e.checkouts)==null?void 0:l.find(u=>u.conversationId===n);if(s!==void 0)return s;const r=new Map(t.map(u=>[u.id,u])),i=new Set;let o=r.get(n);for(;o!==void 0&&!i.has(o.id);){i.add(o.id);const u=(c=e.checkouts)==null?void 0:c.find(d=>d.conversationId===o.id);if(u!==void 0)return u;o=o.parent===void 0?void 0:r.get(o.parent)}}function KH(e,t,n){const s=e.conversations.find(l=>l.id===n);if(s!==void 0)return s.home;const r=new Map(t.map(l=>[l.id,l])),i=new Set;let o=r.get(n);for(;o!==void 0&&!i.has(o.id);){i.add(o.id);const l=e.conversations.find(c=>c.id===o.id);if(l!==void 0)return l.home;o=o.parent===void 0?void 0:r.get(o.parent)}}const hw={"needs-answer":3,failed:2,running:1};function XH(e){let t;const n=s=>{const r=s.summary.status;r!==void 0&&(t===void 0||hw[r]>hw[t])&&(t=r);for(const i of s.children)n(i)};return n(e),t}function ZH(e){let t;const n=s=>{const r=s.summary.updatedAt;r!==void 0&&(t===void 0||r>t)&&(t=r);for(const i of s.children)n(i)};return n(e),t}function cb(e,t){const n=Math.max(0,Math.floor((t-e)/1e3));if(n<60)return"now";const s=Math.floor(n/60);if(s<60)return`${s}m`;const r=Math.floor(s/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}const YH=/^\s*in the working directory\s+\S+,\s*/i;function Hn(e){var n;if(e===void 0)return"Conversation";if(e.kind!=="subagent")return e.title??"New conversation";if(e.label!==void 0)return e.label;const t=(n=e.title)==null?void 0:n.replace(YH,"").trim();return t===void 0||t===""?"Subagent":t}function M1(e,t){let n=mr(e,t);for(let s=0;n!==void 0&&n.summary.parent!==void 0&&s<4;s++)n=mr(e,n.summary.parent);return n}function NS(e){const t=[],n=s=>{for(const r of s.children)r.summary.kind==="fork"&&(t.push(r),n(r))};return n(e),t}function ub(e){const t=[],n=e.children.filter(s=>s.summary.kind==="subagent");n.length>0&&t.push({owner:e.summary,label:"This conversation",tasks:[...n]});for(const s of NS(e)){const r=s.children.filter(i=>i.summary.kind==="subagent");r.length>0&&t.push({owner:s.summary,label:Hn(s.summary),tasks:[...r]})}return t}function AS(e,t,n){var s;return(((s=mr(e,t))==null?void 0:s.children)??[]).filter(r=>r.summary.forkedAt===n).map(r=>r.summary.id)}function Yl(){typeof Notification>"u"||Notification.permission!=="default"||Notification.requestPermission()}const QH=100*1024*1024,JH=4;var id,zn,_o,Sl,Ci,Lo,Kr,u0,bh;class eP{constructor(t=QH){ve(this,Kr);ve(this,id);ve(this,zn,new Map);ve(this,_o,new Map);ve(this,Sl,[]);ve(this,Ci,0);ve(this,Lo,0);ye(this,id,t)}peek(t){return B(this,zn).get(t)}get(t){const n=B(this,zn).get(t);if(n!==void 0)return B(this,zn).delete(t),B(this,zn).set(t,n),n}prime(t,n){const s=B(this,zn).get(t);for(s!==void 0&&ye(this,Ci,B(this,Ci)-s.data.length),B(this,zn).delete(t),B(this,zn).set(t,n),ye(this,Ci,B(this,Ci)+n.data.length);B(this,Ci)>B(this,id);){const r=B(this,zn).keys().next().value;if(r===void 0)break;const i=B(this,zn).get(r);B(this,zn).delete(r),ye(this,Ci,B(this,Ci)-i.data.length)}}load(t,n){const s=this.get(t);if(s!==void 0)return Promise.resolve(s);const r=B(this,_o).get(t);if(r!==void 0)return r;const i=new Promise((o,l)=>{B(this,Sl).push({ref:t,loader:n,resolve:o,reject:l})});return B(this,_o).set(t,i),U(this,Kr,u0).call(this),i}clear(){B(this,zn).clear(),B(this,_o).clear(),B(this,Sl).length=0,ye(this,Ci,0),ye(this,Lo,0)}}id=new WeakMap,zn=new WeakMap,_o=new WeakMap,Sl=new WeakMap,Ci=new WeakMap,Lo=new WeakMap,Kr=new WeakSet,u0=function(){for(;B(this,Lo)<JH;){const t=B(this,Sl).shift();if(t===void 0)return;ye(this,Lo,B(this,Lo)+1);let n;try{n=Promise.resolve(t.loader(t.ref))}catch(s){U(this,Kr,bh).call(this,t),t.reject(s instanceof Error?s:new Error(String(s)));continue}n.then(s=>{this.prime(t.ref,s),U(this,Kr,bh).call(this,t),t.resolve(s)},s=>{U(this,Kr,bh).call(this,t),t.reject(s instanceof Error?s:new Error(String(s)))})}},bh=function(t){B(this,_o).delete(t.ref),ye(this,Lo,B(this,Lo)-1),U(this,Kr,u0).call(this)};const gl=new eP;async function tP(e,t){return"data"in e?e:gl.load(e.ref,t)}async function MS(e){await Promise.all(e.map(async t=>{if("data"in t)try{gl.prime(await PH(t),t)}catch{}}))}const ml=e=>`data:${e.mimeType};base64,${e.data}`,zS=x.createContext(void 0);function nP({load:e,retryKey:t=0,children:n}){const s=x.useMemo(()=>({load:e,retryKey:t}),[e,t]);return a.jsx(zS.Provider,{value:s,children:n})}function sP(e){var o;const[t,n]=x.useState(0),s=x.useRef(e.connection),r=x.useRef(void 0),i=x.useRef(void 0);return x.useEffect(()=>{if(e.connection==="connected"&&s.current!=="connected"){const l=r.current;l!==void 0&&(l.main!==void 0||l.side!==void 0)?i.current={...l}:i.current=void 0}e.connection!=="connected"&&(i.current=void 0),s.current=e.connection},[e.connection]),x.useEffect(()=>{var c,u;if(e.connection!=="connected")return;const l=i.current;if(l!==void 0){let d=!1;if(l.main!==void 0&&e.conversation!==l.main&&(l.main=void 0,d=!0),l.side!==void 0&&((c=e.side)==null?void 0:c.conversation)!==l.side&&(l.side=void 0,d=!0),!d)return;l.main===void 0&&l.side===void 0&&(i.current=void 0),n(h=>h+1)}i.current===void 0&&(r.current={...e.conversation===void 0?{}:{main:e.conversation},...((u=e.side)==null?void 0:u.conversation)===void 0?{}:{side:e.side.conversation}})},[e.connection,e.conversation,(o=e.side)==null?void 0:o.conversation]),t}function db(e,t){const n=x.useContext(zS),s=e!==void 0&&"ref"in e?e.ref:void 0,[r,i]=x.useState(void 0),o=(n==null?void 0:n.retryKey)??0,l=n==null?void 0:n.load;if(x.useEffect(()=>{if(s===void 0)return;const d=gl.get(s);if(d!==void 0){i({ref:s,image:d});return}if(!t||l===void 0)return;let h=!1;return i(void 0),gl.load(s,l).then(f=>{h||i({ref:s,image:f})},()=>{h||i({ref:s,failed:!0})}),()=>{h=!0}},[s,t,o,l]),e===void 0)return{status:"loading"};if("data"in e)return{status:"ready",src:ml(e)};const c=(r==null?void 0:r.ref)===s?r:void 0;if(c!==void 0)return"image"in c?{status:"ready",src:ml(c.image)}:{status:"error"};if(s===void 0)return{status:"loading"};const u=gl.peek(s);return u!==void 0?{status:"ready",src:ml(u)}:{status:"loading"}}function RS(){const[e,t]=x.useState(null),[n,s]=x.useState(!1);return x.useEffect(()=>{if(e===null)return;if(typeof IntersectionObserver>"u"){s(!0);return}const r=new IntersectionObserver(i=>{i.some(o=>o.isIntersecting)&&(s(!0),r.disconnect())},{rootMargin:"100% 0px"});return r.observe(e),()=>r.disconnect()},[e]),[t,n]}function rP(e){if("data"in e)return ml(e);const t=gl.peek(e.ref);return t===void 0?void 0:ml(t)}const iP=e=>{const t=[],n=s=>{t.push(s.summary);for(const r of s.children)n(r)};for(const s of[...e.chats,...e.projects.flatMap(r=>r.conversations)])n(s);return t};function oP(e,t){const n=[],s=[],r=new Map;for(const i of iP(t)){if(r.set(i.id,i.status),e===void 0)continue;const o=e.get(i.id);if(o!==i.status&&s.push(i.id),i.status==="needs-answer"&&o!=="needs-answer"){n.push({id:i.id,title:Hn(i),body:"Waiting for your answer"});continue}(o==="running"||o==="needs-answer")&&(i.status===void 0||i.status==="failed")&&i.kind!=="subagent"&&n.push({id:i.id,title:Hn(i),body:i.status==="failed"?"Failed":"Finished"})}if(e!==void 0)for(const i of e.keys())r.has(i)||s.push(i);return{notices:n,changed:s,baseline:r}}function aP(e,t){const n=x.useRef(void 0),s=x.useRef(new Map),r=x.useRef(t);r.current=t,x.useEffect(()=>{var c;if(e.connection!=="connected")return;const{notices:i,changed:o,baseline:l}=oP(n.current,e.organized);n.current=l;for(const u of o)(c=s.current.get(u))==null||c.close(),s.current.delete(u);if(!(typeof Notification>"u"||Notification.permission!=="granted"))for(const u of i){if(document.visibilityState==="visible"&&document.hasFocus())continue;const d=new Notification(u.title,{body:u.body,tag:`pinomad-conversation-${u.id}`});s.current.set(u.id,d),d.onclose=()=>{s.current.get(u.id)===d&&s.current.delete(u.id)},d.onclick=()=>{window.focus(),r.current(u.id),d.close(),s.current.get(u.id)===d&&s.current.delete(u.id)}}},[e.connection,e.organized])}function z1(e){const t=e.docs["pi.live"];return(t==null?void 0:t.run)!==void 0}const lP="92px";function cP(e){var n;return(typeof document>"u"||(n=document.documentElement)==null?void 0:n.dataset.pinomadPlatform)==="darwin"?"darwin":"other"}function IS(e=cP()){return e==="darwin"?{platform:e,reserveMacTrafficLights:!0,safeLeft:lP}:{platform:e,reserveMacTrafficLights:!1,safeLeft:"0px"}}function fb(e){if(e!==void 0)return e.currentAgent===void 0?e.role:e.currentAgent??void 0}const uP={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},_S=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n,absoluteStrokeWidth:s=!1,className:r="",altIcon:i,showAlt:o=!1,icon:l,primaryColor:c,secondaryColor:u,disableSecondaryOpacity:d=!1,...h},f)=>{const p=n!==void 0?s?Number(n)*24/Number(t):n:void 0,g=p!==void 0?{strokeWidth:p,stroke:"currentColor"}:{},b={ref:f,...uP,width:t,height:t,color:c||e,className:r,...g,...h},m=[...o&&i?i:l].sort(([,k],[,w])=>{const v=k.opacity!==void 0;return w.opacity!==void 0?1:v?-1:0}).map(([k,w])=>{const v=w.opacity!==void 0,j=v&&!d?w.opacity:void 0,C=u?{...w.stroke!==void 0?{stroke:v?u:c||e}:{fill:v?u:c||e}}:{};return x.createElement(k,{...w,...g,...C,opacity:j,key:w.key})});return x.createElement("svg",b,m)});_S.displayName="HugeiconsIcon";const dP=[["path",{d:"M12.001 5.00003V19.002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19.002 12.002L4.99998 12.002",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],fP=[["path",{d:"M6.53792 2.32172C6.69664 1.89276 7.30336 1.89276 7.46208 2.32172L8.1735 4.2443C8.27331 4.51403 8.48597 4.72669 8.7557 4.8265L10.6783 5.53792C11.1072 5.69664 11.1072 6.30336 10.6783 6.46208L8.7557 7.1735C8.48597 7.27331 8.27331 7.48597 8.1735 7.7557L7.46208 9.67828C7.30336 10.1072 6.69665 10.1072 6.53792 9.67828L5.8265 7.7557C5.72669 7.48597 5.51403 7.27331 5.2443 7.1735L3.32172 6.46208C2.89276 6.30336 2.89276 5.69665 3.32172 5.53792L5.2443 4.8265C5.51403 4.72669 5.72669 4.51403 5.8265 4.2443L6.53792 2.32172Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M14.4039 9.64136L15.8869 11.1244M6 22H7.49759C8.70997 22 9.31617 22 9.86124 21.7742C10.4063 21.5484 10.835 21.1198 11.6923 20.2625L19.8417 12.1131C20.3808 11.574 20.6503 11.3045 20.7944 11.0137C21.0685 10.4605 21.0685 9.81094 20.7944 9.25772C20.6503 8.96695 20.3808 8.69741 19.8417 8.15832C19.3026 7.61924 19.0331 7.3497 18.7423 7.20561C18.1891 6.93146 17.5395 6.93146 16.9863 7.20561C16.6955 7.3497 16.426 7.61924 15.8869 8.15832L7.73749 16.3077C6.8802 17.165 6.45156 17.5937 6.22578 18.1388C6 18.6838 6 19.29 6 20.5024V22Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],hP=[["path",{d:"M3 12C3 7.75736 3 5.63604 4.31802 4.31802C5.63604 3 7.75736 3 12 3C16.2426 3 18.364 3 19.682 4.31802C21 5.63604 21 7.75736 21 12C21 16.2426 21 18.364 19.682 19.682C18.364 21 16.2426 21 12 21C7.75736 21 5.63604 21 4.31802 19.682C3 18.364 3 16.2426 3 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7.37545 7.99976H7.25045M7.37482 11.9999H7.24982M7.37498 15.9999H7.24998M7.50045 7.99976C7.50045 8.13783 7.38852 8.24976 7.25045 8.24976C7.11238 8.24976 7.00045 8.13783 7.00045 7.99976C7.00045 7.86169 7.11238 7.74976 7.25045 7.74976C7.38852 7.74976 7.50045 7.86169 7.50045 7.99976ZM7.49982 11.9999C7.49982 12.138 7.38789 12.2499 7.24982 12.2499C7.11175 12.2499 6.99982 12.138 6.99982 11.9999C6.99982 11.8618 7.11175 11.7499 7.24982 11.7499C7.38789 11.7499 7.49982 11.8618 7.49982 11.9999ZM7.49998 15.9999C7.49998 16.138 7.38805 16.2499 7.24998 16.2499C7.11191 16.2499 6.99998 16.138 6.99998 15.9999C6.99998 15.8618 7.11191 15.7499 7.24998 15.7499C7.38805 15.7499 7.49998 15.8618 7.49998 15.9999Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M11 8H17M11 12H17M11 16H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],xP=[["path",{d:"M8 3C7.28543 3.05475 6.78159 3.18135 6.34921 3.47408C5.58736 3.98988 5.22202 4.90323 4.49134 6.72994L2.42914 11.9271C2.21522 12.4619 2.10826 12.7293 2.05413 13.0104C2 13.2915 2 13.5795 2 14.1555V15C2 17.8284 2 19.2426 2.87868 20.1213C3.75736 21 5.17157 21 8 21H16C18.8284 21 20.2426 21 21.1213 20.1213C22 19.2426 22 17.8284 22 15V14.1555C22 13.5795 22 13.2915 21.9459 13.0104C21.8917 12.7293 21.7848 12.4619 21.5709 11.9271L19.5087 6.72994C18.778 4.90323 18.4126 3.98988 17.6508 3.47408C17.2184 3.18135 16.7146 3.05475 16 3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 13H5.58579C6.16263 13 6.45105 13 6.71982 13.0766C6.86747 13.1187 7.00978 13.1776 7.14394 13.2523C7.38816 13.3882 7.59211 13.5921 8 14C8.40789 14.4079 8.61184 14.6118 8.85606 14.7477C8.99022 14.8224 9.13253 14.8813 9.28018 14.9234C9.54895 15 9.83737 15 10.4142 15H13.5858C14.1626 15 14.4511 15 14.7198 14.9234C14.8675 14.8813 15.0098 14.8224 15.1439 14.7477C15.3882 14.6118 15.5921 14.4079 16 14C16.4079 13.5921 16.6118 13.3882 16.8561 13.2523C16.9902 13.1776 17.1325 13.1187 17.2802 13.0766C17.5489 13 17.8374 13 18.4142 13H21.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15 7.00002C15 7.00002 12.7905 9.99999 12 10C11.2094 10 9 7 9 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M12 3V9.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],pP=[["path",{d:"M9 15C9 15 11.2095 12 12 12C12.7906 12 15 15 15 15M12 13V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20 8V15.0093C20 17.8415 20 19.2576 19.1213 20.1375C18.48 20.7797 17.5534 20.9531 16 21M4 8V15.0093C4 17.8415 4 19.2576 4.87868 20.1375C5.51998 20.7797 6.44655 20.9531 7.99999 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M19.5 3H4.5C3.56538 3 3.09808 3 2.75 3.20096C2.52197 3.33261 2.33261 3.52197 2.20096 3.75C2 4.09808 2 4.56538 2 5.5C2 6.43462 2 6.90192 2.20096 7.25C2.33261 7.47803 2.52197 7.66739 2.75 7.79904C3.09808 8 3.56538 8 4.5 8H19.5C20.4346 8 20.9019 8 21.25 7.79904C21.478 7.66739 21.6674 7.47803 21.799 7.25C22 6.90192 22 6.43462 22 5.5C22 4.56538 22 4.09808 21.799 3.75C21.6674 3.52197 21.478 3.33261 21.25 3.20096C20.9019 3 20.4346 3 19.5 3Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],gP=[["path",{d:"M13 2H11C7.22876 2 5.34315 2 4.17157 3.17157C3 4.34315 3 6.22876 3 10V14C3 17.7712 3 19.6569 4.17157 20.8284C5.34315 22 7.22876 22 11 22H13C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10C21 6.22876 21 4.34315 19.8284 3.17157C18.6569 2 16.7712 2 13 2Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M21 12H3",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M15 7H9",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M15 17H9",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],mP=[["path",{d:"M15 6C15 6 9.00001 10.4189 9 12C8.99999 13.5812 15 18 15 18",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],yP=[["path",{d:"M21.5 12C21.5 17.2467 17.2467 21.5 12 21.5C10.3719 21.5 8.8394 21.0904 7.5 20.3687C5.63177 19.362 4.37462 20.2979 3.26592 20.4658C3.09774 20.4913 2.93024 20.4302 2.80997 20.31C2.62741 20.1274 2.59266 19.8451 2.6935 19.6074C3.12865 18.5818 3.5282 16.6382 2.98341 15C2.6698 14.057 2.5 13.0483 2.5 12C2.5 6.75329 6.75329 2.5 12 2.5C17.2467 2.5 21.5 6.75329 21.5 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12.1257 12H12.0007M8.125 12H8M16.125 12H16M12.2507 12C12.2507 12.1381 12.1388 12.25 12.0007 12.25C11.8627 12.25 11.7507 12.1381 11.7507 12C11.7507 11.8619 11.8627 11.75 12.0007 11.75C12.1388 11.75 12.2507 11.8619 12.2507 12ZM8.25 12C8.25 12.1381 8.13807 12.25 8 12.25C7.86193 12.25 7.75 12.1381 7.75 12C7.75 11.8619 7.86193 11.75 8 11.75C8.13807 11.75 8.25 11.8619 8.25 12ZM16.25 12C16.25 12.1381 16.1381 12.25 16 12.25C15.8619 12.25 15.75 12.1381 15.75 12C15.75 11.8619 15.8619 11.75 16 11.75C16.1381 11.75 16.25 11.8619 16.25 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],kP=[["path",{d:"M18 6L6.00081 17.9992M17.9992 18L6 6.00085",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],bP=[["path",{d:"M2 10.5C2 9.72921 2.01346 8.97679 2.03909 8.2503C2.12282 5.87683 2.16469 4.69009 3.13007 3.71745C4.09545 2.74481 5.3157 2.6926 7.7562 2.58819C9.09517 2.5309 10.5209 2.5 12 2.5C13.4791 2.5 14.9048 2.5309 16.2438 2.58819C18.6843 2.6926 19.9046 2.74481 20.8699 3.71745C21.8353 4.69009 21.8772 5.87683 21.9609 8.2503C21.9865 8.97679 22 9.72921 22 10.5C22 11.2708 21.9865 12.0232 21.9609 12.7497C21.8772 15.1232 21.8353 16.3099 20.8699 17.2826C19.9046 18.2552 18.6843 18.3074 16.2437 18.4118C15.5098 18.4432 14.7498 18.4667 13.9693 18.4815C13.2282 18.4955 12.8576 18.5026 12.532 18.6266C12.2064 18.7506 11.9325 18.9855 11.3845 19.4553L9.20503 21.3242C9.07273 21.4376 8.90419 21.5 8.72991 21.5C8.32679 21.5 8 21.1732 8 20.7701V18.4219C7.91842 18.4186 7.83715 18.4153 7.75619 18.4118C5.31569 18.3074 4.09545 18.2552 3.13007 17.2825C2.16469 16.3099 2.12282 15.1232 2.03909 12.7497C2.01346 12.0232 2 11.2708 2 10.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.5 10.5H8.5M12 7V14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],vP=[["path",{d:"M22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12.5L10.5 15L16 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],wP=[["path",{d:"M9.00005 18C9.00005 18 15 13.5811 15 12C15 10.4188 9 6 9 6",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],jP=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],SP=[["path",{d:"M14 4H10C6.22876 4 4.34315 4 3.17157 5.17157C2 6.34315 2 8.22876 2 12C2 15.7712 2 17.6569 3.17157 18.8284C4.34315 20 6.22876 20 10 20H14C17.7712 20 19.6569 20 20.8284 18.8284C22 17.6569 22 15.7712 22 12C22 8.22876 22 6.34315 20.8284 5.17157C19.6569 4 17.7712 4 14 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7 9L8.83981 10.5858C9.61327 11.2525 10 11.5858 10 12C10 12.4142 9.61327 12.7475 8.83981 13.4142L7 15",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 16H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],CP=[["path",{d:"M14 21H16M14 21C13.1716 21 12.5 20.3284 12.5 19.5V17L12 17M14 21H10M10 21H8M10 21C10.8284 21 11.5 20.3284 11.5 19.5V17L12 17M12 17V21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16 3H8C5.17157 3 3.75736 3 2.87868 3.87868C2 4.75736 2 6.17157 2 9V11C2 13.8284 2 15.2426 2.87868 16.1213C3.75736 17 5.17157 17 8 17H16C18.8284 17 20.2426 17 21.1213 16.1213C22 15.2426 22 13.8284 22 11V9C22 6.17157 22 4.75736 21.1213 3.87868C20.2426 3 18.8284 3 16 3Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],$P=[["path",{d:"M7.5 14.5C7.5 11.2002 7.5 9.55025 8.52513 8.52513C9.55025 7.5 11.2002 7.5 14.5 7.5C17.7998 7.5 19.4497 7.5 20.4749 8.52513C21.5 9.55025 21.5 11.2002 21.5 14.5C21.5 17.7998 21.5 19.4497 20.4749 20.4749C19.4497 21.5 17.7998 21.5 14.5 21.5C11.2002 21.5 9.55025 21.5 8.52513 20.4749C7.5 19.4497 7.5 17.7998 7.5 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7.5 16.5C6.10355 16.5 5.40533 16.5 4.84402 16.3036C3.83866 15.9518 3.0482 15.1613 2.69641 14.156C2.5 13.5947 2.5 12.8964 2.5 11.5V9.5C2.5 6.20017 2.5 4.55025 3.52513 3.52513C4.55025 2.5 6.20017 2.5 9.5 2.5H11.5C12.8964 2.5 13.5947 2.5 14.156 2.69641C15.1613 3.0482 15.9518 3.83866 16.3036 4.84402C16.5 5.40533 16.5 6.10355 16.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],EP=[["path",{d:"M19.5 5.5L18.8803 15.5251C18.7219 18.0864 18.6428 19.3671 18.0008 20.2879C17.6833 20.7431 17.2747 21.1273 16.8007 21.416C15.8421 22 14.559 22 11.9927 22C9.42312 22 8.1383 22 7.17905 21.4149C6.7048 21.1257 6.296 20.7408 5.97868 20.2848C5.33688 19.3626 5.25945 18.0801 5.10461 15.5152L4.5 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 5.5H21M16.0557 5.5L15.3731 4.09173C14.9196 3.15626 14.6928 2.68852 14.3017 2.39681C14.215 2.3321 14.1231 2.27454 14.027 2.2247C13.5939 2 13.0741 2 12.0345 2C10.9688 2 10.436 2 9.99568 2.23412C9.8981 2.28601 9.80498 2.3459 9.71729 2.41317C9.32164 2.7167 9.10063 3.20155 8.65861 4.17126L8.05292 5.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.5 16.5L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.5 16.5L14.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"3"}]],TP=[["path",{d:"M8 7L16 7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 11L12 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 21.5V21C13 18.1716 13 16.7574 13.8787 15.8787C14.7574 15 16.1716 15 19 15H19.5M20 13.3431V10C20 6.22876 20 4.34315 18.8284 3.17157C17.6569 2 15.7712 2 12 2C8.22877 2 6.34315 2 5.17157 3.17157C4 4.34314 4 6.22876 4 10L4 14.5442C4 17.7892 4 19.4117 4.88607 20.5107C5.06508 20.7327 5.26731 20.9349 5.48933 21.1139C6.58831 22 8.21082 22 11.4558 22C12.1614 22 12.5141 22 12.8372 21.886C12.9044 21.8623 12.9702 21.835 13.0345 21.8043C13.3436 21.6564 13.593 21.407 14.0919 20.9081L18.8284 16.1716C19.4065 15.5935 19.6955 15.3045 19.8478 14.9369C20 14.5694 20 14.1606 20 13.3431Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],NP=[["path",{d:"M5.9925 12V18M9 14.9925L3 14.9925",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3 22H9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M13 22C16.7712 22 18.6569 22 19.8284 20.8284C21 19.6569 21 17.7712 21 14V10.6569C21 9.83935 21 9.4306 20.8478 9.06306C20.6955 8.69552 20.4065 8.40649 19.8284 7.82843L15.0919 3.09188C14.593 2.593 14.3436 2.34355 14.0345 2.19575C13.9702 2.165 13.9044 2.13772 13.8372 2.11401C13.5141 2 13.1614 2 12.4558 2C9.21082 2 7.58831 2 6.48933 2.88607C6.26732 3.06508 6.06508 3.26731 5.88608 3.48933C5.14374 4.41003 5.02332 5.69818 5.00378 8M14 2.5V3C14 5.82843 14 7.24264 14.8787 8.12132C15.7574 9 17.1716 9 20 9H20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],AP=[["path",{d:"M13.5 16.5L15 18M14 14.5C14 15.8807 12.8807 17 11.5 17C10.1193 17 9 15.8807 9 14.5C9 13.1193 10.1193 12 11.5 12C12.8807 12 14 13.1193 14 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M13 2.5V3C13 5.82843 13 7.24264 13.8787 8.12132C14.7574 9 16.1716 9 19 9H19.5M20 10.6569V14C20 17.7712 20 19.6569 18.8284 20.8284C17.6569 22 15.7712 22 12 22C8.22876 22 6.34315 22 5.17157 20.8284C4 19.6569 4 17.7712 4 14V9.45584C4 6.21082 4 4.58831 4.88607 3.48933C5.06508 3.26731 5.26731 3.06508 5.48933 2.88607C6.58831 2 8.21082 2 11.4558 2C12.1614 2 12.5141 2 12.8372 2.11401C12.9044 2.13772 12.9702 2.165 13.0345 2.19575C13.3436 2.34355 13.593 2.593 14.0919 3.09188L18.8284 7.82843C19.4065 8.40649 19.6955 8.69552 19.8478 9.06306C20 9.4306 20 9.83935 20 10.6569Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],MP=[["path",{d:"M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C22 9.08996 22 10.1433 22 12.25C22 15.7612 22 17.5167 21.1573 18.7779C20.7926 19.3238 20.3238 19.7926 19.7779 20.1573C18.5167 21 16.7612 21 13.25 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}]],zP=[["path",{d:"M2 19V7.54902C2 6.10516 2 5.38322 2.24332 4.81647C2.5467 4.10985 3.10985 3.5467 3.81647 3.24332C4.38322 3 5.09805 3 6.54902 3H7.04311C7.64819 3 8.22075 3.27394 8.60041 3.74509L10.4175 6M10.4175 6H16C17.4001 6 18.1002 6 18.635 6.27248C19.1054 6.51217 19.4878 6.89462 19.7275 7.36502C20 7.8998 20 8.59987 20 10V11M10.4175 6H7",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3.15802 15.5144L3.45643 14.7717C4.19029 12.9449 4.55723 12.0316 5.3224 11.5158C6.08757 11 7.07557 11 9.05157 11H17.1119C19.8004 11 21.1446 11 21.7422 11.8787C22.3397 12.7575 21.8405 14.0002 20.842 16.4856L20.5436 17.2283C19.8097 19.0551 19.4428 19.9684 18.6776 20.4842C17.9124 21 16.9244 21 14.9484 21H6.88812C4.19961 21 2.85535 21 2.25782 20.1213C1.66029 19.2425 2.15953 17.9998 3.15802 15.5144Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],RP=[["path",{d:"M13 21H12C7.28595 21 4.92893 21 3.46447 19.5355C2 18.0711 2 15.714 2 11V7.94427C2 6.1278 2 5.21956 2.38032 4.53806C2.65142 4.05227 3.05227 3.65142 3.53806 3.38032C4.21956 3 5.1278 3 6.94427 3C8.10802 3 8.6899 3 9.19926 3.19101C10.3622 3.62712 10.8418 4.68358 11.3666 5.73313L12 7M8 7H16.75C18.8567 7 19.91 7 20.6667 7.50559C20.9943 7.72447 21.2755 8.00572 21.4944 8.33329C21.9796 9.05942 21.9992 10.0588 22 12",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 13V21M22 17H14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],IP=[["path",{d:"M8 6.50116H16.75C18.8567 6.50116 19.91 6.50116 20.6667 7.0069C20.9943 7.22584 21.2755 7.50717 21.4944 7.83484C22 8.59173 22 9.64538 22 11.7527C22 12.0122 22 12.2621 21.9997 12.5029M12 6.50116L11.3666 5.23392C10.8418 4.18406 10.3622 3.1273 9.19926 2.69106C8.6899 2.5 8.10802 2.5 6.94427 2.5C5.1278 2.5 4.21956 2.5 3.53806 2.88043C3.05227 3.15161 2.65142 3.55257 2.38032 4.03851C2 4.72021 2 5.62871 2 7.44571V10.5023C2 15.2177 2 17.5754 3.46447 19.0403C4.70529 20.2815 6.58687 20.4711 10 20.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["circle",{cx:"14",cy:"12.5",r:"2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"20",cy:"18.5",r:"2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M18 18.5C15.7909 18.5 14 16.7091 14 14.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M14 14.5V21.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],_P=[["path",{d:"M7 19H13C15.8284 19 17.2426 19 18.1213 18.1213C19 17.2426 19 15.8284 19 13V10M19 10C19.7002 10 21.0085 11.9943 21.5 12.5M19 10C18.2998 10 16.9915 11.9943 16.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M5 7L5 17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["circle",{cx:"5",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["circle",{cx:"19",cy:"5",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"3"}],["circle",{cx:"5",cy:"19",r:"2",stroke:"currentColor",strokeWidth:"1.5",key:"4"}]],LP=[["path",{d:"M6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 20C13.1046 20 14 19.1046 14 18C14 16.8954 13.1046 16 12 16C10.8954 16 10 16.8954 10 18C10 19.1046 10.8954 20 12 20Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M18 8C19.1046 8 20 7.10457 20 6C20 4.89543 19.1046 4 18 4C16.8954 4 16 4.89543 16 6C16 7.10457 16.8954 8 18 8Z",stroke:"currentColor",strokeWidth:"1.5",key:"2"}],["path",{d:"M6.01734 8.74067C6.01734 10.4142 5.77537 12.1995 9.22051 11.9855H12.0053M17.9929 8.57617C18.1259 11.9855 16.9199 11.7648 15.7861 11.9855H12.0053M12.0053 15.7001V11.9855",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],OP=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M8 12C8 18 12 22 12 22C12 22 16 18 16 12C16 6 12 2 12 2C12 2 8 6 8 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M21 15H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M21 9H3",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}]],DP=[["path",{d:"M12 8.5L3.12132 17.3787C2.72349 17.7765 2.5 18.3161 2.5 18.8787C2.5 20.0503 3.44975 21 4.62132 21C5.18393 21 5.72349 20.7765 6.12132 20.3787L15 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.1207 5.03693L20.3682 9.3197C21.014 9.97093 21.3369 10.2966 21.4435 10.6774C21.5188 10.9467 21.5188 11.2317 21.4435 11.501C21.3369 11.8819 21.014 12.2075 20.3682 12.8587C19.7223 13.51 19.3994 13.8356 19.0216 13.943C18.7546 14.019 18.4719 14.019 18.2048 13.943C17.8271 13.8356 17.5042 13.51 16.8583 12.8587L10.0245 5.96802C8.99015 4.92507 8.47297 4.40359 8.50109 3.94831C8.51495 3.7239 8.60259 3.51054 8.75017 3.34197C9.04956 3 9.78095 3 11.2437 3C12.4209 3 13.0095 3 13.5574 3.16035C13.8406 3.24325 14.1139 3.3574 14.3723 3.50071C14.8721 3.77792 15.2883 4.19759 16.1207 5.03693Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],BP=[["circle",{cx:"7.5",cy:"7.5",r:"1.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M2.5 12C2.5 7.52166 2.5 5.28249 3.89124 3.89124C5.28249 2.5 7.52166 2.5 12 2.5C16.4783 2.5 18.7175 2.5 20.1088 3.89124C21.5 5.28249 21.5 7.52166 21.5 12C21.5 16.4783 21.5 18.7175 20.1088 20.1088C18.7175 21.5 16.4783 21.5 12 21.5C7.52166 21.5 5.28249 21.5 3.89124 20.1088C2.5 18.7175 2.5 16.4783 2.5 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}],["path",{d:"M5 21C9.37246 15.775 14.2741 8.88406 21.4975 13.5424",stroke:"currentColor",strokeWidth:"1.5",key:"2"}]],qP=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 16V12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.125 8.25H12M12.25 8.25C12.25 8.11193 12.1381 8 12 8C11.8619 8 11.75 8.11193 11.75 8.25C11.75 8.38807 11.8619 8.5 12 8.5C12.1381 8.5 12.25 8.38807 12.25 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],HP=[["path",{d:"M15 15.5C18.5899 15.5 21.5 12.5899 21.5 9C21.5 5.41015 18.5899 2.5 15 2.5C11.4101 2.5 8.5 5.41015 8.5 9C8.5 9.41773 8.5394 9.82625 8.6147 10.2221C8.75737 10.972 8.82871 11.347 8.75558 11.5844C8.68245 11.8217 8.47202 12.032 8.05118 12.4526L3.67253 16.8283C3.094 17.4064 2.80474 17.6955 2.65237 18.0631C2.5 18.4308 2.5 18.8398 2.5 19.6576V21.5H6V19.5H8V17.5H10L11.5526 15.9485C11.9729 15.5286 12.183 15.3186 12.4201 15.2456C12.6572 15.1726 13.0316 15.2436 13.7806 15.3858C14.1756 15.4608 14.5832 15.5 15 15.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 7.5C18 8.32843 17.3284 9 16.5 9C15.6716 9 15 8.32843 15 7.5C15 6.67157 15.6716 6 16.5 6C17.3284 6 18 6.67157 18 7.5Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],PP=[["path",{d:"M15.9999 13.5001V17.5001C15.9999 18.9143 15.9999 19.6214 16.4392 20.0608C16.8786 20.5001 17.5857 20.5001 18.9999 20.5001C20.4141 20.5001 21.1212 20.5001 21.5605 20.0608C21.9999 19.6214 21.9999 18.9143 21.9999 17.5001V13.5001C21.9999 12.0859 21.9999 11.3788 21.5605 10.9395C21.1212 10.5001 20.4141 10.5001 18.9999 10.5001C17.5857 10.5001 16.8786 10.5001 16.4392 10.9395C15.9999 11.3788 15.9999 12.0859 15.9999 13.5001Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M3.99988 16.5005V8.50049C3.99988 6.14347 3.99988 4.96495 4.73254 4.23272C5.46521 3.50049 6.64442 3.50049 9.00283 3.50049H16.007C18.3654 3.50049 19.5446 3.50049 20.2773 4.23272C20.8346 4.78969 20.9679 5.60486 20.9999 7.00049",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12.9999 20.5005H2.51567C2.13273 20.5005 1.88367 20.1093 2.05493 19.7769L3.99988 16.5005H12.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],UP=[["path",{d:"M6.00449 12.5V12M18.0045 12.5V12M12.0045 12.5V12M7.00449 12.5C7.00449 11.9477 6.55677 11.5 6.00449 11.5C5.4522 11.5 5.00449 11.9477 5.00449 12.5C5.00449 13.0523 5.4522 13.5 6.00449 13.5C6.55677 13.5 7.00449 13.0523 7.00449 12.5ZM19.0045 12.5C19.0045 11.9477 18.5568 11.5 18.0045 11.5C17.4522 11.5 17.0045 11.9477 17.0045 12.5C17.0045 13.0523 17.4522 13.5 18.0045 13.5C18.5568 13.5 19.0045 13.0523 19.0045 12.5ZM13.0045 12.5C13.0045 11.9477 12.5568 11.5 12.0045 11.5C11.4522 11.5 11.0045 11.9477 11.0045 12.5C11.0045 13.0523 11.4522 13.5 12.0045 13.5C12.5568 13.5 13.0045 13.0523 13.0045 12.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],FP=[["path",{d:"M15.2141 5.98239L16.6158 4.58063C17.39 3.80646 18.6452 3.80646 19.4194 4.58063C20.1935 5.3548 20.1935 6.60998 19.4194 7.38415L18.0176 8.78591M15.2141 5.98239L6.98023 14.2163C5.93493 15.2616 5.41226 15.7842 5.05637 16.4211C4.70047 17.058 4.3424 18.5619 4 20C5.43809 19.6576 6.94199 19.2995 7.57889 18.9436C8.21579 18.5877 8.73844 18.0651 9.78375 17.0198L18.0176 8.78591M15.2141 5.98239L18.0176 8.78591",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11 20H17",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}]],GP=[["circle",{cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M19.5 12C19.5 11.0151 19.306 10.0398 18.9291 9.12987C18.5522 8.21993 17.9997 7.39314 17.3033 6.6967C16.6069 6.00026 15.7801 5.44781 14.8701 5.0709C13.9602 4.69399 12.9849 4.5 12 4.5L12 12H19.5Z",fill:"currentColor",key:"1"}]],VP=[["path",{d:"M12.828 6.00096C12.9388 5.68791 12.999 5.35099 12.999 5C12.999 3.34315 11.6559 2 9.99904 2C8.34219 2 6.99904 3.34315 6.99904 5C6.99904 5.35099 7.05932 5.68791 7.17008 6.00096C4.88532 6.0093 3.66601 6.09039 2.87772 6.87868C2.08951 7.66689 2.00836 8.88603 2 11.1704C2.31251 11.06 2.64876 11 2.99904 11C4.6559 11 5.99904 12.3431 5.99904 14C5.99904 15.6569 4.6559 17 2.99904 17C2.64876 17 2.31251 16.94 2 16.8296C2.00836 19.114 2.08951 20.3331 2.87772 21.1213C3.66593 21.9095 4.88508 21.9907 7.16941 21.999C7.05908 21.6865 6.99904 21.3503 6.99904 21C6.99904 19.3431 8.34219 18 9.99904 18C11.6559 18 12.999 19.3431 12.999 21C12.999 21.3503 12.939 21.6865 12.8287 21.999C15.113 21.9907 16.3322 21.9095 17.1204 21.1213C17.9086 20.333 17.9897 19.1137 17.9981 16.829C18.3111 16.9397 18.648 17 18.999 17C20.6559 17 21.999 15.6569 21.999 14C21.999 12.3431 20.6559 11 18.999 11C18.648 11 18.3111 11.0603 17.9981 11.171C17.9897 8.88627 17.9086 7.66697 17.1204 6.87868C16.3321 6.09039 15.1128 6.0093 12.828 6.00096Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],WP=[["path",{d:"M20.0092 2V5.13219C20.0092 5.42605 19.6418 5.55908 19.4537 5.33333C17.6226 3.2875 14.9617 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22C17.5228 22 22 17.5228 22 12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],KP=[["path",{d:"M12 4V2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M20 22C20 17.5817 16.4183 14 12 14C7.58172 14 4 17.5817 4 22",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M9.375 8.25H9.25M9.5 8.25C9.5 8.38807 9.38807 8.5 9.25 8.5C9.11193 8.5 9 8.38807 9 8.25C9 8.11193 9.11193 8 9.25 8C9.38807 8 9.5 8.11193 9.5 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M14.875 8.25H14.75M15 8.25C15 8.38807 14.8881 8.5 14.75 8.5C14.6119 8.5 14.5 8.38807 14.5 8.25C14.5 8.11193 14.6119 8 14.75 8C14.8881 8 15 8.11193 15 8.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M15.1538 4H8.84615C7.59095 4 6.96334 4 6.47397 4.22025C5.91693 4.47095 5.47095 4.91693 5.22025 5.47397C5 5.96334 5 6.59095 5 7.84615C5 9.85448 5 10.8586 5.3524 11.6417C5.75353 12.5329 6.46709 13.2465 7.35835 13.6476C8.14135 14 9.14552 14 11.1538 14H12.8462C14.8545 14 15.8586 14 16.6417 13.6476C17.5329 13.2465 18.2465 12.5329 18.6476 11.6417C19 10.8586 19 9.85448 19 7.84615C19 6.59095 19 5.96334 18.7797 5.47397C18.529 4.91693 18.0831 4.47095 17.526 4.22025C17.0367 4 16.4091 4 15.1538 4Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}]],XP=[["path",{d:"M15.5 15.0001L17.5 17.0001M16.5 11.5001C16.5 9.01483 14.4853 7.00011 12 7.00011C9.51472 7.00011 7.5 9.01483 7.5 11.5001C7.5 13.9854 9.51472 16.0001 12 16.0001C14.4853 16.0001 16.5 13.9854 16.5 11.5001Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15 21.5001C16.8623 21.5001 17.7935 21.5001 18.5391 21.2287C19.789 20.7738 20.7737 19.7891 21.2286 18.5392C21.5 17.7936 21.5 16.8624 21.5 15.0001M9 21.5001C7.13769 21.5001 6.20653 21.5001 5.46091 21.2287C4.21096 20.7738 3.22633 19.7891 2.77138 18.5392C2.5 17.7936 2.5 16.8624 2.5 15.0001M9 2.50011C7.13769 2.50011 6.20653 2.50011 5.46091 2.77149C4.21096 3.22643 3.22633 4.21107 2.77138 5.46102C2.5 6.20664 2.5 7.13779 2.5 9.00011M15 2.50011C16.8623 2.50011 17.7935 2.50011 18.5391 2.77149C19.789 3.22643 20.7737 4.21107 21.2286 5.46102C21.5 6.20664 21.5 7.13779 21.5 9.00011",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],ZP=[["path",{d:"M21.3175 7.14139L20.8239 6.28479C20.4506 5.63696 20.264 5.31305 19.9464 5.18388C19.6288 5.05472 19.2696 5.15664 18.5513 5.36048L17.3311 5.70418C16.8725 5.80994 16.3913 5.74994 15.9726 5.53479L15.6357 5.34042C15.2766 5.11043 15.0004 4.77133 14.8475 4.37274L14.5136 3.37536C14.294 2.71534 14.1842 2.38533 13.9228 2.19657C13.6615 2.00781 13.3143 2.00781 12.6199 2.00781H11.5051C10.8108 2.00781 10.4636 2.00781 10.2022 2.19657C9.94085 2.38533 9.83106 2.71534 9.61149 3.37536L9.27753 4.37274C9.12465 4.77133 8.84845 5.11043 8.48937 5.34042L8.15249 5.53479C7.73374 5.74994 7.25259 5.80994 6.79398 5.70418L5.57375 5.36048C4.85541 5.15664 4.49625 5.05472 4.17867 5.18388C3.86109 5.31305 3.67445 5.63696 3.30115 6.28479L2.80757 7.14139C2.45766 7.74864 2.2827 8.05227 2.31666 8.37549C2.35061 8.69871 2.58483 8.95918 3.05326 9.48012L4.0843 10.6328C4.3363 10.9518 4.51521 11.5078 4.51521 12.0077C4.51521 12.5078 4.33636 13.0636 4.08433 13.3827L3.05326 14.5354C2.58483 15.0564 2.35062 15.3168 2.31666 15.6401C2.2827 15.9633 2.45766 16.2669 2.80757 16.8741L3.30114 17.7307C3.67443 18.3785 3.86109 18.7025 4.17867 18.8316C4.49625 18.9608 4.85542 18.8589 5.57377 18.655L6.79394 18.3113C7.25263 18.2055 7.73387 18.2656 8.15267 18.4808L8.4895 18.6752C8.84851 18.9052 9.12464 19.2442 9.2775 19.6428L9.61149 20.6403C9.83106 21.3003 9.94085 21.6303 10.2022 21.8191C10.4636 22.0078 10.8108 22.0078 11.5051 22.0078H12.6199C13.3143 22.0078 13.6615 22.0078 13.9228 21.8191C14.1842 21.6303 14.294 21.3003 14.5136 20.6403L14.8476 19.6428C15.0004 19.2442 15.2765 18.9052 15.6356 18.6752L15.9724 18.4808C16.3912 18.2656 16.8724 18.2055 17.3311 18.3113L18.5513 18.655C19.2696 18.8589 19.6288 18.9608 19.9464 18.8316C20.264 18.7025 20.4506 18.3785 20.8239 17.7307L21.3175 16.8741C21.6674 16.2669 21.8423 15.9633 21.8084 15.6401C21.7744 15.3168 21.5402 15.0564 21.0718 14.5354L20.0407 13.3827C19.7887 13.0636 19.6098 12.5078 19.6098 12.0077C19.6098 11.5078 19.7888 10.9518 20.0407 10.6328L21.0718 9.48012C21.5402 8.95918 21.7744 8.69871 21.8084 8.37549C21.8423 8.05227 21.6674 7.74864 21.3175 7.14139Z",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.5195 12C15.5195 13.933 13.9525 15.5 12.0195 15.5C10.0865 15.5 8.51953 13.933 8.51953 12C8.51953 10.067 10.0865 8.5 12.0195 8.5C13.9525 8.5 15.5195 10.067 15.5195 12Z",stroke:"currentColor",strokeWidth:"1.5",key:"1"}]],YP=[["path",{d:"M15 2L15.5387 4.39157C15.9957 6.42015 17.5798 8.00431 19.6084 8.46127L22 9L19.6084 9.53873C17.5798 9.99569 15.9957 11.5798 15.5387 13.6084L15 16L14.4613 13.6084C14.0043 11.5798 12.4202 9.99569 10.3916 9.53873L8 9L10.3916 8.46127C12.4201 8.00431 14.0043 6.42015 14.4613 4.39158L15 2Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M7 12L7.38481 13.7083C7.71121 15.1572 8.84275 16.2888 10.2917 16.6152L12 17L10.2917 17.3848C8.84275 17.7112 7.71121 18.8427 7.38481 20.2917L7 22L6.61519 20.2917C6.28879 18.8427 5.15725 17.7112 3.70827 17.3848L2 17L3.70827 16.6152C5.15725 16.2888 6.28879 15.1573 6.61519 13.7083L7 12Z",stroke:"currentColor",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],QP=[["path",{d:"M2 11.5C2 12.6046 2.89543 13.5 4 13.5C5.65685 13.5 7 12.1569 7 10.5V6.5C7 4.84315 5.65685 3.5 4 3.5C2.89543 3.5 2 4.39543 2 5.5V11.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.4787 16.1937L15.2124 15.3337C14.9942 14.6289 14.8851 14.2765 14.969 13.9982C15.0369 13.7731 15.1859 13.579 15.389 13.4513C15.64 13.2935 16.0197 13.2935 16.7791 13.2935H17.1831C19.7532 13.2935 21.0382 13.2935 21.6452 12.5327C21.7145 12.4458 21.7762 12.3533 21.8296 12.2563C22.2965 11.4079 21.7657 10.2649 20.704 7.9789C19.7297 5.88111 19.2425 4.83222 18.338 4.21485C18.2505 4.15508 18.1605 4.0987 18.0683 4.04586C17.116 3.5 15.9362 3.5 13.5764 3.5H13.0646C10.2057 3.5 8.77628 3.5 7.88814 4.36053C7 5.22106 7 6.60607 7 9.37607V10.3497C7 11.8054 7 12.5332 7.25834 13.1994C7.51668 13.8656 8.01135 14.4134 9.00069 15.5089L13.0921 20.0394C13.1947 20.1531 13.246 20.2099 13.2913 20.2493C13.7135 20.6167 14.3652 20.5754 14.7344 20.1577C14.774 20.1129 14.8172 20.0501 14.9036 19.9245C15.0388 19.728 15.1064 19.6297 15.1654 19.5323C15.6928 18.6609 15.8524 17.6256 15.6108 16.6429C15.5838 16.5331 15.5488 16.4199 15.4787 16.1937Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],JP=[["path",{d:"M2 12.5C2 11.3954 2.89543 10.5 4 10.5C5.65685 10.5 7 11.8431 7 13.5V17.5C7 19.1569 5.65685 20.5 4 20.5C2.89543 20.5 2 19.6046 2 18.5V12.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M15.4787 7.80626L15.2124 8.66634C14.9942 9.37111 14.8851 9.72349 14.969 10.0018C15.0369 10.2269 15.1859 10.421 15.389 10.5487C15.64 10.7065 16.0197 10.7065 16.7791 10.7065H17.1831C19.7532 10.7065 21.0382 10.7065 21.6452 11.4673C21.7145 11.5542 21.7762 11.6467 21.8296 11.7437C22.2965 12.5921 21.7657 13.7351 20.704 16.0211C19.7297 18.1189 19.2425 19.1678 18.338 19.7852C18.2505 19.8449 18.1605 19.9013 18.0683 19.9541C17.116 20.5 15.9362 20.5 13.5764 20.5H13.0646C10.2057 20.5 8.77628 20.5 7.88814 19.6395C7 18.7789 7 17.3939 7 14.6239V13.6503C7 12.1946 7 11.4668 7.25834 10.8006C7.51668 10.1344 8.01135 9.58664 9.00069 8.49112L13.0921 3.96056C13.1947 3.84694 13.246 3.79012 13.2913 3.75075C13.7135 3.38328 14.3652 3.42464 14.7344 3.84235C14.774 3.8871 14.8172 3.94991 14.9036 4.07554C15.0388 4.27205 15.1064 4.37031 15.1654 4.46765C15.6928 5.33913 15.8524 6.37436 15.6108 7.35715C15.5838 7.46692 15.5488 7.5801 15.4787 7.80626Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],eU=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],tU=[["path",{d:"M18.4984 19.1511C17.3377 17.4018 15.2947 16.2009 12.9313 16.0569L11.9984 16C11.6652 16.0083 11.3547 16.0194 11.0617 16.0325C8.71722 16.1376 6.66598 17.3796 5.5 19.1511",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M14.9961 10C14.9961 11.6569 13.6529 13 11.9961 13C10.3392 13 8.99609 11.6569 8.99609 10C8.99609 8.34315 10.3392 7 11.9961 7C13.6529 7 14.9961 8.34315 14.9961 10Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],nU=1.75;function Ce(e){return function(n){return a.jsx(_S,{color:"currentColor",icon:e,strokeWidth:nU,...n})}}const sU=Ce(fP),rU=Ce(hP),iU=Ce(gP),LS=Ce(xP),oU=Ce(pP),OS=Ce(mP),Rd=Ce(KP),aU=Ce(kP),xw=Ce(bP),lU=Ce(yP),$r=Ce(wP),vo=Ce(eU),DS=Ce(vP),cU=Ce(jP),hb=Ce(SP),wx=Ce(CP),uU=Ce($P),yc=Ce(TP),dU=Ce(NP),fU=Ce(AP),pw=Ce(RP),Yu=Ce(MP),d0=Ce(IP),hU=Ce(zP),xU=Ce(_P),gw=Ce(LP),pU=Ce(OP),gU=Ce(DP),xb=Ce(BP),mU=Ce(qP),yU=Ce(HP),kU=Ce(PP),bU=Ce(GP),Id=Ce(UP),vU=Ce(FP),f0=Ce(dP),wU=Ce(VP),BS=Ce(WP),jU=Ce(XP),SU=Ce(ZP),R1=Ce(YP),CU=Ce(QP),$U=Ce(JP),EU=Ce(EP),TU=Ce(tU);function pb(e,t){return function({size:s=24,isAnimated:r=!0,className:i,ref:o,...l}){const c=x.useRef(null);return x.useImperativeHandle(o,()=>c.current,[]),x.useLayoutEffect(()=>{const u=c.current,d=u==null?void 0:u.closest("button, a, [role='menuitem']");if(!r||!u||!d)return;let h=d.matches(":hover");const f=b=>{b.relatedTarget instanceof Node&&!b.relatedTarget.isConnected&&(h=!0)},p=b=>{h||b.pointerType!=="mouse"||b.buttons!==0||d.matches(":disabled, [aria-disabled='true']")||(h=!0,u.setAttribute("data-icon-hover",""))},g=()=>{h=!1,u.removeAttribute("data-icon-hover")};return d.addEventListener("pointerenter",f),d.addEventListener("pointermove",p),d.addEventListener("pointerleave",g),()=>{d.removeEventListener("pointerenter",f),d.removeEventListener("pointermove",p),d.removeEventListener("pointerleave",g),u.removeAttribute("data-icon-hover")}},[r]),a.jsx("svg",{ref:c,xmlns:"http://www.w3.org/2000/svg",width:s,height:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.75,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:`pigui-animated-icon ${i??""}`.trim(),"data-icon-motion":r?e:void 0,...l,children:t})}}const NU=pb("new-chat",a.jsxs(a.Fragment,{children:[a.jsxs("g",{"data-icon-part":"bubble",children:[a.jsx("path",{d:"M12.5 3.00372C11.6049 2.99039 10.7047 3.01289 9.8294 3.07107C5.64639 3.34913 2.31441 6.72838 2.04024 10.9707C1.98659 11.8009 1.98659 12.6607 2.04024 13.4909C2.1401 15.036 2.82343 16.4666 3.62791 17.6746C4.09501 18.5203 3.78674 19.5758 3.30021 20.4978C2.94941 21.1626 2.77401 21.495 2.91484 21.7351C3.05568 21.9752 3.37026 21.9829 3.99943 21.9982C5.24367 22.0285 6.08268 21.6757 6.74868 21.1846C7.1264 20.9061 7.31527 20.7668 7.44544 20.7508C7.5756 20.7348 7.83177 20.8403 8.34401 21.0513C8.8044 21.2409 9.33896 21.3579 9.8294 21.3905C11.2536 21.4852 12.7435 21.4854 14.1706 21.3905C18.3536 21.1125 21.6856 17.7332 21.9598 13.4909C22.0021 12.836 22.011 12.1627 21.9866 11.5"}),a.jsx("path",{d:"M8.5 15H15.5M8.5 10H12"})]}),a.jsx("path",{"data-icon-part":"add",d:"M15 5.5H22M18.5 2L18.5 9"})]})),qS=a.jsxs(a.Fragment,{children:[a.jsx("path",{d:"M13 3H11C7.22876 3 5.34315 3 4.17157 4.17157C3 5.34315 3 7.22876 3 11V13C3 16.7712 3 18.6569 4.17157 19.8284C5.34315 21 7.22876 21 11 21H13C16.7712 21 18.6569 21 19.8284 19.8284C21 18.6569 21 16.7712 21 13V11C21 7.22876 21 5.34315 19.8284 4.17157C18.6569 3 16.7712 3 13 3Z"}),a.jsx("path",{"data-icon-part":"divider",d:"M9 3V21"})]}),h0=pb("sidebar",qS),AU=pb("sidebar",a.jsx("g",{transform:"translate(24 0) scale(-1 1)",children:qS}));function gb(){var s;const e=(s=window.pinomadDesktop)==null?void 0:s.updates,[t,n]=x.useState();if(x.useEffect(()=>{if(e===void 0)return;let r=!0;e.status().then(o=>{r&&n(o)});const i=e.onStatus(o=>{r&&n(o)});return()=>{r=!1,i()}},[e]),!(e===void 0||t===void 0))return{status:t,check:()=>void e.check(),install:()=>void e.install()}}function MU(e,t){const n=t!=="/"&&(e===t||e.startsWith(`${t}/`)),s=n?t:"/",r=[{label:n?"~":"/",path:s}];let i=s==="/"?"":s;for(const o of e.slice(s.length).split("/"))o!==""&&(i=`${i}/${o}`,r.push({label:o,path:i}));return r}function mw(e){if(e==="/")return;const t=e.lastIndexOf("/");return t===0?"/":e.slice(0,t)}const dg=e=>e instanceof Error?e.message:String(e),x0=e=>`add-project-folder-${e}`;function zU(e){const t=x.useRef(""),n=x.useRef(void 0);return x.useEffect(()=>()=>clearTimeout(n.current),[]),s=>s.key.length!==1||s.key===" "||s.metaKey||s.ctrlKey||s.altKey?!1:(t.current+=s.key.toLowerCase(),clearTimeout(n.current),n.current=setTimeout(()=>t.current="",600),e(t.current),!0)}function RU({remote:e,connected:t,onAdded:n,onClose:s}){const[r,i]=x.useState({status:"loading"}),[o,l]=x.useState({}),[c,u]=x.useState(void 0),[d,h]=x.useState(!1),[f,p]=x.useState(void 0),g=x.useRef(!1);x.useEffect(()=>(g.current=!0,()=>{g.current=!1}),[]);const b=x.useRef(new Set),y=x.useRef(void 0),m=x.useRef(null),k=x.useCallback(N=>{b.current.has(N)||(b.current.add(N),l(R=>({...R,[N]:{status:"loading"}})),e.controller.listFolders(N).then(R=>{g.current&&l(L=>({...L,[N]:{status:"ok",folders:R.folders}}))},R=>{b.current.delete(N),g.current&&l(L=>({...L,[N]:{status:"error",message:dg(R)}}))}))},[e]),w=x.useCallback(()=>{i({status:"loading"}),e.controller.listFolders().then(N=>{g.current&&(b.current.add(N.path),l(R=>({...R,[N.path]:{status:"ok",folders:N.folders}})),i({status:"ok",home:N.home}),u(N.path))},N=>{g.current&&i({status:"error",message:dg(N)})})},[e]);x.useEffect(()=>w(),[w]),x.useEffect(()=>{const N=y.current;if(N===void 0||N!==c)return;const R=o[N];R===void 0||R.status==="loading"||(y.current=void 0,R.status==="ok"&&R.folders.length>0&&u(R.folders[0].path))},[o,c]),x.useEffect(()=>{if(r.status!=="ok"||!window.matchMedia("(pointer: fine)").matches)return;const N=requestAnimationFrame(()=>{var R;return(R=m.current)==null?void 0:R.focus()});return()=>cancelAnimationFrame(N)},[r.status]),x.useLayoutEffect(()=>{var R;const N=m.current;N===null||c===void 0||(N.scrollLeft=N.scrollWidth,(R=document.getElementById(x0(c)))==null||R.scrollIntoView({block:"nearest",inline:"nearest"}))},[c]);const v=r.status==="ok"?r.home:void 0,j=c===void 0||v===void 0?[]:MU(c,v),C=j.map(N=>N.path),$=C[0],T=$===void 0||$==="/"?j:[{label:"/",path:"/"},...j],A=C.join("\0");x.useEffect(()=>{for(const N of A.split("\0"))N!==""&&k(N)},[A,k]);const S=N=>{d||(y.current=void 0,p(void 0),u(N))},_=N=>{const R=N===void 0?void 0:o[N];return(R==null?void 0:R.status)==="ok"?R.folders:void 0},M=c===void 0?void 0:c===$?$:mw(c),z=zU(N=>{var L;const R=(L=_(M))==null?void 0:L.find(D=>D.name.toLowerCase().startsWith(N));R!==void 0&&S(R.path)}),O=()=>{c!==void 0&&(h(!0),p(void 0),e.controller.addProject(c).then(N=>{g.current&&n(N)},N=>{g.current&&(h(!1),p(dg(N)))}))},I=N=>{if(N.target!==N.currentTarget||c===void 0||d)return;const R=_(M)??[],L=R.findIndex(D=>D.path===c);switch(N.key){case"ArrowDown":R.length>0&&S(R[Math.min(L+1,R.length-1)].path);break;case"ArrowUp":L>0&&S(R[L-1].path);break;case"Home":R.length>0&&S(R[0].path);break;case"End":R.length>0&&S(R.at(-1).path);break;case"ArrowRight":{const D=_(c);D===void 0?y.current=c:D.length>0&&S(D[0].path);break}case"ArrowLeft":{const D=mw(c);D!==void 0&&S(D);break}case"Enter":t&&O();break;default:if(!z(N))return}N.preventDefault()},E=N=>{var R;S(N),(R=m.current)==null||R.focus()};return a.jsx(vr,{isOpen:!0,onOpenChange:N=>N?void 0:s(),purpose:"form",width:"min(780px, calc(100vw - 32px))",children:a.jsx(Ks,{header:a.jsx(jr,{title:"Add project",subtitle:"Choose a folder on the host.",onOpenChange:()=>s()}),content:a.jsx(Xs,{children:r.status!=="ok"?a.jsx("div",{className:"flex h-[24rem] items-center justify-center",children:r.status==="loading"?a.jsx(un,{"aria-label":"Loading folders"}):a.jsxs(fe,{gap:2,hAlign:"center",children:[a.jsx(re,{type:"supporting",children:r.message}),a.jsx(ne,{label:"Try again",variant:"secondary",onClick:w})]})}):a.jsxs("div",{className:"overflow-hidden rounded-[var(--radius-inner)] border border-[var(--color-border)]",children:[a.jsx("div",{ref:m,role:"group","aria-label":"Folders",tabIndex:0,"aria-activedescendant":c===void 0||c===$?void 0:x0(c),onKeyDown:I,className:"group flex h-[22rem] overflow-x-auto overflow-y-hidden outline-none",children:C.map((N,R)=>a.jsx(IU,{path:N,label:j[R].label,listing:o[N],next:C[R+1],selected:c,disabled:d,onPick:E,onRetry:()=>k(N)},N))}),a.jsx("nav",{"aria-label":"Selected folder","data-testid":"picker-path","data-path":c,className:"flex h-8 min-w-0 items-center gap-0.5 border-t border-[var(--color-border)] bg-[var(--color-background-muted)] px-2 text-[13px] text-[var(--color-text-secondary)]",children:T.map((N,R)=>{const L=R===T.length-1;return a.jsxs("span",{className:`flex min-w-0 items-center gap-0.5 ${L?"shrink-0":""}`,children:[R===0?null:a.jsx($r,{"aria-hidden":"true",className:"size-3 shrink-0 opacity-60"}),a.jsx("button",{type:"button",disabled:d,"aria-current":L?"location":void 0,onClick:()=>E(N.path),className:`max-w-[14rem] min-w-0 truncate rounded px-1 py-0.5 hover:bg-[var(--color-overlay-hover)] focus-visible:outline-2 focus-visible:outline-[var(--color-border-emphasized)] ${L?"text-[var(--color-text-primary)]":""}`,children:N.label})]},N.path)})})]})}),footer:a.jsx(fa,{children:a.jsxs($e,{gap:2,vAlign:"center",hAlign:"between",children:[a.jsx("div",{className:"min-w-0 flex-1",children:f!==void 0?a.jsx(re,{type:"supporting",role:"alert",maxLines:1,style:{color:"var(--danger)"},children:f}):a.jsx("div",{className:"hidden pointer-fine:block",children:a.jsx(re,{type:"supporting",maxLines:1,children:"Arrow keys to browse, Enter to add"})})}),a.jsxs($e,{gap:2,hAlign:"end",children:[a.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),a.jsx(ne,{label:d?"Adding…":"Add project",variant:"primary",isDisabled:!t||c===void 0||d,onClick:O})]})]})})})})}function IU({path:e,label:t,listing:n,next:s,selected:r,disabled:i,onPick:o,onRetry:l}){const c=(n==null?void 0:n.status)!=="ok"||n.folders.length===0;return a.jsx("div",{role:"listbox","aria-label":t,className:`flex shrink-0 flex-col overflow-y-auto overscroll-y-contain border-r border-[var(--color-border)] p-1 last:border-r-0 ${c?"min-w-56 flex-1":"w-56"}`,children:n===void 0||n.status==="loading"?a.jsx("div",{className:"flex flex-1 items-center justify-center",children:a.jsx(un,{"aria-label":`Loading ${t}`,size:"sm"})}):n.status==="error"?a.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-2 px-2 text-center",children:[a.jsx(re,{type:"supporting",children:n.message}),a.jsx(ne,{label:"Try again",size:"sm",variant:"secondary",isDisabled:i,onClick:l})]}):n.folders.length===0?a.jsx("div",{className:"flex flex-1 items-center justify-center",children:a.jsx(re,{type:"supporting",children:"No subfolders"})}):n.folders.map(u=>{const d=u.path===r;return a.jsxs("div",{id:x0(u.path),role:"option","aria-selected":d,"aria-disabled":i||void 0,title:u.name,onMouseDown:h=>h.preventDefault(),onClick:()=>o(u.path),className:`flex h-7 shrink-0 cursor-default items-center gap-2 rounded-[7px] px-2 text-sm ${d?"bg-[var(--color-overlay-pressed)] group-focus:bg-[var(--color-accent)] group-focus:text-[var(--color-on-accent)]":u.path===s?"bg-[var(--color-overlay-pressed)]":"hover:bg-[var(--color-overlay-hover)]"}`,children:[a.jsx(Yu,{"aria-hidden":"true",className:"size-4 shrink-0 opacity-70"}),a.jsx("span",{className:"min-w-0 flex-1 truncate",children:u.name}),a.jsx($r,{"aria-hidden":"true",className:"size-3 shrink-0 opacity-50"})]},u.path)})})}function _U({project:e,remote:t,connected:n,onClose:s}){const r=()=>{t.controller.removeProject(e.path),s()};return a.jsx(vr,{isOpen:!0,onOpenChange:i=>i?void 0:s(),purpose:"form",width:480,children:a.jsx(Ks,{header:a.jsx(jr,{title:`Remove project ${e.name}?`,subtitle:"The directory and its conversations are kept; only the registration is removed.",onOpenChange:()=>s()}),content:a.jsx(Xs,{}),footer:a.jsx(fa,{children:a.jsxs($e,{gap:2,hAlign:"end",children:[a.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),a.jsx(ne,{label:"Remove project",variant:"primary",isDisabled:!n,onClick:r})]})})})})}function LU({summary:e,remote:t,connected:n,onClose:s}){const r=Hn(e),[i,o]=x.useState(r),[l,c]=x.useState(!1),[u,d]=x.useState(void 0),h=x.useRef(null);x.useEffect(()=>{var g;return(g=h.current)==null?void 0:g.select()},[]);const f=i.trim(),p=()=>{f===""||f===r||l||(c(!0),d(void 0),t.controller.renameConversation(e.id,f).then(()=>s(),g=>{c(!1),d(g instanceof Error?g.message:String(g))}))};return a.jsx(vr,{isOpen:!0,onOpenChange:g=>g?void 0:s(),purpose:"form",width:480,children:a.jsx(Ks,{header:a.jsx(jr,{title:"Rename conversation",onOpenChange:()=>s()}),content:a.jsxs(Xs,{children:[a.jsx(ns,{ref:h,label:"Title",value:i,onChange:o,onEnter:p,hasAutoFocus:!0,isDisabled:l}),u===void 0?null:a.jsx(re,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:u})]}),footer:a.jsx(fa,{children:a.jsxs($e,{gap:2,hAlign:"end",children:[a.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),a.jsx(ne,{label:"Save",variant:"primary",isDisabled:!n||l||f===""||f===r,onClick:p})]})})})})}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function p0(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const jx=e=>e?`"${e}" `:"";function g0(e,t=""){if(typeof e!="boolean")throw new TypeError(jx(t)+"expected boolean, got type="+typeof e);return e}function yl(e,t=""){if(typeof e!="number")throw new TypeError(jx(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(jx(t)+"expected integer >= 0, got "+e);return e}function Wt(e,t,n=""){if(p0(e)&&(t===void 0||e.length===t))return e;t!==void 0&&yl(t,"length");const s=p0(e),r=t!==void 0?` of length ${t}`:"",i=s?`length=${e.length}`:`type=${typeof e}`,o=jx(n)+"expected Uint8Array"+r+", got "+i;throw s?new RangeError(o):new TypeError(o)}const yw=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`)};function kw(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function OU(e,t){Wt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Hr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Vi(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function DU(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const kl=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function BU(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function qU(e){for(let t=0;t<e.length;t++)e[t]=BU(e[t]);return e}const Mo=kl?e=>e:qU;function HU(e,t){return!e.byteLength||!t.byteLength?!1:e.buffer===t.buffer&&e.byteOffset<t.byteOffset+t.byteLength&&t.byteOffset<e.byteOffset+e.byteLength}function PU(e,t){if(HU(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function UU(e,t){return yw(e,"defaults"),yw(t,"opts"),Object.assign(e,t)}function FU(e,t){if(e=Wt(e),t=Wt(t),e.length!==t.length)return!1;let n=0;for(let s=0;s<e.length;s++)n|=e[s]^t[s];return n===0}function GU(e,t,n){const s=t,r=()=>[],i=(l,c)=>s(c,...r(l)).update(l).digest(),o=s(new Uint8Array(e),...r(new Uint8Array(0)));return i.outputLen=o.outputLen,i.blockLen=o.blockLen,i.create=(l,...c)=>s(l,...c),i}const VU=(e,t)=>{function n(s,...r){if(Wt(s,void 0,"key"),e.nonceLength!==void 0){const h=r[0];Wt(h,e.varSizeNonce?void 0:e.nonceLength,"nonce")}const i=e.tagLength,o=e.nonceLength!==void 0?1:0;if(!e.withAAD){for(let h=o;h<r.length;h++)if(p0(r[h]))throw new Error("AAD not supported")}e.withAAD&&r[o]!==void 0&&Wt(r[o],void 0,"AAD");const l=t(s,...r),c=(h,f)=>{if(f!==void 0){if(h!==2)throw new Error("cipher output not supported");Wt(f,void 0,"output")}};let u=!1;return{encrypt(h,f){if(u)throw new Error("cannot encrypt() twice with same key + nonce");return u=!0,Wt(h,void 0,"data"),c(l.encrypt.length,f),l.encrypt(h,f)},decrypt(h,f){if(Wt(h,void 0,"data"),i&&h.length<i)throw new Error('"ciphertext" expected length >= tagLength='+i);return c(l.decrypt.length,f),l.decrypt(h,f)}}}return Object.assign(n,e),n};function m0(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(Wt(t,e,"output"),n&&!Sx(t))throw new Error("invalid output, must be aligned");return t}function WU(e,t,n){yl(e),yl(t),g0(n);const s=new Uint8Array(16),r=DU(s);return r.setBigUint64(0,BigInt(t),n),r.setBigUint64(8,BigInt(e),n),s}function Sx(e){return e.byteOffset%4===0}function Cx(e){return Uint8Array.from(Wt(e))}const HS=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),KU=Mo(Hr(HS("expand 16-byte k"))),XU=Mo(Hr(HS("expand 32-byte k")));function Oe(e,t){return e<<t|e>>>32-t}const Vc=64,ZU=16,y0=2**32-1,bw=Uint32Array.of();function YU(e,t,n,s,r,i,o,l){const c=r.length,u=new Uint8Array(Vc),d=Hr(u),h=kl&&Sx(r)&&Sx(i),f=h?Hr(r):bw,p=h?Hr(i):bw;if(!kl){for(let g=0;g<c;o++){if(e(t,n,s,d,o,l),Mo(d),o>=y0)throw new Error("arx: counter overflow");const b=Math.min(Vc,c-g);for(let y=0,m;y<b;y++)m=g+y,i[m]=r[m]^u[y];g+=b}return}for(let g=0;g<c;o++){if(e(t,n,s,d,o,l),o>=y0)throw new Error("arx: counter overflow");const b=Math.min(Vc,c-g);if(h&&b===Vc){const y=g/4;if(g%4!==0)throw new Error("arx: invalid block position");for(let m=0,k;m<ZU;m++)k=y+m,p[k]=f[k]^d[m];g+=Vc;continue}for(let y=0,m;y<b;y++)m=g+y,i[m]=r[m]^u[y];g+=b}}function QU(e,t){const{allowShortKeys:n,extendNonceFn:s,counterLength:r,counterRight:i,rounds:o}=UU({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return yl(r),yl(o),g0(i),g0(n),(l,c,u,d,h=0)=>{Wt(l,void 0,"key"),Wt(c,void 0,"nonce"),Wt(u,void 0,"data");const f=u.length,p=d!==void 0;if(d=m0(f,d,!1),p&&PU(u,d),yl(h),h<0||h>=y0)throw new Error("arx: counter overflow");const g=[];let b=l.length,y,m;if(b===32)g.push(y=Cx(l)),m=XU;else if(b===16&&n)y=new Uint8Array(32),y.set(l),y.set(l,16),m=KU,g.push(y);else throw Wt(l,32,"arx key"),new Error("invalid key size");(!kl||!Sx(c))&&g.push(c=Cx(c));let k=Hr(y);if(s){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const j=c.subarray(0,16);if(kl)s(m,k,Hr(j),k);else{const C=Mo(Uint32Array.from(m));s(C,k,Hr(j),k),Vi(C),Mo(k)}c=c.subarray(16)}else kl||Mo(k);const w=16-r;if(w!==c.length)throw new Error(`arx: nonce must be ${w} or 16 bytes`);if(w!==12){const j=new Uint8Array(12);j.set(c,i?0:12-c.length),c=j,g.push(c)}const v=Mo(Hr(c));try{return YU(e,m,k,v,u,d,h,o),d}finally{Vi(...g)}}}function Jt(e,t){return e[t++]&255|(e[t++]&255)<<8}class JU{constructor(t){ie(this,"blockLen",16);ie(this,"outputLen",16);ie(this,"buffer",new Uint8Array(16));ie(this,"r",new Uint16Array(10));ie(this,"h",new Uint16Array(10));ie(this,"pad",new Uint16Array(8));ie(this,"pos",0);ie(this,"finished",!1);ie(this,"destroyed",!1);t=Cx(Wt(t,32,"key"));const n=Jt(t,0),s=Jt(t,2),r=Jt(t,4),i=Jt(t,6),o=Jt(t,8),l=Jt(t,10),c=Jt(t,12),u=Jt(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|s<<3)&8191,this.r[2]=(s>>>10|r<<6)&7939,this.r[3]=(r>>>7|i<<9)&8191,this.r[4]=(i>>>4|o<<12)&255,this.r[5]=o>>>1&8190,this.r[6]=(o>>>14|l<<2)&8191,this.r[7]=(l>>>11|c<<5)&8065,this.r[8]=(c>>>8|u<<8)&8191,this.r[9]=u>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Jt(t,16+2*d)}process(t,n,s=!1){const r=s?0:2048,{h:i,r:o}=this,l=o[0],c=o[1],u=o[2],d=o[3],h=o[4],f=o[5],p=o[6],g=o[7],b=o[8],y=o[9],m=Jt(t,n+0),k=Jt(t,n+2),w=Jt(t,n+4),v=Jt(t,n+6),j=Jt(t,n+8),C=Jt(t,n+10),$=Jt(t,n+12),T=Jt(t,n+14);let A=i[0]+(m&8191),S=i[1]+((m>>>13|k<<3)&8191),_=i[2]+((k>>>10|w<<6)&8191),M=i[3]+((w>>>7|v<<9)&8191),z=i[4]+((v>>>4|j<<12)&8191),O=i[5]+(j>>>1&8191),I=i[6]+((j>>>14|C<<2)&8191),E=i[7]+((C>>>11|$<<5)&8191),N=i[8]+(($>>>8|T<<8)&8191),R=i[9]+(T>>>5|r),L=0,D=L+A*l+S*(5*y)+_*(5*b)+M*(5*g)+z*(5*p);L=D>>>13,D&=8191,D+=O*(5*f)+I*(5*h)+E*(5*d)+N*(5*u)+R*(5*c),L+=D>>>13,D&=8191;let P=L+A*c+S*l+_*(5*y)+M*(5*b)+z*(5*g);L=P>>>13,P&=8191,P+=O*(5*p)+I*(5*f)+E*(5*h)+N*(5*d)+R*(5*u),L+=P>>>13,P&=8191;let F=L+A*u+S*c+_*l+M*(5*y)+z*(5*b);L=F>>>13,F&=8191,F+=O*(5*g)+I*(5*p)+E*(5*f)+N*(5*h)+R*(5*d),L+=F>>>13,F&=8191;let X=L+A*d+S*u+_*c+M*l+z*(5*y);L=X>>>13,X&=8191,X+=O*(5*b)+I*(5*g)+E*(5*p)+N*(5*f)+R*(5*h),L+=X>>>13,X&=8191;let G=L+A*h+S*d+_*u+M*c+z*l;L=G>>>13,G&=8191,G+=O*(5*y)+I*(5*b)+E*(5*g)+N*(5*p)+R*(5*f),L+=G>>>13,G&=8191;let Q=L+A*f+S*h+_*d+M*u+z*c;L=Q>>>13,Q&=8191,Q+=O*l+I*(5*y)+E*(5*b)+N*(5*g)+R*(5*p),L+=Q>>>13,Q&=8191;let ee=L+A*p+S*f+_*h+M*d+z*u;L=ee>>>13,ee&=8191,ee+=O*c+I*l+E*(5*y)+N*(5*b)+R*(5*g),L+=ee>>>13,ee&=8191;let Y=L+A*g+S*p+_*f+M*h+z*d;L=Y>>>13,Y&=8191,Y+=O*u+I*c+E*l+N*(5*y)+R*(5*b),L+=Y>>>13,Y&=8191;let V=L+A*b+S*g+_*p+M*f+z*h;L=V>>>13,V&=8191,V+=O*d+I*u+E*c+N*l+R*(5*y),L+=V>>>13,V&=8191;let oe=L+A*y+S*b+_*g+M*p+z*f;L=oe>>>13,oe&=8191,oe+=O*h+I*d+E*u+N*c+R*l,L+=oe>>>13,oe&=8191,L=(L<<2)+L|0,L=L+D|0,D=L&8191,L=L>>>13,P+=L,i[0]=D,i[1]=P,i[2]=F,i[3]=X,i[4]=G,i[5]=Q,i[6]=ee,i[7]=Y,i[8]=V,i[9]=oe}finalize(){const{h:t,pad:n}=this,s=new Uint16Array(10);let r=t[1]>>>13;t[1]&=8191;for(let l=2;l<10;l++)t[l]+=r,r=t[l]>>>13,t[l]&=8191;t[0]+=r*5,r=t[0]>>>13,t[0]&=8191,t[1]+=r,r=t[1]>>>13,t[1]&=8191,t[2]+=r,s[0]=t[0]+5,r=s[0]>>>13,s[0]&=8191;for(let l=1;l<10;l++)s[l]=t[l]+r,r=s[l]>>>13,s[l]&=8191;s[9]-=8192;let i=(r^1)-1;for(let l=0;l<10;l++)s[l]&=i;i=~i;for(let l=0;l<10;l++)t[l]=t[l]&i|s[l];t[0]=(t[0]|t[1]<<13)&65535,t[1]=(t[1]>>>3|t[2]<<10)&65535,t[2]=(t[2]>>>6|t[3]<<7)&65535,t[3]=(t[3]>>>9|t[4]<<4)&65535,t[4]=(t[4]>>>12|t[5]<<1|t[6]<<14)&65535,t[5]=(t[6]>>>2|t[7]<<11)&65535,t[6]=(t[7]>>>5|t[8]<<8)&65535,t[7]=(t[8]>>>8|t[9]<<5)&65535;let o=t[0]+n[0];t[0]=o&65535;for(let l=1;l<8;l++)o=(t[l]+n[l]|0)+(o>>>16)|0,t[l]=o&65535;Vi(s)}update(t){kw(this),Wt(t),t=Cx(t);const{buffer:n,blockLen:s}=this,r=t.length;for(let i=0;i<r;){const o=Math.min(s-this.pos,r-i);if(o===s){for(;s<=r-i;i+=s)this.process(t,i);continue}n.set(t.subarray(i,i+o),this.pos),this.pos+=o,i+=o,this.pos===s&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){this.destroyed=!0,Vi(this.h,this.r,this.buffer,this.pad)}digestInto(t){kw(this),OU(t,this),this.finished=!0;const{buffer:n,h:s}=this;let{pos:r}=this;if(r){for(n[r++]=1;r<16;r++)n[r]=0;this.process(n,0,!0)}this.finalize();let i=0;for(let o=0;o<8;o++)t[i++]=s[o]>>>0,t[i++]=s[o]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}}const eF=GU(32,e=>new JU(e));function tF(e,t,n,s,r,i=20){let o=e[0],l=e[1],c=e[2],u=e[3],d=t[0],h=t[1],f=t[2],p=t[3],g=t[4],b=t[5],y=t[6],m=t[7],k=r,w=n[0],v=n[1],j=n[2],C=o,$=l,T=c,A=u,S=d,_=h,M=f,z=p,O=g,I=b,E=y,N=m,R=k,L=w,D=v,P=j;for(let X=0;X<i;X+=2)C=C+S|0,R=Oe(R^C,16),O=O+R|0,S=Oe(S^O,12),C=C+S|0,R=Oe(R^C,8),O=O+R|0,S=Oe(S^O,7),$=$+_|0,L=Oe(L^$,16),I=I+L|0,_=Oe(_^I,12),$=$+_|0,L=Oe(L^$,8),I=I+L|0,_=Oe(_^I,7),T=T+M|0,D=Oe(D^T,16),E=E+D|0,M=Oe(M^E,12),T=T+M|0,D=Oe(D^T,8),E=E+D|0,M=Oe(M^E,7),A=A+z|0,P=Oe(P^A,16),N=N+P|0,z=Oe(z^N,12),A=A+z|0,P=Oe(P^A,8),N=N+P|0,z=Oe(z^N,7),C=C+_|0,P=Oe(P^C,16),E=E+P|0,_=Oe(_^E,12),C=C+_|0,P=Oe(P^C,8),E=E+P|0,_=Oe(_^E,7),$=$+M|0,R=Oe(R^$,16),N=N+R|0,M=Oe(M^N,12),$=$+M|0,R=Oe(R^$,8),N=N+R|0,M=Oe(M^N,7),T=T+z|0,L=Oe(L^T,16),O=O+L|0,z=Oe(z^O,12),T=T+z|0,L=Oe(L^T,8),O=O+L|0,z=Oe(z^O,7),A=A+S|0,D=Oe(D^A,16),I=I+D|0,S=Oe(S^I,12),A=A+S|0,D=Oe(D^A,8),I=I+D|0,S=Oe(S^I,7);let F=0;s[F++]=o+C|0,s[F++]=l+$|0,s[F++]=c+T|0,s[F++]=u+A|0,s[F++]=d+S|0,s[F++]=h+_|0,s[F++]=f+M|0,s[F++]=p+z|0,s[F++]=g+O|0,s[F++]=b+I|0,s[F++]=y+E|0,s[F++]=m+N|0,s[F++]=k+R|0,s[F++]=w+L|0,s[F++]=v+D|0,s[F++]=j+P|0}const nF=QU(tF,{counterRight:!1,counterLength:4,allowShortKeys:!1}),sF=new Uint8Array(16),vw=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(sF.subarray(n))},rF=new Uint8Array(32);function ww(e,t,n,s,r){r!==void 0&&Wt(r,void 0,"AAD");const i=e(t,n,rF),o=WU(s.length,r?r.length:0,!0),l=eF.create(i);r&&vw(l,r),vw(l,s),l.update(o);const c=l.digest();return Vi(i,o),c}const iF=e=>(t,n,s)=>({encrypt(i,o){const l=i.length;o=m0(l+16,o,!1),o.set(i);const c=o.subarray(0,-16);e(t,n,c,c,1);const u=ww(e,t,n,c,s);return o.set(u,l),Vi(u),o},decrypt(i,o){o=m0(i.length-16,o,!1);const l=i.subarray(0,-16),c=i.subarray(-16),u=ww(e,t,n,l,s);if(!FU(c,u))throw Vi(u),new Error("invalid tag");return o.set(i.subarray(0,-16)),e(t,n,o,o,1),Vi(u),o}}),jw=VU({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},iF(nF)),oF=e=>e/2**32|0,aF=e=>e>>>0;function k0(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const b0=e=>e?`"${e}" `:"";function ti(e,t=""){if(typeof e!="number")throw new TypeError(b0(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(b0(t)+"expected integer >= 0, got "+e);return e}function Ns(e,t,n=""){if(k0(e)&&(t===void 0||e.length===t))return e;t!==void 0&&ti(t,"length");const s=k0(e),r=t!==void 0?` of length ${t}`:"",i=s?`length=${e.length}`:`type=${typeof e}`,o=b0(n)+"expected Uint8Array"+r+", got "+i;throw s?new RangeError(o):new TypeError(o)}function Sw(e){return Uint8Array.from(Ns(e))}function lF(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(ti(e.outputLen),ti(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const cF=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},Cw=(e,t)=>{cF(e,t);const n=Object.getPrototypeOf(e);if(n!==Object.prototype&&n!==null)throw new TypeError(`"${t}" expected plain object`);if(Object.hasOwn(e,"__proto__"))throw new TypeError(`"${t}.__proto__" is not allowed`)};function $x(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function PS(e,t){Ns(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Ex(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function v0(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Tx(e,t){return e<<32-t|e>>>t}const US=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function FS(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const ru=US?e=>e:e=>FS(e)>>>0;function uF(e){for(let t=0;t<e.length;t++)e[t]=FS(e[t]);return e}const La=US?e=>e:uF,GS=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",dF=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function mb(e){if(Ns(e),GS)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=dF[e[n]];return t}function $w(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function VS(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(GS)try{return Uint8Array.fromHex(e)}catch(r){throw r instanceof SyntaxError?new RangeError(r.message):r}const t=e.length,n=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const s=new Uint8Array(n);for(let r=0,i=0;r<n;r++,i+=2){const o=$w(e.charCodeAt(i)),l=$w(e.charCodeAt(i+1));if(o===void 0||l===void 0){const c=e[i]+e[i+1];throw new RangeError('hex string expected, got non-hex character "'+c+'" at index '+i)}s[r]=o*16+l}return s}function WS(e,t,n="opts"){return Cw(e,"defaults"),t!==void 0&&Cw(t,n),Object.assign(Object.create(null),e,t)}function fF(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=WS({},t,"info");const n=(r,i)=>e(i).update(r).digest(),s=e(void 0);return n.outputLen=s.outputLen,n.blockLen=s.blockLen,n.canXOF=s.canXOF,n.create=r=>e(r),Object.assign(n,t),Object.freeze(n)}function hF(e=32){ti(e,"bytesLength");const t=typeof globalThis=="object"?globalThis.crypto:null;if(typeof(t==null?void 0:t.getRandomValues)!="function")throw new Error("crypto.getRandomValues must be defined");if(e>65536)throw new RangeError(`"bytesLength" expected <= 65536, got ${e}`);return t.getRandomValues(new Uint8Array(e))}const xF=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function KS(e,t,n=()=>{}){if(!Array.isArray(e))throw new TypeError(`"${t}" expected array, got type=${typeof e}`);for(let s=0;s<e.length;s++)n(e[s],`${t}[${s}]`);return e}const bl=(e,t,n)=>Ns(e,t,n),XS=ti;function vl(e,t="object"){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(t==="object"?"expected valid options object":`"${t}" expected object, got type=${typeof e}`);return e}function ju(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const pF=mb,gF=e=>VS(e),ZS=k0,YS=e=>hF(e),Nx=BigInt(0),Ew=BigInt(1),mF=e=>e?`"${e}" `:"";function I1(e,t=""){if(typeof e!="boolean")throw new TypeError(mF(t)+"expected boolean, got type="+typeof e);return e}function yF(e){if(typeof e=="bigint"){if(!Wo(e))throw new RangeError("positive bigint expected, got "+e)}else XS(e);return e}function w0(e,t=""){if(typeof e!="number"){const n=t&&`"${t}" `;throw new TypeError(n+"expected number, got type="+typeof e)}if(!Number.isSafeInteger(e)){const n=t&&`"${t}" `;throw new RangeError(n+"expected safe integer, got "+e)}}function QS(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Nx:BigInt("0x"+e)}function JS(e){return QS(mb(e))}function Ax(e){return QS(mb(Qu(Ns(e)).reverse()))}function eC(e,t){if(ti(t),t===0)throw new Error("zero output length is invalid");e=yF(e);const n=t*2,s=e.toString(16);if(s.length>n)throw new RangeError("number is too large");return VS(s.padStart(n,"0"))}function tC(e,t){return eC(e,t).reverse()}function Qu(e){return Uint8Array.from(bl(e))}function Wo(e){return typeof e=="bigint"&&Nx<=e}function nC(e,t,n){return Wo(e)&&Wo(t)&&Wo(n)&&t<=e&&e<n}function Su(e,t,n,s){if(!nC(t,n,s))throw new RangeError("expected valid "+e+": "+n+" <= n < "+s+", got "+t)}function kF(e){if(e<Nx)throw new Error("expected non-negative bigint, got "+e);return e===Nx?0:e.toString(2).length}const bF=e=>(w0(e,"n"),(Ew<<BigInt(e))-Ew);function Mx(e,t={},n={},s="object"){vl(e,s),vl(t,"fields"),vl(n,"optFields");function r(o,l,c){const u=s==="object"?`param "${String(o)}"`:`"${s}.${String(o)}"`,d=e[o];if(!Object.hasOwn(e,o)&&(c?d!==void 0:l!=="function"))throw new TypeError(`${u} is invalid: expected own property`);if(c&&d===void 0)return;const h=typeof d;if(h!==l||d===null)throw new TypeError(`${u} is invalid: expected ${l}, got ${h}`)}const i=(o,l)=>Object.entries(o).forEach(([c,u])=>r(c,u,l));i(t,!1),i(n,!0)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Xt=BigInt(0),lt=BigInt(1),zo=BigInt(2),sC=BigInt(3),yb=BigInt(4),rC=BigInt(5),vF=BigInt(7),iC=BigInt(8),wF=BigInt(9),jF=BigInt(15),oC=BigInt(16),SF=BigInt("0x10000000000000000");function at(e,t){if(t<=Xt)throw new Error("mod: expected positive modulus, got "+t);const n=e%t;return n>=Xt?n:t+n}function CF(e,t,n){if(n<=lt)throw new Error("pow: expected modulus > 1, got "+n);if(typeof t!="bigint")throw new TypeError("invalid exponent: expected bigint, got "+typeof t);if(t<Xt)throw new Error("invalid exponent, negatives unsupported");if(t===Xt)return lt;if(t===lt)return e;let s=e%n;if(s<Xt&&(s+=n),t<SF){let l=lt;for(;t>Xt;)t<&&(l=l*s%n),s=s*s%n,t>>=lt;return l}const r=[];for(;t>Xt;)r.push(Number(t&jF)),t>>=yb;const i=new Array(16);i[0]=lt,i[1]=s;for(let l=2;l<16;l++)i[l]=i[l-1]*s%n;let o=i[r[r.length-1]];for(let l=r.length-2;l>=0;l--){o=o*o%n,o=o*o%n,o=o*o%n,o=o*o%n;const c=r[l];c!==0&&(o=o*i[c]%n)}return o}function Bs(e,t,n){if(n<=lt)throw new Error("pow2: expected modulus > 1, got "+n);if(t<Xt)throw new Error("pow2: expected non-negative exponent, got "+t);let s=e;for(;t-- >Xt;)s*=s,s%=n;return s}function Tw(e,t){if(e===Xt)throw new Error("invert: expected non-zero number");if(t<=lt)throw new Error("invert: expected modulus > 1, got "+t);let n=at(e,t),s=t,r=Xt,i=lt;for(;n!==Xt;){const l=s/n,c=s-n*l,u=r-i*l;s=n,n=c,r=i,i=u}if(s!==lt)throw new Error("invert: does not exist");return at(r,t)}function kb(e,t,n){const s=e;if(!s.eql(s.sqr(t),n))throw new Error("Cannot find square root")}function bb(e,t){if((e<)===Xt)throw new Error(t+": expected odd modulus, got "+e)}function aC(e,t){const n=e,s=(n.ORDER+lt)/yb,r=n.pow(t,s);return kb(n,r,t),r}function $F(e,t){const n=e,s=(n.ORDER-rC)/iC,r=n.mul(t,zo),i=n.pow(r,s),o=n.mul(t,i),l=n.mul(n.mul(o,zo),i),c=n.mul(o,n.sub(l,n.ONE));return kb(n,c,t),c}function EF(e){const t=vb(e),n=lC(e),s=n(t,t.neg(t.ONE)),r=n(t,s),i=n(t,t.neg(s)),o=(e+vF)/oC;return(l,c)=>{const u=l;let d=u.pow(c,o),h=u.mul(d,s);const f=u.mul(d,r),p=u.mul(d,i),g=u.eql(u.sqr(h),c),b=u.eql(u.sqr(f),c);d=u.cmov(d,h,g),h=u.cmov(p,f,b);const y=u.eql(u.sqr(h),c),m=u.cmov(d,h,y);return kb(u,m,c),m}}function lC(e){if(e<sC)throw new Error("sqrt is not defined for small field");bb(e,"tonelliShanks");let t=e-lt,n=0;for(;t%zo===Xt;)t/=zo,n++;let s=zo;const r=vb(e);for(;zx(r,s)===1;)if(s++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return aC;let i=r.pow(s,t);const o=(t+lt)/zo;return function(c,u){const d=c;if(d.is0(u))return u;if(zx(d,u)!==1)throw new Error("Cannot find square root");let h=n,f=d.mul(d.ONE,i),p=d.pow(u,t),g=d.pow(u,o);for(;!d.eql(p,d.ONE);){if(d.is0(p))throw new Error("Cannot find square root: probably non-prime P");let b=1,y=d.sqr(p);for(;!d.eql(y,d.ONE);)if(b++,y=d.sqr(y),b===h)throw new Error("Cannot find square root");const m=lt<<BigInt(h-b-1),k=d.pow(f,m);h=b,f=d.sqr(k),p=d.mul(p,f),g=d.mul(g,k)}return g}}function TF(e){return bb(e,"Fp.sqrt"),e%yb===sC?aC:e%iC===rC?$F:e%oC===wF?EF(e):lC(e)}const NF=(e,t)=>(at(e,t)<)===lt,AF=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function Ju(e){if(vl(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);w0(e.BYTES,"BYTES"),w0(e.BITS,"BITS");for(const t of AF)ju(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=lt)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function cC(e,t,n=!1){Ju(e),KS(t,"nums"),I1(n,"passZero");const s=e,r=new Array(t.length).fill(n?s.ZERO:void 0),i=t.reduce((l,c,u)=>s.is0(c)?l:(r[u]=l,s.mul(l,c)),s.ONE),o=s.inv(i);return t.reduceRight((l,c,u)=>s.is0(c)?l:(r[u]=s.mul(l,r[u]),s.mul(l,c)),o),r}function zx(e,t){Ju(e);const n=e;bb(n.ORDER,"FpLegendre");const s=(n.ORDER-lt)/zo,r=n.pow(t,s),i=n.eql(r,n.ONE),o=n.eql(r,n.ZERO),l=n.eql(r,n.neg(n.ONE));if(!i&&!o&&!l)throw new Error("invalid Legendre symbol result");return i?1:o?0:-1}function MF(e,t){if(t!==void 0&&XS(t),e<=Xt)throw new Error("invalid n length: expected positive n, got "+e);if(t!==void 0&&t<1)throw new Error("invalid n length: expected positive bit length, got "+t);const n=kF(e);if(t!==void 0&&t<n)throw new Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);const s=t!==void 0?t:n,r=Math.ceil(s/8);return{nBitLength:s,nByteLength:r}}const Nw=new WeakMap;class Aw{constructor(t,n={}){ie(this,"ORDER");ie(this,"BITS");ie(this,"BYTES");ie(this,"isLE");ie(this,"ZERO",Xt);ie(this,"ONE",lt);ie(this,"_lengths");ie(this,"_mod");if(t<=lt)throw new Error("invalid field: expected ORDER > 1, got "+t);let s;this.isLE=!1,n!=null&&typeof n=="object"&&(typeof n.BITS=="number"&&(s=n.BITS),typeof n.sqrt=="function"&&Object.defineProperty(this,"sqrt",{value:n.sqrt,enumerable:!0}),typeof n.isLE=="boolean"&&(this.isLE=n.isLE),n.allowedLengths&&(this._lengths=Object.freeze(n.allowedLengths.slice())),typeof n.modFromBytes=="boolean"&&(this._mod=n.modFromBytes));const{nBitLength:r,nByteLength:i}=MF(t,s);if(i>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=r,this.BYTES=i,Object.freeze(this)}create(t){return at(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return Xt<=t&&t<this.ORDER}is0(t){return t===Xt}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t<)===lt}neg(t){return at(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return at(t*t,this.ORDER)}add(t,n){return at(t+n,this.ORDER)}sub(t,n){return at(t-n,this.ORDER)}mul(t,n){return at(t*n,this.ORDER)}pow(t,n){return CF(t,n,this.ORDER)}div(t,n){return at(t*Tw(n,this.ORDER),this.ORDER)}sqrN(t){return t*t}addN(t,n){return t+n}subN(t,n){return t-n}mulN(t,n){return t*n}inv(t){return Tw(t,this.ORDER)}sqrt(t){let n=Nw.get(this);return n||Nw.set(this,n=TF(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?tC(t,this.BYTES):eC(t,this.BYTES)}fromBytes(t,n=!1){bl(t);const{_lengths:s,BYTES:r,isLE:i,ORDER:o,_mod:l}=this;if(s){if(t.length<1||!s.includes(t.length)||t.length>r)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+t.length);const u=new Uint8Array(r);u.set(t,i?0:u.length-t.length),t=u}if(t.length!==r)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+t.length);let c=i?Ax(t):JS(t);if(l&&(c=at(c,o)),!n&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(t){return cC(this,t,!0)}cmov(t,n,s){return I1(s,"condition"),s?n:t}}function vb(e,t={}){return Object.freeze(Aw.prototype),new Aw(e,t)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const wb=BigInt(0),ed=BigInt(1),zF=BigInt(4),fg=16,Mw=128,RF=5,zw=2**31;function jb(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);ju(t.fromAffine,"Point.fromAffine"),ju(t.fromBytes,"Point.fromBytes"),ju(t.fromHex,"Point.fromHex"),vl(t.BASE,"Point.BASE"),vl(t.ZERO,"Point.ZERO"),Ju(t.Fp),Ju(t.Fn)}function IF(e,t){jb(e),uC(t,e);const n=cC(e.Fp,t.map(s=>s.Z));return t.map((s,r)=>e.fromAffine(s.toAffine(n[r])))}function _F(e,t,n=1){if(!Number.isSafeInteger(e)||e<n||e>t)throw new Error("invalid window size, expected ["+n+".."+t+"], got W="+e)}function LF(e,t){const n=e*(4*t+128);if(n>zw)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+zw/2**20+" MiB")}function OF(e,t){if(e!==void 0){ju(e,"randomBytes");try{const n=e(t);if(!ZS(n)||n.length!==t)return}catch{return}return e}}function uC(e,t){KS(e,"points"),e.forEach((n,s)=>{if(!(n instanceof t))throw new Error("invalid point at index "+s)})}function DF(e,t,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((s,r)=>{if(!(n===void 0?t.isValid(s):Wo(s)&&s<n))throw new Error("invalid scalar at index "+r)})}const dC=new WeakMap;function hg(e){return dC.get(e)||1}function BF(e,t){const n=e.double(),s=[e];for(let r=1;r<t;r++)s.push(s[r-1].add(n));return s}function qF(e,t){const n=2**t,s=n/2,r=BigInt(n-1),i=[];for(;e>wb;){let o=0;e&ed&&(o=Number(e&r),o>=s&&(o-=n),e-=BigInt(o)),i.push(o),e>>=ed}return i}function HF(e,t,n){const s=2**t,r=s/2,i=BigInt(s-1),o=BigInt(t),l=[];for(let c=0;c<n;c++){let u=Number(e&i);e>>=o,u>r&&(u-=s,e+=ed),l.push(u)}if(e!==wb)throw new Error("invalid wnaf");return l}function PF(e,t,n){let s=0;for(const i of n)s=Math.max(s,i.length);let r=e;for(let i=s-1;i>=0;i--){i!==s-1&&(r=r.double());for(let o=0;o<n.length;o++){const l=n[o][i];if(l){const c=t[o][Math.abs(l)-1>>1];r=r.add(l<0?c.negate():c)}}}return r}class UF{constructor(t,n){ie(this,"Point");ie(this,"BASE");ie(this,"ZERO");ie(this,"randomBytes");ie(this,"wnafPrecomputes",new WeakMap);ie(this,"baseCanBeBlinded");ie(this,"bits");jb(t),this.randomBytes=OF(n,fg),this.Point=t,this.BASE=t.BASE,this.ZERO=t.ZERO,this.bits=t.Fn.BITS}buildWnafTable(t,n,s){const r=Math.ceil(s/n)+1,i=2**(n-1),o=[];let l=t;for(let c=0;c<r;c++){let u=l;for(let d=0;d<i;d++)o.push(u),u=u.add(l);l=o[o.length-1].double()}return{W:n,bits:s,windows:r,comp:o}}wnafCachedCT(t,n){const{W:s,windows:r,comp:i}=t,o=2**(s-1),l=HF(n,s,r);let c=this.ZERO,u=this.BASE;for(let d=0;d<r;d++){const h=l[d],f=d*o,p=Math.abs(h)-1;let g=i[f];for(let y=1;y<o;y++)g=y===p?i[f+y]:g;const b=g.negate();h===0?u=u.add(i[f]):c=c.add(h<0?b:g)}return{p:c,f:u}}getWnafPrecomputes(t,n,s,r){let i=this.wnafPrecomputes.get(n),o=i==null?void 0:i.find(l=>l.W===t&&l.bits===s);return o||(o=this.buildWnafTable(n,t,s),typeof r=="function"&&(o={...o,comp:r(o.comp)}),i||(i=[],this.wnafPrecomputes.set(n,i)),i.push(o)),o}assertPoint(t){if(!(t instanceof this.Point))throw new TypeError('"point" expected Point instance, got type='+typeof t)}validateMulInput(t,n){if(this.assertPoint(t),!nC(n,ed,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,s,r){const i=hg(t);return i===1?this.fixedWindowCT(t,n,s):this.wnafCachedCT(this.getWnafPrecomputes(i,t,s,r),n)}mulCT(t,n,s){return this.validateMulInput(t,n),this.runCT(t,n,this.bits,s)}mulCTBlinded(t,n,s){if(this.validateMulInput(t,n),this.randomBytes===void 0)throw new Error("randomBytes is required for scalar blinding");const r=this.Point.Fn.BITS+Mw,i=this.randomBytes(fg);if(!ZS(i)||i.length!==fg)throw new Error("randomBytes returned invalid byte array");i[0]=i[0]&63|128;const o=n+JS(i)*this.Point.Fn.ORDER;return this.runCT(t,o,r,s)}fixedWindowCT(t,n,s){const r=RF,i=1<<r,o=bF(r),l=new Array(i);l[0]=this.ZERO;for(let d=1;d<i;d++)l[d]=l[d-1].add(t);const c=Math.ceil(s/r);let u=this.ZERO;for(let d=c-1;d>=0;d--){if(d!==c-1)for(let p=0;p<r;p++)u=u.double();const h=Number(n>>BigInt(d*r)&o);let f=l[0];for(let p=1;p<i;p++)f=p===h?l[p]:f;u=u.add(f)}return{p:u,f:u}}shouldBlind(t,n){return this.randomBytes===void 0?!1:n===ed?!0:t!==this.BASE?!1:(this.baseCanBeBlinded===void 0&&(this.baseCanBeBlinded=this.mulUnsafe(this.BASE,this.Point.Fn.ORDER).is0()),this.baseCanBeBlinded)}mulSecret(t,n,s,r){return this.shouldBlind(t,s)?this.mulCTBlinded(t,n,r):this.mulCT(t,n,r)}mulUnsafe(t,n,s){if(this.assertPoint(t),!Wo(n))throw new Error("invalid scalar");const r=hg(t);if(r===1||n>=this.Point.Fn.ORDER)return FF(this.Point,[t],[n],!0);const i=this.getWnafPrecomputes(r,t,this.bits,s);return this.wnafCachedCT(i,n).p}setWindowSize(t,n){this.assertPoint(t),_F(n,this.bits);const s=Math.ceil((this.bits+Mw)/n)+1;LF(s*2**(n-1),this.Point.Fp.BYTES),dC.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return hg(t)!==1}}function FF(e,t,n,s=!1){if(jb(e),uC(t,e),I1(s,"allowOversized"),DF(n,e.Fn,s?e.Fn.ORDER**zF:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const r=t.map(o=>BF(o,4)),i=n.map(o=>qF(o,4));return PF(e.ZERO,r,i)}function Rw(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return Ju(t),t}else return vb(e,{isLE:n})}function GF(e,t,n={},s){if(s===void 0&&(s=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);Mx(n);for(const c of["p","n","h"]){const u=t[c];if(!(Wo(u)&&u!==wb))throw new Error(`CURVE.${c} must be positive bigint`)}const r=Rw(t.p,n.Fp,s),i=Rw(t.n,n.Fn,s),l=["Gx","Gy","a","d"];for(const c of l)if(!r.isValid(t[c]))throw new Error(`CURVE.${c} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:r,Fn:i}}function VF(e,t){return function(s){const r=e(s);return{secretKey:r,publicKey:t(r)}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Of=BigInt(0),Df=BigInt(1),Bf=BigInt(2),WF=BigInt(4),Iw=BigInt(8);function KF(e,t,n,s){const r=e.sqr(n),i=e.sqr(s),o=e.add(e.mul(t.a,r),i),l=e.add(e.ONE,e.mul(t.d,e.mul(r,i)));return e.eql(o,l)}function XF(e,t={}){Mx(t,{},{},"extraOpts");const n=t,s=GF("edwards",e,n,n.FpFnLE),{Fp:r,Fn:i}=s;let o=s.CURVE;const{h:l}=o;if(zx(r,o.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(zx(r,o.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");Mx(n,{},{uvRatio:"function",randomBytes:"function"});const c=n.randomBytes===void 0?YS:n.randomBytes,u=Bf<<BigInt(r.BYTES*8)-Df;function d(w){if(!r.isOdd)throw new Error("Field does not have .isOdd()");return r.isOdd(w)}const h=n.uvRatio===void 0?(w,v)=>{try{return{isValid:!0,value:r.sqrt(r.div(w,v))}}catch{return{isValid:!1,value:Of}}}:n.uvRatio;if(!KF(r,o,o.Gx,o.Gy))throw new Error("bad curve params: generator point");const f=r.eql(o.a,r.neg(r.ONE))?w=>r.neg(w):r.eql(o.a,r.ONE)?w=>w:w=>r.mul(o.a,w);function p(w,v,j=!1){const C=j?Df:Of;return Su("coordinate "+w,v,C,u),v}function g(w){if(!(w instanceof b))throw new Error("EdwardsPoint expected")}const k=class k{constructor(v,j,C,$){ie(this,"X");ie(this,"Y");ie(this,"Z");ie(this,"T");this.X=p("x",v),this.Y=p("y",j),this.Z=p("z",C,!0),this.T=p("t",$),Object.freeze(this)}static CURVE(){return o}static fromAffine(v){if(v instanceof k)throw new Error("extended point not allowed");const{x:j,y:C}=v||{};return p("x",j),p("y",C),new k(j,C,r.ONE,r.mul(j,C))}static fromBytes(v,j=!1){const C=r.BYTES,{a:$,d:T}=o;v=Qu(bl(v,C,"point")),I1(j,"zip215");const A=Qu(v),S=v[C-1];A[C-1]=S&-129;const _=Ax(A),M=j?u:r.ORDER;Su("point.y",_,Of,M);const z=r.sqr(_),O=r.sub(z,r.ONE),I=r.sub(r.mulN(T,z),$);let{isValid:E,value:N}=h(O,I);if(!E)throw new Error("bad point: invalid y coordinate");const R=d(N),L=(S&128)!==0;if(!j&&r.is0(N)&&L)throw new Error("bad point: x=0 and x_0=1");return L!==R&&(N=r.neg(N)),k.fromAffine({x:N,y:_})}static fromHex(v,j=!1){return k.fromBytes(gF(v),j)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(v=6,j=!0){return m.setWindowSize(this,v),j||this.multiply(Bf),this}assertValidity(){const v=this,{a:j,d:C}=o;if(v.is0())throw new Error("bad point: ZERO");const{X:$,Y:T,Z:A,T:S}=v,_=r.sqr($),M=r.sqr(T),z=r.sqr(A),O=r.sqr(z),I=r.mul(_,j),E=r.mul(r.add(I,M),z),N=r.add(O,r.mul(C,r.mul(_,M)));if(!r.eql(E,N))throw new Error("bad point: equation left != right (1)");const R=r.mul($,T),L=r.mul(A,S);if(!r.eql(R,L))throw new Error("bad point: equation left != right (2)")}equals(v){g(v);const{X:j,Y:C,Z:$}=this,{X:T,Y:A,Z:S}=v,_=r.mul(j,S),M=r.mul(T,$),z=r.mul(C,S),O=r.mul(A,$);return r.eql(_,M)&&r.eql(z,O)}is0(){return this.equals(k.ZERO)}negate(){return new k(r.neg(this.X),this.Y,this.Z,r.neg(this.T))}double(){const{X:v,Y:j,Z:C}=this,$=r.sqr(v),T=r.sqr(j),A=r.mul(r.sqr(C),Bf),S=f($),_=r.addN(v,j),M=r.sub(r.subN(r.sqr(_),$),T),z=r.addN(S,T),O=r.subN(z,A),I=r.subN(S,T),E=r.mul(M,O),N=r.mul(z,I),R=r.mul(M,I),L=r.mul(O,z);return new k(E,N,L,R)}add(v){g(v);const{d:j}=o,{X:C,Y:$,Z:T,T:A}=this,{X:S,Y:_,Z:M,T:z}=v,O=r.mul(C,S),I=r.mul($,_),E=r.mul(r.mulN(A,j),z),N=r.mul(T,M),R=r.sub(r.subN(r.mulN(r.addN(C,$),r.addN(S,_)),O),I),L=r.subN(N,E),D=r.addN(N,E),P=r.sub(I,f(O)),F=r.mul(R,L),X=r.mul(D,P),G=r.mul(R,P),Q=r.mul(L,D);return new k(F,X,Q,G)}subtract(v){return g(v),this.add(v.negate())}multiply(v){if(!i.isValidNot0(v))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");const{p:j,f:C}=m.mulSecret(this,v,l,y);return y([j,C])[0]}multiplyUnsafe(v){if(!i.isValid(v))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return v===Of?k.ZERO:this.is0()||v===Df?this:m.mulUnsafe(this,v,y)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return m.mulUnsafe(this,o.n).is0()}toAffine(v){const j=this;let C=v;if(C!=null&&typeof C!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof C);const{X:$,Y:T,Z:A}=j,S=j.is0();C==null&&(C=S?r.create(Iw):r.inv(A));const _=r.mul($,C),M=r.mul(T,C),z=r.mul(A,C);if(S)return{x:r.ZERO,y:r.ONE};if(!r.eql(z,r.ONE))throw new Error("invZ was invalid");return{x:_,y:M}}clearCofactor(){return l===Df?this:l===Bf?this.double():l===WF?this.double().double():l===Iw?this.double().double().double():this.multiplyUnsafe(l)}toBytes(){const{x:v,y:j}=this.toAffine(),C=r.toBytes(j);return C[C.length-1]|=d(v)?128:0,C}toHex(){return pF(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};ie(k,"BASE",new k(o.Gx,o.Gy,r.ONE,r.mul(o.Gx,o.Gy))),ie(k,"ZERO",new k(r.ZERO,r.ONE,r.ONE,r.ZERO)),ie(k,"Fp",r),ie(k,"Fn",i);let b=k;const y=w=>IF(b,w),m=new UF(b,c);return m.bits>=6&&b.BASE.precompute(6),Object.freeze(b.prototype),Object.freeze(b),b}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const go=BigInt(0),ys=BigInt(1),qf=BigInt(2);function _w(e,t){return e+t-(t>>ys<<ys)}function ZF(e){const t=BigInt(6)*e;return(n,s,r)=>{const i=s+r,l=((t+r-s)*n+s)%e;return{x_2:l,x_3:i-l}}}function YF(e){return Mx(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function QF(e){const t=YF(e),{P:n,type:s,adjustScalarBytes:r,powPminus2:i,randomBytes:o}=t,l=t.scalarMultBase,c=s==="x25519";if(!c&&s!=="x448")throw new Error("invalid type");const u=o===void 0?YS:o,d=c?255:448,h=ZF(n),f=c?32:56,p=BigInt(c?9:5),g=BigInt(c?121665:39081),b=c?qf**BigInt(254):qf**BigInt(447),y=c?BigInt(8)*(qf**BigInt(251)-ys):BigInt(4)*(qf**BigInt(445)-ys),m=b+y+ys,k=E=>at(E,n),w=v(p);function v(E){return tC(k(E),f)}function j(E){const N=Qu(bl(E,f,"uCoordinate"));return c&&(N[31]&=127),k(Ax(N))}function C(E){return Ax(r(Qu(bl(E,f,"scalar"))))}const $=new Set(c?[go,ys,n-ys,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[go,ys,n-ys]);function T(E,N){const R=j(N);if($.has(R))throw new Error("invalid private or public key received");const L=M(R,C(E));if(L===go)throw new Error("invalid private or public key received");return v(L)}function A(E){if(l===void 0)return T(E,w);const N=C(E);Su("scalar",N,b,m);const R=k(l(N));if(R===go)throw new Error("invalid private or public key received");return v(R)}const S=A,_=T;function M(E,N){Su("u",E,go,n),Su("scalar",N,b,m);const R=N,L=E;let D=ys,P=go,F=E,X=ys;const G=R^R>>ys;for(let Y=BigInt(d-1);Y>=go;Y--){const V=_w(n,G>>Y);({x_2:D,x_3:F}=h(V,D,F)),{x_2:P,x_3:X}=h(V,P,X);const oe=D+P,le=k(oe*oe),me=D-P,se=k(me*me),he=le-se,ce=F+X,J=F-X,ke=k(J*oe),ue=k(ce*me),ge=ke+ue,Re=ke-ue;F=k(ge*ge),X=k(L*k(Re*Re)),D=k(le*se),P=k(he*(le+k(g*he)))}const Q=_w(n,R);({x_2:D,x_3:F}=h(Q,D,F)),{x_2:P,x_3:X}=h(Q,P,X);const ee=i(P);return k(D*ee)}const z={secretKey:f,publicKey:f,seed:f},O=E=>(E=E===void 0?u(f):E,bl(E,z.seed,"seed"),E),I={randomSecretKey:O};return Object.freeze(z),Object.freeze(I),Object.freeze({keygen:VF(O,S),getSharedSecret:_,getPublicKey:S,scalarMult:T,scalarMultBase:A,utils:I,GuBytes:w.slice(),lengths:z})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Lw=BigInt(0),JF=BigInt(1),Ow=BigInt(2),eG=BigInt(3),tG=BigInt(5),nG=BigInt(8),_1=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),sG={p:_1,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:nG,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function fC(e){const t=BigInt(10),n=BigInt(20),s=BigInt(40),r=BigInt(80),i=_1,l=e*e%i*e%i,c=Bs(l,Ow,i)*l%i,u=Bs(c,JF,i)*e%i,d=Bs(u,tG,i)*u%i,h=Bs(d,t,i)*d%i,f=Bs(h,n,i)*h%i,p=Bs(f,s,i)*f%i,g=Bs(p,r,i)*p%i,b=Bs(g,r,i)*p%i,y=Bs(b,t,i)*d%i;return{pow_p_5_8:Bs(y,Ow,i)*e%i,b2:l}}function rG(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Dw=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function iG(e,t){const n=_1,s=at(t*t*t,n),r=at(s*s*t,n),i=fC(e*r).pow_p_5_8;let o=at(e*s*i,n);const l=at(t*o*o,n),c=o,u=at(o*Dw,n),d=l===e,h=l===at(-e,n),f=l===at(-e*Dw,n);return d&&(o=c),(h||f)&&(o=u),NF(o,n)&&(o=at(-o,n)),{isValid:d||h,value:o}}const Bw=XF(sG,{uvRatio:iG}),Sb=(()=>{const e=_1,t=n=>{const{pow_p_5_8:s,b2:r}=fC(n);return at(Bs(s,eG,e)*r,e)};return QF({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:rG,scalarMultBase:n=>{const s=at(n,Bw.Fn.ORDER);if(s===Lw)return Lw;const r=Bw.BASE.multiply(s);return at((r.Z+r.Y)*t(at(r.Z-r.Y,e)),e)}})})(),oG=Uint8Array.from([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9,12,5,1,15,14,13,4,10,0,7,6,3,9,2,8,11,13,11,7,14,12,1,3,9,5,0,15,4,8,6,2,10,6,15,14,9,11,3,0,8,12,2,13,7,1,4,10,5,10,2,8,4,7,6,1,5,15,11,9,14,3,12,13,0,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,14,10,4,8,9,15,13,6,1,12,0,2,11,7,5,3,11,8,12,0,5,2,15,13,10,14,3,6,7,1,9,4,7,9,3,1,13,12,11,14,2,6,5,10,4,0,15,8,9,0,5,7,2,4,10,15,14,1,11,12,6,8,3,13,2,12,6,10,0,11,8,3,4,13,7,5,15,14,1,9]);function pi(e,t,n,s,r){return e=e+t+r|0,s=Tx(s^e,16),n=n+s|0,t=Tx(t^n,12),{a:e,b:t,c:n,d:s}}function gi(e,t,n,s,r){return e=e+t+r|0,s=Tx(s^e,8),n=n+s|0,t=Tx(t^n,7),{a:e,b:t,c:n,d:s}}function aG(e,t={},n,s,r){if(ti(n),e<=0||e>n)throw new Error('"dkLen" must be 1..'+n+", got "+e);const{key:i,salt:o,personalization:l}=t;if(i!==void 0&&(i.length<1||i.length>n))throw new Error('"key" expected to be undefined or of length=1..'+n);o!==void 0&&Ns(o,s,"salt"),l!==void 0&&Ns(l,r,"personalization")}class lG{constructor(t,n){ie(this,"buffer");ie(this,"buffer32");ie(this,"finished",!1);ie(this,"destroyed",!1);ie(this,"length",0);ie(this,"pos",0);ie(this,"blockLen");ie(this,"outputLen");ie(this,"canXOF",!1);ti(t),ti(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=Ex(this.buffer)}update(t){$x(this),Ns(t);const{blockLen:n,buffer:s,buffer32:r}=this,i=t.length,o=t.byteOffset,l=t.buffer;for(let c=0;c<i;){this.pos===n&&(La(r),this.compress(r,0,!1),La(r),this.pos=0);const u=Math.min(n-this.pos,i-c),d=o+c;if(u===n&&!(d%4)&&c+u<i){const h=new Uint32Array(l,d,Math.floor((i-c)/4));La(h);for(let f=0;c+n<i;f+=r.length,c+=n)this.length+=n,this.compress(h,f,!1);La(h);continue}s.set(c===0&&u===i?t:t.subarray(c,c+u),this.pos),this.pos+=u,this.length+=u,c+=u}return this}digestInto(t){if($x(this),PS(t,this),t.byteOffset&3)throw new RangeError('"output" expected 4-byte aligned byteOffset, got '+t.byteOffset);const{pos:n,buffer32:s}=this;this.finished=!0,this.buffer.fill(0,n),La(s),this.compress(s,0,!0),La(s);const r=this.get(),i=t===this.buffer?s:Ex(t),o=Math.floor(this.outputLen/4);for(let d=0;d<o;d++)i[d]=ru(r[d]);const l=this.outputLen%4;if(!l)return;const c=o*4,u=r[o];for(let d=0;d<l;d++)t[c+d]=u>>>8*d}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}_cloneInto(t){const{buffer:n,length:s,finished:r,destroyed:i,outputLen:o,pos:l}=this;return t||(t=new this.constructor({dkLen:o})),t.set(...this.get()),t.buffer.set(n),t.destroyed=i,t.finished=r,t.length=s,t.pos=l,t.outputLen=o,t}clone(){return this._cloneInto()}}function cG(e,t,n,s,r,i,o,l,c,u,d,h,f,p,g,b,y,m,k,w){let v=0;for(let j=0;j<s;j++)({a:r,b:c,c:f,d:y}=pi(r,c,f,y,n[t+e[v++]])),{a:r,b:c,c:f,d:y}=gi(r,c,f,y,n[t+e[v++]]),{a:i,b:u,c:p,d:m}=pi(i,u,p,m,n[t+e[v++]]),{a:i,b:u,c:p,d:m}=gi(i,u,p,m,n[t+e[v++]]),{a:o,b:d,c:g,d:k}=pi(o,d,g,k,n[t+e[v++]]),{a:o,b:d,c:g,d:k}=gi(o,d,g,k,n[t+e[v++]]),{a:l,b:h,c:b,d:w}=pi(l,h,b,w,n[t+e[v++]]),{a:l,b:h,c:b,d:w}=gi(l,h,b,w,n[t+e[v++]]),{a:r,b:u,c:g,d:w}=pi(r,u,g,w,n[t+e[v++]]),{a:r,b:u,c:g,d:w}=gi(r,u,g,w,n[t+e[v++]]),{a:i,b:d,c:b,d:y}=pi(i,d,b,y,n[t+e[v++]]),{a:i,b:d,c:b,d:y}=gi(i,d,b,y,n[t+e[v++]]),{a:o,b:h,c:f,d:m}=pi(o,h,f,m,n[t+e[v++]]),{a:o,b:h,c:f,d:m}=gi(o,h,f,m,n[t+e[v++]]),{a:l,b:c,c:p,d:k}=pi(l,c,p,k,n[t+e[v++]]),{a:l,b:c,c:p,d:k}=gi(l,c,p,k,n[t+e[v++]]);return{v0:r,v1:i,v2:o,v3:l,v4:c,v5:u,v6:d,v7:h,v8:f,v9:p,v10:g,v11:b,v12:y,v13:m,v14:k,v15:w}}const en=xF.slice();class uG extends lG{constructor(n={}){n=WS({},n);const s=n.dkLen===void 0?32:n.dkLen;super(64,s);ie(this,"v0",en[0]|0);ie(this,"v1",en[1]|0);ie(this,"v2",en[2]|0);ie(this,"v3",en[3]|0);ie(this,"v4",en[4]|0);ie(this,"v5",en[5]|0);ie(this,"v6",en[6]|0);ie(this,"v7",en[7]|0);aG(s,n,32,8,8);let{key:r,personalization:i,salt:o}=n,l=0;if(r!==void 0&&(Ns(r,void 0,"key"),l=r.length),this.v0^=this.outputLen|l<<8|65536|1<<24,o!==void 0){Ns(o,void 0,"salt");const c=Ex(Sw(o));this.v4^=ru(c[0]),this.v5^=ru(c[1])}if(i!==void 0){Ns(i,void 0,"personalization");const c=Ex(Sw(i));this.v6^=ru(c[0]),this.v7^=ru(c[1])}if(r!==void 0){const c=new Uint8Array(this.blockLen);c.set(r),this.update(c),v0(c)}}get(){const{v0:n,v1:s,v2:r,v3:i,v4:o,v5:l,v6:c,v7:u}=this;return[n,s,r,i,o,l,c,u]}set(n,s,r,i,o,l,c,u){this.v0=n|0,this.v1=s|0,this.v2=r|0,this.v3=i|0,this.v4=o|0,this.v5=l|0,this.v6=c|0,this.v7=u|0}compress(n,s,r){const i=aF(this.length),o=oF(this.length),{v0:l,v1:c,v2:u,v3:d,v4:h,v5:f,v6:p,v7:g,v8:b,v9:y,v10:m,v11:k,v12:w,v13:v,v14:j,v15:C}=cG(oG,s,n,10,this.v0,this.v1,this.v2,this.v3,this.v4,this.v5,this.v6,this.v7,en[0],en[1],en[2],en[3],i^en[4],o^en[5],r?~en[6]:en[6],en[7]);this.v0^=l^b,this.v1^=c^y,this.v2^=u^m,this.v3^=d^k,this.v4^=h^w,this.v5^=f^v,this.v6^=p^j,this.v7^=g^C}destroy(){this.destroyed=!0,v0(this.buffer32),this.set(0,0,0,0,0,0,0,0)}}const vh=fF(e=>new uG(e));class qw{constructor(t,n){ie(this,"oHash");ie(this,"iHash");ie(this,"blockLen");ie(this,"outputLen");ie(this,"canXOF",!1);ie(this,"finished",!1);ie(this,"destroyed",!1);if(lF(t),Ns(n,void 0,"key"),this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("expected Hash instance");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const s=this.blockLen,r=new Uint8Array(s);r.set(n.length>s?t.create().update(n).digest():n);for(let i=0;i<r.length;i++)r[i]^=54;this.iHash.update(r),this.oHash=t.create();for(let i=0;i<r.length;i++)r[i]^=106;this.oHash.update(r),v0(r)}update(t){return $x(this),this.iHash.update(t),this}digestInto(t){$x(this),PS(t,this),this.finished=!0;const n=t.subarray(0,this.outputLen);this.iHash.digestInto(n),this.oHash.update(n),this.oHash.digestInto(n),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:n,iHash:s,finished:r,destroyed:i,blockLen:o,outputLen:l,canXOF:c}=this;return t=t,t.finished=r,t.destroyed=i,t.blockLen=o,t.outputLen=l,t.canXOF=c,t.oHash=n._cloneInto(t.oHash),t.iHash=s._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const xg=(()=>{const e=(t,n,s)=>new qw(t,n).update(s).digest();return e.create=(t,n)=>new qw(t,n),e})(),dG=new TextEncoder().encode("Noise_IK_25519_ChaChaPoly_BLAKE2s"),Lr=32,Hw=65535,fG=2n**64n-1n,Pw=e=>vh(e,{dkLen:Lr}),Rx=(...e)=>{const t=new Uint8Array(e.reduce((s,r)=>s+r.length,0));let n=0;for(const s of e)t.set(s,n),n+=s.length;return t};function Uw(e,t,n){const s=xg(vh,e,t),r=xg(vh,s,new Uint8Array([1])),i=xg(vh,s,Rx(r,new Uint8Array([2])));return[r,i]}function Cb(){return j0(Sb.utils.randomSecretKey())}function j0(e){if(e.length!==Lr)throw new Error(`X25519 private key must be ${Lr} bytes`);return{publicKey:Sb.getPublicKey(e),privateKey:e}}const Ix=(e,t)=>Sb.getSharedSecret(e.privateKey,t);var Cl,Oo,od,S0;class pg{constructor(){ve(this,od);ve(this,Cl);ve(this,Oo,0n)}setKey(t){ye(this,Cl,t),ye(this,Oo,0n)}encrypt(t,n=new Uint8Array(0)){const s=B(this,Cl);return s===void 0?t:jw(s,U(this,od,S0).call(this),n).encrypt(t)}decrypt(t,n=new Uint8Array(0)){const s=B(this,Cl);return s===void 0?t:jw(s,U(this,od,S0).call(this),n).decrypt(t)}}Cl=new WeakMap,Oo=new WeakMap,od=new WeakSet,S0=function(){if(B(this,Oo)===fG)throw new Error("nonce exhausted");const t=new Uint8Array(12);return new DataView(t.buffer).setBigUint64(4,B(this,Oo),!0),ye(this,Oo,B(this,Oo)+1n),t};var Do,ir;class hG{constructor(){ve(this,Do);ve(this,ir);ie(this,"cipher",new pg);const t=dG;ye(this,ir,t.length<=Lr?Rx(t,new Uint8Array(Lr-t.length)):Pw(t)),ye(this,Do,B(this,ir).slice())}mixKey(t){const[n,s]=Uw(B(this,Do),t);ye(this,Do,n),this.cipher.setKey(s.subarray(0,Lr))}mixHash(t){ye(this,ir,Pw(Rx(B(this,ir),t)))}encryptAndHash(t){const n=this.cipher.encrypt(t,B(this,ir));return this.mixHash(n),n}decryptAndHash(t){const n=this.cipher.decrypt(t,B(this,ir));return this.mixHash(t),n}get handshakeHash(){return B(this,ir)}split(){const[t,n]=Uw(B(this,Do),new Uint8Array(0)),s=new pg;s.setKey(t.subarray(0,Lr));const r=new pg;return r.setKey(n.subarray(0,Lr)),[s,r]}}Do=new WeakMap,ir=new WeakMap;function hC(e,t){if(e.offset+t>e.buffer.length)throw new Error("malformed Noise message");const n=e.buffer.subarray(e.offset,e.offset+t);return e.offset+=t,n}function xG(e,t,n,s){t.push(n.ephemeral.publicKey),e.mixHash(n.ephemeral.publicKey),e.mixKey(Ix(n.ephemeral,s)),t.push(e.encryptAndHash(n.static.publicKey)),e.mixKey(Ix(n.static,s))}function pG(e,t,n){const s=hC(t,Lr).slice();return e.mixHash(s),e.mixKey(Ix(n.ephemeral,s)),e.mixKey(Ix(n.static,s)),s}const Fw=(e,t)=>{if(e.length>Hw)throw new Error(`${t} exceeds ${Hw} bytes`)};function gG(e,t){const n=new hG;return n.mixHash(e),n.mixHash(t),n}function mG(e){const t=e.ephemeral??Cb(),n=gG(e.prologue,e.remoteStatic);return{writeMessage1(s){const r=[];xG(n,r,{static:e.static,ephemeral:t},e.remoteStatic),r.push(n.encryptAndHash(s));const i=Rx(...r);return Fw(i,"handshake message"),i},readMessage2(s){Fw(s,"handshake message");const r={buffer:s,offset:0};pG(n,r,{ephemeral:t,static:e.static});const i=n.decryptAndHash(hC(r,s.length-r.offset)),[o,l]=n.split();return{payload:i,result:{send:o,receive:l,handshakeHash:n.handshakeHash}}}}}const yG=new TextEncoder().encode("pinomad/1"),xC=new TextEncoder,pC=new TextDecoder("utf-8",{fatal:!0}),kG=e=>xC.encode(JSON.stringify(e));function bG(e){try{return JSON.parse(pC.decode(e))}catch{throw new Error("handshake payload is not JSON")}}function vG(e){const t=bG(e);if((t==null?void 0:t.v)!==1)throw new Error("unsupported host hello");return{v:1}}const iu="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function $b(e){let t="";for(let n=0;n<e.length;n+=3){const s=e[n],r=e[n+1],i=e[n+2];t+=iu[s>>2]+iu[(s&3)<<4|(r??0)>>4],r!==void 0&&(t+=iu[(r&15)<<2|(i??0)>>6]),i!==void 0&&(t+=iu[i&63])}return t}function Ko(e){if(e.length%4===1)throw new Error("invalid base64url");const t=new Map(Array.from(iu,(s,r)=>[s,r])),n=[];for(let s=0;s<e.length;s+=4){const i=[...e.slice(s,s+4)].map(l=>{const c=t.get(l);if(c===void 0)throw new Error("invalid base64url");return c}),o=i.reduce((l,c,u)=>l|c<<18-u*6,0);n.push(o>>16&255),i.length>2&&n.push(o>>8&255),i.length>3&&n.push(o&255)}return new Uint8Array(n)}const Hf=65518;var ad,ld,$l;class wG{constructor(t){ve(this,ad);ve(this,ld);ve(this,$l,[]);ye(this,ad,t.send),ye(this,ld,t.receive)}seal(t){const n=xC.encode(t),s=[];for(let r=0;r<=n.length;r+=Hf){const i=r+Hf>=n.length,o=new Uint8Array(1+Math.min(Hf,n.length-r));if(o[0]=i?0:1,o.set(n.subarray(r,r+Hf),1),s.push(B(this,ad).encrypt(o)),i)break}return s}open(t){const n=B(this,ld).decrypt(t),s=n[0];if(s!==0&&s!==1)throw new Error("bad record flag");if(B(this,$l).push(n.subarray(1)),s===1)return;const r=jG(B(this,$l));return ye(this,$l,[]),pC.decode(r)}}ad=new WeakMap,ld=new WeakMap,$l=new WeakMap;function jG(e){const t=new Uint8Array(e.reduce((s,r)=>s+r.length,0));let n=0;for(const s of e)t.set(s,n),n+=s.length;return t}function C0(e){let t=e.pairing;return{label:e.url,open(n){const s=new WebSocket(e.url);s.binaryType="arraybuffer";const r=mG({prologue:yG,static:e.device,remoteStatic:e.hostKey});let i,o=[],l=!1;const c=(d,h)=>{l||(l=!0,n.closed(d,h))},u=d=>{s.close(),c(1008,d)};return s.onopen=()=>{const d=t===void 0?{v:1}:{v:1,pair:t};s.send(r.writeMessage1(kG(d)))},s.onmessage=d=>{var h;try{const f=d.data instanceof ArrayBuffer?new Uint8Array(d.data):new Uint8Array(d.data);if(i===void 0){const{payload:p,result:g}=r.readMessage2(f);vG(p),i=new wG(g),t!==void 0&&(t=void 0,(h=e.onPaired)==null||h.call(e));const b=o;o=[];for(const y of b)for(const m of i.seal(y))s.send(m)}else{const p=i.open(f);p!==void 0&&n.message(p)}}catch(f){u(f instanceof Error?f.message:"secure channel failure")}},s.onclose=d=>c(d.code,d.reason===""?void 0:d.reason),s.onerror=()=>{},{send(d){if(i===void 0){o.push(d);return}for(const h of i.seal(d))s.send(h)},close(){s.close()}}}}}const $0=e=>{if(typeof e!="string")return!1;try{return Ko(e).length===32}catch{return!1}},SG=e=>{if(typeof e!="string")return!1;try{const t=new URL(e).protocol;return t==="ws:"||t==="wss:"}catch{return!1}},CG=e=>{if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.serverOrigin=="string"&&t.serverOrigin!==""&&$0(t.hostId)};function gC(e){if(typeof e!="object"||e===null)return;const t=e;if(!SG(t.url)||!$0(t.hostKey)||!$0(t.privateKey))return;const n=CG(t.account)?t.account:void 0,s=typeof t.name=="string"&&t.name!==""?t.name:void 0;return{url:t.url,hostKey:t.hostKey,privateKey:t.privateKey,...s===void 0?{}:{name:s},...n===void 0?{}:{account:n}}}function mC(e){const t=l=>{if(l.name!==void 0)return l.name;try{return new URL(l.url).host}catch{return l.url}},n=e.map(t),s=e.map(()=>0),r=new Map;for(const l of n)r.set(l,(r.get(l)??0)+1);n.forEach((l,c)=>{r.get(l)>1&&(s[c]=6)});const i=l=>s[l]===0?n[l]:`${n[l]} · ${e[l].hostKey.slice(0,s[l])}`;for(;;){const l=new Map,c=new Set;if(e.forEach((d,h)=>{const f=l.get(i(h));f===void 0?l.set(i(h),h):(c.add(f),c.add(h))}),c.size===0)break;let u=!1;for(const d of c)s[d]>0&&s[d]<e[d].hostKey.length&&(s[d]+=1,u=!0);if(!u)break}const o=new Map;return e.forEach((l,c)=>o.set(l.hostKey,i(c))),o}function Eb(e){const t=e.indexOf(".");if(t<=0||e.indexOf(".",t+1)!==-1)return;const n=e.slice(0,t),s=e.slice(t+1);try{if(Ko(n).length!==32||Ko(s).length===0)return}catch{return}return{hostKey:n,secret:s}}function yC(e){let t;try{t=new URL(e.trim())}catch{return}const n=new URLSearchParams(t.hash.replace(/^#/,"")),s=n.get("pair");if(s===null||s===""||Eb(s)===void 0)return;let r=n.get("url");if(r===null||r==="")if(t.protocol==="http:")r=`ws://${t.host}/`;else if(t.protocol==="https:")r=`wss://${t.host}/`;else return;else try{const i=new URL(r).protocol;if(i!=="ws:"&&i!=="wss:")return}catch{return}return`pair=${s}&url=${encodeURIComponent(r)}`}const kC=(e,t)=>fetch(e,t),Mr=e=>({ok:!0,value:e}),ks=(e,t)=>({ok:!1,error:{code:e,...t===void 0?{}:{status:t}}}),Pf=e=>e.code==="unauthenticated";async function $G(e,t=kC){const n=new AbortController,s=setTimeout(()=>n.abort(),5e3);try{const r=await t(`${e.replace(/\/+$/,"")}/api/me`,{signal:n.signal,redirect:"manual"});if(r.status===401)return"enabled";if(r.status===200){const i=await r.text();let o;try{o=JSON.parse(i)}catch{return"disabled"}return typeof(o==null?void 0:o.user)=="object"&&o.user!==null?"enabled":"disabled"}return r.status===404?"disabled":"unreachable"}catch{return"unreachable"}finally{clearTimeout(s)}}function EG(e){let t;try{t=new URL(e)}catch{return!1}const n=t.hostname,s=/^127(?:\.\d{1,3}){3}$/.test(n),r=n==="localhost"||n.endsWith(".localhost")||s||n==="::1"||n==="[::1]";return t.protocol==="https:"||t.protocol==="http:"&&r}function _x(e){try{return new URL(e).origin}catch{return e.replace(/\/+$/,"")}}const So=e=>typeof e=="object"&&e!==null,Gw=e=>{if(!(!So(e)||!So(e.user)||typeof e.user.username!="string"))return{user:{username:e.user.username}}};function Wc(e){const t=e.fetch??kC,n=_x(e.origin),s=e.credentials.mode==="bearer"?e.credentials.token:void 0,r={redirect:"manual",...e.credentials.mode==="cookie"?{credentials:"same-origin"}:{}},i=async(o,l,c)=>{let u;try{u=await t(`${n}${o}`,{...r,method:l,headers:{...s===void 0?{}:{authorization:`Bearer ${s}`},...c===void 0?{}:{"content-type":"application/json"}},...c===void 0?{}:{body:JSON.stringify(c)}})}catch{return ks("network")}if(u.status===0)return ks("network");const d=await u.json().catch(()=>{});if(u.status>=200&&u.status<300)return Mr(d);const h=So(d)&&typeof d.error=="string"?d.error:u.status===401?"unauthenticated":"unknown";return ks(h,u.status)};return{origin:n,login:async(o,l)=>{const c=await i("/api/login","POST",{username:o,password:l});if(!c.ok)return c;const u=Gw(c.value);if(u===void 0||!So(c.value)||typeof c.value.expiresAt!="number")return ks("invalid_response");const d=c.value.token;return Mr({...u,expiresAt:c.value.expiresAt,...typeof d=="string"?{token:d}:{}})},me:async()=>{const o=await i("/api/me","GET");if(!o.ok)return o;const l=Gw(o.value);return l===void 0?ks("invalid_response"):Mr(l)},logout:async()=>{const o=await i("/api/logout","POST");return o.ok?Mr(void 0):o},revokeAllSessions:async()=>{const o=await i("/api/sessions/revoke-all","POST");return o.ok?Mr(void 0):o},createJoinToken:async()=>{const o=await i("/api/join-tokens","POST");if(!o.ok)return o;const l=o.value;return!So(l)||typeof l.token!="string"||typeof l.expiresAt!="number"||typeof l.command!="string"?ks("invalid_response"):Mr({token:l.token,expiresAt:l.expiresAt,command:l.command})},listHosts:async()=>{const o=await i("/api/hosts","GET");if(!o.ok)return o;if(!Array.isArray(o.value))return ks("invalid_response");const l=[];for(const c of o.value){if(!So(c)||typeof c.hostId!="string"||typeof c.name!="string"||typeof c.noisePublicKey!="string"||typeof c.online!="boolean"||typeof c.lastSeenAt!="number"||c.pairing!=="available"&&c.pairing!=="offline"&&c.pairing!=="host_too_old"&&c.pairing!=="key_mismatch")return ks("invalid_response");l.push({hostId:c.hostId,name:c.name,noisePublicKey:c.noisePublicKey,online:c.online,lastSeenAt:c.lastSeenAt,pairing:c.pairing})}return Mr(l)},requestPairing:async o=>{const l=await i(`/api/hosts/${encodeURIComponent(o)}/pairing`,"POST");if(!l.ok)return l;const c=l.value;return!So(c)||typeof c.url!="string"||typeof c.hostKey!="string"||typeof c.secret!="string"||typeof c.expiresAt!="number"?ks("invalid_response"):Mr({url:c.url,hostKey:c.hostKey,secret:c.secret,expiresAt:c.expiresAt})}}}function TG(e){return yC(`https://server.invalid/#pair=${e.hostKey}.${e.secret}&url=${encodeURIComponent(e.url)}`)}function NG(e,t,n){const s=_x(e);return t.map(r=>{const i=n.filter(c=>c.account!==void 0&&_x(c.account.serverOrigin)===s&&c.account.hostId===r.hostId),o=i.find(c=>c.hostKey===r.noisePublicKey);if(o!==void 0)return{host:r,status:"paired",stored:o,linkable:!1};if(i.length>0)return{host:r,status:"key_changed",stored:i[0],linkable:!1};const l=n.find(c=>c.hostKey===r.noisePublicKey);return l!==void 0?{host:r,status:"paired",stored:l,linkable:l.account===void 0}:{host:r,status:"unpaired",linkable:!1}})}function AG(e){return new Promise((t,n)=>{let s;s=C0({url:e.url,hostKey:e.hostKey,device:e.device,pairing:{secret:e.secret,name:e.name},onPaired:()=>{t(),s==null||s.close()}}).open({message:()=>{},closed:i=>n(new Error(`pairing connection closed (${i})`))})})}async function MG(e,t,n,s=AG){const r=await e.requestPairing(t);if(!r.ok)return r;const i=TG(r.value);if(i===void 0)return ks("invalid_offer");const o=new URLSearchParams(i),l=Eb(o.get("pair")),c=o.get("url");if(l===void 0||c===null)return ks("invalid_offer");const u=Cb();try{await s({url:c,hostKey:Ko(l.hostKey),device:u,secret:l.secret,name:n})}catch{return ks("pair_rejected")}return Mr({url:c,hostKey:l.hostKey,privateKey:$b(u.privateKey),account:{serverOrigin:e.origin,hostId:t}})}const zG="ws://127.0.0.1:7420",Xo="pinomad.device";function Tb(e){if(e!==null)try{return gC(JSON.parse(e))}catch{return}}function RG(e,t,n,s){const r=new URLSearchParams(e.replace(/^#/,"")),i=r.get("token");if(i!==null&&i!=="")return{kind:"token",url:r.get("url")??zG,token:i};const o=r.get("pair");if(o!==null){const c=Eb(o);return c===void 0?void 0:{kind:"pair",url:r.get("url")??`${t.protocol==="https:"?"wss":"ws"}://${t.host}/`,hostKey:c.hostKey,secret:c.secret}}if(e.replace(/^#/,"")!=="")return;const l=n.find(c=>c.hostKey===s)??n[0];return l===void 0?void 0:{kind:"device",...l}}function IG(e,t){return new URL(e).host===t.host}function _G(e){const t=/iPhone/.test(e)?"iPhone":/iPad/.test(e)?"iPad":/Android/.test(e)?"Android":/Windows/.test(e)?"Windows":/Mac/.test(e)?"Mac":/Linux/.test(e)?"Linux":void 0,n=/Edg(?:e|A|iOS)?\//.test(e)?"Edge":/Firefox\//.test(e)?"Firefox":/Chrome\//.test(e)||/HeadlessChrome\//.test(e)?"Chrome":/Safari\//.test(e)?"Safari":void 0,s=[t,n].filter(r=>r!==void 0).join(" ");return s===""?"Browser":s}async function Nb(){var e,t;try{const n=await((t=(e=window.pinomadDesktop)==null?void 0:e.deviceName)==null?void 0:t.call(e));if(typeof n=="string"&&n!=="")return n}catch{}return _G(navigator.userAgent)}const td="pinomad.activeHost",bC="pinomad.hosts",LG=()=>{const e=localStorage.getItem(bC);if(e===null)return[];let t;try{t=JSON.parse(e)}catch{return[]}return Array.isArray(t)?t.flatMap(n=>{const s=gC(n);return s===void 0?[]:[s]}):[]},wh=e=>{localStorage.setItem(bC,JSON.stringify(e))};function Uf(){const e=LG(),t=Tb(localStorage.getItem(Xo));if(t===void 0)return e;if(e.some(n=>n.hostKey===t.hostKey))return localStorage.removeItem(Xo),e;try{wh([...e,t]),localStorage.removeItem(Xo)}catch{}return[...e,t]}const jh={list:()=>Promise.resolve(Uf()),save:e=>(wh([...Uf().filter(t=>t.hostKey!==e.hostKey),e]),Promise.resolve()),remove:e=>{wh(Uf().filter(n=>n.hostKey!==e));const t=Tb(localStorage.getItem(Xo));return t!==void 0&&t.hostKey===e&&localStorage.removeItem(Xo),Promise.resolve()},setName:(e,t)=>{const n=Uf();return n.some(s=>s.hostKey===e)&&wh(n.map(s=>s.hostKey===e?{...s,name:t}:s)),Promise.resolve()}};function OG(e){let t;const n=async()=>{const s=Tb(localStorage.getItem(Xo));if(s!==void 0)try{(await e.hosts.list()).some(i=>i.hostKey===s.hostKey)||await e.hosts.save(s),localStorage.removeItem(Xo);return}catch(r){return console.error("Could not migrate the stored device into the desktop host list",r),s}};return{list:async()=>{const s=await(t??(t=n())),r=await e.hosts.list();return s===void 0||r.some(i=>i.hostKey===s.hostKey)?r:[...r,s]},save:s=>e.hosts.save(s),remove:s=>e.hosts.remove(s),setName:(s,r)=>e.hosts.setName(s,r)}}function DG(){const e=window.pinomadDesktop;return e===void 0?jh:OG(e)}const BG={store:jh,hosts:[],activeHostKey:null,paired:e=>jh.save(e),setName:(e,t)=>jh.setName(e,t)},vC=x.createContext(BG),kc=()=>x.useContext(vC);function qG(e,t){const{hosts:n,setName:s}=kc(),r=t==null?void 0:t.hostName;x.useEffect(()=>{if(e===void 0||r===void 0)return;const i=n.find(o=>o.hostKey===e);i===void 0||i.name===r||s(e,r).catch(o=>console.error("Could not store the host name",o))},[e,r,n,s])}function bc(e){localStorage.setItem(td,e),history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}function wC(e,t){localStorage.getItem(td)===t&&localStorage.removeItem(td),history.replaceState(null,"",window.location.pathname+window.location.search),e.remove(t).finally(()=>window.location.reload())}const nr=e=>({ok:!1,error:{code:e}});function HG(e){const t=new Set;let n={status:"checking"},s,r=e.bridge===void 0?"cookie":"bearer",i;const o=new Set,l=h=>{n=h;for(const f of t)f()},c=()=>{s=void 0,l({status:"signed-out",mode:r,...i===void 0?{}:{serverOrigin:i}})},u=async(h,f)=>{var y,m;const p=await h.listHosts();if(s!==h)return{ok:!1,error:{code:"stale"}};if(!p.ok){if(Pf(p.error))return r==="bearer"&&((m=(y=e.bridge)==null?void 0:y.account)==null||m.clear().catch(()=>{})),c(),p;const k=n.status==="signed-in"?n.hosts:[];return l({status:"signed-in",mode:r,user:f,serverOrigin:h.origin,hosts:k,hostsError:p.error,rejectedHostKeys:[...o]}),p}const g=await e.hosts.list().catch(()=>[]);if(s!==h)return{ok:!1,error:{code:"stale"}};const b=NG(h.origin,p.value,g);for(const k of b)if(k.linkable&&k.stored!==void 0){const w=k.stored;e.hosts.save({...w,account:{serverOrigin:h.origin,hostId:k.host.hostId}}).catch(()=>{})}return l({status:"signed-in",mode:r,user:f,serverOrigin:h.origin,hosts:b,rejectedHostKeys:[...o]}),{ok:!0,value:b}};return(async()=>{var g,b;const h=e.bridge;if(h!==void 0){const y=await((g=h.account)==null?void 0:g.get().catch(()=>{}));if(y===void 0){c();return}i=y.serverOrigin;const m=Wc({origin:y.serverOrigin,credentials:{mode:"bearer",token:y.token},fetch:e.fetch}),k=await m.me();if(!k.ok){Pf(k.error)&&((b=h.account)==null||b.clear().catch(()=>{})),c();return}s=m,await u(m,k.value.user.username);return}if(await $G(e.origin,e.fetch)!=="enabled"){l({status:"unavailable"});return}const f=Wc({origin:e.origin,credentials:{mode:"cookie"},fetch:e.fetch}),p=await f.me();if(!p.ok){i=e.origin,c();return}s=f,i=e.origin,await u(f,p.value.user.username)})(),{get state(){return n},subscribe:h=>(t.add(h),()=>{t.delete(h)}),login:async({username:h,password:f,serverOrigin:p})=>{var y,m;let g;if(r==="cookie")g=Wc({origin:e.origin,credentials:{mode:"cookie"},fetch:e.fetch});else{const k=p??i;if(k===void 0)return nr("origin_required");if(!EG(k))return nr("insecure_origin");g=Wc({origin:k,credentials:{mode:"bearer"},fetch:e.fetch})}const b=await g.login(h,f);if(!b.ok)return b;if(r==="bearer"){if(b.value.token===void 0)return nr("invalid_response");g=Wc({origin:g.origin,credentials:{mode:"bearer",token:b.value.token},fetch:e.fetch}),i=g.origin,(m=(y=e.bridge)==null?void 0:y.account)==null||m.save({serverOrigin:g.origin,token:b.value.token}).catch(k=>console.error("Could not persist the account session",k))}return s=g,await u(g,b.value.user.username),{ok:!0,value:void 0}},logout:async()=>{var f,p;if(s===void 0)return nr("unauthenticated");const h=await s.logout();return r==="bearer"&&((p=(f=e.bridge)==null?void 0:f.account)==null||p.clear().catch(()=>{})),c(),h.ok?{ok:!0,value:void 0}:h},revokeAll:async()=>{var f,p;if(s===void 0)return nr("unauthenticated");const h=await s.revokeAllSessions();return r==="bearer"&&((p=(f=e.bridge)==null?void 0:f.account)==null||p.clear().catch(()=>{})),c(),h.ok?{ok:!0,value:void 0}:h},refreshHosts:async()=>s===void 0||n.status!=="signed-in"?nr("unauthenticated"):u(s,n.user),createJoinToken:async()=>{if(s===void 0)return nr("unauthenticated");const h=await s.createJoinToken();return!h.ok&&Pf(h.error)&&c(),h},pairHost:async h=>{var m;if(s===void 0)return nr("unauthenticated");const f=e.name??(()=>"This device"),p=await MG(s,h,await f(),e.connect);if(!p.ok)return Pf(p.error)&&c(),p;const g=n.status==="signed-in"?(m=n.hosts.find(k=>k.host.hostId===h))==null?void 0:m.host.name:void 0,b=g===void 0||g===""?p.value:{...p.value,name:g};o.delete(b.hostKey);try{await e.paired(b)}catch{return n.status==="signed-in"&&l({...n,unsavedHost:b}),{ok:!1,error:{code:"pairing_not_saved"}}}const y=await e.hosts.list().catch(()=>[]);for(const k of y)k.account!==void 0&&_x(k.account.serverOrigin)===s.origin&&k.account.hostId===h&&k.hostKey!==b.hostKey&&e.hosts.remove(k.hostKey).catch(()=>{});return n.status==="signed-in"&&s!==void 0&&await u(s,n.user),{ok:!0,value:b}},retryUnsavedHost:async()=>{const h=n.status==="signed-in"?n.unsavedHost:void 0;if(h===void 0)return nr("nothing_pending");try{await e.paired(h)}catch{return nr("pairing_not_saved")}return n.status==="signed-in"&&l({...n,unsavedHost:void 0}),{ok:!0,value:void 0}},hostRejected:h=>{o.add(h),n.status==="signed-in"&&l({...n,rejectedHostKeys:[...o]})}}}function PG(){const{store:e,paired:t}=kc(),[n]=x.useState(()=>HG({origin:window.location.origin,bridge:window.pinomadDesktop,hosts:e,paired:t,name:Nb}));return x.useSyncExternalStore(n.subscribe,()=>n.state),n}const mo=()=>Promise.reject(new Error("no AccountProvider")),UG={state:{status:"unavailable"},subscribe:()=>()=>{},login:mo,logout:mo,revokeAll:mo,refreshHosts:mo,createJoinToken:mo,pairHost:mo,retryUnsavedHost:mo,hostRejected:()=>{}},jC=x.createContext(UG);function FG({children:e}){const t=PG();return a.jsx(jC.Provider,{value:t,children:e})}function _d(){const e=x.useContext(jC);return x.useSyncExternalStore(e.subscribe,()=>e.state),e}function E0(){const[e,t]=x.useState(""),[n,s]=x.useState(),r=()=>{const i=yC(e);if(i===void 0){s(/[#?&]token=/.test(e)?"Token links can't pair a device — paste a pairing link instead (pinomad pair, or Settings → Devices → Pair a device).":"That isn't a pairing link — paste one like http://<host>/#pair=… or pinomad://pair#pair=…");return}window.location.hash=i,window.location.reload()};return a.jsxs(a.Fragment,{children:[a.jsxs($e,{gap:2,vAlign:"end",style:{width:"100%"},children:[a.jsx("div",{className:"min-w-0 flex-1",children:a.jsx(ns,{label:"Pairing link",isLabelHidden:!0,placeholder:"http://…/#pair=… or pinomad://pair#…",value:e,onChange:i=>{s(void 0),t(i)},onEnter:r,width:"100%"})}),a.jsx(ne,{label:"Connect",variant:"primary",isDisabled:e.trim()==="",onClick:r})]}),n===void 0?null:a.jsx(wt,{status:"error",title:"Not a pairing link",description:n})]})}function vc(e){const[t,n]=x.useState(()=>Date.now());return x.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}function Ld(e){switch(e.code){case"invalid_credentials":return"Wrong username or password.";case"rate_limited":return"Too many attempts. Wait a few minutes and try again.";case"network":return"Can't reach the server. Check the address and your connection.";case"origin_required":return"Enter the server address.";case"insecure_origin":return"The server address must start with https://.";case"unauthenticated":return"You were signed out. Sign in again.";case"accounts_disabled":return"This server doesn't have accounts turned on.";case"host_offline":return"The host is offline.";case"host_too_old":return"The host needs an update (run pinomad upgrade on it).";case"key_mismatch":return"The host's key doesn't match its account record. Run pinomad join on it again.";case"disabled":return"The host doesn't accept account devices. Turn it on in Devices, or pair with a QR code.";case"not_joined":case"rebinding":return"The host is moving between servers. Try again after it restarts.";case"host_timeout":return"The host didn't answer in time. Try again.";case"pair_rejected":return"The host refused this device. If you revoked it before, pair it with a QR code instead.";case"pairing_not_saved":return"Paired, but this device couldn't save the pairing.";default:return`Something went wrong (${e.code}).`}}function SC(){const e=_d(),{state:t}=e,[n,s]=x.useState();switch(t.status){case"unavailable":return null;case"checking":return a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(un,{size:"sm"}),a.jsx(re,{type:"supporting",children:"Checking for an account…"})]});case"signed-out":return a.jsxs(fe,{gap:3,style:{width:"100%"},children:[n===void 0?null:a.jsx(wt,{status:"warning",title:"Sign-out not confirmed",description:n}),a.jsx(GG,{account:e,state:t})]});case"signed-in":return a.jsx(VG,{account:e,state:t,onSignOutWarning:s})}}function GG({account:e,state:t}){const n=t.mode==="bearer",[s,r]=x.useState(t.serverOrigin??""),[i,o]=x.useState(""),[l,c]=x.useState(""),[u,d]=x.useState(!1),[h,f]=x.useState(),p=i.trim()!==""&&l!==""&&(!n||s.trim()!==""),g=()=>{!p||u||(d(!0),f(void 0),e.login({username:i.trim(),password:l,...n?{serverOrigin:s.trim()}:{}}).then(b=>{d(!1),b.ok||f(b.error)}))};return a.jsxs(fe,{gap:3,style:{width:"100%"},children:[a.jsxs(fe,{gap:1,children:[a.jsx(wr,{level:3,children:"Sign in"}),a.jsx(re,{type:"supporting",children:"See the hosts on your account and connect without a QR code."})]}),n?a.jsx(ns,{label:"Server",placeholder:"https://nomad.example.com",value:s,onChange:r,onEnter:g,width:"100%"}):null,a.jsx(ns,{label:"Username",value:i,onChange:o,onEnter:g,width:"100%"}),a.jsx(ns,{label:"Password",type:"password",value:l,onChange:c,onEnter:g,width:"100%"}),h===void 0?null:a.jsx(wt,{status:"error",title:"Couldn't sign in",description:Ld(h)}),a.jsx(ne,{label:"Sign in",variant:"primary",isLoading:u,isDisabled:!p,onClick:g})]})}function VG({account:e,state:t,onSignOutWarning:n}){const[s,r]=x.useState(),i=new URL(t.serverOrigin).host,o=l=>{r(void 0),e.retryUnsavedHost().then(c=>{c.ok?bc(l.hostKey):r(c.error)})};return a.jsxs(fe,{gap:4,style:{width:"100%"},children:[a.jsxs(fe,{gap:1,children:[a.jsx(wr,{level:3,children:t.user}),a.jsxs(re,{type:"supporting",children:["Signed in to ",i]})]}),t.unsavedHost===void 0?null:a.jsx(wt,{status:"warning",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:a.jsx(ne,{label:"Retry",variant:"ghost",onClick:()=>o(t.unsavedHost)})}),a.jsx(WG,{account:e,state:t,onError:r}),s===void 0?null:a.jsx(wt,{status:"error",title:"Couldn't pair",description:Ld(s)}),a.jsx(ZG,{account:e}),a.jsx(QG,{account:e,onWarning:n})]})}function WG({account:e,state:t,onError:n}){const s=vc(3e4),{activeHostKey:r}=kc(),[i,o]=x.useState(),l=c=>{o(c),n(void 0),e.pairHost(c).then(u=>{o(void 0),u.ok?bc(u.value.hostKey):n(u.error)})};return a.jsxs(fe,{gap:2,children:[a.jsxs($e,{gap:2,vAlign:"center",hAlign:"between",children:[a.jsx(re,{weight:"semibold",children:"Hosts"}),a.jsx(ne,{label:"Refresh",variant:"ghost",size:"sm",onClick:()=>void e.refreshHosts()})]}),t.hostsError===void 0?null:a.jsx(wt,{status:"warning",title:"Couldn't refresh hosts",description:Ld(t.hostsError)}),t.hosts.length===0?a.jsx(re,{type:"supporting",children:"No hosts yet. Add one below."}):a.jsx(Mt,{density:"compact",children:t.hosts.map(c=>{var u;return a.jsx(XG,{match:c,now:s,isCurrent:c.status==="paired"&&((u=c.stored)==null?void 0:u.hostKey)===r,isRevoked:c.stored!==void 0&&t.rejectedHostKeys.includes(c.stored.hostKey),isPairing:i===c.host.hostId,isBusy:i!==void 0,onPair:()=>l(c.host.hostId)},c.host.hostId)})})]})}const KG={offline:"Offline",host_too_old:"Needs pinomad upgrade",key_mismatch:"Run pinomad join again"};function XG({match:e,now:t,isCurrent:n,isRevoked:s,isPairing:r,isBusy:i,onPair:o}){const{host:l,status:c,stored:u}=e,d=l.online?"Online":`Last seen ${cb(l.lastSeenAt,t)}`,h=l.pairing==="available",f=b=>a.jsx(ne,{label:b,variant:"secondary",size:"sm",isLoading:r,isDisabled:!h||i,onClick:o});let p=d,g;return s?(p="This device was refused by the host",g=f("Pair again")):c==="key_changed"?(p="The host's identity changed. Pair again only if you reinstalled it.",g=a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(Nn,{label:"Key changed",color:"orange",size:"sm"}),f("Pair again")]})):c==="paired"?g=n?a.jsx(Nn,{label:"Connected",size:"sm"}):a.jsx(ne,{label:"Connect",variant:"secondary",size:"sm",onClick:()=>bc(u.hostKey)}):(h||(p=`${d} · ${KG[l.pairing]}`),g=f("Pair")),a.jsx(rt,{label:l.name,description:p,startContent:a.jsx(br,{variant:l.online?"success":"neutral",label:l.online?"Online":"Offline"}),endContent:g})}function ZG({account:e}){const[t,n]=x.useState(),[s,r]=x.useState(),[i,o]=x.useState(!1),l=()=>{o(!0),r(void 0),e.createJoinToken().then(c=>{o(!1),c.ok?n(c.value):r(c.error)})};return a.jsxs(fe,{gap:2,children:[t===void 0?a.jsx(ne,{label:"Add a host",variant:"secondary",isLoading:i,onClick:l}):a.jsx(YG,{token:t,onRenew:l,onDone:()=>{n(void 0),e.refreshHosts()}}),s===void 0?null:a.jsx(wt,{status:"error",title:"Couldn't create a join command",description:Ld(s)})]})}function YG({token:e,onRenew:t,onDone:n}){const s=vc(1e3),r=Math.max(0,Math.ceil((e.expiresAt-s)/1e3));return a.jsxs(fe,{gap:2,children:[a.jsx(re,{weight:"semibold",children:"Add a host"}),a.jsx(re,{type:"supporting",children:"Run this on the machine you want to add. It installs PiNomad and joins it to your account."}),a.jsx(Ry,{code:e.command,hasCopyButton:!0,isWrapped:!0}),a.jsxs($e,{gap:2,vAlign:"center",hAlign:"between",children:[r===0?a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(re,{type:"supporting",children:"Expired"}),a.jsx(ne,{label:"New command",variant:"secondary",size:"sm",onClick:t})]}):a.jsxs(re,{type:"supporting",children:["Works once · expires in ",Math.floor(r/60),":",String(r%60).padStart(2,"0")]}),a.jsx(ne,{label:"Done",variant:"ghost",size:"sm",onClick:n})]})]})}function QG({account:e,onWarning:t}){const[n,s]=x.useState(!1);return x.useEffect(()=>{if(!n)return;const r=setTimeout(()=>s(!1),5e3);return()=>clearTimeout(r)},[n]),a.jsxs(fe,{gap:1,children:[a.jsxs($e,{gap:2,children:[a.jsx(ne,{label:"Sign out",variant:"ghost",onClick:()=>{t(void 0),e.logout().then(r=>{r.ok||t("Signed out on this device, but the server didn't confirm. The session ends on its own within 30 days.")})}}),a.jsx(ne,{label:n?"Sign out everywhere?":"Sign out everywhere",variant:n?"destructive":"ghost",onClick:()=>{if(!n){s(!0);return}t(void 0),e.revokeAll().then(r=>{r.ok||t("Other devices may still be signed in. Sign in and try Sign out everywhere again.")})}})]}),a.jsx(re,{type:"supporting",children:"Signing out doesn't unpair this device from its hosts. Revoke it in Devices."})]})}function CC({onClose:e}){return a.jsx(vr,{isOpen:!0,onOpenChange:t=>t?void 0:e(),width:480,children:a.jsx(Ks,{header:a.jsx(jr,{title:"Account",onOpenChange:()=>e()}),content:a.jsx(Xs,{children:a.jsx("div",{style:{padding:"var(--spacing-2)"},children:a.jsx(SC,{})})})})})}function $C(e,t){var l;const{store:n,hosts:s,activeHostKey:r}=kc(),i=mC(s),o=(l=s.find(c=>c.hostKey===r)??s[0])==null?void 0:l.hostKey;return{store:n,hosts:s,label:c=>i.get(c.hostKey)??c.url,isCurrent:c=>c.hostKey===o,isConnected:c=>c.hostKey===t&&e==="connected"}}function EC({connected:e}){return a.jsx("span",{"aria-hidden":"true",className:"inline-flex",children:e?a.jsx(br,{variant:"success",label:"Connected",isPulsing:!0}):a.jsx(br,{variant:"neutral",label:"Not connected"})})}const TC=e=>e?"connected":"not connected";function JG({connection:e,connectedHostKey:t}){const n=$C(e,t);return a.jsx(uc,{hasChevron:!1,placement:"above",alignment:"end",menuWidth:240,button:{icon:a.jsx(wx,{"aria-hidden":"true"}),isIconOnly:!0,label:"Hosts",tooltip:"Hosts",size:"sm",variant:"ghost"},children:n.hosts.map(s=>{const r=n.isConnected(s);return a.jsx(Nu,{icon:a.jsx(EC,{connected:r}),label:a.jsxs(a.Fragment,{children:[n.label(s),a.jsx(si,{children:`(${TC(r)})`})]}),endContent:n.isCurrent(s)?a.jsx(vo,{"aria-hidden":"true",className:"size-4"}):void 0,onClick:n.isCurrent(s)?void 0:()=>bc(s.hostKey)},s.hostKey)})})}function NC({connection:e,connectedHostKey:t}){const n=$C(e,t),[s,r]=x.useState();return a.jsxs(fe,{gap:5,children:[n.hosts.length===0?a.jsx(re,{type:"supporting",children:"No paired hosts."}):a.jsx(Mt,{density:"compact",children:n.hosts.map(i=>{const o=n.label(i),l=n.isConnected(i);return a.jsx(rt,{startContent:a.jsx(EC,{connected:l}),label:o,description:TC(l).replace(/^./,c=>c.toUpperCase()),endContent:a.jsxs($e,{gap:2,vAlign:"center",children:[n.isCurrent(i)?a.jsx(Nn,{label:"Current",size:"sm"}):a.jsx(ne,{label:"Switch","aria-label":`Switch to ${o}`,variant:"ghost",size:"sm",onClick:()=>bc(i.hostKey)}),a.jsx(ne,{label:"Forget…","aria-label":`Forget ${o}…`,variant:"ghost",size:"sm",onClick:()=>r(i)})]})},i.hostKey)})}),s===void 0?null:a.jsxs(fe,{gap:2,role:"group","aria-label":`Forget ${n.label(s)}?`,children:[a.jsx(re,{weight:"semibold",children:`Forget ${n.label(s)}?`}),a.jsx(re,{type:"supporting",children:"This device needs a new pairing link to connect to it again. The host still lists this device — revoke it under Settings → Devices on that host to remove it completely."}),a.jsxs($e,{gap:2,hAlign:"end",children:[a.jsx(ne,{label:"Cancel",variant:"secondary",size:"sm",onClick:()=>r(void 0)}),a.jsx(ne,{label:"Forget this host",variant:"destructive",size:"sm",onClick:()=>wC(n.store,s.hostKey)})]})]}),a.jsxs(fe,{gap:2,children:[a.jsx(wr,{level:3,children:"Pair a host"}),a.jsx(re,{type:"supporting",children:"Paste a pairing link from pinomad pair or Settings → Devices → Pair a device."}),a.jsx(E0,{})]})]})}function AC(){const e=_d(),[t,n]=x.useState(!1);return a.jsxs(fe,{gap:3,className:"mt-4 w-full max-w-md",children:[a.jsx(NC,{connection:void 0,connectedHostKey:void 0}),e.state.status==="unavailable"?null:a.jsx("div",{children:a.jsx(ne,{label:"Account…",variant:"ghost",size:"sm",onClick:()=>n(!0)})}),t?a.jsx(CC,{onClose:()=>n(!1)}):null]})}const MC="pinomad.projectSidebar.expanded",eV=()=>{const e=window.localStorage.getItem(MC);if(e===null)return{};try{const t=JSON.parse(e);return Object.fromEntries(Object.entries(t).filter(n=>typeof n[0]=="string"&&typeof n[1]=="boolean"))}catch{return{}}},Vw=e=>{window.localStorage.setItem(MC,JSON.stringify(e))},Ab=e=>e.flatMap(t=>[t,...Ab(t.children)]);function Ww(e){const t=`pinomad.sidebarSection.${e}.expanded`,[n,s]=x.useState(()=>typeof window>"u"||window.localStorage.getItem(t)!=="false"),r=x.useId();return{expanded:n,contentId:r,toggle:()=>{const o=!n;window.localStorage.setItem(t,String(o)),s(o)}}}function tV({onCollapse:e,safeLeft:t}){return a.jsx("div",{className:"pinomad-drag flex h-6 items-center px-2",style:t===void 0?void 0:{paddingLeft:t},children:a.jsx(En,{icon:a.jsx(h0,{className:"size-4"}),label:"Collapse sidebar",size:"sm",variant:"ghost",onClick:e})})}function Kw({view:e,hostKey:t,onOpenSettings:n,onOpenAccount:s,onSelect:r}){const i=gb();return a.jsxs("div",{className:"flex items-center gap-1",children:[a.jsx("div",{className:"min-w-0 flex-1",children:a.jsx(nV,{onOpenAccount:()=>{r==null||r(),s()}})}),a.jsx(JG,{connection:e.connection,connectedHostKey:t}),a.jsxs("span",{className:"relative inline-flex",children:[a.jsx(En,{icon:a.jsx(SU,{"aria-hidden":"true"}),label:"Settings",tooltip:"Settings",size:"sm",variant:"ghost",onClick:()=>{r==null||r(),n()}}),(i==null?void 0:i.status.state)==="ready"?a.jsx("span",{"aria-label":"Update ready",className:"pointer-events-none absolute right-1 top-1 size-2 rounded-full bg-primary",role:"img"}):null]})]})}function nV({onOpenAccount:e}){const t=_d(),n=t.state.status,[s,r]=x.useState();if(x.useEffect(()=>{if(n!=="unavailable")return;let i=!0;return Nb().then(o=>{i&&r(o)}),()=>{i=!1}},[n]),t.state.status==="signed-in"){const{user:i}=t.state;return a.jsx(ne,{label:i,icon:a.jsx(k6,{name:i,size:"xsm",tooltip:!1}),variant:"ghost",size:"sm",onClick:e})}return n==="signed-out"?a.jsx(ne,{label:"Sign in",icon:a.jsx(TU,{"aria-hidden":"true"}),variant:"ghost",size:"sm",onClick:e}):a.jsx("span",{className:"block truncate px-2 text-sm text-muted",children:s})}function Xw({title:e,expanded:t,contentId:n,onToggle:s,actions:r,pinnedActions:i=!1}){return a.jsxs("div",{className:"pigui-sidenav-section-header",children:[a.jsxs("button",{type:"button",className:"pigui-sidenav-section-toggle","aria-label":t?`Collapse ${e}`:`Expand ${e}`,"aria-expanded":t,"aria-controls":n,onClick:s,children:[a.jsx("span",{className:"pigui-sidenav-section-toggle__title",children:e}),a.jsx($r,{"aria-hidden":"true",className:"pigui-sidenav-section-toggle__chevron","data-expanded":t?"true":"false"})]}),a.jsx($e,{className:i?void 0:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:r})]})}function T0(){return a.jsx("span",{className:"pigui-session-glyph","data-testid":"session-glyph"})}const zC={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function sV({status:e}){const t=e==="needs-answer"?"warning":e==="failed"?"error":"success",n=zC[e];return a.jsx("span",{className:"pigui-session-glyph","aria-hidden":"true",children:a.jsx(br,{variant:t,label:n,tooltip:n,isPulsing:e!=="failed"})})}function rV({expanded:e}){const t=e?hU:Yu;return a.jsxs("span",{"aria-hidden":"true",className:"pigui-project-expansion-indicator","data-expanded":e?"true":"false",children:[a.jsx(t,{className:"pigui-project-expansion-indicator__state"}),a.jsx($r,{className:"pigui-project-expansion-indicator__chevron"})]})}function Zw({node:e,shown:t,disabled:n,remote:s,onSelect:r}){const{summary:i}=e,o=XH(e),l=ub(e).reduce((f,p)=>f+p.tasks.length,0),[c,u]=x.useState(!1),d=t!==void 0&&Ab([e]).some(f=>f.summary.id===t),h=a.jsx(ji,{icon:o===void 0?a.jsx(T0,{}):a.jsx(sV,{status:o}),label:i.title??"New conversation",isSelected:d,isDisabled:n,endContent:a.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer pigui-sidenav-actions-spacer--single",children:l===0?null:a.jsxs("span",{className:"pigui-sidenav-subagent-count",children:[a.jsx(Rd,{className:"size-3"}),l]})}),onClick:()=>{s.controller.switchConversation(i.id),r==null||r()}});return a.jsxs("div",{className:"pigui-sidenav-row-with-actions pigui-sidenav-session-row",...o===void 0?{}:{"data-status":o},children:[h,o===void 0?null:a.jsx(si,{children:zC[o]}),a.jsx($e,{className:"pigui-sidenav-row-actions pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:a.jsx(uc,{hasChevron:!1,button:{icon:a.jsx(Id,{"aria-hidden":"true"}),isIconOnly:!0,label:"Conversation actions",size:"sm",variant:"ghost",isDisabled:n},items:[{label:"Rename",icon:a.jsx(vU,{"aria-hidden":"true",size:16}),onClick:()=>u(!0)},{label:"Archive",icon:a.jsx(LS,{"aria-hidden":"true",size:16}),onClick:()=>void s.controller.archive(i.id,!0)}]})}),c?a.jsx(LU,{summary:i,remote:s,connected:!n,onClose:()=>u(!1)}):null]})}function iV({view:e,remote:t,draftingChat:n,shownId:s,onDraft:r,onSelect:i}){const o=e.connection!=="connected",[l,c]=x.useState(!1),[u,d]=x.useState(),[h,f]=x.useState(eV),p=Ww("chats"),g=Ww("projects"),b=k=>{r(k),i==null||i()},y=x.useMemo(()=>{var k;return s===void 0||(k=e.organized.projects.find(({conversations:w})=>Ab(w).some(v=>v.summary.id===s)))==null?void 0:k.project.path},[s,e.organized.projects]);x.useEffect(()=>{y!==void 0&&f(k=>{if(k[y]!==!1)return k;const w={...k,[y]:!0};return Vw(w),w})},[y]);const m=k=>f(w=>{const v={...w,[k]:!(w[k]??!0)};return Vw(v),v});return a.jsxs(a.Fragment,{children:[a.jsx(lu,{isHeaderHidden:!0,title:"New chat",children:a.jsx(ji,{icon:a.jsx(NU,{className:"size-4"}),label:"New chat",isSelected:n,isDisabled:o,onClick:()=>b({kind:"chat"})})}),a.jsxs(lu,{isHeaderHidden:!0,title:"Chats",children:[a.jsx(Xw,{title:"Chats",expanded:p.expanded,contentId:p.contentId,onToggle:p.toggle,actions:a.jsx(En,{icon:a.jsx(f0,{"aria-hidden":"true"}),label:"New chat without a project",tooltip:"New chat",size:"sm",variant:"ghost",isDisabled:o,onClick:()=>b({kind:"chat"})})}),a.jsx(fe,{id:p.contentId,gap:.5,children:p.expanded?e.organized.chats.length===0?a.jsx(ji,{icon:a.jsx(T0,{}),isDisabled:!0,label:"No chats"}):e.organized.chats.map(k=>a.jsx(Zw,{node:k,shown:s,disabled:o,remote:t,onSelect:i},k.summary.id)):null})]}),a.jsxs(lu,{isHeaderHidden:!0,title:"Projects",children:[a.jsx(Xw,{title:"Projects",expanded:g.expanded,contentId:g.contentId,onToggle:g.toggle,pinnedActions:!0,actions:a.jsx(En,{icon:a.jsx(pw,{"aria-hidden":"true"}),label:"Add project",tooltip:"Add project",size:"sm",variant:"ghost",isDisabled:o,onClick:()=>c(!0)})}),a.jsx(fe,{id:g.contentId,gap:.5,children:g.expanded?e.organized.projects.length===0?a.jsx(ji,{icon:a.jsx(pw,{"aria-hidden":"true"}),label:"Add project",isDisabled:o,onClick:()=>c(!0)}):e.organized.projects.map(({project:k,conversations:w})=>{const v=h[k.path]??!0;return a.jsxs("div",{className:"pigui-sidenav-row-with-actions",children:[a.jsx(ji,{collapsible:{isCollapsed:!v,onCollapsedChange:()=>m(k.path)},icon:a.jsx(rV,{expanded:v}),label:k.name,isDisabled:o,endContent:a.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"}),children:w.length===0?a.jsx(ji,{icon:a.jsx(T0,{}),isDisabled:!0,label:"No conversations"}):w.map(j=>a.jsx(Zw,{node:j,shown:s,disabled:o,remote:t,onSelect:i},j.summary.id))}),a.jsx($e,{className:"pigui-sidenav-row-actions",gap:.5,vAlign:"center",children:a.jsxs($e,{className:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:[a.jsx(En,{icon:a.jsx(f0,{"aria-hidden":"true"}),label:`New conversation in ${k.name}`,size:"sm",variant:"ghost",isDisabled:o,onClick:()=>b({kind:"project",path:k.path})}),a.jsx(uc,{hasChevron:!1,button:{icon:a.jsx(Id,{"aria-hidden":"true"}),isIconOnly:!0,label:`Project actions for ${k.name}`,size:"sm",variant:"ghost",isDisabled:o},items:[{label:"Remove project",icon:a.jsx(EU,{"aria-hidden":"true",size:16}),onClick:()=>d(k)}]})]})})]},k.path)}):null})]}),l?a.jsx(RU,{remote:t,connected:!o,onAdded:k=>{c(!1),b({kind:"project",path:k.path})},onClose:()=>c(!1)}):null,u===void 0?null:a.jsx(_U,{project:u,remote:t,connected:!o,onClose:()=>d(void 0)})]})}const RC={off:!0,minimal:!0,low:!0,medium:!0,high:!0,xhigh:!0,max:!0},N0=Object.keys(RC),oV=e=>typeof e=="string"&&Object.prototype.hasOwnProperty.call(RC,e),aV=64,lV=e=>e<32||e>=127&&e<=159;function cV(e){let t=e;for(;;){const s=[...(t.endsWith(".local")?t.slice(0,-6):t).trim()].filter(r=>!lV(r.codePointAt(0))).join("").slice(0,aV);if(s===t)return s;t=s}}const Yw=32,Qw=1024,uV=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function IC(e){return e.length>Yw||!uV.test(e)?`Name must be lowercase letters, digits and hyphens (max ${Yw})`:void 0}function dV(e){const t=IC(e.name);if(t!==void 0)return t;const n=e.description.trim();if(n==="")return"description is required";if(n.length>Qw)return`description is too long (max ${Qw})`;if(e.model!==void 0){const s=e.model.indexOf("/");if(s<=0||s===e.model.length-1)return"model must be provider/modelId"}if(e.thinkingLevel!==void 0&&!oV(e.thinkingLevel))return`thinkingLevel must be one of ${N0.join(", ")}`}const _C={conversations:0,index:0,devices:0,mcp:0,models:1,auth:1,settings:2,agents:6},Mb=Object.keys(_C);function Jw(e){return Mb.filter(t=>_C[t]<=e)}const gg=e=>`conversation:${e}`,e3=(e,t)=>`doc:${e}:${t}`,t3=4401,fV=4400,mg={major:5},hV={addProject:0,removeProject:0,listFolders:3,listFiles:10,listSkills:13,listCommands:17,createConversation:0,archive:0,renameConversation:4,submit:0,withdrawQueued:14,steerQueued:14,abort:0,compact:0,runCommand:17,setModel:0,setThinkingLevel:0,setAgent:18,fork:0,answer:0,changes:0,createPairing:0,revokeDevice:0,logout:1,updateSettings:2,createAgent:6,updateAgent:6,deleteAgent:6,setPushToken:7,image:15,beginAttachment:19,appendAttachment:19};function Pe(e,t){return e>=hV[t]}const xV={images:5,acceptAccountDevices:8,apnsPush:9,agentConversations:10,liveBranch:11,hostName:12,imageRefs:15,boundSkills:16,attachments:19};function Ft(e,t){return e>=xV[t]}[...Mb];const nd={off:"Off",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"X-High",max:"Max"},yg=(e,t)=>e!==void 0&&t!==void 0&&e.provider===t.provider&&e.modelId===t.modelId,n3=["off","minimal","low","medium","high","xhigh","max"],Lx=(e,t)=>{if(e.includes(t))return t;const n=n3.indexOf(t);return e.filter(s=>n3.indexOf(s)<=n).at(-1)??"off"},as=(e,t)=>t===void 0?void 0:e.find(n=>n.provider===t.provider&&n.modelId===t.modelId);function pV(e,t){var i;const n=as(e,t.model),s=(n==null?void 0:n.thinkingLevels)??["off"],r=(n==null?void 0:n.name)??((i=t.model)==null?void 0:i.modelId)??"No model";return s.length>1?`${r} · ${nd[t.level]}`:r}function gV(e,t){const n=t.trim().toLowerCase();return n===""?e:e.filter(s=>s.name.toLowerCase().includes(n)||`${s.provider}/${s.modelId}`.toLowerCase().includes(n))}function mV(e,t,n){var i;const s=n.model!==void 0&&as(e,n.model)!==void 0?n.model:as(e,t.model)!==void 0?t.model:e[0]===void 0?void 0:{provider:e[0].provider,modelId:e[0].modelId},r=Lx(((i=as(e,s))==null?void 0:i.thinkingLevels)??["off"],n.level);return{model:s,level:r}}const yV=e=>{const t=e.indexOf("/");return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function kV(e,t,n,s,r){var b;const i=t==null?void 0:t.roles.find(y=>y.name===e),o=i===void 0||i.model===void 0?void 0:yV(i.model),l=r.model??o??s.model,c=r.model!==void 0?"override":o!==void 0?"agent":s.model!==void 0?"default":void 0,u=r.level!==void 0?"override":(i==null?void 0:i.thinkingLevel)!==void 0?"agent":"default",d=r.level??(i==null?void 0:i.thinkingLevel)??s.thinkingLevel??"off",h=as(n,l),f=h===void 0?d:Lx(h.thinkingLevels,d),p=(b=t==null?void 0:t.problems.find(y=>y.file===`${e}.md`))==null?void 0:b.reason,g=i===void 0?{kind:"agent-missing",agent:e,...p===void 0?{}:{reason:p}}:l===void 0?{kind:"model-missing",agent:e}:h===void 0?{kind:"model-unavailable",agent:e,model:l,source:c}:void 0;return{...l===void 0?{}:{model:l},level:f,...c===void 0?{}:{modelFrom:c},levelFrom:u,send:{agent:e,...r.model===void 0?{}:{model:r.model},...r.level===void 0?{}:{thinkingLevel:r.level}},...g===void 0?{}:{problem:g}}}function zb({models:e,selected:t,isDisabled:n=!1,agent:s,sourceHint:r,problem:i,onModelChange:o,onLevelChange:l}){const[c,u]=x.useState(""),d=x.useRef(null),h=e.find(y=>yg(y,t.model)),f=(h==null?void 0:h.thinkingLevels)??["off"],p=gV(e,c),g=s===void 0?void 0:s.kind==="pick"?s.value:s.name,b=(s==null?void 0:s.kind)==="pick"&&s.value!==void 0&&!s.roles.some(y=>y.name===s.value)?s.value:void 0;return a.jsx(F6,{alignment:"start",label:"Model and Thinking",placement:"above",width:236,hasAutoFocus:!1,onOpenChange:y=>{y&&requestAnimationFrame(()=>{var m;return(m=d.current)==null?void 0:m.focus()})},content:a.jsxs("div",{className:"flex w-full flex-col gap-1 p-1","data-testid":"model-thinking-popover",onClick:y=>y.stopPropagation(),onMouseDown:y=>y.stopPropagation(),onPointerDown:y=>y.stopPropagation(),children:[s===void 0?null:a.jsxs("div",{"aria-label":"Agent",role:"group",children:[a.jsx("p",{className:"px-2 pt-1 text-xs text-muted",children:s.kind==="pick"?"Agent · sets the system prompt":"Agent · fixed at creation"}),s.kind==="pick"?a.jsxs(Mt,{className:"max-h-48 overflow-y-auto",density:"compact",children:[b===void 0?null:a.jsx(rt,{description:"No longer available",endContent:a.jsx(vo,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}),isDisabled:!0,isSelected:!0,label:b}),a.jsx(rt,{description:"Default system prompt",endContent:s.value===void 0?a.jsx(vo,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:s.value===void 0,label:"No agent",onClick:()=>s.onChange(void 0)}),s.roles.map(y=>a.jsx(rt,{description:y.description,endContent:s.value===y.name?a.jsx(vo,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:s.value===y.name,label:y.name,onClick:()=>s.onChange(y.name)},y.name))]}):a.jsx(Mt,{density:"compact",children:a.jsx(rt,{...s.description===void 0?{}:{description:s.description},endContent:a.jsx(vo,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}),isSelected:!0,label:s.name})})]}),a.jsx(ns,{isLabelHidden:!0,label:"Search models",placeholder:"Search models",ref:d,size:"sm",value:c,width:"100%",onChange:y=>u(y)}),a.jsx(Mt,{"aria-label":"Model",className:"max-h-72 overflow-y-auto",density:"compact",children:p.map(y=>a.jsx(rt,{description:y.provider,endContent:yg(y,t.model)?a.jsx(vo,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:yg(y,t.model),label:y.name,onClick:()=>o({provider:y.provider,modelId:y.modelId})},`${y.provider}/${y.modelId}`))}),f.length>1?a.jsxs("div",{"aria-label":"Thinking",role:"group",children:[a.jsx("p",{className:"px-2 pt-1 text-xs text-muted",children:"Thinking"}),a.jsx(Mt,{density:"compact",children:f.map(y=>a.jsx(rt,{endContent:y===t.level?a.jsx(vo,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,label:nd[y],onClick:()=>l(y)},y))})]}):null]}),children:a.jsx(ne,{className:"min-w-0 max-w-[19rem] flex-nowrap gap-1.5 px-2 text-muted","data-testid":"model-thinking-trigger",isDisabled:n||e.length===0,label:"Model and Thinking",size:"sm",variant:"ghost",...i===void 0?{}:{tooltip:i.title},children:a.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[i===void 0?a.jsxs("span",{className:"truncate",children:[g===void 0?"":`@${g} · `,pV(e,t)]}):a.jsx("span",{className:"truncate text-danger",children:i.label}),r===void 0||i!==void 0?null:a.jsx("span",{className:"shrink-0 truncate text-xs text-muted",children:r}),a.jsx(Te,{icon:"chevronDown",size:"sm",color:"inherit"})]})})})}const xs="",s3=e=>`${e.provider}/${e.modelId}`,r3=e=>{const t=e.indexOf("/");if(!(t<=0||t===e.length-1))return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function bV({view:e,remote:t,connected:n,role:s,onClose:r}){const i=s!==void 0,[o,l]=x.useState((s==null?void 0:s.name)??""),[c,u]=x.useState((s==null?void 0:s.description)??""),[d,h]=x.useState((s==null?void 0:s.model)??xs),[f,p]=x.useState((s==null?void 0:s.thinkingLevel)??xs),[g,b]=x.useState((s==null?void 0:s.prompt)??""),[y,m]=x.useState(!1),[k,w]=x.useState(void 0),v=d===xs?void 0:as(e.models,r3(d)),j=[{value:xs,label:"Don't pin — use the caller's model"},...e.models.map(S=>({value:s3(S),label:`${S.name} (${s3(S)})`})),...d!==xs&&v===void 0?[{value:d,label:`${d} (not available)`}]:[]],C=v===void 0?N0:v.thinkingLevels,$=[{value:xs,label:"Don't pin"},...C.map(S=>({value:S,label:nd[S]})),...f!==xs&&!C.includes(f)?[{value:f,label:`${nd[f]} (not supported by this model)`}]:[]],T=S=>{h(S);const _=S===xs?void 0:as(e.models,r3(S)),M=_===void 0?N0:_.thinkingLevels;f!==xs&&!M.includes(f)&&p(xs)},A=()=>{const S={name:o.trim(),description:c.trim(),...d===xs?{}:{model:d},...f===xs?{}:{thinkingLevel:f},prompt:g.trim()},_=dV(S);if(_!==void 0){w(_);return}m(!0),w(void 0),(i?t.controller.updateAgent(S):t.controller.createAgent(S)).then(()=>r(),M=>{m(!1),w(M instanceof Error?M.message:String(M))})};return a.jsx(vr,{isOpen:!0,onOpenChange:S=>S?void 0:r(),purpose:"form",width:480,"aria-label":i?`Edit ${s.name}`:"New agent",children:a.jsx(Ks,{header:a.jsx(jr,{title:i?`Edit ${s.name}`:"New agent",onOpenChange:()=>r()}),content:a.jsx(Xs,{children:a.jsxs(fe,{gap:4,children:[a.jsx(fe,{gap:1,children:a.jsx(ns,{label:"Name",value:o,onChange:l,isDisabled:y||i,hasAutoFocus:!i,description:i?"The name is the file name and can't be changed.":void 0})}),a.jsx(ns,{label:"Description",value:c,onChange:u,isDisabled:y}),a.jsx(Au,{label:"Model",value:d,options:j,onChange:T,isDisabled:y}),a.jsx(Au,{label:"Thinking level",value:f,options:$,onChange:S=>p(S),isDisabled:y}),a.jsx(Gj,{label:"Prompt",value:g,onChange:b,isDisabled:y,rows:4}),k===void 0?null:a.jsx(re,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:k})]})}),footer:a.jsx(fa,{children:a.jsxs($e,{gap:2,hAlign:"end",children:[a.jsx(ne,{label:"Cancel",variant:"secondary",onClick:r}),a.jsx(ne,{label:"Save",variant:"primary",isDisabled:!n||y,onClick:A})]})})})})}var Co=(e=>(e[e.Border=-1]="Border",e[e.Data=0]="Data",e[e.Function=1]="Function",e[e.Position=2]="Position",e[e.Timing=3]="Timing",e[e.Alignment=4]="Alignment",e))(Co||{});const vV=[0,1],LC=[1,0],OC=[2,3],DC=[3,2],wV={L:vV,M:LC,Q:OC,H:DC},jV=/^\d*$/,SV=/^[A-Z0-9 $%*+./:-]*$/,kg="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",Rb=1,Ib=40,i3=3,CV=3,Ff=40,$V=10,BC=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],qC=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]];class EV{constructor(t,n,s,r){ie(this,"size");ie(this,"mask");ie(this,"modules",[]);ie(this,"types",[]);if(this.version=t,this.ecc=n,t<Rb||t>Ib)throw new RangeError("Version value out of range");if(r<-1||r>7)throw new RangeError("Mask value out of range");this.size=t*4+17;const i=Array.from({length:this.size}).fill(!1);for(let l=0;l<this.size;l++)this.modules.push(i.slice()),this.types.push(i.map(()=>0));this.drawFunctionPatterns();const o=this.addEccAndInterleave(s);if(this.drawCodewords(o),r===-1){let l=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);const u=this.getPenaltyScore();u<l&&(r=c,l=u),this.applyMask(c)}}this.mask=r,this.applyMask(r),this.drawFormatBits(r)}getModule(t,n){return t>=0&&t<this.size&&n>=0&&n<this.size&&this.modules[n][t]}drawFunctionPatterns(){for(let s=0;s<this.size;s++)this.setFunctionModule(6,s,s%2===0,Co.Timing),this.setFunctionModule(s,6,s%2===0,Co.Timing);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const t=this.getAlignmentPatternPositions(),n=t.length;for(let s=0;s<n;s++)for(let r=0;r<n;r++)s===0&&r===0||s===0&&r===n-1||s===n-1&&r===0||this.drawAlignmentPattern(t[s],t[r]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.ecc[1]<<3|t;let s=n;for(let i=0;i<10;i++)s=s<<1^(s>>>9)*1335;const r=(n<<10|s)^21522;for(let i=0;i<=5;i++)this.setFunctionModule(8,i,Ar(r,i));this.setFunctionModule(8,7,Ar(r,6)),this.setFunctionModule(8,8,Ar(r,7)),this.setFunctionModule(7,8,Ar(r,8));for(let i=9;i<15;i++)this.setFunctionModule(14-i,8,Ar(r,i));for(let i=0;i<8;i++)this.setFunctionModule(this.size-1-i,8,Ar(r,i));for(let i=8;i<15;i++)this.setFunctionModule(8,this.size-15+i,Ar(r,i));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let s=0;s<12;s++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;for(let s=0;s<18;s++){const r=Ar(n,s),i=this.size-11+s%3,o=Math.floor(s/3);this.setFunctionModule(i,o,r),this.setFunctionModule(o,i,r)}}drawFinderPattern(t,n){for(let s=-4;s<=4;s++)for(let r=-4;r<=4;r++){const i=Math.max(Math.abs(r),Math.abs(s)),o=t+r,l=n+s;o>=0&&o<this.size&&l>=0&&l<this.size&&this.setFunctionModule(o,l,i!==2&&i!==4,Co.Position)}}drawAlignmentPattern(t,n){for(let s=-2;s<=2;s++)for(let r=-2;r<=2;r++)this.setFunctionModule(t+r,n+s,Math.max(Math.abs(r),Math.abs(s))!==1,Co.Alignment)}setFunctionModule(t,n,s,r=Co.Function){this.modules[n][t]=s,this.types[n][t]=r}addEccAndInterleave(t){const n=this.version,s=this.ecc;if(t.length!==Sh(n,s))throw new RangeError("Invalid argument");const r=qC[s[0]][n],i=BC[s[0]][n],o=Math.floor(A0(n)/8),l=r-o%r,c=Math.floor(o/r),u=[],d=LV(i);for(let f=0,p=0;f<r;f++){const g=t.slice(p,p+c-i+(f<l?0:1));p+=g.length;const b=OV(g,d);f<l&&g.push(0),u.push(g.concat(b))}const h=[];for(let f=0;f<u[0].length;f++)u.forEach((p,g)=>{(f!==c-i||g>=l)&&h.push(p[f])});return h}drawCodewords(t){if(t.length!==Math.floor(A0(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let s=this.size-1;s>=1;s-=2){s===6&&(s=5);for(let r=0;r<this.size;r++)for(let i=0;i<2;i++){const o=s-i,c=(s+1&2)===0?this.size-1-r:r;!this.types[c][o]&&n<t.length*8&&(this.modules[c][o]=Ar(t[n>>>3],7-(n&7)),n++)}}}applyMask(t){if(t<0||t>7)throw new RangeError("Mask value out of range");for(let n=0;n<this.size;n++)for(let s=0;s<this.size;s++){let r;switch(t){case 0:r=(s+n)%2===0;break;case 1:r=n%2===0;break;case 2:r=s%3===0;break;case 3:r=(s+n)%3===0;break;case 4:r=(Math.floor(s/3)+Math.floor(n/2))%2===0;break;case 5:r=s*n%2+s*n%3===0;break;case 6:r=(s*n%2+s*n%3)%2===0;break;case 7:r=((s+n)%2+s*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][s]&&r&&(this.modules[n][s]=!this.modules[n][s])}}getPenaltyScore(){let t=0;for(let i=0;i<this.size;i++){let o=!1,l=0;const c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[i][u]===o?(l++,l===5?t+=i3:l>5&&t++):(this.finderPenaltyAddHistory(l,c),o||(t+=this.finderPenaltyCountPatterns(c)*Ff),o=this.modules[i][u],l=1);t+=this.finderPenaltyTerminateAndCount(o,l,c)*Ff}for(let i=0;i<this.size;i++){let o=!1,l=0;const c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][i]===o?(l++,l===5?t+=i3:l>5&&t++):(this.finderPenaltyAddHistory(l,c),o||(t+=this.finderPenaltyCountPatterns(c)*Ff),o=this.modules[u][i],l=1);t+=this.finderPenaltyTerminateAndCount(o,l,c)*Ff}for(let i=0;i<this.size-1;i++)for(let o=0;o<this.size-1;o++){const l=this.modules[i][o];l===this.modules[i][o+1]&&l===this.modules[i+1][o]&&l===this.modules[i+1][o+1]&&(t+=CV)}let n=0;for(const i of this.modules)n=i.reduce((o,l)=>o+(l?1:0),n);const s=this.size*this.size,r=Math.ceil(Math.abs(n*20-s*10)/s)-1;return t+=r*$V,t}getAlignmentPatternPositions(){if(this.version===1)return[];{const t=Math.floor(this.version/7)+2,n=this.version===32?26:Math.ceil((this.version*4+4)/(t*2-2))*2,s=[6];for(let r=this.size-7;s.length<t;r-=n)s.splice(1,0,r);return s}}finderPenaltyCountPatterns(t){const n=t[1],s=n>0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(s&&t[0]>=n*4&&t[6]>=n?1:0)+(s&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,s){return t&&(this.finderPenaltyAddHistory(n,s),n=0),n+=this.size,this.finderPenaltyAddHistory(n,s),this.finderPenaltyCountPatterns(s)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}}function Or(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let s=t-1;s>=0;s--)n.push(e>>>s&1)}function Ar(e,t){return(e>>>t&1)!==0}class _b{constructor(t,n,s){if(this.mode=t,this.numChars=n,this.bitData=s,n<0)throw new RangeError("Invalid argument");this.bitData=s.slice()}getData(){return this.bitData.slice()}}const TV=[1,10,12,14],NV=[2,9,11,13],AV=[4,8,16,16];function HC(e,t){return e[Math.floor((t+7)/17)+1]}function PC(e){const t=[];for(const n of e)Or(n,8,t);return new _b(AV,e.length,t)}function MV(e){if(!UC(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let n=0;n<e.length;){const s=Math.min(e.length-n,3);Or(Number.parseInt(e.substring(n,n+s),10),s*3+1,t),n+=s}return new _b(TV,e.length,t)}function zV(e){if(!FC(e))throw new RangeError("String contains unencodable characters in alphanumeric mode");const t=[];let n;for(n=0;n+2<=e.length;n+=2){let s=kg.indexOf(e.charAt(n))*45;s+=kg.indexOf(e.charAt(n+1)),Or(s,11,t)}return n<e.length&&Or(kg.indexOf(e.charAt(n)),6,t),new _b(NV,e.length,t)}function RV(e){return e===""?[]:UC(e)?[MV(e)]:FC(e)?[zV(e)]:[PC(_V(e))]}function UC(e){return jV.test(e)}function FC(e){return SV.test(e)}function IV(e,t){let n=0;for(const s of e){const r=HC(s.mode,t);if(s.numChars>=1<<r)return Number.POSITIVE_INFINITY;n+=4+r+s.bitData.length}return n}function _V(e){e=encodeURI(e);const t=[];for(let n=0;n<e.length;n++)e.charAt(n)!=="%"?t.push(e.charCodeAt(n)):(t.push(Number.parseInt(e.substring(n+1,n+3),16)),n+=2);return t}function A0(e){if(e<Rb||e>Ib)throw new RangeError("Version number out of range");let t=(16*e+128)*e+64;if(e>=2){const n=Math.floor(e/7)+2;t-=(25*n-10)*n-55,e>=7&&(t-=36)}return t}function Sh(e,t){return Math.floor(A0(e)/8)-BC[t[0]][e]*qC[t[0]][e]}function LV(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let s=0;s<e-1;s++)t.push(0);t.push(1);let n=1;for(let s=0;s<e;s++){for(let r=0;r<t.length;r++)t[r]=M0(t[r],n),r+1<t.length&&(t[r]^=t[r+1]);n=M0(n,2)}return t}function OV(e,t){const n=t.map(s=>0);for(const s of e){const r=s^n.shift();n.push(0),t.forEach((i,o)=>n[o]^=M0(i,r))}return n}function M0(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let s=7;s>=0;s--)n=n<<1^(n>>>7)*285,n^=(t>>>s&1)*e;return n}function DV(e,t,n=1,s=40,r=-1,i=!0){if(!(Rb<=n&&n<=s&&s<=Ib)||r<-1||r>7)throw new RangeError("Invalid value");let o,l;for(o=n;;o++){const h=Sh(o,t)*8,f=IV(e,o);if(f<=h){l=f;break}if(o>=s)throw new RangeError("Data too long")}for(const h of[LC,OC,DC])i&&l<=Sh(o,h)*8&&(t=h);const c=[];for(const h of e){Or(h.mode[0],4,c),Or(h.numChars,HC(h.mode,o),c);for(const f of h.getData())c.push(f)}const u=Sh(o,t)*8;Or(0,Math.min(4,u-c.length),c),Or(0,(8-c.length%8)%8,c);for(let h=236;c.length<u;h^=253)Or(h,8,c);const d=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((h,f)=>d[f>>>3]|=h<<7-(f&7)),new EV(o,t,d,r)}function BV(e,t){var h;const{ecc:n="L",boostEcc:s=!1,minVersion:r=1,maxVersion:i=40,maskPattern:o=-1,border:l=1}=t||{},c=typeof e=="string"?RV(e):Array.isArray(e)?[PC(e)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=DV(c,wV[n],r,i,o,s),d=qV({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},l);return t!=null&&t.invert&&(d.data=d.data.map(f=>f.map(p=>!p))),(h=t==null?void 0:t.onEncoded)==null||h.call(t,d),d}function qV(e,t=1){if(!t)return e;const{size:n}=e,s=n+t*2;e.size=s,e.data.forEach(i=>{for(let o=0;o<t;o++)i.unshift(!1),i.push(!1)});for(let i=0;i<t;i++)e.data.unshift(Array.from({length:s},o=>!1)),e.data.push(Array.from({length:s},o=>!1));const r=Co.Border;e.types.forEach(i=>{for(let o=0;o<t;o++)i.unshift(r),i.push(r)});for(let i=0;i<t;i++)e.types.unshift(Array.from({length:s},o=>r)),e.types.push(Array.from({length:s},o=>r));return e}function HV({view:e,remote:t,self:n}){const s=e.connection==="connected",r=n===void 0?void 0:$b(n.publicKey),[i,o]=x.useState(),[l,c]=x.useState(),u=()=>{c(void 0),t.controller.createPairing().then(o,d=>{c(d instanceof Error?d.message:String(d))})};return a.jsxs(fe,{gap:4,children:[e.devices.length===0?a.jsx(re,{type:"supporting",children:"No paired devices."}):a.jsx(Mt,{density:"compact",children:e.devices.map(d=>a.jsx(GV,{device:d,isSelf:d.publicKey===r,connected:s,remote:t},d.publicKey))}),a.jsx(PV,{view:e,remote:t}),l===void 0?null:a.jsx(wt,{status:"error",title:"Could not create a pairing offer",description:l}),i===void 0?a.jsx(ne,{label:"Pair a device",variant:"secondary",isDisabled:!s,onClick:u}):a.jsx(VV,{url:i.url,expiresAt:i.expiresAt,onRenew:u})]})}function PV({view:e,remote:t}){var s;const n=(s=e.host)==null?void 0:s.protocol.minor;return e.settings===null||n===void 0||!Ft(n,"acceptAccountDevices")?null:a.jsx(Pj,{label:"Accept devices from your account",description:"Devices signed in to the server this host joined can pair without a QR code. Turn off to allow QR codes only.",value:e.settings.acceptAccountDevices,isDisabled:e.connection!=="connected",onChange:r=>void t.controller.updateSettings({acceptAccountDevices:r})})}const UV={account:"via account",qr:"via QR code",local:"on this machine"},FV=new Intl.DateTimeFormat(void 0,{dateStyle:"short",timeStyle:"short"});function GV({device:e,isSelf:t,connected:n,remote:s}){const r=e.source===void 0?"":` ${UV[e.source]}`;return a.jsx(rt,{label:e.name,description:`Paired ${FV.format(e.pairedAt)}${r}`,endContent:a.jsxs($e,{gap:2,vAlign:"center",children:[t?a.jsx(Nn,{label:"This device",size:"sm"}):null,a.jsx(ne,{label:"Revoke",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void s.controller.revokeDevice(e.publicKey)})]})})}function VV({url:e,expiresAt:t,onRenew:n}){const[s,r]=x.useState(Date.now());x.useEffect(()=>{const l=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(l)},[]);const i=Math.max(0,Math.ceil((t-s)/1e3));if(i===0)return a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(re,{type:"supporting",children:"Expired"}),a.jsx(ne,{label:"New code",variant:"secondary",size:"sm",onClick:n})]});const o=new URL(e).hostname==="127.0.0.1";return a.jsxs(fe,{gap:3,hAlign:"center",children:[o?null:a.jsx(WV,{text:e}),a.jsx(re,{type:"supporting",style:{wordBreak:"break-all",userSelect:"all"},children:e}),o?a.jsx(re,{type:"supporting",children:"This link only works on this machine — paste it into the desktop app. To pair a phone, start the host with --remote-port or --relay."}):null,a.jsxs(re,{type:"supporting",children:["Expires in ",Math.floor(i/60),":",String(i%60).padStart(2,"0")]})]})}const bg=2;function WV({text:e}){const t=x.useMemo(()=>BV(e,{border:0}),[e]),n=t.size+bg*2;return a.jsxs("svg",{role:"img","aria-label":"Pairing QR code",viewBox:`0 0 ${n} ${n}`,width:200,height:200,style:{display:"block"},children:[a.jsx("rect",{width:n,height:n,fill:"#ffffff"}),a.jsx("path",{shapeRendering:"crispEdges",fill:"#000000",d:t.data.flatMap((s,r)=>s.map((i,o)=>i?`M${o+bg} ${r+bg}h1v1h-1z`:"")).filter(s=>s!=="").join("")})]})}function GC({update:e}){if(e===void 0)return a.jsx(re,{type:"supporting",children:"Checking for updates…"});const{status:t}=e;switch(t.state){case"checking":return a.jsx(re,{type:"supporting",children:"Checking for updates…"});case"available":case"downloading":{const n=t.progressPercent===void 0?"":` ${Math.round(t.progressPercent)}%`;return a.jsx(re,{type:"supporting",children:`Downloading PiNomad ${t.availableVersion??""}…${n}`})}case"ready":return a.jsx(ne,{label:"Restart to update",variant:"primary",onClick:()=>e.install()});case"error":return a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(re,{type:"supporting",children:t.message}),a.jsx(ne,{label:"Retry",variant:"secondary",onClick:()=>e.check()})]});case"disabled":return a.jsx(re,{type:"supporting",children:t.reason??"Updates are unavailable in this build."});default:return a.jsx(re,{type:"supporting",children:`PiNomad ${t.currentVersion} is up to date; no newer release found.`})}}function KV(){const e=gb();return e===void 0?null:a.jsxs(fe,{gap:3,children:[a.jsx(re,{children:`PiNomad ${e.status.currentVersion}`}),e.status.state==="idle"?a.jsx("div",{children:a.jsx(ne,{label:"Check for updates",variant:"secondary",onClick:()=>e.check()})}):a.jsx(GC,{update:e})]})}const z0=[{id:"hosts",title:"Hosts",icon:wx,group:"device"},{id:"updates",title:"Updates",icon:BS,group:"device"},{id:"providers",title:"Providers",icon:yU,group:"host"},{id:"models",title:"Models",icon:R1,group:"host"},{id:"agents",title:"Agents",icon:Rd,group:"host"},{id:"mcp",title:"MCP",icon:wU,group:"host"},{id:"chats",title:"Chats",icon:lU,group:"host"},{id:"devices",title:"Devices",icon:kU,group:"host"},{id:"archived",title:"Archived",icon:iU,group:"host"},{id:"about",title:"About",icon:mU,group:"host"}],XV=e=>z0.find(t=>t.id===e).title,o3=e=>a.jsx(e,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}});function ZV({view:e,remote:t,device:n,hostKey:s,onClose:r}){var m,k;const i=ua("(max-width: 640px)"),[o,l]=x.useState(void 0),c=e.connection==="connected",{hosts:u}=kc(),d=((m=window.pinomadDesktop)==null?void 0:m.updates)!==void 0,h=o??(c?"providers":"hosts"),f=u.find(w=>w.hostKey===s),p=((k=e.settings)==null?void 0:k.hostName)??(f===void 0?void 0:mC(u).get(f.hostKey))??"This host",g=[{title:"This device",sections:z0.filter(w=>w.group==="device"&&(w.id!=="updates"||d))},{title:p,sections:z0.filter(w=>w.group==="host")}],b=a.jsx(py,{padding:2,width:"calc(var(--spacing-10) * 7)",hasDivider:!0,children:a.jsx(lk,{"aria-label":"Settings sections",style:{width:"100%"},children:a.jsx(fe,{gap:3,children:g.map(w=>a.jsx(lu,{title:w.title,children:w.sections.map(v=>a.jsx(ji,{label:v.title,icon:o3(v.icon),isSelected:v.id===h,onClick:()=>l(v.id)},v.id))},w.title))})})}),y=a.jsx(fe,{gap:4,children:g.map(w=>a.jsxs(fe,{gap:1,children:[a.jsx(re,{type:"supporting",weight:"semibold",children:w.title}),a.jsx(Mt,{density:"compact","aria-label":w.title,children:w.sections.map(v=>a.jsx(rt,{label:v.title,startContent:o3(v.icon),endContent:a.jsx($r,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}}),onClick:()=>l(v.id)},v.id))})]},w.title))});return a.jsx(vr,{"aria-label":"Settings",isOpen:!0,onOpenChange:w=>w?void 0:r(),purpose:"form",width:"calc(var(--spacing-10) * 22)",maxHeight:"90dvh",variant:i?"fullscreen":"standard",padding:4,children:a.jsx(Ks,{padding:4,style:{height:i?"100dvh":"min(85dvh, calc(var(--spacing-10) * 17))"},header:a.jsx(jr,{title:i&&o!==void 0?XV(o):"Settings",startContent:i&&o!==void 0?a.jsx(En,{label:"Back",icon:a.jsx(OS,{}),variant:"ghost",style:{marginBlock:"calc(-1 * var(--spacing-2))"},onClick:()=>l(void 0)}):void 0,onOpenChange:()=>r(),hasDivider:!0}),start:i?void 0:b,content:a.jsx(Xs,{padding:i?4:6,children:i&&o===void 0?y:a.jsx(YV,{view:e,remote:t,device:n,hostKey:s,connected:c,section:h,showTitle:!i})})})})}function YV({view:e,remote:t,device:n,hostKey:s,connected:r,section:i,showTitle:o}){const{title:l,supporting:c,body:u}=QV(e,t,n,s,r,i),d=`settings-${i}-heading`;return a.jsxs(fe,{as:"section",...o?{"aria-labelledby":d}:{"aria-label":l},gap:3,children:[a.jsxs(fe,{gap:2,children:[o?a.jsx(wr,{level:2,id:d,children:l}):null,c]}),u]})}function QV(e,t,n,s,r,i){switch(i){case"hosts":return{title:"Hosts",supporting:a.jsx(re,{as:"p",type:"supporting",children:"The hosts this device has paired with. It connects to one at a time."}),body:a.jsx(NC,{connection:e.connection,connectedHostKey:s})};case"updates":return{title:"Updates",body:a.jsx(KV,{})};case"devices":return{title:"Devices",supporting:a.jsx(re,{as:"p",type:"supporting",children:"Paired devices can reach this host over the secure channel."}),body:a.jsx(HV,{view:e,remote:t,self:n})};case"providers":return{title:"Providers",supporting:a.jsxs(re,{as:"p",type:"supporting",children:["Logins are stored on the host in Pi's ",a.jsx("code",{children:"auth.json"}),". Log in with the Pi CLI on the host — logging out here signs the Pi CLI out too. Every device connected to this host sees the same logins."]}),body:a.jsx(JV,{view:e,remote:t,connected:r})};case"models":return{title:"Models",supporting:a.jsx(re,{as:"p",type:"supporting",children:"Used when a new conversation doesn't pick its own model."}),body:a.jsx(eW,{view:e,remote:t,connected:r})};case"agents":return{title:"Agents",supporting:a.jsxs(re,{as:"p",type:"supporting",children:["Named agents the model can delegate to with ",a.jsx("code",{children:"subagent"})," — mention one with ",a.jsx("code",{children:"@name"}),"."," ","Each is a Markdown file in"," ",a.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/agents/"]}),"; edits to those files apply immediately."]}),body:a.jsx(oW,{view:e,remote:t,connected:r})};case"mcp":return{title:"MCP",body:a.jsx(sW,{view:e})};case"chats":return{title:"Chats",supporting:a.jsx(re,{as:"p",type:"supporting",children:"How queued messages are delivered when the agent reaches the next turn."}),body:a.jsx(tW,{view:e,remote:t,connected:r})};case"archived":return{title:"Archived",supporting:a.jsx(re,{as:"p",type:"supporting",children:"Archived conversations are hidden from the sidebar. Restoring one brings it back with its forks and subagents; a worktree removed on archive is checked out again from its branch."}),body:a.jsx(nW,{view:e,remote:t,connected:r})};case"about":return{title:"About",body:a.jsx(rW,{view:e,remote:t,connected:r})}}}function JV({view:e,remote:t,connected:n}){const s=e.auth;if(s===null)return a.jsx(wt,{status:"warning",title:"This host is too old for logins",description:"Run `pinomad upgrade` on the host."});const r=s.logins;return a.jsx(fe,{gap:3,children:r.length===0?a.jsx(re,{as:"p",type:"supporting",children:"No stored logins. Log in with the Pi CLI on the host."}):a.jsxs(a.Fragment,{children:[a.jsx(re,{as:"p",type:"supporting",children:`${r.length} provider${r.length===1?"":"s"} logged in`}),r.map(i=>a.jsx(dW,{login:i,connected:n,remote:t},i.providerId))]})})}function eW({view:e,remote:t,connected:n}){const s=e.settings;return s===null?a.jsx(wt,{status:"warning",title:"This host is too old for settings",description:"Run `pinomad upgrade` on the host."}):a.jsxs($e,{gap:2,vAlign:"center",wrap:"wrap",children:[a.jsx(zb,{models:e.models,selected:{model:s.defaultModel??void 0,level:s.defaultThinkingLevel??"off"},isDisabled:!n,onModelChange:r=>void t.controller.updateSettings({defaultModel:r}),onLevelChange:r=>void t.controller.updateSettings({defaultThinkingLevel:r})}),s.custom.includes("defaultModel")||s.custom.includes("defaultThinkingLevel")?a.jsx(ne,{label:"Use pi's defaults",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void t.controller.updateSettings({defaultModel:null,defaultThinkingLevel:null})}):null]})}function tW({view:e,remote:t,connected:n}){const s=e.settings;return s===null?a.jsx(wt,{status:"warning",title:"This host is too old for settings",description:"Run `pinomad upgrade` on the host."}):a.jsxs(fe,{gap:4,children:[a.jsx(a3,{title:"Steer messages",value:s.steeringMode,customized:s.custom.includes("steeringMode"),disabled:!n,onChange:r=>void t.controller.updateSettings({steeringMode:r}),onReset:()=>void t.controller.updateSettings({steeringMode:null})}),a.jsx(a3,{title:"Follow-up messages",value:s.followUpMode,customized:s.custom.includes("followUpMode"),disabled:!n,onChange:r=>void t.controller.updateSettings({followUpMode:r}),onReset:()=>void t.controller.updateSettings({followUpMode:null})})]})}function nW({view:e,remote:t,connected:n}){const s=vc(6e4),r=e.organized.archived;return r.length===0?a.jsx(re,{as:"p",type:"supporting",children:"No archived conversations."}):a.jsx(Mt,{density:"compact",children:r.map(({node:i,project:o})=>{const l=i.summary.title??"New conversation",c=ZH(i);return a.jsx(rt,{label:l,description:[(o==null?void 0:o.name)??"Chat",c===void 0?void 0:cb(c,s)].filter(u=>u!==void 0).join(" · "),endContent:a.jsx(ne,{label:`Restore ${l}`,icon:a.jsx(oU,{"aria-hidden":"true"}),variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>void t.controller.archive(i.summary.id,!1),children:"Restore"})},i.summary.id)})})}function sW({view:e}){const t=e.mcp;return t===null?a.jsx(re,{as:"p",type:"supporting",children:"Loading…"}):a.jsxs(fe,{gap:3,children:[a.jsx(re,{as:"p",type:"supporting",style:{userSelect:"all"},children:t.configPath}),t.servers.length===0?a.jsx(re,{as:"p",type:"supporting",children:"No servers configured."}):a.jsx(Mt,{density:"compact",children:t.servers.map(n=>a.jsx(rt,{label:n.name,endContent:a.jsx(Nn,{label:n.state,size:"sm"})},n.name))})]})}function rW({view:e,remote:t,connected:n}){const s=e.host,r=e.settings,i=r!==null&&Ft((s==null?void 0:s.protocol.minor)??0,"hostName");return a.jsxs(fe,{gap:3,children:[i?a.jsx(iW,{settings:r,remote:t,connected:n}):null,a.jsxs(Mt,{density:"compact",children:[a.jsx(rt,{label:"Host version",description:(s==null?void 0:s.version)??"Source checkout"}),a.jsx(rt,{label:"Protocol",description:s===void 0?"—":`${s.protocol.major}.${s.protocol.minor}`}),a.jsx(rt,{label:"Data directory",description:a.jsx("span",{style:{wordBreak:"break-all",userSelect:"all"},children:e.session.directory})}),a.jsx(rt,{label:"Settings file",description:a.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/settings.json"]})})]}),a.jsx(re,{as:"p",type:"supporting",children:"Edit the settings file by hand only while the host is stopped."})]})}function iW({settings:e,remote:t,connected:n}){const s=e.hostName??"",[r,i]=x.useState(s);x.useEffect(()=>i(s),[s]);const o=cV(r),l=n&&o!==""&&o!==s,c=()=>void t.controller.updateSettings({hostName:o});return a.jsxs(fe,{gap:1,children:[a.jsx(ns,{label:"Host name",value:r,onChange:i,onEnter:l?c:void 0,isDisabled:!n,description:"How paired devices name this machine. Without a custom name the hostname is used.",status:r!==""&&o===""?{type:"error",message:"The name needs at least one displayable character"}:void 0,width:"100%"}),a.jsxs($e,{gap:2,hAlign:"end",children:[e.custom.includes("hostName")?a.jsx(ne,{label:"Use machine name",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void t.controller.updateSettings({hostName:null})}):null,a.jsx(ne,{label:"Save",variant:"secondary",size:"sm",isDisabled:!l,onClick:c})]})]})}function a3({title:e,value:t,customized:n,disabled:s,onChange:r,onReset:i}){return a.jsxs(fe,{gap:1,children:[a.jsx(re,{children:e}),a.jsxs($e,{gap:2,vAlign:"center",wrap:"wrap",children:[a.jsxs(Uj,{className:"shrink-0",value:t,onChange:o=>r(o),label:e,size:"sm",isDisabled:s,children:[a.jsx(Zg,{value:"one-at-a-time",label:"One at a time"}),a.jsx(Zg,{value:"all",label:"All at once"})]}),n?a.jsx(ne,{label:"Use pi's default",variant:"ghost",size:"sm",isDisabled:s,onClick:i}):null]})]})}function oW({view:e,remote:t,connected:n}){const s=e.agents,[r,i]=x.useState(void 0);return s===null?a.jsx(wt,{status:"warning",title:"This host is too old for named agents",description:"Run `pinomad upgrade` on the host."}):a.jsxs(fe,{gap:3,children:[a.jsx($e,{gap:2,vAlign:"center",children:a.jsx(ne,{label:"New agent",variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>i({mode:"create"})})}),s.roles.length===0&&s.problems.length===0?a.jsx(re,{as:"p",type:"supporting",children:"No named agents yet."}):null,s.roles.map(o=>a.jsx(lW,{role:o,view:e,remote:t,connected:n,onEdit:()=>i({mode:"edit",role:o})},o.name)),s.problems.map(o=>a.jsx(cW,{problem:o,remote:t,connected:n},o.file)),r===void 0?null:a.jsx(bV,{view:e,remote:t,connected:n,...r.mode==="edit"?{role:r.role}:{},onClose:()=>i(void 0)})]})}const aW=e=>{const t=e.indexOf("/");return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function lW({role:e,view:t,remote:n,connected:s,onEdit:r}){const[i,o]=x.useState(!1),[l,c]=x.useState(void 0),u=e.model===void 0?void 0:as(t.models,aW(e.model)),d=()=>{n.controller.deleteAgent(e.name).catch(h=>{c(h instanceof Error?h.message:String(h))})};return a.jsxs(r1,{padding:4,children:[a.jsxs($e,{gap:3,vAlign:"start",children:[a.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[a.jsx(wr,{level:3,children:e.name}),a.jsx(re,{as:"p",type:"supporting",children:e.description}),e.model===void 0&&e.thinkingLevel===void 0?null:a.jsxs($e,{gap:1,wrap:"wrap",children:[e.model===void 0?null:a.jsx(Nn,{label:(u==null?void 0:u.name)??e.model,size:"sm"}),e.thinkingLevel===void 0?null:a.jsx(Nn,{label:nd[e.thinkingLevel],size:"sm"}),e.model!==void 0&&u===void 0?a.jsx(Nn,{label:"Model not available",color:"orange",size:"sm"}):null]})]}),i?null:a.jsx($e,{gap:1,vAlign:"center",children:a.jsx(c1,{icon:a.jsx(Id,{"aria-hidden":"true"}),label:`${e.name} actions`,size:"sm",variant:"ghost",isDisabled:!s,items:[{label:"Edit…",onClick:r},{label:"Delete…",onClick:()=>o(!0)}]})})]}),i?a.jsxs(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:[a.jsx(re,{as:"p",type:"supporting",children:"Conversations already using this agent keep their copy."}),a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(ne,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!s,onClick:d}),a.jsx(ne,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>o(!1)})]})]}):null,l===void 0?null:a.jsx(re,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:l})]})}function cW({problem:e,remote:t,connected:n}){const[s,r]=x.useState(!1),[i,o]=x.useState(void 0),l=IC(e.file.slice(0,-3))===void 0,c=()=>{t.controller.deleteAgent(e.file.slice(0,-3)).catch(u=>{o(u instanceof Error?u.message:String(u))})};return a.jsxs(r1,{padding:4,children:[a.jsxs($e,{gap:3,vAlign:"start",children:[a.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[a.jsx(wr,{level:3,children:e.file}),a.jsx($e,{gap:1,wrap:"wrap",children:a.jsx(Nn,{label:"Not loaded",color:"orange",size:"sm"})}),a.jsx(re,{as:"p",type:"supporting",children:e.reason}),a.jsx(re,{as:"p",type:"supporting",children:"Fix this file on the host."})]}),s||!l?null:a.jsx($e,{gap:1,vAlign:"center",children:a.jsx(c1,{icon:a.jsx(Id,{"aria-hidden":"true"}),label:`${e.file} actions`,size:"sm",variant:"ghost",isDisabled:!n,items:[{label:"Delete…",onClick:()=>r(!0)}]})})]}),s?a.jsx(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(ne,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!n,onClick:c}),a.jsx(ne,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})}):null,i===void 0?null:a.jsx(re,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:i})]})}const uW=e=>e.subscription?"Subscription connected":e.kind==="api_key"?"API key configured":"OAuth connected";function dW({login:e,connected:t,remote:n}){const[s,r]=x.useState(!1);return a.jsxs(r1,{padding:4,children:[a.jsxs($e,{gap:3,vAlign:"start",children:[a.jsxs(fe,{gap:1,style:{flex:1,minInlineSize:0},children:[a.jsx(wr,{level:3,children:e.name}),a.jsx(re,{as:"p",type:"supporting",children:uW(e)})]}),s?null:a.jsx($e,{gap:1,vAlign:"center",children:a.jsx(c1,{icon:a.jsx(Id,{"aria-hidden":"true"}),label:`${e.name} actions`,size:"sm",variant:"ghost",isDisabled:!t,items:[{label:"Log out…",onClick:()=>r(!0)}]})})]}),s?a.jsxs(fe,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:[a.jsx(re,{as:"p",type:"supporting",children:`This also signs the Pi CLI on the host out of ${e.name}.`}),a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(ne,{label:"Log out",variant:"destructive",size:"sm",isDisabled:!t,onClick:()=>void n.controller.logout(e.providerId)}),a.jsx(ne,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})]}):null]})}function Ro(e,t,n){return e>=t&&e<=n}function VC(e){return e===8205}function fW(e){return Ro(e,55296,56319)}function l3(e){return Ro(e,127462,127487)}function WC(e){return Ro(e,65024,65039)}function KC(e){return Ro(e,768,879)||Ro(e,6832,6911)||Ro(e,7616,7679)||Ro(e,65056,65071)}function Ch(e){return e>65535?2:1}function c3(e,t){for(;t<e.length;){const n=e.codePointAt(t);if(KC(n)||WC(n))t+=Ch(n);else break}return t}function XC(e,t){const n=e.codePointAt(t);let s=t+Ch(n);for(s=c3(e,s);s<e.length-1&&VC(e.codePointAt(s));){const r=e.codePointAt(s+1);s+=1+Ch(r),s=c3(e,s)}return l3(n)&&s<e.length&&l3(e.codePointAt(s))&&(s+=Ch(e.codePointAt(s))),s}function ZC(e){return e>=768&&(fW(e)||KC(e)||WC(e)||VC(e))}function hW(e,t){let n=0,s=0;for(;s<e.length;)if(s=XC(e,s),++n>=t)return!0;return!1}function xW(e,t){let n=0,s=0;for(;s<e.length;)if(s=XC(e,s),++n>t)return!1;return!0}function pW(e,t){if(t===0)return!0;if(e.length<t)return!1;let n=0;for(;;){if(ZC(e.charCodeAt(n)))return hW(e,t);if(++n>=t)return!0}}function gW(e,t){if(e.length<=t)return!0;let n=0;for(;;){if(ZC(e.charCodeAt(n)))return xW(e,t);if(++n>t)return!1}}function Ve(e){return Array.isArray(e)}function Ms(e){return xe(typeof e,"bigint")}function ya(e){return xe(typeof e,"boolean")}function YC(e){if($t(e)||!sd(e))return!1;const t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function sd(e){return xe(typeof e,"function")}function QC(e){return Number.isInteger(e)}function Od(e){return xe(e,null)}function Zt(e){return Number.isFinite(e)}function mW(e){return yt(e)&&!Ve(e)}function yt(e){return xe(typeof e,"object")&&!Od(e)}function It(e){return xe(typeof e,"string")}function JC(e){return xe(typeof e,"symbol")}function $t(e){return xe(e,void 0)}function xe(e,t){return e===t}function e$(e,t){return e>t}function t$(e,t){return e<t}function wc(e,t){return e<=t}function L1(e,t){return e>=t}function yW(e,t){if(Ms(e)||Ms(t))return BigInt(e)%BigInt(t)===0n;const n=1e-10;if(!Zt(e)||QC(e)&&1/t%1===0)return!0;const s=e%t;return Math.min(Math.abs(s),Math.abs(s-t),Math.abs(s+t))<n}function kW(e){if(!yt(e))return!1;const t=globalThis.Object.getPrototypeOf(e);return Od(t)?!1:xe(typeof t.constructor,"function")&&!(xe(t.constructor,globalThis.Object)||xe(t.constructor.name,"Object"))}function n$(e){return Ms(e)||ya(e)||Od(e)||Zt(e)||It(e)||$t(e)}function bW(e,t){return gW(e,t)}function vW(e,t){return pW(e,t)}function fn(e,t,n){return e.every((s,r)=>r<t||n(s,r))}function s$(e,t){return e.some((n,s)=>t(n,s))}function wW(e,t){let n=!1;return e.forEach((s,r)=>{t(s,r)&&(n=!0)}),n}function r$(e,t){return e.reduce((n,s,r)=>t(s,r)?++n:n,0)}function O1(e){return xe(e,"__proto__")||xe(e,"constructor")||xe(e,"prototype")}function de(e,t){return O1(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function ra(e){return Object.entries(e)}function _t(e){return Object.getOwnPropertyNames(e)}function jW(e){return Object.getOwnPropertySymbols(e)}function SW(e,t){if(!yt(t))return!1;const n=_t(e);return xe(n.length,_t(t).length)&&n.every(s=>D1(e[s],t[s]))}function CW(e,t){return Ve(t)&&xe(e.length,t.length)&&e.every((n,s)=>D1(e[s],t[s]))}function D1(e,t){return Ve(e)?CW(e,t):yt(e)?SW(e,t):xe(e,t)}function $W(e){return e instanceof Boolean}function EW(e){return e instanceof Number}function TW(e){return e instanceof String}function i$(e){return globalThis.ArrayBuffer.isView(e)}function o$(e){return e instanceof globalThis.RegExp}function NW(e){return e instanceof globalThis.Date}function AW(e){return e instanceof globalThis.Set}function MW(e){return e instanceof globalThis.Map}const zW={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function a$(){return zW}function RW(e){return de(e,"~kind")||de(e,"~unsafe")}function IW(e){const t={};for(const n of _t(e)){if(O1(n))continue;const s=Object.getOwnPropertyDescriptor(e,n);s.value=ia(s.value),xe(s.enumerable,!0)?t[n]=s.value:Object.defineProperty(t,n,s)}return t}function _W(e){const t={};for(const n of _t(e))O1(n)||(t[n]=ia(e[n]));for(const n of jW(e))t[n]=ia(e[n]);return t}function LW(e){return kW(e)?e:RW(e)?IW(e):_W(e)}function OW(e){return e.map(t=>ia(t))}function DW(e){return e.slice()}function BW(e){return new RegExp(e.source,e.flags)}function qW(e){return new Map(ia([...e.entries()]))}function HW(e){return new Set(ia([...e.values()]))}function ia(e){return i$(e)?DW(e):o$(e)?BW(e):MW(e)?qW(e):AW(e)?HW(e):Ve(e)?OW(e):yt(e)?LW(e):e}function PW(e){return ia(e)}function UW(e,t){for(const n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function FW(e,t){return{...e,...t}}function ro(e,t,n={}){const s=FW(t,n),r=UW(s,e);return r}function l$(e,t,n){const s=a$(),r=PW(e);for(const i of Object.keys(t))Object.defineProperty(r,i,{configurable:!0,writable:!0,enumerable:s.enumerableKind,value:t[i]});for(const i of Object.keys(n))Object.defineProperty(r,i,{configurable:!0,enumerable:!0,writable:!0,value:n[i]});return r}function GW(e){return yt(e)}function VW(e){return l$(e,{"~optional":!0},{})}function WW(e,t){return l$(VW(e),{},t)}function ka(e,t){return ro({"~kind":"Array"},{type:"array",items:e},t)}function KW(e,t={}){return WW(e,t)}function Pr(e){return KW(e)}function XW(e){return GW(e)&&de(e,"~optional")}function ZW(e){return _t(e).filter(t=>!XW(e[t]))}function An(e,t={}){const n=ZW(e),s=n.length>0?{required:n}:{};return ro({"~kind":"Object"},{type:"object",...s,properties:e},t)}function Lb(e){return ro({"~kind":"Unknown"},{},e)}function c$(e,t){var n;return((n=t[e.length])==null?void 0:n.call(t,...e))??(()=>{throw Error("Invalid Arguments")})()}function YW(){throw new Error("Unreachable")}function QW(e){const t=new Set;let n=e;for(;n&&n!==Object.prototype;){for(const s of Reflect.ownKeys(n))s!=="constructor"&&typeof s!="symbol"&&t.add(s);n=Object.getPrototypeOf(n)}return[...t]}function JW(e){return typeof e=="number"}var mn;(function(e){e[e.Array=0]="Array",e[e.BigInt=1]="BigInt",e[e.Boolean=2]="Boolean",e[e.Date=3]="Date",e[e.Constructor=4]="Constructor",e[e.Function=5]="Function",e[e.Null=6]="Null",e[e.Number=7]="Number",e[e.Object=8]="Object",e[e.RegExp=9]="RegExp",e[e.String=10]="String",e[e.Symbol=11]="Symbol",e[e.TypeArray=12]="TypeArray",e[e.Undefined=13]="Undefined"})(mn||(mn={}));let sl=BigInt("14695981039346656037");const[eK,tK]=[BigInt("1099511628211"),BigInt("18446744073709551616")],nK=Array.from({length:256}).map((e,t)=>BigInt(t)),u$=new Float64Array(1),d$=new DataView(u$.buffer),f$=new Uint8Array(u$.buffer);function Lt(e){sl=sl^nK[e],sl=sl*eK%tK}function sK(e){Lt(mn.Array);for(const t of e)Ji(t)}function rK(e){Lt(mn.BigInt),d$.setBigInt64(0,e);for(const t of f$)Lt(t)}function u3(e){Lt(mn.Boolean),Lt(e?1:0)}function iK(e){Lt(mn.Constructor),Ji(e.toString())}function oK(e){Lt(mn.Date),Ji(e.getTime())}function aK(e){Lt(mn.Function),Ji(e.toString())}function lK(e){Lt(mn.Null)}function d3(e){Lt(mn.Number),d$.setFloat64(0,e,!0);for(const t of f$)Lt(t)}function cK(e){Lt(mn.Object);for(const t of QW(e).sort())Ji(t),Ji(e[t])}function uK(e){Lt(mn.RegExp),R0(e.toString())}const dK=new TextEncoder;function R0(e){Lt(mn.String);for(const t of dK.encode(e))Lt(t)}function fK(e){Lt(mn.Symbol),Ji(e.toString())}function hK(e){Lt(mn.TypeArray);const t=new Uint8Array(e.buffer);for(let n=0;n<t.length;n++)Lt(t[n])}function xK(e){return Lt(mn.Undefined)}function Ji(e){return i$(e)?hK(e):NW(e)?oK(e):o$(e)?uK(e):$W(e)?u3(e.valueOf()):TW(e)?R0(e.valueOf()):EW(e)?d3(e.valueOf()):JW(e)?d3(e):Ve(e)?sK(e):ya(e)?u3(e):Ms(e)?rK(e):YC(e)?iK(e):Od(e)?lK():yt(e)?cK(e):It(e)?R0(e):JC(e)?fK(e):$t(e)?xK():sd(e)?aK(e):YW()}function pK(e){return sl=BigInt("14695981039346656037"),Ji(e),sl}function gK(e){return pK(e).toString(16).padStart(16,"0")}function mK(e){return ro({"~kind":"Boolean"},{type:"boolean"},e)}class yK extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}}function kK(e){return Ms(e)?"bigint":ya(e)?"boolean":Zt(e)?"number":It(e)?"string":(()=>{throw new yK(e)})()}function es(e,t){return ro({"~kind":"Literal"},{type:kK(e),const:e},t)}function wl(e){return ro({"~kind":"Number"},{type:"number"},e)}function gn(e){return ro({"~kind":"String"},{type:"string"},e)}function B1(e,t={}){return ro({"~kind":"Union"},{anyOf:e},t)}function I0(e,t){return Array.from({length:t-e+1},(n,s)=>String.fromCharCode(e+s))}[...I0(97,122),...I0(65,90)];const bK="0",vK=I0(49,57);[...vK];function wK(e){return de(e,"~refine")&&Ve(e["~refine"])&&fn(e["~refine"],0,t=>yt(t)&&de(t,"check")&&de(t,"error")&&sd(t.check)&&sd(t.error))}function us(e){return yt(e)&&!Ve(e)}function Ox(e){return ya(e)}function ht(e){return us(e)||Ox(e)}function jK(e){return de(e,"additionalItems")&&ht(e.additionalItems)}function SK(e){return de(e,"additionalProperties")&&ht(e.additionalProperties)}function CK(e){return de(e,"allOf")&&Ve(e.allOf)&&e.allOf.every(t=>ht(t))}function _0(e){return de(e,"$anchor")&&It(e.$anchor)}function $K(e){return de(e,"anyOf")&&Ve(e.anyOf)&&e.anyOf.every(t=>ht(t))}function EK(e){return de(e,"const")}function Ob(e){return de(e,"contains")&&ht(e.contains)}function TK(e){return de(e,"dependencies")&&yt(e.dependencies)&&Object.values(e.dependencies).every(t=>ht(t)||Ve(t)&&t.every(n=>It(n)))}function NK(e){return de(e,"dependentRequired")&&yt(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>Ve(t)&&t.every(n=>It(n)))}function AK(e){return de(e,"dependentSchemas")&&yt(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>ht(t))}function oa(e){return de(e,"$dynamicAnchor")&&It(e.$dynamicAnchor)}function MK(e){return de(e,"$dynamicRef")&&It(e.$dynamicRef)}function zK(e){return de(e,"else")&&ht(e.else)}function RK(e){return de(e,"enum")&&Ve(e.enum)}function IK(e){return de(e,"exclusiveMaximum")&&(Zt(e.exclusiveMaximum)||Ms(e.exclusiveMaximum))}function _K(e){return de(e,"exclusiveMinimum")&&(Zt(e.exclusiveMinimum)||Ms(e.exclusiveMinimum))}function LK(e){return de(e,"format")&&It(e.format)}function Ws(e){return de(e,"$id")&&It(e.$id)}function OK(e){return de(e,"if")&&ht(e.if)}function Db(e){return de(e,"items")&&(ht(e.items)||Ve(e.items)&&e.items.every(t=>ht(t)))}function DK(e){return Db(e)&&Ve(e.items)}function BK(e){return de(e,"maximum")&&(Zt(e.maximum)||Ms(e.maximum))}function qK(e){return de(e,"maxContains")&&Zt(e.maxContains)}function HK(e){return de(e,"maxItems")&&Zt(e.maxItems)}function PK(e){return de(e,"maxLength")&&Zt(e.maxLength)}function UK(e){return de(e,"maxProperties")&&Zt(e.maxProperties)}function FK(e){return de(e,"minimum")&&(Zt(e.minimum)||Ms(e.minimum))}function h$(e){return de(e,"minContains")&&Zt(e.minContains)}function GK(e){return de(e,"minItems")&&Zt(e.minItems)}function VK(e){return de(e,"minLength")&&Zt(e.minLength)}function WK(e){return de(e,"minProperties")&&Zt(e.minProperties)}function KK(e){return de(e,"multipleOf")&&(Zt(e.multipleOf)||Ms(e.multipleOf))}function XK(e){return de(e,"not")&&ht(e.not)}function ZK(e){return de(e,"oneOf")&&Ve(e.oneOf)&&e.oneOf.every(t=>ht(t))}function YK(e){return de(e,"pattern")&&(It(e.pattern)||e.pattern instanceof RegExp)}function x$(e){return de(e,"patternProperties")&&yt(e.patternProperties)&&Object.values(e.patternProperties).every(t=>ht(t))}function p$(e){return de(e,"prefixItems")&&Ve(e.prefixItems)&&e.prefixItems.every(t=>ht(t))}function g$(e){return de(e,"properties")&&yt(e.properties)&&Object.values(e.properties).every(t=>ht(t))}function QK(e){return de(e,"propertyNames")&&(yt(e.propertyNames)||ht(e.propertyNames))}function JK(e){return de(e,"$recursiveAnchor")&&ya(e.$recursiveAnchor)}function L0(e){return JK(e)&&xe(e.$recursiveAnchor,!0)}function eX(e){return de(e,"$recursiveRef")&&It(e.$recursiveRef)}function tX(e){return de(e,"$ref")&&It(e.$ref)}function m$(e){return de(e,"required")&&Ve(e.required)&&e.required.every(t=>It(t))}function nX(e){return de(e,"then")&&ht(e.then)}function sX(e){return de(e,"type")&&(It(e.type)||Ve(e.type)&&e.type.every(t=>It(t)))}function rX(e){return de(e,"uniqueItems")&&ya(e.uniqueItems)}function iX(e){return de(e,"unevaluatedItems")&&ht(e.unevaluatedItems)}function oX(e){return de(e,"unevaluatedProperties")&&ht(e.unevaluatedProperties)}class jc{constructor(){const t=new Set,n=new Set;this.stack=[{indices:t,keys:n}]}Push(){const t=new Set,n=new Set;return this.stack.push({indices:t,keys:n}),!0}Pop(){return this.stack.pop(),!0}AddIndex(t){return this.GetIndices().add(t),!0}AddKey(t){return this.GetKeys().add(t),!0}GetIndices(){return this.stack[this.stack.length-1].indices}GetKeys(){return this.stack[this.stack.length-1].keys}Merge(t){for(const n of t)n.GetIndices().forEach(s=>this.GetIndices().add(s)),n.GetKeys().forEach(s=>this.GetKeys().add(s));return!0}}function aX(e,t,n,s){return fn(n["~refine"],0,(r,i)=>r.check(s))}function lX(e){return Db(e)&&Ve(e.items)}function cX(e,t,n,s){return lX(n)?fn(s,0,(i,o)=>t$(o,n.items.length)||ba(e,t,n.additionalItems,i)&&t.AddIndex(o)):!0}function Bb(e){return new RegExp(e,"u")}function uX(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function dX(e){const t=[];return x$(e)&&t.push(..._t(e.patternProperties)),g$(e)&&t.push(..._t(e.properties).map(uX)),xe(t.length,0)?"(?!)":`(${t.join("|")})`}function fX(e,t,n,s){const r=Bb(dX(n));return fn(_t(s),0,(o,l)=>r.test(o)||ba(e,t,n.additionalProperties,s[o])&&t.AddKey(o))}function hX(e,t,n,s){const r=n.allOf.reduce((i,o)=>{const l=new jc;return Et(e,l,o,s)?[...i,l]:i},[]);return xe(r.length,n.allOf.length)&&t.Merge(r)}function xX(e,t,n,s){const r=n.anyOf.reduce((i,o)=>{const l=new jc;return Et(e,l,o,s)?[...i,l]:i},[]);return e$(r.length,0)&&t.Merge(r)}function pX(e,t,n,s){return n}function gX(e,t,n,s){return n$(n.const)?xe(s,n.const):D1(s,n.const)}function mX(e){return!(h$(e)&&xe(e.minContains,0))}function yX(e,t,n,s){return mX(n)?!xe(s.length,0)&&wW(s,(r,i)=>Et(e,t,n.contains,r)&&t.AddIndex(i)):!0}function kX(e,t,n,s){const r=xe(_t(s).length,0),i=fn(ra(n.dependencies),0,([o,l])=>!de(s,o)||(Ve(l)?l.every(c=>de(s,c)):Et(e,t,l,s)));return r||i}function bX(e,t,n,s){const r=xe(_t(s).length,0),i=fn(ra(n.dependentRequired),0,([o,l])=>!de(s,o)||l.every(c=>de(s,c)));return r||i}function vX(e,t,n,s){const r=xe(_t(s).length,0),i=fn(ra(n.dependentSchemas),0,([o,l])=>!de(s,o)||Et(e,t,l,s));return r||i}function wX(e,t,n,s){const r=e.DynamicRef(n)??!1;return ht(r)&&Et(e,t,r,s)}function jX(e,t,n,s){return s$(n.enum,r=>n$(r)?xe(s,r):D1(s,r))}function SX(e,t,n,s){return t$(s,n.exclusiveMaximum)}function CX(e,t,n,s){return e$(s,n.exclusiveMinimum)}const $X=[0,31,28,31,30,31,30,31,31,30,31,30,31],EX=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function TX(e){return e%4===0&&(e%100!==0||e%400===0)}function y$(e){const t=EX.exec(e);if(!t)return!1;const n=+t[1],s=+t[2],r=+t[3];return s>=1&&s<=12&&r>=1&&r<=(s===2&&TX(n)?29:$X[s])}const NX=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function k$(e,t=!0){const n=NX.exec(e);if(!n||t&&!n[4]&&!n[5])return!1;const s=+n[1],r=+n[2],i=+n[3];if(s>23||r>59||i>60)return!1;if(n[5]){const d=+n[6],h=+n[7];if(d>23||h>59)return!1}if(i<60)return!0;const o=n[5]==="-"?-1:1,l=+(n[6]||0),c=+(n[7]||0);return((s*60+r-o*(l*60+c))%1440+1440)%1440===1439}function AX(e){const t=e.split(/T/i);return t.length===2&&y$(t[0])&&k$(t[1])}const MX=/^P((\d+Y(\d+M(\d+D)?)?|\d+M(\d+D)?|\d+D)(T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S))?|T(\d+H(\d+M(\d+S)?)?|\d+M(\d+S)?|\d+S)|\d+W)$/;function zX(e){return MX.test(e)}const RX=/^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[^"\\]|\\[\x20-\x7e])*")@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*|\[(?:IPv6:[a-f0-9:]+|(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?:\.(?:25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3})\])$/i;function IX(e){return RX.test(e)}const _X=new RegExp("^(?!-).*(?<!-)$"),LX=/^(?!..--)/,OX=/^[a-zA-Z0-9-]*$/,qb=/[^\p{ASCII}]/u,DX=/[0-9]/,BX=/[\u{0660}-\u{0669}]/u,qX=/[\u{06f0}-\u{06f9}]/u,HX=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,PX=/[\u{002d}\u{002b}]/u,b$=new RegExp("\\p{Mn}","u"),UX=new RegExp("\\p{Mc}","u"),FX=/[\p{Mn}\p{Mc}\p{Me}]/u,v$=new RegExp("\\p{L}","u"),GX=new RegExp("\\p{Nd}","u"),VX=new RegExp("\\p{Script=Greek}","u"),w$=new RegExp("\\p{Script=Hebrew}","u"),WX=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,KX=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,f3=/[\u{094d}\u{09cd}\u{0a4d}\u{0acd}\u{0b4d}\u{0bcd}\u{0c4d}\u{0ccd}\u{0d3b}\u{0d3c}\u{0d4d}\u{0dca}\u{1b44}\u{1baa}\u{1bab}\u{a9c0}\u{11046}\u{1107f}\u{110b9}\u{11133}\u{11134}\u{111c0}\u{11235}\u{1134d}\u{11442}\u{114c2}\u{115bf}\u{1163f}\u{116b6}\u{11c3f}\u{11d44}\u{11d45}]/u,XX=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,ZX=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,YX=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,QX=new RegExp([DX,qX].map(e=>e.source).join("|"),"u"),JX=new RegExp([v$,PX,HX,GX,b$,UX,ZX,YX].map(e=>e.source).join("|"),"u");function eZ(e){return _X.test(e)&&LX.test(e)&&OX.test(e)}const Gs=36,Cu=1,rd=26,tZ=38,nZ=700,j$=72,S$=128;function vg(){throw null}function C$(e){return e.toLowerCase().startsWith("xn--")}function $$(e,t,n){e=n?Math.floor(e/nZ):e>>1,e+=Math.floor(e/t);let s=0;for(;e>(Gs-Cu)*rd>>1;)e=Math.floor(e/(Gs-Cu)),s+=Gs;return s+Math.floor((Gs-Cu+1)*e/(e+tZ))}function E$(e){const t=[];let n=S$,s=0,r=j$;const i=e.lastIndexOf("-");if(i>0)for(let l=0;l<i;l++){const c=e.charCodeAt(l);c>=128&&vg(),t.push(c)}let o=i<0?0:i+1;for(;o<e.length;){const l=s;let c=1,u=Gs;for(;;){o>=e.length&&vg();const h=e.charCodeAt(o++);let f;h>=97&&h<=122?f=h-97:h>=48&&h<=57?f=h-48+26:vg(),s+=f*c;const p=u<=r?Cu:u>=r+rd?rd:u-r;if(f<p)break;c*=Gs-p,u+=Gs}const d=t.length+1;r=$$(s-l,d,l===0),n+=Math.floor(s/d),s%=d,t.splice(s,0,n),s++}return String.fromCodePoint(...t)}function h3(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}const sZ=new RegExp(qb.source,"gu");function rZ(e){const t=e.replace(sZ,""),n=t.length,s=n>0?[t,"-"]:[],r=Array.from(e,u=>u.codePointAt(0));let i=S$,o=0,l=j$,c=n;for(;c<r.length;){let u=1/0;for(const d of r)d>=i&&d<u&&(u=d);o+=(u-i)*(c+1),i=u;for(const d of r)if(d<i&&o++,d===i){let h=o;for(let f=Gs;;f+=Gs){const p=f<=l?Cu:f>=l+rd?rd:f-l;if(h<p)break;const g=p+(h-p)%(Gs-p);s.push(h3(g)),h=Math.floor((h-p)/(Gs-p))}s.push(h3(h)),l=$$(o,c+1,c===n),o=0,c++}o++,i++}return s.join("")}const iZ=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,x3=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,oZ=/^(?:R|AL|AN)$/;function aZ(e){if(C$(e))try{return O0(E$(e.slice(4).toLowerCase()))}catch{return!1}return O0(e)}function T$(e){const t=String.fromCodePoint(e);return QX.test(t)?"EN":BX.test(t)?"AN":b$.test(t)?"NSM":w$.test(t)?"R":KX.test(t)?"AL":v$.test(t)?"L":"ON"}function O0(e){for(const t of e)if(oZ.test(T$(t.codePointAt(0))))return!0;return!1}function N$(e){let t=!1,n=x3,s=!1,r=!1,i=!0;for(const o of e){const l=T$(o.codePointAt(0));if(i){if(l!=="L"&&l!=="R"&&l!=="AL")return!1;t=l==="R"||l==="AL",n=t?iZ:x3,i=!1}if(!n.test(l))return!1;l==="EN"?s=!0:l==="AN"&&(r=!0)}return!(t&&s&&r)}function lZ(e){return qb.test(e)&&rZ(e).length+4>63}function cZ(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function A$(e){if(lZ(e)||O0(e)&&!N$(e))return!1;const t=[...e],n=t.map(i=>i.codePointAt(0)),s=n.length;if(cZ(t)||FX.test(t[0]))return!1;let r=!1;for(let i=0;i<s;i++){const o=n[i],l=t[i];if(XX.test(l)||!JX.test(l))return!1;WX.test(l)&&(r=!0);const c=n[i-1],u=n[i+1];switch(o){case 183:if(c!==108||u!==108)return!1;break;case 885:if(!u||!VX.test(t[i+1]))return!1;break;case 1523:case 1524:if(!c||!w$.test(t[i-1]))return!1;break;case 8204:if(!c||c<128&&!f3.test(t[i-1]))return!1;break;case 8205:if(!c||!f3.test(t[i-1]))return!1;break}}return!(e.includes("・")&&!r)}function M$(e){if(!C$(e))return!1;try{const t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;const n=E$(t);return qb.test(n)?A$(n):!1}catch{return!1}}function uZ(e){return e.length>0&&e.length<=63}function dZ(e){return uZ(e)&&(M$(e)||eZ(e))}function fZ(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>dZ(t))}function hZ(e){return e.length>0&&e.length<=63}function xZ(e){return hZ(e)&&(M$(e)||A$(e))}function pZ(e){return e.replace(/[\uff01-\uff5e]/g,t=>String.fromCharCode(t.charCodeAt(0)-65248)).normalize("NFC").replace(/[\u00ad\u034f\u180b-\u180d\u200b\ufe00-\ufe0f\u{e0100}-\u{e01ef}]/gu,"").replace(/[\u002E\u3002\uFF0E\uFF61]/g,".")}function gZ(e){if(e.length===0||e.includes(" "))return!1;const t=pZ(e);if(t.length>253)return!1;const n=t.split("."),s=n.some(r=>aZ(r));return n.every(r=>xZ(r)&&(!s||N$(r)))}function mZ(e){return fZ(e)}const yZ=new RegExp('^(?:[A-Za-z0-9!#$%&\'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+(?:\\.[A-Za-z0-9!#$%&\'*+\\/=?^_`{|}~\\u{0080}-\\u{10FFFF}-]+)*|"(?:[^"\\\\]|\\\\.)*")@[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-)(?:\\.[\\p{L}\\p{N}](?:[\\p{L}\\p{N}-]{0,62})(?<!-))*$',"iu");function kZ(e){return yZ.test(e.normalize("NFC"))}function bZ(e){return gZ(e)}const vZ=/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/;function wZ(e){return vZ.test(e)}const jZ=/^(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:)?[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)$/i;function SZ(e){return jZ.test(e)}const CZ=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,$Z=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function EZ(e){return!CZ.test(e)&&!$Z.test(e)&&URL.canParse(e,"http://example.com")}const TZ=2048,NZ=/\[[vV][0-9a-fA-F]+\.[^\]]+\]/,AZ=/[\x00-\x20<>\^`{|}\\]/,MZ=/%(?![0-9a-fA-F]{2})/;function zZ(e){return e.length<TZ?e.replace(NZ,"[::1]"):e}function RZ(e){return AZ.test(e)||MZ.test(e)?!1:URL.canParse(zZ(e))}const IZ=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function _Z(e){return IZ.test(e)}const LZ=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function OZ(e){return LZ.test(e)}function DZ(e){try{return new RegExp(e,"u"),!0}catch{return!1}}const BZ=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function qZ(e){return BZ.test(e)}const HZ=/^(?:[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?)(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function PZ(e){return HZ.test(e)}const UZ=/^(?:(?:[^\x00-\x20"<>%\\^`{|}\x7f]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?:\.(?:[a-z0-9_]|%[0-9a-f]{2})+)*(?::[1-9]\d{0,3}|\*)?)*\})*$/i;function FZ(e){return UZ.test(e)}const GZ=/^[a-z][a-z0-9+\-.]*:(?:\/\/(?:(?:[-a-z0-9._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:[\da-f]{1,4}:){6}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|::(?:[\da-f]{1,4}:){5}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:[\da-f]{1,4})?::(?:[\da-f]{1,4}:){4}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,1}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){3}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,2}[\da-f]{1,4})?::(?:[\da-f]{1,4}:){2}(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,3}[\da-f]{1,4})?::[\da-f]{1,4}:(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,4}[\da-f]{1,4})?::(?:[\da-f]{1,4}:[\da-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d))|(?:(?:[\da-f]{1,4}:){0,5}[\da-f]{1,4})?::[\da-f]{1,4}|(?:(?:[\da-f]{1,4}:){0,6}[\da-f]{1,4})?::)|v[0-9a-f]+\.[-a-z0-9._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)|(?:[-a-z0-9._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[-a-z0-9._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[-a-z0-9._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function VZ(e){return GZ.test(e)}function WZ(e){return URL.canParse(e)}const KZ=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function XZ(e){return KZ.test(e)}const dt=new Map;function ZZ(){dt.clear()}function YZ(e,t){var n;return((n=dt.get(e))==null?void 0:n(t))??!0}function QZ(){ZZ(),dt.set("date-time",AX),dt.set("date",y$),dt.set("duration",zX),dt.set("email",IX),dt.set("hostname",mZ),dt.set("idn-email",kZ),dt.set("idn-hostname",bZ),dt.set("ipv4",wZ),dt.set("ipv6",SZ),dt.set("iri-reference",EZ),dt.set("iri",RZ),dt.set("json-pointer-uri-fragment",_Z),dt.set("json-pointer",OZ),dt.set("regex",DZ),dt.set("relative-json-pointer",qZ),dt.set("time",k$),dt.set("uri-reference",PZ),dt.set("uri-template",FZ),dt.set("uri",VZ),dt.set("url",WZ),dt.set("uuid",XZ)}QZ();function JZ(e,t,n,s){return YZ(n.format,s)}function eY(e,t,n,s){const r=nX(n)?n.then:!0,i=zK(n)?n.else:!0;return Et(e,t,n.if,s)?Et(e,t,r,s):Et(e,t,i,s)}function tY(e,t,n,s){return fn(n.items,0,(r,i)=>wc(s.length,i)||ba(e,t,r,s[i])&&t.AddIndex(i))}function nY(e,t,n,s){const r=p$(n)?n.prefixItems.length:0;return fn(s,r,(i,o)=>ba(e,t,n.items,i)&&t.AddIndex(o))}function sY(e,t,n,s){return DK(n)?tY(e,t,n,s):nY(e,t,n,s)}function rY(e){return Ob(e)}function iY(e,t,n,s){if(!rY(n))return!0;const r=r$(s,i=>Et(e,t,n.contains,i));return wc(r,n.maxContains)}function oY(e,t,n,s){return wc(s,n.maximum)}function aY(e,t,n,s){return wc(s.length,n.maxItems)}function lY(e,t,n,s){return bW(s,n.maxLength)}function cY(e,t,n,s){return wc(_t(s).length,n.maxProperties)}function uY(e){return Ob(e)}function dY(e,t,n,s){if(!uY(n))return!0;const r=r$(s,(i,o)=>Et(e,t,n.contains,i)&&t.AddIndex(o));return L1(r,n.minContains)}function fY(e,t,n,s){return L1(s,n.minimum)}function hY(e,t,n,s){return L1(s.length,n.minItems)}function xY(e,t,n,s){return vW(s,n.minLength)}function pY(e,t,n,s){return L1(_t(s).length,n.minProperties)}function gY(e,t,n,s){return yW(s,n.multipleOf)}function mY(e,t,n,s){const r=new jc;return!Et(e,r,n.not,s)&&t.Merge([r])}function yY(e,t,n,s){const r=n.oneOf.reduce((i,o)=>{const l=new jc;return Et(e,l,o,s)?[...i,l]:i},[]);return xe(r.length,1)&&t.Merge(r)}function kY(e,t,n,s){return(It(n.pattern)?Bb(n.pattern):n.pattern).test(s)}function bY(e,t,n,s){return fn(ra(n.patternProperties),0,([r,i])=>{const o=Bb(r);return fn(ra(s),0,([l,c])=>!o.test(l)||ba(e,t,i,c)&&t.AddKey(l))})}function vY(e,t,n,s){return xe(s.length,0)||fn(n.prefixItems,0,(r,i)=>wc(s.length,i)||ba(e,t,r,s[i])&&t.AddIndex(i))}function wY(e,t){return e.includes(t)||a$().exactOptionalPropertyTypes}function jY(e,t){return $t(e[t])}function SY(e,t,n,s){const r=m$(n)?n.required:[];return fn(ra(n.properties),0,([o,l])=>{const c=!de(s,o)||ba(e,t,l,s[o])&&t.AddKey(o);return wY(r,o)?c:jY(s,o)||c})}function CY(e,t,n,s){return fn(_t(s),0,(r,i)=>Et(e,t,n.propertyNames,r))}function $Y(e,t,n,s){const r=e.RecursiveRef(n)??!1;return ht(r)&&Et(e,t,r,s)}function EY(e,t,n,s){const r=e.Ref(n)??!1,i=new jc,o=ht(r)&&Et(e,i,r,s);return o&&t.Merge([i]),o}function TY(e,t,n,s){return fn(n.required,0,r=>de(s,r))}function z$(e,t,n,s,r){return xe(n,"object")?mW(r):xe(n,"array")?Ve(r):xe(n,"boolean")?ya(r):xe(n,"integer")?QC(r):xe(n,"number")?Zt(r):xe(n,"null")?Od(r):xe(n,"string")?It(r):xe(n,"bigint")?Ms(r):xe(n,"constructor")?YC(r):xe(n,"function")?sd(r):xe(n,"symbol")?JC(r):xe(n,"undefined")||xe(n,"void")?$t(r):!0}function NY(e,t,n,s,r){return s$(n,i=>z$(e,t,i,s,r))}function AY(e,t,n,s){return Ve(n.type)?NY(e,t,n.type,n,s):z$(e,t,n.type,n,s)}function MY(e,t,n,s){const r=t.GetIndices();return fn(s,0,(i,o)=>(r.has(o)||Et(e,t,n.unevaluatedItems,i))&&t.AddIndex(o))}function zY(e,t,n,s){const r=t.GetKeys();return fn(ra(s),0,([i,o])=>r.has(i)||Et(e,t,n.unevaluatedProperties,o)&&t.AddKey(i))}function RY(e){return!xe(e.uniqueItems,!1)}function IY(e,t,n,s){if(!RY(n))return!0;const r=new Set(s.map(gK)).size,i=s.length;return xe(r,i)}function ba(e,t,n,s){return t.Push()&&Et(e,t,n,s)&&t.Pop()}function Et(e,t,n,s){e.Push(n);const r=Ox(n)?pX(e,t,n):(!sX(n)||AY(e,t,n,s))&&(!(yt(s)&&!Ve(s))||(!m$(n)||TY(e,t,n,s))&&(!SK(n)||fX(e,t,n,s))&&(!TK(n)||kX(e,t,n,s))&&(!NK(n)||bX(e,t,n,s))&&(!AK(n)||vX(e,t,n,s))&&(!x$(n)||bY(e,t,n,s))&&(!g$(n)||SY(e,t,n,s))&&(!QK(n)||CY(e,t,n,s))&&(!WK(n)||pY(e,t,n,s))&&(!UK(n)||cY(e,t,n,s)))&&(!Ve(s)||(!jK(n)||cX(e,t,n,s))&&(!Ob(n)||yX(e,t,n,s))&&(!Db(n)||sY(e,t,n,s))&&(!qK(n)||iY(e,t,n,s))&&(!HK(n)||aY(e,t,n,s))&&(!h$(n)||dY(e,t,n,s))&&(!GK(n)||hY(e,t,n,s))&&(!p$(n)||vY(e,t,n,s))&&(!rX(n)||IY(e,t,n,s)))&&(!It(s)||(!PK(n)||lY(e,t,n,s))&&(!VK(n)||xY(e,t,n,s))&&(!LK(n)||JZ(e,t,n,s))&&(!YK(n)||kY(e,t,n,s)))&&(!(Zt(s)||Ms(s))||(!IK(n)||SX(e,t,n,s))&&(!_K(n)||CX(e,t,n,s))&&(!BK(n)||oY(e,t,n,s))&&(!FK(n)||fY(e,t,n,s))&&(!KK(n)||gY(e,t,n,s)))&&(!tX(n)||EY(e,t,n,s))&&(!eX(n)||$Y(e,t,n,s))&&(!MK(n)||wX(e,t,n,s))&&(!EK(n)||gX(e,t,n,s))&&(!RK(n)||jX(e,t,n,s))&&(!OK(n)||eY(e,t,n,s))&&(!XK(n)||mY(e,t,n,s))&&(!CK(n)||hX(e,t,n,s))&&(!$K(n)||xX(e,t,n,s))&&(!ZK(n)||yY(e,t,n,s))&&(!iX(n)||!Ve(s)||MY(e,t,n,s))&&(!oX(n)||!yt(s)||zY(e,t,n,s))&&(!wK(n)||aX(e,t,n,s));return e.Pop(n),r}function _Y(e,t){return yt(t)&&!O1(e)?t[e]:void 0}function LY(e,t){return e.reduce((n,s)=>_Y(s,n),t)}function OY(e){if(xe(e.length,0))return[];const t=e.split("/").map(n=>n.replace(/~1/g,"/").replace(/~0/g,"~"));return t.length>0&&t[0]===""?t.slice(1):t}function DY(e,t){const n=OY(t);return LY(n,e)}const q1="https://json-schema.org";function R$(e,t){if(yt(e)&&oa(e)&&xe(e.$dynamicAnchor,t))return e;if(yt(e))for(const n of _t(e)){const s=R$(e[n],t);if(s)return s}}function D0(e,t,n){if(xe(e,n))return t.href;const s=us(e)&&Ws(e)?new URL(e.$id,t.href):t;if(Ve(e))for(const r of e){const i=D0(r,s,n);if(!$t(i))return i}else if(yt(e))for(const r of _t(e)){const i=D0(e[r],s,n);if(!$t(i))return i}}function BY(e,t,n){if(xe(e.$id,n.hash))return e;const s=new URL(n.href,t.href);if(xe(t.pathname,s.pathname))return n.hash.startsWith("#")?I$(e,n):e}function qY(e,t,n){const s=new URL(`#${e.$anchor}`,t.href),r=new URL(n.href,t.href);return xe(s.href,r.href)?e:void 0}function HY(e,t,n){const s=new URL(`#${e.$dynamicAnchor}`,t.href),r=new URL(n.href,t.href);return xe(s.href,r.href)?e:void 0}function I$(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;const n=decodeURIComponent(t.hash.slice(1));return n.startsWith("/")?DY(e,n):void 0}function PY(e,t,n){if(Ws(e)){const s=BY(e,t,n);if(!$t(s))return s}if(_0(e)){const s=qY(e,t,n);if(!$t(s))return s}if(oa(e)){const s=HY(e,t,n);if(!$t(s))return s}return I$(e,n)}function UY(e,t,n){return e.reduce((s,r)=>{const i=H1(r,t,n);return $t(i)?s:i},void 0)}function FY(e){return xe(e,"const")||xe(e,"enum")}function GY(e,t,n){return _t(e).reduce((s,r)=>{if(FY(r))return s;const i=H1(e[r],t,n);return $t(i)?s:i},void 0)}function H1(e,t,n){const s=us(e)&&Ws(e)?new URL(e.$id,t.href):t;if(us(e)){const r=PY(e,s,n);if(!$t(r))return r}if(Ve(e))return UY(e,s,n);if(yt(e))return GY(e,s,n)}function VY(e,t,n){return D0(e,new URL(t||".",q1),n)}function WY(e,t,n,s){const r=P1(e,t,n,s,!1);return us(r)&&Ws(r)?r:void 0}function p3(e){return e.href.split("#")[0]}function KY(e,t){return de(e,t)?e[t]:void 0}function XY(e,t,n){return H1(e,t,n)}function ZY(e,t,n){const s=p3(n);if(xe(s,p3(t))||!de(e,s))return;const r=e[s],i=us(r)&&Ws(r)?new URL(r.$id,s):new URL(s);return xe(n.hash,"")?r:H1(r,i,n)}function YY(e,t,n,s,r){if(!s.$ref.startsWith("#")||de(e,"$schema"))return;const i=VY(t,n,r);if(!($t(i)||xe(i,n)))return{target:r,base:i,root:t}}function QY(e,t,n){const s=e[t];if(us(s))return{target:n,base:t,root:s}}function JY(e,t,n,s,r){const i=r?QY(e.context,s,n):void 0;return $t(i)?YY(e.root,e.lexicalSchema,e.referenceBase,t,n):i}function eQ(e,t,n,s,r,i){if(Ws(r))return;const o=WY(e,t,n,s);if(!(!o||i.includes(o)))return{target:r,resource:o}}function P1(e,t,n,s,r=!0){const i=new URL(n||".",q1),o=r&&Ws(t)?new URL(t.$id,i):i,l=new URL(s,o.href);return KY(e,s)??XY(t,o,l)??ZY(e,o,l)}function tQ(e,t,n,s,r,i){const o=new URL(n||".",q1),l=r.$dynamicRef.startsWith("#")?s:t,c=P1(e,l,n,r.$dynamicRef,!1);if($t(c)){const h=new URL(r.$dynamicRef,o).hash;if(!h.startsWith("#/")&&h.startsWith("#")){const f=decodeURIComponent(h.slice(1));return i.find(g=>xe(g.$dynamicAnchor,f))??R$(t,f)}return}return!us(c)||!oa(c)||new URL(r.$dynamicRef,o).hash.startsWith("#/")?c:i.find(h=>xe(h.$dynamicAnchor,c.$dynamicAnchor))??c}function nQ(e,t){const n=e.inRetrievedFrame?e.lexicalSchema:e.root,s=t.$ref.startsWith("#")?e.lexicalSchema:n,r=P1(e.context,s,e.referenceBase,t.$ref,!1);if(!r||!us(r))return{schema:r};const i=new URL(t.$ref,e.referenceBase).href.split("#")[0],o=!xe(i,e.resourceBase),l=JY(e,t,r,i,o),c=o?eQ(e.context,e.root,e.referenceBase,i,r,e.ids):void 0;return{schema:r,retrievedResource:l,resolvedResource:c}}function sQ(e,t){const n=L0(e.lexicalSchema)?e.recursiveAnchors[0]:e.lexicalSchema;return P1(e.context,n,e.lexicalBase,t.$recursiveRef,!1)}function rQ(e,t){return tQ(e.context,e.root,e.lexicalBase,e.lexicalSchema,t,e.dynamicAnchors)}var st=function(e,t,n,s){if(n==="a"&&!s)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?s:n==="a"?s.call(e):s?s.value:t.get(e)},Ze,$h,_$,B0,Gf,g3,m3,y3,k3,wg,jg,q0,H0,b3,L$;class iQ{constructor(t,n){Ze.add(this),this.context=t,this.schema=n,this.ids=[],this.resourceIds=[],this.anchors=[],this.recursiveAnchors=[],this.dynamicAnchors=[],this.retrievedResources=new Map,this.retrievedFrames=[],this.resolvedResources=new Map,this.pendingResource=!0}LexicalBaseURL(){return st(this,Ze,"m",B0).call(this,this.ids)}Push(t){if(!us(t))return;Ws(t)&&st(this,Ze,"m",q0).call(this,t),_0(t)&&this.anchors.push(t),L0(t)&&this.recursiveAnchors.push(t),oa(t)&&this.dynamicAnchors.push(t);const n=this.retrievedResources.get(t);n&&this.retrievedFrames.push({schema:n.root,base:n.base,idDepth:this.ids.length,resourceDepth:this.resourceIds.length})}Pop(t){us(t)&&(Ws(t)&&st(this,Ze,"m",H0).call(this,t),_0(t)&&this.anchors.pop(),L0(t)&&this.recursiveAnchors.pop(),oa(t)&&this.dynamicAnchors.pop(),this.retrievedResources.has(t)&&this.retrievedFrames.pop(),st(this,Ze,"m",L$).call(this,t))}Ref(t){const n=nQ(st(this,Ze,"m",$h).call(this),t);return st(this,Ze,"m",_$).call(this,n),n.schema}RecursiveRef(t){const n=sQ(st(this,Ze,"m",$h).call(this),t);return n&&(this.pendingResource=!0),n}DynamicRef(t){const n=rQ(st(this,Ze,"m",$h).call(this),t);return n&&(this.pendingResource=!0),n}}Ze=new WeakSet,$h=function(){return{context:this.context,root:this.schema,ids:this.ids,lexicalSchema:st(this,Ze,"m",m3).call(this),lexicalBase:this.LexicalBaseURL(),referenceBase:st(this,Ze,"m",g3).call(this),resourceBase:st(this,Ze,"m",Gf).call(this),recursiveAnchors:this.recursiveAnchors,dynamicAnchors:this.dynamicAnchors,inRetrievedFrame:this.retrievedFrames.length>0}},_$=function(t){$t(t.schema)||(this.pendingResource=!0),$t(t.resolvedResource)||st(this,Ze,"m",b3).call(this,t.resolvedResource.target,t.resolvedResource.resource),$t(t.retrievedResource)||this.retrievedResources.set(t.retrievedResource.target,{base:t.retrievedResource.base,root:t.retrievedResource.root})},B0=function(t){const n=this.retrievedFrames[this.retrievedFrames.length-1],s=n?new URL(n.base):new URL(q1);return(n?t.slice(n.idDepth):t).reduce((i,o)=>new URL(o.$id,i),s).href},Gf=function(){const t=this.retrievedFrames[this.retrievedFrames.length-1];return t?this.resourceIds.slice(t.resourceDepth).reduce((n,s)=>new URL(s.$id,n),new URL(t.base)).href:st(this,Ze,"m",B0).call(this,this.resourceIds)},g3=function(){if(this.retrievedFrames.length>0)return st(this,Ze,"m",Gf).call(this);const t=this.ids[this.ids.length-1];return t&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(t.$id)?this.LexicalBaseURL():st(this,Ze,"m",Gf).call(this)},m3=function(){const t=this.retrievedFrames[this.retrievedFrames.length-1];return t?this.ids.length>t.idDepth?this.ids[this.ids.length-1]:t.schema:this.ids.length>0?this.ids[this.ids.length-1]:this.schema},y3=function(t){t.forEach(n=>st(this,Ze,"m",wg).call(this,n,!1))},k3=function(t){t.forEach(n=>st(this,Ze,"m",jg).call(this,n,!1))},wg=function e(t,n=!0){if(Ox(t))return;if(Ve(t))return st(this,Ze,"m",y3).call(this,t);if(!us(t))return;const s=t;if(!(!n&&Ws(s))){!n&&oa(s)&&this.dynamicAnchors.push(s);for(const r of _t(s))st(this,Ze,"m",e).call(this,s[r],!1)}},jg=function e(t,n=!0){if(Ox(t))return;if(Ve(t))return st(this,Ze,"m",k3).call(this,t);if(!us(t))return;const s=t;if(!(!n&&Ws(s))){!n&&oa(s)&&this.dynamicAnchors.pop();for(const r of _t(s))st(this,Ze,"m",e).call(this,s[r],!1)}},q0=function(t){this.ids.push(t);const n=this.pendingResource;this.pendingResource=!1,n&&this.resourceIds.push(t),st(this,Ze,"m",wg).call(this,t,!0)},H0=function(t){this.ids.pop(),this.resourceIds.length>0&&xe(this.resourceIds[this.resourceIds.length-1],t)&&this.resourceIds.pop(),st(this,Ze,"m",jg).call(this,t,!0)},b3=function(t,n){st(this,Ze,"m",q0).call(this,n),this.resolvedResources.set(t,n)},L$=function(t){if(!this.resolvedResources.has(t))return;const n=this.resolvedResources.get(t);st(this,Ze,"m",H0).call(this,n),this.resolvedResources.delete(t)};function oQ(...e){const[t,n,s]=c$(e,{3:(o,l,c)=>[o,l,c],2:(o,l)=>[{},o,l]}),r=new iQ(t,n),i=new jc;return Et(r,i,n,s)}function Vf(...e){const[t,n,s]=c$(e,{3:(r,i,o)=>[r,i,o],2:(r,i)=>[{},r,i]});return oQ(t,n,s)}BigInt(Number.MAX_SAFE_INTEGER);BigInt(Number.MIN_SAFE_INTEGER);const aQ=An({type:es("insert"),path:gn(),value:Lb()}),lQ=Object({type:es("update"),path:gn(),value:Lb()}),cQ=An({type:es("delete"),path:gn()});B1([aQ,lQ,cQ]);const uQ=An({text:gn({minLength:1}),status:B1([es("pending"),es("in_progress"),es("completed")])}),dQ=An({items:ka(uQ)}),fQ=An({label:gn({minLength:1}),description:Pr(gn())}),hQ=An({question:gn({minLength:1}),header:gn({minLength:1,maxLength:16}),options:ka(fQ,{minItems:2,maxItems:4}),multiSelect:Pr(mK())}),xQ=An({selected:ka(gn()),other:Pr(gn())}),pQ=B1([An({outcome:es("answered"),answers:ka(xQ),at:wl()}),An({outcome:es("dismissed"),at:wl()}),An({outcome:es("cancelled"),at:wl()})]),gQ=An({id:gn({minLength:1}),questions:ka(hQ,{minItems:1,maxItems:4}),askedAt:wl(),resolution:Pr(pQ)}),mQ=An({requests:ka(gQ)}),yQ=An({patch:gn()}),kQ=An({id:Pr(wl()),name:gn(),args:gn(),status:B1([es("running"),es("ok"),es("error"),es("cancelled")]),durationMs:Pr(wl()),error:Pr(gn()),details:Pr(Lb())}),bQ=An({code:Pr(gn()),calls:ka(kQ)});function Sc(e,t){return e==="pinomad.todo"&&Vf(dQ,t)?{type:"pinomad.todo",value:t}:e==="pinomad.question"&&Vf(mQ,t)?{type:"pinomad.question",value:t}:e==="pinomad.diff"&&Vf(yQ,t)?{type:"pinomad.diff",value:t}:e==="pinomad.codemode"&&Vf(bQ,t)?{type:"pinomad.codemode",value:t}:{type:"fallback",value:t}}function vQ(e){return e.flatMap(t=>{const n=Sc(t.presentation,t.value);return n.type!=="pinomad.question"?[]:n.value.requests.filter(s=>s.resolution===void 0).map(s=>({kind:t.kind,request:s}))})}function wQ(e,t,n){return Array.from({length:e},(s,r)=>({selected:t[r]??[],...n[r]===void 0||n[r].trim()===""?{}:{other:n[r]}}))}const v3="cubic-bezier(0.32, 0.72, 0, 1)",w3=280,ou=()=>window.matchMedia("(prefers-reduced-motion: reduce)").matches;function jQ(e){const t=x.useRef(null),[n,s]=x.useState(0),r=x.useRef(n);r.current=n;const i=x.useRef(!1),o=x.useRef(null),l=x.useRef(!1),c=x.useRef(void 0),u=x.useCallback(b=>{var y,m;return((m=(y=t.current)==null?void 0:y.children[b])==null?void 0:m.offsetHeight)??0},[]),d=x.useCallback((b,y)=>{if(ou()||Math.abs(b.offsetHeight-y)<1){b.style.transition="",b.style.height=`${y}px`;return}b.style.height=`${b.offsetHeight}px`,b.style.transition=`height ${w3}ms ${v3}`,b.style.height=`${y}px`},[]),h=x.useCallback((b=!1)=>{const y=t.current;if(y===null||y.clientWidth===0||i.current)return;const m=Math.min(e-1,Math.max(0,y.scrollLeft/y.clientWidth)),k=Math.floor(m),w=u(k),v=u(Math.min(k+1,e-1)),j=w+(v-w)*(m-k);if(b&&l.current&&m===k){d(y,j);return}y.style.transition="",y.style.height=`${j}px`},[e,u,d]),f=x.useCallback(()=>{const b=t.current;o.current=null,b!==null&&!i.current&&s(Math.min(e-1,Math.max(0,Math.round(b.scrollLeft/Math.max(b.clientWidth,1)))))},[e]),p=x.useCallback(()=>{const b=t.current;if(b===null||b.clientWidth===0)return;window.clearTimeout(c.current),c.current=window.setTimeout(f,150),b.scrollTop!==0&&(b.scrollTop=0),h();const y=b.scrollLeft/b.clientWidth;if(o.current!==null){if(Math.abs(y-o.current)>.01)return;o.current=null}i.current||s(Math.min(e-1,Math.max(0,Math.round(y))))},[e,h,f]),g=x.useCallback(b=>{var v,j;const y=t.current;if(y===null)return;const m=Math.min(e-1,Math.max(0,b)),k=Math.abs(m-r.current);if(k<=1||ou()){k>0&&!ou()&&(o.current=m),y.scrollTo({left:m*y.clientWidth,behavior:ou()?"instant":"smooth"}),s(m);return}const w=Math.sign(m-r.current);i.current=!0,y.style.height=`${y.offsetHeight}px`,y.scrollTo({left:m*y.clientWidth,behavior:"instant"}),s(m),d(y,u(m)),(j=(v=y.children[m])==null?void 0:v.firstElementChild)==null||j.animate([{opacity:0,transform:`translateX(${w*24}px)`},{opacity:1,transform:"none"}],{duration:220,easing:v3}),window.setTimeout(()=>{i.current=!1,h(!0)},w3)},[e,u,d,h]);return x.useLayoutEffect(()=>h(),[h]),x.useEffect(()=>{let b=!0;return document.fonts.ready.then(()=>requestAnimationFrame(()=>{b&&(l.current=!0)})),()=>{b=!1}},[]),x.useEffect(()=>{const b=t.current;if(b===null)return;let y=b.clientWidth;const m=new ResizeObserver(()=>{if(b.clientWidth!==y){y=b.clientWidth,b.scrollTo({left:r.current*y,behavior:"instant"}),h();return}h(!0)});for(const k of b.children)m.observe(k);return b.addEventListener("scrollend",f),()=>{m.disconnect(),b.removeEventListener("scrollend",f),window.clearTimeout(c.current)}},[h,f]),{ref:t,index:n,go:g,onScroll:p}}const sr="\0other",SQ=250;function O$({docs:e,remote:t,connected:n,target:s}){const r=vQ(e);return r.length===0?null:a.jsx(fe,{gap:2,padding:2,"data-testid":"pending-questions",children:r.map(({kind:i,request:o})=>a.jsx(CQ,{kind:i,request:o,remote:t,connected:n,target:s},o.id))})}function CQ({kind:e,request:t,remote:n,connected:s,target:r}){const i=t.questions.length,[o,l]=x.useState(()=>t.questions.map(()=>[])),[c,u]=x.useState(()=>t.questions.map(()=>"")),[d,h]=x.useState(()=>t.questions.map(()=>!1)),[f,p]=x.useState(!1),g=x.useRef(!1),b=(N,R)=>l(L=>L.map((D,P)=>P===N?R:D)),y=(N,R)=>u(L=>L.map((D,P)=>P===N?R:D)),m=(N,R)=>h(L=>L.map((D,P)=>P===N?R:D)),k=N=>{var R;return(((R=o[N])==null?void 0:R.length)??0)>0||d[N]===!0&&(c[N]??"").trim()!==""},w=jQ(i),v=x.useRef(void 0);x.useEffect(()=>()=>window.clearTimeout(v.current),[]);const[j,C]=x.useState(null),$=w.index===i-1,T=t.questions.every((N,R)=>k(R)),A=$||T?"submit":k(w.index)?"next":"skip",S=j??A,_=()=>{window.clearTimeout(v.current),C(null)},M=N=>{_(),w.go(N)},z=x.useRef(null),O=()=>M(w.index+1),I=()=>{if(g.current||!s)return;g.current=!0,p(!0);const N=wQ(i,o,c.map((R,L)=>d[L]===!0?R:""));n.controller.answer(e,t.id,N,r).catch(()=>{g.current=!1,p(!1)})},E=N=>(R,L)=>{var D;if(L||((D=t.questions[N])==null?void 0:D.multiSelect)===!0||R===sr||N+1>=i){_();return}window.clearTimeout(v.current),C(P=>P??A),v.current=window.setTimeout(()=>{w.go(N+1),C(null)},ou()?0:SQ)};return a.jsxs("section",{className:"question-card","aria-label":"The agent asks",onKeyDown:EQ(w.index,M),children:[a.jsx("div",{ref:w.ref,className:"question-card__pager",onScroll:w.onScroll,onWheel:N=>{Math.abs(N.deltaX)>Math.abs(N.deltaY)&&_()},onTouchStart:N=>{var R;z.current=((R=N.touches[0])==null?void 0:R.clientX)??null},onTouchMove:N=>{var L;const R=(L=N.touches[0])==null?void 0:L.clientX;z.current!==null&&R!==void 0&&Math.abs(R-z.current)>8&&_()},children:t.questions.map((N,R)=>a.jsx("div",{className:"question-card__page",role:"group","aria-roledescription":"question","aria-label":`${R+1} of ${i}: ${N.header}`,inert:R!==w.index,children:a.jsx($Q,{question:N,selected:o[R]??[],other:c[R]??"",otherOn:d[R]===!0,onSelect:L=>b(R,L),onOther:L=>y(R,L),onOtherOn:L=>m(R,L),onPointerPick:E(R),onOtherEnter:R+1<i?O:I})},R))}),a.jsxs("div",{className:"question-card__footer",children:[a.jsx("div",{className:"question-card__back",children:w.index>0?a.jsx(ne,{label:"Back",variant:"ghost",onClick:()=>M(w.index-1)}):null}),i>1?a.jsx("div",{className:"question-card__segments",role:"tablist","aria-label":"Questions",children:t.questions.map((N,R)=>a.jsx("button",{type:"button",role:"tab",className:"question-card__segment","aria-selected":R===w.index,"aria-label":`${N.header}, ${k(R)?"answered":"not answered"}`,"data-current":R===w.index||void 0,"data-answered":k(R)||void 0,tabIndex:R===w.index?0:-1,onClick:()=>M(R)},R))}):a.jsx("span",{}),a.jsx("div",{className:"question-card__action","data-ghost":S==="skip"||void 0,children:S==="submit"?a.jsx(ne,{label:"Submit",variant:"primary",isDisabled:!s||f,onClick:I}):S==="next"?a.jsx(ne,{label:"Next",variant:"secondary",onClick:O}):a.jsx(ne,{label:"Skip",variant:"ghost",onClick:O})})]})]})}function $Q({question:e,selected:t,other:n,otherOn:s,onSelect:r,onOther:i,onOtherOn:o,onPointerPick:l,onOtherEnter:c}){const u=e.multiSelect===!0,d=x.useRef(Number.NEGATIVE_INFINITY),h=x.useRef(null),f=g=>{o(g),g&&requestAnimationFrame(()=>{var y;const b=(y=h.current)==null?void 0:y.querySelector("input");b==null||b.focus({preventScroll:!0}),b==null||b.setSelectionRange(b.value.length,b.value.length)})},p=g=>g.description===void 0||g.description===""?{}:{description:g.description};return a.jsxs(fe,{gap:1,children:[a.jsx(re,{type:"body",weight:"medium",className:"question-card__question",children:e.question}),a.jsx("div",{className:"question-card__options",onPointerDown:()=>{d.current=performance.now()},onClick:g=>{const b=g.target;if(!(b instanceof HTMLInputElement)||b.type!=="radio"||performance.now()-d.current>1e3)return;d.current=Number.NEGATIVE_INFINITY;const y=b.value===sr?s:t[0]===b.value;y&&(b.value===sr?o(!1):r([])),l(b.value,y)},children:u?a.jsxs(Vy,{label:e.header,isLabelHidden:!0,density:"compact",value:s?[...t,sr]:t,onChange:g=>{r(g.filter(b=>b!==sr)),g.includes(sr)!==s&&f(!s)},children:[e.options.map(g=>a.jsx(Fh,{label:g.label,value:g.label,...p(g)},g.label)),a.jsx(Fh,{label:"Other",value:sr})]}):a.jsxs(Lj,{label:e.header,isLabelHidden:!0,size:"sm",value:s?sr:t[0]??"",onChange:g=>{if(g===sr){r([]),f(!0);return}r([g]),o(!1)},children:[e.options.map(g=>a.jsx(Xg,{label:g.label,value:g.label,...p(g)},g.label)),a.jsx(Xg,{label:"Other",value:sr})]})}),s?a.jsx("div",{ref:h,className:"question-card__other",onKeyDown:g=>{g.key==="Enter"&&!g.nativeEvent.isComposing&&(g.preventDefault(),c())},children:a.jsx(ns,{label:"Other answer",isLabelHidden:!0,value:n,onChange:i,placeholder:"Your answer…"})}):null]})}function EQ(e,t){return n=>{if(!(n.target instanceof HTMLInputElement||n.target instanceof HTMLTextAreaElement)&&!(n.metaKey||n.ctrlKey||n.altKey)){if(n.key==="ArrowRight")t(e+1);else if(n.key==="ArrowLeft")t(e-1);else return;n.preventDefault()}}}const TQ=150,NQ=(e,t)=>`${e}${t}`;function AQ(e){let t=0,n;const s=new Map,r=o=>s.get(o)===t,i=(o,l)=>{s.get(o)===l&&s.delete(o)};return{request(o,l,c){if(n!==void 0&&(clearTimeout(n.timer),n=void 0),r(o))return;const u=t;n={cacheKey:o,timer:setTimeout(()=>{n=void 0,!(u!==t||r(o))&&(s.set(o,u),c().then(d=>{i(o,u),u===t&&e(o,l,d.files)},()=>{i(o,u)}))},TQ)}},cancel(){t+=1,n!==void 0&&(clearTimeout(n.timer),n=void 0)}}}const j3=5e3,MQ=e=>({id:`agent:${e.name}`,label:e.name,auxiliaryData:{kind:"agent",group:"Agents",description:e.description,insert:`@${e.name} `}}),S3=e=>({id:`file:${e}`,label:e,auxiliaryData:{kind:"file",group:"Files",insert:`@./${e} `}}),C3=e=>e.auxiliaryData;function Hb(e,t,n){const s=(e==null?void 0:e.roles)??[],[r,i]=x.useState({byKey:{}}),o=x.useRef(n);o.current=n;const l=x.useRef(void 0);l.current??(l.current=AQ((u,d,h)=>{i(f=>{const p=Date.now(),g={};for(const[b,y]of Object.entries(f.byKey))p-y.at<j3&&(g[b]=y);return g[u]={files:h,at:p},{byKey:g,latest:{scope:d,files:h}}})})),x.useEffect(()=>()=>{var u;return(u=l.current)==null?void 0:u.cancel()},[]),x.useEffect(()=>{var u;r.latest!==void 0&&((u=t.current)==null||u.emitInput())},[r]);const c=n!==void 0;return x.useMemo(()=>{if(s.length===0&&!c)return;const u=l.current,d={bootstrap:()=>[],search:f=>{const p=f.toLowerCase(),g=s.filter(w=>w.name.includes(p)).map(MQ),b=o.current;if(b===void 0)return g;const y=f.startsWith("./")?f.slice(2):f,m=NQ(b.key,y),k=r.byKey[m];return k!==void 0&&Date.now()-k.at<j3?[...g,...k.files.map(S3)]:(u.request(m,b.key,()=>b.list(y)),r.latest!==void 0&&r.latest.scope===b.key?[...g,...r.latest.files.map(S3)]:g)},cancel:()=>u.cancel()},h=s.length>0&&c?"Agents and files":s.length>0?"Named agents":"Files";return[{character:"@",searchSource:d,menuLabel:h,emptySearchResultsText:`No matching ${s.length>0&&c?"agents or files":s.length>0?"agents":"files"}`,renderItem:f=>{const p=C3(f),g=(p==null?void 0:p.kind)==="file"?yc:Rd;return a.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[a.jsx(g,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),a.jsxs("span",{className:"flex min-w-0 flex-1 items-baseline gap-2",children:[a.jsx("span",{className:`truncate ${(p==null?void 0:p.description)===void 0?"min-w-0":"max-w-[60%] shrink-0"}`,children:f.label}),(p==null?void 0:p.description)===void 0?null:a.jsx("span",{className:"min-w-0 truncate text-xs text-muted",children:p.description})]})]})},onSelect:f=>{var p;return((p=C3(f))==null?void 0:p.insert)??""}}]},[s,r,c])}const zQ=new RegExp("\\p{White_Space}","u"),RQ=/[\p{Alphabetic}\p{N}_$]/u,IQ=e=>e>=48&&e<=57||e>=97&&e<=122||e===45;function D$(e,t){const n=new Set(t),s=[];for(let r=0;r<e.length;r+=1){if(e.charCodeAt(r)!==36||r>0&&!zQ.test(e[r-1]))continue;let i=r+1;for(;i<e.length&&IQ(e.charCodeAt(i));)i+=1;n.has(e.slice(r+1,i))&&(i<e.length&&RQ.test(String.fromCodePoint(e.codePointAt(i)))||s.push({start:r,end:i}))}return s}const _Q=5e3,LQ=64;var cd,$i,ud,El,dd,Ir,fd,P0;class B${constructor(t,n,s,r={}){ve(this,fd);ve(this,cd);ve(this,$i);ve(this,ud);ve(this,El);ve(this,dd);ve(this,Ir,new Map);ye(this,cd,t),ye(this,$i,n),ye(this,ud,s),ye(this,El,r.now??Date.now),ye(this,dd,r.ttlMs??_Q)}keyOf(t){return B(this,$i).call(this,t)}snapshot(t){var n;return(n=B(this,Ir).get(B(this,$i).call(this,t)))==null?void 0:n.items}request(t,n=!1){const s=U(this,fd,P0).call(this,B(this,$i).call(this,t));if(s.inflight!==void 0||!n&&s.items!==void 0&&B(this,El).call(this)-s.at<B(this,dd))return;const r=B(this,cd).call(this,t);s.inflight=r,r.then(i=>{if(s.inflight===r){s.items=B(this,ud).call(this,i),s.at=B(this,El).call(this);for(const o of s.listeners)o()}},()=>{}).finally(()=>{s.inflight===r&&(s.inflight=void 0)})}subscribe(t,n){const s=U(this,fd,P0).call(this,B(this,$i).call(this,t)).listeners;return s.add(n),()=>s.delete(n)}}cd=new WeakMap,$i=new WeakMap,ud=new WeakMap,El=new WeakMap,dd=new WeakMap,Ir=new WeakMap,fd=new WeakSet,P0=function(t){let n=B(this,Ir).get(t);if(n===void 0&&(n={at:0,listeners:new Set},B(this,Ir).set(t,n),B(this,Ir).size>LQ)){for(const[s,r]of B(this,Ir))if(s!==t&&r.inflight===void 0&&r.listeners.size===0){B(this,Ir).delete(s);break}}return n};const OQ=()=>()=>{};function q$(e,t,n){const s=t===void 0?void 0:e.keyOf(t),r=x.useSyncExternalStore(x.useCallback(u=>s===void 0?OQ:e.subscribe(t,u),[e,s]),x.useCallback(()=>s===void 0?void 0:e.snapshot(t),[e,s])),i=x.useRef(t);i.current=t;const o=x.useRef(n);o.current=n;const l=x.useCallback((u=!1)=>{const d=i.current;o.current&&d!==void 0&&e.request(d,u)},[e]),c=x.useRef(!1);return x.useEffect(()=>{if(!n){c.current=!0;return}const u=i.current;u!==void 0&&e.request(u,c.current),c.current=!1},[e,n,s]),{items:n?r:void 0,request:l}}const DQ="pinomad-skill-mention",BQ=()=>typeof CSS<"u"&&typeof Highlight=="function"&&"highlights"in CSS;let Sg;const qQ=()=>(Sg??(Sg=new Highlight),CSS.highlights.set(DQ,Sg),Sg);function HQ(e){const t=[];let n=0;const s=r=>{var i;for(const o of r.childNodes)if(o.nodeType===Node.TEXT_NODE){const l=o.data.length;t.push({node:o,start:n,end:n+l}),n+=l}else if(o instanceof HTMLElement)if(o.hasAttribute("data-astryx-token")){const l=((i=o.getAttribute("data-astryx-token-value"))==null?void 0:i.length)??0;t.push({start:n,end:n+l}),n+=l}else o.tagName==="BR"?(t.push({start:n,end:n+1}),n+=1):s(o)};return s(e),t}function PQ(e,t){if(t.length===0)return[];const n=HQ(e),s=[];for(const{start:r,end:i}of t){const o=n.find(u=>u.node!==void 0&&u.start<=r&&r<u.end),l=n.find(u=>u.node!==void 0&&u.start<i&&i<=u.end);if((o==null?void 0:o.node)===void 0||(l==null?void 0:l.node)===void 0)continue;const c=document.createRange();c.setStart(o.node,r-o.start),c.setEnd(l.node,i-l.start),s.push(c)}return s}function UQ(e,t){if(!BQ())return()=>{};const n=PQ(e,t);if(n.length===0)return()=>{};const s=qQ();for(const r of n)s.add(r);return()=>{for(const r of n)s.delete(r)}}const FQ={text:"",bindings:[]},H$=(e,t,n)=>t>=0&&e.startsWith(`$${n}`,t);function U0(e,t){const n=[];let s=0;for(const r of[...t].sort((i,o)=>i.start-o.start))r.start<s||!H$(e,r.start,r.name)||(n.push(r),s=r.end);return n}function GQ(e,t,n){const s=e.text;if(t===s&&n===void 0)return e;let r=0;for(;r<s.length&&r<t.length&&s[r]===t[r];)r+=1;let i=0;for(;i<s.length-r&&i<t.length-r&&s[s.length-1-i]===t[t.length-1-i];)i+=1;const o=s.length-i,l=t.length-s.length,c=[];for(const u of e.bindings){let d;u.end<=r?d=u.start:u.start>=o?d=u.start+l:(u.start<r||u.end>o)&&(d=u.start),d!==void 0&&H$(t,d,u.name)&&c.push({start:d,end:d+1+u.name.length,name:u.name})}if(n!==void 0){const u=n.length+1,d=t.length-i;let h=-1;for(let f=t.indexOf(`$${n}`);f!==-1&&f<=d;f=t.indexOf(`$${n}`,f+1))f+u>=r&&(h=f);if(h!==-1){const f={start:h,end:h+u,name:n},p=c.filter(g=>g.end<=f.start||g.start>=f.end);return{text:t,bindings:U0(t,[...p,f])}}}return{text:t,bindings:U0(t,c)}}function VQ(e,t){return t.length===0?{text:e,bindings:[]}:{text:e,bindings:D$(e,t).map(({start:n,end:s})=>({start:n,end:s,name:e.slice(n+1,s)}))}}const WQ=new RegExp("\\p{White_Space}","u"),KQ=/[\p{Alphabetic}\p{N}_$-]/u;function Pb(e){const{text:t}=e,n=[];let s="",r=0;for(const i of U0(t,e.bindings))s+=t.slice(r,i.start),s!==""&&!WQ.test(s.at(-1))&&(s+=" "),s+=t.slice(i.start,i.end),r=i.end,r<t.length&&KQ.test(String.fromCodePoint(t.codePointAt(r)))&&(s+=" "),n.includes(i.name)||n.push(i.name);return s+=t.slice(r),{text:s,skills:n}}const P$=e=>e.kind==="conversation"?`conversation:${e.conversationId}`:e.kind==="project"?`project:${e.path}:${e.checkout}`:"chat";class XQ extends B${constructor(t,n={}){super(t,P$,s=>s.skills,n)}}const $3=new WeakMap;function U$(e){let t=$3.get(e);return t===void 0&&(t=new XQ(n=>e.controller.listSkills(n)),$3.set(e,t)),t}function ZQ(e,t,n){const{items:s,request:r}=q$(U$(e),t,n);return{skills:s,request:r}}const YQ=e=>({id:`skill:${e.name}`,label:e.name,auxiliaryData:{group:e.source==="project"?"Project":"User",description:e.description}});function QQ(e,t){const n=t.toLowerCase();return e.flatMap((s,r)=>{const i=s.name.toLowerCase(),o=i.startsWith(n)?0:i.includes(n)?1:s.description.toLowerCase().includes(n)?2:-1;return o<0?[]:[{skill:s,index:r,tier:o}]}).sort((s,r)=>s.tier-r.tier||s.index-r.index).map(({skill:s})=>YQ(s))}function Ub(e,t,n,s,r){const i=U$(e),o=t===void 0?void 0:P$(t),{skills:l,request:c}=ZQ(e,t,s);x.useEffect(()=>{var p;l!==void 0&&((p=n.current)==null||p.emitInput())},[l,n]);const u=x.useRef(l);u.current=l;const d=x.useRef(t);d.current=t;const h=x.useRef(r);return h.current=r,{trigger:x.useMemo(()=>!s||t===void 0?void 0:{character:"$",searchSource:{bootstrap:()=>[],search:g=>{const b=d.current;return b!==void 0&&i.request(b),QQ(u.current??[],g)},cancel:()=>{}},menuLabel:"Skills",emptySearchResultsText:"No matching skills",renderItem:g=>{const b=g.auxiliaryData;return a.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[a.jsx(R1,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),a.jsxs("span",{className:"flex min-w-0 flex-1 items-baseline gap-2",children:[a.jsx("span",{className:`truncate ${(b==null?void 0:b.description)===void 0?"min-w-0":"max-w-[60%] shrink-0"}`,children:g.label}),(b==null?void 0:b.description)===void 0?null:a.jsx("span",{className:"min-w-0 truncate text-xs text-muted",children:b.description})]})]})},onSelect:g=>(h.current(g.label),`$${g.label} `)},[s,i,o,l]),request:c}}function Fb(){const[e,t]=x.useState(FQ),n=x.useRef(void 0),s=x.useCallback(o=>{const l=n.current;n.current=void 0,t(c=>GQ(c,o,l))},[]),r=x.useCallback(o=>{n.current=o},[]),i=x.useCallback((o,l)=>{n.current=void 0,t(VQ(o,l))},[]);return{value:e.text,draft:e,setValue:s,pick:r,restore:i}}function Gb(e,t){x.useEffect(()=>{var s;const n=(s=e.current)==null?void 0:s.editable();if(!(n==null||t.bindings.length===0))return UQ(n,t.bindings)},[e,t])}function JQ({text:e,names:t}){const n=x.useMemo(()=>t.length===0?[]:D$(e,t),[e,t]);if(n.length===0)return a.jsx(a.Fragment,{children:e});const s=[];let r=0;return n.forEach((i,o)=>{i.start>r&&s.push(e.slice(r,i.start)),s.push(a.jsx("mark",{className:"chat-skill-mention",children:e.slice(i.start,i.end)},o)),r=i.end}),r<e.length&&s.push(e.slice(r)),a.jsx(a.Fragment,{children:s})}function Kc(e){return(e==null?void 0:e.querySelector('[aria-multiline="true"]'))??null}function E3(e){var i;const t=window.getSelection();if(!t)return;const n=document.createTreeWalker(e,NodeFilter.SHOW_TEXT);let s=null;for(let o=n.nextNode();o!==null;o=n.nextNode())s=o;const r=document.createRange();s===null?(r.selectNodeContents(e),r.collapse(!1)):(r.setStart(s,((i=s.textContent)==null?void 0:i.length)??0),r.collapse(!0)),t.removeAllRanges(),t.addRange(r)}function eJ({disabled:e=!1,placeholder:t,inputRef:n,onSubmitRequest:s,value:r,onValueChange:i,onFiles:o,triggers:l}){const c=x.useRef(null),u=x.useRef(null),d=x.useRef(r);d.current=r,x.useEffect(()=>{if(n)return n.current={focus:()=>{var f;return(f=u.current)==null?void 0:f.focus()},focusAtEnd:()=>{const f=Kc(c.current);f&&(f.focus(),E3(f))},emitInput:()=>{const f=Kc(c.current);f!==null&&(document.activeElement===f||f.contains(document.activeElement))&&f.dispatchEvent(new Event("input",{bubbles:!0}))},editable:()=>Kc(c.current),openTrigger:f=>{requestAnimationFrame(()=>{const p=Kc(c.current);if(!p)return;p.focus(),E3(p);const g=d.current,b=g===""||/[ \n]$/.test(g)?f:` ${f}`;document.execCommand("insertText",!1,b)})}},()=>{n.current=null}},[n]),x.useEffect(()=>{const f=Kc(c.current);f&&(t?f.setAttribute("aria-placeholder",t):f.removeAttribute("aria-placeholder"),e?f.setAttribute("aria-disabled","true"):f.removeAttribute("aria-disabled"))},[t,e]);const h=f=>{f.nativeEvent.isComposing||f.nativeEvent.keyCode===229||f.key==="Enter"&&(f.shiftKey||(f.preventDefault(),s()))};return a.jsx(Uy,{ref:c,className:"prompt-input__input",handleRef:u,hasHistory:!1,isDisabled:e,label:"Prompt",pasteAsToken:!1,placeholder:t,value:r,onChange:f=>i==null?void 0:i(f),onKeyDown:h,...o===void 0?{}:{onFiles:o},...l===void 0?{}:{triggers:[...l]}})}function Vb({value:e,status:t="ready",className:n="",placeholder:s,inputRef:r,isDisabled:i=!1,submitDisabled:o=!1,attachments:l,hasAttachments:c,onFiles:u,triggers:d,startActions:h,endActions:f,footer:p,error:g,onSubmit:b,onStop:y,onValueChange:m,...k}){const v=(t==="streaming"||t==="submitted")&&!e.trim()&&c!==!0&&!!y,j=!o&&(!!e.trim()||c===!0),C=()=>{j&&(b==null||b())},$=A=>{u===void 0||!A.dataTransfer.types.includes("Files")||A.preventDefault()},T=A=>{if(u===void 0||!A.dataTransfer.types.includes("Files"))return;A.preventDefault();const S=[...A.dataTransfer.files];S.length>0&&u(S)};return a.jsxs("div",{className:`prompt-input ${n}`.trim(),"data-slot":"prompt-input","data-status":t,onDragOver:$,onDrop:T,...k,children:[a.jsx(uj,{elevation:"low",...l===void 0?{}:{drawer:a.jsx(dj,{children:l})},footerActions:h,input:a.jsx(eJ,{disabled:i,inputRef:r,placeholder:s,value:e,onValueChange:m,onSubmitRequest:C,onFiles:u,triggers:d}),isStopShown:v&&!i,placeholder:s,sendActions:f,sendButton:a.jsx(Fy,{className:"pigui-pressable",isDisabled:i||!v&&!j,onSend:C}),status:g?{type:"error",message:g}:void 0,value:e,onChange:A=>m==null?void 0:m(A),onStop:y,onSubmit:C}),p?a.jsx("div",{className:"prompt-input__footer","data-slot":"prompt-input-footer",children:p}):null]})}const tJ=["path","file_path","filePath","command","cmd","query","pattern","url","name","description","task"],T3=120;function nJ(e){if(!(typeof e!="object"||e===null))for(const t of tJ){const n=e[t];if(typeof n=="string"&&n.length>0)return n.length>T3?`${n.slice(0,T3)}…`:n}}function Wr(e){if(!(e!=null&&e.startsWith("mcp__")))return e;const t=e.slice(5),n=t.indexOf("__");return n===-1?t:`${t.slice(0,n)}/${t.slice(n+2)}`}function Wb(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}return nJ(t)}function F$(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}const sJ={bash:"shell",shell:"shell",sh:"shell",terminal:"shell",cmd:"shell",grep:"search",find:"search",glob:"search",ls:"search",search:"search",web_search:"web",websearch:"web",webfetch:"web",web_fetch:"web",web:"web",browser:"web",read:"file",read_file:"file",cat:"file",edit:"edit",write:"edit",write_file:"edit",str_replace:"edit"};function G$(e){return(e??"").trim().toLowerCase().replace(/-/g,"_")}function Dx(e){return sJ[G$(e)]??"tool"}function rJ(e){const t=new Set(e.map(n=>Dx(n.toolName)));return t.size===1?[...t][0]:"tool"}const N3=10*1024*1024,cr=10,iJ=512*1024,oJ=/^[A-Za-z0-9_-]{22}$/;function aJ(e){return oJ.test(e)}const A3='<attachments v="1">',lJ="The user attached these files. They are read-only originals on this machine: read them with your tools when relevant, and copy one into the working directory before changing it.",M3="</attachments>";function cJ(e,t){if(e.trim()==="")return"Attachment name cannot be empty";if(!Number.isSafeInteger(t)||t<0)return"Attachment size must be a non-negative integer";if(t>N3)return`Attachment is larger than ${N3/(1024*1024)} MB`}const uJ='<file id="',dJ='" name="',fJ='" path="',hJ='" size="',z3='"/>',xJ=/^(?:0|[1-9][0-9]*)$/;function pJ(e){return e.replace(/&(amp|lt|gt|quot|apos|#x[0-9A-Fa-f]+|#[0-9]+);/g,(t,n)=>{if(n==="amp")return"&";if(n==="lt")return"<";if(n==="gt")return">";if(n==="quot")return'"';if(n==="apos")return"'";const s=n.startsWith("#x")?parseInt(n.slice(2),16):parseInt(n.slice(1),10);return s>=0&&s<=1114111?String.fromCodePoint(s):t})}function Wf(e,t,n){if(!e.startsWith(n,t))return;const s=t+n.length,r=e.indexOf('"',s);if(r!==-1)return{value:e.slice(s,r),next:r}}function gJ(e){const t=Wf(e,0,uJ);if(t===void 0)return;const n=Wf(e,t.next,dJ);if(n===void 0)return;const s=Wf(e,n.next,fJ);if(s===void 0)return;const r=Wf(e,s.next,hJ);if(r===void 0||!e.startsWith(z3,r.next)||r.next+z3.length!==e.length||!aJ(t.value)||!xJ.test(r.value))return;const i=Number(r.value);if(Number.isSafeInteger(i))return{id:t.value,name:pJ(n.value),size:i}}function mJ(e){if(!e.startsWith(A3+`
|
|
382
|
-
`)||!e.endsWith(`
|
|
383
|
-
`+M3))return;const t=e.slice(A3.length+1,-(M3.length+1)).split(`
|
|
384
|
-
`);if(t[0]!==lJ||t.length<2)return;const n=[];for(const s of t.slice(1)){const r=gJ(s);if(r===void 0)return;n.push(r)}return n}const Bx='<skill name="',R3='" location="',I3=`">
|
|
385
|
-
References are relative to `,_3=`
|
|
386
|
-
</skill>`,Cg=`
|
|
387
|
-
|
|
388
|
-
`,yJ=e=>e>=48&&e<=57||e>=97&&e<=122||e===45;function kJ(e,t){if(!e.startsWith(Bx,t))return-1;let n=t+Bx.length;const s=n;for(;n<e.length&&yJ(e.charCodeAt(n));)n+=1;if(n===s||!e.startsWith(R3,n))return-1;n+=R3.length;const r=n;for(;n<e.length&&e[n]!=='"'&&e[n]!==`
|
|
389
|
-
`;)n+=1;if(n===r||!e.startsWith(I3,n))return-1;n+=I3.length;const i=e.indexOf(`
|
|
390
|
-
`,n);if(i-n<2||e[i-1]!=="."||e[i+1]!==`
|
|
391
|
-
`)return-1;const o=e.indexOf(_3,i+1);return o===-1?-1:o+_3.length}function bJ(e){const t=[];let n=0;for(;;){const s=kJ(e,n);if(s===-1||!e.startsWith(Cg,s)||s+Cg.length===e.length)return{text:e.slice(n),skills:t};t.push(e.slice(n+Bx.length,e.indexOf('"',n+Bx.length))),n=s+Cg.length}}function Kb(e){const t=[];let n="";if(typeof e=="string")n=e;else for(const r of e){if(r.type!=="text"||typeof r.text!="string")continue;const i=mJ(r.text);i!==void 0?t.push(...i):n+=r.text}const s=bJ(n);return{text:s.text,skills:s.skills,attachments:t}}const vJ=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/,wJ=/^\+\s*\d+ /,jJ=/^-\s*\d+ /;function SJ(e){let t=0,n=0,s=0,r=0,i=!1;for(const o of e.split(`
|
|
392
|
-
`)){const l=vJ.exec(o);if(l){s=Number.parseInt(l[2]??"1",10),r=Number.parseInt(l[4]??"1",10),i=!0;continue}if(!i)continue;if(s===0&&r===0){i=!1;continue}const c=o.charAt(0);c===" "?(s-=1,r-=1):c==="-"?(s-=1,n+=1):c==="+"&&(r-=1,t+=1)}return{additions:t,deletions:n}}function CJ(e){let t=0,n=0;for(const s of e.split(`
|
|
393
|
-
`))wJ.test(s)?t+=1:jJ.test(s)&&(n+=1);return{additions:t,deletions:n}}function $J(e){let t=e;if(typeof t=="string")try{t=JSON.parse(t)}catch{return}if(typeof t!="object"||t===null)return;const n=t.details;if(typeof n!="object"||n===null)return;const{patch:s,diff:r}=n,i=typeof s=="string"?SJ(s):typeof r=="string"?CJ(r):void 0;return i!==void 0&&(i.additions>0||i.deletions>0)?i:void 0}function Xb(e){return e.pinomad}function EJ(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function V$(e){return typeof e=="string"?[]:e.flatMap(t=>{if(t.type!=="image"||t.mimeType===void 0)return[];const n=t.mimeType;return typeof t.data=="string"&&t.data!==""?[{data:t.data,mimeType:n}]:typeof t.ref=="string"&&t.ref!==""?[{ref:t.ref,mimeType:n}]:[]})}const Io=e=>e.type==="toolCall"&&e.id!==void 0;function TJ(e,t){if(e!==void 0){if(t==="codemode"&&typeof e=="object"&&e!==null){const n=e.code;if(typeof n=="string")return n}return JSON.stringify(e)}}function NJ(e){if(typeof e!="object"||e===null)return;const t=e.conversationId;return typeof t=="number"?t:void 0}function AJ(e,t){const n=e.status==="ok"?"output-available":(e.status==="error","output-error"),s=e.status==="error"?e.error:n==="output-error"?"Cancelled":void 0,r=e.details===void 0?void 0:Sc(t[e.name],e.details),i=(r==null?void 0:r.type)==="pinomad.diff"?{kind:"diff",patch:r.value.patch}:void 0;return{state:n,toolName:e.name,argsText:e.args,...s===void 0?{}:{output:s},...e.durationMs===void 0?{}:{durationMs:e.durationMs},...i===void 0?{}:{pinomad:i}}}function MJ(e){const t=e.summary;return{state:e.status!=="done"?"input-available":t===void 0||t.isError?"output-error":"output-available",toolCallId:e.callId,toolName:e.name,argsText:JSON.stringify(e.arguments),...(t==null?void 0:t.error)===void 0?{}:{output:t.error},...(t==null?void 0:t.durationMs)===void 0?{}:{durationMs:t.durationMs}}}function zJ(e,t,n,s,r){const i=e.id,o=t.results.get(i),l=t.partial?void 0:n.get(i),c=(l==null?void 0:l.name)??e.name,u=TJ(e.arguments,c);let d,h;o!==void 0?(d=o.isError===!0?"output-error":"output-available",h=EJ(o.content)):(l==null?void 0:l.status)==="running"?(d="input-available",h=l.output):t.partial===!0?d="input-streaming":t.msg.stopReason!=="toolUse"?(d="output-error",h="Not run: the answer was interrupted."):(d="input-available",h=l==null?void 0:l.output);const f=(o==null?void 0:o.details)??(l==null?void 0:l.details),p=f===void 0?void 0:Sc(r[c??""],f),g=o!==void 0&&o.isError!==!0?$J({details:o.details}):void 0,b=o===void 0?[]:V$(o.content),y=NJ(f);let m,k;if((p==null?void 0:p.type)==="pinomad.diff")m={kind:"diff",patch:p.value.patch};else if(y!==void 0){const w=f;m={kind:"subagent",conversationId:y,...h===void 0?{}:{output:h},...typeof w.model=="string"?{model:w.model}:{},...typeof w.startedAt=="number"?{startedAt:w.startedAt}:{},...typeof(o==null?void 0:o.timestamp)=="number"?{endedAt:o.timestamp}:{}}}return c==="codemode"&&o===void 0?k=(s.get(i)??[]).map(MJ):(p==null?void 0:p.type)==="pinomad.codemode"&&(k=p.value.calls.map(w=>AJ(w,r))),{state:d,toolCallId:i,...c===void 0?{}:{toolName:c},...u===void 0?{}:{argsText:u},...h===void 0?{}:{output:h},...g===void 0?{}:{diffStat:g},...b.length===0?{}:{images:b},...k===void 0||k.length===0?{}:{children:k},...m===void 0?{}:{pinomad:m}}}function RJ(e){const t=e==null?void 0:e.calls;return Array.isArray(t)&&t.some(n=>n.name==="todo_write"&&n.status==="ok")}function IJ(e){const t=[];for(const n of e)if(Io(n)){const s=t[t.length-1];(s==null?void 0:s.kind)==="tools"?s.blocks.push(n):t.push({kind:"tools",blocks:[n]})}else n.type==="thinking"?t.push({kind:"thinking",block:n}):n.type==="text"&&t.push({kind:"text",block:n});return t}function _J(e,t,n,s,r){var M,z,O;const i=new Map(((M=s?n.tools:void 0)==null?void 0:M.map(I=>[I.callId,I]))??[]),o=new Map;if(s)for(const I of n.nestedTools??[]){if(I.name.startsWith("pi."))continue;const E=o.get(I.parentCallId);E===void 0?o.set(I.parentCallId,[I]):E.push(I)}const l=s?(z=n.generation)==null?void 0:z.message:void 0,c=new Map,u=[...t.assistants.map(({id:I,msg:E,results:N})=>({id:I,msg:E,results:N})),...l===void 0?[]:[{id:"live",msg:l,partial:!0,results:c}]],d=u[u.length-1],h=t.assistants[t.assistants.length-1],f=!s,g=(d===void 0?[]:d.msg.content.filter(I=>I.type==="text")).map(I=>I.text??"").join(""),b=(d==null?void 0:d.msg.content.some(Io))===!0,y=g!==""&&(f||!b),m=(I,E)=>Io(E)&&!I.results.has(E.id)&&(I.partial===!0||I.msg.stopReason==="toolUse"),k=u.some(I=>I.msg.content.some(E=>m(I,E))),w=d==null?void 0:d.msg.content[d.msg.content.length-1];let v;f?v="settled":y?v="answering":k||w!==void 0&&Io(w)?v="acting":u.length>0?v="thinking":v="hidden";const j=v==="thinking"||v==="acting",C=[];for(const I of u){const E=I===d,N=I.msg.content;IJ(N).forEach((R,L)=>{if(R.kind==="tools"){const P=R.blocks.filter(X=>m(I,X)),F=j&&P.length>0;C.push({kind:"tools",id:`${I.id}-tools-${L}`,tools:R.blocks.map(X=>zJ(X,I,i,o,r)),live:F,...F&&P[0]!==void 0?{activeToolCallId:P[0].id}:{}});return}if(R.kind==="text"){E&&y||C.push({kind:"interim",id:`${I.id}-text-${L}`,text:R.block.text??""});return}const D=N.indexOf(R.block);C.push({kind:"thinking",id:`${I.id}-thinking-${L}`,text:R.block.thinking??"",live:j&&I.partial===!0&&D===N.length-1})})}let $;for(const I of u)for(const E of I.msg.content){if(!Io(E))continue;const N=I.results.get(E.id);N===void 0||typeof N.timestamp!="number"||(E.name==="todo_write"?N.isError!==!0:E.name==="codemode"&&RJ(N.details))&&($=N.timestamp)}const T=(h==null?void 0:h.msg.stopReason)==="aborted",A=f&&(h==null?void 0:h.msg.stopReason)==="error",S=(O=u[0])==null?void 0:O.msg.timestamp;let _;if(f&&S!==void 0){const I=y?d==null?void 0:d.msg.timestamp:t.lastTs??(d==null?void 0:d.msg.timestamp);_=I===void 0?void 0:I-S}return{kind:"run",id:e,cot:{phase:v,...A===!0?{outcome:"failed"}:{},...S===void 0?{}:{anchorMs:S},..._===void 0?{}:{elapsedMs:_},...$===void 0?{}:{todoWrittenAtMs:$},steps:C,...y?{answer:{text:g,streaming:(d==null?void 0:d.partial)===!0}}:{}},interrupted:T,...f&&!T&&A!==!0&&h!==void 0?{forkEntryId:h.id}:{},...A===!0?{failure:(h==null?void 0:h.msg.errorMessage)??"The run failed."}:{}}}function LJ(e,t,n){var c;const s=[],r=e.docs["pi.live"]??{};let i,o=0;const l=u=>{var d;if(i!==void 0){if(i.assistants.length>0||i.orphans.size>0||u){const h=((d=i.assistants[0])==null?void 0:d.id)??`open-${o++}`;s.push(_J(`run-${h}`,i,r,u,t))}i=void 0}};for(const u of e.entries){const d=(c=u.model)==null?void 0:c[0],h=String(u.id);if(u.kind==="pi.user"&&(d==null?void 0:d.role)==="user"){l(!1);const f=Kb(d.content);s.push({kind:"user",id:h,text:f.text,images:V$(d.content),skills:f.skills,attachments:f.attachments})}else if(u.kind==="pi.compaction")l(!1),s.push({kind:"compaction",id:h});else if(u.kind==="pi.reset")l(!1),s.push({kind:"reset",id:h});else if(u.kind==="pi.assistant"&&(d==null?void 0:d.role)==="assistant"){i??(i={assistants:[],orphans:new Map});const f=new Map;for(const p of d.content){if(!Io(p))continue;const g=i.orphans.get(p.id);g!==void 0&&(i.orphans.delete(p.id),f.set(p.id,g))}i.assistants.push({id:h,msg:d,results:f}),i.lastTs=d.timestamp??i.lastTs}else if(u.kind==="pi.tool-result"&&(d==null?void 0:d.role)==="toolResult"&&d.toolCallId!==void 0){i??(i={assistants:[],orphans:new Map});const f=i.assistants.findLast(p=>!p.results.has(d.toolCallId)&&p.msg.content.some(g=>Io(g)&&g.id===d.toolCallId));f===void 0?i.orphans.set(d.toolCallId,d):f.results.set(d.toolCallId,d),i.lastTs=d.timestamp??i.lastTs}}return i??(i=n?{assistants:[],orphans:new Map}:void 0),l(n),s}function OJ(e){const t=e[e.length-1];if(!((t==null?void 0:t.kind)!=="run"||t.failure===void 0))for(let n=e.length-2;n>=0;n--){const s=e[n];if(s.kind!=="compaction")return s.kind!=="user"||s.text.trim()===""&&s.images.length===0&&s.attachments.length===0?void 0:{text:s.text,images:s.images,skills:s.skills,attachments:s.attachments,requestId:`retry:${t.id}`}}}function DJ(e){const t=[],n=[];for(const s of e.steps){if(s.kind!=="tools"){n.push(s);continue}const r=[];if(s.tools.forEach((i,o)=>{if(i.toolName!=="subagent"){r.push(i);return}t.push({key:`${s.id}/${i.toolCallId??o}`,tool:i})}),r.length!==0)if(s.activeToolCallId!==void 0&&!r.some(i=>i.toolCallId===s.activeToolCallId)){const i=r.find(o=>o.state==="input-streaming"||o.state==="input-available");if(i===void 0){const{activeToolCallId:o,...l}=s;n.push({...l,tools:r,live:!1})}else n.push({...s,tools:r,...i.toolCallId===void 0?{}:{activeToolCallId:i.toolCallId}})}else n.push({...s,tools:r})}return{view:{...e,steps:n},subagents:t}}const L3={};function Dd(e,t){const n=x.useRef(L3);return n.current===L3&&(n.current=e(t)),n}const $g=k4[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],BJ=$g&&$g!==x.useLayoutEffect?$g:e=>e();function aa(e){const t=Dd(qJ).current;return t.next=e,BJ(t.effect),t.trampoline}function qJ(){const e={next:void 0,callback:HJ,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function HJ(){}function Zb(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(s=>n.searchParams.append("args[]",s)),`Base UI error #${e}; visit ${n} for the full message.`}function F0(e,t,n,s){const r=Dd(W$).current;return UJ(r,e,t,n,s)&&K$(r,[e,t,n,s]),r.callback}function PJ(e){const t=Dd(W$).current;return FJ(t,e)&&K$(t,e),t.callback}function W$(){return{callback:null,cleanup:null,refs:[]}}function UJ(e,t,n,s,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==s||e.refs[3]!==r}function FJ(e,t){return e.refs.length!==t.length||e.refs.some((n,s)=>n!==t[s])}function K$(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const s=Array(t.length).fill(null);for(let r=0;r<t.length;r+=1){const i=t[r];if(i!=null)switch(typeof i){case"function":{const o=i(n);typeof o=="function"&&(s[r]=o);break}case"object":{i.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const i=t[r];if(i!=null)switch(typeof i){case"function":{const o=s[r];typeof o=="function"?o():i(null);break}case"object":{i.current=null;break}}}}}}}const GJ=parseInt(x.version,10);function VJ(e){return GJ>=e}function O3(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return(VJ(19)?n==null?void 0:n.ref:t.ref)??null}function G0(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function WJ(e,t){const n={};for(const s in e){const r=e[s];if(t!=null&&t.hasOwnProperty(s)){const i=t[s](r);i!=null&&Object.assign(n,i);continue}r===!0?n[`data-${s.toLowerCase()}`]="":r&&(n[`data-${s.toLowerCase()}`]=r.toString())}return n}function KJ(e,t){return typeof e=="function"?e(t):e}function XJ(e,t){return typeof e=="function"?e(t):e}const $u={};function X$(e,t,n,s,r){let i={...V0(e,$u)};return t&&(i=Eh(i,t)),n&&(i=Eh(i,n)),s&&(i=Eh(i,s)),i}function ZJ(e){if(e.length===0)return $u;if(e.length===1)return V0(e[0],$u);let t={...V0(e[0],$u)};for(let n=1;n<e.length;n+=1)t=Eh(t,e[n]);return t}function Eh(e,t){return Z$(t)?t(e):YJ(e,t)}function YJ(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":{e[n]=G0(e.style,s);break}case"className":{e[n]=Y$(e.className,s);break}default:QJ(n,s)?e[n]=JJ(e[n],s):e[n]=s}}return e}function QJ(e,t){const n=e.charCodeAt(0),s=e.charCodeAt(1),r=e.charCodeAt(2);return n===111&&s===110&&r>=65&&r<=90&&(typeof t=="function"||typeof t>"u")}function Z$(e){return typeof e=="function"}function V0(e,t){return Z$(e)?e(t):e??$u}function JJ(e,t){return t?e?n=>{if(eee(n)){const r=n;W0(r);const i=t(r);return r.baseUIHandlerPrevented||e==null||e(r),i}const s=t(n);return e==null||e(n),s}:t:e}function W0(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function Y$(e,t){return t?e?t+" "+e:t:e}function eee(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const $o=Object.freeze({});function Yb(e,t,n={}){const s=t.render,r=tee(t,n);if(n.enabled===!1)return null;const i=n.state??$o;return nee(e,s,r,i)}function tee(e,t={}){const{className:n,style:s,render:r}=e,{state:i=$o,ref:o,props:l,stateAttributesMapping:c,enabled:u=!0}=t,d=u?KJ(n,i):void 0,h=u?XJ(s,i):void 0,f=u?WJ(i,c):$o,p=u?G0(f,Array.isArray(l)?ZJ(l):l)??$o:$o;return typeof document<"u"&&(u?Array.isArray(o)?p.ref=PJ([p.ref,O3(r),...o]):p.ref=F0(p.ref,O3(r),o):F0(null,null)),u?(d!==void 0&&(p.className=Y$(p.className,d)),h!==void 0&&(p.style=G0(p.style,h)),p):$o}function nee(e,t,n,s){if(t){if(typeof t=="function")return t(n,s);const r=X$(n,t.props);return r.ref=n.ref,x.cloneElement(t,r)}if(e&&typeof e=="string")return see(e,n);throw new Error(Zb(8))}function see(e,t){return e==="button"?x.createElement("button",{type:"button",...t,key:t.key}):e==="img"?x.createElement("img",{alt:"",...t,key:t.key}):x.createElement(e,t)}function ree({controlled:e,default:t,name:n,state:s="value"}){const{current:r}=x.useRef(e!==void 0),[i,o]=x.useState(t),l=r?e:i,c=x.useCallback(u=>{r||o(u)},[]);return[l,c]}const iee=()=>{},ts=typeof document<"u"?x.useLayoutEffect:iee,oee={...k4};let D3=0;function aee(e,t="mui"){const[n,s]=x.useState(e),r=e||n;return x.useEffect(()=>{n==null&&(D3+=1,s(`${t}-${D3}`))},[n,t]),r}const B3=oee.useId;function lee(e,t){if(B3!==void 0){const n=B3();return`${t}-${n}`}return aee(e,t)}function cee(e){return lee(e,"base-ui")}const uee="none",dee="trigger-press";function Q$(e,t,n,s){let r=!1,i=!1;const o=$o;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){i=!0},get isCanceled(){return r},get isPropagationAllowed(){return i},trigger:n,...o}}const fee=[];function J$(e){x.useEffect(e,fee)}const Kf=null;class hee{constructor(){ie(this,"callbacks",[]);ie(this,"callbacksCount",0);ie(this,"nextId",1);ie(this,"startId",1);ie(this,"isScheduled",!1);ie(this,"tick",t=>{var r;this.isScheduled=!1;const n=this.callbacks,s=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,s>0)for(let i=0;i<n.length;i+=1)(r=n[i])==null||r.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Xf=new hee;class bt{constructor(){ie(this,"currentId",Kf);ie(this,"cancel",()=>{this.currentId!==Kf&&(Xf.cancel(this.currentId),this.currentId=Kf)});ie(this,"disposeEffect",()=>this.cancel)}static create(){return new bt}static request(t){return Xf.request(t)}static cancel(t){return Xf.cancel(t)}request(t){this.cancel(),this.currentId=Xf.request(()=>{this.currentId=Kf,t()})}}function eE(){const e=Dd(bt.create).current;return J$(e.disposeEffect),e}function xee(e){return e==null?e:"current"in e?e.current:e}function tE(e,t=!1,n=!0){const s=eE();return aa((r,i=null)=>{s.cancel();const o=xee(e);o!=null&&(typeof o.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?r():s.request(()=>{function l(){o&&Promise.all(o.getAnimations().map(c=>c.finished)).then(()=>{i!=null&&i.aborted||Mu.flushSync(r)}).catch(()=>{if(n){if(i!=null&&i.aborted)return;Mu.flushSync(r)}else o.getAnimations().length>0&&o.getAnimations().some(c=>c.pending||c.playState!=="finished")&&l()})}t?s.request(l):l()}))})}function pee(e,t=!1,n=!1){const[s,r]=x.useState(e&&t?"idle":void 0),[i,o]=x.useState(e);return e&&!i&&(o(!0),r("starting")),!e&&i&&s!=="ending"&&!n&&r("ending"),!e&&!i&&s==="ending"&&r(void 0),ts(()=>{if(!e&&i&&s!=="ending"&&n){const l=bt.request(()=>{r("ending")});return()=>{bt.cancel(l)}}},[e,i,s,n]),ts(()=>{if(!e||t)return;const l=bt.request(()=>{Mu.flushSync(()=>{r(void 0)})});return()=>{bt.cancel(l)}},[t,e]),ts(()=>{if(!e||!t)return;e&&i&&s!=="idle"&&r("starting");const l=bt.request(()=>{r("idle")});return()=>{bt.cancel(l)}},[t,e,i,r,s]),x.useMemo(()=>({mounted:i,setMounted:o,transitionStatus:s}),[i,s])}function gee(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,i=t!==void 0,[o,l]=ree({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=pee(o,!0,!0),[h,f]=x.useState(o),[{height:p,width:g},b]=x.useState({height:void 0,width:void 0}),y=cee(),[m,k]=x.useState(),w=m??y,[v,j]=x.useState(!1),[C,$]=x.useState(!1),T=x.useRef(null),A=x.useRef(null),S=x.useRef(null),_=x.useRef(null),M=tE(_,!1),z=aa(O=>{const I=!o,E=Q$(dee,O.nativeEvent);if(s(I,E),E.isCanceled)return;const N=_.current;A.current==="css-animation"&&N!=null&&N.style.removeProperty("animation-name"),!v&&!C&&(A.current!=null&&A.current!=="css-animation"&&!c&&I&&u(!0),A.current==="css-animation"&&(!h&&I&&f(!0),!c&&I&&u(!0))),l(I),A.current==="none"&&c&&!I&&u(!1)});return ts(()=>{i&&A.current==="none"&&!C&&!o&&u(!1)},[i,C,o,t,u]),x.useMemo(()=>({abortControllerRef:T,animationTypeRef:A,disabled:r,handleTrigger:z,height:p,mounted:c,open:o,panelId:w,panelRef:_,runOnceAnimationsFinish:M,setDimensions:b,setHiddenUntilFound:j,setKeepMounted:$,setMounted:u,setOpen:l,setPanelIdState:k,setVisible:f,transitionDimensionRef:S,transitionStatus:d,visible:h,width:g}),[T,A,r,z,p,c,o,w,_,M,b,j,$,u,l,f,S,d,h,g])}const nE=x.createContext(void 0);function sE(){const e=x.useContext(nE);if(e===void 0)throw new Error(Zb(15));return e}let qx=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const mee={[qx.startingStyle]:""},yee={[qx.endingStyle]:""},rE={transitionStatus(e){return e==="starting"?mee:e==="ending"?yee:null}};let Eu=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=qx.startingStyle]="startingStyle",e[e.endingStyle=qx.endingStyle]="endingStyle",e}({}),kee=function(e){return e.panelOpen="data-panel-open",e}({});const bee={[Eu.open]:""},vee={[Eu.closed]:""},wee={open(e){return e?{[kee.panelOpen]:""}:null}},jee={open(e){return e?bee:vee}},iE={...jee,...rE},U1=x.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:i=!1,disabled:o=!1,onOpenChange:l,open:c,...u}=t,d=aa(l),h=gee({open:c,defaultOpen:i,onOpenChange:d,disabled:o}),f=x.useMemo(()=>({open:h.open,disabled:h.disabled,transitionStatus:h.transitionStatus}),[h.open,h.disabled,h.transitionStatus]),p=x.useMemo(()=>({...h,onOpenChange:d,state:f}),[h,d,f]),g=Yb("div",t,{state:f,ref:n,props:u,stateAttributesMapping:iE});return a.jsx(nE.Provider,{value:p,children:g})});function See(){return typeof window<"u"}function Cee(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $ee(e){return See()?e instanceof HTMLElement||e instanceof Cee(e).HTMLElement:!1}const Eee=x.createContext(void 0);function Tee(e=!1){const t=x.useContext(Eee);if(t===void 0&&!e)throw new Error(Zb(16));return t}function Nee(e){const{focusableWhenDisabled:t,disabled:n,composite:s=!1,tabIndex:r=0,isNativeButton:i}=e,o=s&&t!==!1,l=s&&t===!1;return{props:x.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return s||(u.tabIndex=r,!i&&n&&(u.tabIndex=t?r:-1)),(i&&(t||o)||!i&&n)&&(u["aria-disabled"]=n),i&&(!t||l)&&(u.disabled=n),u},[s,n,t,o,l,i,r])}}function Aee(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,i=x.useRef(null),o=Tee(!0)!==void 0,l=aa(()=>{const f=i.current;return!!((f==null?void 0:f.tagName)==="A"&&(f!=null&&f.href))}),{props:c}=Nee({focusableWhenDisabled:n,disabled:t,composite:o,tabIndex:s,isNativeButton:r}),u=x.useCallback(()=>{const f=i.current;Mee(f)&&o&&t&&c.disabled===void 0&&f.disabled&&(f.disabled=!1)},[t,c.disabled,o]);ts(u,[u]);const d=x.useCallback((f={})=>{const{onClick:p,onMouseDown:g,onKeyUp:b,onKeyDown:y,onPointerDown:m,...k}=f;return X$({type:r?"button":void 0,onClick(v){if(t){v.preventDefault();return}p==null||p(v)},onMouseDown(v){t||g==null||g(v)},onKeyDown(v){if(t||(W0(v),y==null||y(v)),v.baseUIHandlerPrevented)return;const j=v.target===v.currentTarget&&!r&&!l()&&!t,C=v.key==="Enter",$=v.key===" ";j&&(($||C)&&v.preventDefault(),C&&(p==null||p(v)))},onKeyUp(v){t||(W0(v),b==null||b(v)),!v.baseUIHandlerPrevented&&v.target===v.currentTarget&&!r&&!t&&v.key===" "&&(p==null||p(v))},onPointerDown(v){if(t){v.preventDefault();return}m==null||m(v)}},r?void 0:{role:"button"},c,k)},[t,c,r,l]),h=aa(f=>{i.current=f,u()});return{getButtonProps:d,buttonRef:h}}function Mee(e){return $ee(e)&&e.tagName==="BUTTON"}const zee={...wee,...rE},F1=x.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:i,state:o,disabled:l}=sE(),{className:c,disabled:u=l,id:d,render:h,nativeButton:f=!0,...p}=t,{getButtonProps:g,buttonRef:b}=Aee({disabled:u,focusableWhenDisabled:!0,native:f}),y=x.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,disabled:u,onClick:i}),[s,u,r,i]);return Yb("button",t,{state:o,ref:[n,b],props:[y,p,g],stateAttributesMapping:zee})});let Ree=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});function Iee(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:s,height:r,hiddenUntilFound:i,keepMounted:o,id:l,mounted:c,onOpenChange:u,open:d,panelRef:h,runOnceAnimationsFinish:f,setDimensions:p,setMounted:g,setOpen:b,setVisible:y,transitionDimensionRef:m,visible:k,width:w}=e,v=x.useRef(!1),j=x.useRef(null),C=x.useRef(d),$=x.useRef(d),T=eE(),A=x.useMemo(()=>n.current==="css-animation"?!k:!d&&!c,[d,c,k,n]),S=aa(M=>{if(!M)return;if(n.current==null||m.current==null){const I=getComputedStyle(M),E=I.animationName!=="none"&&I.animationName!=="",N=I.transitionDuration!=="0s"&&I.transitionDuration!=="";E&&N||(I.animationName==="none"&&I.transitionDuration!=="0s"?n.current="css-transition":I.animationName!=="none"&&I.transitionDuration==="0s"?n.current="css-animation":n.current="none"),M.getAttribute(Ree.orientation)==="horizontal"||I.transitionProperty.indexOf("width")>-1?m.current="width":m.current="height"}if(n.current!=="css-transition")return;(r===void 0||w===void 0)&&(p({height:M.scrollHeight,width:M.scrollWidth}),$.current&&M.style.setProperty("transition-duration","0s"));let z=-1,O=-1;return z=bt.request(()=>{$.current=!1,O=bt.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})}),()=>{bt.cancel(z),bt.cancel(O)}}),_=F0(s,h,S);return ts(()=>{if(n.current!=="css-transition")return;const M=h.current;if(!M)return;let z=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){const O={"justify-content":M.style.justifyContent,"align-items":M.style.alignItems,"align-content":M.style.alignContent,"justify-items":M.style.justifyItems};Object.keys(O).forEach(I=>{M.style.setProperty(I,"initial","important")}),!$.current&&!o&&M.setAttribute(Eu.startingStyle,""),p({height:M.scrollHeight,width:M.scrollWidth}),z=bt.request(()=>{Object.entries(O).forEach(([I,E])=>{E===""?M.style.removeProperty(I):M.style.setProperty(I,E)})})}else{if(M.scrollHeight===0&&M.scrollWidth===0)return;p({height:M.scrollHeight,width:M.scrollWidth});const O=new AbortController;t.current=O;const I=O.signal;let E=null;const N=Eu.endingStyle;return E=new MutationObserver(R=>{R.some(D=>D.type==="attributes"&&D.attributeName===N)&&(E==null||E.disconnect(),E=null,f(()=>{p({height:0,width:0}),M.style.removeProperty("content-visibility"),g(!1),t.current===O&&(t.current=null)},I))}),E.observe(M,{attributes:!0,attributeFilter:[N]}),()=>{E==null||E.disconnect(),T.cancel(),t.current===O&&(O.abort(),t.current=null)}}return()=>{bt.cancel(z)}},[t,n,T,i,o,c,d,h,f,p,g]),ts(()=>{if(n.current!=="css-animation")return;const M=h.current;M&&(j.current=M.style.animationName||j.current,M.style.setProperty("animation-name","none"),p({height:M.scrollHeight,width:M.scrollWidth}),!C.current&&!v.current&&M.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),g(!0),y(!0)):(t.current=new AbortController,f(()=>{g(!1),y(!1),t.current=null},t.current.signal)))},[t,n,d,h,f,p,g,y,k]),J$(()=>{const M=bt.request(()=>{C.current=!1});return()=>bt.cancel(M)}),ts(()=>{if(!i)return;const M=h.current;if(!M)return;let z=-1,O=-1;return d&&v.current&&(M.style.transitionDuration="0s",p({height:M.scrollHeight,width:M.scrollWidth}),z=bt.request(()=>{v.current=!1,O=bt.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})})),()=>{bt.cancel(z),bt.cancel(O)}},[i,d,h,p]),ts(()=>{const M=h.current;M&&i&&A&&(M.setAttribute("hidden","until-found"),n.current==="css-transition"&&M.setAttribute(Eu.startingStyle,""))},[i,A,n,h]),x.useEffect(function(){const z=h.current;if(!z)return;function O(I){v.current=!0,b(!0),u(!0,Q$(uee,I))}return z.addEventListener("beforematch",O),()=>{z.removeEventListener("beforematch",O)}},[u,h,b]),x.useMemo(()=>({props:{hidden:A,id:l,ref:_}}),[A,l,_])}let q3=function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e}({});function _ee(e){const t=Dd(Lee,e).current;return t.next=e,ts(t.effect),t}function Lee(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function Oee(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,i=_ee(n),o=aa(r),l=tE(s,n);x.useEffect(()=>{t&&l(()=>{n===i.current&&o()})},[t,n,o,l,i])}const G1=x.forwardRef(function(t,n){const{className:s,hiddenUntilFound:r,keepMounted:i,render:o,id:l,...c}=t,{abortControllerRef:u,animationTypeRef:d,height:h,mounted:f,onOpenChange:p,open:g,panelId:b,panelRef:y,runOnceAnimationsFinish:m,setDimensions:k,setHiddenUntilFound:w,setKeepMounted:v,setMounted:j,setPanelIdState:C,setOpen:$,setVisible:T,state:A,transitionDimensionRef:S,visible:_,width:M,transitionStatus:z}=sE(),O=r??!1,I=i??!1;ts(()=>{if(l)return C(l),()=>{C(void 0)}},[l,C]),ts(()=>{w(O)},[w,O]),ts(()=>{v(I)},[v,I]);const{props:E}=Iee({abortControllerRef:u,animationTypeRef:d,externalRef:n,height:h,hiddenUntilFound:O,id:b,keepMounted:I,mounted:f,onOpenChange:p,open:g,panelRef:y,runOnceAnimationsFinish:m,setDimensions:k,setMounted:j,setOpen:$,setVisible:T,transitionDimensionRef:S,visible:_,width:M});Oee({open:g&&z==="idle",ref:y,onComplete(){g&&k({height:void 0,width:void 0})}});const N=x.useMemo(()=>({...A,transitionStatus:z}),[A,z]),R=Yb("div",t,{state:N,ref:[n,y],props:[E,{style:{[q3.collapsiblePanelHeight]:h===void 0?"auto":`${h}px`,[q3.collapsiblePanelWidth]:M===void 0?"auto":`${M}px`}},c],stateAttributesMapping:iE});return I||O||!I&&f?R:null});function Dee(e){const t=Math.floor(Math.max(0,e)/6e4);if(t<1)return"Updated just now";if(t<60)return`Updated ${t}m ago`;const n=Math.floor(t/60);return n<24?`Updated ${n}h ago`:`Updated ${Math.floor(n/24)}d ago`}function Bee({atMs:e}){const t=vc(3e4);return a.jsx("span",{className:"todo-card__updated",children:Dee(t-e)})}const qee={pending:"Not started",in_progress:"In progress",completed:"Done"};function Hee({status:e}){const t={"aria-label":qee[e],role:"img",className:"todo-card__status"};return e==="completed"?a.jsx(DS,{...t}):e==="in_progress"?a.jsx(bU,{...t}):a.jsx(cU,{...t})}function Pee(e){let t;for(const n of e){const s=n.kind==="run"?n.cot.todoWrittenAtMs:void 0;s!==void 0&&(t===void 0||s>t)&&(t=s)}return t}function Uee({todo:e,writtenThisRun:t,updatedAtMs:n}){const s=(e==null?void 0:e.items)??[],r=s.length,i=s.filter(h=>h.status==="completed").length,o=i===r,[l,c]=x.useState();if(r===0||!t&&o)return null;const u=l??!o,d=s.find(h=>h.status==="in_progress")??s.find(h=>h.status==="pending");return a.jsx("section",{className:"todo-card","data-slot":"todo-card","aria-label":"Todo",children:a.jsxs(U1,{open:u,onOpenChange:c,children:[a.jsxs("div",{className:"todo-card__header",children:[a.jsxs(F1,{className:"todo-card__trigger",children:[o?a.jsx(DS,{"aria-label":"All done",role:"img",className:"todo-card__done"}):null,a.jsxs("span",{className:"todo-card__title",children:["Todo ",i,"/",r]}),!u&&d!==void 0?a.jsxs(a.Fragment,{children:[" ",a.jsxs("span",{className:"todo-card__current",children:["· ",d.text]})]}):null,a.jsx($r,{"aria-hidden":"true",className:"chat-step__chevron"})]}),n===void 0?null:a.jsx(Bee,{atMs:n})]}),a.jsx(G1,{className:"todo-card__panel",children:a.jsx("ol",{className:"todo-card__items",children:s.map((h,f)=>a.jsxs("li",{className:"todo-card__item","data-status":h.status,children:[a.jsx(Hee,{status:h.status}),h.status==="completed"?a.jsx("s",{children:h.text}):a.jsx("span",{children:h.text})]},f))})})]})})}function Fee(e){return e.toolName==="todo_write"&&e.state==="output-available"}function Gee(e){const t=[];let n;for(const s of e){if(s.kind==="interim"){n=void 0,t.push({kind:"interim",key:`segment-${t.length}`,text:s.text});continue}n===void 0&&(n={kind:"trace",key:`segment-${t.length}`,steps:[],counted:[],live:!1},t.push(n)),n.steps.push(s),n.live||(n.live=s.live),s.kind==="tools"&&n.counted.push(...s.tools.filter(r=>!Fee(r)))}return t}const Vee=300,Wee=700;function Kee(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function oE({children:e,className:t="",dwellMs:n=Wee,pageKey:s="",...r}){const i=Math.max(n,Vee),[o,l]=x.useState({key:s,node:e}),[c,u]=x.useState(null),d=x.useRef({key:s,node:e}),h=x.useRef({key:s,node:e}),f=x.useRef(Date.now()),p=x.useRef(null);return x.useEffect(()=>{if(h.current={key:s,node:e},s===d.current.key){d.current=h.current;return}const g=()=>{const y=d.current;d.current=h.current,f.current=Date.now(),l(h.current),u(Kee()?null:y.node)};if(p.current!==null)return;const b=i-(Date.now()-f.current);if(b<=0){g();return}p.current=window.setTimeout(()=>{p.current=null,h.current.key!==d.current.key&&g()},b)},[e,i,s]),x.useEffect(()=>()=>{p.current!==null&&window.clearTimeout(p.current)},[]),a.jsx("span",{className:`chat-inline-pager ${t}`.trim(),"data-slot":"chat-inline-pager",...r,children:a.jsxs("span",{className:"chat-inline-pager__flip",children:[c?a.jsx("span",{className:"chat-inline-pager__page","data-motion":"out",children:c}):null,a.jsx("span",{className:"chat-inline-pager__page","data-motion":c?"in":void 0,onAnimationEnd:g=>{g.target===g.currentTarget&&u(null)},children:s===o.key?e:o.node})]})})}const Xee=/(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g;function Zee(e){if(/^\*{1,2}$/.test(e))return"";const t=e.split("**");return t.length%2===0?t.slice(0,-1).join("**")+t[t.length-1]:e}function Yee(e){return e.replace(/(^|\n)\*\*([^*\n]+)\*\*(?=\n|$)/g,"$1$2")}function Qee(e){return e.split(Xee).map((t,n)=>t.startsWith("**")&&t.endsWith("**")&&t.length>4?a.jsx("strong",{children:t.slice(2,-2)},n):t.startsWith("*")&&t.endsWith("*")&&t.length>2&&!t.startsWith("**")?a.jsx("em",{children:t.slice(1,-1)},n):t.startsWith("`")&&t.endsWith("`")&&t.length>2?a.jsx("code",{children:t.slice(1,-1)},n):t)}function Jee({text:e,unwrapLines:t=!1,className:n,...s}){let r=Zee(e);return t&&(r=Yee(r)),a.jsx("span",{className:`chat-thought-md ${n??""}`.trim(),...s,children:Qee(r)})}function Qb({children:e,className:t="",...n}){return a.jsx("span",{className:`text-shimmer ${t}`.trim(),"data-slot":"text-shimmer",...n,children:e})}function ete(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?"briefly":`${Math.round(e/1e3)}s`}function tte({className:e="",dwellMs:t,step:n,...s}){const r=n.text.trim(),i=ete(n.durationMs),o=a.jsx(oE,{dwellMs:t,pageKey:n.live?"live":"settled",children:n.live?a.jsx(Qb,{className:"chat-step__label",children:"Thinking…"}):a.jsx("span",{className:"chat-step__label",children:i?a.jsxs(a.Fragment,{children:["Thought ",a.jsx("span",{className:"chat-step__meta",children:i})]}):"Thought"})});return r?a.jsxs(U1,{className:`chat-step ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:[a.jsxs(F1,{className:"chat-step__trigger",children:[o,a.jsx($r,{"aria-hidden":"true",className:"chat-step__chevron"})]}),a.jsx(G1,{keepMounted:!0,className:"chat-step__panel",children:a.jsx("div",{className:"chat-step__body",children:a.jsx(Jee,{text:n.text})})})]}):a.jsx("p",{className:`chat-step chat-step--plain ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:o})}const nte={shell:hb,search:jU,web:pU,file:fU,edit:sU,tool:gU};function Th({className:e="",kind:t,...n}){const s=nte[t];return a.jsx("span",{"aria-hidden":"true",className:`chat-tool-kind ${e}`.trim(),"data-kind":t,"data-slot":"chat-tool-kind",...n,children:a.jsx(s,{})})}const ste={"input-streaming":"running","input-available":"running","output-available":"complete","output-error":"error"};function aE(e){var t,n;return e.argsText!=null||e.output!=null||(((t=e.children)==null?void 0:t.length)??0)>0||e.detail!=null||(((n=e.images)==null?void 0:n.length)??0)>0}function lE({tool:e,className:t,...n}){var s,r;return a.jsxs("div",{className:t,...n,children:[e.detail!==void 0&&e.detail!==null?e.detail:a.jsxs(a.Fragment,{children:[e.argsText!=null?a.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-args",children:e.argsText}):null,e.output!==void 0?a.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-result",children:e.output}):null]}),(s=e.children)!=null&&s.length?a.jsx("ol",{className:"chat-tool-step__list","data-slot":"chat-tool-children",children:e.children.map((i,o)=>a.jsxs("li",{className:"chat-tool-step__item",children:[a.jsx(Th,{kind:Dx(i.toolName)}),a.jsx(cE,{tools:[i]})]},i.toolCallId??o))}):null,(r=e.images)==null?void 0:r.map((i,o)=>a.jsx(rte,{image:i},o))]})}function rte({image:e}){const[t,n]=RS(),s=db(e,n);return s.status==="loading"?a.jsx("div",{ref:t,"data-testid":"tool-image-loading",children:a.jsx(ik,{height:160,width:"100%"})}):s.status==="error"?a.jsx("div",{ref:t,role:"img","aria-label":"Image unavailable",className:"flex h-40 w-full items-center justify-center text-muted",children:a.jsx(xb,{"aria-hidden":"true",className:"size-6"})}):a.jsx("div",{ref:t,children:a.jsx("img",{src:s.src,alt:"",style:{maxWidth:"100%"}})})}function ite(e,t){const n=aE(e)?a.jsx(lE,{tool:e}):void 0;return{name:Wr(e.toolName)??"tool",status:ste[e.state],target:Wb(e.argsText),...e.diffStat?{additions:e.diffStat.additions,deletions:e.diffStat.deletions}:{},duration:F$(e.durationMs),errorMessage:e.state==="output-error"?e.output:void 0,key:e.toolCallId??`tool-${t}`,resultDetail:n}}function cE({tools:e,className:t="",...n}){return e.length?a.jsx("div",{className:`chat-tool ${t}`.trim(),"data-slot":"chat-tool-group","data-tool-count":e.length,"data-state":e.length===1?e[0].state:void 0,...n,children:a.jsx(gj,{calls:e.map(ite)})}):null}const Xc={past:"Ran",noun:["command","commands"]},Eg={past:"Read",noun:["file","files"]},H3={past:"Edited",noun:["file","files"]},P3={past:"Wrote",noun:["file","files"]},U3={past:"Searched",noun:["pattern","patterns"]},F3={past:"Searched",noun:["path","paths"]},ote={past:"Listed",noun:["directory","directories"]},G3={past:"Searched",noun:["web page","web pages"]},Zf={past:"Fetched",noun:["page","pages"]},ate={bash:Xc,shell:Xc,sh:Xc,terminal:Xc,cmd:Xc,read:Eg,read_file:Eg,cat:Eg,edit:H3,str_replace:H3,write:P3,write_file:P3,grep:U3,find:F3,glob:F3,ls:ote,search:U3,web_search:G3,websearch:G3,webfetch:Zf,web_fetch:Zf,web:Zf,browser:Zf},uE={past:"Used",noun:["tool","tools"]};function V3(e){return ate[G$(e)]??uE}const W3=72;function lte(e){return e.length<=W3?e:e.includes("/")&&!e.includes(" ")?`…${e.slice(-71)}`:`${e.slice(0,W3-1)}…`}function K3(e,[t,n]){return e!==1?`${e} ${n}`:`${t==="tool"?"a":"1"} ${t}`}function dE(e){if(e.length===1){const[n]=e,s=V3(n.toolName),r=Wb(n.argsText);return r?`${s.past} ${lte(r)}`:s===uE?`Used ${Wr(n.toolName)??"a tool"}`:`${s.past} ${K3(1,s.noun)}`}const t=new Map;for(const n of e){const s=V3(n.toolName),r=`${s.past}:${s.noun[1]}`,i=t.get(r)??{verb:s,count:0};i.count+=1,t.set(r,i)}return[...t.values()].map(({verb:n,count:s},r)=>{const i=`${n.past} ${K3(s,n.noun)}`;return r===0?i:i.charAt(0).toLowerCase()+i.slice(1)}).join(", ")}function fE(e){const t=e.filter(s=>s.state==="output-error").length,n=e.reduce((s,r)=>r.diffStat?{additions:((s==null?void 0:s.additions)??0)+r.diffStat.additions,deletions:((s==null?void 0:s.deletions)??0)+r.diffStat.deletions}:s,void 0);return{failed:t,diffStat:n}}function hE({failed:e,diffStat:t}){return a.jsxs(a.Fragment,{children:[t?a.jsxs(a.Fragment,{children:[" ",a.jsxs("span",{className:"chat-step__meta","data-slot":"chat-tool-diff-stat",children:[a.jsxs("span",{className:"text-success",children:["+",t.additions]})," ",a.jsxs("span",{className:"text-danger",children:["-",t.deletions]})]})]}):null,e>0?a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"chat-step__meta chat-step__meta--error",children:e===1?"1 failed":`${e} failed`})]}):null]})}function xE(e){const t=[];for(const n of e.children??[])t.push(n,...xE(n));return t}function cte({className:e="",dwellMs:t,step:n,...s}){const{tools:r}=n,{failed:i,diffStat:o}=fE(r),l=r.flatMap(xE),c=l.length,u=l.filter(y=>y.state==="output-error").length,d=r.reduce((y,m)=>y+(m.durationMs??0),0),h=r.find(y=>y.toolCallId===n.activeToolCallId)??r[r.length-1];let f,p=h;for(;p;){const y=(p.children??[]).filter(k=>k.state==="input-available"),m=y[y.length-1];if(!m)break;f=m,p=m}const g=n.live?Dx(h==null?void 0:h.toolName):rJ(r),b=n.live?`running:${(h==null?void 0:h.toolCallId)??"none"}`:"settled";return a.jsxs(U1,{className:`chat-step chat-tool-step ${e}`.trim(),"data-slot":"chat-tool-step",...s,children:[a.jsxs(F1,{className:"chat-step__trigger",children:[a.jsx(oE,{dwellMs:t,pageKey:b,children:n.live?a.jsxs("span",{className:"chat-tool-step__page",children:[a.jsx(Th,{kind:g}),a.jsx(Qb,{className:"chat-step__label",children:h!=null&&h.toolName?f!=null&&f.toolName?`Running ${Wr(h.toolName)} › ${Wr(f.toolName)}…`:`Running ${Wr(h.toolName)}…`:"Running…"})]}):a.jsxs("span",{className:"chat-tool-step__page",children:[a.jsx(Th,{kind:g}),a.jsx("span",{className:"chat-step__label",children:dE(r)}),c>0?a.jsx("span",{className:"chat-step__meta","data-slot":"chat-tool-nested-count",children:c===1?"1 nested call":`${c} nested calls`}):null,u>0?a.jsx("span",{className:"chat-step__meta chat-step__meta--error","data-slot":"chat-tool-nested-failed",children:u===1?"1 nested failed":`${u} nested failed`}):null,a.jsx(hE,{failed:i,diffStat:o}),d>0?a.jsx("span",{className:"chat-step__meta",children:F$(d)}):null]})}),a.jsx($r,{"aria-hidden":"true",className:"chat-step__chevron"})]}),a.jsx(G1,{keepMounted:!0,className:"chat-step__panel",children:r.length===1?aE(r[0])?a.jsx("div",{className:"chat-tool-step__detail","data-slot":"chat-tool-step-detail",children:a.jsx(lE,{tool:r[0]})}):null:a.jsx("ol",{className:"chat-tool-step__list",children:r.map((y,m)=>a.jsxs("li",{className:"chat-tool-step__item",children:[a.jsx(Th,{kind:Dx(y.toolName)}),a.jsx(cE,{tools:[y]})]},y.toolCallId??m))})})]})}function ute(e){if(e===void 0||!Number.isFinite(e)||e<0)return;const t=Math.max(1,Math.round(e/1e3));if(t<60)return`${t}s`;if(t<3600){const i=Math.floor(t/60),o=t%60;return`${i}m ${o}s`}const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return`${n}h ${s}m ${r}s`}function dte(e){const t=Math.max(0,e)/1e3;return t<60?`${t.toFixed(1)}s`:`${Math.floor(t/60)}m ${(t%60).toFixed(1)}s`}function fte({children:e,className:t="",phase:n,...s}){return n==="hidden"?null:a.jsx("div",{className:`chain-of-thought ${t}`.trim(),"data-phase":n,"data-slot":"chain-of-thought",...s,children:e})}function hte({startedAtMs:e,running:t}){const[n,s]=x.useState(()=>Date.now()),[r,i]=x.useState(t);return t&&!r&&i(!0),x.useEffect(()=>{if(!t)return;s(Date.now());const o=window.setInterval(()=>s(Date.now()),100);return()=>{window.clearInterval(o),s(Date.now())}},[t]),e===void 0||!r?null:a.jsxs(a.Fragment,{children:[" ",a.jsxs("span",{className:"chat-step__meta","data-slot":"chat-trace-clock",children:["· ",dte(n-e)]})]})}function xte(e){const t=e.findLast(s=>s.live);if((t==null?void 0:t.kind)==="thinking")return"Thinking…";if((t==null?void 0:t.kind)!=="tools")return;const n=t.tools.find(s=>s.toolCallId===t.activeToolCallId)??t.tools[t.tools.length-1];return n!=null&&n.toolName?`Running ${Wr(n.toolName)}…`:"Running…"}function X3({className:e="",clock:t,counted:n,live:s=!1,steps:r,tail:i,waiting:o,...l}){const c=n.filter(p=>p.state==="output-available"||p.state==="output-error"),u=s?xte(r)??o:void 0,d=r.some(p=>p.kind==="thinking"&&!p.live),h=c.length>0?dE(c):u!==void 0?void 0:d?"Thought":"Updated the todo list",f=a.jsxs(a.Fragment,{children:[h===void 0?null:a.jsx("span",{className:"chat-trace__label",children:h}),a.jsx(hE,{...fE(c)}),u===void 0?null:a.jsxs(a.Fragment,{children:[h===void 0?null:a.jsxs(a.Fragment,{children:[" ",a.jsx("span",{className:"chat-step__meta",children:"·"})," "]}),a.jsx(Qb,{className:"chat-trace__label","data-slot":"chat-trace-current",children:u})]}),i===void 0?null:a.jsxs(a.Fragment,{children:[" ",a.jsxs("span",{className:"chat-step__meta","data-slot":"chat-trace-tail",children:["· ",i]})]}),t===void 0?null:a.jsx(hte,{...t})]});return r.length===0?a.jsx("div",{className:`chat-trace ${e}`.trim(),"data-slot":"chat-trace",...l,children:a.jsx("p",{className:"chain-of-thought__label",children:f})}):a.jsxs(U1,{className:`chat-trace ${e}`.trim(),"data-slot":"chat-trace",...l,children:[a.jsxs(F1,{className:"chain-of-thought__trigger","data-slot":"chat-trace-trigger",children:[f,a.jsx($r,{"aria-hidden":"true",className:"chat-step__chevron"})]}),a.jsx(G1,{keepMounted:!0,className:"chain-of-thought__content","data-slot":"chain-of-thought-content",children:a.jsx("ol",{className:"chain-of-thought__steps","data-slot":"chain-of-thought-steps",children:r.map(p=>a.jsx("li",{className:"chain-of-thought__step","data-slot":"chain-of-thought-step",children:p.kind==="thinking"?a.jsx(tte,{step:p}):a.jsx(cte,{step:p})},p.id))})})]})}const K0=x.createContext(!1);function pte(e){var l;if(!e||/^[#?]/.test(e)||e.startsWith("//")||e.includes("\\")||/^(mailto|tel|data|javascript):/i.test(e)||/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//.test(e))return null;const[t,n=""]=e.split("#",2),s=/:(\d+)(?::\d+)?$/.exec(t??""),r=s?t.slice(0,s.index):t??"";if(!r||r.endsWith("/"))return null;const i=Number(((l=/^L(\d+)(?:-L?\d+)?$/.exec(n))==null?void 0:l[1])??(s==null?void 0:s[1])),o=r.slice(r.lastIndexOf("/")+1);return{path:r,name:o,...Number.isSafeInteger(i)&&i>0?{line:i}:{}}}function gte(e){return typeof e=="string"?e:Array.isArray(e)&&e.every(t=>typeof t=="string")?e.join(""):null}function mte({href:e,children:t}){const n=pte(e);if(!n){const i=/^https?:\/\//.test(e);return a.jsx(Hj,{color:"accent",hasUnderline:!0,href:e,type:"inherit",...i?{target:"_blank",rel:"noopener noreferrer"}:{},children:a.jsx(K0.Provider,{value:!0,children:t})})}const s=gte(t),r=s!==null&&(s===e||s===n.path||n.line!==void 0&&s===`${n.path}:${n.line}`);return a.jsxs("a",{className:"chat-file-link","data-slot":"chat-file-link",href:e,title:n.line?`${n.path}:${n.line}`:n.path,children:[a.jsx(yc,{"aria-hidden":!0,className:"chat-file-link__icon"}),a.jsx(K0.Provider,{value:!0,children:r?n.line?`${n.name}:${n.line}`:n.name:t})]})}const pE=3,gE=x.createContext(void 0);function mE({children:e}){const t=x.useContext(gE),n=x.useContext(K0),s=a.jsx(Iy,{className:"chat-inline-code","data-slot":"chat-inline-code",children:e}),r=typeof e=="string"?e.trim():e;return!n&&typeof r=="string"&&(t!=null&&t.has(r))?a.jsx("a",{href:r,className:"chat-inline-code-link","data-slot":"chat-inline-code-link",title:r,children:s}):s}const yE={inlineCode:mE},kE={inlineCode:mE,link:mte};function bE({children:e,fileLinks:t=!1,linkedInlineCode:n,className:s="",...r}){return a.jsx("div",{className:`chat-markdown ${s}`.trim(),"data-slot":"chat-markdown","data-testid":"markdown-renderer",...r,children:a.jsx(gE.Provider,{value:t?n:void 0,children:a.jsx(ek,{components:t?kE:yE,density:"compact",headingLevelStart:pE,children:e})})})}function yte({children:e,isStreaming:t=!1,fileLinks:n=!1,className:s="",...r}){return a.jsx("div",{className:`chat-markdown chat-markdown--stream ${s}`.trim(),"data-is-streaming":String(!!t),"data-slot":"chat-stream-markdown","data-testid":"stream-markdown-renderer",...r,children:a.jsx(ek,{components:n?kE:yE,density:"compact",headingLevelStart:pE,isStreaming:t,children:e})})}function kte({children:e,className:t="",...n}){return a.jsx(Gy,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-user",sender:"user",...n,children:e})}function bte({children:e,className:t="",...n}){return a.jsx(Gy,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-assistant",sender:"assistant",...n,children:e})}function vte({children:e,className:t="",...n}){return a.jsx(hj,{className:t||void 0,"data-slot":"chat-message-bubble",...n,children:e})}function wte({children:e,className:t="",...n}){return a.jsx("div",{className:`chat-message__body ${t}`.trim(),"data-slot":"chat-message-body",...n,children:e})}function jte({children:e,className:t="",...n}){return a.jsx("div",{className:`chat-message__content ${t}`.trim(),"data-slot":"chat-message-content",...n,children:e})}function V1({"aria-label":e,tooltip:t,onPress:n,children:s,className:r="",...i}){return a.jsx("button",{"aria-label":e,className:`chat-message__action ${r}`.trim(),"data-slot":"chat-message-action",title:t,type:"button",onClick:n,...i,children:s})}function la({children:e,className:t="",...n}){return a.jsx("div",{className:`chat-message__actions ${t}`.trim(),"data-slot":"chat-message-actions",...n,children:e})}function Ste(e){return a.jsx(V1,{...e,children:a.jsx(uU,{"aria-hidden":"true",size:16})})}function Cte(e){return a.jsx(V1,{...e,children:a.jsx($U,{"aria-hidden":"true",size:16})})}function $te(e){return a.jsx(V1,{...e,children:a.jsx(CU,{"aria-hidden":"true",size:16})})}la.Copy=Ste;la.ThumbsUp=Cte;la.ThumbsDown=$te;const _i={User:kte,Assistant:bte,Bubble:vte,Body:wte,Content:jte,Action:V1},Ete=new Set(["ECONNREFUSED","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ECONNRESET","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"]);function Tte(e){if(typeof e=="string")return e;if(e instanceof Error)return e.message;if(e&&typeof e=="object"&&"message"in e){const t=e.message;if(typeof t=="string")return t}return""}function vE(e,t=0){if(t>4)return{message:""};const n=Tte(e);if(!e||typeof e!="object")return{message:n};const s=e,r=Nte(s),i=typeof s.code=="string"&&Ete.has(s.code)?s.code:void 0,o=vE(s.cause,t+1),l=o.message&&!n.includes(o.message)?o.message:"";return{status:r??o.status,networkCode:i??o.networkCode,message:[n,l].filter(Boolean).join(" ")}}function Nte(e){if(typeof e.statusCode=="number")return e.statusCode;if(typeof e.status=="number")return e.status;const t=e.$metadata;if(Z3(t)&&typeof t.httpStatusCode=="number")return t.httpStatusCode;const n=e.$response;if(Z3(n)&&typeof n.statusCode=="number")return n.statusCode}function Z3(e){return typeof e=="object"&&e!==null}const Ate=/network.?error|connection.?error|connection.?refused|connection.?lost|other side closed|fetch failed|getaddrinfo|ENOTFOUND|EAI_AGAIN|upstream.?connect|reset before headers|socket hang up|socket connection was closed|timed? out|timeout|terminated|websocket.?closed|websocket.?error|ended without|stream ended before message_stop|stream ended before a terminal response event|http2 request did not get a response|ECONNREFUSED|ETIMEDOUT|ECONNRESET|UND_ERR_/i,Mte=/invalid_grant|oauth refresh failed|refresh.?token/i;function zte(e){return e.status===401||/\b401\b/.test(e.message)?"auth":e.status===403||/\b403\b/.test(e.message)||/\b(?:plan|subscription|entitlement)\b/i.test(e.message)?"entitlement":e.networkCode||Ate.test(e.message)?"network":/invalid.?api.?key|authentication_error|unauthorized/i.test(e.message)||Mte.test(e.message)?"auth":"unknown"}function Rte(e){return zte(vE(e))}function Ite(e){const t=Rte(e);return t==="auth"?{title:"Provider authentication failed",description:"The provider rejected the credentials. Sign in again or update them in Provider settings, then retry. You can also choose another model."}:t==="entitlement"?{title:"This model is not included in your subscription plan",description:"Test the connection in Settings → Providers."}:/\b429\b|rate.?limit|quota.?exceeded/i.test(e)?{title:"Provider limit reached",description:"Wait a moment, or choose another model and retry."}:{title:"Run failed",description:/[{}\n]/.test(e)?"The provider could not complete this request. Check the error details, then retry or choose another model.":e}}function _te({error:e,onRetry:t,onOpenProviderSettings:n,modelControl:s,className:r,...i}){const[o,l]=x.useState(!1),[c,u]=x.useState(!1),d=x.useRef(!1),[h,f]=x.useState(null),p=Ite(e),g=async()=>{if(!(!t||d.current)){d.current=!0,l(!0),f(null);try{await t()}catch(b){f(b instanceof Error?b.message:"Retry could not start.")}finally{d.current=!1,l(!1)}}};return a.jsxs(fe,{className:r,gap:2,...i,children:[a.jsx(wt,{status:"error",title:p.title,description:p.description}),a.jsxs($e,{gap:2,wrap:"wrap",children:[n?a.jsx(ne,{label:"Provider settings",size:"sm",variant:"secondary",onClick:n}):null,s,t?a.jsx(ne,{label:"Retry request",size:"sm",variant:"secondary",isDisabled:o,onClick:()=>void g()}):null]}),h?a.jsx(re,{role:"alert",style:{color:"var(--danger)"},children:h}):null,a.jsx(_j,{trigger:a.jsx(re,{type:"body",size:"sm",color:"secondary",children:"Error details"}),isOpen:c,onOpenChange:u,children:c?a.jsx(re,{as:"div",type:"body",size:"sm",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:e}):null})]})}function wE(e){const t=[],n=[];for(const s of e)s.type.startsWith("image/")?t.push(s):n.push(s);return{images:t,others:n}}function jE(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(e<10*1024?1:0)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Lte(e){let t="";for(let s=0;s<e.length;s+=32768)t+=String.fromCharCode(...e.subarray(s,s+32768));return btoa(t)}function Ote(e){return Math.max(0,cr-e)}function Dte(e){return cJ(e.name,e.size)}class SE extends Error{constructor(){super("Upload cancelled"),this.name="UploadCancelled"}}async function Bte(e,t,n,s){let r=n.attachmentId,i=n.received;if(r===void 0&&(r=await e.beginAttachment(t.name,t.size),s.onId(r)),t.size===0)return s.onProgress(0,!0),{attachmentId:r,received:0};for(;i<t.size;){if(s.isCancelled())throw new SE;const o=Math.min(i+iJ,t.size),l=Lte(new Uint8Array(await t.slice(i,o).arrayBuffer())),c=await e.appendAttachment(r,i,l);if(c.complete)return s.onProgress(t.size,!0),{attachmentId:r,received:t.size};if(c.received<=i)throw new Error("Upload made no progress");i=c.received,s.onProgress(i,!1)}return s.onProgress(t.size,!0),{attachmentId:r,received:t.size}}function CE({entry:e,onRetry:t,onRemove:n}){const s=e.size===0?100:Math.min(100,Math.round(e.received/e.size*100));return a.jsxs("div",{className:"file-chip","data-status":e.status,"data-testid":"file-attachment-chip",title:e.error??e.name,children:[a.jsx(yc,{"aria-hidden":"true",className:"file-chip__icon"}),a.jsx("span",{className:"file-chip__name",children:e.name}),a.jsx("span",{className:"file-chip__size",children:e.status==="failed"?"Failed":e.status==="uploading"?`${s}%`:jE(e.size)}),e.status==="failed"&&t!==void 0?a.jsx("button",{type:"button",className:"file-chip__action","aria-label":`Retry ${e.name}`,title:"Retry upload",onClick:()=>t(e.key),children:a.jsx(BS,{"aria-hidden":"true"})}):null,n===void 0?null:a.jsx("button",{type:"button",className:"file-chip__action","aria-label":`Remove ${e.name}`,title:"Remove",onClick:()=>n(e.key),children:a.jsx(aU,{"aria-hidden":"true"})}),e.status==="uploading"?a.jsx("span",{className:"file-chip__bar","aria-hidden":"true",children:a.jsx("span",{style:{width:`${s}%`}})}):null]})}function qte({attachments:e}){return e.length===0?null:a.jsx("div",{className:"flex flex-wrap justify-end gap-2","data-testid":"message-attachments",children:e.map((t,n)=>a.jsxs("div",{className:"file-chip","data-status":"done",title:t.name,children:[a.jsx(yc,{"aria-hidden":"true",className:"file-chip__icon"}),a.jsx("span",{className:"file-chip__name",children:t.name}),a.jsx("span",{className:"file-chip__size",children:jE(t.size)})]},`${t.id}:${n}`))})}function Hte({images:e}){const[t,n]=x.useState(void 0);return e.length===0?null:a.jsxs("div",{className:"flex flex-wrap justify-end gap-2","data-testid":"message-images",children:[e.map((s,r)=>a.jsx(Pte,{image:s,index:r,onOpen:()=>n(r)},r)),t===void 0?null:a.jsx(Ute,{images:e,index:t,onIndexChange:n,onClose:()=>n(void 0)})]})}function Pte({image:e,index:t,onOpen:n}){const[s,r]=RS(),i=db(e,r);return a.jsx("div",{ref:s,children:a.jsx(Vh,{src:i.status==="ready"?i.src:void 0,isLoading:i.status==="loading",alt:`Image ${t+1}`,onClick:n})})}function Ute({images:e,index:t,onIndexChange:n,onClose:s}){const r=e[t],i=db(r,!0),o=e.map((l,c)=>({src:c===t?i.status==="ready"?i.src:"":rP(l)??"",alt:`Image ${c+1}`}));return a.jsx(qj,{isOpen:!0,media:o,index:t,onIndexChange:n,onOpenChange:l=>{l||s()}})}const Y3={done:"Done",failed:"Failed",running:"Running"};function $E(e){const t=Math.max(0,Math.floor(e/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function Fte({startedAt:e}){const t=vc(1e3);return a.jsx(a.Fragment,{children:$E(t-e)})}function Gte({tool:e,summary:t,openInPanel:n}){const s=Xb(e),r=(s==null?void 0:s.kind)==="subagent"?s:void 0,i=e.state==="output-available"?"done":e.state==="output-error"?"failed":"running",o=t!==void 0?Hn(t):Wb(e.argsText)??"Subagent",l=r==null?void 0:r.startedAt,c=r==null?void 0:r.endedAt,u=[Y3[i],(t==null?void 0:t.role)===void 0?void 0:`@${t.role}`,r==null?void 0:r.model,l===void 0?void 0:i==="running"?a.jsx(Fte,{startedAt:l},"elapsed"):c===void 0?void 0:$E(c-l)];return a.jsxs(fe,{className:"pigui-subagent-card rounded-lg border border-border p-3",gap:1,"data-slot":"subagent-card","data-status":i,children:[a.jsxs($e,{gap:2,vAlign:"center",children:[a.jsx(br,{variant:i==="failed"?"error":i==="running"?"success":"neutral",label:Y3[i],isPulsing:i==="running"}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:o}),r===void 0?null:a.jsx(ne,{label:"View",variant:"ghost",size:"sm",onClick:()=>n(r.conversationId,"tasks")})]}),a.jsx("div",{className:"text-xs text-muted",children:u.map((d,h)=>d===void 0||d===""?null:h===0?a.jsx("span",{children:d},h):a.jsxs("span",{children:[" · ",d]},h))}),i==="running"&&(t==null?void 0:t.activity)!==void 0?a.jsxs("div",{className:"text-xs text-muted",children:["→ ",Wr(t.activity.tool)??t.activity.tool,t.activity.target===void 0?"":` ${t.activity.target}`]}):null,i==="failed"&&e.output!==void 0&&e.output!==""?a.jsx("div",{className:"text-xs text-muted",children:e.output}):null]})}function Vte({tools:e,summaryOf:t,openInPanel:n}){return e.length===0?null:a.jsx(fe,{gap:2,className:"pigui-subagent-cards",children:e.map(({key:s,tool:r})=>{const i=Xb(r);return a.jsx(Gte,{tool:r,summary:(i==null?void 0:i.kind)==="subagent"?t==null?void 0:t(i.conversationId):void 0,openInPanel:n},s)})})}const Tg=(e,t,n)=>e.startsWith(`${t} ${n}`)?e.slice(t.length+1+n.length):e.slice(t.length+1);function EE(e){const t=[];let n,s=0,r=0,i=!1;const o=c=>({path:c,isNew:!1,isDeleted:!1,binary:!1,additions:0,deletions:0,lines:[]}),l=()=>{n!==void 0&&(n.path===""&&n.oldPath!==void 0&&(n.path=n.oldPath),t.push(n))};for(const c of e.split(`
|
|
394
|
-
`)){if((s>0||r>0)&&n!==void 0){c.startsWith("\\")?n.lines.push({kind:"ctx",text:c}):c.startsWith("+")?(n.additions+=1,n.lines.push({kind:"add",text:c}),r-=1):c.startsWith("-")?(n.deletions+=1,n.lines.push({kind:"del",text:c}),s-=1):(n.lines.push({kind:"ctx",text:c}),s-=1,r-=1);continue}if(c.startsWith("@@")){const u=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/.exec(c);n!==void 0&&u!==null&&(s=u[2]===void 0?1:Number(u[2]),r=u[4]===void 0?1:Number(u[4]),n.lines.push({kind:"meta",text:c}));continue}if(c.startsWith("diff --git ")){l();const u=/^diff --git a\/(\S+) b\/(\S+)$/.exec(c);n=o((u==null?void 0:u[2])??c.slice(11)),i=!0;continue}if(c.startsWith("--- ")){n!==void 0&&i?(i=!1,c==="--- /dev/null"?n.isNew=!0:n.oldPath=Tg(c,"---","a/")):(l(),n=o(""),c==="--- /dev/null"?n.isNew=!0:n.oldPath=Tg(c,"---","a/"));continue}n!==void 0&&(c.startsWith("+++ ")?c==="+++ /dev/null"?n.isDeleted=!0:n.path=Tg(c,"+++","b/"):c.startsWith("new file mode")?n.isNew=!0:c.startsWith("deleted file mode")?n.isDeleted=!0:c.startsWith("rename from ")?n.oldPath=c.slice(12):c.startsWith("rename to ")?n.path=c.slice(10):c.startsWith("copy from ")?n.oldPath=c.slice(10):c.startsWith("copy to ")?n.path=c.slice(8):(c.startsWith("Binary files")||c.startsWith("GIT binary patch"))&&(n.binary=!0))}return l(),t}const Wte={fontFamily:"var(--font-family-code)",fontSize:"var(--font-size-sm)",lineHeight:"var(--line-height-sm, 1.5)",overflowX:"auto",whiteSpace:"pre",borderRadius:"var(--radius-sm, 6px)"},Kte={add:{backgroundColor:"var(--color-success-muted)",color:"var(--color-text-primary)"},del:{backgroundColor:"var(--color-error-muted)",color:"var(--color-text-primary)"},ctx:{color:"var(--color-text-secondary)"},meta:{color:"var(--color-text-accent)",backgroundColor:"var(--color-background-muted)"}};function TE({patch:e}){const t=x.useMemo(()=>EE(e),[e]);return t.length===0?a.jsx(re,{type:"supporting",children:"No changes."}):a.jsx(fe,{gap:2,children:t.map((n,s)=>a.jsxs(fe,{gap:0,children:[a.jsxs($e,{gap:2,vAlign:"center",padding:1,children:[a.jsx(re,{type:"supporting",weight:"semibold",maxLines:1,children:n.oldPath!==void 0&&n.oldPath!==n.path?`${n.oldPath} → ${n.path}`:n.path}),n.isNew?a.jsx(Nn,{label:"new",color:"green",size:"sm"}):null,n.isDeleted?a.jsx(Nn,{label:"deleted",color:"red",size:"sm"}):null,a.jsxs(re,{type:"supporting",children:["+",n.additions," −",n.deletions]})]}),n.binary===!0?a.jsx(re,{type:"supporting",children:"Binary file"}):n.lines.length===0?null:a.jsx("div",{style:Wte,children:n.lines.map((r,i)=>a.jsx("div",{style:Kte[r.kind],children:r.text},i))})]},`${n.path}-${s}`))})}function Xte(e){return e.kind==="diff"?a.jsx(TE,{patch:e.patch}):void 0}function Zte(e){const t=n=>{var o;const s=Xb(n),r=s===void 0?void 0:Xte(s),i=(o=n.children)==null?void 0:o.map(t);return r===void 0&&i===void 0?n:{...n,...r===void 0?{}:{detail:r},...i===void 0?{}:{children:i}}};return{...e,steps:e.steps.map(n=>n.kind==="tools"?{...n,tools:n.tools.map(t)}:n)}}function Yte({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:i,summaryOf:o,onRetry:l,todo:c}){switch(e.kind){case"user":return a.jsx(_i.User,{children:a.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.attachments.length===0?null:a.jsx(qte,{attachments:e.attachments}),e.images.length===0?null:a.jsx(Hte,{images:e.images}),e.text===""?null:a.jsxs(a.Fragment,{children:[a.jsx(_i.Bubble,{children:a.jsx(_i.Content,{children:a.jsx(JQ,{text:e.text,names:e.skills})})}),a.jsx(la,{className:"shrink-0",children:a.jsx(la.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var u;(u=navigator.clipboard)==null||u.writeText(e.text)}})})]})]})});case"run":return a.jsx(Qte,{entry:e,connected:t,openInPanel:n,onFork:s,canFork:r,forksAt:i,summaryOf:o,onRetry:l,todo:c});case"compaction":return a.jsx(Uh,{variant:"divider",children:"Earlier context summarized"});case"reset":return a.jsx(Uh,{variant:"divider",children:"New context"})}}function Qte({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:i,summaryOf:o,onRetry:l,todo:c}){const{view:u,subagents:d}=x.useMemo(()=>DJ(e.cot),[e.cot]),h=x.useMemo(()=>Zte(u),[u]),f=h.answer,p=e.forkEntryId===void 0?[]:(i==null?void 0:i(e.forkEntryId))??[],g=h.phase==="settled"&&(f!==void 0||e.forkEntryId!==void 0&&(r||p.length>0));return a.jsx(_i.Assistant,{children:a.jsxs(_i.Body,{children:[e.interrupted?a.jsx("p",{className:"mb-1",children:a.jsx(Nn,{label:"interrupted",color:"orange",size:"sm"})}):null,a.jsx(Jte,{view:h}),a.jsx(Vte,{tools:d,summaryOf:o,openInPanel:n}),f===void 0?null:a.jsx(_i.Content,{children:f.streaming?a.jsx(yte,{isStreaming:!0,children:f.text}):a.jsx(bE,{children:f.text})}),e.failure===void 0?null:a.jsx(_te,{error:e.failure,onRetry:l}),g?a.jsxs(la,{className:"chat-message__actions--persist",children:[f===void 0?null:a.jsx(la.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var b;(b=navigator.clipboard)==null||b.writeText(f.text)}}),e.forkEntryId===void 0?null:p.length>0?a.jsxs("button",{type:"button",className:"pigui-fork-chip","aria-label":`${p.length} ${p.length===1?"fork":"forks"}`,title:"Open in Threads",disabled:!t,onClick:()=>n(p[0],"threads"),children:[a.jsx(gw,{"aria-hidden":"true"}),p.length," ",p.length===1?"fork":"forks"]}):r?a.jsx(_i.Action,{"aria-label":"Fork",tooltip:"Continue from here in a new conversation",disabled:!t,onPress:()=>s(e.forkEntryId),children:a.jsx(gw,{"aria-hidden":"true",className:"size-4"})}):null]}):null,a.jsx(Uee,{todo:c==null?void 0:c.state,writtenThisRun:h.todoWrittenAtMs!==void 0,...(c==null?void 0:c.updatedAtMs)===void 0?{}:{updatedAtMs:c.updatedAtMs}})]})})}function Jte({view:e}){var d;const t=x.useMemo(()=>Gee(e.steps),[e.steps]);if(e.phase==="hidden")return null;const n=e.phase==="thinking"||e.phase==="acting";if(!n&&t.length===0)return null;const s=e.phase==="settled"?ute(e.elapsedMs):void 0,r=s===void 0?void 0:e.outcome==="failed"?`Failed after ${s}`:s,i=n||e.phase==="answering"?{startedAtMs:e.anchorMs,running:n}:void 0,o=e.phase==="thinking"?"Thinking…":"Working…",l=n&&((d=t.at(-1))==null?void 0:d.kind)!=="trace",c=l?t.length:t.findLastIndex(h=>h.kind==="trace"),u={...n?{live:!0,waiting:o}:{},...r===void 0?{}:{tail:r},...i===void 0?{}:{clock:i}};return a.jsxs(fte,{phase:e.phase,children:[t.map((h,f)=>h.kind==="interim"?a.jsx(_i.Content,{"data-slot":"chat-interim-output",children:a.jsx(bE,{children:h.text})},h.key):a.jsx(X3,{steps:h.steps,counted:h.counted,...f===c?u:{}},h.key)),l?a.jsx(X3,{steps:[],counted:[],...u},`segment-${c}`):null]})}function NE({conversation:e,toolPresentations:t,connected:n,canFork:s,openInPanel:r,onFork:i,forksAt:o,summaryOf:l,ownOnly:c,forkSource:u,onRetry:d,docs:h}){const f=z1(e),p=x.useMemo(()=>c?{...e,entries:e.entries.filter(v=>v.conversationId===e.conversation.id)}:e,[e,c]),g=x.useMemo(()=>LJ(p,t,f),[p,t,f]),b=x.useMemo(()=>OJ(g),[g]),y=x.useMemo(()=>ene(h),[h]),m=x.useMemo(()=>Pee(g),[g]),k=x.useMemo(()=>y===void 0?void 0:{state:y,...m===void 0?{}:{updatedAtMs:m}},[y,m]),w=g.findLastIndex(v=>v.kind==="run");return g.length===0&&!c?null:a.jsx(fj,{isStreaming:f,gap:0,children:a.jsxs("div",{className:"mx-auto flex w-full max-w-[44rem] flex-col gap-8 px-4 pb-6 pt-2",children:[c?a.jsxs(Uh,{variant:"divider",children:["Forked from ",u]}):null,g.map((v,j)=>a.jsx(Yte,{entry:v,connected:n,openInPanel:r,onFork:i,canFork:s,forksAt:o,summaryOf:l,...j===w&&k!==void 0?{todo:k}:{},onRetry:d!==void 0&&n&&b!==void 0&&j===g.length-1?()=>d(b):void 0},v.id))]})})}function ene(e){for(const t of e??[]){if(t.value===null)continue;const n=Sc(t.presentation,t.value);if(n.type==="pinomad.todo")return n.value}}const tne={"needs-answer":"warning",failed:"error",running:"success"},nne={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function AE({status:e}){return e===void 0?null:a.jsx("span",{"aria-hidden":"true",children:a.jsx(br,{variant:tne[e],label:nne[e],isPulsing:e!=="failed"})})}function Q3({view:e,remote:t,conversation:n,tab:s,onTabChange:r,openInPanel:i,onOpenInMain:o}){var b;const l=vc(6e4),c=e.side,u=c===void 0||(b=mr(e.organized,c.id))==null?void 0:b.summary,d=n===void 0?void 0:M1(e.organized,n.conversation.id),h=d===void 0?[]:NS(d),f=d===void 0?[]:ub(d),p=f.reduce((y,m)=>y+m.tasks.length,0),g=()=>void t.controller.showSide(void 0);return a.jsxs(fe,{className:"h-full min-h-0",gap:0,children:[a.jsxs(Fj,{value:s,onChange:y=>r(y),layout:"fill",hasDivider:!0,children:[a.jsx(Yg,{value:"threads",label:"Threads",endContent:h.length===0?void 0:a.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:h.length})}),a.jsx(Yg,{value:"tasks",label:"Tasks",endContent:p===0?void 0:a.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:p})})]}),s==="threads"?c!==void 0&&(u==null?void 0:u.kind)==="fork"?a.jsx(sne,{view:e,remote:t,side:c,summary:u,onBack:g,onOpenInMain:o,openInPanel:i},c.id):a.jsx(J3,{children:h.length===0?a.jsx(re,{type:"supporting",className:"p-3 text-muted",children:"No threads yet"}):a.jsx(Mt,{density:"compact",children:h.map(y=>a.jsx(e4,{summary:y.summary,now:l,onOpen:()=>i(y.summary.id,"threads")},y.summary.id))})}):c!==void 0&&(u==null?void 0:u.kind)==="subagent"?a.jsx(rne,{view:e,remote:t,side:c,summary:u,onBack:g,openInPanel:i}):a.jsx(J3,{children:f.length===0?a.jsx(re,{type:"supporting",className:"p-3 text-muted",children:"No tasks yet"}):f.map(y=>a.jsx(Mt,{density:"compact",header:a.jsx("div",{className:"px-3 pt-2",children:a.jsx(re,{type:"label",weight:"semibold",children:y.label})}),children:y.tasks.map(m=>a.jsx(e4,{summary:m.summary,now:l,onOpen:()=>i(m.summary.id,"tasks")},m.summary.id))},y.owner.id))})]})}function J3({children:e}){return a.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e})}function e4({summary:e,now:t,onOpen:n}){const s=fb(e);return a.jsx(rt,{label:e.kind!=="fork"||s===void 0?Hn(e):a.jsxs("span",{className:"inline-flex min-w-0 items-baseline gap-1.5",children:[a.jsx("span",{className:"truncate",children:Hn(e)}),a.jsxs("span",{className:"shrink-0 text-xs text-muted",children:["@",s]})]}),description:e.status==="running"&&e.activity!==void 0?`→ ${Wr(e.activity.tool)??e.activity.tool}${e.activity.target===void 0?"":` ${e.activity.target}`}`:void 0,startContent:a.jsx(AE,{status:e.status}),endContent:e.updatedAt===void 0?void 0:a.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:cb(e.updatedAt,t)}),onClick:n})}function ME({back:e,title:t,status:n,onBack:s,extra:r}){return a.jsxs($e,{className:"shrink-0 gap-1 border-b border-border px-2 py-1",vAlign:"center",children:[a.jsx(En,{icon:a.jsx(OS,{className:"size-4","aria-hidden":"true"}),label:e,size:"sm",variant:"ghost",onClick:s}),a.jsx(AE,{status:n}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:t}),r]})}function zE({view:e,remote:t,side:n,openInPanel:s,ownOnly:r,forkSource:i,onRetry:o}){return n.conversation===void 0?null:a.jsx(NE,{conversation:n.conversation,docs:n.docs,toolPresentations:e.toolPresentations,connected:e.connection==="connected",canFork:!1,openInPanel:s,onFork:()=>{},ownOnly:r,forkSource:i,summaryOf:l=>{var c;return(c=mr(e.organized,l))==null?void 0:c.summary},forksAt:l=>AS(e.organized,n.id,l),onRetry:o})}function sne({view:e,remote:t,side:n,summary:s,onBack:r,onOpenInMain:i,openInPanel:o}){var k,w,v,j;const l=n.conversation,c=l!==void 0&&z1(l),u=Fb(),{value:d,setValue:h}=u,f=x.useRef(null),p=Hb(e.agents,f,((k=e.home)==null?void 0:k.kind)!=="chat"&&Pe(((w=e.host)==null?void 0:w.protocol.minor)??0,"listFiles")?{key:`conversation:${n.id}`,list:C=>t.controller.listFiles({kind:"conversation",conversationId:n.id},C)}:void 0),g=Ub(t,{kind:"conversation",conversationId:n.id},f,e.connection==="connected"&&Pe(((v=e.host)==null?void 0:v.protocol.minor)??0,"listSkills"),u.pick);Gb(f,u.draft);const b=[...p??[],...g.trigger===void 0?[]:[g.trigger]],y=()=>{const C=Pb(u.draft),$=C.text.trim();$!==""&&(Yl(),t.controller.submit($,"followUp",{target:n.id,skills:C.skills}),h(""))},m=s.parent===void 0||(j=mr(e.organized,s.parent))==null?void 0:j.summary;return a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[a.jsx(ME,{back:"Back to threads",title:Hn(s),status:s.status,onBack:r,extra:a.jsx(ne,{label:"Open in main",variant:"secondary",size:"sm",onClick:()=>i(n.id)})}),a.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[a.jsx(zE,{view:e,remote:t,side:n,openInPanel:o,ownOnly:!0,forkSource:Hn(m),onRetry:async({text:C,images:$,skills:T,attachments:A,requestId:S})=>{Yl(),await t.controller.submit(C,"followUp",{target:n.id,requestId:S,images:$.map(TS),skills:T,...A.length===0?{}:{attachments:A.map(_=>_.id)}})}}),a.jsx(O$,{docs:n.docs,remote:t,connected:e.connection==="connected",target:n.id})]}),a.jsx("div",{className:"shrink-0 border-t border-border p-2",children:a.jsx(Vb,{value:d,inputRef:f,placeholder:"Reply in this thread…",status:c?"streaming":"ready",isDisabled:e.connection!=="connected",onSubmit:y,onStop:()=>void t.controller.abort(n.id),onValueChange:h,onFocus:g.request,triggers:b.length===0?void 0:b})})]})}function rne({view:e,remote:t,side:n,summary:s,onBack:r,openInPanel:i}){return a.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[a.jsx(ME,{back:"Back to tasks",title:Hn(s),status:s.status,onBack:r}),a.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:a.jsx(zE,{view:e,remote:t,side:n,openInPanel:i})}),a.jsx("div",{className:"shrink-0 border-t border-border p-2 text-center text-xs text-muted",children:"Read-only · subagent"})]})}function t4({view:e,remote:t,conversation:n,narrow:s,open:r,onOpenChange:i,tab:o,onTabChange:l,openInPanel:c,onOpenInMain:u}){const d=Bj({defaultSize:440,minSizePx:360,maxSizePx:720,autoSaveId:"pinomad-side-panel"});return s?a.jsx(vr,{isOpen:r,onOpenChange:i,variant:"fullscreen",children:a.jsx(Ks,{header:a.jsx(jr,{title:"Side panel",onOpenChange:i}),content:a.jsx(Xs,{padding:0,children:a.jsx(Q3,{view:e,remote:t,conversation:n,tab:o,onTabChange:l,openInPanel:c,onOpenInMain:u})})})}):r?a.jsxs("div",{className:"relative h-full shrink-0 border-l border-border",style:{width:d.size},"aria-label":"Side panel",role:"complementary",children:[a.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:a.jsx(Q3,{view:e,remote:t,conversation:n,tab:o,onTabChange:l,openInPanel:c,onOpenInMain:u})}),a.jsx(nk,{direction:"horizontal",position:"overlay",isReversed:!0,label:"Resize side panel",resizable:d.props})]}):null}function ine(e){return typeof e=="string"||!Array.isArray(e)?0:e.filter(t=>t.type==="image").length}function one(e){return typeof e=="string"||!Array.isArray(e)?[]:e.flatMap(t=>{if(t.type!=="image"||t.mimeType===void 0)return[];const n=t.mimeType;return typeof t.data=="string"&&t.data!==""?[{data:t.data,mimeType:n}]:typeof t.ref=="string"&&t.ref!==""?[{ref:t.ref,mimeType:n}]:[]})}const ane=e=>e.docs["pi.live"]??{},Jb=e=>e.docs["pi.agent"]??{};function lne(e){var r;const t=ane(e),n=t.generation,s=(r=t.compactions)==null?void 0:r[0];return(n==null?void 0:n.retry)!==void 0?`Retrying (attempt ${n.attempt+1}): ${n.retry.error}`:(n==null?void 0:n.deferred)!==void 0?"Waiting for deferred response...":s!==void 0?s.retry?`Retrying ${s.reason} compaction (attempt ${s.attempt+1})...`:`Compacting (${s.reason})...`:""}function cne(e){return(e.docs["pi.inbox"]??{items:[]}).items.map(n=>{const s=n.mode==="write"?void 0:Kb(n.content);return{id:n.id,mode:n.mode,text:n.mode==="write"?`<${String(n.entry.kind)}>`:s.text,imageCount:n.mode==="write"?0:ine(n.content),attachmentCount:(s==null?void 0:s.attachments.length)??0}})}function une(e,t){const s=(e.docs["pi.inbox"]??{items:[]}).items.find(i=>i.id===t);if(s===void 0||s.mode!=="steer"&&s.mode!=="followUp")return;const r=Kb(s.content);return{text:r.text,images:one(s.content),skills:r.skills,attachments:r.attachments}}function dne(e){const t=e.docs["pi.usage"];return t===void 0?[]:[...Object.entries(t.models),...Object.entries(t.tools)].map(([n,s])=>({key:n,input:s.input,output:s.output,cost:s.cost.total}))}const fne=e=>e.totalTokens||e.input+e.output+e.cacheRead+e.cacheWrite;function hne(e,t){var n;if(!(t===void 0||!(t>0)))for(let s=e.entries.length-1;s>=0;s-=1){const r=e.entries[s];if(r.kind==="pi.compaction"||r.kind==="pi.reset")return;if(r.kind!=="pi.assistant")continue;const i=(n=r.model)==null?void 0:n[0];if((i==null?void 0:i.role)!=="assistant"||i.stopReason==="aborted"||i.stopReason==="error")continue;const o=i.usage?fne(i.usage):0;if(o>0)return{used:o,window:t}}}const xne=80,Yf=e=>e>=1e6?`${+(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${Math.round(e)}`,n4=e=>e<.01?"<$0.01":`$${e.toFixed(2)}`,s4=2*Math.PI*6;function pne({usage:e}){const t=e===void 0?void 0:Math.round(e.used/e.window*100),n=t!==void 0&&t>=xne,s=t===void 0?"—":`${t}%`,r=e===void 0?"Context usage unknown":`Context ${t}% used, ${Yf(e.used)} of ${Yf(e.window)} tokens`,i=e===void 0?"No usage data yet":`${Yf(e.used)} / ${Yf(e.window)}`,o=e===void 0?0:Math.min(1,e.used/e.window);return a.jsx(to,{content:i,placement:"above",alignment:"end",children:a.jsxs("span",{className:`inline-flex h-7 items-center gap-1.5 px-1 text-xs ${n?"text-warning":"text-muted"}`,...t===void 0?{"aria-label":r}:{role:"meter","aria-label":r,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Math.min(100,t)},tabIndex:0,"data-testid":"context-meter",children:[a.jsxs("svg",{"aria-hidden":"true",className:"size-4 -rotate-90",viewBox:"0 0 16 16",children:[a.jsx("circle",{className:"stroke-current opacity-25",cx:"8",cy:"8",fill:"none",r:"6",strokeWidth:"2"}),a.jsx("circle",{className:"stroke-current",cx:"8",cy:"8",fill:"none",r:"6",strokeDasharray:s4,strokeDashoffset:s4*(1-o),strokeWidth:"2"})]}),a.jsx("span",{className:"tabular-nums",children:s})]})})}const gne={pending:"pending",in_progress:"in progress",completed:"completed"};function mne({doc:e}){if(e.value===null)return null;const t=Sc(e.presentation,e.value),n=t.type==="pinomad.todo"?"Todo":t.type==="pinomad.question"?"Questions":e.kind,s=t.type==="pinomad.todo"?a.jsx(yne,{doc:t.value}):t.type==="pinomad.question"?a.jsx(bne,{doc:t.value}):a.jsx(vne,{value:t.value});return a.jsxs(fe,{gap:1,children:[a.jsx(re,{type:"label",weight:"semibold",children:n}),s]})}function yne({doc:e}){return a.jsx(Mt,{density:"compact",children:e.items.length===0?a.jsx(rt,{label:"Empty"}):e.items.map((t,n)=>a.jsx(rt,{label:t.text,startContent:a.jsx(Nn,{label:gne[t.status],size:"sm"})},n))})}function kne(e,t){const n=e.resolution;if(n===void 0)return{label:"pending"};if(n.outcome==="dismissed")return{label:"answered in chat",color:"gray"};if(n.outcome==="cancelled")return{label:"cancelled",color:"gray"};const s=n.answers[t];if(s===void 0||s.selected.length===0&&s.other===void 0)return{label:"skipped",color:"gray"};const r=[s.selected.join(", "),...s.other===void 0?[]:[`other: "${s.other}"`]].filter(i=>i!=="").join("; ");return{label:r===""?"skipped":r,color:"green"}}function bne({doc:e}){return a.jsx(Mt,{density:"compact",children:e.requests.length===0?a.jsx(rt,{label:"Empty"}):e.requests.flatMap(t=>t.questions.map((n,s)=>{const r=kne(t,s);return a.jsx(rt,{label:n.question,description:r.label,startContent:a.jsx(Nn,{label:n.header,size:"sm"})},`${t.id}-${s}`)}))})}function vne({value:e}){const t=typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.entries(e):[["value",e]];return a.jsx(Mt,{density:"compact",children:t.map(([n,s])=>a.jsx(rt,{label:n,description:wne(s)},n))})}function wne(e){const t=JSON.stringify(e);return t.length<=120?t:`${t.slice(0,117)}...`}const r4=3;function jne(e,t,n,s,r){const[i,o]=x.useState({kind:"loading"}),l=x.useRef(0);return x.useEffect(()=>{if(!r||n||!s)return;const c=++l.current;e.controller.changes().then(u=>{if(c!==l.current)return;if(!u.available)return o({kind:"unavailable",branch:u.branch});const d=EE(u.patch);o({kind:"ready",files:d.length,additions:d.reduce((h,f)=>h+f.additions,0),deletions:d.reduce((h,f)=>h+f.deletions,0),truncated:u.truncated,branch:u.branch})},()=>{c===l.current&&o({kind:"failed"})})},[e,t,n,s,r]),x.useEffect(()=>o({kind:"loading"}),[t]),i}const Qf=e=>e.toLocaleString("en-US"),RE="pinomad.overview.collapsed";function i4(){try{return JSON.parse(window.localStorage.getItem(RE)??"{}")}catch{return{}}}const IE="flex shrink-0 flex-col gap-0.5 rounded-[var(--radius-element)] bg-[var(--color-background-popover)] px-2.5 shadow-[var(--pigui-overview-card-elevation)]";function W1({section:e,title:t,summary:n,children:s}){const[r,i]=x.useState(()=>i4()[e]===!0),[o,l]=x.useState(!1),c=x.useId(),u=()=>{window.localStorage.setItem(RE,JSON.stringify({...i4(),[e]:!r})),i(!r),l(!0)};return a.jsxs("section",{className:`${IE} pt-1 ${r?"pb-1":"pb-1.5"}`,children:[a.jsx("h2",{className:"-mx-1.5",children:a.jsxs("button",{type:"button","aria-expanded":!r,"aria-controls":c,className:"flex h-7 w-full items-center gap-2 rounded-md px-1.5 text-xs font-medium text-muted hover:bg-surface-hover hover:text-foreground focus-visible:bg-surface-hover",onClick:u,children:[a.jsx("span",{className:"shrink-0",children:t}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-end font-normal tabular-nums",children:r?n:null}),a.jsx($r,{"aria-hidden":!0,className:`size-3.5 shrink-0 motion-safe:transition-transform motion-safe:duration-150 motion-safe:ease-out ${r?"":"rotate-90"}`})]})}),a.jsx("div",{id:c,hidden:r,className:`flex flex-col gap-0.5 ${o?"motion-safe:animate-[pigui-overview-reveal_150ms_ease-out]":""}`,children:s})]})}function ni({icon:e,iconLabel:t,children:n,end:s,title:r,onClick:i}){const o=a.jsxs(a.Fragment,{children:[e===void 0?null:a.jsx("span",{...t===void 0?{"aria-hidden":!0}:{role:"img","aria-label":t},className:"flex size-4 shrink-0 items-center justify-center text-muted",children:e}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:n}),s===void 0?null:a.jsx("span",{className:"shrink-0 tabular-nums",children:s})]}),l="-mx-1.5 flex h-8 items-center gap-2.5 rounded-md px-1.5 text-sm";return i===void 0?a.jsx("div",{className:l,title:r,children:o}):a.jsx("button",{type:"button",className:`${l} hover:bg-surface-hover focus-visible:bg-surface-hover`,title:r,onClick:i,children:o})}function Sne({view:e,remote:t,conversation:n,busy:s,onOpenChanges:r}){var p,g,b;const i=Jb(n).cwd,o=e.home,l=(o==null?void 0:o.kind)==="chat",c=e.checkout!==void 0,u=(o==null?void 0:o.kind)==="project"?((p=e.organized.projects.find(y=>y.project.path===o.path))==null?void 0:p.project.name)??o.path.split("/").at(-1):l?"Chat folder":i==null?void 0:i.split("/").at(-1),d=jne(t,n.conversation.id,s,e.connection==="connected",!l),h=(g=e.host)==null?void 0:g.protocol.minor,f=h!==void 0&&Ft(h,"liveBranch")?d.kind==="ready"||d.kind==="unavailable"?d.branch:void 0:(b=e.checkout)==null?void 0:b.branch;return a.jsxs(W1,{section:"workspace",title:"Workspace",summary:l||d.kind==="unavailable"?f:a.jsx(_E,{stat:d}),children:[i===void 0?null:a.jsx(ni,{icon:c?a.jsx(d0,{className:"size-4"}):a.jsx(Yu,{className:"size-4"}),iconLabel:l?void 0:c?"Git worktree":"Project folder",title:i,children:a.jsxs("span",{className:"flex items-center gap-3",children:[a.jsx("span",{className:"min-w-0 truncate",children:u}),a.jsx("span",{className:"min-w-0 flex-1 truncate text-right text-muted [direction:rtl]",children:`${i}`})]})}),f===void 0?null:a.jsx(ni,{icon:a.jsx(xU,{className:"size-4"}),children:f}),l?null:a.jsx(Cne,{stat:d,onOpen:r})]})}function _E({stat:e}){return e.kind==="loading"?a.jsx("span",{className:"text-muted",children:"…"}):e.kind==="failed"?a.jsx("span",{className:"text-muted",children:"—"}):e.files===0?a.jsx("span",{className:"text-muted",children:"None"}):e.additions===0&&e.deletions===0?a.jsxs("span",{className:"text-muted",children:[e.files," file",e.files===1?"":"s"]}):a.jsxs("span",{"aria-label":`${Qf(e.additions)} added, ${Qf(e.deletions)} removed${e.truncated?" at least":""}`,children:[a.jsxs("span",{className:"text-success",children:["+",Qf(e.additions),e.truncated?"+":""]})," ",a.jsxs("span",{className:"text-danger",children:["−",Qf(e.deletions),e.truncated?"+":""]})]})}function Cne({stat:e,onOpen:t}){return e.kind==="unavailable"?null:a.jsx(ni,{icon:a.jsx(dU,{className:"size-4"}),end:a.jsx(_E,{stat:e}),onClick:t,children:"Changes"})}function $ne({view:e,conversation:t}){const n=as(e.models,Jb(t).model),s=hne(t,n==null?void 0:n.contextWindow),r=dne(t).reduce((o,l)=>o+l.cost,0),i=s===void 0?"—":`${Math.round(s.used/s.window*100)}%`;return a.jsxs(W1,{section:"usage",title:"Usage",summary:r>0?`${i} · ${n4(r)}`:i,children:[a.jsx(ni,{end:a.jsx(pne,{usage:s}),children:"Context"}),r>0?a.jsx(ni,{end:a.jsx("span",{className:"text-muted",children:n4(r)}),children:"Spent"}):null]})}const Ene=new Set(["running","needs-answer"]);function Tne({view:e,conversation:t,onOpenTasks:n}){const s=M1(e.organized,t.conversation.id),r=s===void 0?[]:ub(s).flatMap(d=>d.tasks.map(h=>h.summary));if(r.length===0)return null;const i=r.filter(d=>Ene.has(d.status)),o=r.filter(d=>d.status==="failed").length,l=r.length-i.length-o,c=i.length-r4,u=[c>0?`${c} more running`:void 0,l>0?`${l} done`:void 0,o>0?`${o} failed`:void 0].filter(d=>d!==void 0);return a.jsxs(W1,{section:"subagents",title:"Subagents",summary:i.length>0?`${i.length} running`:u.join(" · "),children:[i.slice(0,r4).map(d=>a.jsx(ni,{icon:a.jsx(br,{variant:d.status==="needs-answer"?"warning":"success",label:d.status==="needs-answer"?"Waiting for your answer":"Running",isPulsing:!0}),end:d.activity===void 0?void 0:a.jsx("span",{className:"text-xs text-muted",children:Wr(d.activity.tool)??d.activity.tool}),onClick:()=>n(d.id),children:Hn(d)},d.id)),u.length===0?null:a.jsx(ni,{icon:null,onClick:()=>n(),children:a.jsx("span",{className:"text-muted",children:u.join(" · ")})})]})}const Nne={connecting:"warning",connected:"success",failed:"error",disabled:"neutral"};function Ane({view:e}){const t=e.mcp;if(t===null||t.servers.length===0&&t.errors.length===0)return null;const n=t.servers.filter(r=>r.state==="failed").length+t.errors.length,s=t.servers.filter(r=>r.state==="connected").length;return a.jsxs(W1,{section:"sources",title:"Sources",summary:n>0?a.jsxs("span",{className:"text-danger",children:[n," problem",n===1?"":"s"]}):`${s} connected`,children:[t.servers.map(r=>a.jsx(ni,{icon:a.jsx(br,{variant:Nne[r.state],label:r.state,isPulsing:r.state==="connecting"}),title:r.error,end:a.jsx("span",{className:"text-xs text-muted",children:r.state==="connected"?`${r.tools} tool${r.tools===1?"":"s"}`:r.state}),children:r.name},r.name)),t.errors.map((r,i)=>a.jsx(ni,{icon:a.jsx(br,{variant:"error",label:"config error"}),title:r,children:a.jsx("span",{className:"text-danger",children:r})},i))]})}function Mne({view:e,remote:t}){const n=e.docs.filter(s=>{if(s.value===null)return!1;const r=Sc(s.presentation,s.value).type;return r!=="pinomad.todo"&&r!=="pinomad.question"});return n.length===0?null:a.jsx(a.Fragment,{children:n.map(s=>a.jsx("section",{className:`${IE} py-2`,children:a.jsx(mne,{doc:s,remote:t,connected:e.connection==="connected"})},s.kind))})}function zne({view:e,remote:t,conversation:n,narrow:s,busy:r,onOpenChanges:i,onOpenTasks:o,onClose:l}){return a.jsxs("aside",{"aria-label":"Overview",className:`pigui-overview absolute end-3 top-3 z-20 flex max-h-[calc(100%-1.5rem)] ${s?"w-[min(20rem,calc(100%-1.5rem))]":"w-[var(--pigui-overview-width)]"} flex-col gap-[var(--pigui-overview-gap)] overflow-y-auto rounded-[calc(var(--radius-element)+var(--pigui-overview-gap))] bg-[var(--color-background-muted)] p-[var(--pigui-overview-gap)] shadow-[var(--pigui-overview-elevation)]`,onKeyDown:c=>{c.key==="Escape"&&(c.stopPropagation(),l())},children:[a.jsx(Sne,{view:e,remote:t,conversation:n,busy:r,onOpenChanges:i}),a.jsx($ne,{view:e,conversation:n}),a.jsx(Tne,{view:e,conversation:n,onOpenTasks:o}),a.jsx(Ane,{view:e}),a.jsx(Mne,{view:e,remote:t})]})}const LE="pinomad.sidebar.open",Rne=()=>typeof window>"u"||window.localStorage.getItem(LE)!=="false",OE=e=>e.some(t=>t.summary.status==="running"||t.summary.status==="needs-answer"||OE(t.children));function Ine({view:e,remote:t,device:n,hostKey:s,narrow:r,drafting:i,draftingChat:o,draftLabel:l,conversation:c,summary:u,parentSummary:d,banner:h,onDraft:f,onOpenChanges:p,overviewOpen:g,onOverviewChange:b,panelOpen:y,panelTab:m,onPanelOpen:k,onPanelTab:w,openInPanel:v,openInMain:j,children:C}){const[$,T]=x.useState(Rne),[A,S]=x.useState(!1),[_,M]=x.useState(!1),[z,O]=x.useState(!1),I=IS(),E=I.reserveMacTrafficLights&&!r&&$,N=()=>{window.localStorage.setItem(LE,String(!$)),T(!$)},R=G=>void t.controller.switchConversation(G),L=c===void 0?void 0:M1(e.organized,c.conversation.id),D=L!==void 0&&OE(L.children),P=u===void 0?void 0:u.kind==="subagent"?u.role:fb(u),F=G=>{if(G!==void 0)return v(G,"tasks");t.controller.showSide(void 0),w("tasks"),k(!0)},X=a.jsx(iV,{view:e,remote:t,draftingChat:o,shownId:c==null?void 0:c.conversation.id,onDraft:f,onSelect:()=>S(!1)});return a.jsxs(My,{position:"topEnd",inset:{top:48},isTopLayer:!0,children:[a.jsx(g6,{className:"pigui-app-layout text-foreground",contentPadding:0,mobileNav:!1,variant:"elevated",sideNav:r||!$?void 0:a.jsx(lk,{resizable:{defaultWidth:260,minWidth:240,maxWidth:320,autoSaveId:"pinomad-app-shell"},header:a.jsx(tV,{onCollapse:N,safeLeft:E?I.safeLeft:void 0}),footer:a.jsx(Kw,{view:e,hostKey:s,onOpenSettings:()=>M(!0),onOpenAccount:()=>O(!0)}),children:X}),children:a.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[a.jsx(Lne,{narrow:r,sidebarOpen:$,safeLeft:I.reserveMacTrafficLights&&!E?I.safeLeft:void 0,onToggleSidebar:N,onOpenNav:()=>S(!0),title:i?l:Hn(u),agent:P,parentSummary:d,onBackToParent:R,showOverview:c!==void 0,overviewOpen:g,onOverviewChange:b,panelOpen:y,onPanelChange:k,liveActivity:D}),h,a.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[a.jsxs("div",{className:"@container relative flex min-h-0 min-w-0 flex-1 flex-col",children:[C,g&&c!==void 0?a.jsx(zne,{view:e,remote:t,conversation:c,narrow:r,busy:z1(c),onOpenChanges:p,onOpenTasks:F,onClose:()=>b(!1)}):null]}),r?null:a.jsx(t4,{view:e,remote:t,conversation:c,narrow:!1,open:y,onOpenChange:k,tab:m,onTabChange:w,openInPanel:v,onOpenInMain:j})]})]})}),r?a.jsxs(ok,{className:"pigui-app-layout text-foreground",isOpen:A,onOpenChange:S,header:a.jsx("span",{className:"text-sm font-semibold",children:"PiNomad"}),children:[X,a.jsx(Kw,{view:e,hostKey:s,onOpenSettings:()=>M(!0),onOpenAccount:()=>O(!0),onSelect:()=>S(!1)})]}):null,r?a.jsx(t4,{view:e,remote:t,conversation:c,narrow:!0,open:y,onOpenChange:k,tab:m,onTabChange:w,openInPanel:v,onOpenInMain:j}):null,_?a.jsx(ZV,{view:e,remote:t,device:n,hostKey:s,onClose:()=>M(!1)}):null,z?a.jsx(CC,{onClose:()=>O(!1)}):null,a.jsx(_ne,{notices:e.notices})]})}function _ne({notices:e}){const t=J9(),n=x.useRef(void 0);return x.useEffect(()=>{var r;const s=(r=e[e.length-1])==null?void 0:r.id;if(n.current===void 0){n.current=s??-1;return}for(const i of e)i.id<=n.current||t({body:i.message,type:i.level==="error"?"error":"info",uniqueID:String(i.id)});s!==void 0&&(n.current=s)},[e,t]),null}function Lne({narrow:e,sidebarOpen:t,safeLeft:n,onToggleSidebar:s,onOpenNav:r,title:i,agent:o,parentSummary:l,onBackToParent:c,showOverview:u,overviewOpen:d,onOverviewChange:h,panelOpen:f,onPanelChange:p,liveActivity:g}){return a.jsxs("div",{className:"pinomad-drag flex h-10 shrink-0 items-center gap-1 border-b border-border px-3",style:n===void 0?void 0:{paddingLeft:n},children:[e?a.jsx(En,{icon:a.jsx(h0,{className:"size-4"}),label:"Open navigation",size:"sm",variant:"ghost",onClick:r}):t?null:a.jsx(En,{icon:a.jsx(h0,{className:"size-4"}),label:"Expand sidebar",size:"sm",variant:"ghost",onClick:s}),a.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-normal",children:l===void 0?a.jsxs("span",{className:"flex items-center gap-1.5",children:[a.jsx("span",{className:"truncate",children:i}),o===void 0?null:a.jsxs("span",{className:"shrink-0 text-muted",children:["@",o]})]}):a.jsxs("span",{className:"flex items-center gap-1",children:[a.jsx(ne,{label:Hn(l),"aria-label":`Back to ${Hn(l)}`,variant:"ghost",size:"sm",onClick:()=>c(l.id)}),a.jsx("span",{"aria-hidden":"true",className:"text-muted",children:"›"}),a.jsx("span",{className:"truncate",children:i}),o===void 0?null:a.jsxs("span",{className:"shrink-0 text-muted",children:["@",o]})]})}),u?a.jsx(En,{"aria-pressed":d,className:d?"bg-[var(--color-overlay-pressed)]":void 0,icon:a.jsx(rU,{className:"size-4"}),label:"Overview",size:"sm",tooltip:d?"Hide overview":"Show overview",variant:"ghost",onClick:()=>h(!d)}):null,a.jsxs("span",{className:"relative",children:[a.jsx(En,{"aria-pressed":f,icon:a.jsx(AU,{className:"size-4"}),label:"Side panel",size:"sm",tooltip:f?"Hide side panel":"Show side panel",variant:"ghost",onClick:()=>p(!f)}),!f&&g?a.jsx("span",{"aria-label":"Live activity",className:"pointer-events-none absolute right-1 top-1 size-2 rounded-full bg-primary",role:"img"}):null]})]})}function One({value:e,onChange:t,isDisabled:n=!1}){return a.jsx("div",{className:"max-w-full shrink-0","data-testid":"checkout-strategy-picker",children:a.jsx(Au,{isLabelHidden:!0,label:"Where to work",placement:"below",isDisabled:n,options:[{value:"worktree",label:"Git worktree",icon:a.jsx(d0,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})},{value:"local",label:"Project folder",icon:a.jsx(wx,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})}],size:"sm",startIcon:e==="worktree"?a.jsx(d0,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}):a.jsx(wx,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),value:e,variant:"ghost",onChange:s=>t(s==="worktree"?"worktree":"local")})})}function DE(e,t){const[n,s]=x.useState([]),r=x.useRef(n),i=x.useRef(1),[o,l]=x.useState(null),c=y=>{r.current=y,s(y)},u=(y,m)=>{c(r.current.map(k=>k.key===y?{...k,...m}:k))},d=async(y,m,k,w)=>{try{await Bte(e.controller,m,{...k===void 0?{}:{attachmentId:k},received:w},{onId:v=>u(y,{attachmentId:v}),onProgress:(v,j)=>u(y,{received:v,...j?{status:"done"}:{}}),isCancelled:()=>!r.current.some(v=>v.key===y)}),r.current.some(v=>v.key===y)&&u(y,{status:"done"})}catch(v){if(v instanceof SE||!r.current.some($=>$.key===y))return;const j=v instanceof Error?v.message:String(v),C=/expired|not found/i.test(j);u(y,{status:"failed",error:j,...C?{attachmentId:void 0,received:0}:{}})}};return{entries:n,get uploading(){return r.current.some(y=>y.status==="uploading")},get failed(){return r.current.some(y=>y.status==="failed")},error:o,add:y=>{if(!t){l("Attaching files needs a host on protocol 5.19; run `pinomad upgrade` on the host");return}const m=y.filter(C=>!C.type.startsWith("image/"));if(m.length===0)return;m.length<y.length&&l("Images are attached from Add images…");const k=Ote(r.current.length);if(k===0){l(`At most ${cr} files per message`);return}const w=[];let v=m.length>k?`At most ${cr} files per message`:void 0;for(const C of m.slice(0,k)){const $=Dte(C);if($!==void 0){v=`${C.name}: ${$}`;continue}w.push(C)}if(l(v!==void 0?v:null),w.length===0)return;const j=w.map(C=>({key:`file-${i.current++}`,name:C.name,size:C.size,status:"uploading",received:0,file:C}));c([...r.current,...j]);for(const C of j)d(C.key,C.file,void 0,0)},retry:y=>{const m=r.current.find(k=>k.key===y);(m==null?void 0:m.file)!==void 0&&(u(y,{status:"uploading",error:void 0}),d(y,m.file,m.attachmentId,m.received))},remove:y=>{c(r.current.filter(m=>m.key!==y))},restore:y=>{c(y.slice(0,cr).map(m=>({key:`file-${i.current++}`,name:m.name,size:m.size,status:"done",attachmentId:m.id,received:m.size}))),l(y.length>cr?`At most ${cr} files per message`:null)},clear:()=>{c([]),l(null)},ids:()=>r.current.flatMap(y=>y.status==="done"&&y.attachmentId!==void 0?[y.attachmentId]:[])}}function ev({inputRef:e,onFiles:t,accept:n}){return a.jsx("input",{ref:e,type:"file",multiple:!0,hidden:!0,"aria-hidden":!0,tabIndex:-1,...n===void 0?{}:{accept:n},onChange:s=>{t([...s.target.files??[]]),s.target.value=""}})}function BE({inputRef:e,onFiles:t}){return a.jsx(ev,{inputRef:e,onFiles:t,accept:"image/*"})}function qE({images:e,pending:t,onRemove:n,files:s}){if(!(e.length===0&&!t&&s===void 0))return a.jsxs("div",{className:"flex flex-wrap gap-2","data-testid":"composer-attachments",children:[e.map((r,i)=>a.jsx(Vh,{src:ml(r),alt:`Image ${i+1}`,onRemove:()=>n(i)},i)),t?a.jsx(Vh,{isLoading:!0,alt:"Preparing image"}):null,s]})}const Dne=1568;function Bne(e){const t=new Uint8Array(e);let n="";for(let s=0;s<t.length;s+=32768)n+=String.fromCharCode(...t.subarray(s,s+32768));return btoa(n)}async function qne(e){let t;try{t=await createImageBitmap(e)}catch{throw new Error(`Couldn't read ${e.name}`)}const n=Math.min(1,Dne/Math.max(t.width,t.height)),s=Math.max(1,Math.round(t.width*n)),r=Math.max(1,Math.round(t.height*n)),i=document.createElement("canvas");i.width=s,i.height=r;const o=i.getContext("2d");o.fillStyle="#ffffff",o.fillRect(0,0,s,r),o.drawImage(t,0,0,s,r),t.close();const l=await new Promise((d,h)=>i.toBlob(f=>f===null?h(new Error(`Couldn't read ${e.name}`)):d(f),"image/jpeg",.85)),c={data:Bne(await l.arrayBuffer()),mimeType:"image/jpeg"},u=GH([c]);if(u!==void 0)throw new Error(u);return c}function HE(e){const[t,n]=x.useState([]),[s,r]=x.useState(0),[i,o]=x.useState(null),l=x.useRef(e);l.current=e;const c=x.useRef(0),u=x.useRef(0),d=g=>{if(!l.current){o("This model doesn't accept images");return}const b=g.filter(w=>w.type.startsWith("image/"));b.length<g.length&&o("Only images can be attached");const y=Math.max(0,wu-u.current),m=b.slice(0,y);if(b.length>y?o("At most 4 images per message"):b.length===g.length&&o(null),m.length===0)return;u.current+=m.length;const k=c.current;r(w=>w+m.length),Promise.all(m.map(w=>qne(w))).then(async w=>{c.current===k&&(await MS(w),c.current===k&&(n(v=>[...v,...w]),r(v=>v-m.length)))},w=>{c.current===k&&(u.current-=m.length,o(w instanceof Error?w.message:String(w)),r(v=>v-m.length))})},h=g=>{const b=g.slice(0,wu);c.current+=1,u.current=b.length,r(0),n([...b]),o(g.length>wu?"At most 4 images per message":null)},f=g=>{u.current-=1,n(b=>b.filter((y,m)=>m!==g))},p=()=>{c.current+=1,u.current=0,n([]),r(0),o(null)};return{images:t,pending:s>0,error:i,add:d,restore:h,remove:f,clear:p}}const PE="pinomad.draft.model";function Hne(e){try{const t=localStorage.getItem(PE);if(t===null)return;const n=JSON.parse(t);if(typeof n.provider=="string"&&typeof n.modelId=="string"&&typeof n.thinkingLevel=="string"&&e.some(s=>s.provider===n.provider&&s.modelId===n.modelId))return n}catch{}}function Pne(e){const[t,n]=x.useState(()=>{var y;const f=Hne(e.models),p=f!==void 0?{provider:f.provider,modelId:f.modelId}:e.defaults.model??(e.models[0]===void 0?void 0:{provider:e.models[0].provider,modelId:e.models[0].modelId}),g=((y=as(e.models,p))==null?void 0:y.thinkingLevels)??["off"],b=(f==null?void 0:f.thinkingLevel)??e.defaults.thinkingLevel??"off";return{model:p,level:Lx(g,b)}}),[s,r]=x.useState(void 0),[i,o]=x.useState({}),l=(f,p)=>{localStorage.setItem(PE,JSON.stringify({...f,thinkingLevel:p}))},c=s===void 0?void 0:kV(s,e.agents,e.models,e.defaults,i),u=mV(e.models,e.defaults,t),d=c??u,h=d.level;return{pick:d,agent:s,resolution:c,setModel:f=>{var g;if(s!==void 0){o(b=>({...b,model:f}));return}const p=Lx(((g=as(e.models,f))==null?void 0:g.thinkingLevels)??["off"],h);n({model:f,level:p}),l(f,p)},setLevel:f=>{if(s!==void 0){o(p=>({...p,level:f}));return}n(p=>({...p,level:f})),d.model!==void 0&&l(d.model,f)},setAgent:f=>{r(f),o({})}}}function UE({isDisabled:e=!1,onOpenChange:t,children:n}){return a.jsx(uc,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:a.jsx(f0,{"aria-hidden":"true"}),isDisabled:e},hasChevron:!1,menuWidth:288,onOpenChange:t,placement:"above",children:n})}function ar({icon:e,label:t,hint:n,isDisabled:s,onClick:r}){return a.jsx(Nu,{icon:a.jsx(e,{"aria-hidden":"true",className:"size-4 text-muted"}),label:a.jsxs("span",{className:"flex min-w-0 items-baseline gap-3",children:[a.jsx("span",{className:"shrink-0",children:t}),n===void 0?null:a.jsx("span",{className:"ml-auto min-w-0 truncate text-xs text-muted",children:n})]}),isDisabled:s,onClick:r})}function FE(e,t){const s=[t.agents&&t.files?"@ agent or file":t.agents?"@ agent":t.files?"@ file":void 0,t.commands?"/ command":void 0,t.skills?"$ skill":void 0].filter(r=>r!==void 0);return[e,...s].join(" · ")}function Une(e){return a.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"138 138 310 270",fill:"none","aria-hidden":"true",...e,children:[a.jsx("path",{d:"M 368 244 C 384 278 372 326 348 353 C 322 382 287 398 255 396 C 234 395 221 387 228 368 C 230 362 223 365 215 366 C 185 369 165 359 159 346 C 154 337 157 337 168 335 C 197 332 211 308 221 282 C 231 254 253 244 283 233 C 318 219 350 212 362 232 Z",stroke:"currentColor",strokeWidth:"13",strokeLinejoin:"round"}),a.jsxs("g",{fill:"currentColor",children:[a.jsx("path",{d:"M 214 234 C 213 199 224 176 246 165 C 267 153 282 147 296 149 C 317 151 333 172 343 194 C 300 201 254 226 214 234 Z"}),a.jsx("path",{d:"M 195 239 C 229 241 262 226 306 209 C 347 193 385 177 410 185 C 437 191 438 210 425 229 C 414 244 397 257 377 267 C 373 246 365 227 350 223 C 331 217 311 226 285 236 C 255 246 238 251 227 271 C 216 291 215 305 200 312 C 172 311 153 302 149 287 C 142 264 164 244 195 239 Z"}),a.jsx("ellipse",{cx:"304",cy:"272",rx:"9.5",ry:"15.5"}),a.jsx("ellipse",{cx:"343",cy:"269",rx:"9.5",ry:"15.5"})]})]})}function Fne(e){switch(e.kind){case"agent-missing":return{label:`@${e.agent} unavailable`,title:`Agent @${e.agent} is not defined on this host${e.reason===void 0?"":` — ${e.reason}`}`};case"model-missing":return{label:`No model for @${e.agent}`,title:`Agent @${e.agent} pins no model and the host has no default`};case"model-unavailable":{const t=`${e.model.provider}/${e.model.modelId}`,n=e.source==="agent"?`@${e.agent}'s model`:e.source==="default"?"the host default":"the picked model";return{label:`${t} unavailable`,title:`${t} (${n}) is not in the host's model list`}}}}function Gne({view:e,remote:t,draft:n,onDraft:s,onCreated:r,connected:i}){var oe,le,me;const o=Fb(),{value:l,setValue:c}=o,[u,d]=x.useState(!1),h=x.useRef(!1),[f,p]=x.useState("worktree"),g=x.useRef(null),{pick:b,setModel:y,setLevel:m,agent:k,setAgent:w,resolution:v}=Pne(e),j=as(e.models,b.model),C=(j==null?void 0:j.images)===!0,{images:$,pending:T,error:A,add:S,remove:_}=HE(C),M=x.useRef(null),z=(oe=e.host)==null?void 0:oe.protocol.minor,O=z!==void 0&&Ft(z,"attachments")&&Pe(z,"beginAttachment"),I=DE(t,O),E=x.useRef(null),[N,R]=x.useState(void 0),L=se=>{const{images:he,others:ce}=wE(se);R(void 0),he.length>0&&S(he),ce.length>0&&I.add(ce)},D=((le=e.agents)==null?void 0:le.roles)??[],P=z!==void 0&&Ft(z,"agentConversations")&&(D.length>0||k!==void 0),F=n.kind==="project"&&z!==void 0&&Pe(z,"listFiles")?{key:`project:${n.path}:${f}`,list:se=>t.controller.listFiles({kind:"project",path:n.path,checkout:f==="local"?"project":"worktree"},se)}:void 0,X=Hb(e.agents,g,F),G=Ub(t,n.kind==="project"?{kind:"project",path:n.path,checkout:f==="local"?"project":"worktree"}:{kind:"chat"},g,i&&z!==void 0&&Pe(z,"listSkills"),o.pick);Gb(g,o.draft);const Q=[...X??[],...G.trigger===void 0?[]:[G.trigger]],ee=v==null?void 0:v.problem,Y=k===void 0||v===void 0?void 0:v.modelFrom!=="override"&&v.levelFrom!=="override"?`from @${k}`:v.modelFrom!=="override"?`model from @${k}`:v.levelFrom!=="override"?`level from @${k}`:void 0,V=C||!i?void 0:`${(j==null?void 0:j.name)??((me=b.model)==null?void 0:me.modelId)??"This model"} can't see images`;return a.jsx("section",{className:"flex h-full min-h-0 flex-col items-center overflow-y-auto px-6 py-8","data-testid":"draft-home",children:a.jsxs("div",{className:"mx-auto my-auto flex w-full max-w-[44rem] flex-col items-center justify-center gap-6",children:[a.jsx(Une,{className:"size-14 text-foreground"}),a.jsx("h2",{className:"text-center text-3xl font-normal tracking-tight text-foreground max-lg:text-2xl",children:"Build something useful with PiNomad"}),a.jsxs("div",{className:"flex w-full flex-col gap-3",children:[a.jsx(BE,{inputRef:M,onFiles:S}),a.jsx(ev,{inputRef:E,onFiles:L}),I.uploading?a.jsx(re,{type:"supporting",children:"Uploading files…"}):null,a.jsx(Vb,{value:l,inputRef:g,onValueChange:c,onFocus:G.request,triggers:Q.length===0?void 0:Q,status:u?"submitted":"ready",onSubmit:()=>{var ue;const se=Pb(o.draft),he=se.text.trim();if(he===""&&$.length===0&&I.entries.length===0||I.uploading||I.failed||T||h.current||ee!==void 0)return;Yl();const ce=(ue=t.view.current().conversation)==null?void 0:ue.conversation.id,J=$,ke=I.ids();h.current=!0,d(!0),t.controller.createConversation(n,he,{...n.kind==="project"&&f==="local"?{checkout:"project"}:{},...v===void 0?{...b.model===void 0?{}:{model:b.model},thinkingLevel:b.level}:v.send,...J.length===0?{}:{images:J},skills:se.skills,...ke.length===0?{}:{attachments:ke}}).then(()=>{var Re;const ge=(Re=t.view.current().conversation)==null?void 0:Re.conversation.id;ge!==void 0&&ge!==ce&&r()}).finally(()=>{h.current=!1,d(!1)})},isDisabled:!i,submitDisabled:ee!==void 0||I.uploading||I.failed,placeholder:FE("Do anything with Pi",{agents:D.length>0,files:F!==void 0,commands:!1,skills:G.trigger!==void 0}),attachments:qE({images:$,pending:T,onRemove:_,...I.entries.length===0?{}:{files:a.jsx(a.Fragment,{children:I.entries.map(se=>a.jsx(CE,{entry:se,onRetry:I.retry,onRemove:I.remove},se.key))})}}),hasAttachments:$.length>0||I.entries.length>0,onFiles:L,error:A??I.error??N,startActions:a.jsxs(a.Fragment,{children:[a.jsxs(UE,{isDisabled:!i,children:[a.jsx(ar,{icon:xb,label:"Add images…",hint:V??"Or paste or drop",isDisabled:!C,onClick:()=>{var se;return(se=M.current)==null?void 0:se.click()}}),O?a.jsx(ar,{icon:yc,label:"Attach files…",hint:"Up to 10 · 10 MB each",onClick:()=>{var se;return(se=E.current)==null?void 0:se.click()}}):null,G.trigger===void 0?null:a.jsx(ar,{icon:R1,label:"Use a skill…",hint:"Or type $",onClick:()=>{var se;return(se=g.current)==null?void 0:se.openTrigger("$")}}),D.length===0?null:a.jsx(ar,{icon:Rd,label:"Mention an agent…",hint:"Or type @",onClick:()=>{var se;return(se=g.current)==null?void 0:se.openTrigger("@")}})]}),a.jsx(zb,{models:e.models,selected:{model:b.model,level:b.level},isDisabled:!i,agent:P?{kind:"pick",roles:D,value:k,onChange:w}:void 0,sourceHint:Y,...ee===void 0?{}:{problem:Fne(ee)},onModelChange:y,onLevelChange:m})]}),footer:a.jsxs("span",{className:"flex w-full min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[a.jsx(Au,{isLabelHidden:!0,label:"Project",placeholder:"No project",placement:"below",variant:"ghost",size:"sm",isDisabled:!i,value:n.kind==="chat"?"chat":n.path,startIcon:n.kind==="chat"?a.jsx(xw,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}):a.jsx(Yu,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),options:[{value:"chat",label:"No project",icon:a.jsx(xw,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})},...e.organized.projects.map(se=>({value:se.project.path,label:se.project.name,icon:a.jsx(Yu,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})}))],onChange:se=>s(se==="chat"?{kind:"chat"}:{kind:"project",path:se})}),n.kind==="project"?a.jsx(One,{value:f,onChange:p,isDisabled:!i}):null]})})]})]})})}const o4=new WeakMap;function Vne(e){let t=o4.get(e);return t===void 0&&(t=new B$(n=>e.controller.listCommands(n),n=>`conversation:${n}`,n=>n.commands),o4.set(e,t)),t}const Wne=e=>new RegExp("^\\/\\P{White_Space}*$","u").test(e);function Kne(e,t){return e.filter(n=>n.name.startsWith(t)).map(n=>({id:`command:${n.name}`,label:n.name,auxiliaryData:n}))}function Xne(e,t,n,s,r){const{items:i,request:o}=q$(Vne(e),t,s),l=x.useRef(i);l.current=i;const c=x.useRef(o);c.current=o;const u=s&&Wne(r),d=x.useMemo(()=>{if(!u)return;let h="";return{character:"/",searchSource:{bootstrap:()=>[],search:p=>(h=p,c.current(),Kne(l.current??[],p)),cancel:()=>{}},menuLabel:"Commands",emptySearchResultsText:"No matching commands",renderItem:p=>{const g=p.auxiliaryData;return a.jsxs("span",{"aria-disabled":g.disabled===void 0?void 0:!0,className:`flex w-full min-w-0 items-center gap-2 ${g.disabled===void 0?"":"opacity-50"}`,children:[a.jsx(hb,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),a.jsxs("span",{className:"flex min-w-0 flex-1 items-baseline gap-2",children:[a.jsxs("span",{className:"max-w-[60%] shrink-0 truncate",children:["/",g.name,g.argumentHint===void 0?null:a.jsxs("span",{className:"text-muted",children:[" ",g.argumentHint]})]}),a.jsx("span",{className:"min-w-0 truncate text-xs text-muted",children:g.disabled??g.description})]})]})},onSelect:p=>{const g=p.auxiliaryData;return g.disabled===void 0?`/${g.name} `:`/${h}`}}},[u,i]);return x.useEffect(()=>{var h;d!==void 0&&((h=n.current)==null||h.emitInput())},[d,n]),{trigger:d,commands:i,request:o}}const Zne=new RegExp("\\p{White_Space}","u"),Ng=(e,t)=>Zne.test(e[t]);function Yne(e,t){if(e.charCodeAt(0)!==47)return;let n=1;for(;n<e.length&&!Ng(e,n);)n+=1;const s=e.slice(1,n);if(s===""||!t.some(o=>o.name===s))return;let r=n,i=e.length;for(;r<i&&Ng(e,r);)r+=1;for(;i>r&&Ng(e,i-1);)i-=1;return r===i?{name:s}:{name:s,args:e.slice(r,i)}}function Qne({body:e,tag:t,narrow:n=!1,isPending:s=!1,isEditDisabled:r=!1,editTooltip:i,onSteer:o,onEdit:l,onWithdraw:c,className:u,...d}){return a.jsxs("div",{className:`chat-queued-message flex min-w-0 items-center gap-2 rounded-lg border border-border bg-surface py-1.5 pl-3 pr-2 text-sm ${n?"flex-wrap":""} ${u??""}`.trim(),"data-testid":"chat-queued-message",...d,children:[a.jsx("p",{className:"chat-queued-message__body min-w-0 flex-1 truncate","data-slot":"queued-message-body",title:e,children:e}),a.jsx("span",{className:"shrink-0 text-xs font-medium text-muted","data-slot":"queued-message-tag",children:t}),o===void 0&&l===void 0&&c===void 0?null:a.jsxs("div",{className:`flex shrink-0 items-center gap-1${n?" w-full justify-end":""}`,children:[o===void 0?null:a.jsx(ne,{label:"Steer the run with this message",variant:"secondary",size:"sm",isDisabled:s,onClick:o,children:"Steer"}),l===void 0?null:a.jsx(ne,{label:"Edit queued message",variant:"ghost",size:"sm",isDisabled:s||r,tooltip:r?i:void 0,onClick:l,children:"Edit"}),c===void 0?null:a.jsx(ne,{label:"Withdraw queued message",variant:"ghost",size:"sm",isDisabled:s,onClick:c,children:"Withdraw"})]})]})}const Jne={steer:"Steer",followUp:"Follow-up",write:"Write"};function ese({items:e,canAct:t,busy:n,editDisabled:s,editTooltip:r,editRetryId:i,narrow:o,pendingIds:l,onSteer:c,onEdit:u,onWithdraw:d}){if(e.length===0)return null;const h=f=>{const p=[...f.imageCount===0?[]:[`${f.imageCount} ${f.imageCount===1?"image":"images"}`],...f.attachmentCount===0?[]:[`${f.attachmentCount} ${f.attachmentCount===1?"file":"files"}`]];if(p.length===0)return f.text;const g=p.join(" · ");return f.text===""?g:`${f.text} · ${g}`};return a.jsx("div",{className:"mx-auto mb-3 grid w-full gap-1.5","data-testid":"queued-message-list",children:e.map(f=>{const p=t&&f.mode!=="write";return a.jsx(Qne,{body:h(f),tag:Jne[f.mode],narrow:o,isPending:l.has(f.id),isEditDisabled:p&&s&&f.id!==i,editTooltip:s?r:void 0,onSteer:p&&f.mode==="followUp"&&n?()=>c(f):void 0,onEdit:p?()=>u(f):void 0,onWithdraw:p?()=>d(f):void 0},f.id)})})}async function tse(e,t){try{return await Promise.all(e.map(n=>tP(n,t)))}catch{return}}function nse({view:e,remote:t,conversation:n,busy:s,narrow:r}){var wa,qd,Hd,Ec,Pd,Tc,Ud,ja,Un,Ys,Fd,ai,Nc;const i=Fb(),{value:o,setValue:l}=i,[c,u]=x.useState(0),[d,h]=x.useState(!1),f=x.useRef(e.connection);f.current=e.connection;const p=J9(),g=Jb(n),b=lne(n),y=e.connection!=="connected",m=x.useRef(null),k=((wa=e.home)==null?void 0:wa.kind)!=="chat"&&Pe(((qd=e.host)==null?void 0:qd.protocol.minor)??0,"listFiles")?{key:`conversation:${n.conversation.id}`,list:te=>t.controller.listFiles({kind:"conversation",conversationId:n.conversation.id},te)}:void 0,w=Hb(e.agents,m,k),v=Ub(t,{kind:"conversation",conversationId:n.conversation.id},m,!y&&Pe(((Hd=e.host)==null?void 0:Hd.protocol.minor)??0,"listSkills"),i.pick);Gb(m,i.draft);const j=Pe(((Ec=e.host)==null?void 0:Ec.protocol.minor)??0,"listCommands"),C=Xne(t,n.conversation.id,m,!y&&j,o),$=[...w??[],...v.trigger===void 0?[]:[v.trigger],...C.trigger===void 0?[]:[C.trigger]],T=cne(n),A=((Pd=e.agents)==null?void 0:Pd.roles)??[],S=(Tc=mr(e.organized,n.conversation.id))==null?void 0:Tc.summary,_=S==null?void 0:S.role,M=fb(S),z=S!==void 0&&S.kind!=="subagent"&&e.agents!==null&&Pe(((Ud=e.host)==null?void 0:Ud.protocol.minor)??0,"setAgent"),O=as(e.models,g.model),I=(O==null?void 0:O.images)===!0,{images:E,pending:N,error:R,add:L,restore:D,remove:P,clear:F}=HE(I),X=Ft(((ja=e.host)==null?void 0:ja.protocol.minor)??0,"attachments")&&Pe(((Un=e.host)==null?void 0:Un.protocol.minor)??0,"beginAttachment"),G=DE(t,X),Q=x.useRef(null),[ee,Y]=x.useState(void 0),V=te=>{const{images:it,others:Ot}=wE(te);Y(void 0),it.length>0&&L(it),Ot.length>0&&G.add(Ot)},[oe,le]=x.useState(void 0);x.useEffect(()=>le(void 0),[o,E.length,G.entries.length]);const me=C.commands===void 0?"Loading…":C.commands.length===0?"None on this host":o.trim()!==""||E.length>0||G.entries.length>0||N||G.uploading?"Clear the message first":void 0,se=x.useRef(null),he=I||y?void 0:`${(O==null?void 0:O.name)??((Ys=g.model)==null?void 0:Ys.modelId)??"This model"} can't see images`,[ce,J]=x.useState([]),ke=x.useRef(new Set),ue=(te,it)=>ke.current.has(te)?!1:(ke.current.add(te),J(Ot=>[...Ot,{id:te,kind:it}]),!0),ge=te=>{ke.current.delete(te),J(it=>it.filter(Ot=>Ot.id!==te))},Re=new Set(ce.map(te=>te.id)),ae=ce.some(te=>te.kind==="edit"),Tt=o.trim()!==""||E.length>0||G.entries.length>0||N,Yt=Tt||ae||d,Pn=Tt?"Clear the composer to edit":void 0,kt=ae||d,kn=!y&&Pe(((Fd=e.host)==null?void 0:Fd.protocol.minor)??0,"withdrawQueued"),fs=n.conversation.id,zs=te=>{p({body:te instanceof Error?te.message:String(te),type:"error"})},va=async te=>{if(ue(te.id,"withdraw"))try{await t.controller.withdrawQueued(te.id,fs)==="sent"&&p({body:"Already sent — can't withdraw"})}catch(it){zs(it)}finally{ge(te.id)}},Cc=async te=>{if(ue(te.id,"steer"))try{await t.controller.steerQueued(te.id,fs)}catch(it){zs(it)}finally{ge(te.id)}},hn=x.useRef(null),Bd=async te=>{if(ue(te.id,"edit"))try{const it=await tse(te.input.images,Ot=>t.controller.image(Ot));if(it===void 0){hn.current=null,h(!1),p({body:"Couldn't load the original images — try again",type:"error"});return}await MS(it),te.input={...te.input,images:it},await t.controller.withdrawQueued(te.id,te.conversationId)==="withdrawn"?(i.restore(te.input.text,te.input.skills),D(it),G.restore(te.input.attachments),hn.current=null,h(!1),u(Ot=>Ot+1)):(hn.current=null,h(!1),p({body:"Already sent — can't withdraw"}))}catch(it){zs(it),f.current=t.view.current().connection,f.current==="connected"?(hn.current=null,h(!1)):h(!0)}finally{ge(te.id)}},Nt=async te=>{var io;const Ot=(((io=hn.current)==null?void 0:io.id)===te.id&&hn.current.conversationId===fs?hn.current.input:void 0)??une(n,te.id);if(Ot===void 0)return;const Rs={conversationId:fs,id:te.id,input:Ot};hn.current=Rs,await Bd(Rs)};x.useEffect(()=>{if(e.connection!=="connected"||!d)return;const te=hn.current;te===null||te.conversationId!==fs||ke.current.has(te.id)||Bd(te)},[e.connection,d,fs]),x.useEffect(()=>{var te;c>0&&((te=m.current)==null||te.focusAtEnd())},[c]);const $c=te=>{var Ac,Mc;const it=Pb(i.draft),Ot=it.text.trim();if(kt||G.uploading||Ot===""&&E.length===0&&G.entries.length===0||N)return;const Rs=C.commands===void 0?void 0:Yne(it.text,C.commands);if(Rs!==void 0){const pe=(Mc=(Ac=C.commands)==null?void 0:Ac.find(Qt=>Qt.name===Rs.name))==null?void 0:Mc.disabled;if(pe!==void 0){le(pe);return}if(E.length>0){le("Commands can't include images");return}if(G.entries.length>0){le("Commands can't include files");return}t.controller.runCommand(Rs.name,Rs.args),l("");return}if(Yl(),G.failed){Y("Some files failed to upload — retry or remove them");return}const io=E,Sa=G.ids();t.controller.submit(Ot,te,{images:io,skills:it.skills,...Sa.length===0?{}:{attachments:Sa}}),l(""),F(),G.clear(),Y(void 0)};return a.jsxs(a.Fragment,{children:[b===""&&!G.uploading?null:a.jsx(re,{type:"supporting",children:G.uploading?"Uploading files…":b}),a.jsx(ese,{items:T,canAct:kn,busy:s,editDisabled:Yt,editTooltip:Pn,editRetryId:d?(ai=hn.current)==null?void 0:ai.id:void 0,narrow:r,pendingIds:Re,onSteer:te=>void Cc(te),onEdit:te=>void Nt(te),onWithdraw:te=>void va(te)}),a.jsx(BE,{inputRef:se,onFiles:kt?()=>{}:L}),a.jsx(ev,{inputRef:Q,onFiles:kt?()=>{}:V}),a.jsx(Vb,{value:o,inputRef:m,status:s?"streaming":"ready",isDisabled:y||kt,placeholder:s?"Steer the running turn…":FE("Ask",{agents:A.length>0,files:k!==void 0,commands:j,skills:v.trigger!==void 0}),onValueChange:l,onSubmit:()=>$c("steer"),onFocus:()=>{v.request(),C.request()},triggers:$.length===0?void 0:$,onStop:s?()=>void t.controller.abort():void 0,attachments:qE({images:E,pending:N,onRemove:P,...G.entries.length===0?{}:{files:a.jsx(a.Fragment,{children:G.entries.map(te=>a.jsx(CE,{entry:te,onRetry:G.retry,onRemove:G.remove},te.key))})}}),hasAttachments:E.length>0||G.entries.length>0,onFiles:kt?void 0:V,error:oe??R??G.error??ee,submitDisabled:G.uploading||G.failed,startActions:a.jsxs(a.Fragment,{children:[a.jsxs(UE,{isDisabled:y||kt,onOpenChange:te=>{te&&C.request(!0)},children:[a.jsx(ar,{icon:xb,label:"Add images…",hint:he??"Or paste or drop",isDisabled:!I,onClick:()=>{var te;return(te=se.current)==null?void 0:te.click()}}),X?a.jsx(ar,{icon:yc,label:"Attach files…",hint:"Up to 10 · 10 MB each",onClick:()=>{var te;return(te=Q.current)==null?void 0:te.click()}}):null,v.trigger===void 0?null:a.jsx(ar,{icon:R1,label:"Use a skill…",hint:"Or type $",onClick:()=>{var te;return(te=m.current)==null?void 0:te.openTrigger("$")}}),A.length===0?null:a.jsx(ar,{icon:Rd,label:"Mention an agent…",hint:"Or type @",onClick:()=>{var te;return(te=m.current)==null?void 0:te.openTrigger("@")}}),j?a.jsx(ar,{icon:hb,label:"Run a command…",hint:me??"Or type /",isDisabled:me!==void 0,onClick:()=>{var te;return(te=m.current)==null?void 0:te.openTrigger("/")}}):a.jsx(ar,{icon:LS,label:"Compact conversation",hint:"Frees up context",onClick:()=>void t.controller.compact(void 0)})]}),a.jsx(zb,{models:e.models,selected:{model:g.model,level:g.thinkingLevel??"off"},isDisabled:y,agent:z?{kind:"pick",roles:A,value:M,onChange:te=>{t.controller.setAgent(te??null).catch(zs)}}:_===void 0?void 0:{kind:"fixed",name:_,description:(Nc=A.find(te=>te.name===_))==null?void 0:Nc.description},onModelChange:te=>void t.controller.setModel(te),onLevelChange:te=>void t.controller.setThinkingLevel(te)})]}),endActions:s&&(o.trim()!==""||E.length>0||G.entries.length>0)?a.jsx(ne,{label:"Follow-up",variant:"ghost",size:r?"md":"sm",tooltip:"Queue after the running turn",isDisabled:y||N||kt||G.uploading||G.failed,onClick:()=>$c("followUp")}):null})]})}function sse({hostKey:e}){const t=_d(),{state:n}=t,[s,r]=x.useState(!1),[i,o]=x.useState();if(x.useEffect(()=>t.hostRejected(e),[t,e]),n.status!=="signed-in")return null;const l=n.hosts.find(u=>{var d;return((d=u.stored)==null?void 0:d.hostKey)===e});if(l===void 0)return null;const c=()=>{r(!0),o(void 0),t.pairHost(l.host.hostId).then(u=>{r(!1),u.ok?bc(u.value.hostKey):o(u.error)})};return a.jsxs(fe,{gap:2,hAlign:"center",children:[a.jsx(ne,{label:"Pair again with your account",variant:"primary",isLoading:s,isDisabled:l.host.pairing!=="available",onClick:c}),i===void 0?null:a.jsx(wt,{status:"error",title:"Couldn't pair",description:Ld(i)})]})}const jl=e=>e!==null&&typeof e=="object",GE=new Set(["__proto__","constructor","prototype"]);class Ql extends Error{constructor(n){super(`unsafe path segment: ${String(n)}`);ie(this,"segment");this.segment=n,this.name="UnsafePathError"}}function VE(e){if(!Array.isArray(e)||e.length===0)throw new TypeError("op is not a tuple");switch(e[0]){case"r":if(e.length!==2)throw new TypeError("r arity");return;case"s":if(e.length!==3)throw new TypeError("s arity");Oa(e[1],!0);return;case"d":if(e.length!==2)throw new TypeError("d arity");Oa(e[1],!0);return;case"a":if(e.length!==3||typeof e[2]!="string")throw new TypeError("a shape");Oa(e[1],!0);return;case"t":if(e.length!==3||!Number.isInteger(e[2])||e[2]<0)throw new TypeError("t shape");Oa(e[1],!0);return;case"p":{if(e.length!==5)throw new TypeError("p arity");if(Oa(e[1]),!Number.isInteger(e[2])||e[2]<0)throw new TypeError("p index");if(!Number.isInteger(e[3])||e[3]<0)throw new TypeError("p remove");if(!Array.isArray(e[4]))throw new TypeError("p items");return}case"m":if(e.length!==3)throw new TypeError("m arity");Oa(e[1]),rse(e[2]);return;default:throw new TypeError(`unknown op verb: ${String(e[0])}`)}}function Oa(e,t=!1){if(!Array.isArray(e))throw new TypeError("path is not an array");if(t&&e.length===0)throw new TypeError("path is empty");WE(e)}function rse(e){if(!Array.isArray(e))throw new TypeError("m permutation is not an array");const t=new Uint8Array(e.length);for(const n of e){if(!Number.isInteger(n)||n<0||n>=e.length||t[n]!==0)throw new TypeError("m permutation is not a bijection");t[n]=1}}function WE(e){for(const t of e)if(typeof t=="string"){if(GE.has(t))throw new Ql(t)}else if(!Number.isInteger(t)||t<0)throw new Ql(t)}function ise(e,t){if(t>e.length)throw new Ql(t)}class Es extends Error{constructor(n){super(`unresolvable path: ${JSON.stringify(n)}`);ie(this,"path");this.path=n,this.name="PathError"}}function ose(e,t){let n=e;for(const s of t){if(VE(s),s[0]==="r"){n=s[1];continue}const r=s[1];if(WE(r),s[0]==="p"){const u=r.length===0?n:Nh(n,r);if(!Array.isArray(u))throw new Es(r);u.splice(s[2],s[3]);const d=1e4;for(let h=0;h<s[4].length;h+=d)u.splice(s[2]+h,0,...s[4].slice(h,h+d));continue}if(s[0]==="m"){const u=r.length===0?n:Nh(n,r);if(!Array.isArray(u)||u.length!==s[2].length)throw new Es(r);const d=u.slice();for(let h=0;h<s[2].length;h++)u[h]=d[s[2][h]];continue}const i=Nh(n,r.slice(0,-1)),o=r[r.length-1];if(Array.isArray(i)){if(typeof o!="number")throw new Ql(o);ise(i,o)}const l=u=>{Object.defineProperty(i,o,{value:u,writable:!0,enumerable:!0,configurable:!0})},c=()=>Object.hasOwn(i,o)?i[o]:void 0;switch(s[0]){case"s":l(s[2]);break;case"d":if(Array.isArray(i)){if(typeof o!="number"||o>=i.length)throw new Es(r);i.splice(o,1)}else delete i[o];break;case"a":{const u=c();if(typeof u!="string")throw new Es(r);l(`${u}${s[2]}`);break}case"t":{const u=c();if(typeof u!="string")throw new Es(r);l(u.slice(s[2]));break}}}return n}function ase(e,t){return lse(e,[t])}function lse(e,t){let n=e;const s=new WeakSet;for(const r of t)for(const i of r){if(VE(i),i[0]==="r"){n=i[1];continue}if(i[0]==="p"){const o=cse(n,i,s);if(o!==void 0){n=o;continue}}n=KE(n,i[0]==="p"||i[0]==="m"?i[1]:i[1].slice(0,-1),s),n=ose(n,[i])}return n}function cse(e,t,n){const[,s,r,i,o]=t;if(i!==0)return;let l=e;for(const h of s){if(!(typeof h=="string"?!GE.has(h)&&jl(l)&&!Array.isArray(l):Number.isInteger(h)&&h>=0&&Array.isArray(l))||!Object.hasOwn(l,h))return;l=l[h]}if(!Array.isArray(l)||n.has(l)||r!==l.length)return;const c=l.concat(o);if(n.add(c),s.length===0)return c;const u=s.slice(0,-1),d=KE(e,u,n);return Object.defineProperty(Nh(d,u),s[s.length-1],{value:c,writable:!0,enumerable:!0,configurable:!0}),d}function KE(e,t,n){const s=o=>{if(Array.isArray(o))return o.slice();if(!jl(o))throw new Es(t);const l=Object.create(Object.getPrototypeOf(o)===null?null:Object.prototype);for(const c of Object.keys(o))Object.defineProperty(l,c,{value:o[c],writable:!0,enumerable:!0,configurable:!0});return l};if(!jl(e))throw new Es(t);let r;n.has(e)?r=e:(r=s(e),n.add(r));let i=r;for(const o of t){if(!Object.hasOwn(i,o))throw new Es(t);if(Array.isArray(i)&&typeof o!="number")throw new Ql(o);const l=i[o];if(!jl(l))throw new Es(t);if(n.has(l)){i=l;continue}const c=s(l);Object.defineProperty(i,o,{value:c,writable:!0,enumerable:!0,configurable:!0}),n.add(c),i=c}return r}function use(e,t){let n=e;for(const s of t){if(!jl(n))throw new Es(t);if(Array.isArray(n)&&typeof s!="number")throw new Ql(s);if(!Object.hasOwn(n,s))throw new Es(t);n=n[s]}return n}function Nh(e,t){const n=use(e,t);if(!jl(n))throw new Es(t);return n}function XE(e,t){return{label:e,open(n){const s=new URL(e);s.searchParams.set("token",t);const r=new WebSocket(s);return r.onmessage=i=>n.message(String(i.data)),r.onclose=i=>n.closed(i.code),{send:i=>r.send(i),close:()=>r.close()}}}}function dse(e){return new fse(e).ready}class X0 extends Error{constructor(){super("Unauthorized: this client is not allowed (wrong token, or the device is not paired or was revoked)"),this.name="UnauthorizedError"}}class ZE extends Error{constructor(n,s,r){const i=n>s?"client-older":"host-older";super(i==="client-older"?`Client out of date: the host speaks protocol major ${n}, this client speaks ${s}`:`Host out of date: this client speaks protocol major ${s}, the host speaks ${n}`);ie(this,"hostMajor");ie(this,"clientMajor");ie(this,"hostVersion");ie(this,"direction");this.name="ProtocolMismatchError",this.hostMajor=n,this.clientMajor=s,r!==void 0&&(this.hostVersion=r),this.direction=i}}function a4(e){return e.some(t=>{const n="data"in t?t.data:"",s="ref"in t?t.ref:"";return n===""&&s!==""})}var hd,Tl,tn,Pt,_r,Nl,Hx,Bo,Ei,Al,Hs,Sn,Cn,bs,Px,Ux,_e,Ml,xd,pd,zl,gd,Ps,Rl,Ti,md,Il,H,Z0,YE,Ua,QE,JE,Ah,wo,Y0,Mh,Q0,ps,J0,ey,eT,ty,rr,zr,ny,ki,Le,Ht,gs,tT,nT,zh,sT,Rh,rT;class fse{constructor(t){ve(this,H);ie(this,"ready");ve(this,hd);ve(this,Tl,new Set);ve(this,tn,new Map);ve(this,Pt,new Set);ve(this,_r,new Set);ve(this,Nl,[]);ve(this,Hx,{});ve(this,Bo,new Map);ve(this,Ei,new Map);ve(this,Al);ve(this,Hs);ve(this,Sn);ve(this,Cn);ve(this,bs);ve(this,Px,1);ve(this,Ux,1);ve(this,_e,0);ve(this,Ml,!1);ve(this,xd,[]);ve(this,pd,{});ve(this,zl);ve(this,gd,0);ve(this,Ps,!1);ve(this,Rl,!1);ve(this,Ti,Promise.resolve());ve(this,md);ve(this,Il);ye(this,hd,t),ye(this,Al,"transport"in t?t.transport:XE(t.url,t.token)),this.ready=new Promise((n,s)=>{ye(this,md,n),ye(this,Il,s)}),U(this,H,Z0).call(this)}}hd=new WeakMap,Tl=new WeakMap,tn=new WeakMap,Pt=new WeakMap,_r=new WeakMap,Nl=new WeakMap,Hx=new WeakMap,Bo=new WeakMap,Ei=new WeakMap,Al=new WeakMap,Hs=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,bs=new WeakMap,Px=new WeakMap,Ux=new WeakMap,_e=new WeakMap,Ml=new WeakMap,xd=new WeakMap,pd=new WeakMap,zl=new WeakMap,gd=new WeakMap,Ps=new WeakMap,Rl=new WeakMap,Ti=new WeakMap,md=new WeakMap,Il=new WeakMap,H=new WeakSet,Z0=function(){ye(this,Ml,!1);const t=B(this,Al).open({message:n=>{B(this,Hs)===t&&U(this,H,QE).call(this,JSON.parse(n))},closed:(n,s)=>U(this,H,YE).call(this,t,n,s)});ye(this,Hs,t)},YE=function(t,n,s){if(B(this,Hs)!==t)return;ye(this,Hs,void 0);for(const l of B(this,Ei).values())l.reject(new Error("Disconnected from host"));if(B(this,Ei).clear(),B(this,Sn)===void 0){ye(this,Ps,!0),B(this,Il).call(this,n===t3?new X0:new Error(s??`Could not connect to ${B(this,Al).label}`));return}if(B(this,Ps))return;if(n===t3){ye(this,Ps,!0),U(this,H,zr).call(this,{connection:"closed",unauthorized:!0}),U(this,H,ki).call(this,"error",new X0().message);return}if(n===fV){ye(this,Ps,!0),U(this,H,zr).call(this,{connection:"closed"}),U(this,H,ki).call(this,"error",`The host rejected a malformed frame from this client${s===void 0?"":`: ${s}`}`);return}U(this,H,zr).call(this,{connection:"reconnecting"});const{min:r,max:i}=B(this,hd).reconnectDelayMs??{min:200,max:2e3},o=Math.min(i,r*2**Gd(this,gd)._++);setTimeout(()=>{B(this,Ps)||U(this,H,Z0).call(this)},o)},Ua=function(t){var n;(n=B(this,Hs))==null||n.send(JSON.stringify(t))},QE=function(t){var n,s,r;if(!(t===null||typeof t!="object"))switch(t.type){case"hello":{const i=t.protocol,o=typeof i=="number"?i:i!==null&&typeof i=="object"?i.major:void 0;if(o!==mg.major){const u=new ZE(typeof o=="number"?o:Number.NaN,mg.major,t.hostVersion);ye(this,Ps,!0),B(this,Sn)===void 0?B(this,Il).call(this,u):(U(this,H,zr).call(this,{connection:"outdated",protocolMismatch:{hostMajor:u.hostMajor,clientMajor:u.clientMajor,...u.hostVersion===void 0?{}:{hostVersion:u.hostVersion},direction:u.direction}}),U(this,H,ki).call(this,"error",u.message)),(n=B(this,Hs))==null||n.close();return}const l=i!==null&&typeof i=="object"&&typeof i.minor=="number"?i.minor:0;ye(this,_e,l),ye(this,Ml,!0),ye(this,gd,0),ye(this,Nl,t.docs),ye(this,Hx,t.toolPresentations),ye(this,xd,t.models),ye(this,pd,t.defaults??{}),ye(this,zl,t.hostVersion),B(this,_r).clear();const c=new Set(Jw(l));for(const u of Mb)c.has(u)?B(this,Pt).add(u):(B(this,Pt).delete(u),B(this,tn).delete(u),B(this,_r).delete(u));if(B(this,Cn)!==void 0)for(const u of U(this,H,wo).call(this,B(this,Cn)))B(this,Pt).add(u);if(B(this,bs)!==void 0)for(const u of U(this,H,wo).call(this,B(this,bs)))B(this,Pt).add(u);for(const u of B(this,Pt))U(this,H,Q0).call(this,u);B(this,Sn)!==void 0?(U(this,H,zr).call(this,{session:t.session,toolPresentations:t.toolPresentations,connection:"connected",host:U(this,H,J0).call(this)}),U(this,H,rr).call(this)):U(this,H,JE).call(this,t,l);return}case"snapshot":if(!B(this,Pt).has(t.stream))return;B(this,tn).set(t.stream,t.value),B(this,_r).add(t.stream),U(this,H,rr).call(this);for(const i of((s=B(this,Bo).get(t.stream))==null?void 0:s.splice(0))??[])i.resolve();return;case"ops":if(!B(this,Pt).has(t.stream)||!B(this,tn).has(t.stream))return;B(this,tn).set(t.stream,ase(B(this,tn).get(t.stream),t.ops)),U(this,H,rr).call(this);return;case"ended":B(this,Pt).delete(t.stream),B(this,tn).delete(t.stream),B(this,_r).delete(t.stream);for(const i of((r=B(this,Bo).get(t.stream))==null?void 0:r.splice(0))??[])i.reject(new Error(`Stream ${t.stream} ended: ${t.reason}`));U(this,H,rr).call(this);return;case"result":{const i=B(this,Ei).get(t.id);B(this,Ei).delete(t.id),t.ok?i==null||i.resolve(t.value):i==null||i.reject(new Error(t.error));return}case"notice":U(this,H,ki).call(this,t.level,t.message);return}},JE=function(t,n){Promise.all(Jw(n).map(s=>U(this,H,Ah).call(this,s))).then(()=>{ye(this,Sn,{session:t.session,organized:{chats:[],projects:[],archived:[]},models:U(this,H,ps).call(this,"models")??t.models,defaults:U(this,H,ey).call(this,t.defaults??{}),notices:[],connection:"connected",docs:[],toolPresentations:t.toolPresentations,devices:[],mcp:null,auth:null,settings:null,agents:null,host:U(this,H,J0).call(this)}),U(this,H,rr).call(this),B(this,md).call(this,{view:U(this,H,tT).call(this),controller:U(this,H,nT).call(this),close:()=>U(this,H,rT).call(this)})})},Ah=function(t){return new Promise((n,s)=>{const r=B(this,Bo).get(t)??[];r.push({resolve:n,reject:s}),B(this,Bo).set(t,r)})},wo=function(t){return[gg(t),...B(this,Nl).map(n=>e3(n.kind,t))]},Y0=async function(t){const n=U(this,H,wo).call(this,t).filter(i=>!B(this,Pt).has(i)),s=U(this,H,wo).call(this,t).filter(i=>B(this,Pt).has(i)&&!B(this,_r).has(i)),r=Promise.all([...n,...s].map(i=>U(this,H,Ah).call(this,i)));for(const i of n)B(this,Pt).add(i),B(this,Ml)&&U(this,H,Q0).call(this,i);await r},Mh=function(t,n){const s=new Set(n===void 0?[]:U(this,H,wo).call(this,n));for(const r of U(this,H,wo).call(this,t))s.has(r)||(B(this,Pt).delete(r),B(this,tn).delete(r),B(this,_r).delete(r),U(this,H,Ua).call(this,{type:"unsubscribe",stream:r}))},Q0=function(t){const n=t.startsWith("conversation:")&&Ft(B(this,_e),"imageRefs");U(this,H,Ua).call(this,{type:"subscribe",stream:t,...n?{images:"ref"}:{}})},ps=function(t){return B(this,tn).get(t)},J0=function(){return{protocol:{major:mg.major,minor:B(this,_e)},...B(this,zl)===void 0?{}:{version:B(this,zl)}}},ey=function(t){const n=U(this,H,ps).call(this,"settings");return n===void 0?t:{...n.defaultModel===null?{}:{model:n.defaultModel},...n.defaultThinkingLevel===null?{}:{thinkingLevel:n.defaultThinkingLevel}}},eT=function(t,n){const s=U(this,H,ps).call(this,"conversations")??[],r=new Map(s.map(o=>[o.id,o.parent]));let i=t;for(let o=0;i!==void 0&&o<8;o++){if(i===n)return!0;i=r.get(i)}return!1},ty=function(t){return B(this,Nl).flatMap(n=>{const s=e3(n.kind,t);return B(this,tn).has(s)?[{kind:n.kind,presentation:n.presentation,value:B(this,tn).get(s)}]:[]})},rr=function(){var c;if(B(this,Sn)===void 0)return;const t=B(this,Cn),n=B(this,bs),s=t===void 0?void 0:B(this,tn).get(gg(t)),r=U(this,H,ps).call(this,"conversations")??[],i=U(this,H,ps).call(this,"index")??{projects:[],conversations:[]},o=((c=U(this,H,ps).call(this,"devices"))==null?void 0:c.devices)??[],l=B(this,Pt).has("tasks")?B(this,tn).get("tasks"):void 0;U(this,H,zr).call(this,{conversation:s,models:U(this,H,ps).call(this,"models")??B(this,xd),organized:VH(i,r),home:t===void 0?void 0:KH(i,r,t),checkout:t===void 0?void 0:WH(i,r,t),tasks:l,docs:t===void 0?[]:U(this,H,ty).call(this,t),side:n===void 0?void 0:{id:n,conversation:B(this,tn).get(gg(n)),docs:U(this,H,ty).call(this,n)},devices:o,mcp:U(this,H,ps).call(this,"mcp")??null,auth:U(this,H,ps).call(this,"auth")??null,settings:U(this,H,ps).call(this,"settings")??null,agents:U(this,H,ps).call(this,"agents")??null,defaults:U(this,H,ey).call(this,B(this,pd))})},zr=function(t){B(this,Sn)!==void 0&&(ye(this,Sn,{...B(this,Sn),...t}),!B(this,Rl)&&(ye(this,Rl,!0),queueMicrotask(()=>{ye(this,Rl,!1);for(const n of B(this,Tl))n()})))},ny=function(t){return t===void 0||!Ft(B(this,_e),"boundSkills")?{}:{skills:t}},ki=function(t,n){B(this,Sn)!==void 0&&U(this,H,zr).call(this,{notices:[...B(this,Sn).notices,{id:Gd(this,Ux)._++,level:t,message:n}].slice(-20)})},Le=function(t,n){var r;if(B(this,Hs)===void 0||((r=B(this,Sn))==null?void 0:r.connection)!=="connected")return Promise.reject(new Error("Not connected to the host"));const s=Gd(this,Px)._++;return new Promise((i,o)=>{B(this,Ei).set(s,{resolve:i,reject:o}),U(this,H,Ua).call(this,{type:"call",id:s,method:t,args:n})})},Ht=function(t){return ye(this,Ti,B(this,Ti).then(t).then(()=>{},n=>U(this,H,ki).call(this,"error",n instanceof Error?n.message:String(n)))),B(this,Ti)},gs=function(t){const n=B(this,Ti).then(t);return ye(this,Ti,n.then(()=>{},()=>{})),n},tT=function(){return{current:()=>B(this,Sn),subscribe:t=>(B(this,Tl).add(t),()=>B(this,Tl).delete(t))}},nT=function(){const t=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),s=>s.toString(16).padStart(2,"0")).join(""),n=()=>{if(B(this,Cn)===void 0)throw new Error("No conversation selected");return B(this,Cn)};return{addProject:s=>U(this,H,gs).call(this,()=>U(this,H,Le).call(this,"addProject",{path:s})),listFolders:s=>U(this,H,gs).call(this,()=>{if(!Pe(B(this,_e),"listFolders"))throw new Error("The host is too old for this (needs protocol 5.3); run `pinomad upgrade` on the host");return U(this,H,Le).call(this,"listFolders",s===void 0?{}:{path:s})}),removeProject:s=>U(this,H,Ht).call(this,()=>U(this,H,Le).call(this,"removeProject",{path:s})),renameConversation:(s,r)=>U(this,H,gs).call(this,async()=>{if(!Pe(B(this,_e),"renameConversation"))throw new Error("The host is too old for this (needs protocol 5.4); run `pinomad upgrade` on the host");await U(this,H,Le).call(this,"renameConversation",{conversationId:s,title:r})}),createConversation:(s,r,i)=>U(this,H,Ht).call(this,async()=>{const o=(i==null?void 0:i.images)??[];if(o.length>0&&!Ft(B(this,_e),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");if(a4(o)&&!Ft(B(this,_e),"imageRefs"))throw new Error("The host is too old for image refs (needs protocol 5.15); run `pinomad upgrade` on the host");const l=(i==null?void 0:i.attachments)??[];if(l.length>cr)throw new Error(`At most ${cr} attachments per message`);if(l.length>0&&!Ft(B(this,_e),"attachments"))throw new Error("The host is too old for attachments (needs protocol 5.19); run `pinomad upgrade` on the host");if((i==null?void 0:i.agent)!==void 0&&!Ft(B(this,_e),"agentConversations"))throw new Error("The host is too old for named agents (needs protocol 5.10); run `pinomad upgrade` on the host");const{conversationId:c}=await U(this,H,Le).call(this,"createConversation",{home:s,text:r,requestId:t(),...(i==null?void 0:i.checkout)===void 0?{}:{checkout:i.checkout},...(i==null?void 0:i.model)===void 0?{}:{model:i.model},...(i==null?void 0:i.thinkingLevel)===void 0?{}:{thinkingLevel:i.thinkingLevel},...(i==null?void 0:i.agent)===void 0?{}:{agent:i.agent},...o.length===0?{}:{images:o},...U(this,H,ny).call(this,i==null?void 0:i.skills),...l.length===0?{}:{attachments:l}});await U(this,H,zh).call(this,c)}),archive:(s,r)=>U(this,H,Ht).call(this,async()=>{await U(this,H,Le).call(this,"archive",{conversationId:s,archived:r}),r&&s===B(this,Cn)&&U(this,H,sT).call(this),r&&B(this,bs)!==void 0&&U(this,H,eT).call(this,B(this,bs),s)&&await U(this,H,Rh).call(this,void 0)}),submit:(s,r,i)=>U(this,H,Ht).call(this,()=>{const o=(i==null?void 0:i.images)??[];if(o.length>0&&!Ft(B(this,_e),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");if(a4(o)&&!Ft(B(this,_e),"imageRefs"))throw new Error("The host is too old for image refs (needs protocol 5.15); run `pinomad upgrade` on the host");const l=(i==null?void 0:i.attachments)??[];if(l.length>cr)throw new Error(`At most ${cr} attachments per message`);if(l.length>0&&!Ft(B(this,_e),"attachments"))throw new Error("The host is too old for attachments (needs protocol 5.19); run `pinomad upgrade` on the host");return U(this,H,Le).call(this,"submit",{conversationId:(i==null?void 0:i.target)??n(),text:s,whenBusy:r,requestId:(i==null?void 0:i.requestId)??t(),...o.length===0?{}:{images:o},...U(this,H,ny).call(this,i==null?void 0:i.skills),...l.length===0?{}:{attachments:l}})}),compact:s=>U(this,H,Ht).call(this,()=>U(this,H,Le).call(this,"compact",{conversationId:n(),...s===void 0?{}:{instructions:s}})),runCommand:(s,r,i)=>U(this,H,Ht).call(this,()=>{if(!Pe(B(this,_e),"runCommand"))throw new Error("The host is too old for this (needs protocol 5.17); run `pinomad upgrade` on the host");return U(this,H,Le).call(this,"runCommand",{conversationId:i??n(),name:s,...r===void 0?{}:{args:r}})}),abort:s=>{const r=s??B(this,Cn);return r===void 0?(U(this,H,ki).call(this,"error","No conversation selected"),Promise.resolve()):U(this,H,Le).call(this,"abort",{conversationId:r}).then(()=>{},i=>U(this,H,ki).call(this,"error",i instanceof Error?i.message:String(i)))},withdrawQueued:(s,r)=>U(this,H,gs).call(this,async()=>{if(!Pe(B(this,_e),"withdrawQueued"))throw new Error("The host is too old for this (needs protocol 5.14); run `pinomad upgrade` on the host");const{outcome:i}=await U(this,H,Le).call(this,"withdrawQueued",{conversationId:r??n(),submissionId:s});return i}),steerQueued:(s,r)=>U(this,H,gs).call(this,async()=>{if(!Pe(B(this,_e),"steerQueued"))throw new Error("The host is too old for this (needs protocol 5.14); run `pinomad upgrade` on the host");const{outcome:i}=await U(this,H,Le).call(this,"steerQueued",{conversationId:r??n(),submissionId:s});return i}),setThinkingLevel:s=>U(this,H,Ht).call(this,()=>U(this,H,Le).call(this,"setThinkingLevel",{conversationId:n(),level:s})),setModel:s=>U(this,H,Ht).call(this,()=>U(this,H,Le).call(this,"setModel",{conversationId:n(),model:s})),setAgent:s=>U(this,H,Ht).call(this,()=>{if(!Pe(B(this,_e),"setAgent"))throw new Error("The host is too old for this (needs protocol 5.18); run `pinomad upgrade` on the host");return U(this,H,Le).call(this,"setAgent",{conversationId:n(),agent:s})}),toggleTasks:()=>U(this,H,Ht).call(this,async()=>{if(B(this,Pt).delete("tasks")){U(this,H,Ua).call(this,{type:"unsubscribe",stream:"tasks"}),B(this,tn).delete("tasks"),U(this,H,rr).call(this);return}B(this,Pt).add("tasks");const s=U(this,H,Ah).call(this,"tasks");U(this,H,Ua).call(this,{type:"subscribe",stream:"tasks"}),await s}),switchConversation:s=>U(this,H,Ht).call(this,()=>U(this,H,zh).call(this,s)),showSide:s=>U(this,H,Ht).call(this,()=>U(this,H,Rh).call(this,s)),fork:(s,r,i,o)=>U(this,H,Ht).call(this,async()=>{const{conversationId:l}=await U(this,H,Le).call(this,"fork",{conversationId:n(),entryId:s,...i===void 0?{}:{removeTools:i}});(o==null?void 0:o.show)==="side"?await U(this,H,Rh).call(this,l):await U(this,H,zh).call(this,l),await U(this,H,Le).call(this,"submit",{conversationId:l,text:r,whenBusy:"followUp",requestId:t()})}),answer:(s,r,i,o)=>U(this,H,Ht).call(this,()=>U(this,H,Le).call(this,"answer",{conversationId:o??n(),kind:s,requestId:r,answers:i})),changes:()=>U(this,H,gs).call(this,()=>U(this,H,Le).call(this,"changes",{conversationId:n()})),listFiles:(s,r)=>Pe(B(this,_e),"listFiles")?U(this,H,Le).call(this,"listFiles",{scope:s,query:r}):Promise.reject(new Error("The host is too old for this (needs protocol 5.10); run `pinomad upgrade` on the host")),beginAttachment:(s,r)=>Pe(B(this,_e),"beginAttachment")?U(this,H,Le).call(this,"beginAttachment",{name:s,size:r}).then(({attachmentId:i})=>i):Promise.reject(new Error("The host is too old for attachments (needs protocol 5.19); run `pinomad upgrade` on the host")),appendAttachment:(s,r,i)=>Pe(B(this,_e),"appendAttachment")?U(this,H,Le).call(this,"appendAttachment",{attachmentId:s,offset:r,data:i}):Promise.reject(new Error("The host is too old for attachments (needs protocol 5.19); run `pinomad upgrade` on the host")),image:s=>Pe(B(this,_e),"image")?U(this,H,Le).call(this,"image",{ref:s}):Promise.reject(new Error("The host is too old for this (needs protocol 5.15); run `pinomad upgrade` on the host")),listSkills:s=>Pe(B(this,_e),"listSkills")?U(this,H,Le).call(this,"listSkills",{scope:s}):Promise.reject(new Error("The host is too old for this (needs protocol 5.13); run `pinomad upgrade` on the host")),listCommands:s=>Pe(B(this,_e),"listCommands")?U(this,H,Le).call(this,"listCommands",{conversationId:s}):Promise.reject(new Error("The host is too old for this (needs protocol 5.17); run `pinomad upgrade` on the host")),createPairing:()=>U(this,H,gs).call(this,()=>U(this,H,Le).call(this,"createPairing",{})),revokeDevice:s=>U(this,H,Ht).call(this,()=>U(this,H,Le).call(this,"revokeDevice",{publicKey:s})),logout:s=>U(this,H,Ht).call(this,()=>{if(!Pe(B(this,_e),"logout"))throw new Error("The host is too old for this (needs protocol 5.1); run `pinomad upgrade` on the host");return U(this,H,Le).call(this,"logout",{providerId:s})}),updateSettings:s=>U(this,H,Ht).call(this,()=>{if(!Pe(B(this,_e),"updateSettings"))throw new Error("The host is too old for this (needs protocol 5.2); run `pinomad upgrade` on the host");if(s.acceptAccountDevices!==void 0&&!Ft(B(this,_e),"acceptAccountDevices"))throw new Error("The host is too old for this (needs protocol 5.8); run `pinomad upgrade` on the host");if(s.hostName!==void 0&&!Ft(B(this,_e),"hostName"))throw new Error("The host is too old for this (needs protocol 5.12); run `pinomad upgrade` on the host");return U(this,H,Le).call(this,"updateSettings",{patch:s})}),createAgent:s=>U(this,H,gs).call(this,async()=>{if(!Pe(B(this,_e),"createAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await U(this,H,Le).call(this,"createAgent",{role:s})}),updateAgent:s=>U(this,H,gs).call(this,async()=>{if(!Pe(B(this,_e),"updateAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await U(this,H,Le).call(this,"updateAgent",{role:s})}),deleteAgent:s=>U(this,H,gs).call(this,async()=>{if(!Pe(B(this,_e),"deleteAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await U(this,H,Le).call(this,"deleteAgent",{name:s})}),setPushToken:s=>U(this,H,gs).call(this,async()=>{if(!Pe(B(this,_e),"setPushToken"))throw new Error("The host is too old for this (needs protocol 5.7); run `pinomad upgrade` on the host");if(s!==null&&typeof s!="string"&&!Ft(B(this,_e),"apnsPush"))throw new Error("The host is too old for this (needs protocol 5.9); run `pinomad upgrade` on the host");await U(this,H,Le).call(this,"setPushToken",{token:s})})}},zh=async function(t){const n=B(this,Cn);t!==n&&(await U(this,H,Y0).call(this,t),ye(this,Cn,t),n!==void 0&&U(this,H,Mh).call(this,n,B(this,bs)),U(this,H,rr).call(this))},sT=function(){const t=B(this,Cn);t!==void 0&&(ye(this,Cn,void 0),U(this,H,Mh).call(this,t,B(this,bs)),U(this,H,rr).call(this))},Rh=async function(t){const n=B(this,bs);t!==n&&(t!==void 0&&await U(this,H,Y0).call(this,t),ye(this,bs,t),n!==void 0&&U(this,H,Mh).call(this,n,B(this,Cn)),U(this,H,rr).call(this))},rT=function(){var t;B(this,Ps)||(ye(this,Ps,!0),U(this,H,zr).call(this,{connection:"closed"}),(t=B(this,Hs))==null||t.close())};const hse=15e3;function xse(e,t,n){const[s,r]=x.useState({status:"connecting"});return x.useEffect(()=>{let i,o=!1;r({status:"connecting"});const l="transport"in e?e.transport:XE(e.url,e.token),c=new Set,u=()=>{for(const g of c)g.close();c.clear()},d={label:l.label,open(g){let b;b=l.open({message:g.message,closed:(m,k)=>{b!==void 0&&c.delete(b),g.closed(m,k)}});const y=b;return c.add(y),{send:m=>y.send(m),close:()=>{c.delete(y)&&y.close()}}}},h=dse,f=hse,p=setTimeout(()=>{o=!0,u(),r({status:"failed",error:`No response from ${l.label} within ${f/1e3} seconds. Check that the host is running and that this device can reach it (same network, or Tailscale connected).`,unauthorized:!1})},f);return h({reconnectDelayMs:{min:200,max:2e3},...e,transport:d}).then(g=>{if(clearTimeout(p),o){g.close();return}i=g,r({status:"ready",remote:g})},g=>{clearTimeout(p),o||r({status:"failed",error:g instanceof Error?g.message:String(g),unauthorized:g instanceof X0,...g instanceof ZE?{mismatch:g}:{}})}),()=>{o=!0,clearTimeout(p),u(),i==null||i.close()}},[t]),s}function pse(e){return x.useSyncExternalStore(e.view.subscribe,e.view.current)}const gse={height:"100dvh",width:"100%",backgroundColor:"var(--color-background-body)",color:"var(--color-text-primary)"},mse={flex:1,minHeight:0},iT="pinomad.overview.open",yse=()=>typeof window<"u"&&window.localStorage.getItem(iT)==="true";function kse(){const[e]=x.useState(DG),[t,n]=x.useState();x.useEffect(()=>{let i=!0;return e.list().catch(o=>(console.error("Could not load the paired-host list",o),[])).then(o=>{if(!i)return;const l=localStorage.getItem(td);n({hosts:o,activeHostKey:l,address:RG(window.location.hash,window.location,o,l)})}),()=>{i=!1}},[e]),x.useEffect(()=>{const i=()=>{window.location.hash!==""&&window.location.reload()};return window.addEventListener("hashchange",i),()=>window.removeEventListener("hashchange",i)},[]);const s=x.useMemo(()=>t===void 0?{store:e,hosts:[],activeHostKey:null,paired:()=>Promise.resolve(),setName:()=>Promise.resolve()}:{store:e,hosts:t.hosts,activeHostKey:t.activeHostKey,paired:async i=>{await e.save(i),localStorage.setItem(td,i.hostKey),n(o=>o===void 0?o:{...o,hosts:[...o.hosts.filter(l=>l.hostKey!==i.hostKey),i],activeHostKey:i.hostKey})},setName:async(i,o)=>{await e.setName(i,o),n(l=>l===void 0?l:{...l,hosts:l.hosts.map(c=>c.hostKey===i?{...c,name:o}:c)})}},[e,t]);if(t===void 0)return a.jsx(ca,{children:null});const{address:r}=t;return a.jsx(vC.Provider,{value:s,children:a.jsx(FG,{children:r===void 0?a.jsx(ca,{children:a.jsx(bse,{})}):a.jsx(vse,{address:r})})})}function bse(){return _d().state.status==="unavailable"?a.jsxs(fe,{gap:4,hAlign:"center",style:{width:"100%",maxWidth:420},children:[a.jsx(Wi,{title:"No host link",description:"Paste a pairing link from pinomad pair or Settings → Devices → Pair a device."}),a.jsx(E0,{})]}):a.jsxs(fe,{gap:6,style:{width:"100%",maxWidth:420},children:[a.jsx(SC,{}),a.jsxs(fe,{gap:2,children:[a.jsx(re,{type:"supporting",children:"Or paste a pairing link from pinomad pair or Settings → Devices → Pair a device."}),a.jsx(E0,{})]})]})}function ca({children:e}){const t=IS().reserveMacTrafficLights;return a.jsxs(fe,{style:gse,isScrollable:!0,children:[t?a.jsx("div",{"aria-hidden":"true",className:"pinomad-drag fixed inset-x-0 top-0 h-10"}):null,a.jsx(fe,{minHeight:"100%",style:{flexShrink:0},hAlign:"center",vAlign:"center",padding:6,children:e})]})}function vse({address:e}){return e.kind==="token"?a.jsx(aT,{options:e,connectionKey:`${e.url} ${e.token}`,label:e.url}):e.kind==="pair"?a.jsx(wse,{address:e}):a.jsx(oT,{address:e})}function wse({address:e}){const[t,n]=x.useState(!1),s=()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()};if(t)return a.jsx(oT,{address:e});const r=new URL(e.url);return a.jsx(ca,{children:a.jsxs(fe,{gap:4,hAlign:"center",style:{maxWidth:420},children:[a.jsx(Wi,{title:"Pair with this host?",description:`This device will pair with ${r.host}.`}),a.jsx(re,{type:"supporting",style:{wordBreak:"break-all"},children:e.url}),a.jsxs($e,{gap:2,children:[a.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),a.jsx(ne,{label:"Pair",variant:"primary",onClick:()=>n(!0)})]})]})})}function oT({address:e}){const{store:t,hosts:n,paired:s}=kc(),r=x.useMemo(()=>n.find(p=>p.hostKey===e.hostKey),[n,e]),[i,o]=x.useState(),l=x.useMemo(()=>e.kind==="pair"&&r!==void 0?j0(Ko(r.privateKey)):e.kind==="device"?j0(Ko(e.privateKey)):Cb(),[e,r]),[c,u]=x.useState();x.useEffect(()=>{if(e.kind!=="pair")return;let p=!0;return Nb().then(g=>{p&&u(g)}),()=>{p=!1}},[e]);const d=x.useMemo(()=>{const p={url:e.url,hostKey:Ko(e.hostKey),device:l};if(e.kind!=="pair")return{transport:C0(p)};if(c!==void 0)return{transport:C0({...p,pairing:{secret:e.secret,name:c},onPaired:()=>{const g={url:e.url,hostKey:e.hostKey,privateKey:$b(l.privateKey)};s(g).catch(b=>{console.error("Could not save the paired host",b),o(g)}),history.replaceState(null,"",window.location.pathname+window.location.search)}})}},[e,l,s,c]);if(d===void 0)return a.jsx(ca,{children:null});const h=e.kind==="pair"?a.jsxs(fe,{gap:4,hAlign:"center",children:[a.jsx(Wi,{title:"This pairing code was used or has expired",description:"Generate a new QR on the host: run bun run pair, or open Settings → Devices → Pair a device."}),n.length===0?null:a.jsx(ne,{label:"Use saved pairing",variant:"secondary",onClick:()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}})]}):a.jsxs(fe,{gap:4,hAlign:"center",children:[a.jsx(Wi,{title:"This device isn't paired",description:"It isn't paired with the host, or was revoked."}),a.jsx(sse,{hostKey:e.hostKey}),a.jsx(ne,{label:"Forget this host",variant:"secondary",onClick:()=>wC(t,e.hostKey)})]}),f=i===void 0?void 0:a.jsx(wt,{status:"warning",container:"section",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:a.jsx(ne,{label:"Retry",variant:"ghost",onClick:()=>{s(i).then(()=>o(void 0),p=>console.error("Could not save the paired host",p))}})});return a.jsx(aT,{options:d,connectionKey:`${e.url} ${e.hostKey}`,label:e.url,rejected:h,device:l,notice:f,hostKey:e.hostKey})}function aT({options:e,connectionKey:t,label:n,rejected:s,device:r,notice:i,hostKey:o}){const[l,c]=x.useState(0),u=xse(e,`${t} ${l}`);return u.status==="connecting"?a.jsx(ca,{children:a.jsx(Wi,{title:"Connecting",description:n})}):u.status==="failed"?a.jsxs(ca,{children:[u.mismatch!==void 0?a.jsx(lT,{wsUrl:n,mismatch:u.mismatch}):s!==void 0&&u.unauthorized?s:a.jsxs(fe,{gap:4,hAlign:"center",children:[a.jsx(wt,{status:"error",title:"Could not connect to the host",description:u.error}),a.jsx(ne,{label:"Retry",variant:"secondary",onClick:()=>c(l+1)})]}),a.jsx(AC,{})]}):a.jsx(jse,{remote:u.remote,wsUrl:n,rejected:s,device:r,notice:i,hostKey:o})}const sy="pinomad.reloadedForProtocol";function lT({wsUrl:e,mismatch:t}){var o;const n=gb(),s=((o=window.pinomadDesktop)==null?void 0:o.updates)!==void 0,[r]=x.useState(()=>t.direction==="client-older"&&s||!IG(e,window.location)||sessionStorage.getItem(sy)===String(t.hostMajor)?!1:(sessionStorage.setItem(sy,String(t.hostMajor)),window.location.reload(),!0));if(x.useEffect(()=>{var l,c;t.direction==="client-older"&&((c=(l=window.pinomadDesktop)==null?void 0:l.updates)==null||c.check())},[t.direction]),r)return null;const i=t.hostVersion===void 0?"":` Host version: ${t.hostVersion}.`;return t.direction==="client-older"?a.jsxs(fe,{gap:4,children:[a.jsx(wt,{status:"error",container:"section",title:"Client out of date",description:`The host speaks a newer protocol. ${s?"Update the app.":"Reload the page, or update the app."}${i}`}),s?a.jsx(GC,{update:n}):null]}):a.jsx(wt,{status:"error",container:"section",title:"Host out of date",description:`This client speaks a newer protocol. Upgrade the host (pinomad upgrade).${i}`})}function jse({remote:e,wsUrl:t,rejected:n,device:s,notice:r,hostKey:i}){var X,G,Q,ee;const o=pse(e);qG(i,o.settings);const[l,c]=x.useState(!0),[u,d]=x.useState({kind:"chat"});x.useEffect(()=>c(o.conversation===void 0),[(X=o.conversation)==null?void 0:X.conversation.id]),aP(o,Y=>{var V;Y===((V=o.conversation)==null?void 0:V.conversation.id)?c(!1):e.controller.switchConversation(Y)});const f=l?void 0:o.conversation,p=f!==void 0&&z1(f),g=ua("(max-width: 1023px)"),[b,y]=x.useState(yse),m=Y=>{window.localStorage.setItem(iT,String(Y)),y(Y)},[k,w]=x.useState(!1),[v,j]=x.useState("threads"),C=x.useCallback((Y,V)=>{j(V),w(!0),e.controller.showSide(Y)},[e]),$=x.useCallback(Y=>{e.controller.switchConversation(Y),e.controller.showSide(void 0),g&&w(!1)},[e,g]),T=f===void 0||(G=M1(o.organized,f.conversation.id))==null?void 0:G.summary.id;x.useEffect(()=>{e.controller.showSide(void 0)},[T]);const A=u.kind==="chat"?"New chat":`New conversation in ${Ese(o.organized,u.path)}`,S=f===void 0||(Q=mr(o.organized,f.conversation.id))==null?void 0:Q.summary,_=S==null?void 0:S.parent,M=_===void 0||(ee=mr(o.organized,_))==null?void 0:ee.summary,z=x.useMemo(()=>Y=>e.controller.image(Y),[e]),O=sP(o),I=(S==null?void 0:S.kind)==="conversation",E=x.useCallback(Y=>S===void 0?[]:AS(o.organized,S.id,Y),[o.organized,S]),N=x.useCallback(Y=>{var V;return(V=mr(o.organized,Y))==null?void 0:V.summary},[o.organized]),R=Y=>{d(Y),c(!0)},[L,D]=x.useState(),[P,F]=x.useState(!1);return x.useEffect(()=>{o.connection==="connected"&&sessionStorage.removeItem(sy)},[o.connection]),o.unauthorized===!0&&n!==void 0?a.jsxs(ca,{children:[n,a.jsx(AC,{})]}):a.jsxs(nP,{load:z,retryKey:O,children:[a.jsx(Ine,{view:o,remote:e,device:s,hostKey:i,narrow:g,drafting:l,draftingChat:l&&u.kind==="chat",draftLabel:A,conversation:f,summary:S,parentSummary:M,banner:a.jsxs(a.Fragment,{children:[r,a.jsx($se,{view:o,wsUrl:t})]}),onDraft:R,onOpenChanges:()=>F(!0),overviewOpen:b,onOverviewChange:m,panelOpen:k,panelTab:v,onPanelOpen:w,onPanelTab:j,openInPanel:C,openInMain:$,children:f===void 0?a.jsx(Gne,{view:o,remote:e,draft:u,onDraft:R,onCreated:()=>{g||m(!0)},connected:o.connection==="connected"}):a.jsx(yj,{className:`motion-safe:transition-[padding] motion-safe:duration-200 motion-safe:ease-out${b&&!g?" pigui-overview-clearance":""}`,style:mse,composer:a.jsx("div",{className:"mx-auto w-full max-w-[44rem]",children:a.jsxs(fe,{gap:1,children:[a.jsx(O$,{docs:o.docs,remote:e,connected:o.connection==="connected"}),a.jsx(nse,{view:o,remote:e,conversation:f,busy:p,narrow:g})]})}),emptyState:a.jsx(Wi,{title:"Nothing here yet",description:"Ask the agent something. Every client sees it."}),children:a.jsx(NE,{conversation:f,docs:o.docs,toolPresentations:o.toolPresentations,connected:o.connection==="connected",canFork:I,openInPanel:C,onFork:D,forksAt:E,summaryOf:N,onRetry:(S==null?void 0:S.kind)==="subagent"?void 0:async({text:Y,images:V,skills:oe,attachments:le,requestId:me})=>{Yl(),await e.controller.submit(Y,"followUp",{requestId:me,images:V.map(TS),skills:oe,...le.length===0?{}:{attachments:le.map(se=>se.id)}})}})},f.conversation.id)}),L===void 0?null:a.jsx(Sse,{entryId:L,remote:e,connected:o.connection==="connected",onClose:()=>D(void 0),onForked:()=>{j("threads"),w(!0)}}),P&&f!==void 0&&a.jsx(Cse,{view:o,remote:e,busy:p,onClose:()=>F(!1)})]})}function Sse({entryId:e,remote:t,connected:n,onClose:s,onForked:r}){const[i,o]=x.useState("Continue from here."),l=()=>{Yl(),t.controller.fork(e,i.trim(),void 0,{show:"side"}),r(),s()};return a.jsx(vr,{isOpen:!0,onOpenChange:c=>c?void 0:s(),purpose:"form",width:480,children:a.jsx(Ks,{header:a.jsx(jr,{title:"Fork from this answer",subtitle:"The fork sees the conversation up to here and works in the same files.",onOpenChange:()=>s()}),content:a.jsx(Xs,{children:a.jsx(ns,{label:"First message",value:i,onChange:o})}),footer:a.jsx(fa,{children:a.jsxs($e,{gap:2,hAlign:"end",children:[a.jsx(ne,{label:"Cancel",variant:"secondary",onClick:s}),a.jsx(ne,{label:"Fork",variant:"primary",isDisabled:!n||i.trim()==="",onClick:l})]})})})})}function Cse({view:e,remote:t,busy:n,onClose:s}){const[r,i]=x.useState(),o=x.useMemo(()=>()=>void t.controller.changes().then(i).catch(()=>{}),[t]);x.useEffect(o,[o]);const l=x.useRef(n);x.useEffect(()=>{l.current&&!n&&o(),l.current=n},[n,o]);const c=e.checkout===void 0;return a.jsx(vr,{isOpen:!0,onOpenChange:u=>u?void 0:s(),width:720,children:a.jsx(Ks,{header:a.jsx(jr,{title:"Changes",onOpenChange:()=>s()}),content:a.jsx(Xs,{children:a.jsx(fe,{gap:2,padding:3,children:r===void 0?a.jsx(re,{type:"supporting",children:"Loading…"}):r.available?a.jsxs(a.Fragment,{children:[c?a.jsx(re,{type:"supporting",children:"These are the project directory's uncommitted changes, shared with other conversations working there."}):null,r.truncated?a.jsx(re,{type:"supporting",children:"The diff is truncated; the rest is not shown."}):null,a.jsx(TE,{patch:r.patch})]}):a.jsx(re,{type:"supporting",children:r.reason})})}),footer:a.jsx(fa,{children:a.jsxs($e,{gap:2,hAlign:"end",children:[a.jsx(ne,{label:"Refresh",variant:"secondary",isDisabled:e.connection!=="connected",onClick:o}),a.jsx(ne,{label:"Close",variant:"primary",onClick:s})]})})})})}function $se({view:e,wsUrl:t}){return e.connection==="outdated"?e.protocolMismatch===void 0?null:a.jsx(lT,{wsUrl:t,mismatch:e.protocolMismatch}):e.connection==="reconnecting"?a.jsx(wt,{status:"warning",container:"section",title:"Host connection lost",description:"Reconnecting… the view keeps the last state the host sent."}):e.connection==="closed"?a.jsx(wt,{status:"error",container:"section",title:"Disconnected from the host"}):null}function Ese(e,t){var n;return((n=e.projects.find(s=>s.project.path===t))==null?void 0:n.project.name)??t.split("/").at(-1)??t}Q9.createRoot(document.getElementById("root")).render(a.jsx(x.StrictMode,{children:a.jsx(D6,{theme:BH,children:a.jsx(kse,{})})}));
|