pinomad 0.3.0 → 0.5.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.
@@ -1,383 +0,0 @@
1
- var e$=Object.defineProperty;var Mk=e=>{throw TypeError(e)};var t$=(e,t,n)=>t in e?e$(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ee=(e,t,n)=>t$(e,typeof t!="symbol"?t+"":t,n),Ox=(e,t,n)=>t.has(e)||Mk("Cannot "+n);var G=(e,t,n)=>(Ox(e,t,"read from private field"),n?n.call(e):t.get(e)),ze=(e,t,n)=>t.has(e)?Mk("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),je=(e,t,n,s)=>(Ox(e,t,"write to private field"),s?s.call(e,n):t.set(e,n),n),V=(e,t,n)=>(Ox(e,t,"access private method"),n);var Uu=(e,t,n,s)=>({set _(r){je(e,t,r,n)},get _(){return G(e,t,s)}});function n$(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 a=Object.getOwnPropertyDescriptor(s,r);a&&Object.defineProperty(e,r,a.get?a:{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 a of r)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&s(i)}).observe(document,{childList:!0,subtree:!0});function n(r){const a={};return r.integrity&&(a.integrity=r.integrity),r.referrerPolicy&&(a.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?a.credentials="include":r.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(r){if(r.ep)return;r.ep=!0;const a=n(r);fetch(r.href,a)}})();function s$(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h5={exports:{}},Rh={};/**
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 r$=Symbol.for("react.transitional.element"),a$=Symbol.for("react.fragment");function x5(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:r$,type:e,key:s,ref:t!==void 0?t:null,props:n}}Rh.Fragment=a$;Rh.jsx=x5;Rh.jsxs=x5;h5.exports=Rh;var l=h5.exports,p5={exports:{}},ye={};/**
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 Bm=Symbol.for("react.transitional.element"),i$=Symbol.for("react.portal"),o$=Symbol.for("react.fragment"),l$=Symbol.for("react.strict_mode"),c$=Symbol.for("react.profiler"),u$=Symbol.for("react.consumer"),d$=Symbol.for("react.context"),f$=Symbol.for("react.forward_ref"),h$=Symbol.for("react.suspense"),x$=Symbol.for("react.memo"),g5=Symbol.for("react.lazy"),p$=Symbol.for("react.activity"),g$=Symbol.for("react.view_transition"),Ak=Symbol.iterator;function m$(e){return e===null||typeof e!="object"?null:(e=Ak&&e[Ak]||e["@@iterator"],typeof e=="function"?e:null)}var m5={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y5=Object.assign,k5={};function wl(e,t,n){this.props=e,this.context=t,this.refs=k5,this.updater=n||m5}wl.prototype.isReactComponent={};wl.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")};wl.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function b5(){}b5.prototype=wl.prototype;function qm(e,t,n){this.props=e,this.context=t,this.refs=k5,this.updater=n||m5}var Hm=qm.prototype=new b5;Hm.constructor=qm;y5(Hm,wl.prototype);Hm.isPureReactComponent=!0;var Rk=Array.isArray;function gp(){}var Qe={H:null,A:null,T:null,S:null},v5=Object.prototype.hasOwnProperty;function Pm(e,t,n){var s=n.ref;return{$$typeof:Bm,type:e,key:t,ref:s!==void 0?s:null,props:n}}function y$(e,t){return Pm(e.type,t,e.props)}function Um(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bm}function k$(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var Ik=/\/+/g;function Bx(e,t){return typeof e=="object"&&e!==null&&e.key!=null?k$(""+e.key):t.toString(36)}function b$(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(gp,gp):(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 lo(e,t,n,s,r){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"bigint":case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Bm:case i$:i=!0;break;case g5:return i=e._init,lo(i(e._payload),t,n,s,r)}}if(i)return r=r(e),i=s===""?"."+Bx(e,0):s,Rk(r)?(n="",i!=null&&(n=i.replace(Ik,"$&/")+"/"),lo(r,t,n,"",function(u){return u})):r!=null&&(Um(r)&&(r=y$(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(Ik,"$&/")+"/")+i)),t.push(r)),1;i=0;var o=s===""?".":s+":";if(Rk(e))for(var c=0;c<e.length;c++)s=e[c],a=o+Bx(s,c),i+=lo(s,t,n,a,r);else if(c=m$(e),typeof c=="function")for(e=c.call(e),c=0;!(s=e.next()).done;)s=s.value,a=o+Bx(s,c++),i+=lo(s,t,n,a,r);else if(a==="object"){if(typeof e.then=="function")return lo(b$(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 i}function Fu(e,t,n){if(e==null)return e;var s=[],r=0;return lo(e,s,"","",function(a){return t.call(n,a,r++)}),s}function v$(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 _k=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 w5(e){var t=Qe.T,n={};n.types=t!==null?t.types:null,Qe.T=n;try{var s=e(),r=Qe.S;r!==null&&r(n,s),typeof s=="object"&&s!==null&&typeof s.then=="function"&&s.then(gp,_k)}catch(a){_k(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Qe.T=t}}function j5(e){var t=Qe.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else w5(j5.bind(null,e))}var w$={map:Fu,forEach:function(e,t,n){Fu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Fu(e,function(){t++}),t},toArray:function(e){return Fu(e,function(t){return t})||[]},only:function(e){if(!Um(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ye.Activity=p$;ye.Children=w$;ye.Component=wl;ye.Fragment=o$;ye.Profiler=c$;ye.PureComponent=qm;ye.StrictMode=l$;ye.Suspense=h$;ye.ViewTransition=g$;ye.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Qe;ye.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Qe.H.useMemoCache(e)}};ye.addTransitionType=j5;ye.cache=function(e){return function(){return e.apply(null,arguments)}};ye.cacheSignal=function(){return null};ye.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var s=y5({},e.props),r=e.key;if(t!=null)for(a in t.key!==void 0&&(r=""+t.key),t)!v5.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(s[a]=t[a]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var i=Array(a),o=0;o<a;o++)i[o]=arguments[o+2];s.children=i}return Pm(e.type,r,s)};ye.createContext=function(e){return e={$$typeof:d$,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:u$,_context:e},e};ye.createElement=function(e,t,n){var s,r={},a=null;if(t!=null)for(s in t.key!==void 0&&(a=""+t.key),t)v5.call(t,s)&&s!=="key"&&s!=="__self"&&s!=="__source"&&(r[s]=t[s]);var i=arguments.length-2;if(i===1)r.children=n;else if(1<i){for(var o=Array(i),c=0;c<i;c++)o[c]=arguments[c+2];r.children=o}if(e&&e.defaultProps)for(s in i=e.defaultProps,i)r[s]===void 0&&(r[s]=i[s]);return Pm(e,a,r)};ye.createRef=function(){return{current:null}};ye.forwardRef=function(e){return{$$typeof:f$,render:e}};ye.isValidElement=Um;ye.lazy=function(e){return{$$typeof:g5,_payload:{_status:-1,_result:e},_init:v$}};ye.memo=function(e,t){return{$$typeof:x$,type:e,compare:t===void 0?null:t}};ye.startTransition=w5;ye.unstable_useCacheRefresh=function(){return Qe.H.useCacheRefresh()};ye.use=function(e){return Qe.H.use(e)};ye.useActionState=function(e,t,n){return Qe.H.useActionState(e,t,n)};ye.useCallback=function(e,t){return Qe.H.useCallback(e,t)};ye.useContext=function(e){return Qe.H.useContext(e)};ye.useDebugValue=function(){};ye.useDeferredValue=function(e,t){return Qe.H.useDeferredValue(e,t)};ye.useEffect=function(e,t){return Qe.H.useEffect(e,t)};ye.useEffectEvent=function(e){return Qe.H.useEffectEvent(e)};ye.useId=function(){return Qe.H.useId()};ye.useImperativeHandle=function(e,t,n){return Qe.H.useImperativeHandle(e,t,n)};ye.useInsertionEffect=function(e,t){return Qe.H.useInsertionEffect(e,t)};ye.useLayoutEffect=function(e,t){return Qe.H.useLayoutEffect(e,t)};ye.useMemo=function(e,t){return Qe.H.useMemo(e,t)};ye.useOptimistic=function(e,t){return Qe.H.useOptimistic(e,t)};ye.useReducer=function(e,t,n){return Qe.H.useReducer(e,t,n)};ye.useRef=function(e){return Qe.H.useRef(e)};ye.useState=function(e){return Qe.H.useState(e)};ye.useSyncExternalStore=function(e,t,n){return Qe.H.useSyncExternalStore(e,t,n)};ye.useTransition=function(){return Qe.H.useTransition()};ye.version="19.3.0";p5.exports=ye;var x=p5.exports;const Ih=s$(x),S5=n$({__proto__:null,default:Ih},[x]);var Gl={},Dk;function j$(){if(Dk)return Gl;Dk=1,Object.defineProperty(Gl,"__esModule",{value:!0}),Gl.styleq=void 0;var e=new WeakMap,t="$$css";function n(r){var a,i,o;return r!=null&&(a=r.disableCache===!0,i=r.disableMix===!0,o=r.transform),function(){for(var u=[],d="",f=null,h="",p=a?null:e,m=new Array(arguments.length),b=0;b<arguments.length;b++)m[b]=arguments[b];for(;m.length>0;){var y=m.pop();if(!(y==null||y===!1)){if(Array.isArray(y)){for(var g=0;g<y.length;g++)m.push(y[g]);continue}var k=o!=null?o(y):y;if(k.$$css!=null){var v="";if(p!=null&&p.has(k)){var w=p.get(k);w!=null&&(v=w[0],h=w[2],u.push.apply(u,w[1]),p=w[3])}else{var j=[];for(var C in k){var $=k[C];if(C===t){var E=k[C];E!==!0&&(h=h?E+"; "+h:E);continue}typeof $=="string"||$===null?u.includes(C)||(u.push(C),p!=null&&j.push(C),typeof $=="string"&&(v+=v?" "+$:$)):console.error("styleq: ".concat(C," typeof ").concat(String($),' is not "string" or "null".'))}if(p!=null){var T=new WeakMap;p.set(k,[v,j,h,T]),p=T}}v&&(d=d?v+" "+d:v)}else if(i)f==null&&(f={}),f=Object.assign({},k,f);else{var S=null;for(var M in k){var z=k[M];z!==void 0&&(u.includes(M)||(z!=null&&(f==null&&(f={}),S==null&&(S={}),S[M]=z),u.push(M),p=null))}S!=null&&(f=Object.assign(S,f))}}}var A=[d,f,h];return A}}var s=Gl.styleq=n();return s.factory=n,Gl}var S$=j$();function B(...e){const[t,n,s]=S$.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 C$={"--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)"},$$={"--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"},ts={"--spacing-1":"var(--spacing-1)","--spacing-2":"var(--spacing-2)"},E$={"--size-element-sm":"28px","--size-element-md":"32px","--size-element-lg":"36px"},T$={"--radius-none":"0px","--radius-inner":"4px","--radius-element":"8px","--radius-container":"12px","--radius-page":"28px","--radius-chat":"28px","--radius-full":"9999px"},z$={"--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)"},N$={"--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"},M$={"--ease-standard":"cubic-bezier(0.24, 1, 0.4, 1)"},A$={"--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'},R$={"--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"},I$={"--font-weight-normal":"400","--font-weight-medium":"500","--font-weight-semibold":"600","--font-weight-bold":"700"},_$={"--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"},Fm=x.createContext(null);Fm.displayName="LayoutAreaContext";const D$={hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1},_h=x.createContext(D$);_h.displayName="LayoutSlotsContext";const Dh=x.createContext(null);Dh.displayName="LayoutDividerContext";const L$={center:{kGNEyG:"x6s0dn4",$$css:!0},end:{kGNEyG:"xuk3077",$$css:!0},start:{kGNEyG:"x1cy8zhl",$$css:!0},stretch:{kGNEyG:"x1qjc9v5",$$css:!0}},O$={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}},B$={horizontal:{kXwgrk:"x1q0g3np",$$css:!0},vertical:{kXwgrk:"xdt5ytf",$$css:!0}},q$={nowrap:{kwnvtZ:"xozqiw3",$$css:!0},wrap:{kwnvtZ:"x1a02dak",$$css:!0},"wrap-reverse":{kwnvtZ:"x8hhl5t",$$css:!0}},H$={stack:{k1xSpc:"x78zum5",$$css:!0}},P$={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 mp({crossAlign:e,direction:t,gap:n,mainAlign:s,wrap:r}){return[H$.stack,B$[t],n!=null&&P$[n],e!=null&&L$[e],s!=null&&O$[s],r!=null&&q$[r]]}const U$={reset:{kAzted:"x2lwn1j",k7Eaqz:"xeuugli",$$css:!0}},F$={center:{kSGwAc:"xamitd3",$$css:!0},end:{kSGwAc:"xpvyfi4",$$css:!0},start:{kSGwAc:"xqcrz7y",$$css:!0},stretch:{kSGwAc:"xkh2ocl",$$css:!0}},G$={fill:{kzQI83:"x1iyjqo2",$$css:!0},static:{kzQI83:"x1c4vz4f",kmuXW:"x2lah0s",$$css:!0}};function V$({crossAlignSelf:e,size:t}={}){return[U$.reset,G$[t??"static"],e!=null&&F$[e]]}function Gm(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 W$(e,t){return e!=null?`id:${e}`:`fallback:${typeof t=="function"?t():t}`}function Gu(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 U(e,t,n,s){if(typeof e=="string"){const o=e,c=t??{className:""},u=n;let d=c.className?`${o} ${c.className}`:o;u&&(d=`${d} ${u}`);const f=s&&c.style?{...c.style,...s}:s||c.style;return{...c,className:d,style:f}}let i=Gu(e,typeof t=="string"?{className:t}:t??{});return typeof n=="string"?i=Gu(i,{className:n}):n!=null&&(i=Gu(i,{style:n})),s!=null&&(i=Gu(i,{style:s})),i}function ct(...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 Lh(...e){return t=>{for(const n of e)if(n==null||n(t),t.defaultPrevented)return}}const Vm="astryx",C5=Vm,Oh=Vm,K$=Vm;function yp(e){return`${C5}-${e}`}function jn(e){return`data-${Oh}-${e}`}function X$(e){return`--${K$}-${e}`}function Z$(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}function Y$(e,t){return/^\d/.test(t)?`${e}-${t}`:t}function Q$(e,t){const n=[yp(e)];if(t)for(const[s,r]of Object.entries(t))r!=null&&n.push(Y$(s,String(r)));return n.join(" ")}function J$(e){const t={};if(e)for(const[n,s]of Object.entries(e))s!=null&&(t[Z$(n)]=String(s));return t}function P(e,t){return{className:Q$(e,t),...J$(t)}}function Lk(e){const t=e.auxiliaryData;return typeof(t==null?void 0:t.group)=="string"?t.group:void 0}function eE(e){var i;if(!e.some(o=>Lk(o)!=null))return[{heading:null,items:e}];const n=[],s=new Map,r=[];for(const o of e){const c=Lk(o);c!=null?(s.has(c)||(n.push(c),s.set(c,[])),(i=s.get(c))==null||i.push(o)):r.push(o)}const a=n.map(o=>({heading:o,items:s.get(o)??[]}));return r.length>0&&a.push({heading:null,items:r}),a}let Za=null;const Ef=new Map;function tE(){return Za||(Za=new ResizeObserver(e=>{for(const t of e){const n=Ef.get(t.target);n&&n(t)}})),Za}function Wm(e,t){Ef.set(e,t),tE().observe(e),t({target:e})}function Km(e){Ef.delete(e),Za&&(Za.unobserve(e),Ef.size===0&&(Za.disconnect(),Za=null))}function qx(e){return e!=null&&typeof e!="boolean"&&e!==""}function Ok(...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 $5(e,t=[],n){return{ariaLabelledBy:n?Ok(n.labelID,e):void 0,ariaDescribedBy:Ok(n==null?void 0:n.describedByIDs,...t)}}const nE={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}},Tf=(e,t,n)=>Math.max(t,Math.min(n,e));function sE(e){return e.split("").map(t=>t+t).join("")}function rE(e){if(typeof e!="string")return null;const t=e.trim().replace(/^#/,""),n=t.length===3||t.length===4?sE(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 aE(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 Tf(d,0,255)},a=r(s[0]),i=r(s[1]),o=r(s[2]);if([a,i,o].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=Tf(c,0,1)}return{r:a,g:i,b:o,a:c}}function Bk(e){const t=e.trim(),n=nE[t.toLowerCase()];return n?{...n}:t.startsWith("#")?rE(t):/^rgba?\(/i.test(t)?aE(t):null}function iE(e,t,n){const s=r=>Tf(Math.round(r),0,255).toString(16).padStart(2,"0").toUpperCase();return`#${s(e)}${s(t)}${s(n)}`}function oE({r:e,g:t,b:n,a:s}){if(s>=1)return iE(e,t,n);const r=a=>Tf(Math.round(a),0,255);return`rgba(${r(e)}, ${r(t)}, ${r(n)}, ${parseFloat(s.toFixed(4))})`}function lE(e,t){return`${e}: ${t}`}function oi(e,t,...n){}function E5(e,t,...n){console.error(lE(e,t),...n)}function Xm(e,t,n,...s){}const cE={kbCHJM:"x1nrll8i",k3aq6I:"xsqj5wx",$$css:!0},rl={mirror:{k3aq6I:"xgtlewx",$$css:!0},centerInline:e=>[cE,{"--x-transform":`translate(-50%, ${e})`!=null?`translate(-50%, ${e})`:void 0}]},T5={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"},jl={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}},Sl={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}},Cl={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}},$l={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}},uE={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}},dE={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}},fE={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}},hE={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}},Or={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}},xE={kzqmXN:"xh8yej3",kUOVxO:"xvueqy4",$$css:!0},qk={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=>[xE,{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 Vl({area:e,children:t}){return t==null?null:l.jsx(Fm,{value:e,children:t})}const pE={"x-default-marker":"x-default-marker",$$css:!0};function gs({children:e,content:t,contentWidth:n,defaultHasDividers:s,end:r,footer:a,header:i,height:o="fill",padding:c,ref:u,start:d,xstyle:f,className:h,style:p}){const m=o==="fill",b=t??e,y=x.useMemo(()=>s!=null?{defaultHasDividers:s}:null,[s]),g=i!=null,k=a!=null,v=d!=null,w=r!=null,j=x.useMemo(()=>({hasHeader:g,hasFooter:k,hasStart:v,hasEnd:w}),[g,k,v,w]),C=l.jsx(_h,{value:j,children:l.jsx("div",{ref:u,...U(P("layout",{height:o}),B(Or.layoutOuter,m?Or.fill:Or.auto,f),h,p),children:l.jsxs("div",{...B(pE,Or.layoutInner,...mp({direction:"vertical"}),m?Or.fill:Or.auto,c===0&&Or.fullBleed,c!=null&&uE[c],c!=null&&dE[c],n!=null&&qk.contentWidthVar(n)),children:[l.jsx(Vl,{area:"header",children:i}),l.jsxs("div",{...B(...mp({direction:"horizontal"}),Or.middle,n!=null&&qk.contentWidth(n)),children:[l.jsx(Vl,{area:"start",children:d}),l.jsx("div",{...B(...V$({size:"fill"})),children:l.jsx(Vl,{area:"content",children:b})}),l.jsx(Vl,{area:"end",children:r})]}),l.jsx(Vl,{area:"footer",children:a})]})})});return y!=null?l.jsx(Dh,{value:y,children:C}):C}gs.displayName="Layout";const Vu={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}},gE={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function zf({children:e,hasDivider:t,height:n,label:s,padding:r,role:a,xstyle:i,className:o,style:c,ref:u,...d}){const f=x.use(Dh),h=t??(f==null?void 0:f.defaultHasDividers)??!1,p=r===0;return l.jsx("div",{ref:u,role:a,"aria-label":s,"data-divider":h||void 0,...U(P("layout-header"),B(Vu.header,gE.sizing(n??null),h&&Vu.divider,i),o,c),...d,children:l.jsx("div",{...B(Vu.inner,p&&Vu.fullBleed,r!=null&&jl[r],r!=null&&Sl[r],r!=null&&Cl[r],r!=null&&$l[r]),children:e})})}zf.displayName="LayoutHeader";const ks={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}},mE={sizing:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Zm({children:e,hasDivider:t=!1,isScrollable:n=!0,label:s,padding:r,role:a,width:i,resizable:o,xstyle:c,className:u,style:d,ref:f,...h}){const p=x.use(Fm),{hasHeader:m,hasFooter:b}=x.use(_h),y=o?o._size:i,g=p==="start",k=p==="end",v=r===0,w=!t&&!v&&r==null,j=g?ks.dividerEnd:k?ks.dividerStart:null,C=g?ks.collapseEnd:k?ks.collapseStart:null;return l.jsx("div",{ref:f,role:a,"aria-label":s,...U(P("layout-panel"),B(ks.panel,mE.sizing(y??null),g&&!v&&r==null&&ks.startPanel,k&&!v&&r==null&&ks.endPanel,!m&&!v&&r==null&&ks.noHeader,!b&&!v&&r==null&&ks.noFooter,n&&ks.scrollable,v&&ks.fullBleed,r!=null&&jl[r],r!=null&&Sl[r],r!=null&&Cl[r],r!=null&&$l[r],t&&j,w&&C,c),u,d),...h,children:e})}Zm.displayName="LayoutPanel";const Aa={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 ms({children:e,isScrollable:t=!0,padding:n,label:s,role:r,xstyle:a,className:i,style:o,ref:c,...u}){const{hasHeader:d,hasFooter:f,hasStart:h,hasEnd:p}=x.use(_h),m=n===0;return l.jsx("div",{ref:c,role:r,"aria-label":s,...U(P("layout-content"),B(Aa.content,!h&&!m&&n==null&&Aa.noStart,!p&&!m&&n==null&&Aa.noEnd,!d&&!m&&n==null&&Aa.noHeader,!f&&!m&&n==null&&Aa.noFooter,t&&Aa.scrollable,m&&Aa.fullBleed,n!=null&&jl[n],n!=null&&Sl[n],n!=null&&Cl[n],n!=null&&$l[n],a),i,o),...u,children:e})}ms.displayName="LayoutContent";function z5(e){return(e.style.anchorName??"").split(",").map(n=>n.trim()).filter(Boolean)}function N5(e,t){e.style.anchorName=t.join(", ")}function yE(e,t){const n=z5(e);n.includes(t)||(n.push(t),N5(e,n))}function kE(e,t){N5(e,z5(e).filter(n=>n!==t))}const Hx={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 bE(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 vE(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[a,i]=e==="above"?["top","bottom"]:["bottom","top"];return`${n}, ${a} span-left, ${a} span-right, ${i} span-left, ${i} 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 El(e){const{mode:t,onShow:n,onHide:s,lightDismiss:r=!1}=e,a=x.useId(),i=`--astryx-layer-${a.replace(/:/g,"")}`,[o,c]=x.useState(!1),u=x.useRef(null),d=x.useRef(null),f=x.useRef(!1),h=x.useCallback(()=>{const C=u.current;C&&!f.current&&(typeof C.showPopover=="function"?C.showPopover():C.style.display="block",f.current=!0,c(!0),n==null||n())},[n]),p=x.useCallback(()=>{if(f.current){const C=u.current;C&&(typeof C.hidePopover=="function"?C.hidePopover():C.style.display="none"),f.current=!1,c(!1),s==null||s()}},[s]),m=t==="context"?C=>{d.current&&d.current!==C&&kE(d.current,i),C&&yE(C,i),d.current=C}:void 0,b=x.useCallback(C=>{C.newState==="closed"&&f.current&&(f.current=!1,c(!1),s==null||s())},[s]),y=x.useRef(null),g=x.useRef(null),k=x.useCallback((C,$)=>{y.current&&g.current&&(y.current!==C||g.current!==$)&&(y.current.removeEventListener("toggle",g.current),y.current=null,g.current=null),C&&y.current!==C&&(C.addEventListener("toggle",$),y.current=C,g.current=$)},[]),v=x.useCallback(C=>{u.current=C,k(C,b)},[b,k]);x.useEffect(()=>(u.current&&k(u.current,b),()=>{y.current&&g.current&&(y.current.removeEventListener("toggle",g.current),y.current=null,g.current=null)}),[b,k]);const w=x.useCallback((C,$)=>{const{placement:E="above",alignment:T="center",positioning:S="anchor",role:M,"aria-label":z,xstyle:A,className:R,style:I,as:N="div",onMouseEnter:_,onMouseLeave:L}=$||{},D=S==="custom"?{positionAnchor:i}:{positionAnchor:i,positionArea:bE(E,T),positionTryFallbacks:vE(E,T)},O=B(Hx.base,A),q=R?`${R} ${O.className??""}`:O.className;return l.jsx(N,{ref:v,id:a,role:M,"aria-label":z,popover:r?"auto":"manual",className:q,style:{...O.style,...D,...I},onMouseEnter:_,onMouseLeave:L,children:C})},[i,a,r,v]),j=x.useCallback((C,$)=>{const{x:E,y:T,xstyle:S,className:M,style:z}=$,A={top:T,left:E},R=B(Hx.base,Hx.fixed,S),I=M?`${M} ${R.className??""}`:R.className;return l.jsx("div",{ref:v,id:a,popover:r?"auto":"manual",className:I,style:{...R.style,...A,...z},children:C})},[v,a,r]);return t==="context"?{ref:m,anchorId:i,show:h,hide:p,isOpen:o,id:a,render:w}:{ref:void 0,show:h,hide:p,isOpen:o,id:a,render:j}}const Js={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}},wE=100,Px={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 jE(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function Is(e={}){const{placement:t="above",alignment:n="center",delay:s=200,hideDelay:r=0,focusTrigger:a="auto",isEnabled:i=!0,isOpen:o,isDefaultOpen:c=!1,onShow:u,onHide:d}=e,f=t==="above"||t==="below"?Px.marginBlock:Px.marginInline,h=El({mode:"context",onShow:u,onHide:d}),p=x.useMemo(()=>[Px.container,f],[f]),m=x.useRef(null),b=x.useRef(null),y=x.useRef(null),g=x.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),k=x.useCallback(()=>{!i||o===!1||(g(),m.current=setTimeout(()=>{h.show()},s))},[i,o,g,h,s]),v=x.useCallback(()=>{if(o===!0)return;g();const A=r>0?r:wE;b.current=setTimeout(()=>{h.hide()},A)},[o,g,h,r]),w=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(()=>{v()},[v]),$=x.useCallback(A=>{!i||!A.target.matches(":focus-visible")||(g(),h.show())},[i,g,h]),E=x.useCallback(()=>{v()},[v]),T=x.useCallback(()=>{o===void 0&&(g(),h.hide())},[o,g,h]),S=x.useCallback(A=>{y.current&&(y.current.removeEventListener("mouseenter",j),y.current.removeEventListener("mouseleave",C),y.current.removeEventListener("focusin",$),y.current.removeEventListener("focusout",E),y.current.removeEventListener("pointerdown",T)),A&&(A.addEventListener("mouseenter",j),A.addEventListener("mouseleave",C),A.addEventListener("pointerdown",T),(a==="always"||a==="auto"&&jE(A))&&(A.addEventListener("focusin",$),A.addEventListener("focusout",E))),y.current=A},[a,j,C,$,E,T]),M=x.useCallback(A=>{h.ref(A),S(A)},[h,S]);x.useEffect(()=>()=>{g()},[g]),x.useEffect(()=>{c&&h.show()},[]),x.useEffect(()=>{o!==void 0&&(o?(g(),h.show()):(g(),h.hide()))},[o,g,h]),x.useEffect(()=>{if(o!==void 0)return;const A=R=>{R.key==="Escape"&&(R.isComposing||R.keyCode===229||(g(),h.hide()))};return document.addEventListener("keydown",A),()=>{document.removeEventListener("keydown",A)}},[o,h,g]);const z=x.useCallback((A,R)=>{const I=(R==null?void 0:R.placement)??t,N={placement:I,alignment:(R==null?void 0:R.alignment)??n,role:"tooltip",xstyle:[p,Js[I]],className:P("tooltip").className,onMouseEnter:w,onMouseLeave:v};return h.render(l.jsx("div",{className:"xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe",children:A}),N)},[h,t,n,p,w,v]);return{ref:M,positionRef:h.ref,interactionRef:S,anchorId:h.anchorId,describedBy:h.id,renderTooltip:z}}const Ym={"--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)"},SE={"--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)"},CE={...Ym,...SE},M5=new Map;function $E(e){M5.set(e.name,e)}function A5(e){return e==null||e===""?null:M5.get(e)??null}const EE={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 Hk(e,t){const n=EE[e];return n?n.filter(s=>s.property===t):[]}function R5(e){return`[data-${Oh}-theme="${e}"]`}const I5=`[data-${Oh}-theme]`;function Pk(e){return`[data-${Oh}-media="${e}"]`}function zo(e,t){return`.${C5}-${e}${t}`}function _5(e,t){const n=[];let s=0,r=0;for(let a=0;a<e.length;a++){const i=e[a];i==="("?s++:i===")"?s=Math.max(0,s-1):i===","&&s===0&&(n.push(e.slice(r,a).trim()),r=a+1)}return n.push(e.slice(r).trim()),n.map(a=>`${a}${t}`).join(", ")}function Nf(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const Wu=new Set(["padding","paddingBlock","paddingInline","paddingBlockStart","paddingBlockEnd","paddingInlineStart","paddingInlineEnd"]);function TE(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 zE(e,t){const n=X$(`${e}-padding`),s=[],r=t.inlineStart??t.inline,a=t.inlineEnd??t.inline;return r!=null&&a!=null&&r===a&&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]),a!=null&&s.push([`${n}-inline-end`,a])):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 NE(e){const t=[],n=e.tokens,s=a=>n[a]||`var(${a})`,r=Object.entries(n);if(r.length>0){const a=r.map(([i,o])=>` ${i}: ${o};`).join(`
18
- `);t.push(` :scope {
19
- ${a}
20
- }`)}return e.components&&ME(e.components,t),AE(s,t),RE(e.components||{},t),_E(e.components||{},t),t}function ME(e,t){for(const[n,s]of Object.entries(e))for(const[r,a]of Object.entries(s)){const i=Object.entries(a);if(i.length===0)continue;const o=Gm(r),c=zo(n,o),u=[],d=[];for(const[m,b]of i)m.startsWith(":")&&typeof b=="object"?d.push([m,b]):u.push([m,b]);let f=u;const h=[];let p=!1;for(const[m,b]of u){const y=Hk(n,m),g=Wu.has(m)&&m!=="padding"?Hk(n,"padding"):[];for(const k of[...y,...g])if(k.expand==="container"&&Wu.has(m)&&(p=!0),k.vars)for(const v of k.vars)h.push([v,b])}if(p){const m=u.filter(([k])=>Wu.has(k)),b=u.filter(([k])=>!Wu.has(k)),y=TE(m),g=zE(n,y);f=[...b,...g]}if(h.length>0&&(f=[...f,...h]),f.length>0){const m=f.map(([b,y])=>` ${Nf(b)}: ${y};`).join(`
21
- `);t.push(` ${c} {
22
- ${m}
23
- }`)}for(const[m,b]of d){const y=Object.entries(b);if(y.length>0){const g=y.map(([k,v])=>` ${Nf(k)}: ${v};`).join(`
24
- `);t.push(` ${_5(c,m)} {
25
- ${g}
26
- }`)}}}}function AE(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 RE(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,a="link"in e;if(s||r||a)for(const[i,o]of Object.entries(n))s&&t.push(` ${zo("text",`.${i}`)} { color: ${o}; }`),r&&t.push(` ${zo("heading",`.${i}`)} { color: ${o}; }`),a&&t.push(` ${zo("link",`.${i}`)} { color: ${o}; }`)}const IE={"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 _E(e,t){if("text"in e)for(const[n,s]of Object.entries(IE)){const r=Gm(`size:${n}`);t.push(` ${zo("text",r)} { font-size: ${s}; }`)}}function DE(e){const t=NE(e),n=[],s=[];for(const r of t)r.trimStart().startsWith(":where(")?n.push(r):s.push(r);return{component:s,prose:n}}function LE(e){const t=[],n=R5(e.name);for(const r of["dark","light"]){const a=r==="dark"?e.__onDark:e.__onLight;if(!a)continue;const i=Object.entries(a.tokens);if(i.length>0){const o=i.map(([c,u])=>` ${c}: ${u};`).join(`
52
- `);t.push(` ${Pk(r)} {
53
- ${o}
54
- }`)}if(a.components)for(const[o,c]of Object.entries(a.components))for(const[u,d]of Object.entries(c)){const f=Object.entries(d);if(f.length===0)continue;const h=Gm(u),p=`:is(${Pk(r)}) :is(${zo(o,h)})`,m=[],b=[];for(const[y,g]of f)y.startsWith(":")&&typeof g=="object"?b.push([y,g]):m.push([y,g]);if(m.length>0){const y=m.map(([g,k])=>` ${Nf(g)}: ${k};`).join(`
55
- `);t.push(` ${p} {
56
- ${y}
57
- }`)}for(const[y,g]of b){const k=Object.entries(g);if(k.length>0){const v=k.map(([w,j])=>` ${Nf(w)}: ${j};`).join(`
58
- `);t.push(` ${_5(p,y)} {
59
- ${v}
60
- }`)}}}}if(t.length===0)return"";const s=t.join(`
61
-
62
- `);return`@scope (${n}) to (${I5}) {
63
- ${s}
64
- }`}function OE(e){const{component:t,prose:n}=DE(e),s=R5(e.name),r=I5;let a="";if(n.length>0){const c=n.join(`
65
-
66
- `);a=`@scope (${s}) to (${r}) {
67
- ${c}
68
- }`}let i="";if(t.length>0){const c=t.join(`
69
-
70
- `);i=`@scope (${s}) to (${r}) {
71
- ${c}
72
- }`}const o=LE(e);return o&&(i=i?`${i}
73
-
74
- ${o}`:o),{prose:a,component:i}}const D5={...C$,...$$,...E$,...T$,...z$,...N$,...M$,...A$,...R$,...I$,..._$,...CE};function BE(e){return`var(${e})`}Object.fromEntries(Object.keys(D5).map(e=>[e,BE(e)]));function Qm(e){let t=0,n=null,s=!1;for(let r=0;r<e.length;r++){const a=e[r];if(n!==null){s?s=!1:a==="\\"?s=!0:a===n&&(n=null);continue}if(a==='"'||a==="'"){n=a;continue}if(a==="("){t++;continue}if(a===")"){t=Math.max(0,t-1);continue}if(a===","&&t===0)return[e.slice(0,r).trim(),e.slice(r+1).trim()]}return null}function qE(e){const t=e.trim(),n="light-dark(";if(!t.startsWith(n)||!t.endsWith(")"))return null;const s=t.slice(n.length,-1);return Qm(s)}function Ux(e,t){if(Array.isArray(e))return t==="dark"?e[1]:e[0];const n=qE(e);return n!==null?t==="dark"?n[1]:n[0]:e}function L5(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 Uk(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 HE(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=Qm(s);if(r===null)return null;const a=Uk(r[0]),i=Uk(r[1]);if(a===null||i===null)return null;const o=Bk(a.color),c=Bk(i.color);if(o===null||c===null)return null;let u,d;a.percentage!==null&&i.percentage!==null?(u=a.percentage,d=i.percentage):a.percentage!==null?(u=a.percentage,d=100-u):i.percentage!==null?(d=i.percentage,u=100-d):(u=50,d=50);const f=u+d;if(f<=0)return null;const h=u/f,p=d/f,m=f<100?f/100:1,b=h*o.a+p*c.a,y=(j,C)=>h*j*o.a+p*C*c.a,g=y(o.r,c.r),k=y(o.g,c.g),v=y(o.b,c.b),w=b===0?{r:0,g:0,b:0}:{r:g/b,g:k/b,b:v/b};return oE({...w,a:b*m})}function kp(e){const t=e.indexOf("color-mix(");if(t===-1)return e;const n=t+9,s=L5(e,n);if(s===-1)return e;const r=kp(e.slice(n+1,s)),i=HE(r)??`color-mix(${r})`;return e.slice(0,t)+i+kp(e.slice(s+1))}function bp(e,t,n,s){const r=e.indexOf("var(");if(r===-1)return e;const a=r+3,i=L5(e,a);if(i===-1)return e;const o=e.slice(a+1,i),c=Qm(o),u=(c?c[0]:o).trim(),d=c?c[1]:null;let f;s.has(u)?f=e.slice(r,i+1):u in t?(s.add(u),f=O5(u,t,n,s),s.delete(u)):d!==null?f=bp(d.trim(),t,n,s):f=e.slice(r,i+1);const h=bp(e.slice(i+1),t,n,s);return e.slice(0,r)+f+h}function PE(e,t,n,s){if(!e.includes("var(")&&!e.includes("color-mix("))return e;const r=bp(e,t,n,s);return kp(r)}function O5(e,t,n,s){if(e in n)return n[e];const r=t[e];if(r===void 0)return"";const a=PE(r,t,n,s);return n[e]=a,a}function Fk(e){const t={};for(const n of Object.keys(e))O5(n,e,t,new Set);return t}function UE(e,t){const{mode:n}=t,s={};for(const[r,a]of Object.entries(D5))s[r]=Ux(a,n);if(e==null)return Fk(s);for(const[r,a]of Object.entries(e.tokens))s[r]=Ux(a,n);if(e.__inputTokens)for(const[r,a]of Object.entries(e.__inputTokens))a!==void 0&&(s[r]=Ux(a,n));return Fk(s)}function Ni(e,t=!1){const n=x.useCallback(a=>{const i=window.matchMedia(e);return i.addEventListener("change",a),()=>i.removeEventListener("change",a)},[e]),s=x.useCallback(()=>window.matchMedia(e).matches,[e]),r=x.useCallback(()=>t,[t]);return x.useSyncExternalStore(n,s,r)}const Bh=x.createContext(null);Bh.displayName="ThemeContext";function FE(){if(typeof document>"u")return null;const e=document.documentElement.getAttribute("data-theme");return e==="light"||e==="dark"?e:null}function GE(){return null}function VE(){return typeof document>"u"?null:document.documentElement.getAttribute(jn("theme"))}function WE(){return null}function B5(){return null}const oc=new Set;let Wl=null;const lc=new Set;let Kl=null;function KE(){for(const e of oc)e()}function XE(e){return oc.add(e),oc.size===1&&typeof MutationObserver<"u"&&(Wl=new MutationObserver(KE),Wl.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})),()=>{oc.delete(e),oc.size===0&&Wl&&(Wl.disconnect(),Wl=null)}}function ZE(){for(const e of lc)e()}function YE(e){return lc.add(e),lc.size===1&&typeof MutationObserver<"u"&&(Kl=new MutationObserver(ZE),Kl.observe(document.documentElement,{attributes:!0,attributeFilter:[jn("theme")]})),()=>{lc.delete(e),lc.size===0&&Kl&&(Kl.disconnect(),Kl=null)}}function q5(){return()=>{}}function QE(e){return x.useSyncExternalStore(e?q5:XE,e?B5:FE,GE)}function H5(e){return x.useSyncExternalStore(e?q5:YE,e?B5:VE,WE)}function P5(){const e=x.use(Bh),t=e!=null,n=H5(t);return(e==null?void 0:e.theme.name)??n}function qh(){const e=x.use(Bh),t=e!=null,n=QE(t),s=H5(t),r=Ni("(prefers-color-scheme: dark)"),a=(e==null?void 0:e.mode)??n??"system",i=(e==null?void 0:e.theme)??A5(s),o=a==="system"?r?"dark":"light":a,c=x.useMemo(()=>UE(i,{mode:o}),[i,o]),u=d=>c[d]??"";return{name:(i==null?void 0:i.name)??"default",mode:o,token:u,tokens:c}}const JE="modulepreload",eT=function(e){return"/"+e},Gk={},U5=function(t,n,s){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const i=document.querySelector("meta[property=csp-nonce]"),o=(i==null?void 0:i.nonce)||(i==null?void 0:i.getAttribute("nonce"));r=Promise.allSettled(n.map(c=>{if(c=eT(c),c in Gk)return;Gk[c]=!0;const u=c.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${c}"]${d}`))return;const f=document.createElement("link");if(f.rel=u?"stylesheet":JE,u||(f.as="script"),f.crossOrigin="",f.href=c,o&&f.setAttribute("nonce",o),document.head.appendChild(f),u)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${c}`)))})}))}function a(i){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i}return r.then(i=>{for(const o of i||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},Jm={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}},tT={normal:{k63SB2:"x1sodnla",$$css:!0},medium:{k63SB2:"x1e4wzip",$$css:!0},semibold:{k63SB2:"x2mo6ok",$$css:!0},bold:{k63SB2:"x1lvx875",$$css:!0}},F5={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}},e0={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}},nT={"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}},sT={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}},G5={inline:{k1xSpc:"xt0psk2",$$css:!0},block:{k1xSpc:"x1lliihq",$$css:!0}},Mf={singleLine:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",k1xSpc:"x1lliihq",$$css:!0},multiLine:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},V5={"break-word":{kTgw9:"x1lldw8n",kHjlTd:"x1mzt3pk",$$css:!0},"break-all":{kTgw9:"x1yn0g08",$$css:!0}},W5={wrap:{kN2L0X:"xk4td0m",$$css:!0},nowrap:{kN2L0X:"xebhuq6",$$css:!0},balance:{kN2L0X:"x1w2vvpw",$$css:!0},pretty:{kN2L0X:"x1fzhlzt",$$css:!0}},K5={enabled:{kxwWH2:"x1b2iylo",kzeHkT:"xwgcxoh",k1xSpc:"x1lliihq",$$css:!0}},X5={strikethrough:{kybGjl:"xmqliwb",$$css:!0}},rT={enabled:{kcqcaj:"xss6m8b",$$css:!0}},Z5={start:{k9WMMc:"x1yc453h",$$css:!0},center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},Y5={content:{ks0D6T:"xw5ewwj",kTgw9:"x13faqbe",$$css:!0}};function Q5(e){const{maxLines:t}=e,[n,s]=x.useState(!1),[r,a]=x.useState(""),i=x.useRef(null),o=x.useCallback(u=>{if(t===0){s(!1);return}if(a(u.textContent??""),t===1)s(u.scrollWidth>u.offsetWidth);else{let d=u.scrollHeight;try{const f=document.createRange();f.selectNodeContents(u),d=f.getBoundingClientRect().height,f.detach()}catch{}s(d>u.offsetHeight)}},[t]);return{ref:x.useCallback(u=>{i.current&&Km(i.current),i.current=u,u&&t>0?typeof ResizeObserver<"u"?Wm(u,()=>{o(u)}):o(u):(s(!1),a(""))},[t,o]),isTruncated:n,fullText:r}}const aT=x.lazy(async()=>U5(()=>Promise.resolve().then(()=>N3),void 0).then(e=>({default:e.Tooltip}))),iT={body:"primary",large:"primary",label:"primary",supporting:"secondary",code:"primary","display-1":"primary","display-2":"primary","display-3":"primary",inherit:"inherit"};function oT(e){return e in e0?e:"body"}function J5(e){return e in Jm?e:"primary"}function se({type:e="body",size:t,color:n,weight:s,display:r="inline",maxLines:a=0,hasTruncateTooltip:i=!0,wordBreak:o,textWrap:c,justify:u="start",hasCapsize:d=!1,hasStrikethrough:f=!1,hasTabularNumbers:h=!1,xstyle:p,className:m,style:b,as:y="span",children:g,ref:k,...v}){const w=n??iT[e]??"primary",j=oT(e),C=J5(w),$=o??(a===1?"break-all":"break-word"),E=a>0||d?"block":r,T=Q5({maxLines:a}),S=typeof i=="string"?i:"above",M=a>0&&i!==!1&&T.isTruncated,z=x.useRef(null),A=a>1?{WebkitLineClamp:a}:void 0;return l.jsxs(l.Fragment,{children:[l.jsx(y,{ref:ct(k,T.ref,z),...U(P("text",{type:e,size:t,color:w}),B(Jm[C],e0[j],t&&nT[t],F5[j],s&&tT[s],a===1?Mf.singleLine:a>1?Mf.multiLine:G5[E],a>0&&V5[$],c&&W5[c],u!=="start"&&Z5[u],d&&K5.enabled,f&&X5.strikethrough,h&&rT.enabled,p),m,{...b,...A}),title:M?T.fullText:void 0,...v,children:g}),M&&l.jsx(x.Suspense,{fallback:null,children:l.jsx(aT,{anchorRef:z,content:l.jsx("span",{...B(Y5.content),children:T.fullText}),placement:S})})]})}se.displayName="Text";const lT=.75,Vk=1.5,Wk={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},Kk={wrapper:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},spinner:{k1xSpc:"xwz0xwf",kgQiWS:"x1ku5rj1",kVQacm:"xb3r6kr",kXLuUW:"xxymvpz",$$css:!0}};function En({size:e="md",shade:t="default",label:n,xstyle:s,className:r,style:a,"aria-label":i,"data-testid":o,ref:c,...u}){const d=x.useRef(null),{tokens:f}=qh();x.useEffect(()=>{const w=d.current;if(w==null)return;const j=w.getContext("2d");if(!j)return;const{border:C,diameter:$}=Wk[e],E=window.devicePixelRatio||1,T=t==="inherit"?getComputedStyle(w).color:null,S=t==="inherit"?T:t==="onMedia"?f["--color-on-dark"]:t==="subtle"?f["--color-text-secondary"]:f["--color-accent"],M=t==="inherit"?T:t==="onMedia"?`${f["--color-on-dark"]}4D`:f["--color-track"],z=$+C*2,A=Math.round(z*E),R=A+A%2,I=R/z,N=$/2*I,_=C*I;w.height=w.width=R,w.style.width=w.style.height=z+"px",j.lineCap="round",j.lineWidth=_;const L=R/2;j.beginPath(),j.arc(L,L,N,0,2*Math.PI),j.strokeStyle=M,t==="inherit"&&(j.globalAlpha=.3),j.stroke(),j.globalAlpha=1,j.beginPath(),j.arc(L,L,N,Vk*Math.PI,(Vk+lT)%2*Math.PI),j.strokeStyle=S,j.stroke()},[t,e,f]);const{border:h,diameter:p}=Wk[e],m=p+h*2,b=n!=null,y=x.useId(),g=b&&typeof n=="string"&&i==null,k=i??(typeof n=="string"?n:void 0)??"Loading",v=l.jsx("span",{ref:b?void 0:c,role:"status","aria-label":g?void 0:k,"aria-labelledby":g?y:void 0,"data-testid":b?void 0:o,...b?{}:u,...U(b?"":P("spinner",{size:e,shade:t}),B(Kk.spinner,!b&&s),b?void 0:r,{...b?{}:a,width:m,height:m}),children:l.jsx("canvas",{ref:d,className:"xlp1x4z x1lliihq x1so62im x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782"})});return b?l.jsxs("div",{ref:c,"data-testid":o,...u,...U(P("spinner",{size:e,shade:t}),B(Kk.wrapper,s),r,a),children:[v,typeof n=="string"?l.jsx(se,{id:y,type:"body",weight:"bold",children:n}):n]}):v}En.displayName="Spinner";function Mi({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)}Mi.displayName="VisuallyHidden";const Af="data-astryx-edge-comp",cT={keTefX:"x1kftj4p",k71WvV:"x92e2el",$$css:!0},uT={inset:e=>[cT,{"--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})`)}]},t0=x.createContext(null);t0.displayName="SizeContext";function Ai(e,t="md"){const n=x.use(t0);return e??n??t}t0.Provider;const e3=x.createContext(null);e3.displayName="ButtonGroupContext";function dT(){return x.use(e3)}const t3=x.createContext(null);t3.displayName="LinkContext";function fT(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 $a(e){const t=x.use(t3),n=e??(t==null?void 0:t.component)??"a";return x.useMemo(()=>n==="a"?"a":fT(n),[n])}const n3=x.createContext({locale:"en",direction:"ltr",messages:{}});n3.displayName="InternationalizationContext";function Fx(e,t){const n=t&&t.cache?t.cache:kT,s=t&&t.serializer?t.serializer:mT;return(t&&t.strategy?t.strategy:pT)(e,{cache:n,serializer:s})}function hT(e){return e==null||typeof e=="number"||typeof e=="boolean"}function xT(e,t,n,s){const r=hT(s)?s:n(s);let a=t.get(r);return typeof a>"u"&&(a=e.call(this,s),t.set(r,a)),a}function s3(e,t,n){const s=Array.prototype.slice.call(arguments,3),r=n(s);let a=t.get(r);return typeof a>"u"&&(a=e.apply(this,s),t.set(r,a)),a}function r3(e,t,n,s,r){return n.bind(t,e,s,r)}function pT(e,t){const n=e.length===1?xT:s3;return r3(e,this,n,t.cache.create(),t.serializer)}function gT(e,t){return r3(e,this,s3,t.cache.create(),t.serializer)}const mT=function(){return JSON.stringify(arguments)};var yT=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}};const kT={create:function(){return new yT}},Gx={variadic:gT},bT=/(?:[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 vT(e){const t={};return e.replace(bT,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 wT=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function jT(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");const t=e.split(wT).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[a,...i]=r;for(const o of i)if(o.length===0)throw new Error("Invalid number skeleton");n.push({stem:a,options:i})}return n}function ST(e){return e.replace(/^(.*?)-/,"")}const Xk=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,a3=/^(@+)?(\+|#+)?[rs]?$/g,CT=/(\*)(0+)|(#+)(0+)|(0+)/g,i3=/^(0+)$/;function Zk(e){const t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(a3,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 o3(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 $T(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)),!i3.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function Yk(e){const t={},n=o3(e);return n||t}function ET(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=ST(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((a,i)=>({...a,...Yk(i)}),{})};continue;case"engineering":t={...t,notation:"engineering",...n.options.reduce((a,i)=>({...a,...Yk(i)}),{})};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(CT,function(a,i,o,c,u,d){if(i)t.minimumIntegerDigits=o.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(i3.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(Xk.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(Xk,function(i,o,c,u,d,f){return c==="*"?t.minimumFractionDigits=o.length:u&&u[0]==="#"?t.maximumFractionDigits=u.length:d&&f?(t.minimumFractionDigits=d.length,t.maximumFractionDigits=d.length+f.length):(t.minimumFractionDigits=o.length,t.maximumFractionDigits=o.length),""});const a=n.options[0];a==="w"?t={...t,trailingZeroDisplay:"stripIfInteger"}:a&&(t={...t,...Zk(a)});continue}if(a3.test(n.stem)){t={...t,...Zk(n.stem)};continue}const s=o3(n.stem);s&&(t={...t,...s});const r=$T(n.stem);r&&(t={...t,...r})}return t}let TT=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 Qk(e){return e.type===0}function zT(e){return e.type===1}function l3(e){return e.type===2}function c3(e){return e.type===3}function u3(e){return e.type===4}function d3(e){return e.type===5}function f3(e){return e.type===6}function NT(e){return e.type===7}function h3(e){return e.type===8}function x3(e){return!!(e&&typeof e=="object"&&e.type===0)}function vp(e){return!!(e&&typeof e=="object"&&e.type===1)}const p3=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,Xl={"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 MT(e,t){let n="";for(let s=0;s<e.length;s++){const r=e.charAt(s);if(r==="j"){let a=0;for(;s+1<e.length&&e.charAt(s+1)===r;)a++,s++;let i=1+(a&1),o=a<2?1:3+(a>>1),c="a",u=AT(t);for((u=="H"||u=="k")&&(o=0);o-- >0;)n+=c;for(;i-- >0;)n=u+n}else r==="J"?n+="H":n+=r}return n}function AT(e){var r,a;let t=e.hourCycle;if(t===void 0){const i=e;t=((r=i.getHourCycles)==null?void 0:r.call(i)[0])??((a=i.hourCycles)==null?void 0:a[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),(Xl[`${n}-${s}`]||Xl[s||""]||Xl[n||""]||Xl[`${n}-001`]||Xl["001"])[0].charAt(0)}const RT=new RegExp(`^${p3.source}*`),IT=new RegExp(`${p3.source}*$`);function Me(e,t){return{start:e,end:t}}const _T=!!Object.fromEntries,DT=!!String.prototype.trimStart,LT=!!String.prototype.trimEnd,Jk=_T?Object.fromEntries:function(t){const n={};for(const[s,r]of t)n[s]=r;return n},OT=DT?function(t){return t.trimStart()}:function(t){return t.replace(RT,"")},BT=LT?function(t){return t.trimEnd()}:function(t){return t.replace(IT,"")},eb=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");function qT(e,t){return eb.lastIndex=t,eb.exec(e)[1]??""}function HT(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 a=e.charCodeAt(s+1);s+=a>=56320&&a<=57343?2:1}else s++}return{offset:e.length,line:t,column:n}}var PT=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=HT(this.message);if(t){const n=this.clonePosition();return this.position=t,{val:[{type:0,value:this.message,location:Me(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 a=this.parseArgument(e,n);if(a.err)return a;s.push(a.val)}else{if(r===125&&e>0)break;if(r===35&&(t==="plural"||t==="selectordinal")){const a=this.clonePosition();this.bump(),s.push({type:7,location:Me(a,this.clonePosition())})}else if(r===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,Me(this.clonePosition(),this.clonePosition()))}else if(r===60&&!this.ignoreTag&&wp(this.peek()||0)){const a=this.parseTag(e,t);if(a.err)return a;s.push(a.val)}else{const a=this.parseLiteral(e,t);if(a.err)return a;s.push(a.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:Me(n,this.clonePosition())},err:null};if(this.bumpIf(">")){const r=this.parseMessage(e+1,t,!0);if(r.err)return r;const a=r.val,i=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!wp(this.char()))return this.error(23,Me(i,this.clonePosition()));const o=this.clonePosition();return s!==this.parseTagName()?this.error(26,Me(o,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:8,value:s,children:a,location:Me(n,this.clonePosition())},err:null}:this.error(23,Me(i,this.clonePosition())))}else return this.error(27,Me(n,this.clonePosition()))}else return this.error(23,Me(n,this.clonePosition()))}parseTagName(){const e=this.offset();for(this.bump();!this.isEOF()&&FT(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){const n=this.clonePosition();let s="";for(;;){const a=this.tryParseQuote(t);if(a){s+=a;continue}const i=this.tryParseUnquoted(e,t);if(i){s+=i;continue}const o=this.tryParseLeftAngleBracket();if(o){s+=o;continue}break}const r=Me(n,this.clonePosition());return{val:{type:0,value:s,location:r},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!UT(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,Me(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,Me(n,this.clonePosition()));let s=this.parseIdentifierIfPossible().value;if(!s)return this.error(3,Me(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,Me(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:s,location:Me(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,Me(n,this.clonePosition())):this.parseArgumentOptions(e,t,s,n);default:return this.error(3,Me(n,this.clonePosition()))}}parseIdentifierIfPossible(){const e=this.clonePosition(),t=this.offset(),n=qT(this.message,t),s=t+n.length;return this.bumpTo(s),{value:n,location:Me(e,this.clonePosition())}}parseArgumentOptions(e,t,n,s){let r=this.clonePosition(),a=this.parseIdentifierIfPossible().value,i=this.clonePosition();switch(a){case"":return this.error(4,Me(r,i));case"number":case"date":case"time":{this.bumpSpace();let o=null;if(this.bumpIf(",")){this.bumpSpace();const d=this.clonePosition(),f=this.parseSimpleArgStyleIfPossible();if(f.err)return f;const h=BT(f.val);if(h.length===0)return this.error(6,Me(this.clonePosition(),this.clonePosition()));o={style:h,styleLocation:Me(d,this.clonePosition())}}const c=this.tryParseArgumentClose(s);if(c.err)return c;const u=Me(s,this.clonePosition());if(o&&o.style.startsWith("::")){let d=OT(o.style.slice(2));if(a==="number"){const f=this.parseNumberSkeletonFromString(d,o.styleLocation);return f.err?f:{val:{type:2,value:n,location:u,style:f.val},err:null}}else{if(d.length===0)return this.error(10,u);let f=d;this.locale&&(f=MT(d,this.locale));const h={type:1,pattern:f,location:o.styleLocation,parsedOptions:this.shouldParseSkeletons?vT(f):{}};return{val:{type:a==="date"?3:4,value:n,location:u,style:h},err:null}}}return{val:{type:a==="number"?2:a==="date"?3:4,value:n,location:u,style:(o==null?void 0:o.style)??null},err:null}}case"plural":case"selectordinal":case"select":{const o=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(12,Me(o,{...o}));this.bumpSpace();let c=this.parseIdentifierIfPossible(),u=0;if(a!=="select"&&c.value==="offset"){if(!this.bumpIf(":"))return this.error(13,Me(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,a,t,c);if(d.err)return d;const f=this.tryParseArgumentClose(s);if(f.err)return f;const h=Me(s,this.clonePosition());return a==="select"?{val:{type:5,value:n,options:Jk(d.val),location:h},err:null}:{val:{type:6,value:n,options:Jk(d.val),offset:u,pluralType:a==="plural"?"cardinal":"ordinal",location:h},err:null}}default:return this.error(5,Me(r,i))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,Me(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,Me(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=jT(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?ET(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,s){let r=!1;const a=[],i=new Set;let{value:o,location:c}=s;for(;;){if(o.length===0){const h=this.clonePosition();if(t!=="select"&&this.bumpIf("=")){const p=this.tryParseDecimalInteger(16,19);if(p.err)return p;c=Me(h,this.clonePosition()),o=this.message.slice(h.offset,this.offset())}else break}if(i.has(o))return this.error(t==="select"?21:20,c);o==="other"&&(r=!0),this.bumpSpace();const u=this.clonePosition();if(!this.bumpIf("{"))return this.error(t==="select"?17:18,Me(this.clonePosition(),this.clonePosition()));const d=this.parseMessage(e+1,t,n);if(d.err)return d;const f=this.tryParseArgumentClose(u);if(f.err)return f;a.push([o,{value:d.val,location:Me(u,this.clonePosition())}]),i.add(o),this.bumpSpace(),{value:o,location:c}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t==="select"?15:16,Me(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!r?this.error(22,Me(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1;const s=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);let r=!1,a=0;for(;!this.isEOF();){const o=this.char();if(o>=48&&o<=57)r=!0,a=a*10+(o-48),this.bump();else break}const i=Me(s,this.clonePosition());return r?(a*=n,Number.isSafeInteger(a)?{val:a,err:null}:this.error(t,i)):this.error(e,i)}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()&&GT(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 wp(e){return e>=97&&e<=122||e>=65&&e<=90}function UT(e){return wp(e)||e===47}function FT(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 GT(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function jp(e){e.forEach(t=>{if(delete t.location,d3(t)||f3(t))for(const n in t.options)delete t.options[n].location,jp(t.options[n].value);else l3(t)&&x3(t.style)||(c3(t)||u3(t))&&vp(t.style)?delete t.style.location:h3(t)&&jp(t.children)})}function VT(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};const n=new PT(e,t).parse();if(n.err){const s=SyntaxError(TT[n.err.kind]);throw s.location=n.err.location,s.originalMessage=n.err.message,s}return t!=null&&t.captureLocation||jp(n.val),n.val}var Hh=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},tb=class extends Hh{constructor(e,t,n,s){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join('", "')}"`,"INVALID_VALUE",s)}},WT=class extends Hh{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,"INVALID_VALUE",n)}},KT=class extends Hh{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,"MISSING_VALUE",t)}};function XT(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 ZT(e){return typeof e=="function"}function Gd(e,t,n,s,r,a,i){if(e.length===1&&Qk(e[0]))return[{type:0,value:e[0].value}];const o=[];for(const c of e){if(Qk(c)){o.push({type:0,value:c.value});continue}if(NT(c)){typeof a=="number"&&o.push({type:0,value:n.getNumberFormat(t).format(a)});continue}const{value:u}=c;if(!(r&&u in r))throw new KT(u,i);let d=r[u];if(zT(c)){(!d||typeof d=="string"||typeof d=="number"||typeof d=="bigint")&&(d=typeof d=="string"||typeof d=="number"||typeof d=="bigint"?String(d):""),o.push({type:typeof d=="string"?0:1,value:d});continue}if(c3(c)){const f=typeof c.style=="string"?s.date[c.style]:vp(c.style)?c.style.parsedOptions:void 0;o.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(u3(c)){const f=typeof c.style=="string"?s.time[c.style]:vp(c.style)?c.style.parsedOptions:s.time.medium;o.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(l3(c)){const f=typeof c.style=="string"?s.number[c.style]:x3(c.style)?c.style.parsedOptions:void 0;if(f&&f.scale){const h=f.scale||1;if(typeof d=="bigint"){if(!Number.isInteger(h))throw new TypeError(`Cannot apply fractional scale ${h} to bigint value. Scale must be an integer when formatting bigint.`);d=d*BigInt(h)}else d=d*h}o.push({type:0,value:n.getNumberFormat(t,f).format(d)});continue}if(h3(c)){const{children:f,value:h}=c,p=r[h];if(!ZT(p))throw new WT(h,"function",i);let m=p(Gd(f,t,n,s,r,a).map(b=>b.value));Array.isArray(m)||(m=[m]),o.push(...m.map(b=>({type:typeof b=="string"?0:1,value:b})))}if(d3(c)){const f=d,h=(Object.prototype.hasOwnProperty.call(c.options,f)?c.options[f]:void 0)||c.options.other;if(!h)throw new tb(c.value,d,Object.keys(c.options),i);o.push(...Gd(h.value,t,n,s,r));continue}if(f3(c)){const f=`=${d}`;let h=Object.prototype.hasOwnProperty.call(c.options,f)?c.options[f]:void 0;if(!h){if(!Intl.PluralRules)throw new Hh(`Intl.PluralRules is not available in this environment.
75
- Try polyfilling it using "@formatjs/intl-pluralrules"
76
- `,"MISSING_INTL_API",i);const m=typeof d=="bigint"?Number(d):d,b=n.getPluralRules(t,{type:c.pluralType}).select(m-(c.offset||0));h=(Object.prototype.hasOwnProperty.call(c.options,b)?c.options[b]:void 0)||c.options.other}if(!h)throw new tb(c.value,d,Object.keys(c.options),i);const p=typeof d=="bigint"?Number(d):d;o.push(...Gd(h.value,t,n,s,r,p-(c.offset||0)));continue}}return XT(o)}function YT(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,s)=>(n[s]={...e[s],...t[s]},n),{})}:e}function QT(e,t){return t?Object.keys(e).reduce((n,s)=>(n[s]=YT(e[s],t[s]),n),{...e}):e}function Vx(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function JT(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:Fx((...t)=>new Intl.NumberFormat(...t),{cache:Vx(e.number),strategy:Gx.variadic}),getDateTimeFormat:Fx((...t)=>new Intl.DateTimeFormat(...t),{cache:Vx(e.dateTime),strategy:Gx.variadic}),getPluralRules:Fx((...t)=>new Intl.PluralRules(...t),{cache:Vx(e.pluralRules),strategy:Gx.variadic})}}var Ft,ez=(Ft=class{constructor(t,n=Ft.defaultLocale,s,r){if(this.formatterCache={number:{},dateTime:{},pluralRules:{}},this.format=a=>{const i=this.formatToParts(a);if(i.length===1)return i[0].value;const o=i.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 o.length<=1?o[0]||"":o},this.formatToParts=a=>Gd(this.ast,this.locales,this.formatters,this.formats,a,void 0,this.message),this.resolvedOptions=()=>{var a;return{locale:((a=this.resolvedLocale)==null?void 0:a.toString())||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]}},this.getAst=()=>this.ast,this.locales=n,this.resolvedLocale=Ft.resolveLocale(n),typeof t=="string"){if(this.message=t,!Ft.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...a}=r||{};this.ast=Ft.__parse(t,{...a,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=QT(Ft.formats,s),this.formatters=r&&r.formatters||JT(this.formatterCache)}static get defaultLocale(){return Ft.memoizedDefaultLocale||(Ft.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),Ft.memoizedDefaultLocale}},Ft.memoizedDefaultLocale=null,Ft.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])},Ft.__parse=VT,Ft.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"}}},Ft),tz=ez;const nz={"@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.'}},sz=nz,nb=new Map;function rz(e,t){const n=`${t}::${e}`;let s=nb.get(n);return s===void 0&&(s=new tz(e,t),nb.set(n,s)),s}function az(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 iz(e,t,n,s){var i,o;const r=az(t);if(s!==void 0)for(const c of r){const u=(i=s[c])==null?void 0:i[e];if(u!==void 0)return u}for(const c of r){const u=(o=n[c])==null?void 0:o[e];if(u!==void 0)return u.defaultMessage}const a=sz[e];return a!==void 0?a.defaultMessage:null}function oz(e,t,n,s,r){const a=iz(e,n,s,r);return a===null?(Xm(),e):t===void 0?a:rz(a,n).format(t)}function ke(){const e=x.use(n3);return x.useCallback((t,n)=>oz(t,n,e.locale,e.messages,e.overrides),[e.locale,e.messages,e.overrides])}const Br={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}},lz={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},cz={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},uz={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}},dz={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}},fz={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}},sb={hiddenContent:{kMwMTN:"x19co3pv",$$css:!0},hiddenContentDelayed:{kKVMdj:"x1ffowhz",k44tkh:"xjlvqhv",kWV6AL:"x10e4vud",kKxzle:"x17yabm6 x14q22ui",$$css:!0}},Ku={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 de({label:e,variant:t="secondary",size:n,type:s="button",isDisabled:r=!1,isLoading:a=!1,isInterruptible:i=!1,clickAction:o,icon:c,isIconOnly:u=!1,width:d,elevation:f="none",children:h,endContent:p,tooltip:m,href:b,as:y,target:g,rel:k,xstyle:v,className:w,style:j,ref:C,...$}){const E=ke(),T=Ai(n,"md"),S=dT(),[M,z]=x.useTransition(),A=x.useRef(!1),R=a||M,I=M||i,N=(S==null?void 0:S.isDisabled)??!1,_=r||N||R&&!i,L=$a(y),D=b!=null&&!_,O=m!=null&&_,q=Is({placement:"above",isEnabled:m!=null}),F=le=>{var Y;if(_||A.current&&!i){le.preventDefault();return}(Y=$.onClick)==null||Y.call($,le),o&&!le.defaultPrevented&&(A.current=!0,z(async()=>{try{await o(le)}finally{A.current=!1}}))},X=O?le=>{var Y;le.key==="Enter"||le.key===" "?le.preventDefault():(Y=$.onKeyDown)==null||Y.call($,le)}:void 0,Z=t==="ghost"?{[Af]:""}:null,te=B(Br.base,cz[T],fz[t],u&&Br.iconOnly,_&&Br.disabled,O&&Br.ariaDisabled,D&&Br.link,!S&&Br.pressable,S&&(S.orientation==="horizontal"?Ku.horizontal:Ku.vertical),S&&(t==="primary"||t==="destructive")&&(S.orientation==="horizontal"?Ku.onSolidHorizontal:Ku.onSolidVertical),!S&&dz[f],d!=null&&lz.width(d),v),Q=U(P("button",{variant:t,size:T}),te,w,j),K=l.jsxs(l.Fragment,{children:[R&&l.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:l.jsx(En,{size:"sm",shade:"inherit"})}),l.jsxs("span",{...B(Br.contentWrapper,R&&(I?sb.hiddenContentDelayed:sb.hiddenContent)),"aria-hidden":R||void 0,children:[c&&l.jsx("span",{...B(Br.iconWrapper,uz[T]),children:c}),u?null:l.jsx("span",{className:"xb3r6kr xlyipyv xeuugli",children:h??e}),!u&&p&&l.jsx("span",{className:"x3nfvp2 x6s0dn4 x1heor9g",children:p})]}),l.jsx(Mi,{role:"status","aria-live":"polite",children:R?E("@astryx.button.loading"):""})]}),oe=u&&e!==""||R&&!u||h!=null&&h!==e?{"aria-label":e}:null,be=m!=null?{"aria-describedby":[$["aria-describedby"],q.describedBy].filter(Boolean).join(" ")||void 0}:null,pe=ct(C,m!=null?q.ref:void 0);let he;return D?he=l.jsx(L,{ref:pe,href:b,target:g,rel:k,...Q,...$,...oe,...be,...Z,"aria-busy":R||void 0,onClick:F,children:K}):he=l.jsx("button",{ref:pe,type:s,disabled:O?void 0:_,...Q,...$,...oe,...be,...Z,"aria-busy":R||void 0,"aria-disabled":O||void 0,onClick:F,...X?{onKeyDown:X}:null,children:K}),m?l.jsxs(l.Fragment,{children:[he,q.renderTooltip(m)]}):he}de.displayName="Button";const dt={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},Xi={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-hidden":!0},hz={close:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M6 6l12 12M6 18L18 6"})}),chevronDown:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M6 9l6 6 6-6"})}),chevronLeft:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M15 6l-6 6 6 6"})}),chevronRight:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M9 6l6 6-6 6"})}),chevronsLeft:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M18 6l-6 6 6 6M11 6l-6 6 6 6"})}),chevronsRight:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M6 6l6 6-6 6M13 6l6 6-6 6"})}),check:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M5 13l4 4L19 7"})}),success:l.jsx("svg",{...Xi,children:l.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:l.jsx("svg",{...Xi,children:l.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:l.jsx("svg",{...Xi,children:l.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:l.jsx("svg",{...Xi,children:l.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:l.jsxs("svg",{...dt,children:[l.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),l.jsx("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),clock:l.jsxs("svg",{...dt,children:[l.jsx("circle",{cx:"12",cy:"12",r:"9"}),l.jsx("path",{d:"M12 7v5l3 3"})]}),externalLink:l.jsxs("svg",{...dt,children:[l.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),l.jsx("path",{d:"M15 3h6v6"}),l.jsx("path",{d:"M10 14L21 3"})]}),menu:l.jsx("svg",{...dt,strokeWidth:2,children:l.jsx("path",{d:"M4 6h16M4 12h16M4 18h16"})}),moreHorizontal:l.jsxs("svg",{...Xi,children:[l.jsx("circle",{cx:"5",cy:"12",r:"1.5"}),l.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),l.jsx("circle",{cx:"19",cy:"12",r:"1.5"})]}),search:l.jsxs("svg",{...dt,children:[l.jsx("circle",{cx:"11",cy:"11",r:"8"}),l.jsx("path",{d:"M21 21l-4.35-4.35"})]}),arrowUp:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M12 19V5m0 0l-7 7m7-7l7 7"})}),arrowDown:l.jsx("svg",{...dt,children:l.jsx("path",{d:"M12 5v14m0 0l7-7m-7 7l-7-7"})}),arrowsUpDown:l.jsx("svg",{...dt,children:l.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:l.jsx("svg",{...dt,children:l.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:l.jsx("svg",{...dt,children:l.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:l.jsx("svg",{...dt,children:l.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:l.jsxs("svg",{...dt,children:[l.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"}),l.jsx("path",{d:"M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2"})]}),checkDouble:l.jsxs("svg",{...dt,children:[l.jsx("path",{d:"M2 13l4 4L14 7"}),l.jsx("path",{d:"M9 13l4 4L21 7"})]}),wrench:l.jsx("svg",{...dt,children:l.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:l.jsx("svg",{...Xi,children:l.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),microphone:l.jsxs("svg",{...dt,children:[l.jsx("path",{d:"M12 2a3 3 0 00-3 3v6a3 3 0 006 0V5a3 3 0 00-3-3z"}),l.jsx("path",{d:"M19 10v1a7 7 0 01-14 0v-1"}),l.jsx("path",{d:"M12 18v4m-4 0h8"})]})};let xz={};function pz(e){var t;return e==null?null:typeof e=="string"?((t=A5(e))==null?void 0:t.icons)??null:e.icons??null}function g3(e,t){const n=pz(t);return(n==null?void 0:n[e])??xz[e]??hz[e]}const m3={root:{kmuXW:"x2lah0s",$$css:!0},span:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},y3={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}},gz={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}},mz={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 yz(e){return e!=null&&e!==""?{role:"img","aria-label":e}:{"aria-hidden":"true"}}function Ce({icon:e,color:t="inherit",size:n="md",label:s,ref:r,className:a,style:i,xstyle:o,...c}){const u=yz(s);if(typeof e=="string")return l.jsx(kz,{name:e,color:t,size:n,a11yProps:u,className:a,style:i,xstyle:o,spanProps:c});const d=e;return l.jsx(d,{ref:r,...u,...U(P("icon",{size:n,color:t}),B(m3.root,y3[t],gz[n],o),a??void 0,i),...c})}Ce.displayName="Icon";function kz({name:e,color:t,size:n,a11yProps:s,className:r,style:a,xstyle:i,spanProps:o}){const c=P5(),u=g3(e,c);if(u==null)return null;const d=o??{};return l.jsx("span",{...s,...d,...U(P("icon",{size:n,color:t}),B(m3.span,y3[t],mz[n],i),r??void 0,a),children:u})}function _s(e,t){return typeof e=="string"?l.jsx(Ce,{icon:e,...t}):typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e?l.jsx(Ce,{icon:e,...t}):e}function gi(e){const t=P5();return g3(e,t)}const bz={isMobile:!1,isMobileNavOpen:!1,toggleMobileNav:()=>{},openMobileNav:()=>{},closeMobileNav:()=>{},isMobileNavEnabled:!1,hasAutoToggle:!0},n0=x.createContext(bz);n0.displayName="AppShellMobileContext";function Ph(){return x.use(n0)}function k3({ref:e,children:t,label:n,"data-testid":s,xstyle:r,className:a,style:i}){const o=ke(),c=n??o("@astryx.mobileNav.toggle.open"),{isMobile:u,isMobileNavEnabled:d,isMobileNavOpen:f,mobileNavId:h,toggleMobileNav:p}=Ph();return!u||!d?null:l.jsx(de,{ref:e,variant:"ghost",label:c,icon:t??l.jsx(Ce,{icon:"menu",color:"inherit"}),onClick:p,"aria-expanded":f,"aria-controls":h||void 0,"data-testid":s??"mobile-nav-toggle",xstyle:r,className:a,style:i,isIconOnly:!0})}k3.displayName="MobileNavToggle";const xo=x.createContext("default");xo.displayName="SideNavRenderContext";function b3(){return x.use(xo)}const Sp=x.createContext("default");Sp.displayName="TopNavRenderContext";const Cp=x.createContext(null);Cp.displayName="TopNavMobileContentContext";const vz=typeof Ih.Activity<"u",wz=vz?({mode:e,children:t})=>l.jsx(Ih.Activity,{mode:e,children:t}):({children:e})=>l.jsx(l.Fragment,{children:e}),jz={sm:640,md:768,lg:1024,none:0},Wx="astryx-app-shell-main",zt={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 v3({variant:e="elevated",banner:t,children:n,contentPadding:s,"data-testid":r,height:a="fill",mobileNav:i,sideNav:o,topNav:c,xstyle:u,className:d,style:f,ref:h,...p}){const m=ke(),b=i===!1,y=i!=null&&i!==!1&&typeof i=="object"&&!x.isValidElement(i)?i:null,g=(y==null?void 0:y.breakpoint)??"md",k=i!=null&&i!==!1&&(x.isValidElement(i)||typeof i=="string")?i:null,v=(y==null?void 0:y.content)??null,w=(y==null?void 0:y.hasToggle)!==!1,j=(y==null?void 0:y.isOpen)!==void 0,C=g==="none"?"(max-width: 0px)":`(max-width: ${jz[g]}px)`,$=Ni(C,y==null?void 0:y.defaultIsMobile),[E,T]=x.useState(!1),S=(y==null?void 0:y.isOpen)??E,M=x.useCallback(Nn=>{var Mn;j||T(Nn),(Mn=y==null?void 0:y.onOpenChange)==null||Mn.call(y,Nn)},[j,y]),z=x.useCallback(()=>{var Nn;(Nn=document.getElementById(Wx))==null||Nn.focus()},[]),A=a==="fill",R=a==="auto",I=qx(t),N=qx(c),_=qx(o),D=!b&&(N||_)&&k==null,O=e==="section",q=e==="elevated",F=e==="wash"||e==="elevated"?zt.navAreaWash:e==="surface"?zt.navAreaSurface:void 0,X=e==="wash"?zt.contentBgWash:e==="elevated"&&N&&_&&!$?zt.contentBgTransparent:e==="surface"||e==="elevated"?zt.contentBgSurface:void 0,J=F??zt.navAreaSurface,Z=x.useRef(null),te=x.useRef(null);x.useEffect(()=>{if(!R||!Z.current||!te.current)return;const Nn=Z.current,Mn=te.current,Pl=()=>{const Wi=Nn.getBoundingClientRect().height;Mn.style.setProperty("--appshell-header-height",`${Wi}px`)};return Wm(Nn,()=>Pl()),()=>Km(Nn)},[R]);const Q=_&&!$,K=k!=null,re=D&&v!=null&&$,oe=x.useId(),be=x.useMemo(()=>({isMobile:$,isMobileNavOpen:S,mobileNavId:oe,toggleMobileNav:()=>D&&M(!S),openMobileNav:()=>D&&M(!0),closeMobileNav:()=>M(!1),isMobileNavEnabled:D,hasAutoToggle:w}),[$,S,oe,M,D,w]),pe=_&&w?l.jsx(xo,{value:"drawer-content",children:o}):null,he=_?l.jsx(xo,{value:"drawer-content",children:o}):null,le=N?$&&!b&&k==null?l.jsx(Cp,{value:pe,children:l.jsx(Sp,{value:"mobile-bar",children:c})}):c:null,Y=N||I?l.jsxs(zf,{padding:0,hasDivider:O&&N,children:[I&&l.jsx("div",{...B(zt.banner,F),children:t}),N&&le]}):void 0,me=Y!=null?l.jsx("div",{ref:Z,role:"banner",...U(P("app-shell-header",{variant:e}),B(F,R&&zt.headerSticky)),children:Y}):void 0,ce=Q?l.jsx(Zm,{padding:0,hasDivider:O,isScrollable:A,...P("app-shell-sidenav",{variant:e}),xstyle:[F,R&&J,R&&zt.panelAutoFill],children:o}):void 0,xe=ce!=null&&R?l.jsx("div",{className:"x2lah0s x7giv3 x7wzq59 xepuwc7 x16zugyo x78zum5 xdt5ytf",children:ce}):ce,Le=q&&N&&Q,ne=l.jsx(ms,{padding:s??0,role:"main",id:Wx,tabIndex:-1,isScrollable:A,xstyle:[X,zt.mainFocusTarget],children:n}),Jt=Le?l.jsxs("div",{className:"x1n2onr6 x78zum5 x98rzlu x2lwn1j x5yr21d",children:[l.jsx("div",{className:"x10l6tqk x10a8y8t x10xzikg x183tx6i x47corl"}),ne]}):ne,ys=!b&&w&&$&&!N&&_?l.jsx("div",{...U(P("app-shell-header",{variant:e}),B(F,R&&zt.headerSticky)),children:l.jsx(zf,{padding:0,hasDivider:O,children:l.jsxs("div",{className:"x78zum5 x6s0dn4 x1k15mir xf314gf",role:"navigation","aria-label":m("@astryx.appShell.mobileNavigation"),children:[l.jsx(xo,{value:"topbar",children:o}),l.jsx(k3,{})]})})}):void 0;return l.jsx(n0,{value:be,children:l.jsxs("div",{...p,ref:ct(h,te),"data-testid":r,...U(P("app-shell",{variant:e}),B(zt.root,e==="wash"?zt.variantWash:e==="surface"?zt.variantSurface:e==="section"?zt.variantSection:zt.variantElevated,A?zt.rootFill:zt.rootAuto,u),d,f),children:[l.jsx("a",{href:`#${Wx}`,onClick:z,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:m("@astryx.appShell.skipToContent")}),l.jsx(gs,{height:a,padding:0,header:l.jsxs(l.Fragment,{children:[me,ys]}),start:xe,content:Jt}),K&&k,re&&v,$&&!b&&k==null&&!v&&l.jsxs(wz,{mode:S?"visible":"hidden",children:[_&&!N&&l.jsx(xo,{value:"drawer",children:o}),N&&l.jsx(Cp,{value:he,children:l.jsx(Sp,{value:"drawer",children:c})})]})]})})}v3.displayName="AppShell";function Sz(e){return!e||typeof window>"u"?!1:window.getComputedStyle(e).direction==="rtl"}const er=typeof window<"u"?x.useLayoutEffect:x.useEffect,Cz=new Set(["text","search","url","tel","email","password","number"]);function $z(e){if(e.isContentEditable)return e;const t=e.closest("[contenteditable]");return t&&t.getAttribute("contenteditable")!=="false"?t:null}function rb(e,t){if(!(e instanceof HTMLElement))return!1;const n=$z(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"&&Cz.has(e.type);if(!s&&!r)return!1;const a=e,{selectionStart:i,selectionEnd:o,value:c}=a;return i!==o||i==null?!0:t==="ArrowLeft"||t==="ArrowUp"||t==="Home"?i>0:t==="ArrowRight"||t==="ArrowDown"||t==="End"?i<c.length:!1}function Ri(e={}){const{itemSelector:t='[role="menuitem"]',boundarySelector:n,wrap:s=!0,onEscape:r,orientation:a="vertical",hasHomeEnd:i=!0,isRtl:o,hasRovingTabIndex:c=!1,hasCaretGuard:u=!1}=e,d=x.useRef(null),f=x.useCallback(E=>E.getAttribute("aria-disabled")==="true"||E.disabled===!0||E.hasAttribute("disabled"),[]),h=x.useCallback(()=>{const E=d.current;if(!E)return[];const T=Array.from(E.querySelectorAll(t));return n?T.filter(S=>S.closest(n)===E):T},[t,n]),p=x.useCallback(E=>{const T=d.current;if(!T||!n)return!0;const S=E.target;return S?S.closest(n)===T:!0},[n]),m=x.useCallback((E,T,S,M)=>{const z=E.length;if(z===0)return-1;let A=T;for(let R=0;R<z;R++){if(A<0||A>=z){if(!M)return-1;A=(A+z)%z}const I=E[A];if(I&&!f(I))return A;A+=S}return-1},[f]),b=x.useCallback(()=>{const E=h(),T=document.activeElement;return E.findIndex(S=>S===T||S.contains(T))},[h]),y=x.useCallback((E,T)=>{E.getAttribute("tabindex")!==String(T)&&E.setAttribute("tabindex",String(T))},[]),g=x.useCallback(()=>{const E=h(),T=E.filter(z=>!f(z));if(T.length===0)return;const M=T.find(z=>z.getAttribute("tabindex")==="0")??T[0];for(const z of E)y(z,z===M?0:-1)},[h,f,y]);er(()=>{c&&g()});const k=x.useCallback((E,T)=>{const S=E[T];if(S){if(c)for(const M of E)y(M,M===S?0:-1);S.focus()}},[c,y]),v=x.useCallback(E=>{const T=h();if(T.length===0)return;const S=Math.max(0,Math.min(E,T.length-1));k(T,S)},[h,k]),w=x.useCallback(()=>{const E=h(),T=m(E,0,1,!1);return T!==-1?(k(E,T),!0):!1},[h,m,k]),j=x.useCallback(()=>{const E=h(),T=m(E,E.length-1,-1,!1);return T!==-1?(k(E,T),!0):!1},[h,m,k]),C=x.useCallback(()=>{c&&g()},[c,g]),$=x.useCallback(E=>{if(E.ctrlKey||E.metaKey||E.altKey||!p(E))return;if(E.key==="Escape"){E.preventDefault(),r==null||r();return}const T=a==="horizontal"||a==="both",S=a==="vertical"||a==="both",M=[],z=[];if(T){const D=E.key==="ArrowLeft"||E.key==="ArrowRight"?o??Sz(d.current):!1;M.push(D?"ArrowLeft":"ArrowRight"),z.push(D?"ArrowRight":"ArrowLeft")}S&&(M.push("ArrowDown"),z.push("ArrowUp"));const A=M.includes(E.key),R=z.includes(E.key),I=i&&E.key==="Home",N=i&&E.key==="End";if(!A&&!R&&!I&&!N||u&&(rb(E.target,E.key)||rb(document.activeElement,E.key)))return;const _=b(),L=h();if(A){const D=_===-1?0:_+1,O=m(L,D,1,s);O!==-1&&k(L,O)}else if(R){const D=_===-1?L.length-1:_-1,O=m(L,D,-1,s);O!==-1&&k(L,O)}else I?w():N&&j();E.preventDefault()},[b,h,s,a,o,i,u,m,k,w,j,r,p]);return{listRef:d,handleKeyDown:$,handleFocus:C,focusItem:v,focusFirst:w,focusLast:j,ownsEvent:p,getItems:h}}const Ez={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}},Tz={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 Su({variant:e="neutral",label:t,icon:n,xstyle:s,className:r,style:a,ref:i,...o}){return l.jsxs("span",{ref:i,...U(P("badge",{variant:e}),B(Ez.base,Tz[e],s),r,a),...o,children:[n,t]})}Su.displayName="Badge";const zz={info:"info",warning:"warning",error:"error",success:"success"},Nz={info:"status",warning:"alert",error:"alert",success:"status"},Mz={info:"accent",warning:"warning",error:"error",success:"success"},Ra={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}},Az={info:{kWkggS:"xgcxg3y",$$css:!0},warning:{kWkggS:"x24i8r5",$$css:!0},error:{kWkggS:"x1pritpl",$$css:!0},success:{kWkggS:"xu13z74",$$css:!0}},Rz={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}};function yn({status:e,title:t,description:n,icon:s,isDismissable:r=!1,onDismiss:a,endContent:i,container:o="card",elevation:c="none",defaultIsExpanded:u=!1,children:d,xstyle:f,className:h,style:p,ref:m,...b}){const y=ke(),[g,k]=x.useState(!1),[v,w]=x.useState(u),j=x.useId(),C=zz[e],$=Nz[e],E=Mz[e],T=d!=null;if(g)return null;const S=()=>{k(!0),a==null||a()},M=()=>{w(_=>!_)},z=i!=null||r||T,A=i!=null||r,R=n==null&&A,I=T&&v,N=o==="card";return l.jsxs("div",{ref:m,role:$,...U(B(Ra.root,Rz[c],N&&c!=="none"&&Ra.rootElevatedCard,f),h,p),...b,children:[l.jsxs("div",{...U(P("banner",{container:o,status:e}),B(Ra.header,R&&Ra.headerCentered,Az[e],N&&(I?Ra.headerCardWithContent:Ra.headerCardStandalone))),children:[l.jsx("div",{...U(P("banner-icon",{status:e}),{className:"x78zum5 x6s0dn4 x2lah0s"}),"aria-hidden":"true",children:s??l.jsx(Ce,{icon:C,size:"md",color:E})}),l.jsxs("div",{className:"x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli",children:[l.jsx("div",{className:"x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0",children:t}),n!=null&&l.jsx("div",{className:"x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4",children:n})]}),z&&l.jsxs("div",{...B(Ra.endArea,uT.inset(ts["--spacing-2"])),children:[i,T&&l.jsx(de,{variant:"ghost",size:"sm",label:y(v?"@astryx.banner.collapse":"@astryx.banner.expand"),tooltip:y(v?"@astryx.banner.collapse":"@astryx.banner.expand"),icon:l.jsx("span",{...{0:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92"},1:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92 x19jd1h0"}}[!!v<<0],children:l.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit"})}),onClick:M,"aria-expanded":v,"aria-controls":I?j:void 0,isIconOnly:!0}),r&&l.jsx(de,{variant:"ghost",size:"sm",label:y("@astryx.banner.dismiss"),tooltip:y("@astryx.banner.dismiss"),icon:l.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),onClick:S,isIconOnly:!0})]})]}),I&&l.jsx("div",{id:j,...U(P("banner-content",{container:o,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"}}[!!N<<0]),children:d})]})}yn.displayName="Banner";const Iz={root:{k2ei4v:"xtpqe59",kVhnKS:"x1t7ytsu",kGJrpR:"x14ydlgx",kZCmMZ:"x1rey3nv",kMwMTN:"xv1l7n4",keTefX:"x1lziwak",k71WvV:"x14z9mp",keoZOQ:"xdj266r",k1K539:"xat24cr",$$css:!0}};function w3({children:e,cite:t,xstyle:n,className:s,style:r,ref:a,...i}){return l.jsxs("blockquote",{ref:a,...U(P("blockquote"),B(Iz.root,n),s,r),...i,children:[e,t!=null&&l.jsx("footer",{children:l.jsx("cite",{className:"x1lliihq xtbrsbv x141an7d x1ltkj2j x1j61x8r",children:t})})]})}w3.displayName="Blockquote";const s0=x.createContext({variant:"default",separator:"/"});s0.displayName="BreadcrumbContext";const _z={root:{k1xSpc:"x1lliihq",$$css:!0}};function j3({children:e,separator:t="/",variant:n="default",xstyle:s,className:r,style:a,label:i,ref:o,...c}){const u=ke(),d=i??u("@astryx.breadcrumbs.label"),f=x.useMemo(()=>({variant:n,separator:t}),[n,t]);return l.jsx(s0,{value:f,children:l.jsx("nav",{ref:o,"aria-label":d,...U(P("breadcrumbs",{variant:n}),B(_z.root,s),r,a),...c,children:l.jsx("ol",{className:"x78zum5 x6s0dn4 x1a02dak xe8uvvx x1ghz6dp x1717udv xzye2dw",children:e})})})}j3.displayName="Breadcrumbs";const Dz='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',gr=[];function Lz(e){gr.push(e)}function Oz(e){for(let t=gr.length-1;t>=0;t--)if(gr[t].handler===e){gr.splice(t,1);return}}function Bz(e){if(gr.length===0)return!1;let t=gr[0];for(let n=1;n<gr.length;n++){const s=gr[n],r=t.getContainer(),a=s.getContainer();r!=null&&a!=null&&a!==r&&a.contains(r)||(t=s)}return t.handler===e}function ab(){return gr.length>0}function S3(e){return e.isComposing===!0||e.keyCode===229}function qz(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 r0(e){return Array.from(e.querySelectorAll(Dz)).filter(qz)}function C3(e){try{e.focus()}catch{}return document.activeElement===e}function ib(e){const t=r0(e);for(const n of t)if(C3(n))return!0;return!1}function Hz(e){const t=r0(e);for(let n=t.length-1;n>=0;n--)if(C3(t[n]))return!0;return!1}function Pz(e){const{isActive:t,onEscape:n}=e,s=x.useRef(null),r=x.useRef(null),a=x.useRef(!1),i=x.useCallback(()=>{s.current&&ib(s.current)},[]);return x.useEffect(()=>{if(!t)return;const o=document.activeElement,c=s.current;return()=>{const u=document.activeElement;(u==null||u===document.body||u===document.documentElement||c!=null&&c.contains(u))&&o!=null&&o.isConnected&&typeof o.focus=="function"&&o.focus()}},[t]),x.useEffect(()=>{if(!t)return;const o=c=>{const u=s.current;if(!u)return;const d=c.target;u.contains(d)?r.current=d:a.current&&(ib(u),r.current===document.activeElement&&Hz(u),r.current=document.activeElement),a.current=!1};return document.addEventListener("focus",o,!0),()=>{document.removeEventListener("focus",o,!0)}},[t]),x.useEffect(()=>{if(!t)return;const o=()=>{n==null||n()};n&&Lz({handler:o,getContainer:()=>s.current});const c=u=>{const d=s.current;if(d){if(u.key==="Escape"&&n){if(u.defaultPrevented||S3(u)||!Bz(o))return;u.preventDefault(),u.stopPropagation(),n();return}if(u.key==="Tab"){a.current=!0;const f=r0(d);if(f.length===0)return;const h=f[0],p=f[f.length-1];u.shiftKey?document.activeElement===h&&(u.preventDefault(),p.focus()):document.activeElement===p&&(u.preventDefault(),h.focus())}}};return document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c),n&&Oz(o)}},[t,n]),{containerRef:s,focusFirst:i}}function Tl(e,t,n=!0){const s=x.useRef(!1);x.useEffect(()=>{n&&!s.current&&(s.current=!0,oi())},[e,t,n])}const Kx={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 zl(e={}){const{onShow:t,onHide:n,xstyle:s,hasLightDismiss:r=!0,hasEscapeDismiss:a=!0,hasAutoFocus:i=!0,hasSurface:o=!0,hasCloseButton:c=!0,closeButtonLabel:u,dialogLabel:d,role:f="dialog",isModal:h=!0}=e,p=ke(),m=u??p("@astryx.popover.close"),b=x.useRef(null),y=x.useRef(!1),g=El({mode:"context",lightDismiss:r,onShow:t,onHide:n}),{containerRef:k,focusFirst:v}=Pz({isActive:g.isOpen,onEscape:a||r?g.hide:void 0});x.useEffect(()=>{g.isOpen&&i&&!y.current&&requestAnimationFrame(()=>{v()}),g.isOpen||(y.current=!1)},[g.isOpen,i,v]);const w=x.useCallback(T=>{b.current=T,g.ref(T)},[g]),j=x.useCallback(T=>{y.current=(T==null?void 0:T.skipAutoFocus)??!1,g.show()},[g]),C=x.useCallback(()=>{g.isOpen?g.hide():j()},[g,j]),$={"aria-haspopup":f==="dialog"?"dialog":"true","aria-expanded":g.isOpen,"aria-controls":g.id};Tl("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.',f==="dialog"&&!d);const E=x.useCallback((T,S)=>g.render(l.jsxs("div",{ref:k,role:f==="dialog"?"dialog":void 0,"aria-modal":f==="dialog"&&h?!0:void 0,"aria-label":f==="dialog"?d:void 0,...B(Kx.contentWrapper,o&&Kx.surface,s),children:[T,c&&l.jsx("div",{...B(Kx.closeButtonWrapper,rl.centerInline("100%")),children:l.jsx(de,{variant:"secondary",label:m,onClick:g.hide})})]}),{...S,xstyle:S==null?void 0:S.xstyle}),[g,c,o,m,k,d,f,h,s]);return{triggerRef:w,contentRef:k,anchorId:g.anchorId,show:j,hide:g.hide,toggle:C,isOpen:g.isOpen,id:g.id,render:E,triggerProps:$}}function Uz(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key!==" "}function Uh(e){const{getItemLabels:t,onMatch:n,getCurrentIndex:s,resetMs:r=750,isDisabled:a}=e,i=x.useRef(""),o=x.useRef(void 0),c=x.useCallback(()=>{i.current="",o.current&&(clearTimeout(o.current),o.current=void 0)},[]),u=x.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{i.current="",o.current=void 0},r)},[r]);return{onKeyDown:x.useCallback(f=>{const h=f.key===" "&&i.current.length>0;if(!Uz(f)&&!h)return!1;const p=t();if(p.length===0)return!1;const m=f.key.toLowerCase(),b=i.current.length>0&&i.current.split("").every(w=>w===m),y=b?m:i.current+m;i.current=y,u();const g=(s==null?void 0:s())??-1,k=p.length,v=b?1:0;for(let w=0;w<k;w++){const j=(g+v+w+k)%k;if(a!=null&&a(j))continue;const C=p[j];if(C!=null&&C.trim().toLowerCase().startsWith(y))return n(j),!0}return!0},[t,n,s,u,a]),reset:c}}const ob={horizontal:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kzqmXN:"xh8yej3",$$css:!0},vertical:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kZKoxP:"x5yr21d",$$css:!0}},Zi={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}},lb={horizontal:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",$$css:!0},vertical:{keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",kZKoxP:"x12qplqi",$$css:!0}};function Bc({orientation:e="horizontal",label:t,variant:n="subtle",isFullBleed:s=!1,xstyle:r,className:a,style:i,ref:o,"aria-label":c,"aria-labelledby":u,...d}){const f=e==="horizontal",h=x.useId(),p=u??(t&&c==null?h:void 0);return l.jsxs("div",{ref:o,...d,role:"separator","aria-orientation":e,"aria-label":c,"aria-labelledby":p,...U(P("divider",{variant:n,orientation:e}),B(f?ob.horizontal:ob.vertical,s&&(f?lb.horizontal:lb.vertical),r),a,i),children:[l.jsx("div",{...B(f?Zi.horizontalLine:Zi.verticalLine,Zi[n])}),t&&l.jsx("div",{id:h,...{0:{className:"x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4"},1:{className:"x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82"}}[!f<<0],children:t}),t&&l.jsx("div",{...B(f?Zi.horizontalLine:Zi.verticalLine,Zi[n])})]})}Bc.displayName="Divider";const Fz=["noopener","noreferrer"];function $3(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 Fz)n.includes(s)||n.push(s);return{target:e,rel:n.join(" ")}}const E3=["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(","),Gz='[aria-readonly="true"]';function cb(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(E3)&&!n.matches(Gz))return!0;n=n.parentElement}return!1}function Vz(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 a0({containerRef:e,interactiveRef:t,onClick:n,href:s,target:r,disabled:a=!1}){x.useEffect(()=>{const c=e.current;c&&c.setAttribute("data-pressable-container","true")},[e]);const i=x.useCallback(c=>{if(a)return;const u=e.current;if(!u||Vz(u))return;const d=c.target;if(d instanceof Element&&!(d!==c.currentTarget&&cb(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 f=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(f),c.stopPropagation()}},[e,t,n,s,r,a]),o=x.useCallback(c=>{if(a)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||!cb(d,u))&&window.open(s,"_blank","noopener")},[e,s,a]);return{onClick:i,onMouseUp:o}}const Wz=new Set(["option","tab","row","gridcell","columnheader","rowheader","treeitem"]),ln={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}},ub={lineClamp:e=>[{kJFfOR:e!=null?"x1yhjpo9":e,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},Kz={compact:{k8WAf4:"xu0wf1k",$$css:!0},balanced:{k8WAf4:"xce4md1",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"xrrkdod",$$css:!0}};function Ii({as:e="div",marker:t,startContent:n,label:s,description:r,endContent:a,align:i="center",density:o="balanced",labelLines:c,descriptionLines:u,onClick:d,interactiveRef:f,href:h,target:p,rel:m,isHighlighted:b=!1,isSelected:y=!1,isDisabled:g=!1,xstyle:k,className:v,style:w,ref:j,role:C,...$}){const E=$a(),T=f!=null,S=x.useRef(null),{onClick:M}=a0({containerRef:S,interactiveRef:f??void 0,disabled:g});Tl("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.",T&&(d!=null||h!=null));const z=d!=null||h!=null||T,{target:A,rel:R}=$3(p,m),I=C!=null,N=C!=null&&Wz.has(C),_=typeof s=="string",L=typeof r=="string",D=c!=null?c===1?ln.labelSingleTruncate:ln.labelMultiTruncate:_?ln.labelSingleTruncate:null,O=u!=null?u===1?ln.descriptionSingleTruncate:ln.descriptionMultiTruncate:L?ln.descriptionSingleTruncate:null,q=l.jsxs(l.Fragment,{children:[l.jsx("span",{...B(ln.label,D,c!=null&&c>1&&ub.lineClamp(c)),children:s}),r!=null&&l.jsx("span",{...B(ln.description,O,u!=null&&u>1&&ub.lineClamp(u)),children:r})]}),F=J=>{g||J.target.closest("button, a, input, select, textarea")||d==null||d(J)},X=l.jsxs(l.Fragment,{children:[t,n!=null&&l.jsx("span",{className:"x3psx0u x78zum5",children:n}),I||T?l.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!g<<0],children:q}):h!=null?l.jsx(E,{href:h,target:A,rel:R,"aria-disabled":g||void 0,tabIndex:g?-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"}}[!!g<<0],children:q}):d!=null?l.jsx("button",{type:"button",onClick:d,disabled:g,...{0:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz"},1:{className:"xmper1u xln7xf2 x1heor9g x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h x1a2a7pz xbyyjgo"}}[!!g<<0],children:q}):l.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!g<<0],children:q}),a!=null&&l.jsx("span",{...{0:{className:"x3psx0u x78zum5 xvc5jky"},1:{className:"x3psx0u x78zum5 xvc5jky xbyyjgo"}}[!!g<<0],children:a})]});return l.jsx(e,{ref:T?ct(j,S):j,...$,"aria-selected":N&&y||void 0,"aria-current":$["aria-current"]??(y&&!N?!0:void 0),"aria-disabled":g||void 0,...U(P("item",{density:o,align:i}),B(ln.root,Kz[o],i==="start"&&ln.alignStart,z&&ln.interactive,z&&ln.focusVisibleOutline,b&&ln.highlighted,y&&ln.selected,g&&!I&&ln.disabled,k),v,w),role:C,onClick:T?M:I?d:z?F:void 0,children:X})}Ii.displayName="Item";const Nl=x.createContext(null);Nl.displayName="DropdownMenuContext";function i0(){return x.use(Nl)}const o0=x.createContext(null);o0.displayName="DropdownMenuRadioGroupContext";function Xz(){return x.use(o0)}function l0(e,t){if(t||e.pointerType!=="mouse")return;const n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus()}const db={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}},Zz={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}};function Rf({icon:e,label:t,description:n,onClick:s,isDisabled:r=!1,endContent:a,xstyle:i,className:o,style:c}){const u=i0(),d=(u==null?void 0:u.menuSize)??"md",f=x.useCallback(()=>{r||!s||(s(),u==null||u.closeMenu())},[r,s,u]),h=x.useCallback(p=>l0(p,r),[r]);return l.jsx(Ii,{role:"menuitem",tabIndex:r?void 0:-1,onPointerMove:h,startContent:e?_s(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:a,onClick:f,isDisabled:r,xstyle:[db.root,Zz[d],r&&db.disabled,i],...U(P("dropdown-menu-item",{size:d}),{className:o,style:c})})}Rf.displayName="DropdownMenuItem";function Yz(e){const{show:t,hide:n,isOpen:s,isEnabled:r,showDelay:a=150,hideDelay:i=200}=e,o=Ni("(hover: hover)"),c=x.useRef(null),u=x.useRef(null),d=x.useRef(null),f=x.useRef(!1),h=x.useRef(!1),p=x.useRef(s);p.current&&!s&&(f.current=!1),p.current=s;const m=x.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),u.current&&(clearTimeout(u.current),u.current=null)},[]),{listRef:b,handleKeyDown:y,focusFirst:g}=Ri({onEscape:()=>{m(),n()}});x.useEffect(()=>()=>m(),[m]);const k=x.useCallback(()=>{m(),s?(h.current=!0,n()):(h.current=!1,t(),requestAnimationFrame(()=>g()))},[s,m,t,n,g]),v=x.useCallback(()=>{if(o){if(h.current){h.current=!1;return}f.current=!0,m(),a>0?c.current=setTimeout(()=>{t({skipAutoFocus:!0})},a):t({skipAutoFocus:!0})}},[o,m,t,a]),w=x.useCallback(()=>{f.current&&(m(),u.current=setTimeout(()=>{n()},i))},[m,n,i]),j=x.useCallback(()=>{m()},[m]),C=x.useCallback(S=>{d.current=S},[]),$=x.useCallback(()=>{},[]),E=x.useCallback(S=>{},[]),T=x.useCallback(S=>{},[]);return r?{triggerProps:{onClick:k,onMouseEnter:v,onMouseLeave:w},contentProps:{onMouseEnter:j,onMouseLeave:w,onKeyDown:y},menuRef:b,focusFirst:g,setTriggerEl:C}:{triggerProps:{onClick:$,onMouseEnter:$,onMouseLeave:$},contentProps:{onMouseEnter:$,onMouseLeave:$,onKeyDown:T},menuRef:b,focusFirst:g,setTriggerEl:E}}const Cu=new Set(["menuitem","menuitemradio","menuitemcheckbox"]),Fh=[...Cu].map(e=>`[role="${e}"]:not([aria-disabled="true"])`).join(","),Gh='[role="menu"]',Xx={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}},Qz={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},Jz={keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},fb={popover:{k7Eaqz:"x5w4yej",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[Jz,{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 T3(e){const{icon:t,label:n,description:s,isDisabled:r=!1,hasSpinner:a=!1,menuWidth:i,onOpenChange:o,children:c,xstyle:u,className:d,style:f,"data-testid":h,menuDataTestId:p}=e,m=i0(),b=(m==null?void 0:m.menuSize)??"md",y=!r,g=x.useId(),k=x.useId(),v=x.useRef(null),[w,j]=x.useState(!1),C=El({mode:"context",lightDismiss:!1,onShow:x.useCallback(()=>{j(!0),o==null||o(!0)},[o]),onHide:x.useCallback(()=>{j(!1),o==null||o(!1)},[o])}),$=x.useCallback(()=>{y&&C.show()},[y,C]),E=x.useCallback(()=>{C.hide()},[C]),{listRef:T,handleKeyDown:S,focusFirst:M,focusItem:z,ownsEvent:A,getItems:R}=Ri({itemSelector:Fh,boundarySelector:Gh,wrap:!1,onEscape:()=>D({focusTrigger:!0})}),I=Uh({getItemLabels:()=>R().map(K=>K.textContent),onMatch:z,getCurrentIndex:()=>R().findIndex(K=>K===document.activeElement||K.contains(document.activeElement))}),{triggerProps:N,contentProps:_}=Yz({show:$,hide:E,isOpen:w,isEnabled:y}),L=x.useCallback(K=>{y&&(C.show(),K!=null&&K.focusFirst&&requestAnimationFrame(()=>{var oe;M()||(oe=T.current)==null||oe.focus()}))},[y,C,M,T]),D=x.useCallback(K=>{var re;C.hide(),(K==null?void 0:K.focusTrigger)!==!1&&((re=v.current)==null||re.focus())},[C]),O=x.useCallback(K=>{v.current=K,C.ref(K)},[C]),q=x.useCallback(()=>{r||(w?D({focusTrigger:!0}):L({focusFirst:!0}))},[r,w,L,D]),F=x.useCallback(K=>{if(r)return;const oe=(typeof window<"u"&&v.current?window.getComputedStyle(v.current).direction==="rtl":!1)?"ArrowLeft":"ArrowRight";(K.key===oe||K.key==="Enter"||K.key===" ")&&(K.preventDefault(),K.stopPropagation(),L({focusFirst:!0}))},[r,L]),X=x.useCallback(K=>l0(K,r),[r]),J=x.useCallback(K=>{if(!A(K))return;if(K.key==="Escape"){K.preventDefault(),K.stopPropagation(),D({focusTrigger:!0});return}if(K.key==="Enter"||K.key===" "){K.preventDefault();const be=document.activeElement;be&&Cu.has(be.getAttribute("role")??"")&&be.click();return}const oe=(typeof window<"u"&&T.current?window.getComputedStyle(T.current).direction==="rtl":!1)?"ArrowRight":"ArrowLeft";if(K.key===oe){K.preventDefault(),D({focusTrigger:!0});return}if(I.onKeyDown(K)){K.preventDefault();return}S(K)},[A,D,S,I,T]),Z=x.useMemo(()=>({menuSize:b,closeMenu:()=>{D({focusTrigger:!1}),m==null||m.closeMenu()}}),[b,D,m]),te=a?l.jsx("span",{...U(P("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:l.jsx(En,{size:"sm"})}):l.jsx("span",{...U(P("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:l.jsx(Ce,{icon:"chevronRight",size:"sm",color:"secondary"})}),Q=i?fb.popoverCustomWidth(i):fb.popover;return l.jsxs(l.Fragment,{children:[l.jsx(Ii,{ref:K=>O(K),id:k,role:"menuitem",tabIndex:r?void 0:-1,"aria-haspopup":"menu","aria-expanded":w,"aria-controls":w?g:void 0,"aria-disabled":r||void 0,"data-testid":h,onMouseEnter:N.onMouseEnter,onMouseLeave:N.onMouseLeave,onPointerMove:X,startContent:t?_s(t,{size:"sm",color:"secondary"}):void 0,label:n,description:s,endContent:te,onClick:q,onKeyDown:F,isDisabled:r,xstyle:[Xx.root,Qz[b],w&&Xx.open,r&&Xx.disabled,u],...U(P("dropdown-menu-item",{size:b}),{className:d,style:f})}),C.render(l.jsx("div",{ref:T,id:g,role:"menu",tabIndex:-1,"aria-labelledby":k,onKeyDown:J,onMouseEnter:_.onMouseEnter,onMouseLeave:_.onMouseLeave,"data-testid":p,...U(P("dropdown-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92"}),children:l.jsx(Nl,{value:Z,children:c})}),{placement:"end",alignment:"start",xstyle:[Q,Js.end]})]})}T3.displayName="DropdownMenuSubMenu";const eN={divider:{kqGvvJ:"xsq74q5",$$css:!0}};function Zx(e){return`item-${e.label}`}function tN(e,t){return`section-${e.title??t}`}function Vh(e){const t=[];for(let n=0;n<e.length;n++){const s=e[n];"type"in s&&s.type==="divider"?t.push(l.jsx(Bc,{xstyle:eN.divider,...P("dropdown-menu-divider")},`divider-${n}`)):"type"in s&&s.type==="section"?t.push(l.jsxs("div",{role:"group","aria-label":s.title,children:[s.title&&l.jsx("div",{"aria-hidden":"true",...U(P("dropdown-menu-section-heading"),{className:"xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o"}),children:s.title}),s.items.map(r=>l.jsx(Rf,{icon:r.icon,label:r.label,onClick:r.onClick,isDisabled:r.isDisabled},Zx(r)))]},tN(s,n))):"type"in s||(s.items&&s.items.length>0?t.push(l.jsx(T3,{icon:s.icon,label:s.label,isDisabled:s.isDisabled,children:Vh(s.items)},Zx(s))):t.push(l.jsx(Rf,{icon:s.icon,label:s.label,onClick:s.onClick,isDisabled:s.isDisabled},Zx(s))))}return t}const Yi={root:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kogj98:"x1ghz6dp","--separator-display":"xkce8z9 x1ibt0lz",$$css:!0},defaultSize:{kGuDYH:"xjm74w1",kLWn49:"xw6l6zx",$$css:!0},supportingSize:{kGuDYH:"x141an7d",kLWn49:"x1ltkj2j",$$css:!0}},nN={popover:{k7Eaqz:"x5w4yej",kqGvvJ:"xsq74q5",$$css:!0}};function z3({ref:e,as:t,children:n,href:s,onClick:r,isCurrent:a,startIcon:i,menu:o,menuSize:c,xstyle:u,className:d,style:f,"data-testid":h,...p}){const m=x.use(s0),b=$a(t),y=m.variant==="supporting",g=x.useRef(null),k=x.useRef(null),v=a===!0,w=a==null,j=o!=null,C=c??(y?"sm":"md");x.useEffect(()=>{},[j,s,r]),x.useEffect(()=>{if(!w)return;const E=g.current;if(!E)return;const T=E.parentElement;if(!T)return;const S=Array.from(T.children),M=S.length>0&&S[S.length-1]===E,z=T.querySelector('[aria-current="page"]');if(M&&!z){const A=k.current??E;return A.setAttribute("aria-current","page"),()=>{A.removeAttribute("aria-current")}}});const $=l.jsxs(l.Fragment,{children:[i&&l.jsx("span",{className:"x78zum5 x6s0dn4 x2lah0s",children:i}),n]});return v?l.jsxs("li",{ref:ct(e,g),...U(P("breadcrumb-item"),B(Yi.root,y?Yi.supportingSize:Yi.defaultSize,u),d,f),"data-testid":h,...p,children:[l.jsx("span",{"aria-hidden":"true",className:"x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o",children:m.separator}),j?l.jsx($p,{ref:k,menu:o,menuSize:C,isSupporting:y,isCurrent:!0,label:n,children:$}):l.jsx("span",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz x1tgivj0"},1:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz xv1l7n4"}}[!!y<<0],"aria-current":"page",children:$})]}):l.jsxs("li",{ref:ct(e,g),...U(P("breadcrumb-item"),B(Yi.root,y?Yi.supportingSize:Yi.defaultSize,u),d,f),"data-testid":h,...p,children:[l.jsx("span",{"aria-hidden":"true",className:"x11ke7fs x6s0dn4 xv1l7n4 xu0wf1k x87ps6o",children:m.separator}),j?l.jsx($p,{ref:k,menu:o,menuSize:C,isSupporting:y,label:n,children:$}):s!=null?l.jsx(b,{ref:k,href:s,onClick:r,...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk xv1l7n4"}}[!!y<<0],children:$}):r!=null?l.jsx("button",{ref:k,type:"button",onClick:r,...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"}}[!!y<<0],children:$}):l.jsx("span",{ref:k,...{0:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz x1tgivj0"},1:{className:"x78zum5 x6s0dn4 xzye2dw x1pd3egz xv1l7n4"}}[!!y<<0],children:$})]})}z3.displayName="BreadcrumbItem";function $p({ref:e,children:t,label:n,menu:s,menuSize:r,isSupporting:a,isCurrent:i=!1}){const o=x.useId(),c=x.useRef(null),u=zl({onHide:x.useCallback(()=>{var T;(T=c.current)==null||T.focus()},[]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),d=gi("chevronDown"),f=x.useCallback(()=>{u.hide()},[u]),{listRef:h,handleKeyDown:p,focusFirst:m,focusItem:b,ownsEvent:y,getItems:g}=Ri({itemSelector:Fh,boundarySelector:Gh,wrap:!1,onEscape:f}),k=Uh({getItemLabels:()=>g().map(T=>T.textContent),onMatch:b,getCurrentIndex:()=>g().findIndex(T=>T===document.activeElement||T.contains(document.activeElement))}),v=x.useCallback(T=>{if(y(T)){if(T.key==="Enter"||T.key===" "){T.preventDefault();const S=document.activeElement;S&&Cu.has(S.getAttribute("role")??"")&&S.click();return}if(T.key==="Tab"){f();return}if(k.onKeyDown(T)){T.preventDefault();return}p(T)}},[p,f,k,y]),w=x.useCallback(()=>{u.show(),requestAnimationFrame(()=>m())},[u,m]),j=x.useCallback(()=>{u.isOpen?u.hide():w()},[u,w]),C=x.useCallback(T=>{u.isOpen||(T.key==="ArrowDown"||T.key==="Enter"||T.key===" ")&&(T.preventDefault(),w())},[u.isOpen,w]),$=x.useMemo(()=>({closeMenu:f,menuSize:r}),[f,r]),E=Array.isArray(s)?Vh(s):s;return l.jsxs(l.Fragment,{children:[l.jsxs("button",{ref:ct(e,c,u.triggerRef),type:"button",onClick:j,onKeyDown:C,...U(P("breadcrumb-item-menu-trigger"),{...u.triggerProps,"aria-haspopup":"menu","aria-controls":o,"aria-current":i?"page":void 0}),...{0:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"},1:{className:"x78zum5 x6s0dn4 xzye2dw xu0wf1k x1hl2dhg x4ohgrr x1ypdohk x1717udv x1ghz6dp xln7xf2 xv1l7n4"}}[!!a<<0],children:[t,l.jsx("span",{"aria-hidden":"true",className:"x78zum5 x6s0dn4 x2lah0s x141an7d",children:d})]}),u.render(l.jsx("div",{ref:h,id:o,role:"menu","aria-label":typeof n=="string"?n:void 0,onKeyDown:v,...U(P("breadcrumb-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x87ps6o"}),children:l.jsx(Nl,{value:$,children:E})}),{placement:"below",alignment:"start",xstyle:[nN.popover,Js.below]})]})}$p.displayName="BreadcrumbMenuTrigger";function sN(e){return typeof e=="string"||typeof e=="number"}function hb(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function _i({children:e,anchorRef:t,content:n,placement:s="above",alignment:r="center",delay:a=200,hideDelay:i=0,focusTrigger:o="auto",isEnabled:c=!0,onOpenChange:u,hasHoverIndication:d="auto",isOpen:f,isDefaultOpen:h}){const p=x.useRef(null),m=e!=null?sN(e):!1,b=d===!0||d==="auto"&&m,y=x.useCallback(()=>{u==null||u(!0)},[u]),g=x.useCallback(()=>{u==null||u(!1)},[u]),k=Is({placement:s,alignment:r,delay:a,hideDelay:i,focusTrigger:o,isEnabled:c,isOpen:f,isDefaultOpen:h,onShow:y,onHide:g});return er(()=>{if(!t)return;const v=t.current;if(!v)return;k.ref(v);const w=v.getAttribute("aria-describedby");return v.setAttribute("aria-describedby",hb(w,k.describedBy)??""),()=>{k.ref(null),w?v.setAttribute("aria-describedby",w):v.removeAttribute("aria-describedby")}},[t,k.ref,k.describedBy]),er(()=>{if(t||m)return;const v=p.current;if(!v)return;const w=v.firstElementChild;if(!w)return;k.ref(w);const j=w.getAttribute("aria-describedby");return w.setAttribute("aria-describedby",hb(j,k.describedBy)??""),()=>{k.ref(null),j?w.setAttribute("aria-describedby",j):w.removeAttribute("aria-describedby")}},[t,m,k.ref,k.describedBy]),t&&e==null?l.jsx(l.Fragment,{children:k.renderTooltip(n)}):m?l.jsxs(l.Fragment,{children:[l.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)]}):l.jsxs(l.Fragment,{children:[l.jsx("div",{ref:p,className:"xjp7ctv",children:e}),k.renderTooltip(n)]})}_i.displayName="Tooltip";const N3=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:_i},Symbol.toStringTag,{value:"Module"})),rN="data-astryx-live-region",aN="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;",iN=2e3,If={polite:null,assertive:null};function M3(e){const t=If[e];t!=null&&(clearTimeout(t),If[e]=null)}function oN(e,t){M3(e),If[e]=setTimeout(()=>{If[e]=null,t.textContent=""},iN)}let Cs=null;function xb(e){const t=document.createElement("div");return t.setAttribute(rN,e),t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.setAttribute("role",e==="assertive"?"alert":"status"),t.style.cssText=aN,document.body.appendChild(t),t}function lN(){return typeof document>"u"?null:Cs?(Cs.polite.isConnected||document.body.appendChild(Cs.polite),Cs.assertive.isConnected||document.body.appendChild(Cs.assertive),Cs):(Cs={polite:xb("polite"),assertive:xb("assertive")},Cs)}function cN(e,t){const n=lN();if(!n)return;const s=t==="assertive"?n.assertive:n.polite;s.textContent="",requestAnimationFrame(()=>{s.textContent=e}),oN(t,s)}function uN(e){if(M3(e),!Cs)return;const t=e==="assertive"?Cs.assertive:Cs.polite;t.textContent=""}function Ml(){return x.useCallback((e,t="polite")=>{if(!e){uN(t);return}cN(e,t)},[])}const dN={wrapper:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kOIVth:"xzye2dw",kmuXW:"x2lah0s",$$css:!0}},fN={ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",escape:"Esc",tab:"⇥",up:"↑",down:"↓",left:"←",right:"→",plus:"+"};function hN(e,t){return e==="mod"?t?"⌘":"Ctrl":fN[e]??e.toUpperCase()}const xN={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 pN(e,t){return e==="mod"?t?"Command":"Control":xN[e]??e.toUpperCase()}function gN(){return()=>{}}function mN(){return!1}function yN(){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 A3({keys:e,ref:t,xstyle:n,className:s,style:r,...a}){const i=x.useSyncExternalStore(gN,yN,mN),o=e.split("+").map(u=>u.trim().toLowerCase()),c=o.map(u=>pN(u,i)).join(" + ");return l.jsx("span",{...a,ref:t,role:"img","aria-label":c,...U(P("kbd"),B(dN.wrapper,n),s,r),children:o.map(u=>l.jsx("kbd",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x16asifk x1grt7ep x7a5moj xx3sua9 x17x4s8c xlxy82 x1q0q8m5 xib2hle xv1l7n4 x9ynric x141an7d x1e4wzip x1ltkj2j x87ps6o",children:hN(u,i)},u))})}A3.displayName="Kbd";const kN=new Set(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"]),bN={horizontal:["left","right"],vertical:["up","down"],both:["left","right","up","down"]},vN={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 R3(e={}){const{orientation:t="horizontal",dismissAfterMs:n=3e3,isEnabled:s=!0}=e,r=ke(),a=x.useRef(null),i=x.useRef(!1),o=x.useRef(!1),c=x.useRef(()=>{}),u=x.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null)},[]),d=x.useCallback(()=>{o.current=!0},[]),f=x.useCallback(()=>{o.current=!1,u(),c.current(null)},[u]),h=El({mode:"context",onShow:d,onHide:f});c.current=h.ref;const p=x.useCallback(()=>{i.current=!0,u(),h.hide(),o.current=!1,c.current(null)},[u,h]),m=x.useCallback(w=>{i.current||!s||(c.current(w),h.show(),u(),a.current=setTimeout(()=>{p()},n))},[u,p,n,s,h]);x.useEffect(()=>()=>{u(),c.current(null)},[u]);const b=x.useCallback(w=>{if(i.current||!s)return;const j=w.target;if(!j.matches(":focus-visible"))return;const C=w.currentTarget;w.relatedTarget instanceof Node&&C.contains(w.relatedTarget)||m(j)},[m,s]),y=x.useCallback(w=>{if(!o.current)return;const j=w.currentTarget;if(w.relatedTarget instanceof Node&&j.contains(w.relatedTarget)){!i.current&&w.relatedTarget instanceof HTMLElement&&c.current(w.relatedTarget);return}p()},[p]),g=x.useCallback(w=>{o.current&&kN.has(w.key)&&p()},[p]),k=l.jsx("span",{className:"x3nfvp2 x6s0dn4 xzye2dw",children:bN[t].map(w=>l.jsx(A3,{keys:w},w))});return{hintElement:h.render(l.jsxs("span",{"aria-hidden":"true",children:[k,l.jsx("span",{className:"x11g1kdw",children:r("@astryx.keyboardHint.toNavigate")})]}),{placement:"below",alignment:"start",xstyle:vN.hint,style:{marginBlockStart:ts["--spacing-2"]}}),onFocus:b,onBlur:y,onKeyDown:g}}function I3(e){x.useEffect(()=>{if(!e)return;const t=window.scrollX,n=window.scrollY,{body:s}=document,r=s.style.overflow,a=s.style.position,i=s.style.top,o=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=a,s.style.top=i,s.style.left=o,s.style.right=c,window.scrollTo(t,n)}},[e])}let _3=!1;typeof window<"u"&&requestAnimationFrame(()=>{_3=!0});const wN={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 jN(e="slideDown"){const[t]=x.useState(()=>_3);return t?wN[e]:null}const SN=50;function CN(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 $N={natural:10,fast:4,instant:1/0};function EN(e,t,n){const s="natural",r=$N[s],{token:a}=qh(),i=x.useMemo(()=>{const y=CN(a("--duration-fast-min"));if(y==null)return SN;const g=y/10;return Math.max(4,Math.round(g))},[a,s]),[o,c]=x.useState(0),u=x.useRef(e),d=x.useRef(0),f=x.useRef(0),h=x.useRef(null);u.current=e;const p=x.useRef(e.length);e.length!==p.current&&(p.current=e.length,e.length===0&&o!==0&&(d.current=0,c(0)));const m=x.useRef(t);t!==m.current&&(m.current=t,!t&&e.length>0&&(d.current=e.length,c(e.length)));const b=Ni("(prefers-reduced-motion: reduce)");return x.useEffect(()=>{if(!t||s==="instant"||b)return;function y(g){if(g-f.current>=i){f.current=g;const v=u.current,w=d.current;if(w<v.length){const j=Math.min(w+r,v.length);d.current=j,c(j)}}h.current=requestAnimationFrame(y)}return h.current=requestAnimationFrame(y),()=>{h.current!==null&&(cancelAnimationFrame(h.current),h.current=null)}},[t,r,i,s,b]),!t||s==="instant"||b?e:e.slice(0,o)}const TN=new Set(["text","password","email","number","search","tel","url","date","datetime-local","month","time","week"]),zN=new Set(["true","menu","listbox","tree","grid","dialog"]);function NN(e){if(e.getAttribute("role")==="combobox")return!0;const t=e.getAttribute("aria-haspopup");return t!=null&&zN.has(t)}function c0({containerRef:e,inputRef:t,disabled:n=!1}){const s=x.useCallback(()=>{const r=t.current;r!=null&&(r instanceof HTMLElement&&NN(r)?r.click():r instanceof HTMLInputElement&&TN.has(r.type)||r instanceof HTMLTextAreaElement?r.focus():r instanceof HTMLElement?r.click():"focus"in r&&r.focus())},[t]);return a0({containerRef:e,interactiveRef:t,onClick:s,disabled:n})}const MN={warning:"warning",error:"error",success:"success"},AN={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function D3({status:e,statusVariant:t="attached",isInGroup:n=!1,size:s="md"}){const r=ke(),i=t==="tooltip"&&!!(e!=null&&e.message),[o,c]=x.useState(void 0),u=Is({placement:"above",isEnabled:i,isOpen:o}),d=x.useCallback(()=>{c(void 0)},[]),f=x.useCallback(()=>{typeof window>"u"||typeof window.matchMedia!="function"||!window.matchMedia("(hover: none)").matches||c(m=>m!==!0)},[]);if(x.useEffect(()=>{if(o!==!0)return;const m=b=>{b.key==="Escape"&&c(void 0)};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[o]),!(!!e&&!n&&t!=="detached"))return{statusIcon:null,describedBy:void 0};const p=l.jsx(Ce,{icon:MN[e.type],size:s,color:e.type,...P("input-status-icon",{size:s,status:e.type})});return i?{statusIcon:l.jsxs(l.Fragment,{children:[l.jsx("button",{type:"button",ref:u.ref,"aria-label":r(AN[e.type]),"aria-describedby":u.describedBy,onClick:f,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 u0=x.createContext(null);u0.displayName="InteractiveRoleContext";function RN(){return x.use(u0)}function L3({href:e,onClick:t,isDisabled:n=!1}){const s=RN();return e!=null&&!n?"link":t!=null?"button":s??"inert"}const IN=500,_N=10;function DN(e){const{onLongPress:t,disabled:n=!1,delayMs:s=IN,moveCancelPx:r=_N}=e,a=x.useRef(null),i=x.useRef(null),o=x.useRef(t);o.current=t;const c=x.useCallback(()=>{a.current!=null&&(clearTimeout(a.current),a.current=null),i.current=null},[]),u=x.useCallback(f=>{if(n||f.touches.length!==1)return;const h=f.touches[0];c(),i.current={x:h.clientX,y:h.clientY},a.current=setTimeout(()=>{const p=i.current;p!=null&&o.current({x:p.x,y:p.y})},s)},[n,s,c]),d=x.useCallback(f=>{const h=i.current;if(h==null||f.touches.length!==1)return;const p=f.touches[0];(Math.abs(p.clientX-h.x)>r||Math.abs(p.clientY-h.y)>r)&&c()},[r,c]);return x.useEffect(()=>c,[c]),{onTouchStart:u,onTouchMove:d,onTouchEnd:c,onTouchCancel:c}}const d0=6,LN={x177fznd:"x177fznd",$$css:!0},Xu={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}},ON={x1e36hu2:"x1e36hu2",$$css:!0},Zu={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}},BN={x10zkftw:"x10zkftw",$$css:!0},Yu={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}},qN={xbjq1vy:"xbjq1vy",$$css:!0},Qu={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}},HN={x3z7t8n:"x3z7t8n",$$css:!0},Ju={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}},PN={x6dglqq:"x6dglqq",$$css:!0},ed={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}},UN=[{marker:LN,reveal:Xu.reveal,revealLayoutPreserved:Xu.revealLayoutPreserved,conceal:Xu.conceal,concealLayoutPreserved:Xu.concealLayoutPreserved},{marker:ON,reveal:Zu.reveal,revealLayoutPreserved:Zu.revealLayoutPreserved,conceal:Zu.conceal,concealLayoutPreserved:Zu.concealLayoutPreserved},{marker:BN,reveal:Yu.reveal,revealLayoutPreserved:Yu.revealLayoutPreserved,conceal:Yu.conceal,concealLayoutPreserved:Yu.concealLayoutPreserved},{marker:qN,reveal:Qu.reveal,revealLayoutPreserved:Qu.revealLayoutPreserved,conceal:Qu.conceal,concealLayoutPreserved:Qu.concealLayoutPreserved},{marker:HN,reveal:Ju.reveal,revealLayoutPreserved:Ju.revealLayoutPreserved,conceal:Ju.conceal,concealLayoutPreserved:Ju.concealLayoutPreserved},{marker:PN,reveal:ed.reveal,revealLayoutPreserved:ed.revealLayoutPreserved,conceal:ed.conceal,concealLayoutPreserved:ed.concealLayoutPreserved}],Ep=new Array(d0).fill(!1);function FN(){for(let e=0;e<d0;e++)if(!Ep[e])return Ep[e]=!0,{index:e,isExhausted:!1};return{index:0,isExhausted:!0}}function GN(e,t){t||(Ep[e]=!1)}const pb=Object.freeze({});function VN(e={}){const{isEnabled:t=!0}=e,[n]=x.useState(()=>t?FN():null);if(x.useEffect(()=>{if(n!=null)return()=>GN(n.index,n.isExhausted)},[n]),Tl("useContainerReveal",`More than ${d0} 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:()=>pb,getContentRevealProps:()=>pb};const s=UN[n.index];return{getContainerProps:()=>B(s.marker),getContentRevealProps:(r={})=>{const{isRevealInverted:a=!1,isLayoutPreserved:i=!1}=r,o=a?i?s.concealLayoutPreserved:s.conceal:i?s.revealLayoutPreserved:s.reveal;return B(o)}}}const Yx={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 f0({label:e,inputID:t,labelID:n,isGroupLabel:s=!1,isLabelHidden:r=!1,isDisabled:a=!1,isOptional:i=!1,isRequired:o=!1,labelIcon:c,labelTooltip:u,description:d,descriptionID:f,className:h,style:p,xstyle:m,ref:b,...y}){const g=ke(),k=i?g("@astryx.field.optional"):o?g("@astryx.field.required"):null,v=s?"span":"label",w=!s&&t!=null,j=x.useRef(null),C=x.useMemo(()=>({get current(){var T;return t==null?null:((T=j.current)==null?void 0:T.ownerDocument.getElementById(t))??null},set current(T){}}),[t]),$=c0({containerRef:j,inputRef:C,disabled:!w}),E=l.jsxs(l.Fragment,{children:[c&&_s(c,{size:"sm",color:"inherit"}),e,k&&l.jsxs("span",{className:"x1sodnla x141an7d x1ltkj2j xv1l7n4",children:[l.jsx("span",{"aria-hidden":"true",children:" ∙ "}),k]}),u&&l.jsx(_i,{content:u,placement:"above",children:l.jsx(Ce,{icon:"info",size:"sm",color:"inherit"})})]});return l.jsxs(l.Fragment,{children:[l.jsx(v,{ref:b,id:n,htmlFor:s?void 0:t,...y,...U(P("field-label"),B(Yx.label,a&&Yx.labelDisabled,r&&Yx.srOnly,m),h,p),children:E}),d&&l.jsx("span",{ref:w?j:void 0,id:f,...w?$: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"}}[!!w<<1|!!r<<0],children:d})]})}f0.displayName="FieldLabel";const WN={warning:"warning",error:"error",success:"success"},Qx={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}},KN={warning:{kWkggS:"x24i8r5",kMwMTN:"xdhq94a",$$css:!0},error:{kWkggS:"x1pritpl",kMwMTN:"x1joocv1",$$css:!0},success:{kWkggS:"xu13z74",kMwMTN:"xltfdvo",$$css:!0}};function h0({ref:e,type:t,message:n,id:s,variant:r="attached",xstyle:a,className:i,style:o,...c}){const u=jN("slideDown"),d=Ml();return x.useEffect(()=>{n&&d(n,t==="error"?"assertive":"polite")},[d,n,t]),l.jsx("div",{ref:e,id:s,...c,...U(P("field-status",{type:t,variant:r}),B(Qx.base,u,r==="attached"?Qx.attached:Qx.detached,KN[t],a),i,o),children:r==="detached"?l.jsxs("span",{className:"x78zum5 x1cy8zhl xzye2dw",children:[l.jsx("span",{className:"x3nfvp2 x6s0dn4 x14o5nre x2lah0s",children:l.jsx(Ce,{icon:WN[t],size:"sm",color:"inherit",...P("field-status-icon",{type:t})})}),l.jsx("span",{children:n})]}):n})}h0.displayName="FieldStatus";const XN={x1tspnpo:"x1tspnpo",$$css:!0},Wh=x.createContext(null);Wh.displayName="CheckboxListContext";const cn={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}},gb={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},ZN={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},YN={sm:{kzqmXN:"xsmyaan",kZKoxP:"x1kpxq89",$$css:!0},md:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0}},QN={sm:{kzqmXN:"x1fsd2vl",kZKoxP:"x36qwtl",$$css:!0},md:{kzqmXN:"xsmyaan",kZKoxP:"x36qwtl",$$css:!0}},JN={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function O3({label:e,isLabelHidden:t=!1,description:n,onChange:s,changeAction:r,isLoading:a=!1,value:i,isDisabled:o=!1,htmlName:c,disabledMessage:u,isReadOnly:d=!1,isOptional:f=!1,isRequired:h=!1,size:p="md",onFocus:m,onBlur:b,labelIcon:y,status:g,width:k,xstyle:v,className:w,style:j,ref:C,...$}){const E=x.useId(),T=x.useId(),S=x.useId(),[,M]=x.useTransition(),[z,A]=x.useOptimistic(i),R=a||z!==i,I=o&&!!u,N=x.use(Wh),_=o&&(I||((N==null?void 0:N.hasDisabledMessage)??!1)),L=Is({placement:"above",focusTrigger:"always",isEnabled:I}),D=z==="indeterminate",O=z===!0,q=O||D,F=x.useCallback(Z=>{Z&&(Z.indeterminate=D)},[D]),X=[];n&&X.push(T),g!=null&&g.message&&X.push(S),I&&X.push(L.describedBy);const J=X.length>0?X.join(" "):void 0;return l.jsxs("div",{...U(P("checkbox-input",{size:p}),B(k!=null&&JN.width(k),v),w,j),children:[l.jsxs("div",{ref:Z=>{L.interactionRef(Z)},...B(cn.container,t&&cn.containerLabelHidden,!o&&XN),children:[l.jsxs("div",{...B(cn.checkboxWrapper,gb[p]),children:[l.jsx("input",{...$,ref:ct(C,F,L.positionRef),id:E,type:"checkbox",name:o?void 0:c,checked:O,disabled:o&&!_,"aria-disabled":_?"true":void 0,readOnly:d,required:h,onChange:Z=>{if(o||R||d)return;const te=Z.target.checked;s==null||s(te,Z),r&&!Z.defaultPrevented&&M(async()=>{A(te),await r(te,Z)})},onFocus:m,onBlur:b,"aria-readonly":d||void 0,"aria-describedby":J,"aria-invalid":(g==null?void 0:g.type)==="error"?!0:void 0,"aria-busy":R||void 0,...B(cn.input,gb[p],o&&cn.inputDisabled)}),l.jsx("div",{"aria-hidden":"true",...U(P("checkbox",{size:p,checked:O?"checked":D?"indeterminate":null,disabled:o?"disabled":null}),B(cn.checkbox,ZN[p],!o&&cn.checkboxFocus,q?cn.checkboxChecked:cn.checkboxUnchecked,o&&cn.checkboxDisabled,o&&!q&&cn.checkboxDisabledUnchecked)),children:R?l.jsx(En,{size:"sm",shade:"inherit"}):l.jsxs(l.Fragment,{children:[l.jsx("svg",{viewBox:"0 0 10 10",...B(cn.checkmark,YN[p],O&&cn.checkmarkVisible),children:l.jsx("path",{d:"M8.5 2.5L4 7.5L1.5 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}),l.jsx("div",{...B(cn.indeterminateMark,QN[p],D&&cn.indeterminateMarkVisible)})]})})]}),l.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:l.jsx(f0,{label:e,inputID:E,isLabelHidden:t,isDisabled:o,isOptional:f,isRequired:h,labelIcon:y,description:n,descriptionID:T})})]}),(g==null?void 0:g.message)&&l.jsx(h0,{type:g.type,message:g.message,id:S,variant:"detached"}),I&&L.renderTooltip(u)]})}O3.displayName="CheckboxInput";function B3({value:e,onChange:t,label:n,hasCloseOnSelect:s=!0,children:r,className:a,style:i,...o}){const c=x.useMemo(()=>({value:e,onChange:t,hasCloseOnSelect:s}),[e,t,s]);return l.jsx("div",{...o,role:"group","aria-label":n,...U({className:"x78zum5 xdt5ytf x1lsbc85"},{className:a,style:i}),children:l.jsx(o0,{value:c,children:r})})}B3.displayName="DropdownMenuRadioGroup";const Qi={root:{kzqmXN:"xh8yej3",kaIpWk:"x1ws5lxm",kMwMTN:"x1tgivj0",kWkggS:"xjbqb8w x1c52tdz",kkrTdU:"x1ypdohk",kI3sdo:"x1a2a7pz",$$css:!0},disabled:{kSiTet:"xbyyjgo",kkrTdU:"x1h6gzvc",$$css:!0},circle:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",kB7OPa:"x9f619",kMzoRj:"x1litavf",ksu8eU:"x1y0btm7",kaIpWk:"x16rqkct",k1ekBW:"xts7igz",kIyJzY:"xuedmi6 x12w9bfk",kAMwcw:"xlr8y92",kayTVb:"x1g77sc7 xozvky",keTefX:"x1lziwak x1jymrmb",$$css:!0},unchecked:{kVAM5u:"xvy26l8",kWkggS:"x10xzikg",$$css:!0},checked:{kVAM5u:"xad5do",kWkggS:"x1ewilqj",$$css:!0},dot:{kaIpWk:"x16rqkct",kWkggS:"x1azo05",$$css:!0}},eM={sm:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0},md:{kzqmXN:"x17z2i9w",kZKoxP:"x17rw0jw",$$css:!0}},tM={sm:{kzqmXN:"x1v4s8kt",kZKoxP:"xols6we",$$css:!0},md:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0}};function q3({value:e,label:t,description:n,icon:s,isDisabled:r=!1,endContent:a,xstyle:i,className:o,style:c,...u}){const d=i0(),f=Xz();if(!f)throw new Error("DropdownMenuRadioItem must be used within a DropdownMenuRadioGroup");const h=(d==null?void 0:d.menuSize)??"md",p=h==="sm"?"sm":"md",m=f.value===e,b=x.useCallback(()=>{r||(f.onChange(e),f.hasCloseOnSelect&&(d==null||d.closeMenu()))},[r,f,e,d]),y=x.useCallback(g=>l0(g,r),[r]);return l.jsx(Ii,{...u,role:"menuitemradio","aria-checked":m,tabIndex:r?void 0:-1,onPointerMove:y,marker:l.jsx("span",{"aria-hidden":"true",...U(P("dropdown-menu-radio",{size:p,checked:m?"checked":null,disabled:r?"disabled":null}),B(Qi.circle,eM[p],m?Qi.checked:Qi.unchecked)),children:m&&l.jsx("span",{...U(P("dropdown-menu-radio-dot",{size:p,checked:"checked",disabled:r?"disabled":null}),B(Qi.dot,tM[p]))})}),startContent:s?_s(s,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:a,onClick:b,isDisabled:r,xstyle:[Qi.root,r&&Qi.disabled,i],...U(P("dropdown-menu-item",{size:h}),{className:o,style:c})})}q3.displayName="DropdownMenuRadioItem";function pn({icon:e,...t}){return l.jsx(de,{...t,icon:e,isIconOnly:!0})}pn.displayName="IconButton";const mb={container:{kB7OPa:"x9f619",kZCmMZ:"x1c35znw",kwRFfy:"x64h4k7",kLKAdn:"x14m0hsi",kGO01o:"xc1wllq",$$css:!0}},nM={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}},sM={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}},rM={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}},aM={card:nM,section:sM,dialog:rM},iM={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}},oM={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}},lM={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}},cM={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}},uM={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}},dM={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}},fM={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}},hM={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}},xM={containerMaxHeight:e=>[{"--container-max-height":e!=null?"x18nyedi":e,$$css:!0},{"--x---container-max-height":e??void 0}]};function H3({padding:e="spacing4",paddingOuterX:t,paddingOuterY:n,paddingInnerX:s,paddingInnerY:r,useThemeDefault:a,maxHeight:i}){const o=t??e,c=n??e,u=s??e,d=r??e,f=i?xM.containerMaxHeight(i):null;if(a){const h=aM[a];return[mb.container,h.containerPaddingInlineStart,h.containerPaddingInlineEnd,h.containerPaddingBlockStart,h.containerPaddingBlockEnd,h.layoutPaddingOuterX,h.layoutPaddingOuterY,h.layoutPaddingInnerX,h.layoutPaddingInnerY,f]}return[mb.container,iM[o],oM[o],lM[c],cM[c],uM[o],dM[c],fM[u],hM[d],f]}const Jx={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}},pM={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}},gM={none:{"--_card-elevation":"xw28qpl",$$css:!0},low:{"--_card-elevation":"x1nn8khe",$$css:!0},med:{"--_card-elevation":"x1ovzxg0",$$css:!0},high:{"--_card-elevation":"xnpe7fx",$$css:!0}},mM={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 Kh({width:e,height:t,maxWidth:n,minHeight:s,children:r,padding:a,variant:i="default",elevation:o="none",xstyle:c,className:u,style:d,ref:f,...h}){const p=t!=null&&t!=="auto",m=a==null,b=a??4,y=T5[b];return l.jsx("div",{ref:f,...U(P("card",{variant:i}),B(Jx.card,pM[i],gM[o],p&&Jx.scrollable,mM.sizing(e??null,t??null,n??null,s??null),...H3(m?{useThemeDefault:"card"}:{paddingInnerX:y,paddingInnerY:y,paddingOuterX:y,paddingOuterY:y}),!m&&b!==4&&jl[b],!m&&b!==4&&Sl[b],!m&&b!==4&&Cl[b],!m&&b!==4&&$l[b],i==="default"&&Jx.withBorder,c),u,d),...h,children:r})}Kh.displayName="Card";const td={base:{k1xSpc:"xjp7ctv",kMwMTN:"x1tgivj0",kMv6JI:"x9ynric",$$css:!0},light:{kQNsl9:"x19aimcq",$$css:!0},dark:{kQNsl9:"xntwwlm",$$css:!0},system:{kQNsl9:"x108lcm5",$$css:!0}},Tp=Ih.createContext(!1);Tp.displayName="ThemeNestingContext";const e1=new Set;function yM(e){const t=x.useId();x.useInsertionEffect(()=>{if(e.__built)return;const n=`astryx-theme-${e.name}`;if(e1.has(n))return;Xm(`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}=OE(e);if(!(!s&&!r)){if(s){const a=document.createElement("style");a.setAttribute(jn("theme-prose"),e.name),a.setAttribute(jn("id"),t),a.textContent=`@layer reset {
82
- ${s}
83
- }`,document.head.appendChild(a)}if(r){const a=document.createElement("style");a.setAttribute(jn("theme"),e.name),a.setAttribute(jn("id"),t),a.textContent=`@layer astryx-theme {
84
- ${r}
85
- }`,document.head.appendChild(a)}return e1.add(n),()=>{const a=document.querySelector(`style[${jn("theme-prose")}="${e.name}"][${jn("id")}="${t}"]`),i=document.querySelector(`style[${jn("theme")}="${e.name}"][${jn("id")}="${t}"]`);a==null||a.remove(),i==null||i.remove(),e1.delete(n)}}},[e,t])}function kM(e,t,n){er(()=>{if(!e&&!(typeof document>"u"))return t==="light"||t==="dark"?document.documentElement.setAttribute("data-theme",t):document.documentElement.removeAttribute("data-theme"),document.documentElement.setAttribute(jn("theme"),n),()=>{document.documentElement.removeAttribute("data-theme"),document.documentElement.removeAttribute(jn("theme"))}},[e,t,n])}function P3({theme:e,mode:t="system",children:n}){const s=x.use(Tp);$E(e),yM(e),kM(s,t,e.name);const r=t==="dark"?td.dark:t==="light"?td.light:td.system,a=x.useMemo(()=>({theme:e,mode:t}),[e,t]);return l.jsx(Bh,{value:a,children:l.jsx(Tp,{value:!0,children:l.jsx("div",{...B(td.base,r),"data-astryx-theme":e.name,"data-theme":t==="system"?void 0:t,children:n})})})}P3.displayName="Theme";function U3({mode:e,children:t}){return l.jsx("div",{[jn("media")]:e,className:"xjp7ctv x1tgivj0",children:t})}U3.displayName="MediaTheme";const F3="--color-syntax-";function bM(e){return F3+e}const vM=Object.keys(Ym).map(e=>e.replace(F3,""));function wM(e){const t={};for(const n of vM)t[bM(n)]=e.tokens[n];return t}const G3=x.createContext(null);G3.displayName="SyntaxThemeContext";function V3({theme:e,children:t}){const n=x.useMemo(()=>wM(e),[e]),s=x.useMemo(()=>({theme:e}),[e]);return l.jsx(G3,{value:s,children:l.jsx("div",{style:n,"data-astryx-syntax-theme":e.name,children:t})})}V3.displayName="SyntaxTheme";function W3({type:e,body:t,endContent:n,isAutoHide:s,autoHideDuration:r,isExiting:a=!1,onDismiss:i}){const o=ke(),c=x.useRef(null),u=x.useRef(!1),d=x.useRef(r),f=x.useRef(null),h=x.useRef(i);h.current=i;const p=x.useCallback(()=>{!s||u.current||(c.current&&clearTimeout(c.current),f.current=Date.now(),c.current=setTimeout(()=>{h.current("auto")},d.current))},[s]),m=x.useCallback(()=>{if(!(!s||u.current)&&(u.current=!0,c.current&&(clearTimeout(c.current),c.current=null),f.current!=null)){const w=Date.now()-f.current;d.current=Math.max(d.current-w,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",m),window.addEventListener("focus",b),()=>{window.removeEventListener("blur",m),window.removeEventListener("focus",b)}},[s,m,b]);const y=x.useCallback(()=>{i("manual")},[i]),g=e==="error",{mode:k}=qh(),v=g||k==="light"?"dark":"light";return l.jsx("div",{role:g?"alert":"status","aria-live":g?"assertive":"polite","aria-atomic":"true",onMouseEnter:m,onMouseLeave:b,onFocusCapture:m,onBlurCapture:b,...U(P("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"}}[!!g<<1|!!a<<0]),children:l.jsx(U3,{mode:v,children:l.jsxs("div",{className:"x78zum5 x1cy8zhl xjcht0a xh8yej3",children:[l.jsx("div",{className:"x98rzlu xeuugli",children:t}),l.jsxs("div",{className:"x2lah0s x78zum5 x6s0dn4 x1txdalj xacfrgf xmequkd",children:[n,l.jsx(de,{variant:"ghost",size:"sm",icon:l.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),label:o("@astryx.toast.dismiss"),onClick:y,isIconOnly:!0})]})]})})})}W3.displayName="Toast";const Xh=x.createContext(null);Xh.displayName="ToastContext";const Zl={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 zp(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(zp).filter(Boolean).join(" ");if(x.isValidElement(e)){const{children:t}=e.props;return zp(t)}return""}function x0({position:e="bottomEnd",maxVisible:t=5,inset:n,isTopLayer:s=!0,children:r}){const a=ke(),[i,o]=x.useState([]),[c,u]=x.useState(new Set),d=x.useRef(i);d.current=i;const f=x.useRef(null),h=x.useRef(new Set),p=x.useRef(null),m=x.useRef(null),b=x.useRef(null),y=x.useCallback(M=>{if(!M)return null;const z=M.querySelectorAll(E3);for(const A of z)if(!(A.getAttribute("tabindex")==="-1"||A.hasAttribute("disabled")||A.getAttribute("aria-disabled")==="true"))return A;return null},[]),g=Ml(),k=x.useCallback(M=>{const{uniqueID:z,collisionBehavior:A="overwrite"}=M.options;if(z&&A==="ignore"&&d.current.some(I=>I.options.uniqueID===z))return;const R=zp(M.options.body);R&&g(R,M.options.type==="error"?"assertive":"polite"),o(I=>z&&I.find(_=>_.options.uniqueID===z)?I.map(_=>_.options.uniqueID===z?M:_):[...I,M])},[g]),v=x.useCallback((M,z)=>{var _,L;if(h.current.has(M))return;h.current.add(M);const A=d.current.find(D=>D.id===M);A&&((L=(_=A.options).onHide)==null||L.call(_,z));const R=f.current,I=document.activeElement,N=(R==null?void 0:R.querySelector(`[data-toast-id="${M}"]`))??null;if(N&&I instanceof Node&&N.contains(I))if(m.current=M,d.current.filter(O=>O.id!==M).length>0){const O=d.current.findIndex(F=>F.id===M),q=d.current[O+1]??d.current[O-1];b.current=q?q.id:"restore"}else b.current="restore";u(D=>D.has(M)?D:new Set(D).add(M))},[]),w=x.useCallback(M=>{h.current.delete(M),u(z=>{if(!z.has(M))return z;const A=new Set(z);return A.delete(M),A}),o(z=>z.filter(A=>A.id!==M))},[]);x.useLayoutEffect(()=>{const M=m.current,z=b.current;if(M==null||z==null||i.some(I=>I.id===M))return;m.current=null,b.current=null;const A=f.current;if(z!=="restore"&&A){const I=A.querySelector(`[data-toast-id="${z}"]`),N=y(I)??I;if(N){N.focus();return}}const R=p.current;p.current=null,R&&R.isConnected?R.focus():A&&A.focus()},[i,y]);const j=x.useCallback(M=>d.current.find(z=>z.options.uniqueID===M),[]),C=x.useMemo(()=>({addToast:k,removeToast:v,findByUniqueID:j}),[k,v,j]),$=i.slice(-t),E={};n!=null&&n.top&&(E.top=n.top),n!=null&&n.bottom&&(E.bottom=n.bottom),n!=null&&n.start&&(E.insetInlineStart=n.start),n!=null&&n.end&&(E.insetInlineEnd=n.end),x.useEffect(()=>{if(!s)return;const M=f.current;if(M&&typeof M.showPopover=="function")try{M.showPopover()}catch{}},[s]);const T=i.length>0;x.useEffect(()=>{if(!T)return;const M=z=>{if(z.key!=="F6")return;const A=f.current;if(!A)return;const R=document.activeElement;if(R instanceof Node&&A.contains(R))return;z.preventDefault(),R instanceof HTMLElement&&(p.current=R);const I=A.querySelectorAll("[data-toast-id]"),N=I[I.length-1]??null;(y(N)??N??A).focus()};return document.addEventListener("keydown",M),()=>{document.removeEventListener("keydown",M)}},[T,y]);const S=e==="topEnd"?Zl.topEnd:e==="topStart"?Zl.topStart:e==="bottomStart"?Zl.bottomStart:Zl.bottomEnd;return l.jsxs(Xh,{value:C,children:[r,l.jsx("div",{ref:f,role:"region","aria-label":a("@astryx.toast.viewport"),tabIndex:-1,popover:s?"manual":void 0,...U(B(Zl.viewport,S),{style:Object.keys(E).length>0?E:void 0}),children:$.map(M=>{const z=M.options,A=z.type??"info",R=z.isAutoHide??A!=="error",I=z.autoHideDuration??5e3,N=c.has(M.id);return l.jsx("div",{"data-toast-id":M.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"}}[!!N<<0],onTransitionEnd:N?_=>{_.propertyName==="grid-template-rows"&&w(M.id)}:void 0,children:l.jsx("div",{className:"xb3r6kr",children:l.jsx(W3,{type:A,body:z.body,endContent:z.endContent,isAutoHide:R,autoHideDuration:I,isExiting:N,onDismiss:_=>v(M.id,_)})})},M.id)})})]})}x0.displayName="ToastViewport";const yb='button, [role="button"]';function kb(e){return e.matches(yb)?e:e.querySelector(yb)}const qr={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 K3({children:e,anchorRef:t,content:n,placement:s="below",alignment:r="start",isOpen:a,onOpenChange:i,isEnabled:o=!0,width:c,label:u,role:d="dialog",isModal:f,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:m,hasLightDismiss:b=!0,hasEscapeDismiss:y=!0,xstyle:g,className:k,style:v,"data-testid":w}){const j=x.useRef(null),C=a!==void 0,$=x.useRef(0),E=x.useCallback(()=>{i==null||i(!0)},[i]),T=x.useCallback(()=>{$.current=Date.now(),i==null||i(!1)},[i]),S=zl({dialogLabel:u,role:d,isModal:f,hasLightDismiss:b,hasEscapeDismiss:y,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:m,onShow:E,onHide:T}),M=x.useCallback(()=>{o&&(Date.now()-$.current<50||S.toggle())},[o,S]),z=x.useCallback(N=>{(N.key==="Enter"||N.key===" ")&&(N.preventDefault(),M())},[M]),A=x.useCallback(N=>{N.setAttribute("aria-haspopup",S.triggerProps["aria-haspopup"]),N.setAttribute("aria-expanded",String(S.triggerProps["aria-expanded"])),N.setAttribute("aria-controls",S.triggerProps["aria-controls"]),N.addEventListener("click",M);const _=N.tagName!=="BUTTON"&&N.getAttribute("role")==="button";return _&&N.addEventListener("keydown",z),()=>{N.removeAttribute("aria-haspopup"),N.removeAttribute("aria-expanded"),N.removeAttribute("aria-controls"),N.removeEventListener("click",M),_&&N.removeEventListener("keydown",z)}},[S,M,z]);er(()=>{if(!t)return;const N=t.current;if(!N)return;const _=kb(N);if(_||oi(),!_)return;S.triggerRef(N);const L=A(_);return()=>{S.triggerRef(null),L()}},[t,S,A]),er(()=>{if(t||typeof e=="function")return;const N=j.current;if(!N)return;S.triggerRef(N);const _=kb(N);if(_||oi(),!_)return;const L=A(_);return()=>{S.triggerRef(null),L()}},[t,S,A]),er(()=>{C&&(a&&!S.isOpen?S.show():!a&&S.isOpen&&S.hide())},[a,C,S]);const R=c?qr.customWidth(c):qr.matchTrigger;if(t&&e==null)return l.jsx(l.Fragment,{children:S.render(l.jsx("div",{"data-testid":w,...U(P("popover"),B(qr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[R,qr.gap,Js[s]]})});if(typeof e=="function"){const N={ref:S.triggerRef,onClick:M,"aria-haspopup":"dialog","aria-expanded":S.isOpen,"aria-controls":S.id};return l.jsxs(l.Fragment,{children:[e(N),S.render(l.jsx("div",{"data-testid":w,...U(P("popover"),B(qr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[R,qr.gap,Js[s]]})]})}return l.jsxs(l.Fragment,{children:[l.jsx(u0,{value:"button",children:l.jsx("div",{ref:j,className:"x3nfvp2",children:e})}),S.render(l.jsx("div",{"data-testid":w,...U(P("popover"),B(qr.contentPadding,g),k,v),children:n}),{placement:s,alignment:r,xstyle:[R,qr.gap,Js[s]]})]})}K3.displayName="Popover";const t1={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 jM(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function SM(e={}){const{placement:t="above",alignment:n="center",delay:s=300,hideDelay:r=200,focusTrigger:a="auto",isEnabled:i=!0,label:o,isOpen:c,isDefaultOpen:u=!1,onShow:d,onHide:f}=e,h=t==="above"||t==="below"?t1.marginBlock:t1.marginInline,p=El({mode:"context",onShow:d,onHide:f}),m=x.useMemo(()=>[t1.container,h],[h]),b=x.useRef(null),y=x.useRef(null),g=x.useRef(null),k=x.useRef(!1),v=x.useRef(!1),w=x.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),y.current&&(clearTimeout(y.current),y.current=null)},[]),j=x.useCallback(()=>{!i||c===!1||(w(),b.current=setTimeout(()=>{p.show()},s))},[i,c,w,p,s]),C=x.useCallback(()=>{c!==!0&&(w(),y.current=setTimeout(()=>{k.current||p.hide()},r))},[c,w,p,r]),$=x.useCallback(()=>{j()},[j]),E=x.useCallback(()=>{C()},[C]),T=x.useCallback(()=>{if(i){if(v.current){v.current=!1;return}w(),p.show()}},[i,w,p]),S=x.useCallback(I=>{const N=I.relatedTarget,_=document.getElementById(p.id);_!=null&&_.contains(N)||C()},[p.id,C]),M=x.useCallback(I=>{I.key==="Escape"&&(I.stopPropagation(),w(),p.hide())},[w,p]),z=x.useCallback(I=>{g.current&&(g.current.removeEventListener("mouseenter",$),g.current.removeEventListener("mouseleave",E),g.current.removeEventListener("focusin",T),g.current.removeEventListener("focusout",S),g.current.removeEventListener("keydown",M)),I&&(I.addEventListener("mouseenter",$),I.addEventListener("mouseleave",E),(a==="always"||a==="auto"&&jM(I))&&(I.addEventListener("focusin",T),I.addEventListener("focusout",S)),I.addEventListener("keydown",M)),g.current=I},[a,$,E,T,S,M]),A=x.useCallback(I=>{p.ref(I),z(I)},[p,z]);x.useEffect(()=>()=>{w()},[w]),x.useEffect(()=>{u&&p.show()},[]),x.useEffect(()=>{c!==void 0&&(c?(w(),p.show()):(w(),p.hide()))},[c,w,p]);const R=x.useCallback((I,N)=>{const _=(N==null?void 0:N.placement)??t,L=P("hovercard").className,D={placement:_,alignment:(N==null?void 0:N.alignment)??n,role:o?"dialog":"group","aria-label":o||void 0,xstyle:[m,Js[_],N==null?void 0:N.xstyle],className:N!=null&&N.className?`${L} ${N.className}`:L,style:N==null?void 0:N.style,as:"span"};return p.render(l.jsx("span",{className:"x1lliihq x1vlblms xvmdzux x126nfab x1t818jl",onMouseEnter:()=>{k.current=!0,w()},onMouseLeave:()=>{k.current=!1,C()},onKeyDown:O=>{var q;O.key==="Escape"&&(O.stopPropagation(),v.current=!0,w(),p.hide(),(q=g.current)==null||q.focus())},onBlur:O=>{var X;const q=O.relatedTarget;O.currentTarget.contains(q)||(X=g.current)!=null&&X.contains(q)||C()},children:I}),D)},[p,t,n,o,w,C,m]);return{ref:A,positionRef:p.ref,interactionRef:z,anchorId:p.anchorId,describedBy:p.id,renderHoverCard:R,show:p.show,hide:p.hide}}function CM(e){return typeof e=="string"||typeof e=="number"}function $M(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function X3({children:e,content:t,placement:n="above",alignment:s="center",delay:r=300,hideDelay:a=200,focusTrigger:i="auto",isEnabled:o=!0,label:c,onOpenChange:u,hasHoverIndication:d="auto",isOpen:f,isDefaultOpen:h,xstyle:p,className:m,style:b}){const y=x.useRef(null),g=CM(e),k=d===!0||d==="auto"&&g,v=x.useCallback(()=>{u==null||u(!0)},[u]),w=x.useCallback(()=>{u==null||u(!1)},[u]),j=SM({placement:n,alignment:s,delay:r,hideDelay:a,focusTrigger:i,isEnabled:o,label:c,isOpen:f,isDefaultOpen:h,onShow:v,onHide:w});er(()=>{if(g)return;const $=y.current;if(!$)return;const E=$.firstElementChild;if(!E)return;j.ref(E);const T=E.getAttribute("aria-describedby");return E.setAttribute("aria-describedby",$M(T,j.describedBy)??""),()=>{j.ref(null),T?E.setAttribute("aria-describedby",T):E.removeAttribute("aria-describedby")}},[g,j.ref,j.describedBy]);const C=j.renderHoverCard(t,{xstyle:p,className:m,style:b});return g?l.jsxs(l.Fragment,{children:[l.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]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{ref:y,className:"xjp7ctv",children:e}),C]})}X3.displayName="HoverCard";const bb=new Map,EM=/\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/,TM=/\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/,zM=/\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/,NM=/\b(important|inherit|initial|unset|revert|auto|none)\b/,MM=/\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/,AM=/\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 Z3(e){const t=bb.get(e);if(t!==void 0)return t;const n=RM(e);return bb.set(e,n),n}function RM(e){const t=IM(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 IM(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:EM},{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:NM},{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:TM},{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:zM},{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:MM},{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:AM},{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 vb=2e3,_M=800;async function DM(){return typeof scheduler<"u"&&typeof scheduler.yield=="function"?scheduler.yield():new Promise(e=>setTimeout(e,0))}function Y3(e,t,n,s){const r=[];let a=n;const i=Math.min(s,e.length);for(;a<i;){let o=!1;for(const c of t.patterns){c.anchored.lastIndex=a;const u=c.anchored.exec(e);if(u&&u.index===a&&u[0].length>0){c.type!==t.defaultType&&r.push({type:c.type,start:a-n,end:a-n+u[0].length}),a+=u[0].length,o=!0;break}}o||a++}return r}function LM(e,t){const n=Z3(t);if(!n)return[];const s=[];let r=0;for(let a=0;a<=e.length;a++)(a===e.length||e[a]===`
86
- `)&&(s.push(Y3(e,n,r,a)),r=a+1);return s}async function OM(e,t,n){const s=Z3(t);if(!s)return[];const r=[];let a=0,i=0;for(let o=0;o<=e.length;o++)if((o===e.length||e[o]===`
87
- `)&&(r.push(Y3(e,s,a,o)),i+=o-a+1,a=o+1,i>=_M&&o<e.length)){if(n!=null&&n.aborted)return r;i=0,await DM()}return r}function BM(e,t){const n=[0];for(let a=0;a<t.length;a++)t[a]===`
88
- `&&n.push(a+1);const s=Array.from({length:n.length},()=>[]);let r=0;for(const a of e){for(;r<n.length-1&&a.start>=n[r+1];)r++;const i=n[r];s[r].push({type:a.type,start:a.start-i,end:a.end-i})}return s}const qM=`:root {
89
- ${Object.entries(Ym).map(([e,t])=>` ${e}: ${t};`).join(`
90
- `)}
91
- }`,HM=`
92
- ${qM}
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 wb=!1;function Zh(){if(wb||typeof document>"u")return;const e=document.createElement("style");e.setAttribute("data-astryx-highlight-styles",""),e.textContent=HM,document.head.appendChild(e),wb=!0}const PM=["keyword","string","comment","number","function","type","tag","attribute","property","operator","constant","punctuation","variable"],jb=new Set(PM);let nd=null;function UM(e){if(jb.has(e)||(jb.add(e),Zh(),typeof document>"u"))return;if(!nd){const s=document.createElement("style");if(s.setAttribute("data-astryx-highlight-dynamic",""),document.head.appendChild(s),nd=s.sheet??null,!nd)return}const t=`astryx-${e}`,n=`var(--color-syntax-${e}, currentColor)`;nd.insertRule(`.astryx-codeblock code::highlight(${t}), .astryx-codeeditor code::highlight(${t}) { color: ${n}; }`)}function FM(){const e=new Map;return t=>{let n=e.get(t);if(n)return n;UM(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 Q3(e,t,n,s){if(t.length===0)return;const r=e.firstChild;if(!r||r.nodeType!==Node.TEXT_NODE)return;const a=r.length;for(const i of t){if(i.start>=a||i.end<=0)continue;const o=Math.min(i.start,a),c=Math.min(i.end,a),u=s(i.type);try{const d=new Range;d.setStart(r,o),d.setEnd(r,c),u.add(d),n.push({range:d,highlight:u})}catch{}}}function n1(e){for(const{range:t,highlight:n}of e)n.delete(t)}function GM(e,t,n,s){const r=[],a=e.querySelectorAll("[data-line]");for(let i=0;i<a.length;i++){const o=n+i,c=t[o];c&&c.length>0&&Q3(a[i],c,r,s)}return r}function VM(e,t){Zh();const n=FM(),s=[],r=[];let a=0;for(let d=0;d<e.children.length;d++){const f=e.children[d],h=f.querySelectorAll("[data-line]");h.length>0&&f.tagName==="DIV"&&!f.hasAttribute("data-line")&&(s.push(f),r.push(a),a+=h.length)}if(s.length===0){const d=[],f=e.querySelectorAll("[data-line]");for(let h=0;h<f.length;h++){const p=t[h];p&&p.length>0&&Q3(f[h],p,d,n)}return()=>n1(d)}const i=new Map,o=new Map;function c(d,f){if(i.has(d))return;const h=GM(d,t,r[f],n);i.set(d,h)}function u(d){const f=i.get(d);f&&(n1(f),i.delete(d))}for(let d=0;d<s.length;d++){const f=s[d],h=m=>{m.skipped?u(f):c(f,d)};f.addEventListener("contentvisibilityautostatechange",h),o.set(f,h);const p=f;typeof p.checkVisibility=="function"?p.checkVisibility({checkVisibilityCSS:!0,contentVisibilityAuto:!0})&&c(f,d):d<5&&c(f,d)}return function(){for(const[f,h]of o)f.removeEventListener("contentvisibilityautostatechange",h);o.clear();for(const f of i.values())n1(f);i.clear()}}const WM={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}},KM={"--_codeblock-gutter-width":"xtk08jq",$$css:!0},p0={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=>[KM,{"--x---_codeblock-gutter-width":`${e}ch`!=null?`${e}ch`:void 0}]},vr={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}},XM=20,ZM=100,Sb=x.memo(function({lines:t,startIndex:n,highlightSet:s,renderLineContent:r,lineNumbers:a}){return l.jsx(l.Fragment,{children:t.map((i,o)=>{const c=n+o;return l.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"}}[!!a<<1|!!((s==null?void 0:s.has(c+1))??!1)<<0],children:r(i,c)},c)})})});function J3(e,t,n,s,r=XM){if(r=Math.max(1,Math.floor(r)),e.length<ZM)return l.jsx(Sb,{lines:e,startIndex:0,highlightSet:t,renderLineContent:n,lineNumbers:s});const a=[];for(let i=0;i<e.length;i+=r){const o=Math.min(i+r,e.length),c=e.slice(i,o),u=`${c.length}lh`;a.push(l.jsx("div",{...U({className:"xb5mbof"},{style:{containIntrinsicBlockSize:`auto ${u}`}}),children:l.jsx(Sb,{lines:c,startIndex:i,highlightSet:t,renderLineContent:n,lineNumbers:s})},i))}return a}function e4(){return typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u"}function YM(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}function QM(e,t,n){const[s,r]=x.useState(null),a=x.useMemo(()=>n?BM(n(e,t),e):e.length>=vb?null:LM(e,t),[e,t,n]);return x.useEffect(()=>{if(e.length<vb||n)return;const i=new AbortController;async function o(){try{const c=await OM(e,t,i.signal);i.signal.aborted||r({code:e,language:t,tokens:c})}catch{i.signal.aborted||r({code:e,language:t,tokens:[]})}}return o(),()=>{i.abort()}},[e,t,n]),a??((s==null?void 0:s.code)===e&&s.language===t?s.tokens:[])}function JM(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 a=Math.min(r.end,e.length);n.push(l.jsx("span",{className:`astryx-token-${r.type} xds-token-${r.type}`,children:e.slice(r.start,a)},`${r.start}-${r.type}`)),s=a}return s<e.length&&n.push(e.slice(s)),n.length>0?n:"​"}function eA({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:a,maxDigits:i}){x.useInsertionEffect(()=>{Zh()},[]);const o=x.useCallback((c,u)=>{const d=t[u]??[];return l.jsx("span",{className:"xeuugli",children:JM(c,d)})},[t]);return l.jsx("code",{...B(vr.code,r,s&&vr.codeWrapped,a&&vr.codeNumbered,a&&p0.gutterWidth(i)),children:J3(e,n,o,a)})}function tA({lines:e,tokenLines:t,highlightSet:n,isWrapped:s,sizeStyle:r,hasLineNumbers:a,maxDigits:i}){const o=x.useRef(null);x.useEffect(()=>{if(!e4())return;Zh();const u=o.current;if(!(!u||t.length===0))return VM(u,t)},[t]);const c=x.useCallback(u=>u||"​",[]);return l.jsx("code",{ref:o,...B(vr.code,r,s&&vr.codeWrapped,a&&vr.codeNumbered,a&&p0.gutterWidth(i)),children:J3(e,n,c,a)})}function t4({code:e,language:t="plaintext",title:n,hasLanguageLabel:s=!0,hasLineNumbers:r=!1,highlightLines:a,hasCopyButton:i=!0,onCopy:o,isWrapped:c=!1,maxHeight:u,isCollapsible:d=!1,collapsibleThreshold:f=10,size:h="md",width:p="fit-content",container:m="card",tokenizer:b,highlightMode:y="auto",syntaxTheme:g,xstyle:k,className:v,style:w,ref:j,...C}){const $=ke(),[E,T]=x.useState(!1),S=x.useRef(null),M=Ml();x.useEffect(()=>()=>{S.current!=null&&clearTimeout(S.current)},[]);const z=y==="spans"||y==="auto"&&!e4()||y==="auto"&&YM(),A=x.useMemo(()=>{const pe=e.split(`
137
- `);return pe.length>1&&pe[pe.length-1]===""&&pe.pop(),pe},[e]),R=QM(e,t,b),I=x.useMemo(()=>a?new Set(a):null,[a]),N=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),T(!0),M($("@astryx.codeBlock.copied")),o==null||o(),S.current!=null&&clearTimeout(S.current),S.current=setTimeout(()=>{S.current=null,T(!1)},2e3)}catch{}},[e,o,M,$]),_=h==="sm"?vr.sizeSm:vr.sizeMd,L=String(A.length).length,D=s&&t!=="plaintext"?t:null,O=n!=null||D!=null,q=d&&A.length>=f,[F,X]=x.useState(!1),J=x.useId(),Z=x.useRef(null),te=u?{maxHeight:typeof u=="number"?`${u}px`:u}:void 0,Q=l.jsx(Ce,{icon:E?"check":"copy",size:"sm",color:"inherit"}),K=i?l.jsx("button",{type:"button",onClick:pe=>{pe.stopPropagation(),N()},"aria-label":$(E?"@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"}}[!O<<0],children:Q}):null,re=O?l.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:[l.jsx("div",{role:q?"button":void 0,tabIndex:q?0:void 0,"aria-expanded":q?!F:void 0,"aria-controls":q?J:void 0,onClick:q?()=>X(pe=>!pe):void 0,onKeyDown:q?pe=>{(pe.key==="Enter"||pe.key===" ")&&(pe.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"}}[!!q<<0],children:l.jsxs("span",{className:"x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j",children:[q&&l.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:l.jsx(Ce,{icon:"chevronRight",size:"xsm",color:"inherit"})}),n,n&&D?" — ":"",D]})}),K]}):null,oe=l.jsx("div",{ref:Z,tabIndex:0,role:"group","aria-label":D??$("@astryx.codeBlock.code"),...U({className:"xw2csxc x1odjw0f"},{style:te}),children:l.jsx("div",{...{0:{className:"x78zum5 x1pshirs"},1:{className:"x78zum5 x1pshirs x1ajqlyv"}}[!!(O&&!r)<<0],children:z?l.jsx(eA,{lines:A,tokenLines:R,highlightSet:I,isWrapped:c,sizeStyle:_,hasLineNumbers:r,maxDigits:L}):l.jsx(tA,{lines:A,tokenLines:R,highlightSet:I,isWrapped:c,sizeStyle:_,hasLineNumbers:r,maxDigits:L})})}),be=l.jsxs("pre",{ref:j,...U(P("codeblock",{size:h,language:t,container:m}),B(vr.root,p0.width(p),WM[m],k),v,w),...C,children:[re,q?l.jsx("div",{id:J,inert:F?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!F<<0],children:l.jsx("div",{className:"xb3r6kr x2lwn1j",children:oe})}):oe,!O&&K]});return g?l.jsx(V3,{theme:g,children:be}):be}t4.displayName="CodeBlock";const nA={base:{kMv6JI:"x9m5x89",kGuDYH:"xp03k98",kLWn49:"x15bjb6t",kWkggS:"xwmxj5m",kg3NbH:"x7a5moj",k8WAf4:"x1hp7d8q",kaIpWk:"xx3sua9",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0}},sA={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},rA={inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}};function g0({children:e,color:t="primary",size:n,xstyle:s,className:r,style:a,ref:i,...o}){return l.jsx("code",{ref:i,...o,...U(P("code",{color:t}),B(nA.base,sA[t],n&&rA[n],s),r,a),children:e})}g0.displayName="Code";const m0=x.createContext(null);m0.displayName="DialogContext";function aA(){return x.use(m0)}function iA(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,a=Math.sqrt(s*s+r*r)||1;return{x:Math.round(s/a*t),y:Math.round(r/a*t)}}const Ia={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}},oA={ks0D6T:"x95b5qq",$$css:!0},lA={kogj98:"x1ghz6dp",$$css:!0},s1={sizing:(e,t)=>[oA,{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)=>[lA,{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 sd(e){return typeof e=="number"?`${e}px`:e}function cA(e){const{top:t,bottom:n,start:s,end:r}=e;return{top:t!==void 0?sd(t):"auto",bottom:n!==void 0?sd(n):"auto",insetInlineStart:s!==void 0?sd(s):"auto",insetInlineEnd:r!==void 0?sd(r):"auto"}}function Ls({isOpen:e,isInline:t=!1,onOpenChange:n,width:s=400,maxHeight:r="75vh",position:a,variant:i="standard",purpose:o="info",padding:c,children:u,xstyle:d,className:f,style:h,ref:p,...m}){const b=c==null,y=c??4,g=T5[y],k=i==="fullscreen",v=x.useId(),w=x.useMemo(()=>({isInline:t,titleId:v}),[t,v]),j=m["aria-label"]!=null||m["aria-labelledby"]!=null,C=x.useRef(null),$=x.useCallback(L=>{if(C.current=L,!L||j)return;L.querySelector(`#${CSS.escape(v)}`)!=null?L.setAttribute("aria-labelledby",v):L.removeAttribute("aria-labelledby")},[v,j]),E=x.useRef(null),T=o!=="required",S=o==="info";x.useEffect(()=>{var D;if(t)return;const L=C.current;if(L)if(e){E.current=document.activeElement;const O=E.current;if(O&&O!==document.body){const q=iA(O);L.style.setProperty("--dialog-dir-x",`${q.x}px`),L.style.setProperty("--dialog-dir-y",`${q.y}px`)}else L.style.setProperty("--dialog-dir-x","0px"),L.style.setProperty("--dialog-dir-y","16px");if(!L.open){L.showModal();const q=L.querySelector("[data-autofocus]");q&&q.focus()}}else L.open&&L.close(),(D=E.current)==null||D.focus(),E.current=null},[e,t]),I3(e&&!t),x.useEffect(()=>{if(t)return;const L=C.current;if(!L||!e)return;const D=O=>{if(O.key==="Escape"){if(S3(O)||ab())return;O.preventDefault(),T&&n(!1)}};return L.addEventListener("keydown",D),()=>L.removeEventListener("keydown",D)},[e,t,T,n]);const M=x.useRef(!1);x.useEffect(()=>{var D;const L=((D=C.current)==null?void 0:D.querySelector(`#${CSS.escape(v)}`))!=null;e&&!t&&!j&&!L&&!M.current&&(M.current=!0,oi())},[e,t,j,v]);const z=L=>{L.target===L.currentTarget&&S&&n(!1)},A=L=>{L.preventDefault(),!ab()&&T&&n(!1)},R=l.jsx("div",{...B(Ia.inner,...H3(b?{useThemeDefault:"dialog",maxHeight:k?void 0:typeof r=="number"?`${r}px`:r}:{paddingInnerX:g,paddingInnerY:g,paddingOuterX:g,paddingOuterY:g,maxHeight:k?void 0:typeof r=="number"?`${r}px`:r}),!b&&y!==4&&jl[y],!b&&y!==4&&Sl[y],!b&&y!==4&&Cl[y],!b&&y!==4&&$l[y]),children:l.jsx(m0,{value:w,children:u})}),I=a!=null&&!k,{open:N,..._}=m;return t?e?l.jsx("div",{..._,...U(P("dialog",{variant:i}),B(Ia.inlineWrapper,!k&&s1.sizing(s,r),k&&Ia.fullscreen,d),f,h),"data-testid":m["data-testid"],children:R}):null:l.jsx("dialog",{ref:ct(p,$),..._,...U(P("dialog",{variant:i}),B(Ia.dialog,e&&Ia.open,Ia.backdrop,!k&&s1.sizing(s,r),I&&(()=>{const L=cA(a);return s1.position(L.top,L.insetInlineStart,L.insetInlineEnd,L.bottom)})(),k&&Ia.fullscreen,d),f,h),onClick:z,onCancel:A,"aria-modal":"true",...o==="required"?{role:"alertdialog"}:void 0,children:R})}Ls.displayName="Dialog";const uA=x.lazy(async()=>U5(()=>Promise.resolve().then(()=>N3),void 0).then(e=>({default:e.Tooltip}))),dA={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"};function Di({level:e,type:t,accessibilityLevel:n,color:s="primary",display:r="block",maxLines:a=0,hasTruncateTooltip:i=!0,wordBreak:o,textWrap:c,justify:u="start",hasCapsize:d=!1,hasStrikethrough:f=!1,xstyle:h,className:p,style:m,children:b,ref:y,...g}){const k=dA[e],v=n&&n!==e?{"aria-level":n}:{},w=o??(a===1?"break-all":"break-word"),j=a>0||d?"block":r,C=Q5({maxLines:a}),$=typeof i=="string"?i:"above",E=a>0&&i!==!1&&C.isTruncated,T=x.useRef(null),S=a>1?{WebkitLineClamp:a}:void 0;return l.jsxs(l.Fragment,{children:[l.jsx(k,{ref:ct(y,C.ref,T),...U(P("heading",{level:e,color:s,...t&&{type:t}}),B(Jm[J5(s)],t?e0[t]:sT[e],t&&F5[t],a===1?Mf.singleLine:a>1?Mf.multiLine:G5[j],a>0&&V5[w],c&&W5[c],u!=="start"&&Z5[u],d&&K5.enabled,f&&X5.strikethrough,h),p,{...m,...S}),title:E?C.fullText:void 0,...v,...g,children:b}),E&&l.jsx(x.Suspense,{fallback:null,children:l.jsx(uA,{anchorRef:T,content:l.jsx("span",{...B(Y5.content),children:C.fullText}),placement:$})})]})}Di.displayName="Heading";const fA={titleFocusable:{kI3sdo:"x1a2a7pz",$$css:!0}};function Os({title:e,subtitle:t,onOpenChange:n,startContent:s,endContent:r,hasDivider:a,xstyle:i,className:o,style:c,ref:u,...d}){const f=ke(),h=x.useRef(null),p=aA(),m=(p==null?void 0:p.isInline)!==!0,b=p==null?void 0:p.titleId;return x.useEffect(()=>{m&&h.current&&h.current.focus()},[m]),l.jsx(zf,{ref:u,hasDivider:a,xstyle:i,className:o,style:c,...d,children:l.jsxs("div",{className:"x78zum5 x1cy8zhl x1qughib xjcht0a",children:[s&&l.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s",children:s}),l.jsxs("div",{className:"x98rzlu xeuugli xqixskq",children:[l.jsx(Di,{ref:h,id:b,level:2,tabIndex:-1,xstyle:fA.titleFocusable,children:e}),t&&l.jsx(se,{type:"body",size:"sm",color:"secondary",children:t})]}),(r||n)&&l.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s"},1:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s xhzvc8f x3kzqx6"}}[!!n<<0],children:[r,n&&l.jsx(de,{variant:"ghost",label:f("@astryx.dialog.close"),tooltip:f("@astryx.dialog.close"),icon:l.jsx(Ce,{icon:"close",color:"inherit"}),onClick:()=>{n==null||n(!1)},isIconOnly:!0})]})]})})}Os.displayName="DialogHeader";const hA={scrollable:{kVQacm:"xysyzu8",$$css:!0}};function y0({direction:e="vertical",hAlign:t,vAlign:n,justify:s,align:r,gap:a,padding:i,paddingInline:o,paddingBlock:c,isScrollable:u,width:d,height:f,maxWidth:h,minHeight:p,wrap:m,as:b="div",xstyle:y,className:g,style:k,children:v,ref:w,...j}){const C=t??(e==="horizontal"?s:r),$=n??(e==="horizontal"?r:s),E=e==="horizontal"?C:$,T=e==="horizontal"?$:C,S=o??i,M=c??i,z=B(...mp({direction:e,crossAlign:T,mainAlign:E,gap:a,wrap:m}),S!=null&&fE[S],M!=null&&hE[M],u&&hA.scrollable,y),A={...d!=null&&{width:typeof d=="number"?`${d}px`:d},...f!=null&&{height:typeof f=="number"?`${f}px`:f},...h!=null&&{maxWidth:typeof h=="number"?`${h}px`:h},...p!=null&&{minHeight:typeof p=="number"?`${p}px`:p}};return x.createElement(b,{ref:w,...U(P("stack",{direction:e,gap:a,wrap:m}),z,g,{...k,...A}),...j},v)}y0.displayName="Stack";function $e({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...a}){return l.jsx(y0,{...a,direction:"horizontal",hAlign:s??t,vAlign:r??n,ref:e})}$e.displayName="HStack";function ve({ref:e,justify:t,align:n,hAlign:s,vAlign:r,...a}){return l.jsx(y0,{...a,direction:"vertical",hAlign:s??n,vAlign:r??t,ref:e})}ve.displayName="VStack";const rd={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}},xA={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Li({children:e,hasDivider:t,height:n,label:s,padding:r,role:a,xstyle:i,className:o,style:c,ref:u,...d}){const f=x.use(Dh),h=t??(f==null?void 0:f.defaultHasDividers)??!1,p=r===0;return l.jsx("div",{ref:u,role:a,"aria-label":s,"data-divider":h||void 0,...U(P("layout-footer"),B(rd.footer,xA.sizing(n??null),h&&rd.divider,i),o,c),...d,children:l.jsx("div",{...B(rd.inner,p&&rd.fullBleed,r!=null&&jl[r],r!=null&&Sl[r],r!=null&&Cl[r],r!=null&&$l[r]),children:e})})}Li.displayName="LayoutFooter";const n4=x.createContext({direction:"vertical"});n4.displayName="FormLayoutContext";const r1={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},containerGap:{kOIVth:"xzye2dw",$$css:!0},horizontalLabels:{k1xSpc:"xjp7ctv",$$css:!0}},pA={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Al({label:e,isLabelHidden:t=!1,description:n,inputID:s,labelID:r,isGroupLabel:a=!1,descriptionID:i,isOptional:o=!1,isRequired:c=!1,isDisabled:u=!1,labelIcon:d,status:f,labelTooltip:h,statusVariant:p="attached",width:m,xstyle:b,children:y,className:g,style:k,ref:v,...w}){const{direction:j}=x.use(n4),C=j==="horizontal-labels",$=i??(n?`${s}-desc`:void 0),E=(f==null?void 0:f.messageID)??(f!=null&&f.message?`${s}-status`:void 0);Tl("Field","isOptional and isRequired are mutually exclusive. isOptional takes precedence.",o&&c);const T=l.jsx(f0,{label:e,inputID:s,labelID:r,isGroupLabel:a,isLabelHidden:t,isDisabled:u,isOptional:o,isRequired:c,labelIcon:d,labelTooltip:h,description:C?void 0:n,descriptionID:C?void 0:$}),S=f!=null&&f.message&&p!=="tooltip"?l.jsx(h0,{type:f.type,message:f.message,id:E,variant:p}):null;return C?l.jsxs("div",{ref:v,...U(P("field",{layout:"horizontal-labels"}),B(r1.horizontalLabels,b),g,k),...w,children:[l.jsx("div",{className:"x1enrzb7",children:T}),l.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[n&&l.jsx(se,{type:"supporting",display:"block",id:$,children:n}),y,S]})]}):l.jsxs("div",{ref:v,...U(P("field"),B(r1.container,!t&&r1.containerGap,m!=null&&pA.width(m),b),g,k),...w,children:[T,p==="attached"?l.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[y,S]}):l.jsxs(l.Fragment,{children:[y,S]})]})}Al.displayName="Field";const al={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}},k0={warning:{kVAM5u:"x8wg1ba",$$css:!0},error:{kVAM5u:"x1ofxpqo",$$css:!0},success:{kVAM5u:"x16m2moy",$$css:!0}},b0={warning:{kGVxlE:"x1gnnqk1 xnoa3fc",$$css:!0},error:{kGVxlE:"x1gnnqk1 xl68szm",$$css:!0},success:{kGVxlE:"x1gnnqk1 xig9bu2",$$css:!0}},s4={warning:{kVAM5u:"x8wg1ba xa1yw2k",$$css:!0},error:{kVAM5u:"x1ofxpqo xk2sxw7",$$css:!0},success:{kVAM5u:"x16m2moy xyq33ac",$$css:!0}},r4={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}},a4=x.createContext(null);a4.displayName="InputGroupContext";function i4(){return x.use(a4)}const gA={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}};function Cr({type:e="text",label:t,isLabelHidden:n=!1,description:s,isOptional:r=!1,isRequired:a=!1,isDisabled:i=!1,disabledMessage:o,startIcon:c,status:u,statusVariant:d="attached",size:f,onChange:h,changeAction:p,isLoading:m=!1,value:b,placeholder:y,labelTooltip:g,hasClear:k=!1,hasAutoFocus:v=!1,htmlName:w,onEnter:j,onKeyDown:C,width:$,xstyle:E,className:T,style:S,ref:M,...z}){const A=ke(),R=Ai(f,"md"),I=x.useId(),N=x.useId(),_=x.useId(),L=x.useId(),D=x.useRef(null),O=x.useRef(null),q=i4(),[,F]=x.useTransition(),[X,J]=x.useOptimistic(b),Z=m||X!==b,te=i&&!!o,Q=Is({placement:"above",focusTrigger:"always",isEnabled:te}),{statusIcon:K,describedBy:re}=D3({status:u,statusVariant:d,isInGroup:!!q}),{ariaLabelledBy:oe,ariaDescribedBy:be}=$5(N,[s?_:null,!q&&d!=="tooltip"&&(u!=null&&u.message)?L:null,re,te?Q.describedBy:null],q),pe=ce=>{if(i)return;const xe=ce.target.value;h==null||h(xe,ce),p&&!ce.defaultPrevented&&F(async()=>{J(xe),await p(xe,ce)})},he=x.useCallback(()=>{var ce;h==null||h("",null),(ce=D.current)==null||ce.focus()},[h]),{onClick:le,onMouseUp:Y}=c0({containerRef:O,inputRef:D,disabled:i}),me=l.jsxs("div",{ref:ce=>{O.current=ce,Q.ref(ce)},onClick:le,onMouseUp:Y,...U(P("text-input",{size:R,status:(u==null?void 0:u.type)??null}),B(al.base,gA[R],i&&al.disabled,u&&k0[u.type],u&&!i&&b0[u.type],u&&s4[u.type],q&&r4.inGroup,E),T,S),children:[c&&_s(c,{size:"sm",color:"secondary"}),q&&l.jsx(Mi,{id:N,children:t}),l.jsx("input",{...z,ref:ct(M,D),id:I,name:w,type:e,value:X,onChange:pe,onKeyDown:j||C?ce=>{ce.key==="Enter"&&(j==null||j()),C==null||C(ce)}:void 0,placeholder:y,disabled:i&&!te,"aria-disabled":te?"true":void 0,readOnly:te||void 0,autoFocus:v,"data-autofocus":v||void 0,"aria-describedby":be,"aria-required":a===!0?"true":void 0,"aria-invalid":(u==null?void 0:u.type)==="error"?"true":void 0,"aria-busy":Z||void 0,"aria-labelledby":oe,...{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"}}[!!i<<0]}),k&&b!==""&&!i&&l.jsx("button",{type:"button",onClick:he,"aria-label":A("@astryx.textInput.clearLabel",{label:t}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:l.jsx(Ce,{icon:"close",size:"sm",color:"secondary"})}),Z&&l.jsx(En,{size:"sm"}),K]});return q?l.jsxs(l.Fragment,{children:[me,te&&Q.renderTooltip(o)]}):l.jsxs(Al,{label:t,isLabelHidden:n,description:s,inputID:I,descriptionID:s?_:void 0,isOptional:r,isRequired:a,isDisabled:i,status:u?{type:u.type,message:u.message,messageID:u.message?L:void 0}:void 0,statusVariant:d,labelTooltip:g,width:$,children:[me,te&&Q.renderTooltip(o)]})}Cr.displayName="TextInput";function o4(e){return typeof e=="string"?!0:!("type"in e)}function mA(e){return typeof e=="object"&&"type"in e&&e.type==="divider"}function l4(e){return typeof e=="object"&&"type"in e&&e.type==="section"}function _f(e){return typeof e=="string"?{value:e,label:e}:{...e,label:e.label??e.value}}function yA(e){const t=[];for(const n of e)if(o4(n))t.push(_f(n));else if(l4(n))for(const s of n.options)t.push(_f(s));return t}function kA({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:s,triggerRef:r}){const[a,i]=x.useState(0),[o,c]=x.useState(!1),u=x.useCallback((d,f)=>{i(d),c(f)},[]);return er(()=>{if(!e){u(0,!1);return}if(!s.current||!r.current){u(0,!0);return}const d=t>=0?t:0,f=`${n}-item-${d}`,h=document.getElementById(f);if(!h){u(0,!0);return}const p=s.current.getBoundingClientRect(),m=h.getBoundingClientRect(),b=r.current.getBoundingClientRect(),y=p.height;if(y<=0){u(0,!0);return}const g=m.top-p.top+m.height/2,v=b.top+b.height/2-g,w=window.innerHeight,j=Math.max(0,w-y),C=Math.min(Math.max(v,0),j),$=Math.max(0,b.bottom-C);u($,!0)},[e,t,n,s,r,u]),{offset:a,isPositioned:o}}function bA({selectableItems:e,value:t,isDisabled:n=!1,isOpen:s,hasSearch:r=!1,onOpen:a,onClose:i,onSelect:o,onClear:c,listboxId:u}){const[d,f]=x.useState(-1),[h,p]=x.useState(""),m=x.useRef(void 0),b=x.useCallback($=>`${u}-item-${$}`,[u]),y=x.useCallback(()=>e.map(($,E)=>$.disabled?-1:E).filter($=>$>=0),[e]),g=x.useCallback(()=>e.findIndex($=>$.value===t),[e,t]),k=x.useCallback(()=>{f(-1),i()},[i]),v=x.useCallback($=>{$.disabled||(o==null||o($.value),k())},[o,k]),w=x.useCallback(()=>{if(!n){if(s)k();else if(a(),!r){const $=g();f($>=0?$:0)}}},[n,s,a,k,g,r]),j=x.useCallback(($,E)=>{$.disabled||f(E)},[]),C=x.useCallback($=>{if(n)return;const E=y();switch($.key){case"ArrowDown":if($.preventDefault(),!s)a(),f(0);else{const T=E.indexOf(d),S=Math.min(T+1,E.length-1);f(E[S]??d)}break;case"ArrowUp":if($.preventDefault(),!s)a(),f(e.length-1);else{const T=E.indexOf(d),S=Math.max(T-1,0);f(E[S]??d)}break;case" ":if(r)break;case"Enter":if($.preventDefault(),s&&d>=0){const T=e[d];T&&!T.disabled&&v(T)}else if(!s&&(a(),!r)){const T=g();f(T>=0?T:0)}break;case"Escape":s&&($.preventDefault(),k());break;case"Tab":s&&k();break;case"Home":$.preventDefault(),s&&E.length>0&&f(E[0]);break;case"End":$.preventDefault(),s&&E.length>0&&f(E[E.length-1]);break;case"PageUp":$.preventDefault(),s&&E.length>0&&f(E[0]);break;case"PageDown":$.preventDefault(),s&&E.length>0&&f(E[E.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 T=h+$.key.toLowerCase();p(T),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{p("")},500);const S=e.findIndex(M=>{var z;return!M.disabled&&((z=M.label)==null?void 0:z.toLowerCase().startsWith(T))});S>=0&&(s||a(),f(S))}break}},[n,s,a,k,e,d,v,g,y,h,r,c,t]);return{highlightedIndex:d,setHighlightedIndex:f,getItemId:b,onTriggerClick:w,onKeyDown:C,onItemSelect:v,onItemMouseEnter:j}}const vA={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",$$css:!0}};function c4({icon:e,label:t,description:n,endContent:s,xstyle:r,className:a,style:i}){return l.jsx(Ii,{startContent:e?_s(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:s,xstyle:[vA.root,r],...U(P("selector-option"),{className:a,style:i})})}c4.displayName="SelectorOption";const bs={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}},wA={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},jA={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},Cb={warning:"warning",error:"error",success:"success"},$b={warning:"warning",error:"error",success:"success"},SA={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function CA({option:e}){return l.jsx(c4,{icon:e.icon,label:e.label??e.value})}function Np(e,t){return t?(e.label??e.value).toLowerCase().includes(t.toLowerCase()):!0}function Eb(e,t){return t?e.filter(n=>Np(n,t)):e}function qc(e){const t=ke(),{label:n,isLabelHidden:s=!1,description:r,isOptional:a=!1,isRequired:i=!1,isDisabled:o=!1,disabledMessage:c,options:u,value:d,onChange:f,changeAction:h,isLoading:p=!1,placeholder:m,size:b,variant:y="input",status:g,statusVariant:k="attached",labelTooltip:v,startIcon:w,htmlName:j,renderOption:C,hasSearch:$=!1,searchPlaceholder:E,placement:T,isDefaultOpen:S=!1,"data-testid":M,width:z,xstyle:A,className:R,style:I,hasClear:N,..._}=e,L=m??t("@astryx.selector.placeholder"),D=E??t("@astryx.selector.searchPlaceholder"),O=N===!0,q=Ai(b,"md"),F=y==="ghost"&&k==="attached"?"detached":k,X=d===null?void 0:d,J=x.useId(),Z=x.useId(),te=x.useId(),Q=x.useId(),K=x.useId(),re=x.useId(),oe=x.useRef(null),be=x.useRef(null),pe=i4(),[he,le]=x.useState(""),Y=he.length>0,[,me]=x.useTransition(),[ce,xe]=x.useOptimistic(X),Le=p||ce!==X,ne=o&&!!c,Jt=Is({placement:"above",focusTrigger:"always",isEnabled:ne}),an=Is({placement:"above",isEnabled:F==="tooltip"&&!!(g!=null&&g.message)}),{ariaLabelledBy:ys,ariaDescribedBy:Nn}=$5(K,[r?te:null,!pe&&F!=="tooltip"&&(g!=null&&g.message)?Q:null,F==="tooltip"&&(g!=null&&g.message)?an.describedBy:null,ne?Jt.describedBy:null],pe),Mn=x.useMemo(()=>yA(u),[u]),Pl=x.useMemo(()=>Eb(Mn,he),[Mn,he]),Wi=x.useMemo(()=>Mn.findIndex(ue=>ue.value===ce),[Mn,ce]),Pu=x.useMemo(()=>Wi>=0?Mn[Wi]:void 0,[Mn,Wi]),Rx=x.useRef(null),Ul=Ml(),GC=x.useCallback(()=>{var ue;le(""),Ul(""),(ue=oe.current)==null||ue.focus()},[Ul]),qt=zl({onHide:GC,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>{S&&qt.show()},[]);const wk=x.useCallback(ue=>{if(le(ue),ue.length===0){Ul("");return}const on=Eb(Mn,ue).length;Ul(on===0?"No results found":`${on} result${on===1?"":"s"}`)},[Ul,Mn]),Ix=T==null&&!$,{offset:VC,isPositioned:WC}=kA({isOpen:qt.isOpen&&Ix,selectedItemIndex:Wi,listboxId:Z,listboxRef:Rx,triggerRef:oe}),jk=Ix?VC:0,KC=Ix?WC:!0,Sk=T??"below",XC=jk>0?{marginBlockStart:`-${jk}px`}:void 0,_x=x.useCallback(()=>{f==null||f(null),h&&me(async()=>{xe(void 0),await h(null)})},[f,h,me,xe]),{highlightedIndex:qs,getItemId:Na,onTriggerClick:ZC,onKeyDown:Fl,onItemSelect:Ck,onItemMouseEnter:$k}=bA({selectableItems:Pl,value:X,isDisabled:o,isOpen:qt.isOpen,hasSearch:$,onOpen:x.useCallback(()=>{qt.show(),$&&requestAnimationFrame(()=>{var ue;(ue=be.current)==null||ue.focus()})},[qt,$]),onClose:qt.hide,onSelect:x.useCallback(ue=>{f==null||f(ue),h&&me(async()=>{xe(ue),await h(ue)})},[f,h,me,xe]),onClear:O?_x:void 0,listboxId:Z});x.useEffect(()=>{var ue,on;!qt.isOpen||qs<0||(on=(ue=document.getElementById(Na(qs)))==null?void 0:ue.scrollIntoView)==null||on.call(ue,{block:"nearest"})},[qt.isOpen,qs,Na]);const YC=x.useCallback(ue=>{ue.stopPropagation(),_x()},[_x]),QC=x.useCallback(()=>$?l.jsx("div",{className:"x78zum5 x6s0dn4 xf314gf xu0wf1k",onKeyDown:ue=>{ue.target!==be.current&&ue.key==="Tab"&&!ue.shiftKey&&Fl(ue)},children:l.jsx(Cr,{ref:be,id:re,label:t("@astryx.selector.searchOptions"),isLabelHidden:!0,startIcon:"search",hasClear:!0,size:"sm",width:"100%",role:"combobox","aria-expanded":qt.isOpen,"aria-controls":Z,"aria-autocomplete":"list","aria-activedescendant":qt.isOpen&&qs>=0?Na(qs):void 0,value:he,onChange:wk,onKeyDown:ue=>{if(ue.key==="ArrowDown"||ue.key==="ArrowUp"||ue.key==="PageUp"||ue.key==="PageDown"||ue.key==="Enter"||ue.key==="Escape"){Fl(ue);return}ue.key==="Tab"&&(ue.shiftKey||!Y)&&Fl(ue)},placeholder:D})}):null,[$,re,Z,he,Y,D,wk,Fl,qt.isOpen,qs,Na,t]),Dx=x.useCallback((ue,on)=>{const Ma=on===qs,Hs=ue.value===X;return l.jsxs("div",{id:Na(on),role:"option","aria-selected":Hs,"aria-disabled":ue.disabled,onClick:()=>Ck(ue),onMouseEnter:()=>$k(ue,on),...B(bs.item,jA[q],Ma&&bs.itemHighlighted,Hs&&bs.itemSelected,ue.disabled&&bs.itemDisabled),children:[l.jsx("span",{className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli",children:C?C(ue):l.jsx(CA,{option:ue})}),Hs&&l.jsx(Ce,{icon:"check",size:"sm",color:"accent"})]},ue.value)},[C,qs,q,X,Na,Ck,$k]),Ek=x.useCallback(()=>{const ue=$&&!!he;if(ue&&Pl.length===0)return[l.jsx("div",{role:"presentation",className:"x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib",children:"No results found"},"empty")];let on=0;const Ma=[];for(let Hs=0;Hs<u.length;Hs++){const Lr=u[Hs];if(mA(Lr)){if(ue)continue;Ma.push(l.jsx(Bc,{xstyle:bs.divider},`divider-${Hs}`))}else if(l4(Lr)){const Ki=[];for(const JC of Lr.options){const Nk=_f(JC);ue&&!Np(Nk,he)||(Ki.push(Dx(Nk,on)),on++)}if(Ki.length===0)continue;Lr.title&&Ma.push(l.jsx(Bc,{label:Lr.title,xstyle:bs.sectionDivider},`section-divider-${Hs}`)),Ma.push(l.jsx("div",{role:"group","aria-label":Lr.title,children:Ki},`section-${Hs}`))}else if(o4(Lr)){const Ki=_f(Lr);if(ue&&!Np(Ki,he))continue;Ma.push(Dx(Ki,on)),on++}}return Ma},[u,Dx,$,he,Pl]),Lx=g!=null&&F!=="detached",Tk=g!=null&&F==="tooltip"&&!!g.message,zk=l.jsxs(l.Fragment,{children:[l.jsxs("div",{ref:ue=>{qt.triggerRef(ue),Jt.ref(ue)},onClick:ZC,"data-testid":M,...U(P("selector",{variant:y,size:q,status:(g==null?void 0:g.type)??null}),B(al.base,bs.triggerContainer,wA[q],y==="ghost"&&bs.triggerGhost,o&&al.disabled,y==="ghost"&&o&&bs.triggerGhostDisabled,!Pu&&bs.triggerPlaceholder,y!=="ghost"&&g&&k0[g.type],y!=="ghost"&&g&&!o&&b0[g.type],y!=="ghost"&&pe&&r4.inGroup,A),R,I),children:[w&&_s(w,{size:"sm",color:"secondary"}),pe&&l.jsx(Mi,{id:K,children:n}),l.jsx("button",{ref:oe,id:J,type:"button",role:$?void 0:"combobox",..._,"aria-haspopup":"listbox","aria-expanded":qt.isOpen,"aria-controls":Z,"aria-activedescendant":!$&&qt.isOpen&&qs>=0?Na(qs):void 0,"aria-describedby":Nn,"aria-labelledby":ys,"aria-required":i?"true":void 0,"aria-invalid":(g==null?void 0:g.type)==="error"?"true":void 0,"aria-busy":Le||void 0,disabled:o&&!ne,"aria-disabled":ne?"true":void 0,onKeyDown:Fl,tabIndex:o&&!ne?-1:0,className:"x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x1a2a7pz",children:l.jsx("span",{className:"x1iyjqo2 xeuugli xb3r6kr xlyipyv xuxw1ft x1yc453h",children:(Pu==null?void 0:Pu.label)??L})}),j!=null&&l.jsx("input",{type:"hidden",name:j,value:d??"",disabled:o}),Le&&l.jsx(En,{size:"sm"}),O&&d!=null&&!o&&l.jsx("button",{type:"button",onClick:YC,"aria-label":t("@astryx.selector.clearLabel",{label:n}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:l.jsx(Ce,{icon:"close",size:"sm",color:"secondary",...P("selector-clear-icon")})}),l.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"}}[!!(!Lx&&qt.isOpen)<<1|!!Lx<<0],children:Lx?Tk?l.jsx("button",{ref:an.ref,type:"button","aria-label":t(SA[g.type]),"aria-describedby":an.describedBy,onClick:ue=>ue.stopPropagation(),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:l.jsx(Ce,{icon:Cb[g.type],size:"sm",color:$b[g.type]})}):l.jsx(Ce,{icon:Cb[g.type],size:"sm",color:$b[g.type]}):l.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit",...P("selector-indicator-icon",{state:qt.isOpen?"expanded":"collapsed"})})})]}),qt.render($?l.jsxs("div",{children:[QC(),l.jsx("div",{ref:Rx,id:Z,role:"listbox","aria-labelledby":J,className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo",children:Ek()})]}):l.jsx("div",{ref:Rx,id:Z,role:"listbox","aria-labelledby":J,...{0:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo"},1:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk xg01cxk xq2gx43"}}[!KC<<0],children:Ek()}),{placement:Sk,alignment:"start",xstyle:[bs.popover,Js[Sk]],style:XC}),Tk&&an.renderTooltip((g==null?void 0:g.message)??""),ne&&Jt.renderTooltip(c)]});return pe?zk:l.jsx(Al,{label:n,isLabelHidden:s,description:r,inputID:J,descriptionID:r?te:void 0,isOptional:a,isRequired:i,isDisabled:o,status:g?{type:g.type,message:g.message,messageID:g.message?Q:void 0}:void 0,statusVariant:F,labelTooltip:v,width:z,children:zk})}qc.displayName="Selector";var u4={exports:{}},rn={};/**
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 $A=x;function d4(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 Hr(){}var gn={d:{f:Hr,r:function(){throw Error(d4(522))},D:Hr,C:Hr,L:Hr,m:Hr,X:Hr,S:Hr,M:Hr},p:0,findDOMNode:null},EA=Symbol.for("react.portal"),TA=Symbol.for("react.recoverable"),Tb=Symbol.for("react.optimistic_key");function zA(e,t,n){var s=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:EA,key:s==null?null:s===Tb?Tb:""+s,children:e,containerInfo:t,implementation:n}}var yc=$A.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Yh(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}rn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=gn;rn.browser=function(e){return{$$typeof:TA,_reason:e}};rn.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(d4(299));return zA(e,t,null,n)};rn.flushSync=function(e){var t=yc.T,n=gn.p;try{if(yc.T=null,gn.p=2,e)return e()}finally{yc.T=t,gn.p=n,gn.d.f()}};rn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,gn.d.C(e,t))};rn.prefetchDNS=function(e){typeof e=="string"&&gn.d.D(e)};rn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,s=Yh(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?gn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:s,integrity:r,fetchPriority:a}):n==="script"&&gn.d.X(e,{crossOrigin:s,integrity:r,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};rn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Yh(t.as,t.crossOrigin);gn.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&&gn.d.M(e)};rn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,s=Yh(n,t.crossOrigin);gn.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})}};rn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Yh(t.as,t.crossOrigin);gn.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 gn.d.m(e)};rn.requestFormReset=function(e){gn.d.r(e)};rn.unstable_batchedUpdates=function(e,t){return e(t)};rn.useFormState=function(e,t,n){return yc.H.useFormState(e,t,n)};rn.useFormStatus=function(){return yc.H.useHostTransitionStatus()};rn.version="19.3.0";function f4(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(f4)}catch(e){console.error(e)}}f4(),u4.exports=rn;var Hc=u4.exports;const zb={popoverSurface:{k7Eaqz:"xfb3i0g",$$css:!0},popoverGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0}};function NA(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 MA(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 a=n>0?e[n-1]:null;if(a===null||a===" "||a===`
147
- `){const i=e.slice(n+1);return{trigger:r,query:i,triggerStart:n}}}}return null}function AA(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 a=r.textContent??"",i=s.startOffset,o=a.slice(0,t),c=a.slice(i);r.textContent=o+c;const u=document.createRange();u.setStart(r,t),u.collapse(!0),n.removeAllRanges(),n.addRange(u)}function RA(e){const t=ke(),{triggers:n,editableRef:s,onInsertToken:r,onInsertText:a,onEmitChange:i,debounceMs:o=150}=e,c=x.useId(),[u,d]=x.useState({isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}),f=x.useRef(-1),h=x.useRef(null),p=x.useRef(null),m=x.useCallback(()=>{p.current&&(p.current.remove(),p.current=null)},[]),b=zl({onHide:x.useCallback(()=>{m(),d(S=>({...S,isActive:!1,activeTrigger:null,query:"",items:[],highlightedIndex:0,isLoading:!1}))},[m]),hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>()=>{h.current&&clearTimeout(h.current),m()},[m]);const y=x.useCallback(()=>{var M,z;h.current&&(clearTimeout(h.current),h.current=null);const S=u.activeTrigger;S!=null&&S.searchSource&&((z=(M=S.searchSource).cancel)==null||z.call(M)),m(),b.hide(),f.current=-1},[b,u.activeTrigger,m]),g=x.useCallback(()=>{const S=s.current;if(!S)return;const M=window.getSelection();if(!M||M.rangeCount===0){b.triggerRef(S);return}m();const z=M.getRangeAt(0).cloneRange();z.collapse(!0);const A=typeof z.getBoundingClientRect=="function"?z.getBoundingClientRect():null;if(!A||A.width===0&&A.height===0&&A.top===0&&A.left===0){b.triggerRef(S);return}const R=document.createElement("span");R.setAttribute("aria-hidden","true"),R.setAttribute("data-astryx-trigger-anchor",""),R.style.position="fixed",R.style.left=`${A.left}px`,R.style.top=`${A.top}px`,R.style.width=`${Math.max(A.width,1)}px`,R.style.height=`${A.height}px`,R.style.pointerEvents="none",R.style.opacity="0",document.body.appendChild(R),p.current=R,b.triggerRef(R)},[s,b,m]),k=x.useCallback((S,M)=>{h.current&&(clearTimeout(h.current),h.current=null);const z=()=>{var A,R;if(S.searchSource){(R=(A=S.searchSource).cancel)==null||R.call(A),d(N=>({...N,isLoading:!0}));const I=S.searchSource.search(M);Promise.resolve(I).then(N=>{d(_=>({..._,items:N,highlightedIndex:N.length>0?0:-1,isLoading:!1}))},()=>{d(N=>({...N,items:[],highlightedIndex:-1,isLoading:!1}))})}};S.searchSource&&(S.searchSource.search("")instanceof Promise&&o>0?(d(I=>({...I,isLoading:!0})),h.current=setTimeout(z,o)):z())},[o]),v=x.useCallback(S=>{const M=u.activeTrigger;if(!M)return;const z=s.current;if(!z)return;m(),AA(z,f.current);const A=M.onSelect(S);typeof A=="string"?a(A):r(A),i(),y()},[u.activeTrigger,s,m,a,r,i,y]),w=x.useCallback(()=>{if(!n||n.length===0)return;const S=s.current;if(!S)return;const M=NA(S);if(M===null){u.isActive&&y();return}const z=MA(M,n);if(!z){u.isActive&&y();return}const{trigger:A,query:R,triggerStart:I}=z;!u.isActive||u.activeTrigger!==A?(f.current=I,d(N=>({...N,isActive:!0,activeTrigger:A,query:R,highlightedIndex:0})),g(),k(A,R),b.show()):u.query!==R&&(d(N=>({...N,query:R})),k(A,R))},[n,s,u.isActive,u.activeTrigger,u.query,y,g,k,b]),j=x.useCallback(S=>{if(!u.isActive||!b.isOpen)return!1;switch(S.key){case"ArrowDown":return S.preventDefault(),d(M=>({...M,highlightedIndex:M.highlightedIndex<M.items.length-1?M.highlightedIndex+1:0})),!0;case"ArrowUp":return S.preventDefault(),d(M=>({...M,highlightedIndex:M.highlightedIndex>0?M.highlightedIndex-1:M.items.length-1})),!0;case"Enter":case"Tab":return u.highlightedIndex>=0&&u.highlightedIndex<u.items.length?(S.preventDefault(),v(u.items[u.highlightedIndex]),!0):!1;case"Escape":return S.preventDefault(),y(),!0;default:return!1}},[u.isActive,u.highlightedIndex,u.items,b.isOpen,v,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 E=((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"},T=x.useCallback(()=>{const S=u.activeTrigger,M=(S==null?void 0:S.emptySearchResultsText)??"No results",z=(S==null?void 0:S.loadingText)??"Searching…";let A;if(u.isLoading)A=l.jsx("div",{role:"status",className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:z});else if(u.items.length===0&&u.isActive)A=l.jsx("div",{className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:M});else{const R=eE(u.items);let I=0;A=R.map(N=>{const _=N.items.map(L=>{const D=I++;return l.jsx("div",{id:C(D),role:"option","aria-selected":D===u.highlightedIndex,tabIndex:-1,onMouseDown:O=>{O.preventDefault(),v(L)},onMouseEnter:()=>d(O=>({...O,highlightedIndex:D})),...{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"}}[(D===u.highlightedIndex)<<0],children:S!=null&&S.renderItem?S.renderItem(L):l.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:L.label})},L.id)});return N.heading?l.jsxs("div",{role:"group","aria-label":N.heading,children:[l.jsx("div",{"aria-hidden":"true",className:"xf314gf x1xye8es xy143xn x141an7d x1ltkj2j xv1l7n4 x87ps6o",children:N.heading}),_]},`group-${N.heading}`):_})}return b.render(l.jsx("div",{id:c,role:"listbox","aria-label":(S==null?void 0:S.menuLabel)??t("@astryx.chatTriggerMenu.suggestions"),...U(P("trigger-menu"),{className:"x9f619 x1xiyphd x1odjw0f x9epnlk xfb3i0g"}),children:A}),{placement:"above",alignment:"start",xstyle:[zb.popoverSurface,zb.popoverGap]})},[b,c,u,v,C,t]);return{state:u,handleInput:w,handleKeyDown:j,renderMenu:T,reset:y,ariaProps:E}}function Df(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 Mp(e,t){const n=Df(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 IA(e){return"render"in e&&typeof e.render=="function"}function _A(e){let t=e;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute("data-astryx-token"))return t;t=t.parentNode}return null}function DA({editableRef:e,onEmitChange:t}){const[n,s]=x.useState([]),r=x.useCallback(u=>{const d=e.current;if(!d)return;const f=Df(d);if(!f||f.rangeCount===0)return;const h=f.getRangeAt(0),p=document.createElement("span"),m=`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",m),p.contentEditable="false",p.style.display="inline-flex",p.style.verticalAlign="baseline",h.deleteContents(),h.insertNode(p);const b=document.createTextNode(" ");p.after(b);const y=document.createRange();return y.setStartAfter(b),y.collapse(!0),f.removeAllRanges(),f.addRange(y),s(g=>[...g,{id:m,span:p,token:u}]),m},[e]),a=x.useCallback(u=>{if(u.key!=="Backspace")return!1;const d=window.getSelection();if(!d||!d.isCollapsed||d.rangeCount===0)return!1;const f=d.getRangeAt(0),{startContainer:h,startOffset:p}=f;if(h.nodeType===Node.TEXT_NODE&&p===0&&h.previousSibling instanceof HTMLElement&&h.previousSibling.hasAttribute("data-astryx-token"))return!1;if(h.nodeType===Node.TEXT_NODE&&h.textContent===" "&&p<=1&&h.previousSibling instanceof HTMLElement&&h.previousSibling.hasAttribute("data-astryx-token")){u.preventDefault();const m=h.previousSibling,b=h.parentNode;return b&&(b.removeChild(h),b.removeChild(m)),t(),!0}return!1},[t]),i=x.useCallback(u=>{const d=e.current;if(!d)return!1;const f=Df(d);if(!f||f.rangeCount===0)return!1;const h=f.getRangeAt(0),p=_A(h.startContainer);if(p){u.preventDefault();const m=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),f.removeAllRanges(),f.addRange(y),Mp(d,m),t(),!0}return!1},[e,t]),o=x.useCallback(u=>{if(!e.current)return;const f=n.find(g=>g.id===u);if(!f)return;const{span:h}=f,p=h.getAttribute("data-astryx-token-value")??"",m=document.createTextNode(p),b=h.nextSibling;(b==null?void 0:b.nodeType)===Node.TEXT_NODE&&b.textContent===" "&&b.remove(),h.replaceWith(m);const y=window.getSelection();if(y){const g=document.createRange();g.setStartAfter(m),g.collapse(!0),y.removeAllRanges(),y.addRange(g)}s(g=>g.filter(k=>k.id!==u)),t()},[e,n,t]),c=x.useCallback(()=>{s(u=>u.filter(d=>{var f;return(f=e.current)==null?void 0:f.contains(d.span)}))},[e]);return{tokenPortals:n,expandToken:o,insertToken:r,handleKeyDown:a,handlePaste:i,cleanupPortals:c}}function LA(e){const t=e.split(`
148
- `).length,n=e.length;return t>1?`${t} lines, ${n} chars`:`${n} chars`}function h4({text:e,onExpand:t}){const n=ke(),s=LA(e),r=l.jsxs("div",{className:"x78zum5 xdt5ytf x1txdalj x17fpy1y",children:[l.jsx("div",{className:"x9m5x89 x141an7d x1ltkj2j x1tgivj0 x126k92a x13faqbe x1xiyphd x1odjw0f",children:e}),l.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj",children:[l.jsx("span",{className:"x141an7d xv1l7n4",children:s}),t&&l.jsx(de,{label:n("@astryx.chat.pastedText.expand"),variant:"ghost",size:"sm",onClick:t})]})]});return l.jsx(X3,{content:r,placement:"above",alignment:"start",hasHoverIndication:!1,children:l.jsx(Su,{label:s,variant:"neutral"})})}h4.displayName="ChatPastedTextToken";function OA(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 BA({inputRef:e,threshold:t=200,toToken:n=OA}){return{onPaste:x.useCallback((r,a)=>{var o;if(a.length<=t)return!1;const i=n(a);return(o=e.current)==null||o.insertToken(i),!0},[e,t,n])}}const v0=x.createContext(null);v0.displayName="ChatMessageContext";function qA(){return x.use(v0)}const w0=x.createContext(null);w0.displayName="ChatListContext";function HA(){return x.use(w0)}const j0=x.createContext(null);j0.displayName="ChatComposerContext";function x4(){return x.use(j0)}const S0=x.createContext(null);S0.displayName="ChatLayoutContext";function PA(){return x.use(S0)}const UA=22,Nb={root:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"xe0957l",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function a1(e){const t=window.getSelection();if(!t)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}function co(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+=co(n));return t}function C0(e){const t=ke(),n=x4(),s=e.value!==void 0,{ref:r,handleRef:a,value:i=n==null?void 0:n.value,onChange:o,placeholder:c,maxRows:u=8,triggers:d,debounceMs:f=150,hasHistory:h=!0,label:p,isDisabled:m=(n==null?void 0:n.isDisabled)??!1,onPaste:b,pasteAsToken:y,onFiles:g,onSubmit:k=n==null?void 0:n.onSubmit,onKeyDown:v,xstyle:w,className:j,style:C,...$}=e,E=p??t("@astryx.chat.composerInput.label"),T=c??(n==null?void 0:n.placeholder)??t("@astryx.chat.composer.placeholder"),S=n==null?void 0:n.onChange,M=x.useCallback(Y=>{if(s){o==null||o(Y);return}S==null||S(Y),o!==S&&(o==null||o(Y))},[S,s,o]),z=x.useRef(null),A=x.useRef(null),[R,I]=x.useState(!0),N=x.useRef([]),_=x.useRef(-1),L=x.useRef(""),D=x.useRef(void 0),O=x.useRef(()=>{}),q=x.useRef(()=>{}),F={insertToken:Y=>O.current(Y),expandToken:Y=>te.expandToken(Y),insertText:Y=>q.current(Y),focus:()=>{var Y;return(Y=z.current)==null?void 0:Y.focus()},getValue:()=>co(z.current??document.createElement("div"))};A.current=F,x.useImperativeHandle(a,()=>F);const X=n==null?void 0:n.inputControlRef;x.useEffect(()=>{if(X)return X.current={focus:()=>{var Y;return(Y=z.current)==null?void 0:Y.focus()}},()=>{X.current=null}},[X]),x.useEffect(()=>{if(i===void 0||!z.current)return;if(i===D.current){D.current=void 0;return}const Y=z.current;if(co(Y)!==i){D.current=void 0;const me=document.activeElement===Y;if(Y.textContent=i,me){const ce=window.getSelection();if(ce){const xe=document.createRange();xe.selectNodeContents(Y),xe.collapse(!1),ce.removeAllRanges(),ce.addRange(xe)}}I(i.length===0)}else D.current=void 0},[i]);const J=x.useRef(null),Z=x.useCallback(()=>{var Le;if(!z.current)return;const Y=co(z.current),me=z.current.querySelector("[data-astryx-token], [data-astryx-dictation-interim]")!=null,ce=Y.trim().length===0&&!me,xe=ce?"":Y;D.current=xe,I(ce),M==null||M(xe),(Le=J.current)==null||Le.call(J)},[M]),te=DA({editableRef:z,onEmitChange:Z});J.current=te.cleanupPortals;const Q=BA({inputRef:A}),K=y===!1?null:y??Q,re=x.useCallback(Y=>{const me=z.current;me&&Mp(me,Y)},[]);O.current=te.insertToken,q.current=re;const oe=RA({triggers:d,editableRef:z,onInsertToken:te.insertToken,onInsertText:re,onEmitChange:Z,debounceMs:f}),be=x.useCallback(()=>{Z(),oe.handleInput()},[Z,oe]),pe=x.useCallback(Y=>{if(!oe.handleKeyDown(Y)&&(v==null||v(Y),!Y.defaultPrevented)){if(Y.key==="Backspace"){const me=window.getSelection();if(me&&me.isCollapsed&&me.rangeCount>0){const ce=me.getRangeAt(0),{startContainer:xe,startOffset:Le}=ce;if(!(xe.nodeType===Node.TEXT_NODE&&Le===0&&xe.previousSibling instanceof HTMLElement&&xe.previousSibling.hasAttribute("data-astryx-token"))){if(xe.nodeType===Node.TEXT_NODE&&xe.textContent===" "&&Le<=1&&xe.previousSibling instanceof HTMLElement&&xe.previousSibling.hasAttribute("data-astryx-token")){Y.preventDefault();const ne=xe.previousSibling,Jt=xe.parentNode;Jt&&(Jt.removeChild(xe),Jt.removeChild(ne)),Z();return}}}}if(Y.key==="Enter"&&!Y.shiftKey){if(Y.nativeEvent.isComposing||Y.nativeEvent.keyCode===229||(Y.preventDefault(),!z.current))return;const me=co(z.current).trim();if(!me)return;h&&(N.current.push(me),_.current=-1,L.current=""),k==null||k(me),z.current.textContent="",I(!0),M==null||M("");return}if(h&&(Y.key==="ArrowUp"||Y.key==="ArrowDown")){if(!z.current)return;const me=co(z.current),ce=N.current;if(ce.length===0)return;if(Y.key==="ArrowUp"){_.current===-1&&(L.current=me);const xe=_.current===-1?ce.length-1:Math.max(0,_.current-1);_.current=xe,z.current.textContent=ce[xe],a1(z.current),Z(),Y.preventDefault()}else if(Y.key==="ArrowDown"&&_.current!==-1){const xe=_.current+1;xe>=ce.length?(_.current=-1,z.current.textContent=L.current,L.current&&a1(z.current)):(_.current=xe,z.current.textContent=ce[xe],a1(z.current)),Z(),Y.preventDefault()}}}},[h,k,M,Z,oe,v]),he=x.useCallback(Y=>{const me=z.current;if(!me||(Df(me),te.handlePaste(Y)))return;const ce=Array.from(Y.clipboardData.files);if(ce.length>0){Y.preventDefault(),g==null||g(ce);return}Y.preventDefault();const xe=Y.clipboardData.getData("text/plain");if(K!=null&&K.onPaste(Y,xe)){Z();return}if(b==null?void 0:b(Y,xe)){Z();return}Mp(me,xe),Z()},[g,b,Z,te,K]),le=u*UA;return l.jsxs("div",{ref:r,...U(P("chat-composer-input"),B(Nb.root,m&&Nb.disabled,w),j,C),...$,children:[R&&l.jsx("div",{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x47corl xv1l7n4 xjm74w1 x6pjikd x19v9tvf x9ynric x87ps6o x9epnlk","aria-hidden":"true",children:T}),l.jsx("div",{ref:z,"aria-multiline":"true","aria-label":E,contentEditable:!m,suppressContentEditableWarning:!0,onInput:be,onKeyDown:pe,onPaste:he,...oe.ariaProps,...U({className:"x1a2a7pz x126k92a x13faqbe x1odjw0f xjm74w1 x6pjikd x19v9tvf x9ynric x1tgivj0 xxugrtn x9epnlk"},{style:{maxHeight:`${le}px`}})}),oe.renderMenu(),te.tokenPortals.filter(({span:Y})=>Y.isConnected).map(({id:Y,span:me,token:ce})=>Hc.createPortal(IA(ce)?l.jsx("span",{children:ce.render()},Y):ce.value.length>(K===null?1/0:200)?l.jsx(h4,{text:ce.value,onExpand:()=>te.expandToken(Y)},Y):l.jsx(Su,{label:ce.label,variant:ce.variant,icon:ce.icon},Y),me))]})}C0.displayName="ChatComposerInput";const FA={root:{kaIpWk:"xy0xnkn",kmuXW:"x2lah0s",$$css:!0}};function $0(e){const t=ke(),n=x4(),{isStopShown:s=(n==null?void 0:n.isStopShown)??!1,isDisabled:r=!((n==null?void 0:n.canSend)??!1),onSend:a,onStop:i=n==null?void 0:n.onStop,sendIcon:o,stopIcon:c,size:u="md",xstyle:d,className:f,style:h,ref:p,...m}=e,b=a??(()=>n==null?void 0:n.onSubmit("")),y=gi("stop"),g=gi("arrowUp");return l.jsx(de,{ref:p,label:t(s?"@astryx.chatSendButton.stop":"@astryx.chatSendButton.send"),variant:s?"secondary":"primary",size:u,icon:s?c??y:o??g,isIconOnly:!0,isDisabled:!s&&r,onClick:s?i:b,...m,...P("chat-send-button"),className:f,style:h,xstyle:[FA.root,d]})}$0.displayName="ChatSendButton";const Mb={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}},GA={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 p4(e){const t=ke(),{ref:n,onSubmit:s,onStop:r,isStopShown:a=!1,value:i,onChange:o,placeholder:c,isDisabled:u=!1,density:d="balanced",elevation:f="low",drawer:h,headerActions:p,headerContext:m,input:b,footerActions:y,sendActions:g,sendButton:k,status:v,statusPosition:w="bottom",xstyle:j,className:C,style:$,...E}=e,T=c??t("@astryx.chat.composer.placeholder"),[S,M]=x.useState(""),z=i!==void 0,A=z?i:S,R=x.useCallback(F=>{z||M(F),o==null||o(F)},[z,o]),I=x.useCallback(()=>{const F=A.trim();!F||u||(s(F),R(""))},[A,u,s,R]),N=A.trim().length>0&&!u,_=x.useRef(null),L=x.useRef(null),D=x.useCallback(F=>{var Z;if(F.target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]'))return;if(L.current){L.current.focus();return}const J=(Z=_.current)==null?void 0:Z.querySelector('[contenteditable="true"], textarea');J==null||J.focus()},[]),O=v?l.jsxs("div",{role:v.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"}}[(w==="top")<<2|(v.type==="error")<<1|(v.type==="warning")<<0],children:[l.jsx(Ce,{icon:v.type==="error"?"error":"warning",size:"md",color:v.type==="error"?"error":"warning"}),v.message]}):null,q=x.useMemo(()=>({value:A,onChange:R,onSubmit:I,placeholder:T,isDisabled:u,isStopShown:a,canSend:N,onStop:r,inputControlRef:L}),[A,R,I,T,u,a,N,r]);return l.jsx(j0,{value:q,children:l.jsxs("div",{ref:n,...U(P("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,$),...E,children:[w==="top"&&O,h,l.jsxs("div",{ref:_,onClick:D,...B(Mb.body,GA[f],d==="compact"&&Mb.compact,j),children:[(p||m)&&l.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj xe0p6wg",children:[l.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:p}),l.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj xvc5jky x141an7d x1ltkj2j xv1l7n4",children:m})]}),l.jsx("div",{className:"x78zum5 xdt5ytf",children:b??l.jsx(C0,{})}),l.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj x21xpn4",children:[l.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:y}),l.jsxs("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:[g,k??l.jsx($0,{})]})]})]}),w==="bottom"&&O]})})}p4.displayName="ChatComposer";const VA={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 g4({ref:e,children:t,count:n,label:s,isCollapsed:r,defaultIsCollapsed:a=!1,onCollapsedChange:i,xstyle:o,className:c,style:u,"data-testid":d,...f}){const h=ke(),p=s??h("@astryx.chat.composerDrawer.label"),[m,b]=x.useState(a),y=r!==void 0,g=y?r:m,k=n!=null,v=x.useId(),w=()=>{const j=!g;y||b(j),i==null||i(j)};return l.jsxs("div",{ref:e,"data-testid":d,...U(P("chat-composer-drawer",{collapsed:g?"collapsed":null}),B(VA.root,o),c,u),...f,children:[k&&l.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"}}[!!g<<0],role:"button",tabIndex:0,"aria-expanded":!g,"aria-controls":v,"aria-label":g?h("@astryx.chatComposerDrawer.expand",{label:p}):h("@astryx.chatComposerDrawer.collapse",{label:p}),onClick:w,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),w())},children:[l.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"}}[!g<<0],children:[l.jsx(Su,{variant:"neutral",label:n}),l.jsx("span",{className:"xv1l7n4 x1t9gxa6 xjm74w1 x7acx1w xt3l3uh xuedmi6 xlr8y92",children:p})]}),l.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"}}[!!g<<0]})]}),l.jsx("div",{id:v,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!(k&&g)<<0],children:l.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&&g)<<0],children:t})})]})}g4.displayName="ChatComposerDrawer";const Yl={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}},WA={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 m4({children:e,emptyState:t,scrollToTopAction:n,density:s="balanced",gap:r,isStreaming:a=!1,xstyle:i,className:o,style:c,"data-testid":u,ref:d,...f}){const h=PA(),p=x.useRef(null),m=x.useRef(null),[b,y]=x.useTransition();x.useEffect(()=>{if(h!=null&&h.contentRef&&m.current)return h.contentRef(m.current),()=>h.contentRef(null)},[h]);const g=e!=null&&e!==!1&&!(Array.isArray(e)&&e.length===0);x.useEffect(()=>{var $;const j=($=h==null?void 0:h.scrollContainerRef)==null?void 0:$.current;if(!n||!p.current)return;const C=new IntersectionObserver(E=>{var T;(T=E[0])!=null&&T.isIntersecting&&y(async()=>{await n()})},{root:j??null,threshold:0});return C.observe(p.current),()=>C.disconnect()},[n,h]);const k=x.useMemo(()=>({density:s}),[s]),v=s==="compact"?Yl.gapCompact:s==="spacious"?Yl.gapSpacious:Yl.gapBalanced,w=r==null?null:WA[r];return l.jsx(w0,{value:k,children:l.jsx("div",{...f,ref:d,role:"log","aria-live":"polite","aria-busy":a||void 0,tabIndex:0,"data-testid":u,...U(P("chat-message-list",{density:s}),B(Yl.root,i),o,c),children:l.jsxs("div",{ref:m,...B(Yl.inner,v,w),children:[n&&l.jsx("div",{ref:p,"aria-hidden":!0}),b&&l.jsx("div",{className:"x78zum5 xl56j7k x8o8v82",children:l.jsx(En,{size:"md"})}),l.jsx("div",{className:"x98rzlu x2lwn1j","aria-hidden":!0}),g?e:t?l.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu x2lwn1j",children:t}):null]})})})}m4.displayName="ChatMessageList";const Nt={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 E0({sender:e,children:t,avatar:n,name:s,metadata:r,density:a,xstyle:i,className:o,style:c,"data-testid":u,ref:d,...f}){const h=ke(),p=HA(),m=a??(p==null?void 0:p.density)??"balanced",b=x.useMemo(()=>({sender:e,density:m}),[e,m]),y=m==="compact"?Nt.rootGapCompact:m==="spacious"?Nt.rootGapSpacious:Nt.rootGapBalanced,g=m==="compact"?Nt.childrenGapCompact:m==="spacious"?Nt.childrenGapSpacious:Nt.childrenGapBalanced,k=e==="system"?Nt.rootSystem:e==="user"?Nt.rootUser:Nt.rootAssistant,v=e==="system"?Nt.contentColumnSystem:e==="user"?Nt.contentColumnUser:Nt.contentColumnAssistant,w=e==="system"?Nt.childrenSystem:e==="user"?Nt.childrenUser:Nt.childrenAssistant,j=e==="system",C=n!=null&&!j,$=s!=null&&!j,E=x.useId();return l.jsx(v0,{value:b,children:l.jsxs("article",{...f,ref:d,"data-testid":u,"aria-label":$?void 0:h("@astryx.chatMessage.messageFrom",{sender:e}),"aria-labelledby":$?E:void 0,...U(P("chat-message",{sender:e,density:m}),B(Nt.root,k,C&&y,i),o,c),children:[C&&l.jsx("div",{className:"x2lah0s x5du68j",children:n}),l.jsxs("div",{...B(Nt.contentColumn,v),children:[$&&l.jsx("div",{id:E,className:"x141an7d x2mo6ok xv1l7n4 x1ltkj2j x14cgwvg",children:s}),l.jsx("div",{...B(Nt.childrenWrap,w,g),children:t}),r!=null&&!j&&l.jsx("div",{children:r})]})]})})}E0.displayName="ChatMessage";const rt={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 y4({children:e,variant:t="filled",name:n,metadata:s,group:r,xstyle:a,className:i,style:o,"data-testid":c,ref:u,...d}){const f=qA(),h=(f==null?void 0:f.sender)??"assistant",p=(f==null?void 0:f.density)??"balanced",m=p==="compact"?rt.paddingCompact:p==="spacious"?rt.paddingSpacious:rt.paddingBalanced,b=h==="user",y=t==="ghost"?rt.ghost:b?rt.user:rt.assistant,g=r==="first"?b?rt.groupFirstUser:rt.groupFirstAssistant:r==="middle"?b?rt.groupMiddleUser:rt.groupMiddleAssistant:r==="last"?b?rt.groupLastUser:rt.groupLastAssistant:null,k=p==="compact"?rt.metadataPaddingCompact:p==="spacious"?rt.metadataPaddingSpacious:rt.metadataPaddingBalanced;return l.jsxs(l.Fragment,{children:[n&&l.jsx("div",{"data-chat-name":!0,...B(k,rt.nameRow,rt.headerReducedGap,b&&rt.alignEnd),children:n}),l.jsx("div",{...d,ref:u,"data-testid":c,...U(P("chat-message-bubble",{sender:h,variant:t,density:p}),B(rt.content,p==="compact"&&rt.radiusCompact,y,m,t==="ghost"&&rt.paddingBlockNone,g,a),i,o),children:e}),s&&l.jsx("div",{...B(k,rt.metadataReducedGap,b&&rt.alignEnd),children:s})]})}y4.displayName="ChatMessageBubble";const Ab={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 Lf({children:e,variant:t="default",icon:n,xstyle:s,className:r,style:a,ref:i,...o}){return t==="divider"?l.jsx("div",{ref:i,...U(P("chat-system-message",{variant:t}),B(Ab.dividerWrap,s),r,a),...o,role:"status",children:l.jsx(Bc,{label:e})}):l.jsx("div",{ref:i,...U(P("chat-system-message",{variant:t}),B(Ab.root,s),r,a),...o,role:"status",children:l.jsxs("span",{className:"x3nfvp2 x6s0dn4 x1s4dlld x2lah0s xuxw1ft",children:[n!=null&&l.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:n}),e]})})}Lf.displayName="ChatSystemMessage";const KA=1e3/60;function XA({scrollRef:e,enabled:t=!0,lockThreshold:n=10,buttonThreshold:s=100,damping:r=.7,stiffness:a=.05,mass:i=1.25}){const[o,c]=x.useState(!1),[u,d]=x.useState(!0),f=x.useRef(!0),h=x.useRef(!0),p=x.useRef(0),m=x.useRef(!1),b=x.useRef(void 0),y=x.useRef(0),g=x.useRef(0),k=x.useRef(0),v=x.useCallback(()=>{const A=e.current;if(!A||!f.current){m.current=!1,b.current=void 0,p.current=0;return}if(A.scrollHeight<=A.clientHeight){m.current=!1,b.current=void 0,p.current=0;return}const R=A.scrollHeight-A.clientHeight,I=R-A.scrollTop;if(Math.abs(I)<.5&&Math.abs(p.current)<.1){A.scrollTop=R,m.current=!1,b.current=void 0,p.current=0;return}const N=performance.now(),_=b.current?(N-b.current)/KA:1;b.current=N,p.current=(r*p.current+a*I)/i,A.scrollTop+=p.current*_,requestAnimationFrame(v)},[e,r,a,i]),w=x.useCallback(()=>{const A=e.current;A&&(m.current=!1,p.current=0,b.current=void 0,A.scrollTop=A.scrollHeight-A.clientHeight,y.current=A.scrollTop)},[e]),j=Ni("(prefers-reduced-motion: reduce)"),C=x.useCallback(()=>{if(f.current){if(j){w();return}m.current||(m.current=!0,b.current=void 0,requestAnimationFrame(v))}},[v,w,j]),$=x.useCallback(A=>{if(f.current=!0,d(!0),c(!1),h.current=!1,(A==null?void 0:A.behavior)==="instant"){w();return}C()},[C,w]),E=x.useCallback(A=>{const R=e.current;if(!R)return;const I=R.getBoundingClientRect(),_=A.getBoundingClientRect().top-I.top+R.scrollTop;R.scrollTo({top:_,behavior:"instant"}),y.current=R.scrollTop},[e]),T=x.useCallback(()=>{const A=e.current;if(!A)return;const R=A.getElementsByClassName("astryx-chat-message"),I=R[R.length-1];I instanceof HTMLElement&&E(I)},[e,E]),S=x.useCallback(()=>{f.current=!0,d(!0),c(!1),C()},[C]),M=x.useCallback(()=>{f.current=!1,m.current=!1,d(!1)},[]),z=x.useCallback(()=>{if(!t||!f.current)return;const A=e.current;if(h.current&&A&&A.scrollHeight>A.clientHeight){h.current=!1,w();return}C()},[t,C,w,e]);return x.useEffect(()=>{const A=e.current;if(!A||!t)return;y.current=A.scrollTop,g.current=A.scrollHeight,k.current=A.offsetHeight;const R=()=>{const{scrollTop:L,scrollHeight:D,offsetHeight:O}=A,q=D-L-O;c(q>s);const F=D!==g.current,X=O!==k.current;if(g.current=D,k.current=O,F||X){y.current=L;return}const J=L<y.current;y.current=L,J&&f.current&&(f.current=!1,m.current=!1,d(!1))},I=()=>{A.scrollHeight-A.scrollTop-A.offsetHeight<=n&&(f.current=!0,d(!0))},N=L=>{L.deltaY<0&&m.current&&(f.current=!1,m.current=!1,d(!1))},_=()=>{m.current&&(f.current=!1,m.current=!1,d(!1))};return A.addEventListener("scroll",R,{passive:!0}),A.addEventListener("scrollend",I),A.addEventListener("wheel",N,{passive:!0}),A.addEventListener("touchmove",_,{passive:!0}),requestAnimationFrame(()=>{A.scrollHeight>A.clientHeight&&(A.scrollTop=A.scrollHeight-A.clientHeight,y.current=A.scrollTop,h.current=!1)}),()=>{A.removeEventListener("scroll",R),A.removeEventListener("scrollend",I),A.removeEventListener("wheel",N),A.removeEventListener("touchmove",_)}},[e,t,n,s]),{isScrolledUp:o,isLocked:u,scrollToBottom:$,scrollToMessage:E,lock:S,unlock:M,scrollIfLocked:z,scrollToLastMessage:T}}function ZA({isLocked:e,onResize:t}){const[n,s]=x.useState(!1),r=x.useRef(null),a=x.useRef(e);a.current=e;const i=x.useRef(t);i.current=t;const o=x.useRef(null),c=x.useRef(null),u=x.useCallback(p=>{Wm(p,()=>{var y;(y=i.current)==null||y.call(i);const m=p.getElementsByClassName("astryx-chat-message"),b=m.length>0?m[m.length-1]:null;b&&b!==r.current&&(r.current=b,a.current||s(!0))}),c.current=()=>Km(p)},[]),d=x.useCallback(()=>{var p;(p=c.current)==null||p.call(c),c.current=null},[]),f=x.useCallback(p=>{p!==o.current&&(d(),o.current=p,p&&u(p))},[u,d]);x.useEffect(()=>()=>d(),[d]);const h=x.useCallback(()=>{s(!1)},[]);return{hasNewMessages:n,dismiss:h,contentRef:f}}const mr={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}},k4={pending:"clock",running:null,complete:"check",error:"close"},b4={pending:mr.colorPending,running:mr.colorRunning,complete:mr.colorComplete,error:mr.colorError};function YA(e){return W$(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 Rb({call:e}){const t=ke(),n=e.status??"complete",s=e.resultDetail!=null,[r,a]=x.useState(!1),i=x.useId(),o=s?()=>a(u=>!u):void 0,c=l.jsxs("div",{role:s?"button":void 0,tabIndex:s?0:void 0,"aria-expanded":s?r:void 0,"aria-controls":s&&r?i:void 0,onClick:o,onKeyDown:s?u=>{(u.key==="Enter"||u.key===" ")&&(u.preventDefault(),o==null||o())}:void 0,...{0:{className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw"},1:{className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk xh6dtrn x7a5moj xtedp8i xe9uy6x"}}[!!s<<0],children:[l.jsxs("span",{title:n==="error"?e.errorMessage:void 0,...B(mr.statusIcon,b4[n]),children:[n==="running"?l.jsx(En,{size:"sm",shade:"subtle"}):n==="pending"?l.jsx(En,{size:"sm",shade:"subtle"}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),l.jsx("span",{className:"x1n2onr6 x3nfvp2",children:l.jsx(Ce,{icon:k4[n]??"check",size:"xsm",color:"inherit"})})]}),n==="error"&&e.errorMessage!=null&&l.jsx(Mi,{children:t("@astryx.chatToolCalls.error",{message:e.errorMessage??""})})]}),l.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:e.name}),e.node!=null&&l.jsx(Su,{label:e.node,variant:"neutral",xstyle:mr.nodePill}),e.target!=null&&l.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:e.target}),(e.additions!=null||e.deletions!=null||e.stats!=null)&&l.jsxs("span",{className:"x78zum5 x6s0dn4 xzye2dw x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:[e.additions!=null&&l.jsxs("span",{className:"xtjic6",children:["+",e.additions]}),e.deletions!=null&&l.jsxs("span",{className:"xjt36v0",children:["-",e.deletions]}),e.stats]}),e.duration!=null&&n==="complete"&&l.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft x2lah0s",children:e.duration}),s&&l.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:l.jsx(Ce,{icon:"chevronDown",size:"xsm",color:"inherit"})})]});return s?l.jsxs("div",{children:[c,r&&l.jsx("div",{id:i,className:"x1f43n9v x1wesfrj",children:e.resultDetail})]}):c}function v4(e){const t=ke(),{calls:n,label:s,isExpanded:r,defaultIsExpanded:a,onExpandedChange:i,xstyle:o,className:c,style:u,ref:d,...f}=e,h=a??!1,[p,m]=x.useState(h),b=x.useId(),y=r!==void 0,g=y?r:p,k=x.useCallback(()=>{const j=!g;y||m(j),i==null||i(j)},[g,y,i]);if(n.length===0)return null;if(n.length===1)return l.jsx("div",{ref:d,...U(P("chat-tool-calls"),B(mr.root,o),c,u),...f,children:l.jsx(Rb,{call:n[0]})});const v=n[n.length-1],w=v.status??"complete";return l.jsxs("div",{ref:d,...U(P("chat-tool-calls"),B(mr.root,o),c,u),...f,children:[l.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":g,"aria-controls":b,onClick:k,onKeyDown:j=>{(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),k())},className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk",children:[g?l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1kky2od xlup9mm xv1l7n4",children:l.jsx(Ce,{icon:"wrench",size:"sm",color:"inherit"})}),l.jsx("span",{className:"x141an7d x1ltkj2j x9ynric x1e4wzip xv1l7n4",children:t("@astryx.chatToolCalls.groupLabel",{count:n.length})})]}):l.jsxs(l.Fragment,{children:[l.jsx("span",{...B(mr.statusIcon,b4[w]),children:w==="running"?l.jsx(En,{size:"sm",shade:"subtle"}):w==="pending"?l.jsx(En,{size:"sm",shade:"subtle"}):l.jsxs(l.Fragment,{children:[l.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),l.jsx("span",{className:"x1n2onr6 x3nfvp2",children:l.jsx(Ce,{icon:k4[w]??"check",size:"xsm",color:"inherit"})})]})}),l.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:v.name}),v.target!=null&&l.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:v.target})]}),l.jsx("span",{className:"x3nfvp2 x6s0dn4 x1lsbc85 x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:!g&&l.jsxs(l.Fragment,{children:[l.jsx(Ce,{icon:"wrench",size:"xsm",color:"inherit"}),n.length]})}),l.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"}}[!!g<<0],children:l.jsx(Ce,{icon:"chevronDown",size:"xsm",color:"inherit"})})]}),l.jsx("div",{id:b,...{0:{className:"xrvj5dj xihq33y xb0j27v x9kvfbb"},1:{className:"xrvj5dj xb0j27v x9kvfbb x1tu4anv"}}[!!g<<0],children:l.jsx("div",{className:"xb3r6kr x2lwn1j",children:l.jsx("div",{className:"x78zum5 xdt5ytf x7a5moj xtedp8i",children:n.map(j=>l.jsx(Rb,{call:j},YA(j)))})})})]})}v4.displayName="ChatToolCalls";const i1={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 w4({ref:e,isVisible:t,label:n,onClick:s,xstyle:r,className:a,style:i,...o}){const c=ke();return l.jsx("div",{ref:e,...U(B(i1.wrapper,r),a,i),...o,children:l.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:l.jsx(de,{label:n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),"aria-label":n??c("@astryx.chatLayoutScrollButton.scrollToBottom"),icon:l.jsx(Ce,{icon:"chevronDown",size:"md"}),variant:"ghost",size:"md",onClick:s,xstyle:[i1.button,n?i1.buttonWithLabel:null],children:n??void 0})})})}w4.displayName="ChatLayoutScrollButton";const Mt={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 QA(e){return!(e==null||e===!1||Array.isArray(e)&&e.length===0)}function j4({children:e,composer:t,density:n="balanced",emptyState:s,scrollButton:r,scrollRef:a,xstyle:i,className:o,style:c,"data-testid":u,ref:d,...f}){const h=ke(),p=x.useRef(null),m=a??p,b=!a,y=XA({scrollRef:m}),g=ZA({isLocked:y.isLocked,onResize:y.scrollIfLocked}),k=l.jsx(w4,{isVisible:y.isScrolledUp||g.hasNewMessages,label:g.hasNewMessages?h("@astryx.chatLayout.newMessages"):void 0,onClick:()=>{g.dismiss(),y.scrollToBottom()}}),v=x.useMemo(()=>({scrollContainerRef:m,contentRef:g.contentRef}),[m,g.contentRef]),w=!QA(e),C={compact:{messageArea:Mt.messageAreaCompact,blurLayer:Mt.blurLayerCompact,dock:Mt.dockCompact,dockInner:Mt.dockInnerCompact},balanced:{messageArea:Mt.messageAreaBalanced,blurLayer:Mt.blurLayerBalanced,dock:Mt.dockBalanced,dockInner:Mt.dockInnerBalanced},spacious:{messageArea:Mt.messageAreaSpacious,blurLayer:Mt.blurLayerSpacious,dock:Mt.dockSpacious,dockInner:Mt.dockInnerSpacious}}[n];return l.jsx(S0,{value:v,children:l.jsxs("div",{...f,ref:ct(d,p),"data-testid":u,...U(P("chat-layout",{density:n}),B(Mt.root,b&&Mt.rootScrollable,i),o,c),children:[l.jsx("div",{...B(Mt.messageArea,C.messageArea),children:w&&s?l.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu xz65tgg",children:s}):e}),l.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,l.jsx("div",{...B(Mt.blurLayer,C.blurLayer)}),l.jsx("div",{...B(Mt.dock,C.dock),children:l.jsx("div",{...B(Mt.dockInner,C.dockInner),children:t})})]})]})})}j4.displayName="ChatLayout";const Pc=x.createContext(null);Pc.displayName="ListContext";const o1={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}},JA={kt6KFK:"x1khind5",$$css:!0},eR={counterStart:e=>[JA,{"--x-counterReset":`astryx-list ${e}`!=null?`astryx-list ${e}`:void 0}]};function kt({children:e,density:t="balanced",hasDividers:n=!1,header:s,listStyle:r="none",start:a,xstyle:i,className:o,style:c,"data-testid":u,ref:d}){const f=x.useId(),h=r==="decimal",p=h?"ol":"ul",m=x.useMemo(()=>({density:t,hasDividers:n,listStyle:r}),[t,n,r]),b=l.jsx(p,{ref:d,"data-testid":u,"aria-labelledby":s!=null?f:void 0,...h&&a!=null&&a!==1?{start:a}:{},role:"list",...U(P("list",{density:t,listStyle:r}),B(o1.list,n&&o1.withDividers,r!=="none"&&(a!=null&&a!==1?eR.counterStart(a-1):o1.withCounter),i),o,c),children:e});return s==null?l.jsx(Pc,{value:m,children:b}):l.jsx(Pc,{value:m,children:l.jsxs("div",{className:"x78zum5 xdt5ytf",children:[l.jsx("div",{id:f,className:"x1p37lm5",children:s}),b]})})}kt.displayName="List";const tR=[];function T0({label:e,isLabelHidden:t=!1,description:n,status:s,value:r,onChange:a,changeAction:i,density:o="balanced",hasDividers:c=!1,isDisabled:u=!1,disabledMessage:d,isReadOnly:f=!1,children:h,ref:p,width:m,xstyle:b,className:y,style:g,"data-testid":k,...v}){const w=x.useId(),j=x.useId(),C=x.useId(),$=x.useId(),[,E]=x.useTransition(),T=r!==void 0,S=r??tR,[M,z]=x.useOptimistic(S),[A,R]=x.useOptimistic(null),I=u&&!!d,N=Is({placement:"above",focusTrigger:"always",isEnabled:I}),_=x.useCallback((D,O)=>{a==null||a(D),i&&E(async()=>{z(D),O!==void 0&&R(O),await i(D)})},[a,i,E,z,R]),L=x.useMemo(()=>({value:T?M:void 0,onChange:T?_:void 0,isDisabled:u,hasDisabledMessage:I,isReadOnly:f,loadingValue:A}),[T,M,_,u,I,f,A]);return l.jsxs(Al,{...v,ref:p,"data-testid":k,label:e,isLabelHidden:t,description:n,inputID:w,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:m,xstyle:b,...U(P("checkbox-list"),{className:y,style:g}),children:[l.jsx(Wh,{value:L,children:l.jsx("div",{ref:D=>{N.ref(D)},role:"group","aria-labelledby":j,"aria-describedby":[n?C:null,s!=null&&s.message?$:null,I?N.describedBy:null].filter(Boolean).join(" ")||void 0,children:l.jsx(kt,{density:o,hasDividers:c,children:h})})}),I&&N.renderTooltip(d)]})}T0.displayName="CheckboxList";const Ib={withCounter:{kAmcRD:"xfrknyr",$$css:!0},withDivider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},nR={noRadius:{kaIpWk:"x2u8bby",$$css:!0}};function We({label:e,description:t,startContent:n,endContent:s,onClick:r,interactiveRef:a,href:i,target:o,rel:c,isDisabled:u=!1,isSelected:d=!1,xstyle:f,className:h,style:p,ref:m,...b}){const y=x.use(Pc),g=(y==null?void 0:y.density)??"balanced",k=(y==null?void 0:y.hasDividers)??!1,v=(y==null?void 0:y.listStyle)??"none",w=v!=="none",j=v==="disc"?l.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:l.jsx("span",{className:"x1v4s8kt xols6we x16rqkct x19aspcf"})}):v==="circle"?l.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:l.jsx("span",{className:"x1v4s8kt xols6we x16rqkct xmkeg23 x1y0btm7 xqcx1ss xjbqb8w"})}):v==="decimal"?l.jsx("span",{className:"xoi2r2e x2lah0s x1tgivj0 xjm74w1 xw6l6zx x12xnipv xc2ndz5"}):null;return l.jsx(Ii,{as:"li",ref:m,marker:j,startContent:n,label:e,description:t,endContent:s,onClick:r,interactiveRef:a,href:i,target:o,rel:c,isDisabled:u,isSelected:d,density:g,xstyle:[w&&Ib.withCounter,k&&Ib.withDivider,k&&nR.noRadius,f],...U(P("list-item"),{className:h,style:p}),...b})}We.displayName="ListItem";const sR={selected:{kWkggS:"xgcxg3y",$$css:!0}};function z0({label:e,"aria-label":t,value:n,description:s,endContent:r,isDisabled:a=!1,isLoading:i=!1,isChecked:o,onCheck:c,ref:u,xstyle:d,className:f,style:h,onClick:p,...m}){const b=ke(),y=x.use(Wh);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 g=t??(typeof e=="string"?e:b("@astryx.checkboxList.item.checkbox"));Tl("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(Pc),w=((k==null?void 0:k.density)??"balanced")==="compact"?"sm":"md",j=((y==null?void 0:y.isDisabled)??!1)||a,C=(y==null?void 0:y.isReadOnly)??!1,$=i||((y==null?void 0:y.loadingValue)!=null&&n!==void 0?y.loadingValue===n:!1);let E=!1;y&&y.value!==void 0&&n!==void 0?E=y.value.includes(n):o!==void 0&&(E=o);const T=!C&&(y!=null||c!=null),S=x.useRef(null),M=T||p!=null,z=()=>{var A,R;if(!(j||C||$))if(y&&y.value!==void 0&&n!==void 0)y.value.includes(n)?(A=y.onChange)==null||A.call(y,y.value.filter(N=>N!==n),n):(R=y.onChange)==null||R.call(y,[...y.value,n],n);else{const I=E!==!0;c==null||c(I)}};return l.jsx(We,{...m,ref:u,label:e,description:s,endContent:r,isDisabled:j,interactiveRef:M?S:void 0,"aria-busy":$||void 0,xstyle:[E===!0&&!j&&!C&&sR.selected,d],className:f,style:h,startContent:l.jsx(O3,{ref:S,label:g,isLabelHidden:!0,value:E,onChange:()=>z(),onClick:p,isDisabled:j,isReadOnly:C,isLoading:$,size:w})})}z0.displayName="CheckboxListItem";const Ap=120;function rR(e){let t=0,n=0;const s=[];for(const o of e){const c=o.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??Ap:0;t+=u,s.push({key:o.key,proportion:u,minWidth:d})}}let r=0;if(t>0)for(const o of s){const c=o.minWidth*t/o.proportion;c>r&&(r=c)}const a=n+r,i=new Map;for(const o of e){const c=o.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 f=c.minWidth??Ap;u.minWidth=`${f}px`}}i.set(o.key,{style:u})}return{columns:i,tableMinWidth:a}}function aR(e=1,t){return{type:"proportional",value:e,minWidth:(t==null?void 0:t.minWidth)??Ap}}function _b(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function iR(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 oR(e){return e==null?0:typeof e=="string"?e.length:typeof e=="number"||typeof e=="boolean"?String(e).length:0}function lR(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 cR=60,uR=8;function dR(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(a=>{const i=_b(a).length;let o=i,c=i;for(const u of s){const d=oR(u[a]);d>o&&(o=d);const f=lR(u[a]);f>c&&(c=f)}return{key:a,headerLen:i,maxContentLen:o,maxWordLen:c}}).map(a=>{const i=a.maxContentLen<=6?1:a.maxContentLen<=15?2:3,o=Math.max(Math.max(a.headerLen,a.maxWordLen)*uR,cR);return{key:a.key,header:_b(a.key),width:aR(i,{minWidth:o})}})}const Db={x139im0d:"x139im0d",$$css:!0},S4={cell:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",ks0D6T:"x1m189uc",$$css:!0}},fR={cell:{kVQacm:"xb3r6kr",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",ks0D6T:"x1m189uc",$$css:!0}},C4={compact:{kZCmMZ:"x5uh4xs",kwRFfy:"xbg7gas",$$css:!0},balanced:{kZCmMZ:"x9bi00s",kwRFfy:"xpilulx",$$css:!0},spacious:{kZCmMZ:"x18c6q21",kwRFfy:"x1wzlfcn",$$css:!0}},Qh=x.createContext(null);Qh.displayName="TableContext";const hR={row:{kWkggS:"x1dnou9g","--table-row-overlay":"x1rht92",$$css:!0}},xR={row:{kWkggS:"xe9uy6x","--table-row-overlay":"x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}},pR={row:{kWkggS:"x1dnou9g xe9uy6x","--table-row-overlay":"x1rht92 x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}};function Of({children:e,xstyle:t,ref:n,isHeaderRow:s=!1,...r}){const a=x.use(Qh);if(!a)return l.jsx("tr",{ref:n,...r,...U(P("table-row"),B(Db,t)),children:e});const i=[];return s||(a.isStriped&&a.hasHover?i.push(pR.row):a.isStriped?i.push(hR.row):a.hasHover&&i.push(xR.row)),a.dividers==="rows"||a.dividers,t&&i.push(...t),l.jsx("tr",{ref:n,...r,...U(P("table-row"),B(Db,...i)),children:e})}Of.displayName="TableRow";const ad={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 N0({children:e,menuWidth:t,size:n="md",label:s,isDisabled:r=!1,onOpenChange:a,ref:i,className:o,style:c,xstyle:u,triggerXstyle:d,"data-testid":f,...h}){const p=ke(),m=s??p("@astryx.contextMenu.label"),{items:b,menuContent:y,...g}=h,k=b??[],v=y,w=x.useId(),j=x.useRef({x:0,y:0}),C=x.useRef(null),$=x.useRef(null),E=x.useRef(null),[T,S]=x.useState(!1),M=El({mode:"context",onHide:x.useCallback(()=>{S(!1),a==null||a(!1);const Q=E.current;E.current=null,Q&&document.contains(Q)&&Q.focus()},[a]),onShow:x.useCallback(()=>{S(!0),a==null||a(!0)},[a]),lightDismiss:!1}),z=x.useCallback(()=>{M.hide()},[M]),{listRef:A,handleKeyDown:R,focusFirst:I,focusItem:N,ownsEvent:_,getItems:L}=Ri({itemSelector:Fh,boundarySelector:Gh,wrap:!1,onEscape:z}),D=Uh({getItemLabels:()=>L().map(Q=>Q.textContent),onMatch:N,getCurrentIndex:()=>L().findIndex(Q=>Q===document.activeElement||Q.contains(document.activeElement))});x.useEffect(()=>{if(!T)return;const Q=K=>{const re=A.current;re&&!re.contains(K.target)&&z()};return document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[T,z,A]),x.useEffect(()=>{if(!T)return;const Q=K=>{K.key==="Escape"&&(K.isComposing||K.keyCode===229||(K.preventDefault(),z()))};return document.addEventListener("keydown",Q),()=>{document.removeEventListener("keydown",Q)}},[T,z]);const O=x.useCallback(Q=>{if(_(Q)){if(Q.key==="Enter"||Q.key===" "){Q.preventDefault();const K=document.activeElement;K&&Cu.has(K.getAttribute("role")??"")&&K.click();return}if(Q.key==="Tab"){z();return}if(D.onKeyDown(Q)){Q.preventDefault();return}R(Q)}},[R,z,D,_]),q=x.useCallback((Q,K,re)=>{j.current={x:Q,y:K};const oe=C.current;oe&&(oe.style.left=`${Q}px`,oe.style.top=`${K}px`),E.current=document.activeElement instanceof HTMLElement?document.activeElement:re,M.show(),requestAnimationFrame(()=>I())},[M,I]),F=x.useCallback(Q=>{if(r)return;Q.preventDefault();const K=$.current,re=K==null?void 0:K.getBoundingClientRect(),oe=Q.clientX===0&&Q.clientY===0&&Q.detail===0,be=oe||!re?0:Q.clientX-re.left,pe=oe||!re?(re==null?void 0:re.height)??0:Q.clientY-re.top;q(be,pe,Q.currentTarget)},[r,q]),X=DN({disabled:r,onLongPress:x.useCallback(Q=>{var re;const K=(re=$.current)==null?void 0:re.getBoundingClientRect();q(K?Q.x-K.left:Q.x,K?Q.y-K.top:Q.y,$.current)},[q])}),J=t?ad.popoverCustomWidth(t):ad.popover,Z=x.useMemo(()=>({closeMenu:z,menuSize:n}),[z,n]),te=b!==void 0?Vh(k):v;return l.jsxs(l.Fragment,{children:[l.jsxs("div",{ref:ct(i,$),onContextMenu:F,...X,...g,"data-testid":f,...B(ad.trigger,...d?Array.isArray(d)?d:[d]:[]),children:[e,l.jsx("span",{ref:ct(C,M.ref),"aria-hidden":"true",...U({className:"x10l6tqk xnalus7 xqtp20y x47corl"},{style:{left:`${j.current.x}px`,top:`${j.current.y}px`}})})]}),M.render(l.jsx("div",{ref:A,id:w,role:"menu","aria-label":m,onKeyDown:O,onContextMenu:Q=>Q.preventDefault(),...U(P("context-menu"),B(ad.menu,u),o,c),children:l.jsx(Nl,{value:Z,children:te})}),{placement:"below",alignment:"start",xstyle:[J,Js.below]})]})}N0.displayName="ContextMenu";function $4(e){const t=[],n=new Map;for(const r of e){const a=r.group??"__ungrouped__";let i=n.get(a);i||(i=[],n.set(a,i),t.push(a)),i.push(r)}const s=[];return t.forEach((r,a)=>{a>0&&s.push({type:"divider"});for(const i of n.get(r)??[])s.push({label:typeof i.label=="string"?i.label:i.id,icon:i.checked?l.jsx(Ce,{icon:"check",size:"xsm","aria-hidden":!0}):i.icon,isDisabled:i.disabled,onClick:i.onSelect})}),s}function gR({element:e,getActions:t,triggerXstyle:n}){const[s,r]=x.useState(null);return l.jsx(N0,{items:s??[],triggerXstyle:n,onOpenChange:a=>{r(a?$4(t()):null)},children:e})}function E4(e,t,n){return typeof t=="function"?l.jsx(gR,{element:e,getActions:t,triggerXstyle:n}):!t||t.length===0?e:l.jsx(N0,{items:$4(t),triggerXstyle:n,children:e})}function mR(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 T4(e,t){return t?Array.isArray(t)?[...e,...t]:[...e,t]:e}function z4(){return x.use(Qh)}const yR={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}},kR={compact:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},bR={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0}},Lb={fill:{k1xSpc:"x1lliihq",kB7OPa:"x9f619",kZKoxP:"x5yr21d",kzqmXN:"xh8yej3",$$css:!0}},vR={cell:{kZKoxP:"x5yr21d",$$css:!0}},wR={cell:{kt9PQ7:"x92x3c3 x1wp2rvj",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},jR={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}},SR={middle:{kXLuUW:"xxymvpz",$$css:!0},top:{kXLuUW:"x16dsc37",$$css:!0},bottom:{kXLuUW:"x3ajldb",$$css:!0}};function M0({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:a,...i}){const o=z4(),c=typeof a=="function"||Array.isArray(a)&&a.length>0,u=o?[c?kR[o.density]:yR[o.density],o.textOverflow==="truncate"?S4.cell:fR.cell,C4[o.density],SR[o.verticalAlign],...mR(o,wR.cell,jR.cell),...c?[vR.cell]:[]]:[],d=c&&o?[Lb.fill,bR[o.density]]:c?Lb.fill:void 0,f=E4(e,a,d);return l.jsx("td",{ref:n,...i,...U(P("table-cell",{density:o==null?void 0:o.density}),B(...T4(u,t)),s,r),children:f})}M0.displayName="TableCell";const CR={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}},$R={cell:{k63SB2:"x2mo6ok",kMwMTN:"xv1l7n4",k9WMMc:"x1yc453h",$$css:!0}},ER={cell:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},TR={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}};function A0({children:e,xstyle:t,ref:n,className:s,style:r,contextMenuActions:a,...i}){const o=z4(),c=[];o&&(c.push($R.cell,CR[o.density],ER.cell,S4.cell,C4[o.density]),(o.dividers==="columns"||o.dividers==="grid")&&c.push(TR.cell));const u=E4(e,a);return l.jsx("th",{ref:n,...i,...U(P("table-header-cell",{density:o==null?void 0:o.density}),B(...T4(c,t)),s,r),children:u})}A0.displayName="TableHeaderCell";function R0({ref:e,children:t,xstyle:n,className:s,style:r,...a}){return l.jsx("thead",{ref:e,...U(P("table-header"),B(n),s,r),...a,children:t})}R0.displayName="TableHeader";function I0({ref:e,children:t,xstyle:n,className:s,style:r,...a}){return l.jsx("tbody",{ref:e,...U(P("table-body"),B(n),s,r),...a,children:t})}I0.displayName="TableBody";const Ob={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 ya({title:e,description:t,icon:n,actions:s,headingLevel:r=3,isCompact:a=!1,xstyle:i,className:o,style:c,ref:u,...d}){const f=`h${r}`;return l.jsxs("div",{ref:u,role:"status",...U(P("empty-state",{variant:a?"compact":null}),B(Ob.container,a&&Ob.containerCompact,i),o,c),...d,children:[n!=null&&l.jsx("div",{"aria-hidden":"true",children:n}),l.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 xxc7z9f",children:[x.createElement(f,{0:{className:"x1ghz6dp xjb2p0i x18juvz8 x2mo6ok xf74fhv x1tgivj0"},1:{className:"x1ghz6dp xjb2p0i x2mo6ok xf74fhv x1tgivj0 xcr08ib"}}[!!a<<0],e),t!=null&&l.jsx("div",{...{0:{className:"x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4"},1:{className:"x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d"}}[!!a<<0],children:t})]}),s!=null&&l.jsx("div",{...{0:{className:"x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d"},1:{className:"x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf"}}[!!a<<0],children:s})]})}ya.displayName="EmptyState";const l1={table:{kzqmXN:"xh8yej3",kLvRdT:"x1mwwwfo",kheTzg:"x1gukg7c",kPzzVL:"x140o2bo",$$css:!0},tableAutoLayout:{kPzzVL:"x1drmoe9",$$css:!0}};function Wa(e,t,n,...s){return e.reduce((r,a,i)=>{const o=t(a);if(!o)return r;try{return o(r,...s)}catch(c){return E5("Table",`Plugin at index ${i} threw in transform:`,c),r}},n)}const zR=[];function NR(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 MR({item:e,rowIndex:t,rowKey:n,columns:s,plugins:r,textOverflow:a,RowComponent:i,CellComponent:o,ariaRowIndex:c}){const u=s.map((h,p)=>{var w;const m={};h.align&&(m.style={textAlign:h.align});const y=Wa(r,j=>j.transformBodyCell,{htmlProps:m,xstyle:[],columnIndex:p,columns:s},h,e,p,s),g=!h.renderCell,k=g?iR(e,h.key):((w=h.renderCell)==null?void 0:w.call(h,e))??null;let v;return g&&a==="truncate"&&typeof k=="string"&&k.length>0?v=l.jsx(se,{type:"body",maxLines:1,children:k}):v=k,l.jsx(o,{...y.htmlProps,contextMenuActions:y.contextMenuActions,xstyle:y.xstyle,children:v},h.key)}),d=Wa(r,h=>h.transformBodyRow,{htmlProps:c==null?{}:{"aria-rowindex":c},xstyle:[],children:l.jsx(l.Fragment,{children:u})},e,t);return l.jsx(i,{ref:d.ref,...d.htmlProps,xstyle:d.xstyle,children:d.children},n)}function AR(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 a of r)if(n[a]!==s[a])return!1;return!0}const RR=x.memo(MR,AR);function IR({data:e,columns:t,idKey:n,plugins:s,children:r,textOverflow:a="wrap",scrollWrapper:i,emptyState:o,rowIndexStart:c,rowCount:u,xstyle:d,className:f,style:h,ref:p,...m}){const b=ke(),y=s??zR,g=c!=null||u!=null,k=c??1,v=g?u??-1:void 0,w=Of,j=M0,C=A0,$=t??(e?dR(e):[]),E=Wa(y,D=>D.transformColumns,$),T=x.useRef(E);NR(T.current,E)||(T.current=E);const S=T.current,M=rR(S),z=Wa(y,D=>D.transformTable,{htmlProps:{},xstyle:r?[l1.table,l1.tableAutoLayout]:[l1.table]}),A=S.map((D,O)=>{var me;const q=D.header??D.key,F={"data-column-key":D.key,scope:"col"};D.align&&(F.style={textAlign:D.align});const J=Wa(y,ce=>ce.transformHeaderCell,{htmlProps:F,xstyle:[],content:q,columnIndex:O,columns:S},D,O,S),Z=((me=M.columns.get(D.key))==null?void 0:me.style)??{},te=J.htmlProps.style,Q={...J.htmlProps,style:te?{...Z,...te}:Z},K=J.content??q,re=typeof K=="string"&&K.length>0?{title:K}:{},{before:oe,after:be,overlay:pe,below:he}=J,Y=oe!=null||be!=null||pe!=null||he!=null?l.jsxs(l.Fragment,{children:[oe,be!=null?l.jsxs("div",{className:"x3nfvp2 x6s0dn4 xzye2dw xeuugli",children:[K,be]}):K,pe,he]}):K;return l.jsx(C,{...Q,...re,contextMenuActions:J.contextMenuActions,xstyle:J.xstyle,children:Y},D.key)}),R=Wa(y,D=>D.transformHeaderRow,{htmlProps:{},xstyle:[],children:l.jsx(l.Fragment,{children:A})}),I=e!=null&&e.length>0,N=S.length>0,_={...z.htmlProps.style,...h,...M.tableMinWidth>0?{minWidth:`${M.tableMinWidth}px`}:null};let L=l.jsx("table",{ref:p,...v!=null?{"aria-rowcount":v}:null,...z.htmlProps,...U(P("base-table"),B(...z.xstyle,d),[z.htmlProps.className,f].filter(Boolean).join(" ")||void 0,_),...m,children:r||l.jsxs(l.Fragment,{children:[N&&l.jsx(R0,{children:l.jsx(w,{...R.htmlProps,isHeaderRow:!0,xstyle:R.xstyle,children:R.children})}),l.jsx(I0,{children:I?e.map((D,O)=>{const q=n==null?O:typeof n=="function"?n(D):String(D[n]);return l.jsx(RR,{item:D,rowIndex:O,rowKey:q,columns:S,plugins:y,textOverflow:a,RowComponent:w,CellComponent:j,ariaRowIndex:g?k+O:void 0},q)}):e!=null&&o!==!1&&l.jsx("tr",{children:l.jsx("td",{colSpan:S.length,children:o??l.jsx(ya,{title:b("@astryx.table.noData"),isCompact:!0})})})})]})});if(i){const D=Wa(y,O=>O.transformScrollWrapper,{htmlProps:{},xstyle:[]});L=l.jsx(i,{htmlProps:D.htmlProps,xstyle:D.xstyle,beforeTable:D.beforeTable,afterTable:D.afterTable,children:L})}for(let D=y.length-1;D>=0;D--){const O=y[D];if(O.transformTableContext)try{L=O.transformTableContext(L)}catch(q){E5("Table","Plugin threw in transformTableContext:",q)}}return L}const N4=IR;N4.displayName="BaseTable";const M4=["columnSettings","sort","tree","selection","pagination"],Bb=new Map(M4.map((e,t)=>[e,t]));function _R(e){const t=M4.length;return e.sort(([n],[s])=>{const r=Bb.get(n)??t,a=Bb.get(s)??t;return r-a})}const id=new Set(["transformColumns","transformTable","transformHeaderRow","transformHeaderCell","transformBodyRow","transformBodyCell","transformScrollWrapper","transformTableContext"]);function DR(e,t){const n=Object.keys(t);for(const r of n)id.has(r)||oi("Table",`Plugin "${e}" has unknown key "${r}". Valid keys: ${[...id].join(", ")}. This key will be ignored.`);for(const r of n)if(id.has(r)){const a=t[r];a!=null&&typeof a!="function"&&oi()}n.some(r=>id.has(r)&&typeof t[r]=="function")||oi()}function LR(e,t){const n=x.useRef(null);if(n.current!=null){const a=n.current;if(a.basePlugins===e&&a.userPlugins===t)return a.result;if(a.basePlugins===e&&OR(a.userPlugins,t))return a.userPlugins=t,a.result}const s=t?_R(Object.entries(t)).map(([,a])=>a):[],r=[...e,...s];if(t)for(const[a,i]of Object.entries(t))DR(a,i);return n.current={basePlugins:e,userPlugins:t,result:r},r}function OR(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 BR={base:{kMv6JI:"xjb2p0i",kMwMTN:"x1tgivj0",$$css:!0}},qb={base:{kXHlph:"xw2csxc",kuHK5b:"x5lxg6s",$$css:!0},containerBleed:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",keoZOQ:"xkibk3",k1K539:"xlayyun",$$css:!0}};function qR({children:e,htmlProps:t,xstyle:n,beforeTable:s,afterTable:r}){const a=ke(),{ref:i,...o}=t??{};return l.jsxs("div",{ref:i,tabIndex:0,role:"group","aria-label":a("@astryx.table.label"),...o,...U(P("table-scroll-wrapper"),B(qb.base,qb.containerBleed,...n??[])),children:[s,e,r]})}function HR(){return{transformTable(e){const t=e.htmlProps.className??"",n=P("table").className;return{...e,htmlProps:{...e.htmlProps,className:t?`${t} ${n}`:n},xstyle:[...e.xstyle,BR.base]}}}}function PR({density:e="balanced",dividers:t="rows",isStriped:n=!1,hasHover:s=!1,verticalAlign:r="middle",textOverflow:a="wrap",plugins:i,columns:o,data:c,ref:u,...d}){const f=x.useMemo(()=>HR(),[]),h=x.useMemo(()=>[f],[f]),p=LR(h,i),m=x.useMemo(()=>({density:e,dividers:t,isStriped:n,hasHover:s,verticalAlign:r,textOverflow:a}),[e,t,n,s,r,a]);return l.jsx(Qh,{value:m,children:l.jsx(N4,{ref:u,data:c,columns:o,plugins:p,textOverflow:a,scrollWrapper:qR,...d})})}const A4=PR;A4.displayName="Table";function UR(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 FR(e,t,n,s){const r=t+e.length;if(n.length===0)return null;const a=n[0];if(r<=a)return null;const i=[];let o=t;o<a&&a<r&&(i.push({key:`settled-${s}`,text:e.slice(0,a-t),fading:!1}),o=a);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<=o)continue;const f=Math.max(u,o),h=Math.min(d,r);f>=h||(i.push({key:`fade-${s}-b${u}`,text:e.slice(f-t,h-t),fading:!0}),o=h)}return i.length>0?i:null}const _a={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 R4({ref:e,source:t,number:n,variant:s="label",xstyle:r,className:a,style:i,"data-testid":o,...c}){const u=ke(),d=t.title??String(n),f=t.url,h=t.icon!=null&&typeof t.icon!="string"?t.icon:null,p=t.src??(typeof t.icon=="string"?t.icon:void 0),m=h!=null||p!=null,b=f?"a":"span",y=f?"doc-noteref":void 0,g=f?{href:f,target:"_blank",rel:"noopener noreferrer",title:d}:{title:d},k=e;return s==="number"?l.jsx(b,{...c,ref:k,role:y,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":o,...g,...U(P("citation",{variant:s}),B(_a.number,f!=null&&_a.numberHover,f!=null&&_a.numberInteractive,r),a,i),children:n}):l.jsxs(b,{...c,ref:k,role:y,"aria-label":u("@astryx.citation.label",{number:n,title:d}),"data-testid":o,...g,...U(P("citation",{variant:s}),B(_a.label,m&&_a.labelWithIcon,f!=null&&_a.labelHover,f!=null&&_a.labelInteractive,r),a,i),children:[m&&l.jsx("span",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x12xnipv x6b6gus xjspbzw x10xzikg x1litavf x1y0btm7 x14i3s5s xb3r6kr x2lah0s",children:h!=null?_s(h,{size:"sm"}):l.jsx("img",{src:p,alt:"",className:"x1ad1g3v x9gl9lo"})}),l.jsx("span",{className:"xb3r6kr xlyipyv xuxw1ft xeuugli",children:d})]})}R4.displayName="Citation";const GR={sourceIds:void 0,autolink:void 0};function _0(e){if(e==null)return GR;if(typeof e.has=="function")return{sourceIds:e,autolink:void 0};const t=e;return{sourceIds:t.sourceIds,autolink:t.autolink}}const VR=/^ {0,3}\[([^\]^](?:\\.|[^\]\\])*)\]:[ \t]*(?:<([^<>\n]*)>|(\S+))([ \t]+(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\)))?[ \t]*$/,WR=/^ {0,3}(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\))[ \t]*$/;function Uc(e){return e.trim().replace(/\s+/g," ").toLowerCase()}function KR(e){const t=VR.exec(e);if(t==null)return null;const n=Uc(t[1]),s=t[2]!=null?t[2]:t[3];return n===""||s==null?null:{label:n,destination:s,hasTitle:t[4]!=null}}function I4(e){const t=e.split(`
152
- `),n=new Map,s=new Array(t.length).fill(!0);let r=!0,a=!1,i="";for(let c=0;c<t.length;c++){const u=t[c];if(a){u.startsWith(i)?(a=!1,i="",r=!0):r=!1;continue}const d=u.match(/^(`{3,}|~{3,})/);if(d){a=!0,i=d[1],r=!1;continue}if(u.trim()===""){r=!0;continue}if(r){const f=KR(u);if(f!=null){n.has(f.label)||n.set(f.label,f.destination),s[c]=!1,!f.hasTitle&&c+1<t.length&&WR.test(t[c+1])&&(s[c+1]=!1,c++);continue}}r=/^ {0,3}#{1,6}(?: |\t|$)/.test(u)||D0(u)}if(n.size===0)return{defs:n,cleaned:e};const o=t.filter((c,u)=>s[u]).join(`
153
- `);return{defs:n,cleaned:o}}function XR(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 ZR(e,t,n,s){const r=e.indexOf("]",t+1);if(r===-1)return null;const a=e.slice(t+1,r);if(e[r+1]==="["){const o=e.indexOf("]",r+2);if(o!==-1){const c=e.slice(r+2,o),u=c===""?a:c,d=n.get(Uc(u));if(d!=null)return{node:{type:"link",href:d,children:Yr(a,s)},end:o+1}}}if(a.trim()==="")return null;const i=n.get(Uc(a));return i==null?null:{node:{type:"link",href:i,children:Yr(a,s)},end:r+1}}function YR(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 i=e.indexOf("]",s+2);if(i!==-1){const o=e.slice(s+2,i),c=o===""?r:o,u=n.get(Uc(c));if(u!=null)return{node:{type:"image",src:u,alt:r},end:i+1}}}if(r.trim()==="")return null;const a=n.get(Uc(r));return a==null?null:{node:{type:"image",src:a,alt:r},end:s+1}}function Hb(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 Ji(e){return e==null?!1:/\w/.test(e)}function QR(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 JR(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 eI(e,t){return Fc(e,_0(t))}function Fc(e,t){const n=Yr(e,t);return t.autolink==="gfm"?O4(n):n}function Yr(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 o=e[s+1]==="`"?e[s+2]==="`"?3:2:1,c=s+o,u=e.indexOf("`".repeat(o),c);if(u!==-1){n.push({type:"code",content:e.slice(c,u)}),s=u+o;continue}}{const o=QR(e,s,t);if(o){n.push({type:"citation",sourceId:o.sourceId}),s=o.end;continue}}if(e[s]==="!"&&e[s+1]==="["){const o=e.indexOf("]",s+2);if(o!==-1&&e[o+1]==="("){const c=Hb(e,o+2);if(c!==-1){n.push({type:"image",src:e.slice(o+2,c),alt:e.slice(s+2,o)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="!"&&e[s+1]==="["){const o=YR(e,s,t.linkDefs);if(o){n.push(o.node),s=o.end;continue}}{const o=JR(e,s,t);if(o){n.push({type:"citation",sourceId:o.sourceId}),s=o.end;continue}}if(e[s]==="["){const o=e.indexOf("]",s+1);if(o!==-1&&e[o+1]==="("){const c=Hb(e,o+2);if(c!==-1){n.push({type:"link",href:e.slice(o+2,c),children:Yr(e.slice(s+1,o),t)}),s=c+1;continue}}}if(t.linkDefs!=null&&e[s]==="["){const o=ZR(e,s,t.linkDefs,t);if(o){n.push(o.node),s=o.end;continue}}if(e[s]==="*"&&e[s+1]==="*"&&e[s+2]==="*"||e[s]==="_"&&e[s+1]==="_"&&e[s+2]==="_"){const o=e.slice(s,s+3),c=e[s]==="_";if(!(c&&Ji(e[s-1]))){const u=e.indexOf(o,s+3);if(u!==-1&&(!c||!Ji(e[u+3]))){n.push({type:"bold",children:[{type:"italic",children:Yr(e.slice(s+3,u),t)}]}),s=u+3;continue}}}if(e[s]==="*"&&e[s+1]==="*"||e[s]==="_"&&e[s+1]==="_"){const o=e.slice(s,s+2),c=e[s]==="_";if(!(c&&Ji(e[s-1]))){const u=e.indexOf(o,s+2);if(u!==-1&&(!c||!Ji(e[u+2]))){n.push({type:"bold",children:Yr(e.slice(s+2,u),t)}),s=u+2;continue}}}if(e[s]==="~"&&e[s+1]==="~"){const o=e.indexOf("~~",s+2);if(o!==-1){n.push({type:"strikethrough",children:Yr(e.slice(s+2,o),t)}),s=o+2;continue}}if(e[s]==="*"||e[s]==="_"){const o=e[s]==="_";if(!(o&&Ji(e[s-1]))){const c=e.indexOf(e[s],s+1);if(c!==-1&&c>s+1&&(!o||!Ji(e[c+1]))){n.push({type:"italic",children:Yr(e.slice(s+1,c),t)}),s=c+1;continue}}}let r=s+1;for(;r<e.length&&!"*_~`[!\\\n【".includes(e[r]);)r++;const a=e.slice(s,r);if(r<e.length&&e[r]===`
154
- `){const o=a.replace(/ +$/,"");if(a.length-o.length>=2){if(o.length>0){const c=n[n.length-1];(c==null?void 0:c.type)==="text"?c.content+=o:n.push({type:"text",content:o})}n.push({type:"break"}),s=r+1;continue}}const i=n[n.length-1];(i==null?void 0:i.type)==="text"?i.content+=a:n.push({type:"text",content:a}),s=r}return n}const _4="[^\\s<]+",tI="https?:\\/\\/",D4="[A-Za-z0-9._%+-]+",Pb="[A-Za-z0-9-]+",L4=`${Pb}(?:\\.${Pb})+`,nI="[a-zA-Z][a-zA-Z0-9+.-]*",sI="[^<>\\s]*",rI=new RegExp(`${tI}${_4}`,"g"),aI=new RegExp(`www\\.${_4}`,"g"),iI=new RegExp(`${D4}@${L4}`,"g"),oI=new RegExp(`<(${nI}:${sI})>`,"g"),lI=new RegExp(`<(${D4}@${L4})>`,"g"),Ub=new Set("?!.,:*_~"),cI=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._%+-@");function Fb(e){let t=e;for(;t.length>0;){if(Ub.has(t[t.length-1])){let n=t.length-1;for(;n>0&&Ub.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 uI=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/=");function Gb(e){return e==null?!0:!uI.has(e)}function dI(e){const t=[];{const r=new RegExp(oI.source,"g");let a;for(;(a=r.exec(e))!==null;){const i=a[1];t.push({start:a.index,end:a.index+a[0].length,href:i,display:i})}}{const r=new RegExp(lI.source,"g");let a;for(;(a=r.exec(e))!==null;){const i=a[1];t.push({start:a.index,end:a.index+a[0].length,href:`mailto:${i}`,display:i})}}{const r=new RegExp(rI.source,"g");let a;for(;(a=r.exec(e))!==null;){const i=e[a.index-1];if(!Gb(i)||e.slice(a.index-2,a.index)==="](")continue;const o=Fb(a[0]);o.length!==0&&t.push({start:a.index,end:a.index+o.length,href:o,display:o})}}{const r=new RegExp(aI.source,"g");let a;for(;(a=r.exec(e))!==null;){const i=e[a.index-1];if(!Gb(i)||e.slice(a.index-3,a.index)==="://")continue;const o=Fb(a[0]);o.length!==0&&t.push({start:a.index,end:a.index+o.length,href:`http://${o}`,display:o})}}{const r=new RegExp(iI.source,"g");let a;for(;(a=r.exec(e))!==null;){const i=e[a.index-1];i!=null&&cI.has(i)||e.slice(Math.max(0,a.index-7),a.index)!=="mailto:"&&t.push({start:a.index,end:a.index+a[0].length,href:`mailto:${a[0]}`,display:a[0]})}}t.sort((r,a)=>r.start-a.start);const n=[];let s=0;for(const r of t)r.start>=s&&(n.push(r),s=r.end);return n}function fI(e){const t=dI(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 O4(e){const t=[];for(const n of e)if(n.type==="text"){const s=fI(n.content);for(const r of s){const a=t[t.length-1];r.type==="text"&&(a==null?void 0:a.type)==="text"?a.content+=r.content:t.push(r)}}else n.type==="bold"||n.type==="italic"||n.type==="strikethrough"?t.push({...n,children:O4(n.children)}):t.push(n);return t}function c1(e){let t=0;for(;t<e.length&&e[t]===" ";)t++;return t}function D0(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 Vd(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 hI(e){return!!(/^#{1,6} /.test(e)||/^(`{3,}|~{3,})/.test(e)||D0(e)||e.startsWith("> ")||e===">"||/^ {0,9}[-*+] /.test(e)||/^ {0,9}0*1[.)] /.test(e)||e.includes("|"))}function u1(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 a="";for(let i=0;i<s.length;i++)s[i]==="\\"&&i+1<s.length&&s[i+1]==="|"?(a+="\\|",i++):s[i]==="|"?(r.push(a.trim()),a=""):a+=s[i];return r.push(a.trim()),r}function xI(e,t,n){const s=u1(e[t]).map(o=>({children:Fc(o,n)})),r=u1(e[t+1]).map(o=>{const c=o.trim(),u=c.startsWith(":"),d=c.endsWith(":");return u&&d?"center":d?"right":u?"left":null}),a=[];let i=t+2;for(;i<e.length&&e[i].includes("|")&&e[i].trim()!=="";)a.push(u1(e[i]).map(o=>({children:Fc(o,n)}))),i++;return{node:{type:"table",headers:s,alignments:r,rows:a},nextIndex:i}}function Vb(e,t,n,s){const r=[],a=c1(e[t]),i=n?e[t].match(/^ *(\d+)([.)]) /):null,o=i?i[2]:".",c=`\\${o}`,u=n?new RegExp(`^ {${a}}\\d+${c} `):new RegExp(`^ {${a}}[-*+] `),d=i?parseInt(i[1],10):void 0;let f=!1,h=t;for(;h<e.length&&u.test(e[h]);){const p=n?e[h].replace(new RegExp(`^ *\\d+${c} `),""):e[h].replace(/^ *[-*+] /,""),m=p.match(/^\[([ xX])\] (.*)/);let b,y;m?(b=m[1].toLowerCase()==="x",y=m[2]):y=p,h++;const g=[];for(;h<e.length&&e[h].trim()!==""&&c1(e[h])>a;)g.push(e[h]),h++;if(g.length>0){const v=Math.min(...g.map(j=>c1(j))),w=g.map(j=>j.slice(v));y+=`
155
- `+w.join(`
156
- `)}r.push({checked:b,children:Ya(y,s)});let k=h;for(;k<e.length&&e[k].trim()==="";)k++;k>h&&k<e.length&&u.test(e[k])&&(f=!0,h=k)}return{node:{type:"list",ordered:n,start:d,delimiter:n?o:void 0,loose:f||void 0,items:r},nextIndex:h}}function pI(e,t){return Ya(e,_0(t))}function Ya(e,t){const{defs:n,cleaned:s}=I4(e),r=t.linkDefs;let a;n.size===0?a=r:r==null?a=n:a=new Map([...n,...r]);const i=a!=null?{...t,linkDefs:a}:t,o=s.split(`
157
- `),c=[];let u=0;for(;u<o.length;){const d=o[u];if(d.trim()===""){u++;continue}const f=d.match(/^(`{3,}|~{3,})(\w*)/);if(f){const b=f[1],y=f[2]||"plaintext",g=[];for(u++;u<o.length&&!o[u].startsWith(b);)g.push(o[u]),u++;u++,c.push({type:"codeblock",language:y,content:g.join(`
158
- `)});continue}const h=d.match(/^(#{1,6}) +(.*)/);if(h){c.push({type:"heading",level:h[1].length,children:Fc(h[2],i)}),u++;continue}if(D0(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<o.length&&d.includes("|")&&Vd(o[u+1])){const b=xI(o,u,i);c.push(b.node),u=b.nextIndex;continue}if(d.startsWith("> ")||d===">"){const b=[];for(;u<o.length&&(o[u].startsWith("> ")||o[u]===">");)b.push(o[u].replace(/^> ?/,"")),u++;c.push({type:"blockquote",children:Ya(b.join(`
159
- `),i)});continue}if(/^ {0,9}[-*+] /.test(d)){const b=Vb(o,u,!1,i);c.push(b.node),u=b.nextIndex;continue}if(/^ {0,9}\d+[.)] /.test(d)){const b=Vb(o,u,!0,i);c.push(b.node),u=b.nextIndex;continue}const m=[d];for(u++;u<o.length&&!hI(o[u])&&o[u].trim()!=="";)m.push(o[u]),u++;c.push({type:"paragraph",children:Fc(m.join(`
160
- `),i)})}return c}function d1(){return{prevInput:"",settledText:"",settledBlocks:[],settledUpTo:0}}function gI(e){let t=!1,n="",s=-1;for(let r=0;r<e.length;r++){const a=e[r],i=a.match(/^(`{3,}|~{3,})/);i&&(t?i[1].startsWith(n[0])&&i[1].length>=n.length&&(t=!1,n=""):(t=!0,n=i[1])),!t&&a.trim()===""&&r>0&&(s=r)}return t?-1:s}function Wb(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 i=s.slice(r);if(!(i.includes("](")&&i.includes(")"))){const c=r>0&&s[r-1]==="!"?r-1:r;s=s.slice(0,c)}}let a=s.length;for(;a>0&&s[a-1]==="`";)a--;if(a<s.length&&a>0){const i=s.length-a;s.lastIndexOf("`".repeat(i),a-1)===-1&&(s=s.slice(0,a))}for(a=s.length;a>0&&s[a-1]==="*";)a--;if(a<s.length&&a>0){const i=s.length-a;i<=3&&s.lastIndexOf("*".repeat(i),a-1)===-1&&(s=s.slice(0,a))}{let i=0;const o=[];for(;i<s.length;){const u=s.indexOf("*",i);if(u===-1)break;let d=1;for(;u+d<s.length&&s[u+d]==="*";)d++;if(d>3){i=u+d;continue}o.push({pos:u,len:d}),i=u+d}const c=new Set;for(let u=0;u<o.length;u++)if(!c.has(u)){for(let d=u+1;d<o.length;d++)if(!c.has(d)&&o[d].len===o[u].len){c.add(u),c.add(d);break}}for(let u=o.length-1;u>=0;u--)if(!c.has(u)){const d=o[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 i=s.length-2;i>=0&&s[i]!=="~"&&(s=s.slice(0,-1))}{let i=0,o=0;const c=[];for(;;){const u=s.indexOf("~~",o);if(u===-1)break;c.push(u),i++,o=u+2}i%2===1&&(s=s.slice(0,c[c.length-1]))}return n+s}function mI(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("|")&&!Vd(n)){let r=!1;for(let a=t.length-2;a>=1;a--)if(Vd(t[a])&&t[a-1].includes("|")){r=!0;break}if(!r){t.pop();continue}}if(Vd(n)&&(t.length<2||!t[t.length-2].includes("|"))){t.pop();continue}break}return t.join(`
163
- `)}function Kb(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 yI(e,t,n){const s=_0(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}=I4(e),a=XR(r);t.linkDefsKey!==a&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=a);const i=r.size>0?{...s,linkDefs:r}:s,o=e.split(`
164
- `),c=gI(o);if(c<0)return t.prevInput=e,Ya(e,i);const u=o.slice(0,c).join(`
165
- `),d=o.slice(c).join(`
166
- `).trim(),f=mI(d);let h;if(u===t.settledText)h=t.settledBlocks;else if(t.settledText.length>0&&u.startsWith(t.settledText)){const m=u.slice(t.settledText.length),b=Ya(m,i);h=Kb(t.settledBlocks,b)}else h=Ya(u,i);const p=f?Ya(f,i):[];return t.settledText=u,t.settledBlocks=h,t.settledUpTo=c,t.prevInput=e,Kb(h,p)}const od={start:"0",center:"auto"},f1={start:null,center:"auto"},kI={k7Eaqz:"xkj4a21",$$css:!0},An={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=>[kI,{"--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)}]},ld={center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},fe={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 Xb(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 li(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+=li(n.children);break;case"break":t+=1;break;case"citation":t+=1;break}return t}function Rp(e){let t=0;for(const n of e)switch(n.type){case"heading":case"paragraph":t+=li(n.children);break;case"codeblock":t+=n.content.length;break;case"blockquote":t+=Rp(n.children);break;case"list":for(const s of n.items)t+=Rp(s.children);break;case"table":for(const s of n.headers)t+=li(s.children);for(const s of n.rows)for(const r of s)t+=li(r.children);break;case"hr":break;case"image":t+=n.alt.length;break}return t}const bI={1:fe.h1,2:fe.h2,3:fe.h3,4:fe.h4,5:fe.h5,6:fe.h6},vI=/^(javascript|data|vbscript):/i;function Ip(e){const t=e.trim();return t.length===0||vI.test(t)?null:t}function wI(e,t){const n=[];for(const o of t){o.pattern.lastIndex=0;let c;for(;(c=o.pattern.exec(e))!==null;){let u;if(o.getEndIndex){const d=o.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:o})}}n.sort((o,c)=>o.start-c.start);const s=[];let r=0;for(const o of n)o.start>=r&&(s.push(o),r=o.end);if(s.length===0)return[{type:"text",content:e}];const a=[];let i=0;for(let o=0;o<s.length;o++){const c=s[o];c.start>i&&a.push({type:"text",content:e.slice(i,c.start)}),a.push({type:"plugin",element:c.plugin.render(c.match,`plugin-${o}`),matchLength:c.end-c.start}),i=c.end}return i<e.length&&a.push({type:"text",content:e.slice(i)}),a}function Zb(e,t,n){const s=t.offset;if(t.offset+=e.length,!t.active)return e;const r=FR(e,s,t.boundaries,n);if(r==null)return e;const a=r.map(i=>i.fading?l.jsx("span",{className:"x1hc1fzr x19991ni x80gvsz x12w9bfk xlr8y92 x4itv7f",children:i.text},i.key):l.jsx("span",{children:i.text},i.key));return l.jsx("span",{children:a},`wrap-${n}`)}function jI(e,t){let n=e.numberMap.get(t);return n==null&&(n=e.nextNumber++,e.numberMap.set(t,n)),n}function On(e,t,n,s,r,a="a",i,o){switch(e.type){case"text":{if(i&&i.length>0){const c=wI(e.content,i);if(!(c.length===1&&c[0].type==="text")){const u=[];for(let d=0;d<c.length;d++){const f=c[d];f.type==="text"?u.push(Zb(f.content,s,`${t}-seg-${d}`)):(s.offset+=f.matchLength,u.push(l.jsx(x.Fragment,{children:f.element},`plugin-${t}-${d}`)))}return l.jsx(x.Fragment,{children:u},t)}}return Zb(e.content,s,t)}case"bold":return l.jsx("strong",{className:"x2mo6ok",children:e.children.map((c,u)=>On(c,u,n,s,r,a,i,o))},t);case"italic":return l.jsx("em",{children:e.children.map((c,u)=>On(c,u,n,s,r,a,i,o))},t);case"strikethrough":return l.jsx("del",{className:"xv1l7n4",children:e.children.map((c,u)=>On(c,u,n,s,r,a,i,o))},t);case"code":{s.offset+=e.content.length;const c=o==null?void 0:o.inlineCode;return c?l.jsx(c,{children:e.content},t):l.jsx(g0,{children:e.content},t)}case"link":{const c=Ip(e.href);if(c==null)return l.jsx("span",{children:e.children.map((p,m)=>On(p,m,n,s,r,a,i,o))},t);const u=o==null?void 0:o.link;if(u)return l.jsx(u,{href:c,children:e.children.map((p,m)=>On(p,m,n,s,r,a,i,o))},t);const d=c.startsWith("https://")||c.startsWith("http://"),f=n?p=>{n(c,p)===!1&&p.preventDefault()}:void 0,h=d?"a":a;return l.jsx(h,{href:c,onClick:f,...d?{target:"_blank",rel:"noopener noreferrer"}:{},className:"xjse4m1 x1bvjpef",children:e.children.map((p,m)=>On(p,m,n,s,r,a,i,o))},t)}case"image":{const c=Ip(e.src);if(c==null)return l.jsxs("span",{children:["[",e.alt,"]"]},t);const u=o==null?void 0:o.image;return u?l.jsx(u,{src:c,alt:e.alt},t):l.jsx("img",{src:c,alt:e.alt,className:"x193iq5w xh6dtrn"},t)}case"break":return s.offset+=1,l.jsx("br",{},t);case"citation":{if(s.offset+=1,!r)return l.jsxs("span",{children:["[",e.sourceId,"]"]},t);const c=jI(r,e.sourceId),u=r.sources[e.sourceId]??{title:e.sourceId},d=r.style==="number"?"number":"label",f=o==null?void 0:o.citation;return f?l.jsx(f,{source:u,number:c,variant:d},t):l.jsx(R4,{source:u,number:c,variant:d},t)}}}function SI(e,t){const n=t==="compact";switch(e.type){case"heading":return e.level<=3?n?fe.spacingHeadingMajorCompact:fe.spacingHeadingMajorDefault:n?fe.spacingHeadingMinorCompact:fe.spacingHeadingMinorDefault;case"paragraph":return n?fe.spacingParagraphCompact:fe.spacingParagraphDefault;case"codeblock":return n?fe.spacingCodeblockCompact:fe.spacingCodeblockDefault;case"blockquote":return n?fe.spacingBlockquoteCompact:fe.spacingBlockquoteDefault;case"list":return n?fe.spacingListCompact:fe.spacingListDefault;case"table":return n?fe.spacingTableCompact:fe.spacingTableDefault;case"hr":return n?fe.spacingHrCompact:fe.spacingHrDefault;case"image":return n?fe.spacingImageCompact:fe.spacingImageDefault}}function CI(e){return e.headers.map((t,n)=>{let s=li(t.children);for(const r of e.rows)if(r[n]){const a=li(r[n].children);a>s&&(s=a)}return s<=6?60:s<=15?80:120})}function cc(e,t,n,s,r,a,i,o,c,u,d="a",f,h,p){const m=f1[u],b=m!=null?An.blockAlign(m):null,y=SI(e,s),g=t===0,k=t===n-1;switch(e.type){case"heading":{const v=Math.min(e.level+r-1,6),w=e.children.map(($,E)=>On($,E,a,i,o,d,f,h)),j=h==null?void 0:h.heading;if(j)return l.jsx(j,{level:v,children:w},t);const C=`h${v}`;return l.jsx(C,{...U(P("markdown-heading",{density:s,level:v}),B(fe.headingBase,bI[v],y,c!=null?An.proseWidth(c):null,u!=="start"?An.proseAlign(od[u]):null,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd)),children:w},t)}case"paragraph":{const v=e.children.map((j,C)=>On(j,C,a,i,o,d,f,h)),w=h==null?void 0:h.paragraph;return w?l.jsx(w,{children:v},t):l.jsx("div",{role:"paragraph",...U(P("markdown-paragraph",{density:s}),B(y,c!=null?An.proseWidth(c):null,u!=="start"?An.proseAlign(od[u]):null,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd)),children:v},t)}case"codeblock":{i.offset+=e.content.length;const v=h==null?void 0:h.code;return v?l.jsx(v,{code:e.content,language:e.language},t):l.jsx("div",{...U(P("markdown-codeblock",{density:s}),B(y,fe.codeBlockWrapper,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd)),children:l.jsx(t4,{code:e.content,language:e.language,isCollapsible:!0,xstyle:[c!=null?An.blockWidth(c):void 0,b]})},t)}case"blockquote":{const v=h==null?void 0:h.blockquote;if(v){const w=e.children.map((j,C)=>cc(j,C,e.children.length,s,r,a,i,o,c,u,d,f,h,p));return l.jsx(v,{children:w},t)}return l.jsx(w3,{...P("markdown-blockquote",{density:s}),xstyle:[y,c!=null?An.proseWidth(c):void 0,u!=="start"?An.proseAlign(od[u]):void 0,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd],children:e.children.map((w,j)=>cc(w,j,e.children.length,s,r,a,i,o,c,u,d,f,h,p))},t)}case"list":{if(e.items.length>0&&e.items.every(w=>w.checked!=null)){const w=e.items.map((j,C)=>({item:j,key:`task-${C}`})).filter(({item:j})=>j.checked).map(({key:j})=>j);return l.jsx("div",{...U(P("markdown-list",{density:s}),B(y,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd)),children:l.jsx(T0,{label:p("@astryx.markdown.taskList"),isLabelHidden:!0,value:w,xstyle:fe.blockIndent,isReadOnly:!0,density:"compact",children:e.items.map((j,C)=>{const $=j.children[0],T=j.children.length===1&&($==null?void 0:$.type)==="paragraph"?l.jsx(l.Fragment,{children:$.children.map((S,M)=>On(S,M,a,i,o,d,f,h))}):l.jsx(l.Fragment,{children:j.children.map((S,M)=>cc(S,M,j.children.length,s,r,a,i,o,c,u,d,f,h,p))});return l.jsx(z0,{value:`task-${C}`,label:T},C)})})},t)}return l.jsx("div",{...U(P("markdown-list",{density:s}),B(y,c!=null?An.proseWidth(c):null,u!=="start"?An.proseAlign(od[u]):null,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd)),children:l.jsx(kt,{listStyle:e.ordered?"decimal":"disc",density:"compact",start:e.ordered?e.start:void 0,xstyle:fe.blockIndent,children:e.items.map((w,j)=>{const C=w.children[0],E=w.children.length===1&&(C==null?void 0:C.type)==="paragraph"?l.jsx(l.Fragment,{children:C.children.map((T,S)=>On(T,S,a,i,o,d,f,h))}):l.jsx(l.Fragment,{children:w.children.map((T,S)=>cc(T,S,w.children.length,s,r,a,i,o,c,u,d,f,h,p))});return l.jsx(We,{label:E},j)})})},t)}case"table":{const v=CI(e);return l.jsx("div",{tabIndex:0,role:"group","aria-label":p("@astryx.markdown.table"),...U(P("markdown-table",{density:s}),B(fe.tableWrapper,y,c!=null?An.blockWidth(c):null,f1[u]!=null?An.blockAlign(f1[u]):null,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd)),children:l.jsxs(A4,{dividers:"rows",textOverflow:"wrap",children:[l.jsx(R0,{children:l.jsx(Of,{children:e.headers.map((w,j)=>l.jsx(A0,{xstyle:[An.cellMinWidth(`${v[j]}px`),e.alignments[j]==="center"&&ld.center,e.alignments[j]==="right"&&ld.end],children:w.children.map((C,$)=>On(C,$,a,i,o,d,f,h))},j))})}),l.jsx(I0,{children:e.rows.map((w,j)=>{const C=w.map(($,E)=>l.jsx(M0,{xstyle:[e.alignments[E]==="center"&&ld.center,e.alignments[E]==="right"&&ld.end],children:$.children.map((T,S)=>On(T,S,a,i,o,d,f,h))},E));return l.jsx(Of,{children:C},j)})})]})},t)}case"hr":{const v=h==null?void 0:h.hr;return v?l.jsx(v,{},t):l.jsx("hr",{...U(P("markdown-hr",{density:s}),B(fe.hr,y,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd))},t)}case"image":{const v=Ip(e.src);if(v==null)return l.jsxs("div",{...U(P("markdown-image",{density:s}),B(y,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd)),children:["[",e.alt,"]"]},t);const w=h==null?void 0:h.image;return w?l.jsx(w,{src:v,alt:e.alt},t):l.jsx("div",{...U(P("markdown-image",{density:s}),B(y,g&&fe.noMarginBlockStart,k&&fe.noMarginBlockEnd)),children:l.jsx("img",{src:v,alt:e.alt,className:"x193iq5w xh6dtrn"})},t)}}}function L0({ref:e,children:t,display:n="block",density:s="default",headingLevelStart:r=1,isStreaming:a=!1,onLinkClick:i,sources:o,citationStyle:c="label",contentWidth:u=680,contentAlign:d="start",components:f,inlinePlugins:h,autolink:p,xstyle:m,className:b,style:y,"data-testid":g}){const k=ke(),v=$a(),w=x.useMemo(()=>o?new Set(Object.keys(o)):void 0,[o]),j=x.useMemo(()=>({sourceIds:w,autolink:p}),[w,p]),C=EN(t,a),$=x.useRef(d1()),E=x.useRef(p);E.current!==p&&($.current=d1(),E.current=p);const T=x.useMemo(()=>{if(n==="inline")return[];if(a){if(C==="")return $.current=d1(),[];const q=Wb(C);return yI(q,$.current,j)}return pI(t,j)},[n,C,t,a,j]),S=x.useMemo(()=>{if(n!=="inline")return[];const q=a?Wb(C):t;return eI(q,j)},[n,C,t,a,j]),{token:M}=qh(),z=x.useMemo(()=>{const q=Xb(M("--duration-fast-max"))??230,F=Xb(M("--duration-fast-min")),X=F!=null?Math.max(4,Math.round(F/10)):50;return Math.min(Math.ceil(q/X),12)},[M]),A=x.useRef([]),R=x.useRef([]),I=x.useRef([]),N=C.length,L={offset:0,boundaries:x.useMemo(()=>{const q=n==="inline"?li(R.current):Rp(A.current),F=UR(I.current,q,z);return I.current=F,F},[n,N,z]),active:a},D=o?{sources:o,numberMap:new Map,nextNumber:1,style:c}:null;if(n==="inline"){const q=l.jsx("span",{ref:e,"data-testid":g,...U(P("markdown",{density:s}),B(fe.root,fe.inlineRoot,m),b,y),children:S.map((F,X)=>On(F,X,i,L,D,v,h,f))});return R.current=S,A.current=[],q}const O=l.jsx("div",{role:"document",ref:e,"data-testid":g,...U(P("markdown",{density:s}),B(fe.root,m),b,y),children:T.map((q,F)=>cc(q,F,T.length,s,r,i,L,D,u?typeof u=="number"?`${u}px`:u:null,d,v,h,f,k))});return A.current=T,R.current=[],O}L0.displayName="Markdown";const B4=x.createContext(null);B4.displayName="CollapsibleGroupContext";const _p=x.createContext(null);_p.displayName="CollapsibleGroupPresentationContext";function $I(e){const{isCollapsible:t,value:n}=e,s=x.use(B4),r=s!=null&&n!=null,a=t===!0?{}:t||null,i=a!=null,[o,c]=x.useState(()=>r?!0:(a==null?void 0:a.isOpen)!==void 0?a.isOpen:(a==null?void 0:a.defaultIsOpen)??!0);let u;return r&&n!=null?u=s.isOpen(n):(a==null?void 0:a.isOpen)!==void 0?u=a.isOpen:u=o,{isEnabled:i,isOpen:u,toggle:()=>{var h;if(r&&n!=null){s.toggle(n);return}const f=!u;(a==null?void 0:a.isOpen)===void 0&&c(f),(h=a==null?void 0:a.onOpenChange)==null||h.call(a,f)}}}const eo={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}},No={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}},EI={compact:No.triggerCompact,balanced:No.triggerBalanced,spacious:No.triggerSpacious},TI={compact:No.contentCompact,balanced:No.contentBalanced,spacious:No.contentSpacious};function q4({trigger:e,children:t,defaultIsOpen:n,isOpen:s,isDisabled:r=!1,onOpenChange:a,value:i,ref:o,xstyle:c,className:u,style:d,...f}){const h=s!==void 0?{isOpen:s,onOpenChange:a}:{defaultIsOpen:n??!0,onOpenChange:a},{isOpen:p,toggle:m}=$I({isCollapsible:h,value:i}),b=()=>{r||m()},y=x.use(_p),g=(y==null?void 0:y.hasDividers)??!1,k=(y==null?void 0:y.density)??null,v=gi("chevronDown"),w=x.useId();return l.jsxs("div",{ref:o,...U(P("collapsible",{density:k??void 0}),B(eo.root,g&&eo.divided,c),u,d),...f,children:[l.jsxs("button",{type:"button",onClick:b,"aria-disabled":r||void 0,"aria-expanded":p,"aria-controls":w,tabIndex:r?-1:void 0,...U(P("collapsible-trigger",{density:k??void 0}),B(eo.trigger,k!=null&&EI[k],r&&eo.triggerDisabled)),children:[l.jsx("span",{className:"x1b2iylo xwgcxoh",children:e}),l.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:v})]}),l.jsx("div",{id:w,...U(P("collapsible-content",{density:k??void 0}),B(eo.content,k!=null&&TI[k],!p&&eo.contentHidden)),children:y!=null?l.jsx(_p,{value:null,children:t}):t})]})}q4.displayName="Collapsible";const O0=x.createContext(null);O0.displayName="RadioListContext";function H4({ref:e,label:t,isLabelHidden:n=!1,description:s,value:r,onChange:a,orientation:i="vertical",isDisabled:o=!1,disabledMessage:c,isRequired:u=!1,isOptional:d=!1,size:f="md",status:h,labelTooltip:p,width:m,xstyle:b,className:y,style:g,"data-testid":k,htmlName:v,children:w}){const j=x.useId(),C=v??j,$=x.useId(),E=x.useId(),T=x.useId(),S=x.useId(),M=x.useRef(null),z=o&&!!c,A=Is({placement:"above",focusTrigger:"always",isEnabled:z}),R=x.useMemo(()=>({name:C,value:r,onChange:a,isDisabled:o,hasDisabledMessage:z,isRequired:u,size:f,status:h}),[C,r,a,o,z,u,f,h]),I=x.useCallback(N=>{if(r!=="")return;const _=M.current;if(!_)return;const L=N.relatedTarget;if(L){if(_.contains(L))return}else if(document.activeElement&&document.activeElement!==N.target&&_.contains(document.activeElement))return;const D=Array.from(_.querySelectorAll('input[type="radio"]:not([disabled])'));if(D.length===0)return;const O=N.target,q=D.findIndex(J=>J===O);if(q===-1)return;const X=q===D.length-1?D[D.length-1]:D[0];O!==X&&X.focus()},[r]);return l.jsxs(Al,{ref:e,"data-testid":k,label:t,isLabelHidden:n,description:s,inputID:$,labelID:E,isGroupLabel:!0,descriptionID:s?T:void 0,isOptional:d,isRequired:u,isDisabled:o,status:h?{type:h.type,message:h.message,messageID:h.message?S:void 0}:void 0,labelTooltip:p,statusVariant:"detached",width:m,xstyle:b,className:y,style:g,children:[l.jsx("div",{ref:N=>{M.current=N,A.ref(N)},role:"radiogroup","aria-labelledby":E,onFocus:I,"aria-describedby":[s?T:null,h!=null&&h.message?S:null,z?A.describedBy:null].filter(Boolean).join(" ")||void 0,"aria-invalid":(h==null?void 0:h.type)==="error"?!0:void 0,"aria-required":u||void 0,...U(P("radio-list",{orientation:i,size:f}),{0:{className:"x78zum5 x1q0g3np x9mgr7n"},1:{className:"x78zum5 xdt5ytf x1txdalj"}}[(i==="vertical")<<0]),children:l.jsx(O0,{value:R,children:w})}),z&&A.renderTooltip(c)]})}H4.displayName="RadioList";const zI={xklqth5:"xklqth5",$$css:!0},vs={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}},Yb={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},NI={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},MI={sm:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},md:{kzqmXN:"x1fsd2vl",kZKoxP:"x170jfvy",$$css:!0}},AI={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0}};function P4({ref:e,label:t,value:n,description:s,isDisabled:r=!1,startContent:a,endContent:i,xstyle:o,className:c,style:u,...d}){const f=x.use(O0);if(!f)throw new Error("RadioListItem must be used within an RadioList");const h=x.useId(),p=x.useId(),m=f.isDisabled||r,b=f.hasDisabledMessage&&!r,y=f.value===n,g=f.size,k=l.jsxs("div",{...B(vs.radioWrapper,Yb[g],!m&&vs.radioWrapperFocus),children:[l.jsx("input",{id:h,type:"radio",name:f.name,value:n,checked:y,disabled:m&&!b,"aria-disabled":b?"true":void 0,form:b?"":void 0,required:f.isRequired,onChange:()=>{m||f.onChange(n)},"aria-describedby":s?p:void 0,...B(vs.input,Yb[g],m&&vs.inputDisabled)}),l.jsx("div",{"aria-hidden":"true",...U(P("radio",{size:g,checked:y?"checked":null,disabled:m?"disabled":null}),B(vs.radio,NI[g],y?vs.radioChecked:vs.radioUnchecked,m&&vs.radioDisabled,m&&!y&&vs.radioDisabledUnchecked)),children:y&&l.jsx("div",{...U(P("radio-dot",{size:g}),B(vs.innerDot,MI[g]))})})]}),v=a!=null?l.jsxs(l.Fragment,{children:[k,a]}):k;return l.jsx("div",{ref:e,...U(P("radio-list-item"),B(vs.container,!m&&zI,o),c,u),...d,children:l.jsx(Ii,{startContent:v,label:l.jsx("label",{htmlFor:h,...{0:{},1:{className:"xnbbluu x1h6gzvc"}}[!!m<<0],children:t}),description:s!=null?l.jsx("span",{id:p,children:s}):void 0,endContent:i,xstyle:AI.root})})}P4.displayName="RadioListItem";const RI=50,II=40,U4="astryx-resizable:";function cd(e,t,n,s){const r=Math.min(n,Math.max(t,e));if(s.length>0){let a=s[0],i=Math.abs(r-a);for(let o=1;o<s.length;o++){const c=Math.abs(r-s[o]);c<i&&(a=s[o],i=c)}return Math.min(n,Math.max(t,a))}return r}function _I(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(U4+e);if(t!=null){const n=JSON.parse(t);if(typeof n=="number")return n}}catch{}return null}function DI(e,t){if(!(typeof window>"u"))try{localStorage.setItem(U4+e,JSON.stringify(t))}catch{}}function LI(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 F4(e){const{defaultSize:t,minSizePx:n=RI,maxSizePx:s=1/0,collapsible:r=!1,collapsedSize:a=II,snaps:i=[],autoSaveId:o,onSizeChange:c,onCollapseChange:u}=e,d=LI(t),f=o?_I(o):null,h=f??d,[p,m]=x.useState(()=>cd(h,n,s,i)),[b,y]=x.useState(()=>f===0&&r),g=x.useRef(p),k=x.useRef(p);x.useEffect(()=>{o&&DI(o,b?0:p)},[p,b,o]);const v=x.useCallback(()=>{r&&(g.current=p,y(!0),m(0),u==null||u(!0),c==null||c(0))},[r,p,u,c]),w=x.useCallback(()=>{y(!1);const S=g.current||d,M=cd(S,n,s,i);m(M),u==null||u(!1),c==null||c(M)},[d,n,s,i,u,c]),j=x.useCallback(S=>{const M=cd(S,n,s,i);m(M),y(!1),c==null||c(M)},[n,s,i,c]),C=x.useCallback(()=>{k.current=b?0:p},[p,b]),$=x.useCallback(S=>{const M=k.current+S;if(r&&M<a){b||(g.current=p,u==null||u(!0)),y(!0),m(0),c==null||c(0);return}b&&M>=a&&(y(!1),u==null||u(!1));const z=cd(M,n,s,i);m(z),c==null||c(z)},[r,a,b,p,n,s,i,c,u]),E=x.useCallback(()=>{},[]);return{size:b?0:p,isCollapsed:b,collapse:v,expand:w,resize:j,props:{_size:b?0:p,_isCollapsed:b,_onResizeStart:C,_onResizeMove:$,_onResizeEnd:E,_minSizePx:n,_maxSizePx:s,_snaps:i,_collapsedSize:a,_collapsible:r,_isResizableProps:!0}}}function OI(e){const{regions:t,autoSaveId:n}=e,s=Object.entries(t),r=s.map(([i,o])=>F4({...o,autoSaveId:n?`${n}:${i}`:void 0})),a={};return s.forEach(([i],o)=>{a[i]=r[o]}),a}function G4(e){return"regions"in e?OI(e):F4(e)}const BI=10,qI=50;function HI(e,t,n){if(e!=="auto")return e;const s=t?"end":"start";return n?s==="start"?"end":"start":s}function PI(e){return e==="center"?null:e==="start"?-1:1}const at={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}},UI={kLqNvP:"x1o0tod",k3aq6I:"x11wx31z x75qhwu",$$css:!0},FI={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},GI={kLqNvP:"x1o0tod",k3aq6I:"xsqj5wx",$$css:!0},VI={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},ud={hitAreaOffsetX:e=>[UI,{"--x-qthpiu":`translate(calc(${e} * (3px + ${ts["--spacing-1"]}) - 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${ts["--spacing-1"]}) - 6.5px), -50%)`:void 0,"--x-sj6hyi":`translate(calc(${e} * (3px + ${ts["--spacing-1"]}) + 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${ts["--spacing-1"]}) + 6.5px), -50%)`:void 0}],hitAreaOffsetY:e=>[FI,{"--x-transform":`translate(-50%, calc(${e} * (3px + ${ts["--spacing-1"]}) - 6.5px))`!=null?`translate(-50%, calc(${e} * (3px + ${ts["--spacing-1"]}) - 6.5px))`:void 0}],pillOffsetX:e=>[GI,{"--x-transform":`translate(calc(${e} * (100% + ${ts["--spacing-1"]})), -50%)`!=null?`translate(calc(${e} * (100% + ${ts["--spacing-1"]})), -50%)`:void 0}],pillOffsetY:e=>[VI,{"--x-transform":`translate(-50%, calc(${e} * (100% + ${ts["--spacing-1"]})))`!=null?`translate(-50%, calc(${e} * (100% + ${ts["--spacing-1"]})))`:void 0}]};function B0({direction:e="horizontal",position:t="inline",isReversed:n=!1,isDisabled:s=!1,hasDivider:r=!1,isAlwaysVisible:a=!0,pillPlacement:i="auto",label:o,resizable:c,children:u,xstyle:d,className:f,ref:h,...p}){const m=ke(),b=o??m("@astryx.resizable.handle.label"),y=x.useRef(null),g=x.useRef(null),[k,v]=x.useState(!1),[w,j]=x.useState(!1),[C,$]=x.useState(!1),E=e==="horizontal",T=t==="overlay",S=n?-1:1,M=HI(i,n,(c==null?void 0:c._isCollapsed)??!1),z=PI(M),A=x.useCallback(()=>{const X=y.current;return X&&getComputedStyle(X).direction==="rtl"?-1:1},[]),R=w||C,I=x.useCallback(X=>{if(s||!c)return;X.preventDefault(),X.stopPropagation(),v(!0),c._onResizeStart();const J=E?X.clientX:X.clientY,Z=E?A():1;document.body.style.cursor=E?"col-resize":"row-resize",document.body.style.userSelect="none";const te=oe=>{const pe=((E?oe.clientX:oe.clientY)-J)*Z*S;c._onResizeMove(pe)},Q=()=>{re(),v(!1),c._onResizeEnd(),document.body.style.cursor="",document.body.style.userSelect=""},K=()=>{re(),v(!1),document.body.style.cursor="",document.body.style.userSelect=""};function re(){window.removeEventListener("pointermove",te),window.removeEventListener("pointerup",Q),window.removeEventListener("pointercancel",K),g.current=null}window.addEventListener("pointermove",te),window.addEventListener("pointerup",Q),window.addEventListener("pointercancel",K),g.current=re},[s,c,E,A,S]),N=x.useCallback(X=>{if(s||!c)return;const J=X.shiftKey?qI:BI,Z=E?A():1;switch(X.key){case"ArrowRight":case"ArrowDown":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(J*(E?Z:1)*S),c._onResizeEnd();break}case"ArrowLeft":case"ArrowUp":{X.preventDefault(),c._onResizeStart(),c._onResizeMove(-J*(E?Z: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,E,A,S]),_=x.useCallback(()=>{s||!c||!c._collapsible||(c._onResizeStart(),c._onResizeMove(c._isCollapsed?c._minSizePx:-c._size),c._onResizeEnd())},[s,c]);x.useEffect(()=>()=>{g.current&&(g.current(),document.body.style.cursor="",document.body.style.userSelect="")},[]);const L=(c==null?void 0:c._isCollapsed)??!1,D=c?L?Math.max(c._size,c._minSizePx):c._size:void 0,O=c?c._minSizePx:void 0,q=c&&c._maxSizePx!==1/0?c._maxSizePx:void 0,F=c&&L?m("@astryx.resizable.collapsed"):void 0;return l.jsxs("div",{ref:ct(h,y),role:"separator","aria-orientation":E?"vertical":"horizontal","aria-valuenow":D,"aria-valuemin":O,"aria-valuemax":q,"aria-valuetext":F,"aria-label":b,"aria-disabled":s||void 0,tabIndex:s?-1:0,onDoubleClick:_,onFocus:()=>$(!0),onBlur:()=>$(!1),"data-resizing":k||void 0,...U(P("resize-handle"),B(at.handle,T&&at.overlay,T&&(E?at.overlayHorizontal:at.overlayVertical),!T&&(E?at.horizontal:at.vertical),!T&&!r&&(E?at.noDividerHorizontal:at.noDividerVertical),!T&&r&&R&&!k&&at.handleHover,!T&&r&&k&&at.handleActive,s&&at.disabled,d),f),...p,onKeyDown:X=>{var J;(J=p.onKeyDown)==null||J.call(p,X),N(X)},children:[l.jsx("div",{...B(at.hitArea,E?at.hitAreaHorizontal:at.hitAreaVertical,z==null?E?rl.centerInline("0px"):at.hitAreaCenteredY:E?ud.hitAreaOffsetX(z):ud.hitAreaOffsetY(z),s&&at.disabled),onPointerDown:I,onPointerEnter:()=>j(!0),onPointerLeave:()=>{k||j(!1)}}),u??l.jsx("div",{...U(P("resize-handle-pill"),B(at.pill,E?at.pillHorizontal:at.pillVertical,M==="center"?rl.centerInline("-50%"):E?ud.pillOffsetX(M==="start"?-1:1):ud.pillOffsetY(M==="start"?-1:1),a?at.pillVisible:at.pillHidden,R&&!k&&at.pillHover,k&&at.pillActive))})]})}B0.displayName="ResizeHandle";const to={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}},WI={imageTransform:e=>[{k3aq6I:e!=null?"xsqj5wx":e,$$css:!0},{"--x-transform":e??void 0}]},dd=50,Qb={ArrowLeft:[dd,0],ArrowRight:[-dd,0],ArrowUp:[0,dd],ArrowDown:[0,-dd]};function V4({isOpen:e,onOpenChange:t,media:n,index:s,defaultIndex:r=0,onIndexChange:a,hasZoom:i=!1,hasAutoPlay:o=!1,xstyle:c,className:u,style:d,ref:f,onClick:h,onKeyDown:p,...m}){const b=ke(),y=x.useRef(null),g=x.useRef(null),k=x.useRef(null),v=x.useRef(null),w=s!==void 0,[j,C]=x.useState(r),$=w?s:j,E=x.useCallback(ne=>{w||C(ne),a==null||a(ne)},[w,a,C]),[T,S]=x.useState(1),[M,z]=x.useState({x:0,y:0}),[A,R]=x.useState(!1),I=x.useRef({x:0,y:0,panX:0,panY:0}),N=x.useMemo(()=>Array.isArray(n)?n:[n],[n]),_=N.length>1,L=N.length>0?N[Math.min($,N.length-1)]:null,O=((L==null?void 0:L.type)??"image")==="video",q=_&&$>0,F=_&&$<N.length-1;I3(e),x.useEffect(()=>{S(1),z({x:0,y:0})},[$,L==null?void 0:L.src]);const X=Ml(),J=x.useRef($),Z=x.useRef(e);x.useEffect(()=>{const ne=J.current!==$,Jt=Z.current;if(J.current=$,Z.current=e,!ne||!e||!Jt)return;const an=N[Math.min($,N.length-1)],ys=`${$+1} of ${N.length}`;X(an!=null&&an.alt?`${an.alt}, ${ys}`:`Image ${ys}`)},[$,e,X,N]),er(()=>{const ne=y.current;ne&&(e&&!ne.open?(v.current=document.activeElement,ne.showModal()):!e&&ne.open&&(ne.close(),v.current instanceof HTMLElement&&v.current.focus()))},[e]);const te=x.useCallback(()=>{t(!1)},[t]),Q=x.useCallback(ne=>{ne.preventDefault(),te()},[te]),K=x.useRef(!1),re=x.useCallback(ne=>{if(K.current){K.current=!1;return}(ne.target===ne.currentTarget||ne.target===g.current)&&te()},[te]),oe=x.useCallback(()=>{q&&E($-1)},[q,$,E]),be=x.useCallback(()=>{F&&E($+1)},[F,$,E]),pe=x.useCallback(ne=>{!i||O||ne===T||(S(ne),z({x:0,y:0}),X(ne>1?b("@astryx.lightbox.zoomedIn"):b("@astryx.lightbox.zoomedOut")))},[i,O,T,X,b]),he=x.useCallback(()=>{pe(T===1?2:1)},[pe,T]),le=x.useCallback(ne=>{if(i&&!O){if(ne.key==="+"||ne.key==="="){ne.preventDefault(),pe(2);return}if(ne.key==="-"){ne.preventDefault(),pe(1);return}if(T>1&&Qb[ne.key]!==void 0){ne.preventDefault();const[Jt,an]=Qb[ne.key];z(ys=>({x:ys.x+Jt,y:ys.y+an}));return}}ne.key==="ArrowLeft"?(ne.preventDefault(),oe()):ne.key==="ArrowRight"&&(ne.preventDefault(),be())},[i,O,T,pe,oe,be]),Y=x.useCallback(ne=>{(ne.key==="Enter"||ne.key===" ")&&(ne.preventDefault(),he())},[he]),me=x.useCallback(ne=>{T<=1||!i||(R(!0),K.current=!1,I.current={x:ne.clientX,y:ne.clientY,panX:M.x,panY:M.y})},[T,i,M]);x.useEffect(()=>{if(!A)return;const ne=an=>{K.current=!0;const ys=an.clientX-I.current.x,Nn=an.clientY-I.current.y;z({x:I.current.panX+ys,y:I.current.panY+Nn})},Jt=()=>{R(!1)};return window.addEventListener("pointermove",ne),window.addEventListener("pointerup",Jt),()=>{window.removeEventListener("pointermove",ne),window.removeEventListener("pointerup",Jt)}},[A]);const ce=T>1,xe=i&&!O,Le=T===1?null:`scale(${T}) translate(${M.x/T}px, ${M.y/T}px)`;return L?l.jsx("dialog",{ref:ct(f,y),onCancel:Q,onClick:ne=>{re(ne),h==null||h(ne)},onKeyDown:ne=>{le(ne),p==null||p(ne)},"aria-label":L.alt||b("@astryx.lightbox.mediaViewer"),...U(P("lightbox"),B(to.dialog,c),u,d),...m,children:l.jsxs("div",{ref:g,className:"x78zum5 xdt5ytf x6s0dn4 xl56j7k xh8yej3 x5yr21d x1n2onr6",children:[l.jsx("div",{className:"x10l6tqk xyx6v2t x1mcfs9z x1vjfegm",children:l.jsx(pn,{icon:l.jsx(Ce,{icon:"close",size:"sm",color:"inherit"}),label:b("@astryx.lightbox.close"),variant:"ghost",onClick:te,xstyle:to.controlButton})}),_&&l.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1ybfrjj",children:l.jsx(pn,{icon:l.jsx("span",{...B(rl.mirror),children:l.jsx(Ce,{icon:"chevronLeft",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.previous"),variant:"ghost",isDisabled:!q,onClick:oe,xstyle:to.controlButton})}),l.jsxs("div",{className:"x78zum5 xdt5ytf x6s0dn4 x193iq5w xmz0i5r xb3r6kr",children:[l.jsx("div",{ref:k,role:xe?"button":void 0,tabIndex:xe?0:void 0,"aria-pressed":xe?ce:void 0,"aria-label":xe?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"}}[!!xe<<3|!!(!O&&i&&!ce)<<2|!!(!O&&ce)<<1|!!(!O&&A)<<0],onDoubleClick:O?void 0:he,onKeyDown:xe?Y:void 0,onPointerDown:O?void 0:me,children:O?l.jsx("video",{src:L.src,"aria-label":L.alt,controls:!0,autoPlay:o,className:"x193iq5w xmz0i5r x19kjcj4 x1a2a7pz"}):l.jsx("img",{src:L.src,alt:L.alt,draggable:!1,...B(to.image,A&&to.imageDragging,Le!=null&&WI.imageTransform(Le))})}),L.caption&&l.jsx("div",{className:"x9e3rv5 x18juvz8 xf74fhv x2b8uid x1xye8es x18d9i69 xrrkdod xrlsmeg x2lah0s",children:L.caption})]}),_&&l.jsx("div",{className:"x10l6tqk xwa60dl x1cb1t30 x1vjfegm x1mcfs9z",children:l.jsx(pn,{icon:l.jsx("span",{...B(rl.mirror),children:l.jsx(Ce,{icon:"chevronRight",size:"sm",color:"inherit"})}),label:b("@astryx.lightbox.next"),variant:"ghost",isDisabled:!F,onClick:be,xstyle:to.controlButton})}),_&&N.length>1&&l.jsxs("div",{className:"x10l6tqk xyx6v2t x1ybfrjj x9e3rv5 xjm74w1 xw6l6zx x1vjfegm",children:[$+1," / ",N.length]})]})}):null}V4.displayName="Lightbox";const Rn={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}},h1={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 KI(e){e.preventDefault()}function W4({as:e,label:t,href:n,hasUnderline:s=!1,isDisabled:r=!1,isExternalLink:a=!1,newTabLabel:i,target:o,onClick:c,tooltip:u,isStandalone:d=!1,type:f="body",size:h,weight:p,color:m="accent",display:b="inline",maxLines:y=0,children:g,rel:k,xstyle:v,className:w,style:j,ref:C,...$}){const E=ke(),T=i??E("@astryx.link.newTab"),S=$a(e),M=L3({href:n,onClick:c,isDisabled:r}),{target:z,rel:A}=$3(a?"_blank":o,k),R=M==="button"||M==="inert"&&n==null,I=l.jsxs(l.Fragment,{children:[l.jsx(se,{type:f,size:h,weight:p,color:m,display:b,maxLines:y,children:g}),a&&!R&&l.jsxs(l.Fragment,{children:[l.jsx(Ce,{icon:"externalLink",size:"xsm",color:"inherit"}),l.jsx(Mi,{children:T})]})]});let N;return R?N=l.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,...U(P("link",{color:m}),B(Rn.base,Rn.buttonReset,h1[m],s&&Rn.hasUnderline,d&&Rn.standalone,r&&Rn.disabled,v),w,j),...$,children:I}):r?N=l.jsx("a",{ref:C,onClick:KI,"aria-label":t||void 0,"aria-disabled":!0,tabIndex:-1,...U(P("link",{color:m}),B(Rn.base,h1[m],s&&Rn.hasUnderline,d&&Rn.standalone,Rn.disabled,v),w,j),...$,children:I}):N=l.jsx(S,{ref:C,href:n,target:z,rel:A,onClick:c,"aria-label":t||void 0,"aria-disabled":r||void 0,tabIndex:r?-1:void 0,...U(P("link",{color:m}),B(Rn.base,h1[m],s&&Rn.hasUnderline,d&&Rn.standalone,r&&Rn.disabled,v),w,j),...$,children:I}),u?l.jsx(_i,{content:u,placement:"above",children:N}):N}W4.displayName="Link";const q0=x.createContext(null);q0.displayName="SegmentedControlContext";function XI(){const e=x.use(q0);if(e==null)throw new Error("useSegmentedControlContext must be used within SegmentedControl. Wrap your SegmentedControlItem in <SegmentedControl>.");return e}const fd={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}},ZI={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 K4({ref:e,value:t,onChange:n,label:s,size:r,layout:a="hug",isDisabled:i=!1,disabledMessage:o,children:c,xstyle:u,className:d,style:f,onKeyDown:h,onFocus:p,onBlur:m,...b}){const y=Ai(r,"md"),g=i&&!!o,k=Is({placement:"above",focusTrigger:"always",isEnabled:g}),{listRef:v,handleKeyDown:w,handleFocus:j}=Ri({itemSelector:'[role="radio"]:not([aria-disabled="true"])',hasRovingTabIndex:!0,wrap:!0,orientation:"horizontal"}),C=R3({orientation:"horizontal",isEnabled:!i}),$=x.useCallback(S=>{h==null||h(S),!S.defaultPrevented&&(C.onKeyDown(S),w(S))},[h,C,w]),E=x.useCallback(S=>{var A;if(p==null||p(S),S.defaultPrevented||(C.onFocus(S),j(S),i)||!S.currentTarget.contains(S.relatedTarget))return;const M=(A=S.target)==null?void 0:A.closest('[role="radio"][data-value]');if(!M||M.getAttribute("aria-disabled")==="true")return;const z=M.dataset.value;z!=null&&z!==t&&n(z)},[p,C,j,i,n,t]),T=x.useMemo(()=>({value:t,onChange:n,size:y,layout:a,isDisabled:i,hasDisabledMessage:g}),[t,n,y,a,i,g]);return l.jsxs(q0,{value:T,children:[l.jsxs("div",{ref:ct(e,v,k.ref),...b,role:"radiogroup","aria-label":s,"aria-disabled":i||void 0,"aria-describedby":g?k.describedBy:void 0,onKeyDown:$,onFocus:E,onBlur:Lh(m,C.onBlur),...U(P("segmented-control",{size:y}),B(fd.container,ZI[y],a==="fill"&&fd.fill,i&&(g?fd.disabledWithMessage:fd.disabled),u),d,f),children:[c,C.hintElement]}),g&&k.renderTooltip(o)]})}K4.displayName="SegmentedControl";const no={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}},YI={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}},QI={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function Dp({ref:e,value:t,label:n,isLabelHidden:s=!1,icon:r,isDisabled:a=!1,onClick:i,xstyle:o,...c}){const u=XI(),d=u.value===t,f=a||u.isDisabled,h=d&&(u.hasDisabledMessage??!1)&&!a,p=u.size,m=u.layout==="fill",b=Lh(i,()=>{!f&&!d&&u.onChange(t)}),y=r?l.jsx("span",{...B(no.icon,QI[p]),children:r}):null;return l.jsxs("button",{ref:e,...c,type:"button",role:"radio","aria-checked":d,"aria-disabled":f||void 0,"aria-label":s?n:void 0,"data-value":t,tabIndex:d&&!f||h?0:-1,onClick:b,...U(P("segmented-control-item",{size:p,selected:d?"selected":null,disabled:f?"disabled":null}),B(no.base,YI[p],m&&no.fill,d&&no.selected,!d&&!f&&no.hover,f&&no.disabled,o)),children:[y,!s&&l.jsx("span",{children:n})]})}Dp.displayName="SegmentedControlItem";const H0=x.createContext(null);H0.displayName="TabListContext";function JI(){const e=x.use(H0);if(e==null)throw new Error("useTabListContext must be used within TabList. Wrap your Tab/TabMenu in <TabList>.");return e}const e_="[data-tab-value],[data-tab-menu]",x1={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 X4({ref:e,value:t,onChange:n,size:s,layout:r="hug",hasDivider:a=!1,xstyle:i,className:o,style:c,children:u,onKeyDown:d,onFocus:f,onBlur:h,"aria-label":p,"aria-orientation":m,[Af]:b,...y}){const g=ke(),k=p??g("@astryx.tabList.label"),v=Ai(s,"md"),{listRef:w,handleKeyDown:j,handleFocus:C}=Ri({itemSelector:e_,orientation:"both",hasRovingTabIndex:!0}),{hintElement:$,onKeyDown:E,onFocus:T,onBlur:S}=R3(),M=x.useMemo(()=>({value:t,onChange:n,size:v,layout:r}),[t,n,v,r]),z=x.useCallback(I=>{d==null||d(I),!I.defaultPrevented&&(E(I),j(I))},[d,E,j]),A=x.useCallback(I=>{f==null||f(I),!I.defaultPrevented&&(T(I),C(I))},[f,T,C]),R=x.useCallback(I=>{h==null||h(I),!I.defaultPrevented&&S(I)},[h,S]);return l.jsx(H0,{value:M,children:l.jsxs("nav",{ref:ct(e,w),...y,"aria-label":k,onKeyDown:z,onFocus:A,onBlur:R,[Af]:"",...U(P("tab-list",{size:v}),B(x1.nav,r==="fill"&&x1.fill,a&&x1.divider,i),o,c),children:[u,$]})})}X4.displayName="TabList";const t_={x1u3b27q:"x1u3b27q",$$css:!0},hd={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}},n_={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},s_={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},r_={fill:{kUk6DE:"x98rzlu",kjj79g:"xl56j7k",$$css:!0}},a_={sm:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0},md:{kzqmXN:"x1kky2od",kZKoxP:"xlup9mm",$$css:!0},lg:{kzqmXN:"x1xp8n7a",kZKoxP:"xmix8c7",$$css:!0}};function Wd({as:e,ref:t,value:n,label:s,isLabelHidden:r=!1,href:a,icon:i,selectedIcon:o,endContent:c,xstyle:u,className:d,style:f,...h}){const p=JI(),m=$a(e),b=p.value===n,y=p.size,g=p.layout==="fill",k=b&&o?o:i,v=!r&&s!=="",w=x.useCallback(()=>{p.onChange(n)},[p,n]),j=k?l.jsx("span",{...B(hd.icon,a_[y]),children:k}):null,C={...h,...r?{"aria-label":s}:{},[Af]:"","data-tab-value":n,"aria-current":b?"page":void 0,tabIndex:b?0:-1,...U(P("tab",{selected:b?"selected":null}),B(hd.base,n_[y],b&&hd.selected,g&&r_.fill,t_,u),d,f)},$=l.jsx("span",{"aria-hidden":"true",...B(hd.hoverBg,s_[y])}),E=l.jsx("span",{...U(P("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])}),T=v?l.jsxs("span",{className:"xwz0xwf",children:[l.jsx("span",{className:"x1agbcgv xcrlgei",children:s}),l.jsx("span",{"aria-hidden":"true",className:"x1agbcgv xcrlgei xlshs6z x47corl x2mo6ok",children:s})]}):null,S=c?l.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:c}):null;return a!=null?l.jsxs(m,{ref:t,href:a,onClick:w,...C,children:[$,j,T,S,E]}):l.jsxs("button",{ref:t,type:"button",onClick:w,...C,children:[$,j,T,S,E]})}Wd.displayName="Tab";const i_=.8,Da={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}},o_={sm:{$$css:!0},md:{$$css:!0},lg:{k8WAf4:"xce4md1",$$css:!0}};function Z4({label:e,isLabelHidden:t=!1,description:n,isOptional:s=!1,isRequired:r=!1,onChange:a,changeAction:i,isLoading:o=!1,value:c,placeholder:u,rows:d=3,isDisabled:f=!1,disabledMessage:h,status:p,statusVariant:m="attached",labelTooltip:b,startIcon:y,hasSpellCheck:g=!0,onPaste:k,maxLength:v,hasAutoFocus:w=!1,size:j,htmlName:C,onFocus:$,onBlur:E,width:T,xstyle:S,className:M,style:z,ref:A,...R}){const I=Ai(j,"md"),N=ke(),_=Ml(),L=x.useId(),D=x.useId(),O=x.useId(),q=x.useId(),F=x.useRef(null),X=x.useRef(null),J=x.useRef(null),[,Z]=x.useTransition(),[te,Q]=x.useOptimistic(c),K=o||te!==c,re=f&&!!h,oe=Is({placement:"above",focusTrigger:"always",isEnabled:re}),{statusIcon:be,describedBy:pe}=D3({status:p,statusVariant:m}),he=[n?D:null,m!=="tooltip"&&(p!=null&&p.message)?O:null,pe,v!=null?q:null,re?oe.describedBy:null].filter(Boolean).join(" ")||void 0,le=x.useCallback(Le=>{if(v==null)return;const ne=Le>v?"over":Le>=v*i_?"near":"under";ne!==J.current&&(J.current=ne,ne==="over"?_(N("@astryx.textArea.charactersOverLimit",{count:Le-v}),"assertive"):ne==="near"&&_(N("@astryx.textArea.charactersRemaining",{count:v-Le})))},[_,N,v]),Y=Le=>{if(f)return;const ne=Le.target.value;le(ne.length),a==null||a(ne,Le),i&&!Le.defaultPrevented&&Z(async()=>{Q(ne),await i(ne,Le)})},me=f||K,{onClick:ce,onMouseUp:xe}=c0({containerRef:X,inputRef:F,disabled:me});return l.jsxs(Al,{label:e,isLabelHidden:t,description:n,inputID:L,descriptionID:n?D:void 0,isOptional:s,isRequired:r,isDisabled:f,status:p?{type:p.type,message:p.message,messageID:p.message?O:void 0}:void 0,statusVariant:m,labelTooltip:b,width:T,children:[l.jsxs("div",{ref:Le=>{X.current=Le,oe.ref(Le)},onClick:ce,onMouseUp:xe,...U(P("textarea",{size:I,status:(p==null?void 0:p.type)??null}),B(al.base,Da.wrapper,f&&al.disabled,p&&k0[p.type],p&&!f&&b0[p.type],p&&s4[p.type],S),M,z),children:[y&&l.jsx("span",{className:"x10l6tqk xctzyg x1kiyvbf x47corl x78zum5",children:_s(y,{size:"sm",color:"secondary"})}),l.jsx("textarea",{...R,ref:ct(A,F),id:L,name:C,value:te,onChange:Y,onPaste:k,onFocus:$,onBlur:E,placeholder:u,rows:d,disabled:f&&!re,"aria-disabled":re?"true":void 0,readOnly:re||void 0,spellCheck:g,autoFocus:w,"data-autofocus":w||void 0,"aria-describedby":he,"aria-required":r&&!s?"true":void 0,"aria-invalid":(p==null?void 0:p.type)==="error"||v!=null&&te.length>v?"true":void 0,"aria-busy":K||void 0,...B(Da.textarea,o_[I],f&&Da.textareaDisabled,!!y&&Da.textareaWithStartIcon,(p||K)&&Da.textareaWithStatus,K&&!!be&&Da.textareaWithBusyStatus,v!=null&&Da.textareaWithCounter)}),(K||be)&&l.jsxs("span",{className:"x10l6tqk xctzyg x13oyzgk x47corl x78zum5 x6s0dn4 x1txdalj",children:[K&&l.jsx(En,{size:"sm"}),be]}),v!=null&&l.jsxs("div",{id:q,...{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"}}[(te.length>v)<<0],children:[te.length>v&&l.jsx(Ce,{icon:"warning",size:"sm"}),te.length,"/",v]})]}),re&&oe.renderTooltip(h)]})}Z4.displayName="TextArea";function Y4({ref:e,href:t,isDisabled:n,LinkComponent:s,linkStyleProps:r,labelContent:a,icon:i,endContent:o,removeButton:c,...u}){const d=x.useRef(null),f=x.useRef(null),{onClick:h,onMouseUp:p}=a0({containerRef:d,interactiveRef:f,href:t,disabled:n});return l.jsxs("span",{ref:ct(e,d),onClick:n?void 0:h,onMouseUp:n?void 0:p,...u,children:[i,l.jsx(s,{ref:f,href:t,"aria-disabled":n||void 0,...r,children:a}),o,c]})}Y4.displayName="TokenLink";const In={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}},xd={sm:{kZKoxP:"xzydfjl",kGuDYH:"x141an7d",kg3NbH:"xf314gf",$$css:!0},md:{kZKoxP:"xrmxcn7",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"x102lyln",kg3NbH:"xf314gf",$$css:!0}},pd={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 Fn({label:e,size:t="md",color:n="default",icon:s,isDisabled:r=!1,onRemove:a,onClick:i,href:o,description:c,endContent:u,isLabelHidden:d=!1,xstyle:f,className:h,style:p,"data-testid":m,ref:b}){const y=ke(),g=$a(),k=L3({href:o,onClick:i,isDisabled:r}),v=i??(k==="button"?()=>{}:null),w=a!=null&&l.jsx("button",{type:"button","aria-label":y("@astryx.token.remove",{label:e}),onClick:$=>{$.stopPropagation(),a($)},disabled:r,className:"x3nfvp2 x6s0dn4 xl56j7k x1n2onr6 x1717udv xkd40ry x1ypdohk xjspbzw x1kky2od xlup9mm x1heor9g x17nn4n9 x1s928wv x1j6awrg x1xsm0q9",children:l.jsx(Ce,{icon:"close",size:"xsm",color:"inherit"})}),j=l.jsxs(l.Fragment,{children:[s,l.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,w]}),C={"data-testid":m,"aria-label":d?e:void 0,"aria-description":c};if(k==="link")return a==null?l.jsx(g,{ref:b,href:o,"aria-disabled":r||void 0,...C,...U(P("token",{color:n,size:t}),B(In.base,xd[t],pd[n],In.interactive,r&&In.disabled,f),h,p),children:j}):l.jsx(Y4,{ref:b,href:o,isDisabled:r,LinkComponent:g,icon:s,endContent:u,removeButton:w,linkStyleProps:{className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli"},labelContent:l.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,...U(P("token",{color:n,size:t}),B(In.base,xd[t],pd[n],In.interactive,In.focusVisibleOutline,r&&In.disabled,f),h,p)});if(v!=null){const $=E=>{E.target.closest("button, a")||v(E)};return l.jsxs("span",{ref:b,onClick:r?void 0:$,...C,...U(P("token",{color:n,size:t}),B(In.base,xd[t],pd[n],In.interactive,In.focusVisibleOutline,r&&In.disabled,f),h,p),children:[s,l.jsx("button",{type:"button",onClick:v,disabled:r,className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli",children:l.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,w]})}return l.jsx("span",{ref:b,...C,...U(P("token",{color:n,size:t}),B(In.base,xd[t],pd[n],r&&In.disabled,f),h,p),children:j})}Fn.displayName="Token";const l_=1e3,c_=100,Jb={root:{kWkggS:"xprdx6m x1j0df82 x1o55y2u",kSiTet:"xvpkmg4 x1tbh5bv",$$css:!0},animate:{kILWW9:"xpz12be",k44tkh:"xqgcaz",ko0y90:"xa4qsjk",kKVMdj:"xeuoslp x1aquc0h",kyAemX:"x193epu2",$$css:!0}},u_={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}},d_={kKxzle:"xvo38ju",$$css:!0},ev={animationDelay:e=>[d_,{"--x-animationDelay":(t=>typeof t=="number"?t+"ms":t??void 0)(`${l_+c_*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 Q4({width:e="100%",height:t="100%",radius:n=3,index:s=0,"data-testid":r,xstyle:a,className:i,style:o,ref:c,...u}){return l.jsx("div",{ref:c,"aria-hidden":"true","data-testid":r,...U(P("skeleton"),B(Jb.root,Jb.animate,u_[n],ev.dimensions(e,t),ev.animationDelay(s),a),i,o),...u})}Q4.displayName="Skeleton";const p1={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 f_(){return l.jsx("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",children:l.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 Bf({src:e,alt:t,label:n,onRemove:s,onClick:r,isLoading:a=!1,isDisabled:i=!1,showRemoveOn:o="hover",xstyle:c,className:u,style:d,"data-testid":f,ref:h,...p}){const m=ke(),[b,y]=x.useState(void 0),g=e!=null,k=g&&b===e,v=a&&!g,w=g&&!v&&!k,j=a&&g,C=!a&&!g||k,$=r!=null&&!i&&!a,E=s!=null&&!i,T=E&&o==="hover",{getContainerProps:S,getContentRevealProps:M}=VN({isEnabled:T}),z=n&&t?`${n} — ${t}`:n??t??m("@astryx.thumbnail.fallbackName"),A=!t,R=t!=null||n!=null||p["aria-label"]!=null||p["aria-labelledby"]!=null;Tl("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.',g&&!R);const I=l.jsxs(l.Fragment,{children:[w&&l.jsx("img",{src:e,alt:t??"",role:A?"presentation":void 0,"aria-hidden":A||void 0,onError:()=>y(e),className:"xh8yej3 x5yr21d xl1xv1r x1lliihq"}),v&&l.jsx(Q4,{radius:2}),C&&l.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k xh8yej3 x5yr21d xv9yike",children:l.jsx(f_,{})})]}),N=E?l.jsx("div",{...U({className:"x10l6tqk x8d4r5l xy3asu9 x1vjfegm x14ju556"},T?M({isLayoutPreserved:!0}):{}),children:l.jsx(de,{icon:l.jsx(Ce,{icon:"close",size:"xsm"}),label:m("@astryx.thumbnail.remove",{accessibleName:z}),variant:"secondary",size:"sm",isIconOnly:!0,onClick:L=>{L.stopPropagation(),s(L)},xstyle:p1.removeButtonOverrides})}):null,_=l.jsx("div",{ref:h,"data-testid":f,role:"group","aria-label":z,...U(P("thumbnail"),B(p1.root,i&&p1.disabled,c),u,d),...p,children:l.jsxs("div",{...U({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],T?S():{}),children:[$?l.jsx("button",{type:"button",onClick:r,"aria-label":m("@astryx.thumbnail.open",{accessibleName:z}),className:"x1ypdohk x1lliihq xh8yej3 x5yr21d xh6dtrn xb3r6kr",children:I}):I,w&&l.jsx("div",{className:"x10l6tqk x10a8y8t x1pjcqnp x1er153n x47corl"}),j&&l.jsx("div",{className:"x10l6tqk x10a8y8t x78zum5 x6s0dn4 xl56j7k x1u4601x x1pjcqnp x1vjfegm x14ju556",children:l.jsx(En,{size:"sm",shade:"onMedia"})}),N]})});return n!=null?l.jsx(_i,{content:n,children:_}):_}Bf.displayName="Thumbnail";const Ql={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)}]},h_="@astryx.dropdownMenu.label";function Oi({button:e,isMenuOpen:t,onOpenChange:n,menuWidth:s,onClick:r,hasChevron:a=!0,placement:i="below",alignment:o="start",className:c,style:u,xstyle:d,"data-testid":f,...h}){const p=ke(),m=e??{label:p(h_)},b=("items"in h?h.items:void 0)??[],y=h.children,{items:g,children:k,...v}=h,w=x.useId(),j=m.size??"md",C=x.useRef(null),[$,E]=x.useState(!1),T=t!==void 0,S=T?t:$,M=x.useRef(0),z=x.useCallback(()=>{var le;M.current=Date.now(),n==null||n(!1),T||E(!1),(le=C.current)==null||le.focus()},[T,n]),A=x.useRef(!1),R=x.useCallback(()=>{n==null||n(!0),T||E(!0)},[T,n]),I=zl({onHide:z,onShow:R,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),N=x.useCallback(()=>{I.hide()},[I]),{listRef:_,handleKeyDown:L,focusFirst:D,focusItem:O,ownsEvent:q,getItems:F}=Ri({itemSelector:Fh,boundarySelector:Gh,wrap:!1,onEscape:N}),X=Uh({getItemLabels:()=>F().map(le=>le.textContent),onMatch:O,getCurrentIndex:()=>F().findIndex(le=>le===document.activeElement||le.contains(document.activeElement))});x.useEffect(()=>{T&&(t&&!I.isOpen?(A.current=!0,I.show()):!t&&I.isOpen&&I.hide())},[t,T,I]),x.useEffect(()=>{!I.isOpen||!A.current||(A.current=!1,requestAnimationFrame(()=>D()))},[I.isOpen,D]);const J=x.useCallback(le=>{if(q(le)){if(le.key==="Enter"||le.key===" "){le.preventDefault();const Y=document.activeElement;Y&&Cu.has(Y.getAttribute("role")??"")&&Y.click();return}if(le.key==="Tab"){N();return}if(X.onKeyDown(le)){le.preventDefault();return}L(le)}},[L,N,X,q]),Z=x.useCallback(()=>{A.current=!0,I.show()},[I]),te=x.useCallback(()=>{Date.now()-M.current<50||(r==null||r(),T?n==null||n(!t):I.isOpen?I.hide():Z())},[r,T,n,t,I,Z]),Q=x.useCallback(le=>{I.isOpen||(le.key==="ArrowDown"||le.key==="Enter"||le.key===" ")&&(le.preventDefault(),Z())},[I.isOpen,Z]),K=m.isIconOnly===!0,re=m.endContent??(a&&!K?l.jsx(Ce,{icon:"chevronDown",size:"sm",color:"inherit"}):void 0),oe=s?Ql.popoverCustomWidth(s):Ql.popover,be=i==="above"||i==="below"?Ql.popoverBlockGap:Ql.popoverInlineGap,pe=x.useMemo(()=>({closeMenu:N,menuSize:j}),[N,j]),he=h.items!==void 0?Vh(b):y;return l.jsxs(l.Fragment,{children:[l.jsx(de,{...m,ref:le=>{C.current=le,I.triggerRef(le);const Y=m.ref;typeof Y=="function"?Y(le):Y&&(Y.current=le)},tooltip:S?void 0:m.tooltip,endContent:re,onClick:te,onKeyDown:Q,"aria-haspopup":"menu","aria-expanded":S,"aria-controls":w,"data-testid":f}),I.render(l.jsx("div",{...v,ref:_,id:w,role:"menu","aria-label":m.label,onKeyDown:J,...U(P("dropdown-menu"),B(Ql.dropdown,d),c,u),children:l.jsx(Nl,{value:pe,children:he})}),{placement:i,alignment:o,xstyle:[oe,be,Js[i]]})]})}Oi.displayName="DropdownMenu";function Jh({items:e,label:t,variant:n="ghost",size:s,icon:r,isDisabled:a=!1,isMenuOpen:i,onOpenChange:o,xstyle:c,className:u,style:d,"data-testid":f,ref:h}){const p=ke(),m=t??p("@astryx.moreMenu.label"),b=Ai(s,"md"),y=gi("moreHorizontal");return l.jsx(Oi,{className:u?`${yp("more-menu")} ${u}`:yp("more-menu"),xstyle:c,style:d,isMenuOpen:i,onOpenChange:o,button:{label:m,icon:r??y,variant:n,size:b,isDisabled:a,tooltip:m,isIconOnly:!0,ref:h},items:e,hasChevron:!1,"data-testid":f})}Jh.displayName="MoreMenu";const ir={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}},x_={kzqmXN:"xn9wirt",ks0D6T:"xf68679",$$css:!0},p_={width:e=>[x_,{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`${e}px`)}]};function P0({isOpen:e,onOpenChange:t,children:n,header:s,width:r=320,side:a="auto",label:i,"data-testid":o,xstyle:c,className:u,style:d,onClick:f,ref:h,...p}){const m=ke(),b=Ph(),y=e??b.isMobileNavOpen,g=x.useId(),k=b.mobileNavId||g,v=x.useMemo(()=>t??(M=>{M?b.openMobileNav():b.closeMobileNav()}),[t,b]),w=x.useRef(null),j=x.useRef(null),[C,$]=x.useState(a==="auto"?"end":a);x.useEffect(()=>{const M=w.current;if(M){if(j.current&&(clearTimeout(j.current),j.current=null),y){if(a==="auto"){const z=document.activeElement;if(z&&z!==document.body){const A=z.getBoundingClientRect(),R=A.left+A.width/2;$(R<window.innerWidth/2?"start":"end")}}else $(a);M.open||M.showModal(),document.documentElement.style.overflow="clip"}else if(M.open){document.documentElement.style.overflow="";const z=window.matchMedia("(prefers-reduced-motion: reduce)").matches?10:250;j.current=setTimeout(()=>{M.close()},z)}return()=>{j.current&&(clearTimeout(j.current),j.current=null),document.documentElement.style.overflow="",M.open&&M.close()}}},[y,a]);const E=x.useCallback(M=>{M.preventDefault(),v(!1)},[v]),T=x.useCallback(M=>{M.target===M.currentTarget&&v(!1)},[v]),S=C==="start";return l.jsx("dialog",{ref:ct(h,w),id:k,...U(P("mobile-nav",{side:C}),B(ir.dialog,y&&ir.open,ir.backdrop,y&&ir.backdropOpen,c),u,d),...p,"data-testid":o,"aria-label":i??(typeof s=="string"?s:m("@astryx.mobileNav.navigation")),onClick:Lh(f,T),onCancel:E,children:l.jsxs("div",{tabIndex:-1,...B(ir.drawer,p_.width(r),S&&ir.drawerStart,S&&y&&ir.drawerStartOpen,!S&&ir.drawerEnd,!S&&y&&ir.drawerEndOpen),children:[l.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"?l.jsx("span",{className:"x11g1kdw",children:l.jsx(Di,{level:2,children:s})}):s??null,l.jsx(de,{variant:"ghost",label:m("@astryx.mobileNav.closeNavigation"),icon:l.jsx(Ce,{icon:"close",color:"inherit"}),onClick:()=>v(!1),isIconOnly:!0})]}),l.jsx("div",{className:"x98rzlu x1odjw0f x6ikm8r xish69e xx69xxh xf314gf xce4md1",children:n})]})})}P0.displayName="MobileNav";const Pr={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}},ex=x.createContext({isCollapsed:!1,toggle:()=>{},isCollapsible:!1});ex.displayName="SideNavCollapseContext";function U0(){return x.use(ex)}function J4({ref:e,handleRef:t,label:n,children:s,onClick:r,...a}){const i=ke(),o=gi("chevronLeft"),{isCollapsed:c,toggle:u,isCollapsible:d}=g_(t),{isMobile:f}=Ph();return!d||f?null:l.jsx(de,{ref:e,label:n??i(c?"@astryx.sideNavCollapseButton.expandSidebar":"@astryx.sideNavCollapseButton.collapseSidebar"),variant:"ghost",...a,onClick:Lh(r,u),icon:s??l.jsx("span",{...B(rl.mirror),children:l.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92"},1:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92 x19jd1h0"}}[!!c<<0],children:o})}),isIconOnly:!0})}J4.displayName="SideNavCollapseButton";function g_(e){var s;const t=U0();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,a;(a=(r=e.current)==null?void 0:r.getCollapseState())==null||a.toggle()},isCollapsible:(n==null?void 0:n.isCollapsible)??!0}}const m_=160,g1={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 F0({header:e,topContent:t,children:n,footer:s,footerIcons:r,collapsible:a=!1,resizable:i=!1,xstyle:o,className:c,style:u,"data-testid":d,ref:f,handleRef:h,...p}){const m=ke(),b=typeof a=="object"?a:{},y=!!a,g=b.hasButton??!0,k=b.defaultIsCollapsed??!1,v=b.isCollapsed,w=b.onCollapsedChange,j=typeof i=="object"?i:{},C=!!i,$=v!==void 0,[E,T]=x.useState(k),S=$?v:E,M=x.useRef(null),z=x.useRef({isCollapsed:S,toggle:()=>{},isCollapsible:y}),A=x.useCallback(te=>{$||T(te),w==null||w(te)},[$,w]),R=G4({defaultSize:j.defaultWidth??260,minSizePx:j.minWidth??180,maxSizePx:j.maxWidth??480,collapsible:y,collapsedSize:m_,autoSaveId:j.autoSaveId,onSizeChange:j.onWidthChange,onCollapseChange:y?A:void 0}),I=x.useCallback(()=>{const te=!S;z.current={...z.current,isCollapsed:te},A(te),C&&(te?R.collapse():R.expand())},[S,A,C,R]),N=C&&!S;z.current={isCollapsed:S,toggle:I,isCollapsible:y};const _={isCollapsed:S,toggle:I,isCollapsible:y};x.useImperativeHandle(h,()=>({getCollapseState:()=>z.current}),[]);const L=b3();if(L==="topbar")return l.jsxs("div",{"data-testid":d,...U(P("side-nav",{mode:"topbar"}),B(g1.topbar,o),c,u),children:[e,l.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw xvc5jky",children:r})]});const D=!!(s||r);if(L==="drawer")return l.jsxs(P0,{header:e,"data-testid":d,children:[t,n,D&&l.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&l.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});if(L==="drawer-content")return l.jsxs(l.Fragment,{children:[t,n,D&&l.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[s,r&&l.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:r})]})]});const O=!!(e||t),q=!!(s||r),F=y&&g,X=C?{...u??{},width:S?void 0:R.size}:u,J=l.jsxs("nav",{ref:ct(f,M),role:"navigation","aria-label":m("@astryx.sideNav.label"),"data-testid":d,...U(P("side-nav"),B(g1.root,S&&g1.rootCollapsed,o),c,X),...p,children:[O&&l.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&&l.jsx("div",{children:t})]}),l.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|!!O<<1|!!q<<0],children:n}),(q||F)&&l.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,l.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw"},1:{className:"x78zum5 x6s0dn4 xzye2dw x3ieub6"}}[!!S<<0],children:[F&&l.jsx(J4,{}),r]})]})]}),Z=N?l.jsxs("div",{className:"x1n2onr6 x78zum5 x2lah0s x5yr21d",children:[J,l.jsx(B0,{"data-testid":"astryx-sidenav-resize-handle",direction:"horizontal",position:"overlay",pillPlacement:"end",isAlwaysVisible:!1,resizable:R.props,label:m("@astryx.sideNav.resizeSidebar")})]}):J;return y?l.jsx(ex,{value:_,children:Z}):Z}F0.displayName="SideNav";const so={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}},y_={isCollapsed:!1,toggle:()=>{},isCollapsible:!1};function m1({href:e,as:t,isDisabled:n,onClick:s,ref:r,children:a,...i}){const o=$a(t);return e&&!n?l.jsx(o,{ref:r,href:e,onClick:s,...i,children:a}):l.jsx("button",{ref:r,type:"button",onClick:s,disabled:n,...i,children:a})}function zs({as:e,label:t,icon:n,selectedIcon:s,isSelected:r=!1,isDisabled:a=!1,href:i,onClick:o,endContent:c,children:u,collapsible:d,size:f="md","data-testid":h,ref:p,xstyle:m}){const b=ke(),y=gi("chevronDown"),{isCollapsed:g}=U0(),k=b3(),{closeMobileNav:v}=Ph(),w=k==="drawer"||k==="drawer-content",j=x.useId(),C=!!u,$=x.useRef(null),E=zl({hasLightDismiss:!0,hasAutoFocus:!0,hasCloseButton:!1,dialogLabel:`${t} submenu`}),T=x.useMemo(()=>typeof d=="object"?d:{},[d]),S=C&&d!==!1,M=T.isCollapsed,z=M!==void 0,[A,R]=x.useState(T.defaultIsCollapsed??!1),I=z?M:A,N=x.useCallback(()=>{var le;const he=!I;z||R(he),(le=T.onCollapsedChange)==null||le.call(T,he)},[I,z,T]),_=r&&s?s:n,D=S&&(!!i||!!o)&&!g,O=he=>{if(a){he.preventDefault();return}if(S&&!D&&!g){he.preventDefault(),N();return}o==null||o(he),w&&v()},q=he=>{he.preventDefault(),he.stopPropagation(),N()},F=x.useRef(null),X=x.useRef(null),J=x.useCallback(()=>{F.current&&(clearTimeout(F.current),F.current=null),X.current&&(clearTimeout(X.current),X.current=null)},[]),Z=x.useCallback(()=>{J(),F.current=setTimeout(()=>{E.show({skipAutoFocus:!0})},150)},[J,E]),te=x.useCallback(()=>{J(),X.current=setTimeout(()=>{E.hide()},200)},[J,E]),Q=x.useCallback(()=>{Z()},[Z]),K=x.useCallback(()=>{te()},[te]);if(g&&!n)return null;if(g){const he=_&&_s(_,{size:"sm",color:r?"primary":a?"disabled":"secondary"}),le=U(P("side-nav-item",{size:f,selected:r?"selected":null}),B(Pr.item,Pr[f],so.itemCollapsed,f==="sm"&&so.itemCollapsedSm,f==="lg"&&so.itemCollapsedLg,r&&Pr.selected,a&&Pr.disabled));if(C)return l.jsxs("div",{...B(so.root,m),children:[l.jsx("button",{ref:ct(p,E.triggerRef),type:"button",onClick:E.toggle,onMouseEnter:Q,onMouseLeave:K,"aria-label":t,"data-testid":h,...E.triggerProps,...le,children:he}),E.render(l.jsxs("div",{className:"x1litavf x1y0btm7 x14i3s5s xu0wf1k x7a5moj x11g1kdw xfb3i0g",onMouseEnter:Q,onMouseLeave:K,onClick:()=>E.hide(),children:[l.jsx("div",{className:"xf314gf xu0wf1k x141an7d x2mo6ok xv1l7n4 x1ltkj2j",children:t}),l.jsx(ex,{value:y_,children:u})]}),{placement:"end",alignment:"start"})]});const Y={"aria-current":r?"page":void 0,"aria-disabled":a||void 0,"aria-label":t,"data-testid":h},me=l.jsx(m1,{ref:p,href:i,as:e,isDisabled:a,onClick:O,...Y,...le,children:he});return l.jsxs("div",{ref:$,...B(so.root,m),children:[me,l.jsx(_i,{content:t,placement:"end",anchorRef:$})]})}const re=l.jsxs(l.Fragment,{children:[_&&_s(_,{size:"sm",color:r?"primary":a?"disabled":"secondary"}),!g&&l.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:t}),!g&&c&&l.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:c}),!g&&S&&!D&&l.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})]}),oe=U(P("side-nav-item",{size:f,selected:r?"selected":null}),B(Pr.item,Pr[f],r&&Pr.selected,a&&Pr.disabled));let be;if(D)be=l.jsxs("div",{"data-testid":h,...oe,children:[l.jsx(m1,{ref:p,href:i,as:e,isDisabled:a,onClick:O,"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:re}),l.jsx("button",{type:"button",onClick:q,"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:l.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":a||void 0,"aria-expanded":S?!I:void 0,"aria-controls":S?`${j}-children`:void 0,"data-testid":h};be=l.jsx(m1,{ref:p,href:i,as:e,isDisabled:a,onClick:O,...he,...oe,children:re})}return l.jsxs("div",{ref:$,...B(so.root,m),children:[be,C&&!g&&l.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:l.jsxs("div",{className:"xb3r6kr x2lwn1j x31w388",children:[l.jsx("span",{id:`${j}-label`,hidden:!0,children:t}),u]})})]})}zs.displayName="SideNavItem";const k_={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k8WAf4:"xu0wf1k",$$css:!0}};function Kd({ref:e,title:t,subtitle:n,children:s,endContent:r,isHeaderHidden:a=!1,xstyle:i,className:o,style:c,"data-testid":u,...d}){const{isCollapsed:f}=U0(),p=`${x.useId()}-title`,m=l.jsxs(l.Fragment,{children:[l.jsxs("span",{className:"x78zum5 xdt5ytf x98rzlu xeuugli",children:[l.jsx("span",{id:p,className:"x141an7d x2mo6ok x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:t}),n&&l.jsx("span",{className:"x141an7d x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:n})]}),r&&l.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:r})]}),b=a||f,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 l.jsxs("div",{ref:e,...U(P("side-nav-section"),B(k_.root,i),o,c),...d,role:"group","aria-labelledby":p,"data-testid":u,children:[l.jsx("div",{...U({className:"x78zum5 x6s0dn4 x1txdalj xf314gf xu0wf1k xt0e3qv x87ps6o"},{style:b?y:void 0}),children:m}),l.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:s})]})}Kd.displayName="SideNavSection";var e6={exports:{}},tx={},t6={exports:{}},n6={};/**
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(N,_){var L=N.length;N.push(_);e:for(;0<L;){var D=L-1>>>1,O=N[D];if(0<r(O,_))N[D]=_,N[L]=O,L=D;else break e}}function n(N){return N.length===0?null:N[0]}function s(N){if(N.length===0)return null;var _=N[0],L=N.pop();if(L!==_){N[0]=L;e:for(var D=0,O=N.length,q=O>>>1;D<q;){var F=2*(D+1)-1,X=N[F],J=F+1,Z=N[J];if(0>r(X,L))J<O&&0>r(Z,X)?(N[D]=Z,N[J]=L,D=J):(N[D]=X,N[F]=L,D=F);else if(J<O&&0>r(Z,L))N[D]=Z,N[J]=L,D=J;else break e}}return _}function r(N,_){var L=N.sortIndex-_.sortIndex;return L!==0?L:N.id-_.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var c=[],u=[],d=1,f=null,h=3,p=!1,m=!1,b=!1,y=!1,g=typeof setTimeout=="function"?setTimeout:null,k=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function w(N){for(var _=n(u);_!==null;){if(_.callback===null)s(u);else if(_.startTime<=N)s(u),_.sortIndex=_.expirationTime,t(c,_);else break;_=n(u)}}function j(N){if(b=!1,w(N),!m)if(n(c)!==null)m=!0,C||(C=!0,z());else{var _=n(u);_!==null&&I(j,_.startTime-N)}}var C=!1,$=-1,E=5,T=-1;function S(){return y?!0:!(e.unstable_now()-T<E)}function M(){if(y=!1,C){var N=e.unstable_now();T=N;var _=!0;try{e:{m=!1,b&&(b=!1,k($),$=-1),p=!0;var L=h;try{t:{for(w(N),f=n(c);f!==null&&!(f.expirationTime>N&&S());){var D=f.callback;if(typeof D=="function"){f.callback=null,h=f.priorityLevel;var O=D(f.expirationTime<=N);if(N=e.unstable_now(),typeof O=="function"){f.callback=O,w(N),_=!0;break t}f===n(c)&&s(c),w(N)}else s(c);f=n(c)}if(f!==null)_=!0;else{var q=n(u);q!==null&&I(j,q.startTime-N),_=!1}}break e}finally{f=null,h=L,p=!1}_=void 0}}finally{_?z():C=!1}}}var z;if(typeof v=="function")z=function(){v(M)};else if(typeof MessageChannel<"u"){var A=new MessageChannel,R=A.port2;A.port1.onmessage=M,z=function(){R.postMessage(null)}}else z=function(){g(M,0)};function I(N,_){$=g(function(){N(e.unstable_now())},_)}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(N){N.callback=null},e.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<N?Math.floor(1e3/N):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(N){switch(h){case 1:case 2:case 3:var _=3;break;default:_=h}var L=h;h=_;try{return N()}finally{h=L}},e.unstable_requestPaint=function(){y=!0},e.unstable_runWithPriority=function(N,_){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var L=h;h=N;try{return _()}finally{h=L}},e.unstable_scheduleCallback=function(N,_,L){var D=e.unstable_now();switch(typeof L=="object"&&L!==null?(L=L.delay,L=typeof L=="number"&&0<L?D+L:D):L=D,N){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=L+O,N={id:d++,callback:_,priorityLevel:N,startTime:L,expirationTime:O,sortIndex:-1},L>D?(N.sortIndex=L,t(u,N),n(c)===null&&N===n(u)&&(b?(k($),$=-1):b=!0,I(j,L-D))):(N.sortIndex=O,t(c,N),m||p||(m=!0,C||(C=!0,z()))),N},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(N){var _=h;return function(){var L=h;h=_;try{return N.apply(this,arguments)}finally{h=L}}}})(n6);t6.exports=n6;var b_=t6.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 Ct=b_,s6=x,v_=Hc;function W(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 r6(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function $u(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 a6(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 i6(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 tv(e){if($u(e)!==e)throw Error(W(188))}function w_(e){var t=e.alternate;if(!t){if(t=$u(e),t===null)throw Error(W(188));return t!==e?null:e}for(var n=e,s=t;;){var r=n.return;if(r===null)break;var a=r.alternate;if(a===null){if(s=r.return,s!==null){n=s;continue}break}if(r.child===a.child){for(a=r.child;a;){if(a===n)return tv(r),e;if(a===s)return tv(r),t;a=a.sibling}throw Error(W(188))}if(n.return!==s.return)n=r,s=a;else{for(var i=!1,o=r.child;o;){if(o===n){i=!0,n=r,s=a;break}if(o===s){i=!0,s=r,n=a;break}o=o.sibling}if(!i){for(o=a.child;o;){if(o===n){i=!0,n=a,s=r;break}if(o===s){i=!0,s=a,n=r;break}o=o.sibling}if(!i)throw Error(W(189))}}if(n.alternate!==s)throw Error(W(190))}if(n.tag!==3)throw Error(W(188));return n.stateNode.current===n?e:t}function o6(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=o6(e),t!==null)return t;e=e.sibling}return null}function Tn(e,t,n,s,r,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,s,r,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&Tn(e.child,t,n,s,r,a))return!0;e=e.sibling}return!1}function Bi(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 nv(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 l6(e){var t=[null,null],n=Bi(e);return n===null||c6(t,e,n.child,{foundSelf:!1}),t}function c6(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)&&c6(e,t,n.child,s))return!0;n=n.sibling}return!1}function St(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(W(559))}}var po=null,Lp=null;function j_(e,t,n){return e===n?!0:e===t?(po=e,!0):!1}function S_(e,t,n){return e===n?(Lp=e,!1):e===t?(Lp!==null&&(po=e),!0):!1}function sv(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 Op(e,t,n){for(var s=0,r=e;r;r=n(r))s++;r=0;for(var a=t;a;a=n(a))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 Xe=Object.assign,C_=Symbol.for("react.element"),gd=Symbol.for("react.transitional.element"),uc=Symbol.for("react.portal"),go=Symbol.for("react.fragment"),u6=Symbol.for("react.strict_mode"),Bp=Symbol.for("react.profiler"),d6=Symbol.for("react.consumer"),Xs=Symbol.for("react.context"),G0=Symbol.for("react.forward_ref"),qp=Symbol.for("react.suspense"),Hp=Symbol.for("react.suspense_list"),V0=Symbol.for("react.memo"),Xr=Symbol.for("react.lazy"),Pp=Symbol.for("react.activity"),$_=Symbol.for("react.legacy_hidden"),E_=Symbol.for("react.memo_cache_sentinel"),Up=Symbol.for("react.view_transition"),T_=Symbol.for("react.recoverable"),rv=Symbol.iterator;function Jl(e){return e===null||typeof e!="object"?null:(e=rv&&e[rv]||e["@@iterator"],typeof e=="function"?e:null)}var z_=Symbol.for("react.client.reference");function Fp(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===z_?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case go:return"Fragment";case Bp:return"Profiler";case u6:return"StrictMode";case qp:return"Suspense";case Hp:return"SuspenseList";case Pp:return"Activity";case Up:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case uc:return"Portal";case Xs:return e.displayName||"Context";case d6:return(e._context.displayName||"Context")+".Consumer";case G0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V0:return t=e.displayName||null,t!==null?t:Fp(e.type)||"Memo";case Xr:t=e._payload,e=e._init;try{return Fp(e(t))}catch{}}return null}var dc=Array.isArray,ge=s6.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,De=v_.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ci={pending:!1,data:null,method:null,action:null},Gp=[],mo=-1;function rr(e){return{current:e}}function Kt(e){0>mo||(e.current=Gp[mo],Gp[mo]=null,mo--)}function Je(e,t){mo++,Gp[mo]=e.current,e.current=t}var tr=rr(null),Gc=rr(null),oa=rr(null),qf=rr(null);function Hf(e,t){switch(Je(oa,t),Je(Gc,e),Je(tr,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?m2(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=m2(t),e=R8(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Kt(tr),Je(tr,e)}function il(){Kt(tr),Kt(Gc),Kt(oa)}function Vp(e){var t=e.memoizedState;t!==null&&(gl._currentValue=t.memoizedState,Je(qf,e)),t=tr.current;var n=R8(t,e.type);t!==n&&(Je(Gc,e),Je(tr,n))}function Pf(e){Gc.current===e&&(Kt(tr),Kt(Gc)),qf.current===e&&(Kt(qf),gl._currentValue=ci)}var y1,av;function Vr(e){if(y1===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);y1=t&&t[1]||"",av=-1<n.stack.indexOf(`
183
- at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
184
- `+y1+e+av}var k1=!1;function b1(e,t){if(!e||k1)return"";k1=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(m){var h=m}Reflect.construct(e,[],f)}else{try{f.call()}catch(m){h=m}f=!1;try{var p=Object.getOwnPropertyDescriptor(e.prototype,"props");Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),f=!0,new e}finally{f&&(p!==void 0?Object.defineProperty(e.prototype,"props",p):delete e.prototype.props)}}}else{try{throw Error()}catch(m){h=m}(f=e())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(m){if(m&&h&&typeof m.stack=="string")return[m.stack,h.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 a=s.DetermineComponentFrameRoot(),i=a[0],o=a[1];if(i&&o){var c=i.split(`
185
- `),u=o.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{k1=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Vr(n):""}function N_(e,t){switch(e.tag){case 26:case 27:case 5:return Vr(e.type);case 16:return Vr("Lazy");case 13:return e.child!==t&&t!==null?Vr("Suspense Fallback"):Vr("Suspense");case 19:return Vr("SuspenseList");case 0:case 15:return b1(e.type,!1);case 11:return b1(e.type.render,!1);case 1:return b1(e.type,!0);case 31:return Vr("Activity");case 30:return Vr("ViewTransition");default:return""}}function iv(e){try{var t="",n=null;do t+=N_(e,n),n=e,e=e.return;while(e);return t}catch(s){return`
188
- Error generating stack: `+s.message+`
189
- `+s.stack}}var Wp=Object.prototype.hasOwnProperty,W0=Ct.unstable_scheduleCallback,v1=Ct.unstable_cancelCallback,M_=Ct.unstable_shouldYield,A_=Ct.unstable_requestPaint,Gn=Ct.unstable_now,R_=Ct.unstable_getCurrentPriorityLevel,f6=Ct.unstable_ImmediatePriority,h6=Ct.unstable_UserBlockingPriority,Uf=Ct.unstable_NormalPriority,I_=Ct.unstable_LowPriority,x6=Ct.unstable_IdlePriority,__=Ct.log,D_=Ct.unstable_setDisableYieldValue,Eu=null,Vn=null;function ta(e){if(typeof __=="function"&&D_(e),Vn&&typeof Vn.setStrictMode=="function")try{Vn.setStrictMode(Eu,e)}catch{}}var Wn=Math.clz32?Math.clz32:B_,L_=Math.log,O_=Math.LN2;function B_(e){return e>>>=0,e===0?32:31-(L_(e)/O_|0)|0}var md=256,yd=262144,kd=4194304;function Pa(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-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 nx(e,t,n){var s=e.pendingLanes;if(s===0)return 0;var r=0,a=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var o=s&134217727;return o!==0?(s=o&~a,s!==0?r=Pa(s):(i&=o,i!==0?r=Pa(i):n||(n=o&~e,n!==0&&(r=Pa(n))))):(o=s&~a,o!==0?r=Pa(o):i!==0?r=Pa(i):n||(n=s&~e,n!==0&&(r=Pa(n)))),r===0?0:t!==0&&t!==r&&!(t&a)&&(a=r&-r,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:r}function Tu(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function p6(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-Wn(n),r=1<<s;t|=e[s],n&=~r}return t}function q_(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 g6(){var e=kd;return kd<<=1,!(kd&62914560)&&(kd=4194304),e}function w1(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function zu(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function H_(e,t,n,s,r,a){var i=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var o=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=i&~n;0<n;){var d=31-Wn(n),f=1<<d;o[d]=0,c[d]=-1;var h=u[d];if(h!==null)for(u[d]=null,d=0;d<h.length;d++){var p=h[d];p!==null&&(p.lane&=-536870913)}n&=~f}s!==0&&m6(e,s,0),a!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=a&~(i&~t))}function m6(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Wn(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|n&261930}function y6(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var s=31-Wn(n),r=1<<s;r&t|e[s]&t&&(e[s]|=t),n&=~r}}function k6(e,t){var n=t&-t;return n=n&42?1:K0(n),n&(e.suspendedLanes|t)?0:n}function K0(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 X0(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function b6(){var e=De.p;return e!==0?e:(e=window.event,e===void 0?32:e7(e.type))}function ov(e,t){var n=De.p;try{return De.p=e,t()}finally{De.p=n}}var Ir=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Ir,zn="__reactProps$"+Ir,Rl="__reactContainer$"+Ir,lv="__reactEvents$"+Ir,P_="__reactListeners$"+Ir,U_="__reactHandles$"+Ir,cv="__reactResources$"+Ir,Nu="__reactMarker$"+Ir,Ff="__reactLoad$"+Ir;function sx(e){delete e[Vt],delete e[zn],delete e[P_],delete e[U_]}function Qa(e){var t;if(t=e[Vt])return t;for(var n=e.parentNode;n;){if(t=n[Rl]||n[Vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=C2(e);e!==null;){if(n=e[Vt])return n;e=C2(e)}return t}e=n,n=e.parentNode}return null}function Il(e){if(e=e[Vt]||e[Rl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function fc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(W(33))}function Mo(e){var t=e[cv];return t||(t=e[cv]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function _t(e){e[Nu]=!0}function v6(e){e[Ff]=void 0}var w6=new Set,j6={};function qi(e,t){ol(e,t),ol(e+"Capture",t)}function ol(e,t){for(j6[e]=t,e=0;e<t.length;e++)w6.add(t[e])}var F_=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]*$"),uv={},dv={};function G_(e){return Wp.call(dv,e)?!0:Wp.call(uv,e)?!1:F_.test(e)?dv[e]=!0:(uv[e]=!0,!1)}var Ie=!1;function fv(){var e=Ie;return Ie=!1,e}function Xd(e,t,n){if(G_(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 bd(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 or(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 Ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function S6(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function V_(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,a=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Kp(e){if(!e._valueTracker){var t=S6(e)?"checked":"value";e._valueTracker=V_(e,t,""+e[t])}}function C6(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),s="";return e&&(s=S6(e)?e.checked?"true":"false":e.value),e=s,e!==n?(t.setValue(e),!0):!1}var W_=/[\n"\\]/g;function os(e){return e.replace(W_,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xp(e,t,n,s,r,a,i,o){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ln(t)):e.value!==""+Ln(t)&&(e.value=""+Ln(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?i==="number"&&e.value==t?j1(e,Ln(e.value)):j1(e,Ln(t)):n!=null?j1(e,Ln(n)):s!=null&&e.removeAttribute("value"),r==null&&a!=null&&(e.defaultChecked=!!a),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Ln(o):e.removeAttribute("name")}function $6(e,t,n,s,r,a,i,o){if(a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.type=a),t!=null||n!=null){if(!(a!=="submit"&&a!=="reset"||t!=null)){Kp(e);return}n=n!=null?""+Ln(n):"",t=t!=null?""+Ln(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=o?e.checked:!!s,e.defaultChecked=!!s,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i),Kp(e)}function j1(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Ao(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=""+Ln(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 E6(e,t,n){if(t!=null&&(t=""+Ln(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ln(n):""}function T6(e,t,n,s){if(t==null){if(s!=null){if(n!=null)throw Error(W(92));if(dc(s)){if(1<s.length)throw Error(W(93));s=s[0]}n=s}n==null&&(n=""),t=n}n=Ln(t),e.defaultValue=n,s=e.textContent,s===n&&s!==""&&s!==null&&(e.value=s),Kp(e)}function ll(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var K_=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 hv(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||K_.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function z6(e,t,n){if(t!=null&&typeof t!="object")throw Error(W(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]="",Ie=!0);for(var r in t)s=t[r],t.hasOwnProperty(r)&&n[r]!==s&&(hv(e,r,s),Ie=!0)}else for(var a in t)t.hasOwnProperty(a)&&hv(e,a,t[a])}function Z0(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 X_=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"]]),Z_=/^[\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 Zd(e){return Z_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zs(){}var Zp=null;function Y0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yo=null,Ro=null;function xv(e){var t=Il(e);if(t&&(e=t.stateNode)){var n=e[zn]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xp(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="'+os(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var s=n[t];if(s!==e&&s.form===e.form){var r=s[zn]||null;if(!r)throw Error(W(90));Xp(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&&C6(s)}break e;case"textarea":E6(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ao(e,!!n.multiple,t,!1)}}}var S1=!1;function N6(e,t,n){if(S1)return e(t,n);S1=!0;try{var s=e(t);return s}finally{if(S1=!1,(yo!==null||Ro!==null)&&(mx(),yo&&(t=yo,e=Ro,Ro=yo=null,xv(t),e)))for(t=0;t<e.length;t++)xv(e[t])}}function Vc(e,t){var n=e.stateNode;if(n===null)return null;var s=n[zn]||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(W(231,t,typeof n));return n}var $r=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Yp=!1;if($r)try{var ec={};Object.defineProperty(ec,"passive",{get:function(){Yp=!0}}),window.addEventListener("test",ec,ec),window.removeEventListener("test",ec,ec)}catch{Yp=!1}var na=null,Q0=null,Yd=null;function M6(){if(Yd)return Yd;var e,t=Q0,n=t.length,s,r="value"in na?na.value:na.textContent,a=r.length;for(e=0;e<n&&t[e]===r[e];e++);var i=n-e;for(s=1;s<=i&&t[n-s]===r[a-s];s++);return Yd=r.slice(e,1<s?1-s:void 0)}function Qd(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 vd(){return!0}function pv(){return!1}function kn(e){function t(n,s,r,a,i){this._reactName=n,this._targetInst=r,this.type=s,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(n=e[o],this[o]=n?n(a):a[o]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?vd:pv,this.isPropagationStopped=pv,this}return Xe(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=vd)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=vd)},persist:function(){},isPersistent:vd}),t}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rx=kn(Ea),Mu=Xe({},Ea,{view:0,detail:0}),Y_=kn(Mu),C1,$1,tc,ax=Xe({},Mu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:J0,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!==tc&&(tc&&e.type==="mousemove"?(C1=e.screenX-tc.screenX,$1=e.screenY-tc.screenY):$1=C1=0,tc=e),C1)},movementY:function(e){return"movementY"in e?e.movementY:$1}}),gv=kn(ax),Q_=Xe({},ax,{dataTransfer:0}),J_=kn(Q_),eD=Xe({},Mu,{relatedTarget:0}),E1=kn(eD),tD=Xe({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),nD=kn(tD),sD=Xe({},Ea,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rD=kn(sD),aD=Xe({},Ea,{data:0}),mv=kn(aD),iD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oD={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"},lD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cD(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=lD[e])?!!t[e]:!1}function J0(){return cD}var uD=Xe({},Mu,{key:function(e){if(e.key){var t=iD[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Qd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?oD[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:J0,charCode:function(e){return e.type==="keypress"?Qd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Qd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),dD=kn(uD),fD=Xe({},ax,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yv=kn(fD),hD=Xe({},Ea,{submitter:0}),xD=kn(hD),pD=Xe({},Mu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:J0}),gD=kn(pD),mD=Xe({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),yD=kn(mD),kD=Xe({},ax,{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}),bD=kn(kD),vD=Xe({},Ea,{newState:0,oldState:0,source:0}),wD=kn(vD),jD=[9,13,27,32],ey=$r&&"CompositionEvent"in window,kc=null;$r&&"documentMode"in document&&(kc=document.documentMode);var SD=$r&&"TextEvent"in window&&!kc,A6=$r&&(!ey||kc&&8<kc&&11>=kc),kv=" ",bv=!1;function R6(e,t){switch(e){case"keyup":return jD.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function I6(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ko=!1;function CD(e,t){switch(e){case"compositionend":return I6(t);case"keypress":return t.which!==32?null:(bv=!0,kv);case"textInput":return e=t.data,e===kv&&bv?null:e;default:return null}}function $D(e,t){if(ko)return e==="compositionend"||!ey&&R6(e,t)?(e=M6(),Yd=Q0=na=null,ko=!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 A6&&t.locale!=="ko"?null:t.data;default:return null}}var ED={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 vv(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ED[e.type]:t==="textarea"}function _6(e,t,n,s){yo?Ro?Ro.push(s):Ro=[s]:yo=s,t=fh(t,"onChange"),0<t.length&&(n=new rx("onChange","change",null,n,s),e.push({event:n,listeners:t}))}var bc=null,Wc=null;function TD(e){N8(e,0)}function ix(e){var t=fc(e);if(C6(t))return e}function wv(e,t){if(e==="change")return t}var D6=!1;if($r){var T1;if($r){var z1="oninput"in document;if(!z1){var jv=document.createElement("div");jv.setAttribute("oninput","return;"),z1=typeof jv.oninput=="function"}T1=z1}else T1=!1;D6=T1&&(!document.documentMode||9<document.documentMode)}function Sv(){bc&&(bc.detachEvent("onpropertychange",L6),Wc=bc=null)}function L6(e){if(e.propertyName==="value"&&ix(Wc)){var t=[];_6(t,Wc,e,Y0(e)),N6(TD,t)}}function zD(e,t,n){e==="focusin"?(Sv(),bc=t,Wc=n,bc.attachEvent("onpropertychange",L6)):e==="focusout"&&Sv()}function ND(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ix(Wc)}function MD(e,t){if(e==="click")return ix(t)}function AD(e,t){if(e==="input"||e==="change")return ix(t)}function RD(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Xn=typeof Object.is=="function"?Object.is:RD;function Kc(e,t){if(Xn(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(!Wp.call(t,r)||!Xn(e[r],t[r]))return!1}return!0}function Qp(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 Cv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function $v(e,t){var n=Cv(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=Cv(n)}}function O6(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?O6(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function B6(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qp(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=Qp(e.document)}return t}function ty(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 ID=$r&&"documentMode"in document&&11>=document.documentMode,bo=null,Jp=null,vc=null,eg=!1;function Ev(e,t,n){var s=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;eg||bo==null||bo!==Qp(s)||(s=bo,"selectionStart"in s&&ty(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}),vc&&Kc(vc,s)||(vc=s,s=fh(Jp,"onSelect"),0<s.length&&(t=new rx("onSelect","select",null,t,n),e.push({event:t,listeners:s}),t.target=bo)))}function La(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var vo={animationend:La("Animation","AnimationEnd"),animationiteration:La("Animation","AnimationIteration"),animationstart:La("Animation","AnimationStart"),transitionrun:La("Transition","TransitionRun"),transitionstart:La("Transition","TransitionStart"),transitioncancel:La("Transition","TransitionCancel"),transitionend:La("Transition","TransitionEnd")},N1={},q6={};$r&&(q6=document.createElement("div").style,"AnimationEvent"in window||(delete vo.animationend.animation,delete vo.animationiteration.animation,delete vo.animationstart.animation),"TransitionEvent"in window||delete vo.transitionend.transition);function Hi(e){if(N1[e])return N1[e];if(!vo[e])return e;var t=vo[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in q6)return N1[e]=t[n];return e}var H6=Hi("animationend"),P6=Hi("animationiteration"),U6=Hi("animationstart"),_D=Hi("transitionrun"),DD=Hi("transitionstart"),LD=Hi("transitioncancel"),F6=Hi("transitionend"),G6=new Map,tg="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(" ");tg.push("scrollEnd");function Bs(e,t){G6.set(e,t),qi(t,[e])}var OD=0;function Er(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=As.identifierPrefix;var n=OD++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function Tv(e){if(e==null||typeof e=="string")return e;var t=null,n=qo;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 _r(e,t){return e=Tv(e),t=Tv(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Gf=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)},rs=[],wo=0,ny=0;function ox(){for(var e=wo,t=ny=wo=0;t<e;){var n=rs[t];rs[t++]=null;var s=rs[t];rs[t++]=null;var r=rs[t];rs[t++]=null;var a=rs[t];if(rs[t++]=null,s!==null&&r!==null){var i=s.pending;i===null?r.next=r:(r.next=i.next,i.next=r),s.pending=r}a!==0&&V6(n,r,a)}}function lx(e,t,n,s){rs[wo++]=e,rs[wo++]=t,rs[wo++]=n,rs[wo++]=s,ny|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function sy(e,t,n,s){return lx(e,t,n,s),Vf(e)}function Pi(e,t){return lx(e,null,null,t),Vf(e)}function V6(e,t,n){e.lanes|=n;var s=e.alternate;s!==null&&(s.lanes|=n);for(var r=!1,a=e.return;a!==null;)a.childLanes|=n,s=a.alternate,s!==null&&(s.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(r=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,r&&t!==null&&(r=31-Wn(n),e=a.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=n|536870912),a):null}function Vf(e){if(50<Mc)throw Mc=0,cf=null,Error(W(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var jo={};function BD(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 Cn(e,t,n,s){return new BD(e,t,n,s)}function ry(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wr(e,t){var n=e.alternate;return n===null?(n=Cn(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 W6(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 Jd(e,t,n,s,r,a){var i=0;if(s=e,typeof s=="function")ry(s)&&(i=1);else if(typeof s=="string")i=hO(e,n,tr.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(s){case Pp:return e=Cn(31,n,t,r),e.elementType=Pp,e.lanes=a,e;case go:return ui(n.children,r,a,t);case u6:i=8,r|=24;break;case Bp:return e=Cn(12,n,t,r|2),e.elementType=Bp,e.lanes=a,e;case qp:return e=Cn(13,n,t,r),e.elementType=qp,e.lanes=a,e;case Hp:return e=Cn(19,n,t,r),e.elementType=Hp,e.lanes=a,e;case $_:case Up:return e=r|32,e=Cn(30,n,t,e),e.elementType=Up,e.lanes=a,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case Xs:i=10;break e;case d6:i=9;break e;case G0:i=11;break e;case V0:i=14;break e;case Xr:i=16,s=null;break e}i=29,n=Error(W(130,e===null?"null":typeof e,"")),s=null}return t=Cn(i,n,t,r),t.elementType=e,t.type=s,t.lanes=a,t}function ui(e,t,n,s){return e=Cn(7,e,s,t),e.lanes=n,e}function M1(e,t,n){return e=Cn(6,e,null,t),e.lanes=n,e}function K6(e){var t=Cn(18,null,null,0);return t.stateNode=e,t}function A1(e,t,n){return t=Cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zv=new WeakMap;function ls(e,t){if(typeof e=="object"&&e!==null){var n=zv.get(e);return n!==void 0?n:(t={value:e,source:t,stack:iv(t)},zv.set(e,t),t)}return{value:e,source:t,stack:iv(t)}}var So=[],Co=0,Wf=null,Xc=0,as=[],is=0,ka=null,Ys=1,Qs="";function fr(e,t){So[Co++]=Xc,So[Co++]=Wf,Wf=e,Xc=t}function X6(e,t,n){as[is++]=Ys,as[is++]=Qs,as[is++]=ka,ka=e;var s=Ys;e=Qs;var r=32-Wn(s)-1;s&=~(1<<r),n+=1;var a=32-Wn(t)+r;if(30<a){var i=r-r%5;a=(s&(1<<i)-1).toString(32),s>>=i,r-=i,Ys=1<<32-Wn(t)+r|n<<r|s,Qs=a+e}else Ys=1<<a|n<<r|s,Qs=e}function cx(e){e.return!==null&&(fr(e,1),X6(e,1,0))}function ay(e){for(;e===Wf;)Wf=So[--Co],So[Co]=null,Xc=So[--Co],So[Co]=null;for(;e===ka;)ka=as[--is],as[is]=null,Qs=as[--is],as[is]=null,Ys=as[--is],as[is]=null}function Z6(e,t){as[is++]=Ys,as[is++]=Qs,as[is++]=ka,Ys=t.id,Qs=t.overflow,ka=e}var Lt=null,Ye=null,Se=!1,la=null,cs=!1,ng=Error(W(519));function ba(e){var t=Error(W(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zc(ls(t,e)),ng}function Nv(e){var t=e.stateNode,n=e.type,s=e.memoizedProps;switch(t[Vt]=e,t[zn]=s,n){case"dialog":Ee("cancel",t),Ee("close",t);break;case"iframe":case"object":case"embed":Ee("load",t);break;case"video":case"audio":for(n=0;n<eu.length;n++)Ee(eu[n],t);break;case"source":Ee("error",t);break;case"img":case"image":case"link":Ee("error",t),Ee("load",t);break;case"details":Ee("toggle",t);break;case"input":Ee("invalid",t),$6(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ee("invalid",t);break;case"textarea":Ee("invalid",t),T6(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||A8(t.textContent,n)?(s.popover!=null&&(Ee("beforetoggle",t),Ee("toggle",t)),s.onScroll!=null&&Ee("scroll",t),s.onScrollEnd!=null&&Ee("scrollend",t),s.onClick!=null&&(t.onclick=Zs),t=!0):t=!1,t||ba(e,!0)}function Kf(e){for(Lt=e.return;Lt;)switch(Lt.tag){case 5:case 31:case 13:cs=!1;return;case 27:case 3:cs=!0;return;default:Lt=Lt.return}}function ro(e){if(e!==Lt)return!1;if(!Se)return Kf(e),Se=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||qg(e.type,e.memoizedProps)),n=!n),n&&Ye&&ba(e),Kf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));Ye=S2(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(317));Ye=S2(e)}else t===27?(t=Ye,Ta(e.type)?(e=Fg,Fg=null,Ye=e):Ye=t):Ye=Lt?ds(e.stateNode.nextSibling):null;return!0}function mi(){Ye=Lt=null,Se=!1}function R1(){var e=la;return e!==null&&(wn===null?wn=e:wn.push.apply(wn,e),la=null),e}function Zc(e){la===null?la=[e]:la.push(e)}var sg=rr(null),Ui=null,yr=null;function sa(e,t,n){Je(sg,t._currentValue),t._currentValue=n}function jr(e){e._currentValue=sg.current,Kt(sg)}function ef(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 rg(e,t,n,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var a=r.dependencies;if(a!==null){var i=r.child;a=a.firstContext;e:for(;a!==null;){var o=a;a=r;for(var c=0;c<t.length;c++)if(o.context===t[c]){a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),ef(a.return,n,e),s||(i=null);break e}a=o.next}}else if(r.tag===18){if(i=r.return,i===null)throw Error(W(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),ef(i,n,e),i=null}else r.tag===13&&r.memoizedState!==null&&r.memoizedState.dehydrated===null?(r.lanes|=n,i=r.alternate,i!==null&&(i.lanes|=n),ef(r.return,n,e),i=r.child,i=i!==null?i.sibling:null):i=r.child;if(i!==null)i.return=r;else for(i=r;i!==null;){if(i===e){i=null;break}if(r=i.sibling,r!==null){r.return=i.return,i=r;break}i=i.return}r=i}}function yi(e,t,n,s){e=null;for(var r=t,a=!1;r!==null;){if(!a){if(r.flags&524288)a=!0;else if(r.flags&262144)break}if(r.tag===10){var i=r.alternate;if(i===null)throw Error(W(387));if(i=i.memoizedProps,i!==null){var o=r.type;Xn(r.pendingProps.value,i.value)||(e!==null?e.push(o):e=[o])}}else if(r===qf.current){if(i=r.alternate,i===null)throw Error(W(387));i.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(gl):e=[gl])}r=r.return}return e!==null&&rg(t,e,n,s),t.flags|=262144,e!==null}function Xf(e){for(e=e.firstContext;e!==null;){if(!Xn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ki(e){Ui=e,yr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Wt(e){return Y6(Ui,e)}function wd(e,t){return Ui===null&&ki(e),Y6(e,t)}function Y6(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},yr===null){if(e===null)throw Error(W(308));yr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else yr=yr.next=t;return n}var qD=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()})}},HD=Ct.unstable_scheduleCallback,PD=Ct.unstable_NormalPriority,yt={$$typeof:Xs,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function iy(){return{controller:new qD,data:new Map,refCount:0}}function Au(e){e.refCount--,e.refCount===0&&HD(PD,function(){e.controller.abort()})}function Mv(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 hc=null;function UD(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var wc=null,ag=0,bi=0,Io=null;function FD(e,t){if(wc===null){var n=wc=[];ag=0,bi=Iy(),Io={status:"pending",value:void 0,then:function(s){n.push(s)}}}return ag++,t.then(Av,Av),t}function Av(){if(--ag===0&&(hc=null,wc!==null)){Io!==null&&(Io.status="fulfilled");var e=wc;wc=null,bi=0,Io=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function GD(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 Rv=ge.S;ge.S=function(e,t){if(p8=Gn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&FD(e,t),hc!==null)for(var n=hl;n!==null;)Mv(n,hc),n=n.next;if(n=e.types,n!==null){for(var s=hl;s!==null;)Mv(s,n),s=s.next;if(bi!==0){s=hc,s===null&&(s=hc=[]);for(var r=0;r<n.length;r++){var a=n[r];s.indexOf(a)===-1&&s.push(a)}}}Rv!==null&&Rv(e,t)};var di=rr(null);function oy(){var e=di.current;return e!==null?e:Ke.pooledCache}function tf(e,t){t===null?Je(di,di.current):Je(di,t.pool)}function Q6(){var e=oy();return e===null?null:{parent:yt._currentValue,pool:e}}var _l=Error(W(460)),ly=Error(W(474)),ux=Error(W(542)),Zf={then:function(){}};function Iv(e){return e=e.status,e==="fulfilled"||e==="rejected"}function J6(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Zs,Zs),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Dv(e),e===void 0&&!("reason"in t)?Error(W(600)):e;default:if(typeof t.status=="string")t.then(Zs,Zs);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(W(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,Dv(e),e}throw fi=t,_l}}function Ua(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(fi=n,_l):n}}var fi=null;function _v(){if(fi===null)throw Error(W(459));var e=fi;return fi=null,e}function Dv(e){if(e===_l||e===ux)throw Error(W(483))}var _o=null,Yc=0;function jd(e){var t=Yc;return Yc+=1,_o===null&&(_o=[]),J6(_o,e,t)}function Ur(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Sd(e,t){throw t.$$typeof===C_?Error(W(525)):(e=Object.prototype.toString.call(t),Error(W(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ej(e){function t(g,k){if(e){var v=g.deletions;v===null?(g.deletions=[k],g.flags|=16):v.push(k)}}function n(g,k){if(!e)return null;for(;k!==null;)t(g,k),k=k.sibling;return null}function s(g){for(var k=new Map;g!==null;)g.key===null?k.set(g.index,g):k.set(g.key,g),g=g.sibling;return k}function r(g,k){return g=wr(g,k),g.index=0,g.sibling=null,g}function a(g,k,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<k?(g.flags|=2,k):v):(g.flags|=134217730,k)):(g.flags|=1048576,k)}function i(g){return e&&g.alternate===null&&(g.flags|=134217730),g}function o(g,k,v,w){return k===null||k.tag!==6?(k=M1(v,g.mode,w),k.return=g,k):(k=r(k,v),k.return=g,k)}function c(g,k,v,w){var j=v.type;return j===go?(g=d(g,k,v.props.children,w,v.key),Ur(g,v),g):k!==null&&(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Xr&&Ua(j)===k.type)?(k=r(k,v.props),Ur(k,v),k.return=g,k):(k=Jd(v.type,v.key,v.props,null,g.mode,w),Ur(k,v),k.return=g,k)}function u(g,k,v,w){return k===null||k.tag!==4||k.stateNode.containerInfo!==v.containerInfo||k.stateNode.implementation!==v.implementation?(k=A1(v,g.mode,w),k.return=g,k):(k=r(k,v.children||[]),k.return=g,k)}function d(g,k,v,w,j){return k===null||k.tag!==7?(k=ui(v,g.mode,w,j),k.return=g,k):(k=r(k,v),k.return=g,k)}function f(g,k,v){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=M1(""+k,g.mode,v),k.return=g,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case gd:return v=Jd(k.type,k.key,k.props,null,g.mode,v),Ur(v,k),v.return=g,v;case uc:return k=A1(k,g.mode,v),k.return=g,k;case Xr:return k=Ua(k),f(g,k,v)}if(dc(k)||Jl(k))return k=ui(k,g.mode,v,null),k.return=g,k;if(typeof k.then=="function")return f(g,jd(k),v);if(k.$$typeof===Xs)return f(g,wd(g,k),v);Sd(g,k)}return null}function h(g,k,v,w){var j=k!==null?k.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return j!==null?null:o(g,k,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case gd:return v.key===j?c(g,k,v,w):null;case uc:return v.key===j?u(g,k,v,w):null;case Xr:return v=Ua(v),h(g,k,v,w)}if(dc(v)||Jl(v))return j!==null?null:d(g,k,v,w,null);if(typeof v.then=="function")return h(g,k,jd(v),w);if(v.$$typeof===Xs)return h(g,k,wd(g,v),w);Sd(g,v)}return null}function p(g,k,v,w,j){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return g=g.get(v)||null,o(k,g,""+w,j);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case gd:return g=g.get(w.key===null?v:w.key)||null,c(k,g,w,j);case uc:return g=g.get(w.key===null?v:w.key)||null,u(k,g,w,j);case Xr:return w=Ua(w),p(g,k,v,w,j)}if(dc(w)||Jl(w))return g=g.get(v)||null,d(k,g,w,j,null);if(typeof w.then=="function")return p(g,k,v,jd(w),j);if(w.$$typeof===Xs)return p(g,k,v,wd(k,w),j);Sd(k,w)}return null}function m(g,k,v,w){for(var j=null,C=null,$=k,E=k=0,T=null;$!==null&&E<v.length;E++){$.index>E?(T=$,$=null):T=$.sibling;var S=h(g,$,v[E],w);if(S===null){$===null&&($=T);break}e&&$&&S.alternate===null&&t(g,$),k=a(S,k,E),C===null?j=S:C.sibling=S,C=S,$=T}if(E===v.length)return n(g,$),Se&&fr(g,E),j;if($===null){for(;E<v.length;E++)$=f(g,v[E],w),$!==null&&(k=a($,k,E),C===null?j=$:C.sibling=$,C=$);return Se&&fr(g,E),j}for($=s($);E<v.length;E++)T=p($,g,E,v[E],w),T!==null&&(e&&(S=T.alternate,S!==null&&$.delete(S.key===null?E:S.key)),k=a(T,k,E),C===null?j=T:C.sibling=T,C=T);return e&&$.forEach(function(M){return t(g,M)}),Se&&fr(g,E),j}function b(g,k,v,w){if(v==null)throw Error(W(151));for(var j=null,C=null,$=k,E=k=0,T=null,S=v.next();$!==null&&!S.done;E++,S=v.next()){$.index>E?(T=$,$=null):T=$.sibling;var M=h(g,$,S.value,w);if(M===null){$===null&&($=T);break}e&&$&&M.alternate===null&&t(g,$),k=a(M,k,E),C===null?j=M:C.sibling=M,C=M,$=T}if(S.done)return n(g,$),Se&&fr(g,E),j;if($===null){for(;!S.done;E++,S=v.next())S=f(g,S.value,w),S!==null&&(k=a(S,k,E),C===null?j=S:C.sibling=S,C=S);return Se&&fr(g,E),j}for($=s($);!S.done;E++,S=v.next())S=p($,g,E,S.value,w),S!==null&&(e&&(T=S.alternate,T!==null&&$.delete(T.key===null?E:T.key)),k=a(S,k,E),C===null?j=S:C.sibling=S,C=S);return e&&$.forEach(function(z){return t(g,z)}),Se&&fr(g,E),j}function y(g,k,v,w){if(typeof v=="object"&&v!==null&&v.type===go&&v.key===null&&v.props.ref===void 0&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case gd:e:{for(var j=v.key;k!==null;){if(k.key===j){if(j=v.type,j===go){if(k.tag===7){n(g,k.sibling),w=r(k,v.props.children),Ur(w,v),w.return=g,g=w;break e}}else if(k.elementType===j||typeof j=="object"&&j!==null&&j.$$typeof===Xr&&Ua(j)===k.type){n(g,k.sibling),w=r(k,v.props),Ur(w,v),w.return=g,g=w;break e}n(g,k);break}else t(g,k);k=k.sibling}v.type===go?(w=ui(v.props.children,g.mode,w,v.key),Ur(w,v),w.return=g,g=w):(w=Jd(v.type,v.key,v.props,null,g.mode,w),Ur(w,v),w.return=g,g=w)}return i(g);case uc:e:{for(j=v.key;k!==null;){if(k.key===j)if(k.tag===4&&k.stateNode.containerInfo===v.containerInfo&&k.stateNode.implementation===v.implementation){n(g,k.sibling),w=r(k,v.children||[]),w.return=g,g=w;break e}else{n(g,k);break}else t(g,k);k=k.sibling}w=A1(v,g.mode,w),w.return=g,g=w}return i(g);case Xr:return v=Ua(v),y(g,k,v,w)}if(dc(v))return m(g,k,v,w);if(Jl(v)){if(j=Jl(v),typeof j!="function")throw Error(W(150));return v=j.call(v),b(g,k,v,w)}if(typeof v.then=="function")return y(g,k,jd(v),w);if(v.$$typeof===Xs)return y(g,k,wd(g,v),w);Sd(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,k!==null&&k.tag===6?(n(g,k.sibling),w=r(k,v),w.return=g,g=w):(n(g,k),w=M1(v,g.mode,w),w.return=g,g=w),i(g)):n(g,k)}return function(g,k,v,w){try{Yc=0;var j=y(g,k,v,w);return _o=null,j}catch($){if($===_l||$===ux)throw $;var C=Cn(29,$,null,g.mode);return C.lanes=w,C.return=g,C}finally{}}}var vi=ej(!0),tj=ej(!1),Zr=!1;function cy(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ig(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 ca(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ua(e,t,n){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,_e&2){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Vf(e),V6(e,null,n),t}return lx(e,s,t,n),Vf(e)}function jc(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,y6(e,n)}}function I1(e,t){var n=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,n===s)){var r=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var i={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?r=a=i:a=a.next=i,n=n.next}while(n!==null);a===null?r=a=t:a=a.next=t}else r=a=t;n={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:a,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 og=!1;function Sc(){if(og){var e=Io;if(e!==null)throw e}}function Cc(e,t,n,s){og=!1;var r=e.updateQueue;Zr=!1;var a=r.firstBaseUpdate,i=r.lastBaseUpdate,o=r.shared.pending;if(o!==null){r.shared.pending=null;var c=o,u=c.next;c.next=null,i===null?a=u:i.next=u,i=c;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==i&&(o===null?d.firstBaseUpdate=u:o.next=u,d.lastBaseUpdate=c))}if(a!==null){var f=r.baseState;i=0,d=u=c=null,o=a;do{var h=o.lane&-536870913,p=h!==o.lane;if(p?(Ne&h)===h:(s&h)===h){h!==0&&h===bi&&(og=!0),d!==null&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,b=o;h=t;var y=n;switch(b.tag){case 1:if(m=b.payload,typeof m=="function"){f=m.call(y,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=b.payload,h=typeof m=="function"?m.call(y,f,h):m,h==null)break e;f=Xe({},f,h);break e;case 2:Zr=!0}}h=o.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=r.callbacks,p===null?r.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(u=d=p,c=f):d=d.next=p,i|=h;if(o=o.next,o===null){if(o=r.shared.pending,o===null)break;p=o,o=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(!0);d===null&&(c=f),r.baseState=c,r.firstBaseUpdate=u,r.lastBaseUpdate=d,a===null&&(r.shared.lanes=0),ja|=i,e.lanes=i,e.memoizedState=f}}function nj(e,t){if(typeof e!="function")throw Error(W(191,e));e.call(t)}function sj(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)nj(n[e],t)}var va=rr(null),Yf=rr(0);function Lv(e,t){e=Mr,Je(Yf,e),Je(va,t),Mr=e|t.baseLanes}function lg(){Je(Yf,Mr),Je(va,va.current)}function uy(){Mr=Yf.current,Kt(va),Kt(Yf)}var Yt=rr(null),tn=null;function da(e){var t=e.alternate;Je(Xt,Xt.current&1),Je(Yt,e),tn===null&&(t===null||va.current!==null||t.memoizedState!==null)&&(tn=e)}function cg(e){Je(Xt,Xt.current),Je(Yt,e),tn===null&&(tn=e)}function rj(e){e.tag===22?(Je(Xt,Xt.current),Je(Yt,e),tn===null&&(tn=e)):fa()}function fa(){Je(Xt,Xt.current),Je(Yt,Yt.current)}function Bn(e){Kt(Yt),tn===e&&(tn=null),Kt(Xt)}var Xt=rr(0);function Qc(e,t){Je(Yt,Yt.current),Je(Xt,t)}function dy(e){Kt(Xt),Kt(Yt),tn===e&&(tn=null)}function Qf(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ug(n)||Oy(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 Tr=0,we=null,Fe=null,mt=null,Jf=!1,Do=!1,wi=!1,eh=0,Jc=0,Lo=null,VD=0;function ft(){throw Error(W(321))}function fy(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Xn(e[n],t[n]))return!1;return!0}function hy(e,t,n,s,r,a){return Tr=a,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ge.H=e===null||e.memoizedState===null?_j:Dj,wi=!1,a=n(s,r),wi=!1,Do&&(a=ij(t,n,s,r)),aj(e),a}function aj(e){ge.H=th;var t=Fe!==null&&Fe.next!==null;if(Tr=0,mt=Fe=we=null,Jf=!1,Jc=0,Lo=null,t)throw Error(W(300));e===null||bt||(e=e.dependencies,e!==null&&Xf(e)&&(bt=!0))}function ij(e,t,n,s){we=e;var r=0;do{if(Do&&(Lo=null),Jc=0,Do=!1,25<=r)throw Error(W(301));if(r+=1,mt=Fe=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}ge.H=eL,a=t(n,s)}while(Do);return a}function WD(){var e=ge.H,t=e.useState()[0];return t=typeof t.then=="function"?Ru(t):t,e=e.useState()[0],(Fe!==null?Fe.memoizedState:null)!==e&&(we.flags|=1024),t}function xy(){var e=eh!==0;return eh=0,e}function py(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function gy(e){if(Jf){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Jf=!1}Tr=0,mt=Fe=we=null,Do=!1,Jc=eh=0,Lo=null}function xn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?we.memoizedState=mt=e:mt=mt.next=e,mt}function gt(){if(Fe===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=mt===null?we.memoizedState:mt.next;if(t!==null)mt=t,Fe=e;else{if(e===null)throw we.alternate===null?Error(W(467)):Error(W(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},mt===null?we.memoizedState=mt=e:mt=mt.next=e}return mt}function dx(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ru(e){var t=Jc;return Jc+=1,Lo===null&&(Lo=[]),e=J6(Lo,e,t),t=we,(mt===null?t.memoizedState:mt.next)===null&&(t=t.alternate,ge.H=t===null||t.memoizedState===null?_j:Dj),e}function fx(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ru(e);if(e.$$typeof===T_)return;if(e.$$typeof===Xs)return Wt(e)}throw Error(W(438,String(e)))}function my(e){var t=null,n=we.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var s=we.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=dx(),we.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]=E_;return t.index++,n}function zr(e,t){return typeof t=="function"?t(e):t}function nf(e){var t=gt();return yy(t,Fe,e)}function yy(e,t,n){var s=e.queue;if(s===null)throw Error(W(311));s.lastRenderedReducer=n;var r=e.baseQueue,a=s.pending;if(a!==null){if(r!==null){var i=r.next;r.next=a.next,a.next=i}t.baseQueue=r=a,s.pending=null}if(a=e.baseState,r===null)e.memoizedState=a;else{t=r.next;var o=i=null,c=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f!==u.lane?(Ne&f)===f:(Tr&f)===f){var h=u.revertLane;if(h===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===bi&&(d=!0);else if((Tr&h)===h){u=u.next,h===bi&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=f,i=a):c=c.next=f,we.lanes|=h,ja|=h;f=u.action,wi&&n(a,f),a=u.hasEagerState?u.eagerState:n(a,f)}else h={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(o=c=h,i=a):c=c.next=h,we.lanes|=f,ja|=f;u=u.next}while(u!==null&&u!==t);if(c===null?i=a:c.next=o,!Xn(a,e.memoizedState)&&(bt=!0,d&&(n=Io,n!==null)))throw n;e.memoizedState=a,e.baseState=i,e.baseQueue=c,s.lastRenderedState=a}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function _1(e){var t=gt(),n=t.queue;if(n===null)throw Error(W(311));n.lastRenderedReducer=e;var s=n.dispatch,r=n.pending,a=t.memoizedState;if(r!==null){n.pending=null;var i=r=r.next;do a=e(a,i.action),i=i.next;while(i!==r);Xn(a,t.memoizedState)||(bt=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,s]}function oj(e,t,n){var s=we,r=gt(),a=Se;if(a){if(n===void 0)throw Error(W(407));n=n()}else n=t();var i=!Xn((Fe||r).memoizedState,n);if(i&&(r.memoizedState=n,bt=!0),r=r.queue,ky(uj.bind(null,s,r,e),[e]),e=r.getSnapshot!==t||i||mt!==null&&(mt.memoizedState.tag&1)!==0,cl(e?9:8,{destroy:void 0},cj.bind(null,s,r,n,t),null),e){if(s.flags|=2048,Ke===null)throw Error(W(349));a||Tr&127||lj(s,t,n)}return n}function lj(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=we.updateQueue,t===null?(t=dx(),we.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function cj(e,t,n,s){t.value=n,t.getSnapshot=s,dj(t)&&fj(e)}function uj(e,t,n){return n(function(){dj(t)&&fj(e)})}function dj(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Xn(e,n)}catch{return!0}}function fj(e){var t=Pi(e,2);t!==null&&$n(t,e,2)}function ug(e){var t=xn();if(typeof e=="function"){var n=e;if(e=n(),wi){ta(!0);try{n()}finally{ta(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:e},t}function hj(e,t,n,s){return e.baseState=n,yy(e,Fe,typeof s=="function"?s:zr)}function KD(e,t,n,s,r){if(xx(e))throw Error(W(485));if(e=t.action,e!==null){var a={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){a.listeners.push(i)}};ge.T!==null?n(!0):a.isTransition=!1,s(a),n=t.pending,n===null?(a.next=t.pending=a,xj(t,a)):(a.next=n.next,t.pending=n.next=a)}}function xj(e,t){var n=t.action,s=t.payload,r=e.state;if(t.isTransition){var a=ge.T,i={};i.types=a!==null?a.types:null,ge.T=i;try{var o=n(r,s),c=ge.S;c!==null&&c(i,o),Ov(e,t,o)}catch(u){dg(e,t,u)}finally{a!==null&&i.types!==null&&(a.types=i.types),ge.T=a}}else try{a=n(r,s),Ov(e,t,a)}catch(u){dg(e,t,u)}}function Ov(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(s){Bv(e,t,s)},function(s){return dg(e,t,s)}):Bv(e,t,n)}function Bv(e,t,n){t.status="fulfilled",t.value=n,pj(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,xj(e,n)))}function dg(e,t,n){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=n,pj(t),t=t.next;while(t!==s)}e.action=null}function pj(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gj(e,t){return t}function qv(e,t){if(Se){var n=Ke.formState;if(n!==null){e:{var s=we;if(Se){if(Ye){t:{for(var r=Ye,a=cs;r.nodeType!==8;){if(!a){r=null;break t}if(r=ds(r.nextSibling),r===null){r=null;break t}}a=r.data,r=a==="F!"||a==="F"?r:null}if(r){Ye=ds(r.nextSibling),s=r.data==="F!";break e}}ba(s)}s=!1}s&&(t=n[0])}}return n=xn(),n.memoizedState=n.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gj,lastRenderedState:t},n.queue=s,n=Aj.bind(null,we,s),s.dispatch=n,s=ug(!1),a=jy.bind(null,we,!1,s.queue),s=xn(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,n=KD.bind(null,we,r,a,n),r.dispatch=n,s.memoizedState=e,[t,n,!1]}function Hv(e){var t=gt();return mj(t,Fe,e)}function mj(e,t,n){if(t=yy(e,t,gj)[0],e=nf(zr)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Ru(t)}catch(i){throw i===_l?ux:i}else s=t;t=gt();var r=t.queue,a=r.dispatch;return n!==t.memoizedState&&(we.flags|=2048,cl(9,{destroy:void 0},XD.bind(null,r,n),null)),[s,a,e]}function XD(e,t){e.action=t}function Pv(e){var t=gt(),n=Fe;if(n!==null)return mj(t,n,e);gt(),t=t.memoizedState,n=gt();var s=n.queue.dispatch;return n.memoizedState=e,[t,s,!1]}function cl(e,t,n,s){return e={tag:e,create:n,deps:s,inst:t,next:null},t=we.updateQueue,t===null&&(t=dx(),we.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 yj(){return gt().memoizedState}function sf(e,t,n,s){var r=xn();we.flags|=e,r.memoizedState=cl(1|t,{destroy:void 0},n,s===void 0?null:s)}function hx(e,t,n,s){var r=gt();s=s===void 0?null:s;var a=r.memoizedState.inst;Fe!==null&&s!==null&&fy(s,Fe.memoizedState.deps)?r.memoizedState=cl(t,a,n,s):(we.flags|=e,r.memoizedState=cl(1|t,a,n,s))}function Uv(e,t){sf(8390656,8,e,t)}function ky(e,t){hx(2048,8,e,t)}function ZD(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=dx(),we.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function kj(e){var t=gt().memoizedState;return ZD({ref:t,nextImpl:e}),function(){if(_e&2)throw Error(W(440));return t.impl.apply(void 0,arguments)}}function bj(e,t){return hx(4,2,e,t)}function vj(e,t){return hx(4,4,e,t)}function wj(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 jj(e,t,n){n=n!=null?n.concat([e]):null,hx(4,4,wj.bind(null,t,e),n)}function by(){}function Sj(e,t){var n=gt();t=t===void 0?null:t;var s=n.memoizedState;return t!==null&&fy(t,s[1])?s[0]:(n.memoizedState=[e,t],e)}function Cj(e,t){var n=gt();t=t===void 0?null:t;var s=n.memoizedState;if(t!==null&&fy(t,s[1]))return s[0];if(s=e(),wi){ta(!0);try{e()}finally{ta(!1)}}return n.memoizedState=[s,t],s}function vy(e,t,n){return n===void 0||Tr&1073741824&&!(Ne&261930)?e.memoizedState=t:(e.memoizedState=n,e=m8(),we.lanes|=e,ja|=e,n)}function $j(e,t,n,s){return Xn(n,t)?n:va.current!==null?(e=vy(e,n,s),Xn(e,t)||(bt=!0),e):!(Tr&106)||Tr&1073741824&&!(Ne&261930)?(bt=!0,e.memoizedState=n):(e=m8(),we.lanes|=e,ja|=e,t)}function Ej(e,t,n,s,r){var a=De.p;De.p=a!==0&&8>a?a:8;var i=ge.T,o={};o.types=i!==null?i.types:null,ge.T=o,jy(e,!1,t,n);try{var c=r(),u=ge.S;if(u!==null&&u(o,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=GD(c,s);$c(e,t,d,Kn(e))}else $c(e,t,s,Kn(e))}catch(f){$c(e,t,{then:function(){},status:"rejected",reason:f},Kn())}finally{De.p=a,i!==null&&o.types!==null&&(i.types=o.types),ge.T=i}}function YD(){}function fg(e,t,n,s){if(e.tag!==5)throw Error(W(476));var r=Tj(e).queue;Ej(e,r,t,ci,n===null?YD:function(){return zj(e),n(s)})}function Tj(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ci,baseState:ci,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:ci},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function zj(e){var t=Tj(e);t.next===null&&(t=e.alternate.memoizedState),$c(e,t.next.queue,{},Kn())}function wy(){return Wt(gl)}function Nj(){return gt().memoizedState}function Mj(){return gt().memoizedState}function QD(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Kn();e=ca(n);var s=ua(t,e,n);s!==null&&($n(s,t,n),jc(s,t,n)),t={cache:iy()},e.payload=t;return}t=t.return}}function JD(e,t,n){var s=Kn();n={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},xx(e)?Rj(t,n):(n=sy(e,t,n,s),n!==null&&($n(n,e,s),Ij(n,t,s)))}function Aj(e,t,n){var s=Kn();$c(e,t,n,s)}function $c(e,t,n,s){var r={lane:s,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(xx(e))Rj(t,r);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,o=a(i,n);if(r.hasEagerState=!0,r.eagerState=o,Xn(o,i))return lx(e,t,r,0),Ke===null&&ox(),!1}catch{}finally{}if(n=sy(e,t,r,s),n!==null)return $n(n,e,s),Ij(n,t,s),!0}return!1}function jy(e,t,n,s){if(s={lane:2,revertLane:Iy(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},xx(e)){if(t)throw Error(W(479))}else t=sy(e,n,s,2),t!==null&&$n(t,e,2)}function xx(e){var t=e.alternate;return e===we||t!==null&&t===we}function Rj(e,t){Do=Jf=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ij(e,t,n){if(n&4194048){var s=t.lanes;s&=e.pendingLanes,n|=s,t.lanes=n,y6(e,n)}}var th={readContext:Wt,use:fx,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft,useEffectEvent:ft},_j={readContext:Wt,use:fx,useCallback:function(e,t){return xn().memoizedState=[e,t===void 0?null:t],e},useContext:Wt,useEffect:Uv,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,sf(4194308,4,wj.bind(null,t,e),n)},useLayoutEffect:function(e,t){return sf(4194308,4,e,t)},useInsertionEffect:function(e,t){sf(4,2,e,t)},useMemo:function(e,t){var n=xn();t=t===void 0?null:t;var s=e();if(wi){ta(!0);try{e()}finally{ta(!1)}}return n.memoizedState=[s,t],s},useReducer:function(e,t,n){var s=xn();if(n!==void 0){var r=n(t);if(wi){ta(!0);try{n(t)}finally{ta(!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=JD.bind(null,we,e),[s.memoizedState,e]},useRef:function(e){var t=xn();return e={current:e},t.memoizedState=e},useState:function(e){e=ug(e);var t=e.queue,n=Aj.bind(null,we,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:by,useDeferredValue:function(e,t){var n=xn();return vy(n,e,t)},useTransition:function(){var e=ug(!1);return e=Ej.bind(null,we,e.queue,!0,!1),xn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var s=we,r=xn();if(Se){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),Ke===null)throw Error(W(349));Ne&127||lj(s,t,n)}r.memoizedState=n;var a={value:n,getSnapshot:t};return r.queue=a,Uv(uj.bind(null,s,a,e),[e]),s.flags|=2048,cl(9,{destroy:void 0},cj.bind(null,s,a,n,t),null),n},useId:function(){var e=xn(),t=Ke.identifierPrefix;if(Se){var n=Qs,s=Ys;n=(s&~(1<<32-Wn(s)-1)).toString(32)+n,t="_"+t+"R_"+n,n=eh++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=VD++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:wy,useFormState:qv,useActionState:qv,useOptimistic:function(e){var t=xn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=jy.bind(null,we,!0,n),n.dispatch=t,[e,t]},useMemoCache:my,useCacheRefresh:function(){return xn().memoizedState=QD.bind(null,we)},useEffectEvent:function(e){var t=xn(),n={impl:e};return t.memoizedState=n,function(){if(_e&2)throw Error(W(440));return n.impl.apply(void 0,arguments)}}},Dj={readContext:Wt,use:fx,useCallback:Sj,useContext:Wt,useEffect:ky,useImperativeHandle:jj,useInsertionEffect:bj,useLayoutEffect:vj,useMemo:Cj,useReducer:nf,useRef:yj,useState:function(){return nf(zr)},useDebugValue:by,useDeferredValue:function(e,t){var n=gt();return $j(n,Fe.memoizedState,e,t)},useTransition:function(){var e=nf(zr)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Ru(e),t]},useSyncExternalStore:oj,useId:Nj,useHostTransitionStatus:wy,useFormState:Hv,useActionState:Hv,useOptimistic:function(e,t){var n=gt();return hj(n,Fe,e,t)},useMemoCache:my,useCacheRefresh:Mj,useEffectEvent:kj},eL={readContext:Wt,use:fx,useCallback:Sj,useContext:Wt,useEffect:ky,useImperativeHandle:jj,useInsertionEffect:bj,useLayoutEffect:vj,useMemo:Cj,useReducer:_1,useRef:yj,useState:function(){return _1(zr)},useDebugValue:by,useDeferredValue:function(e,t){var n=gt();return Fe===null?vy(n,e,t):$j(n,Fe.memoizedState,e,t)},useTransition:function(){var e=_1(zr)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:Ru(e),t]},useSyncExternalStore:oj,useId:Nj,useHostTransitionStatus:wy,useFormState:Pv,useActionState:Pv,useOptimistic:function(e,t){var n=gt();return Fe!==null?hj(n,Fe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:my,useCacheRefresh:Mj,useEffectEvent:kj};function D1(e,t,n,s){t=e.memoizedState,n=n(s,t),n=n==null?t:Xe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var hg={enqueueSetState:function(e,t,n){e=e._reactInternals;var s=Kn(),r=ca(s);r.payload=t,n!=null&&(r.callback=n),t=ua(e,r,s),t!==null&&($n(t,e,s),jc(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var s=Kn(),r=ca(s);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=ua(e,r,s),t!==null&&($n(t,e,s),jc(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Kn(),s=ca(n);s.tag=2,t!=null&&(s.callback=t),t=ua(e,s,n),t!==null&&($n(t,e,n),jc(t,e,n))}};function Fv(e,t,n,s,r,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,a,i):t.prototype&&t.prototype.isPureReactComponent?!Kc(n,s)||!Kc(r,a):!0}function Gv(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&&hg.enqueueReplaceState(t,t.state,null)}function ji(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=Xe({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}function Lj(e){Gf(e)}function Oj(e){console.error(e)}function Bj(e){Gf(e)}function nh(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Vv(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 xg(e,t,n){return n=ca(n),n.tag=3,n.payload={element:null},n.callback=function(){nh(e,t)},n}function qj(e){return e=ca(e),e.tag=3,e}function Hj(e,t,n,s){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var a=s.value;e.payload=function(){return r(a)},e.callback=function(){Vv(t,n,s)}}var i=n.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){Vv(t,n,s),typeof r!="function"&&(ha===null?ha=new Set([this]):ha.add(this));var o=s.stack;this.componentDidCatch(s.value,{componentStack:o!==null?o:""})})}function tL(e,t,n,s,r){if(n.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=n.alternate,t!==null&&yi(t,n,r,!0),n=Yt.current,n!==null){switch(n.tag){case 31:case 13:case 19:return tn===null?uh():n.alternate===null&&ht===0&&(ht=3),n.flags&=-257,n.flags|=65536,n.lanes=r,s===Zf?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([s]):t.add(s),U1(e,s,r)),!1;case 22:return n.flags|=65536,s===Zf?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)),U1(e,s,r)),!1}throw Error(W(435,n.tag))}return U1(e,s,r),uh(),!1}if(Se)return t=Yt.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==ng&&(e=Error(W(422),{cause:s}),Zc(ls(e,n)))):(s!==ng&&(t=Error(W(423),{cause:s}),Zc(ls(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=ls(s,n),r=xg(e.stateNode,s,r),I1(e,r),ht!==4&&(ht=2)),!1;var a=Error(W(520),{cause:s});if(a=ls(a,n),Nc===null?Nc=[a]:Nc.push(a),ht!==4&&(ht=2),t===null)return!0;s=ls(s,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=xg(n.stateNode,s,e),I1(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError=="function"||a!==null&&typeof a.componentDidCatch=="function"&&(ha===null||!ha.has(a))))return n.flags|=65536,r&=-r,n.lanes|=r,r=qj(r),Hj(r,e,n,s),I1(n,r),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Sy=Error(W(461)),bt=!1;function jt(e,t,n,s){t.child=e===null?tj(t,null,n,s):vi(t,e.child,n,s)}function Wv(e,t,n,s,r){n=n.render;var a=t.ref;if("ref"in s){var i={};for(var o in s)o!=="ref"&&(i[o]=s[o])}else i=s;return ki(t),s=hy(e,t,n,i,a,r),o=xy(),e!==null&&!bt?(py(e,t,r),Nr(e,t,r)):(Se&&o&&cx(t),t.flags|=1,jt(e,t,s,r),t.child)}function Kv(e,t,n,s,r){if(e===null){var a=n.type;return typeof a=="function"&&!ry(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Pj(e,t,a,s,r)):(e=Jd(n.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!$y(e,r)){var i=a.memoizedProps;if(n=n.compare,n=n!==null?n:Kc,n(i,s)&&e.ref===t.ref)return Nr(e,t,r)}return t.flags|=1,e=wr(a,s),e.ref=t.ref,e.return=t,t.child=e}function Pj(e,t,n,s,r){if(e!==null){var a=e.memoizedProps;if(Kc(a,s)&&e.ref===t.ref)if(bt=!1,t.pendingProps=s=a,$y(e,r))e.flags&131072&&(bt=!0);else return t.lanes=e.lanes,Nr(e,t,r)}return pg(e,t,n,s,r)}function Uj(e,t,n,s){var r=s.children,a=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(a=a!==null?a.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&~a}else s=0,t.child=null;return Xv(e,t,a,n,s)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&tf(t,a!==null?a.cachePool:null),a!==null?Lv(t,a):lg(),rj(t);else return s=t.lanes=536870912,Xv(e,t,a!==null?a.baseLanes|n:n,n,s)}else a!==null?(tf(t,a.cachePool),Lv(t,a),fa(),t.memoizedState=null):(e!==null&&tf(t,null),lg(),fa());return jt(e,t,r,n),t.child}function Ec(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Xv(e,t,n,s,r){var a=oy();return a=a===null?null:{parent:yt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&tf(t,null),lg(),rj(t),e!==null&&yi(e,t,s,!0),t.childLanes=r,null}function rf(e,t){return t=px({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Zv(e,t,n){return vi(t,e.child,null,n),e=rf(t,t.pendingProps),e.flags|=2,Bn(t),t.memoizedState=null,e}function nL(e,t,n){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Se){if(s.mode==="hidden")return e=rf(t,s),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Ec(null,e);if(cg(t),(e=Ye)?(e=P8(e,cs),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ka!==null?{id:Ys,overflow:Qs}:null,retryLane:536870912,hydrationErrors:null},n=K6(e),n.return=t,t.child=n,Lt=t,Ye=null)):e=null,e===null)throw ba(t);return t.lanes=536870912,null}return rf(t,s)}var a=e.memoizedState;if(a!==null){var i=a.dehydrated;if(cg(t),r)if(t.flags&256)t.flags&=-257,t=Zv(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(W(558));else if(bt||yi(e,t,n,!1),r=(n&e.childLanes)!==0,bt||r){if(va.current===null){if(s=Ke,s!==null&&(i=k6(s,n),i!==0&&i!==a.retryLane))throw a.retryLane=i,Pi(e,i),$n(s,e,i),Sy;uh()}t=Zv(e,t,n)}else e=a.treeContext,Ye=ds(i.nextSibling),Lt=t,Se=!0,la=null,cs=!1,e!==null&&Z6(t,e),t=rf(t,s),t.flags|=134221824;return t}return e=wr(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uo(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(W(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function pg(e,t,n,s,r){return ki(t),n=hy(e,t,n,s,void 0,r),s=xy(),e!==null&&!bt?(py(e,t,r),Nr(e,t,r)):(Se&&s&&cx(t),t.flags|=1,jt(e,t,n,r),t.child)}function Yv(e,t,n,s,r,a){return ki(t),t.updateQueue=null,n=ij(t,s,n,r),aj(e),s=xy(),e!==null&&!bt?(py(e,t,a),Nr(e,t,a)):(Se&&s&&cx(t),t.flags|=1,jt(e,t,n,a),t.child)}function Qv(e,t,n,s,r){if(ki(t),t.stateNode===null){var a=jo,i=n.contextType;typeof i=="object"&&i!==null&&(a=Wt(i)),a=new n(s,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=hg,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=s,a.state=t.memoizedState,a.refs={},cy(t),i=n.contextType,a.context=typeof i=="object"&&i!==null?Wt(i):jo,a.state=t.memoizedState,i=n.getDerivedStateFromProps,typeof i=="function"&&(D1(t,n,i,s),a.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(i=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),i!==a.state&&hg.enqueueReplaceState(a,a.state,null),Cc(t,s,a,r),Sc(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){a=t.stateNode;var o=t.memoizedProps,c=ji(n,o);a.props=c;var u=a.context,d=n.contextType;i=jo,typeof d=="object"&&d!==null&&(i=Wt(d));var f=n.getDerivedStateFromProps;d=typeof f=="function"||typeof a.getSnapshotBeforeUpdate=="function",o=t.pendingProps!==o,d||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(o||u!==i)&&Gv(t,a,s,i),Zr=!1;var h=t.memoizedState;a.state=h,Cc(t,s,a,r),Sc(),u=t.memoizedState,o||h!==u||Zr?(typeof f=="function"&&(D1(t,n,f,s),u=t.memoizedState),(c=Zr||Fv(t,n,c,s,h,u,i))?(d||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount=="function"&&(t.flags|=4194308)):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=u),a.props=s,a.state=u,a.context=i,s=c):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{a=t.stateNode,ig(e,t),i=t.memoizedProps,d=ji(n,i),a.props=d,f=t.pendingProps,h=a.context,u=n.contextType,c=jo,typeof u=="object"&&u!==null&&(c=Wt(u)),o=n.getDerivedStateFromProps,(u=typeof o=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(i!==f||h!==c)&&Gv(t,a,s,c),Zr=!1,h=t.memoizedState,a.state=h,Cc(t,s,a,r),Sc();var p=t.memoizedState;i!==f||h!==p||Zr||e!==null&&e.dependencies!==null&&Xf(e.dependencies)?(typeof o=="function"&&(D1(t,n,o,s),p=t.memoizedState),(d=Zr||Fv(t,n,d,s,h,p,c)||e!==null&&e.dependencies!==null&&Xf(e.dependencies))?(u||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(s,p,c),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(s,p,c)),typeof a.componentDidUpdate=="function"&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof a.componentDidUpdate!="function"||i===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=p),a.props=s,a.state=p,a.context=c,s=d):(typeof a.componentDidUpdate!="function"||i===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),s=!1)}return a=s,uo(e,t),s=(t.flags&128)!==0,a||s?(a=t.stateNode,n=s&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&s?(t.child=vi(t,e.child,null,r),t.child=vi(t,null,n,r)):jt(e,t,n,r),t.memoizedState=a.state,e=t.child):e=Nr(e,t,r),e}function Jv(e,t,n,s){return mi(),t.flags|=256,jt(e,t,n,s),t.child}var gg={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function mg(e){return{baseLanes:e,cachePool:Q6()}}function yg(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Hn),e}function Fj(e,t,n){var s=t.pendingProps,r=!1,a=(t.flags&128)!==0,i;if((i=a)||(i=e!==null&&e.memoizedState===null?!1:(Xt.current&2)!==0),i&&(r=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(Se){if(r?da(t):fa(),(e=Ye)?(e=P8(e,cs),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ka!==null?{id:Ys,overflow:Qs}:null,retryLane:536870912,hydrationErrors:null},n=K6(e),n.return=t,t.child=n,Lt=t,Ye=null)):e=null,e===null)throw ba(t);return Oy(e)?t.lanes=32:t.lanes=536870912,null}return a=s.children,s=s.fallback,r?(fa(),r=t.mode,a=px({mode:"hidden",children:a},r),s=ui(s,r,n,null),a.return=t,s.return=t,a.sibling=s,t.child=a,s=t.child,s.memoizedState=mg(n),s.childLanes=yg(e,i,n),t.memoizedState=gg,Ec(null,s)):(da(t),Cy(t,a))}var o=e.memoizedState;if(o!==null){var c=o.dehydrated;if(c!==null)return sL(e,t,a,i,s,c,o,n)}return r?(fa(),r=s.fallback,a=t.mode,o=e.child,c=o.sibling,s=wr(o,{mode:"hidden",children:s.children}),s.subtreeFlags=o.subtreeFlags&1206910976,c!==null?r=wr(c,r):(r=ui(r,a,n,null),r.flags|=2),r.return=t,s.return=t,s.sibling=r,t.child=s,Ec(null,s),s=t.child,r=e.child.memoizedState,r===null?r=mg(n):(a=r.cachePool,a!==null?(o=yt._currentValue,a=a.parent!==o?{parent:o,pool:o}:a):a=Q6(),r={baseLanes:r.baseLanes|n,cachePool:a}),s.memoizedState=r,s.childLanes=yg(e,i,n),t.memoizedState=gg,Ec(e.child,s)):(da(t),n=e.child,e=n.sibling,n=wr(n,{mode:"visible",children:s.children}),n.return=t,n.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=n,t.memoizedState=null,n)}function Cy(e,t){return t=px({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function px(e,t){return e=Cn(22,e,null,t),e.lanes=0,e}function Cd(e,t,n){return vi(t,e.child,null,n),e=Cy(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function sL(e,t,n,s,r,a,i,o){if(n)return t.flags&256?(da(t),t.flags&=-257,Cd(e,t,o)):t.memoizedState!==null?(fa(),t.child=e.child,t.flags|=128,null):(fa(),a=r.fallback,i=t.mode,r=px({mode:"visible",children:r.children},i),a=ui(a,i,o,null),a.flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,vi(t,e.child,null,o),r=t.child,r.memoizedState=mg(o),r.childLanes=yg(e,s,o),t.memoizedState=gg,Ec(null,r));if(da(t),Oy(a)){if(s=a.nextSibling&&a.nextSibling.dataset,s)var c=s.dgst;return s=c,s!==""&&(r=Error(W(419)),r.stack="",r.digest=s,Zc({value:r,source:null,stack:null})),Cd(e,t,o)}if(bt||yi(e,t,o,!1),s=(o&e.childLanes)!==0,bt||s){if(va.current!==null)return Cd(e,t,o);if(s=Ke,s!==null&&(r=k6(s,o),r!==0&&r!==i.retryLane))throw i.retryLane=r,Pi(e,r),$n(s,e,r),Sy;return Ug(a)||uh(),Cd(e,t,o)}return Ug(a)?(t.flags|=192,t.child=e.child,null):(e=i.treeContext,Ye=ds(a.nextSibling),Lt=t,Se=!0,la=null,cs=!1,e!==null&&Z6(t,e),t=Cy(t,r.children),t.flags|=134221824,t)}function e2(e,t,n){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ef(e.return,t,n)}function t2(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Qf(n)===null&&(t=e),e=e.sibling}return t}function $d(e,t,n,s,r,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:n,tailMode:r,treeForkCount:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=s,i.tail=n,i.tailMode=r,i.treeForkCount=a)}function L1(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 kg(e,t,n){var s=t.pendingProps,r=s.revealOrder,a=s.tail;s=s.children;var i=Xt.current;if(t.flags&128)return Qc(t,i),null;var o=(i&2)!==0;if(o?(i=i&1|2,t.flags|=128):i&=1,Qc(t,i),r==="backwards"&&e!==null?(L1(e),jt(e,t,s,n),L1(e)):jt(e,t,s,n),s=Se?Xc:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&e2(e,n,t);else if(e.tag===19)e2(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=t2(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null,L1(t)),$d(t,!0,r,null,a,s);break;case"unstable_legacy-backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Qf(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}$d(t,!0,n,null,a,s);break;case"together":$d(t,!1,null,null,void 0,s);break;case"independent":t.memoizedState=null;break;default:n=t2(t.child),n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),$d(t,!1,r,n,a,s)}return t.child}function n2(e,t,n){var s=t.pendingProps;return sa(t,t.type,s.value),jt(e,t,s.children,n),t.child}function Nr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ja|=t.lanes,!(n&t.childLanes))if(e!==null){if(yi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(W(153));if(t.child!==null){for(e=t.child,n=wr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function $y(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Xf(e)))}function rL(e,t,n){switch(t.tag){case 3:Hf(t,t.stateNode.containerInfo),sa(t,yt,e.memoizedState.cache),mi();break;case 27:case 5:Vp(t);break;case 4:Hf(t,t.stateNode.containerInfo);break;case 10:sa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cg(t),null;break;case 13:var s=t.memoizedState;if(s!==null){if(s.dehydrated!==null)return da(t),t.flags|=128,null;s=yi(e,t,n,!1);var r=t.child.childLanes;return s||n&r?Fj(e,t,n):(da(t),e=Nr(e,t,n),e!==null?e.sibling:null)}da(t);break;case 19:if(t.flags&128)return kg(e,t,n);if(r=(e.flags&128)!==0,s=(n&t.childLanes)!==0,s||(yi(e,t,n,!1),s=(n&t.childLanes)!==0),r){if(s)return kg(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Qc(t,Xt.current),s)break;return null;case 22:return t.lanes=0,Uj(e,t,n,t.pendingProps);case 24:sa(t,yt,e.memoizedState.cache)}return Nr(e,t,n)}function Gj(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)bt=!0;else{if(!$y(e,n)&&!(t.flags&128))return bt=!1,rL(e,t,n);bt=!!(e.flags&131072)}else bt=!1,Se&&t.flags&1048576&&X6(t,Xc,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Ua(t.elementType),t.type=e,typeof e=="function")ry(e)?(s=ji(e,s),t.tag=1,t=Qv(null,t,e,s,n)):(t.tag=0,t=pg(null,t,e,s,n));else{if(e!=null){var r=e.$$typeof;if(r===G0){t.tag=11,t=Wv(null,t,e,s,n);break e}else if(r===V0){t.tag=14,t=Kv(null,t,e,s,n);break e}else if(r===Xs){t.tag=10,t.type=e,t=n2(null,t,n);break e}}throw t=Fp(e)||e,Error(W(306,t,""))}}return t;case 0:return pg(e,t,t.type,t.pendingProps,n);case 1:return s=t.type,r=ji(s,t.pendingProps),Qv(e,t,s,r,n);case 3:e:{if(Hf(t,t.stateNode.containerInfo),e===null)throw Error(W(387));s=t.pendingProps;var a=t.memoizedState;r=a.element,ig(e,t),Cc(t,s,null,n);var i=t.memoizedState;if(s=i.cache,sa(t,yt,s),s!==a.cache&&rg(t,[yt],n,!0),Sc(),s=i.element,a.isDehydrated)if(a={element:s,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Jv(e,t,s,n);break e}else if(s!==r){r=ls(Error(W(424)),t),Zc(r),t=Jv(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(Ye=ds(e.firstChild),Lt=t,Se=!0,la=null,cs=!0,n=tj(t,null,s,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(mi(),s===r){t=Nr(e,t,n);break e}jt(e,t,s,n)}t=t.child}return t;case 26:return uo(e,t),e===null?(n=E2(t.type,null,t.pendingProps,null))?t.memoizedState=n:Se||(t.stateNode=I8(t.type,t.pendingProps,oa.current,t)):t.memoizedState=E2(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Vp(t),e===null&&Se&&(s=t.stateNode=U8(t.type,t.pendingProps,oa.current),Lt=t,cs=!0,r=Ye,Ta(t.type)?(Fg=r,Ye=ds(s.firstChild)):Ye=r),jt(e,t,t.pendingProps.children,n),uo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Se&&((r=s=Ye)&&(s=QL(s,t.type,t.pendingProps,cs),s!==null?(t.stateNode=s,Lt=t,Ye=ds(s.firstChild),cs=!1,r=!0):r=!1),r||ba(t)),Vp(t),r=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,s=a.children,qg(r,a)?s=null:i!==null&&qg(r,i)&&(t.flags|=32),t.memoizedState!==null&&(r=hy(e,t,WD,null,null,n),gl._currentValue=r),uo(e,t),jt(e,t,s,n),t.child;case 6:return e===null&&Se&&((e=n=Ye)&&(n=JL(n,t.pendingProps,cs),n!==null?(t.stateNode=n,Lt=t,Ye=null,e=!0):e=!1),e||ba(t)),null;case 13:return Fj(e,t,n);case 4:return Hf(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=vi(t,null,s,n):jt(e,t,s,n),t.child;case 11:return Wv(e,t,t.type,t.pendingProps,n);case 7:return s=t.pendingProps,uo(e,t),jt(e,t,s,n),t.child;case 8:return jt(e,t,t.pendingProps.children,n),t.child;case 12:return jt(e,t,t.pendingProps.children,n),t.child;case 10:return n2(e,t,n);case 9:return r=t.type._context,s=t.pendingProps.children,ki(t),r=Wt(r),s=s(r),t.flags|=1,jt(e,t,s,n),t.child;case 14:return Kv(e,t,t.type,t.pendingProps,n);case 15:return Pj(e,t,t.type,t.pendingProps,n);case 19:return kg(e,t,n);case 31:return nL(e,t,n);case 22:return Uj(e,t,n,t.pendingProps);case 24:return ki(t),s=Wt(yt),e===null?(r=oy(),r===null&&(r=Ke,a=iy(),r.pooledCache=a,a.refCount++,a!==null&&(r.pooledCacheLanes|=n),r=a),t.memoizedState={parent:s,cache:r},cy(t),sa(t,yt,r)):(e.lanes&n&&(ig(e,t),Cc(t,null,null,n),Sc()),r=e.memoizedState,a=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),sa(t,yt,s)):(s=a.cache,sa(t,yt,s),s!==r.cache&&rg(t,[yt],n,!0))),jt(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:Se&&cx(t),e!==null&&e.memoizedProps.name!==s.name?t.flags|=4194816:uo(e,t),jt(e,t,s.children,n),t.child;case 29:throw t.pendingProps}throw Error(W(156,t.tag))}function lr(e){e.flags|=4}function O1(e,t,n,s,r){var a;if((a=(e.mode&32)!==0)&&(a=n===null?N2(t,s):N2(t,s)&&(s.src!==n.src||s.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(b8())e.flags|=8192;else throw fi=Zf,ly}else e.flags&=-16777217}function s2(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!W8(t))if(b8())e.flags|=8192;else throw fi=Zf,ly}function Ed(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?g6():536870912,e.lanes|=t,ul|=t)}function nc(e,t){if(!Se)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 Ze(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 aL(e,t,n){var s=t.pendingProps;switch(ay(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ze(t),null;case 1:return Ze(t),null;case 3:return n=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),jr(yt),il(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ro(t)?lr(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,R1())),Ze(t),null;case 26:var r=t.type,a=t.memoizedState;return e===null?(lr(t),a!==null?(Ze(t),s2(t,a)):(Ze(t),O1(t,r,null,s,n))):a?a!==e.memoizedState?(lr(t),Ze(t),s2(t,a)):(Ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&lr(t),Ze(t),O1(t,r,e,s,n)),null;case 27:if(Pf(t),n=oa.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&lr(t);else{if(!s){if(t.stateNode===null)throw Error(W(166));return Ze(t),t.subtreeFlags&=-33554433,null}e=tr.current,ro(t)?Nv(t):(e=U8(r,s,n),t.stateNode=e,lr(t))}return Ze(t),t.subtreeFlags&=-33554433,null;case 5:if(Pf(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&lr(t);else{if(!s){if(t.stateNode===null)throw Error(W(166));return Ze(t),t.subtreeFlags&=-33554433,null}if(a=tr.current,ro(t))Nv(t);else{var i=nu(oa.current);switch(a){case 1:a=i.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:a=i.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":a=i.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":a=i.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":a=i.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof s.is=="string"?i.createElement("select",{is:s.is}):i.createElement("select"),s.multiple?a.multiple=!0:s.size&&(a.size=s.size);break;default:a=typeof s.is=="string"?i.createElement(r,{is:s.is}):i.createElement(r)}}a[Vt]=t,a[zn]=s;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)a.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=a;e:switch(Zt(a,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&&lr(t)}}return Ze(t),t.subtreeFlags&=-33554433,O1(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&lr(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(W(166));if(e=oa.current,ro(t)){if(e=t.stateNode,n=t.memoizedProps,s=null,r=Lt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[Vt]=t,e=!!(e.nodeValue===n||s!==null&&s.suppressHydrationWarning===!0||A8(e.nodeValue,n)),e||ba(t,!0)}else e=nu(e).createTextNode(s),e[Vt]=t,t.stateNode=e}return Ze(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(s=ro(t),n!==null){if(e===null){if(!s)throw Error(W(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(W(557));e[Vt]=t}else mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),e=!1}else n=R1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Bn(t),t):(Bn(t),null);if(t.flags&128)throw Error(W(558))}return Ze(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ro(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(W(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(W(317));r[Vt]=t}else mi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ze(t),r=!1}else r=R1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Bn(t),t):(Bn(t),null)}return Bn(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),a=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(a=s.memoizedState.cachePool.pool),a!==r&&(s.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ed(t,t.updateQueue),Ze(t),null);case 4:return il(),e===null&&_y(t.stateNode.containerInfo),t.flags|=67108864,Ze(t),null;case 10:return jr(t.type),Ze(t),null;case 19:if(dy(t),s=t.memoizedState,s===null)return Ze(t),null;if(r=(t.flags&128)!==0,a=s.rendering,a===null)if(r)nc(s,!1);else{if(ht!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Qf(e),a!==null){for(t.flags|=128,nc(s,!1),e=a.updateQueue,t.updateQueue=e,Ed(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)W6(n,e),n=n.sibling;return Qc(t,Xt.current&1|2),Se&&fr(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Gn()>lh&&(t.flags|=128,r=!0,nc(s,!1),t.lanes=4194304)}else{if(!r)if(e=Qf(a),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Ed(t,e),nc(s,!0),s.tail===null&&s.tailMode!=="collapsed"&&s.tailMode!=="visible"&&!a.alternate&&!Se)return Ze(t),null}else 2*Gn()-s.renderingStartTime>lh&&n!==536870912&&(t.flags|=128,r=!0,nc(s,!1),t.lanes=4194304);s.isBackwards?(a.sibling=t.child,t.child=a):(e=s.last,e!==null?e.sibling=a:t.child=a,s.last=a)}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=Gn(),e.sibling=null,a=Xt.current,a=r?a&1|2:a&1,s.tailMode==="visible"||s.tailMode==="collapsed"||!n||Se?Qc(t,a):(n=a,Je(Yt,t),Je(Xt,n),tn===null&&(tn=t)),Se&&fr(t,s.treeForkCount),e}return Ze(t),null;case 22:case 23:return Bn(t),uy(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?n&536870912&&!(t.flags&128)&&(Ze(t),t.subtreeFlags&6&&(t.flags|=8192)):Ze(t),n=t.updateQueue,n!==null&&Ed(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&&Kt(di),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),jr(yt),Ze(t),null;case 25:return null;case 30:return t.flags|=33554432,Ze(t),null}throw Error(W(156,t.tag))}function iL(e,t){switch(ay(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jr(yt),il(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pf(t),null;case 31:if(t.memoizedState!==null){if(Bn(t),t.alternate===null)throw Error(W(340));mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Bn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));mi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return dy(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 il(),null;case 10:return jr(t.type),null;case 22:case 23:return Bn(t),uy(),e!==null&&Kt(di),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return jr(yt),null;case 25:return null;default:return null}}function Vj(e,t){switch(ay(t),t.tag){case 3:jr(yt),il();break;case 26:case 27:case 5:Pf(t);break;case 4:il();break;case 31:t.memoizedState!==null&&Bn(t);break;case 13:Bn(t);break;case 19:dy(t);break;case 10:jr(t.type);break;case 22:case 23:Bn(t),uy(),e!==null&&Kt(di);break;case 24:jr(yt)}}function Iu(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 a=n.create,i=n.inst;s=a(),i.destroy=s}n=n.next}while(n!==r)}}catch(o){He(t,t.return,o)}}function wa(e,t,n){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var a=r.next;s=a;do{if((s.tag&e)===e){var i=s.inst,o=i.destroy;if(o!==void 0){i.destroy=void 0,r=t;var c=n,u=o;try{u()}catch(d){He(r,c,d)}}}s=s.next}while(s!==a)}}catch(d){He(t,t.return,d)}}function Wj(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{sj(t,n)}catch(s){He(e,e.return,s)}}}function Kj(e,t,n){n.props=ji(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(s){He(e,t,s)}}function Ws(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,a=Er(e.memoizedProps,r);(r.ref===null||r.ref.name!==a)&&(r.ref=L8(a)),s=r.ref;break;case 7:if(e.stateNode===null){var i=new Yn(e);Tn(e.child,!1,ZL,i,void 0,void 0),e.stateNode=i}s=e.stateNode;break;default:s=e.stateNode}typeof n=="function"?e.refCleanup=n(s):n.current=s}}catch(o){He(e,t,o)}}function Gt(e,t){var n=e.ref,s=e.refCleanup;if(n!==null)if(typeof s=="function")try{s()}catch(r){He(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){He(e,t,r)}else n.current=null}function sh(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++)H8(e.stateNode,t[n])}function r2(e){for(var t=e.return;t!==null&&(Ty(t)&&H8(e.stateNode,t.stateNode),!Ey(t));)t=t.return}function Tc(e){for(var t=e.return;t!==null&&(Ty(t)&&YL(e.stateNode,t.stateNode),!Ey(t));)t=t.return}function Ey(e){return e.tag===5||e.tag===3||e.tag===27}function Ty(e){return e&&e.tag===7&&e.stateNode!==null}function bg(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){He(e,e.return,r)}}function B1(e,t,n){try{var s=e.stateNode;AL(s,e.type,n,t),s[zn]=t}catch(r){He(e,e.return,r)}}function Xj(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ta(e.type)||e.tag===4}function q1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xj(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&&Ta(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 vg(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=Zs)),sh(e,s),Ie=!0;else if(r!==4&&(r===27&&(sh(e,s),s=null,Ta(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(vg(e,t,n,s),e=e.sibling;e!==null;)vg(e,t,n,s),e=e.sibling}function rh(e,t,n,s){var r=e.tag;if(r===5||r===6)r=e.stateNode,t?n.insertBefore(r,t):n.appendChild(r),sh(e,s),Ie=!0;else if(r!==4&&(r===27&&(sh(e,s),s=null,Ta(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(rh(e,t,n,s),e=e.sibling;e!==null;)rh(e,t,n,s),e=e.sibling}function Zj(e){var t=e.stateNode,n=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Zt(t,s,n),t[Vt]=e,t[zn]=n}catch(a){He(e,e.return,a)}}var ah=!1,qn=null;function a2(e){(e.tag===30||e.subtreeFlags&33554432)&&(ah=!0)}var Ks=null;function i2(){var e=Ks;return Ks=null,e}var Sn=0;function Dl(e,t,n,s,r){return Sn=0,Yj(e.child,t,n,s,r)}function Yj(e,t,n,s,r){for(var a=!1;e!==null;){if(e.tag===5){var i=e.stateNode;if(s!==null){var o=Hg(i);s.push(o),o.view&&(a=!0)}else a||Hg(i).view&&(a=!0);ah=!0,_8(i,Sn===0?t:t+"_"+Sn,n),Sn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&r||Yj(e.child,t,n,s,r)&&(a=!0));e=e.sibling}return a}function sr(e,t){for(;e!==null;)e.tag===5?D8(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||sr(e.child,t)),e=e.sibling}function af(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(af(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(W(544));var n=t.name;t=_r(t.default,t.share),t!=="none"&&(Dl(e,n,t,null,!1)||sr(e.child,!1))}e=e.sibling}}function wg(e,t){if(e.tag===30){var n=e.stateNode,s=e.memoizedProps,r=Er(s,n),a=_r(s.default,n.paired?s.share:s.enter);a!=="none"?Dl(e,r,a,null,!1)?(af(e),n.paired||t||dl(e,s.onEnter)):sr(e.child,!1):af(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)wg(e,t),e=e.sibling;else af(e)}function jg(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 a=_r(n.default,n.share);if(a!=="none"&&(Dl(e,s,a,null,!1)?(a=e.stateNode,r.paired=a,a.paired=r,dl(e,n.onShare)):sr(e.child,!1)),t.delete(s),t.size===0)break}}}jg(e)}e=e.sibling}}}function Sg(e){if(e.tag===30){var t=e.memoizedProps,n=Er(t,e.stateNode),s=qn!==null?qn.get(n):void 0,r=_r(t.default,s!==void 0?t.share:t.exit);r!=="none"&&(Dl(e,n,r,null,!1)?s!==void 0?(r=e.stateNode,s.paired=r,r.paired=s,qn.delete(n),dl(e,t.onShare)):dl(e,t.onExit):sr(e.child,!1)),qn!==null&&jg(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Sg(e),e=e.sibling;else qn!==null&&jg(e)}function Qj(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=Er(t,e.stateNode);t=_r(t.default,t.update),e.flags&=-5,t!=="none"&&Dl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Qj(e);e=e.sibling}}function Cg(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,sr(e.child,!1))}Cg(e)}e=e.sibling}}function of(e){if(e.tag===30)e.stateNode.paired=null,sr(e.child,!1),Cg(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)of(e),e=e.sibling;else Cg(e)}function Jj(e){for(e=e.child;e!==null;)e.tag===30?sr(e.child,!1):e.subtreeFlags&33554432&&Jj(e),e=e.sibling}function zy(e,t,n,s,r,a,i){for(var o=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Sn<a.length){var u=a[Sn],d=Hg(c);(u.view||d.view)&&(o=!0);var f;if(f=(e.flags&4)===0)if(d.clip)f=!0;else{f=u.rect;var h=d.rect;f=f.y!==h.y||f.x!==h.x||f.height!==h.height||f.width!==h.width}f&&(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&&_8(c,Sn===0?n:n+"_"+Sn,r),o&&e.flags&4||(Ks===null&&(Ks=[]),Ks.push(c,Sn===0?s:s+"_"+Sn,t.memoizedProps)),Sn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&i?e.flags|=t.flags&32:zy(e,t.child,n,s,r,a,i)&&(o=!0));t=t.sibling}return o}function e8(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,s=e.stateNode,r=Er(n,s),a=_r(n.default,n.update),i;i=e.memoizedState,e.memoizedState=null,s=e;var o=e.child;Sn=0,r=zy(s,o,r,r,a,i,!1),e.flags&4&&r&&dl(e,n.onUpdate)}else e.subtreeFlags&33554432&&e8(e);e=e.sibling}}var Rt=!1,Oe=!1,Ps=!1,H1=!1,o2=typeof WeakSet=="function"?WeakSet:Set,It=null,Us=!1,xc=!1,ih=!1,$g=!1;function oL(e,t,n){if(e=e.containerInfo,Og=ml,e=B6(e),ty(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 a=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{s.nodeType,i.nodeType}catch{s=null;break e}var o=0,c=-1,u=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==s||a!==0&&h.nodeType!==3||(c=o+a),h!==i||r!==0&&h.nodeType!==3||(u=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===s&&++d===a&&(c=o),p===i&&++f===r&&(u=o),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}s=c===-1||u===-1?null:{start:c,end:u}}else s=null}s=s||{start:0,end:0}}else s=null;for(Bg={focusedElem:e,selectionRange:s},ml=!1,n=(n&335544064)===n,It=t,t=n?9270:1024;It!==null;){if(e=It,n&&(s=e.deletions,s!==null))for(a=0;a<s.length;a++)n&&Sg(s[a]);if(e.alternate===null&&e.flags&2)n&&a2(e),Td(n);else{if(e.tag===22){if(s=e.alternate,e.memoizedState!==null){s!==null&&s.memoizedState===null&&n&&Sg(s),Td(n);continue}else if(s!==null&&s.memoizedState!==null){n&&a2(e),Td(n);continue}}s=e.child,e.subtreeFlags&t&&s!==null?(s.return=e,It=s):(n&&Qj(e),Td(n))}}qn=null}function Td(e){for(;It!==null;){var t=It,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 a=t.stateNode;try{var i=ji(t.type,r);n=a.getSnapshotBeforeUpdate(i,s),a.__reactInternalSnapshotBeforeUpdate=n}catch(o){He(t,t.return,o)}}break;case 3:if(r&1024){if(s=t.stateNode.containerInfo,n=s.nodeType,n===9)Pg(s);else if(n===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":Pg(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=Er(s.memoizedProps,s.stateNode),r=t.memoizedProps,r=_r(r.default,r.update),r!=="none"&&Dl(s,n,r,s.memoizedState=[],!0));break;default:if(r&1024)throw Error(W(163))}if(s=t.sibling,s!==null){s.return=t.return,It=s;break}It=t.return}}function t8(e,t,n){var s=n.flags;switch(n.tag){case 0:case 11:case 15:Fs(e,n),s&4&&Iu(5,n);break;case 1:if(Fs(e,n),s&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(i){He(n,n.return,i)}else{var r=ji(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){He(n,n.return,i)}}s&64&&Wj(n),s&512&&Ws(n,n.return);break;case 3:if(Fs(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{sj(e,t)}catch(i){He(n,n.return,i)}}break;case 27:t===null&&s&4&&Zj(n);case 26:case 5:Fs(e,n),t===null&&s&4&&bg(n),s&512&&Ws(n,n.return);break;case 12:Fs(e,n);break;case 31:Fs(e,n),s&4&&a8(e,n);break;case 13:Fs(e,n),s&4&&i8(e,n),s&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=kL.bind(null,n),eO(e,n))));break;case 22:if(s=n.memoizedState!==null||Rt,!s){var a=t!==null&&t.memoizedState!==null||Oe;t=Rt,r=Oe,Rt=s,(Oe=a)&&!r?(s=2,n.subtreeFlags&8772&&(s|=1),js(e,n,s)):Fs(e,n),Rt=t,Oe=r}break;case 30:Fs(e,n),s&512&&Ws(n,n.return);break;case 7:s&512&&Ws(n,n.return);default:Fs(e,n)}}function Eg(e,t){for(e=e.child;e!==null;)n8(e,t),e=e.sibling}function n8(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,a=e.memoizedProps.style,i=a!=null&&a.hasOwnProperty("display")?a.display:null;r.style.display=i==null||typeof i=="boolean"?"":(""+i).trim()}}catch(c){He(e,e.return,c)}Tg(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Ie=!0}catch(c){He(e,e.return,c)}break;case 18:try{var o=e.stateNode;t?v2(o,!0):v2(e.stateNode,!1)}catch(c){He(e,e.return,c)}break;case 22:case 23:e.memoizedState===null&&Eg(e,t);break;default:Eg(e,t)}}function Tg(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,s=t;switch(n.tag){case 4:n8(n,s);break e;case 22:n.memoizedState===null&&Tg(n,s);break e;default:Tg(n,s)}}e=e.sibling}}function s8(e){var t=e.alternate;t!==null&&(e.alternate=null,s8(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&sx(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 tt=null,vn=!1;function ws(e,t,n){for(n=n.child;n!==null;)r8(e,t,n),n=n.sibling}function r8(e,t,n){if(Vn&&typeof Vn.onCommitFiberUnmount=="function")try{Vn.onCommitFiberUnmount(Eu,n)}catch{}switch(n.tag){case 26:Oe||Gt(n,t),ws(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!Oe&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Oe||Gt(n,t),Tc(n);var s=tt,r=vn;Ta(n.type)&&(tt=n.stateNode,vn=!1),ws(e,t,n),F8(n.stateNode,n.type,n.memoizedProps),tt=s,vn=r;break;case 5:Oe||Gt(n,t),Tc(n);case 6:if(n.tag===6&&Tc(n),s=tt,r=vn,tt=null,ws(e,t,n),tt=s,vn=r,tt!==null)if(vn)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(n.stateNode),Ie=!0}catch(a){He(n,t,a)}else try{tt.removeChild(n.stateNode),Ie=!0}catch(a){He(n,t,a)}break;case 18:tt!==null&&(vn?(e=tt,b2(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),yl(e)):b2(tt,n.stateNode));break;case 4:s=tt,r=vn,tt=n.stateNode.containerInfo,vn=!0,ws(e,t,n),tt=s,vn=r;break;case 0:case 11:case 14:case 15:wa(2,n,t),Oe||wa(4,n,t),ws(e,t,n);break;case 1:Oe||(Gt(n,t),s=n.stateNode,typeof s.componentWillUnmount=="function"&&Kj(n,t,s)),ws(e,t,n);break;case 21:ws(e,t,n);break;case 22:Oe=(s=Oe)||n.memoizedState!==null,ws(e,t,n),Oe=s;break;case 30:Gt(n,t),ws(e,t,n);break;case 7:Oe||Gt(n,t),ws(e,t,n);break;default:ws(e,t,n)}}function a8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{yl(e)}catch(n){He(t,t.return,n)}}}function i8(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{yl(e)}catch(n){He(t,t.return,n)}}function lL(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new o2),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new o2),t;default:throw Error(W(435,e.tag))}}function zd(e,t){var n=lL(e);t.forEach(function(s){if(!n.has(s)){n.add(s);var r=bL.bind(null,e,s);s.then(r,r)}})}function un(e,t,n){var s=t.deletions;if(s!==null)for(var r=0;r<s.length;r++){var a=s[r],i=e,o=t,c=o;e:for(;c!==null;){switch(c.tag){case 27:if(Ta(c.type)){tt=c.stateNode,vn=!1;break e}break;case 5:tt=c.stateNode,vn=!1;break e;case 3:case 4:tt=c.stateNode.containerInfo,vn=!0;break e}c=c.return}if(tt===null)throw Error(W(160));r8(i,o,a),tt=null,vn=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)o8(t,e,n),t=t.sibling}var Ts=null;function o8(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 a=0;a<s.length;a++){var i=s[a];i.ref.impl=i.nextImpl}un(t,e,n),dn(e),r&4&&(wa(3,e,e.return),Iu(3,e),wa(5,e,e.return));break;case 1:un(t,e,n),dn(e),r&512&&(Oe||s===null||Gt(s,s.return)),r&64&&Rt&&(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(a=Ts,un(t,e,n),dn(e),r&512&&(Oe||s===null||Gt(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(Rt)e.stateNode=I8(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,r=a.ownerDocument||a;t:switch(t){case"title":s=r.getElementsByTagName("title")[0],(!s||s[Nu]||s[Vt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=r.createElement(t),r.head.insertBefore(s,r.querySelector("head > title"))),Zt(s,t,n),s[Vt]=e,_t(s),t=s;break e;case"link":if(a=z2("link","href",r).get(t+(n.href||""))){for(i=0;i<a.length;i++)if(s=a[i],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(i,1);break t}}s=r.createElement(t),Zt(s,t,n),r.head.appendChild(s);break;case"meta":if(a=z2("meta","content",r).get(t+(n.content||""))){for(i=0;i<a.length;i++)if(s=a[i],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(i,1);break t}}s=r.createElement(t),Zt(s,t,n),r.head.appendChild(s);break;default:throw Error(W(468,t))}s[Vt]=e,_t(s),t=s}e.stateNode=t}else Rt||Gg(a,e.type,e.stateNode);else e.stateNode=T2(a,n,e.memoizedProps);else r!==n?(r===null?(t=s.stateNode,t===null||Oe||t.parentNode.removeChild(t)):r.count--,n===null?Rt||Gg(a,e.type,e.stateNode):T2(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&B1(e,e.memoizedProps,s.memoizedProps);break;case 27:un(t,e,n),dn(e),r&512&&(Oe||s===null||Gt(s,s.return)),s!==null&&r&4&&B1(e,e.memoizedProps,s.memoizedProps);break;case 5:if(a=Ps,Ps=!1,un(t,e,n),Ps=a,dn(e),r&512&&(Oe||s===null||Gt(s,s.return)),e.flags&32){t=e.stateNode;try{ll(t,""),Ie=!0}catch(d){He(e,e.return,d)}}r&4&&e.stateNode!=null&&(t=e.memoizedProps,B1(e,t,s!==null?s.memoizedProps:t)),r&1024&&(H1=!0);break;case 6:if(un(t,e,n),dn(e),r&4){if(e.stateNode===null)throw Error(W(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ie=!0}catch(d){He(e,e.return,d)}}break;case 3:if(Ie=!1,df=null,a=Ts,Ts=su(t.containerInfo),un(t,e,n),Ts=a,dn(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{yl(t.containerInfo)}catch(d){He(e,e.return,d)}H1&&(H1=!1,l8(e)),Ie=!1;break;case 4:r=Ps,Ps=Rt,s=fv(),a=Ts,Ts=su(e.stateNode.containerInfo),un(t,e,n),dn(e),Ts=a,Ie&&xc&&(ih=!0),Ie=s,Ps=r;break;case 12:un(t,e,n),dn(e);break;case 31:un(t,e,n),dn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zd(e,t)));break;case 13:un(t,e,n),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(gx=Gn()),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zd(e,t)));break;case 22:a=e.memoizedState!==null,i=s!==null&&s.memoizedState!==null;var o=Rt,c=Oe,u=Ps;Rt=o||a,Ps=u||a,Oe=c||i,un(t,e,n),Oe=c,Ps=u,Rt=o,dn(e),r&8192&&(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,!a||s===null||i||Rt||Oe||(t=i||Oe,n=Rt,s=Oe,Rt=a||Rt,Oe=t,Wr(e,2),Rt=n,Oe=s),!a&&Ps||Eg(e,a)),r&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,zd(e,n))));break;case 19:un(t,e,n),dn(e),r&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,zd(e,t)));break;case 30:r&512&&(Oe||s===null||Gt(s,s.return)),r=fv(),a=xc,i=(n&335544064)===n,o=e.memoizedProps,xc=i&&_r(o.default,o.update)!=="none",un(t,e,n),dn(e),i&&s!==null&&Ie&&(e.flags|=4),xc=a,Ie=r;break;case 21:break;case 7:r&512&&(Oe||s===null||Gt(s,s.return)),s&&s.stateNode!==null&&(s.stateNode._fragmentFiber=e);default:un(t,e,n),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{for(var n,s=e.return;s!==null;){if(Xj(s)){n=s;break}s=s.return}s=null;for(var r=e.return;r!==null;){if(Ty(r)){var a=r.stateNode;s===null?s=[a]:s.push(a)}if(Ey(r))break;r=r.return}var i=s;if(n==null)throw Error(W(160));switch(n.tag){case 27:var o=n.stateNode,c=q1(e);rh(e,c,o,i);break;case 5:var u=n.stateNode;n.flags&32&&(ll(u,""),n.flags&=-33);var d=q1(e);rh(e,d,u,i);break;case 3:case 4:var f=n.stateNode.containerInfo,h=q1(e);vg(e,h,f,i);break;default:throw Error(W(161))}}catch(p){He(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function l8(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;l8(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,ml=!0,t.reset(),ml=!1),e=e.sibling}}function ao(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)c8(t,e),t=t.sibling;else e8(t)}function c8(e,t){var n=e.alternate;if(n===null)wg(e,!1);else switch(e.tag){case 3:if($g=Us=!1,i2(),ao(t,e),!Us&&!ih){if(e=Ks,e!==null)for(var s=0;s<e.length;s+=3){n=e[s];var r=e[s+1];D8(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"})),$g=!0}Ks=null;break;case 5:ao(t,e);break;case 4:s=Us,Us=!1,ao(t,e),Us&&(ih=!0),Us=s;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?wg(e,!1):ao(t,e));break;case 30:s=Us,r=i2(),Us=!1,ao(t,e),Us&&(e.flags|=4);var a=e.memoizedProps,i=e.stateNode;t=Er(a,i),i=Er(n.memoizedProps,i);var o=_r(a.default,a.update);o==="none"?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Sn=0,t=zy(e,n,t,i,o,a,!0),Sn!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(dl(e,e.memoizedProps.onUpdate),Ks=r):r!==null&&(r.push.apply(r,Ks),Ks=r),Us=e.flags&32?!0:s;break;default:ao(t,e)}}function Fs(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)t8(e,t.alternate,t),t=t.sibling}function Wr(e,t){for(e=e.child;e!==null;){var n=e,s=t;switch(n.tag){case 0:case 11:case 14:case 15:wa(4,n,n.return),Wr(n,s);break;case 1:Gt(n,n.return);var r=n.stateNode;typeof r.componentWillUnmount=="function"&&Kj(n,n.return,r),Wr(n,s);break;case 27:s&2&&F8(n.stateNode,n.type,n.memoizedProps);case 5:Gt(n,n.return),n.tag!==5&&n.tag!==27||Tc(n),Wr(n,s);break;case 6:Tc(n);break;case 26:Gt(n,n.return),r=n.stateNode,n.memoizedState!==null||r===null||Oe||r.parentNode.removeChild(r),Wr(n,s);break;case 22:n.memoizedState===null&&Wr(n,s);break;case 30:Gt(n,n.return),Wr(n,s);break;case 7:Gt(n,n.return);default:Wr(n,s)}e=e.sibling}}function js(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var s=t.alternate,r=e,a=t,i=a.flags,o=(n&1)!==0;switch(a.tag){case 0:case 11:case 15:js(r,a,n),Iu(4,a);break;case 1:if(js(r,a,n),s=a,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(d){He(s,s.return,d)}if(s=a,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++)nj(u[r],c)}catch(d){He(s,s.return,d)}}o&&i&64&&Wj(a),Ws(a,a.return);break;case 27:n&2&&Zj(a);case 5:a.tag!==5&&a.tag!==27||r2(a),js(r,a,n),o&&s===null&&i&4&&bg(a),Ws(a,a.return);break;case 6:r2(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||Rt||Gg(su(c.ownerDocument),a.type,c),js(r,a,n),o&&s===null&&i&4&&bg(a),Ws(a,a.return);break;case 12:js(r,a,n);break;case 31:js(r,a,n),o&&i&4&&a8(r,a);break;case 13:js(r,a,n),o&&i&4&&i8(r,a);break;case 22:a.memoizedState===null&&js(r,a,n),Ws(a,a.return);break;case 30:js(r,a,n),Ws(a,a.return);break;case 7:Ws(a,a.return);default:js(r,a,n)}t=t.sibling}}function Ny(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&&Au(n))}function My(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Au(e))}function Qn(e,t,n,s){var r=(n&335544064)===n;if(t.subtreeFlags&(r?10262:10256))for(t=t.child;t!==null;)u8(e,t,n,s),t=t.sibling;else r&&Jj(t)}function u8(e,t,n,s){var r=(n&335544064)===n;r&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&of(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Qn(e,t,n,s),a&2048&&Iu(9,t);break;case 1:Qn(e,t,n,s);break;case 3:Qn(e,t,n,s),r&&$g&&(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="")),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Au(a)));break;case 12:if(a&2048){Qn(e,t,n,s),a=t.stateNode;try{var i=t.memoizedProps,o=i.id,c=i.onPostCommit;typeof c=="function"&&c(o,t.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(u){He(t,t.return,u)}}else Qn(e,t,n,s);break;case 31:Qn(e,t,n,s);break;case 13:Qn(e,t,n,s);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?(r&&o!==null&&o.memoizedState===null&&of(o),i._visibility&2?Qn(e,t,n,s):zc(e,t)):(r&&o!==null&&o.memoizedState!==null&&of(t),i._visibility&2?Qn(e,t,n,s):(i._visibility|=2,fo(e,t,n,s,(t.subtreeFlags&10256)!==0||!1))),a&2048&&Ny(o,t);break;case 24:Qn(e,t,n,s),a&2048&&My(t.alternate,t);break;case 30:r&&(a=t.alternate,a!==null&&(sr(a.child,!0),sr(t.child,!0))),Qn(e,t,n,s);break;default:Qn(e,t,n,s)}}function fo(e,t,n,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,i=t,o=n,c=s,u=i.flags;switch(i.tag){case 0:case 11:case 15:fo(a,i,o,c,r),Iu(8,i);break;case 23:break;case 22:var d=i.stateNode;i.memoizedState!==null?d._visibility&2?fo(a,i,o,c,r):zc(a,i):(d._visibility|=2,fo(a,i,o,c,r)),r&&u&2048&&Ny(i.alternate,i);break;case 24:fo(a,i,o,c,r),r&&u&2048&&My(i.alternate,i);break;default:fo(a,i,o,c,r)}t=t.sibling}}function zc(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:zc(n,s),r&2048&&Ny(s.alternate,s);break;case 24:zc(n,s),r&2048&&My(s.alternate,s);break;default:zc(n,s)}t=t.sibling}}var Fa=8192;function Oa(e,t,n){if(e.subtreeFlags&Fa)for(e=e.child;e!==null;)d8(e,t,n),e=e.sibling}function d8(e,t,n){switch(e.tag){case 26:Oa(e,t,n),e.flags&Fa&&(e.memoizedState!==null?xO(n,Ts,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&M2(n,e)));break;case 5:Oa(e,t,n),e.flags&Fa&&(e=e.stateNode,(t&335544128)===t&&M2(n,e));break;case 3:case 4:var s=Ts;Ts=su(e.stateNode.containerInfo),Oa(e,t,n),Ts=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Fa,Fa=16777216,Oa(e,t,n),Fa=s):Oa(e,t,n));break;case 30:if(e.flags&Fa&&(s=e.memoizedProps.name,s!=null&&s!=="auto")){var r=e.stateNode;r.paired=null,qn===null&&(qn=new Map),qn.set(s,r)}Oa(e,t,n);break;default:Oa(e,t,n)}}function f8(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 sc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];It=s,x8(s,e)}f8(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)h8(e),e=e.sibling}function h8(e){switch(e.tag){case 0:case 11:case 15:sc(e),e.flags&2048&&wa(9,e,e.return);break;case 3:sc(e);break;case 12:sc(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,lf(e)):sc(e);break;default:sc(e)}}function lf(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var s=t[n];It=s,x8(s,e)}f8(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:wa(8,t,t.return),lf(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,lf(t));break;default:lf(t)}e=e.sibling}}function x8(e,t){for(;It!==null;){var n=It;switch(n.tag){case 0:case 11:case 15:wa(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:Au(n.memoizedState.cache)}if(s=n.child,s!==null)s.return=n,It=s;else e:for(n=e;It!==null;){s=It;var r=s.sibling,a=s.return;if(s8(s),s===n){It=null;break e}if(r!==null){r.return=a,It=r;break e}It=a}}}var cL={getCacheForType:function(e){var t=Wt(yt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Wt(yt).controller.signal}},uL=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ke=null,Te=null,Ne=0,Be=0,Dn=null,ra=!1,Ll=!1,Ay=!1,Mr=0,ht=0,ja=0,hi=0,oh=0,Hn=0,ul=0,Nc=null,wn=null,zg=!1,gx=0,p8=0,lh=1/0,ch=null,ha=null,lt=0,As=null,Si=null,nr=0,Ng=0,Mg=null,g8=null,Oo=null,Bo=null,qo=null,Mc=0,cf=null;function Kn(){return _e&2&&Ne!==0?Ne&-Ne:ge.T!==null?Iy():b6()}function m8(){if(Hn===0)if(!(Ne&536870912)||Se){var e=yd;yd<<=1,!(yd&3932160)&&(yd=262144),Hn=e}else Hn=536870912;return e=Yt.current,e!==null&&(e.flags|=32),Hn}function dl(e,t){if(t!=null){var n=e.stateNode,s=n.ref;s===null&&(s=n.ref=L8(Er(e.memoizedProps,n))),Bo===null&&(Bo=[]),Bo.push(t.bind(null,s))}}function $n(e,t,n){(e===Ke&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(fl(e,0),aa(e,Ne,Hn,!1)),zu(e,n),(!(_e&2)||e!==Ke)&&(e===Ke&&(!(_e&2)&&(hi|=n),ht===4&&aa(e,Ne,Hn,!1)),ar(e))}function y8(e,t,n){if(_e&6)throw Error(W(327));var s=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Tu(e,t),r=s?hL(e,t):P1(e,t,!0),a=s;do{if(r===0){Ll&&!s&&aa(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!dL(n)){r=P1(e,t,!1),a=!1;continue}if(r===2){if(a=t,e.errorRecoveryDisabledLanes&a)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var o=e;r=Nc;var c=o.current.memoizedState.isDehydrated;if(c&&(fl(o,i).flags|=256),i=P1(o,i,!1),i!==2&&i!==6){if(Ay&&!c){o.errorRecoveryDisabledLanes|=a,hi|=a,r=4;break e}a=wn,wn=r,a!==null&&(wn===null?wn=a:wn.push.apply(wn,a))}r=i}if(a=!1,r!==2)continue}}if(r===1){fl(e,0),aa(e,t,0,!0);break}e:{switch(s=e,a=r,a){case 0:case 1:throw Error(W(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:aa(s,t,Hn,!ra);break e;case 2:wn=null;break;case 3:case 5:break;default:throw Error(W(329))}if((t&62914560)===t&&(r=gx+300-Gn(),10<r)){if(aa(s,t,Hn,!ra),nx(s,0,!0)!==0)break e;nr=t,s.timeoutHandle=Dy(l2.bind(null,s,n,wn,ch,zg,t,Hn,hi,ul,ra,a,"Throttled",-0,0),r);break e}l2(s,n,wn,ch,zg,t,Hn,hi,ul,ra,a,null,-0,0)}}break}while(!0);ar(e)}function l2(e,t,n,s,r,a,i,o,c,u,d,f,h,p){e.timeoutHandle=-1;var m=t.subtreeFlags,b=(a&335544064)===a;if(f=null,(b||m&8192||(m&16785408)===16785408)&&(f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zs},qn=null,d8(t,a,f),b&&(m=f,b=e.containerInfo,b=(b.nodeType===9?b:b.ownerDocument).__reactViewTransition,b!=null&&(m.count++,m.waitingForViewTransition=!0,m=ru.bind(m),b.finished.then(m,m))),m=(a&62914560)===a?gx-Gn():(a&4194048)===a?p8-Gn():0,m=pO(f,m),m!==null)){nr=a,e.cancelPendingCommit=m(u2.bind(null,e,t,a,n,s,r,i,o,c,u,d,f,null,h,p)),aa(e,a,i,!u);return}u2(e,t,a,n,s,r,i,o,c,u,d,f)}function dL(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],a=r.getSnapshot;r=r.value;try{if(!Xn(a(),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 aa(e,t,n,s){t=p6(e,t),t&=~oh,t&=~hi,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var a=31-Wn(r),i=1<<a;s[a]=-1,r&=~i}n!==0&&m6(e,n,t)}function mx(){return _e&6?!0:(_u(0),!1)}function Ry(){if(Te!==null){if(Be===0)var e=Te.return;else e=Te,yr=Ui=null,gy(e),_o=null,Yc=0,e=Te;for(;e!==null;)Vj(e.alternate,e),e=e.return;Te=null}}function fl(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,_L(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),nr=0,Ry(),Ke=e,Te=n=wr(e.current,null),Ne=t,Be=0,Dn=null,ra=!1,Ll=Tu(e,t),Ay=!1,ul=Hn=oh=hi=ja=ht=0,wn=Nc=null,zg=!1,Mr=p6(e,t),ox(),n}function k8(e,t){we=null,ge.H=th,t===_l||t===ux?(t=_v(),Be=3):t===ly?(t=_v(),Be=4):Be=t===Sy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Dn=t,Te===null&&(ht=1,nh(e,ls(t,e.current)))}function b8(){var e=Yt.current;return e===null?!0:(Ne&4194048)===Ne?tn===null:(Ne&62914560)===Ne||Ne&536870912?e===tn:!1}function v8(){var e=ge.H;return ge.H=th,e===null?th:e}function w8(){var e=ge.A;return ge.A=cL,e}function uh(){ht=4,ra||(Ne&4194048)!==Ne&&Yt.current!==null||(Ll=!0),!(ja&134217727)&&!(hi&134217727)||Ke===null||aa(Ke,Ne,Hn,!1)}function P1(e,t,n){var s=_e;_e|=2;var r=v8(),a=w8();(Ke!==e||Ne!==t)&&(ch=null,fl(e,t)),t=!1;var i=ht;e:do try{if(Be!==0&&Te!==null){var o=Te,c=Dn;switch(Be){case 8:Ry(),i=6;break e;case 3:case 2:case 9:case 6:Yt.current===null&&(t=!0);var u=Be;if(Be=0,Dn=null,$o(e,o,c,u),n&&Ll){i=0;break e}break;default:u=Be,Be=0,Dn=null,$o(e,o,c,u)}}fL(),i=ht;break}catch(d){k8(e,d)}while(!0);return t&&e.shellSuspendCounter++,yr=Ui=null,_e=s,ge.H=r,ge.A=a,Te===null&&(Ke=null,Ne=0,ox()),i}function fL(){for(;Te!==null;)j8(Te)}function hL(e,t){var n=_e;_e|=2;var s=v8(),r=w8();Ke!==e||Ne!==t?(ch=null,lh=Gn()+500,fl(e,t)):Ll=Tu(e,t);e:do try{if(Be!==0&&Te!==null){t=Te;var a=Dn;t:switch(Be){case 1:Be=0,Dn=null,$o(e,t,a,1);break;case 2:case 9:if(Iv(a)){Be=0,Dn=null,c2(t);break}t=function(){Be!==2&&Be!==9||Ke!==e||(Be=7),ar(e)},a.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:Iv(a)?(Be=0,Dn=null,c2(t)):(Be=0,Dn=null,$o(e,t,a,7));break;case 5:var i=null;switch(Te.tag){case 26:i=Te.memoizedState;case 5:case 27:var o=Te;if(i?W8(i):o.stateNode.complete){Be=0,Dn=null;var c=o.sibling;if(c!==null)Te=c;else{var u=o.return;u!==null?(Te=u,yx(u)):Te=null}break t}}Be=0,Dn=null,$o(e,t,a,5);break;case 6:Be=0,Dn=null,$o(e,t,a,6);break;case 8:Ry(),ht=6;break e;default:throw Error(W(462))}}xL();break}catch(d){k8(e,d)}while(!0);return yr=Ui=null,ge.H=s,ge.A=r,_e=n,Te!==null?0:(Ke=null,Ne=0,ox(),ht)}function xL(){for(;Te!==null&&!M_();)j8(Te)}function j8(e){var t=Gj(e.alternate,e,Mr);e.memoizedProps=e.pendingProps,t===null?yx(e):Te=t}function c2(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Yv(n,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=Yv(n,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:gy(t);var s=t;s===Lt&&(Se?(Kf(s),s.tag===5&&s.stateNode!=null&&(Ye=s.stateNode)):(Kf(s),Se=!0));default:Vj(n,t),t=Te=W6(t,Mr),t=Gj(n,t,Mr)}e.memoizedProps=e.pendingProps,t===null?yx(e):Te=t}function $o(e,t,n,s){yr=Ui=null,gy(t),_o=null,Yc=0;var r=t.return;try{if(tL(e,r,t,n,Ne)){ht=1,nh(e,ls(n,e.current)),Te=null;return}}catch(a){if(r!==null)throw Te=r,a;ht=1,nh(e,ls(n,e.current)),Te=null;return}t.flags&32768?(Se||s===1?e=!0:Ll||Ne&536870912?e=!1:(ra=e=!0,(s===2||s===9||s===3||s===6)&&(s=Yt.current,s!==null&&s.tag===13&&(s.flags|=16384))),S8(t,e)):yx(t)}function yx(e){var t=e;do{if(t.flags&32768){S8(t,ra);return}e=t.return;var n=aL(t.alternate,t,Mr);if(n!==null){Te=n;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);ht===0&&(ht=5)}function S8(e,t){do{var n=iL(e.alternate,e);if(n!==null){n.flags&=32767,Te=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=n}while(e!==null);ht=6,Te=null}function u2(e,t,n,s,r,a,i,o,c,u,d,f){e.cancelPendingCommit=null;do kx();while(lt!==0);if(_e&6)throw Error(W(327));if(t!==null){if(t===e.current)throw Error(W(177));e===Ke&&(Te=Ke=null,Ne=0),Si=t,As=e,nr=n,Mg=r,g8=s,pL(e,t,n,i,o,c,f)}}function pL(e,t,n,s,r,a,i){var o=t.lanes|t.childLanes;if(Ng=o,o|=ny,H_(e,n,o,s,r,a),Bo=null,(n&335544064)===n?(qo=UD(e),s=10262):(qo=null,s=10256),t.subtreeFlags&s||t.flags&s?(e.callbackNode=null,e.callbackPriority=0,vL(Uf,function(){return _g(),null})):(e.callbackNode=null,e.callbackPriority=0),ah=!1,s=(t.flags&13878)!==0,t.subtreeFlags&13878||s){s=ge.T,ge.T=null,r=De.p,De.p=2,a=_e,_e|=4;try{oL(e,t,n)}finally{_e=a,De.p=r,ge.T=s}}lt=1,ah?Oo=HL(i,e.containerInfo,qo,Ag,Rg,mL,Ig,_g,gL):(Ag(),Rg(),Ig())}function gL(e){if(lt!==0){var t=As.onRecoverableError;t(e,{componentStack:null})}}function mL(){lt===3&&(lt=0,c8(Si,As),lt=4)}function Ag(){if(lt===1){lt=0;var e=As,t=Si,n=nr,s=(t.flags&13878)!==0;if(t.subtreeFlags&13878||s){s=ge.T,ge.T=null;var r=De.p;De.p=2;var a=_e;_e|=4;try{xc=ih=!1,o8(t,e,n),n=Bg;var i=B6(e.containerInfo),o=n.focusedElem,c=n.selectionRange;if(i!==o&&o&&o.ownerDocument&&O6(o.ownerDocument.documentElement,o)){if(c!==null&&ty(o)){var u=c.start,d=c.end;if(d===void 0&&(d=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(d,o.value.length);else{var f=o.ownerDocument||document,h=f&&f.defaultView||window;if(h.getSelection){var p=h.getSelection(),m=o.textContent.length,b=Math.min(c.start,m),y=c.end===void 0?b:Math.min(c.end,m);!p.extend&&b>y&&(i=y,y=b,b=i);var g=$v(o,b),k=$v(o,y);if(g&&k&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==k.node||p.focusOffset!==k.offset)){var v=f.createRange();v.setStart(g.node,g.offset),p.removeAllRanges(),b>y?(p.addRange(v),p.extend(k.node,k.offset)):(v.setEnd(k.node,k.offset),p.addRange(v))}}}}for(f=[],p=o;p=p.parentNode;)p.nodeType===1&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<f.length;o++){var w=f[o];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}ml=!!Og,Bg=Og=null}finally{_e=a,De.p=r,ge.T=s}}e.current=t,lt=2}}function Rg(){if(lt===2){lt=0;var e=As,t=Si,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ge.T,ge.T=null;var s=De.p;De.p=2;var r=_e;_e|=4;try{t8(e,t.alternate,t)}finally{_e=r,De.p=s,ge.T=n}}lt=3}}function Ig(){if(lt===4||lt===3){lt=0;var e=Oo;Oo=null,A_();var t=As,n=Si,s=nr,r=g8,a=(s&335544064)===s?10262:10256;if(n.subtreeFlags&a||n.flags&a?lt=5:(lt=0,Si=As=null,C8(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(ha=null),X0(s),n=n.stateNode,Vn&&typeof Vn.onCommitFiberRoot=="function")try{Vn.onCommitFiberRoot(Eu,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=ge.T,a=De.p,De.p=2,ge.T=null;try{for(var i=t.onRecoverableError,o=0;o<r.length;o++){var c=r[o];i(c.value,{componentStack:c.stack})}}finally{ge.T=n,De.p=a}}if(r=Bo,i=qo,qo=null,r!==null&&(Bo=null,i===null&&(i=[]),e!==null))for(c=0;c<r.length;c++)n=(0,r[c])(i),n!==void 0&&e.finished.finally(n);nr&3&&kx(),ar(t),a=t.pendingLanes,s&261930&&a&42?t===cf?Mc++:(Mc=0,cf=t):(Mc=0,cf=null),_u(0)}}function C8(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Au(t)))}function kx(){return Oo!==null&&(Oo.skipTransition(),Oo=null),Ag(),Rg(),Ig(),_g()}function _g(){if(lt!==5)return!1;var e=As,t=Ng;Ng=0;var n=X0(nr),s=ge.T,r=De.p;try{De.p=32>n?32:n,ge.T=null,n=Mg,Mg=null;var a=As,i=nr;if(lt=0,Si=As=null,nr=0,_e&6)throw Error(W(331));var o=_e;if(_e|=4,h8(a.current),u8(a,a.current,i,n),_e=o,_u(0,!1),Vn&&typeof Vn.onPostCommitFiberRoot=="function")try{Vn.onPostCommitFiberRoot(Eu,a)}catch{}return!0}finally{De.p=r,ge.T=s,C8(e,t)}}function d2(e,t,n){t=ls(n,t),t=xg(e.stateNode,t,2),e=ua(e,t,2),e!==null&&(zu(e,2),ar(e))}function He(e,t,n){if(e.tag===3)d2(e,e,n);else for(;t!==null;){if(t.tag===3){d2(t,e,n);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ha===null||!ha.has(s))){e=ls(n,e),n=qj(2),s=ua(t,n,2),s!==null&&(Hj(n,s,t,e),zu(s,2),ar(s));break}}t=t.return}}function U1(e,t,n){var s=e.pingCache;if(s===null){s=e.pingCache=new uL;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)||(Ay=!0,r.add(n),e=yL.bind(null,e,t,n),t.then(e,e))}function yL(e,t,n){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ke===e&&(Ne&n)===n&&(ht===4||ht===3&&(Ne&62914560)===Ne&&300>Gn()-gx?_e&2?oh|=n:fl(e,0):oh|=n,ul===Ne&&(ul=0)),ar(e)}function $8(e,t){t===0&&(t=g6()),e=Pi(e,t),e!==null&&(zu(e,t),ar(e))}function kL(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$8(e,n)}function bL(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(W(314))}s!==null&&s.delete(t),$8(e,n)}function vL(e,t){return W0(e,t)}var hl=null,ho=null,Dg=!1,dh=!1,F1=!1,ia=0;function ar(e){e!==ho&&e.next===null&&(ho===null?hl=ho=e:ho=ho.next=e),dh=!0,Dg||(Dg=!0,jL())}function _u(e,t){if(!F1&&dh){F1=!0;do for(var n=!1,s=hl;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var a=0;else{var i=s.suspendedLanes,o=s.pingedLanes;a=(1<<31-Wn(42|e)+1)-1,a&=r&~(i&~o),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,f2(s,a))}else a=Ne,a=nx(s,s===Ke?a:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),!(a&3)||Tu(s,a)||(n=!0,f2(s,a));s=s.next}while(n);F1=!1}}function wL(){E8()}function E8(){dh=Dg=!1;var e=0;ia!==0&&IL()&&(e=ia);for(var t=Gn(),n=null,s=hl;s!==null;){var r=s.next,a=T8(s,t);a===0?(s.next=null,n===null?hl=r:n.next=r,r===null&&(ho=n)):(n=s,(e!==0||a&3)&&(dh=!0)),s=r}lt!==0&&lt!==5||_u(e),ia!==0&&(ia=0)}function T8(e,t){for(var n=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var i=31-Wn(a),o=1<<i,c=r[i];c===-1?(!(o&n)||o&s)&&(r[i]=q_(o,t)):c<=t&&(e.expiredLanes|=o),a&=~o}if(t=Ke,n=Ne,n=nx(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,n===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&v1(s),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Tu(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(s!==null&&v1(s),X0(n)){case 2:case 8:n=h6;break;case 32:n=Uf;break;case 268435456:n=x6;break;default:n=Uf}return s=z8.bind(null,e),n=W0(n,s),e.callbackPriority=t,e.callbackNode=n,t}return s!==null&&s!==null&&v1(s),e.callbackPriority=2,e.callbackNode=null,2}function z8(e,t){if(lt!==0&&lt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(kx()&&e.callbackNode!==n)return null;var s=Ne;return s=nx(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(y8(e,s,t),T8(e,Gn()),e.callbackNode!=null&&e.callbackNode===n?z8.bind(null,e):null)}function f2(e,t){if(kx())return null;y8(e,t,!0)}function jL(){DL(function(){_e&6?W0(f6,wL):E8()})}function Iy(){if(ia===0){var e=bi;e===0&&(e=md,md<<=1,!(md&261888)&&(md=256)),ia=e}return ia}function h2(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Zd(e)}function SL(e,t,n,s,r){if(t==="submit"&&n&&n.stateNode===r){var a=h2((r[zn]||null).action),i=s.submitter;i&&(t=(t=i[zn]||null)?h2(t.formAction):i.getAttribute("formAction"),t!==null&&(a=t,i=null));var o=new rx("action","action",null,s,r);e.push({event:o,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ia!==0){var c=new FormData(r,i);fg(n,{pending:!0,data:c,method:r.method,action:a},null,c)}}else typeof a=="function"&&(o.preventDefault(),c=new FormData(r,i),fg(n,{pending:!0,data:c,method:r.method,action:a},a,c))},currentTarget:r}]})}}for(var G1=0;G1<tg.length;G1++){var V1=tg[G1],CL=V1.toLowerCase(),$L=V1[0].toUpperCase()+V1.slice(1);Bs(CL,"on"+$L)}Bs(H6,"onAnimationEnd");Bs(P6,"onAnimationIteration");Bs(U6,"onAnimationStart");Bs("dblclick","onDoubleClick");Bs("focusin","onFocus");Bs("focusout","onBlur");Bs(_D,"onTransitionRun");Bs(DD,"onTransitionStart");Bs(LD,"onTransitionCancel");Bs(F6,"onTransitionEnd");ol("onMouseEnter",["mouseout","mouseover"]);ol("onMouseLeave",["mouseout","mouseover"]);ol("onPointerEnter",["pointerout","pointerover"]);ol("onPointerLeave",["pointerout","pointerover"]);qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));qi("onBeforeInput",["compositionend","keypress","textInput","paste"]);qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var eu="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(" "),EL=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(eu));function N8(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 a=void 0;if(t)for(var i=s.length-1;0<=i;i--){var o=s[i],c=o.instance,u=o.currentTarget;if(o=o.listener,c!==a&&r.isPropagationStopped())break e;a=o,r.currentTarget=u;try{a(r)}catch(d){Gf(d)}r.currentTarget=null,a=c}else for(i=0;i<s.length;i++){if(o=s[i],c=o.instance,u=o.currentTarget,o=o.listener,c!==a&&r.isPropagationStopped())break e;a=o,r.currentTarget=u;try{a(r)}catch(d){Gf(d)}r.currentTarget=null,a=c}}}}function Ee(e,t){var n=t[lv];n===void 0&&(n=t[lv]=new Set);var s=e+"__bubble";n.has(s)||(M8(t,e,2,!1),n.add(s))}function W1(e,t,n){var s=0;t&&(s|=4),M8(n,e,s,t)}var Nd="_reactListening"+Math.random().toString(36).slice(2);function _y(e){if(!e[Nd]){e[Nd]=!0,w6.forEach(function(n){n!=="selectionchange"&&(EL.has(n)||W1(n,!1,e),W1(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Nd]||(t[Nd]=!0,W1("selectionchange",!1,t))}}function M8(e,t,n,s){switch(e7(t)){case 2:var r=kO;break;case 8:r=bO;break;default:r=Py}n=r.bind(null,t,n,e),r=void 0,!Yp||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 K1(e,t,n,s,r){var a=s;if(!(t&1)&&!(t&2)&&s!==null)e:for(;;){if(s===null)return;var i=s.tag;if(i===3||i===4){var o=s.stateNode.containerInfo;if(o===r)break;if(i===4)for(i=s.return;i!==null;){var c=i.tag;if((c===3||c===4)&&i.stateNode.containerInfo===r)return;i=i.return}for(;o!==null;){if(i=Qa(o),i===null)return;if(c=i.tag,c===5||c===6||c===26||c===27){s=a=i;continue e}o=o.parentNode}}s=s.return}N6(function(){var u=a,d=Y0(n),f=[];e:{var h=G6.get(e);if(h!==void 0){var p=rx,m=e;switch(e){case"keypress":if(Qd(n)===0)break e;case"keydown":case"keyup":p=dD;break;case"focusin":m="focus",p=E1;break;case"focusout":m="blur",p=E1;break;case"beforeblur":case"afterblur":p=E1;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=gv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=J_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=gD;break;case H6:case P6:case U6:p=nD;break;case F6:p=yD;break;case"scroll":case"scrollend":p=Y_;break;case"wheel":p=bD;break;case"copy":case"cut":case"paste":p=rD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=yv;break;case"submit":p=xD;break;case"toggle":case"beforetoggle":p=wD}var b=(t&4)!==0,y=!b&&(e==="scroll"||e==="scrollend"),g=b?h!==null?h+"Capture":null:h;b=[];for(var k=u,v;k!==null;){var w=k;if(v=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||v===null||g===null||(w=Vc(k,g),w!=null&&b.push(tu(k,w,v))),y)break;k=k.return}0<b.length&&(h=new p(h,m,null,n,d),f.push({event:h,listeners:b}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==Zp&&(m=n.relatedTarget||n.fromElement)&&(Qa(m)||m[Rl]))break e;(h||p)&&(m=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=u,p=p?Qa(p):null,p!==null&&(y=$u(p),b=p.tag,p!==y||b!==5&&b!==27&&b!==6)&&(p=null)):(h=null,p=u),h!==p&&(b=gv,w="onMouseLeave",g="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(b=yv,w="onPointerLeave",g="onPointerEnter",k="pointer"),y=h==null?m:fc(h),v=p==null?m:fc(p),m=new b(w,k+"leave",h,n,d),m.target=y,m.relatedTarget=v,w=null,Qa(d)===u&&(b=new b(g,k+"enter",p,n,d),b.target=v,b.relatedTarget=y,w=b),y=w,b=h&&p?Op(h,p,TL):null,h!==null&&x2(f,m,h,b,!1),p!==null&&y!==null&&x2(f,y,p,b,!0)))}e:{if(h=u?fc(u):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var j=wv;else if(vv(h))if(D6)j=AD;else{j=ND;var C=zD}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&Z0(u.elementType)&&(j=wv):j=MD;if(j&&(j=j(e,u))){_6(f,j,n,d);break e}C&&C(e,h,u)}switch(C=u?fc(u):window,e){case"focusin":(vv(C)||C.contentEditable==="true")&&(bo=C,Jp=u,vc=null);break;case"focusout":vc=Jp=bo=null;break;case"mousedown":eg=!0;break;case"contextmenu":case"mouseup":case"dragend":eg=!1,Ev(f,n,d);break;case"selectionchange":if(ID)break;case"keydown":case"keyup":Ev(f,n,d)}var $;if(ey)e:{switch(e){case"compositionstart":var E="onCompositionStart";break e;case"compositionend":E="onCompositionEnd";break e;case"compositionupdate":E="onCompositionUpdate";break e}E=void 0}else ko?R6(e,n)&&(E="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(E="onCompositionStart");E&&(A6&&n.locale!=="ko"&&(ko||E!=="onCompositionStart"?E==="onCompositionEnd"&&ko&&($=M6()):(na=d,Q0="value"in na?na.value:na.textContent,ko=!0)),C=fh(u,E),0<C.length&&(E=new mv(E,e,null,n,d),f.push({event:E,listeners:C}),$?E.data=$:($=I6(n),$!==null&&(E.data=$)))),($=SD?CD(e,n):$D(e,n))&&(E=fh(u,"onBeforeInput"),0<E.length&&(C=new mv("onBeforeInput","beforeinput",null,n,d),f.push({event:C,listeners:E}),C.data=$)),SL(f,e,u,n,d)}N8(f,t)})}function tu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function fh(e,t){for(var n=t+"Capture",s=[];e!==null;){var r=e,a=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||a===null||(r=Vc(e,n),r!=null&&s.unshift(tu(e,r,a)),r=Vc(e,t),r!=null&&s.push(tu(e,r,a))),e.tag===3)return s;e=e.return}return[]}function TL(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function x2(e,t,n,s,r){for(var a=t._reactName,i=[];n!==null&&n!==s;){var o=n,c=o.alternate,u=o.stateNode;if(o=o.tag,c!==null&&c===s)break;o!==5&&o!==26&&o!==27||u===null||(c=u,r?(u=Vc(n,a),u!=null&&i.unshift(tu(n,u,c))):r||(u=Vc(n,a),u!=null&&i.push(tu(n,u,c)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var zL=/\r\n?/g,NL=/\u0000|\uFFFD/g;function p2(e){return(typeof e=="string"?e:""+e).replace(zL,`
190
- `).replace(NL,"")}function A8(e,t){return t=p2(t),p2(e)===t}function qe(e,t,n,s,r,a){switch(n){case"children":if(typeof s=="string")t==="body"||t==="textarea"&&s===""||ll(e,s);else if(typeof s=="number"||typeof s=="bigint")t!=="body"&&ll(e,""+s);else return;break;case"className":bd(e,"class",s);break;case"tabIndex":bd(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":bd(e,n,s);break;case"style":z6(e,s,a);return;case"data":if(t!=="object"){bd(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=Zd(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 a=="function"&&(n==="formAction"?(t!=="input"&&qe(e,t,"name",r.name,r,null),qe(e,t,"formEncType",r.formEncType,r,null),qe(e,t,"formMethod",r.formMethod,r,null),qe(e,t,"formTarget",r.formTarget,r,null)):(qe(e,t,"encType",r.encType,r,null),qe(e,t,"method",r.method,r,null),qe(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(n);break}s=Zd(s),e.setAttribute(n,s);break;case"onClick":s!=null&&(e.onclick=Zs);return;case"onScroll":s!=null&&Ee("scroll",e);return;case"onScrollEnd":s!=null&&Ee("scrollend",e);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(W(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(W(60));(a!=null?a.__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=Zd(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":Ee("beforetoggle",e),Ee("toggle",e),Xd(e,"popover",s);break;case"xlinkActuate":or(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":or(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":or(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":or(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":or(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":or(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":or(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":or(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":or(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Xd(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=X_.get(n)||n,Xd(e,n,s);else return}Ie=!0}function Lg(e,t,n,s,r,a){switch(n){case"style":z6(e,s,a);return;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(W(61));if(n=s.__html,n!=null){if(r.children!=null)throw Error(W(60));(a!=null?a.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof s=="string")ll(e,s);else if(typeof s=="number"||typeof s=="bigint")ll(e,""+s);else return;break;case"onScroll":s!=null&&Ee("scroll",e);return;case"onScrollEnd":s!=null&&Ee("scrollend",e);return;case"onClick":s!=null&&(e.onclick=Zs);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!j6.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),a=n.slice(2,r?n.length-7:void 0),t=e[zn]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(a,t,r),typeof s=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(a,s,r);break e}Ie=!0,n in e?e[n]=s:s===!0?e.setAttribute(n,""):Xd(e,n,s)}return}Ie=!0}function Zt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ee("error",e),Ee("load",e);var s=!1,r=!1,a;for(a in n)if(n.hasOwnProperty(a)){var i=n[a];if(i!=null)switch(a){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(W(137,t));default:qe(e,t,a,i,n,null)}}r&&qe(e,t,"srcSet",n.srcSet,n,null),s&&qe(e,t,"src",n.src,n,null);return;case"input":Ee("invalid",e);var o=a=i=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":i=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":a=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(W(137,t));break;default:qe(e,t,s,d,n,null)}}$6(e,a,o,c,u,i,r,!1);return;case"select":Ee("invalid",e),s=i=a=null;for(r in n)if(n.hasOwnProperty(r)&&(o=n[r],o!=null))switch(r){case"value":a=o;break;case"defaultValue":i=o;break;case"multiple":s=o;default:qe(e,t,r,o,n,null)}t=a,n=i,e.multiple=!!s,t!=null?Ao(e,!!s,t,!1):n!=null&&Ao(e,!!s,n,!0);return;case"textarea":Ee("invalid",e),a=r=s=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":s=o;break;case"defaultValue":r=o;break;case"children":a=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(W(91));break;default:qe(e,t,i,o,n,null)}T6(e,s,r,a);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:qe(e,t,c,s,n,null)}return;case"dialog":Ee("beforetoggle",e),Ee("toggle",e),Ee("cancel",e),Ee("close",e);break;case"iframe":case"object":Ee("load",e);break;case"video":case"audio":for(s=0;s<eu.length;s++)Ee(eu[s],e);break;case"image":Ee("error",e),Ee("load",e);break;case"details":Ee("toggle",e);break;case"embed":case"source":case"link":Ee("error",e),Ee("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(W(137,t));default:qe(e,t,u,s,n,null)}return;default:if(Z0(t)){for(d in n)n.hasOwnProperty(d)&&(s=n[d],s!==void 0&&Lg(e,t,d,s,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!=null&&qe(e,t,o,s,n,null))}var ML={};function AL(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,a=null,i=null,o=null,c=null,u=null,d=null;for(p in n){var f=n[p];if(n.hasOwnProperty(p)&&f!=null)switch(p){case"checked":break;case"value":break;case"defaultValue":c=f;default:s.hasOwnProperty(p)||qe(e,t,p,null,s,f)}}for(var h in s){var p=s[h];if(f=n[h],s.hasOwnProperty(h)&&(p!=null||f!=null))switch(h){case"type":p!==f&&(Ie=!0),a=p;break;case"name":p!==f&&(Ie=!0),r=p;break;case"checked":p!==f&&(Ie=!0),u=p;break;case"defaultChecked":p!==f&&(Ie=!0),d=p;break;case"value":p!==f&&(Ie=!0),i=p;break;case"defaultValue":p!==f&&(Ie=!0),o=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(W(137,t));break;default:p!==f&&qe(e,t,h,p,s,f)}}Xp(e,i,o,c,u,d,a,r);return;case"select":p=i=o=h=null;for(a in n)if(c=n[a],n.hasOwnProperty(a)&&c!=null)switch(a){case"value":break;case"multiple":p=c;default:s.hasOwnProperty(a)||qe(e,t,a,null,s,c)}for(r in s)if(a=s[r],c=n[r],s.hasOwnProperty(r)&&(a!=null||c!=null))switch(r){case"value":a!==c&&(Ie=!0),h=a;break;case"defaultValue":a!==c&&(Ie=!0),o=a;break;case"multiple":a!==c&&(Ie=!0),i=a;default:a!==c&&qe(e,t,r,a,s,c)}t=o,n=i,s=p,h!=null?Ao(e,!!n,h,!1):!!s!=!!n&&(t!=null?Ao(e,!!n,t,!0):Ao(e,!!n,n?[]:"",!1));return;case"textarea":p=h=null;for(o in n)if(r=n[o],n.hasOwnProperty(o)&&r!=null&&!s.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:qe(e,t,o,null,s,r)}for(i in s)if(r=s[i],a=n[i],s.hasOwnProperty(i)&&(r!=null||a!=null))switch(i){case"value":r!==a&&(Ie=!0),h=r;break;case"defaultValue":r!==a&&(Ie=!0),p=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(W(91));break;default:r!==a&&qe(e,t,i,r,s,a)}E6(e,h,p);return;case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&h!=null&&!s.hasOwnProperty(m))switch(m){case"selected":e.selected=!1;break;default:qe(e,t,m,null,s,h)}for(c in s)if(h=s[c],p=n[c],s.hasOwnProperty(c)&&h!==p&&(h!=null||p!=null))switch(c){case"selected":h!==p&&(Ie=!0),e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:qe(e,t,c,h,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)h=n[b],n.hasOwnProperty(b)&&h!=null&&!s.hasOwnProperty(b)&&qe(e,t,b,null,s,h);for(u in s)if(h=s[u],p=n[u],s.hasOwnProperty(u)&&h!==p&&(h!=null||p!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(W(137,t));break;default:qe(e,t,u,h,s,p)}return;default:if(Z0(t)){for(var y in n)h=n[y],n.hasOwnProperty(y)&&h!==void 0&&!s.hasOwnProperty(y)&&Lg(e,t,y,void 0,s,h);for(d in s)h=s[d],p=n[d],!s.hasOwnProperty(d)||h===p||h===void 0&&p===void 0||Lg(e,t,d,h,s,p);return}}for(var g in n)h=n[g],n.hasOwnProperty(g)&&h!=null&&!s.hasOwnProperty(g)&&qe(e,t,g,null,s,h);for(f in s)h=s[f],p=n[f],!s.hasOwnProperty(f)||h===p||h==null&&p==null||qe(e,t,f,h,s,p)}function g2(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function RL(){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],a=r.transferSize,i=r.initiatorType,o=r.duration;if(a&&o&&g2(i)){for(i=0,o=r.responseEnd,s+=1;s<n.length;s++){var c=n[s],u=c.startTime;if(u>o)break;var d=c.transferSize,f=c.initiatorType;d&&g2(f)&&(c=c.responseEnd,i+=d*(c<o?1:(o-u)/(c-u)))}if(--s,t+=8*(a+i)/(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 Og=null,Bg=null;function nu(e){return e.nodeType===9?e:e.ownerDocument}function m2(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 R8(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 I8(e,t,n,s){return n=nu(n).createElement(e),n[Vt]=s,n[zn]=t,Zt(n,e,t),_t(n),n}function qg(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 X1=null;function IL(){var e=window.event;return e&&e.type==="popstate"?e===X1?!1:(X1=e,!0):(X1=null,!1)}var Dy=typeof setTimeout=="function"?setTimeout:void 0,_L=typeof clearTimeout=="function"?clearTimeout:void 0,y2=typeof Promise=="function"?Promise:void 0,k2=typeof requestAnimationFrame=="function"?requestAnimationFrame:Dy,DL=typeof queueMicrotask=="function"?queueMicrotask:typeof y2<"u"?function(e){return y2.resolve(null).then(e).catch(LL)}:Dy;function LL(e){setTimeout(function(){throw e})}function Ta(e){return e==="head"}function b2(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),yl(t);return}s--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")s++;else if(n==="html")Y1(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Y1(n);for(var a=n.firstChild;a;){var i=a.nextSibling,o=a.nodeName;a[Nu]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=i}}else n==="body"&&Y1(e.ownerDocument.body);n=r}while(n);yl(t)}function v2(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 _8(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 a=t[r];0<a.width&&0<a.height&&s++}s===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function D8(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 OL(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 Hg(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return OL(t,n,e)}function BL(e){return e.documentElement.clientHeight}function qL(e){this.addEventListener("load",e),this.addEventListener("error",e)}function HL(e,t,n,s,r,a,i,o,c){var u=t.nodeType===9?t:t.ownerDocument;try{var d=u.startViewTransition({update:function(){var h=u.defaultView,p=h.navigation&&h.navigation.transition,m=u.fonts.status;s();var b=[];if(m==="loaded"&&(BL(u),u.fonts.status==="loading"&&b.push(u.fonts.ready)),m=b.length,e!==null)for(var y=e.suspenseyImages,g=0,k=0;k<y.length;k++){var v=y[k];if(!v.complete){var w=v.getBoundingClientRect();if(0<w.bottom&&0<w.right&&w.top<h.innerHeight&&w.left<h.innerWidth){if(g+=K8(v),g>ff){b.length=m;break}v=new Promise(qL.bind(v)),b.push(v)}}}if(0<b.length)return h=Promise.race([Promise.all(b),new Promise(function(j){return setTimeout(j,500)})]).then(r,r),(p?Promise.allSettled([p.finished,h]):h).then(a,a);if(r(),p)return p.finished.then(a,a);a()},types:n});u.__reactViewTransition=d;var f=[];return d.ready.then(function(){for(var h=u.documentElement.getAnimations({subtree:!0}),p=0;p<h.length;p++){var m=h[p],b=m.effect,y=b.pseudoElement;if(y!=null&&y.startsWith("::view-transition")){f.push(m),m=b.getKeyframes();for(var g=y=void 0,k=!0,v=0;v<m.length;v++){var w=m[v],j=w.width;if(y===void 0)y=j;else if(y!==j){k=!1;break}if(j=w.height,g===void 0)g=j;else if(g!==j){k=!1;break}delete w.width,delete w.height,w.transform==="none"&&delete w.transform}k&&y!==void 0&&g!==void 0&&(b.setKeyframes(m),k=getComputedStyle(b.target,b.pseudoElement),k.width!==y||k.height!==g)&&(k=m[0],k.width=y,k.height=g,k=m[m.length-1],k.width=y,k.height=g,b.setKeyframes(m))}}i()},function(h){u.__reactViewTransition===d&&(u.__reactViewTransition=null);try{if(typeof h=="object"&&h!==null)switch(h.name){case"InvalidStateError":(h.message==="View transition was skipped because document visibility state is hidden."||h.message==="Skipping view transition because document visibility state has become hidden."||h.message==="Skipping view transition because viewport size changed."||h.message==="Transition was aborted because of invalid state")&&(h=null)}h!==null&&c(h)}finally{s(),r(),i()}}),d.finished.finally(function(){for(var h=0;h<f.length;h++)f[h].cancel();u.__reactViewTransition===d&&(u.__reactViewTransition=null),o()}),d}catch{return s(),r(),i(),null}}function Ja(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Ja.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Xe({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};Ja.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),s=[],r=0;r<n.length;r++){var a=n[r].effect;a!==null&&a.target===e&&a.pseudoElement===t&&s.push(n[r])}return s};Ja.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function L8(e){return{name:e,group:new Ja("group",e),imagePair:new Ja("image-pair",e),old:new Ja("old",e),new:new Ja("new",e)}}function Yn(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Yn.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 a=this._eventListeners;if(O8(a,e,t,n)===-1){var i=this,o=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(o=function(c){i.removeEventListener(e,t,n),typeof t=="function"?t.call(this,c):t.handleEvent(c)}),s!==null&&(r=i.removeEventListener.bind(i,e,t,n),s.addEventListener("abort",r,{once:!0}),r=s.removeEventListener.bind(s,"abort",r)),s=xl(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:o,cleanup:r}),Tn(this._fragmentFiber.child,!1,PL,e,o,s)}this._eventListeners=a}};function PL(e,t,n,s){return St(e).addEventListener(t,n,s),!1}Yn.prototype.removeEventListener=function(e,t,n){var s=this._eventListeners;if(s!==null&&(t=O8(s,e,t,n),t!==-1)){var r=s[t];n=r.attachedListener;var a=r.cleanup;r=xl(r.optionsOrUseCapture),Tn(this._fragmentFiber.child,!1,UL,e,n,r),s.splice(t,1),a!==null&&a()}};function UL(e,t,n,s){return St(e).removeEventListener(t,n,s),!1}function xl(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function w2(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function O8(e,t,n,s){if(e.length===0)return-1;s=w2(s);for(var r=0;r<e.length;r++){var a=e[r];if(a.type===t&&a.listener===n&&w2(a.optionsOrUseCapture)===s)return r}return-1}Yn.prototype.dispatchEvent=function(e){var t=Bi(this._fragmentFiber);if(t===null)return!0;t=St(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 a=n[r];s.addEventListener(a.type,a.attachedListener,xl(a.optionsOrUseCapture))}if(t.appendChild(s),e=s.dispatchEvent(e),n)for(r=0;r<n.length;r++)a=n[r],s.removeEventListener(a.type,a.attachedListener,xl(a.optionsOrUseCapture));return t.removeChild(s),e}return t.dispatchEvent(e)};Yn.prototype.focus=function(e){Tn(this._fragmentFiber.child,!0,B8,e,void 0,void 0)};function B8(e,t){return e.tag===6?!1:(e=St(e),tO(e,t))}Yn.prototype.focusLast=function(e){var t=[];Tn(this._fragmentFiber.child,!0,Ly,t,void 0,void 0);for(var n=t.length-1;0<=n&&!B8(t[n],e);n--);};function Ly(e,t){return t.push(e),!1}Yn.prototype.blur=function(){var e=Bi(this._fragmentFiber);e!==null&&(e=St(e),e=nu(e).activeElement,e!==null&&Tn(this._fragmentFiber.child,!1,FL,e,void 0,void 0))};function FL(e,t){return e.tag===6?!1:(e=St(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Yn.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),Tn(this._fragmentFiber.child,!1,GL,e,void 0,void 0)};function GL(e,t){return e.tag===6||(e=St(e),t.observe(e)),!1}Yn.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),Tn(this._fragmentFiber.child,!1,VL,e,void 0,void 0);for(var n=t=0;n<Ns.length;n++){var s=Ns[n];s.fragmentInstance===this&&s.observer===e?e.unobserve(s.instance):Ns[t++]=s}Ns.length=t}};function VL(e,t){return e.tag===6||(e=St(e),t.unobserve(e)),!1}var Ns=[],Z1=!1;function WL(e,t,n){Ns.push({fragmentInstance:e,observer:t,instance:n}),Z1||(Z1=!0,nO(function(){Z1=!1;var s=Ns;Ns=[];for(var r=0;r<s.length;r++){var a=s[r];a.observer.unobserve(a.instance)}}))}Yn.prototype.getClientRects=function(){var e=[];return Tn(this._fragmentFiber.child,!1,KL,e,void 0,void 0),e};function KL(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=St(e),t.push.apply(t,e.getClientRects());return!1}Yn.prototype.getRootNode=function(e){var t=Bi(this._fragmentFiber);return t===null?this:St(t).getRootNode(e)};Yn.prototype.compareDocumentPosition=function(e){var t=Bi(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];Tn(this._fragmentFiber.child,!1,Ly,n,void 0,void 0);var s=St(t);if(n.length===0){if(n=s,nv(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=l6(t)[1],n===null?r=Node.DOCUMENT_POSITION_PRECEDING:(e=St(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=St(n[0]),r=St(n[n.length-1]);var a=nv(this._fragmentFiber)?t.parentElement:s;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;s=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_CONTAINED_BY;var i=t.compareDocumentPosition(e),o=r.compareDocumentPosition(e),c=i&Node.DOCUMENT_POSITION_CONTAINED_BY||o&Node.DOCUMENT_POSITION_CONTAINED_BY;return o=s&&a&&i&Node.DOCUMENT_POSITION_FOLLOWING&&o&Node.DOCUMENT_POSITION_PRECEDING,t=s&&t===e||a&&r===e||c||o?Node.DOCUMENT_POSITION_CONTAINED_BY:!s&&t===e||!a&&r===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:i,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||XL(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function XL(e,t,n,s,r){var a=Qa(r);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)e:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break e}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=r.ownerDocument,r===a||r===a.documentElement||r===a.body;e:{for(a=t,t=Bi(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break e}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=Op(n,a,sv),t===null?t=!1:(Tn(t,!0,j_,a,n),a=po,po=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===s)&&(t=Op(s,a,sv),t===null?t=!1:(Tn(t,!0,S_,a,s),a=po,Lp=po=null,t=a!==null)),t):!1}function j2(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)}Yn.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(W(566));var t=[];Tn(this._fragmentFiber.child,!1,Ly,t,void 0,void 0);var n=e!==!1;if(t.length===0){var s=l6(this._fragmentFiber);if(s=n?s[1]||s[0]||Bi(this._fragmentFiber):s[0]||s[1],s===null)return;if(s.tag===6){e=St(s),j2(e,n);return}if(s=St(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=St(r),j2(r,n)):St(r).scrollIntoView(e),s+=n?-1:1}};function ZL(e,t){return e=St(e),q8(e,t),!1}function q8(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function H8(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,xl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(a){for(var i=0,o=0;o<Ns.length;o++){var c=Ns[o];(c.fragmentInstance!==t||c.observer!==a||c.instance!==e)&&(Ns[i++]=c)}Ns.length=i,a.observe(e)}),q8(e,t))}function YL(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,xl(r.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(a){typeof a.rootMargin=="string"?WL(t,a,e):a.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function Pg(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":Pg(n),sx(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function QL(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[Nu])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(a=e.getAttribute("rel"),a==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(a!==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(a=e.getAttribute("src"),(a!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=ds(e.nextSibling),e===null)break}return null}function JL(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=ds(e.nextSibling),e===null))return null;return e}function P8(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ds(e.nextSibling),e===null))return null;return e}function Ug(e){return e.data==="$?"||e.data==="$~"}function Oy(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function eO(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 ds(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 Fg=null;function S2(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return ds(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function C2(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 tO(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 nO(e){k2(function(){k2(function(t){return e(t)})})}function U8(e,t,n){switch(t=nu(n),e){case"html":if(e=t.documentElement,!e)throw Error(W(452));return e;case"head":if(e=t.head,!e)throw Error(W(453));return e;case"body":if(e=t.body,!e)throw Error(W(454));return e;default:throw Error(W(451))}}function F8(e,t,n){for(var s in n){var r=n[s];n.hasOwnProperty(s)&&r!=null&&qe(e,t,s,null,ML,r)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Zs&&(e.onclick=null),sx(e)}function Y1(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);sx(e)}var hs=new Map,$2=new Set;function su(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 Dr=De.d;De.d={f:sO,r:rO,D:aO,C:iO,L:oO,m:lO,X:uO,S:cO,M:dO};function sO(){var e=Dr.f(),t=mx();return e||t}function rO(e){var t=Il(e);t!==null&&t.tag===5&&t.type==="form"?zj(t):Dr.r(e)}var Ol=typeof document>"u"?null:document;function G8(e,t,n){var s=Ol;if(s&&typeof t=="string"&&t){var r=os(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),$2.has(r)||($2.add(r),e={rel:e,crossOrigin:n,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Zt(t,"link",e),_t(t),s.head.appendChild(t)))}}function aO(e){Dr.D(e),G8("dns-prefetch",e,null)}function iO(e,t){Dr.C(e,t),G8("preconnect",e,t)}function oO(e,t,n){Dr.L(e,t,n);var s=Ol;if(s&&e&&t){var r='link[rel="preload"][as="'+os(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+os(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+os(n.imageSizes)+'"]')):r+='[href="'+os(e)+'"]';var a=r;switch(t){case"style":a=pl(e);break;case"script":a=Bl(e)}if(!(hs.has(a)||(e=Xe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),hs.set(a,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Du(a))||t==="script"&&s.querySelector(Lu(a))))){var i=s.createElement("link");Zt(i,"link",e),t==="style"&&(i[Ff]=!0,i.onload=i.onerror=function(){v6(i)}),_t(i),s.head.appendChild(i)}}}function lO(e,t){Dr.m(e,t);var n=Ol;if(n&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+os(s)+'"][href="'+os(e)+'"]',a=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Bl(e)}if(!hs.has(a)&&(e=Xe({rel:"modulepreload",href:e},t),hs.set(a,e),n.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Lu(a)))return}s=n.createElement("link"),Zt(s,"link",e),_t(s),n.head.appendChild(s)}}}function cO(e,t,n){Dr.S(e,t,n);var s=Ol;if(s&&e){var r=Mo(s).hoistableStyles,a=pl(e);t=t||"default";var i=r.get(a);if(!i){var o={loading:0,preload:null};if(i=s.querySelector(Du(a)))o.loading=5;else{e=Xe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=hs.get(a))&&By(e,n);var c=i=s.createElement("link");_t(c),Zt(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){o.loading|=1}),c.addEventListener("error",function(){o.loading|=2}),o.loading|=4,uf(i,t,s)}i={type:"stylesheet",instance:i,count:1,state:o},r.set(a,i)}}}function uO(e,t){Dr.X(e,t);var n=Ol;if(n&&e){var s=Mo(n).hoistableScripts,r=Bl(e),a=s.get(r);a||(a=n.querySelector(Lu(r)),a||(e=Xe({src:e,async:!0},t),(t=hs.get(r))&&qy(e,t),a=n.createElement("script"),_t(a),Zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function dO(e,t){Dr.M(e,t);var n=Ol;if(n&&e){var s=Mo(n).hoistableScripts,r=Bl(e),a=s.get(r);a||(a=n.querySelector(Lu(r)),a||(e=Xe({src:e,async:!0,type:"module"},t),(t=hs.get(r))&&qy(e,t),a=n.createElement("script"),_t(a),Zt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},s.set(r,a))}}function E2(e,t,n,s){var r=(r=oa.current)?su(r):null;if(!r)throw Error(W(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=pl(n.href),t=Mo(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=pl(n.href);var a=Mo(r).hoistableStyles,i=a.get(e);if(i||(r=r.ownerDocument||r,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,i),(a=r.querySelector(Du(e)))?a._p||(i.instance=a,i.state.loading=5):(a=hs.get(e),a||(a={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hs.set(e,a)),fO(r,e,a,i.state))),t&&s===null)throw Error(W(528,""));return i}if(t&&s!==null)throw Error(W(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Bl(n),t=Mo(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(W(444,e))}}function pl(e){return'href="'+os(e)+'"'}function Du(e){return'link[rel="stylesheet"]['+e+"]"}function V8(e){return Xe({},e,{"data-precedence":e.precedence,precedence:null})}function fO(e,t,n,s){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Ff]!==!0){s.loading=1;return}}else t=e.createElement("link"),t[Ff]=!0,t.onload=t.onerror=v6.bind(null,t),Zt(t,"link",n),_t(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 Bl(e){return'[src="'+os(e)+'"]'}function Lu(e){return"script[async]"+e}function T2(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+os(n.href)+'"]');if(s)return t.instance=s,_t(s),s;var r=Xe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),_t(s),Zt(s,"style",r),uf(s,n.precedence,e),t.instance=s;case"stylesheet":r=pl(n.href);var a=e.querySelector(Du(r));if(a)return t.state.loading|=4,t.instance=a,_t(a),a;s=V8(n),(r=hs.get(r))&&By(s,r),a=(e.ownerDocument||e).createElement("link"),_t(a);var i=a;return i._p=new Promise(function(o,c){i.onload=o,i.onerror=c}),Zt(a,"link",s),t.state.loading|=4,uf(a,n.precedence,e),t.instance=a;case"script":return a=Bl(n.src),(r=e.querySelector(Lu(a)))?(t.instance=r,_t(r),r):(s=n,(r=hs.get(a))&&(s=Xe({},n),qy(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),_t(r),Zt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(W(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(s=t.instance,t.state.loading|=4,uf(s,n.precedence,e));return t.instance}function uf(e,t,n){for(var s=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,a=r,i=0;i<s.length;i++){var o=s[i];if(o.dataset.precedence===t)a=o;else if(a!==r)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function By(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qy(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var df=null;function z2(e,t,n){if(df===null){var s=new Map,r=df=new Map;r.set(n,s)}else r=df,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 a=n[r];if(!(a[Nu]||a[Vt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var i=a.getAttribute(t)||"";i=e+i;var o=s.get(i);o?o.push(a):s.set(i,[a])}}return s}function Gg(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function hO(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 N2(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function W8(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function K8(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function M2(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=K8(t),e.suspenseyImages.push(t)),e=gO.bind(e),t.decode().then(e,e))}function xO(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=pl(s.href),a=t.querySelector(Du(r));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ru.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,_t(a);return}a=t.ownerDocument||t,s=V8(s),(r=hs.get(r))&&By(s,r),a=a.createElement("link"),_t(a);var i=a;i._p=new Promise(function(o,c){i.onload=o,i.onerror=c}),Zt(a,"link",s),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ru.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var ff=0;function pO(e,t){return e.stylesheets&&e.count===0&&hf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var s=setTimeout(function(){if(e.stylesheets&&hf(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&ff===0&&(ff=62500*RL());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hf(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>ff?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function X8(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)hf(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ru(){this.count--,X8(this)}function gO(){this.imgCount--,X8(this)}var hh=null;function hf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,hh=new Map,t.forEach(mO,e),hh=null,ru.call(e))}function mO(e,t){if(!(t.state.loading&4)){var n=hh.get(e);if(n)var s=n.get(null);else{n=new Map,hh.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<r.length;a++){var i=r[a];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(n.set(i.dataset.precedence,i),s=i)}s&&n.set(null,s)}r=t.instance,i=r.getAttribute("data-precedence"),a=n.get(i)||s,a===s&&n.set(null,r),n.set(i,r),this.count++,s=ru.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),a?a.parentNode.insertBefore(r,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var gl={$$typeof:Xs,Provider:null,Consumer:null,_currentValue:ci,_currentValue2:ci,_threadCount:0};function yO(e,t,n,s,r,a,i,o,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=w1(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=w1(0),this.hiddenUpdates=w1(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function Z8(e,t,n,s,r,a,i,o,c,u,d,f){return e=new yO(e,t,n,i,c,u,d,f,o),t=1,a===!0&&(t|=24),a=Cn(3,null,null,t),e.current=a,a.stateNode=e,t=iy(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:s,isDehydrated:n,cache:t},cy(a),e}function Y8(e){return e?(e=jo,e):jo}function Q8(e,t,n,s,r,a){r=Y8(r),s.context===null?s.context=r:s.pendingContext=r,s=ca(t),s.payload={element:n},a=a===void 0?null:a,a!==null&&(s.callback=a),n=ua(e,s,t),n!==null&&($n(n,e,t),jc(n,e,t))}function A2(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Hy(e,t){A2(e,t),(e=e.alternate)&&A2(e,t)}function J8(e){if(e.tag===13||e.tag===31){var t=Pi(e,67108864);t!==null&&$n(t,e,67108864),Hy(e,67108864)}}function R2(e){if(e.tag===13||e.tag===31){var t=Kn();t=K0(t);var n=Pi(e,t);n!==null&&$n(n,e,t),Hy(e,t)}}var ml=!0;function kO(e,t,n,s){var r=ge.T;ge.T=null;var a=De.p;try{De.p=2,Py(e,t,n,s)}finally{De.p=a,ge.T=r}}function bO(e,t,n,s){var r=ge.T;ge.T=null;var a=De.p;try{De.p=8,Py(e,t,n,s)}finally{De.p=a,ge.T=r}}function Py(e,t,n,s){if(ml){var r=Vg(s);if(r===null)K1(e,t,s,xh,n),I2(e,s);else if(wO(r,e,t,n,s))s.stopPropagation();else if(I2(e,s),t&4&&-1<vO.indexOf(e)){for(;r!==null;){var a=Il(r);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var i=Pa(a.pendingLanes);if(i!==0){var o=a;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var c=1<<31-Wn(i);o.entanglements[1]|=c,i&=~c}ar(a),!(_e&6)&&(lh=Gn()+500,_u(0))}}break;case 31:case 13:o=Pi(a,2),o!==null&&$n(o,a,2),mx(),Hy(a,2)}if(a=Vg(s),a===null&&K1(e,t,s,xh,n),a===r)break;r=a}r!==null&&s.stopPropagation()}else K1(e,t,s,null,n)}}function Vg(e){return e=Y0(e),Uy(e)}var xh=null;function Uy(e){if(xh=null,e=Qa(e),e!==null){var t=$u(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=a6(t),e!==null)return e;e=null}else if(n===31){if(e=i6(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 xh=e,null}function e7(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(R_()){case f6:return 2;case h6:return 8;case Uf:case I_:return 32;case x6:return 268435456;default:return 32}default:return 32}}var Wg=!1,xa=null,pa=null,ga=null,au=new Map,iu=new Map,Qr=[],vO="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 I2(e,t){switch(e){case"focusin":case"focusout":xa=null;break;case"dragenter":case"dragleave":pa=null;break;case"mouseover":case"mouseout":ga=null;break;case"pointerover":case"pointerout":au.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":iu.delete(t.pointerId)}}function rc(e,t,n,s,r,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:s,nativeEvent:a,targetContainers:[r]},t!==null&&(t=Il(t),t!==null&&J8(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function wO(e,t,n,s,r){switch(t){case"focusin":return xa=rc(xa,e,t,n,s,r),!0;case"dragenter":return pa=rc(pa,e,t,n,s,r),!0;case"mouseover":return ga=rc(ga,e,t,n,s,r),!0;case"pointerover":var a=r.pointerId;return au.set(a,rc(au.get(a)||null,e,t,n,s,r)),!0;case"gotpointercapture":return a=r.pointerId,iu.set(a,rc(iu.get(a)||null,e,t,n,s,r)),!0}return!1}function t7(e){var t=Qa(e.target);if(t!==null){var n=$u(t);if(n!==null){if(t=n.tag,t===13){if(t=a6(n),t!==null){e.blockedOn=t,ov(e.priority,function(){R2(n)});return}}else if(t===31){if(t=i6(n),t!==null){e.blockedOn=t,ov(e.priority,function(){R2(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 xf(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vg(e.nativeEvent);if(n===null){n=e.nativeEvent;var s=new n.constructor(n.type,n);Zp=s,n.target.dispatchEvent(s),Zp=null}else return t=Il(n),t!==null&&J8(t),e.blockedOn=n,!1;t.shift()}return!0}function _2(e,t,n){xf(e)&&n.delete(t)}function jO(){Wg=!1,xa!==null&&xf(xa)&&(xa=null),pa!==null&&xf(pa)&&(pa=null),ga!==null&&xf(ga)&&(ga=null),au.forEach(_2),iu.forEach(_2)}function Md(e,t){e.blockedOn===t&&(e.blockedOn=null,Wg||(Wg=!0,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,jO)))}var Ad=null;function D2(e){Ad!==e&&(Ad=e,Ct.unstable_scheduleCallback(Ct.unstable_NormalPriority,function(){Ad===e&&(Ad=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(Uy(s||n)===null)continue;break}var a=Il(n);a!==null&&(e.splice(t,3),t-=3,fg(a,{pending:!0,data:r,method:n.method,action:s},s,r))}}))}function yl(e){function t(c){return Md(c,e)}xa!==null&&Md(xa,e),pa!==null&&Md(pa,e),ga!==null&&Md(ga,e),au.forEach(t),iu.forEach(t);for(var n=0;n<Qr.length;n++){var s=Qr[n];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Qr.length&&(n=Qr[0],n.blockedOn===null);)t7(n),n.blockedOn===null&&Qr.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(s=0;s<n.length;s+=3){var r=n[s],a=n[s+1],i=r[zn]||null;if(typeof a=="function")i||D2(n);else if(i){var o=null;if(a&&a.hasAttribute("formAction")){if(r=a,i=a[zn]||null)o=i.formAction;else if(Uy(r)!==null)continue}else o=i.action;typeof o=="function"?n[s+1]=o:(n.splice(s,3),s-=3),D2(n)}}}function n7(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(i){return r=i})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(n,20)}function n(){if(!s&&!navigation.transition){var a=navigation.currentEntry;a&&a.url!=null&&navigation.navigate(a.url,{state:a.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 Fy(e){this._internalRoot=e}bx.prototype.render=Fy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(W(409));var n=t.current,s=Kn();Q8(n,s,e,t,null,null)};bx.prototype.unmount=Fy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Q8(e.current,2,null,e,null,null),mx(),t[Rl]=null}};function bx(e){this._internalRoot=e}bx.prototype.unstable_scheduleHydration=function(e){if(e){var t=b6();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Qr.length&&t!==0&&t<Qr[n].priority;n++);Qr.splice(n,0,e),n===0&&t7(e)}};var L2=s6.version;if(L2!=="19.3.0")throw Error(W(527,L2,"19.3.0"));De.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(W(188)):(e=Object.keys(e).join(","),Error(W(268,e)));return e=w_(t),e=e!==null?o6(e):null,e=e===null?null:e.stateNode,e};var SO={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ge,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Rd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Rd.isDisabled&&Rd.supportsFiber)try{Eu=Rd.inject(SO),Vn=Rd}catch{}}tx.createRoot=function(e,t){if(!r6(e))throw Error(W(299));var n=!1,s="",r=Lj,a=Oj,i=Bj;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&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Z8(e,1,!1,null,null,n,s,null,r,a,i,n7),e[Rl]=t.current,_y(e),new Fy(t)};tx.hydrateRoot=function(e,t,n){if(!r6(e))throw Error(W(299));var s=!1,r="",a=Lj,i=Oj,o=Bj,c=null;return n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(i=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=Z8(e,1,!0,t,n??null,s,r,c,a,i,o,n7),t.context=Y8(null),n=t.current,s=Kn(),s=K0(s),r=ca(s),r.callback=null,ua(n,r,s),n=s,t.current.lanes=n,zu(t,n),ar(t),e[Rl]=t.current,_y(e),new bx(t)};tx.version="19.3.0";function s7(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s7)}catch(e){console.error(e)}}s7(),e6.exports=tx;var r7=e6.exports;let _n=null,O2=null;const B2=["data-theme",jn("theme")];function CO(e){const t=()=>{let s=null;for(const r of B2){const a=document.documentElement.getAttribute(r);a==null?e.removeAttribute(r):(e.setAttribute(r,a),r==="data-theme"&&(s=a))}s==="light"||s==="dark"?e.style.colorScheme=s:e.style.removeProperty("color-scheme")};t(),new MutationObserver(t).observe(document.documentElement,{attributes:!0,attributeFilter:[...B2]})}function $O(){if(_n)return _n;if(typeof document>"u")throw new Error("useToast: Cannot create fallback viewport during SSR. Wrap your app with <LayerProvider> or <AppShell>.");Xm();const e=document.createElement("div");e.setAttribute("data-astryx-toast-fallback",""),document.body.appendChild(e),CO(e);let t;const n=new Promise(i=>{t=i}),s=()=>{const i=x.use(Xh),o=x.useRef(!1);return x.useEffect(()=>{i&&!o.current&&(o.current=!0,_n=i,t==null||t(i))},[i]),null};O2=r7.createRoot(e),O2.render(l.jsx(x0,{children:l.jsx(s,{})}));const r=[],a={addToast:i=>{_n&&_n!==a?_n.addToast(i):(r.push(i),n.then(o=>{for(const c of r)o.addToast(c);r.length=0}))},removeToast:(i,o)=>{_n&&_n!==a&&_n.removeToast(i,o)},findByUniqueID:i=>{if(_n&&_n!==a)return _n.findByUniqueID(i)}};return _n=a,a}let EO=0;function TO(){return`astryx-toast-${++EO}`}function zO(){const e=x.use(Xh);return x.useCallback(n=>{const s=e??$O(),r=TO(),a={id:r,options:n,createdAt:Date.now()};return s.addToast(a),()=>s.removeToast(r,"manual")},[e])}const Q1={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}},NO={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 Ar({variant:e,label:t,isPulsing:n=!1,tooltip:s,xstyle:r,className:a,style:i,ref:o,...c}){const u=l.jsx("span",{ref:o,role:"img","aria-label":t,...U(P("statusdot",{variant:e}),B(Q1.base,NO[e],n&&Q1.pulsing,n&&Q1.reducedMotion,r),a,i),...c});return s?l.jsx(_i,{content:s,children:u}):u}Ar.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 MO=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 AO(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:MO(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 RO=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 IO=e=>{const t=RO(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 Kg=(...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 Ba={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 J1(e){return e!=null}function _O(e,t={}){var h,p;const n=t.attributeNames??{},s=m=>n[m]??m,r=e.size??e.width??Ba.width,a=e.size??e.height??Ba.height,i=((h=e.aliases)==null?void 0:h.filter(m=>typeof m=="string"&&m.trim()!=="").map(m=>`lucide-${m}`))??[],o=[...e.name?[`lucide-${e.name}`]:[],...i],c=((p=t.className)==null?void 0:p.split(" ").filter(Boolean))??[],u=t.includeDefaultClasses===!1?Kg(...c):Kg("lucide",...o,...c),d=t.absoluteStrokeWidth?Number(t.strokeWidth??Ba["stroke-width"])*Number(e.size??e.width??Ba.width)/Number(t.size??t.width??Ba.width):t.strokeWidth??Ba["stroke-width"];return["svg",{...Object.entries(Ba).reduce((m,[b,y])=>(m[s(b)]=y,m),{}),..."color"in t&&t.color&&{[s("stroke")]:t.color},..."size"in t&&J1(t.size)&&{[s("width")]:t.size,[s("height")]:t.size},..."width"in t&&J1(t.width)&&{[s("width")]:t.width},..."height"in t&&J1(t.height)&&{[s("height")]:t.height},[s("stroke-width")]:d,...u&&{[s("class")]:u},[s("viewBox")]:`0 0 ${r} ${a}`,...t.hasA11yProp===!1?{[s("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(m=>{const[b,y,g]=m,k=t.nonScalingStroke?{[s("vector-effect")]:"non-scaling-stroke",...y}:y;return g?[b,k,g]:[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 DO(e,t={}){return _O(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 LO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},OO=x.createContext({}),BO=()=>x.useContext(OO),qO=x.forwardRef(({color:e,size:t,width:n,height:s,strokeWidth:r,absoluteStrokeWidth:a,nonScalingStroke:i,className:o="",children:c,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},h)=>{const{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:b=!1,nonScalingStroke:y=!1,color:g="currentColor",className:k=""}=BO()??{},v=!!c||LO(f),[w,j,C=[]]=DO(d,{color:e??g,width:n??t??p,height:s??t??p,strokeWidth:r??m,absoluteStrokeWidth:a??b,nonScalingStroke:i??y,className:Kg(k,o),hasA11yProp:v,attributes:f});return x.createElement(w,{ref:h,...j},[...C.map(([$,E])=>x.createElement($,E)),...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 Ge(e,t=[],n=[]){const s=typeof e=="string"?AO(e,t,n):e,r=x.forwardRef(({className:a,...i},o)=>x.createElement(qO,{ref:o,icon:s,className:a,...i}));return s.name&&(r.displayName=IO(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 a7={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};a7.node;const HO=Ge(a7);/**
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 i7={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"}]]};i7.node;const PO=Ge(i7);/**
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 o7={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};o7.node;const UO=Ge(o7);/**
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 l7={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"}]]};l7.node;const FO=Ge(l7);/**
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 c7={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"}]]};c7.node;const GO=Ge(c7);/**
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 u7={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};u7.node;const VO=Ge(u7);/**
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 d7={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};d7.node;const WO=Ge(d7);/**
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 f7={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};f7.node;const KO=Ge(f7);/**
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 h7={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};h7.node;const XO=Ge(h7);/**
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 x7={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"}]]};x7.node;const ZO=Ge(x7);/**
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 p7={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"}]]};p7.node;const YO=Ge(p7);/**
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 g7={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"]};g7.node;const QO=Ge(g7);/**
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 m7={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"]};m7.node;const JO=Ge(m7);/**
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 y7={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};y7.node;const eB=Ge(y7);/**
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 k7={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"]};k7.node;const tB=Ge(k7);/**
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 b7={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"}]]};b7.node;const nB=Ge(b7);/**
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 v7={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"]};v7.node;const sB=Ge(v7);/**
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 w7={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"}]]};w7.node;const rB=Ge(w7);/**
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 j7={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"}]]};j7.node;const aB=Ge(j7);/**
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 S7={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"]};S7.node;const iB=Ge(S7);/**
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 C7={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"}]]};C7.node;const oB=Ge(C7);/**
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 $7={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};$7.node;const lB=Ge($7);/**
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 E7={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"}]]};E7.node;const cB=Ge(E7);/**
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 T7={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};T7.node;const uB=Ge(T7);/**
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 z7={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};z7.node;const dB=Ge(z7);/**
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 N7={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"]};N7.node;const fB=Ge(N7);/**
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 M7={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"}]]};M7.node;const hB=Ge(M7);/**
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 A7={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};A7.node;const xB=Ge(A7);var Ue={size:"1em","aria-hidden":!0},pB={close:l.jsx(xB,{...Ue}),chevronDown:l.jsx(WO,{...Ue}),chevronLeft:l.jsx(KO,{...Ue}),chevronRight:l.jsx(XO,{...Ue}),chevronsLeft:l.jsx(ZO,{...Ue}),chevronsRight:l.jsx(YO,{...Ue}),check:l.jsx(VO,{...Ue}),success:l.jsx(QO,{...Ue}),error:l.jsx(JO,{...Ue}),warning:l.jsx(fB,{...Ue}),info:l.jsx(oB,{...Ue}),calendar:l.jsx(FO,{...Ue}),clock:l.jsx(eB,{...Ue}),externalLink:l.jsx(rB,{...Ue}),menu:l.jsx(lB,{...Ue}),moreHorizontal:l.jsx(sB,{...Ue}),search:l.jsx(uB,{...Ue}),arrowUp:l.jsx(UO,{...Ue}),arrowDown:l.jsx(HO,{...Ue}),arrowsUpDown:l.jsx(PO,{...Ue}),funnel:l.jsx(iB,{...Ue}),eyeSlash:l.jsx(aB,{...Ue}),viewColumns:l.jsx(tB,{...Ue}),copy:l.jsx(nB,{...Ue}),checkDouble:l.jsx(GO,{...Ue}),wrench:l.jsx(hB,{...Ue}),stop:l.jsx(dB,{...Ue}),microphone:l.jsx(cB,{...Ue})};const gB={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:pB};function mB(e,t){const n=new Map(t.map(u=>[u.id,u])),s=new Map,r=new Map;for(const u of e.conversations){if(u.archived===!0)continue;const d=u.home;if(d.kind==="project"&&!e.projects.some(h=>h.path===d.path))continue;const f=n.get(u.id);f!==void 0&&(r.set(u.id,u),s.set(u.id,{summary:f,children:[]}))}for(const u of t){const d=[u];let f=u;for(;!r.has(f.id);){const h=f.parent===void 0?void 0:n.get(f.parent);if(h===void 0||d.includes(h))break;d.push(h),f=h}if(r.has(f.id))for(let h=d.length-1;h>=0;h--){const p=d[h];if(s.has(p.id)||s.set(p.id,{summary:p,children:[]}),h<d.length-1){const m=s.get(d[h+1].id),b=s.get(p.id);m.children.includes(b)||m.children.push(b)}}}const a=(u,d)=>u.summary.id-d.summary.id,i=u=>o(s.get(u.id)),o=u=>({summary:u.summary,children:[...u.children].sort(a).map(o)}),c=[...r.values()].sort((u,d)=>d.createdAt-u.createdAt);return{chats:c.filter(u=>u.home.kind==="chat").map(i),projects:[...e.projects].sort((u,d)=>d.addedAt-u.addedAt).map(u=>({project:u,conversations:c.filter(d=>d.home.kind==="project"&&d.home.path===u.path).map(i)}))}}function Sr(e,t){const n=s=>{for(const r of s){if(r.summary.id===t)return r;const a=n(r.children);if(a!==void 0)return a}};return n([...e.chats,...e.projects.flatMap(s=>s.conversations)])}function yB(e,t,n){var o,c;const s=(o=e.checkouts)==null?void 0:o.find(u=>u.conversationId===n);if(s!==void 0)return s;const r=new Map(t.map(u=>[u.id,u])),a=new Set;let i=r.get(n);for(;i!==void 0&&!a.has(i.id);){a.add(i.id);const u=(c=e.checkouts)==null?void 0:c.find(d=>d.conversationId===i.id);if(u!==void 0)return u;i=i.parent===void 0?void 0:r.get(i.parent)}}function kB(e,t,n){const s=e.conversations.find(o=>o.id===n);if(s!==void 0)return s.home;const r=new Map(t.map(o=>[o.id,o])),a=new Set;let i=r.get(n);for(;i!==void 0&&!a.has(i.id);){a.add(i.id);const o=e.conversations.find(c=>c.id===i.id);if(o!==void 0)return o.home;i=i.parent===void 0?void 0:r.get(i.parent)}}const q2={"needs-answer":3,failed:2,running:1};function bB(e){let t;const n=s=>{const r=s.summary.status;r!==void 0&&(t===void 0||q2[r]>q2[t])&&(t=r);for(const a of s.children)n(a)};return n(e),t}function vB(e){let t;const n=s=>{const r=s.summary.updatedAt;r!==void 0&&(t===void 0||r>t)&&(t=r);for(const a of s.children)n(a)};return n(e),t}function R7(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 wB=/^\s*in the working directory\s+\S+,\s*/i;function xs(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(wB,"").trim();return t===void 0||t===""?"Subagent":t}function I7(e,t){let n=Sr(e,t);for(let s=0;n!==void 0&&n.summary.parent!==void 0&&s<4;s++)n=Sr(e,n.summary.parent);return n}function _7(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 jB(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 _7(e)){const r=s.children.filter(a=>a.summary.kind==="subagent");r.length>0&&t.push({owner:s.summary,label:xs(s.summary),tasks:[...r]})}return t}function D7(e,t,n){var s;return(((s=Sr(e,t))==null?void 0:s.children)??[]).filter(r=>r.summary.forkedAt===n).map(r=>r.summary.id)}function kl(){typeof Notification>"u"||Notification.permission!=="default"||Notification.requestPermission()}const SB=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 CB(e,t){const n=[],s=[],r=new Map;for(const a of SB(t)){if(r.set(a.id,a.status),e===void 0)continue;const i=e.get(a.id);if(i!==a.status&&s.push(a.id),a.status==="needs-answer"&&i!=="needs-answer"){n.push({id:a.id,title:xs(a),body:"Waiting for your answer"});continue}(i==="running"||i==="needs-answer")&&(a.status===void 0||a.status==="failed")&&a.kind!=="subagent"&&n.push({id:a.id,title:xs(a),body:a.status==="failed"?"Failed":"Finished"})}if(e!==void 0)for(const a of e.keys())r.has(a)||s.push(a);return{notices:n,changed:s,baseline:r}}function $B(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:a,changed:i,baseline:o}=CB(n.current,e.organized);n.current=o;for(const u of i)(c=s.current.get(u))==null||c.close(),s.current.delete(u);if(!(typeof Notification>"u"||Notification.permission!=="granted"))for(const u of a){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 EB(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function TB(e){return typeof e=="string"||!Array.isArray(e)?0:e.filter(t=>t.type==="image").length}const zB=e=>e.docs["pi.live"]??{},L7=e=>e.docs["pi.agent"]??{};function NB(e){var r;const t=zB(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 MB(e){return(e.docs["pi.inbox"]??{items:[]}).items.map(n=>({id:n.id,mode:n.mode,text:n.mode==="write"?`<${String(n.entry.kind)}>`:EB(n.content),imageCount:n.mode==="write"?0:TB(n.content)}))}function AB(e){const t=e.state,n=t.status==="waiting"?`waiting on ${t.on.join(", ")}`:t.status==="completing"?`completing (${t.outcome})`:`${t.status} ${t.phase}`,s=[e.background?"background":"",e.abortRequested?"aborting":""].filter(Boolean),r=e.conversations.length>0?` owns conversation ${e.conversations.join(", ")}`:"";return`${e.kind} #${e.id}: ${n}${s.length>0?` [${s.join(", ")}]`:""}${r}`}function RB(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}))}function O7(e){const t=Object.values(e.tasks),n=new Set(t.flatMap(i=>i.conversations)),s=i=>t.filter(o=>o.owner===i.id||o.owner===void 0&&i.conversations.includes(o.conversationId)),r=[],a=(i,o)=>{r.push({id:i.id,depth:o,label:AB(i)});for(const c of s(i))a(c,o+1)};for(const i of t)i.owner===void 0&&!n.has(i.conversationId)&&a(i,0);return r}const IB="92px";function _B(e){var n;return(typeof document>"u"||(n=document.documentElement)==null?void 0:n.dataset.pinomadPlatform)==="darwin"?"darwin":"other"}function B7(e=_B()){return e==="darwin"?{platform:e,reserveMacTrafficLights:!0,safeLeft:IB}:{platform:e,reserveMacTrafficLights:!1,safeLeft:"0px"}}const DB={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},q7=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n,absoluteStrokeWidth:s=!1,className:r="",altIcon:a,showAlt:i=!1,icon:o,primaryColor:c,secondaryColor:u,disableSecondaryOpacity:d=!1,...f},h)=>{const p=n!==void 0?s?Number(n)*24/Number(t):n:void 0,m=p!==void 0?{strokeWidth:p,stroke:"currentColor"}:{},b={ref:h,...DB,width:t,height:t,color:c||e,className:r,...m,...f},g=[...i&&a?a:o].sort(([,k],[,v])=>{const w=k.opacity!==void 0;return v.opacity!==void 0?1:w?-1:0}).map(([k,v])=>{const w=v.opacity!==void 0,j=w&&!d?v.opacity:void 0,C=u?{...v.stroke!==void 0?{stroke:w?u:c||e}:{fill:w?u:c||e}}:{};return x.createElement(k,{...v,...m,...C,opacity:j,key:v.key})});return x.createElement("svg",b,g)});q7.displayName="HugeiconsIcon";const LB=[["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"}]],OB=[["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"}]],BB=[["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"}]],qB=[["path",{d:"M12 5.5V19",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M18 11C18 11 13.5811 5.00001 12 5C10.4188 4.99999 6 11 6 11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],HB=[["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"}]],PB=[["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"}]],UB=[["path",{d:"M18 9.00005C18 9.00005 13.5811 15 12 15C10.4188 15 6 9 6 9",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],FB=[["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"}]],GB=[["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"}]],VB=[["path",{d:"M7.5 7.5L8.72654 8.55719C9.24218 9.00163 9.5 9.22386 9.5 9.5C9.5 9.77614 9.24218 9.99836 8.72654 10.4428L7.5 11.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M11.5 12.5H15.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 21C15.7497 21 17.6246 21 18.9389 20.0451C19.3634 19.7367 19.7367 19.3634 20.0451 18.9389C21 17.6246 21 15.7497 21 12C21 8.25027 21 6.3754 20.0451 5.06107C19.7367 4.6366 19.3634 4.26331 18.9389 3.95491C17.6246 3 15.7497 3 12 3C8.25027 3 6.3754 3 5.06107 3.95491C4.6366 4.26331 4.26331 4.6366 3.95491 5.06107C3 6.3754 3 8.25027 3 12C3 15.7497 3 17.6246 3.95491 18.9389C4.26331 19.3634 4.6366 19.7367 5.06107 20.0451C6.3754 21 8.25027 21 12 21Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],WB=[["path",{d:"M9 15C9 12.1716 9 10.7574 9.87868 9.87868C10.7574 9 12.1716 9 15 9L16 9C18.8284 9 20.2426 9 21.1213 9.87868C22 10.7574 22 12.1716 22 15V16C22 18.8284 22 20.2426 21.1213 21.1213C20.2426 22 18.8284 22 16 22H15C12.1716 22 10.7574 22 9.87868 21.1213C9 20.2426 9 18.8284 9 16L9 15Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M16.9999 9C16.9975 6.04291 16.9528 4.51121 16.092 3.46243C15.9258 3.25989 15.7401 3.07418 15.5376 2.90796C14.4312 2 12.7875 2 9.5 2C6.21252 2 4.56878 2 3.46243 2.90796C3.25989 3.07417 3.07418 3.25989 2.90796 3.46243C2 4.56878 2 6.21252 2 9.5C2 12.7875 2 14.4312 2.90796 15.5376C3.07417 15.7401 3.25989 15.9258 3.46243 16.092C4.51121 16.9528 6.04291 16.9975 9 16.9999",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],KB=[["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"}]],XB=[["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"}]],ZB=[["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"}]],YB=[["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"}]],QB=[["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"}]],JB=[["path",{d:"M16.2627 10.5H7.73725C5.15571 10.5 3.86494 10.5 3.27143 11.3526C2.67793 12.2052 3.11904 13.4258 4.00126 15.867L5.08545 18.867C5.54545 20.1398 5.77545 20.7763 6.2889 21.1381C6.80235 21.5 7.47538 21.5 8.82143 21.5H15.1786C16.5246 21.5 17.1976 21.5 17.7111 21.1381C18.2245 20.7763 18.4545 20.1398 18.9146 18.867L19.9987 15.867C20.881 13.4258 21.3221 12.2052 20.7286 11.3526C20.1351 10.5 18.8443 10.5 16.2627 10.5Z",stroke:"currentColor",strokeLinecap:"square",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 8C19 7.53406 19 7.30109 18.9239 7.11732C18.8224 6.87229 18.6277 6.67761 18.3827 6.57612C18.1989 6.5 17.9659 6.5 17.5 6.5H6.5C6.03406 6.5 5.80109 6.5 5.61732 6.57612C5.37229 6.67761 5.17761 6.87229 5.07612 7.11732C5 7.30109 5 7.53406 5 8",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M16.5 4C16.5 3.53406 16.5 3.30109 16.4239 3.11732C16.3224 2.87229 16.1277 2.67761 15.8827 2.57612C15.6989 2.5 15.4659 2.5 15 2.5H9C8.53406 2.5 8.30109 2.5 8.11732 2.57612C7.87229 2.67761 7.67761 2.87229 7.57612 3.11732C7.5 3.30109 7.5 3.53406 7.5 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}]],eq=[["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"}]],tq=[["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"}]],nq=[["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"}]],sq=[["path",{d:"M15.5 14.5C18.8137 14.5 21.5 11.8137 21.5 8.5C21.5 5.18629 18.8137 2.5 15.5 2.5C12.1863 2.5 9.5 5.18629 9.5 8.5C9.5 9.38041 9.68962 10.2165 10.0303 10.9697L2.5 18.5V21.5H5.5V19.5H7.5V17.5H9.5L13.0303 13.9697C13.7835 14.3104 14.6196 14.5 15.5 14.5Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M17.5 6.5L16.5 7.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],rq=[["path",{d:"M12 8H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M12 12H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M12 20H17",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"2"}],["path",{d:"M12 16H21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"3"}],["path",{d:"M3 4V11C3 12.8692 3 13.8038 3.40192 14.5C3.66523 14.9561 4.04394 15.3348 4.5 15.5981C5.19615 16 6.13077 16 8 16",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"4"}],["path",{d:"M8 8H7C6.07003 8 5.60504 8 5.22354 7.89778C4.18827 7.62038 3.37962 6.81173 3.10222 5.77646C3 5.39496 3 4.92997 3 4",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"5"}]],aq=[["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"}]],iq=[["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"}]],oq=[["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"}]],lq=[["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"}]],cq=[["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"}]],uq=[["path",{d:"M17 17L21 21",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}],["path",{d:"M19 11C19 6.58172 15.4183 3 11 3C6.58172 3 3 6.58172 3 11C3 15.4183 6.58172 19 11 19C15.4183 19 19 15.4183 19 11Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"1"}]],dq=[["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"}]],fq=[["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"}]],hq=[["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"}]],xq=[["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"}]],pq=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],gq=[["path",{d:"M20.3584 13.3567C19.1689 14.546 16.9308 14.4998 13.4992 14.4998C11.2914 14.4998 9.50138 12.7071 9.50024 10.4993C9.50024 7.07001 9.454 4.83065 10.6435 3.64138C11.8329 2.45212 12.3583 2.50027 17.6274 2.50027C18.1366 2.49809 18.3929 3.11389 18.0329 3.47394L15.3199 6.18714C14.6313 6.87582 14.6294 7.99233 15.3181 8.68092C16.0068 9.36952 17.1234 9.36959 17.8122 8.68109L20.5259 5.96855C20.886 5.60859 21.5019 5.86483 21.4997 6.37395C21.4997 11.6422 21.5479 12.1675 20.3584 13.3567Z",stroke:"currentColor",strokeWidth:"1.5",key:"0"}],["path",{d:"M13.5 14.5L7.32842 20.6716C6.22386 21.7761 4.433 21.7761 3.32843 20.6716C2.22386 19.567 2.22386 17.7761 3.32843 16.6716L9.5 10.5",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.5",key:"1"}],["path",{d:"M5.50896 18.5H5.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",key:"2"}]],mq=1.5;function Ae(e){return function(n){return l.jsx(q7,{color:"currentColor",icon:e,strokeWidth:mq,...n})}}const yq=Ae(OB),H7=Ae(BB),P7=Ae(qB),kq=Ae(cq),pf=Ae(PB),bq=Ae(HB),U7=Ae(UB),Sa=Ae(FB),H2=Ae(pq),ou=Ae(GB),vq=Ae(WB),F7=Ae(XB),G7=Ae(ZB),lu=Ae(YB),Xg=Ae(JB),wq=Ae(QB),Zg=Ae(eq),jq=Ae(tq),Sq=Ae(nq),Cq=Ae(sq),$q=Ae(rq),Ou=Ae(aq),V7=Ae(iq),Ho=Ae(LB),Eq=Ae(oq),Tq=Ae(lq),zq=Ae(uq),Nq=Ae(dq),Mq=Ae(fq),W7=Ae(VB),Aq=Ae(hq),Rq=Ae(xq),Iq=Ae(KB),K7=Ae(gq);function Gy(e,t){return function({size:s=24,isAnimated:r=!0,className:a,ref:i,...o}){const c=x.useRef(null);return x.useImperativeHandle(i,()=>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 f=d.matches(":hover");const h=b=>{b.relatedTarget instanceof Node&&!b.relatedTarget.isConnected&&(f=!0)},p=b=>{f||b.pointerType!=="mouse"||b.buttons!==0||d.matches(":disabled, [aria-disabled='true']")||(f=!0,u.setAttribute("data-icon-hover",""))},m=()=>{f=!1,u.removeAttribute("data-icon-hover")};return d.addEventListener("pointerenter",h),d.addEventListener("pointermove",p),d.addEventListener("pointerleave",m),()=>{d.removeEventListener("pointerenter",h),d.removeEventListener("pointermove",p),d.removeEventListener("pointerleave",m),u.removeAttribute("data-icon-hover")}},[r]),l.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.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",className:`pigui-animated-icon ${a??""}`.trim(),"data-icon-motion":r?e:void 0,...o,children:t})}}const _q=Gy("new-chat",l.jsxs(l.Fragment,{children:[l.jsxs("g",{"data-icon-part":"bubble",children:[l.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"}),l.jsx("path",{d:"M8.5 15H15.5M8.5 10H12"})]}),l.jsx("path",{"data-icon-part":"add",d:"M15 5.5H22M18.5 2L18.5 9"})]})),X7=l.jsxs(l.Fragment,{children:[l.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"}),l.jsx("path",{"data-icon-part":"divider",d:"M9 3V21"})]}),Yg=Gy("sidebar",X7),Dq=Gy("sidebar",l.jsx("g",{transform:"translate(24 0) scale(-1 1)",children:X7}));function Z7(){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(i=>{r&&n(i)});const a=e.onStatus(i=>{r&&n(i)});return()=>{r=!1,a()}},[e]),!(e===void 0||t===void 0))return{status:t,check:()=>void e.check(),install:()=>void e.install()}}function Vy(e){const[t,n]=x.useState(()=>Date.now());return x.useEffect(()=>{const s=setInterval(()=>n(Date.now()),e);return()=>clearInterval(s)},[e]),t}function Lq(e,t){const n=t!=="/"&&(e===t||e.startsWith(`${t}/`)),s=n?t:"/",r=[{label:n?"~":"/",path:s}];let a=s==="/"?"":s;for(const i of e.slice(s.length).split("/"))i!==""&&(a=`${a}/${i}`,r.push({label:i,path:a}));return r}function Oq(e){if(e==="/")return;const t=e.lastIndexOf("/");return t===0?"/":e.slice(0,t)}const P2=e=>e instanceof Error?e.message:String(e);function Bq({remote:e,connected:t,onAdded:n,onClose:s}){const[r,a]=x.useState(void 0),[i,o]=x.useState(!0),[c,u]=x.useState(void 0),[d,f]=x.useState(void 0),[h,p]=x.useState(!1),m=x.useRef(!1);x.useEffect(()=>(m.current=!0,()=>{m.current=!1}),[]);const b=x.useRef(0),y=x.useRef(void 0),g=x.useCallback(j=>{const C=++b.current;y.current=j,o(!0),u(void 0),f(void 0),e.controller.listFolders(j).then($=>{!m.current||C!==b.current||(a($),o(!1))},$=>{!m.current||C!==b.current||(u(P2($)),o(!1))})},[e]);x.useEffect(()=>g(),[g]);const k=()=>{r!==void 0&&(p(!0),f(void 0),e.controller.addProject(r.path).then(j=>{m.current&&n(j)},j=>{m.current&&(p(!1),f(P2(j)))}))},v=r===void 0?[]:Lq(r.path,r.home),w=r===void 0?void 0:Oq(r.path);return l.jsx(Ls,{isOpen:!0,onOpenChange:j=>j?void 0:s(),purpose:"form",width:480,children:l.jsx(gs,{header:l.jsx(Os,{title:"Add project",subtitle:"Choose a folder on the host.",onOpenChange:()=>s()}),content:l.jsxs(ms,{children:[l.jsxs($e,{gap:1,vAlign:"center",children:[l.jsx(pn,{icon:l.jsx(P7,{"aria-hidden":"true"}),label:"Parent folder",tooltip:"Parent folder",size:"sm",variant:"ghost",isDisabled:w===void 0||h,onClick:()=>g(w)}),v.length===0?null:l.jsx(j3,{variant:"supporting",label:"Folders",separator:l.jsx(Sa,{"aria-hidden":"true",className:"size-3"}),children:v.map((j,C)=>l.jsx(z3,{isCurrent:C===v.length-1,onClick:C===v.length-1||h?void 0:()=>g(j.path),children:j.label},j.path))})]}),l.jsx("div",{className:"flex h-80 flex-col overflow-y-auto",children:i?l.jsx("div",{className:"flex flex-1 items-center justify-center",children:l.jsx(En,{"aria-label":"Loading folders"})}):c!==void 0?l.jsxs(ve,{gap:2,hAlign:"start",children:[l.jsx(se,{type:"supporting",children:c}),l.jsx(de,{label:"Try again",variant:"secondary",isDisabled:h,onClick:()=>g(y.current)})]}):r===void 0?null:r.folders.length===0?l.jsx(se,{type:"supporting",children:"No subfolders"}):l.jsx(kt,{density:"compact",children:r.folders.map(j=>l.jsx(We,{label:j.name,startContent:l.jsx(lu,{"aria-hidden":"true"}),endContent:l.jsx(Sa,{"aria-hidden":"true"}),isDisabled:h,onClick:()=>g(j.path)},j.path))})})]}),footer:l.jsx(Li,{children:l.jsxs($e,{gap:2,vAlign:"center",hAlign:"between",children:[d===void 0?l.jsx(se,{type:"supporting",maxLines:1,wordBreak:"break-all","data-testid":"picker-path",children:r==null?void 0:r.path}):l.jsx(se,{type:"supporting",role:"alert",maxLines:1,style:{color:"var(--danger)"},children:d}),l.jsxs($e,{gap:2,hAlign:"end",children:[l.jsx(de,{label:"Cancel",variant:"secondary",onClick:s}),l.jsx(de,{label:"Add project",variant:"primary",isDisabled:!t||r===void 0||i||h,onClick:k})]})]})})})})}function qq({project:e,remote:t,connected:n,onClose:s}){const r=()=>{t.controller.removeProject(e.path),s()};return l.jsx(Ls,{isOpen:!0,onOpenChange:a=>a?void 0:s(),purpose:"form",width:480,children:l.jsx(gs,{header:l.jsx(Os,{title:`Remove project ${e.name}?`,subtitle:"The directory and its conversations are kept; only the registration is removed.",onOpenChange:()=>s()}),content:l.jsx(ms,{}),footer:l.jsx(Li,{children:l.jsxs($e,{gap:2,hAlign:"end",children:[l.jsx(de,{label:"Cancel",variant:"secondary",onClick:s}),l.jsx(de,{label:"Remove project",variant:"primary",isDisabled:!n,onClick:r})]})})})})}function Hq({summary:e,remote:t,connected:n,onClose:s}){const r=xs(e),[a,i]=x.useState(r),[o,c]=x.useState(!1),[u,d]=x.useState(void 0),f=x.useRef(null);x.useEffect(()=>{var m;return(m=f.current)==null?void 0:m.select()},[]);const h=a.trim(),p=()=>{h===""||h===r||o||(c(!0),d(void 0),t.controller.renameConversation(e.id,h).then(()=>s(),m=>{c(!1),d(m instanceof Error?m.message:String(m))}))};return l.jsx(Ls,{isOpen:!0,onOpenChange:m=>m?void 0:s(),purpose:"form",width:480,children:l.jsx(gs,{header:l.jsx(Os,{title:"Rename conversation",onOpenChange:()=>s()}),content:l.jsxs(ms,{children:[l.jsx(Cr,{ref:f,label:"Title",value:a,onChange:i,onEnter:p,hasAutoFocus:!0,isDisabled:o}),u===void 0?null:l.jsx(se,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:u})]}),footer:l.jsx(Li,{children:l.jsxs($e,{gap:2,hAlign:"end",children:[l.jsx(de,{label:"Cancel",variant:"secondary",onClick:s}),l.jsx(de,{label:"Save",variant:"primary",isDisabled:!n||o||h===""||h===r,onClick:p})]})})})})}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function Qg(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const ph=e=>e?`"${e}" `:"";function Jg(e,t=""){if(typeof e!="boolean")throw new TypeError(ph(t)+"expected boolean, got type="+typeof e);return e}function Po(e,t=""){if(typeof e!="number")throw new TypeError(ph(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(ph(t)+"expected integer >= 0, got "+e);return e}function Dt(e,t,n=""){if(Qg(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Po(t,"length");const s=Qg(e),r=t!==void 0?` of length ${t}`:"",a=s?`length=${e.length}`:`type=${typeof e}`,i=ph(n)+"expected Uint8Array"+r+", got "+a;throw s?new RangeError(i):new TypeError(i)}const U2=(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 F2(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function Pq(e,t){Dt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function kr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function ma(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Uq(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Uo=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Fq(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function Gq(e){for(let t=0;t<e.length;t++)e[t]=Fq(e[t]);return e}const ei=Uo?e=>e:Gq;function Vq(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 Wq(e,t){if(Vq(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function Kq(e,t){return U2(e,"defaults"),U2(t,"opts"),Object.assign(e,t)}function Xq(e,t){if(e=Dt(e),t=Dt(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 Zq(e,t,n){const s=t,r=()=>[],a=(o,c)=>s(c,...r(o)).update(o).digest(),i=s(new Uint8Array(e),...r(new Uint8Array(0)));return a.outputLen=i.outputLen,a.blockLen=i.blockLen,a.create=(o,...c)=>s(o,...c),a}const Yq=(e,t)=>{function n(s,...r){if(Dt(s,void 0,"key"),e.nonceLength!==void 0){const f=r[0];Dt(f,e.varSizeNonce?void 0:e.nonceLength,"nonce")}const a=e.tagLength,i=e.nonceLength!==void 0?1:0;if(!e.withAAD){for(let f=i;f<r.length;f++)if(Qg(r[f]))throw new Error("AAD not supported")}e.withAAD&&r[i]!==void 0&&Dt(r[i],void 0,"AAD");const o=t(s,...r),c=(f,h)=>{if(h!==void 0){if(f!==2)throw new Error("cipher output not supported");Dt(h,void 0,"output")}};let u=!1;return{encrypt(f,h){if(u)throw new Error("cannot encrypt() twice with same key + nonce");return u=!0,Dt(f,void 0,"data"),c(o.encrypt.length,h),o.encrypt(f,h)},decrypt(f,h){if(Dt(f,void 0,"data"),a&&f.length<a)throw new Error('"ciphertext" expected length >= tagLength='+a);return c(o.decrypt.length,h),o.decrypt(f,h)}}}return Object.assign(n,e),n};function em(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(Dt(t,e,"output"),n&&!gh(t))throw new Error("invalid output, must be aligned");return t}function Qq(e,t,n){Po(e),Po(t),Jg(n);const s=new Uint8Array(16),r=Uq(s);return r.setBigUint64(0,BigInt(t),n),r.setBigUint64(8,BigInt(e),n),s}function gh(e){return e.byteOffset%4===0}function mh(e){return Uint8Array.from(Dt(e))}const Y7=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),Jq=ei(kr(Y7("expand 16-byte k"))),eH=ei(kr(Y7("expand 32-byte k")));function Re(e,t){return e<<t|e>>>32-t}const ac=64,tH=16,tm=2**32-1,G2=Uint32Array.of();function nH(e,t,n,s,r,a,i,o){const c=r.length,u=new Uint8Array(ac),d=kr(u),f=Uo&&gh(r)&&gh(a),h=f?kr(r):G2,p=f?kr(a):G2;if(!Uo){for(let m=0;m<c;i++){if(e(t,n,s,d,i,o),ei(d),i>=tm)throw new Error("arx: counter overflow");const b=Math.min(ac,c-m);for(let y=0,g;y<b;y++)g=m+y,a[g]=r[g]^u[y];m+=b}return}for(let m=0;m<c;i++){if(e(t,n,s,d,i,o),i>=tm)throw new Error("arx: counter overflow");const b=Math.min(ac,c-m);if(f&&b===ac){const y=m/4;if(m%4!==0)throw new Error("arx: invalid block position");for(let g=0,k;g<tH;g++)k=y+g,p[k]=h[k]^d[g];m+=ac;continue}for(let y=0,g;y<b;y++)g=m+y,a[g]=r[g]^u[y];m+=b}}function sH(e,t){const{allowShortKeys:n,extendNonceFn:s,counterLength:r,counterRight:a,rounds:i}=Kq({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return Po(r),Po(i),Jg(a),Jg(n),(o,c,u,d,f=0)=>{Dt(o,void 0,"key"),Dt(c,void 0,"nonce"),Dt(u,void 0,"data");const h=u.length,p=d!==void 0;if(d=em(h,d,!1),p&&Wq(u,d),Po(f),f<0||f>=tm)throw new Error("arx: counter overflow");const m=[];let b=o.length,y,g;if(b===32)m.push(y=mh(o)),g=eH;else if(b===16&&n)y=new Uint8Array(32),y.set(o),y.set(o,16),g=Jq,m.push(y);else throw Dt(o,32,"arx key"),new Error("invalid key size");(!Uo||!gh(c))&&m.push(c=mh(c));let k=kr(y);if(s){if(c.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const j=c.subarray(0,16);if(Uo)s(g,k,kr(j),k);else{const C=ei(Uint32Array.from(g));s(C,k,kr(j),k),ma(C),ei(k)}c=c.subarray(16)}else Uo||ei(k);const v=16-r;if(v!==c.length)throw new Error(`arx: nonce must be ${v} or 16 bytes`);if(v!==12){const j=new Uint8Array(12);j.set(c,a?0:12-c.length),c=j,m.push(c)}const w=ei(kr(c));try{return nH(e,g,k,w,u,d,f,i),d}finally{ma(...m)}}}function Ht(e,t){return e[t++]&255|(e[t++]&255)<<8}class rH{constructor(t){ee(this,"blockLen",16);ee(this,"outputLen",16);ee(this,"buffer",new Uint8Array(16));ee(this,"r",new Uint16Array(10));ee(this,"h",new Uint16Array(10));ee(this,"pad",new Uint16Array(8));ee(this,"pos",0);ee(this,"finished",!1);ee(this,"destroyed",!1);t=mh(Dt(t,32,"key"));const n=Ht(t,0),s=Ht(t,2),r=Ht(t,4),a=Ht(t,6),i=Ht(t,8),o=Ht(t,10),c=Ht(t,12),u=Ht(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|a<<9)&8191,this.r[4]=(a>>>4|i<<12)&255,this.r[5]=i>>>1&8190,this.r[6]=(i>>>14|o<<2)&8191,this.r[7]=(o>>>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]=Ht(t,16+2*d)}process(t,n,s=!1){const r=s?0:2048,{h:a,r:i}=this,o=i[0],c=i[1],u=i[2],d=i[3],f=i[4],h=i[5],p=i[6],m=i[7],b=i[8],y=i[9],g=Ht(t,n+0),k=Ht(t,n+2),v=Ht(t,n+4),w=Ht(t,n+6),j=Ht(t,n+8),C=Ht(t,n+10),$=Ht(t,n+12),E=Ht(t,n+14);let T=a[0]+(g&8191),S=a[1]+((g>>>13|k<<3)&8191),M=a[2]+((k>>>10|v<<6)&8191),z=a[3]+((v>>>7|w<<9)&8191),A=a[4]+((w>>>4|j<<12)&8191),R=a[5]+(j>>>1&8191),I=a[6]+((j>>>14|C<<2)&8191),N=a[7]+((C>>>11|$<<5)&8191),_=a[8]+(($>>>8|E<<8)&8191),L=a[9]+(E>>>5|r),D=0,O=D+T*o+S*(5*y)+M*(5*b)+z*(5*m)+A*(5*p);D=O>>>13,O&=8191,O+=R*(5*h)+I*(5*f)+N*(5*d)+_*(5*u)+L*(5*c),D+=O>>>13,O&=8191;let q=D+T*c+S*o+M*(5*y)+z*(5*b)+A*(5*m);D=q>>>13,q&=8191,q+=R*(5*p)+I*(5*h)+N*(5*f)+_*(5*d)+L*(5*u),D+=q>>>13,q&=8191;let F=D+T*u+S*c+M*o+z*(5*y)+A*(5*b);D=F>>>13,F&=8191,F+=R*(5*m)+I*(5*p)+N*(5*h)+_*(5*f)+L*(5*d),D+=F>>>13,F&=8191;let X=D+T*d+S*u+M*c+z*o+A*(5*y);D=X>>>13,X&=8191,X+=R*(5*b)+I*(5*m)+N*(5*p)+_*(5*h)+L*(5*f),D+=X>>>13,X&=8191;let J=D+T*f+S*d+M*u+z*c+A*o;D=J>>>13,J&=8191,J+=R*(5*y)+I*(5*b)+N*(5*m)+_*(5*p)+L*(5*h),D+=J>>>13,J&=8191;let Z=D+T*h+S*f+M*d+z*u+A*c;D=Z>>>13,Z&=8191,Z+=R*o+I*(5*y)+N*(5*b)+_*(5*m)+L*(5*p),D+=Z>>>13,Z&=8191;let te=D+T*p+S*h+M*f+z*d+A*u;D=te>>>13,te&=8191,te+=R*c+I*o+N*(5*y)+_*(5*b)+L*(5*m),D+=te>>>13,te&=8191;let Q=D+T*m+S*p+M*h+z*f+A*d;D=Q>>>13,Q&=8191,Q+=R*u+I*c+N*o+_*(5*y)+L*(5*b),D+=Q>>>13,Q&=8191;let K=D+T*b+S*m+M*p+z*h+A*f;D=K>>>13,K&=8191,K+=R*d+I*u+N*c+_*o+L*(5*y),D+=K>>>13,K&=8191;let re=D+T*y+S*b+M*m+z*p+A*h;D=re>>>13,re&=8191,re+=R*f+I*d+N*u+_*c+L*o,D+=re>>>13,re&=8191,D=(D<<2)+D|0,D=D+O|0,O=D&8191,D=D>>>13,q+=D,a[0]=O,a[1]=q,a[2]=F,a[3]=X,a[4]=J,a[5]=Z,a[6]=te,a[7]=Q,a[8]=K,a[9]=re}finalize(){const{h:t,pad:n}=this,s=new Uint16Array(10);let r=t[1]>>>13;t[1]&=8191;for(let o=2;o<10;o++)t[o]+=r,r=t[o]>>>13,t[o]&=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 o=1;o<10;o++)s[o]=t[o]+r,r=s[o]>>>13,s[o]&=8191;s[9]-=8192;let a=(r^1)-1;for(let o=0;o<10;o++)s[o]&=a;a=~a;for(let o=0;o<10;o++)t[o]=t[o]&a|s[o];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 i=t[0]+n[0];t[0]=i&65535;for(let o=1;o<8;o++)i=(t[o]+n[o]|0)+(i>>>16)|0,t[o]=i&65535;ma(s)}update(t){F2(this),Dt(t),t=mh(t);const{buffer:n,blockLen:s}=this,r=t.length;for(let a=0;a<r;){const i=Math.min(s-this.pos,r-a);if(i===s){for(;s<=r-a;a+=s)this.process(t,a);continue}n.set(t.subarray(a,a+i),this.pos),this.pos+=i,a+=i,this.pos===s&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){this.destroyed=!0,ma(this.h,this.r,this.buffer,this.pad)}digestInto(t){F2(this),Pq(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 a=0;for(let i=0;i<8;i++)t[a++]=s[i]>>>0,t[a++]=s[i]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const s=t.slice(0,n);return this.destroy(),s}}const aH=Zq(32,e=>new rH(e));function iH(e,t,n,s,r,a=20){let i=e[0],o=e[1],c=e[2],u=e[3],d=t[0],f=t[1],h=t[2],p=t[3],m=t[4],b=t[5],y=t[6],g=t[7],k=r,v=n[0],w=n[1],j=n[2],C=i,$=o,E=c,T=u,S=d,M=f,z=h,A=p,R=m,I=b,N=y,_=g,L=k,D=v,O=w,q=j;for(let X=0;X<a;X+=2)C=C+S|0,L=Re(L^C,16),R=R+L|0,S=Re(S^R,12),C=C+S|0,L=Re(L^C,8),R=R+L|0,S=Re(S^R,7),$=$+M|0,D=Re(D^$,16),I=I+D|0,M=Re(M^I,12),$=$+M|0,D=Re(D^$,8),I=I+D|0,M=Re(M^I,7),E=E+z|0,O=Re(O^E,16),N=N+O|0,z=Re(z^N,12),E=E+z|0,O=Re(O^E,8),N=N+O|0,z=Re(z^N,7),T=T+A|0,q=Re(q^T,16),_=_+q|0,A=Re(A^_,12),T=T+A|0,q=Re(q^T,8),_=_+q|0,A=Re(A^_,7),C=C+M|0,q=Re(q^C,16),N=N+q|0,M=Re(M^N,12),C=C+M|0,q=Re(q^C,8),N=N+q|0,M=Re(M^N,7),$=$+z|0,L=Re(L^$,16),_=_+L|0,z=Re(z^_,12),$=$+z|0,L=Re(L^$,8),_=_+L|0,z=Re(z^_,7),E=E+A|0,D=Re(D^E,16),R=R+D|0,A=Re(A^R,12),E=E+A|0,D=Re(D^E,8),R=R+D|0,A=Re(A^R,7),T=T+S|0,O=Re(O^T,16),I=I+O|0,S=Re(S^I,12),T=T+S|0,O=Re(O^T,8),I=I+O|0,S=Re(S^I,7);let F=0;s[F++]=i+C|0,s[F++]=o+$|0,s[F++]=c+E|0,s[F++]=u+T|0,s[F++]=d+S|0,s[F++]=f+M|0,s[F++]=h+z|0,s[F++]=p+A|0,s[F++]=m+R|0,s[F++]=b+I|0,s[F++]=y+N|0,s[F++]=g+_|0,s[F++]=k+L|0,s[F++]=v+D|0,s[F++]=w+O|0,s[F++]=j+q|0}const oH=sH(iH,{counterRight:!1,counterLength:4,allowShortKeys:!1}),lH=new Uint8Array(16),V2=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(lH.subarray(n))},cH=new Uint8Array(32);function W2(e,t,n,s,r){r!==void 0&&Dt(r,void 0,"AAD");const a=e(t,n,cH),i=Qq(s.length,r?r.length:0,!0),o=aH.create(a);r&&V2(o,r),V2(o,s),o.update(i);const c=o.digest();return ma(a,i),c}const uH=e=>(t,n,s)=>({encrypt(a,i){const o=a.length;i=em(o+16,i,!1),i.set(a);const c=i.subarray(0,-16);e(t,n,c,c,1);const u=W2(e,t,n,c,s);return i.set(u,o),ma(u),i},decrypt(a,i){i=em(a.length-16,i,!1);const o=a.subarray(0,-16),c=a.subarray(-16),u=W2(e,t,n,o,s);if(!Xq(c,u))throw ma(u),new Error("invalid tag");return i.set(a.subarray(0,-16)),e(t,n,i,i,1),ma(u),i}}),K2=Yq({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},uH(oH)),dH=e=>e/2**32|0,fH=e=>e>>>0;function nm(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const sm=e=>e?`"${e}" `:"";function Rr(e,t=""){if(typeof e!="number")throw new TypeError(sm(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(sm(t)+"expected integer >= 0, got "+e);return e}function fs(e,t,n=""){if(nm(e)&&(t===void 0||e.length===t))return e;t!==void 0&&Rr(t,"length");const s=nm(e),r=t!==void 0?` of length ${t}`:"",a=s?`length=${e.length}`:`type=${typeof e}`,i=sm(n)+"expected Uint8Array"+r+", got "+a;throw s?new RangeError(i):new TypeError(i)}function X2(e){return Uint8Array.from(fs(e))}function hH(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(Rr(e.outputLen),Rr(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const xH=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},Z2=(e,t)=>{xH(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 yh(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function Q7(e,t){fs(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function kh(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function rm(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function bh(e,t){return e<<32-t|e>>>t}const J7=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function eS(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const pc=J7?e=>e:e=>eS(e)>>>0;function pH(e){for(let t=0;t<e.length;t++)e[t]=eS(e[t]);return e}const io=J7?e=>e:pH,tS=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",gH=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function Wy(e){if(fs(e),tS)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=gH[e[n]];return t}function Y2(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function nS(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(tS)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,a=0;r<n;r++,a+=2){const i=Y2(e.charCodeAt(a)),o=Y2(e.charCodeAt(a+1));if(i===void 0||o===void 0){const c=e[a]+e[a+1];throw new RangeError('hex string expected, got non-hex character "'+c+'" at index '+a)}s[r]=i*16+o}return s}function sS(e,t,n="opts"){return Z2(e,"defaults"),t!==void 0&&Z2(t,n),Object.assign(Object.create(null),e,t)}function mH(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=sS({},t,"info");const n=(r,a)=>e(a).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 yH(e=32){Rr(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 kH=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function rS(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 Fo=(e,t,n)=>fs(e,t,n),aS=Rr;function Go(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 Ac(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const bH=Wy,vH=e=>nS(e),iS=nm,oS=e=>yH(e),vh=BigInt(0),Q2=BigInt(1),wH=e=>e?`"${e}" `:"";function vx(e,t=""){if(typeof e!="boolean")throw new TypeError(wH(t)+"expected boolean, got type="+typeof e);return e}function jH(e){if(typeof e=="bigint"){if(!xi(e))throw new RangeError("positive bigint expected, got "+e)}else aS(e);return e}function am(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 lS(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?vh:BigInt("0x"+e)}function cS(e){return lS(Wy(e))}function wh(e){return lS(Wy(cu(fs(e)).reverse()))}function uS(e,t){if(Rr(t),t===0)throw new Error("zero output length is invalid");e=jH(e);const n=t*2,s=e.toString(16);if(s.length>n)throw new RangeError("number is too large");return nS(s.padStart(n,"0"))}function dS(e,t){return uS(e,t).reverse()}function cu(e){return Uint8Array.from(Fo(e))}function xi(e){return typeof e=="bigint"&&vh<=e}function fS(e,t,n){return xi(e)&&xi(t)&&xi(n)&&t<=e&&e<n}function Rc(e,t,n,s){if(!fS(t,n,s))throw new RangeError("expected valid "+e+": "+n+" <= n < "+s+", got "+t)}function SH(e){if(e<vh)throw new Error("expected non-negative bigint, got "+e);return e===vh?0:e.toString(2).length}const CH=e=>(am(e,"n"),(Q2<<BigInt(e))-Q2);function jh(e,t={},n={},s="object"){Go(e,s),Go(t,"fields"),Go(n,"optFields");function r(i,o,c){const u=s==="object"?`param "${String(i)}"`:`"${s}.${String(i)}"`,d=e[i];if(!Object.hasOwn(e,i)&&(c?d!==void 0:o!=="function"))throw new TypeError(`${u} is invalid: expected own property`);if(c&&d===void 0)return;const f=typeof d;if(f!==o||d===null)throw new TypeError(`${u} is invalid: expected ${o}, got ${f}`)}const a=(i,o)=>Object.entries(i).forEach(([c,u])=>r(c,u,o));a(t,!1),a(n,!0)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Ot=BigInt(0),st=BigInt(1),ti=BigInt(2),hS=BigInt(3),Ky=BigInt(4),xS=BigInt(5),$H=BigInt(7),pS=BigInt(8),EH=BigInt(9),TH=BigInt(15),gS=BigInt(16),zH=BigInt("0x10000000000000000");function nt(e,t){if(t<=Ot)throw new Error("mod: expected positive modulus, got "+t);const n=e%t;return n>=Ot?n:t+n}function NH(e,t,n){if(n<=st)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<Ot)throw new Error("invalid exponent, negatives unsupported");if(t===Ot)return st;if(t===st)return e;let s=e%n;if(s<Ot&&(s+=n),t<zH){let o=st;for(;t>Ot;)t&st&&(o=o*s%n),s=s*s%n,t>>=st;return o}const r=[];for(;t>Ot;)r.push(Number(t&TH)),t>>=Ky;const a=new Array(16);a[0]=st,a[1]=s;for(let o=2;o<16;o++)a[o]=a[o-1]*s%n;let i=a[r[r.length-1]];for(let o=r.length-2;o>=0;o--){i=i*i%n,i=i*i%n,i=i*i%n,i=i*i%n;const c=r[o];c!==0&&(i=i*a[c]%n)}return i}function Ss(e,t,n){if(n<=st)throw new Error("pow2: expected modulus > 1, got "+n);if(t<Ot)throw new Error("pow2: expected non-negative exponent, got "+t);let s=e;for(;t-- >Ot;)s*=s,s%=n;return s}function J2(e,t){if(e===Ot)throw new Error("invert: expected non-zero number");if(t<=st)throw new Error("invert: expected modulus > 1, got "+t);let n=nt(e,t),s=t,r=Ot,a=st;for(;n!==Ot;){const o=s/n,c=s-n*o,u=r-a*o;s=n,n=c,r=a,a=u}if(s!==st)throw new Error("invert: does not exist");return nt(r,t)}function Xy(e,t,n){const s=e;if(!s.eql(s.sqr(t),n))throw new Error("Cannot find square root")}function Zy(e,t){if((e&st)===Ot)throw new Error(t+": expected odd modulus, got "+e)}function mS(e,t){const n=e,s=(n.ORDER+st)/Ky,r=n.pow(t,s);return Xy(n,r,t),r}function MH(e,t){const n=e,s=(n.ORDER-xS)/pS,r=n.mul(t,ti),a=n.pow(r,s),i=n.mul(t,a),o=n.mul(n.mul(i,ti),a),c=n.mul(i,n.sub(o,n.ONE));return Xy(n,c,t),c}function AH(e){const t=Yy(e),n=yS(e),s=n(t,t.neg(t.ONE)),r=n(t,s),a=n(t,t.neg(s)),i=(e+$H)/gS;return(o,c)=>{const u=o;let d=u.pow(c,i),f=u.mul(d,s);const h=u.mul(d,r),p=u.mul(d,a),m=u.eql(u.sqr(f),c),b=u.eql(u.sqr(h),c);d=u.cmov(d,f,m),f=u.cmov(p,h,b);const y=u.eql(u.sqr(f),c),g=u.cmov(d,f,y);return Xy(u,g,c),g}}function yS(e){if(e<hS)throw new Error("sqrt is not defined for small field");Zy(e,"tonelliShanks");let t=e-st,n=0;for(;t%ti===Ot;)t/=ti,n++;let s=ti;const r=Yy(e);for(;Sh(r,s)===1;)if(s++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return mS;let a=r.pow(s,t);const i=(t+st)/ti;return function(c,u){const d=c;if(d.is0(u))return u;if(Sh(d,u)!==1)throw new Error("Cannot find square root");let f=n,h=d.mul(d.ONE,a),p=d.pow(u,t),m=d.pow(u,i);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===f)throw new Error("Cannot find square root");const g=st<<BigInt(f-b-1),k=d.pow(h,g);f=b,h=d.sqr(k),p=d.mul(p,h),m=d.mul(m,k)}return m}}function RH(e){return Zy(e,"Fp.sqrt"),e%Ky===hS?mS:e%pS===xS?MH:e%gS===EH?AH(e):yS(e)}const IH=(e,t)=>(nt(e,t)&st)===st,_H=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function uu(e){if(Go(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);am(e.BYTES,"BYTES"),am(e.BITS,"BITS");for(const t of _H)Ac(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=st)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function kS(e,t,n=!1){uu(e),rS(t,"nums"),vx(n,"passZero");const s=e,r=new Array(t.length).fill(n?s.ZERO:void 0),a=t.reduce((o,c,u)=>s.is0(c)?o:(r[u]=o,s.mul(o,c)),s.ONE),i=s.inv(a);return t.reduceRight((o,c,u)=>s.is0(c)?o:(r[u]=s.mul(o,r[u]),s.mul(o,c)),i),r}function Sh(e,t){uu(e);const n=e;Zy(n.ORDER,"FpLegendre");const s=(n.ORDER-st)/ti,r=n.pow(t,s),a=n.eql(r,n.ONE),i=n.eql(r,n.ZERO),o=n.eql(r,n.neg(n.ONE));if(!a&&!i&&!o)throw new Error("invalid Legendre symbol result");return a?1:i?0:-1}function DH(e,t){if(t!==void 0&&aS(t),e<=Ot)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=SH(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 ew=new WeakMap;class tw{constructor(t,n={}){ee(this,"ORDER");ee(this,"BITS");ee(this,"BYTES");ee(this,"isLE");ee(this,"ZERO",Ot);ee(this,"ONE",st);ee(this,"_lengths");ee(this,"_mod");if(t<=st)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:a}=DH(t,s);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=r,this.BYTES=a,Object.freeze(this)}create(t){return nt(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return Ot<=t&&t<this.ORDER}is0(t){return t===Ot}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&st)===st}neg(t){return nt(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return nt(t*t,this.ORDER)}add(t,n){return nt(t+n,this.ORDER)}sub(t,n){return nt(t-n,this.ORDER)}mul(t,n){return nt(t*n,this.ORDER)}pow(t,n){return NH(t,n,this.ORDER)}div(t,n){return nt(t*J2(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 J2(t,this.ORDER)}sqrt(t){let n=ew.get(this);return n||ew.set(this,n=RH(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?dS(t,this.BYTES):uS(t,this.BYTES)}fromBytes(t,n=!1){Fo(t);const{_lengths:s,BYTES:r,isLE:a,ORDER:i,_mod:o}=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,a?0:u.length-t.length),t=u}if(t.length!==r)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+t.length);let c=a?wh(t):cS(t);if(o&&(c=nt(c,i)),!n&&!this.isValid(c))throw new Error("invalid field element: outside of range 0..ORDER");return c}invertBatch(t){return kS(this,t,!0)}cmov(t,n,s){return vx(s,"condition"),s?n:t}}function Yy(e,t={}){return Object.freeze(tw.prototype),new tw(e,t)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Qy=BigInt(0),du=BigInt(1),LH=BigInt(4),ep=16,nw=128,OH=5,sw=2**31;function Jy(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);Ac(t.fromAffine,"Point.fromAffine"),Ac(t.fromBytes,"Point.fromBytes"),Ac(t.fromHex,"Point.fromHex"),Go(t.BASE,"Point.BASE"),Go(t.ZERO,"Point.ZERO"),uu(t.Fp),uu(t.Fn)}function BH(e,t){Jy(e),bS(t,e);const n=kS(e.Fp,t.map(s=>s.Z));return t.map((s,r)=>e.fromAffine(s.toAffine(n[r])))}function qH(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 HH(e,t){const n=e*(4*t+128);if(n>sw)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+sw/2**20+" MiB")}function PH(e,t){if(e!==void 0){Ac(e,"randomBytes");try{const n=e(t);if(!iS(n)||n.length!==t)return}catch{return}return e}}function bS(e,t){rS(e,"points"),e.forEach((n,s)=>{if(!(n instanceof t))throw new Error("invalid point at index "+s)})}function UH(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):xi(s)&&s<n))throw new Error("invalid scalar at index "+r)})}const vS=new WeakMap;function tp(e){return vS.get(e)||1}function FH(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 GH(e,t){const n=2**t,s=n/2,r=BigInt(n-1),a=[];for(;e>Qy;){let i=0;e&du&&(i=Number(e&r),i>=s&&(i-=n),e-=BigInt(i)),a.push(i),e>>=du}return a}function VH(e,t,n){const s=2**t,r=s/2,a=BigInt(s-1),i=BigInt(t),o=[];for(let c=0;c<n;c++){let u=Number(e&a);e>>=i,u>r&&(u-=s,e+=du),o.push(u)}if(e!==Qy)throw new Error("invalid wnaf");return o}function WH(e,t,n){let s=0;for(const a of n)s=Math.max(s,a.length);let r=e;for(let a=s-1;a>=0;a--){a!==s-1&&(r=r.double());for(let i=0;i<n.length;i++){const o=n[i][a];if(o){const c=t[i][Math.abs(o)-1>>1];r=r.add(o<0?c.negate():c)}}}return r}class KH{constructor(t,n){ee(this,"Point");ee(this,"BASE");ee(this,"ZERO");ee(this,"randomBytes");ee(this,"wnafPrecomputes",new WeakMap);ee(this,"baseCanBeBlinded");ee(this,"bits");Jy(t),this.randomBytes=PH(n,ep),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,a=2**(n-1),i=[];let o=t;for(let c=0;c<r;c++){let u=o;for(let d=0;d<a;d++)i.push(u),u=u.add(o);o=i[i.length-1].double()}return{W:n,bits:s,windows:r,comp:i}}wnafCachedCT(t,n){const{W:s,windows:r,comp:a}=t,i=2**(s-1),o=VH(n,s,r);let c=this.ZERO,u=this.BASE;for(let d=0;d<r;d++){const f=o[d],h=d*i,p=Math.abs(f)-1;let m=a[h];for(let y=1;y<i;y++)m=y===p?a[h+y]:m;const b=m.negate();f===0?u=u.add(a[h]):c=c.add(f<0?b:m)}return{p:c,f:u}}getWnafPrecomputes(t,n,s,r){let a=this.wnafPrecomputes.get(n),i=a==null?void 0:a.find(o=>o.W===t&&o.bits===s);return i||(i=this.buildWnafTable(n,t,s),typeof r=="function"&&(i={...i,comp:r(i.comp)}),a||(a=[],this.wnafPrecomputes.set(n,a)),a.push(i)),i}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),!fS(n,du,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,s,r){const a=tp(t);return a===1?this.fixedWindowCT(t,n,s):this.wnafCachedCT(this.getWnafPrecomputes(a,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+nw,a=this.randomBytes(ep);if(!iS(a)||a.length!==ep)throw new Error("randomBytes returned invalid byte array");a[0]=a[0]&63|128;const i=n+cS(a)*this.Point.Fn.ORDER;return this.runCT(t,i,r,s)}fixedWindowCT(t,n,s){const r=OH,a=1<<r,i=CH(r),o=new Array(a);o[0]=this.ZERO;for(let d=1;d<a;d++)o[d]=o[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 f=Number(n>>BigInt(d*r)&i);let h=o[0];for(let p=1;p<a;p++)h=p===f?o[p]:h;u=u.add(h)}return{p:u,f:u}}shouldBlind(t,n){return this.randomBytes===void 0?!1:n===du?!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),!xi(n))throw new Error("invalid scalar");const r=tp(t);if(r===1||n>=this.Point.Fn.ORDER)return XH(this.Point,[t],[n],!0);const a=this.getWnafPrecomputes(r,t,this.bits,s);return this.wnafCachedCT(a,n).p}setWindowSize(t,n){this.assertPoint(t),qH(n,this.bits);const s=Math.ceil((this.bits+nw)/n)+1;HH(s*2**(n-1),this.Point.Fp.BYTES),vS.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return tp(t)!==1}}function XH(e,t,n,s=!1){if(Jy(e),bS(t,e),vx(s,"allowOversized"),UH(n,e.Fn,s?e.Fn.ORDER**LH:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const r=t.map(i=>FH(i,4)),a=n.map(i=>GH(i,4));return WH(e.ZERO,r,a)}function rw(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return uu(t),t}else return Yy(e,{isLE:n})}function ZH(e,t,n={},s){if(s===void 0&&(s=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);jh(n);for(const c of["p","n","h"]){const u=t[c];if(!(xi(u)&&u!==Qy))throw new Error(`CURVE.${c} must be positive bigint`)}const r=rw(t.p,n.Fp,s),a=rw(t.n,n.Fn,s),o=["Gx","Gy","a","d"];for(const c of o)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:a}}function YH(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 Id=BigInt(0),_d=BigInt(1),Dd=BigInt(2),QH=BigInt(4),aw=BigInt(8);function JH(e,t,n,s){const r=e.sqr(n),a=e.sqr(s),i=e.add(e.mul(t.a,r),a),o=e.add(e.ONE,e.mul(t.d,e.mul(r,a)));return e.eql(i,o)}function eP(e,t={}){jh(t,{},{},"extraOpts");const n=t,s=ZH("edwards",e,n,n.FpFnLE),{Fp:r,Fn:a}=s;let i=s.CURVE;const{h:o}=i;if(Sh(r,i.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(Sh(r,i.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");jh(n,{},{uvRatio:"function",randomBytes:"function"});const c=n.randomBytes===void 0?oS:n.randomBytes,u=Dd<<BigInt(r.BYTES*8)-_d;function d(v){if(!r.isOdd)throw new Error("Field does not have .isOdd()");return r.isOdd(v)}const f=n.uvRatio===void 0?(v,w)=>{try{return{isValid:!0,value:r.sqrt(r.div(v,w))}}catch{return{isValid:!1,value:Id}}}:n.uvRatio;if(!JH(r,i,i.Gx,i.Gy))throw new Error("bad curve params: generator point");const h=r.eql(i.a,r.neg(r.ONE))?v=>r.neg(v):r.eql(i.a,r.ONE)?v=>v:v=>r.mul(i.a,v);function p(v,w,j=!1){const C=j?_d:Id;return Rc("coordinate "+v,w,C,u),w}function m(v){if(!(v instanceof b))throw new Error("EdwardsPoint expected")}const k=class k{constructor(w,j,C,$){ee(this,"X");ee(this,"Y");ee(this,"Z");ee(this,"T");this.X=p("x",w),this.Y=p("y",j),this.Z=p("z",C,!0),this.T=p("t",$),Object.freeze(this)}static CURVE(){return i}static fromAffine(w){if(w instanceof k)throw new Error("extended point not allowed");const{x:j,y:C}=w||{};return p("x",j),p("y",C),new k(j,C,r.ONE,r.mul(j,C))}static fromBytes(w,j=!1){const C=r.BYTES,{a:$,d:E}=i;w=cu(Fo(w,C,"point")),vx(j,"zip215");const T=cu(w),S=w[C-1];T[C-1]=S&-129;const M=wh(T),z=j?u:r.ORDER;Rc("point.y",M,Id,z);const A=r.sqr(M),R=r.sub(A,r.ONE),I=r.sub(r.mulN(E,A),$);let{isValid:N,value:_}=f(R,I);if(!N)throw new Error("bad point: invalid y coordinate");const L=d(_),D=(S&128)!==0;if(!j&&r.is0(_)&&D)throw new Error("bad point: x=0 and x_0=1");return D!==L&&(_=r.neg(_)),k.fromAffine({x:_,y:M})}static fromHex(w,j=!1){return k.fromBytes(vH(w),j)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(w=6,j=!0){return g.setWindowSize(this,w),j||this.multiply(Dd),this}assertValidity(){const w=this,{a:j,d:C}=i;if(w.is0())throw new Error("bad point: ZERO");const{X:$,Y:E,Z:T,T:S}=w,M=r.sqr($),z=r.sqr(E),A=r.sqr(T),R=r.sqr(A),I=r.mul(M,j),N=r.mul(r.add(I,z),A),_=r.add(R,r.mul(C,r.mul(M,z)));if(!r.eql(N,_))throw new Error("bad point: equation left != right (1)");const L=r.mul($,E),D=r.mul(T,S);if(!r.eql(L,D))throw new Error("bad point: equation left != right (2)")}equals(w){m(w);const{X:j,Y:C,Z:$}=this,{X:E,Y:T,Z:S}=w,M=r.mul(j,S),z=r.mul(E,$),A=r.mul(C,S),R=r.mul(T,$);return r.eql(M,z)&&r.eql(A,R)}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:w,Y:j,Z:C}=this,$=r.sqr(w),E=r.sqr(j),T=r.mul(r.sqr(C),Dd),S=h($),M=r.addN(w,j),z=r.sub(r.subN(r.sqr(M),$),E),A=r.addN(S,E),R=r.subN(A,T),I=r.subN(S,E),N=r.mul(z,R),_=r.mul(A,I),L=r.mul(z,I),D=r.mul(R,A);return new k(N,_,D,L)}add(w){m(w);const{d:j}=i,{X:C,Y:$,Z:E,T}=this,{X:S,Y:M,Z:z,T:A}=w,R=r.mul(C,S),I=r.mul($,M),N=r.mul(r.mulN(T,j),A),_=r.mul(E,z),L=r.sub(r.subN(r.mulN(r.addN(C,$),r.addN(S,M)),R),I),D=r.subN(_,N),O=r.addN(_,N),q=r.sub(I,h(R)),F=r.mul(L,D),X=r.mul(O,q),J=r.mul(L,q),Z=r.mul(D,O);return new k(F,X,Z,J)}subtract(w){return m(w),this.add(w.negate())}multiply(w){if(!a.isValidNot0(w))throw new RangeError("invalid scalar: expected 1 <= sc < curve.n");const{p:j,f:C}=g.mulSecret(this,w,o,y);return y([j,C])[0]}multiplyUnsafe(w){if(!a.isValid(w))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return w===Id?k.ZERO:this.is0()||w===_d?this:g.mulUnsafe(this,w,y)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return g.mulUnsafe(this,i.n).is0()}toAffine(w){const j=this;let C=w;if(C!=null&&typeof C!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof C);const{X:$,Y:E,Z:T}=j,S=j.is0();C==null&&(C=S?r.create(aw):r.inv(T));const M=r.mul($,C),z=r.mul(E,C),A=r.mul(T,C);if(S)return{x:r.ZERO,y:r.ONE};if(!r.eql(A,r.ONE))throw new Error("invZ was invalid");return{x:M,y:z}}clearCofactor(){return o===_d?this:o===Dd?this.double():o===QH?this.double().double():o===aw?this.double().double().double():this.multiplyUnsafe(o)}toBytes(){const{x:w,y:j}=this.toAffine(),C=r.toBytes(j);return C[C.length-1]|=d(w)?128:0,C}toHex(){return bH(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};ee(k,"BASE",new k(i.Gx,i.Gy,r.ONE,r.mul(i.Gx,i.Gy))),ee(k,"ZERO",new k(r.ZERO,r.ONE,r.ONE,r.ZERO)),ee(k,"Fp",r),ee(k,"Fn",a);let b=k;const y=v=>BH(b,v),g=new KH(b,c);return g.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 qa=BigInt(0),ns=BigInt(1),Ld=BigInt(2);function iw(e,t){return e+t-(t>>ns<<ns)}function tP(e){const t=BigInt(6)*e;return(n,s,r)=>{const a=s+r,o=((t+r-s)*n+s)%e;return{x_2:o,x_3:a-o}}}function nP(e){return jh(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function sP(e){const t=nP(e),{P:n,type:s,adjustScalarBytes:r,powPminus2:a,randomBytes:i}=t,o=t.scalarMultBase,c=s==="x25519";if(!c&&s!=="x448")throw new Error("invalid type");const u=i===void 0?oS:i,d=c?255:448,f=tP(n),h=c?32:56,p=BigInt(c?9:5),m=BigInt(c?121665:39081),b=c?Ld**BigInt(254):Ld**BigInt(447),y=c?BigInt(8)*(Ld**BigInt(251)-ns):BigInt(4)*(Ld**BigInt(445)-ns),g=b+y+ns,k=N=>nt(N,n),v=w(p);function w(N){return dS(k(N),h)}function j(N){const _=cu(Fo(N,h,"uCoordinate"));return c&&(_[31]&=127),k(wh(_))}function C(N){return wh(r(cu(Fo(N,h,"scalar"))))}const $=new Set(c?[qa,ns,n-ns,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[qa,ns,n-ns]);function E(N,_){const L=j(_);if($.has(L))throw new Error("invalid private or public key received");const D=z(L,C(N));if(D===qa)throw new Error("invalid private or public key received");return w(D)}function T(N){if(o===void 0)return E(N,v);const _=C(N);Rc("scalar",_,b,g);const L=k(o(_));if(L===qa)throw new Error("invalid private or public key received");return w(L)}const S=T,M=E;function z(N,_){Rc("u",N,qa,n),Rc("scalar",_,b,g);const L=_,D=N;let O=ns,q=qa,F=N,X=ns;const J=L^L>>ns;for(let Q=BigInt(d-1);Q>=qa;Q--){const K=iw(n,J>>Q);({x_2:O,x_3:F}=f(K,O,F)),{x_2:q,x_3:X}=f(K,q,X);const re=O+q,oe=k(re*re),be=O-q,pe=k(be*be),he=oe-pe,le=F+X,Y=F-X,me=k(Y*re),ce=k(le*be),xe=me+ce,Le=me-ce;F=k(xe*xe),X=k(D*k(Le*Le)),O=k(oe*pe),q=k(he*(oe+k(m*he)))}const Z=iw(n,L);({x_2:O,x_3:F}=f(Z,O,F)),{x_2:q,x_3:X}=f(Z,q,X);const te=a(q);return k(O*te)}const A={secretKey:h,publicKey:h,seed:h},R=N=>(N=N===void 0?u(h):N,Fo(N,A.seed,"seed"),N),I={randomSecretKey:R};return Object.freeze(A),Object.freeze(I),Object.freeze({keygen:YH(R,S),getSharedSecret:M,getPublicKey:S,scalarMult:E,scalarMultBase:T,utils:I,GuBytes:v.slice(),lengths:A})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ow=BigInt(0),rP=BigInt(1),lw=BigInt(2),aP=BigInt(3),iP=BigInt(5),oP=BigInt(8),wx=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),lP={p:wx,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:oP,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function wS(e){const t=BigInt(10),n=BigInt(20),s=BigInt(40),r=BigInt(80),a=wx,o=e*e%a*e%a,c=Ss(o,lw,a)*o%a,u=Ss(c,rP,a)*e%a,d=Ss(u,iP,a)*u%a,f=Ss(d,t,a)*d%a,h=Ss(f,n,a)*f%a,p=Ss(h,s,a)*h%a,m=Ss(p,r,a)*p%a,b=Ss(m,r,a)*p%a,y=Ss(b,t,a)*d%a;return{pow_p_5_8:Ss(y,lw,a)*e%a,b2:o}}function cP(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const cw=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function uP(e,t){const n=wx,s=nt(t*t*t,n),r=nt(s*s*t,n),a=wS(e*r).pow_p_5_8;let i=nt(e*s*a,n);const o=nt(t*i*i,n),c=i,u=nt(i*cw,n),d=o===e,f=o===nt(-e,n),h=o===nt(-e*cw,n);return d&&(i=c),(f||h)&&(i=u),IH(i,n)&&(i=nt(-i,n)),{isValid:d||f,value:i}}const uw=eP(lP,{uvRatio:uP}),ek=(()=>{const e=wx,t=n=>{const{pow_p_5_8:s,b2:r}=wS(n);return nt(Ss(s,aP,e)*r,e)};return sP({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:cP,scalarMultBase:n=>{const s=nt(n,uw.Fn.ORDER);if(s===ow)return ow;const r=uw.BASE.multiply(s);return nt((r.Z+r.Y)*t(nt(r.Z-r.Y,e)),e)}})})(),dP=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 Fr(e,t,n,s,r){return e=e+t+r|0,s=bh(s^e,16),n=n+s|0,t=bh(t^n,12),{a:e,b:t,c:n,d:s}}function Gr(e,t,n,s,r){return e=e+t+r|0,s=bh(s^e,8),n=n+s|0,t=bh(t^n,7),{a:e,b:t,c:n,d:s}}function fP(e,t={},n,s,r){if(Rr(n),e<=0||e>n)throw new Error('"dkLen" must be 1..'+n+", got "+e);const{key:a,salt:i,personalization:o}=t;if(a!==void 0&&(a.length<1||a.length>n))throw new Error('"key" expected to be undefined or of length=1..'+n);i!==void 0&&fs(i,s,"salt"),o!==void 0&&fs(o,r,"personalization")}class hP{constructor(t,n){ee(this,"buffer");ee(this,"buffer32");ee(this,"finished",!1);ee(this,"destroyed",!1);ee(this,"length",0);ee(this,"pos",0);ee(this,"blockLen");ee(this,"outputLen");ee(this,"canXOF",!1);Rr(t),Rr(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=kh(this.buffer)}update(t){yh(this),fs(t);const{blockLen:n,buffer:s,buffer32:r}=this,a=t.length,i=t.byteOffset,o=t.buffer;for(let c=0;c<a;){this.pos===n&&(io(r),this.compress(r,0,!1),io(r),this.pos=0);const u=Math.min(n-this.pos,a-c),d=i+c;if(u===n&&!(d%4)&&c+u<a){const f=new Uint32Array(o,d,Math.floor((a-c)/4));io(f);for(let h=0;c+n<a;h+=r.length,c+=n)this.length+=n,this.compress(f,h,!1);io(f);continue}s.set(c===0&&u===a?t:t.subarray(c,c+u),this.pos),this.pos+=u,this.length+=u,c+=u}return this}digestInto(t){if(yh(this),Q7(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),io(s),this.compress(s,0,!0),io(s);const r=this.get(),a=t===this.buffer?s:kh(t),i=Math.floor(this.outputLen/4);for(let d=0;d<i;d++)a[d]=pc(r[d]);const o=this.outputLen%4;if(!o)return;const c=i*4,u=r[i];for(let d=0;d<o;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:a,outputLen:i,pos:o}=this;return t||(t=new this.constructor({dkLen:i})),t.set(...this.get()),t.buffer.set(n),t.destroyed=a,t.finished=r,t.length=s,t.pos=o,t.outputLen=i,t}clone(){return this._cloneInto()}}function xP(e,t,n,s,r,a,i,o,c,u,d,f,h,p,m,b,y,g,k,v){let w=0;for(let j=0;j<s;j++)({a:r,b:c,c:h,d:y}=Fr(r,c,h,y,n[t+e[w++]])),{a:r,b:c,c:h,d:y}=Gr(r,c,h,y,n[t+e[w++]]),{a,b:u,c:p,d:g}=Fr(a,u,p,g,n[t+e[w++]]),{a,b:u,c:p,d:g}=Gr(a,u,p,g,n[t+e[w++]]),{a:i,b:d,c:m,d:k}=Fr(i,d,m,k,n[t+e[w++]]),{a:i,b:d,c:m,d:k}=Gr(i,d,m,k,n[t+e[w++]]),{a:o,b:f,c:b,d:v}=Fr(o,f,b,v,n[t+e[w++]]),{a:o,b:f,c:b,d:v}=Gr(o,f,b,v,n[t+e[w++]]),{a:r,b:u,c:m,d:v}=Fr(r,u,m,v,n[t+e[w++]]),{a:r,b:u,c:m,d:v}=Gr(r,u,m,v,n[t+e[w++]]),{a,b:d,c:b,d:y}=Fr(a,d,b,y,n[t+e[w++]]),{a,b:d,c:b,d:y}=Gr(a,d,b,y,n[t+e[w++]]),{a:i,b:f,c:h,d:g}=Fr(i,f,h,g,n[t+e[w++]]),{a:i,b:f,c:h,d:g}=Gr(i,f,h,g,n[t+e[w++]]),{a:o,b:c,c:p,d:k}=Fr(o,c,p,k,n[t+e[w++]]),{a:o,b:c,c:p,d:k}=Gr(o,c,p,k,n[t+e[w++]]);return{v0:r,v1:a,v2:i,v3:o,v4:c,v5:u,v6:d,v7:f,v8:h,v9:p,v10:m,v11:b,v12:y,v13:g,v14:k,v15:v}}const Pt=kH.slice();class pP extends hP{constructor(n={}){n=sS({},n);const s=n.dkLen===void 0?32:n.dkLen;super(64,s);ee(this,"v0",Pt[0]|0);ee(this,"v1",Pt[1]|0);ee(this,"v2",Pt[2]|0);ee(this,"v3",Pt[3]|0);ee(this,"v4",Pt[4]|0);ee(this,"v5",Pt[5]|0);ee(this,"v6",Pt[6]|0);ee(this,"v7",Pt[7]|0);fP(s,n,32,8,8);let{key:r,personalization:a,salt:i}=n,o=0;if(r!==void 0&&(fs(r,void 0,"key"),o=r.length),this.v0^=this.outputLen|o<<8|65536|1<<24,i!==void 0){fs(i,void 0,"salt");const c=kh(X2(i));this.v4^=pc(c[0]),this.v5^=pc(c[1])}if(a!==void 0){fs(a,void 0,"personalization");const c=kh(X2(a));this.v6^=pc(c[0]),this.v7^=pc(c[1])}if(r!==void 0){const c=new Uint8Array(this.blockLen);c.set(r),this.update(c),rm(c)}}get(){const{v0:n,v1:s,v2:r,v3:a,v4:i,v5:o,v6:c,v7:u}=this;return[n,s,r,a,i,o,c,u]}set(n,s,r,a,i,o,c,u){this.v0=n|0,this.v1=s|0,this.v2=r|0,this.v3=a|0,this.v4=i|0,this.v5=o|0,this.v6=c|0,this.v7=u|0}compress(n,s,r){const a=fH(this.length),i=dH(this.length),{v0:o,v1:c,v2:u,v3:d,v4:f,v5:h,v6:p,v7:m,v8:b,v9:y,v10:g,v11:k,v12:v,v13:w,v14:j,v15:C}=xP(dP,s,n,10,this.v0,this.v1,this.v2,this.v3,this.v4,this.v5,this.v6,this.v7,Pt[0],Pt[1],Pt[2],Pt[3],a^Pt[4],i^Pt[5],r?~Pt[6]:Pt[6],Pt[7]);this.v0^=o^b,this.v1^=c^y,this.v2^=u^g,this.v3^=d^k,this.v4^=f^v,this.v5^=h^w,this.v6^=p^j,this.v7^=m^C}destroy(){this.destroyed=!0,rm(this.buffer32),this.set(0,0,0,0,0,0,0,0)}}const gf=mH(e=>new pP(e));class dw{constructor(t,n){ee(this,"oHash");ee(this,"iHash");ee(this,"blockLen");ee(this,"outputLen");ee(this,"canXOF",!1);ee(this,"finished",!1);ee(this,"destroyed",!1);if(hH(t),fs(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 a=0;a<r.length;a++)r[a]^=54;this.iHash.update(r),this.oHash=t.create();for(let a=0;a<r.length;a++)r[a]^=106;this.oHash.update(r),rm(r)}update(t){return yh(this),this.iHash.update(t),this}digestInto(t){yh(this),Q7(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:a,blockLen:i,outputLen:o,canXOF:c}=this;return t=t,t.finished=r,t.destroyed=a,t.blockLen=i,t.outputLen=o,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 np=(()=>{const e=(t,n,s)=>new dw(t,n).update(s).digest();return e.create=(t,n)=>new dw(t,n),e})(),gP=new TextEncoder().encode("Noise_IK_25519_ChaChaPoly_BLAKE2s"),xr=32,fw=65535,mP=2n**64n-1n,hw=e=>gf(e,{dkLen:xr}),Ch=(...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 xw(e,t,n){const s=np(gf,e,t),r=np(gf,s,new Uint8Array([1])),a=np(gf,s,Ch(r,new Uint8Array([2])));return[r,a]}function jS(){return im(ek.utils.randomSecretKey())}function im(e){if(e.length!==xr)throw new Error(`X25519 private key must be ${xr} bytes`);return{publicKey:ek.getPublicKey(e),privateKey:e}}const $h=(e,t)=>ek.getSharedSecret(e.privateKey,t);var Zo,ri,gu,om;class sp{constructor(){ze(this,gu);ze(this,Zo);ze(this,ri,0n)}setKey(t){je(this,Zo,t),je(this,ri,0n)}encrypt(t,n=new Uint8Array(0)){const s=G(this,Zo);return s===void 0?t:K2(s,V(this,gu,om).call(this),n).encrypt(t)}decrypt(t,n=new Uint8Array(0)){const s=G(this,Zo);return s===void 0?t:K2(s,V(this,gu,om).call(this),n).decrypt(t)}}Zo=new WeakMap,ri=new WeakMap,gu=new WeakSet,om=function(){if(G(this,ri)===mP)throw new Error("nonce exhausted");const t=new Uint8Array(12);return new DataView(t.buffer).setBigUint64(4,G(this,ri),!0),je(this,ri,G(this,ri)+1n),t};var ai,Vs;class yP{constructor(){ze(this,ai);ze(this,Vs);ee(this,"cipher",new sp);const t=gP;je(this,Vs,t.length<=xr?Ch(t,new Uint8Array(xr-t.length)):hw(t)),je(this,ai,G(this,Vs).slice())}mixKey(t){const[n,s]=xw(G(this,ai),t);je(this,ai,n),this.cipher.setKey(s.subarray(0,xr))}mixHash(t){je(this,Vs,hw(Ch(G(this,Vs),t)))}encryptAndHash(t){const n=this.cipher.encrypt(t,G(this,Vs));return this.mixHash(n),n}decryptAndHash(t){const n=this.cipher.decrypt(t,G(this,Vs));return this.mixHash(t),n}get handshakeHash(){return G(this,Vs)}split(){const[t,n]=xw(G(this,ai),new Uint8Array(0)),s=new sp;s.setKey(t.subarray(0,xr));const r=new sp;return r.setKey(n.subarray(0,xr)),[s,r]}}ai=new WeakMap,Vs=new WeakMap;function SS(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 kP(e,t,n,s){t.push(n.ephemeral.publicKey),e.mixHash(n.ephemeral.publicKey),e.mixKey($h(n.ephemeral,s)),t.push(e.encryptAndHash(n.static.publicKey)),e.mixKey($h(n.static,s))}function bP(e,t,n){const s=SS(t,xr).slice();return e.mixHash(s),e.mixKey($h(n.ephemeral,s)),e.mixKey($h(n.static,s)),s}const pw=(e,t)=>{if(e.length>fw)throw new Error(`${t} exceeds ${fw} bytes`)};function vP(e,t){const n=new yP;return n.mixHash(e),n.mixHash(t),n}function wP(e){const t=e.ephemeral??jS(),n=vP(e.prologue,e.remoteStatic);return{writeMessage1(s){const r=[];kP(n,r,{static:e.static,ephemeral:t},e.remoteStatic),r.push(n.encryptAndHash(s));const a=Ch(...r);return pw(a,"handshake message"),a},readMessage2(s){pw(s,"handshake message");const r={buffer:s,offset:0};bP(n,r,{ephemeral:t,static:e.static});const a=n.decryptAndHash(SS(r,s.length-r.offset)),[i,o]=n.split();return{payload:a,result:{send:i,receive:o,handshakeHash:n.handshakeHash}}}}}const jP=new TextEncoder().encode("pinomad/1"),CS=new TextEncoder,$S=new TextDecoder("utf-8",{fatal:!0}),SP=e=>CS.encode(JSON.stringify(e));function CP(e){try{return JSON.parse($S.decode(e))}catch{throw new Error("handshake payload is not JSON")}}function $P(e){const t=CP(e);if((t==null?void 0:t.v)!==1)throw new Error("unsupported host hello");return{v:1}}const gc="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function ES(e){let t="";for(let n=0;n<e.length;n+=3){const s=e[n],r=e[n+1],a=e[n+2];t+=gc[s>>2]+gc[(s&3)<<4|(r??0)>>4],r!==void 0&&(t+=gc[(r&15)<<2|(a??0)>>6]),a!==void 0&&(t+=gc[a&63])}return t}function Vo(e){if(e.length%4===1)throw new Error("invalid base64url");const t=new Map(Array.from(gc,(s,r)=>[s,r])),n=[];for(let s=0;s<e.length;s+=4){const a=[...e.slice(s,s+4)].map(o=>{const c=t.get(o);if(c===void 0)throw new Error("invalid base64url");return c}),i=a.reduce((o,c,u)=>o|c<<18-u*6,0);n.push(i>>16&255),a.length>2&&n.push(i>>8&255),a.length>3&&n.push(i&255)}return new Uint8Array(n)}const Od=65518;var mu,yu,Yo;class EP{constructor(t){ze(this,mu);ze(this,yu);ze(this,Yo,[]);je(this,mu,t.send),je(this,yu,t.receive)}seal(t){const n=CS.encode(t),s=[];for(let r=0;r<=n.length;r+=Od){const a=r+Od>=n.length,i=new Uint8Array(1+Math.min(Od,n.length-r));if(i[0]=a?0:1,i.set(n.subarray(r,r+Od),1),s.push(G(this,mu).encrypt(i)),a)break}return s}open(t){const n=G(this,yu).decrypt(t),s=n[0];if(s!==0&&s!==1)throw new Error("bad record flag");if(G(this,Yo).push(n.subarray(1)),s===1)return;const r=TP(G(this,Yo));return je(this,Yo,[]),$S.decode(r)}}mu=new WeakMap,yu=new WeakMap,Yo=new WeakMap;function TP(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 zP(e){let t=e.pairing;return{label:e.url,open(n){const s=new WebSocket(e.url);s.binaryType="arraybuffer";const r=wP({prologue:jP,static:e.device,remoteStatic:e.hostKey});let a,i=[],o=!1;const c=(d,f)=>{o||(o=!0,n.closed(d,f))},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(SP(d)))},s.onmessage=d=>{var f;try{const h=d.data instanceof ArrayBuffer?new Uint8Array(d.data):new Uint8Array(d.data);if(a===void 0){const{payload:p,result:m}=r.readMessage2(h);$P(p),a=new EP(m),t!==void 0&&(t=void 0,(f=e.onPaired)==null||f.call(e));const b=i;i=[];for(const y of b)for(const g of a.seal(y))s.send(g)}else{const p=a.open(h);p!==void 0&&n.message(p)}}catch(h){u(h instanceof Error?h.message:"secure channel failure")}},s.onclose=d=>c(d.code,d.reason===""?void 0:d.reason),s.onerror=()=>{},{send(d){if(a===void 0){i.push(d);return}for(const f of a.seal(d))s.send(f)},close(){s.close()}}}}}function TS(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(Vo(n).length!==32||Vo(s).length===0)return}catch{return}return{hostKey:n,secret:s}}function NP(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===""||TS(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 a=new URL(r).protocol;if(a!=="ws:"&&a!=="wss:")return}catch{return}return`pair=${s}&url=${encodeURIComponent(r)}`}const gw=e=>{if(typeof e!="string")return!1;try{return Vo(e).length===32}catch{return!1}},MP=e=>{if(typeof e!="string")return!1;try{const t=new URL(e).protocol;return t==="ws:"||t==="wss:"}catch{return!1}};function AP(e){if(typeof e!="object"||e===null)return;const t=e;if(!(!MP(t.url)||!gw(t.hostKey)||!gw(t.privateKey)))return{url:t.url,hostKey:t.hostKey,privateKey:t.privateKey}}function RP(e){const t=r=>{try{return new URL(r.url).host}catch{return r.url}},n=new Map;for(const r of e)n.set(t(r),(n.get(t(r))??0)+1);const s=new Map;for(const r of e){const a=t(r);s.set(r.hostKey,n.get(a)>1?`${a} · ${r.hostKey.slice(0,6)}`:a)}return s}const IP="ws://127.0.0.1:7420",Eo="pinomad.device";function lm(e){if(e!==null)try{return AP(JSON.parse(e))}catch{return}}function _P(e,t,n,s){const r=new URLSearchParams(e.replace(/^#/,"")),a=r.get("token");if(a!==null&&a!=="")return{kind:"token",url:r.get("url")??IP,token:a};const i=r.get("pair");if(i!==null){const c=TS(i);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 o=n.find(c=>c.hostKey===s)??n[0];return o===void 0?void 0:{kind:"device",...o}}function DP(e,t){return new URL(e).host===t.host}function LP(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}const fu="pinomad.activeHost",cm={multiHost:!1,list:()=>{const e=lm(localStorage.getItem(Eo));return Promise.resolve(e===void 0?[]:[e])},save:e=>(localStorage.setItem(Eo,JSON.stringify(e)),Promise.resolve()),remove:e=>{const t=lm(localStorage.getItem(Eo));return t!==void 0&&t.hostKey===e&&localStorage.removeItem(Eo),Promise.resolve()}};function OP(e){let t;const n=async()=>{const s=lm(localStorage.getItem(Eo));if(s!==void 0)try{(await e.hosts.list()).some(a=>a.hostKey===s.hostKey)||await e.hosts.save(s),localStorage.removeItem(Eo);return}catch(r){return console.error("Could not migrate the stored device into the desktop host list",r),s}};return{multiHost:!0,list:async()=>{const s=await(t??(t=n())),r=await e.hosts.list();return s===void 0||r.some(a=>a.hostKey===s.hostKey)?r:[...r,s]},save:s=>e.hosts.save(s),remove:s=>e.hosts.remove(s)}}function BP(){const e=window.pinomadDesktop;return e===void 0?cm:OP(e)}const qP={store:cm,hosts:[],activeHostKey:null,paired:e=>cm.save(e)},zS=x.createContext(qP),Bu=()=>x.useContext(zS);function NS(){const[e,t]=x.useState(""),[n,s]=x.useState(),r=()=>{const a=NP(e);if(a===void 0){s(/[#?&]token=/.test(e)?"Token links can't pair a device — paste a pairing link instead (pinomad pair, or Devices → Pair a device).":"That isn't a pairing link — paste one like http://<host>/#pair=… or pinomad://pair#pair=…");return}window.location.hash=a,window.location.reload()};return l.jsxs(l.Fragment,{children:[l.jsxs($e,{gap:2,vAlign:"end",style:{width:"100%"},children:[l.jsx("div",{className:"min-w-0 flex-1",children:l.jsx(Cr,{label:"Pairing link",isLabelHidden:!0,placeholder:"http://…/#pair=… or pinomad://pair#…",value:e,onChange:a=>{s(void 0),t(a)},onEnter:r,width:"100%"})}),l.jsx(de,{label:"Connect",variant:"primary",isDisabled:e.trim()==="",onClick:r})]}),n===void 0?null:l.jsx(yn,{status:"error",title:"Not a pairing link",description:n})]})}function MS({onPairAnother:e}){const{hosts:t,activeHostKey:n}=Bu(),s=RP(t),r=t.find(a=>a.hostKey===n)??t[0];return l.jsxs(Oi,{placement:"above",button:{label:r===void 0?"Hosts":s.get(r.hostKey)??"Hosts",icon:l.jsx(ou,{"aria-hidden":"true"}),variant:"ghost",size:"sm",width:"100%"},children:[l.jsx(B3,{label:"Hosts",value:r==null?void 0:r.hostKey,onChange:a=>{localStorage.setItem(fu,a),window.location.reload()},children:t.map(a=>l.jsx(q3,{value:a.hostKey,label:s.get(a.hostKey)},a.hostKey))}),l.jsx(Rf,{label:"Pair another host…",icon:l.jsx(Ho,{"aria-hidden":"true"}),onClick:e})]})}function AS({onClose:e}){return l.jsx(Ls,{isOpen:!0,onOpenChange:t=>t?void 0:e(),purpose:"form",width:480,children:l.jsx(gs,{header:l.jsx(Os,{title:"Pair another host",subtitle:"Paste a pairing link from pinomad pair or Devices → Pair a device.",onOpenChange:()=>e()}),content:l.jsx(ms,{children:l.jsx(NS,{})})})})}function RS(){const{store:e}=Bu(),[t,n]=x.useState(!1);return e.multiHost?l.jsxs("div",{className:"mt-4 w-80",children:[l.jsx(MS,{onPairAnother:()=>n(!0)}),t?l.jsx(AS,{onClose:()=>n(!1)}):null]}):null}const IS="pinomad.projectSidebar.expanded",HP=()=>{const e=window.localStorage.getItem(IS);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{}}},mw=e=>{window.localStorage.setItem(IS,JSON.stringify(e))},tk=e=>e.flatMap(t=>[t,...tk(t.children)]);function yw(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 i=!n;window.localStorage.setItem(t,String(i)),s(i)}}}function _S({connection:e}){return e==="connected"?l.jsx(Ar,{variant:"success",label:"Connected",tooltip:"Connected to the host"}):l.jsx(Ar,{variant:e==="closed"?"error":"warning",label:e,tooltip:e,isPulsing:!0})}function PP({connection:e,onCollapse:t,safeLeft:n}){return l.jsxs("div",{className:"pinomad-drag flex h-6 items-center justify-between px-2",style:n===void 0?void 0:{paddingLeft:n},children:[l.jsx(pn,{icon:l.jsx(Yg,{className:"size-4"}),label:"Collapse sidebar",size:"sm",variant:"ghost",onClick:t}),l.jsx(_S,{connection:e})]})}function kw({view:e,onOpenDevices:t,onOpenSettings:n,onPairHost:s,onSelect:r}){const{store:a}=Bu(),i=Z7();return l.jsxs(l.Fragment,{children:[(i==null?void 0:i.status.state)==="ready"?l.jsx(zs,{icon:l.jsx(Tq,{"aria-hidden":"true"}),label:"Restart to update","aria-label":`Restart to update${i.status.availableVersion===void 0?"":` to PiNomad ${i.status.availableVersion}`}`,onClick:()=>i.install()}):null,a.multiHost?l.jsx(MS,{onPairAnother:()=>{r==null||r(),s()}}):null,l.jsx(zs,{icon:l.jsx(ou,{"aria-hidden":"true"}),label:"Devices",isDisabled:e.connection!=="connected",onClick:()=>{t(),r==null||r()}}),l.jsx(zs,{icon:l.jsx(Nq,{"aria-hidden":"true"}),label:"Settings",isDisabled:e.connection!=="connected",onClick:()=>{n(),r==null||r()}})]})}function bw({title:e,expanded:t,contentId:n,onToggle:s,actions:r,pinnedActions:a=!1}){return l.jsxs("div",{className:"pigui-sidenav-section-header",children:[l.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:[l.jsx("span",{className:"pigui-sidenav-section-toggle__title",children:e}),l.jsx(Sa,{"aria-hidden":"true",className:"pigui-sidenav-section-toggle__chevron","data-expanded":t?"true":"false"})]}),l.jsx($e,{className:a?void 0:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:r})]})}function um(){return l.jsx("span",{className:"pigui-session-glyph","data-testid":"session-glyph"})}const DS={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function UP({status:e}){const t=e==="needs-answer"?"warning":e==="failed"?"error":"success",n=DS[e];return l.jsx("span",{className:"pigui-session-glyph","aria-hidden":"true",children:l.jsx(Ar,{variant:t,label:n,tooltip:n,isPulsing:e!=="failed"})})}function FP({expanded:e}){const t=e?wq:lu;return l.jsxs("span",{"aria-hidden":"true",className:"pigui-project-expansion-indicator","data-expanded":e?"true":"false",children:[l.jsx(t,{className:"pigui-project-expansion-indicator__state"}),l.jsx(Sa,{className:"pigui-project-expansion-indicator__chevron"})]})}function vw({node:e,shown:t,disabled:n,remote:s,now:r,onSelect:a}){const{summary:i}=e,o=bB(e),c=vB(e),[u,d]=x.useState(!1),f=t!==void 0&&tk([e]).some(p=>p.summary.id===t),h=l.jsx(zs,{icon:o===void 0?l.jsx(um,{}):l.jsx(UP,{status:o}),label:i.title??"New conversation",isSelected:f,isDisabled:n,endContent:l.jsxs(l.Fragment,{children:[c===void 0?null:l.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-session-meta ms-2 text-xs text-muted",children:R7(c,r)}),l.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"})]}),onClick:()=>{s.controller.switchConversation(i.id),a==null||a()}});return l.jsxs("div",{className:"pigui-sidenav-row-with-actions pigui-sidenav-session-row",...o===void 0?{}:{"data-status":o},children:[h,o===void 0?null:l.jsx(Mi,{children:DS[o]}),l.jsx($e,{className:"pigui-sidenav-row-actions pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:l.jsx(Oi,{hasChevron:!1,button:{icon:l.jsx(Ou,{"aria-hidden":"true"}),isIconOnly:!0,label:"Conversation actions",size:"sm",variant:"ghost",isDisabled:n},items:[{label:"Rename",icon:l.jsx(V7,{"aria-hidden":"true",size:16}),onClick:()=>d(!0)},{label:"Archive",icon:l.jsx(yq,{"aria-hidden":"true",size:16}),onClick:()=>void s.controller.archive(i.id,!0)}]})}),u?l.jsx(Hq,{summary:i,remote:s,connected:!n,onClose:()=>d(!1)}):null]})}function GP({view:e,remote:t,draftingChat:n,shownId:s,onDraft:r,onSelect:a}){const i=e.connection!=="connected",o=Vy(6e4),[c,u]=x.useState(!1),[d,f]=x.useState(),[h,p]=x.useState(HP),m=yw("chats"),b=yw("projects"),y=v=>{r(v),a==null||a()},g=x.useMemo(()=>{var v;return s===void 0||(v=e.organized.projects.find(({conversations:w})=>tk(w).some(j=>j.summary.id===s)))==null?void 0:v.project.path},[s,e.organized.projects]);x.useEffect(()=>{g!==void 0&&p(v=>{if(v[g]!==!1)return v;const w={...v,[g]:!0};return mw(w),w})},[g]);const k=v=>p(w=>{const j={...w,[v]:!(w[v]??!0)};return mw(j),j});return l.jsxs(l.Fragment,{children:[l.jsx(Kd,{isHeaderHidden:!0,title:"New chat",children:l.jsx(zs,{icon:l.jsx(_q,{className:"size-4"}),label:"New chat",isSelected:n,isDisabled:i,onClick:()=>y({kind:"chat"})})}),l.jsxs(Kd,{isHeaderHidden:!0,title:"Chats",children:[l.jsx(bw,{title:"Chats",expanded:m.expanded,contentId:m.contentId,onToggle:m.toggle,actions:l.jsx(pn,{icon:l.jsx(Ho,{"aria-hidden":"true"}),label:"New chat without a project",tooltip:"New chat",size:"sm",variant:"ghost",isDisabled:i,onClick:()=>y({kind:"chat"})})}),l.jsx(ve,{id:m.contentId,gap:.5,children:m.expanded?e.organized.chats.length===0?l.jsx(zs,{icon:l.jsx(um,{}),isDisabled:!0,label:"No chats"}):e.organized.chats.map(v=>l.jsx(vw,{node:v,shown:s,disabled:i,remote:t,now:o,onSelect:a},v.summary.id)):null})]}),l.jsxs(Kd,{isHeaderHidden:!0,title:"Projects",children:[l.jsx(bw,{title:"Projects",expanded:b.expanded,contentId:b.contentId,onToggle:b.toggle,pinnedActions:!0,actions:l.jsx(pn,{icon:l.jsx(Ho,{"aria-hidden":"true"}),label:"Add project",tooltip:"Add project",size:"sm",variant:"ghost",isDisabled:i,onClick:()=>u(!0)})}),l.jsx(ve,{id:b.contentId,gap:.5,children:b.expanded?e.organized.projects.length===0?l.jsx(zs,{icon:l.jsx(lu,{"aria-hidden":"true"}),label:"Add project",isDisabled:i,onClick:()=>u(!0)}):e.organized.projects.map(({project:v,conversations:w})=>{const j=h[v.path]??!0;return l.jsxs("div",{className:"pigui-sidenav-row-with-actions",children:[l.jsx(zs,{collapsible:{isCollapsed:!j,onCollapsedChange:()=>k(v.path)},icon:l.jsx(FP,{expanded:j}),label:v.name,isDisabled:i,endContent:l.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"}),children:w.length===0?l.jsx(zs,{icon:l.jsx(um,{}),isDisabled:!0,label:"No conversations"}):w.map(C=>l.jsx(vw,{node:C,shown:s,disabled:i,remote:t,now:o,onSelect:a},C.summary.id))}),l.jsx($e,{className:"pigui-sidenav-row-actions",gap:.5,vAlign:"center",children:l.jsxs($e,{className:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:[l.jsx(pn,{icon:l.jsx(Ho,{"aria-hidden":"true"}),label:`New conversation in ${v.name}`,size:"sm",variant:"ghost",isDisabled:i,onClick:()=>y({kind:"project",path:v.path})}),l.jsx(Oi,{hasChevron:!1,button:{icon:l.jsx(Ou,{"aria-hidden":"true"}),isIconOnly:!0,label:`Project actions for ${v.name}`,size:"sm",variant:"ghost",isDisabled:i},items:[{label:"Remove project",icon:l.jsx(Iq,{"aria-hidden":"true",size:16}),onClick:()=>f(v)}]})]})})]},v.path)}):null})]}),c?l.jsx(Bq,{remote:t,connected:!i,onAdded:v=>{u(!1),y({kind:"project",path:v.path})},onClose:()=>u(!1)}):null,d===void 0?null:l.jsx(qq,{project:d,remote:t,connected:!i,onClose:()=>f(void 0)})]})}var Ka=(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))(Ka||{});const VP=[0,1],LS=[1,0],OS=[2,3],BS=[3,2],WP={L:VP,M:LS,Q:OS,H:BS},KP=/^\d*$/,XP=/^[A-Z0-9 $%*+./:-]*$/,rp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",nk=1,sk=40,ww=3,ZP=3,Bd=40,YP=10,qS=[[-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]],HS=[[-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 QP{constructor(t,n,s,r){ee(this,"size");ee(this,"mask");ee(this,"modules",[]);ee(this,"types",[]);if(this.version=t,this.ecc=n,t<nk||t>sk)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 a=Array.from({length:this.size}).fill(!1);for(let o=0;o<this.size;o++)this.modules.push(a.slice()),this.types.push(a.map(()=>0));this.drawFunctionPatterns();const i=this.addEccAndInterleave(s);if(this.drawCodewords(i),r===-1){let o=1e9;for(let c=0;c<8;c++){this.applyMask(c),this.drawFormatBits(c);const u=this.getPenaltyScore();u<o&&(r=c,o=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,Ka.Timing),this.setFunctionModule(s,6,s%2===0,Ka.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 a=0;a<10;a++)s=s<<1^(s>>>9)*1335;const r=(n<<10|s)^21522;for(let a=0;a<=5;a++)this.setFunctionModule(8,a,cr(r,a));this.setFunctionModule(8,7,cr(r,6)),this.setFunctionModule(8,8,cr(r,7)),this.setFunctionModule(7,8,cr(r,8));for(let a=9;a<15;a++)this.setFunctionModule(14-a,8,cr(r,a));for(let a=0;a<8;a++)this.setFunctionModule(this.size-1-a,8,cr(r,a));for(let a=8;a<15;a++)this.setFunctionModule(8,this.size-15+a,cr(r,a));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=cr(n,s),a=this.size-11+s%3,i=Math.floor(s/3);this.setFunctionModule(a,i,r),this.setFunctionModule(i,a,r)}}drawFinderPattern(t,n){for(let s=-4;s<=4;s++)for(let r=-4;r<=4;r++){const a=Math.max(Math.abs(r),Math.abs(s)),i=t+r,o=n+s;i>=0&&i<this.size&&o>=0&&o<this.size&&this.setFunctionModule(i,o,a!==2&&a!==4,Ka.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,Ka.Alignment)}setFunctionModule(t,n,s,r=Ka.Function){this.modules[n][t]=s,this.types[n][t]=r}addEccAndInterleave(t){const n=this.version,s=this.ecc;if(t.length!==mf(n,s))throw new RangeError("Invalid argument");const r=HS[s[0]][n],a=qS[s[0]][n],i=Math.floor(dm(n)/8),o=r-i%r,c=Math.floor(i/r),u=[],d=oU(a);for(let h=0,p=0;h<r;h++){const m=t.slice(p,p+c-a+(h<o?0:1));p+=m.length;const b=lU(m,d);h<o&&m.push(0),u.push(m.concat(b))}const f=[];for(let h=0;h<u[0].length;h++)u.forEach((p,m)=>{(h!==c-a||m>=o)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(dm(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 a=0;a<2;a++){const i=s-a,c=(s+1&2)===0?this.size-1-r:r;!this.types[c][i]&&n<t.length*8&&(this.modules[c][i]=cr(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 a=0;a<this.size;a++){let i=!1,o=0;const c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[a][u]===i?(o++,o===5?t+=ww:o>5&&t++):(this.finderPenaltyAddHistory(o,c),i||(t+=this.finderPenaltyCountPatterns(c)*Bd),i=this.modules[a][u],o=1);t+=this.finderPenaltyTerminateAndCount(i,o,c)*Bd}for(let a=0;a<this.size;a++){let i=!1,o=0;const c=[0,0,0,0,0,0,0];for(let u=0;u<this.size;u++)this.modules[u][a]===i?(o++,o===5?t+=ww:o>5&&t++):(this.finderPenaltyAddHistory(o,c),i||(t+=this.finderPenaltyCountPatterns(c)*Bd),i=this.modules[u][a],o=1);t+=this.finderPenaltyTerminateAndCount(i,o,c)*Bd}for(let a=0;a<this.size-1;a++)for(let i=0;i<this.size-1;i++){const o=this.modules[a][i];o===this.modules[a][i+1]&&o===this.modules[a+1][i]&&o===this.modules[a+1][i+1]&&(t+=ZP)}let n=0;for(const a of this.modules)n=a.reduce((i,o)=>i+(o?1:0),n);const s=this.size*this.size,r=Math.ceil(Math.abs(n*20-s*10)/s)-1;return t+=r*YP,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 pr(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 cr(e,t){return(e>>>t&1)!==0}class rk{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 JP=[1,10,12,14],eU=[2,9,11,13],tU=[4,8,16,16];function PS(e,t){return e[Math.floor((t+7)/17)+1]}function US(e){const t=[];for(const n of e)pr(n,8,t);return new rk(tU,e.length,t)}function nU(e){if(!FS(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);pr(Number.parseInt(e.substring(n,n+s),10),s*3+1,t),n+=s}return new rk(JP,e.length,t)}function sU(e){if(!GS(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=rp.indexOf(e.charAt(n))*45;s+=rp.indexOf(e.charAt(n+1)),pr(s,11,t)}return n<e.length&&pr(rp.indexOf(e.charAt(n)),6,t),new rk(eU,e.length,t)}function rU(e){return e===""?[]:FS(e)?[nU(e)]:GS(e)?[sU(e)]:[US(iU(e))]}function FS(e){return KP.test(e)}function GS(e){return XP.test(e)}function aU(e,t){let n=0;for(const s of e){const r=PS(s.mode,t);if(s.numChars>=1<<r)return Number.POSITIVE_INFINITY;n+=4+r+s.bitData.length}return n}function iU(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 dm(e){if(e<nk||e>sk)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 mf(e,t){return Math.floor(dm(e)/8)-qS[t[0]][e]*HS[t[0]][e]}function oU(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]=fm(t[r],n),r+1<t.length&&(t[r]^=t[r+1]);n=fm(n,2)}return t}function lU(e,t){const n=t.map(s=>0);for(const s of e){const r=s^n.shift();n.push(0),t.forEach((a,i)=>n[i]^=fm(a,r))}return n}function fm(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 cU(e,t,n=1,s=40,r=-1,a=!0){if(!(nk<=n&&n<=s&&s<=sk)||r<-1||r>7)throw new RangeError("Invalid value");let i,o;for(i=n;;i++){const f=mf(i,t)*8,h=aU(e,i);if(h<=f){o=h;break}if(i>=s)throw new RangeError("Data too long")}for(const f of[LS,OS,BS])a&&o<=mf(i,f)*8&&(t=f);const c=[];for(const f of e){pr(f.mode[0],4,c),pr(f.numChars,PS(f.mode,i),c);for(const h of f.getData())c.push(h)}const u=mf(i,t)*8;pr(0,Math.min(4,u-c.length),c),pr(0,(8-c.length%8)%8,c);for(let f=236;c.length<u;f^=253)pr(f,8,c);const d=Array.from({length:Math.ceil(c.length/8)},()=>0);return c.forEach((f,h)=>d[h>>>3]|=f<<7-(h&7)),new QP(i,t,d,r)}function uU(e,t){var f;const{ecc:n="L",boostEcc:s=!1,minVersion:r=1,maxVersion:a=40,maskPattern:i=-1,border:o=1}=t||{},c=typeof e=="string"?rU(e):Array.isArray(e)?[US(e)]:void 0;if(!c)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const u=cU(c,WP[n],r,a,i,s),d=dU({version:u.version,maskPattern:u.mask,size:u.size,data:u.modules,types:u.types},o);return t!=null&&t.invert&&(d.data=d.data.map(h=>h.map(p=>!p))),(f=t==null?void 0:t.onEncoded)==null||f.call(t,d),d}function dU(e,t=1){if(!t)return e;const{size:n}=e,s=n+t*2;e.size=s,e.data.forEach(a=>{for(let i=0;i<t;i++)a.unshift(!1),a.push(!1)});for(let a=0;a<t;a++)e.data.unshift(Array.from({length:s},i=>!1)),e.data.push(Array.from({length:s},i=>!1));const r=Ka.Border;e.types.forEach(a=>{for(let i=0;i<t;i++)a.unshift(r),a.push(r)});for(let a=0;a<t;a++)e.types.unshift(Array.from({length:s},i=>r)),e.types.push(Array.from({length:s},i=>r));return e}function fU({view:e,remote:t,self:n,onClose:s}){const r=e.connection==="connected",a=n===void 0?void 0:ES(n.publicKey),[i,o]=x.useState(),[c,u]=x.useState(),d=()=>{u(void 0),t.controller.createPairing().then(o,f=>{u(f instanceof Error?f.message:String(f))})};return l.jsx(Ls,{isOpen:!0,onOpenChange:f=>f?void 0:s(),width:440,children:l.jsx(gs,{header:l.jsx(Os,{title:"Devices",subtitle:"Paired devices can reach this host over the secure channel.",onOpenChange:()=>s()}),content:l.jsx(ms,{children:l.jsxs(ve,{gap:4,padding:2,children:[e.devices.length===0?l.jsx(se,{type:"supporting",children:"No paired devices."}):l.jsx(kt,{density:"compact",children:e.devices.map(f=>l.jsx(hU,{device:f,isSelf:f.publicKey===a,connected:r,remote:t},f.publicKey))}),c===void 0?null:l.jsx(yn,{status:"error",title:"Could not create a pairing offer",description:c}),i===void 0?l.jsx(de,{label:"Pair a device",variant:"secondary",isDisabled:!r,onClick:d}):l.jsx(xU,{url:i.url,expiresAt:i.expiresAt,onRenew:d})]})})})})}function hU({device:e,isSelf:t,connected:n,remote:s}){return l.jsx(We,{label:e.name,description:`Paired ${new Date(e.pairedAt).toLocaleDateString()}`,endContent:l.jsxs($e,{gap:2,vAlign:"center",children:[t?l.jsx(Fn,{label:"This device",size:"sm"}):null,l.jsx(de,{label:"Revoke",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void s.controller.revokeDevice(e.publicKey)})]})})}function xU({url:e,expiresAt:t,onRenew:n}){const[s,r]=x.useState(Date.now());x.useEffect(()=>{const o=setInterval(()=>r(Date.now()),1e3);return()=>clearInterval(o)},[]);const a=Math.max(0,Math.ceil((t-s)/1e3));if(a===0)return l.jsxs($e,{gap:2,vAlign:"center",children:[l.jsx(se,{type:"supporting",children:"Expired"}),l.jsx(de,{label:"New code",variant:"secondary",size:"sm",onClick:n})]});const i=new URL(e).hostname==="127.0.0.1";return l.jsxs(ve,{gap:3,hAlign:"center",children:[i?null:l.jsx(pU,{text:e}),l.jsx(se,{type:"supporting",style:{wordBreak:"break-all",userSelect:"all"},children:e}),i?l.jsx(se,{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,l.jsxs(se,{type:"supporting",children:["Expires in ",Math.floor(a/60),":",String(a%60).padStart(2,"0")]})]})}const ap=2;function pU({text:e}){const t=x.useMemo(()=>uU(e,{border:0}),[e]),n=t.size+ap*2;return l.jsxs("svg",{role:"img","aria-label":"Pairing QR code",viewBox:`0 0 ${n} ${n}`,width:200,height:200,style:{display:"block"},children:[l.jsx("rect",{width:n,height:n,fill:"#ffffff"}),l.jsx("path",{shapeRendering:"crispEdges",fill:"#000000",d:t.data.flatMap((s,r)=>s.map((a,i)=>a?`M${i+ap} ${r+ap}h1v1h-1z`:"")).filter(s=>s!=="").join("")})]})}const VS={off:!0,minimal:!0,low:!0,medium:!0,high:!0,xhigh:!0,max:!0},hm=Object.keys(VS),gU=e=>typeof e=="string"&&Object.prototype.hasOwnProperty.call(VS,e),jw=32,Sw=1024,mU=/^[a-z0-9]+(?:-[a-z0-9]+)*$/;function WS(e){return e.length>jw||!mU.test(e)?`Name must be lowercase letters, digits and hyphens (max ${jw})`:void 0}function yU(e){const t=WS(e.name);if(t!==void 0)return t;const n=e.description.trim();if(n==="")return"description is required";if(n.length>Sw)return`description is too long (max ${Sw})`;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&&!gU(e.thinkingLevel))return`thinkingLevel must be one of ${hm.join(", ")}`}const hu={off:"Off",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"X-High",max:"Max"},ip=(e,t)=>e!==void 0&&t!==void 0&&e.provider===t.provider&&e.modelId===t.modelId,Cw=["off","minimal","low","medium","high","xhigh","max"],xm=(e,t)=>{if(e.includes(t))return t;const n=Cw.indexOf(t);return e.filter(s=>Cw.indexOf(s)<=n).at(-1)??"off"},Rs=(e,t)=>t===void 0?void 0:e.find(n=>n.provider===t.provider&&n.modelId===t.modelId);function kU(e,t){var a;const n=Rs(e,t.model),s=(n==null?void 0:n.thinkingLevels)??["off"],r=(n==null?void 0:n.name)??((a=t.model)==null?void 0:a.modelId)??"No model";return s.length>1?`${r} · ${hu[t.level]}`:r}function bU(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 vU(e,t,n){var a;const s=n.model!==void 0&&Rs(e,n.model)!==void 0?n.model:Rs(e,t.model)!==void 0?t.model:e[0]===void 0?void 0:{provider:e[0].provider,modelId:e[0].modelId},r=xm(((a=Rs(e,s))==null?void 0:a.thinkingLevels)??["off"],n.level);return{model:s,level:r}}function ak({models:e,selected:t,isDisabled:n=!1,onModelChange:s,onLevelChange:r}){const[a,i]=x.useState(""),o=e.find(d=>ip(d,t.model)),c=(o==null?void 0:o.thinkingLevels)??["off"],u=bU(e,a);return l.jsx(K3,{alignment:"start",label:"Model and Thinking",placement:"above",width:236,content:l.jsxs("div",{className:"flex w-full flex-col gap-1 p-1","data-testid":"model-thinking-popover",onClick:d=>d.stopPropagation(),onMouseDown:d=>d.stopPropagation(),onPointerDown:d=>d.stopPropagation(),children:[l.jsx(Cr,{isLabelHidden:!0,label:"Search models",placeholder:"Search models",size:"sm",value:a,width:"100%",onChange:d=>i(d)}),l.jsx(kt,{"aria-label":"Model",className:"max-h-72 overflow-y-auto",density:"compact",children:u.map(d=>l.jsx(We,{description:d.provider,endContent:ip(d,t.model)?l.jsx(H2,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:ip(d,t.model),label:d.name,onClick:()=>s({provider:d.provider,modelId:d.modelId})},`${d.provider}/${d.modelId}`))}),c.length>1?l.jsxs("div",{"aria-label":"Thinking",role:"group",children:[l.jsx("p",{className:"px-2 pt-1 text-xs text-muted",children:"Thinking"}),l.jsx(kt,{density:"compact",children:c.map(d=>l.jsx(We,{endContent:d===t.level?l.jsx(H2,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,label:hu[d],onClick:()=>r(d)},d))})]}):null]}),children:l.jsx(de,{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",children:l.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[l.jsx("span",{className:"truncate",children:kU(e,t)}),l.jsx(U7,{"aria-hidden":"true",className:"size-4 shrink-0"})]})})})}const Jn="",$w=e=>`${e.provider}/${e.modelId}`,Ew=e=>{const t=e.indexOf("/");if(!(t<=0||t===e.length-1))return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function wU({view:e,remote:t,connected:n,role:s,onClose:r}){const a=s!==void 0,[i,o]=x.useState((s==null?void 0:s.name)??""),[c,u]=x.useState((s==null?void 0:s.description)??""),[d,f]=x.useState((s==null?void 0:s.model)??Jn),[h,p]=x.useState((s==null?void 0:s.thinkingLevel)??Jn),[m,b]=x.useState((s==null?void 0:s.prompt)??""),[y,g]=x.useState(!1),[k,v]=x.useState(void 0),w=d===Jn?void 0:Rs(e.models,Ew(d)),j=[{value:Jn,label:"Don't pin — use the caller's model"},...e.models.map(S=>({value:$w(S),label:`${S.name} (${$w(S)})`})),...d!==Jn&&w===void 0?[{value:d,label:`${d} (not available)`}]:[]],C=w===void 0?hm:w.thinkingLevels,$=[{value:Jn,label:"Don't pin"},...C.map(S=>({value:S,label:hu[S]})),...h!==Jn&&!C.includes(h)?[{value:h,label:`${hu[h]} (not supported by this model)`}]:[]],E=S=>{f(S);const M=S===Jn?void 0:Rs(e.models,Ew(S)),z=M===void 0?hm:M.thinkingLevels;h!==Jn&&!z.includes(h)&&p(Jn)},T=()=>{const S={name:i.trim(),description:c.trim(),...d===Jn?{}:{model:d},...h===Jn?{}:{thinkingLevel:h},prompt:m.trim()},M=yU(S);if(M!==void 0){v(M);return}g(!0),v(void 0),(a?t.controller.updateAgent(S):t.controller.createAgent(S)).then(()=>r(),z=>{g(!1),v(z instanceof Error?z.message:String(z))})};return l.jsx(Ls,{isOpen:!0,onOpenChange:S=>S?void 0:r(),purpose:"form",width:480,"aria-label":a?`Edit ${s.name}`:"New agent",children:l.jsx(gs,{header:l.jsx(Os,{title:a?`Edit ${s.name}`:"New agent",onOpenChange:()=>r()}),content:l.jsx(ms,{children:l.jsxs(ve,{gap:4,children:[l.jsx(ve,{gap:1,children:l.jsx(Cr,{label:"Name",value:i,onChange:o,isDisabled:y||a,hasAutoFocus:!a,description:a?"The name is the file name and can't be changed.":void 0})}),l.jsx(Cr,{label:"Description",value:c,onChange:u,isDisabled:y}),l.jsx(qc,{label:"Model",value:d,options:j,onChange:E,isDisabled:y}),l.jsx(qc,{label:"Thinking level",value:h,options:$,onChange:S=>p(S),isDisabled:y}),l.jsx(Z4,{label:"Prompt",value:m,onChange:b,isDisabled:y,rows:4}),k===void 0?null:l.jsx(se,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:k})]})}),footer:l.jsx(Li,{children:l.jsxs($e,{gap:2,hAlign:"end",children:[l.jsx(de,{label:"Cancel",variant:"secondary",onClick:r}),l.jsx(de,{label:"Save",variant:"primary",isDisabled:!n||y,onClick:T})]})})})})}const pm=[{id:"providers",title:"Providers",icon:Cq},{id:"models",title:"Models",icon:Mq},{id:"agents",title:"Agents",icon:kq},{id:"mcp",title:"MCP",icon:Eq},{id:"chats",title:"Chats",icon:bq},{id:"about",title:"About",icon:Sq}],jU=e=>pm.find(t=>t.id===e).title,Tw=e=>l.jsx(e,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}});function SU({view:e,remote:t,onClose:n}){const s=Ni("(max-width: 640px)"),[r,a]=x.useState(void 0),i=e.connection==="connected",o=r??"providers",c=l.jsx(Zm,{padding:2,width:"calc(var(--spacing-10) * 7)",hasDivider:!0,children:l.jsx(F0,{"aria-label":"Settings sections",style:{width:"100%"},children:l.jsx(ve,{gap:1,children:pm.map(d=>l.jsx(zs,{label:d.title,icon:Tw(d.icon),isSelected:d.id===o,onClick:()=>a(d.id)},d.id))})})}),u=l.jsx(kt,{density:"compact",children:pm.map(d=>l.jsx(We,{label:d.title,startContent:Tw(d.icon),endContent:l.jsx(Sa,{"aria-hidden":"true",style:{width:"var(--spacing-4)",height:"var(--spacing-4)"}}),onClick:()=>a(d.id)},d.id))});return l.jsx(Ls,{"aria-label":"Settings",isOpen:!0,onOpenChange:d=>d?void 0:n(),purpose:"form",width:"calc(var(--spacing-10) * 22)",maxHeight:"90dvh",variant:s?"fullscreen":"standard",padding:4,children:l.jsx(gs,{padding:4,style:{height:s?"100dvh":"min(85dvh, calc(var(--spacing-10) * 17))"},header:l.jsx(Os,{title:s&&r!==void 0?jU(r):"Settings",startContent:s&&r!==void 0?l.jsx(pn,{label:"Back",icon:l.jsx(H7,{}),variant:"ghost",style:{marginBlock:"calc(-1 * var(--spacing-2))"},onClick:()=>a(void 0)}):void 0,onOpenChange:()=>n(),hasDivider:!0}),start:s?void 0:c,content:l.jsx(ms,{padding:s?4:6,children:s&&r===void 0?u:l.jsx(CU,{view:e,remote:t,connected:i,section:o,showTitle:!s})})})})}function CU({view:e,remote:t,connected:n,section:s,showTitle:r}){const{title:a,supporting:i,body:o}=$U(e,t,n,s),c=`settings-${s}-heading`;return l.jsxs(ve,{as:"section",...r?{"aria-labelledby":c}:{"aria-label":a},gap:3,children:[l.jsxs(ve,{gap:2,children:[r?l.jsx(Di,{level:2,id:c,children:a}):null,i]}),o]})}function $U(e,t,n,s){switch(s){case"providers":return{title:"Providers",supporting:l.jsxs(se,{as:"p",type:"supporting",children:["Logins are stored on the host in Pi's ",l.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:l.jsx(EU,{view:e,remote:t,connected:n})};case"models":return{title:"Models",supporting:l.jsx(se,{as:"p",type:"supporting",children:"Used when a new conversation doesn't pick its own model."}),body:l.jsx(TU,{view:e,remote:t,connected:n})};case"agents":return{title:"Agents",supporting:l.jsxs(se,{as:"p",type:"supporting",children:["Named agents the model can delegate to with ",l.jsx("code",{children:"subagent"})," — mention one with ",l.jsx("code",{children:"@name"}),"."," ","Each is a Markdown file in"," ",l.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/agents/"]}),"; edits to those files apply immediately."]}),body:l.jsx(AU,{view:e,remote:t,connected:n})};case"mcp":return{title:"MCP",body:l.jsx(NU,{view:e})};case"chats":return{title:"Chats",supporting:l.jsx(se,{as:"p",type:"supporting",children:"How queued messages are delivered when the agent reaches the next turn."}),body:l.jsx(zU,{view:e,remote:t,connected:n})};case"about":return{title:"About",body:l.jsx(MU,{view:e})}}}function EU({view:e,remote:t,connected:n}){const s=e.auth;if(s===null)return l.jsx(yn,{status:"warning",title:"This host is too old for logins",description:"Run `pinomad upgrade` on the host."});const r=s.logins;return l.jsx(ve,{gap:3,children:r.length===0?l.jsx(se,{as:"p",type:"supporting",children:"No stored logins. Log in with the Pi CLI on the host."}):l.jsxs(l.Fragment,{children:[l.jsx(se,{as:"p",type:"supporting",children:`${r.length} provider${r.length===1?"":"s"} logged in`}),r.map(a=>l.jsx(LU,{login:a,connected:n,remote:t},a.providerId))]})})}function TU({view:e,remote:t,connected:n}){const s=e.settings;return s===null?l.jsx(yn,{status:"warning",title:"This host is too old for settings",description:"Run `pinomad upgrade` on the host."}):l.jsxs($e,{gap:2,vAlign:"center",wrap:"wrap",children:[l.jsx(ak,{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")?l.jsx(de,{label:"Use pi's defaults",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void t.controller.updateSettings({defaultModel:null,defaultThinkingLevel:null})}):null]})}function zU({view:e,remote:t,connected:n}){const s=e.settings;return s===null?l.jsx(yn,{status:"warning",title:"This host is too old for settings",description:"Run `pinomad upgrade` on the host."}):l.jsxs(ve,{gap:4,children:[l.jsx(zw,{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})}),l.jsx(zw,{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 NU({view:e}){const t=e.mcp;return t===null?l.jsx(se,{as:"p",type:"supporting",children:"Loading…"}):l.jsxs(ve,{gap:3,children:[l.jsx(se,{as:"p",type:"supporting",style:{userSelect:"all"},children:t.configPath}),t.servers.length===0?l.jsx(se,{as:"p",type:"supporting",children:"No servers configured."}):l.jsx(kt,{density:"compact",children:t.servers.map(n=>l.jsx(We,{label:n.name,endContent:l.jsx(Fn,{label:n.state,size:"sm"})},n.name))})]})}function MU({view:e}){const t=e.host;return l.jsxs(ve,{gap:3,children:[l.jsxs(kt,{density:"compact",children:[l.jsx(We,{label:"Host version",description:(t==null?void 0:t.version)??"Source checkout"}),l.jsx(We,{label:"Protocol",description:t===void 0?"—":`${t.protocol.major}.${t.protocol.minor}`}),l.jsx(We,{label:"Data directory",description:l.jsx("span",{style:{wordBreak:"break-all",userSelect:"all"},children:e.session.directory})}),l.jsx(We,{label:"Settings file",description:l.jsxs("span",{style:{wordBreak:"break-all",userSelect:"all"},children:[e.session.directory,"/settings.json"]})})]}),l.jsx(se,{as:"p",type:"supporting",children:"Edit the settings file by hand only while the host is stopped."})]})}function zw({title:e,value:t,customized:n,disabled:s,onChange:r,onReset:a}){return l.jsxs(ve,{gap:1,children:[l.jsx(se,{children:e}),l.jsxs($e,{gap:2,vAlign:"center",wrap:"wrap",children:[l.jsxs(K4,{className:"shrink-0",value:t,onChange:i=>r(i),label:e,size:"sm",isDisabled:s,children:[l.jsx(Dp,{value:"one-at-a-time",label:"One at a time"}),l.jsx(Dp,{value:"all",label:"All at once"})]}),n?l.jsx(de,{label:"Use pi's default",variant:"ghost",size:"sm",isDisabled:s,onClick:a}):null]})]})}function AU({view:e,remote:t,connected:n}){const s=e.agents,[r,a]=x.useState(void 0);return s===null?l.jsx(yn,{status:"warning",title:"This host is too old for named agents",description:"Run `pinomad upgrade` on the host."}):l.jsxs(ve,{gap:3,children:[l.jsx($e,{gap:2,vAlign:"center",children:l.jsx(de,{label:"New agent",variant:"secondary",size:"sm",isDisabled:!n,onClick:()=>a({mode:"create"})})}),s.roles.length===0&&s.problems.length===0?l.jsx(se,{as:"p",type:"supporting",children:"No named agents yet."}):null,s.roles.map(i=>l.jsx(IU,{role:i,view:e,remote:t,connected:n,onEdit:()=>a({mode:"edit",role:i})},i.name)),s.problems.map(i=>l.jsx(_U,{problem:i,remote:t,connected:n},i.file)),r===void 0?null:l.jsx(wU,{view:e,remote:t,connected:n,...r.mode==="edit"?{role:r.role}:{},onClose:()=>a(void 0)})]})}const RU=e=>{const t=e.indexOf("/");return{provider:e.slice(0,t),modelId:e.slice(t+1)}};function IU({role:e,view:t,remote:n,connected:s,onEdit:r}){const[a,i]=x.useState(!1),[o,c]=x.useState(void 0),u=e.model===void 0?void 0:Rs(t.models,RU(e.model)),d=()=>{n.controller.deleteAgent(e.name).catch(f=>{c(f instanceof Error?f.message:String(f))})};return l.jsxs(Kh,{padding:4,children:[l.jsxs($e,{gap:3,vAlign:"start",children:[l.jsxs(ve,{gap:1,style:{flex:1,minInlineSize:0},children:[l.jsx(Di,{level:3,children:e.name}),l.jsx(se,{as:"p",type:"supporting",children:e.description}),e.model===void 0&&e.thinkingLevel===void 0?null:l.jsxs($e,{gap:1,wrap:"wrap",children:[e.model===void 0?null:l.jsx(Fn,{label:(u==null?void 0:u.name)??e.model,size:"sm"}),e.thinkingLevel===void 0?null:l.jsx(Fn,{label:hu[e.thinkingLevel],size:"sm"}),e.model!==void 0&&u===void 0?l.jsx(Fn,{label:"Model not available",color:"orange",size:"sm"}):null]})]}),a?null:l.jsx($e,{gap:1,vAlign:"center",children:l.jsx(Jh,{icon:l.jsx(Ou,{"aria-hidden":"true"}),label:`${e.name} actions`,size:"sm",variant:"ghost",isDisabled:!s,items:[{label:"Edit…",onClick:r},{label:"Delete…",onClick:()=>i(!0)}]})})]}),a?l.jsxs(ve,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:[l.jsx(se,{as:"p",type:"supporting",children:"Conversations already using this agent keep their copy."}),l.jsxs($e,{gap:2,vAlign:"center",children:[l.jsx(de,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!s,onClick:d}),l.jsx(de,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>i(!1)})]})]}):null,o===void 0?null:l.jsx(se,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:o})]})}function _U({problem:e,remote:t,connected:n}){const[s,r]=x.useState(!1),[a,i]=x.useState(void 0),o=WS(e.file.slice(0,-3))===void 0,c=()=>{t.controller.deleteAgent(e.file.slice(0,-3)).catch(u=>{i(u instanceof Error?u.message:String(u))})};return l.jsxs(Kh,{padding:4,children:[l.jsxs($e,{gap:3,vAlign:"start",children:[l.jsxs(ve,{gap:1,style:{flex:1,minInlineSize:0},children:[l.jsx(Di,{level:3,children:e.file}),l.jsx($e,{gap:1,wrap:"wrap",children:l.jsx(Fn,{label:"Not loaded",color:"orange",size:"sm"})}),l.jsx(se,{as:"p",type:"supporting",children:e.reason}),l.jsx(se,{as:"p",type:"supporting",children:"Fix this file on the host."})]}),s||!o?null:l.jsx($e,{gap:1,vAlign:"center",children:l.jsx(Jh,{icon:l.jsx(Ou,{"aria-hidden":"true"}),label:`${e.file} actions`,size:"sm",variant:"ghost",isDisabled:!n,items:[{label:"Delete…",onClick:()=>r(!0)}]})})]}),s?l.jsx(ve,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:l.jsxs($e,{gap:2,vAlign:"center",children:[l.jsx(de,{label:"Delete",variant:"destructive",size:"sm",isDisabled:!n,onClick:c}),l.jsx(de,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})}):null,a===void 0?null:l.jsx(se,{type:"supporting",role:"alert",style:{color:"var(--danger)"},children:a})]})}const DU=e=>e.subscription?"Subscription connected":e.kind==="api_key"?"API key configured":"OAuth connected";function LU({login:e,connected:t,remote:n}){const[s,r]=x.useState(!1);return l.jsxs(Kh,{padding:4,children:[l.jsxs($e,{gap:3,vAlign:"start",children:[l.jsxs(ve,{gap:1,style:{flex:1,minInlineSize:0},children:[l.jsx(Di,{level:3,children:e.name}),l.jsx(se,{as:"p",type:"supporting",children:DU(e)})]}),s?null:l.jsx($e,{gap:1,vAlign:"center",children:l.jsx(Jh,{icon:l.jsx(Ou,{"aria-hidden":"true"}),label:`${e.name} actions`,size:"sm",variant:"ghost",isDisabled:!t,items:[{label:"Log out…",onClick:()=>r(!0)}]})})]}),s?l.jsxs(ve,{gap:2,style:{marginBlockStart:"var(--spacing-4)"},children:[l.jsx(se,{as:"p",type:"supporting",children:`This also signs the Pi CLI on the host out of ${e.name}.`}),l.jsxs($e,{gap:2,vAlign:"center",children:[l.jsx(de,{label:"Log out",variant:"destructive",size:"sm",isDisabled:!t,onClick:()=>void n.controller.logout(e.providerId)}),l.jsx(de,{label:"Cancel",variant:"ghost",size:"sm",onClick:()=>r(!1)})]})]}):null]})}function ik(e){const t=e.docs["pi.live"];return(t==null?void 0:t.run)!==void 0}function ni(e,t,n){return e>=t&&e<=n}function KS(e){return e===8205}function OU(e){return ni(e,55296,56319)}function Nw(e){return ni(e,127462,127487)}function XS(e){return ni(e,65024,65039)}function ZS(e){return ni(e,768,879)||ni(e,6832,6911)||ni(e,7616,7679)||ni(e,65056,65071)}function yf(e){return e>65535?2:1}function Mw(e,t){for(;t<e.length;){const n=e.codePointAt(t);if(ZS(n)||XS(n))t+=yf(n);else break}return t}function YS(e,t){const n=e.codePointAt(t);let s=t+yf(n);for(s=Mw(e,s);s<e.length-1&&KS(e.codePointAt(s));){const r=e.codePointAt(s+1);s+=1+yf(r),s=Mw(e,s)}return Nw(n)&&s<e.length&&Nw(e.codePointAt(s))&&(s+=yf(e.codePointAt(s))),s}function QS(e){return e>=768&&(OU(e)||ZS(e)||XS(e)||KS(e))}function BU(e,t){let n=0,s=0;for(;s<e.length;)if(s=YS(e,s),++n>=t)return!0;return!1}function qU(e,t){let n=0,s=0;for(;s<e.length;)if(s=YS(e,s),++n>t)return!1;return!0}function HU(e,t){if(t===0)return!0;if(e.length<t)return!1;let n=0;for(;;){if(QS(e.charCodeAt(n)))return BU(e,t);if(++n>=t)return!0}}function PU(e,t){if(e.length<=t)return!0;let n=0;for(;;){if(QS(e.charCodeAt(n)))return qU(e,t);if(++n>t)return!1}}function Pe(e){return Array.isArray(e)}function ps(e){return ie(typeof e,"bigint")}function Fi(e){return ie(typeof e,"boolean")}function JS(e){if(vt(e)||!xu(e))return!1;const t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function xu(e){return ie(typeof e,"function")}function e9(e){return Number.isInteger(e)}function qu(e){return ie(e,null)}function Bt(e){return Number.isFinite(e)}function UU(e){return xt(e)&&!Pe(e)}function xt(e){return ie(typeof e,"object")&&!qu(e)}function $t(e){return ie(typeof e,"string")}function t9(e){return ie(typeof e,"symbol")}function vt(e){return ie(e,void 0)}function ie(e,t){return e===t}function n9(e,t){return e>t}function s9(e,t){return e<t}function ql(e,t){return e<=t}function jx(e,t){return e>=t}function FU(e,t){if(ps(e)||ps(t))return BigInt(e)%BigInt(t)===0n;const n=1e-10;if(!Bt(e)||e9(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 GU(e){if(!xt(e))return!1;const t=globalThis.Object.getPrototypeOf(e);return qu(t)?!1:ie(typeof t.constructor,"function")&&!(ie(t.constructor,globalThis.Object)||ie(t.constructor.name,"Object"))}function r9(e){return ps(e)||Fi(e)||qu(e)||Bt(e)||$t(e)||vt(e)}function VU(e,t){return PU(e,t)}function WU(e,t){return HU(e,t)}function Qt(e,t,n){return e.every((s,r)=>r<t||n(s,r))}function a9(e,t){return e.some((n,s)=>t(n,s))}function KU(e,t){let n=!1;return e.forEach((s,r)=>{t(s,r)&&(n=!0)}),n}function i9(e,t){return e.reduce((n,s,r)=>t(s,r)?++n:n,0)}function Sx(e){return ie(e,"__proto__")||ie(e,"constructor")||ie(e,"prototype")}function ae(e,t){return Sx(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Ci(e){return Object.entries(e)}function Et(e){return Object.getOwnPropertyNames(e)}function XU(e){return Object.getOwnPropertySymbols(e)}function ZU(e,t){if(!xt(t))return!1;const n=Et(e);return ie(n.length,Et(t).length)&&n.every(s=>Cx(e[s],t[s]))}function YU(e,t){return Pe(t)&&ie(e.length,t.length)&&e.every((n,s)=>Cx(e[s],t[s]))}function Cx(e,t){return Pe(e)?YU(e,t):xt(e)?ZU(e,t):ie(e,t)}function QU(e){return e instanceof Boolean}function JU(e){return e instanceof Number}function eF(e){return e instanceof String}function o9(e){return globalThis.ArrayBuffer.isView(e)}function l9(e){return e instanceof globalThis.RegExp}function tF(e){return e instanceof globalThis.Date}function nF(e){return e instanceof globalThis.Set}function sF(e){return e instanceof globalThis.Map}const rF={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function c9(){return rF}function aF(e){return ae(e,"~kind")||ae(e,"~unsafe")}function iF(e){const t={};for(const n of Et(e)){if(Sx(n))continue;const s=Object.getOwnPropertyDescriptor(e,n);s.value=$i(s.value),ie(s.enumerable,!0)?t[n]=s.value:Object.defineProperty(t,n,s)}return t}function oF(e){const t={};for(const n of Et(e))Sx(n)||(t[n]=$i(e[n]));for(const n of XU(e))t[n]=$i(e[n]);return t}function lF(e){return GU(e)?e:aF(e)?iF(e):oF(e)}function cF(e){return e.map(t=>$i(t))}function uF(e){return e.slice()}function dF(e){return new RegExp(e.source,e.flags)}function fF(e){return new Map($i([...e.entries()]))}function hF(e){return new Set($i([...e.values()]))}function $i(e){return o9(e)?uF(e):l9(e)?dF(e):sF(e)?fF(e):nF(e)?hF(e):Pe(e)?cF(e):xt(e)?lF(e):e}function xF(e){return $i(e)}function pF(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 gF(e,t){return{...e,...t}}function za(e,t,n={}){const s=gF(t,n),r=pF(s,e);return r}function u9(e,t,n){const s=c9(),r=xF(e);for(const a of Object.keys(t))Object.defineProperty(r,a,{configurable:!0,writable:!0,enumerable:s.enumerableKind,value:t[a]});for(const a of Object.keys(n))Object.defineProperty(r,a,{configurable:!0,enumerable:!0,writable:!0,value:n[a]});return r}function mF(e){return xt(e)}function yF(e){return u9(e,{"~optional":!0},{})}function kF(e,t){return u9(yF(e),{},t)}function Gi(e,t){return za({"~kind":"Array"},{type:"array",items:e},t)}function bF(e,t={}){return kF(e,t)}function br(e){return bF(e)}function vF(e){return mF(e)&&ae(e,"~optional")}function wF(e){return Et(e).filter(t=>!vF(e[t]))}function mn(e,t={}){const n=wF(e),s=n.length>0?{required:n}:{};return za({"~kind":"Object"},{type:"object",...s,properties:e},t)}function ok(e){return za({"~kind":"Unknown"},{},e)}function d9(e,t){var n;return((n=t[e.length])==null?void 0:n.call(t,...e))??(()=>{throw Error("Invalid Arguments")})()}function jF(){throw new Error("Unreachable")}function SF(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 CF(e){return typeof e=="number"}var sn;(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"})(sn||(sn={}));let To=BigInt("14695981039346656037");const[$F,EF]=[BigInt("1099511628211"),BigInt("18446744073709551616")],TF=Array.from({length:256}).map((e,t)=>BigInt(t)),f9=new Float64Array(1),h9=new DataView(f9.buffer),x9=new Uint8Array(f9.buffer);function Tt(e){To=To^TF[e],To=To*$F%EF}function zF(e){Tt(sn.Array);for(const t of e)Ca(t)}function NF(e){Tt(sn.BigInt),h9.setBigInt64(0,e);for(const t of x9)Tt(t)}function Aw(e){Tt(sn.Boolean),Tt(e?1:0)}function MF(e){Tt(sn.Constructor),Ca(e.toString())}function AF(e){Tt(sn.Date),Ca(e.getTime())}function RF(e){Tt(sn.Function),Ca(e.toString())}function IF(e){Tt(sn.Null)}function Rw(e){Tt(sn.Number),h9.setFloat64(0,e,!0);for(const t of x9)Tt(t)}function _F(e){Tt(sn.Object);for(const t of SF(e).sort())Ca(t),Ca(e[t])}function DF(e){Tt(sn.RegExp),gm(e.toString())}const LF=new TextEncoder;function gm(e){Tt(sn.String);for(const t of LF.encode(e))Tt(t)}function OF(e){Tt(sn.Symbol),Ca(e.toString())}function BF(e){Tt(sn.TypeArray);const t=new Uint8Array(e.buffer);for(let n=0;n<t.length;n++)Tt(t[n])}function qF(e){return Tt(sn.Undefined)}function Ca(e){return o9(e)?BF(e):tF(e)?AF(e):l9(e)?DF(e):QU(e)?Aw(e.valueOf()):eF(e)?gm(e.valueOf()):JU(e)?Rw(e.valueOf()):CF(e)?Rw(e):Pe(e)?zF(e):Fi(e)?Aw(e):ps(e)?NF(e):JS(e)?MF(e):qu(e)?IF():xt(e)?_F(e):$t(e)?gm(e):t9(e)?OF(e):vt(e)?qF():xu(e)?RF(e):jF()}function HF(e){return To=BigInt("14695981039346656037"),Ca(e),To}function PF(e){return HF(e).toString(16).padStart(16,"0")}function UF(e){return za({"~kind":"Boolean"},{type:"boolean"},e)}class FF extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}}function GF(e){return ps(e)?"bigint":Fi(e)?"boolean":Bt(e)?"number":$t(e)?"string":(()=>{throw new FF(e)})()}function Pn(e,t){return za({"~kind":"Literal"},{type:GF(e),const:e},t)}function Wo(e){return za({"~kind":"Number"},{type:"number"},e)}function nn(e){return za({"~kind":"String"},{type:"string"},e)}function $x(e,t={}){return za({"~kind":"Union"},{anyOf:e},t)}function mm(e,t){return Array.from({length:t-e+1},(n,s)=>String.fromCharCode(e+s))}[...mm(97,122),...mm(65,90)];const VF="0",WF=mm(49,57);[...WF];function KF(e){return ae(e,"~refine")&&Pe(e["~refine"])&&Qt(e["~refine"],0,t=>xt(t)&&ae(t,"check")&&ae(t,"error")&&xu(t.check)&&xu(t.error))}function Zn(e){return xt(e)&&!Pe(e)}function Eh(e){return Fi(e)}function ut(e){return Zn(e)||Eh(e)}function XF(e){return ae(e,"additionalItems")&&ut(e.additionalItems)}function ZF(e){return ae(e,"additionalProperties")&&ut(e.additionalProperties)}function YF(e){return ae(e,"allOf")&&Pe(e.allOf)&&e.allOf.every(t=>ut(t))}function ym(e){return ae(e,"$anchor")&&$t(e.$anchor)}function QF(e){return ae(e,"anyOf")&&Pe(e.anyOf)&&e.anyOf.every(t=>ut(t))}function JF(e){return ae(e,"const")}function lk(e){return ae(e,"contains")&&ut(e.contains)}function eG(e){return ae(e,"dependencies")&&xt(e.dependencies)&&Object.values(e.dependencies).every(t=>ut(t)||Pe(t)&&t.every(n=>$t(n)))}function tG(e){return ae(e,"dependentRequired")&&xt(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>Pe(t)&&t.every(n=>$t(n)))}function nG(e){return ae(e,"dependentSchemas")&&xt(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>ut(t))}function Ei(e){return ae(e,"$dynamicAnchor")&&$t(e.$dynamicAnchor)}function sG(e){return ae(e,"$dynamicRef")&&$t(e.$dynamicRef)}function rG(e){return ae(e,"else")&&ut(e.else)}function aG(e){return ae(e,"enum")&&Pe(e.enum)}function iG(e){return ae(e,"exclusiveMaximum")&&(Bt(e.exclusiveMaximum)||ps(e.exclusiveMaximum))}function oG(e){return ae(e,"exclusiveMinimum")&&(Bt(e.exclusiveMinimum)||ps(e.exclusiveMinimum))}function lG(e){return ae(e,"format")&&$t(e.format)}function Ds(e){return ae(e,"$id")&&$t(e.$id)}function cG(e){return ae(e,"if")&&ut(e.if)}function ck(e){return ae(e,"items")&&(ut(e.items)||Pe(e.items)&&e.items.every(t=>ut(t)))}function uG(e){return ck(e)&&Pe(e.items)}function dG(e){return ae(e,"maximum")&&(Bt(e.maximum)||ps(e.maximum))}function fG(e){return ae(e,"maxContains")&&Bt(e.maxContains)}function hG(e){return ae(e,"maxItems")&&Bt(e.maxItems)}function xG(e){return ae(e,"maxLength")&&Bt(e.maxLength)}function pG(e){return ae(e,"maxProperties")&&Bt(e.maxProperties)}function gG(e){return ae(e,"minimum")&&(Bt(e.minimum)||ps(e.minimum))}function p9(e){return ae(e,"minContains")&&Bt(e.minContains)}function mG(e){return ae(e,"minItems")&&Bt(e.minItems)}function yG(e){return ae(e,"minLength")&&Bt(e.minLength)}function kG(e){return ae(e,"minProperties")&&Bt(e.minProperties)}function bG(e){return ae(e,"multipleOf")&&(Bt(e.multipleOf)||ps(e.multipleOf))}function vG(e){return ae(e,"not")&&ut(e.not)}function wG(e){return ae(e,"oneOf")&&Pe(e.oneOf)&&e.oneOf.every(t=>ut(t))}function jG(e){return ae(e,"pattern")&&($t(e.pattern)||e.pattern instanceof RegExp)}function g9(e){return ae(e,"patternProperties")&&xt(e.patternProperties)&&Object.values(e.patternProperties).every(t=>ut(t))}function m9(e){return ae(e,"prefixItems")&&Pe(e.prefixItems)&&e.prefixItems.every(t=>ut(t))}function y9(e){return ae(e,"properties")&&xt(e.properties)&&Object.values(e.properties).every(t=>ut(t))}function SG(e){return ae(e,"propertyNames")&&(xt(e.propertyNames)||ut(e.propertyNames))}function CG(e){return ae(e,"$recursiveAnchor")&&Fi(e.$recursiveAnchor)}function km(e){return CG(e)&&ie(e.$recursiveAnchor,!0)}function $G(e){return ae(e,"$recursiveRef")&&$t(e.$recursiveRef)}function EG(e){return ae(e,"$ref")&&$t(e.$ref)}function k9(e){return ae(e,"required")&&Pe(e.required)&&e.required.every(t=>$t(t))}function TG(e){return ae(e,"then")&&ut(e.then)}function zG(e){return ae(e,"type")&&($t(e.type)||Pe(e.type)&&e.type.every(t=>$t(t)))}function NG(e){return ae(e,"uniqueItems")&&Fi(e.uniqueItems)}function MG(e){return ae(e,"unevaluatedItems")&&ut(e.unevaluatedItems)}function AG(e){return ae(e,"unevaluatedProperties")&&ut(e.unevaluatedProperties)}class Hl{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 RG(e,t,n,s){return Qt(n["~refine"],0,(r,a)=>r.check(s))}function IG(e){return ck(e)&&Pe(e.items)}function _G(e,t,n,s){return IG(n)?Qt(s,0,(a,i)=>s9(i,n.items.length)||Vi(e,t,n.additionalItems,a)&&t.AddIndex(i)):!0}function uk(e){return new RegExp(e,"u")}function DG(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function LG(e){const t=[];return g9(e)&&t.push(...Et(e.patternProperties)),y9(e)&&t.push(...Et(e.properties).map(DG)),ie(t.length,0)?"(?!)":`(${t.join("|")})`}function OG(e,t,n,s){const r=uk(LG(n));return Qt(Et(s),0,(i,o)=>r.test(i)||Vi(e,t,n.additionalProperties,s[i])&&t.AddKey(i))}function BG(e,t,n,s){const r=n.allOf.reduce((a,i)=>{const o=new Hl;return wt(e,o,i,s)?[...a,o]:a},[]);return ie(r.length,n.allOf.length)&&t.Merge(r)}function qG(e,t,n,s){const r=n.anyOf.reduce((a,i)=>{const o=new Hl;return wt(e,o,i,s)?[...a,o]:a},[]);return n9(r.length,0)&&t.Merge(r)}function HG(e,t,n,s){return n}function PG(e,t,n,s){return r9(n.const)?ie(s,n.const):Cx(s,n.const)}function UG(e){return!(p9(e)&&ie(e.minContains,0))}function FG(e,t,n,s){return UG(n)?!ie(s.length,0)&&KU(s,(r,a)=>wt(e,t,n.contains,r)&&t.AddIndex(a)):!0}function GG(e,t,n,s){const r=ie(Et(s).length,0),a=Qt(Ci(n.dependencies),0,([i,o])=>!ae(s,i)||(Pe(o)?o.every(c=>ae(s,c)):wt(e,t,o,s)));return r||a}function VG(e,t,n,s){const r=ie(Et(s).length,0),a=Qt(Ci(n.dependentRequired),0,([i,o])=>!ae(s,i)||o.every(c=>ae(s,c)));return r||a}function WG(e,t,n,s){const r=ie(Et(s).length,0),a=Qt(Ci(n.dependentSchemas),0,([i,o])=>!ae(s,i)||wt(e,t,o,s));return r||a}function KG(e,t,n,s){const r=e.DynamicRef(n)??!1;return ut(r)&&wt(e,t,r,s)}function XG(e,t,n,s){return a9(n.enum,r=>r9(r)?ie(s,r):Cx(s,r))}function ZG(e,t,n,s){return s9(s,n.exclusiveMaximum)}function YG(e,t,n,s){return n9(s,n.exclusiveMinimum)}const QG=[0,31,28,31,30,31,30,31,31,30,31,30,31],JG=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function eV(e){return e%4===0&&(e%100!==0||e%400===0)}function b9(e){const t=JG.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&&eV(n)?29:QG[s])}const tV=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function v9(e,t=!0){const n=tV.exec(e);if(!n||t&&!n[4]&&!n[5])return!1;const s=+n[1],r=+n[2],a=+n[3];if(s>23||r>59||a>60)return!1;if(n[5]){const d=+n[6],f=+n[7];if(d>23||f>59)return!1}if(a<60)return!0;const i=n[5]==="-"?-1:1,o=+(n[6]||0),c=+(n[7]||0);return((s*60+r-i*(o*60+c))%1440+1440)%1440===1439}function nV(e){const t=e.split(/T/i);return t.length===2&&b9(t[0])&&v9(t[1])}const sV=/^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 rV(e){return sV.test(e)}const aV=/^(?:[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 iV(e){return aV.test(e)}const oV=new RegExp("^(?!-).*(?<!-)$"),lV=/^(?!..--)/,cV=/^[a-zA-Z0-9-]*$/,dk=/[^\p{ASCII}]/u,uV=/[0-9]/,dV=/[\u{0660}-\u{0669}]/u,fV=/[\u{06f0}-\u{06f9}]/u,hV=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,xV=/[\u{002d}\u{002b}]/u,w9=new RegExp("\\p{Mn}","u"),pV=new RegExp("\\p{Mc}","u"),gV=/[\p{Mn}\p{Mc}\p{Me}]/u,j9=new RegExp("\\p{L}","u"),mV=new RegExp("\\p{Nd}","u"),yV=new RegExp("\\p{Script=Greek}","u"),S9=new RegExp("\\p{Script=Hebrew}","u"),kV=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,bV=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,Iw=/[\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,vV=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,wV=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,jV=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,SV=new RegExp([uV,fV].map(e=>e.source).join("|"),"u"),CV=new RegExp([j9,xV,hV,mV,w9,pV,wV,jV].map(e=>e.source).join("|"),"u");function $V(e){return oV.test(e)&&lV.test(e)&&cV.test(e)}const Ms=36,Ic=1,pu=26,EV=38,TV=700,C9=72,$9=128;function op(){throw null}function E9(e){return e.toLowerCase().startsWith("xn--")}function T9(e,t,n){e=n?Math.floor(e/TV):e>>1,e+=Math.floor(e/t);let s=0;for(;e>(Ms-Ic)*pu>>1;)e=Math.floor(e/(Ms-Ic)),s+=Ms;return s+Math.floor((Ms-Ic+1)*e/(e+EV))}function z9(e){const t=[];let n=$9,s=0,r=C9;const a=e.lastIndexOf("-");if(a>0)for(let o=0;o<a;o++){const c=e.charCodeAt(o);c>=128&&op(),t.push(c)}let i=a<0?0:a+1;for(;i<e.length;){const o=s;let c=1,u=Ms;for(;;){i>=e.length&&op();const f=e.charCodeAt(i++);let h;f>=97&&f<=122?h=f-97:f>=48&&f<=57?h=f-48+26:op(),s+=h*c;const p=u<=r?Ic:u>=r+pu?pu:u-r;if(h<p)break;c*=Ms-p,u+=Ms}const d=t.length+1;r=T9(s-o,d,o===0),n+=Math.floor(s/d),s%=d,t.splice(s,0,n),s++}return String.fromCodePoint(...t)}function _w(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}const zV=new RegExp(dk.source,"gu");function NV(e){const t=e.replace(zV,""),n=t.length,s=n>0?[t,"-"]:[],r=Array.from(e,u=>u.codePointAt(0));let a=$9,i=0,o=C9,c=n;for(;c<r.length;){let u=1/0;for(const d of r)d>=a&&d<u&&(u=d);i+=(u-a)*(c+1),a=u;for(const d of r)if(d<a&&i++,d===a){let f=i;for(let h=Ms;;h+=Ms){const p=h<=o?Ic:h>=o+pu?pu:h-o;if(f<p)break;const m=p+(f-p)%(Ms-p);s.push(_w(m)),f=Math.floor((f-p)/(Ms-p))}s.push(_w(f)),o=T9(i,c+1,c===n),i=0,c++}i++,a++}return s.join("")}const MV=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,Dw=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,AV=/^(?:R|AL|AN)$/;function RV(e){if(E9(e))try{return bm(z9(e.slice(4).toLowerCase()))}catch{return!1}return bm(e)}function N9(e){const t=String.fromCodePoint(e);return SV.test(t)?"EN":dV.test(t)?"AN":w9.test(t)?"NSM":S9.test(t)?"R":bV.test(t)?"AL":j9.test(t)?"L":"ON"}function bm(e){for(const t of e)if(AV.test(N9(t.codePointAt(0))))return!0;return!1}function M9(e){let t=!1,n=Dw,s=!1,r=!1,a=!0;for(const i of e){const o=N9(i.codePointAt(0));if(a){if(o!=="L"&&o!=="R"&&o!=="AL")return!1;t=o==="R"||o==="AL",n=t?MV:Dw,a=!1}if(!n.test(o))return!1;o==="EN"?s=!0:o==="AN"&&(r=!0)}return!(t&&s&&r)}function IV(e){return dk.test(e)&&NV(e).length+4>63}function _V(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function A9(e){if(IV(e)||bm(e)&&!M9(e))return!1;const t=[...e],n=t.map(a=>a.codePointAt(0)),s=n.length;if(_V(t)||gV.test(t[0]))return!1;let r=!1;for(let a=0;a<s;a++){const i=n[a],o=t[a];if(vV.test(o)||!CV.test(o))return!1;kV.test(o)&&(r=!0);const c=n[a-1],u=n[a+1];switch(i){case 183:if(c!==108||u!==108)return!1;break;case 885:if(!u||!yV.test(t[a+1]))return!1;break;case 1523:case 1524:if(!c||!S9.test(t[a-1]))return!1;break;case 8204:if(!c||c<128&&!Iw.test(t[a-1]))return!1;break;case 8205:if(!c||!Iw.test(t[a-1]))return!1;break}}return!(e.includes("・")&&!r)}function R9(e){if(!E9(e))return!1;try{const t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;const n=z9(t);return dk.test(n)?A9(n):!1}catch{return!1}}function DV(e){return e.length>0&&e.length<=63}function LV(e){return DV(e)&&(R9(e)||$V(e))}function OV(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>LV(t))}function BV(e){return e.length>0&&e.length<=63}function qV(e){return BV(e)&&(R9(e)||A9(e))}function HV(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 PV(e){if(e.length===0||e.includes(" "))return!1;const t=HV(e);if(t.length>253)return!1;const n=t.split("."),s=n.some(r=>RV(r));return n.every(r=>qV(r)&&(!s||M9(r)))}function UV(e){return OV(e)}const FV=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 GV(e){return FV.test(e.normalize("NFC"))}function VV(e){return PV(e)}const WV=/^(?:(?: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 KV(e){return WV.test(e)}const XV=/^(?:(?:(?:[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 ZV(e){return XV.test(e)}const YV=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,QV=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function JV(e){return!YV.test(e)&&!QV.test(e)&&URL.canParse(e,"http://example.com")}const eW=2048,tW=/\[[vV][0-9a-fA-F]+\.[^\]]+\]/,nW=/[\x00-\x20<>\^`{|}\\]/,sW=/%(?![0-9a-fA-F]{2})/;function rW(e){return e.length<eW?e.replace(tW,"[::1]"):e}function aW(e){return nW.test(e)||sW.test(e)?!1:URL.canParse(rW(e))}const iW=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function oW(e){return iW.test(e)}const lW=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function cW(e){return lW.test(e)}function uW(e){try{return new RegExp(e,"u"),!0}catch{return!1}}const dW=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function fW(e){return dW.test(e)}const hW=/^(?:[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 xW(e){return hW.test(e)}const pW=/^(?:(?:[^\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 gW(e){return pW.test(e)}const mW=/^[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 yW(e){return mW.test(e)}function kW(e){return URL.canParse(e)}const bW=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function vW(e){return bW.test(e)}const ot=new Map;function wW(){ot.clear()}function jW(e,t){var n;return((n=ot.get(e))==null?void 0:n(t))??!0}function SW(){wW(),ot.set("date-time",nV),ot.set("date",b9),ot.set("duration",rV),ot.set("email",iV),ot.set("hostname",UV),ot.set("idn-email",GV),ot.set("idn-hostname",VV),ot.set("ipv4",KV),ot.set("ipv6",ZV),ot.set("iri-reference",JV),ot.set("iri",aW),ot.set("json-pointer-uri-fragment",oW),ot.set("json-pointer",cW),ot.set("regex",uW),ot.set("relative-json-pointer",fW),ot.set("time",v9),ot.set("uri-reference",xW),ot.set("uri-template",gW),ot.set("uri",yW),ot.set("url",kW),ot.set("uuid",vW)}SW();function CW(e,t,n,s){return jW(n.format,s)}function $W(e,t,n,s){const r=TG(n)?n.then:!0,a=rG(n)?n.else:!0;return wt(e,t,n.if,s)?wt(e,t,r,s):wt(e,t,a,s)}function EW(e,t,n,s){return Qt(n.items,0,(r,a)=>ql(s.length,a)||Vi(e,t,r,s[a])&&t.AddIndex(a))}function TW(e,t,n,s){const r=m9(n)?n.prefixItems.length:0;return Qt(s,r,(a,i)=>Vi(e,t,n.items,a)&&t.AddIndex(i))}function zW(e,t,n,s){return uG(n)?EW(e,t,n,s):TW(e,t,n,s)}function NW(e){return lk(e)}function MW(e,t,n,s){if(!NW(n))return!0;const r=i9(s,a=>wt(e,t,n.contains,a));return ql(r,n.maxContains)}function AW(e,t,n,s){return ql(s,n.maximum)}function RW(e,t,n,s){return ql(s.length,n.maxItems)}function IW(e,t,n,s){return VU(s,n.maxLength)}function _W(e,t,n,s){return ql(Et(s).length,n.maxProperties)}function DW(e){return lk(e)}function LW(e,t,n,s){if(!DW(n))return!0;const r=i9(s,(a,i)=>wt(e,t,n.contains,a)&&t.AddIndex(i));return jx(r,n.minContains)}function OW(e,t,n,s){return jx(s,n.minimum)}function BW(e,t,n,s){return jx(s.length,n.minItems)}function qW(e,t,n,s){return WU(s,n.minLength)}function HW(e,t,n,s){return jx(Et(s).length,n.minProperties)}function PW(e,t,n,s){return FU(s,n.multipleOf)}function UW(e,t,n,s){const r=new Hl;return!wt(e,r,n.not,s)&&t.Merge([r])}function FW(e,t,n,s){const r=n.oneOf.reduce((a,i)=>{const o=new Hl;return wt(e,o,i,s)?[...a,o]:a},[]);return ie(r.length,1)&&t.Merge(r)}function GW(e,t,n,s){return($t(n.pattern)?uk(n.pattern):n.pattern).test(s)}function VW(e,t,n,s){return Qt(Ci(n.patternProperties),0,([r,a])=>{const i=uk(r);return Qt(Ci(s),0,([o,c])=>!i.test(o)||Vi(e,t,a,c)&&t.AddKey(o))})}function WW(e,t,n,s){return ie(s.length,0)||Qt(n.prefixItems,0,(r,a)=>ql(s.length,a)||Vi(e,t,r,s[a])&&t.AddIndex(a))}function KW(e,t){return e.includes(t)||c9().exactOptionalPropertyTypes}function XW(e,t){return vt(e[t])}function ZW(e,t,n,s){const r=k9(n)?n.required:[];return Qt(Ci(n.properties),0,([i,o])=>{const c=!ae(s,i)||Vi(e,t,o,s[i])&&t.AddKey(i);return KW(r,i)?c:XW(s,i)||c})}function YW(e,t,n,s){return Qt(Et(s),0,(r,a)=>wt(e,t,n.propertyNames,r))}function QW(e,t,n,s){const r=e.RecursiveRef(n)??!1;return ut(r)&&wt(e,t,r,s)}function JW(e,t,n,s){const r=e.Ref(n)??!1,a=new Hl,i=ut(r)&&wt(e,a,r,s);return i&&t.Merge([a]),i}function eK(e,t,n,s){return Qt(n.required,0,r=>ae(s,r))}function I9(e,t,n,s,r){return ie(n,"object")?UU(r):ie(n,"array")?Pe(r):ie(n,"boolean")?Fi(r):ie(n,"integer")?e9(r):ie(n,"number")?Bt(r):ie(n,"null")?qu(r):ie(n,"string")?$t(r):ie(n,"bigint")?ps(r):ie(n,"constructor")?JS(r):ie(n,"function")?xu(r):ie(n,"symbol")?t9(r):ie(n,"undefined")||ie(n,"void")?vt(r):!0}function tK(e,t,n,s,r){return a9(n,a=>I9(e,t,a,s,r))}function nK(e,t,n,s){return Pe(n.type)?tK(e,t,n.type,n,s):I9(e,t,n.type,n,s)}function sK(e,t,n,s){const r=t.GetIndices();return Qt(s,0,(a,i)=>(r.has(i)||wt(e,t,n.unevaluatedItems,a))&&t.AddIndex(i))}function rK(e,t,n,s){const r=t.GetKeys();return Qt(Ci(s),0,([a,i])=>r.has(a)||wt(e,t,n.unevaluatedProperties,i)&&t.AddKey(a))}function aK(e){return!ie(e.uniqueItems,!1)}function iK(e,t,n,s){if(!aK(n))return!0;const r=new Set(s.map(PF)).size,a=s.length;return ie(r,a)}function Vi(e,t,n,s){return t.Push()&&wt(e,t,n,s)&&t.Pop()}function wt(e,t,n,s){e.Push(n);const r=Eh(n)?HG(e,t,n):(!zG(n)||nK(e,t,n,s))&&(!(xt(s)&&!Pe(s))||(!k9(n)||eK(e,t,n,s))&&(!ZF(n)||OG(e,t,n,s))&&(!eG(n)||GG(e,t,n,s))&&(!tG(n)||VG(e,t,n,s))&&(!nG(n)||WG(e,t,n,s))&&(!g9(n)||VW(e,t,n,s))&&(!y9(n)||ZW(e,t,n,s))&&(!SG(n)||YW(e,t,n,s))&&(!kG(n)||HW(e,t,n,s))&&(!pG(n)||_W(e,t,n,s)))&&(!Pe(s)||(!XF(n)||_G(e,t,n,s))&&(!lk(n)||FG(e,t,n,s))&&(!ck(n)||zW(e,t,n,s))&&(!fG(n)||MW(e,t,n,s))&&(!hG(n)||RW(e,t,n,s))&&(!p9(n)||LW(e,t,n,s))&&(!mG(n)||BW(e,t,n,s))&&(!m9(n)||WW(e,t,n,s))&&(!NG(n)||iK(e,t,n,s)))&&(!$t(s)||(!xG(n)||IW(e,t,n,s))&&(!yG(n)||qW(e,t,n,s))&&(!lG(n)||CW(e,t,n,s))&&(!jG(n)||GW(e,t,n,s)))&&(!(Bt(s)||ps(s))||(!iG(n)||ZG(e,t,n,s))&&(!oG(n)||YG(e,t,n,s))&&(!dG(n)||AW(e,t,n,s))&&(!gG(n)||OW(e,t,n,s))&&(!bG(n)||PW(e,t,n,s)))&&(!EG(n)||JW(e,t,n,s))&&(!$G(n)||QW(e,t,n,s))&&(!sG(n)||KG(e,t,n,s))&&(!JF(n)||PG(e,t,n,s))&&(!aG(n)||XG(e,t,n,s))&&(!cG(n)||$W(e,t,n,s))&&(!vG(n)||UW(e,t,n,s))&&(!YF(n)||BG(e,t,n,s))&&(!QF(n)||qG(e,t,n,s))&&(!wG(n)||FW(e,t,n,s))&&(!MG(n)||!Pe(s)||sK(e,t,n,s))&&(!AG(n)||!xt(s)||rK(e,t,n,s))&&(!KF(n)||RG(e,t,n,s));return e.Pop(n),r}function oK(e,t){return xt(t)&&!Sx(e)?t[e]:void 0}function lK(e,t){return e.reduce((n,s)=>oK(s,n),t)}function cK(e){if(ie(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 uK(e,t){const n=cK(t);return lK(n,e)}const Ex="https://json-schema.org";function _9(e,t){if(xt(e)&&Ei(e)&&ie(e.$dynamicAnchor,t))return e;if(xt(e))for(const n of Et(e)){const s=_9(e[n],t);if(s)return s}}function vm(e,t,n){if(ie(e,n))return t.href;const s=Zn(e)&&Ds(e)?new URL(e.$id,t.href):t;if(Pe(e))for(const r of e){const a=vm(r,s,n);if(!vt(a))return a}else if(xt(e))for(const r of Et(e)){const a=vm(e[r],s,n);if(!vt(a))return a}}function dK(e,t,n){if(ie(e.$id,n.hash))return e;const s=new URL(n.href,t.href);if(ie(t.pathname,s.pathname))return n.hash.startsWith("#")?D9(e,n):e}function fK(e,t,n){const s=new URL(`#${e.$anchor}`,t.href),r=new URL(n.href,t.href);return ie(s.href,r.href)?e:void 0}function hK(e,t,n){const s=new URL(`#${e.$dynamicAnchor}`,t.href),r=new URL(n.href,t.href);return ie(s.href,r.href)?e:void 0}function D9(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;const n=decodeURIComponent(t.hash.slice(1));return n.startsWith("/")?uK(e,n):void 0}function xK(e,t,n){if(Ds(e)){const s=dK(e,t,n);if(!vt(s))return s}if(ym(e)){const s=fK(e,t,n);if(!vt(s))return s}if(Ei(e)){const s=hK(e,t,n);if(!vt(s))return s}return D9(e,n)}function pK(e,t,n){return e.reduce((s,r)=>{const a=Tx(r,t,n);return vt(a)?s:a},void 0)}function gK(e){return ie(e,"const")||ie(e,"enum")}function mK(e,t,n){return Et(e).reduce((s,r)=>{if(gK(r))return s;const a=Tx(e[r],t,n);return vt(a)?s:a},void 0)}function Tx(e,t,n){const s=Zn(e)&&Ds(e)?new URL(e.$id,t.href):t;if(Zn(e)){const r=xK(e,s,n);if(!vt(r))return r}if(Pe(e))return pK(e,s,n);if(xt(e))return mK(e,s,n)}function yK(e,t,n){return vm(e,new URL(t||".",Ex),n)}function kK(e,t,n,s){const r=zx(e,t,n,s,!1);return Zn(r)&&Ds(r)?r:void 0}function Lw(e){return e.href.split("#")[0]}function bK(e,t){return ae(e,t)?e[t]:void 0}function vK(e,t,n){return Tx(e,t,n)}function wK(e,t,n){const s=Lw(n);if(ie(s,Lw(t))||!ae(e,s))return;const r=e[s],a=Zn(r)&&Ds(r)?new URL(r.$id,s):new URL(s);return ie(n.hash,"")?r:Tx(r,a,n)}function jK(e,t,n,s,r){if(!s.$ref.startsWith("#")||ae(e,"$schema"))return;const a=yK(t,n,r);if(!(vt(a)||ie(a,n)))return{target:r,base:a,root:t}}function SK(e,t,n){const s=e[t];if(Zn(s))return{target:n,base:t,root:s}}function CK(e,t,n,s,r){const a=r?SK(e.context,s,n):void 0;return vt(a)?jK(e.root,e.lexicalSchema,e.referenceBase,t,n):a}function $K(e,t,n,s,r,a){if(Ds(r))return;const i=kK(e,t,n,s);if(!(!i||a.includes(i)))return{target:r,resource:i}}function zx(e,t,n,s,r=!0){const a=new URL(n||".",Ex),i=r&&Ds(t)?new URL(t.$id,a):a,o=new URL(s,i.href);return bK(e,s)??vK(t,i,o)??wK(e,i,o)}function EK(e,t,n,s,r,a){const i=new URL(n||".",Ex),o=r.$dynamicRef.startsWith("#")?s:t,c=zx(e,o,n,r.$dynamicRef,!1);if(vt(c)){const f=new URL(r.$dynamicRef,i).hash;if(!f.startsWith("#/")&&f.startsWith("#")){const h=decodeURIComponent(f.slice(1));return a.find(m=>ie(m.$dynamicAnchor,h))??_9(t,h)}return}return!Zn(c)||!Ei(c)||new URL(r.$dynamicRef,i).hash.startsWith("#/")?c:a.find(f=>ie(f.$dynamicAnchor,c.$dynamicAnchor))??c}function TK(e,t){const n=e.inRetrievedFrame?e.lexicalSchema:e.root,s=t.$ref.startsWith("#")?e.lexicalSchema:n,r=zx(e.context,s,e.referenceBase,t.$ref,!1);if(!r||!Zn(r))return{schema:r};const a=new URL(t.$ref,e.referenceBase).href.split("#")[0],i=!ie(a,e.resourceBase),o=CK(e,t,r,a,i),c=i?$K(e.context,e.root,e.referenceBase,a,r,e.ids):void 0;return{schema:r,retrievedResource:o,resolvedResource:c}}function zK(e,t){const n=km(e.lexicalSchema)?e.recursiveAnchors[0]:e.lexicalSchema;return zx(e.context,n,e.lexicalBase,t.$recursiveRef,!1)}function NK(e,t){return EK(e.context,e.root,e.lexicalBase,e.lexicalSchema,t,e.dynamicAnchors)}var et=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)},Ve,kf,L9,wm,qd,Ow,Bw,qw,Hw,lp,cp,jm,Sm,Pw,O9;class MK{constructor(t,n){Ve.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 et(this,Ve,"m",wm).call(this,this.ids)}Push(t){if(!Zn(t))return;Ds(t)&&et(this,Ve,"m",jm).call(this,t),ym(t)&&this.anchors.push(t),km(t)&&this.recursiveAnchors.push(t),Ei(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){Zn(t)&&(Ds(t)&&et(this,Ve,"m",Sm).call(this,t),ym(t)&&this.anchors.pop(),km(t)&&this.recursiveAnchors.pop(),Ei(t)&&this.dynamicAnchors.pop(),this.retrievedResources.has(t)&&this.retrievedFrames.pop(),et(this,Ve,"m",O9).call(this,t))}Ref(t){const n=TK(et(this,Ve,"m",kf).call(this),t);return et(this,Ve,"m",L9).call(this,n),n.schema}RecursiveRef(t){const n=zK(et(this,Ve,"m",kf).call(this),t);return n&&(this.pendingResource=!0),n}DynamicRef(t){const n=NK(et(this,Ve,"m",kf).call(this),t);return n&&(this.pendingResource=!0),n}}Ve=new WeakSet,kf=function(){return{context:this.context,root:this.schema,ids:this.ids,lexicalSchema:et(this,Ve,"m",Bw).call(this),lexicalBase:this.LexicalBaseURL(),referenceBase:et(this,Ve,"m",Ow).call(this),resourceBase:et(this,Ve,"m",qd).call(this),recursiveAnchors:this.recursiveAnchors,dynamicAnchors:this.dynamicAnchors,inRetrievedFrame:this.retrievedFrames.length>0}},L9=function(t){vt(t.schema)||(this.pendingResource=!0),vt(t.resolvedResource)||et(this,Ve,"m",Pw).call(this,t.resolvedResource.target,t.resolvedResource.resource),vt(t.retrievedResource)||this.retrievedResources.set(t.retrievedResource.target,{base:t.retrievedResource.base,root:t.retrievedResource.root})},wm=function(t){const n=this.retrievedFrames[this.retrievedFrames.length-1],s=n?new URL(n.base):new URL(Ex);return(n?t.slice(n.idDepth):t).reduce((a,i)=>new URL(i.$id,a),s).href},qd=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:et(this,Ve,"m",wm).call(this,this.resourceIds)},Ow=function(){if(this.retrievedFrames.length>0)return et(this,Ve,"m",qd).call(this);const t=this.ids[this.ids.length-1];return t&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(t.$id)?this.LexicalBaseURL():et(this,Ve,"m",qd).call(this)},Bw=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},qw=function(t){t.forEach(n=>et(this,Ve,"m",lp).call(this,n,!1))},Hw=function(t){t.forEach(n=>et(this,Ve,"m",cp).call(this,n,!1))},lp=function e(t,n=!0){if(Eh(t))return;if(Pe(t))return et(this,Ve,"m",qw).call(this,t);if(!Zn(t))return;const s=t;if(!(!n&&Ds(s))){!n&&Ei(s)&&this.dynamicAnchors.push(s);for(const r of Et(s))et(this,Ve,"m",e).call(this,s[r],!1)}},cp=function e(t,n=!0){if(Eh(t))return;if(Pe(t))return et(this,Ve,"m",Hw).call(this,t);if(!Zn(t))return;const s=t;if(!(!n&&Ds(s))){!n&&Ei(s)&&this.dynamicAnchors.pop();for(const r of Et(s))et(this,Ve,"m",e).call(this,s[r],!1)}},jm=function(t){this.ids.push(t);const n=this.pendingResource;this.pendingResource=!1,n&&this.resourceIds.push(t),et(this,Ve,"m",lp).call(this,t,!0)},Sm=function(t){this.ids.pop(),this.resourceIds.length>0&&ie(this.resourceIds[this.resourceIds.length-1],t)&&this.resourceIds.pop(),et(this,Ve,"m",cp).call(this,t,!0)},Pw=function(t,n){et(this,Ve,"m",jm).call(this,n),this.resolvedResources.set(t,n)},O9=function(t){if(!this.resolvedResources.has(t))return;const n=this.resolvedResources.get(t);et(this,Ve,"m",Sm).call(this,n),this.resolvedResources.delete(t)};function AK(...e){const[t,n,s]=d9(e,{3:(i,o,c)=>[i,o,c],2:(i,o)=>[{},i,o]}),r=new MK(t,n),a=new Hl;return wt(r,a,n,s)}function Hd(...e){const[t,n,s]=d9(e,{3:(r,a,i)=>[r,a,i],2:(r,a)=>[{},r,a]});return AK(t,n,s)}BigInt(Number.MAX_SAFE_INTEGER);BigInt(Number.MIN_SAFE_INTEGER);const RK=mn({type:Pn("insert"),path:nn(),value:ok()}),IK=Object({type:Pn("update"),path:nn(),value:ok()}),_K=mn({type:Pn("delete"),path:nn()});$x([RK,IK,_K]);const DK=mn({text:nn({minLength:1}),status:$x([Pn("pending"),Pn("in_progress"),Pn("completed")])}),LK=mn({items:Gi(DK)}),OK=mn({label:nn({minLength:1}),description:br(nn())}),BK=mn({question:nn({minLength:1}),header:nn({minLength:1,maxLength:16}),options:Gi(OK,{minItems:2,maxItems:4}),multiSelect:br(UF())}),qK=mn({selected:Gi(nn()),other:br(nn())}),HK=$x([mn({outcome:Pn("answered"),answers:Gi(qK),at:Wo()}),mn({outcome:Pn("dismissed"),at:Wo()}),mn({outcome:Pn("cancelled"),at:Wo()})]),PK=mn({id:nn({minLength:1}),questions:Gi(BK,{minItems:1,maxItems:4}),askedAt:Wo(),resolution:br(HK)}),UK=mn({requests:Gi(PK)}),FK=mn({patch:nn()}),GK=mn({id:br(Wo()),name:nn(),args:nn(),status:$x([Pn("running"),Pn("ok"),Pn("error"),Pn("cancelled")]),durationMs:br(Wo()),error:br(nn()),details:br(ok())}),VK=mn({code:br(nn()),calls:Gi(GK)});function Nx(e,t){return e==="pinomad.todo"&&Hd(LK,t)?{type:"pinomad.todo",value:t}:e==="pinomad.question"&&Hd(UK,t)?{type:"pinomad.question",value:t}:e==="pinomad.diff"&&Hd(FK,t)?{type:"pinomad.diff",value:t}:e==="pinomad.codemode"&&Hd(VK,t)?{type:"pinomad.codemode",value:t}:{type:"fallback",value:t}}function WK(e){return e.flatMap(t=>{const n=Nx(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 KK(e,t,n){return Array.from({length:e},(s,r)=>({selected:t[r]??[],...n[r]===void 0||n[r].trim()===""?{}:{other:n[r]}}))}const XK={border:"1px solid var(--color-border-primary, var(--color-background-muted))",borderRadius:"var(--radius-md, 8px)",padding:"var(--space-3, 12px)",backgroundColor:"var(--color-background-surface)"};function B9({docs:e,remote:t,connected:n,target:s}){const r=WK(e);return r.length===0?null:l.jsx(ve,{gap:2,padding:2,"data-testid":"pending-questions",children:r.map(({kind:a,request:i})=>l.jsx(ZK,{kind:a,request:i,remote:t,connected:n,target:s},i.id))})}function ZK({kind:e,request:t,remote:n,connected:s,target:r}){const[a,i]=x.useState(()=>t.questions.map(()=>[])),[o,c]=x.useState(()=>t.questions.map(()=>"")),u=(h,p)=>i(m=>m.map((b,y)=>y===h?p:b)),d=(h,p)=>c(m=>m.map((b,y)=>y===h?p:b)),f=()=>{const h=KK(t.questions.length,a,o);n.controller.answer(e,t.id,h,r)};return l.jsxs(ve,{gap:3,style:XK,children:[l.jsx(se,{type:"label",weight:"semibold",children:"The agent asks"}),t.questions.map((h,p)=>{var m;return l.jsxs(ve,{gap:1,children:[l.jsxs($e,{gap:2,vAlign:"center",children:[l.jsx(Fn,{label:h.header,size:"sm"}),l.jsx(se,{type:"body",children:h.question})]}),h.multiSelect===!0?l.jsx(T0,{label:h.header,isLabelHidden:!0,value:a[p]??[],onChange:b=>u(p,b),children:h.options.map(b=>l.jsx(z0,{label:b.label,value:b.label,...b.description===void 0?{}:{description:b.description}},b.label))}):l.jsx(H4,{label:h.header,isLabelHidden:!0,value:((m=a[p])==null?void 0:m[0])??"",onChange:b=>u(p,[b]),children:h.options.map(b=>l.jsx(P4,{label:b.label,value:b.label,...b.description===void 0?{}:{description:b.description}},b.label))}),l.jsx(Cr,{label:"Other",value:o[p]??"",onChange:b=>d(p,b),placeholder:"Type a custom answer…"})]},p)}),l.jsx($e,{hAlign:"end",children:l.jsx(de,{label:"Submit",variant:"primary",isDisabled:!s,onClick:f})})]})}const YK=e=>({id:e.name,label:e.name,auxiliaryData:{description:e.description}});function fk(e){const t=(e==null?void 0:e.roles)??[];return x.useMemo(()=>{if(t.length===0)return;const n=t.map(YK);return[{character:"@",searchSource:{bootstrap:()=>n,search:r=>{const a=r.toLowerCase();return n.filter(i=>i.id.includes(a))}},menuLabel:"Named agents",emptySearchResultsText:"No matching agents",renderItem:r=>{var i;const a=(i=r.auxiliaryData)==null?void 0:i.description;return l.jsxs("span",{className:"flex min-w-0 flex-col",children:[l.jsx("span",{className:"truncate",children:r.id}),a===void 0?null:l.jsx("span",{className:"truncate text-xs text-muted",children:a})]})},onSelect:r=>`@${r.id} `}]},[t])}function Uw(e){return(e==null?void 0:e.querySelector('[aria-multiline="true"]'))??null}function QK({disabled:e=!1,placeholder:t,inputRef:n,onSubmitRequest:s,value:r,onValueChange:a,onFiles:i,triggers:o}){const c=x.useRef(null),u=x.useRef(null);x.useEffect(()=>{if(n)return n.current={focus:()=>{var f;return(f=u.current)==null?void 0:f.focus()},focusAtEnd:()=>{const f=Uw(c.current);if(!f)return;f.focus();const h=window.getSelection();if(!h)return;const p=document.createRange();p.selectNodeContents(f),p.collapse(!1),h.removeAllRanges(),h.addRange(p)}},()=>{n.current=null}},[n]),x.useEffect(()=>{const f=Uw(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 d=f=>{f.nativeEvent.isComposing||f.nativeEvent.keyCode===229||f.key==="Enter"&&(f.shiftKey||(f.preventDefault(),s()))};return l.jsx(C0,{ref:c,className:"prompt-input__input",handleRef:u,hasHistory:!1,isDisabled:e,label:"Prompt",pasteAsToken:!1,placeholder:t,value:r,onChange:f=>a==null?void 0:a(f),onKeyDown:d,...i===void 0?{}:{onFiles:i},...o===void 0?{}:{triggers:[...o]}})}function hk({value:e,status:t="ready",className:n="",placeholder:s,inputRef:r,isDisabled:a=!1,attachments:i,hasAttachments:o,onFiles:c,triggers:u,startActions:d,endActions:f,footer:h,error:p,accent:m,accentFocusRing:b=!1,onSubmit:y,onStop:g,onValueChange:k,...v}){const j=(t==="streaming"||t==="submitted")&&!e.trim()&&o!==!0&&!!g,C=!!e.trim()||o===!0,$=()=>{C&&(y==null||y())},E=S=>{c===void 0||!S.dataTransfer.types.includes("Files")||S.preventDefault()},T=S=>{if(c===void 0||!S.dataTransfer.types.includes("Files"))return;S.preventDefault();const M=[...S.dataTransfer.files];M.length>0&&c(M)};return l.jsxs("div",{className:`prompt-input ${n}`.trim(),"data-accent":m,"data-accent-focus":m&&b?"":void 0,"data-slot":"prompt-input","data-status":t,onDragOver:E,onDrop:T,...v,children:[l.jsx(p4,{elevation:"low",...i===void 0?{}:{drawer:l.jsx(g4,{children:i})},footerActions:d,input:l.jsx(QK,{disabled:a,inputRef:r,placeholder:s,value:e,onValueChange:k,onSubmitRequest:$,onFiles:c,triggers:u}),isStopShown:j&&!a,placeholder:s,sendActions:f,sendButton:l.jsx($0,{className:"pigui-pressable",isDisabled:a||!j&&!C,onSend:$}),status:p?{type:"error",message:p}:void 0,value:e,onChange:S=>k==null?void 0:k(S),onStop:g,onSubmit:$}),h?l.jsx("div",{className:"prompt-input__footer","data-slot":"prompt-input-footer",children:h}):null]})}const JK=["path","file_path","filePath","command","cmd","query","pattern","url","name","description","task"],Fw=120;function eX(e){if(!(typeof e!="object"||e===null))for(const t of JK){const n=e[t];if(typeof n=="string"&&n.length>0)return n.length>Fw?`${n.slice(0,Fw)}…`:n}}function pi(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 xk(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}return eX(t)}function q9(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}const tX={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 H9(e){return(e??"").trim().toLowerCase().replace(/-/g,"_")}function Th(e){return tX[H9(e)]??"tool"}function nX(e){const t=new Set(e.map(n=>Th(n.toolName)));return t.size===1?[...t][0]:"tool"}const sX=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/,rX=/^\+\s*\d+ /,aX=/^-\s*\d+ /;function iX(e){let t=0,n=0,s=0,r=0,a=!1;for(const i of e.split(`
381
- `)){const o=sX.exec(i);if(o){s=Number.parseInt(o[2]??"1",10),r=Number.parseInt(o[4]??"1",10),a=!0;continue}if(!a)continue;if(s===0&&r===0){a=!1;continue}const c=i.charAt(0);c===" "?(s-=1,r-=1):c==="-"?(s-=1,n+=1):c==="+"&&(r-=1,t+=1)}return{additions:t,deletions:n}}function oX(e){let t=0,n=0;for(const s of e.split(`
382
- `))rX.test(s)?t+=1:aX.test(s)&&(n+=1);return{additions:t,deletions:n}}function lX(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,a=typeof s=="string"?iX(s):typeof r=="string"?oX(r):void 0;return a!==void 0&&(a.additions>0||a.deletions>0)?a:void 0}function pk(e){return e.pinomad}function P9(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function U9(e){return typeof e=="string"?[]:e.flatMap(t=>t.type==="image"&&t.data!==void 0&&t.mimeType!==void 0?[{data:t.data,mimeType:t.mimeType}]:[])}const Ko=e=>e.type==="toolCall"&&e.id!==void 0;function cX(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 uX(e){if(typeof e!="object"||e===null)return;const t=e.conversationId;return typeof t=="number"?t:void 0}function dX(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:Nx(t[e.name],e.details),a=(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},...a===void 0?{}:{pinomad:a}}}function fX(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 hX(e,t,n,s,r){const a=e.id,i=t.results.get(a),o=t.partial?void 0:n.get(a),c=(o==null?void 0:o.name)??e.name,u=cX(e.arguments,c);let d,f;i!==void 0?(d=i.isError===!0?"output-error":"output-available",f=P9(i.content)):(o==null?void 0:o.status)==="running"?(d="input-available",f=o.output):t.partial===!0?d="input-streaming":t.msg.stopReason!=="toolUse"?(d="output-error",f="Not run: the answer was interrupted."):(d="input-available",f=o==null?void 0:o.output);const h=(i==null?void 0:i.details)??(o==null?void 0:o.details),p=h===void 0?void 0:Nx(r[c??""],h),m=i!==void 0&&i.isError!==!0?lX({details:i.details}):void 0,b=i===void 0?[]:U9(i.content),y=uX(h);let g,k;if((p==null?void 0:p.type)==="pinomad.diff")g={kind:"diff",patch:p.value.patch};else if(y!==void 0){const v=h;g={kind:"subagent",conversationId:y,...f===void 0?{}:{output:f},...typeof v.model=="string"?{model:v.model}:{},...typeof v.startedAt=="number"?{startedAt:v.startedAt}:{},...typeof(i==null?void 0:i.timestamp)=="number"?{endedAt:i.timestamp}:{}}}return c==="codemode"&&i===void 0?k=(s.get(a)??[]).map(fX):(p==null?void 0:p.type)==="pinomad.codemode"&&(k=p.value.calls.map(v=>dX(v,r))),{state:d,toolCallId:a,...c===void 0?{}:{toolName:c},...u===void 0?{}:{argsText:u},...f===void 0?{}:{output:f},...m===void 0?{}:{diffStat:m},...b.length===0?{}:{images:b},...k===void 0||k.length===0?{}:{children:k},...g===void 0?{}:{pinomad:g}}}function xX(e){const t=[];for(const n of e)if(Ko(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 pX(e,t,n,s,r){var M,z,A;const a=new Map(((M=s?n.tools:void 0)==null?void 0:M.map(R=>[R.callId,R]))??[]),i=new Map;if(s)for(const R of n.nestedTools??[]){if(R.name.startsWith("pi."))continue;const I=i.get(R.parentCallId);I===void 0?i.set(R.parentCallId,[R]):I.push(R)}const o=s?(z=n.generation)==null?void 0:z.message:void 0,c=new Map,u=[...t.assistants.map(({id:R,msg:I,results:N})=>({id:R,msg:I,results:N})),...o===void 0?[]:[{id:"live",msg:o,partial:!0,results:c}]],d=u[u.length-1],f=t.assistants[t.assistants.length-1],h=!s,m=(d===void 0?[]:d.msg.content.filter(R=>R.type==="text")).map(R=>R.text??"").join(""),b=(d==null?void 0:d.msg.content.some(Ko))===!0,y=m!==""&&(h||!b),g=(R,I)=>Ko(I)&&!R.results.has(I.id)&&(R.partial===!0||R.msg.stopReason==="toolUse"),k=u.some(R=>R.msg.content.some(I=>g(R,I))),v=d==null?void 0:d.msg.content[d.msg.content.length-1];let w;h?w="settled":y?w="answering":k||v!==void 0&&Ko(v)?w="acting":u.length>0?w="thinking":w="hidden";const j=w==="thinking"||w==="acting",C=[];for(const R of u){const I=R===d,N=R.msg.content;xX(N).forEach((_,L)=>{if(_.kind==="tools"){const O=_.blocks.filter(F=>g(R,F)),q=j&&O.length>0;C.push({kind:"tools",id:`${R.id}-tools-${L}`,tools:_.blocks.map(F=>hX(F,R,a,i,r)),live:q,...q&&O[0]!==void 0?{activeToolCallId:O[0].id}:{}});return}if(_.kind==="text"){I&&y||C.push({kind:"interim",id:`${R.id}-text-${L}`,text:_.block.text??""});return}const D=N.indexOf(_.block);C.push({kind:"thinking",id:`${R.id}-thinking-${L}`,text:_.block.thinking??"",live:j&&R.partial===!0&&D===N.length-1})})}const $=(f==null?void 0:f.msg.stopReason)==="aborted",E=h&&(f==null?void 0:f.msg.stopReason)==="error",T=(A=u[0])==null?void 0:A.msg.timestamp;let S;if(h&&T!==void 0){const R=y?d==null?void 0:d.msg.timestamp:t.lastTs??(d==null?void 0:d.msg.timestamp);S=R===void 0?void 0:R-T}return{kind:"run",id:e,cot:{phase:w,...E===!0?{outcome:"failed"}:{},...T===void 0?{}:{anchorMs:T},...S===void 0?{}:{elapsedMs:S},steps:C,...y?{answer:{text:m,streaming:(d==null?void 0:d.partial)===!0}}:{}},interrupted:$,...h&&!$&&E!==!0&&f!==void 0?{forkEntryId:f.id}:{},...E===!0?{failure:(f==null?void 0:f.msg.errorMessage)??"The run failed."}:{}}}function gX(e,t,n){var c;const s=[],r=e.docs["pi.live"]??{};let a,i=0;const o=u=>{var d;if(a!==void 0){if(a.assistants.length>0||a.orphans.size>0||u){const f=((d=a.assistants[0])==null?void 0:d.id)??`open-${i++}`;s.push(pX(`run-${f}`,a,r,u,t))}a=void 0}};for(const u of e.entries){const d=(c=u.model)==null?void 0:c[0],f=String(u.id);if(u.kind==="pi.user"&&(d==null?void 0:d.role)==="user")o(!1),s.push({kind:"user",id:f,text:P9(d.content),images:U9(d.content)});else if(u.kind==="pi.compaction")o(!1),s.push({kind:"compaction",id:f});else if(u.kind==="pi.reset")o(!1),s.push({kind:"reset",id:f});else if(u.kind==="pi.assistant"&&(d==null?void 0:d.role)==="assistant"){a??(a={assistants:[],orphans:new Map});const h=new Map;for(const p of d.content){if(!Ko(p))continue;const m=a.orphans.get(p.id);m!==void 0&&(a.orphans.delete(p.id),h.set(p.id,m))}a.assistants.push({id:f,msg:d,results:h}),a.lastTs=d.timestamp??a.lastTs}else if(u.kind==="pi.tool-result"&&(d==null?void 0:d.role)==="toolResult"&&d.toolCallId!==void 0){a??(a={assistants:[],orphans:new Map});const h=a.assistants.findLast(p=>!p.results.has(d.toolCallId)&&p.msg.content.some(m=>Ko(m)&&m.id===d.toolCallId));h===void 0?a.orphans.set(d.toolCallId,d):h.results.set(d.toolCallId,d),a.lastTs=d.timestamp??a.lastTs}}return a??(a=n?{assistants:[],orphans:new Map}:void 0),o(n),s}function mX(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?void 0:{text:s.text,images:s.images,requestId:`retry:${t.id}`}}}function yX(e){const t=[],n=[];for(const s of e.steps){if(s.kind!=="tools"){n.push(s);continue}const r=[];if(s.tools.forEach((a,i)=>{if(a.toolName!=="subagent"){r.push(a);return}t.push({key:`${s.id}/${a.toolCallId??i}`,tool:a})}),r.length!==0)if(s.activeToolCallId!==void 0&&!r.some(a=>a.toolCallId===s.activeToolCallId)){const a=r.find(i=>i.state==="input-streaming"||i.state==="input-available");if(a===void 0){const{activeToolCallId:i,...o}=s;n.push({...o,tools:r,live:!1})}else n.push({...s,tools:r,...a.toolCallId===void 0?{}:{activeToolCallId:a.toolCallId}})}else n.push({...s,tools:r})}return{view:{...e,steps:n},subagents:t}}const Gw={};function Hu(e,t){const n=x.useRef(Gw);return n.current===Gw&&(n.current=e(t)),n}const up=S5[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],kX=up&&up!==x.useLayoutEffect?up:e=>e();function Ti(e){const t=Hu(bX).current;return t.next=e,kX(t.effect),t.trampoline}function bX(){const e={next:void 0,callback:vX,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function vX(){}function gk(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 Cm(e,t,n,s){const r=Hu(F9).current;return jX(r,e,t,n,s)&&G9(r,[e,t,n,s]),r.callback}function wX(e){const t=Hu(F9).current;return SX(t,e)&&G9(t,e),t.callback}function F9(){return{callback:null,cleanup:null,refs:[]}}function jX(e,t,n,s,r){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==s||e.refs[3]!==r}function SX(e,t){return e.refs.length!==t.length||e.refs.some((n,s)=>n!==t[s])}function G9(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 a=t[r];if(a!=null)switch(typeof a){case"function":{const i=a(n);typeof i=="function"&&(s[r]=i);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let r=0;r<t.length;r+=1){const a=t[r];if(a!=null)switch(typeof a){case"function":{const i=s[r];typeof i=="function"?i():a(null);break}case"object":{a.current=null;break}}}}}}}const CX=parseInt(x.version,10);function $X(e){return CX>=e}function Vw(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return($X(19)?n==null?void 0:n.ref:t.ref)??null}function $m(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function EX(e,t){const n={};for(const s in e){const r=e[s];if(t!=null&&t.hasOwnProperty(s)){const a=t[s](r);a!=null&&Object.assign(n,a);continue}r===!0?n[`data-${s.toLowerCase()}`]="":r&&(n[`data-${s.toLowerCase()}`]=r.toString())}return n}function TX(e,t){return typeof e=="function"?e(t):e}function zX(e,t){return typeof e=="function"?e(t):e}const _c={};function V9(e,t,n,s,r){let a={...Em(e,_c)};return t&&(a=bf(a,t)),n&&(a=bf(a,n)),s&&(a=bf(a,s)),a}function NX(e){if(e.length===0)return _c;if(e.length===1)return Em(e[0],_c);let t={...Em(e[0],_c)};for(let n=1;n<e.length;n+=1)t=bf(t,e[n]);return t}function bf(e,t){return W9(t)?t(e):MX(e,t)}function MX(e,t){if(!t)return e;for(const n in t){const s=t[n];switch(n){case"style":{e[n]=$m(e.style,s);break}case"className":{e[n]=K9(e.className,s);break}default:AX(n,s)?e[n]=RX(e[n],s):e[n]=s}}return e}function AX(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 W9(e){return typeof e=="function"}function Em(e,t){return W9(e)?e(t):e??_c}function RX(e,t){return t?e?n=>{if(IX(n)){const r=n;Tm(r);const a=t(r);return r.baseUIHandlerPrevented||e==null||e(r),a}const s=t(n);return e==null||e(n),s}:t:e}function Tm(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function K9(e,t){return t?e?t+" "+e:t:e}function IX(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const Xa=Object.freeze({});function mk(e,t,n={}){const s=t.render,r=_X(t,n);if(n.enabled===!1)return null;const a=n.state??Xa;return DX(e,s,r,a)}function _X(e,t={}){const{className:n,style:s,render:r}=e,{state:a=Xa,ref:i,props:o,stateAttributesMapping:c,enabled:u=!0}=t,d=u?TX(n,a):void 0,f=u?zX(s,a):void 0,h=u?EX(a,c):Xa,p=u?$m(h,Array.isArray(o)?NX(o):o)??Xa:Xa;return typeof document<"u"&&(u?Array.isArray(i)?p.ref=wX([p.ref,Vw(r),...i]):p.ref=Cm(p.ref,Vw(r),i):Cm(null,null)),u?(d!==void 0&&(p.className=K9(p.className,d)),f!==void 0&&(p.style=$m(p.style,f)),p):Xa}function DX(e,t,n,s){if(t){if(typeof t=="function")return t(n,s);const r=V9(n,t.props);return r.ref=n.ref,x.cloneElement(t,r)}if(e&&typeof e=="string")return LX(e,n);throw new Error(gk(8))}function LX(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 OX({controlled:e,default:t,name:n,state:s="value"}){const{current:r}=x.useRef(e!==void 0),[a,i]=x.useState(t),o=r?e:a,c=x.useCallback(u=>{r||i(u)},[]);return[o,c]}const BX=()=>{},Un=typeof document<"u"?x.useLayoutEffect:BX,qX={...S5};let Ww=0;function HX(e,t="mui"){const[n,s]=x.useState(e),r=e||n;return x.useEffect(()=>{n==null&&(Ww+=1,s(`${t}-${Ww}`))},[n,t]),r}const Kw=qX.useId;function PX(e,t){if(Kw!==void 0){const n=Kw();return`${t}-${n}`}return HX(e,t)}function UX(e){return PX(e,"base-ui")}const FX="none",GX="trigger-press";function X9(e,t,n,s){let r=!1,a=!1;const i=Xa;return{reason:e,event:t??new Event("base-ui"),cancel(){r=!0},allowPropagation(){a=!0},get isCanceled(){return r},get isPropagationAllowed(){return a},trigger:n,...i}}const VX=[];function Z9(e){x.useEffect(e,VX)}const Pd=null;class WX{constructor(){ee(this,"callbacks",[]);ee(this,"callbacksCount",0);ee(this,"nextId",1);ee(this,"startId",1);ee(this,"isScheduled",!1);ee(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 a=0;a<n.length;a+=1)(r=n[a])==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 Ud=new WX;class pt{constructor(){ee(this,"currentId",Pd);ee(this,"cancel",()=>{this.currentId!==Pd&&(Ud.cancel(this.currentId),this.currentId=Pd)});ee(this,"disposeEffect",()=>this.cancel)}static create(){return new pt}static request(t){return Ud.request(t)}static cancel(t){return Ud.cancel(t)}request(t){this.cancel(),this.currentId=Ud.request(()=>{this.currentId=Pd,t()})}}function Y9(){const e=Hu(pt.create).current;return Z9(e.disposeEffect),e}function KX(e){return e==null?e:"current"in e?e.current:e}function Q9(e,t=!1,n=!0){const s=Y9();return Ti((r,a=null)=>{s.cancel();const i=KX(e);i!=null&&(typeof i.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?r():s.request(()=>{function o(){i&&Promise.all(i.getAnimations().map(c=>c.finished)).then(()=>{a!=null&&a.aborted||Hc.flushSync(r)}).catch(()=>{if(n){if(a!=null&&a.aborted)return;Hc.flushSync(r)}else i.getAnimations().length>0&&i.getAnimations().some(c=>c.pending||c.playState!=="finished")&&o()})}t?s.request(o):o()}))})}function XX(e,t=!1,n=!1){const[s,r]=x.useState(e&&t?"idle":void 0),[a,i]=x.useState(e);return e&&!a&&(i(!0),r("starting")),!e&&a&&s!=="ending"&&!n&&r("ending"),!e&&!a&&s==="ending"&&r(void 0),Un(()=>{if(!e&&a&&s!=="ending"&&n){const o=pt.request(()=>{r("ending")});return()=>{pt.cancel(o)}}},[e,a,s,n]),Un(()=>{if(!e||t)return;const o=pt.request(()=>{Hc.flushSync(()=>{r(void 0)})});return()=>{pt.cancel(o)}},[t,e]),Un(()=>{if(!e||!t)return;e&&a&&s!=="idle"&&r("starting");const o=pt.request(()=>{r("idle")});return()=>{pt.cancel(o)}},[t,e,a,r,s]),x.useMemo(()=>({mounted:a,setMounted:i,transitionStatus:s}),[a,s])}function ZX(e){const{open:t,defaultOpen:n,onOpenChange:s,disabled:r}=e,a=t!==void 0,[i,o]=OX({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:u,transitionStatus:d}=XX(i,!0,!0),[f,h]=x.useState(i),[{height:p,width:m},b]=x.useState({height:void 0,width:void 0}),y=UX(),[g,k]=x.useState(),v=g??y,[w,j]=x.useState(!1),[C,$]=x.useState(!1),E=x.useRef(null),T=x.useRef(null),S=x.useRef(null),M=x.useRef(null),z=Q9(M,!1),A=Ti(R=>{const I=!i,N=X9(GX,R.nativeEvent);if(s(I,N),N.isCanceled)return;const _=M.current;T.current==="css-animation"&&_!=null&&_.style.removeProperty("animation-name"),!w&&!C&&(T.current!=null&&T.current!=="css-animation"&&!c&&I&&u(!0),T.current==="css-animation"&&(!f&&I&&h(!0),!c&&I&&u(!0))),o(I),T.current==="none"&&c&&!I&&u(!1)});return Un(()=>{a&&T.current==="none"&&!C&&!i&&u(!1)},[a,C,i,t,u]),x.useMemo(()=>({abortControllerRef:E,animationTypeRef:T,disabled:r,handleTrigger:A,height:p,mounted:c,open:i,panelId:v,panelRef:M,runOnceAnimationsFinish:z,setDimensions:b,setHiddenUntilFound:j,setKeepMounted:$,setMounted:u,setOpen:o,setPanelIdState:k,setVisible:h,transitionDimensionRef:S,transitionStatus:d,visible:f,width:m}),[E,T,r,A,p,c,i,v,M,z,b,j,$,u,o,h,S,d,f,m])}const J9=x.createContext(void 0);function eC(){const e=x.useContext(J9);if(e===void 0)throw new Error(gk(15));return e}let zh=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const YX={[zh.startingStyle]:""},QX={[zh.endingStyle]:""},tC={transitionStatus(e){return e==="starting"?YX:e==="ending"?QX:null}};let Dc=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=zh.startingStyle]="startingStyle",e[e.endingStyle=zh.endingStyle]="endingStyle",e}({}),JX=function(e){return e.panelOpen="data-panel-open",e}({});const eZ={[Dc.open]:""},tZ={[Dc.closed]:""},nZ={open(e){return e?{[JX.panelOpen]:""}:null}},sZ={open(e){return e?eZ:tZ}},nC={...sZ,...tC},yk=x.forwardRef(function(t,n){const{render:s,className:r,defaultOpen:a=!1,disabled:i=!1,onOpenChange:o,open:c,...u}=t,d=Ti(o),f=ZX({open:c,defaultOpen:a,onOpenChange:d,disabled:i}),h=x.useMemo(()=>({open:f.open,disabled:f.disabled,transitionStatus:f.transitionStatus}),[f.open,f.disabled,f.transitionStatus]),p=x.useMemo(()=>({...f,onOpenChange:d,state:h}),[f,d,h]),m=mk("div",t,{state:h,ref:n,props:u,stateAttributesMapping:nC});return l.jsx(J9.Provider,{value:p,children:m})});function rZ(){return typeof window<"u"}function aZ(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function iZ(e){return rZ()?e instanceof HTMLElement||e instanceof aZ(e).HTMLElement:!1}const oZ=x.createContext(void 0);function lZ(e=!1){const t=x.useContext(oZ);if(t===void 0&&!e)throw new Error(gk(16));return t}function cZ(e){const{focusableWhenDisabled:t,disabled:n,composite:s=!1,tabIndex:r=0,isNativeButton:a}=e,i=s&&t!==!1,o=s&&t===!1;return{props:x.useMemo(()=>{const u={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return s||(u.tabIndex=r,!a&&n&&(u.tabIndex=t?r:-1)),(a&&(t||i)||!a&&n)&&(u["aria-disabled"]=n),a&&(!t||o)&&(u.disabled=n),u},[s,n,t,i,o,a,r])}}function uZ(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:s=0,native:r=!0}=e,a=x.useRef(null),i=lZ(!0)!==void 0,o=Ti(()=>{const h=a.current;return!!((h==null?void 0:h.tagName)==="A"&&(h!=null&&h.href))}),{props:c}=cZ({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:s,isNativeButton:r}),u=x.useCallback(()=>{const h=a.current;dZ(h)&&i&&t&&c.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,c.disabled,i]);Un(u,[u]);const d=x.useCallback((h={})=>{const{onClick:p,onMouseDown:m,onKeyUp:b,onKeyDown:y,onPointerDown:g,...k}=h;return V9({type:r?"button":void 0,onClick(w){if(t){w.preventDefault();return}p==null||p(w)},onMouseDown(w){t||m==null||m(w)},onKeyDown(w){if(t||(Tm(w),y==null||y(w)),w.baseUIHandlerPrevented)return;const j=w.target===w.currentTarget&&!r&&!o()&&!t,C=w.key==="Enter",$=w.key===" ";j&&(($||C)&&w.preventDefault(),C&&(p==null||p(w)))},onKeyUp(w){t||(Tm(w),b==null||b(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!r&&!t&&w.key===" "&&(p==null||p(w))},onPointerDown(w){if(t){w.preventDefault();return}g==null||g(w)}},r?void 0:{role:"button"},c,k)},[t,c,r,o]),f=Ti(h=>{a.current=h,u()});return{getButtonProps:d,buttonRef:f}}function dZ(e){return iZ(e)&&e.tagName==="BUTTON"}const fZ={...nZ,...tC},kk=x.forwardRef(function(t,n){const{panelId:s,open:r,handleTrigger:a,state:i,disabled:o}=eC(),{className:c,disabled:u=o,id:d,render:f,nativeButton:h=!0,...p}=t,{getButtonProps:m,buttonRef:b}=uZ({disabled:u,focusableWhenDisabled:!0,native:h}),y=x.useMemo(()=>({"aria-controls":r?s:void 0,"aria-expanded":r,disabled:u,onClick:a}),[s,u,r,a]);return mk("button",t,{state:i,ref:[n,b],props:[y,p,m],stateAttributesMapping:fZ})});let hZ=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});function xZ(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:s,height:r,hiddenUntilFound:a,keepMounted:i,id:o,mounted:c,onOpenChange:u,open:d,panelRef:f,runOnceAnimationsFinish:h,setDimensions:p,setMounted:m,setOpen:b,setVisible:y,transitionDimensionRef:g,visible:k,width:v}=e,w=x.useRef(!1),j=x.useRef(null),C=x.useRef(d),$=x.useRef(d),E=Y9(),T=x.useMemo(()=>n.current==="css-animation"?!k:!d&&!c,[d,c,k,n]),S=Ti(z=>{if(!z)return;if(n.current==null||g.current==null){const I=getComputedStyle(z),N=I.animationName!=="none"&&I.animationName!=="",_=I.transitionDuration!=="0s"&&I.transitionDuration!=="";N&&_||(I.animationName==="none"&&I.transitionDuration!=="0s"?n.current="css-transition":I.animationName!=="none"&&I.transitionDuration==="0s"?n.current="css-animation":n.current="none"),z.getAttribute(hZ.orientation)==="horizontal"||I.transitionProperty.indexOf("width")>-1?g.current="width":g.current="height"}if(n.current!=="css-transition")return;(r===void 0||v===void 0)&&(p({height:z.scrollHeight,width:z.scrollWidth}),$.current&&z.style.setProperty("transition-duration","0s"));let A=-1,R=-1;return A=pt.request(()=>{$.current=!1,R=pt.request(()=>{setTimeout(()=>{z.style.removeProperty("transition-duration")})})}),()=>{pt.cancel(A),pt.cancel(R)}}),M=Cm(s,f,S);return Un(()=>{if(n.current!=="css-transition")return;const z=f.current;if(!z)return;let A=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){const R={"justify-content":z.style.justifyContent,"align-items":z.style.alignItems,"align-content":z.style.alignContent,"justify-items":z.style.justifyItems};Object.keys(R).forEach(I=>{z.style.setProperty(I,"initial","important")}),!$.current&&!i&&z.setAttribute(Dc.startingStyle,""),p({height:z.scrollHeight,width:z.scrollWidth}),A=pt.request(()=>{Object.entries(R).forEach(([I,N])=>{N===""?z.style.removeProperty(I):z.style.setProperty(I,N)})})}else{if(z.scrollHeight===0&&z.scrollWidth===0)return;p({height:z.scrollHeight,width:z.scrollWidth});const R=new AbortController;t.current=R;const I=R.signal;let N=null;const _=Dc.endingStyle;return N=new MutationObserver(L=>{L.some(O=>O.type==="attributes"&&O.attributeName===_)&&(N==null||N.disconnect(),N=null,h(()=>{p({height:0,width:0}),z.style.removeProperty("content-visibility"),m(!1),t.current===R&&(t.current=null)},I))}),N.observe(z,{attributes:!0,attributeFilter:[_]}),()=>{N==null||N.disconnect(),E.cancel(),t.current===R&&(R.abort(),t.current=null)}}return()=>{pt.cancel(A)}},[t,n,E,a,i,c,d,f,h,p,m]),Un(()=>{if(n.current!=="css-animation")return;const z=f.current;z&&(j.current=z.style.animationName||j.current,z.style.setProperty("animation-name","none"),p({height:z.scrollHeight,width:z.scrollWidth}),!C.current&&!w.current&&z.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),m(!0),y(!0)):(t.current=new AbortController,h(()=>{m(!1),y(!1),t.current=null},t.current.signal)))},[t,n,d,f,h,p,m,y,k]),Z9(()=>{const z=pt.request(()=>{C.current=!1});return()=>pt.cancel(z)}),Un(()=>{if(!a)return;const z=f.current;if(!z)return;let A=-1,R=-1;return d&&w.current&&(z.style.transitionDuration="0s",p({height:z.scrollHeight,width:z.scrollWidth}),A=pt.request(()=>{w.current=!1,R=pt.request(()=>{setTimeout(()=>{z.style.removeProperty("transition-duration")})})})),()=>{pt.cancel(A),pt.cancel(R)}},[a,d,f,p]),Un(()=>{const z=f.current;z&&a&&T&&(z.setAttribute("hidden","until-found"),n.current==="css-transition"&&z.setAttribute(Dc.startingStyle,""))},[a,T,n,f]),x.useEffect(function(){const A=f.current;if(!A)return;function R(I){w.current=!0,b(!0),u(!0,X9(FX,I))}return A.addEventListener("beforematch",R),()=>{A.removeEventListener("beforematch",R)}},[u,f,b]),x.useMemo(()=>({props:{hidden:T,id:o,ref:M}}),[T,o,M])}let Xw=function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e}({});function pZ(e){const t=Hu(gZ,e).current;return t.next=e,Un(t.effect),t}function gZ(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function mZ(e){const{enabled:t=!0,open:n,ref:s,onComplete:r}=e,a=pZ(n),i=Ti(r),o=Q9(s,n);x.useEffect(()=>{t&&o(()=>{n===a.current&&i()})},[t,n,i,o,a])}const bk=x.forwardRef(function(t,n){const{className:s,hiddenUntilFound:r,keepMounted:a,render:i,id:o,...c}=t,{abortControllerRef:u,animationTypeRef:d,height:f,mounted:h,onOpenChange:p,open:m,panelId:b,panelRef:y,runOnceAnimationsFinish:g,setDimensions:k,setHiddenUntilFound:v,setKeepMounted:w,setMounted:j,setPanelIdState:C,setOpen:$,setVisible:E,state:T,transitionDimensionRef:S,visible:M,width:z,transitionStatus:A}=eC(),R=r??!1,I=a??!1;Un(()=>{if(o)return C(o),()=>{C(void 0)}},[o,C]),Un(()=>{v(R)},[v,R]),Un(()=>{w(I)},[w,I]);const{props:N}=xZ({abortControllerRef:u,animationTypeRef:d,externalRef:n,height:f,hiddenUntilFound:R,id:b,keepMounted:I,mounted:h,onOpenChange:p,open:m,panelRef:y,runOnceAnimationsFinish:g,setDimensions:k,setMounted:j,setOpen:$,setVisible:E,transitionDimensionRef:S,visible:M,width:z});mZ({open:m&&A==="idle",ref:y,onComplete(){m&&k({height:void 0,width:void 0})}});const _=x.useMemo(()=>({...T,transitionStatus:A}),[T,A]),L=mk("div",t,{state:_,ref:[n,y],props:[N,{style:{[Xw.collapsiblePanelHeight]:f===void 0?"auto":`${f}px`,[Xw.collapsiblePanelWidth]:z===void 0?"auto":`${z}px`}},c],stateAttributesMapping:nC});return I||R||!I&&h?L:null}),yZ=860,kZ=Array.from({length:9},(e,t)=>{const n=Math.floor(t/3);return(t%3+Math.abs(n-1))*90});function bZ({className:e="",periodMs:t=yZ,style:n,...s}){return l.jsx("span",{"aria-hidden":"true",className:`chat-pixel-loader ${e}`.trim(),"data-slot":"chat-pixel-loader",style:{"--chat-pixel-period":`${t}ms`,...n},...s,children:kZ.map((r,a)=>l.jsx("span",{className:"chat-pixel-loader__cell",style:{animationDelay:`${r}ms`}},a))})}function Mx({children:e,className:t="",tone:n="default",...s}){const r=n==="brand"?" text-shimmer--brand":"";return l.jsx("span",{className:`text-shimmer${r} ${t}`.trim(),"data-slot":"text-shimmer","data-tone":n,...s,children:e})}function vZ(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`}const wZ=["Thinking","Pondering","Mulling","Reasoning","Exploring","Connecting dots","Weighing options","Sketching a plan"],jZ=["Working","Digging in","Checking","Poking around","Running things","Reading the room","Following the trail"],SZ=4e3;function CZ(e,t){const n=e==="thinking"?wZ:jZ,r=Math.floor(Math.max(0,t)/SZ)*1103515245+12345>>>0;return n[r%n.length]}function $Z({className:e="",elapsedMs:t,phase:n,...s}){return l.jsxs("p",{className:`chat-status-line ${e}`.trim(),"data-slot":"chat-status-line",role:"status",...s,children:[l.jsx(bZ,{}),l.jsxs(Mx,{className:"chat-status-line__word",children:[CZ(n,t??0),"…"]}),t===void 0?null:l.jsx("span",{className:"chat-status-line__clock",children:vZ(t)})]})}function EZ(e){if(e===void 0||!Number.isFinite(e)||e<0)return"Worked";const t=Math.max(1,Math.round(e/1e3));if(t<60)return`Worked for ${t}s`;if(t<3600){const a=Math.floor(t/60),i=t%60;return`Worked for ${a}m ${i}s`}const n=Math.floor(t/3600),s=Math.floor(t%3600/60),r=t%60;return`Worked for ${n}h ${s}m ${r}s`}function TZ(e,t){const[n,s]=x.useState(()=>Date.now());if(x.useEffect(()=>{if(!t)return;const r=window.setInterval(()=>s(Date.now()),100);return()=>window.clearInterval(r)},[t]),e!==void 0)return Math.max(0,n-e)}function Lc({children:e,className:t="",defaultOpen:n=!1,elapsedMs:s,hasSteps:r=!0,phase:a,outcome:i,startedAtMs:o,...c}){const[u,d]=x.useState(n),f=a==="thinking"||a==="acting",h=TZ(o,f&&s===void 0);if(a==="hidden")return null;const p=a==="settled",m=EZ(s),b=i==="failed"?m.replace("Worked for","Failed after").replace("Worked","Failed"):m;return l.jsxs("div",{className:`chain-of-thought ${t}`.trim(),"data-phase":a,"data-slot":"chain-of-thought",...c,children:[l.jsxs(yk,{open:p?u:!0,onOpenChange:d,children:[p?r?l.jsxs(kk,{className:"chain-of-thought__trigger","data-slot":"chain-of-thought-trigger",children:[b,l.jsx(Sa,{"aria-hidden":"true",className:"chat-step__chevron"})]}):l.jsx("p",{className:"chain-of-thought__label","data-slot":"chain-of-thought-label",children:b}):null,l.jsx(bk,{keepMounted:!0,className:"chain-of-thought__content","data-slot":"chain-of-thought-content",children:e})]}),f?l.jsx($Z,{elapsedMs:s??h,phase:a}):null]})}function zZ({children:e,className:t="",...n}){return l.jsx("ol",{className:`chain-of-thought__steps ${t}`.trim(),"data-slot":"chain-of-thought-steps",...n,children:e})}function NZ({children:e,className:t="",...n}){return l.jsx("li",{className:`chain-of-thought__step ${t}`.trim(),"data-slot":"chain-of-thought-step",...n,children:e})}Lc.Steps=zZ;Lc.Step=NZ;const zm=x.createContext(!1);function MZ(e){var o;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 a=Number(((o=/^L(\d+)(?:-L?\d+)?$/.exec(n))==null?void 0:o[1])??(s==null?void 0:s[1])),i=r.slice(r.lastIndexOf("/")+1);return{path:r,name:i,...Number.isSafeInteger(a)&&a>0?{line:a}:{}}}function AZ(e){return typeof e=="string"?e:Array.isArray(e)&&e.every(t=>typeof t=="string")?e.join(""):null}function RZ({href:e,children:t}){const n=MZ(e);if(!n){const a=/^https?:\/\//.test(e);return l.jsx(W4,{color:"accent",hasUnderline:!0,href:e,type:"inherit",...a?{target:"_blank",rel:"noopener noreferrer"}:{},children:l.jsx(zm.Provider,{value:!0,children:t})})}const s=AZ(t),r=s!==null&&(s===e||s===n.path||n.line!==void 0&&s===`${n.path}:${n.line}`);return l.jsxs("a",{className:"chat-file-link","data-slot":"chat-file-link",href:e,title:n.line?`${n.path}:${n.line}`:n.path,children:[l.jsx(F7,{"aria-hidden":!0,className:"chat-file-link__icon"}),l.jsx(zm.Provider,{value:!0,children:r?n.line?`${n.name}:${n.line}`:n.name:t})]})}const sC=3,rC=x.createContext(void 0);function aC({children:e}){const t=x.useContext(rC),n=x.useContext(zm),s=l.jsx(g0,{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))?l.jsx("a",{href:r,className:"chat-inline-code-link","data-slot":"chat-inline-code-link",title:r,children:s}):s}const iC={inlineCode:aC},oC={inlineCode:aC,link:RZ};function IZ({children:e,fileLinks:t=!1,linkedInlineCode:n,className:s="",...r}){return l.jsx("div",{className:`chat-markdown ${s}`.trim(),"data-slot":"chat-markdown","data-testid":"markdown-renderer",...r,children:l.jsx(rC.Provider,{value:t?n:void 0,children:l.jsx(L0,{components:t?oC:iC,density:"compact",headingLevelStart:sC,children:e})})})}function _Z({children:e,isStreaming:t=!1,fileLinks:n=!1,className:s="",...r}){return l.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:l.jsx(L0,{components:n?oC:iC,density:"compact",headingLevelStart:sC,isStreaming:t,children:e})})}function DZ({children:e,className:t="",...n}){return l.jsx(E0,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-user",sender:"user",...n,children:e})}function LZ({children:e,className:t="",...n}){return l.jsx(E0,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-assistant",sender:"assistant",...n,children:e})}function OZ({children:e,className:t="",...n}){return l.jsx(y4,{className:t||void 0,"data-slot":"chat-message-bubble",...n,children:e})}function BZ({children:e,className:t="",...n}){return l.jsx("div",{className:`chat-message__body ${t}`.trim(),"data-slot":"chat-message-body",...n,children:e})}function qZ({children:e,className:t="",...n}){return l.jsx("div",{className:`chat-message__content ${t}`.trim(),"data-slot":"chat-message-content",...n,children:e})}function Ax({"aria-label":e,tooltip:t,onPress:n,children:s,className:r="",...a}){return l.jsx("button",{"aria-label":e,className:`chat-message__action ${r}`.trim(),"data-slot":"chat-message-action",title:t,type:"button",onClick:n,...a,children:s})}function zi({children:e,className:t="",...n}){return l.jsx("div",{className:`chat-message__actions ${t}`.trim(),"data-slot":"chat-message-actions",...n,children:e})}function HZ(e){return l.jsx(Ax,{...e,children:l.jsx(vq,{"aria-hidden":"true",size:16})})}function PZ(e){return l.jsx(Ax,{...e,children:l.jsx(Rq,{"aria-hidden":"true",size:16})})}function UZ(e){return l.jsx(Ax,{...e,children:l.jsx(Aq,{"aria-hidden":"true",size:16})})}zi.Copy=HZ;zi.ThumbsUp=PZ;zi.ThumbsDown=UZ;const si={User:DZ,Assistant:LZ,Bubble:OZ,Body:BZ,Content:qZ,Action:Ax},FZ=new Set(["ECONNREFUSED","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ECONNRESET","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"]);function GZ(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 lC(e,t=0){if(t>4)return{message:""};const n=GZ(e);if(!e||typeof e!="object")return{message:n};const s=e,r=VZ(s),a=typeof s.code=="string"&&FZ.has(s.code)?s.code:void 0,i=lC(s.cause,t+1),o=i.message&&!n.includes(i.message)?i.message:"";return{status:r??i.status,networkCode:a??i.networkCode,message:[n,o].filter(Boolean).join(" ")}}function VZ(e){if(typeof e.statusCode=="number")return e.statusCode;if(typeof e.status=="number")return e.status;const t=e.$metadata;if(Zw(t)&&typeof t.httpStatusCode=="number")return t.httpStatusCode;const n=e.$response;if(Zw(n)&&typeof n.statusCode=="number")return n.statusCode}function Zw(e){return typeof e=="object"&&e!==null}const WZ=/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,KZ=/invalid_grant|oauth refresh failed|refresh.?token/i;function XZ(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||WZ.test(e.message)?"network":/invalid.?api.?key|authentication_error|unauthorized/i.test(e.message)||KZ.test(e.message)?"auth":"unknown"}function ZZ(e){return XZ(lC(e))}function YZ(e){const t=ZZ(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 QZ({error:e,onRetry:t,onOpenProviderSettings:n,modelControl:s,className:r,...a}){const[i,o]=x.useState(!1),[c,u]=x.useState(!1),d=x.useRef(!1),[f,h]=x.useState(null),p=YZ(e),m=async()=>{if(!(!t||d.current)){d.current=!0,o(!0),h(null);try{await t()}catch(b){h(b instanceof Error?b.message:"Retry could not start.")}finally{d.current=!1,o(!1)}}};return l.jsxs(ve,{className:r,gap:2,...a,children:[l.jsx(yn,{status:"error",title:p.title,description:p.description}),l.jsxs($e,{gap:2,wrap:"wrap",children:[n?l.jsx(de,{label:"Provider settings",size:"sm",variant:"secondary",onClick:n}):null,s,t?l.jsx(de,{label:"Retry request",size:"sm",variant:"secondary",isDisabled:i,onClick:()=>void m()}):null]}),f?l.jsx(se,{role:"alert",style:{color:"var(--danger)"},children:f}):null,l.jsx(q4,{trigger:l.jsx(se,{type:"body",size:"sm",color:"secondary",children:"Error details"}),isOpen:c,onOpenChange:u,children:c?l.jsx(se,{as:"div",type:"body",size:"sm",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:e}):null})]})}const Nm=e=>`data:${e.mimeType};base64,${e.data}`;function JZ({images:e}){const[t,n]=x.useState(void 0);return e.length===0?null:l.jsxs("div",{className:"flex flex-wrap justify-end gap-2","data-testid":"message-images",children:[e.map((s,r)=>l.jsx(Bf,{src:Nm(s),alt:`Image ${r+1}`,onClick:()=>n(r)},r)),t===void 0?null:l.jsx(V4,{isOpen:!0,media:e.map((s,r)=>({src:Nm(s),alt:`Image ${r+1}`})),index:t,onIndexChange:n,onOpenChange:s=>{s||n(void 0)}})]})}const eY=/(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g;function tY(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 nY(e){return e.replace(/(^|\n)\*\*([^*\n]+)\*\*(?=\n|$)/g,"$1$2")}function sY(e){return e.split(eY).map((t,n)=>t.startsWith("**")&&t.endsWith("**")&&t.length>4?l.jsx("strong",{children:t.slice(2,-2)},n):t.startsWith("*")&&t.endsWith("*")&&t.length>2&&!t.startsWith("**")?l.jsx("em",{children:t.slice(1,-1)},n):t.startsWith("`")&&t.endsWith("`")&&t.length>2?l.jsx("code",{children:t.slice(1,-1)},n):t)}function cC({text:e,unwrapLines:t=!1,className:n,...s}){let r=tY(e);return t&&(r=nY(r)),l.jsx("span",{className:`chat-thought-md ${n??""}`.trim(),...s,children:sY(r)})}const rY=300,aY=700;function iY(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function uC({children:e,className:t="",dwellMs:n=aY,pageKey:s="",...r}){const a=Math.max(n,rY),[i,o]=x.useState({key:s,node:e}),[c,u]=x.useState(null),d=x.useRef({key:s,node:e}),f=x.useRef({key:s,node:e}),h=x.useRef(Date.now()),p=x.useRef(null);return x.useEffect(()=>{if(f.current={key:s,node:e},s===d.current.key){d.current=f.current;return}const m=()=>{const y=d.current;d.current=f.current,h.current=Date.now(),o(f.current),u(iY()?null:y.node)};if(p.current!==null)return;const b=a-(Date.now()-h.current);if(b<=0){m();return}p.current=window.setTimeout(()=>{p.current=null,f.current.key!==d.current.key&&m()},b)},[e,a,s]),x.useEffect(()=>()=>{p.current!==null&&window.clearTimeout(p.current)},[]),l.jsx("span",{className:`chat-inline-pager ${t}`.trim(),"data-slot":"chat-inline-pager",...r,children:l.jsxs("span",{className:"chat-inline-pager__flip",children:[c?l.jsx("span",{className:"chat-inline-pager__page","data-motion":"out",children:c}):null,l.jsx("span",{className:"chat-inline-pager__page","data-motion":c?"in":void 0,onAnimationEnd:m=>{m.target===m.currentTarget&&u(null)},children:s===i.key?e:i.node})]})})}function oY(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?"briefly":`${Math.round(e/1e3)}s`}function lY({className:e="",dwellMs:t,step:n,...s}){const r=n.text.trim(),a=oY(n.durationMs),i=l.jsx(uC,{dwellMs:t,pageKey:n.live?"live":"settled",children:n.live?l.jsx(Mx,{className:"chat-step__label",children:"Thinking…"}):l.jsx("span",{className:"chat-step__label",children:a?l.jsxs(l.Fragment,{children:["Thought ",l.jsx("span",{className:"chat-step__meta",children:a})]}):"Thought"})});return r?l.jsxs(yk,{className:`chat-step ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:[l.jsxs(kk,{className:"chat-step__trigger",children:[i,l.jsx(Sa,{"aria-hidden":"true",className:"chat-step__chevron"})]}),l.jsx(bk,{keepMounted:!0,className:"chat-step__panel",children:l.jsx("div",{className:"chat-step__body",children:l.jsx(cC,{text:n.text})})})]}):l.jsx("p",{className:`chat-step chat-step--plain ${e}`.trim(),"data-slot":"chat-thought-step",...s,children:i})}const cY={shell:W7,search:zq,web:jq,file:F7,edit:V7,tool:K7};function vf({className:e="",kind:t,...n}){const s=cY[t];return l.jsx("span",{"aria-hidden":"true",className:`chat-tool-kind ${e}`.trim(),"data-kind":t,"data-slot":"chat-tool-kind",...n,children:l.jsx(s,{})})}const uY={"input-streaming":"running","input-available":"running","output-available":"complete","output-error":"error"};function dC(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 fC({tool:e,className:t,...n}){var s,r;return l.jsxs("div",{className:t,...n,children:[e.detail!==void 0&&e.detail!==null?e.detail:l.jsxs(l.Fragment,{children:[e.argsText!=null?l.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-args",children:e.argsText}):null,e.output!==void 0?l.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-result",children:e.output}):null]}),(s=e.children)!=null&&s.length?l.jsx("ol",{className:"chat-tool-step__list","data-slot":"chat-tool-children",children:e.children.map((a,i)=>l.jsxs("li",{className:"chat-tool-step__item",children:[l.jsx(vf,{kind:Th(a.toolName)}),l.jsx(hC,{tools:[a]})]},a.toolCallId??i))}):null,(r=e.images)==null?void 0:r.map((a,i)=>l.jsx("img",{src:`data:${a.mimeType};base64,${a.data}`,alt:"",style:{maxWidth:"100%"}},i))]})}function dY(e,t){const n=dC(e)?l.jsx(fC,{tool:e}):void 0;return{name:pi(e.toolName)??"tool",status:uY[e.state],target:xk(e.argsText),...e.diffStat?{additions:e.diffStat.additions,deletions:e.diffStat.deletions}:{},duration:q9(e.durationMs),errorMessage:e.state==="output-error"?e.output:void 0,key:e.toolCallId??`tool-${t}`,resultDetail:n}}function hC({tools:e,className:t="",...n}){return e.length?l.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:l.jsx(v4,{calls:e.map(dY)})}):null}const ic={past:"Ran",noun:["command","commands"]},dp={past:"Read",noun:["file","files"]},Yw={past:"Edited",noun:["file","files"]},Qw={past:"Wrote",noun:["file","files"]},Jw={past:"Searched",noun:["pattern","patterns"]},e5={past:"Searched",noun:["path","paths"]},fY={past:"Listed",noun:["directory","directories"]},t5={past:"Searched",noun:["web page","web pages"]},Fd={past:"Fetched",noun:["page","pages"]},hY={bash:ic,shell:ic,sh:ic,terminal:ic,cmd:ic,read:dp,read_file:dp,cat:dp,edit:Yw,str_replace:Yw,write:Qw,write_file:Qw,grep:Jw,find:e5,glob:e5,ls:fY,search:Jw,web_search:t5,websearch:t5,webfetch:Fd,web_fetch:Fd,web:Fd,browser:Fd},xC={past:"Used",noun:["tool","tools"]};function n5(e){return hY[H9(e)]??xC}const s5=72;function xY(e){return e.length<=s5?e:e.includes("/")&&!e.includes(" ")?`…${e.slice(-71)}`:`${e.slice(0,s5-1)}…`}function r5(e,[t,n]){return e!==1?`${e} ${n}`:`${t==="tool"?"a":"1"} ${t}`}function pY(e){if(e.length===1){const[n]=e,s=n5(n.toolName),r=xk(n.argsText);return r?`${s.past} ${xY(r)}`:s===xC?`Used ${pi(n.toolName)??"a tool"}`:`${s.past} ${r5(1,s.noun)}`}const t=new Map;for(const n of e){const s=n5(n.toolName),r=`${s.past}:${s.noun[1]}`,a=t.get(r)??{verb:s,count:0};a.count+=1,t.set(r,a)}return[...t.values()].map(({verb:n,count:s},r)=>{const a=`${n.past} ${r5(s,n.noun)}`;return r===0?a:a.charAt(0).toLowerCase()+a.slice(1)}).join(", ")}function pC(e){const t=[];for(const n of e.children??[])t.push(n,...pC(n));return t}function gY({className:e="",dwellMs:t,step:n,...s}){const{tools:r}=n,a=r.filter(y=>y.state==="output-error").length,i=r.flatMap(pC),o=i.length,c=i.filter(y=>y.state==="output-error").length,u=r.reduce((y,g)=>y+(g.durationMs??0),0),d=r.reduce((y,g)=>g.diffStat?{additions:((y==null?void 0:y.additions)??0)+g.diffStat.additions,deletions:((y==null?void 0:y.deletions)??0)+g.diffStat.deletions}:y,void 0),f=r.find(y=>y.toolCallId===n.activeToolCallId)??r[r.length-1];let h,p=f;for(;p;){const y=(p.children??[]).filter(k=>k.state==="input-available"),g=y[y.length-1];if(!g)break;h=g,p=g}const m=n.live?Th(f==null?void 0:f.toolName):nX(r),b=n.live?`running:${(f==null?void 0:f.toolCallId)??"none"}`:"settled";return l.jsxs(yk,{className:`chat-step chat-tool-step ${e}`.trim(),"data-slot":"chat-tool-step",...s,children:[l.jsxs(kk,{className:"chat-step__trigger",children:[l.jsx(uC,{dwellMs:t,pageKey:b,children:n.live?l.jsxs("span",{className:"chat-tool-step__page",children:[l.jsx(vf,{kind:m}),l.jsx(Mx,{className:"chat-step__label",children:f!=null&&f.toolName?h!=null&&h.toolName?`Running ${pi(f.toolName)} › ${pi(h.toolName)}…`:`Running ${pi(f.toolName)}…`:"Running…"})]}):l.jsxs("span",{className:"chat-tool-step__page",children:[l.jsx(vf,{kind:m}),l.jsx("span",{className:"chat-step__label",children:pY(r)}),o>0?l.jsx("span",{className:"chat-step__meta","data-slot":"chat-tool-nested-count",children:o===1?"1 nested call":`${o} nested calls`}):null,c>0?l.jsx("span",{className:"chat-step__meta chat-step__meta--error","data-slot":"chat-tool-nested-failed",children:c===1?"1 nested failed":`${c} nested failed`}):null,d?l.jsxs("span",{className:"chat-step__meta","data-slot":"chat-tool-diff-stat",children:[l.jsxs("span",{className:"text-success",children:["+",d.additions]})," ",l.jsxs("span",{className:"text-danger",children:["-",d.deletions]})]}):null,a>0?l.jsx("span",{className:"chat-step__meta chat-step__meta--error",children:a===1?"1 failed":`${a} failed`}):null,u>0?l.jsx("span",{className:"chat-step__meta",children:q9(u)}):null]})}),l.jsx(Sa,{"aria-hidden":"true",className:"chat-step__chevron"})]}),l.jsx(bk,{keepMounted:!0,className:"chat-step__panel",children:r.length===1?dC(r[0])?l.jsx("div",{className:"chat-tool-step__detail","data-slot":"chat-tool-step-detail",children:l.jsx(fC,{tool:r[0]})}):null:l.jsx("ol",{className:"chat-tool-step__list",children:r.map((y,g)=>l.jsxs("li",{className:"chat-tool-step__item",children:[l.jsx(vf,{kind:Th(y.toolName)}),l.jsx(hC,{tools:[y]})]},y.toolCallId??g))})})]})}const a5={done:"Done",failed:"Failed",running:"Running"};function gC(e){const t=Math.max(0,Math.floor(e/1e3));return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function mY({startedAt:e}){const t=Vy(1e3);return l.jsx(l.Fragment,{children:gC(t-e)})}function yY({tool:e,summary:t,openInPanel:n}){const s=pk(e),r=(s==null?void 0:s.kind)==="subagent"?s:void 0,a=e.state==="output-available"?"done":e.state==="output-error"?"failed":"running",i=t!==void 0?xs(t):xk(e.argsText)??"Subagent",o=r==null?void 0:r.startedAt,c=r==null?void 0:r.endedAt,u=[a5[a],(t==null?void 0:t.role)===void 0?void 0:`@${t.role}`,r==null?void 0:r.model,o===void 0?void 0:a==="running"?l.jsx(mY,{startedAt:o},"elapsed"):c===void 0?void 0:gC(c-o)];return l.jsxs(ve,{className:"pigui-subagent-card rounded-lg border border-border p-3",gap:1,"data-slot":"subagent-card","data-status":a,children:[l.jsxs($e,{gap:2,vAlign:"center",children:[l.jsx(Ar,{variant:a==="failed"?"error":a==="running"?"success":"neutral",label:a5[a],isPulsing:a==="running"}),l.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:i}),r===void 0?null:l.jsx(de,{label:"View",variant:"ghost",size:"sm",onClick:()=>n(r.conversationId,"tasks")})]}),l.jsx("div",{className:"text-xs text-muted",children:u.map((d,f)=>d===void 0||d===""?null:f===0?l.jsx("span",{children:d},f):l.jsxs("span",{children:[" · ",d]},f))}),a==="running"&&(t==null?void 0:t.activity)!==void 0?l.jsxs("div",{className:"text-xs text-muted",children:["→ ",pi(t.activity.tool)??t.activity.tool,t.activity.target===void 0?"":` ${t.activity.target}`]}):null,a==="failed"&&e.output!==void 0&&e.output!==""?l.jsx("div",{className:"text-xs text-muted",children:e.output}):null]})}function kY({tools:e,summaryOf:t,openInPanel:n}){return e.length===0?null:l.jsx(ve,{gap:2,className:"pigui-subagent-cards",children:e.map(({key:s,tool:r})=>{const a=pk(r);return l.jsx(yY,{tool:r,summary:(a==null?void 0:a.kind)==="subagent"?t==null?void 0:t(a.conversationId):void 0,openInPanel:n},s)})})}const fp=(e,t,n)=>e.startsWith(`${t} ${n}`)?e.slice(t.length+1+n.length):e.slice(t.length+1);function bY(e){const t=[];let n,s=0,r=0,a=!1;const i=c=>({path:c,isNew:!1,isDeleted:!1,binary:!1,additions:0,deletions:0,lines:[]}),o=()=>{n!==void 0&&(n.path===""&&n.oldPath!==void 0&&(n.path=n.oldPath),t.push(n))};for(const c of e.split(`
383
- `)){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 ")){o();const u=/^diff --git a\/(\S+) b\/(\S+)$/.exec(c);n=i((u==null?void 0:u[2])??c.slice(11)),a=!0;continue}if(c.startsWith("--- ")){n!==void 0&&a?(a=!1,c==="--- /dev/null"?n.isNew=!0:n.oldPath=fp(c,"---","a/")):(o(),n=i(""),c==="--- /dev/null"?n.isNew=!0:n.oldPath=fp(c,"---","a/"));continue}n!==void 0&&(c.startsWith("+++ ")?c==="+++ /dev/null"?n.isDeleted=!0:n.path=fp(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 o(),t}const vY={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)"},wY={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 mC({patch:e}){const t=x.useMemo(()=>bY(e),[e]);return t.length===0?l.jsx(se,{type:"supporting",children:"No changes."}):l.jsx(ve,{gap:2,children:t.map((n,s)=>l.jsxs(ve,{gap:0,children:[l.jsxs($e,{gap:2,vAlign:"center",padding:1,children:[l.jsx(se,{type:"supporting",weight:"semibold",maxLines:1,children:n.oldPath!==void 0&&n.oldPath!==n.path?`${n.oldPath} → ${n.path}`:n.path}),n.isNew?l.jsx(Fn,{label:"new",color:"green",size:"sm"}):null,n.isDeleted?l.jsx(Fn,{label:"deleted",color:"red",size:"sm"}):null,l.jsxs(se,{type:"supporting",children:["+",n.additions," −",n.deletions]})]}),n.binary===!0?l.jsx(se,{type:"supporting",children:"Binary file"}):n.lines.length===0?null:l.jsx("div",{style:vY,children:n.lines.map((r,a)=>l.jsx("div",{style:wY[r.kind],children:r.text},a))})]},`${n.path}-${s}`))})}function jY(e){return e.kind==="diff"?l.jsx(mC,{patch:e.patch}):void 0}function SY(e){const t=n=>{var i;const s=pk(n),r=s===void 0?void 0:jY(s),a=(i=n.children)==null?void 0:i.map(t);return r===void 0&&a===void 0?n:{...n,...r===void 0?{}:{detail:r},...a===void 0?{}:{children:a}}};return{...e,steps:e.steps.map(n=>n.kind==="tools"?{...n,tools:n.tools.map(t)}:n)}}function CY({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:a,summaryOf:i,onRetry:o}){switch(e.kind){case"user":return l.jsx(si.User,{children:l.jsxs("div",{className:"flex flex-col items-end gap-1",children:[e.images.length===0?null:l.jsx(JZ,{images:e.images}),e.text===""?null:l.jsxs(l.Fragment,{children:[l.jsx(si.Bubble,{children:l.jsx(si.Content,{children:e.text})}),l.jsx(zi,{className:"shrink-0",children:l.jsx(zi.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var c;(c=navigator.clipboard)==null||c.writeText(e.text)}})})]})]})});case"run":return l.jsx($Y,{entry:e,connected:t,openInPanel:n,onFork:s,canFork:r,forksAt:a,summaryOf:i,onRetry:o});case"compaction":return l.jsx(Lf,{variant:"divider",children:"Earlier context summarized"});case"reset":return l.jsx(Lf,{variant:"divider",children:"New context"})}}function $Y({entry:e,connected:t,openInPanel:n,onFork:s,canFork:r=!0,forksAt:a,summaryOf:i,onRetry:o}){const{view:c,subagents:u}=x.useMemo(()=>yX(e.cot),[e.cot]),d=x.useMemo(()=>SY(c),[c]),f=d.answer,h=e.forkEntryId===void 0?[]:(a==null?void 0:a(e.forkEntryId))??[],p=d.phase==="settled"&&(f!==void 0||e.forkEntryId!==void 0&&(r||h.length>0));return l.jsx(si.Assistant,{children:l.jsxs(si.Body,{children:[e.interrupted?l.jsx("p",{className:"mb-1",children:l.jsx(Fn,{label:"interrupted",color:"orange",size:"sm"})}):null,l.jsx(EY,{view:d}),l.jsx(kY,{tools:u,summaryOf:i,openInPanel:n}),f===void 0?null:l.jsx(si.Content,{children:f.streaming?l.jsx(_Z,{isStreaming:!0,children:f.text}):l.jsx(IZ,{children:f.text})}),e.failure===void 0?null:l.jsx(QZ,{error:e.failure,onRetry:o}),p?l.jsxs(zi,{className:"chat-message__actions--persist",children:[f===void 0?null:l.jsx(zi.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var m;(m=navigator.clipboard)==null||m.writeText(f.text)}}),e.forkEntryId===void 0?null:h.length>0?l.jsxs("button",{type:"button",className:"pigui-fork-chip","aria-label":`${h.length} ${h.length===1?"fork":"forks"}`,title:"Open in Threads",disabled:!t,onClick:()=>n(h[0],"threads"),children:[l.jsx(Zg,{"aria-hidden":"true"}),h.length," ",h.length===1?"fork":"forks"]}):r?l.jsx(si.Action,{"aria-label":"Fork",tooltip:"Continue from here in a new conversation",disabled:!t,onPress:()=>s(e.forkEntryId),children:l.jsx(Zg,{"aria-hidden":"true",className:"size-4"})}):null]}):null]})})}function EY({view:e}){if(e.phase==="hidden")return null;const t=e.phase==="thinking"||e.phase==="acting";return!t&&!e.steps.length&&e.elapsedMs===void 0?null:l.jsx(Lc,{...t?{startedAtMs:e.anchorMs}:{elapsedMs:e.elapsedMs},hasSteps:e.steps.length>0,phase:e.phase,outcome:e.outcome,children:l.jsx(Lc.Steps,{children:e.steps.map(n=>l.jsx(Lc.Step,{children:n.kind==="thinking"?l.jsx(lY,{step:n}):n.kind==="tools"?l.jsx(gY,{step:n}):l.jsx("div",{className:"chain-of-thought__interim","data-slot":"chat-interim-output",children:l.jsx(cC,{text:n.text})})},n.id))})})}function yC({conversation:e,toolPresentations:t,connected:n,canFork:s,openInPanel:r,onFork:a,forksAt:i,summaryOf:o,ownOnly:c,forkSource:u,onRetry:d}){const f=ik(e),h=x.useMemo(()=>c?{...e,entries:e.entries.filter(b=>b.conversationId===e.conversation.id)}:e,[e,c]),p=x.useMemo(()=>gX(h,t,f),[h,t,f]),m=x.useMemo(()=>mX(p),[p]);return p.length===0&&!c?null:l.jsx(m4,{isStreaming:f,gap:0,children:l.jsxs("div",{className:"mx-auto flex w-full max-w-[44rem] flex-col gap-8 px-4 pb-6 pt-2",children:[c?l.jsxs(Lf,{variant:"divider",children:["Forked from ",u]}):null,p.map((b,y)=>l.jsx(CY,{entry:b,connected:n,openInPanel:r,onFork:a,canFork:s,forksAt:i,summaryOf:o,onRetry:d!==void 0&&n&&m!==void 0&&y===p.length-1?()=>d(m):void 0},b.id))]})})}const TY={pending:"pending",in_progress:"in progress",completed:"completed"};function zY({doc:e}){if(e.value===null)return null;const t=Nx(e.presentation,e.value),n=t.type==="pinomad.todo"?"Todo":t.type==="pinomad.question"?"Questions":e.kind,s=t.type==="pinomad.todo"?l.jsx(NY,{doc:t.value}):t.type==="pinomad.question"?l.jsx(AY,{doc:t.value}):l.jsx(RY,{value:t.value});return l.jsxs(ve,{gap:1,children:[l.jsx(se,{type:"label",weight:"semibold",children:n}),s]})}function NY({doc:e}){return l.jsx(kt,{density:"compact",children:e.items.length===0?l.jsx(We,{label:"Empty"}):e.items.map((t,n)=>l.jsx(We,{label:t.text,startContent:l.jsx(Fn,{label:TY[t.status],size:"sm"})},n))})}function MY(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(a=>a!=="").join("; ");return{label:r===""?"skipped":r,color:"green"}}function AY({doc:e}){return l.jsx(kt,{density:"compact",children:e.requests.length===0?l.jsx(We,{label:"Empty"}):e.requests.flatMap(t=>t.questions.map((n,s)=>{const r=MY(t,s);return l.jsx(We,{label:n.question,description:r.label,startContent:l.jsx(Fn,{label:n.header,size:"sm"})},`${t.id}-${s}`)}))})}function RY({value:e}){const t=typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.entries(e):[["value",e]];return l.jsx(kt,{density:"compact",children:t.map(([n,s])=>l.jsx(We,{label:n,description:IY(s)},n))})}function IY(e){const t=JSON.stringify(e);return t.length<=120?t:`${t.slice(0,117)}...`}function _Y({view:e,remote:t,conversation:n}){var c;const s=e.tasks===void 0?[]:O7(e.tasks),r=[...e.notices].reverse().slice(0,5),a=n===void 0?[]:RB(n),i=n===void 0||(c=e.checkout)==null?void 0:c.branch,o=n===void 0?void 0:L7(n).cwd;return l.jsxs(ve,{gap:4,children:[n===void 0||i===void 0&&o===void 0?null:l.jsxs(kt,{density:"compact",header:l.jsx(se,{type:"label",weight:"semibold",children:"Workspace"}),children:[i===void 0?null:l.jsx(We,{label:"Branch",description:i}),o===void 0?null:l.jsx(We,{label:"Path",description:o})]}),e.docs.map(u=>l.jsx(zY,{doc:u,remote:t,connected:e.connection==="connected"},u.kind)),l.jsx(kt,{density:"compact",header:l.jsx(se,{type:"label",weight:"semibold",children:"Tasks"}),children:s.length===0?l.jsx(We,{label:"No live tasks"}):s.map(u=>l.jsx(We,{label:`${"  ".repeat(u.depth)}${u.depth>0?"└ ":""}${u.label}`},u.id))}),r.length===0?null:l.jsx(kt,{density:"compact",header:l.jsx(se,{type:"label",weight:"semibold",children:"Notices"}),children:r.map(u=>l.jsx(We,{label:u.message,startContent:l.jsx(Ar,{variant:u.level==="error"?"error":u.level==="warning"?"warning":"neutral",label:u.level})},u.id))}),a.length===0?null:l.jsx(kt,{density:"compact",header:l.jsx(se,{type:"label",weight:"semibold",children:"Usage"}),children:a.map(u=>l.jsx(We,{label:u.key,description:`↑${u.input} ↓${u.output} · $${u.cost.toFixed(4)}`},u.key))}),l.jsx(LY,{view:e})]})}const DY={connecting:"warning",connected:"success",failed:"error",disabled:"neutral"};function LY({view:e}){const t=e.mcp;return t===null||t.servers.length===0&&t.errors.length===0?null:l.jsxs(kt,{density:"compact",header:l.jsx(se,{type:"label",weight:"semibold",children:"MCP"}),children:[t.servers.map(n=>l.jsx(We,{label:n.name,description:n.state==="connected"?`${n.tools} tool${n.tools===1?"":"s"}${n.error===void 0?"":` · ${n.error}`}`:n.error??n.state,startContent:l.jsx(Ar,{variant:DY[n.state],label:n.state,isPulsing:n.state==="connecting"})},n.name)),t.errors.map((n,s)=>l.jsx(We,{label:n,startContent:l.jsx(Ar,{variant:"error",label:"config error"})},s))]})}const OY={"needs-answer":"warning",failed:"error",running:"success"},BY={"needs-answer":"Waiting for your answer",failed:"Failed",running:"Running"};function kC({status:e}){return e===void 0?null:l.jsx("span",{"aria-hidden":"true",children:l.jsx(Ar,{variant:OY[e],label:BY[e],isPulsing:e!=="failed"})})}function i5({view:e,remote:t,conversation:n,tab:s,onTabChange:r,openInPanel:a,onOpenInMain:i}){var b;const o=Vy(6e4),c=e.side,u=c===void 0||(b=Sr(e.organized,c.id))==null?void 0:b.summary,d=n===void 0?void 0:I7(e.organized,n.conversation.id),f=d===void 0?[]:_7(d),h=d===void 0?[]:jB(d),p=h.reduce((y,g)=>y+g.tasks.length,0),m=()=>void t.controller.showSide(void 0);return l.jsxs(ve,{className:"h-full min-h-0",gap:0,children:[l.jsxs(X4,{value:s,onChange:y=>r(y),layout:"fill",hasDivider:!0,children:[l.jsx(Wd,{value:"threads",label:"Threads",endContent:f.length===0?void 0:l.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:f.length})}),l.jsx(Wd,{value:"tasks",label:"Tasks",endContent:p===0?void 0:l.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:p})}),l.jsx(Wd,{value:"live",label:"Live"})]}),s==="threads"?c!==void 0&&(u==null?void 0:u.kind)==="fork"?l.jsx(qY,{view:e,remote:t,side:c,summary:u,onBack:m,onOpenInMain:i,openInPanel:a},c.id):l.jsx(hp,{children:f.length===0?l.jsx(se,{type:"supporting",className:"p-3 text-muted",children:"No threads yet"}):l.jsx(kt,{density:"compact",children:f.map(y=>l.jsx(o5,{summary:y.summary,now:o,onOpen:()=>a(y.summary.id,"threads")},y.summary.id))})}):s==="tasks"?c!==void 0&&(u==null?void 0:u.kind)==="subagent"?l.jsx(HY,{view:e,remote:t,side:c,summary:u,onBack:m,openInPanel:a}):l.jsx(hp,{children:h.length===0?l.jsx(se,{type:"supporting",className:"p-3 text-muted",children:"No tasks yet"}):h.map(y=>l.jsx(kt,{density:"compact",header:l.jsx("div",{className:"px-3 pt-2",children:l.jsx(se,{type:"label",weight:"semibold",children:y.label})}),children:y.tasks.map(g=>l.jsx(o5,{summary:g.summary,now:o,onOpen:()=>a(g.summary.id,"tasks")},g.summary.id))},y.owner.id))}):l.jsx(hp,{label:"Live state",children:l.jsx("div",{className:"p-3",children:l.jsx(_Y,{view:e,remote:t,conversation:n})})})]})}function hp({children:e,label:t}){return l.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",...t===void 0?{}:{"aria-label":t},children:e})}function o5({summary:e,now:t,onOpen:n}){return l.jsx(We,{label:xs(e),description:e.status==="running"&&e.activity!==void 0?`→ ${pi(e.activity.tool)??e.activity.tool}${e.activity.target===void 0?"":` ${e.activity.target}`}`:void 0,startContent:l.jsx(kC,{status:e.status}),endContent:e.updatedAt===void 0?void 0:l.jsx("span",{"aria-hidden":"true",className:"text-xs text-muted",children:R7(e.updatedAt,t)}),onClick:n})}function bC({back:e,title:t,status:n,onBack:s,extra:r}){return l.jsxs($e,{className:"shrink-0 gap-1 border-b border-border px-2 py-1",vAlign:"center",children:[l.jsx(pn,{icon:l.jsx(H7,{className:"size-4","aria-hidden":"true"}),label:e,size:"sm",variant:"ghost",onClick:s}),l.jsx(kC,{status:n}),l.jsx("span",{className:"min-w-0 flex-1 truncate text-sm",children:t}),r]})}function vC({view:e,remote:t,side:n,openInPanel:s,ownOnly:r,forkSource:a,onRetry:i}){return n.conversation===void 0?null:l.jsx(yC,{conversation:n.conversation,toolPresentations:e.toolPresentations,connected:e.connection==="connected",canFork:!1,openInPanel:s,onFork:()=>{},ownOnly:r,forkSource:a,summaryOf:o=>{var c;return(c=Sr(e.organized,o))==null?void 0:c.summary},forksAt:o=>D7(e.organized,n.id,o),onRetry:i})}function qY({view:e,remote:t,side:n,summary:s,onBack:r,onOpenInMain:a,openInPanel:i}){var p;const o=n.conversation,c=o!==void 0&&ik(o),[u,d]=x.useState(""),f=()=>{const m=u.trim();m!==""&&(kl(),t.controller.submit(m,"followUp",{target:n.id}),d(""))},h=s.parent===void 0||(p=Sr(e.organized,s.parent))==null?void 0:p.summary;return l.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[l.jsx(bC,{back:"Back to threads",title:xs(s),status:s.status,onBack:r,extra:l.jsx(de,{label:"Open in main",variant:"secondary",size:"sm",onClick:()=>a(n.id)})}),l.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto",children:[l.jsx(vC,{view:e,remote:t,side:n,openInPanel:i,ownOnly:!0,forkSource:xs(h),onRetry:async({text:m,images:b,requestId:y})=>{kl(),await t.controller.submit(m,"followUp",{target:n.id,requestId:y,images:b})}}),l.jsx(B9,{docs:n.docs,remote:t,connected:e.connection==="connected",target:n.id})]}),l.jsx("div",{className:"shrink-0 border-t border-border p-2",children:l.jsx(hk,{value:u,placeholder:"Reply in this thread…",status:c?"streaming":"ready",isDisabled:e.connection!=="connected",onSubmit:f,onStop:()=>void t.controller.abort(n.id),onValueChange:d,triggers:fk(e.agents)})})]})}function HY({view:e,remote:t,side:n,summary:s,onBack:r,openInPanel:a}){return l.jsxs("div",{className:"flex min-h-0 flex-1 flex-col",children:[l.jsx(bC,{back:"Back to tasks",title:xs(s),status:s.status,onBack:r}),l.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:l.jsx(vC,{view:e,remote:t,side:n,openInPanel:a})}),l.jsx("div",{className:"shrink-0 border-t border-border p-2 text-center text-xs text-muted",children:"Read-only · subagent"})]})}function l5({view:e,remote:t,conversation:n,narrow:s,open:r,onOpenChange:a,tab:i,onTabChange:o,openInPanel:c,onOpenInMain:u}){const d=G4({defaultSize:440,minSizePx:360,maxSizePx:720,autoSaveId:"pinomad-side-panel"});return s?l.jsx(Ls,{isOpen:r,onOpenChange:a,variant:"fullscreen",children:l.jsx(gs,{header:l.jsx(Os,{title:"Side panel",onOpenChange:a}),content:l.jsx(ms,{padding:0,children:l.jsx(i5,{view:e,remote:t,conversation:n,tab:i,onTabChange:o,openInPanel:c,onOpenInMain:u})})})}):r?l.jsxs("div",{className:"relative h-full shrink-0 border-l border-border",style:{width:d.size},"aria-label":"Side panel",role:"complementary",children:[l.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:l.jsx(i5,{view:e,remote:t,conversation:n,tab:i,onTabChange:o,openInPanel:c,onOpenInMain:u})}),l.jsx(B0,{direction:"horizontal",position:"overlay",isReversed:!0,label:"Resize side panel",resizable:d.props})]}):null}const wC="pinomad.sidebar.open",PY=()=>typeof window>"u"||window.localStorage.getItem(wC)!=="false";function UY({view:e,remote:t,device:n,narrow:s,drafting:r,draftingChat:a,draftLabel:i,conversation:o,summary:c,parentSummary:u,banner:d,onDraft:f,onOpenChanges:h,panelOpen:p,panelTab:m,onPanelOpen:b,onPanelTab:y,openInPanel:g,openInMain:k,children:v}){const[w,j]=x.useState(PY),[C,$]=x.useState(!1),[E,T]=x.useState(!1),[S,M]=x.useState(!1),[z,A]=x.useState(!1),R=B7(),I=R.reserveMacTrafficLights&&!s&&w,N=()=>{window.localStorage.setItem(wC,String(!w)),j(!w)},_=O=>void t.controller.switchConversation(O),L=e.tasks!==void 0&&O7(e.tasks).length>0,D=l.jsx(GP,{view:e,remote:t,draftingChat:a,shownId:o==null?void 0:o.conversation.id,onDraft:f,onSelect:()=>$(!1)});return l.jsxs(l.Fragment,{children:[l.jsx(v3,{className:"pigui-app-layout text-foreground",contentPadding:0,mobileNav:!1,variant:"elevated",sideNav:s||!w?void 0:l.jsx(F0,{resizable:{defaultWidth:260,minWidth:240,maxWidth:320,autoSaveId:"pinomad-app-shell"},header:l.jsx(PP,{connection:e.connection,onCollapse:N,safeLeft:I?R.safeLeft:void 0}),footer:l.jsx(kw,{view:e,onOpenDevices:()=>T(!0),onOpenSettings:()=>M(!0),onPairHost:()=>A(!0)}),children:D}),children:l.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[l.jsx(GY,{narrow:s,sidebarOpen:w,safeLeft:R.reserveMacTrafficLights&&!I?R.safeLeft:void 0,onToggleSidebar:N,onOpenNav:()=>$(!0),title:r?i:xs(c),parentSummary:u,onBackToParent:_,showChanges:o!==void 0,onOpenChanges:h,panelOpen:p,onPanelChange:b,liveActivity:L}),d,l.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[l.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:v}),s?null:l.jsx(l5,{view:e,remote:t,conversation:o,narrow:!1,open:p,onOpenChange:b,tab:m,onTabChange:y,openInPanel:g,onOpenInMain:k})]})]})}),s?l.jsxs(P0,{className:"pigui-app-layout text-foreground",isOpen:C,onOpenChange:$,header:l.jsxs("span",{className:"flex items-center gap-2",children:[l.jsx("span",{className:"text-sm font-semibold",children:"PiNomad"}),l.jsx(_S,{connection:e.connection})]}),children:[D,l.jsx(kw,{view:e,onOpenDevices:()=>T(!0),onOpenSettings:()=>M(!0),onPairHost:()=>A(!0),onSelect:()=>$(!1)})]}):null,s?l.jsx(l5,{view:e,remote:t,conversation:o,narrow:!0,open:p,onOpenChange:b,tab:m,onTabChange:y,openInPanel:g,onOpenInMain:k}):null,E?l.jsx(fU,{view:e,remote:t,self:n,onClose:()=>T(!1)}):null,S?l.jsx(SU,{view:e,remote:t,onClose:()=>M(!1)}):null,z?l.jsx(AS,{onClose:()=>A(!1)}):null,l.jsx(x0,{position:"topEnd",inset:{top:48},isTopLayer:!0,children:l.jsx(FY,{notices:e.notices})})]})}function FY({notices:e}){const t=zO(),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 a of e)a.id<=n.current||t({body:a.message,type:a.level==="error"?"error":"info",uniqueID:String(a.id)});s!==void 0&&(n.current=s)},[e,t]),null}function GY({narrow:e,sidebarOpen:t,safeLeft:n,onToggleSidebar:s,onOpenNav:r,title:a,parentSummary:i,onBackToParent:o,showChanges:c,onOpenChanges:u,panelOpen:d,onPanelChange:f,liveActivity:h}){return l.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?l.jsx(pn,{icon:l.jsx(Yg,{className:"size-4"}),label:"Open navigation",size:"sm",variant:"ghost",onClick:r}):t?null:l.jsx(pn,{icon:l.jsx(Yg,{className:"size-4"}),label:"Expand sidebar",size:"sm",variant:"ghost",onClick:s}),l.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-normal",children:i===void 0?a:l.jsxs("span",{className:"flex items-center gap-1",children:[l.jsx(de,{label:xs(i),"aria-label":`Back to ${xs(i)}`,variant:"ghost",size:"sm",onClick:()=>o(i.id)}),l.jsx("span",{"aria-hidden":"true",className:"text-muted",children:"›"}),l.jsx("span",{className:"truncate",children:a})]})}),c?l.jsx(pn,{icon:l.jsx(G7,{className:"size-4"}),label:"Changes",size:"sm",variant:"ghost",onClick:u}):null,l.jsxs("span",{className:"relative",children:[l.jsx(pn,{"aria-pressed":d,icon:l.jsx(Dq,{className:"size-4"}),label:"Side panel",size:"sm",tooltip:d?"Hide side panel":"Show side panel",variant:"ghost",onClick:()=>f(!d)}),!d&&h?l.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 mc({chrome:e,icon:t,label:n,testId:s}){const r=e==="selector";return l.jsxs("span",{className:`inline-flex h-7 min-w-0 max-w-[16rem] items-center text-sm font-medium ${r?"gap-2 px-3 text-foreground":"gap-1.5 px-2 text-muted"}`,"data-testid":s,children:[l.jsx(t,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),l.jsx("span",{className:"truncate",children:n}),r?l.jsx(U7,{"aria-hidden":"true",className:"invisible size-4 shrink-0"}):null]})}function jC({location:e,branch:t,meter:n}){return l.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[e,t,l.jsx("span",{className:"ml-auto inline-flex shrink-0",children:n})]})}function VY({value:e,onChange:t,isDisabled:n=!1}){return l.jsx("div",{className:"max-w-full","data-testid":"checkout-strategy-picker",children:l.jsx(qc,{isLabelHidden:!0,label:"Where to work",placement:"below",isDisabled:n,options:[{value:"worktree",label:"Git worktree",icon:l.jsx(Xg,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})},{value:"local",label:"Project folder",icon:l.jsx(ou,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})}],size:"sm",startIcon:e==="worktree"?l.jsx(Xg,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}):l.jsx(ou,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),value:e,variant:"ghost",onChange:s=>t(s==="worktree"?"worktree":"local")})})}function SC({inputRef:e,onFiles:t}){return l.jsx("input",{ref:e,type:"file",accept:"image/*",multiple:!0,hidden:!0,"aria-hidden":!0,tabIndex:-1,onChange:n=>{t([...n.target.files??[]]),n.target.value=""}})}function CC({images:e,pending:t,onRemove:n}){if(!(e.length===0&&!t))return l.jsxs("div",{className:"flex flex-wrap gap-2","data-testid":"composer-attachments",children:[e.map((s,r)=>l.jsx(Bf,{src:Nm(s),alt:`Image ${r+1}`,onRemove:()=>n(r)},r)),t?l.jsx(Bf,{isLoading:!0,alt:"Preparing image"}):null]})}const WY=["image/jpeg","image/png","image/gif","image/webp"],Mm=4,KY=5*1024*1024,XY=/^[A-Za-z0-9+/]*={0,2}$/;function ZY(e){if(e.length>Mm)return`At most ${Mm} images per message`;for(let t=0;t<e.length;t++){const n=e[t];if(!WY.includes(n.mimeType))return`Unsupported image type: ${n.mimeType} (use JPEG, PNG, GIF or WebP)`;if(n.data===""||n.data.length%4!==0||!XY.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>KY)return`Image ${t+1} is larger than 5 MB`}}const YY=1568;function QY(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 JY(e){let t;try{t=await createImageBitmap(e)}catch{throw new Error(`Couldn't read ${e.name}`)}const n=Math.min(1,YY/Math.max(t.width,t.height)),s=Math.max(1,Math.round(t.width*n)),r=Math.max(1,Math.round(t.height*n)),a=document.createElement("canvas");a.width=s,a.height=r;const i=a.getContext("2d");i.fillStyle="#ffffff",i.fillRect(0,0,s,r),i.drawImage(t,0,0,s,r),t.close();const o=await new Promise((d,f)=>a.toBlob(h=>h===null?f(new Error(`Couldn't read ${e.name}`)):d(h),"image/jpeg",.85)),c={data:QY(await o.arrayBuffer()),mimeType:"image/jpeg"},u=ZY([c]);if(u!==void 0)throw new Error(u);return c}function $C(e){const[t,n]=x.useState([]),[s,r]=x.useState(0),[a,i]=x.useState(null),o=x.useRef(e);o.current=e;const c=x.useRef(0),u=x.useRef(0),d=p=>{if(!o.current){i("This model doesn't accept images");return}const m=p.filter(k=>k.type.startsWith("image/"));m.length<p.length&&i("Only images can be attached");const b=Math.max(0,Mm-u.current),y=m.slice(0,b);if(m.length>b?i("At most 4 images per message"):m.length===p.length&&i(null),y.length===0)return;u.current+=y.length;const g=c.current;r(k=>k+y.length),Promise.all(y.map(k=>JY(k))).then(k=>{c.current===g&&(n(v=>[...v,...k]),r(v=>v-y.length))},k=>{c.current===g&&(u.current-=y.length,i(k instanceof Error?k.message:String(k)),r(v=>v-y.length))})},f=p=>{u.current-=1,n(m=>m.filter((b,y)=>y!==p))},h=()=>{c.current+=1,u.current=0,n([]),r(0),i(null)};return{images:t,pending:s>0,error:a,add:d,remove:f,clear:h}}const EC="pinomad.draft.model";function eQ(e){try{const t=localStorage.getItem(EC);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 tQ(e){const[t,n]=x.useState(()=>{var d;const i=eQ(e.models),o=i!==void 0?{provider:i.provider,modelId:i.modelId}:e.defaults.model??(e.models[0]===void 0?void 0:{provider:e.models[0].provider,modelId:e.models[0].modelId}),c=((d=Rs(e.models,o))==null?void 0:d.thinkingLevels)??["off"],u=(i==null?void 0:i.thinkingLevel)??e.defaults.thinkingLevel??"off";return{model:o,level:xm(c,u)}}),s=(i,o)=>{localStorage.setItem(EC,JSON.stringify({...i,thinkingLevel:o}))},r=vU(e.models,e.defaults,t),a=r.level;return{pick:r,setModel:i=>{var c;const o=xm(((c=Rs(e.models,i))==null?void 0:c.thinkingLevels)??["off"],a);n({model:i,level:o}),s(i,o)},setLevel:i=>{n(o=>({...o,level:i})),r.model!==void 0&&s(r.model,i)}}}function Oc({children:e,className:t="",...n}){return l.jsx("div",{className:`prompt-suggestion prompt-suggestion--pill ${t}`.trim(),"data-slot":"prompt-suggestion",...n,children:e})}function nQ({children:e,className:t="",...n}){return l.jsx("div",{className:`prompt-suggestion__items prompt-suggestion__items--pill ${t}`.trim(),"data-slot":"prompt-suggestion-items",...n,children:e})}function sQ({children:e,className:t="",showEndIcon:n=!0,onPress:s,...r}){return l.jsxs("button",{className:`prompt-suggestion__item ${t}`.trim(),"data-slot":"prompt-suggestion-item",type:"button",onClick:s,...r,children:[e,n?l.jsx("span",{"aria-hidden":"true",className:"prompt-suggestion__item-end-icon",children:l.jsx(P7,{size:14})}):null]})}Oc.Items=nQ;Oc.Item=sQ;const rQ=[{Icon:$q,label:"Explain this repo's architecture"},{Icon:K7,label:"Fix the failing test"},{Icon:W7,label:"Add a CLI flag with docs"},{Icon:G7,label:"Review my uncommitted changes"}];function aQ({view:e,remote:t,draft:n,onDraft:s,connected:r}){var S;const[a,i]=x.useState(""),[o,c]=x.useState(!1),u=x.useRef(!1),[d,f]=x.useState("worktree"),h=x.useRef(null),{pick:p,setModel:m,setLevel:b}=tQ(e),y=Rs(e.models,p.model),g=(y==null?void 0:y.images)===!0,{images:k,pending:v,error:w,add:j,remove:C}=$C(g),$=x.useRef(null),E=g||!r?"Add images…":`Add images… (${(y==null?void 0:y.name)??((S=p.model)==null?void 0:S.modelId)??"This model"} can't see images)`,T=n.kind==="project"?l.jsx(VY,{value:d,onChange:f,isDisabled:!r}):l.jsx(mc,{chrome:"selector",icon:pf,label:"Chat",testId:"composer-location-label"});return l.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:l.jsxs("div",{className:"mx-auto my-auto flex w-full max-w-[44rem] flex-col items-center justify-center gap-6",children:[l.jsxs("h2",{className:"text-center text-3xl font-normal tracking-tight text-foreground max-lg:text-2xl",children:["Build something useful with ",l.jsx(Mx,{tone:"brand",children:"PiNomad"})]}),l.jsx("div",{className:"flex w-full flex-wrap justify-center gap-2",children:l.jsx(qc,{isLabelHidden:!0,label:"Project",placeholder:"No project",placement:"below",variant:"ghost",size:"sm",isDisabled:!r,value:n.kind==="chat"?"chat":n.path,startIcon:n.kind==="chat"?l.jsx(pf,{"aria-hidden":"true",className:"size-4 shrink-0"}):l.jsx(lu,{"aria-hidden":"true",className:"size-4 shrink-0"}),options:[{value:"chat",label:"No project",icon:l.jsx(pf,{"aria-hidden":"true",className:"size-4 shrink-0"})},...e.organized.projects.map(M=>({value:M.project.path,label:M.project.name,icon:l.jsx(lu,{"aria-hidden":"true",className:"size-4 shrink-0"})}))],onChange:M=>s(M==="chat"?{kind:"chat"}:{kind:"project",path:M})})}),l.jsxs("div",{className:"flex w-full flex-col gap-3",children:[l.jsx(SC,{inputRef:$,onFiles:j}),l.jsx(hk,{accent:"brand",accentFocusRing:!0,value:a,inputRef:h,onValueChange:i,triggers:fk(e.agents),status:o?"submitted":"ready",onSubmit:()=>{const M=a.trim();M===""&&k.length===0||v||u.current||(kl(),u.current=!0,c(!0),t.controller.createConversation(n,M,{...n.kind==="project"&&d==="local"?{checkout:"project"}:{},...p.model===void 0?{}:{model:p.model},thinkingLevel:p.level,...k.length===0?{}:{images:k}}).finally(()=>{u.current=!1,c(!1)}))},isDisabled:!r,placeholder:"Do anything with Pi",attachments:CC({images:k,pending:v,onRemove:C}),hasAttachments:k.length>0,onFiles:j,error:w,startActions:l.jsxs(l.Fragment,{children:[l.jsx(Oi,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:l.jsx(Ho,{"aria-hidden":"true"}),isDisabled:!r},items:[{label:E,isDisabled:!r||!g,onClick:()=>{var M;return(M=$.current)==null?void 0:M.click()}}]}),l.jsx(ak,{models:e.models,selected:{model:p.model,level:p.level},isDisabled:!r,onModelChange:m,onLevelChange:b})]}),footer:l.jsx(jC,{location:T})})]}),l.jsx(Oc,{className:"w-full max-w-[35rem]",children:l.jsx(Oc.Items,{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:rQ.map(({Icon:M,label:z})=>l.jsx(Oc.Item,{className:"items-center justify-start",showEndIcon:!1,onPress:()=>{var A;i(z),(A=h.current)==null||A.focusAtEnd()},children:l.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[l.jsx(M,{"aria-hidden":"true",className:"size-4 shrink-0"}),l.jsx("span",{className:"truncate",children:z})]})},z))})})]})})}function iQ({body:e,tag:t,className:n,...s}){return l.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??""}`.trim(),"data-testid":"chat-queued-message",...s,children:[l.jsx("p",{className:"chat-queued-message__body min-w-0 flex-1 truncate","data-slot":"queued-message-body",title:e,children:e}),l.jsx("span",{className:"shrink-0 text-xs font-medium text-muted",children:t})]})}const oQ={steer:"Steer",followUp:"Follow-up",write:"Write"};function lQ({items:e}){if(e.length===0)return null;const t=n=>{if(n.imageCount===0)return n.text;const s=`${n.imageCount} ${n.imageCount===1?"image":"images"}`;return n.text===""?s:`${n.text} · ${s}`};return l.jsx("div",{className:"mx-auto mb-3 grid w-full gap-1.5","data-testid":"queued-message-list",children:e.map(n=>l.jsx(iQ,{body:t(n),tag:oQ[n.mode]},n.id))})}function cQ({view:e,remote:t,conversation:n,busy:s,narrow:r}){var S,M;const[a,i]=x.useState(""),o=L7(n),c=NB(n),u=e.connection!=="connected",d=MB(n),f=e.checkout,h=((S=e.home)==null?void 0:S.kind)==="project",p=Rs(e.models,o.model),m=(p==null?void 0:p.images)===!0,{images:b,pending:y,error:g,add:k,remove:v,clear:w}=$C(m),j=x.useRef(null),C=m||u?"Add images…":`Add images… (${(p==null?void 0:p.name)??((M=o.model)==null?void 0:M.modelId)??"This model"} can't see images)`,$=h?f!==void 0?l.jsx(mc,{chrome:"selector",icon:Xg,label:"Git worktree",testId:"composer-location-label"}):l.jsx(mc,{chrome:"selector",icon:ou,label:"Project folder",testId:"composer-location-label"}):l.jsx(mc,{chrome:"selector",icon:pf,label:"Chat",testId:"composer-location-label"}),E=f===void 0?null:l.jsx(mc,{chrome:"button",icon:Zg,label:f.branch,testId:"composer-branch-label"}),T=z=>{const A=a.trim();A===""&&b.length===0||y||(kl(),t.controller.submit(A,z,{images:b}),i(""),w())};return l.jsxs(l.Fragment,{children:[c===""?null:l.jsx(se,{type:"supporting",children:c}),l.jsx(lQ,{items:d}),l.jsx(SC,{inputRef:j,onFiles:k}),l.jsx(hk,{value:a,status:s?"streaming":"ready",isDisabled:u,placeholder:s?"Steer the running turn…":"Ask the agent…",onValueChange:i,onSubmit:()=>T("steer"),triggers:fk(e.agents),onStop:s?()=>void t.controller.abort():void 0,attachments:CC({images:b,pending:y,onRemove:v}),hasAttachments:b.length>0,onFiles:k,error:g,startActions:l.jsxs(l.Fragment,{children:[l.jsx(Oi,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:l.jsx(Ho,{"aria-hidden":"true"}),isDisabled:u},items:[{label:C,isDisabled:u||!m,onClick:()=>{var z;return(z=j.current)==null?void 0:z.click()}},{label:"Compact conversation",isDisabled:u,onClick:()=>void t.controller.compact(void 0)}]}),l.jsx(ak,{models:e.models,selected:{model:o.model,level:o.thinkingLevel??"off"},isDisabled:u,onModelChange:z=>void t.controller.setModel(z),onLevelChange:z=>void t.controller.setThinkingLevel(z)})]}),endActions:s&&(a.trim()!==""||b.length>0)?l.jsx(de,{label:"Follow-up",variant:"ghost",size:r?"md":"sm",tooltip:"Queue after the running turn",isDisabled:u||y,onClick:()=>T("followUp")}):null,footer:l.jsx(jC,{location:$,branch:E})})]})}const Xo=e=>e!==null&&typeof e=="object",TC=new Set(["__proto__","constructor","prototype"]);class bl extends Error{constructor(n){super(`unsafe path segment: ${String(n)}`);ee(this,"segment");this.segment=n,this.name="UnsafePathError"}}function zC(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");oo(e[1],!0);return;case"d":if(e.length!==2)throw new TypeError("d arity");oo(e[1],!0);return;case"a":if(e.length!==3||typeof e[2]!="string")throw new TypeError("a shape");oo(e[1],!0);return;case"t":if(e.length!==3||!Number.isInteger(e[2])||e[2]<0)throw new TypeError("t shape");oo(e[1],!0);return;case"p":{if(e.length!==5)throw new TypeError("p arity");if(oo(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");oo(e[1]),uQ(e[2]);return;default:throw new TypeError(`unknown op verb: ${String(e[0])}`)}}function oo(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");NC(e)}function uQ(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 NC(e){for(const t of e)if(typeof t=="string"){if(TC.has(t))throw new bl(t)}else if(!Number.isInteger(t)||t<0)throw new bl(t)}function dQ(e,t){if(t>e.length)throw new bl(t)}class us extends Error{constructor(n){super(`unresolvable path: ${JSON.stringify(n)}`);ee(this,"path");this.path=n,this.name="PathError"}}function fQ(e,t){let n=e;for(const s of t){if(zC(s),s[0]==="r"){n=s[1];continue}const r=s[1];if(NC(r),s[0]==="p"){const u=r.length===0?n:wf(n,r);if(!Array.isArray(u))throw new us(r);u.splice(s[2],s[3]);const d=1e4;for(let f=0;f<s[4].length;f+=d)u.splice(s[2]+f,0,...s[4].slice(f,f+d));continue}if(s[0]==="m"){const u=r.length===0?n:wf(n,r);if(!Array.isArray(u)||u.length!==s[2].length)throw new us(r);const d=u.slice();for(let f=0;f<s[2].length;f++)u[f]=d[s[2][f]];continue}const a=wf(n,r.slice(0,-1)),i=r[r.length-1];if(Array.isArray(a)){if(typeof i!="number")throw new bl(i);dQ(a,i)}const o=u=>{Object.defineProperty(a,i,{value:u,writable:!0,enumerable:!0,configurable:!0})},c=()=>Object.hasOwn(a,i)?a[i]:void 0;switch(s[0]){case"s":o(s[2]);break;case"d":if(Array.isArray(a)){if(typeof i!="number"||i>=a.length)throw new us(r);a.splice(i,1)}else delete a[i];break;case"a":{const u=c();if(typeof u!="string")throw new us(r);o(`${u}${s[2]}`);break}case"t":{const u=c();if(typeof u!="string")throw new us(r);o(u.slice(s[2]));break}}}return n}function hQ(e,t){return xQ(e,[t])}function xQ(e,t){let n=e;const s=new WeakSet;for(const r of t)for(const a of r){if(zC(a),a[0]==="r"){n=a[1];continue}if(a[0]==="p"){const i=pQ(n,a,s);if(i!==void 0){n=i;continue}}n=MC(n,a[0]==="p"||a[0]==="m"?a[1]:a[1].slice(0,-1),s),n=fQ(n,[a])}return n}function pQ(e,t,n){const[,s,r,a,i]=t;if(a!==0)return;let o=e;for(const f of s){if(!(typeof f=="string"?!TC.has(f)&&Xo(o)&&!Array.isArray(o):Number.isInteger(f)&&f>=0&&Array.isArray(o))||!Object.hasOwn(o,f))return;o=o[f]}if(!Array.isArray(o)||n.has(o)||r!==o.length)return;const c=o.concat(i);if(n.add(c),s.length===0)return c;const u=s.slice(0,-1),d=MC(e,u,n);return Object.defineProperty(wf(d,u),s[s.length-1],{value:c,writable:!0,enumerable:!0,configurable:!0}),d}function MC(e,t,n){const s=i=>{if(Array.isArray(i))return i.slice();if(!Xo(i))throw new us(t);const o=Object.create(Object.getPrototypeOf(i)===null?null:Object.prototype);for(const c of Object.keys(i))Object.defineProperty(o,c,{value:i[c],writable:!0,enumerable:!0,configurable:!0});return o};if(!Xo(e))throw new us(t);let r;n.has(e)?r=e:(r=s(e),n.add(r));let a=r;for(const i of t){if(!Object.hasOwn(a,i))throw new us(t);if(Array.isArray(a)&&typeof i!="number")throw new bl(i);const o=a[i];if(!Xo(o))throw new us(t);if(n.has(o)){a=o;continue}const c=s(o);Object.defineProperty(a,i,{value:c,writable:!0,enumerable:!0,configurable:!0}),n.add(c),a=c}return r}function gQ(e,t){let n=e;for(const s of t){if(!Xo(n))throw new us(t);if(Array.isArray(n)&&typeof s!="number")throw new bl(s);if(!Object.hasOwn(n,s))throw new us(t);n=n[s]}return n}function wf(e,t){const n=gQ(e,t);if(!Xo(n))throw new us(t);return n}const AC={conversations:0,index:0,devices:0,mcp:0,models:1,auth:1,settings:2,agents:6},vk=Object.keys(AC);function c5(e){return vk.filter(t=>AC[t]<=e)}const xp=e=>`conversation:${e}`,u5=(e,t)=>`doc:${e}:${t}`,d5=4401,mQ=4400,pp={major:5},yQ={logout:1,updateSettings:2,listFolders:3,renameConversation:4,createAgent:6,updateAgent:6,deleteAgent:6};function Ha(e,t){return e>=(yQ[t]??0)}const kQ={images:5};function f5(e,t){return e>=kQ[t]}[...vk];function bQ(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=a=>n.message(String(a.data)),r.onclose=a=>n.closed(a.code),{send:a=>r.send(a),close:()=>r.close()}}}}function vQ(e){return new wQ(e).ready}class Am 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 RC extends Error{constructor(n,s,r){const a=n>s?"client-older":"host-older";super(a==="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}`);ee(this,"hostMajor");ee(this,"clientMajor");ee(this,"hostVersion");ee(this,"direction");this.name="ProtocolMismatchError",this.hostMajor=n,this.clientMajor=s,r!==void 0&&(this.hostVersion=r),this.direction=a}}var ku,Qo,Ut,At,hr,Jo,Nh,ii,Jr,el,$s,fn,hn,ss,Mh,Ah,bn,bu,vu,tl,wu,Es,nl,ea,ju,sl,H,Rm,IC,Ga,_C,DC,jf,Va,Im,Sf,es,_m,Dm,LC,Lm,Gs,ur,Kr,it,en,dr,OC,BC,Cf,qC,$f,HC;class wQ{constructor(t){ze(this,H);ee(this,"ready");ze(this,ku);ze(this,Qo,new Set);ze(this,Ut,new Map);ze(this,At,new Set);ze(this,hr,new Set);ze(this,Jo,[]);ze(this,Nh,{});ze(this,ii,new Map);ze(this,Jr,new Map);ze(this,el);ze(this,$s);ze(this,fn);ze(this,hn);ze(this,ss);ze(this,Mh,1);ze(this,Ah,1);ze(this,bn,0);ze(this,bu,[]);ze(this,vu,{});ze(this,tl);ze(this,wu,0);ze(this,Es,!1);ze(this,nl,!1);ze(this,ea,Promise.resolve());ze(this,ju);ze(this,sl);je(this,ku,t),je(this,el,"transport"in t?t.transport:bQ(t.url,t.token)),this.ready=new Promise((n,s)=>{je(this,ju,n),je(this,sl,s)}),V(this,H,Rm).call(this)}}ku=new WeakMap,Qo=new WeakMap,Ut=new WeakMap,At=new WeakMap,hr=new WeakMap,Jo=new WeakMap,Nh=new WeakMap,ii=new WeakMap,Jr=new WeakMap,el=new WeakMap,$s=new WeakMap,fn=new WeakMap,hn=new WeakMap,ss=new WeakMap,Mh=new WeakMap,Ah=new WeakMap,bn=new WeakMap,bu=new WeakMap,vu=new WeakMap,tl=new WeakMap,wu=new WeakMap,Es=new WeakMap,nl=new WeakMap,ea=new WeakMap,ju=new WeakMap,sl=new WeakMap,H=new WeakSet,Rm=function(){const t=G(this,el).open({message:n=>{G(this,$s)===t&&V(this,H,_C).call(this,JSON.parse(n))},closed:(n,s)=>V(this,H,IC).call(this,t,n,s)});je(this,$s,t)},IC=function(t,n,s){if(G(this,$s)!==t)return;je(this,$s,void 0);for(const o of G(this,Jr).values())o.reject(new Error("Disconnected from host"));if(G(this,Jr).clear(),G(this,fn)===void 0){je(this,Es,!0),G(this,sl).call(this,n===d5?new Am:new Error(s??`Could not connect to ${G(this,el).label}`));return}if(G(this,Es))return;if(n===d5){je(this,Es,!0),V(this,H,ur).call(this,{connection:"closed",unauthorized:!0}),V(this,H,Kr).call(this,"error",new Am().message);return}if(n===mQ){je(this,Es,!0),V(this,H,ur).call(this,{connection:"closed"}),V(this,H,Kr).call(this,"error",`The host rejected a malformed frame from this client${s===void 0?"":`: ${s}`}`);return}V(this,H,ur).call(this,{connection:"reconnecting"});const{min:r,max:a}=G(this,ku).reconnectDelayMs??{min:200,max:2e3},i=Math.min(a,r*2**Uu(this,wu)._++);setTimeout(()=>{G(this,Es)||V(this,H,Rm).call(this)},i)},Ga=function(t){var n;(n=G(this,$s))==null||n.send(JSON.stringify(t))},_C=function(t){var n,s,r;if(!(t===null||typeof t!="object"))switch(t.type){case"hello":{const a=t.protocol,i=typeof a=="number"?a:a!==null&&typeof a=="object"?a.major:void 0;if(i!==pp.major){const u=new RC(typeof i=="number"?i:Number.NaN,pp.major,t.hostVersion);je(this,Es,!0),G(this,fn)===void 0?G(this,sl).call(this,u):(V(this,H,ur).call(this,{connection:"outdated",protocolMismatch:{hostMajor:u.hostMajor,clientMajor:u.clientMajor,...u.hostVersion===void 0?{}:{hostVersion:u.hostVersion},direction:u.direction}}),V(this,H,Kr).call(this,"error",u.message)),(n=G(this,$s))==null||n.close();return}const o=a!==null&&typeof a=="object"&&typeof a.minor=="number"?a.minor:0;je(this,bn,o),je(this,wu,0),je(this,Jo,t.docs),je(this,Nh,t.toolPresentations),je(this,bu,t.models),je(this,vu,t.defaults??{}),je(this,tl,t.hostVersion),G(this,hr).clear();const c=new Set(c5(o));for(const u of vk)c.has(u)?G(this,At).add(u):(G(this,At).delete(u),G(this,Ut).delete(u),G(this,hr).delete(u));if(G(this,hn)!==void 0)for(const u of V(this,H,Va).call(this,G(this,hn)))G(this,At).add(u);if(G(this,ss)!==void 0)for(const u of V(this,H,Va).call(this,G(this,ss)))G(this,At).add(u);for(const u of G(this,At))V(this,H,Ga).call(this,{type:"subscribe",stream:u});G(this,fn)!==void 0?(V(this,H,ur).call(this,{session:t.session,toolPresentations:t.toolPresentations,connection:"connected",host:V(this,H,_m).call(this)}),V(this,H,Gs).call(this)):V(this,H,DC).call(this,t,o);return}case"snapshot":if(!G(this,At).has(t.stream))return;G(this,Ut).set(t.stream,t.value),G(this,hr).add(t.stream),V(this,H,Gs).call(this);for(const a of((s=G(this,ii).get(t.stream))==null?void 0:s.splice(0))??[])a.resolve();return;case"ops":if(!G(this,At).has(t.stream)||!G(this,Ut).has(t.stream))return;G(this,Ut).set(t.stream,hQ(G(this,Ut).get(t.stream),t.ops)),V(this,H,Gs).call(this);return;case"ended":G(this,At).delete(t.stream),G(this,Ut).delete(t.stream),G(this,hr).delete(t.stream);for(const a of((r=G(this,ii).get(t.stream))==null?void 0:r.splice(0))??[])a.reject(new Error(`Stream ${t.stream} ended: ${t.reason}`));V(this,H,Gs).call(this);return;case"result":{const a=G(this,Jr).get(t.id);G(this,Jr).delete(t.id),t.ok?a==null||a.resolve(t.value):a==null||a.reject(new Error(t.error));return}case"notice":V(this,H,Kr).call(this,t.level,t.message);return}},DC=function(t,n){Promise.all(c5(n).map(s=>V(this,H,jf).call(this,s))).then(()=>{je(this,fn,{session:t.session,organized:{chats:[],projects:[]},models:V(this,H,es).call(this,"models")??t.models,defaults:V(this,H,Dm).call(this,t.defaults??{}),notices:[],connection:"connected",docs:[],toolPresentations:t.toolPresentations,devices:[],mcp:null,auth:null,settings:null,agents:null,host:V(this,H,_m).call(this)}),V(this,H,Gs).call(this),G(this,ju).call(this,{view:V(this,H,OC).call(this),controller:V(this,H,BC).call(this),close:()=>V(this,H,HC).call(this)})})},jf=function(t){return new Promise((n,s)=>{const r=G(this,ii).get(t)??[];r.push({resolve:n,reject:s}),G(this,ii).set(t,r)})},Va=function(t){return[xp(t),...G(this,Jo).map(n=>u5(n.kind,t))]},Im=async function(t){const n=V(this,H,Va).call(this,t).filter(a=>!G(this,At).has(a)),s=V(this,H,Va).call(this,t).filter(a=>G(this,At).has(a)&&!G(this,hr).has(a)),r=Promise.all([...n,...s].map(a=>V(this,H,jf).call(this,a)));for(const a of n)G(this,At).add(a),V(this,H,Ga).call(this,{type:"subscribe",stream:a});await r},Sf=function(t,n){const s=new Set(n===void 0?[]:V(this,H,Va).call(this,n));for(const r of V(this,H,Va).call(this,t))s.has(r)||(G(this,At).delete(r),G(this,Ut).delete(r),G(this,hr).delete(r),V(this,H,Ga).call(this,{type:"unsubscribe",stream:r}))},es=function(t){return G(this,Ut).get(t)},_m=function(){return{protocol:{major:pp.major,minor:G(this,bn)},...G(this,tl)===void 0?{}:{version:G(this,tl)}}},Dm=function(t){const n=V(this,H,es).call(this,"settings");return n===void 0?t:{...n.defaultModel===null?{}:{model:n.defaultModel},...n.defaultThinkingLevel===null?{}:{thinkingLevel:n.defaultThinkingLevel}}},LC=function(t,n){const s=V(this,H,es).call(this,"conversations")??[],r=new Map(s.map(i=>[i.id,i.parent]));let a=t;for(let i=0;a!==void 0&&i<8;i++){if(a===n)return!0;a=r.get(a)}return!1},Lm=function(t){return G(this,Jo).flatMap(n=>{const s=u5(n.kind,t);return G(this,Ut).has(s)?[{kind:n.kind,presentation:n.presentation,value:G(this,Ut).get(s)}]:[]})},Gs=function(){var c;if(G(this,fn)===void 0)return;const t=G(this,hn),n=G(this,ss),s=t===void 0?void 0:G(this,Ut).get(xp(t)),r=V(this,H,es).call(this,"conversations")??[],a=V(this,H,es).call(this,"index")??{projects:[],conversations:[]},i=((c=V(this,H,es).call(this,"devices"))==null?void 0:c.devices)??[],o=G(this,At).has("tasks")?G(this,Ut).get("tasks"):void 0;V(this,H,ur).call(this,{conversation:s,models:V(this,H,es).call(this,"models")??G(this,bu),organized:mB(a,r),home:t===void 0?void 0:kB(a,r,t),checkout:t===void 0?void 0:yB(a,r,t),tasks:o,docs:t===void 0?[]:V(this,H,Lm).call(this,t),side:n===void 0?void 0:{id:n,conversation:G(this,Ut).get(xp(n)),docs:V(this,H,Lm).call(this,n)},devices:i,mcp:V(this,H,es).call(this,"mcp")??null,auth:V(this,H,es).call(this,"auth")??null,settings:V(this,H,es).call(this,"settings")??null,agents:V(this,H,es).call(this,"agents")??null,defaults:V(this,H,Dm).call(this,G(this,vu))})},ur=function(t){G(this,fn)!==void 0&&(je(this,fn,{...G(this,fn),...t}),!G(this,nl)&&(je(this,nl,!0),queueMicrotask(()=>{je(this,nl,!1);for(const n of G(this,Qo))n()})))},Kr=function(t,n){G(this,fn)!==void 0&&V(this,H,ur).call(this,{notices:[...G(this,fn).notices,{id:Uu(this,Ah)._++,level:t,message:n}].slice(-20)})},it=function(t,n){var r;if(G(this,$s)===void 0||((r=G(this,fn))==null?void 0:r.connection)!=="connected")return Promise.reject(new Error("Not connected to the host"));const s=Uu(this,Mh)._++;return new Promise((a,i)=>{G(this,Jr).set(s,{resolve:a,reject:i}),V(this,H,Ga).call(this,{type:"call",id:s,method:t,args:n})})},en=function(t){return je(this,ea,G(this,ea).then(t).then(()=>{},n=>V(this,H,Kr).call(this,"error",n instanceof Error?n.message:String(n)))),G(this,ea)},dr=function(t){const n=G(this,ea).then(t);return je(this,ea,n.then(()=>{},()=>{})),n},OC=function(){return{current:()=>G(this,fn),subscribe:t=>(G(this,Qo).add(t),()=>G(this,Qo).delete(t))}},BC=function(){const t=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),s=>s.toString(16).padStart(2,"0")).join(""),n=()=>{if(G(this,hn)===void 0)throw new Error("No conversation selected");return G(this,hn)};return{addProject:s=>V(this,H,dr).call(this,()=>V(this,H,it).call(this,"addProject",{path:s})),listFolders:s=>V(this,H,dr).call(this,()=>{if(!Ha(G(this,bn),"listFolders"))throw new Error("The host is too old for this (needs protocol 5.3); run `pinomad upgrade` on the host");return V(this,H,it).call(this,"listFolders",s===void 0?{}:{path:s})}),removeProject:s=>V(this,H,en).call(this,()=>V(this,H,it).call(this,"removeProject",{path:s})),renameConversation:(s,r)=>V(this,H,dr).call(this,async()=>{if(!Ha(G(this,bn),"renameConversation"))throw new Error("The host is too old for this (needs protocol 5.4); run `pinomad upgrade` on the host");await V(this,H,it).call(this,"renameConversation",{conversationId:s,title:r})}),createConversation:(s,r,a)=>V(this,H,en).call(this,async()=>{const i=(a==null?void 0:a.images)??[];if(i.length>0&&!f5(G(this,bn),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");const{conversationId:o}=await V(this,H,it).call(this,"createConversation",{home:s,text:r,requestId:t(),...(a==null?void 0:a.checkout)===void 0?{}:{checkout:a.checkout},...(a==null?void 0:a.model)===void 0?{}:{model:a.model},...(a==null?void 0:a.thinkingLevel)===void 0?{}:{thinkingLevel:a.thinkingLevel},...i.length===0?{}:{images:i}});await V(this,H,Cf).call(this,o)}),archive:(s,r)=>V(this,H,en).call(this,async()=>{await V(this,H,it).call(this,"archive",{conversationId:s,archived:r}),r&&s===G(this,hn)&&V(this,H,qC).call(this),r&&G(this,ss)!==void 0&&V(this,H,LC).call(this,G(this,ss),s)&&await V(this,H,$f).call(this,void 0)}),submit:(s,r,a)=>V(this,H,en).call(this,()=>{const i=(a==null?void 0:a.images)??[];if(i.length>0&&!f5(G(this,bn),"images"))throw new Error("The host is too old for images (needs protocol 5.5); run `pinomad upgrade` on the host");return V(this,H,it).call(this,"submit",{conversationId:(a==null?void 0:a.target)??n(),text:s,whenBusy:r,requestId:(a==null?void 0:a.requestId)??t(),...i.length===0?{}:{images:i}})}),compact:s=>V(this,H,en).call(this,()=>V(this,H,it).call(this,"compact",{conversationId:n(),...s===void 0?{}:{instructions:s}})),abort:s=>{const r=s??G(this,hn);return r===void 0?(V(this,H,Kr).call(this,"error","No conversation selected"),Promise.resolve()):V(this,H,it).call(this,"abort",{conversationId:r}).then(()=>{},a=>V(this,H,Kr).call(this,"error",a instanceof Error?a.message:String(a)))},setThinkingLevel:s=>V(this,H,en).call(this,()=>V(this,H,it).call(this,"setThinkingLevel",{conversationId:n(),level:s})),setModel:s=>V(this,H,en).call(this,()=>V(this,H,it).call(this,"setModel",{conversationId:n(),model:s})),toggleTasks:()=>V(this,H,en).call(this,async()=>{if(G(this,At).delete("tasks")){V(this,H,Ga).call(this,{type:"unsubscribe",stream:"tasks"}),G(this,Ut).delete("tasks"),V(this,H,Gs).call(this);return}G(this,At).add("tasks");const s=V(this,H,jf).call(this,"tasks");V(this,H,Ga).call(this,{type:"subscribe",stream:"tasks"}),await s}),switchConversation:s=>V(this,H,en).call(this,()=>V(this,H,Cf).call(this,s)),showSide:s=>V(this,H,en).call(this,()=>V(this,H,$f).call(this,s)),fork:(s,r,a,i)=>V(this,H,en).call(this,async()=>{const{conversationId:o}=await V(this,H,it).call(this,"fork",{conversationId:n(),entryId:s,...a===void 0?{}:{removeTools:a}});(i==null?void 0:i.show)==="side"?await V(this,H,$f).call(this,o):await V(this,H,Cf).call(this,o),await V(this,H,it).call(this,"submit",{conversationId:o,text:r,whenBusy:"followUp",requestId:t()})}),answer:(s,r,a,i)=>V(this,H,en).call(this,()=>V(this,H,it).call(this,"answer",{conversationId:i??n(),kind:s,requestId:r,answers:a})),changes:()=>V(this,H,dr).call(this,()=>V(this,H,it).call(this,"changes",{conversationId:n()})),createPairing:()=>V(this,H,dr).call(this,()=>V(this,H,it).call(this,"createPairing",{})),revokeDevice:s=>V(this,H,en).call(this,()=>V(this,H,it).call(this,"revokeDevice",{publicKey:s})),logout:s=>V(this,H,en).call(this,()=>{if(!Ha(G(this,bn),"logout"))throw new Error("The host is too old for this (needs protocol 5.1); run `pinomad upgrade` on the host");return V(this,H,it).call(this,"logout",{providerId:s})}),updateSettings:s=>V(this,H,en).call(this,()=>{if(!Ha(G(this,bn),"updateSettings"))throw new Error("The host is too old for this (needs protocol 5.2); run `pinomad upgrade` on the host");return V(this,H,it).call(this,"updateSettings",{patch:s})}),createAgent:s=>V(this,H,dr).call(this,async()=>{if(!Ha(G(this,bn),"createAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,it).call(this,"createAgent",{role:s})}),updateAgent:s=>V(this,H,dr).call(this,async()=>{if(!Ha(G(this,bn),"updateAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,it).call(this,"updateAgent",{role:s})}),deleteAgent:s=>V(this,H,dr).call(this,async()=>{if(!Ha(G(this,bn),"deleteAgent"))throw new Error("The host is too old for this (needs protocol 5.6); run `pinomad upgrade` on the host");await V(this,H,it).call(this,"deleteAgent",{name:s})})}},Cf=async function(t){const n=G(this,hn);t!==n&&(await V(this,H,Im).call(this,t),je(this,hn,t),n!==void 0&&V(this,H,Sf).call(this,n,G(this,ss)),V(this,H,Gs).call(this))},qC=function(){const t=G(this,hn);t!==void 0&&(je(this,hn,void 0),V(this,H,Sf).call(this,t,G(this,ss)),V(this,H,Gs).call(this))},$f=async function(t){const n=G(this,ss);t!==n&&(t!==void 0&&await V(this,H,Im).call(this,t),je(this,ss,t),n!==void 0&&V(this,H,Sf).call(this,n,G(this,hn)),V(this,H,Gs).call(this))},HC=function(){var t;G(this,Es)||(je(this,Es,!0),V(this,H,ur).call(this,{connection:"closed"}),(t=G(this,$s))==null||t.close())};function jQ(e,t){const[n,s]=x.useState({status:"connecting"});return x.useEffect(()=>{let r,a=!1;return vQ({reconnectDelayMs:{min:200,max:2e3},...e}).then(i=>{if(a){i.close();return}r=i,i.controller.toggleTasks(),s({status:"ready",remote:i})},i=>{a||s({status:"failed",error:i instanceof Error?i.message:String(i),unauthorized:i instanceof Am,...i instanceof RC?{mismatch:i}:{}})}),()=>{a=!0,r==null||r.close()}},[t]),n}function SQ(e){return x.useSyncExternalStore(e.view.subscribe,e.view.current)}const CQ={height:"100dvh",width:"100%",backgroundColor:"var(--color-background-body)",color:"var(--color-text-primary)"},$Q={flex:1,minHeight:0};function EQ(){const[e]=x.useState(BP),[t,n]=x.useState();x.useEffect(()=>{let a=!0;return e.list().catch(i=>(console.error("Could not load the paired-host list",i),[])).then(i=>{if(!a)return;const o=localStorage.getItem(fu);n({hosts:i,activeHostKey:o,address:_P(window.location.hash,window.location,i,o)})}),()=>{a=!1}},[e]),x.useEffect(()=>{const a=()=>{window.location.hash!==""&&window.location.reload()};return window.addEventListener("hashchange",a),()=>window.removeEventListener("hashchange",a)},[]);const s=x.useMemo(()=>t===void 0?{store:e,hosts:[],activeHostKey:null,paired:()=>Promise.resolve()}:{store:e,hosts:t.hosts,activeHostKey:t.activeHostKey,paired:async a=>{await e.save(a),localStorage.setItem(fu,a.hostKey),n(i=>i===void 0?i:{...i,hosts:[...i.hosts.filter(o=>o.hostKey!==a.hostKey),a],activeHostKey:a.hostKey})}},[e,t]);if(t===void 0)return l.jsx(vl,{children:null});const{address:r}=t;return l.jsx(zS.Provider,{value:s,children:r===void 0?l.jsx(vl,{children:l.jsx(TQ,{})}):l.jsx(zQ,{address:r})})}function TQ(){return l.jsxs(ve,{gap:4,hAlign:"center",style:{width:"100%",maxWidth:420},children:[l.jsx(ya,{title:"No host link",description:"Paste a pairing link from pinomad pair or Devices → Pair a device."}),l.jsx(NS,{})]})}function vl({children:e}){const t=B7().reserveMacTrafficLights;return l.jsxs(ve,{style:CQ,isScrollable:!0,children:[t?l.jsx("div",{"aria-hidden":"true",className:"pinomad-drag fixed inset-x-0 top-0 h-10"}):null,l.jsx(ve,{minHeight:"100%",style:{flexShrink:0},hAlign:"center",vAlign:"center",padding:6,children:e})]})}function zQ({address:e}){return e.kind==="token"?l.jsx(UC,{options:e,connectionKey:`${e.url} ${e.token}`,label:e.url}):e.kind==="pair"?l.jsx(NQ,{address:e}):l.jsx(PC,{address:e})}function NQ({address:e}){const[t,n]=x.useState(!1),{store:s,hosts:r}=Bu(),a=!s.multiHost&&r[0]!==void 0&&r[0].hostKey!==e.hostKey,i=()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()};if(t)return l.jsx(PC,{address:e});const o=new URL(e.url);return l.jsx(vl,{children:l.jsxs(ve,{gap:4,hAlign:"center",style:{maxWidth:420},children:[l.jsx(ya,{title:"Pair with this host?",description:`This device will pair with ${o.host}.`}),a?l.jsx(yn,{status:"warning",title:"Replaces your current pairing",description:"This device is already paired with a different host — pairing again replaces it."}):null,l.jsx(se,{type:"supporting",style:{wordBreak:"break-all"},children:e.url}),l.jsxs($e,{gap:2,children:[l.jsx(de,{label:"Cancel",variant:"secondary",onClick:i}),l.jsx(de,{label:"Pair",variant:"primary",onClick:()=>n(!0)})]})]})})}function PC({address:e}){const{store:t,hosts:n,paired:s}=Bu(),r=x.useMemo(()=>n.find(f=>f.hostKey===e.hostKey),[n,e]),[a,i]=x.useState(),o=x.useMemo(()=>e.kind==="pair"&&r!==void 0?im(Vo(r.privateKey)):e.kind==="device"?im(Vo(e.privateKey)):jS(),[e,r]),c=x.useMemo(()=>({transport:zP({url:e.url,hostKey:Vo(e.hostKey),device:o,...e.kind==="pair"?{pairing:{secret:e.secret,name:LP(navigator.userAgent)},onPaired:()=>{const f={url:e.url,hostKey:e.hostKey,privateKey:ES(o.privateKey)};s(f).catch(h=>{console.error("Could not save the paired host",h),i(f)}),history.replaceState(null,"",window.location.pathname+window.location.search)}}:{}})}),[e,o,s]),u=e.kind==="pair"?l.jsxs(ve,{gap:4,hAlign:"center",children:[l.jsx(ya,{title:"This pairing code was used or has expired",description:"Generate a new QR on the host: run bun run pair, or open Devices → Pair a device."}),n.length===0?null:l.jsx(de,{label:"Use saved pairing",variant:"secondary",onClick:()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}})]}):l.jsxs(ve,{gap:4,hAlign:"center",children:[l.jsx(ya,{title:"This device isn't paired",description:"It isn't paired with the host, or was revoked."}),l.jsx(de,{label:"Forget this host",variant:"secondary",onClick:()=>{localStorage.getItem(fu)===e.hostKey&&localStorage.removeItem(fu),t.remove(e.hostKey).finally(()=>window.location.reload())}})]}),d=a===void 0?void 0:l.jsx(yn,{status:"warning",container:"section",title:"This pairing wasn't saved",description:"It will be lost when the app restarts.",endContent:l.jsx(de,{label:"Retry",variant:"ghost",onClick:()=>{s(a).then(()=>i(void 0),f=>console.error("Could not save the paired host",f))}})});return l.jsx(UC,{options:c,connectionKey:`${e.url} ${e.hostKey}`,label:e.url,rejected:u,device:o,notice:d})}function UC({options:e,connectionKey:t,label:n,rejected:s,device:r,notice:a}){const i=jQ(e,t);return i.status==="connecting"?l.jsx(vl,{children:l.jsx(ya,{title:"Connecting",description:n})}):i.status==="failed"?l.jsxs(vl,{children:[i.mismatch!==void 0?l.jsx(FC,{wsUrl:n,mismatch:i.mismatch}):s!==void 0&&i.unauthorized?s:l.jsx(yn,{status:"error",title:"Could not connect to the host",description:i.error}),l.jsx(RS,{})]}):l.jsx(AQ,{remote:i.remote,wsUrl:n,rejected:s,device:r,notice:a})}const Om="pinomad.reloadedForProtocol";function FC({wsUrl:e,mismatch:t}){var i;const n=Z7(),s=((i=window.pinomadDesktop)==null?void 0:i.updates)!==void 0,[r]=x.useState(()=>t.direction==="client-older"&&s||!DP(e,window.location)||sessionStorage.getItem(Om)===String(t.hostMajor)?!1:(sessionStorage.setItem(Om,String(t.hostMajor)),window.location.reload(),!0));if(x.useEffect(()=>{var o,c;t.direction==="client-older"&&((c=(o=window.pinomadDesktop)==null?void 0:o.updates)==null||c.check())},[t.direction]),r)return null;const a=t.hostVersion===void 0?"":` Host version: ${t.hostVersion}.`;return t.direction==="client-older"?l.jsxs(ve,{gap:4,children:[l.jsx(yn,{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."}${a}`}),s?l.jsx(MQ,{update:n}):null]}):l.jsx(yn,{status:"error",container:"section",title:"Host out of date",description:`This client speaks a newer protocol. Upgrade the host (pinomad upgrade).${a}`})}function MQ({update:e}){if(e===void 0)return l.jsx(se,{type:"supporting",children:"Checking for updates…"});const{status:t}=e;switch(t.state){case"checking":return l.jsx(se,{type:"supporting",children:"Checking for updates…"});case"available":case"downloading":{const n=t.progressPercent===void 0?"":` ${Math.round(t.progressPercent)}%`;return l.jsx(se,{type:"supporting",children:`Downloading PiNomad ${t.availableVersion??""}…${n}`})}case"ready":return l.jsx(de,{label:"Restart to update",variant:"primary",onClick:()=>e.install()});case"error":return l.jsxs($e,{gap:2,vAlign:"center",children:[l.jsx(se,{type:"supporting",children:t.message}),l.jsx(de,{label:"Retry",variant:"secondary",onClick:()=>e.check()})]});case"disabled":return l.jsx(se,{type:"supporting",children:t.reason??"Updates are unavailable in this build."});default:return l.jsx(se,{type:"supporting",children:`PiNomad ${t.currentVersion} is up to date; no newer release found.`})}}function AQ({remote:e,wsUrl:t,rejected:n,device:s,notice:r}){var _,L,D,O;const a=SQ(e),[i,o]=x.useState(!0),[c,u]=x.useState({kind:"chat"});x.useEffect(()=>o(a.conversation===void 0),[(_=a.conversation)==null?void 0:_.conversation.id]),$B(a,q=>{var F;q===((F=a.conversation)==null?void 0:F.conversation.id)?o(!1):e.controller.switchConversation(q)});const f=i?void 0:a.conversation,h=f!==void 0&&ik(f),p=Ni("(max-width: 1023px)"),[m,b]=x.useState(!1),[y,g]=x.useState("live"),k=x.useCallback((q,F)=>{g(F),b(!0),e.controller.showSide(q)},[e]),v=x.useCallback(q=>{e.controller.switchConversation(q),e.controller.showSide(void 0),p&&b(!1)},[e,p]),w=f===void 0||(L=I7(a.organized,f.conversation.id))==null?void 0:L.summary.id;x.useEffect(()=>{e.controller.showSide(void 0)},[w]);const j=c.kind==="chat"?"New chat":`New conversation in ${DQ(a.organized,c.path)}`,C=f===void 0||(D=Sr(a.organized,f.conversation.id))==null?void 0:D.summary,$=C==null?void 0:C.parent,E=$===void 0||(O=Sr(a.organized,$))==null?void 0:O.summary,T=(C==null?void 0:C.kind)==="conversation",S=x.useCallback(q=>C===void 0?[]:D7(a.organized,C.id,q),[a.organized,C]),M=x.useCallback(q=>{var F;return(F=Sr(a.organized,q))==null?void 0:F.summary},[a.organized]),z=q=>{u(q),o(!0)},[A,R]=x.useState(),[I,N]=x.useState(!1);return x.useEffect(()=>{a.connection==="connected"&&sessionStorage.removeItem(Om)},[a.connection]),a.unauthorized===!0&&n!==void 0?l.jsxs(vl,{children:[n,l.jsx(RS,{})]}):l.jsxs(l.Fragment,{children:[l.jsx(UY,{view:a,remote:e,device:s,narrow:p,drafting:i,draftingChat:i&&c.kind==="chat",draftLabel:j,conversation:f,summary:C,parentSummary:E,banner:l.jsxs(l.Fragment,{children:[r,l.jsx(_Q,{view:a,wsUrl:t})]}),onDraft:z,onOpenChanges:()=>N(!0),panelOpen:m,panelTab:y,onPanelOpen:b,onPanelTab:g,openInPanel:k,openInMain:v,children:f===void 0?l.jsx(aQ,{view:a,remote:e,draft:c,onDraft:z,connected:a.connection==="connected"}):l.jsx(j4,{style:$Q,composer:l.jsx("div",{className:"mx-auto w-full max-w-[44rem]",children:l.jsxs(ve,{gap:1,children:[l.jsx(B9,{docs:a.docs,remote:e,connected:a.connection==="connected"}),l.jsx(cQ,{view:a,remote:e,conversation:f,busy:h,narrow:p})]})}),emptyState:l.jsx(ya,{title:"Nothing here yet",description:"Ask the agent something. Every client sees it."}),children:l.jsx(yC,{conversation:f,toolPresentations:a.toolPresentations,connected:a.connection==="connected",canFork:T,openInPanel:k,onFork:R,forksAt:S,summaryOf:M,onRetry:(C==null?void 0:C.kind)==="subagent"?void 0:async({text:q,images:F,requestId:X})=>{kl(),await e.controller.submit(q,"followUp",{requestId:X,images:F})}})},f.conversation.id)}),A===void 0?null:l.jsx(RQ,{entryId:A,remote:e,connected:a.connection==="connected",onClose:()=>R(void 0),onForked:()=>{g("threads"),b(!0)}}),I&&f!==void 0&&l.jsx(IQ,{view:a,remote:e,busy:h,onClose:()=>N(!1)})]})}function RQ({entryId:e,remote:t,connected:n,onClose:s,onForked:r}){const[a,i]=x.useState("Continue from here."),o=()=>{kl(),t.controller.fork(e,a.trim(),void 0,{show:"side"}),r(),s()};return l.jsx(Ls,{isOpen:!0,onOpenChange:c=>c?void 0:s(),purpose:"form",width:480,children:l.jsx(gs,{header:l.jsx(Os,{title:"Fork from this answer",subtitle:"The fork sees the conversation up to here and works in the same files.",onOpenChange:()=>s()}),content:l.jsx(ms,{children:l.jsx(Cr,{label:"First message",value:a,onChange:i})}),footer:l.jsx(Li,{children:l.jsxs($e,{gap:2,hAlign:"end",children:[l.jsx(de,{label:"Cancel",variant:"secondary",onClick:s}),l.jsx(de,{label:"Fork",variant:"primary",isDisabled:!n||a.trim()==="",onClick:o})]})})})})}function IQ({view:e,remote:t,busy:n,onClose:s}){const[r,a]=x.useState(),i=x.useMemo(()=>()=>void t.controller.changes().then(a).catch(()=>{}),[t]);x.useEffect(i,[i]);const o=x.useRef(n);x.useEffect(()=>{o.current&&!n&&i(),o.current=n},[n,i]);const c=e.checkout===void 0;return l.jsx(Ls,{isOpen:!0,onOpenChange:u=>u?void 0:s(),width:720,children:l.jsx(gs,{header:l.jsx(Os,{title:"Changes",onOpenChange:()=>s()}),content:l.jsx(ms,{children:l.jsx(ve,{gap:2,padding:3,children:r===void 0?l.jsx(se,{type:"supporting",children:"Loading…"}):r.available?l.jsxs(l.Fragment,{children:[c?l.jsx(se,{type:"supporting",children:"These are the project directory's uncommitted changes, shared with other conversations working there."}):null,r.truncated?l.jsx(se,{type:"supporting",children:"The diff is truncated; the rest is not shown."}):null,l.jsx(mC,{patch:r.patch})]}):l.jsx(se,{type:"supporting",children:r.reason})})}),footer:l.jsx(Li,{children:l.jsxs($e,{gap:2,hAlign:"end",children:[l.jsx(de,{label:"Refresh",variant:"secondary",isDisabled:e.connection!=="connected",onClick:i}),l.jsx(de,{label:"Close",variant:"primary",onClick:s})]})})})})}function _Q({view:e,wsUrl:t}){return e.connection==="outdated"?e.protocolMismatch===void 0?null:l.jsx(FC,{wsUrl:t,mismatch:e.protocolMismatch}):e.connection==="reconnecting"?l.jsx(yn,{status:"warning",container:"section",title:"Host connection lost",description:"Reconnecting… the view keeps the last state the host sent."}):e.connection==="closed"?l.jsx(yn,{status:"error",container:"section",title:"Disconnected from the host"}):null}function DQ(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}r7.createRoot(document.getElementById("root")).render(l.jsx(x.StrictMode,{children:l.jsx(P3,{theme:gB,children:l.jsx(EQ,{})})}));