pinomad 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -180
- package/dist/{chunk-tpd3trvd.js → chunk-3qn8gbjb.js} +1 -1
- package/dist/{chunk-fpb6f9n5.js → chunk-3tf23vjq.js} +1 -1
- package/dist/{chunk-ne6a5q2j.js → chunk-4dj2vb8t.js} +1 -1
- package/dist/{chunk-y73t2jmc.js → chunk-bggesvnj.js} +253 -69
- package/dist/chunk-c155p0t0.js +154 -0
- package/dist/{chunk-9z7echn7.js → chunk-kxws8b83.js} +4 -4
- package/dist/{chunk-8h3wrn84.js → chunk-n60kkf1m.js} +4 -4
- package/dist/{chunk-hsdzb73r.js → chunk-syf0z68f.js} +10 -4
- package/dist/{chunk-zx77w1nm.js → chunk-t9y2wfk5.js} +2 -2
- package/dist/{chunk-mqbg2cbw.js → chunk-tfqc1djy.js} +1390 -749
- package/dist/pinomad.js +7 -7
- package/package.json +7 -7
- package/web/assets/index-CBXdQLua.js +383 -0
- package/web/assets/index-CG33GBxM.css +1 -0
- package/web/index.html +2 -2
- package/dist/chunk-wgn3cx5q.js +0 -56
- package/web/assets/index-B9yvK0AN.js +0 -383
- package/web/assets/index-t5dAiohJ.css +0 -1
|
@@ -1,383 +0,0 @@
|
|
|
1
|
-
var z8=Object.defineProperty;var sy=e=>{throw TypeError(e)};var R8=(e,t,n)=>t in e?z8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ee=(e,t,n)=>R8(e,typeof t!="symbol"?t+"":t,n),Uh=(e,t,n)=>t.has(e)||sy("Cannot "+n);var X=(e,t,n)=>(Uh(e,t,"read from private field"),n?n.call(e):t.get(e)),Ae=(e,t,n)=>t.has(e)?sy("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),je=(e,t,n,r)=>(Uh(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),Q=(e,t,n)=>(Uh(e,t,"access private method"),n);var au=(e,t,n,r)=>({set _(s){je(e,t,s,n)},get _(){return X(e,t,r)}});function _8(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const a=Object.getOwnPropertyDescriptor(r,s);a&&Object.defineProperty(e,s,a.get?a:{enumerable:!0,get:()=>r[s]})}}}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 s of document.querySelectorAll('link[rel="modulepreload"]'))r(s);new MutationObserver(s=>{for(const a of s)if(a.type==="childList")for(const i of a.addedNodes)i.tagName==="LINK"&&i.rel==="modulepreload"&&r(i)}).observe(document,{childList:!0,subtree:!0});function n(s){const a={};return s.integrity&&(a.integrity=s.integrity),s.referrerPolicy&&(a.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?a.credentials="include":s.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function r(s){if(s.ep)return;s.ep=!0;const a=n(s);fetch(s.href,a)}})();function O8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var j2={exports:{}},If={};/**
|
|
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 D8=Symbol.for("react.transitional.element"),I8=Symbol.for("react.fragment");function E2(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var s in t)s!=="key"&&(n[s]=t[s])}else n=t;return t=n.ref,{$$typeof:D8,type:e,key:r,ref:t!==void 0?t:null,props:n}}If.Fragment=I8;If.jsx=E2;If.jsxs=E2;j2.exports=If;var u=j2.exports,$2={exports:{}},fe={};/**
|
|
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 Cg=Symbol.for("react.transitional.element"),L8=Symbol.for("react.portal"),B8=Symbol.for("react.fragment"),H8=Symbol.for("react.strict_mode"),q8=Symbol.for("react.profiler"),U8=Symbol.for("react.consumer"),P8=Symbol.for("react.context"),F8=Symbol.for("react.forward_ref"),G8=Symbol.for("react.suspense"),V8=Symbol.for("react.memo"),C2=Symbol.for("react.lazy"),X8=Symbol.for("react.activity"),Z8=Symbol.for("react.view_transition"),ay=Symbol.iterator;function W8(e){return e===null||typeof e!="object"?null:(e=ay&&e[ay]||e["@@iterator"],typeof e=="function"?e:null)}var T2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},M2=Object.assign,N2={};function Do(e,t,n){this.props=e,this.context=t,this.refs=N2,this.updater=n||T2}Do.prototype.isReactComponent={};Do.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")};Do.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function A2(){}A2.prototype=Do.prototype;function Tg(e,t,n){this.props=e,this.context=t,this.refs=N2,this.updater=n||T2}var Mg=Tg.prototype=new A2;Mg.constructor=Tg;M2(Mg,Do.prototype);Mg.isPureReactComponent=!0;var iy=Array.isArray;function gp(){}var Ve={H:null,A:null,T:null,S:null},z2=Object.prototype.hasOwnProperty;function Ng(e,t,n){var r=n.ref;return{$$typeof:Cg,type:e,key:t,ref:r!==void 0?r:null,props:n}}function K8(e,t){return Ng(e.type,t,e.props)}function Ag(e){return typeof e=="object"&&e!==null&&e.$$typeof===Cg}function Y8(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var oy=/\/+/g;function Ph(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Y8(""+e.key):t.toString(36)}function Q8(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 Ai(e,t,n,r,s){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 Cg:case L8:i=!0;break;case C2:return i=e._init,Ai(i(e._payload),t,n,r,s)}}if(i)return s=s(e),i=r===""?"."+Ph(e,0):r,iy(s)?(n="",i!=null&&(n=i.replace(oy,"$&/")+"/"),Ai(s,t,n,"",function(c){return c})):s!=null&&(Ag(s)&&(s=K8(s,n+(s.key==null||e&&e.key===s.key?"":(""+s.key).replace(oy,"$&/")+"/")+i)),t.push(s)),1;i=0;var o=r===""?".":r+":";if(iy(e))for(var l=0;l<e.length;l++)r=e[l],a=o+Ph(r,l),i+=Ai(r,t,n,a,s);else if(l=W8(e),typeof l=="function")for(e=l.call(e),l=0;!(r=e.next()).done;)r=r.value,a=o+Ph(r,l++),i+=Ai(r,t,n,a,s);else if(a==="object"){if(typeof e.then=="function")return Ai(Q8(e),t,n,r,s);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 iu(e,t,n){if(e==null)return e;var r=[],s=0;return Ai(e,r,"","",function(a){return t.call(n,a,s++)}),r}function J8(e){if(e._status===-1){var t=e._result,n=t();n.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r,n.status===void 0&&(n.status="fulfilled",n.value=r))},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r,n.status===void 0&&(n.status="rejected",n.reason=r))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var ly=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 R2(e){var t=Ve.T,n={};n.types=t!==null?t.types:null,Ve.T=n;try{var r=e(),s=Ve.S;s!==null&&s(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(gp,ly)}catch(a){ly(a)}finally{t!==null&&n.types!==null&&(t.types=n.types),Ve.T=t}}function _2(e){var t=Ve.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R2(_2.bind(null,e))}var e7={map:iu,forEach:function(e,t,n){iu(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return iu(e,function(){t++}),t},toArray:function(e){return iu(e,function(t){return t})||[]},only:function(e){if(!Ag(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};fe.Activity=X8;fe.Children=e7;fe.Component=Do;fe.Fragment=B8;fe.Profiler=q8;fe.PureComponent=Tg;fe.StrictMode=H8;fe.Suspense=G8;fe.ViewTransition=Z8;fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ve;fe.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ve.H.useMemoCache(e)}};fe.addTransitionType=_2;fe.cache=function(e){return function(){return e.apply(null,arguments)}};fe.cacheSignal=function(){return null};fe.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=M2({},e.props),s=e.key;if(t!=null)for(a in t.key!==void 0&&(s=""+t.key),t)!z2.call(t,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var i=Array(a),o=0;o<a;o++)i[o]=arguments[o+2];r.children=i}return Ng(e.type,s,r)};fe.createContext=function(e){return e={$$typeof:P8,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:U8,_context:e},e};fe.createElement=function(e,t,n){var r,s={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=""+t.key),t)z2.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(s[r]=t[r]);var i=arguments.length-2;if(i===1)s.children=n;else if(1<i){for(var o=Array(i),l=0;l<i;l++)o[l]=arguments[l+2];s.children=o}if(e&&e.defaultProps)for(r in i=e.defaultProps,i)s[r]===void 0&&(s[r]=i[r]);return Ng(e,a,s)};fe.createRef=function(){return{current:null}};fe.forwardRef=function(e){return{$$typeof:F8,render:e}};fe.isValidElement=Ag;fe.lazy=function(e){return{$$typeof:C2,_payload:{_status:-1,_result:e},_init:J8}};fe.memo=function(e,t){return{$$typeof:V8,type:e,compare:t===void 0?null:t}};fe.startTransition=R2;fe.unstable_useCacheRefresh=function(){return Ve.H.useCacheRefresh()};fe.use=function(e){return Ve.H.use(e)};fe.useActionState=function(e,t,n){return Ve.H.useActionState(e,t,n)};fe.useCallback=function(e,t){return Ve.H.useCallback(e,t)};fe.useContext=function(e){return Ve.H.useContext(e)};fe.useDebugValue=function(){};fe.useDeferredValue=function(e,t){return Ve.H.useDeferredValue(e,t)};fe.useEffect=function(e,t){return Ve.H.useEffect(e,t)};fe.useEffectEvent=function(e){return Ve.H.useEffectEvent(e)};fe.useId=function(){return Ve.H.useId()};fe.useImperativeHandle=function(e,t,n){return Ve.H.useImperativeHandle(e,t,n)};fe.useInsertionEffect=function(e,t){return Ve.H.useInsertionEffect(e,t)};fe.useLayoutEffect=function(e,t){return Ve.H.useLayoutEffect(e,t)};fe.useMemo=function(e,t){return Ve.H.useMemo(e,t)};fe.useOptimistic=function(e,t){return Ve.H.useOptimistic(e,t)};fe.useReducer=function(e,t,n){return Ve.H.useReducer(e,t,n)};fe.useRef=function(e){return Ve.H.useRef(e)};fe.useState=function(e){return Ve.H.useState(e)};fe.useSyncExternalStore=function(e,t,n){return Ve.H.useSyncExternalStore(e,t,n)};fe.useTransition=function(){return Ve.H.useTransition()};fe.version="19.3.0";$2.exports=fe;var x=$2.exports;const Lf=O8(x),O2=_8({__proto__:null,default:Lf},[x]);var nl={},cy;function t7(){if(cy)return nl;cy=1,Object.defineProperty(nl,"__esModule",{value:!0}),nl.styleq=void 0;var e=new WeakMap,t="$$css";function n(s){var a,i,o;return s!=null&&(a=s.disableCache===!0,i=s.disableMix===!0,o=s.transform),function(){for(var c=[],d="",f=null,h="",p=a?null:e,m=new Array(arguments.length),k=0;k<arguments.length;k++)m[k]=arguments[k];for(;m.length>0;){var b=m.pop();if(!(b==null||b===!1)){if(Array.isArray(b)){for(var g=0;g<b.length;g++)m.push(b[g]);continue}var y=o!=null?o(b):b;if(y.$$css!=null){var v="";if(p!=null&&p.has(y)){var w=p.get(y);w!=null&&(v=w[0],h=w[2],c.push.apply(c,w[1]),p=w[3])}else{var S=[];for(var j in y){var C=y[j];if(j===t){var $=y[j];$!==!0&&(h=h?$+"; "+h:$);continue}typeof C=="string"||C===null?c.includes(j)||(c.push(j),p!=null&&S.push(j),typeof C=="string"&&(v+=v?" "+C:C)):console.error("styleq: ".concat(j," typeof ").concat(String(C),' is not "string" or "null".'))}if(p!=null){var A=new WeakMap;p.set(y,[v,S,h,A]),p=A}}v&&(d=d?v+" "+d:v)}else if(i)f==null&&(f={}),f=Object.assign({},y,f);else{var E=null;for(var z in y){var N=y[z];N!==void 0&&(c.includes(z)||(N!=null&&(f==null&&(f={}),E==null&&(E={}),E[z]=N),c.push(z),p=null))}E!=null&&(f=Object.assign(E,f))}}}var T=[d,f,h];return T}}var r=nl.styleq=n();return r.factory=n,nl}var n7=t7();function B(...e){const[t,n,r]=n7.styleq(e),s={};return t!=null&&t!==""&&(s.className=t),n!=null&&Object.keys(n).length>0&&(s.style=n),r!=null&&r!==""&&(s["data-style-src"]=r),s}const r7={"--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)"},s7={"--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"},lr={"--spacing-1":"var(--spacing-1)","--spacing-2":"var(--spacing-2)"},a7={"--size-element-sm":"28px","--size-element-md":"32px","--size-element-lg":"36px"},i7={"--radius-none":"0px","--radius-inner":"4px","--radius-element":"8px","--radius-container":"12px","--radius-page":"28px","--radius-chat":"28px","--radius-full":"9999px"},o7={"--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)"},l7={"--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"},c7={"--ease-standard":"cubic-bezier(0.24, 1, 0.4, 1)"},u7={"--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'},d7={"--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"},f7={"--font-weight-normal":"400","--font-weight-medium":"500","--font-weight-semibold":"600","--font-weight-bold":"700"},h7={"--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"},zg=x.createContext(null);zg.displayName="LayoutAreaContext";const x7={hasHeader:!1,hasFooter:!1,hasStart:!1,hasEnd:!1},Bf=x.createContext(x7);Bf.displayName="LayoutSlotsContext";const Hf=x.createContext(null);Hf.displayName="LayoutDividerContext";const p7={center:{kGNEyG:"x6s0dn4",$$css:!0},end:{kGNEyG:"xuk3077",$$css:!0},start:{kGNEyG:"x1cy8zhl",$$css:!0},stretch:{kGNEyG:"x1qjc9v5",$$css:!0}},g7={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}},m7={horizontal:{kXwgrk:"x1q0g3np",$$css:!0},vertical:{kXwgrk:"xdt5ytf",$$css:!0}},y7={nowrap:{kwnvtZ:"xozqiw3",$$css:!0},wrap:{kwnvtZ:"x1a02dak",$$css:!0},"wrap-reverse":{kwnvtZ:"x8hhl5t",$$css:!0}},b7={stack:{k1xSpc:"x78zum5",$$css:!0}},k7={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:r,wrap:s}){return[b7.stack,m7[t],n!=null&&k7[n],e!=null&&p7[e],r!=null&&g7[r],s!=null&&y7[s]]}const v7={reset:{kAzted:"x2lwn1j",k7Eaqz:"xeuugli",$$css:!0}},w7={center:{kSGwAc:"xamitd3",$$css:!0},end:{kSGwAc:"xpvyfi4",$$css:!0},start:{kSGwAc:"xqcrz7y",$$css:!0},stretch:{kSGwAc:"xkh2ocl",$$css:!0}},S7={fill:{kzQI83:"x1iyjqo2",$$css:!0},static:{kzQI83:"x1c4vz4f",kmuXW:"x2lah0s",$$css:!0}};function j7({crossAlignSelf:e,size:t}={}){return[v7.reset,S7[t??"static"],e!=null&&w7[e]]}function Rg(e){return e==="base"?"":e.split("+").map(t=>{const[n,r]=t.split(":");return r===void 0?`.${n}`:/^\d/.test(r)?`.${n}-${r}`:`.${r}`}).join("")}function E7(e,t){return e!=null?`id:${e}`:`fallback:${typeof t=="function"?t():t}`}function ou(e,t){const n={...e,...t},r=[e.className,t.className].filter(Boolean).join(" ");r?n.className=r:delete n.className;const s=t.style&&e.style?{...e.style,...t.style}:t.style||e.style;return s?n.style=s:delete n.style,n}function P(e,t,n,r){if(typeof e=="string"){const o=e,l=t??{className:""},c=n;let d=l.className?`${o} ${l.className}`:o;c&&(d=`${d} ${c}`);const f=r&&l.style?{...l.style,...r}:r||l.style;return{...l,className:d,style:f}}let i=ou(e,typeof t=="string"?{className:t}:t??{});return typeof n=="string"?i=ou(i,{className:n}):n!=null&&(i=ou(i,{style:n})),r!=null&&(i=ou(i,{style:r})),i}function Wt(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r!=null&&(r.current=t);if(n.length>0)return()=>{for(const r of n)r()}}}function D2(...e){return t=>{for(const n of e)if(n==null||n(t),t.defaultPrevented)return}}const _g="astryx",I2=_g,qf=_g,$7=_g;function C7(e){return`${I2}-${e}`}function gn(e){return`data-${qf}-${e}`}function T7(e){return`--${$7}-${e}`}function M7(e){return`data-${e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`}function N7(e,t){return/^\d/.test(t)?`${e}-${t}`:t}function A7(e,t){const n=[C7(e)];if(t)for(const[r,s]of Object.entries(t))s!=null&&n.push(N7(r,String(s)));return n.join(" ")}function z7(e){const t={};if(e)for(const[n,r]of Object.entries(e))r!=null&&(t[M7(n)]=String(r));return t}function U(e,t){return{className:A7(e,t),...z7(t)}}function uy(e){const t=e.auxiliaryData;return typeof(t==null?void 0:t.group)=="string"?t.group:void 0}function R7(e){var i;if(!e.some(o=>uy(o)!=null))return[{heading:null,items:e}];const n=[],r=new Map,s=[];for(const o of e){const l=uy(o);l!=null?(r.has(l)||(n.push(l),r.set(l,[])),(i=r.get(l))==null||i.push(o)):s.push(o)}const a=n.map(o=>({heading:o,items:r.get(o)??[]}));return s.length>0&&a.push({heading:null,items:s}),a}let Ca=null;const Nd=new Map;function _7(){return Ca||(Ca=new ResizeObserver(e=>{for(const t of e){const n=Nd.get(t.target);n&&n(t)}})),Ca}function Og(e,t){Nd.set(e,t),_7().observe(e),t({target:e})}function Dg(e){Nd.delete(e),Ca&&(Ca.unobserve(e),Nd.size===0&&(Ca.disconnect(),Ca=null))}function Fh(e){return e!=null&&typeof e!="boolean"&&e!==""}function dy(...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 L2(e,t=[],n){return{ariaLabelledBy:n?dy(n.labelID,e):void 0,ariaDescribedBy:dy(n==null?void 0:n.describedByIDs,...t)}}const O7={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}},Ad=(e,t,n)=>Math.max(t,Math.min(n,e));function D7(e){return e.split("").map(t=>t+t).join("")}function I7(e){if(typeof e!="string")return null;const t=e.trim().replace(/^#/,""),n=t.length===3||t.length===4?D7(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 L7(e){const t=e.indexOf("(");if(t===-1||!e.trim().endsWith(")"))return null;const r=e.slice(t+1,e.lastIndexOf(")")).replace(/\//g," ").split(/[\s,]+/).map(c=>c.trim()).filter(Boolean);if(r.length<3)return null;const s=c=>{const d=c.endsWith("%")?parseFloat(c)/100*255:parseFloat(c);return Ad(d,0,255)},a=s(r[0]),i=s(r[1]),o=s(r[2]);if([a,i,o].some(Number.isNaN))return null;let l=1;if(r.length>=4){const c=r[3];if(l=c.endsWith("%")?parseFloat(c)/100:parseFloat(c),Number.isNaN(l))return null;l=Ad(l,0,1)}return{r:a,g:i,b:o,a:l}}function fy(e){const t=e.trim(),n=O7[t.toLowerCase()];return n?{...n}:t.startsWith("#")?I7(t):/^rgba?\(/i.test(t)?L7(t):null}function B7(e,t,n){const r=s=>Ad(Math.round(s),0,255).toString(16).padStart(2,"0").toUpperCase();return`#${r(e)}${r(t)}${r(n)}`}function H7({r:e,g:t,b:n,a:r}){if(r>=1)return B7(e,t,n);const s=a=>Ad(Math.round(a),0,255);return`rgba(${s(e)}, ${s(t)}, ${s(n)}, ${parseFloat(r.toFixed(4))})`}function q7(e,t){return`${e}: ${t}`}function Ba(e,t,...n){}function B2(e,t,...n){console.error(q7(e,t),...n)}function Ig(e,t,n,...r){}const U7={kbCHJM:"x1nrll8i",k3aq6I:"xsqj5wx",$$css:!0},zd={mirror:{k3aq6I:"xgtlewx",$$css:!0},centerInline:e=>[U7,{"--x-transform":`translate(-50%, ${e})`!=null?`translate(-50%, ${e})`:void 0}]},P7={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"},_c={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}},Oc={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}},Dc={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}},Ic={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}},F7={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}},G7={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}},V7={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}},X7={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}},gs={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}},Z7={kzqmXN:"xh8yej3",kUOVxO:"xvueqy4",$$css:!0},hy={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=>[Z7,{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 rl({area:e,children:t}){return t==null?null:u.jsx(zg,{value:e,children:t})}const W7={"x-default-marker":"x-default-marker",$$css:!0};function sa({children:e,content:t,contentWidth:n,defaultHasDividers:r,end:s,footer:a,header:i,height:o="fill",padding:l,ref:c,start:d,xstyle:f,className:h,style:p}){const m=o==="fill",k=t??e,b=x.useMemo(()=>r!=null?{defaultHasDividers:r}:null,[r]),g=i!=null,y=a!=null,v=d!=null,w=s!=null,S=x.useMemo(()=>({hasHeader:g,hasFooter:y,hasStart:v,hasEnd:w}),[g,y,v,w]),j=u.jsx(Bf,{value:S,children:u.jsx("div",{ref:c,...P(U("layout",{height:o}),B(gs.layoutOuter,m?gs.fill:gs.auto,f),h,p),children:u.jsxs("div",{...B(W7,gs.layoutInner,...mp({direction:"vertical"}),m?gs.fill:gs.auto,l===0&&gs.fullBleed,l!=null&&F7[l],l!=null&&G7[l],n!=null&&hy.contentWidthVar(n)),children:[u.jsx(rl,{area:"header",children:i}),u.jsxs("div",{...B(...mp({direction:"horizontal"}),gs.middle,n!=null&&hy.contentWidth(n)),children:[u.jsx(rl,{area:"start",children:d}),u.jsx("div",{...B(...j7({size:"fill"})),children:u.jsx(rl,{area:"content",children:k})}),u.jsx(rl,{area:"end",children:s})]}),u.jsx(rl,{area:"footer",children:a})]})})});return b!=null?u.jsx(Hf,{value:b,children:j}):j}sa.displayName="Layout";const lu={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}},K7={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Rd({children:e,hasDivider:t,height:n,label:r,padding:s,role:a,xstyle:i,className:o,style:l,ref:c,...d}){const f=x.use(Hf),h=t??(f==null?void 0:f.defaultHasDividers)??!1,p=s===0;return u.jsx("div",{ref:c,role:a,"aria-label":r,"data-divider":h||void 0,...P(U("layout-header"),B(lu.header,K7.sizing(n??null),h&&lu.divider,i),o,l),...d,children:u.jsx("div",{...B(lu.inner,p&&lu.fullBleed,s!=null&&_c[s],s!=null&&Oc[s],s!=null&&Dc[s],s!=null&&Ic[s]),children:e})})}Rd.displayName="LayoutHeader";const sr={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}},Y7={sizing:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function H2({children:e,hasDivider:t=!1,isScrollable:n=!0,label:r,padding:s,role:a,width:i,resizable:o,xstyle:l,className:c,style:d,ref:f,...h}){const p=x.use(zg),{hasHeader:m,hasFooter:k}=x.use(Bf),b=o?o._size:i,g=p==="start",y=p==="end",v=s===0,w=!t&&!v&&s==null,S=g?sr.dividerEnd:y?sr.dividerStart:null,j=g?sr.collapseEnd:y?sr.collapseStart:null;return u.jsx("div",{ref:f,role:a,"aria-label":r,...P(U("layout-panel"),B(sr.panel,Y7.sizing(b??null),g&&!v&&s==null&&sr.startPanel,y&&!v&&s==null&&sr.endPanel,!m&&!v&&s==null&&sr.noHeader,!k&&!v&&s==null&&sr.noFooter,n&&sr.scrollable,v&&sr.fullBleed,s!=null&&_c[s],s!=null&&Oc[s],s!=null&&Dc[s],s!=null&&Ic[s],t&&S,w&&j,l),c,d),...h,children:e})}H2.displayName="LayoutPanel";const da={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 aa({children:e,isScrollable:t=!0,padding:n,label:r,role:s,xstyle:a,className:i,style:o,ref:l,...c}){const{hasHeader:d,hasFooter:f,hasStart:h,hasEnd:p}=x.use(Bf),m=n===0;return u.jsx("div",{ref:l,role:s,"aria-label":r,...P(U("layout-content"),B(da.content,!h&&!m&&n==null&&da.noStart,!p&&!m&&n==null&&da.noEnd,!d&&!m&&n==null&&da.noHeader,!f&&!m&&n==null&&da.noFooter,t&&da.scrollable,m&&da.fullBleed,n!=null&&_c[n],n!=null&&Oc[n],n!=null&&Dc[n],n!=null&&Ic[n],a),i,o),...c,children:e})}aa.displayName="LayoutContent";function q2(e){return(e.style.anchorName??"").split(",").map(n=>n.trim()).filter(Boolean)}function U2(e,t){e.style.anchorName=t.join(", ")}function Q7(e,t){const n=q2(e);n.includes(t)||(n.push(t),U2(e,n))}function J7(e,t){U2(e,q2(e).filter(n=>n!==t))}const Gh={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 e$(e="above",t="center"){if(e==="above"||e==="below"){const r=e==="above"?"self-block-start":"self-block-end";return t==="start"?`${r} span-self-inline-end`:t==="end"?`${r} span-self-inline-start`:r}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 t$(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[r,s]=e==="start"?["left","right"]:["right","left"];return`${n}, ${r} span-top, ${r} span-bottom, ${s} span-top, ${s} span-bottom`}function Lc(e){const{mode:t,onShow:n,onHide:r,lightDismiss:s=!1}=e,a=x.useId(),i=`--astryx-layer-${a.replace(/:/g,"")}`,[o,l]=x.useState(!1),c=x.useRef(null),d=x.useRef(null),f=x.useRef(!1),h=x.useCallback(()=>{const j=c.current;j&&!f.current&&(typeof j.showPopover=="function"?j.showPopover():j.style.display="block",f.current=!0,l(!0),n==null||n())},[n]),p=x.useCallback(()=>{if(f.current){const j=c.current;j&&(typeof j.hidePopover=="function"?j.hidePopover():j.style.display="none"),f.current=!1,l(!1),r==null||r()}},[r]),m=t==="context"?j=>{d.current&&d.current!==j&&J7(d.current,i),j&&Q7(j,i),d.current=j}:void 0,k=x.useCallback(j=>{j.newState==="closed"&&f.current&&(f.current=!1,l(!1),r==null||r())},[r]),b=x.useRef(null),g=x.useRef(null),y=x.useCallback((j,C)=>{b.current&&g.current&&(b.current!==j||g.current!==C)&&(b.current.removeEventListener("toggle",g.current),b.current=null,g.current=null),j&&b.current!==j&&(j.addEventListener("toggle",C),b.current=j,g.current=C)},[]),v=x.useCallback(j=>{c.current=j,y(j,k)},[k,y]);x.useEffect(()=>(c.current&&y(c.current,k),()=>{b.current&&g.current&&(b.current.removeEventListener("toggle",g.current),b.current=null,g.current=null)}),[k,y]);const w=x.useCallback((j,C)=>{const{placement:$="above",alignment:A="center",positioning:E="anchor",role:z,"aria-label":N,xstyle:T,className:R,style:_,as:M="div",onMouseEnter:D,onMouseLeave:I}=C||{},O=E==="custom"?{positionAnchor:i}:{positionAnchor:i,positionArea:e$($,A),positionTryFallbacks:t$($,A)},L=B(Gh.base,T),H=R?`${R} ${L.className??""}`:L.className;return u.jsx(M,{ref:v,id:a,role:z,"aria-label":N,popover:s?"auto":"manual",className:H,style:{...L.style,...O,..._},onMouseEnter:D,onMouseLeave:I,children:j})},[i,a,s,v]),S=x.useCallback((j,C)=>{const{x:$,y:A,xstyle:E,className:z,style:N}=C,T={top:A,left:$},R=B(Gh.base,Gh.fixed,E),_=z?`${z} ${R.className??""}`:R.className;return u.jsx("div",{ref:v,id:a,popover:s?"auto":"manual",className:_,style:{...R.style,...T,...N},children:j})},[v,a,s]);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:S}}const Qr={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}},n$=100,Vh={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 r$(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function rs(e={}){const{placement:t="above",alignment:n="center",delay:r=200,hideDelay:s=0,focusTrigger:a="auto",isEnabled:i=!0,isOpen:o,isDefaultOpen:l=!1,onShow:c,onHide:d}=e,f=t==="above"||t==="below"?Vh.marginBlock:Vh.marginInline,h=Lc({mode:"context",onShow:c,onHide:d}),p=x.useMemo(()=>[Vh.container,f],[f]),m=x.useRef(null),k=x.useRef(null),b=x.useRef(null),g=x.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null),k.current&&(clearTimeout(k.current),k.current=null)},[]),y=x.useCallback(()=>{!i||o===!1||(g(),m.current=setTimeout(()=>{h.show()},r))},[i,o,g,h,r]),v=x.useCallback(()=>{if(o===!0)return;g();const T=s>0?s:n$;k.current=setTimeout(()=>{h.hide()},T)},[o,g,h,s]),w=x.useCallback(()=>{k.current&&(clearTimeout(k.current),k.current=null)},[]),S=x.useCallback(()=>{typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(hover: none)").matches||y()},[y]),j=x.useCallback(()=>{v()},[v]),C=x.useCallback(T=>{!i||!T.target.matches(":focus-visible")||(g(),h.show())},[i,g,h]),$=x.useCallback(()=>{v()},[v]),A=x.useCallback(()=>{o===void 0&&(g(),h.hide())},[o,g,h]),E=x.useCallback(T=>{b.current&&(b.current.removeEventListener("mouseenter",S),b.current.removeEventListener("mouseleave",j),b.current.removeEventListener("focusin",C),b.current.removeEventListener("focusout",$),b.current.removeEventListener("pointerdown",A)),T&&(T.addEventListener("mouseenter",S),T.addEventListener("mouseleave",j),T.addEventListener("pointerdown",A),(a==="always"||a==="auto"&&r$(T))&&(T.addEventListener("focusin",C),T.addEventListener("focusout",$))),b.current=T},[a,S,j,C,$,A]),z=x.useCallback(T=>{h.ref(T),E(T)},[h,E]);x.useEffect(()=>()=>{g()},[g]),x.useEffect(()=>{l&&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 T=R=>{R.key==="Escape"&&(R.isComposing||R.keyCode===229||(g(),h.hide()))};return document.addEventListener("keydown",T),()=>{document.removeEventListener("keydown",T)}},[o,h,g]);const N=x.useCallback((T,R)=>{const _=(R==null?void 0:R.placement)??t,M={placement:_,alignment:(R==null?void 0:R.alignment)??n,role:"tooltip",xstyle:[p,Qr[_]],className:U("tooltip").className,onMouseEnter:w,onMouseLeave:v};return h.render(u.jsx("div",{className:"xfsso4q xy143xn x12gdq22 x1djylfy xw5ewwj x13faqbe",children:T}),M)},[h,t,n,p,w,v]);return{ref:z,positionRef:h.ref,interactionRef:E,anchorId:h.anchorId,describedBy:h.id,renderTooltip:N}}const Lg={"--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)"},s$={"--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)"},a$={...Lg,...s$},P2=new Map;function i$(e){P2.set(e.name,e)}function F2(e){return e==null||e===""?null:P2.get(e)??null}const o$={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 xy(e,t){const n=o$[e];return n?n.filter(r=>r.property===t):[]}function G2(e){return`[data-${qf}-theme="${e}"]`}const V2=`[data-${qf}-theme]`;function py(e){return`[data-${qf}-media="${e}"]`}function Ki(e,t){return`.${I2}-${e}${t}`}function X2(e,t){const n=[];let r=0,s=0;for(let a=0;a<e.length;a++){const i=e[a];i==="("?r++:i===")"?r=Math.max(0,r-1):i===","&&r===0&&(n.push(e.slice(s,a).trim()),s=a+1)}return n.push(e.slice(s).trim()),n.map(a=>`${a}${t}`).join(", ")}function _d(e){return e.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`)}const cu=new Set(["padding","paddingBlock","paddingInline","paddingBlockStart","paddingBlockEnd","paddingInlineStart","paddingInlineEnd"]);function l$(e){const t={};for(const[n,r]of e)switch(n){case"padding":{const s=r.trim().split(/\s+/);s.length===1?(t.blockStart=s[0],t.blockEnd=s[0],t.inline=s[0]):s.length===2?(t.blockStart=s[0],t.blockEnd=s[0],t.inline=s[1]):s.length>=3&&(t.blockStart=s[0],t.inline=s[1],t.blockEnd=s[2]);break}case"paddingBlock":{const s=r.trim().split(/\s+/);t.blockStart=s[0],t.blockEnd=s[1]??s[0];break}case"paddingInline":{const s=r.trim().split(/\s+/);s.length===1?t.inline=s[0]:(t.inlineStart=s[0],t.inlineEnd=s[1]);break}case"paddingBlockStart":t.blockStart=r;break;case"paddingBlockEnd":t.blockEnd=r;break;case"paddingInlineStart":t.inlineStart=r;break;case"paddingInlineEnd":t.inlineEnd=r;break}return t}function c$(e,t){const n=T7(`${e}-padding`),r=[],s=t.inlineStart??t.inline,a=t.inlineEnd??t.inline;return s!=null&&a!=null&&s===a&&t.blockStart!=null&&t.blockEnd!=null&&s===t.blockStart&&t.blockStart===t.blockEnd?(r.push([n,s??""]),r):(t.inlineStart!=null||t.inlineEnd!=null?(s!=null&&r.push([`${n}-inline-start`,s]),a!=null&&r.push([`${n}-inline-end`,a])):t.inline!=null&&r.push([`${n}-inline`,t.inline]),t.blockStart!=null&&r.push([`${n}-block-start`,t.blockStart]),t.blockEnd!=null&&r.push([`${n}-block-end`,t.blockEnd]),r)}function u$(e){const t=[],n=e.tokens,r=a=>n[a]||`var(${a})`,s=Object.entries(n);if(s.length>0){const a=s.map(([i,o])=>` ${i}: ${o};`).join(`
|
|
18
|
-
`);t.push(` :scope {
|
|
19
|
-
${a}
|
|
20
|
-
}`)}return e.components&&d$(e.components,t),f$(r,t),h$(e.components||{},t),p$(e.components||{},t),t}function d$(e,t){for(const[n,r]of Object.entries(e))for(const[s,a]of Object.entries(r)){const i=Object.entries(a);if(i.length===0)continue;const o=Rg(s),l=Ki(n,o),c=[],d=[];for(const[m,k]of i)m.startsWith(":")&&typeof k=="object"?d.push([m,k]):c.push([m,k]);let f=c;const h=[];let p=!1;for(const[m,k]of c){const b=xy(n,m),g=cu.has(m)&&m!=="padding"?xy(n,"padding"):[];for(const y of[...b,...g])if(y.expand==="container"&&cu.has(m)&&(p=!0),y.vars)for(const v of y.vars)h.push([v,k])}if(p){const m=c.filter(([y])=>cu.has(y)),k=c.filter(([y])=>!cu.has(y)),b=l$(m),g=c$(n,b);f=[...k,...g]}if(h.length>0&&(f=[...f,...h]),f.length>0){const m=f.map(([k,b])=>` ${_d(k)}: ${b};`).join(`
|
|
21
|
-
`);t.push(` ${l} {
|
|
22
|
-
${m}
|
|
23
|
-
}`)}for(const[m,k]of d){const b=Object.entries(k);if(b.length>0){const g=b.map(([y,v])=>` ${_d(y)}: ${v};`).join(`
|
|
24
|
-
`);t.push(` ${X2(l,m)} {
|
|
25
|
-
${g}
|
|
26
|
-
}`)}}}}function f$(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 h$(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)"},r="text"in e,s="heading"in e,a="link"in e;if(r||s||a)for(const[i,o]of Object.entries(n))r&&t.push(` ${Ki("text",`.${i}`)} { color: ${o}; }`),s&&t.push(` ${Ki("heading",`.${i}`)} { color: ${o}; }`),a&&t.push(` ${Ki("link",`.${i}`)} { color: ${o}; }`)}const x$={"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 p$(e,t){if("text"in e)for(const[n,r]of Object.entries(x$)){const s=Rg(`size:${n}`);t.push(` ${Ki("text",s)} { font-size: ${r}; }`)}}function g$(e){const t=u$(e),n=[],r=[];for(const s of t)s.trimStart().startsWith(":where(")?n.push(s):r.push(s);return{component:r,prose:n}}function m$(e){const t=[],n=G2(e.name);for(const s of["dark","light"]){const a=s==="dark"?e.__onDark:e.__onLight;if(!a)continue;const i=Object.entries(a.tokens);if(i.length>0){const o=i.map(([l,c])=>` ${l}: ${c};`).join(`
|
|
52
|
-
`);t.push(` ${py(s)} {
|
|
53
|
-
${o}
|
|
54
|
-
}`)}if(a.components)for(const[o,l]of Object.entries(a.components))for(const[c,d]of Object.entries(l)){const f=Object.entries(d);if(f.length===0)continue;const h=Rg(c),p=`:is(${py(s)}) :is(${Ki(o,h)})`,m=[],k=[];for(const[b,g]of f)b.startsWith(":")&&typeof g=="object"?k.push([b,g]):m.push([b,g]);if(m.length>0){const b=m.map(([g,y])=>` ${_d(g)}: ${y};`).join(`
|
|
55
|
-
`);t.push(` ${p} {
|
|
56
|
-
${b}
|
|
57
|
-
}`)}for(const[b,g]of k){const y=Object.entries(g);if(y.length>0){const v=y.map(([w,S])=>` ${_d(w)}: ${S};`).join(`
|
|
58
|
-
`);t.push(` ${X2(p,b)} {
|
|
59
|
-
${v}
|
|
60
|
-
}`)}}}}if(t.length===0)return"";const r=t.join(`
|
|
61
|
-
|
|
62
|
-
`);return`@scope (${n}) to (${V2}) {
|
|
63
|
-
${r}
|
|
64
|
-
}`}function y$(e){const{component:t,prose:n}=g$(e),r=G2(e.name),s=V2;let a="";if(n.length>0){const l=n.join(`
|
|
65
|
-
|
|
66
|
-
`);a=`@scope (${r}) to (${s}) {
|
|
67
|
-
${l}
|
|
68
|
-
}`}let i="";if(t.length>0){const l=t.join(`
|
|
69
|
-
|
|
70
|
-
`);i=`@scope (${r}) to (${s}) {
|
|
71
|
-
${l}
|
|
72
|
-
}`}const o=m$(e);return o&&(i=i?`${i}
|
|
73
|
-
|
|
74
|
-
${o}`:o),{prose:a,component:i}}const Z2={...r7,...s7,...a7,...i7,...o7,...l7,...c7,...u7,...d7,...f7,...h7,...a$};function b$(e){return`var(${e})`}Object.fromEntries(Object.keys(Z2).map(e=>[e,b$(e)]));function Bg(e){let t=0,n=null,r=!1;for(let s=0;s<e.length;s++){const a=e[s];if(n!==null){r?r=!1:a==="\\"?r=!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,s).trim(),e.slice(s+1).trim()]}return null}function k$(e){const t=e.trim(),n="light-dark(";if(!t.startsWith(n)||!t.endsWith(")"))return null;const r=t.slice(n.length,-1);return Bg(r)}function Xh(e,t){if(Array.isArray(e))return t==="dark"?e[1]:e[0];const n=k$(e);return n!==null?t==="dark"?n[1]:n[0]:e}function W2(e,t){let n=0;for(let r=t;r<e.length;r++){const s=e[r];if(s==="(")n++;else if(s===")"&&(n--,n===0))return r}return-1}function gy(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 v$(e){const t=e.match(/^in\s+([\w-]+)\s*,\s*(.+)$/s);if(!t)return null;const[,n,r]=t;if(n.toLowerCase()!=="srgb")return null;const s=Bg(r);if(s===null)return null;const a=gy(s[0]),i=gy(s[1]);if(a===null||i===null)return null;const o=fy(a.color),l=fy(i.color);if(o===null||l===null)return null;let c,d;a.percentage!==null&&i.percentage!==null?(c=a.percentage,d=i.percentage):a.percentage!==null?(c=a.percentage,d=100-c):i.percentage!==null?(d=i.percentage,c=100-d):(c=50,d=50);const f=c+d;if(f<=0)return null;const h=c/f,p=d/f,m=f<100?f/100:1,k=h*o.a+p*l.a,b=(S,j)=>h*S*o.a+p*j*l.a,g=b(o.r,l.r),y=b(o.g,l.g),v=b(o.b,l.b),w=k===0?{r:0,g:0,b:0}:{r:g/k,g:y/k,b:v/k};return H7({...w,a:k*m})}function yp(e){const t=e.indexOf("color-mix(");if(t===-1)return e;const n=t+9,r=W2(e,n);if(r===-1)return e;const s=yp(e.slice(n+1,r)),i=v$(s)??`color-mix(${s})`;return e.slice(0,t)+i+yp(e.slice(r+1))}function bp(e,t,n,r){const s=e.indexOf("var(");if(s===-1)return e;const a=s+3,i=W2(e,a);if(i===-1)return e;const o=e.slice(a+1,i),l=Bg(o),c=(l?l[0]:o).trim(),d=l?l[1]:null;let f;r.has(c)?f=e.slice(s,i+1):c in t?(r.add(c),f=K2(c,t,n,r),r.delete(c)):d!==null?f=bp(d.trim(),t,n,r):f=e.slice(s,i+1);const h=bp(e.slice(i+1),t,n,r);return e.slice(0,s)+f+h}function w$(e,t,n,r){if(!e.includes("var(")&&!e.includes("color-mix("))return e;const s=bp(e,t,n,r);return yp(s)}function K2(e,t,n,r){if(e in n)return n[e];const s=t[e];if(s===void 0)return"";const a=w$(s,t,n,r);return n[e]=a,a}function my(e){const t={};for(const n of Object.keys(e))K2(n,e,t,new Set);return t}function S$(e,t){const{mode:n}=t,r={};for(const[s,a]of Object.entries(Z2))r[s]=Xh(a,n);if(e==null)return my(r);for(const[s,a]of Object.entries(e.tokens))r[s]=Xh(a,n);if(e.__inputTokens)for(const[s,a]of Object.entries(e.__inputTokens))a!==void 0&&(r[s]=Xh(a,n));return my(r)}function Io(e,t=!1){const n=x.useCallback(a=>{const i=window.matchMedia(e);return i.addEventListener("change",a),()=>i.removeEventListener("change",a)},[e]),r=x.useCallback(()=>window.matchMedia(e).matches,[e]),s=x.useCallback(()=>t,[t]);return x.useSyncExternalStore(n,r,s)}const Uf=x.createContext(null);Uf.displayName="ThemeContext";function j$(){if(typeof document>"u")return null;const e=document.documentElement.getAttribute("data-theme");return e==="light"||e==="dark"?e:null}function E$(){return null}function $$(){return typeof document>"u"?null:document.documentElement.getAttribute(gn("theme"))}function C$(){return null}function Y2(){return null}const bl=new Set;let sl=null;const kl=new Set;let al=null;function T$(){for(const e of bl)e()}function M$(e){return bl.add(e),bl.size===1&&typeof MutationObserver<"u"&&(sl=new MutationObserver(T$),sl.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]})),()=>{bl.delete(e),bl.size===0&&sl&&(sl.disconnect(),sl=null)}}function N$(){for(const e of kl)e()}function A$(e){return kl.add(e),kl.size===1&&typeof MutationObserver<"u"&&(al=new MutationObserver(N$),al.observe(document.documentElement,{attributes:!0,attributeFilter:[gn("theme")]})),()=>{kl.delete(e),kl.size===0&&al&&(al.disconnect(),al=null)}}function Q2(){return()=>{}}function z$(e){return x.useSyncExternalStore(e?Q2:M$,e?Y2:j$,E$)}function J2(e){return x.useSyncExternalStore(e?Q2:A$,e?Y2:$$,C$)}function ew(){const e=x.use(Uf),t=e!=null,n=J2(t);return(e==null?void 0:e.theme.name)??n}function Pf(){const e=x.use(Uf),t=e!=null,n=z$(t),r=J2(t),s=Io("(prefers-color-scheme: dark)"),a=(e==null?void 0:e.mode)??n??"system",i=(e==null?void 0:e.theme)??F2(r),o=a==="system"?s?"dark":"light":a,l=x.useMemo(()=>S$(i,{mode:o}),[i,o]),c=d=>l[d]??"";return{name:(i==null?void 0:i.name)??"default",mode:o,token:c,tokens:l}}const R$="modulepreload",_$=function(e){return"/"+e},yy={},tw=function(t,n,r){let s=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"));s=Promise.allSettled(n.map(l=>{if(l=_$(l),l in yy)return;yy[l]=!0;const c=l.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":R$,c||(f.as="script"),f.crossOrigin="",f.href=l,o&&f.setAttribute("nonce",o),document.head.appendChild(f),c)return new Promise((h,p)=>{f.addEventListener("load",h),f.addEventListener("error",()=>p(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(i){const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i}return s.then(i=>{for(const o of i||[])o.status==="rejected"&&a(o.reason);return t().catch(a)})},Hg={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}},O$={normal:{k63SB2:"x1sodnla",$$css:!0},medium:{k63SB2:"x1e4wzip",$$css:!0},semibold:{k63SB2:"x2mo6ok",$$css:!0},bold:{k63SB2:"x1lvx875",$$css:!0}},nw={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}},qg={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}},D$={"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}},I$={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}},rw={inline:{k1xSpc:"xt0psk2",$$css:!0},block:{k1xSpc:"x1lliihq",$$css:!0}},Od={singleLine:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",k1xSpc:"x1lliihq",$$css:!0},multiLine:{kVQacm:"xb3r6kr",k1xSpc:"x104kibb",kgKLqz:"x1ua5tub",$$css:!0}},sw={"break-word":{kTgw9:"x1lldw8n",kHjlTd:"x1mzt3pk",$$css:!0},"break-all":{kTgw9:"x1yn0g08",$$css:!0}},aw={wrap:{kN2L0X:"xk4td0m",$$css:!0},nowrap:{kN2L0X:"xebhuq6",$$css:!0},balance:{kN2L0X:"x1w2vvpw",$$css:!0},pretty:{kN2L0X:"x1fzhlzt",$$css:!0}},iw={enabled:{kxwWH2:"x1b2iylo",kzeHkT:"xwgcxoh",k1xSpc:"x1lliihq",$$css:!0}},ow={strikethrough:{kybGjl:"xmqliwb",$$css:!0}},L$={enabled:{kcqcaj:"xss6m8b",$$css:!0}},lw={start:{k9WMMc:"x1yc453h",$$css:!0},center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},cw={content:{ks0D6T:"xw5ewwj",kTgw9:"x13faqbe",$$css:!0}};function uw(e){const{maxLines:t}=e,[n,r]=x.useState(!1),[s,a]=x.useState(""),i=x.useRef(null),o=x.useCallback(c=>{if(t===0){r(!1);return}if(a(c.textContent??""),t===1)r(c.scrollWidth>c.offsetWidth);else{let d=c.scrollHeight;try{const f=document.createRange();f.selectNodeContents(c),d=f.getBoundingClientRect().height,f.detach()}catch{}r(d>c.offsetHeight)}},[t]);return{ref:x.useCallback(c=>{i.current&&Dg(i.current),i.current=c,c&&t>0?typeof ResizeObserver<"u"?Og(c,()=>{o(c)}):o(c):(r(!1),a(""))},[t,o]),isTruncated:n,fullText:s}}const B$=x.lazy(async()=>tw(()=>Promise.resolve().then(()=>Uw),void 0).then(e=>({default:e.Tooltip}))),H$={body:"primary",large:"primary",label:"primary",supporting:"secondary",code:"primary","display-1":"primary","display-2":"primary","display-3":"primary",inherit:"inherit"};function q$(e){return e in qg?e:"body"}function dw(e){return e in Hg?e:"primary"}function Re({type:e="body",size:t,color:n,weight:r,display:s="inline",maxLines:a=0,hasTruncateTooltip:i=!0,wordBreak:o,textWrap:l,justify:c="start",hasCapsize:d=!1,hasStrikethrough:f=!1,hasTabularNumbers:h=!1,xstyle:p,className:m,style:k,as:b="span",children:g,ref:y,...v}){const w=n??H$[e]??"primary",S=q$(e),j=dw(w),C=o??(a===1?"break-all":"break-word"),$=a>0||d?"block":s,A=uw({maxLines:a}),E=typeof i=="string"?i:"above",z=a>0&&i!==!1&&A.isTruncated,N=x.useRef(null),T=a>1?{WebkitLineClamp:a}:void 0;return u.jsxs(u.Fragment,{children:[u.jsx(b,{ref:Wt(y,A.ref,N),...P(U("text",{type:e,size:t,color:w}),B(Hg[j],qg[S],t&&D$[t],nw[S],r&&O$[r],a===1?Od.singleLine:a>1?Od.multiLine:rw[$],a>0&&sw[C],l&&aw[l],c!=="start"&&lw[c],d&&iw.enabled,f&&ow.strikethrough,h&&L$.enabled,p),m,{...k,...T}),title:z?A.fullText:void 0,...v,children:g}),z&&u.jsx(x.Suspense,{fallback:null,children:u.jsx(B$,{anchorRef:N,content:u.jsx("span",{...B(cw.content),children:A.fullText}),placement:E})})]})}Re.displayName="Text";const U$=.75,by=1.5,ky={sm:{diameter:10,border:2},md:{diameter:14,border:3},lg:{diameter:18,border:3},xl:{diameter:28,border:4}},vy={wrapper:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kOIVth:"x1txdalj",$$css:!0},spinner:{k1xSpc:"xwz0xwf",kgQiWS:"x1ku5rj1",kVQacm:"xb3r6kr",kXLuUW:"xxymvpz",$$css:!0}};function mr({size:e="md",shade:t="default",label:n,xstyle:r,className:s,style:a,"aria-label":i,"data-testid":o,ref:l,...c}){const d=x.useRef(null),{tokens:f}=Pf();x.useEffect(()=>{const w=d.current;if(w==null)return;const S=w.getContext("2d");if(!S)return;const{border:j,diameter:C}=ky[e],$=window.devicePixelRatio||1,A=t==="inherit"?getComputedStyle(w).color:null,E=t==="inherit"?A:t==="onMedia"?f["--color-on-dark"]:t==="subtle"?f["--color-text-secondary"]:f["--color-accent"],z=t==="inherit"?A:t==="onMedia"?`${f["--color-on-dark"]}4D`:f["--color-track"],N=C+j*2,T=Math.round(N*$),R=T+T%2,_=R/N,M=C/2*_,D=j*_;w.height=w.width=R,w.style.width=w.style.height=N+"px",S.lineCap="round",S.lineWidth=D;const I=R/2;S.beginPath(),S.arc(I,I,M,0,2*Math.PI),S.strokeStyle=z,t==="inherit"&&(S.globalAlpha=.3),S.stroke(),S.globalAlpha=1,S.beginPath(),S.arc(I,I,M,by*Math.PI,(by+U$)%2*Math.PI),S.strokeStyle=E,S.stroke()},[t,e,f]);const{border:h,diameter:p}=ky[e],m=p+h*2,k=n!=null,b=x.useId(),g=k&&typeof n=="string"&&i==null,y=i??(typeof n=="string"?n:void 0)??"Loading",v=u.jsx("span",{ref:k?void 0:l,role:"status","aria-label":g?void 0:y,"aria-labelledby":g?b:void 0,"data-testid":k?void 0:o,...k?{}:c,...P(k?"":U("spinner",{size:e,shade:t}),B(vy.spinner,!k&&r),k?void 0:s,{...k?{}:a,width:m,height:m}),children:u.jsx("canvas",{ref:d,className:"xlp1x4z x1lliihq x1so62im x14qxm4i xnh0sag xa4qsjk x1ka1v4i x1esw782"})});return k?u.jsxs("div",{ref:l,"data-testid":o,...c,...P(U("spinner",{size:e,shade:t}),B(vy.wrapper,r),s,a),children:[v,typeof n=="string"?u.jsx(Re,{id:b,type:"body",weight:"bold",children:n}):n]}):v}mr.displayName="Spinner";function Lo({children:e,as:t="span",ref:n,...r}){return x.createElement(t,{ref:n,...r,className:"x10l6tqk x1i1rx1s xjm9jq1 xkdpibf x1717udv xb3r6kr xzpqnlu xuxw1ft xng3xce x13vifvy x1o0tod x47corl x87ps6o"},e)}Lo.displayName="VisuallyHidden";const P$="data-astryx-edge-comp",F$={keTefX:"x1kftj4p",k71WvV:"x92e2el",$$css:!0},G$={inset:e=>[F$,{"--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})`)}]},Ug=x.createContext(null);Ug.displayName="SizeContext";function Pg(e,t="md"){const n=x.use(Ug);return e??n??t}Ug.Provider;const fw=x.createContext(null);fw.displayName="ButtonGroupContext";function V$(){return x.use(fw)}const hw=x.createContext(null);hw.displayName="LinkContext";function X$(e){function t({href:n,ref:r,...s}){return x.createElement(e,{ref:r,href:n,to:n,...s})}return t.displayName=`LinkWithTo(${typeof e=="string"?e:e.displayName||e.name||"Component"})`,t}function Bo(e){const t=x.use(hw),n=e??(t==null?void 0:t.component)??"a";return x.useMemo(()=>n==="a"?"a":X$(n),[n])}const xw=x.createContext({locale:"en",direction:"ltr",messages:{}});xw.displayName="InternationalizationContext";function Zh(e,t){const n=t&&t.cache?t.cache:eC,r=t&&t.serializer?t.serializer:Q$;return(t&&t.strategy?t.strategy:K$)(e,{cache:n,serializer:r})}function Z$(e){return e==null||typeof e=="number"||typeof e=="boolean"}function W$(e,t,n,r){const s=Z$(r)?r:n(r);let a=t.get(s);return typeof a>"u"&&(a=e.call(this,r),t.set(s,a)),a}function pw(e,t,n){const r=Array.prototype.slice.call(arguments,3),s=n(r);let a=t.get(s);return typeof a>"u"&&(a=e.apply(this,r),t.set(s,a)),a}function gw(e,t,n,r,s){return n.bind(t,e,r,s)}function K$(e,t){const n=e.length===1?W$:pw;return gw(e,this,n,t.cache.create(),t.serializer)}function Y$(e,t){return gw(e,this,pw,t.cache.create(),t.serializer)}const Q$=function(){return JSON.stringify(arguments)};var J$=class{constructor(){this.cache=Object.create(null)}get(e){return this.cache[e]}set(e,t){this.cache[e]=t}};const eC={create:function(){return new J$}},Wh={variadic:Y$},tC=/(?:[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 nC(e){const t={};return e.replace(tC,n=>{const r=n.length;switch(n[0]){case"G":t.era=r===4?"long":r===5?"narrow":"short";break;case"y":t.year=r===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"][r-1];break;case"w":case"W":throw new RangeError("`w/W` (week) patterns are not supported");case"d":t.day=["numeric","2-digit"][r-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=r===4?"long":r===5?"narrow":"short";break;case"e":if(r<4)throw new RangeError("`e..eee` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-3];break;case"c":if(r<4)throw new RangeError("`c..ccc` (weekday) patterns are not supported");t.weekday=["short","long","narrow","short"][r-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"][r-1];break;case"H":t.hourCycle="h23",t.hour=["numeric","2-digit"][r-1];break;case"K":t.hourCycle="h11",t.hour=["numeric","2-digit"][r-1];break;case"k":t.hourCycle="h24",t.hour=["numeric","2-digit"][r-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"][r-1];break;case"s":t.second=["numeric","2-digit"][r-1];break;case"S":case"A":throw new RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":t.timeZoneName=r<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 rC=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i;function sC(e){if(e.length===0)throw new Error("Number skeleton cannot be empty");const t=e.split(rC).filter(r=>r.length>0),n=[];for(const r of t){let s=r.split("/");if(s.length===0)throw new Error("Invalid number skeleton");const[a,...i]=s;for(const o of i)if(o.length===0)throw new Error("Invalid number skeleton");n.push({stem:a,options:i})}return n}function aC(e){return e.replace(/^(.*?)-/,"")}const wy=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,mw=/^(@+)?(\+|#+)?[rs]?$/g,iC=/(\*)(0+)|(#+)(0+)|(0+)/g,yw=/^(0+)$/;function Sy(e){const t={};return e[e.length-1]==="r"?t.roundingPriority="morePrecision":e[e.length-1]==="s"&&(t.roundingPriority="lessPrecision"),e.replace(mw,function(n,r,s){return typeof s!="string"?(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length):s==="+"?t.minimumSignificantDigits=r.length:r[0]==="#"?t.maximumSignificantDigits=r.length:(t.minimumSignificantDigits=r.length,t.maximumSignificantDigits=r.length+(typeof s=="string"?s.length:0)),""}),t}function bw(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 oC(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)),!yw.test(e))throw new Error("Malformed concise eng/scientific notation");t.minimumIntegerDigits=e.length}return t}function jy(e){const t={},n=bw(e);return n||t}function lC(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=aC(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,...jy(i)}),{})};continue;case"engineering":t={...t,notation:"engineering",...n.options.reduce((a,i)=>({...a,...jy(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(iC,function(a,i,o,l,c,d){if(i)t.minimumIntegerDigits=o.length;else{if(l&&c)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(yw.test(n.stem)){t.minimumIntegerDigits=n.stem.length;continue}if(wy.test(n.stem)){if(n.options.length>1)throw new RangeError("Fraction-precision stems only accept a single optional option");n.stem.replace(wy,function(i,o,l,c,d,f){return l==="*"?t.minimumFractionDigits=o.length:c&&c[0]==="#"?t.maximumFractionDigits=c.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,...Sy(a)});continue}if(mw.test(n.stem)){t={...t,...Sy(n.stem)};continue}const r=bw(n.stem);r&&(t={...t,...r});const s=oC(n.stem);s&&(t={...t,...s})}return t}let cC=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 Ey(e){return e.type===0}function uC(e){return e.type===1}function kw(e){return e.type===2}function vw(e){return e.type===3}function ww(e){return e.type===4}function Sw(e){return e.type===5}function jw(e){return e.type===6}function dC(e){return e.type===7}function Ew(e){return e.type===8}function $w(e){return!!(e&&typeof e=="object"&&e.type===0)}function kp(e){return!!(e&&typeof e=="object"&&e.type===1)}const Cw=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,il={"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 fC(e,t){let n="";for(let r=0;r<e.length;r++){const s=e.charAt(r);if(s==="j"){let a=0;for(;r+1<e.length&&e.charAt(r+1)===s;)a++,r++;let i=1+(a&1),o=a<2?1:3+(a>>1),l="a",c=hC(t);for((c=="H"||c=="k")&&(o=0);o-- >0;)n+=l;for(;i-- >0;)n=c+n}else s==="J"?n+="H":n+=s}return n}function hC(e){var s,a;let t=e.hourCycle;if(t===void 0){const i=e;t=((s=i.getHourCycles)==null?void 0:s.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 r;return n!=="root"&&(r=e.maximize().region),(il[`${n}-${r}`]||il[r||""]||il[n||""]||il[`${n}-001`]||il["001"])[0].charAt(0)}const xC=new RegExp(`^${Cw.source}*`),pC=new RegExp(`${Cw.source}*$`);function Se(e,t){return{start:e,end:t}}const gC=!!Object.fromEntries,mC=!!String.prototype.trimStart,yC=!!String.prototype.trimEnd,$y=gC?Object.fromEntries:function(t){const n={};for(const[r,s]of t)n[r]=s;return n},bC=mC?function(t){return t.trimStart()}:function(t){return t.replace(xC,"")},kC=yC?function(t){return t.trimEnd()}:function(t){return t.replace(pC,"")},Cy=new RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");function vC(e,t){return Cy.lastIndex=t,Cy.exec(e)[1]??""}function wC(e){if(e.length===0)return null;let t=1,n=1;for(let r=0;r<e.length;){const s=e.charCodeAt(r);switch(s){case 35:case 39:case 60:case 123:case 125:return null}if(s===10)t++,n=1,r++;else if(n++,s>=55296&&s<=56319&&r+1<e.length){const a=e.charCodeAt(r+1);r+=a>=56320&&a<=57343?2:1}else r++}return{offset:e.length,line:t,column:n}}var SC=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=wC(this.message);if(t){const n=this.clonePosition();return this.position=t,{val:[{type:0,value:this.message,location:Se(n,this.clonePosition())}],err:null}}}}return this.parseMessage(0,"",!1)}parseMessage(e,t,n){let r=[];for(;!this.isEOF();){const s=this.char();if(s===123){const a=this.parseArgument(e,n);if(a.err)return a;r.push(a.val)}else{if(s===125&&e>0)break;if(s===35&&(t==="plural"||t==="selectordinal")){const a=this.clonePosition();this.bump(),r.push({type:7,location:Se(a,this.clonePosition())})}else if(s===60&&!this.ignoreTag&&this.peek()===47){if(n)break;return this.error(26,Se(this.clonePosition(),this.clonePosition()))}else if(s===60&&!this.ignoreTag&&vp(this.peek()||0)){const a=this.parseTag(e,t);if(a.err)return a;r.push(a.val)}else{const a=this.parseLiteral(e,t);if(a.err)return a;r.push(a.val)}}}return{val:r,err:null}}parseTag(e,t){const n=this.clonePosition();this.bump();const r=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:0,value:`<${r}/>`,location:Se(n,this.clonePosition())},err:null};if(this.bumpIf(">")){const s=this.parseMessage(e+1,t,!0);if(s.err)return s;const a=s.val,i=this.clonePosition();if(this.bumpIf("</")){if(this.isEOF()||!vp(this.char()))return this.error(23,Se(i,this.clonePosition()));const o=this.clonePosition();return r!==this.parseTagName()?this.error(26,Se(o,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">")?{val:{type:8,value:r,children:a,location:Se(n,this.clonePosition())},err:null}:this.error(23,Se(i,this.clonePosition())))}else return this.error(27,Se(n,this.clonePosition()))}else return this.error(23,Se(n,this.clonePosition()))}parseTagName(){const e=this.offset();for(this.bump();!this.isEOF()&&EC(this.char());)this.bump();return this.message.slice(e,this.offset())}parseLiteral(e,t){const n=this.clonePosition();let r="";for(;;){const a=this.tryParseQuote(t);if(a){r+=a;continue}const i=this.tryParseUnquoted(e,t);if(i){r+=i;continue}const o=this.tryParseLeftAngleBracket();if(o){r+=o;continue}break}const s=Se(n,this.clonePosition());return{val:{type:0,value:r,location:s},err:null}}tryParseLeftAngleBracket(){return!this.isEOF()&&this.char()===60&&(this.ignoreTag||!jC(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,Se(n,this.clonePosition()));if(this.char()===125)return this.bump(),this.error(2,Se(n,this.clonePosition()));let r=this.parseIdentifierIfPossible().value;if(!r)return this.error(3,Se(n,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(1,Se(n,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:1,value:r,location:Se(n,this.clonePosition())},err:null};case 44:return this.bump(),this.bumpSpace(),this.isEOF()?this.error(1,Se(n,this.clonePosition())):this.parseArgumentOptions(e,t,r,n);default:return this.error(3,Se(n,this.clonePosition()))}}parseIdentifierIfPossible(){const e=this.clonePosition(),t=this.offset(),n=vC(this.message,t),r=t+n.length;return this.bumpTo(r),{value:n,location:Se(e,this.clonePosition())}}parseArgumentOptions(e,t,n,r){let s=this.clonePosition(),a=this.parseIdentifierIfPossible().value,i=this.clonePosition();switch(a){case"":return this.error(4,Se(s,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=kC(f.val);if(h.length===0)return this.error(6,Se(this.clonePosition(),this.clonePosition()));o={style:h,styleLocation:Se(d,this.clonePosition())}}const l=this.tryParseArgumentClose(r);if(l.err)return l;const c=Se(r,this.clonePosition());if(o&&o.style.startsWith("::")){let d=bC(o.style.slice(2));if(a==="number"){const f=this.parseNumberSkeletonFromString(d,o.styleLocation);return f.err?f:{val:{type:2,value:n,location:c,style:f.val},err:null}}else{if(d.length===0)return this.error(10,c);let f=d;this.locale&&(f=fC(d,this.locale));const h={type:1,pattern:f,location:o.styleLocation,parsedOptions:this.shouldParseSkeletons?nC(f):{}};return{val:{type:a==="date"?3:4,value:n,location:c,style:h},err:null}}}return{val:{type:a==="number"?2:a==="date"?3:4,value:n,location:c,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,Se(o,{...o}));this.bumpSpace();let l=this.parseIdentifierIfPossible(),c=0;if(a!=="select"&&l.value==="offset"){if(!this.bumpIf(":"))return this.error(13,Se(this.clonePosition(),this.clonePosition()));this.bumpSpace();const p=this.tryParseDecimalInteger(13,14);if(p.err)return p;this.bumpSpace(),l=this.parseIdentifierIfPossible(),c=p.val}const d=this.tryParsePluralOrSelectOptions(e,a,t,l);if(d.err)return d;const f=this.tryParseArgumentClose(r);if(f.err)return f;const h=Se(r,this.clonePosition());return a==="select"?{val:{type:5,value:n,options:$y(d.val),location:h},err:null}:{val:{type:6,value:n,options:$y(d.val),offset:c,pluralType:a==="plural"?"cardinal":"ordinal",location:h},err:null}}default:return this.error(5,Se(s,i))}}tryParseArgumentClose(e){return this.isEOF()||this.char()!==125?this.error(1,Se(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,Se(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=sC(e)}catch{return this.error(7,t)}return{val:{type:0,tokens:n,location:t,parsedOptions:this.shouldParseSkeletons?lC(n):{}},err:null}}tryParsePluralOrSelectOptions(e,t,n,r){let s=!1;const a=[],i=new Set;let{value:o,location:l}=r;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;l=Se(h,this.clonePosition()),o=this.message.slice(h.offset,this.offset())}else break}if(i.has(o))return this.error(t==="select"?21:20,l);o==="other"&&(s=!0),this.bumpSpace();const c=this.clonePosition();if(!this.bumpIf("{"))return this.error(t==="select"?17:18,Se(this.clonePosition(),this.clonePosition()));const d=this.parseMessage(e+1,t,n);if(d.err)return d;const f=this.tryParseArgumentClose(c);if(f.err)return f;a.push([o,{value:d.val,location:Se(c,this.clonePosition())}]),i.add(o),this.bumpSpace(),{value:o,location:l}=this.parseIdentifierIfPossible()}return a.length===0?this.error(t==="select"?15:16,Se(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!s?this.error(22,Se(this.clonePosition(),this.clonePosition())):{val:a,err:null}}tryParseDecimalInteger(e,t){let n=1;const r=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(n=-1);let s=!1,a=0;for(;!this.isEOF();){const o=this.char();if(o>=48&&o<=57)s=!0,a=a*10+(o-48),this.bump();else break}const i=Se(r,this.clonePosition());return s?(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()&&$C(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 vp(e){return e>=97&&e<=122||e>=65&&e<=90}function jC(e){return vp(e)||e===47}function EC(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 $C(e){return e>=9&&e<=13||e===32||e===133||e>=8206&&e<=8207||e===8232||e===8233}function wp(e){e.forEach(t=>{if(delete t.location,Sw(t)||jw(t))for(const n in t.options)delete t.options[n].location,wp(t.options[n].value);else kw(t)&&$w(t.style)||(vw(t)||ww(t))&&kp(t.style)?delete t.style.location:Ew(t)&&wp(t.children)})}function CC(e,t={}){t={shouldParseSkeletons:!0,requiresOtherClause:!0,...t};const n=new SC(e,t).parse();if(n.err){const r=SyntaxError(cC[n.err.kind]);throw r.location=n.err.location,r.originalMessage=n.err.message,r}return t!=null&&t.captureLocation||wp(n.val),n.val}var Ff=class extends Error{constructor(e,t,n){super(e),this.code=t,this.originalMessage=n}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}},Ty=class extends Ff{constructor(e,t,n,r){super(`Invalid values for "${e}": "${t}". Options are "${Object.keys(n).join('", "')}"`,"INVALID_VALUE",r)}},TC=class extends Ff{constructor(e,t,n){super(`Value for "${e}" must be of type ${t}`,"INVALID_VALUE",n)}},MC=class extends Ff{constructor(e,t){super(`The intl string context variable "${e}" was not provided to the string "${t}"`,"MISSING_VALUE",t)}};function NC(e){return e.length<2?e:e.reduce((t,n)=>{const r=t[t.length-1];return!r||r.type!==0||n.type!==0?t.push(n):r.value+=n.value,t},[])}function AC(e){return typeof e=="function"}function Qu(e,t,n,r,s,a,i){if(e.length===1&&Ey(e[0]))return[{type:0,value:e[0].value}];const o=[];for(const l of e){if(Ey(l)){o.push({type:0,value:l.value});continue}if(dC(l)){typeof a=="number"&&o.push({type:0,value:n.getNumberFormat(t).format(a)});continue}const{value:c}=l;if(!(s&&c in s))throw new MC(c,i);let d=s[c];if(uC(l)){(!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(vw(l)){const f=typeof l.style=="string"?r.date[l.style]:kp(l.style)?l.style.parsedOptions:void 0;o.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(ww(l)){const f=typeof l.style=="string"?r.time[l.style]:kp(l.style)?l.style.parsedOptions:r.time.medium;o.push({type:0,value:n.getDateTimeFormat(t,f).format(d)});continue}if(kw(l)){const f=typeof l.style=="string"?r.number[l.style]:$w(l.style)?l.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(Ew(l)){const{children:f,value:h}=l,p=s[h];if(!AC(p))throw new TC(h,"function",i);let m=p(Qu(f,t,n,r,s,a).map(k=>k.value));Array.isArray(m)||(m=[m]),o.push(...m.map(k=>({type:typeof k=="string"?0:1,value:k})))}if(Sw(l)){const f=d,h=(Object.prototype.hasOwnProperty.call(l.options,f)?l.options[f]:void 0)||l.options.other;if(!h)throw new Ty(l.value,d,Object.keys(l.options),i);o.push(...Qu(h.value,t,n,r,s));continue}if(jw(l)){const f=`=${d}`;let h=Object.prototype.hasOwnProperty.call(l.options,f)?l.options[f]:void 0;if(!h){if(!Intl.PluralRules)throw new Ff(`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,k=n.getPluralRules(t,{type:l.pluralType}).select(m-(l.offset||0));h=(Object.prototype.hasOwnProperty.call(l.options,k)?l.options[k]:void 0)||l.options.other}if(!h)throw new Ty(l.value,d,Object.keys(l.options),i);const p=typeof d=="bigint"?Number(d):d;o.push(...Qu(h.value,t,n,r,s,p-(l.offset||0)));continue}}return NC(o)}function zC(e,t){return t?{...e,...t,...Object.keys(e).reduce((n,r)=>(n[r]={...e[r],...t[r]},n),{})}:e}function RC(e,t){return t?Object.keys(e).reduce((n,r)=>(n[r]=zC(e[r],t[r]),n),{...e}):e}function Kh(e){return{create(){return{get(t){return e[t]},set(t,n){e[t]=n}}}}}function _C(e={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:Zh((...t)=>new Intl.NumberFormat(...t),{cache:Kh(e.number),strategy:Wh.variadic}),getDateTimeFormat:Zh((...t)=>new Intl.DateTimeFormat(...t),{cache:Kh(e.dateTime),strategy:Wh.variadic}),getPluralRules:Zh((...t)=>new Intl.PluralRules(...t),{cache:Kh(e.pluralRules),strategy:Wh.variadic})}}var It,OC=(It=class{constructor(t,n=It.defaultLocale,r,s){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((l,c)=>(!l.length||c.type!==0||typeof l[l.length-1]!="string"?l.push(c.value):l[l.length-1]+=c.value,l),[]);return o.length<=1?o[0]||"":o},this.formatToParts=a=>Qu(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=It.resolveLocale(n),typeof t=="string"){if(this.message=t,!It.__parse)throw new TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...a}=s||{};this.ast=It.__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=RC(It.formats,r),this.formatters=s&&s.formatters||_C(this.formatterCache)}static get defaultLocale(){return It.memoizedDefaultLocale||(It.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),It.memoizedDefaultLocale}},It.memoizedDefaultLocale=null,It.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])},It.__parse=CC,It.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"}}},It),DC=OC;const IC={"@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.'}},LC=IC,My=new Map;function BC(e,t){const n=`${t}::${e}`;let r=My.get(n);return r===void 0&&(r=new DC(e,t),My.set(n,r)),r}function HC(e){let t;try{t=new Intl.Locale(e).baseName}catch{t=e}const n=t.split("-"),r=[];for(let s=n.length;s>0;s--)r.push(n.slice(0,s).join("-"));return r}function qC(e,t,n,r){var i,o;const s=HC(t);if(r!==void 0)for(const l of s){const c=(i=r[l])==null?void 0:i[e];if(c!==void 0)return c}for(const l of s){const c=(o=n[l])==null?void 0:o[e];if(c!==void 0)return c.defaultMessage}const a=LC[e];return a!==void 0?a.defaultMessage:null}function UC(e,t,n,r,s){const a=qC(e,n,r,s);return a===null?(Ig(),e):t===void 0?a:BC(a,n).format(t)}function ke(){const e=x.use(xw);return x.useCallback((t,n)=>UC(t,n,e.locale,e.messages,e.overrides),[e.locale,e.messages,e.overrides])}const ms={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}},PC={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]},FC={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},GC={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}},VC={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}},XC={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}},Ny={hiddenContent:{kMwMTN:"x19co3pv",$$css:!0},hiddenContentDelayed:{kKVMdj:"x1ffowhz",k44tkh:"xjlvqhv",kWV6AL:"x10e4vud",kKxzle:"x17yabm6 x14q22ui",$$css:!0}},uu={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 $e({label:e,variant:t="secondary",size:n,type:r="button",isDisabled:s=!1,isLoading:a=!1,isInterruptible:i=!1,clickAction:o,icon:l,isIconOnly:c=!1,width:d,elevation:f="none",children:h,endContent:p,tooltip:m,href:k,as:b,target:g,rel:y,xstyle:v,className:w,style:S,ref:j,...C}){const $=ke(),A=Pg(n,"md"),E=V$(),[z,N]=x.useTransition(),T=x.useRef(!1),R=a||z,_=z||i,M=(E==null?void 0:E.isDisabled)??!1,D=s||M||R&&!i,I=Bo(b),O=k!=null&&!D,L=m!=null&&D,H=rs({placement:"above",isEnabled:m!=null}),F=ie=>{var K;if(D||T.current&&!i){ie.preventDefault();return}(K=C.onClick)==null||K.call(C,ie),o&&!ie.defaultPrevented&&(T.current=!0,N(async()=>{try{await o(ie)}finally{T.current=!1}}))},V=L?ie=>{var K;ie.key==="Enter"||ie.key===" "?ie.preventDefault():(K=C.onKeyDown)==null||K.call(C,ie)}:void 0,W=t==="ghost"?{[P$]:""}:null,ne=B(ms.base,FC[A],XC[t],c&&ms.iconOnly,D&&ms.disabled,L&&ms.ariaDisabled,O&&ms.link,!E&&ms.pressable,E&&(E.orientation==="horizontal"?uu.horizontal:uu.vertical),E&&(t==="primary"||t==="destructive")&&(E.orientation==="horizontal"?uu.onSolidHorizontal:uu.onSolidVertical),!E&&VC[f],d!=null&&PC.width(d),v),Y=P(U("button",{variant:t,size:A}),ne,w,S),G=u.jsxs(u.Fragment,{children:[R&&u.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"}}[!!_<<0],"aria-hidden":"true",children:u.jsx(mr,{size:"sm",shade:"inherit"})}),u.jsxs("span",{...B(ms.contentWrapper,R&&(_?Ny.hiddenContentDelayed:Ny.hiddenContent)),"aria-hidden":R||void 0,children:[l&&u.jsx("span",{...B(ms.iconWrapper,GC[A]),children:l}),c?null:u.jsx("span",{className:"xb3r6kr xlyipyv xeuugli",children:h??e}),!c&&p&&u.jsx("span",{className:"x3nfvp2 x6s0dn4 x1heor9g",children:p})]}),u.jsx(Lo,{role:"status","aria-live":"polite",children:R?$("@astryx.button.loading"):""})]}),ce=c&&e!==""||R&&!c||h!=null&&h!==e?{"aria-label":e}:null,ve=m!=null?{"aria-describedby":[C["aria-describedby"],H.describedBy].filter(Boolean).join(" ")||void 0}:null,pe=Wt(j,m!=null?H.ref:void 0);let de;return O?de=u.jsx(I,{ref:pe,href:k,target:g,rel:y,...Y,...C,...ce,...ve,...W,"aria-busy":R||void 0,onClick:F,children:G}):de=u.jsx("button",{ref:pe,type:r,disabled:L?void 0:D,...Y,...C,...ce,...ve,...W,"aria-busy":R||void 0,"aria-disabled":L||void 0,onClick:F,...V?{onKeyDown:V}:null,children:G}),m?u.jsxs(u.Fragment,{children:[de,H.renderTooltip(m)]}):de}$e.displayName="Button";const st={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},wi={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",width:"1em",height:"1em","aria-hidden":!0},ZC={close:u.jsx("svg",{...st,children:u.jsx("path",{d:"M6 6l12 12M6 18L18 6"})}),chevronDown:u.jsx("svg",{...st,children:u.jsx("path",{d:"M6 9l6 6 6-6"})}),chevronLeft:u.jsx("svg",{...st,children:u.jsx("path",{d:"M15 6l-6 6 6 6"})}),chevronRight:u.jsx("svg",{...st,children:u.jsx("path",{d:"M9 6l6 6-6 6"})}),chevronsLeft:u.jsx("svg",{...st,children:u.jsx("path",{d:"M18 6l-6 6 6 6M11 6l-6 6 6 6"})}),chevronsRight:u.jsx("svg",{...st,children:u.jsx("path",{d:"M6 6l6 6-6 6M13 6l6 6-6 6"})}),check:u.jsx("svg",{...st,children:u.jsx("path",{d:"M5 13l4 4L19 7"})}),success:u.jsx("svg",{...wi,children:u.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:u.jsx("svg",{...wi,children:u.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:u.jsx("svg",{...wi,children:u.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:u.jsx("svg",{...wi,children:u.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:u.jsxs("svg",{...st,children:[u.jsx("rect",{x:"3",y:"4",width:"18",height:"18",rx:"2"}),u.jsx("path",{d:"M16 2v4M8 2v4M3 10h18"})]}),clock:u.jsxs("svg",{...st,children:[u.jsx("circle",{cx:"12",cy:"12",r:"9"}),u.jsx("path",{d:"M12 7v5l3 3"})]}),externalLink:u.jsxs("svg",{...st,children:[u.jsx("path",{d:"M18 13v6a2 2 0 01-2 2H5a2 2 0 01-2-2V8a2 2 0 012-2h6"}),u.jsx("path",{d:"M15 3h6v6"}),u.jsx("path",{d:"M10 14L21 3"})]}),menu:u.jsx("svg",{...st,strokeWidth:2,children:u.jsx("path",{d:"M4 6h16M4 12h16M4 18h16"})}),moreHorizontal:u.jsxs("svg",{...wi,children:[u.jsx("circle",{cx:"5",cy:"12",r:"1.5"}),u.jsx("circle",{cx:"12",cy:"12",r:"1.5"}),u.jsx("circle",{cx:"19",cy:"12",r:"1.5"})]}),search:u.jsxs("svg",{...st,children:[u.jsx("circle",{cx:"11",cy:"11",r:"8"}),u.jsx("path",{d:"M21 21l-4.35-4.35"})]}),arrowUp:u.jsx("svg",{...st,children:u.jsx("path",{d:"M12 19V5m0 0l-7 7m7-7l7 7"})}),arrowDown:u.jsx("svg",{...st,children:u.jsx("path",{d:"M12 5v14m0 0l7-7m-7 7l-7-7"})}),arrowsUpDown:u.jsx("svg",{...st,children:u.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:u.jsx("svg",{...st,children:u.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:u.jsx("svg",{...st,children:u.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:u.jsx("svg",{...st,children:u.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:u.jsxs("svg",{...st,children:[u.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"}),u.jsx("path",{d:"M16 18v2a2 2 0 01-2 2H6a2 2 0 01-2-2V9a2 2 0 012-2h2"})]}),checkDouble:u.jsxs("svg",{...st,children:[u.jsx("path",{d:"M2 13l4 4L14 7"}),u.jsx("path",{d:"M9 13l4 4L21 7"})]}),wrench:u.jsx("svg",{...st,children:u.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:u.jsx("svg",{...wi,children:u.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),microphone:u.jsxs("svg",{...st,children:[u.jsx("path",{d:"M12 2a3 3 0 00-3 3v6a3 3 0 006 0V5a3 3 0 00-3-3z"}),u.jsx("path",{d:"M19 10v1a7 7 0 01-14 0v-1"}),u.jsx("path",{d:"M12 18v4m-4 0h8"})]})};let WC={};function KC(e){var t;return e==null?null:typeof e=="string"?((t=F2(e))==null?void 0:t.icons)??null:e.icons??null}function Tw(e,t){const n=KC(t);return(n==null?void 0:n[e])??WC[e]??ZC[e]}const Mw={root:{kmuXW:"x2lah0s",$$css:!0},span:{k1xSpc:"x3nfvp2",kGNEyG:"x6s0dn4",kjj79g:"xl56j7k",kmuXW:"x2lah0s",$$css:!0}},Nw={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}},YC={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}},QC={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 JC(e){return e!=null&&e!==""?{role:"img","aria-label":e}:{"aria-hidden":"true"}}function Ee({icon:e,color:t="inherit",size:n="md",label:r,ref:s,className:a,style:i,xstyle:o,...l}){const c=JC(r);if(typeof e=="string")return u.jsx(e9,{name:e,color:t,size:n,a11yProps:c,className:a,style:i,xstyle:o,spanProps:l});const d=e;return u.jsx(d,{ref:s,...c,...P(U("icon",{size:n,color:t}),B(Mw.root,Nw[t],YC[n],o),a??void 0,i),...l})}Ee.displayName="Icon";function e9({name:e,color:t,size:n,a11yProps:r,className:s,style:a,xstyle:i,spanProps:o}){const l=ew(),c=Tw(e,l);if(c==null)return null;const d=o??{};return u.jsx("span",{...r,...d,...P(U("icon",{size:n,color:t}),B(Mw.span,Nw[t],QC[n],i),s??void 0,a),children:c})}function ss(e,t){return typeof e=="string"?u.jsx(Ee,{icon:e,...t}):typeof e=="function"||typeof e=="object"&&e!==null&&"render"in e?u.jsx(Ee,{icon:e,...t}):e}function tc(e){const t=ew();return Tw(e,t)}const t9={isMobile:!1,isMobileNavOpen:!1,toggleMobileNav:()=>{},openMobileNav:()=>{},closeMobileNav:()=>{},isMobileNavEnabled:!1,hasAutoToggle:!0},Fg=x.createContext(t9);Fg.displayName="AppShellMobileContext";function Gf(){return x.use(Fg)}function Aw({ref:e,children:t,label:n,"data-testid":r,xstyle:s,className:a,style:i}){const o=ke(),l=n??o("@astryx.mobileNav.toggle.open"),{isMobile:c,isMobileNavEnabled:d,isMobileNavOpen:f,mobileNavId:h,toggleMobileNav:p}=Gf();return!c||!d?null:u.jsx($e,{ref:e,variant:"ghost",label:l,icon:t??u.jsx(Ee,{icon:"menu",color:"inherit"}),onClick:p,"aria-expanded":f,"aria-controls":h||void 0,"data-testid":r??"mobile-nav-toggle",xstyle:s,className:a,style:i,isIconOnly:!0})}Aw.displayName="MobileNavToggle";const Di=x.createContext("default");Di.displayName="SideNavRenderContext";function zw(){return x.use(Di)}const Sp=x.createContext("default");Sp.displayName="TopNavRenderContext";const jp=x.createContext(null);jp.displayName="TopNavMobileContentContext";const n9=typeof Lf.Activity<"u",r9=n9?({mode:e,children:t})=>u.jsx(Lf.Activity,{mode:e,children:t}):({children:e})=>u.jsx(u.Fragment,{children:e}),s9={sm:640,md:768,lg:1024,none:0},Yh="astryx-app-shell-main",jt={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 Rw({variant:e="elevated",banner:t,children:n,contentPadding:r,"data-testid":s,height:a="fill",mobileNav:i,sideNav:o,topNav:l,xstyle:c,className:d,style:f,ref:h,...p}){const m=ke(),k=i===!1,b=i!=null&&i!==!1&&typeof i=="object"&&!x.isValidElement(i)?i:null,g=(b==null?void 0:b.breakpoint)??"md",y=i!=null&&i!==!1&&(x.isValidElement(i)||typeof i=="string")?i:null,v=(b==null?void 0:b.content)??null,w=(b==null?void 0:b.hasToggle)!==!1,S=(b==null?void 0:b.isOpen)!==void 0,j=g==="none"?"(max-width: 0px)":`(max-width: ${s9[g]}px)`,C=Io(j,b==null?void 0:b.defaultIsMobile),[$,A]=x.useState(!1),E=(b==null?void 0:b.isOpen)??$,z=x.useCallback(rr=>{var Sn;S||A(rr),(Sn=b==null?void 0:b.onOpenChange)==null||Sn.call(b,rr)},[S,b]),N=x.useCallback(()=>{var rr;(rr=document.getElementById(Yh))==null||rr.focus()},[]),T=a==="fill",R=a==="auto",_=Fh(t),M=Fh(l),D=Fh(o),O=!k&&(M||D)&&y==null,L=e==="section",H=e==="elevated",F=e==="wash"||e==="elevated"?jt.navAreaWash:e==="surface"?jt.navAreaSurface:void 0,V=e==="wash"?jt.contentBgWash:e==="elevated"&&M&&D&&!C?jt.contentBgTransparent:e==="surface"||e==="elevated"?jt.contentBgSurface:void 0,J=F??jt.navAreaSurface,W=x.useRef(null),ne=x.useRef(null);x.useEffect(()=>{if(!R||!W.current||!ne.current)return;const rr=W.current,Sn=ne.current,Jo=()=>{const ki=rr.getBoundingClientRect().height;Sn.style.setProperty("--appshell-header-height",`${ki}px`)};return Og(rr,()=>Jo()),()=>Dg(rr)},[R]);const Y=D&&!C,G=y!=null,ae=O&&v!=null&&C,ce=x.useId(),ve=x.useMemo(()=>({isMobile:C,isMobileNavOpen:E,mobileNavId:ce,toggleMobileNav:()=>O&&z(!E),openMobileNav:()=>O&&z(!0),closeMobileNav:()=>z(!1),isMobileNavEnabled:O,hasAutoToggle:w}),[C,E,ce,z,O,w]),pe=D&&w?u.jsx(Di,{value:"drawer-content",children:o}):null,de=D?u.jsx(Di,{value:"drawer-content",children:o}):null,ie=M?C&&!k&&y==null?u.jsx(jp,{value:pe,children:u.jsx(Sp,{value:"mobile-bar",children:l})}):l:null,K=M||_?u.jsxs(Rd,{padding:0,hasDivider:L&&M,children:[_&&u.jsx("div",{...B(jt.banner,F),children:t}),M&&ie]}):void 0,ge=K!=null?u.jsx("div",{ref:W,role:"banner",...P(U("app-shell-header",{variant:e}),B(F,R&&jt.headerSticky)),children:K}):void 0,le=Y?u.jsx(H2,{padding:0,hasDivider:L,isScrollable:T,...U("app-shell-sidenav",{variant:e}),xstyle:[F,R&&J,R&&jt.panelAutoFill],children:o}):void 0,he=le!=null&&R?u.jsx("div",{className:"x2lah0s x7giv3 x7wzq59 xepuwc7 x16zugyo x78zum5 xdt5ytf",children:le}):le,un=H&&M&&Y,nr=u.jsx(aa,{padding:r??0,role:"main",id:Yh,tabIndex:-1,isScrollable:T,xstyle:[V,jt.mainFocusTarget],children:n}),Br=un?u.jsxs("div",{className:"x1n2onr6 x78zum5 x98rzlu x2lwn1j x5yr21d",children:[u.jsx("div",{className:"x10l6tqk x10a8y8t x10xzikg x183tx6i x47corl"}),nr]}):nr,Dh=!k&&w&&C&&!M&&D?u.jsx("div",{...P(U("app-shell-header",{variant:e}),B(F,R&&jt.headerSticky)),children:u.jsx(Rd,{padding:0,hasDivider:L,children:u.jsxs("div",{className:"x78zum5 x6s0dn4 x1k15mir xf314gf",role:"navigation","aria-label":m("@astryx.appShell.mobileNavigation"),children:[u.jsx(Di,{value:"topbar",children:o}),u.jsx(Aw,{})]})})}):void 0;return u.jsx(Fg,{value:ve,children:u.jsxs("div",{...p,ref:Wt(h,ne),"data-testid":s,...P(U("app-shell",{variant:e}),B(jt.root,e==="wash"?jt.variantWash:e==="surface"?jt.variantSurface:e==="section"?jt.variantSection:jt.variantElevated,T?jt.rootFill:jt.rootAuto,c),d,f),children:[u.jsx("a",{href:`#${Yh}`,onClick:N,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")}),u.jsx(sa,{height:a,padding:0,header:u.jsxs(u.Fragment,{children:[ge,Dh]}),start:he,content:Br}),G&&y,ae&&v,C&&!k&&y==null&&!v&&u.jsxs(r9,{mode:E?"visible":"hidden",children:[D&&!M&&u.jsx(Di,{value:"drawer",children:o}),M&&u.jsx(jp,{value:de,children:u.jsx(Sp,{value:"drawer",children:l})})]})]})})}Rw.displayName="AppShell";function a9(e){return!e||typeof window>"u"?!1:window.getComputedStyle(e).direction==="rtl"}const Jr=typeof window<"u"?x.useLayoutEffect:x.useEffect,i9=new Set(["text","search","url","tel","email","password","number"]);function o9(e){if(e.isContentEditable)return e;const t=e.closest("[contenteditable]");return t&&t.getAttribute("contenteditable")!=="false"?t:null}function Ay(e,t){if(!(e instanceof HTMLElement))return!1;const n=o9(e);if(n){const c=typeof window<"u"?window.getSelection():null;return c&&c.rangeCount>0&&!c.isCollapsed?!0:(n.textContent??"").length>0}const r=e.tagName==="TEXTAREA",s=e.tagName==="INPUT"&&i9.has(e.type);if(!r&&!s)return!1;const a=e,{selectionStart:i,selectionEnd:o,value:l}=a;return i!==o||i==null?!0:t==="ArrowLeft"||t==="ArrowUp"||t==="Home"?i>0:t==="ArrowRight"||t==="ArrowDown"||t==="End"?i<l.length:!1}function Vf(e={}){const{itemSelector:t='[role="menuitem"]',boundarySelector:n,wrap:r=!0,onEscape:s,orientation:a="vertical",hasHomeEnd:i=!0,isRtl:o,hasRovingTabIndex:l=!1,hasCaretGuard:c=!1}=e,d=x.useRef(null),f=x.useCallback($=>$.getAttribute("aria-disabled")==="true"||$.disabled===!0||$.hasAttribute("disabled"),[]),h=x.useCallback(()=>{const $=d.current;if(!$)return[];const A=Array.from($.querySelectorAll(t));return n?A.filter(E=>E.closest(n)===$):A},[t,n]),p=x.useCallback($=>{const A=d.current;if(!A||!n)return!0;const E=$.target;return E?E.closest(n)===A:!0},[n]),m=x.useCallback(($,A,E,z)=>{const N=$.length;if(N===0)return-1;let T=A;for(let R=0;R<N;R++){if(T<0||T>=N){if(!z)return-1;T=(T+N)%N}const _=$[T];if(_&&!f(_))return T;T+=E}return-1},[f]),k=x.useCallback(()=>{const $=h(),A=document.activeElement;return $.findIndex(E=>E===A||E.contains(A))},[h]),b=x.useCallback(($,A)=>{$.getAttribute("tabindex")!==String(A)&&$.setAttribute("tabindex",String(A))},[]),g=x.useCallback(()=>{const $=h(),A=$.filter(N=>!f(N));if(A.length===0)return;const z=A.find(N=>N.getAttribute("tabindex")==="0")??A[0];for(const N of $)b(N,N===z?0:-1)},[h,f,b]);Jr(()=>{l&&g()});const y=x.useCallback(($,A)=>{const E=$[A];if(E){if(l)for(const z of $)b(z,z===E?0:-1);E.focus()}},[l,b]),v=x.useCallback($=>{const A=h();if(A.length===0)return;const E=Math.max(0,Math.min($,A.length-1));y(A,E)},[h,y]),w=x.useCallback(()=>{const $=h(),A=m($,0,1,!1);return A!==-1?(y($,A),!0):!1},[h,m,y]),S=x.useCallback(()=>{const $=h(),A=m($,$.length-1,-1,!1);return A!==-1?(y($,A),!0):!1},[h,m,y]),j=x.useCallback(()=>{l&&g()},[l,g]),C=x.useCallback($=>{if($.ctrlKey||$.metaKey||$.altKey||!p($))return;if($.key==="Escape"){$.preventDefault(),s==null||s();return}const A=a==="horizontal"||a==="both",E=a==="vertical"||a==="both",z=[],N=[];if(A){const O=$.key==="ArrowLeft"||$.key==="ArrowRight"?o??a9(d.current):!1;z.push(O?"ArrowLeft":"ArrowRight"),N.push(O?"ArrowRight":"ArrowLeft")}E&&(z.push("ArrowDown"),N.push("ArrowUp"));const T=z.includes($.key),R=N.includes($.key),_=i&&$.key==="Home",M=i&&$.key==="End";if(!T&&!R&&!_&&!M||c&&(Ay($.target,$.key)||Ay(document.activeElement,$.key)))return;const D=k(),I=h();if(T){const O=D===-1?0:D+1,L=m(I,O,1,r);L!==-1&&y(I,L)}else if(R){const O=D===-1?I.length-1:D-1,L=m(I,O,-1,r);L!==-1&&y(I,L)}else _?w():M&&S();$.preventDefault()},[k,h,r,a,o,i,c,m,y,w,S,s,p]);return{listRef:d,handleKeyDown:C,handleFocus:j,focusItem:v,focusFirst:w,focusLast:S,ownsEvent:p,getItems:h}}const l9={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}},c9={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 Xf({variant:e="neutral",label:t,icon:n,xstyle:r,className:s,style:a,ref:i,...o}){return u.jsxs("span",{ref:i,...P(U("badge",{variant:e}),B(l9.base,c9[e],r),s,a),...o,children:[n,t]})}Xf.displayName="Badge";const u9={info:"info",warning:"warning",error:"error",success:"success"},d9={info:"status",warning:"alert",error:"alert",success:"status"},f9={info:"accent",warning:"warning",error:"error",success:"success"},fa={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}},h9={info:{kWkggS:"xgcxg3y",$$css:!0},warning:{kWkggS:"x24i8r5",$$css:!0},error:{kWkggS:"x1pritpl",$$css:!0},success:{kWkggS:"xu13z74",$$css:!0}},x9={none:{kGVxlE:"x1gnnqk1",$$css:!0},low:{kGVxlE:"x1i5ehqx",$$css:!0},med:{kGVxlE:"x14hfi27",$$css:!0},high:{kGVxlE:"x1kcpxr7",$$css:!0}};function Wa({status:e,title:t,description:n,icon:r,isDismissable:s=!1,onDismiss:a,endContent:i,container:o="card",elevation:l="none",defaultIsExpanded:c=!1,children:d,xstyle:f,className:h,style:p,ref:m,...k}){const b=ke(),[g,y]=x.useState(!1),[v,w]=x.useState(c),S=x.useId(),j=u9[e],C=d9[e],$=f9[e],A=d!=null;if(g)return null;const E=()=>{y(!0),a==null||a()},z=()=>{w(D=>!D)},N=i!=null||s||A,T=i!=null||s,R=n==null&&T,_=A&&v,M=o==="card";return u.jsxs("div",{ref:m,role:C,...P(B(fa.root,x9[l],M&&l!=="none"&&fa.rootElevatedCard,f),h,p),...k,children:[u.jsxs("div",{...P(U("banner",{container:o,status:e}),B(fa.header,R&&fa.headerCentered,h9[e],M&&(_?fa.headerCardWithContent:fa.headerCardStandalone))),children:[u.jsx("div",{...P(U("banner-icon",{status:e}),{className:"x78zum5 x6s0dn4 x2lah0s"}),"aria-hidden":"true",children:r??u.jsx(Ee,{icon:j,size:"md",color:$})}),u.jsxs("div",{className:"x78zum5 xdt5ytf xxhr3t x98rzlu xeuugli",children:[u.jsx("div",{className:"x1ghz6dp xjb2p0i xcr08ib x2mo6ok x1kq96og x1tgivj0",children:t}),n!=null&&u.jsx("div",{className:"x1ghz6dp xjb2p0i x141an7d x1sodnla x1ltkj2j xv1l7n4",children:n})]}),N&&u.jsxs("div",{...B(fa.endArea,G$.inset(lr["--spacing-2"])),children:[i,A&&u.jsx($e,{variant:"ghost",size:"sm",label:b(v?"@astryx.banner.collapse":"@astryx.banner.expand"),tooltip:b(v?"@astryx.banner.collapse":"@astryx.banner.expand"),icon:u.jsx("span",{...{0:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92"},1:{className:"x3nfvp2 x11xpdln xuedmi6 x12w9bfk xlr8y92 x19jd1h0"}}[!!v<<0],children:u.jsx(Ee,{icon:"chevronDown",size:"sm",color:"inherit"})}),onClick:z,"aria-expanded":v,"aria-controls":_?S:void 0,isIconOnly:!0}),s&&u.jsx($e,{variant:"ghost",size:"sm",label:b("@astryx.banner.dismiss"),tooltip:b("@astryx.banner.dismiss"),icon:u.jsx(Ee,{icon:"close",size:"sm",color:"inherit"}),onClick:E,isIconOnly:!0})]})]}),_&&u.jsx("div",{id:S,...P(U("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"}}[!!M<<0]),children:d})]})}Wa.displayName="Banner";const p9={root:{k2ei4v:"xtpqe59",kVhnKS:"x1t7ytsu",kGJrpR:"x14ydlgx",kZCmMZ:"x1rey3nv",kMwMTN:"xv1l7n4",keTefX:"x1lziwak",k71WvV:"x14z9mp",keoZOQ:"xdj266r",k1K539:"xat24cr",$$css:!0}};function _w({children:e,cite:t,xstyle:n,className:r,style:s,ref:a,...i}){return u.jsxs("blockquote",{ref:a,...P(U("blockquote"),B(p9.root,n),r,s),...i,children:[e,t!=null&&u.jsx("footer",{children:u.jsx("cite",{className:"x1lliihq xtbrsbv x141an7d x1ltkj2j x1j61x8r",children:t})})]})}_w.displayName="Blockquote";const g9='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',Xr=[];function m9(e){Xr.push(e)}function y9(e){for(let t=Xr.length-1;t>=0;t--)if(Xr[t].handler===e){Xr.splice(t,1);return}}function b9(e){if(Xr.length===0)return!1;let t=Xr[0];for(let n=1;n<Xr.length;n++){const r=Xr[n],s=t.getContainer(),a=r.getContainer();s!=null&&a!=null&&a!==s&&a.contains(s)||(t=r)}return t.handler===e}function zy(){return Xr.length>0}function Ow(e){return e.isComposing===!0||e.keyCode===229}function k9(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 Gg(e){return Array.from(e.querySelectorAll(g9)).filter(k9)}function Dw(e){try{e.focus()}catch{}return document.activeElement===e}function Ry(e){const t=Gg(e);for(const n of t)if(Dw(n))return!0;return!1}function v9(e){const t=Gg(e);for(let n=t.length-1;n>=0;n--)if(Dw(t[n]))return!0;return!1}function w9(e){const{isActive:t,onEscape:n}=e,r=x.useRef(null),s=x.useRef(null),a=x.useRef(!1),i=x.useCallback(()=>{r.current&&Ry(r.current)},[]);return x.useEffect(()=>{if(!t)return;const o=document.activeElement,l=r.current;return()=>{const c=document.activeElement;(c==null||c===document.body||c===document.documentElement||l!=null&&l.contains(c))&&o!=null&&o.isConnected&&typeof o.focus=="function"&&o.focus()}},[t]),x.useEffect(()=>{if(!t)return;const o=l=>{const c=r.current;if(!c)return;const d=l.target;c.contains(d)?s.current=d:a.current&&(Ry(c),s.current===document.activeElement&&v9(c),s.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&&m9({handler:o,getContainer:()=>r.current});const l=c=>{const d=r.current;if(d){if(c.key==="Escape"&&n){if(c.defaultPrevented||Ow(c)||!b9(o))return;c.preventDefault(),c.stopPropagation(),n();return}if(c.key==="Tab"){a.current=!0;const f=Gg(d);if(f.length===0)return;const h=f[0],p=f[f.length-1];c.shiftKey?document.activeElement===h&&(c.preventDefault(),p.focus()):document.activeElement===p&&(c.preventDefault(),h.focus())}}};return document.addEventListener("keydown",l),()=>{document.removeEventListener("keydown",l),n&&y9(o)}},[t,n]),{containerRef:r,focusFirst:i}}function Zf(e,t,n=!0){const r=x.useRef(!1);x.useEffect(()=>{n&&!r.current&&(r.current=!0,Ba())},[e,t,n])}const Qh={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 Bc(e={}){const{onShow:t,onHide:n,xstyle:r,hasLightDismiss:s=!0,hasEscapeDismiss:a=!0,hasAutoFocus:i=!0,hasSurface:o=!0,hasCloseButton:l=!0,closeButtonLabel:c,dialogLabel:d,role:f="dialog",isModal:h=!0}=e,p=ke(),m=c??p("@astryx.popover.close"),k=x.useRef(null),b=x.useRef(!1),g=Lc({mode:"context",lightDismiss:s,onShow:t,onHide:n}),{containerRef:y,focusFirst:v}=w9({isActive:g.isOpen,onEscape:a||s?g.hide:void 0});x.useEffect(()=>{g.isOpen&&i&&!b.current&&requestAnimationFrame(()=>{v()}),g.isOpen||(b.current=!1)},[g.isOpen,i,v]);const w=x.useCallback(A=>{k.current=A,g.ref(A)},[g]),S=x.useCallback(A=>{b.current=(A==null?void 0:A.skipAutoFocus)??!1,g.show()},[g]),j=x.useCallback(()=>{g.isOpen?g.hide():S()},[g,S]),C={"aria-haspopup":f==="dialog"?"dialog":"true","aria-expanded":g.isOpen,"aria-controls":g.id};Zf("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 $=x.useCallback((A,E)=>g.render(u.jsxs("div",{ref:y,role:f==="dialog"?"dialog":void 0,"aria-modal":f==="dialog"&&h?!0:void 0,"aria-label":f==="dialog"?d:void 0,...B(Qh.contentWrapper,o&&Qh.surface,r),children:[A,l&&u.jsx("div",{...B(Qh.closeButtonWrapper,zd.centerInline("100%")),children:u.jsx($e,{variant:"secondary",label:m,onClick:g.hide})})]}),{...E,xstyle:E==null?void 0:E.xstyle}),[g,l,o,m,y,d,f,h,r]);return{triggerRef:w,contentRef:y,anchorId:g.anchorId,show:S,hide:g.hide,toggle:j,isOpen:g.isOpen,id:g.id,render:$,triggerProps:C}}function S9(e){return e.key.length===1&&!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key!==" "}function Vg(e){const{getItemLabels:t,onMatch:n,getCurrentIndex:r,resetMs:s=750,isDisabled:a}=e,i=x.useRef(""),o=x.useRef(void 0),l=x.useCallback(()=>{i.current="",o.current&&(clearTimeout(o.current),o.current=void 0)},[]),c=x.useCallback(()=>{o.current&&clearTimeout(o.current),o.current=setTimeout(()=>{i.current="",o.current=void 0},s)},[s]);return{onKeyDown:x.useCallback(f=>{const h=f.key===" "&&i.current.length>0;if(!S9(f)&&!h)return!1;const p=t();if(p.length===0)return!1;const m=f.key.toLowerCase(),k=i.current.length>0&&i.current.split("").every(w=>w===m),b=k?m:i.current+m;i.current=b,c();const g=(r==null?void 0:r())??-1,y=p.length,v=k?1:0;for(let w=0;w<y;w++){const S=(g+v+w+y)%y;if(a!=null&&a(S))continue;const j=p[S];if(j!=null&&j.trim().toLowerCase().startsWith(b))return n(S),!0}return!0},[t,n,r,c,a]),reset:l}}const _y={horizontal:{k1xSpc:"x78zum5",kGNEyG:"x6s0dn4",kzqmXN:"xh8yej3",$$css:!0},vertical:{k1xSpc:"x3nfvp2",kXwgrk:"xdt5ytf",kGNEyG:"x6s0dn4",kZKoxP:"x5yr21d",$$css:!0}},Si={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}},Oy={horizontal:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",$$css:!0},vertical:{keoZOQ:"x1sa9bsh",k1K539:"x6h7pi7",kZKoxP:"x12qplqi",$$css:!0}};function nc({orientation:e="horizontal",label:t,variant:n="subtle",isFullBleed:r=!1,xstyle:s,className:a,style:i,ref:o,"aria-label":l,"aria-labelledby":c,...d}){const f=e==="horizontal",h=x.useId(),p=c??(t&&l==null?h:void 0);return u.jsxs("div",{ref:o,...d,role:"separator","aria-orientation":e,"aria-label":l,"aria-labelledby":p,...P(U("divider",{variant:n,orientation:e}),B(f?_y.horizontal:_y.vertical,r&&(f?Oy.horizontal:Oy.vertical),s),a,i),children:[u.jsx("div",{...B(f?Si.horizontalLine:Si.verticalLine,Si[n])}),t&&u.jsx("div",{id:h,...{0:{className:"x2lah0s xrrkdod x141an7d x1ltkj2j xv1l7n4"},1:{className:"x2lah0s x141an7d x1ltkj2j xv1l7n4 xnjsko4 x8o8v82"}}[!f<<0],children:t}),t&&u.jsx("div",{...B(f?Si.horizontalLine:Si.verticalLine,Si[n])})]})}nc.displayName="Divider";const j9=["noopener","noreferrer"];function Iw(e,t){if(e!=="_blank")return{target:e,rel:t};const n=(t==null?void 0:t.split(/\s+/).filter(Boolean))??[];for(const r of j9)n.includes(r)||n.push(r);return{target:e,rel:n.join(" ")}}const Lw=["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(","),E9='[aria-readonly="true"]';function Dy(e,t){let n=e;for(;n!=null&&n!==t&&n!==document.body;){if(n.matches(Lw)&&!n.matches(E9))return!0;n=n.parentElement}return!1}function $9(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 Xg({containerRef:e,interactiveRef:t,onClick:n,href:r,target:s,disabled:a=!1}){x.useEffect(()=>{const l=e.current;l&&l.setAttribute("data-pressable-container","true")},[e]);const i=x.useCallback(l=>{if(a)return;const c=e.current;if(!c||$9(c))return;const d=l.target;if(d instanceof Element&&!(d!==l.currentTarget&&Dy(d,c))&&(n==null||n(l),!l.defaultPrevented&&(r!=null&&(s==="_blank"||l.ctrlKey||l.metaKey?window.open(r,"_blank","noopener"):t!=null&&t.current?t.current.click():window.location.href=r),r==null&&n==null&&(t!=null&&t.current)))){const f=new MouseEvent("click",{bubbles:l.bubbles,cancelable:l.cancelable,ctrlKey:l.ctrlKey,metaKey:l.metaKey,shiftKey:l.shiftKey,altKey:l.altKey,button:l.button});t.current.dispatchEvent(f),l.stopPropagation()}},[e,t,n,r,s,a]),o=x.useCallback(l=>{if(a)return;const c=e.current;if(!c)return;const d=l.target;if(!(d instanceof Element))return;l.button===1&&r!=null&&(d===l.currentTarget||!Dy(d,c))&&window.open(r,"_blank","noopener")},[e,r,a]);return{onClick:i,onMouseUp:o}}const C9=new Set(["option","tab","row","gridcell","columnheader","rowheader","treeitem"]),en={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}},Iy={lineClamp:e=>[{kJFfOR:e!=null?"x1yhjpo9":e,$$css:!0},{"--x-WebkitLineClamp":e??void 0}]},T9={compact:{k8WAf4:"xu0wf1k",$$css:!0},balanced:{k8WAf4:"xce4md1",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"xrrkdod",$$css:!0}};function Ho({as:e="div",marker:t,startContent:n,label:r,description:s,endContent:a,align:i="center",density:o="balanced",labelLines:l,descriptionLines:c,onClick:d,interactiveRef:f,href:h,target:p,rel:m,isHighlighted:k=!1,isSelected:b=!1,isDisabled:g=!1,xstyle:y,className:v,style:w,ref:S,role:j,...C}){const $=Bo(),A=f!=null,E=x.useRef(null),{onClick:z}=Xg({containerRef:E,interactiveRef:f??void 0,disabled:g});Zf("Item","`interactiveRef` is mutually exclusive with `onClick`/`href`. In delegation mode the row only forwards clicks to the referenced control, so `onClick`/`href` are ignored. Drop one of them.",A&&(d!=null||h!=null));const N=d!=null||h!=null||A,{target:T,rel:R}=Iw(p,m),_=j!=null,M=j!=null&&C9.has(j),D=typeof r=="string",I=typeof s=="string",O=l!=null?l===1?en.labelSingleTruncate:en.labelMultiTruncate:D?en.labelSingleTruncate:null,L=c!=null?c===1?en.descriptionSingleTruncate:en.descriptionMultiTruncate:I?en.descriptionSingleTruncate:null,H=u.jsxs(u.Fragment,{children:[u.jsx("span",{...B(en.label,O,l!=null&&l>1&&Iy.lineClamp(l)),children:r}),s!=null&&u.jsx("span",{...B(en.description,L,c!=null&&c>1&&Iy.lineClamp(c)),children:s})]}),F=J=>{g||J.target.closest("button, a, input, select, textarea")||d==null||d(J)},V=u.jsxs(u.Fragment,{children:[t,n!=null&&u.jsx("span",{className:"x3psx0u x78zum5",children:n}),_||A?u.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!g<<0],children:H}):h!=null?u.jsx($,{href:h,target:T,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:H}):d!=null?u.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:H}):u.jsx("span",{...{0:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h"},1:{className:"x78zum5 xdt5ytf x98rzlu xeuugli x1yc453h xbyyjgo"}}[!!g<<0],children:H}),a!=null&&u.jsx("span",{...{0:{className:"x3psx0u x78zum5 xvc5jky"},1:{className:"x3psx0u x78zum5 xvc5jky xbyyjgo"}}[!!g<<0],children:a})]});return u.jsx(e,{ref:A?Wt(S,E):S,...C,"aria-selected":M&&b||void 0,"aria-current":C["aria-current"]??(b&&!M?!0:void 0),"aria-disabled":g||void 0,...P(U("item",{density:o,align:i}),B(en.root,T9[o],i==="start"&&en.alignStart,N&&en.interactive,N&&en.focusVisibleOutline,k&&en.highlighted,b&&en.selected,g&&!_&&en.disabled,y),v,w),role:j,onClick:A?z:_?d:N?F:void 0,children:V})}Ho.displayName="Item";const Hc=x.createContext(null);Hc.displayName="DropdownMenuContext";function Bw(){return x.use(Hc)}const M9=x.createContext(null);M9.displayName="DropdownMenuRadioGroupContext";function Hw(e,t){if(t||e.pointerType!=="mouse")return;const n=e.currentTarget;n!==n.ownerDocument.activeElement&&n.focus()}const Ly={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}},N9={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}};function Ep({icon:e,label:t,description:n,onClick:r,isDisabled:s=!1,endContent:a,xstyle:i,className:o,style:l}){const c=Bw(),d=(c==null?void 0:c.menuSize)??"md",f=x.useCallback(()=>{s||!r||(r(),c==null||c.closeMenu())},[s,r,c]),h=x.useCallback(p=>Hw(p,s),[s]);return u.jsx(Ho,{role:"menuitem",tabIndex:s?void 0:-1,onPointerMove:h,startContent:e?ss(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:a,onClick:f,isDisabled:s,xstyle:[Ly.root,N9[d],s&&Ly.disabled,i],...P(U("dropdown-menu-item",{size:d}),{className:o,style:l})})}Ep.displayName="DropdownMenuItem";function A9(e){const{show:t,hide:n,isOpen:r,isEnabled:s,showDelay:a=150,hideDelay:i=200}=e,o=Io("(hover: hover)"),l=x.useRef(null),c=x.useRef(null),d=x.useRef(null),f=x.useRef(!1),h=x.useRef(!1),p=x.useRef(r);p.current&&!r&&(f.current=!1),p.current=r;const m=x.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null),c.current&&(clearTimeout(c.current),c.current=null)},[]),{listRef:k,handleKeyDown:b,focusFirst:g}=Vf({onEscape:()=>{m(),n()}});x.useEffect(()=>()=>m(),[m]);const y=x.useCallback(()=>{m(),r?(h.current=!0,n()):(h.current=!1,t(),requestAnimationFrame(()=>g()))},[r,m,t,n,g]),v=x.useCallback(()=>{if(o){if(h.current){h.current=!1;return}f.current=!0,m(),a>0?l.current=setTimeout(()=>{t({skipAutoFocus:!0})},a):t({skipAutoFocus:!0})}},[o,m,t,a]),w=x.useCallback(()=>{f.current&&(m(),c.current=setTimeout(()=>{n()},i))},[m,n,i]),S=x.useCallback(()=>{m()},[m]),j=x.useCallback(E=>{d.current=E},[]),C=x.useCallback(()=>{},[]),$=x.useCallback(E=>{},[]),A=x.useCallback(E=>{},[]);return s?{triggerProps:{onClick:y,onMouseEnter:v,onMouseLeave:w},contentProps:{onMouseEnter:S,onMouseLeave:w,onKeyDown:b},menuRef:k,focusFirst:g,setTriggerEl:j}:{triggerProps:{onClick:C,onMouseEnter:C,onMouseLeave:C},contentProps:{onMouseEnter:C,onMouseLeave:C,onKeyDown:A},menuRef:k,focusFirst:g,setTriggerEl:$}}const Wf=new Set(["menuitem","menuitemradio","menuitemcheckbox"]),Zg=[...Wf].map(e=>`[role="${e}"]:not([aria-disabled="true"])`).join(","),Wg='[role="menu"]',Jh={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}},z9={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},R9={keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},By={popover:{k7Eaqz:"x5w4yej",keTefX:"x11g1kdw",k71WvV:"xnur1sd",$$css:!0},popoverCustomWidth:e=>[R9,{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 qw(e){const{icon:t,label:n,description:r,isDisabled:s=!1,hasSpinner:a=!1,menuWidth:i,onOpenChange:o,children:l,xstyle:c,className:d,style:f,"data-testid":h,menuDataTestId:p}=e,m=Bw(),k=(m==null?void 0:m.menuSize)??"md",b=!s,g=x.useId(),y=x.useId(),v=x.useRef(null),[w,S]=x.useState(!1),j=Lc({mode:"context",lightDismiss:!1,onShow:x.useCallback(()=>{S(!0),o==null||o(!0)},[o]),onHide:x.useCallback(()=>{S(!1),o==null||o(!1)},[o])}),C=x.useCallback(()=>{b&&j.show()},[b,j]),$=x.useCallback(()=>{j.hide()},[j]),{listRef:A,handleKeyDown:E,focusFirst:z,focusItem:N,ownsEvent:T,getItems:R}=Vf({itemSelector:Zg,boundarySelector:Wg,wrap:!1,onEscape:()=>O({focusTrigger:!0})}),_=Vg({getItemLabels:()=>R().map(G=>G.textContent),onMatch:N,getCurrentIndex:()=>R().findIndex(G=>G===document.activeElement||G.contains(document.activeElement))}),{triggerProps:M,contentProps:D}=A9({show:C,hide:$,isOpen:w,isEnabled:b}),I=x.useCallback(G=>{b&&(j.show(),G!=null&&G.focusFirst&&requestAnimationFrame(()=>{var ce;z()||(ce=A.current)==null||ce.focus()}))},[b,j,z,A]),O=x.useCallback(G=>{var ae;j.hide(),(G==null?void 0:G.focusTrigger)!==!1&&((ae=v.current)==null||ae.focus())},[j]),L=x.useCallback(G=>{v.current=G,j.ref(G)},[j]),H=x.useCallback(()=>{s||(w?O({focusTrigger:!0}):I({focusFirst:!0}))},[s,w,I,O]),F=x.useCallback(G=>{if(s)return;const ce=(typeof window<"u"&&v.current?window.getComputedStyle(v.current).direction==="rtl":!1)?"ArrowLeft":"ArrowRight";(G.key===ce||G.key==="Enter"||G.key===" ")&&(G.preventDefault(),G.stopPropagation(),I({focusFirst:!0}))},[s,I]),V=x.useCallback(G=>Hw(G,s),[s]),J=x.useCallback(G=>{if(!T(G))return;if(G.key==="Escape"){G.preventDefault(),G.stopPropagation(),O({focusTrigger:!0});return}if(G.key==="Enter"||G.key===" "){G.preventDefault();const ve=document.activeElement;ve&&Wf.has(ve.getAttribute("role")??"")&&ve.click();return}const ce=(typeof window<"u"&&A.current?window.getComputedStyle(A.current).direction==="rtl":!1)?"ArrowRight":"ArrowLeft";if(G.key===ce){G.preventDefault(),O({focusTrigger:!0});return}if(_.onKeyDown(G)){G.preventDefault();return}E(G)},[T,O,E,_,A]),W=x.useMemo(()=>({menuSize:k,closeMenu:()=>{O({focusTrigger:!1}),m==null||m.closeMenu()}}),[k,O,m]),ne=a?u.jsx("span",{...P(U("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:u.jsx(mr,{size:"sm"})}):u.jsx("span",{...P(U("dropdown-menu-indicator-icon"),{className:"x78zum5 x6s0dn4"}),children:u.jsx(Ee,{icon:"chevronRight",size:"sm",color:"secondary"})}),Y=i?By.popoverCustomWidth(i):By.popover;return u.jsxs(u.Fragment,{children:[u.jsx(Ho,{ref:G=>L(G),id:y,role:"menuitem",tabIndex:s?void 0:-1,"aria-haspopup":"menu","aria-expanded":w,"aria-controls":w?g:void 0,"aria-disabled":s||void 0,"data-testid":h,onMouseEnter:M.onMouseEnter,onMouseLeave:M.onMouseLeave,onPointerMove:V,startContent:t?ss(t,{size:"sm",color:"secondary"}):void 0,label:n,description:r,endContent:ne,onClick:H,onKeyDown:F,isDisabled:s,xstyle:[Jh.root,z9[k],w&&Jh.open,s&&Jh.disabled,c],...P(U("dropdown-menu-item",{size:k}),{className:d,style:f})}),j.render(u.jsx("div",{ref:A,id:g,role:"menu",tabIndex:-1,"aria-labelledby":y,onKeyDown:J,onMouseEnter:D.onMouseEnter,onMouseLeave:D.onMouseLeave,"data-testid":p,...P(U("dropdown-menu"),{className:"x9f619 x78zum5 xdt5ytf x1lsbc85 xuyqlj2 x1odjw0f x1fcsqxe xgory14 x9epnlk x1n97fys x1prclbq x1i5ehqx x1hc1fzr x19991ni xuedmi6 xlr8y92"}),children:u.jsx(Hc,{value:W,children:l})}),{placement:"end",alignment:"start",xstyle:[Y,Qr.end]})]})}qw.displayName="DropdownMenuSubMenu";const _9={divider:{kqGvvJ:"xsq74q5",$$css:!0}};function ex(e){return`item-${e.label}`}function O9(e,t){return`section-${e.title??t}`}function Kg(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];"type"in r&&r.type==="divider"?t.push(u.jsx(nc,{xstyle:_9.divider,...U("dropdown-menu-divider")},`divider-${n}`)):"type"in r&&r.type==="section"?t.push(u.jsxs("div",{role:"group","aria-label":r.title,children:[r.title&&u.jsx("div",{"aria-hidden":"true",...P(U("dropdown-menu-section-heading"),{className:"xu0wf1k xf314gf x9ynric x141an7d x1ltkj2j xv1l7n4 x87ps6o"}),children:r.title}),r.items.map(s=>u.jsx(Ep,{icon:s.icon,label:s.label,onClick:s.onClick,isDisabled:s.isDisabled},ex(s)))]},O9(r,n))):"type"in r||(r.items&&r.items.length>0?t.push(u.jsx(qw,{icon:r.icon,label:r.label,isDisabled:r.isDisabled,children:Kg(r.items)},ex(r))):t.push(u.jsx(Ep,{icon:r.icon,label:r.label,onClick:r.onClick,isDisabled:r.isDisabled},ex(r))))}return t}function D9(e){return typeof e=="string"||typeof e=="number"}function Hy(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function qo({children:e,anchorRef:t,content:n,placement:r="above",alignment:s="center",delay:a=200,hideDelay:i=0,focusTrigger:o="auto",isEnabled:l=!0,onOpenChange:c,hasHoverIndication:d="auto",isOpen:f,isDefaultOpen:h}){const p=x.useRef(null),m=e!=null?D9(e):!1,k=d===!0||d==="auto"&&m,b=x.useCallback(()=>{c==null||c(!0)},[c]),g=x.useCallback(()=>{c==null||c(!1)},[c]),y=rs({placement:r,alignment:s,delay:a,hideDelay:i,focusTrigger:o,isEnabled:l,isOpen:f,isDefaultOpen:h,onShow:b,onHide:g});return Jr(()=>{if(!t)return;const v=t.current;if(!v)return;y.ref(v);const w=v.getAttribute("aria-describedby");return v.setAttribute("aria-describedby",Hy(w,y.describedBy)??""),()=>{y.ref(null),w?v.setAttribute("aria-describedby",w):v.removeAttribute("aria-describedby")}},[t,y.ref,y.describedBy]),Jr(()=>{if(t||m)return;const v=p.current;if(!v)return;const w=v.firstElementChild;if(!w)return;y.ref(w);const S=w.getAttribute("aria-describedby");return w.setAttribute("aria-describedby",Hy(S,y.describedBy)??""),()=>{y.ref(null),S?w.setAttribute("aria-describedby",S):w.removeAttribute("aria-describedby")}},[t,m,y.ref,y.describedBy]),t&&e==null?u.jsx(u.Fragment,{children:y.renderTooltip(n)}):m?u.jsxs(u.Fragment,{children:[u.jsx("span",{ref:y.ref,tabIndex:0,"aria-describedby":y.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 xrys4gj"}}[!!k<<0],children:e}),y.renderTooltip(n)]}):u.jsxs(u.Fragment,{children:[u.jsx("div",{ref:p,className:"xjp7ctv",children:e}),y.renderTooltip(n)]})}qo.displayName="Tooltip";const Uw=Object.freeze(Object.defineProperty({__proto__:null,Tooltip:qo},Symbol.toStringTag,{value:"Module"})),I9="data-astryx-live-region",L9="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;",B9=2e3,Dd={polite:null,assertive:null};function Pw(e){const t=Dd[e];t!=null&&(clearTimeout(t),Dd[e]=null)}function H9(e,t){Pw(e),Dd[e]=setTimeout(()=>{Dd[e]=null,t.textContent=""},B9)}let dr=null;function qy(e){const t=document.createElement("div");return t.setAttribute(I9,e),t.setAttribute("aria-live",e),t.setAttribute("aria-atomic","true"),t.setAttribute("role",e==="assertive"?"alert":"status"),t.style.cssText=L9,document.body.appendChild(t),t}function q9(){return typeof document>"u"?null:dr?(dr.polite.isConnected||document.body.appendChild(dr.polite),dr.assertive.isConnected||document.body.appendChild(dr.assertive),dr):(dr={polite:qy("polite"),assertive:qy("assertive")},dr)}function U9(e,t){const n=q9();if(!n)return;const r=t==="assertive"?n.assertive:n.polite;r.textContent="",requestAnimationFrame(()=>{r.textContent=e}),H9(t,r)}function P9(e){if(Pw(e),!dr)return;const t=e==="assertive"?dr.assertive:dr.polite;t.textContent=""}function Kf(){return x.useCallback((e,t="polite")=>{if(!e){P9(t);return}U9(e,t)},[])}function F9(e){x.useEffect(()=>{if(!e)return;const t=window.scrollX,n=window.scrollY,{body:r}=document,s=r.style.overflow,a=r.style.position,i=r.style.top,o=r.style.left,l=r.style.right;return r.style.overflow="hidden",r.style.position="fixed",r.style.top=`-${n}px`,r.style.left="0",r.style.right="0",()=>{r.style.overflow=s,r.style.position=a,r.style.top=i,r.style.left=o,r.style.right=l,window.scrollTo(t,n)}},[e])}let Fw=!1;typeof window<"u"&&requestAnimationFrame(()=>{Fw=!0});const G9={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 V9(e="slideDown"){const[t]=x.useState(()=>Fw);return t?G9[e]:null}const X9=50;function Z9(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 W9={natural:10,fast:4,instant:1/0};function K9(e,t,n){const r="natural",s=W9[r],{token:a}=Pf(),i=x.useMemo(()=>{const b=Z9(a("--duration-fast-min"));if(b==null)return X9;const g=b/10;return Math.max(4,Math.round(g))},[a,r]),[o,l]=x.useState(0),c=x.useRef(e),d=x.useRef(0),f=x.useRef(0),h=x.useRef(null);c.current=e;const p=x.useRef(e.length);e.length!==p.current&&(p.current=e.length,e.length===0&&o!==0&&(d.current=0,l(0)));const m=x.useRef(t);t!==m.current&&(m.current=t,!t&&e.length>0&&(d.current=e.length,l(e.length)));const k=Io("(prefers-reduced-motion: reduce)");return x.useEffect(()=>{if(!t||r==="instant"||k)return;function b(g){if(g-f.current>=i){f.current=g;const v=c.current,w=d.current;if(w<v.length){const S=Math.min(w+s,v.length);d.current=S,l(S)}}h.current=requestAnimationFrame(b)}return h.current=requestAnimationFrame(b),()=>{h.current!==null&&(cancelAnimationFrame(h.current),h.current=null)}},[t,s,i,r,k]),!t||r==="instant"||k?e:e.slice(0,o)}const Y9=new Set(["text","password","email","number","search","tel","url","date","datetime-local","month","time","week"]),Q9=new Set(["true","menu","listbox","tree","grid","dialog"]);function J9(e){if(e.getAttribute("role")==="combobox")return!0;const t=e.getAttribute("aria-haspopup");return t!=null&&Q9.has(t)}function Gw({containerRef:e,inputRef:t,disabled:n=!1}){const r=x.useCallback(()=>{const s=t.current;s!=null&&(s instanceof HTMLElement&&J9(s)?s.click():s instanceof HTMLInputElement&&Y9.has(s.type)||s instanceof HTMLTextAreaElement?s.focus():s instanceof HTMLElement?s.click():"focus"in s&&s.focus())},[t]);return Xg({containerRef:e,interactiveRef:t,onClick:r,disabled:n})}const eT={warning:"warning",error:"error",success:"success"},tT={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function nT({status:e,statusVariant:t="attached",isInGroup:n=!1,size:r="md"}){const s=ke(),i=t==="tooltip"&&!!(e!=null&&e.message),[o,l]=x.useState(void 0),c=rs({placement:"above",isEnabled:i,isOpen:o}),d=x.useCallback(()=>{l(void 0)},[]),f=x.useCallback(()=>{typeof window>"u"||typeof window.matchMedia!="function"||!window.matchMedia("(hover: none)").matches||l(m=>m!==!0)},[]);if(x.useEffect(()=>{if(o!==!0)return;const m=k=>{k.key==="Escape"&&l(void 0)};return document.addEventListener("keydown",m),()=>document.removeEventListener("keydown",m)},[o]),!(!!e&&!n&&t!=="detached"))return{statusIcon:null,describedBy:void 0};const p=u.jsx(Ee,{icon:eT[e.type],size:r,color:e.type,...U("input-status-icon",{size:r,status:e.type})});return i?{statusIcon:u.jsxs(u.Fragment,{children:[u.jsx("button",{type:"button",ref:c.ref,"aria-label":s(tT[e.type]),"aria-describedby":c.describedBy,onClick:f,onBlur:d,className:"x3nfvp2 x6s0dn4 xl56j7k x1717udv x1ghz6dp x1heor9g x1ypdohk xjspbzw x784prv x9v5kkp xzunyri x7s97pk",children:p}),c.renderTooltip(e.message)]}),describedBy:c.describedBy}:{statusIcon:p,describedBy:void 0}}const Yg=x.createContext(null);Yg.displayName="InteractiveRoleContext";function rT(){return x.use(Yg)}function Vw({href:e,onClick:t,isDisabled:n=!1}){const r=rT();return e!=null&&!n?"link":t!=null?"button":r??"inert"}const sT=500,aT=10;function iT(e){const{onLongPress:t,disabled:n=!1,delayMs:r=sT,moveCancelPx:s=aT}=e,a=x.useRef(null),i=x.useRef(null),o=x.useRef(t);o.current=t;const l=x.useCallback(()=>{a.current!=null&&(clearTimeout(a.current),a.current=null),i.current=null},[]),c=x.useCallback(f=>{if(n||f.touches.length!==1)return;const h=f.touches[0];l(),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})},r)},[n,r,l]),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)>s||Math.abs(p.clientY-h.y)>s)&&l()},[s,l]);return x.useEffect(()=>l,[l]),{onTouchStart:c,onTouchMove:d,onTouchEnd:l,onTouchCancel:l}}const tx={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 Qg({label:e,inputID:t,labelID:n,isGroupLabel:r=!1,isLabelHidden:s=!1,isDisabled:a=!1,isOptional:i=!1,isRequired:o=!1,labelIcon:l,labelTooltip:c,description:d,descriptionID:f,className:h,style:p,xstyle:m,ref:k,...b}){const g=ke(),y=i?g("@astryx.field.optional"):o?g("@astryx.field.required"):null,v=r?"span":"label",w=!r&&t!=null,S=x.useRef(null),j=x.useMemo(()=>({get current(){var A;return t==null?null:((A=S.current)==null?void 0:A.ownerDocument.getElementById(t))??null},set current(A){}}),[t]),C=Gw({containerRef:S,inputRef:j,disabled:!w}),$=u.jsxs(u.Fragment,{children:[l&&ss(l,{size:"sm",color:"inherit"}),e,y&&u.jsxs("span",{className:"x1sodnla x141an7d x1ltkj2j xv1l7n4",children:[u.jsx("span",{"aria-hidden":"true",children:" ∙ "}),y]}),c&&u.jsx(qo,{content:c,placement:"above",children:u.jsx(Ee,{icon:"info",size:"sm",color:"inherit"})})]});return u.jsxs(u.Fragment,{children:[u.jsx(v,{ref:k,id:n,htmlFor:r?void 0:t,...b,...P(U("field-label"),B(tx.label,a&&tx.labelDisabled,s&&tx.srOnly,m),h,p),children:$}),d&&u.jsx("span",{ref:w?S:void 0,id:f,...w?C: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|!!s<<0],children:d})]})}Qg.displayName="FieldLabel";const oT={warning:"warning",error:"error",success:"success"},nx={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}},lT={warning:{kWkggS:"x24i8r5",kMwMTN:"xdhq94a",$$css:!0},error:{kWkggS:"x1pritpl",kMwMTN:"x1joocv1",$$css:!0},success:{kWkggS:"xu13z74",kMwMTN:"xltfdvo",$$css:!0}};function Jg({ref:e,type:t,message:n,id:r,variant:s="attached",xstyle:a,className:i,style:o,...l}){const c=V9("slideDown"),d=Kf();return x.useEffect(()=>{n&&d(n,t==="error"?"assertive":"polite")},[d,n,t]),u.jsx("div",{ref:e,id:r,...l,...P(U("field-status",{type:t,variant:s}),B(nx.base,c,s==="attached"?nx.attached:nx.detached,lT[t],a),i,o),children:s==="detached"?u.jsxs("span",{className:"x78zum5 x1cy8zhl xzye2dw",children:[u.jsx("span",{className:"x3nfvp2 x6s0dn4 x14o5nre x2lah0s",children:u.jsx(Ee,{icon:oT[t],size:"sm",color:"inherit",...U("field-status-icon",{type:t})})}),u.jsx("span",{children:n})]}):n})}Jg.displayName="FieldStatus";const cT={x1tspnpo:"x1tspnpo",$$css:!0},Yf=x.createContext(null);Yf.displayName="CheckboxListContext";const tn={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}},Uy={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},uT={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},dT={sm:{kzqmXN:"xsmyaan",kZKoxP:"x1kpxq89",$$css:!0},md:{kzqmXN:"x6jxa94",kZKoxP:"x1v9usgg",$$css:!0}},fT={sm:{kzqmXN:"x1fsd2vl",kZKoxP:"x36qwtl",$$css:!0},md:{kzqmXN:"xsmyaan",kZKoxP:"x36qwtl",$$css:!0}},hT={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Xw({label:e,isLabelHidden:t=!1,description:n,onChange:r,changeAction:s,isLoading:a=!1,value:i,isDisabled:o=!1,htmlName:l,disabledMessage:c,isReadOnly:d=!1,isOptional:f=!1,isRequired:h=!1,size:p="md",onFocus:m,onBlur:k,labelIcon:b,status:g,width:y,xstyle:v,className:w,style:S,ref:j,...C}){const $=x.useId(),A=x.useId(),E=x.useId(),[,z]=x.useTransition(),[N,T]=x.useOptimistic(i),R=a||N!==i,_=o&&!!c,M=x.use(Yf),D=o&&(_||((M==null?void 0:M.hasDisabledMessage)??!1)),I=rs({placement:"above",focusTrigger:"always",isEnabled:_}),O=N==="indeterminate",L=N===!0,H=L||O,F=x.useCallback(W=>{W&&(W.indeterminate=O)},[O]),V=[];n&&V.push(A),g!=null&&g.message&&V.push(E),_&&V.push(I.describedBy);const J=V.length>0?V.join(" "):void 0;return u.jsxs("div",{...P(U("checkbox-input",{size:p}),B(y!=null&&hT.width(y),v),w,S),children:[u.jsxs("div",{ref:W=>{I.interactionRef(W)},...B(tn.container,t&&tn.containerLabelHidden,!o&&cT),children:[u.jsxs("div",{...B(tn.checkboxWrapper,Uy[p]),children:[u.jsx("input",{...C,ref:Wt(j,F,I.positionRef),id:$,type:"checkbox",name:o?void 0:l,checked:L,disabled:o&&!D,"aria-disabled":D?"true":void 0,readOnly:d,required:h,onChange:W=>{if(o||R||d)return;const ne=W.target.checked;r==null||r(ne,W),s&&!W.defaultPrevented&&z(async()=>{T(ne),await s(ne,W)})},onFocus:m,onBlur:k,"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(tn.input,Uy[p],o&&tn.inputDisabled)}),u.jsx("div",{"aria-hidden":"true",...P(U("checkbox",{size:p,checked:L?"checked":O?"indeterminate":null,disabled:o?"disabled":null}),B(tn.checkbox,uT[p],!o&&tn.checkboxFocus,H?tn.checkboxChecked:tn.checkboxUnchecked,o&&tn.checkboxDisabled,o&&!H&&tn.checkboxDisabledUnchecked)),children:R?u.jsx(mr,{size:"sm",shade:"inherit"}):u.jsxs(u.Fragment,{children:[u.jsx("svg",{viewBox:"0 0 10 10",...B(tn.checkmark,dT[p],L&&tn.checkmarkVisible),children:u.jsx("path",{d:"M8.5 2.5L4 7.5L1.5 5",stroke:"currentColor",strokeWidth:"1.5",fill:"none",strokeLinecap:"round",strokeLinejoin:"round"})}),u.jsx("div",{...B(tn.indeterminateMark,fT[p],O&&tn.indeterminateMarkVisible)})]})})]}),u.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:u.jsx(Qg,{label:e,inputID:$,isLabelHidden:t,isDisabled:o,isOptional:f,isRequired:h,labelIcon:b,description:n,descriptionID:A})})]}),(g==null?void 0:g.message)&&u.jsx(Jg,{type:g.type,message:g.message,id:E,variant:"detached"}),_&&I.renderTooltip(c)]})}Xw.displayName="CheckboxInput";function Zr({icon:e,...t}){return u.jsx($e,{...t,icon:e,isIconOnly:!0})}Zr.displayName="IconButton";const Py={container:{kB7OPa:"x9f619",kZCmMZ:"x1c35znw",kwRFfy:"x64h4k7",kLKAdn:"x14m0hsi",kGO01o:"xc1wllq",$$css:!0}},xT={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}},pT={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}},gT={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}},mT={card:xT,section:pT,dialog:gT},yT={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}},bT={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}},kT={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}},vT={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}},wT={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}},ST={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}},jT={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}},ET={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}},$T={containerMaxHeight:e=>[{"--container-max-height":e!=null?"x18nyedi":e,$$css:!0},{"--x---container-max-height":e??void 0}]};function CT({padding:e="spacing4",paddingOuterX:t,paddingOuterY:n,paddingInnerX:r,paddingInnerY:s,useThemeDefault:a,maxHeight:i}){const o=t??e,l=n??e,c=r??e,d=s??e,f=i?$T.containerMaxHeight(i):null;if(a){const h=mT[a];return[Py.container,h.containerPaddingInlineStart,h.containerPaddingInlineEnd,h.containerPaddingBlockStart,h.containerPaddingBlockEnd,h.layoutPaddingOuterX,h.layoutPaddingOuterY,h.layoutPaddingInnerX,h.layoutPaddingInnerY,f]}return[Py.container,yT[o],bT[o],kT[l],vT[l],wT[o],ST[l],jT[c],ET[d],f]}const du={base:{k1xSpc:"xjp7ctv",kMwMTN:"x1tgivj0",kMv6JI:"x9ynric",$$css:!0},light:{kQNsl9:"x19aimcq",$$css:!0},dark:{kQNsl9:"xntwwlm",$$css:!0},system:{kQNsl9:"x108lcm5",$$css:!0}},$p=Lf.createContext(!1);$p.displayName="ThemeNestingContext";const rx=new Set;function TT(e){const t=x.useId();x.useInsertionEffect(()=>{if(e.__built)return;const n=`astryx-theme-${e.name}`;if(rx.has(n))return;Ig(`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:r,component:s}=y$(e);if(!(!r&&!s)){if(r){const a=document.createElement("style");a.setAttribute(gn("theme-prose"),e.name),a.setAttribute(gn("id"),t),a.textContent=`@layer reset {
|
|
82
|
-
${r}
|
|
83
|
-
}`,document.head.appendChild(a)}if(s){const a=document.createElement("style");a.setAttribute(gn("theme"),e.name),a.setAttribute(gn("id"),t),a.textContent=`@layer astryx-theme {
|
|
84
|
-
${s}
|
|
85
|
-
}`,document.head.appendChild(a)}return rx.add(n),()=>{const a=document.querySelector(`style[${gn("theme-prose")}="${e.name}"][${gn("id")}="${t}"]`),i=document.querySelector(`style[${gn("theme")}="${e.name}"][${gn("id")}="${t}"]`);a==null||a.remove(),i==null||i.remove(),rx.delete(n)}}},[e,t])}function MT(e,t,n){Jr(()=>{if(!e&&!(typeof document>"u"))return t==="light"||t==="dark"?document.documentElement.setAttribute("data-theme",t):document.documentElement.removeAttribute("data-theme"),document.documentElement.setAttribute(gn("theme"),n),()=>{document.documentElement.removeAttribute("data-theme"),document.documentElement.removeAttribute(gn("theme"))}},[e,t,n])}function Zw({theme:e,mode:t="system",children:n}){const r=x.use($p);i$(e),TT(e),MT(r,t,e.name);const s=t==="dark"?du.dark:t==="light"?du.light:du.system,a=x.useMemo(()=>({theme:e,mode:t}),[e,t]);return u.jsx(Uf,{value:a,children:u.jsx($p,{value:!0,children:u.jsx("div",{...B(du.base,s),"data-astryx-theme":e.name,"data-theme":t==="system"?void 0:t,children:n})})})}Zw.displayName="Theme";function Ww({mode:e,children:t}){return u.jsx("div",{[gn("media")]:e,className:"xjp7ctv x1tgivj0",children:t})}Ww.displayName="MediaTheme";const Kw="--color-syntax-";function NT(e){return Kw+e}const AT=Object.keys(Lg).map(e=>e.replace(Kw,""));function zT(e){const t={};for(const n of AT)t[NT(n)]=e.tokens[n];return t}const Yw=x.createContext(null);Yw.displayName="SyntaxThemeContext";function Qw({theme:e,children:t}){const n=x.useMemo(()=>zT(e),[e]),r=x.useMemo(()=>({theme:e}),[e]);return u.jsx(Yw,{value:r,children:u.jsx("div",{style:n,"data-astryx-syntax-theme":e.name,children:t})})}Qw.displayName="SyntaxTheme";function Jw({type:e,body:t,endContent:n,isAutoHide:r,autoHideDuration:s,isExiting:a=!1,onDismiss:i}){const o=ke(),l=x.useRef(null),c=x.useRef(!1),d=x.useRef(s),f=x.useRef(null),h=x.useRef(i);h.current=i;const p=x.useCallback(()=>{!r||c.current||(l.current&&clearTimeout(l.current),f.current=Date.now(),l.current=setTimeout(()=>{h.current("auto")},d.current))},[r]),m=x.useCallback(()=>{if(!(!r||c.current)&&(c.current=!0,l.current&&(clearTimeout(l.current),l.current=null),f.current!=null)){const w=Date.now()-f.current;d.current=Math.max(d.current-w,1e3)}},[r]),k=x.useCallback(()=>{!r||!c.current||(c.current=!1,p())},[r,p]);x.useEffect(()=>(d.current=s,p(),()=>{l.current&&clearTimeout(l.current)}),[s,p]),x.useEffect(()=>{if(r)return window.addEventListener("blur",m),window.addEventListener("focus",k),()=>{window.removeEventListener("blur",m),window.removeEventListener("focus",k)}},[r,m,k]);const b=x.useCallback(()=>{i("manual")},[i]),g=e==="error",{mode:y}=Pf(),v=g||y==="light"?"dark":"light";return u.jsx("div",{role:g?"alert":"status","aria-live":g?"assertive":"polite","aria-atomic":"true",onMouseEnter:m,onMouseLeave:k,onFocusCapture:m,onBlurCapture:k,...P(U("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:u.jsx(Ww,{mode:v,children:u.jsxs("div",{className:"x78zum5 x1cy8zhl xjcht0a xh8yej3",children:[u.jsx("div",{className:"x98rzlu xeuugli",children:t}),u.jsxs("div",{className:"x2lah0s x78zum5 x6s0dn4 x1txdalj xacfrgf xmequkd",children:[n,u.jsx($e,{variant:"ghost",size:"sm",icon:u.jsx(Ee,{icon:"close",size:"sm",color:"inherit"}),label:o("@astryx.toast.dismiss"),onClick:b,isIconOnly:!0})]})]})})})}Jw.displayName="Toast";const Qf=x.createContext(null);Qf.displayName="ToastContext";const ol={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 Cp(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(Cp).filter(Boolean).join(" ");if(x.isValidElement(e)){const{children:t}=e.props;return Cp(t)}return""}function em({position:e="bottomEnd",maxVisible:t=5,inset:n,isTopLayer:r=!0,children:s}){const a=ke(),[i,o]=x.useState([]),[l,c]=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),k=x.useRef(null),b=x.useCallback(z=>{if(!z)return null;const N=z.querySelectorAll(Lw);for(const T of N)if(!(T.getAttribute("tabindex")==="-1"||T.hasAttribute("disabled")||T.getAttribute("aria-disabled")==="true"))return T;return null},[]),g=Kf(),y=x.useCallback(z=>{const{uniqueID:N,collisionBehavior:T="overwrite"}=z.options;if(N&&T==="ignore"&&d.current.some(_=>_.options.uniqueID===N))return;const R=Cp(z.options.body);R&&g(R,z.options.type==="error"?"assertive":"polite"),o(_=>N&&_.find(D=>D.options.uniqueID===N)?_.map(D=>D.options.uniqueID===N?z:D):[..._,z])},[g]),v=x.useCallback((z,N)=>{var D,I;if(h.current.has(z))return;h.current.add(z);const T=d.current.find(O=>O.id===z);T&&((I=(D=T.options).onHide)==null||I.call(D,N));const R=f.current,_=document.activeElement,M=(R==null?void 0:R.querySelector(`[data-toast-id="${z}"]`))??null;if(M&&_ instanceof Node&&M.contains(_))if(m.current=z,d.current.filter(L=>L.id!==z).length>0){const L=d.current.findIndex(F=>F.id===z),H=d.current[L+1]??d.current[L-1];k.current=H?H.id:"restore"}else k.current="restore";c(O=>O.has(z)?O:new Set(O).add(z))},[]),w=x.useCallback(z=>{h.current.delete(z),c(N=>{if(!N.has(z))return N;const T=new Set(N);return T.delete(z),T}),o(N=>N.filter(T=>T.id!==z))},[]);x.useLayoutEffect(()=>{const z=m.current,N=k.current;if(z==null||N==null||i.some(_=>_.id===z))return;m.current=null,k.current=null;const T=f.current;if(N!=="restore"&&T){const _=T.querySelector(`[data-toast-id="${N}"]`),M=b(_)??_;if(M){M.focus();return}}const R=p.current;p.current=null,R&&R.isConnected?R.focus():T&&T.focus()},[i,b]);const S=x.useCallback(z=>d.current.find(N=>N.options.uniqueID===z),[]),j=x.useMemo(()=>({addToast:y,removeToast:v,findByUniqueID:S}),[y,v,S]),C=i.slice(-t),$={};n!=null&&n.top&&($.top=n.top),n!=null&&n.bottom&&($.bottom=n.bottom),n!=null&&n.start&&($.insetInlineStart=n.start),n!=null&&n.end&&($.insetInlineEnd=n.end),x.useEffect(()=>{if(!r)return;const z=f.current;if(z&&typeof z.showPopover=="function")try{z.showPopover()}catch{}},[r]);const A=i.length>0;x.useEffect(()=>{if(!A)return;const z=N=>{if(N.key!=="F6")return;const T=f.current;if(!T)return;const R=document.activeElement;if(R instanceof Node&&T.contains(R))return;N.preventDefault(),R instanceof HTMLElement&&(p.current=R);const _=T.querySelectorAll("[data-toast-id]"),M=_[_.length-1]??null;(b(M)??M??T).focus()};return document.addEventListener("keydown",z),()=>{document.removeEventListener("keydown",z)}},[A,b]);const E=e==="topEnd"?ol.topEnd:e==="topStart"?ol.topStart:e==="bottomStart"?ol.bottomStart:ol.bottomEnd;return u.jsxs(Qf,{value:j,children:[s,u.jsx("div",{ref:f,role:"region","aria-label":a("@astryx.toast.viewport"),tabIndex:-1,popover:r?"manual":void 0,...P(B(ol.viewport,E),{style:Object.keys($).length>0?$:void 0}),children:C.map(z=>{const N=z.options,T=N.type??"info",R=N.isAutoHide??T!=="error",_=N.autoHideDuration??5e3,M=l.has(z.id);return u.jsx("div",{"data-toast-id":z.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"}}[!!M<<0],onTransitionEnd:M?D=>{D.propertyName==="grid-template-rows"&&w(z.id)}:void 0,children:u.jsx("div",{className:"xb3r6kr",children:u.jsx(Jw,{type:T,body:N.body,endContent:N.endContent,isAutoHide:R,autoHideDuration:_,isExiting:M,onDismiss:D=>v(z.id,D)})})},z.id)})})]})}em.displayName="ToastViewport";const Fy='button, [role="button"]';function Gy(e){return e.matches(Fy)?e:e.querySelector(Fy)}const ys={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 e3({children:e,anchorRef:t,content:n,placement:r="below",alignment:s="start",isOpen:a,onOpenChange:i,isEnabled:o=!0,width:l,label:c,role:d="dialog",isModal:f,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:m,hasLightDismiss:k=!0,hasEscapeDismiss:b=!0,xstyle:g,className:y,style:v,"data-testid":w}){const S=x.useRef(null),j=a!==void 0,C=x.useRef(0),$=x.useCallback(()=>{i==null||i(!0)},[i]),A=x.useCallback(()=>{C.current=Date.now(),i==null||i(!1)},[i]),E=Bc({dialogLabel:c,role:d,isModal:f,hasLightDismiss:k,hasEscapeDismiss:b,hasCloseButton:h,closeButtonLabel:p,hasAutoFocus:m,onShow:$,onHide:A}),z=x.useCallback(()=>{o&&(Date.now()-C.current<50||E.toggle())},[o,E]),N=x.useCallback(M=>{(M.key==="Enter"||M.key===" ")&&(M.preventDefault(),z())},[z]),T=x.useCallback(M=>{M.setAttribute("aria-haspopup",E.triggerProps["aria-haspopup"]),M.setAttribute("aria-expanded",String(E.triggerProps["aria-expanded"])),M.setAttribute("aria-controls",E.triggerProps["aria-controls"]),M.addEventListener("click",z);const D=M.tagName!=="BUTTON"&&M.getAttribute("role")==="button";return D&&M.addEventListener("keydown",N),()=>{M.removeAttribute("aria-haspopup"),M.removeAttribute("aria-expanded"),M.removeAttribute("aria-controls"),M.removeEventListener("click",z),D&&M.removeEventListener("keydown",N)}},[E,z,N]);Jr(()=>{if(!t)return;const M=t.current;if(!M)return;const D=Gy(M);if(D||Ba(),!D)return;E.triggerRef(M);const I=T(D);return()=>{E.triggerRef(null),I()}},[t,E,T]),Jr(()=>{if(t||typeof e=="function")return;const M=S.current;if(!M)return;E.triggerRef(M);const D=Gy(M);if(D||Ba(),!D)return;const I=T(D);return()=>{E.triggerRef(null),I()}},[t,E,T]),Jr(()=>{j&&(a&&!E.isOpen?E.show():!a&&E.isOpen&&E.hide())},[a,j,E]);const R=l?ys.customWidth(l):ys.matchTrigger;if(t&&e==null)return u.jsx(u.Fragment,{children:E.render(u.jsx("div",{"data-testid":w,...P(U("popover"),B(ys.contentPadding,g),y,v),children:n}),{placement:r,alignment:s,xstyle:[R,ys.gap,Qr[r]]})});if(typeof e=="function"){const M={ref:E.triggerRef,onClick:z,"aria-haspopup":"dialog","aria-expanded":E.isOpen,"aria-controls":E.id};return u.jsxs(u.Fragment,{children:[e(M),E.render(u.jsx("div",{"data-testid":w,...P(U("popover"),B(ys.contentPadding,g),y,v),children:n}),{placement:r,alignment:s,xstyle:[R,ys.gap,Qr[r]]})]})}return u.jsxs(u.Fragment,{children:[u.jsx(Yg,{value:"button",children:u.jsx("div",{ref:S,className:"x3nfvp2",children:e})}),E.render(u.jsx("div",{"data-testid":w,...P(U("popover"),B(ys.contentPadding,g),y,v),children:n}),{placement:r,alignment:s,xstyle:[R,ys.gap,Qr[r]]})]})}e3.displayName="Popover";const sx={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 RT(e){return e.hasAttribute("tabindex")?e.tabIndex>=0:["A","BUTTON","INPUT","SELECT","TEXTAREA"].includes(e.tagName)?!e.disabled:!!e.isContentEditable}function _T(e={}){const{placement:t="above",alignment:n="center",delay:r=300,hideDelay:s=200,focusTrigger:a="auto",isEnabled:i=!0,label:o,isOpen:l,isDefaultOpen:c=!1,onShow:d,onHide:f}=e,h=t==="above"||t==="below"?sx.marginBlock:sx.marginInline,p=Lc({mode:"context",onShow:d,onHide:f}),m=x.useMemo(()=>[sx.container,h],[h]),k=x.useRef(null),b=x.useRef(null),g=x.useRef(null),y=x.useRef(!1),v=x.useRef(!1),w=x.useCallback(()=>{k.current&&(clearTimeout(k.current),k.current=null),b.current&&(clearTimeout(b.current),b.current=null)},[]),S=x.useCallback(()=>{!i||l===!1||(w(),k.current=setTimeout(()=>{p.show()},r))},[i,l,w,p,r]),j=x.useCallback(()=>{l!==!0&&(w(),b.current=setTimeout(()=>{y.current||p.hide()},s))},[l,w,p,s]),C=x.useCallback(()=>{S()},[S]),$=x.useCallback(()=>{j()},[j]),A=x.useCallback(()=>{if(i){if(v.current){v.current=!1;return}w(),p.show()}},[i,w,p]),E=x.useCallback(_=>{const M=_.relatedTarget,D=document.getElementById(p.id);D!=null&&D.contains(M)||j()},[p.id,j]),z=x.useCallback(_=>{_.key==="Escape"&&(_.stopPropagation(),w(),p.hide())},[w,p]),N=x.useCallback(_=>{g.current&&(g.current.removeEventListener("mouseenter",C),g.current.removeEventListener("mouseleave",$),g.current.removeEventListener("focusin",A),g.current.removeEventListener("focusout",E),g.current.removeEventListener("keydown",z)),_&&(_.addEventListener("mouseenter",C),_.addEventListener("mouseleave",$),(a==="always"||a==="auto"&&RT(_))&&(_.addEventListener("focusin",A),_.addEventListener("focusout",E)),_.addEventListener("keydown",z)),g.current=_},[a,C,$,A,E,z]),T=x.useCallback(_=>{p.ref(_),N(_)},[p,N]);x.useEffect(()=>()=>{w()},[w]),x.useEffect(()=>{c&&p.show()},[]),x.useEffect(()=>{l!==void 0&&(l?(w(),p.show()):(w(),p.hide()))},[l,w,p]);const R=x.useCallback((_,M)=>{const D=(M==null?void 0:M.placement)??t,I=U("hovercard").className,O={placement:D,alignment:(M==null?void 0:M.alignment)??n,role:o?"dialog":"group","aria-label":o||void 0,xstyle:[m,Qr[D],M==null?void 0:M.xstyle],className:M!=null&&M.className?`${I} ${M.className}`:I,style:M==null?void 0:M.style,as:"span"};return p.render(u.jsx("span",{className:"x1lliihq x1vlblms xvmdzux x126nfab x1t818jl",onMouseEnter:()=>{y.current=!0,w()},onMouseLeave:()=>{y.current=!1,j()},onKeyDown:L=>{var H;L.key==="Escape"&&(L.stopPropagation(),v.current=!0,w(),p.hide(),(H=g.current)==null||H.focus())},onBlur:L=>{var V;const H=L.relatedTarget;L.currentTarget.contains(H)||(V=g.current)!=null&&V.contains(H)||j()},children:_}),O)},[p,t,n,o,w,j,m]);return{ref:T,positionRef:p.ref,interactionRef:N,anchorId:p.anchorId,describedBy:p.id,renderHoverCard:R,show:p.show,hide:p.hide}}function OT(e){return typeof e=="string"||typeof e=="number"}function DT(...e){const t=e.filter(Boolean);return t.length>0?t.join(" "):void 0}function t3({children:e,content:t,placement:n="above",alignment:r="center",delay:s=300,hideDelay:a=200,focusTrigger:i="auto",isEnabled:o=!0,label:l,onOpenChange:c,hasHoverIndication:d="auto",isOpen:f,isDefaultOpen:h,xstyle:p,className:m,style:k}){const b=x.useRef(null),g=OT(e),y=d===!0||d==="auto"&&g,v=x.useCallback(()=>{c==null||c(!0)},[c]),w=x.useCallback(()=>{c==null||c(!1)},[c]),S=_T({placement:n,alignment:r,delay:s,hideDelay:a,focusTrigger:i,isEnabled:o,label:l,isOpen:f,isDefaultOpen:h,onShow:v,onHide:w});Jr(()=>{if(g)return;const C=b.current;if(!C)return;const $=C.firstElementChild;if(!$)return;S.ref($);const A=$.getAttribute("aria-describedby");return $.setAttribute("aria-describedby",DT(A,S.describedBy)??""),()=>{S.ref(null),A?$.setAttribute("aria-describedby",A):$.removeAttribute("aria-describedby")}},[g,S.ref,S.describedBy]);const j=S.renderHoverCard(t,{xstyle:p,className:m,style:k});return g?u.jsxs(u.Fragment,{children:[u.jsx("span",{ref:S.ref,tabIndex:0,"aria-describedby":S.describedBy,...{0:{className:"xt0psk2"},1:{className:"xt0psk2 xujl8zx xev0dqp xycaml9 x11b3rvo"}}[!!y<<0],children:e}),j]}):u.jsxs(u.Fragment,{children:[u.jsx("span",{ref:b,className:"xjp7ctv",children:e}),j]})}t3.displayName="HoverCard";const Vy=new Map,IT=/\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/,LT=/\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/,BT=/\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/,HT=/\b(important|inherit|initial|unset|revert|auto|none)\b/,qT=/\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/,UT=/\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 n3(e){const t=Vy.get(e);if(t!==void 0)return t;const n=PT(e);return Vy.set(e,n),n}function PT(e){const t=FT(e);return t?{defaultType:t.defaultType,patterns:t.patterns.map(n=>{const r=n.regex.flags.replace(/[gy]/g,"")+"y";return{...n,anchored:new RegExp(n.regex.source,r)}})}:null}function FT(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:IT},{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:HT},{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:LT},{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:BT},{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:qT},{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:UT},{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 Xy=2e3,GT=800;async function VT(){return typeof scheduler<"u"&&typeof scheduler.yield=="function"?scheduler.yield():new Promise(e=>setTimeout(e,0))}function r3(e,t,n,r){const s=[];let a=n;const i=Math.min(r,e.length);for(;a<i;){let o=!1;for(const l of t.patterns){l.anchored.lastIndex=a;const c=l.anchored.exec(e);if(c&&c.index===a&&c[0].length>0){l.type!==t.defaultType&&s.push({type:l.type,start:a-n,end:a-n+c[0].length}),a+=c[0].length,o=!0;break}}o||a++}return s}function XT(e,t){const n=n3(t);if(!n)return[];const r=[];let s=0;for(let a=0;a<=e.length;a++)(a===e.length||e[a]===`
|
|
86
|
-
`)&&(r.push(r3(e,n,s,a)),s=a+1);return r}async function ZT(e,t,n){const r=n3(t);if(!r)return[];const s=[];let a=0,i=0;for(let o=0;o<=e.length;o++)if((o===e.length||e[o]===`
|
|
87
|
-
`)&&(s.push(r3(e,r,a,o)),i+=o-a+1,a=o+1,i>=GT&&o<e.length)){if(n!=null&&n.aborted)return s;i=0,await VT()}return s}function WT(e,t){const n=[0];for(let a=0;a<t.length;a++)t[a]===`
|
|
88
|
-
`&&n.push(a+1);const r=Array.from({length:n.length},()=>[]);let s=0;for(const a of e){for(;s<n.length-1&&a.start>=n[s+1];)s++;const i=n[s];r[s].push({type:a.type,start:a.start-i,end:a.end-i})}return r}const KT=`:root {
|
|
89
|
-
${Object.entries(Lg).map(([e,t])=>` ${e}: ${t};`).join(`
|
|
90
|
-
`)}
|
|
91
|
-
}`,YT=`
|
|
92
|
-
${KT}
|
|
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 Zy=!1;function Jf(){if(Zy||typeof document>"u")return;const e=document.createElement("style");e.setAttribute("data-astryx-highlight-styles",""),e.textContent=YT,document.head.appendChild(e),Zy=!0}const QT=["keyword","string","comment","number","function","type","tag","attribute","property","operator","constant","punctuation","variable"],Wy=new Set(QT);let fu=null;function JT(e){if(Wy.has(e)||(Wy.add(e),Jf(),typeof document>"u"))return;if(!fu){const r=document.createElement("style");if(r.setAttribute("data-astryx-highlight-dynamic",""),document.head.appendChild(r),fu=r.sheet??null,!fu)return}const t=`astryx-${e}`,n=`var(--color-syntax-${e}, currentColor)`;fu.insertRule(`.astryx-codeblock code::highlight(${t}), .astryx-codeeditor code::highlight(${t}) { color: ${n}; }`)}function eM(){const e=new Map;return t=>{let n=e.get(t);if(n)return n;JT(t);const r=`astryx-${t}`;return n=CSS.highlights.get(r),n||(n=new Highlight,CSS.highlights.set(r,n)),e.set(t,n),n}}function s3(e,t,n,r){if(t.length===0)return;const s=e.firstChild;if(!s||s.nodeType!==Node.TEXT_NODE)return;const a=s.length;for(const i of t){if(i.start>=a||i.end<=0)continue;const o=Math.min(i.start,a),l=Math.min(i.end,a),c=r(i.type);try{const d=new Range;d.setStart(s,o),d.setEnd(s,l),c.add(d),n.push({range:d,highlight:c})}catch{}}}function ax(e){for(const{range:t,highlight:n}of e)n.delete(t)}function tM(e,t,n,r){const s=[],a=e.querySelectorAll("[data-line]");for(let i=0;i<a.length;i++){const o=n+i,l=t[o];l&&l.length>0&&s3(a[i],l,s,r)}return s}function nM(e,t){Jf();const n=eM(),r=[],s=[];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")&&(r.push(f),s.push(a),a+=h.length)}if(r.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&&s3(f[h],p,d,n)}return()=>ax(d)}const i=new Map,o=new Map;function l(d,f){if(i.has(d))return;const h=tM(d,t,s[f],n);i.set(d,h)}function c(d){const f=i.get(d);f&&(ax(f),i.delete(d))}for(let d=0;d<r.length;d++){const f=r[d],h=m=>{m.skipped?c(f):l(f,d)};f.addEventListener("contentvisibilityautostatechange",h),o.set(f,h);const p=f;typeof p.checkVisibility=="function"?p.checkVisibility({checkVisibilityCSS:!0,contentVisibilityAuto:!0})&&l(f,d):d<5&&l(f,d)}return function(){for(const[f,h]of o)f.removeEventListener("contentvisibilityautostatechange",h);o.clear();for(const f of i.values())ax(f);i.clear()}}const rM={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}},sM={"--_codeblock-gutter-width":"xtk08jq",$$css:!0},tm={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=>[sM,{"--x---_codeblock-gutter-width":`${e}ch`!=null?`${e}ch`:void 0}]},es={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}},aM=20,iM=100,Ky=x.memo(function({lines:t,startIndex:n,highlightSet:r,renderLineContent:s,lineNumbers:a}){return u.jsx(u.Fragment,{children:t.map((i,o)=>{const l=n+o;return u.jsx("div",{"data-line":l+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|!!((r==null?void 0:r.has(l+1))??!1)<<0],children:s(i,l)},l)})})});function a3(e,t,n,r,s=aM){if(s=Math.max(1,Math.floor(s)),e.length<iM)return u.jsx(Ky,{lines:e,startIndex:0,highlightSet:t,renderLineContent:n,lineNumbers:r});const a=[];for(let i=0;i<e.length;i+=s){const o=Math.min(i+s,e.length),l=e.slice(i,o),c=`${l.length}lh`;a.push(u.jsx("div",{...P({className:"xb5mbof"},{style:{containIntrinsicBlockSize:`auto ${c}`}}),children:u.jsx(Ky,{lines:l,startIndex:i,highlightSet:t,renderLineContent:n,lineNumbers:r})},i))}return a}function i3(){return typeof CSS<"u"&&"highlights"in CSS&&typeof Highlight<"u"}function oM(){if(typeof navigator>"u")return!1;const e=navigator.userAgent;return e.includes("AppleWebKit")&&!e.includes("Chrome")}function lM(e,t,n){const[r,s]=x.useState(null),a=x.useMemo(()=>n?WT(n(e,t),e):e.length>=Xy?null:XT(e,t),[e,t,n]);return x.useEffect(()=>{if(e.length<Xy||n)return;const i=new AbortController;async function o(){try{const l=await ZT(e,t,i.signal);i.signal.aborted||s({code:e,language:t,tokens:l})}catch{i.signal.aborted||s({code:e,language:t,tokens:[]})}}return o(),()=>{i.abort()}},[e,t,n]),a??((r==null?void 0:r.code)===e&&r.language===t?r.tokens:[])}function cM(e,t){if(t.length===0)return e||"";const n=[];let r=0;for(const s of t){s.start>r&&n.push(e.slice(r,s.start));const a=Math.min(s.end,e.length);n.push(u.jsx("span",{className:`astryx-token-${s.type} xds-token-${s.type}`,children:e.slice(s.start,a)},`${s.start}-${s.type}`)),r=a}return r<e.length&&n.push(e.slice(r)),n.length>0?n:""}function uM({lines:e,tokenLines:t,highlightSet:n,isWrapped:r,sizeStyle:s,hasLineNumbers:a,maxDigits:i}){x.useInsertionEffect(()=>{Jf()},[]);const o=x.useCallback((l,c)=>{const d=t[c]??[];return u.jsx("span",{className:"xeuugli",children:cM(l,d)})},[t]);return u.jsx("code",{...B(es.code,s,r&&es.codeWrapped,a&&es.codeNumbered,a&&tm.gutterWidth(i)),children:a3(e,n,o,a)})}function dM({lines:e,tokenLines:t,highlightSet:n,isWrapped:r,sizeStyle:s,hasLineNumbers:a,maxDigits:i}){const o=x.useRef(null);x.useEffect(()=>{if(!i3())return;Jf();const c=o.current;if(!(!c||t.length===0))return nM(c,t)},[t]);const l=x.useCallback(c=>c||"",[]);return u.jsx("code",{ref:o,...B(es.code,s,r&&es.codeWrapped,a&&es.codeNumbered,a&&tm.gutterWidth(i)),children:a3(e,n,l,a)})}function o3({code:e,language:t="plaintext",title:n,hasLanguageLabel:r=!0,hasLineNumbers:s=!1,highlightLines:a,hasCopyButton:i=!0,onCopy:o,isWrapped:l=!1,maxHeight:c,isCollapsible:d=!1,collapsibleThreshold:f=10,size:h="md",width:p="fit-content",container:m="card",tokenizer:k,highlightMode:b="auto",syntaxTheme:g,xstyle:y,className:v,style:w,ref:S,...j}){const C=ke(),[$,A]=x.useState(!1),E=x.useRef(null),z=Kf();x.useEffect(()=>()=>{E.current!=null&&clearTimeout(E.current)},[]);const N=b==="spans"||b==="auto"&&!i3()||b==="auto"&&oM(),T=x.useMemo(()=>{const pe=e.split(`
|
|
137
|
-
`);return pe.length>1&&pe[pe.length-1]===""&&pe.pop(),pe},[e]),R=lM(e,t,k),_=x.useMemo(()=>a?new Set(a):null,[a]),M=x.useCallback(async()=>{try{await navigator.clipboard.writeText(e),A(!0),z(C("@astryx.codeBlock.copied")),o==null||o(),E.current!=null&&clearTimeout(E.current),E.current=setTimeout(()=>{E.current=null,A(!1)},2e3)}catch{}},[e,o,z,C]),D=h==="sm"?es.sizeSm:es.sizeMd,I=String(T.length).length,O=r&&t!=="plaintext"?t:null,L=n!=null||O!=null,H=d&&T.length>=f,[F,V]=x.useState(!1),J=x.useId(),W=x.useRef(null),ne=c?{maxHeight:typeof c=="number"?`${c}px`:c}:void 0,Y=u.jsx(Ee,{icon:$?"check":"copy",size:"sm",color:"inherit"}),G=i?u.jsx("button",{type:"button",onClick:pe=>{pe.stopPropagation(),M()},"aria-label":C($?"@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"}}[!L<<0],children:Y}):null,ae=L?u.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"}}[!!s<<0],children:[u.jsx("div",{role:H?"button":void 0,tabIndex:H?0:void 0,"aria-expanded":H?!F:void 0,"aria-controls":H?J:void 0,onClick:H?()=>V(pe=>!pe):void 0,onKeyDown:H?pe=>{(pe.key==="Enter"||pe.key===" ")&&(pe.preventDefault(),V(de=>!de))}: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"}}[!!H<<0],children:u.jsxs("span",{className:"x78zum5 x6s0dn4 x141an7d x9m5x89 x1e4wzip x1mjzq1q x1ghz6dp x1ltkj2j",children:[H&&u.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:u.jsx(Ee,{icon:"chevronRight",size:"xsm",color:"inherit"})}),n,n&&O?" — ":"",O]})}),G]}):null,ce=u.jsx("div",{ref:W,tabIndex:0,role:"group","aria-label":O??C("@astryx.codeBlock.code"),...P({className:"xw2csxc x1odjw0f"},{style:ne}),children:u.jsx("div",{...{0:{className:"x78zum5 x1pshirs"},1:{className:"x78zum5 x1pshirs x1ajqlyv"}}[!!(L&&!s)<<0],children:N?u.jsx(uM,{lines:T,tokenLines:R,highlightSet:_,isWrapped:l,sizeStyle:D,hasLineNumbers:s,maxDigits:I}):u.jsx(dM,{lines:T,tokenLines:R,highlightSet:_,isWrapped:l,sizeStyle:D,hasLineNumbers:s,maxDigits:I})})}),ve=u.jsxs("pre",{ref:S,...P(U("codeblock",{size:h,language:t,container:m}),B(es.root,tm.width(p),rM[m],y),v,w),...j,children:[ae,H?u.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:u.jsx("div",{className:"xb3r6kr x2lwn1j",children:ce})}):ce,!L&&G]});return g?u.jsx(Qw,{theme:g,children:ve}):ve}o3.displayName="CodeBlock";const fM={base:{kMv6JI:"x9m5x89",kGuDYH:"xp03k98",kLWn49:"x15bjb6t",kWkggS:"xwmxj5m",kg3NbH:"x7a5moj",k8WAf4:"x1hp7d8q",kaIpWk:"xx3sua9",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",$$css:!0}},hM={primary:{kMwMTN:"x1tgivj0",$$css:!0},secondary:{kMwMTN:"xv1l7n4",$$css:!0},inherit:{kMwMTN:"x1heor9g",$$css:!0}},xM={inherit:{kGuDYH:"x1qlqyl8",kLWn49:"x15bjb6t",$$css:!0}};function nm({children:e,color:t="primary",size:n,xstyle:r,className:s,style:a,ref:i,...o}){return u.jsx("code",{ref:i,...o,...P(U("code",{color:t}),B(fM.base,hM[t],n&&xM[n],r),s,a),children:e})}nm.displayName="Code";const rm=x.createContext(null);rm.displayName="DialogContext";function pM(){return x.use(rm)}function gM(e,t=16){const n=e.getBoundingClientRect(),r=n.left+n.width/2-window.innerWidth/2,s=n.top+n.height/2-window.innerHeight/2,a=Math.sqrt(r*r+s*s)||1;return{x:Math.round(r/a*t),y:Math.round(s/a*t)}}const ha={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}},mM={ks0D6T:"x95b5qq",$$css:!0},yM={kogj98:"x1ghz6dp",$$css:!0},ix={sizing:(e,t)=>[mM,{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,r)=>[yM,{k87sOh:e!=null?"xjbys53":e,kLqNvP:t!=null?"x1lxsm33":t,kt4wiu:n!=null?"xqxgn94":n,krVfgx:r!=null?"x1nqzi6q":r,$$css:!0},{"--x-top":(s=>typeof s=="number"?s+"px":s??void 0)(e),"--x-insetInlineStart":(s=>typeof s=="number"?s+"px":s??void 0)(t),"--x-insetInlineEnd":(s=>typeof s=="number"?s+"px":s??void 0)(n),"--x-bottom":(s=>typeof s=="number"?s+"px":s??void 0)(r)}]};function hu(e){return typeof e=="number"?`${e}px`:e}function bM(e){const{top:t,bottom:n,start:r,end:s}=e;return{top:t!==void 0?hu(t):"auto",bottom:n!==void 0?hu(n):"auto",insetInlineStart:r!==void 0?hu(r):"auto",insetInlineEnd:s!==void 0?hu(s):"auto"}}function ui({isOpen:e,isInline:t=!1,onOpenChange:n,width:r=400,maxHeight:s="75vh",position:a,variant:i="standard",purpose:o="info",padding:l,children:c,xstyle:d,className:f,style:h,ref:p,...m}){const k=l==null,b=l??4,g=P7[b],y=i==="fullscreen",v=x.useId(),w=x.useMemo(()=>({isInline:t,titleId:v}),[t,v]),S=m["aria-label"]!=null||m["aria-labelledby"]!=null,j=x.useRef(null),C=x.useCallback(I=>{if(j.current=I,!I||S)return;I.querySelector(`#${CSS.escape(v)}`)!=null?I.setAttribute("aria-labelledby",v):I.removeAttribute("aria-labelledby")},[v,S]),$=x.useRef(null),A=o!=="required",E=o==="info";x.useEffect(()=>{var O;if(t)return;const I=j.current;if(I)if(e){$.current=document.activeElement;const L=$.current;if(L&&L!==document.body){const H=gM(L);I.style.setProperty("--dialog-dir-x",`${H.x}px`),I.style.setProperty("--dialog-dir-y",`${H.y}px`)}else I.style.setProperty("--dialog-dir-x","0px"),I.style.setProperty("--dialog-dir-y","16px");if(!I.open){I.showModal();const H=I.querySelector("[data-autofocus]");H&&H.focus()}}else I.open&&I.close(),(O=$.current)==null||O.focus(),$.current=null},[e,t]),F9(e&&!t),x.useEffect(()=>{if(t)return;const I=j.current;if(!I||!e)return;const O=L=>{if(L.key==="Escape"){if(Ow(L)||zy())return;L.preventDefault(),A&&n(!1)}};return I.addEventListener("keydown",O),()=>I.removeEventListener("keydown",O)},[e,t,A,n]);const z=x.useRef(!1);x.useEffect(()=>{var O;const I=((O=j.current)==null?void 0:O.querySelector(`#${CSS.escape(v)}`))!=null;e&&!t&&!S&&!I&&!z.current&&(z.current=!0,Ba())},[e,t,S,v]);const N=I=>{I.target===I.currentTarget&&E&&n(!1)},T=I=>{I.preventDefault(),!zy()&&A&&n(!1)},R=u.jsx("div",{...B(ha.inner,...CT(k?{useThemeDefault:"dialog",maxHeight:y?void 0:typeof s=="number"?`${s}px`:s}:{paddingInnerX:g,paddingInnerY:g,paddingOuterX:g,paddingOuterY:g,maxHeight:y?void 0:typeof s=="number"?`${s}px`:s}),!k&&b!==4&&_c[b],!k&&b!==4&&Oc[b],!k&&b!==4&&Dc[b],!k&&b!==4&&Ic[b]),children:u.jsx(rm,{value:w,children:c})}),_=a!=null&&!y,{open:M,...D}=m;return t?e?u.jsx("div",{...D,...P(U("dialog",{variant:i}),B(ha.inlineWrapper,!y&&ix.sizing(r,s),y&&ha.fullscreen,d),f,h),"data-testid":m["data-testid"],children:R}):null:u.jsx("dialog",{ref:Wt(p,C),...D,...P(U("dialog",{variant:i}),B(ha.dialog,e&&ha.open,ha.backdrop,!y&&ix.sizing(r,s),_&&(()=>{const I=bM(a);return ix.position(I.top,I.insetInlineStart,I.insetInlineEnd,I.bottom)})(),y&&ha.fullscreen,d),f,h),onClick:N,onCancel:T,"aria-modal":"true",...o==="required"?{role:"alertdialog"}:void 0,children:R})}ui.displayName="Dialog";const kM=x.lazy(async()=>tw(()=>Promise.resolve().then(()=>Uw),void 0).then(e=>({default:e.Tooltip}))),vM={1:"h1",2:"h2",3:"h3",4:"h4",5:"h5",6:"h6"};function sm({level:e,type:t,accessibilityLevel:n,color:r="primary",display:s="block",maxLines:a=0,hasTruncateTooltip:i=!0,wordBreak:o,textWrap:l,justify:c="start",hasCapsize:d=!1,hasStrikethrough:f=!1,xstyle:h,className:p,style:m,children:k,ref:b,...g}){const y=vM[e],v=n&&n!==e?{"aria-level":n}:{},w=o??(a===1?"break-all":"break-word"),S=a>0||d?"block":s,j=uw({maxLines:a}),C=typeof i=="string"?i:"above",$=a>0&&i!==!1&&j.isTruncated,A=x.useRef(null),E=a>1?{WebkitLineClamp:a}:void 0;return u.jsxs(u.Fragment,{children:[u.jsx(y,{ref:Wt(b,j.ref,A),...P(U("heading",{level:e,color:r,...t&&{type:t}}),B(Hg[dw(r)],t?qg[t]:I$[e],t&&nw[t],a===1?Od.singleLine:a>1?Od.multiLine:rw[S],a>0&&sw[w],l&&aw[l],c!=="start"&&lw[c],d&&iw.enabled,f&&ow.strikethrough,h),p,{...m,...E}),title:$?j.fullText:void 0,...v,...g,children:k}),$&&u.jsx(x.Suspense,{fallback:null,children:u.jsx(kM,{anchorRef:A,content:u.jsx("span",{...B(cw.content),children:j.fullText}),placement:C})})]})}sm.displayName="Heading";const wM={titleFocusable:{kI3sdo:"x1a2a7pz",$$css:!0}};function di({title:e,subtitle:t,onOpenChange:n,startContent:r,endContent:s,hasDivider:a,xstyle:i,className:o,style:l,ref:c,...d}){const f=ke(),h=x.useRef(null),p=pM(),m=(p==null?void 0:p.isInline)!==!0,k=p==null?void 0:p.titleId;return x.useEffect(()=>{m&&h.current&&h.current.focus()},[m]),u.jsx(Rd,{ref:c,hasDivider:a,xstyle:i,className:o,style:l,...d,children:u.jsxs("div",{className:"x78zum5 x1cy8zhl x1qughib xjcht0a",children:[r&&u.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s",children:r}),u.jsxs("div",{className:"x98rzlu xeuugli xqixskq",children:[u.jsx(sm,{ref:h,id:k,level:2,tabIndex:-1,xstyle:wM.titleFocusable,children:e}),t&&u.jsx(Re,{type:"body",size:"sm",color:"secondary",children:t})]}),(s||n)&&u.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s"},1:{className:"x78zum5 x6s0dn4 x1txdalj x2lah0s xhzvc8f x3kzqx6"}}[!!n<<0],children:[s,n&&u.jsx($e,{variant:"ghost",label:f("@astryx.dialog.close"),tooltip:f("@astryx.dialog.close"),icon:u.jsx(Ee,{icon:"close",color:"inherit"}),onClick:()=>{n==null||n(!1)},isIconOnly:!0})]})]})})}di.displayName="DialogHeader";const SM={scrollable:{kVQacm:"xysyzu8",$$css:!0}};function am({direction:e="vertical",hAlign:t,vAlign:n,justify:r,align:s,gap:a,padding:i,paddingInline:o,paddingBlock:l,isScrollable:c,width:d,height:f,maxWidth:h,minHeight:p,wrap:m,as:k="div",xstyle:b,className:g,style:y,children:v,ref:w,...S}){const j=t??(e==="horizontal"?r:s),C=n??(e==="horizontal"?s:r),$=e==="horizontal"?j:C,A=e==="horizontal"?C:j,E=o??i,z=l??i,N=B(...mp({direction:e,crossAlign:A,mainAlign:$,gap:a,wrap:m}),E!=null&&V7[E],z!=null&&X7[z],c&&SM.scrollable,b),T={...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(k,{ref:w,...P(U("stack",{direction:e,gap:a,wrap:m}),N,g,{...y,...T}),...S},v)}am.displayName="Stack";function Kt({ref:e,justify:t,align:n,hAlign:r,vAlign:s,...a}){return u.jsx(am,{...a,direction:"horizontal",hAlign:r??t,vAlign:s??n,ref:e})}Kt.displayName="HStack";function pt({ref:e,justify:t,align:n,hAlign:r,vAlign:s,...a}){return u.jsx(am,{...a,direction:"vertical",hAlign:r??n,vAlign:s??t,ref:e})}pt.displayName="VStack";const xu={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}},jM={sizing:e=>[{kZKoxP:e!=null?"x16ye13r":e,$$css:!0},{"--x-height":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function qc({children:e,hasDivider:t,height:n,label:r,padding:s,role:a,xstyle:i,className:o,style:l,ref:c,...d}){const f=x.use(Hf),h=t??(f==null?void 0:f.defaultHasDividers)??!1,p=s===0;return u.jsx("div",{ref:c,role:a,"aria-label":r,"data-divider":h||void 0,...P(U("layout-footer"),B(xu.footer,jM.sizing(n??null),h&&xu.divider,i),o,l),...d,children:u.jsx("div",{...B(xu.inner,p&&xu.fullBleed,s!=null&&_c[s],s!=null&&Oc[s],s!=null&&Dc[s],s!=null&&Ic[s]),children:e})})}qc.displayName="LayoutFooter";const l3=x.createContext({direction:"vertical"});l3.displayName="FormLayoutContext";const ox={container:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",$$css:!0},containerGap:{kOIVth:"xzye2dw",$$css:!0},horizontalLabels:{k1xSpc:"xjp7ctv",$$css:!0}},EM={width:e=>[{kzqmXN:e!=null?"x5lhr3w":e,$$css:!0},{"--x-width":(t=>typeof t=="number"?t+"px":t??void 0)(e)}]};function Uc({label:e,isLabelHidden:t=!1,description:n,inputID:r,labelID:s,isGroupLabel:a=!1,descriptionID:i,isOptional:o=!1,isRequired:l=!1,isDisabled:c=!1,labelIcon:d,status:f,labelTooltip:h,statusVariant:p="attached",width:m,xstyle:k,children:b,className:g,style:y,ref:v,...w}){const{direction:S}=x.use(l3),j=S==="horizontal-labels",C=i??(n?`${r}-desc`:void 0),$=(f==null?void 0:f.messageID)??(f!=null&&f.message?`${r}-status`:void 0);Zf("Field","isOptional and isRequired are mutually exclusive. isOptional takes precedence.",o&&l);const A=u.jsx(Qg,{label:e,inputID:r,labelID:s,isGroupLabel:a,isLabelHidden:t,isDisabled:c,isOptional:o,isRequired:l,labelIcon:d,labelTooltip:h,description:j?void 0:n,descriptionID:j?void 0:C}),E=f!=null&&f.message&&p!=="tooltip"?u.jsx(Jg,{type:f.type,message:f.message,id:$,variant:p}):null;return j?u.jsxs("div",{ref:v,...P(U("field",{layout:"horizontal-labels"}),B(ox.horizontalLabels,k),g,y),...w,children:[u.jsx("div",{className:"x1enrzb7",children:A}),u.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[n&&u.jsx(Re,{type:"supporting",display:"block",id:C,children:n}),b,E]})]}):u.jsxs("div",{ref:v,...P(U("field"),B(ox.container,!t&&ox.containerGap,m!=null&&EM.width(m),k),g,y),...w,children:[A,p==="attached"?u.jsxs("div",{className:"x78zum5 xdt5ytf xc8icb0",children:[b,E]}):u.jsxs(u.Fragment,{children:[b,E]})]})}Uc.displayName="Field";const Id={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}},c3={warning:{kVAM5u:"x8wg1ba",$$css:!0},error:{kVAM5u:"x1ofxpqo",$$css:!0},success:{kVAM5u:"x16m2moy",$$css:!0}},u3={warning:{kGVxlE:"x1gnnqk1 xnoa3fc",$$css:!0},error:{kGVxlE:"x1gnnqk1 xl68szm",$$css:!0},success:{kGVxlE:"x1gnnqk1 xig9bu2",$$css:!0}},$M={warning:{kVAM5u:"x8wg1ba xa1yw2k",$$css:!0},error:{kVAM5u:"x1ofxpqo xk2sxw7",$$css:!0},success:{kVAM5u:"x16m2moy xyq33ac",$$css:!0}},d3={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}},f3=x.createContext(null);f3.displayName="InputGroupContext";function h3(){return x.use(f3)}const CM={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}};function Uo({type:e="text",label:t,isLabelHidden:n=!1,description:r,isOptional:s=!1,isRequired:a=!1,isDisabled:i=!1,disabledMessage:o,startIcon:l,status:c,statusVariant:d="attached",size:f,onChange:h,changeAction:p,isLoading:m=!1,value:k,placeholder:b,labelTooltip:g,hasClear:y=!1,hasAutoFocus:v=!1,htmlName:w,onEnter:S,onKeyDown:j,width:C,xstyle:$,className:A,style:E,ref:z,...N}){const T=ke(),R=Pg(f,"md"),_=x.useId(),M=x.useId(),D=x.useId(),I=x.useId(),O=x.useRef(null),L=x.useRef(null),H=h3(),[,F]=x.useTransition(),[V,J]=x.useOptimistic(k),W=m||V!==k,ne=i&&!!o,Y=rs({placement:"above",focusTrigger:"always",isEnabled:ne}),{statusIcon:G,describedBy:ae}=nT({status:c,statusVariant:d,isInGroup:!!H}),{ariaLabelledBy:ce,ariaDescribedBy:ve}=L2(M,[r?D:null,!H&&d!=="tooltip"&&(c!=null&&c.message)?I:null,ae,ne?Y.describedBy:null],H),pe=le=>{if(i)return;const he=le.target.value;h==null||h(he,le),p&&!le.defaultPrevented&&F(async()=>{J(he),await p(he,le)})},de=x.useCallback(()=>{var le;h==null||h("",null),(le=O.current)==null||le.focus()},[h]),{onClick:ie,onMouseUp:K}=Gw({containerRef:L,inputRef:O,disabled:i}),ge=u.jsxs("div",{ref:le=>{L.current=le,Y.ref(le)},onClick:ie,onMouseUp:K,...P(U("text-input",{size:R,status:(c==null?void 0:c.type)??null}),B(Id.base,CM[R],i&&Id.disabled,c&&c3[c.type],c&&!i&&u3[c.type],c&&$M[c.type],H&&d3.inGroup,$),A,E),children:[l&&ss(l,{size:"sm",color:"secondary"}),H&&u.jsx(Lo,{id:M,children:t}),u.jsx("input",{...N,ref:Wt(z,O),id:_,name:w,type:e,value:V,onChange:pe,onKeyDown:S||j?le=>{le.key==="Enter"&&(S==null||S()),j==null||j(le)}:void 0,placeholder:b,disabled:i&&!ne,"aria-disabled":ne?"true":void 0,readOnly:ne||void 0,autoFocus:v,"data-autofocus":v||void 0,"aria-describedby":ve,"aria-required":a===!0?"true":void 0,"aria-invalid":(c==null?void 0:c.type)==="error"?"true":void 0,"aria-busy":W||void 0,"aria-labelledby":ce,...{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]}),y&&k!==""&&!i&&u.jsx("button",{type:"button",onClick:de,"aria-label":T("@astryx.textInput.clearLabel",{label:t}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:u.jsx(Ee,{icon:"close",size:"sm",color:"secondary"})}),W&&u.jsx(mr,{size:"sm"}),G]});return H?u.jsxs(u.Fragment,{children:[ge,ne&&Y.renderTooltip(o)]}):u.jsxs(Uc,{label:t,isLabelHidden:n,description:r,inputID:_,descriptionID:r?D:void 0,isOptional:s,isRequired:a,isDisabled:i,status:c?{type:c.type,message:c.message,messageID:c.message?I:void 0}:void 0,statusVariant:d,labelTooltip:g,width:C,children:[ge,ne&&Y.renderTooltip(o)]})}Uo.displayName="TextInput";function x3(e){return typeof e=="string"?!0:!("type"in e)}function TM(e){return typeof e=="object"&&"type"in e&&e.type==="divider"}function p3(e){return typeof e=="object"&&"type"in e&&e.type==="section"}function Ld(e){return typeof e=="string"?{value:e,label:e}:{...e,label:e.label??e.value}}function MM(e){const t=[];for(const n of e)if(x3(n))t.push(Ld(n));else if(p3(n))for(const r of n.options)t.push(Ld(r));return t}function NM({isOpen:e,selectedItemIndex:t,listboxId:n,listboxRef:r,triggerRef:s}){const[a,i]=x.useState(0),[o,l]=x.useState(!1),c=x.useCallback((d,f)=>{i(d),l(f)},[]);return Jr(()=>{if(!e){c(0,!1);return}if(!r.current||!s.current){c(0,!0);return}const d=t>=0?t:0,f=`${n}-item-${d}`,h=document.getElementById(f);if(!h){c(0,!0);return}const p=r.current.getBoundingClientRect(),m=h.getBoundingClientRect(),k=s.current.getBoundingClientRect(),b=p.height;if(b<=0){c(0,!0);return}const g=m.top-p.top+m.height/2,v=k.top+k.height/2-g,w=window.innerHeight,S=Math.max(0,w-b),j=Math.min(Math.max(v,0),S),C=Math.max(0,k.bottom-j);c(C,!0)},[e,t,n,r,s,c]),{offset:a,isPositioned:o}}function AM({selectableItems:e,value:t,isDisabled:n=!1,isOpen:r,hasSearch:s=!1,onOpen:a,onClose:i,onSelect:o,onClear:l,listboxId:c}){const[d,f]=x.useState(-1),[h,p]=x.useState(""),m=x.useRef(void 0),k=x.useCallback(C=>`${c}-item-${C}`,[c]),b=x.useCallback(()=>e.map((C,$)=>C.disabled?-1:$).filter(C=>C>=0),[e]),g=x.useCallback(()=>e.findIndex(C=>C.value===t),[e,t]),y=x.useCallback(()=>{f(-1),i()},[i]),v=x.useCallback(C=>{C.disabled||(o==null||o(C.value),y())},[o,y]),w=x.useCallback(()=>{if(!n){if(r)y();else if(a(),!s){const C=g();f(C>=0?C:0)}}},[n,r,a,y,g,s]),S=x.useCallback((C,$)=>{C.disabled||f($)},[]),j=x.useCallback(C=>{if(n)return;const $=b();switch(C.key){case"ArrowDown":if(C.preventDefault(),!r)a(),f(0);else{const A=$.indexOf(d),E=Math.min(A+1,$.length-1);f($[E]??d)}break;case"ArrowUp":if(C.preventDefault(),!r)a(),f(e.length-1);else{const A=$.indexOf(d),E=Math.max(A-1,0);f($[E]??d)}break;case" ":if(s)break;case"Enter":if(C.preventDefault(),r&&d>=0){const A=e[d];A&&!A.disabled&&v(A)}else if(!r&&(a(),!s)){const A=g();f(A>=0?A:0)}break;case"Escape":r&&(C.preventDefault(),y());break;case"Tab":r&&y();break;case"Home":C.preventDefault(),r&&$.length>0&&f($[0]);break;case"End":C.preventDefault(),r&&$.length>0&&f($[$.length-1]);break;case"PageUp":C.preventDefault(),r&&$.length>0&&f($[0]);break;case"PageDown":C.preventDefault(),r&&$.length>0&&f($[$.length-1]);break;case"Delete":case"Backspace":!s&&!r&&l!=null&&t!=null&&(C.preventDefault(),l());break;default:if(!s&&C.key.length===1&&!C.ctrlKey&&!C.metaKey){const A=h+C.key.toLowerCase();p(A),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{p("")},500);const E=e.findIndex(z=>{var N;return!z.disabled&&((N=z.label)==null?void 0:N.toLowerCase().startsWith(A))});E>=0&&(r||a(),f(E))}break}},[n,r,a,y,e,d,v,g,b,h,s,l,t]);return{highlightedIndex:d,setHighlightedIndex:f,getItemId:k,onTriggerClick:w,onKeyDown:j,onItemSelect:v,onItemMouseEnter:S}}const zM={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",$$css:!0}};function g3({icon:e,label:t,description:n,endContent:r,xstyle:s,className:a,style:i}){return u.jsx(Ho,{startContent:e?ss(e,{size:"sm",color:"secondary"}):void 0,label:t,description:n,endContent:r,xstyle:[zM.root,s],...P(U("selector-option"),{className:a,style:i})})}g3.displayName="SelectorOption";const ar={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}},RM={sm:{kZKoxP:"x6k0iem",$$css:!0},md:{kZKoxP:"x1ueg155",$$css:!0},lg:{kZKoxP:"xssyfek",$$css:!0}},_M={sm:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},md:{k8WAf4:"x1vofgu7",$$css:!0},lg:{$$css:!0}},Yy={warning:"warning",error:"error",success:"success"},Qy={warning:"warning",error:"error",success:"success"},OM={warning:"@astryx.input.statusButton.warning",error:"@astryx.input.statusButton.error",success:"@astryx.input.statusButton.success"};function DM({option:e}){return u.jsx(g3,{icon:e.icon,label:e.label??e.value})}function Tp(e,t){return t?(e.label??e.value).toLowerCase().includes(t.toLowerCase()):!0}function Jy(e,t){return t?e.filter(n=>Tp(n,t)):e}function im(e){const t=ke(),{label:n,isLabelHidden:r=!1,description:s,isOptional:a=!1,isRequired:i=!1,isDisabled:o=!1,disabledMessage:l,options:c,value:d,onChange:f,changeAction:h,isLoading:p=!1,placeholder:m,size:k,variant:b="input",status:g,statusVariant:y="attached",labelTooltip:v,startIcon:w,htmlName:S,renderOption:j,hasSearch:C=!1,searchPlaceholder:$,placement:A,isDefaultOpen:E=!1,"data-testid":z,width:N,xstyle:T,className:R,style:_,hasClear:M,...D}=e,I=m??t("@astryx.selector.placeholder"),O=$??t("@astryx.selector.searchPlaceholder"),L=M===!0,H=Pg(k,"md"),F=b==="ghost"&&y==="attached"?"detached":y,V=d===null?void 0:d,J=x.useId(),W=x.useId(),ne=x.useId(),Y=x.useId(),G=x.useId(),ae=x.useId(),ce=x.useRef(null),ve=x.useRef(null),pe=h3(),[de,ie]=x.useState(""),K=de.length>0,[,ge]=x.useTransition(),[le,he]=x.useOptimistic(V),un=p||le!==V,nr=o&&!!l,Br=rs({placement:"above",focusTrigger:"always",isEnabled:nr}),Qo=rs({placement:"above",isEnabled:F==="tooltip"&&!!(g!=null&&g.message)}),{ariaLabelledBy:Dh,ariaDescribedBy:rr}=L2(G,[s?ne:null,!pe&&F!=="tooltip"&&(g!=null&&g.message)?Y:null,F==="tooltip"&&(g!=null&&g.message)?Qo.describedBy:null,nr?Br.describedBy:null],pe),Sn=x.useMemo(()=>MM(c),[c]),Jo=x.useMemo(()=>Jy(Sn,de),[Sn,de]),ki=x.useMemo(()=>Sn.findIndex(se=>se.value===le),[Sn,le]),su=x.useMemo(()=>ki>=0?Sn[ki]:void 0,[Sn,ki]),Ih=x.useRef(null),el=Kf(),S8=x.useCallback(()=>{var se;ie(""),el(""),(se=ce.current)==null||se.focus()},[el]),_t=Bc({onHide:S8,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"});x.useEffect(()=>{E&&_t.show()},[]);const W0=x.useCallback(se=>{if(ie(se),se.length===0){el("");return}const Jt=Jy(Sn,se).length;el(Jt===0?"No results found":`${Jt} result${Jt===1?"":"s"}`)},[el,Sn]),Lh=A==null&&!C,{offset:j8,isPositioned:E8}=NM({isOpen:_t.isOpen&&Lh,selectedItemIndex:ki,listboxId:W,listboxRef:Ih,triggerRef:ce}),K0=Lh?j8:0,$8=Lh?E8:!0,Y0=A??"below",C8=K0>0?{marginBlockStart:`-${K0}px`}:void 0,Bh=x.useCallback(()=>{f==null||f(null),h&&ge(async()=>{he(void 0),await h(null)})},[f,h,ge,he]),{highlightedIndex:kr,getItemId:ca,onTriggerClick:T8,onKeyDown:tl,onItemSelect:Q0,onItemMouseEnter:J0}=AM({selectableItems:Jo,value:V,isDisabled:o,isOpen:_t.isOpen,hasSearch:C,onOpen:x.useCallback(()=>{_t.show(),C&&requestAnimationFrame(()=>{var se;(se=ve.current)==null||se.focus()})},[_t,C]),onClose:_t.hide,onSelect:x.useCallback(se=>{f==null||f(se),h&&ge(async()=>{he(se),await h(se)})},[f,h,ge,he]),onClear:L?Bh:void 0,listboxId:W});x.useEffect(()=>{var se,Jt;!_t.isOpen||kr<0||(Jt=(se=document.getElementById(ca(kr)))==null?void 0:se.scrollIntoView)==null||Jt.call(se,{block:"nearest"})},[_t.isOpen,kr,ca]);const M8=x.useCallback(se=>{se.stopPropagation(),Bh()},[Bh]),N8=x.useCallback(()=>C?u.jsx("div",{className:"x78zum5 x6s0dn4 xf314gf xu0wf1k",onKeyDown:se=>{se.target!==ve.current&&se.key==="Tab"&&!se.shiftKey&&tl(se)},children:u.jsx(Uo,{ref:ve,id:ae,label:t("@astryx.selector.searchOptions"),isLabelHidden:!0,startIcon:"search",hasClear:!0,size:"sm",width:"100%",role:"combobox","aria-expanded":_t.isOpen,"aria-controls":W,"aria-autocomplete":"list","aria-activedescendant":_t.isOpen&&kr>=0?ca(kr):void 0,value:de,onChange:W0,onKeyDown:se=>{if(se.key==="ArrowDown"||se.key==="ArrowUp"||se.key==="PageUp"||se.key==="PageDown"||se.key==="Enter"||se.key==="Escape"){tl(se);return}se.key==="Tab"&&(se.shiftKey||!K)&&tl(se)},placeholder:O})}):null,[C,ae,W,de,K,O,W0,tl,_t.isOpen,kr,ca,t]),Hh=x.useCallback((se,Jt)=>{const ua=Jt===kr,vr=se.value===V;return u.jsxs("div",{id:ca(Jt),role:"option","aria-selected":vr,"aria-disabled":se.disabled,onClick:()=>Q0(se),onMouseEnter:()=>J0(se,Jt),...B(ar.item,_M[H],ua&&ar.itemHighlighted,vr&&ar.itemSelected,se.disabled&&ar.itemDisabled),children:[u.jsx("span",{className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli",children:j?j(se):u.jsx(DM,{option:se})}),vr&&u.jsx(Ee,{icon:"check",size:"sm",color:"accent"})]},se.value)},[j,kr,H,V,ca,Q0,J0]),ey=x.useCallback(()=>{const se=C&&!!de;if(se&&Jo.length===0)return[u.jsx("div",{role:"presentation",className:"x1b2ylru x2b8uid xv1l7n4 x9ynric xcr08ib",children:"No results found"},"empty")];let Jt=0;const ua=[];for(let vr=0;vr<c.length;vr++){const ps=c[vr];if(TM(ps)){if(se)continue;ua.push(u.jsx(nc,{xstyle:ar.divider},`divider-${vr}`))}else if(p3(ps)){const vi=[];for(const A8 of ps.options){const ry=Ld(A8);se&&!Tp(ry,de)||(vi.push(Hh(ry,Jt)),Jt++)}if(vi.length===0)continue;ps.title&&ua.push(u.jsx(nc,{label:ps.title,xstyle:ar.sectionDivider},`section-divider-${vr}`)),ua.push(u.jsx("div",{role:"group","aria-label":ps.title,children:vi},`section-${vr}`))}else if(x3(ps)){const vi=Ld(ps);if(se&&!Tp(vi,de))continue;ua.push(Hh(vi,Jt)),Jt++}}return ua},[c,Hh,C,de,Jo]),qh=g!=null&&F!=="detached",ty=g!=null&&F==="tooltip"&&!!g.message,ny=u.jsxs(u.Fragment,{children:[u.jsxs("div",{ref:se=>{_t.triggerRef(se),Br.ref(se)},onClick:T8,"data-testid":z,...P(U("selector",{variant:b,size:H,status:(g==null?void 0:g.type)??null}),B(Id.base,ar.triggerContainer,RM[H],b==="ghost"&&ar.triggerGhost,o&&Id.disabled,b==="ghost"&&o&&ar.triggerGhostDisabled,!su&&ar.triggerPlaceholder,b!=="ghost"&&g&&c3[g.type],b!=="ghost"&&g&&!o&&u3[g.type],b!=="ghost"&&pe&&d3.inGroup,T),R,_),children:[w&&ss(w,{size:"sm",color:"secondary"}),pe&&u.jsx(Lo,{id:G,children:n}),u.jsx("button",{ref:ce,id:J,type:"button",role:C?void 0:"combobox",...D,"aria-haspopup":"listbox","aria-expanded":_t.isOpen,"aria-controls":W,"aria-activedescendant":!C&&_t.isOpen&&kr>=0?ca(kr):void 0,"aria-describedby":rr,"aria-labelledby":Dh,"aria-required":i?"true":void 0,"aria-invalid":(g==null?void 0:g.type)==="error"?"true":void 0,"aria-busy":un||void 0,disabled:o&&!nr,"aria-disabled":nr?"true":void 0,onKeyDown:tl,tabIndex:o&&!nr?-1:0,className:"x78zum5 x6s0dn4 x1qughib x1txdalj x1iyjqo2 xs83m0k x1r8uery xeuugli x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x15bjb6t x1heor9g x1ypdohk x1a2a7pz",children:u.jsx("span",{className:"x1iyjqo2 xeuugli xb3r6kr xlyipyv xuxw1ft x1yc453h",children:(su==null?void 0:su.label)??I})}),S!=null&&u.jsx("input",{type:"hidden",name:S,value:d??"",disabled:o}),un&&u.jsx(mr,{size:"sm"}),L&&d!=null&&!o&&u.jsx("button",{type:"button",onClick:M8,"aria-label":t("@astryx.selector.clearLabel",{label:n}),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:u.jsx(Ee,{icon:"close",size:"sm",color:"secondary",...U("selector-clear-icon")})}),u.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"}}[!!(!qh&&_t.isOpen)<<1|!!qh<<0],children:qh?ty?u.jsx("button",{ref:Qo.ref,type:"button","aria-label":t(OM[g.type]),"aria-describedby":Qo.describedBy,onClick:se=>se.stopPropagation(),className:"x78zum5 x6s0dn4 xl56j7k x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn x1a2a7pz x1p25gnr x1y3gkto",children:u.jsx(Ee,{icon:Yy[g.type],size:"sm",color:Qy[g.type]})}):u.jsx(Ee,{icon:Yy[g.type],size:"sm",color:Qy[g.type]}):u.jsx(Ee,{icon:"chevronDown",size:"sm",color:"inherit",...U("selector-indicator-icon",{state:_t.isOpen?"expanded":"collapsed"})})})]}),_t.render(C?u.jsxs("div",{children:[N8(),u.jsx("div",{ref:Ih,id:W,role:"listbox","aria-labelledby":J,className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo",children:ey()})]}):u.jsx("div",{ref:Ih,id:W,role:"listbox","aria-labelledby":J,...{0:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk x1hc1fzr x1ey1afo"},1:{className:"x9f619 xuyqlj2 x1odjw0f x9epnlk xg01cxk xq2gx43"}}[!$8<<0],children:ey()}),{placement:Y0,alignment:"start",xstyle:[ar.popover,Qr[Y0]],style:C8}),ty&&Qo.renderTooltip((g==null?void 0:g.message)??""),nr&&Br.renderTooltip(l)]});return pe?ny:u.jsx(Uc,{label:n,isLabelHidden:r,description:s,inputID:J,descriptionID:s?ne:void 0,isOptional:a,isRequired:i,isDisabled:o,status:g?{type:g.type,message:g.message,messageID:g.message?Y:void 0}:void 0,statusVariant:F,labelTooltip:v,width:N,children:ny})}im.displayName="Selector";var m3={exports:{}},Qt={};/**
|
|
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 IM=x;function y3(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 bs(){}var on={d:{f:bs,r:function(){throw Error(y3(522))},D:bs,C:bs,L:bs,m:bs,X:bs,S:bs,M:bs},p:0,findDOMNode:null},LM=Symbol.for("react.portal"),BM=Symbol.for("react.recoverable"),eb=Symbol.for("react.optimistic_key");function HM(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:LM,key:r==null?null:r===eb?eb:""+r,children:e,containerInfo:t,implementation:n}}var Al=IM.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function eh(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=on;Qt.browser=function(e){return{$$typeof:BM,_reason:e}};Qt.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(y3(299));return HM(e,t,null,n)};Qt.flushSync=function(e){var t=Al.T,n=on.p;try{if(Al.T=null,on.p=2,e)return e()}finally{Al.T=t,on.p=n,on.d.f()}};Qt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,on.d.C(e,t))};Qt.prefetchDNS=function(e){typeof e=="string"&&on.d.D(e)};Qt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=eh(n,t.crossOrigin),s=typeof t.integrity=="string"?t.integrity:void 0,a=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?on.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:s,fetchPriority:a}):n==="script"&&on.d.X(e,{crossOrigin:r,integrity:s,fetchPriority:a,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Qt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=eh(t.as,t.crossOrigin);on.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&&on.d.M(e)};Qt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=eh(n,t.crossOrigin);on.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Qt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=eh(t.as,t.crossOrigin);on.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 on.d.m(e)};Qt.requestFormReset=function(e){on.d.r(e)};Qt.unstable_batchedUpdates=function(e,t){return e(t)};Qt.useFormState=function(e,t,n){return Al.H.useFormState(e,t,n)};Qt.useFormStatus=function(){return Al.H.useHostTransitionStatus()};Qt.version="19.3.0";function b3(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(b3)}catch(e){console.error(e)}}b3(),m3.exports=Qt;var rc=m3.exports;const tb={popoverSurface:{k7Eaqz:"xfb3i0g",$$css:!0},popoverGap:{keoZOQ:"xcsaf9d",k1K539:"x14cgwvg",$$css:!0}};function qM(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 r=n.startContainer;return r.nodeType===Node.TEXT_NODE?(r.textContent??"").slice(0,n.startOffset):null}function UM(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r===" "||r===`
|
|
146
|
-
`)return null;for(const s of t)if(r===s.character){const a=n>0?e[n-1]:null;if(a===null||a===" "||a===`
|
|
147
|
-
`){const i=e.slice(n+1);return{trigger:s,query:i,triggerStart:n}}}}return null}function PM(e,t){const n=window.getSelection();if(!n||n.rangeCount===0)return;const r=n.getRangeAt(0),s=r.startContainer;if(s.nodeType!==Node.TEXT_NODE)return;const a=s.textContent??"",i=r.startOffset,o=a.slice(0,t),l=a.slice(i);s.textContent=o+l;const c=document.createRange();c.setStart(s,t),c.collapse(!0),n.removeAllRanges(),n.addRange(c)}function FM(e){const t=ke(),{triggers:n,editableRef:r,onInsertToken:s,onInsertText:a,onEmitChange:i,debounceMs:o=150}=e,l=x.useId(),[c,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)},[]),k=Bc({onHide:x.useCallback(()=>{m(),d(E=>({...E,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 b=x.useCallback(()=>{var z,N;h.current&&(clearTimeout(h.current),h.current=null);const E=c.activeTrigger;E!=null&&E.searchSource&&((N=(z=E.searchSource).cancel)==null||N.call(z)),m(),k.hide(),f.current=-1},[k,c.activeTrigger,m]),g=x.useCallback(()=>{const E=r.current;if(!E)return;const z=window.getSelection();if(!z||z.rangeCount===0){k.triggerRef(E);return}m();const N=z.getRangeAt(0).cloneRange();N.collapse(!0);const T=typeof N.getBoundingClientRect=="function"?N.getBoundingClientRect():null;if(!T||T.width===0&&T.height===0&&T.top===0&&T.left===0){k.triggerRef(E);return}const R=document.createElement("span");R.setAttribute("aria-hidden","true"),R.setAttribute("data-astryx-trigger-anchor",""),R.style.position="fixed",R.style.left=`${T.left}px`,R.style.top=`${T.top}px`,R.style.width=`${Math.max(T.width,1)}px`,R.style.height=`${T.height}px`,R.style.pointerEvents="none",R.style.opacity="0",document.body.appendChild(R),p.current=R,k.triggerRef(R)},[r,k,m]),y=x.useCallback((E,z)=>{h.current&&(clearTimeout(h.current),h.current=null);const N=()=>{var T,R;if(E.searchSource){(R=(T=E.searchSource).cancel)==null||R.call(T),d(M=>({...M,isLoading:!0}));const _=E.searchSource.search(z);Promise.resolve(_).then(M=>{d(D=>({...D,items:M,highlightedIndex:M.length>0?0:-1,isLoading:!1}))},()=>{d(M=>({...M,items:[],highlightedIndex:-1,isLoading:!1}))})}};E.searchSource&&(E.searchSource.search("")instanceof Promise&&o>0?(d(_=>({..._,isLoading:!0})),h.current=setTimeout(N,o)):N())},[o]),v=x.useCallback(E=>{const z=c.activeTrigger;if(!z)return;const N=r.current;if(!N)return;m(),PM(N,f.current);const T=z.onSelect(E);typeof T=="string"?a(T):s(T),i(),b()},[c.activeTrigger,r,m,a,s,i,b]),w=x.useCallback(()=>{if(!n||n.length===0)return;const E=r.current;if(!E)return;const z=qM(E);if(z===null){c.isActive&&b();return}const N=UM(z,n);if(!N){c.isActive&&b();return}const{trigger:T,query:R,triggerStart:_}=N;!c.isActive||c.activeTrigger!==T?(f.current=_,d(M=>({...M,isActive:!0,activeTrigger:T,query:R,highlightedIndex:0})),g(),y(T,R),k.show()):c.query!==R&&(d(M=>({...M,query:R})),y(T,R))},[n,r,c.isActive,c.activeTrigger,c.query,b,g,y,k]),S=x.useCallback(E=>{if(!c.isActive||!k.isOpen)return!1;switch(E.key){case"ArrowDown":return E.preventDefault(),d(z=>({...z,highlightedIndex:z.highlightedIndex<z.items.length-1?z.highlightedIndex+1:0})),!0;case"ArrowUp":return E.preventDefault(),d(z=>({...z,highlightedIndex:z.highlightedIndex>0?z.highlightedIndex-1:z.items.length-1})),!0;case"Enter":case"Tab":return c.highlightedIndex>=0&&c.highlightedIndex<c.items.length?(E.preventDefault(),v(c.items[c.highlightedIndex]),!0):!1;case"Escape":return E.preventDefault(),b(),!0;default:return!1}},[c.isActive,c.highlightedIndex,c.items,k.isOpen,v,b]),j=x.useCallback(E=>`${l}-option-${E}`,[l]);x.useEffect(()=>{if(!k.isOpen||c.highlightedIndex<0)return;const E=document.getElementById(j(c.highlightedIndex));E==null||E.scrollIntoView({block:"nearest"})},[c.highlightedIndex,k.isOpen,j]);const $=((n==null?void 0:n.length)??0)>0?c.isActive&&k.isOpen?{role:"combobox","aria-expanded":!0,"aria-controls":l,"aria-activedescendant":c.highlightedIndex>=0?j(c.highlightedIndex):void 0,"aria-haspopup":"listbox"}:{role:"combobox","aria-expanded":!1,"aria-haspopup":"listbox"}:{role:"textbox"},A=x.useCallback(()=>{const E=c.activeTrigger,z=(E==null?void 0:E.emptySearchResultsText)??"No results",N=(E==null?void 0:E.loadingText)??"Searching…";let T;if(c.isLoading)T=u.jsx("div",{role:"status",className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:N});else if(c.items.length===0&&c.isActive)T=u.jsx("div",{className:"x1b2ylru x2b8uid x141an7d xv1l7n4",children:z});else{const R=R7(c.items);let _=0;T=R.map(M=>{const D=M.items.map(I=>{const O=_++;return u.jsx("div",{id:j(O),role:"option","aria-selected":O===c.highlightedIndex,tabIndex:-1,onMouseDown:L=>{L.preventDefault(),v(I)},onMouseEnter:()=>d(L=>({...L,highlightedIndex:O})),...{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"}}[(O===c.highlightedIndex)<<0],children:E!=null&&E.renderItem?E.renderItem(I):u.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:I.label})},I.id)});return M.heading?u.jsxs("div",{role:"group","aria-label":M.heading,children:[u.jsx("div",{"aria-hidden":"true",className:"xf314gf x1xye8es xy143xn x141an7d x1ltkj2j xv1l7n4 x87ps6o",children:M.heading}),D]},`group-${M.heading}`):D})}return k.render(u.jsx("div",{id:l,role:"listbox","aria-label":(E==null?void 0:E.menuLabel)??t("@astryx.chatTriggerMenu.suggestions"),...P(U("trigger-menu"),{className:"x9f619 x1xiyphd x1odjw0f x9epnlk xfb3i0g"}),children:T}),{placement:"above",alignment:"start",xstyle:[tb.popoverSurface,tb.popoverGap]})},[k,l,c,v,j,t]);return{state:c,handleInput:w,handleKeyDown:S,renderMenu:A,reset:b,ariaProps:$}}function Bd(e){const t=window.getSelection();if(!t)return null;if(t.rangeCount>0){const r=t.getRangeAt(0);if(e.contains(r.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=Bd(e);if(!n||n.rangeCount===0)return!1;const r=n.getRangeAt(0);r.deleteContents();const s=document.createTextNode(t);return r.insertNode(s),r.setStartAfter(s),r.collapse(!0),n.removeAllRanges(),n.addRange(r),!0}function GM(e){return"render"in e&&typeof e.render=="function"}function VM(e){let t=e;for(;t;){if(t instanceof HTMLElement&&t.hasAttribute("data-astryx-token"))return t;t=t.parentNode}return null}function XM({editableRef:e,onEmitChange:t}){const[n,r]=x.useState([]),s=x.useCallback(c=>{const d=e.current;if(!d)return;const f=Bd(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",c.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 k=document.createTextNode(" ");p.after(k);const b=document.createRange();return b.setStartAfter(k),b.collapse(!0),f.removeAllRanges(),f.addRange(b),r(g=>[...g,{id:m,span:p,token:c}]),m},[e]),a=x.useCallback(c=>{if(c.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")){c.preventDefault();const m=h.previousSibling,k=h.parentNode;return k&&(k.removeChild(h),k.removeChild(m)),t(),!0}return!1},[t]),i=x.useCallback(c=>{const d=e.current;if(!d)return!1;const f=Bd(d);if(!f||f.rangeCount===0)return!1;const h=f.getRangeAt(0),p=VM(h.startContainer);if(p){c.preventDefault();const m=c.clipboardData.getData("text/plain"),k=p.nextSibling,b=document.createRange();return k&&k.nodeType===Node.TEXT_NODE?b.setStartAfter(k):b.setStartAfter(p),b.collapse(!0),f.removeAllRanges(),f.addRange(b),Mp(d,m),t(),!0}return!1},[e,t]),o=x.useCallback(c=>{if(!e.current)return;const f=n.find(g=>g.id===c);if(!f)return;const{span:h}=f,p=h.getAttribute("data-astryx-token-value")??"",m=document.createTextNode(p),k=h.nextSibling;(k==null?void 0:k.nodeType)===Node.TEXT_NODE&&k.textContent===" "&&k.remove(),h.replaceWith(m);const b=window.getSelection();if(b){const g=document.createRange();g.setStartAfter(m),g.collapse(!0),b.removeAllRanges(),b.addRange(g)}r(g=>g.filter(y=>y.id!==c)),t()},[e,n,t]),l=x.useCallback(()=>{r(c=>c.filter(d=>{var f;return(f=e.current)==null?void 0:f.contains(d.span)}))},[e]);return{tokenPortals:n,expandToken:o,insertToken:s,handleKeyDown:a,handlePaste:i,cleanupPortals:l}}function ZM(e){const t=e.split(`
|
|
148
|
-
`).length,n=e.length;return t>1?`${t} lines, ${n} chars`:`${n} chars`}function k3({text:e,onExpand:t}){const n=ke(),r=ZM(e),s=u.jsxs("div",{className:"x78zum5 xdt5ytf x1txdalj x17fpy1y",children:[u.jsx("div",{className:"x9m5x89 x141an7d x1ltkj2j x1tgivj0 x126k92a x13faqbe x1xiyphd x1odjw0f",children:e}),u.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj",children:[u.jsx("span",{className:"x141an7d xv1l7n4",children:r}),t&&u.jsx($e,{label:n("@astryx.chat.pastedText.expand"),variant:"ghost",size:"sm",onClick:t})]})]});return u.jsx(t3,{content:s,placement:"above",alignment:"start",hasHoverIndication:!1,children:u.jsx(Xf,{label:r,variant:"neutral"})})}k3.displayName="ChatPastedTextToken";function WM(e){const t=e.split(`
|
|
149
|
-
`).length,n=e.length,r=t>1?`${t} lines, ${n} chars`:`${n} chars`;return{value:e,label:r,variant:"neutral"}}function KM({inputRef:e,threshold:t=200,toToken:n=WM}){return{onPaste:x.useCallback((s,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 om=x.createContext(null);om.displayName="ChatMessageContext";function YM(){return x.use(om)}const lm=x.createContext(null);lm.displayName="ChatListContext";function QM(){return x.use(lm)}const cm=x.createContext(null);cm.displayName="ChatComposerContext";function v3(){return x.use(cm)}const um=x.createContext(null);um.displayName="ChatLayoutContext";function JM(){return x.use(um)}const eN=22,nb={root:{kVAEAm:"x1n2onr6",k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",kAzted:"xe0957l",$$css:!0},disabled:{kSiTet:"xbyyjgo",kfzvcC:"x47corl",$$css:!0}};function lx(e){const t=window.getSelection();if(!t)return;const n=document.createRange();n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n)}function zi(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+=zi(n));return t}function dm(e){const t=ke(),n=v3(),r=e.value!==void 0,{ref:s,handleRef:a,value:i=n==null?void 0:n.value,onChange:o,placeholder:l,maxRows:c=8,triggers:d,debounceMs:f=150,hasHistory:h=!0,label:p,isDisabled:m=(n==null?void 0:n.isDisabled)??!1,onPaste:k,pasteAsToken:b,onFiles:g,onSubmit:y=n==null?void 0:n.onSubmit,onKeyDown:v,xstyle:w,className:S,style:j,...C}=e,$=p??t("@astryx.chat.composerInput.label"),A=l??(n==null?void 0:n.placeholder)??t("@astryx.chat.composer.placeholder"),E=n==null?void 0:n.onChange,z=x.useCallback(K=>{if(r){o==null||o(K);return}E==null||E(K),o!==E&&(o==null||o(K))},[E,r,o]),N=x.useRef(null),T=x.useRef(null),[R,_]=x.useState(!0),M=x.useRef([]),D=x.useRef(-1),I=x.useRef(""),O=x.useRef(void 0),L=x.useRef(()=>{}),H=x.useRef(()=>{}),F={insertToken:K=>L.current(K),expandToken:K=>ne.expandToken(K),insertText:K=>H.current(K),focus:()=>{var K;return(K=N.current)==null?void 0:K.focus()},getValue:()=>zi(N.current??document.createElement("div"))};T.current=F,x.useImperativeHandle(a,()=>F);const V=n==null?void 0:n.inputControlRef;x.useEffect(()=>{if(V)return V.current={focus:()=>{var K;return(K=N.current)==null?void 0:K.focus()}},()=>{V.current=null}},[V]),x.useEffect(()=>{if(i===void 0||!N.current)return;if(i===O.current){O.current=void 0;return}const K=N.current;if(zi(K)!==i){O.current=void 0;const ge=document.activeElement===K;if(K.textContent=i,ge){const le=window.getSelection();if(le){const he=document.createRange();he.selectNodeContents(K),he.collapse(!1),le.removeAllRanges(),le.addRange(he)}}_(i.length===0)}else O.current=void 0},[i]);const J=x.useRef(null),W=x.useCallback(()=>{var un;if(!N.current)return;const K=zi(N.current),ge=N.current.querySelector("[data-astryx-token], [data-astryx-dictation-interim]")!=null,le=K.trim().length===0&&!ge,he=le?"":K;O.current=he,_(le),z==null||z(he),(un=J.current)==null||un.call(J)},[z]),ne=XM({editableRef:N,onEmitChange:W});J.current=ne.cleanupPortals;const Y=KM({inputRef:T}),G=b===!1?null:b??Y,ae=x.useCallback(K=>{const ge=N.current;ge&&Mp(ge,K)},[]);L.current=ne.insertToken,H.current=ae;const ce=FM({triggers:d,editableRef:N,onInsertToken:ne.insertToken,onInsertText:ae,onEmitChange:W,debounceMs:f}),ve=x.useCallback(()=>{W(),ce.handleInput()},[W,ce]),pe=x.useCallback(K=>{if(!ce.handleKeyDown(K)&&(v==null||v(K),!K.defaultPrevented)){if(K.key==="Backspace"){const ge=window.getSelection();if(ge&&ge.isCollapsed&&ge.rangeCount>0){const le=ge.getRangeAt(0),{startContainer:he,startOffset:un}=le;if(!(he.nodeType===Node.TEXT_NODE&&un===0&&he.previousSibling instanceof HTMLElement&&he.previousSibling.hasAttribute("data-astryx-token"))){if(he.nodeType===Node.TEXT_NODE&&he.textContent===" "&&un<=1&&he.previousSibling instanceof HTMLElement&&he.previousSibling.hasAttribute("data-astryx-token")){K.preventDefault();const nr=he.previousSibling,Br=he.parentNode;Br&&(Br.removeChild(he),Br.removeChild(nr)),W();return}}}}if(K.key==="Enter"&&!K.shiftKey){if(K.nativeEvent.isComposing||K.nativeEvent.keyCode===229||(K.preventDefault(),!N.current))return;const ge=zi(N.current).trim();if(!ge)return;h&&(M.current.push(ge),D.current=-1,I.current=""),y==null||y(ge),N.current.textContent="",_(!0),z==null||z("");return}if(h&&(K.key==="ArrowUp"||K.key==="ArrowDown")){if(!N.current)return;const ge=zi(N.current),le=M.current;if(le.length===0)return;if(K.key==="ArrowUp"){D.current===-1&&(I.current=ge);const he=D.current===-1?le.length-1:Math.max(0,D.current-1);D.current=he,N.current.textContent=le[he],lx(N.current),W(),K.preventDefault()}else if(K.key==="ArrowDown"&&D.current!==-1){const he=D.current+1;he>=le.length?(D.current=-1,N.current.textContent=I.current,I.current&&lx(N.current)):(D.current=he,N.current.textContent=le[he],lx(N.current)),W(),K.preventDefault()}}}},[h,y,z,W,ce,v]),de=x.useCallback(K=>{const ge=N.current;if(!ge||(Bd(ge),ne.handlePaste(K)))return;const le=Array.from(K.clipboardData.files);if(le.length>0){K.preventDefault(),g==null||g(le);return}K.preventDefault();const he=K.clipboardData.getData("text/plain");if(G!=null&&G.onPaste(K,he)){W();return}if(k==null?void 0:k(K,he)){W();return}Mp(ge,he),W()},[g,k,W,ne,G]),ie=c*eN;return u.jsxs("div",{ref:s,...P(U("chat-composer-input"),B(nb.root,m&&nb.disabled,w),S,j),...C,children:[R&&u.jsx("div",{className:"x10l6tqk x13vifvy x1o0tod xtijo5x x47corl xv1l7n4 xjm74w1 x6pjikd x19v9tvf x9ynric x87ps6o x9epnlk","aria-hidden":"true",children:A}),u.jsx("div",{ref:N,"aria-multiline":"true","aria-label":$,contentEditable:!m,suppressContentEditableWarning:!0,onInput:ve,onKeyDown:pe,onPaste:de,...ce.ariaProps,...P({className:"x1a2a7pz x126k92a x13faqbe x1odjw0f xjm74w1 x6pjikd x19v9tvf x9ynric x1tgivj0 xxugrtn x9epnlk"},{style:{maxHeight:`${ie}px`}})}),ce.renderMenu(),ne.tokenPortals.filter(({span:K})=>K.isConnected).map(({id:K,span:ge,token:le})=>rc.createPortal(GM(le)?u.jsx("span",{children:le.render()},K):le.value.length>(G===null?1/0:200)?u.jsx(k3,{text:le.value,onExpand:()=>ne.expandToken(K)},K):u.jsx(Xf,{label:le.label,variant:le.variant,icon:le.icon},K),ge))]})}dm.displayName="ChatComposerInput";const tN={root:{kaIpWk:"xy0xnkn",kmuXW:"x2lah0s",$$css:!0}};function fm(e){const t=ke(),n=v3(),{isStopShown:r=(n==null?void 0:n.isStopShown)??!1,isDisabled:s=!((n==null?void 0:n.canSend)??!1),onSend:a,onStop:i=n==null?void 0:n.onStop,sendIcon:o,stopIcon:l,size:c="md",xstyle:d,className:f,style:h,ref:p,...m}=e,k=a??(()=>n==null?void 0:n.onSubmit("")),b=tc("stop"),g=tc("arrowUp");return u.jsx($e,{ref:p,label:t(r?"@astryx.chatSendButton.stop":"@astryx.chatSendButton.send"),variant:r?"secondary":"primary",size:c,icon:r?l??b:o??g,isIconOnly:!0,isDisabled:!r&&s,onClick:r?i:k,...m,...U("chat-send-button"),className:f,style:h,xstyle:[tN.root,d]})}fm.displayName="ChatSendButton";const rb={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}},nN={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 w3(e){const t=ke(),{ref:n,onSubmit:r,onStop:s,isStopShown:a=!1,value:i,onChange:o,placeholder:l,isDisabled:c=!1,density:d="balanced",elevation:f="low",drawer:h,headerActions:p,headerContext:m,input:k,footerActions:b,sendActions:g,sendButton:y,status:v,statusPosition:w="bottom",xstyle:S,className:j,style:C,...$}=e,A=l??t("@astryx.chat.composer.placeholder"),[E,z]=x.useState(""),N=i!==void 0,T=N?i:E,R=x.useCallback(F=>{N||z(F),o==null||o(F)},[N,o]),_=x.useCallback(()=>{const F=T.trim();!F||c||(r(F),R(""))},[T,c,r,R]),M=T.trim().length>0&&!c,D=x.useRef(null),I=x.useRef(null),O=x.useCallback(F=>{var W;if(F.target.closest('button, a, [role="button"], [contenteditable="true"], [data-astryx-token]'))return;if(I.current){I.current.focus();return}const J=(W=D.current)==null?void 0:W.querySelector('[contenteditable="true"], textarea');J==null||J.focus()},[]),L=v?u.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:[u.jsx(Ee,{icon:v.type==="error"?"error":"warning",size:"md",color:v.type==="error"?"error":"warning"}),v.message]}):null,H=x.useMemo(()=>({value:T,onChange:R,onSubmit:_,placeholder:A,isDisabled:c,isStopShown:a,canSend:M,onStop:s,inputControlRef:I}),[T,R,_,A,c,a,M,s]);return u.jsx(cm,{value:H,children:u.jsxs("div",{ref:n,...P(U("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"}}[!!c<<0],j,C),...$,children:[w==="top"&&L,h,u.jsxs("div",{ref:D,onClick:O,...B(rb.body,nN[f],d==="compact"&&rb.compact,S),children:[(p||m)&&u.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj xe0p6wg",children:[u.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:p}),u.jsx("div",{className:"x78zum5 x6s0dn4 x1txdalj xvc5jky x141an7d x1ltkj2j xv1l7n4",children:m})]}),u.jsx("div",{className:"x78zum5 xdt5ytf",children:k??u.jsx(dm,{})}),u.jsxs("div",{className:"x78zum5 x6s0dn4 x1qughib x1txdalj x21xpn4",children:[u.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:b}),u.jsxs("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:[g,y??u.jsx(fm,{})]})]})]}),w==="bottom"&&L]})})}w3.displayName="ChatComposer";const ll={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}},rN={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 S3({children:e,emptyState:t,scrollToTopAction:n,density:r="balanced",gap:s,isStreaming:a=!1,xstyle:i,className:o,style:l,"data-testid":c,ref:d,...f}){const h=JM(),p=x.useRef(null),m=x.useRef(null),[k,b]=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 C;const S=(C=h==null?void 0:h.scrollContainerRef)==null?void 0:C.current;if(!n||!p.current)return;const j=new IntersectionObserver($=>{var A;(A=$[0])!=null&&A.isIntersecting&&b(async()=>{await n()})},{root:S??null,threshold:0});return j.observe(p.current),()=>j.disconnect()},[n,h]);const y=x.useMemo(()=>({density:r}),[r]),v=r==="compact"?ll.gapCompact:r==="spacious"?ll.gapSpacious:ll.gapBalanced,w=s==null?null:rN[s];return u.jsx(lm,{value:y,children:u.jsx("div",{...f,ref:d,role:"log","aria-live":"polite","aria-busy":a||void 0,tabIndex:0,"data-testid":c,...P(U("chat-message-list",{density:r}),B(ll.root,i),o,l),children:u.jsxs("div",{ref:m,...B(ll.inner,v,w),children:[n&&u.jsx("div",{ref:p,"aria-hidden":!0}),k&&u.jsx("div",{className:"x78zum5 xl56j7k x8o8v82",children:u.jsx(mr,{size:"md"})}),u.jsx("div",{className:"x98rzlu x2lwn1j","aria-hidden":!0}),g?e:t?u.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu x2lwn1j",children:t}):null]})})})}S3.displayName="ChatMessageList";const Et={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 hm({sender:e,children:t,avatar:n,name:r,metadata:s,density:a,xstyle:i,className:o,style:l,"data-testid":c,ref:d,...f}){const h=ke(),p=QM(),m=a??(p==null?void 0:p.density)??"balanced",k=x.useMemo(()=>({sender:e,density:m}),[e,m]),b=m==="compact"?Et.rootGapCompact:m==="spacious"?Et.rootGapSpacious:Et.rootGapBalanced,g=m==="compact"?Et.childrenGapCompact:m==="spacious"?Et.childrenGapSpacious:Et.childrenGapBalanced,y=e==="system"?Et.rootSystem:e==="user"?Et.rootUser:Et.rootAssistant,v=e==="system"?Et.contentColumnSystem:e==="user"?Et.contentColumnUser:Et.contentColumnAssistant,w=e==="system"?Et.childrenSystem:e==="user"?Et.childrenUser:Et.childrenAssistant,S=e==="system",j=n!=null&&!S,C=r!=null&&!S,$=x.useId();return u.jsx(om,{value:k,children:u.jsxs("article",{...f,ref:d,"data-testid":c,"aria-label":C?void 0:h("@astryx.chatMessage.messageFrom",{sender:e}),"aria-labelledby":C?$:void 0,...P(U("chat-message",{sender:e,density:m}),B(Et.root,y,j&&b,i),o,l),children:[j&&u.jsx("div",{className:"x2lah0s x5du68j",children:n}),u.jsxs("div",{...B(Et.contentColumn,v),children:[C&&u.jsx("div",{id:$,className:"x141an7d x2mo6ok xv1l7n4 x1ltkj2j x14cgwvg",children:r}),u.jsx("div",{...B(Et.childrenWrap,w,g),children:t}),s!=null&&!S&&u.jsx("div",{children:s})]})]})})}hm.displayName="ChatMessage";const Je={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 j3({children:e,variant:t="filled",name:n,metadata:r,group:s,xstyle:a,className:i,style:o,"data-testid":l,ref:c,...d}){const f=YM(),h=(f==null?void 0:f.sender)??"assistant",p=(f==null?void 0:f.density)??"balanced",m=p==="compact"?Je.paddingCompact:p==="spacious"?Je.paddingSpacious:Je.paddingBalanced,k=h==="user",b=t==="ghost"?Je.ghost:k?Je.user:Je.assistant,g=s==="first"?k?Je.groupFirstUser:Je.groupFirstAssistant:s==="middle"?k?Je.groupMiddleUser:Je.groupMiddleAssistant:s==="last"?k?Je.groupLastUser:Je.groupLastAssistant:null,y=p==="compact"?Je.metadataPaddingCompact:p==="spacious"?Je.metadataPaddingSpacious:Je.metadataPaddingBalanced;return u.jsxs(u.Fragment,{children:[n&&u.jsx("div",{"data-chat-name":!0,...B(y,Je.nameRow,Je.headerReducedGap,k&&Je.alignEnd),children:n}),u.jsx("div",{...d,ref:c,"data-testid":l,...P(U("chat-message-bubble",{sender:h,variant:t,density:p}),B(Je.content,p==="compact"&&Je.radiusCompact,b,m,t==="ghost"&&Je.paddingBlockNone,g,a),i,o),children:e}),r&&u.jsx("div",{...B(y,Je.metadataReducedGap,k&&Je.alignEnd),children:r})]})}j3.displayName="ChatMessageBubble";const sb={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 Np({children:e,variant:t="default",icon:n,xstyle:r,className:s,style:a,ref:i,...o}){return t==="divider"?u.jsx("div",{ref:i,...P(U("chat-system-message",{variant:t}),B(sb.dividerWrap,r),s,a),...o,role:"status",children:u.jsx(nc,{label:e})}):u.jsx("div",{ref:i,...P(U("chat-system-message",{variant:t}),B(sb.root,r),s,a),...o,role:"status",children:u.jsxs("span",{className:"x3nfvp2 x6s0dn4 x1s4dlld x2lah0s xuxw1ft",children:[n!=null&&u.jsx("span",{className:"x3nfvp2 x6s0dn4 x2lah0s",children:n}),e]})})}Np.displayName="ChatSystemMessage";const sN=1e3/60;function aN({scrollRef:e,enabled:t=!0,lockThreshold:n=10,buttonThreshold:r=100,damping:s=.7,stiffness:a=.05,mass:i=1.25}){const[o,l]=x.useState(!1),[c,d]=x.useState(!0),f=x.useRef(!0),h=x.useRef(!0),p=x.useRef(0),m=x.useRef(!1),k=x.useRef(void 0),b=x.useRef(0),g=x.useRef(0),y=x.useRef(0),v=x.useCallback(()=>{const T=e.current;if(!T||!f.current){m.current=!1,k.current=void 0,p.current=0;return}if(T.scrollHeight<=T.clientHeight){m.current=!1,k.current=void 0,p.current=0;return}const R=T.scrollHeight-T.clientHeight,_=R-T.scrollTop;if(Math.abs(_)<.5&&Math.abs(p.current)<.1){T.scrollTop=R,m.current=!1,k.current=void 0,p.current=0;return}const M=performance.now(),D=k.current?(M-k.current)/sN:1;k.current=M,p.current=(s*p.current+a*_)/i,T.scrollTop+=p.current*D,requestAnimationFrame(v)},[e,s,a,i]),w=x.useCallback(()=>{const T=e.current;T&&(m.current=!1,p.current=0,k.current=void 0,T.scrollTop=T.scrollHeight-T.clientHeight,b.current=T.scrollTop)},[e]),S=Io("(prefers-reduced-motion: reduce)"),j=x.useCallback(()=>{if(f.current){if(S){w();return}m.current||(m.current=!0,k.current=void 0,requestAnimationFrame(v))}},[v,w,S]),C=x.useCallback(T=>{if(f.current=!0,d(!0),l(!1),h.current=!1,(T==null?void 0:T.behavior)==="instant"){w();return}j()},[j,w]),$=x.useCallback(T=>{const R=e.current;if(!R)return;const _=R.getBoundingClientRect(),D=T.getBoundingClientRect().top-_.top+R.scrollTop;R.scrollTo({top:D,behavior:"instant"}),b.current=R.scrollTop},[e]),A=x.useCallback(()=>{const T=e.current;if(!T)return;const R=T.getElementsByClassName("astryx-chat-message"),_=R[R.length-1];_ instanceof HTMLElement&&$(_)},[e,$]),E=x.useCallback(()=>{f.current=!0,d(!0),l(!1),j()},[j]),z=x.useCallback(()=>{f.current=!1,m.current=!1,d(!1)},[]),N=x.useCallback(()=>{if(!t||!f.current)return;const T=e.current;if(h.current&&T&&T.scrollHeight>T.clientHeight){h.current=!1,w();return}j()},[t,j,w,e]);return x.useEffect(()=>{const T=e.current;if(!T||!t)return;b.current=T.scrollTop,g.current=T.scrollHeight,y.current=T.offsetHeight;const R=()=>{const{scrollTop:I,scrollHeight:O,offsetHeight:L}=T,H=O-I-L;l(H>r);const F=O!==g.current,V=L!==y.current;if(g.current=O,y.current=L,F||V){b.current=I;return}const J=I<b.current;b.current=I,J&&f.current&&(f.current=!1,m.current=!1,d(!1))},_=()=>{T.scrollHeight-T.scrollTop-T.offsetHeight<=n&&(f.current=!0,d(!0))},M=I=>{I.deltaY<0&&m.current&&(f.current=!1,m.current=!1,d(!1))},D=()=>{m.current&&(f.current=!1,m.current=!1,d(!1))};return T.addEventListener("scroll",R,{passive:!0}),T.addEventListener("scrollend",_),T.addEventListener("wheel",M,{passive:!0}),T.addEventListener("touchmove",D,{passive:!0}),requestAnimationFrame(()=>{T.scrollHeight>T.clientHeight&&(T.scrollTop=T.scrollHeight-T.clientHeight,b.current=T.scrollTop,h.current=!1)}),()=>{T.removeEventListener("scroll",R),T.removeEventListener("scrollend",_),T.removeEventListener("wheel",M),T.removeEventListener("touchmove",D)}},[e,t,n,r]),{isScrolledUp:o,isLocked:c,scrollToBottom:C,scrollToMessage:$,lock:E,unlock:z,scrollIfLocked:N,scrollToLastMessage:A}}function iN({isLocked:e,onResize:t}){const[n,r]=x.useState(!1),s=x.useRef(null),a=x.useRef(e);a.current=e;const i=x.useRef(t);i.current=t;const o=x.useRef(null),l=x.useRef(null),c=x.useCallback(p=>{Og(p,()=>{var b;(b=i.current)==null||b.call(i);const m=p.getElementsByClassName("astryx-chat-message"),k=m.length>0?m[m.length-1]:null;k&&k!==s.current&&(s.current=k,a.current||r(!0))}),l.current=()=>Dg(p)},[]),d=x.useCallback(()=>{var p;(p=l.current)==null||p.call(l),l.current=null},[]),f=x.useCallback(p=>{p!==o.current&&(d(),o.current=p,p&&c(p))},[c,d]);x.useEffect(()=>()=>d(),[d]);const h=x.useCallback(()=>{r(!1)},[]);return{hasNewMessages:n,dismiss:h,contentRef:f}}const Wr={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}},E3={pending:"clock",running:null,complete:"check",error:"close"},$3={pending:Wr.colorPending,running:Wr.colorRunning,complete:Wr.colorComplete,error:Wr.colorError};function oN(e){return E7(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 ab({call:e}){const t=ke(),n=e.status??"complete",r=e.resultDetail!=null,[s,a]=x.useState(!1),i=x.useId(),o=r?()=>a(c=>!c):void 0,l=u.jsxs("div",{role:r?"button":void 0,tabIndex:r?0:void 0,"aria-expanded":r?s:void 0,"aria-controls":r&&s?i:void 0,onClick:o,onKeyDown:r?c=>{(c.key==="Enter"||c.key===" ")&&(c.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"}}[!!r<<0],children:[u.jsxs("span",{title:n==="error"?e.errorMessage:void 0,...B(Wr.statusIcon,$3[n]),children:[n==="running"?u.jsx(mr,{size:"sm",shade:"subtle"}):n==="pending"?u.jsx(mr,{size:"sm",shade:"subtle"}):u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),u.jsx("span",{className:"x1n2onr6 x3nfvp2",children:u.jsx(Ee,{icon:E3[n]??"check",size:"xsm",color:"inherit"})})]}),n==="error"&&e.errorMessage!=null&&u.jsx(Lo,{children:t("@astryx.chatToolCalls.error",{message:e.errorMessage??""})})]}),u.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:e.name}),e.node!=null&&u.jsx(Xf,{label:e.node,variant:"neutral",xstyle:Wr.nodePill}),e.target!=null&&u.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:e.target}),(e.additions!=null||e.deletions!=null||e.stats!=null)&&u.jsxs("span",{className:"x78zum5 x6s0dn4 xzye2dw x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:[e.additions!=null&&u.jsxs("span",{className:"xtjic6",children:["+",e.additions]}),e.deletions!=null&&u.jsxs("span",{className:"xjt36v0",children:["-",e.deletions]}),e.stats]}),e.duration!=null&&n==="complete"&&u.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft x2lah0s",children:e.duration}),r&&u.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"}}[!!s<<0],children:u.jsx(Ee,{icon:"chevronDown",size:"xsm",color:"inherit"})})]});return r?u.jsxs("div",{children:[l,s&&u.jsx("div",{id:i,className:"x1f43n9v x1wesfrj",children:e.resultDetail})]}):l}function C3(e){const t=ke(),{calls:n,label:r,isExpanded:s,defaultIsExpanded:a,onExpandedChange:i,xstyle:o,className:l,style:c,ref:d,...f}=e,h=a??!1,[p,m]=x.useState(h),k=x.useId(),b=s!==void 0,g=b?s:p,y=x.useCallback(()=>{const S=!g;b||m(S),i==null||i(S)},[g,b,i]);if(n.length===0)return null;if(n.length===1)return u.jsx("div",{ref:d,...P(U("chat-tool-calls"),B(Wr.root,o),l,c),...f,children:u.jsx(ab,{call:n[0]})});const v=n[n.length-1],w=v.status??"complete";return u.jsxs("div",{ref:d,...P(U("chat-tool-calls"),B(Wr.root,o),l,c),...f,children:[u.jsxs("div",{role:"button",tabIndex:0,"aria-expanded":g,"aria-controls":k,onClick:y,onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),y())},className:"x78zum5 x6s0dn4 x1s4dlld xjwf9q1 x13f7esw x1ypdohk",children:[g?u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1kky2od xlup9mm xv1l7n4",children:u.jsx(Ee,{icon:"wrench",size:"sm",color:"inherit"})}),u.jsx("span",{className:"x141an7d x1ltkj2j x9ynric x1e4wzip xv1l7n4",children:t("@astryx.chatToolCalls.groupLabel",{count:n.length})})]}):u.jsxs(u.Fragment,{children:[u.jsx("span",{...B(Wr.statusIcon,$3[w]),children:w==="running"?u.jsx(mr,{size:"sm",shade:"subtle"}):w==="pending"?u.jsx(mr,{size:"sm",shade:"subtle"}):u.jsxs(u.Fragment,{children:[u.jsx("span",{className:"x10l6tqk x10a8y8t x1pjcqnp xtwfq29 x1xyvc85"}),u.jsx("span",{className:"x1n2onr6 x3nfvp2",children:u.jsx(Ee,{icon:E3[w]??"check",size:"xsm",color:"inherit"})})]})}),u.jsx("span",{className:"x141an7d x1ltkj2j x9m5x89 x1e4wzip xv1l7n4 xuxw1ft xb3r6kr xlyipyv xs83m0k x13n9wmd",children:v.name}),v.target!=null&&u.jsx("span",{className:"x141an7d x1ltkj2j x9ynric xnbbluu xuxw1ft xb3r6kr xlyipyv x1g3ib7 xeuugli",children:v.target})]}),u.jsx("span",{className:"x3nfvp2 x6s0dn4 x1lsbc85 x141an7d x1ltkj2j x9ynric xnbbluu x2lah0s",children:!g&&u.jsxs(u.Fragment,{children:[u.jsx(Ee,{icon:"wrench",size:"xsm",color:"inherit"}),n.length]})}),u.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:u.jsx(Ee,{icon:"chevronDown",size:"xsm",color:"inherit"})})]}),u.jsx("div",{id:k,...{0:{className:"xrvj5dj xihq33y xb0j27v x9kvfbb"},1:{className:"xrvj5dj xb0j27v x9kvfbb x1tu4anv"}}[!!g<<0],children:u.jsx("div",{className:"xb3r6kr x2lwn1j",children:u.jsx("div",{className:"x78zum5 xdt5ytf x7a5moj xtedp8i",children:n.map(S=>u.jsx(ab,{call:S},oN(S)))})})})]})}C3.displayName="ChatToolCalls";const cx={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 T3({ref:e,isVisible:t,label:n,onClick:r,xstyle:s,className:a,style:i,...o}){const l=ke();return u.jsx("div",{ref:e,...P(B(cx.wrapper,s),a,i),...o,children:u.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:u.jsx($e,{label:n??l("@astryx.chatLayoutScrollButton.scrollToBottom"),"aria-label":n??l("@astryx.chatLayoutScrollButton.scrollToBottom"),icon:u.jsx(Ee,{icon:"chevronDown",size:"md"}),variant:"ghost",size:"md",onClick:r,xstyle:[cx.button,n?cx.buttonWithLabel:null],children:n??void 0})})})}T3.displayName="ChatLayoutScrollButton";const $t={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 lN(e){return!(e==null||e===!1||Array.isArray(e)&&e.length===0)}function M3({children:e,composer:t,density:n="balanced",emptyState:r,scrollButton:s,scrollRef:a,xstyle:i,className:o,style:l,"data-testid":c,ref:d,...f}){const h=ke(),p=x.useRef(null),m=a??p,k=!a,b=aN({scrollRef:m}),g=iN({isLocked:b.isLocked,onResize:b.scrollIfLocked}),y=u.jsx(T3,{isVisible:b.isScrolledUp||g.hasNewMessages,label:g.hasNewMessages?h("@astryx.chatLayout.newMessages"):void 0,onClick:()=>{g.dismiss(),b.scrollToBottom()}}),v=x.useMemo(()=>({scrollContainerRef:m,contentRef:g.contentRef}),[m,g.contentRef]),w=!lN(e),j={compact:{messageArea:$t.messageAreaCompact,blurLayer:$t.blurLayerCompact,dock:$t.dockCompact,dockInner:$t.dockInnerCompact},balanced:{messageArea:$t.messageAreaBalanced,blurLayer:$t.blurLayerBalanced,dock:$t.dockBalanced,dockInner:$t.dockInnerBalanced},spacious:{messageArea:$t.messageAreaSpacious,blurLayer:$t.blurLayerSpacious,dock:$t.dockSpacious,dockInner:$t.dockInnerSpacious}}[n];return u.jsx(um,{value:v,children:u.jsxs("div",{...f,ref:Wt(d,p),"data-testid":c,...P(U("chat-layout",{density:n}),B($t.root,k&&$t.rootScrollable,i),o,l),children:[u.jsx("div",{...B($t.messageArea,j.messageArea),children:w&&r?u.jsx("div",{className:"x78zum5 x6s0dn4 xl56j7k x98rzlu xz65tgg",children:r}):e}),u.jsxs("div",{...{0:{className:"x1ey2m1c x1o0tod xtijo5x x1ja2u2z xc8icb0 x47corl x2lah0s xixxii4"},1:{className:"x1ey2m1c x1o0tod xtijo5x x1ja2u2z xc8icb0 x47corl x2lah0s x7wzq59"}}[!!k<<0],children:[s===void 0?y:s,u.jsx("div",{...B($t.blurLayer,j.blurLayer)}),u.jsx("div",{...B($t.dock,j.dock),children:u.jsx("div",{...B($t.dockInner,j.dockInner),children:t})})]})]})})}M3.displayName="ChatLayout";const sc=x.createContext(null);sc.displayName="ListContext";const ux={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}},cN={kt6KFK:"x1khind5",$$css:!0},uN={counterStart:e=>[cN,{"--x-counterReset":`astryx-list ${e}`!=null?`astryx-list ${e}`:void 0}]};function bn({children:e,density:t="balanced",hasDividers:n=!1,header:r,listStyle:s="none",start:a,xstyle:i,className:o,style:l,"data-testid":c,ref:d}){const f=x.useId(),h=s==="decimal",p=h?"ol":"ul",m=x.useMemo(()=>({density:t,hasDividers:n,listStyle:s}),[t,n,s]),k=u.jsx(p,{ref:d,"data-testid":c,"aria-labelledby":r!=null?f:void 0,...h&&a!=null&&a!==1?{start:a}:{},role:"list",...P(U("list",{density:t,listStyle:s}),B(ux.list,n&&ux.withDividers,s!=="none"&&(a!=null&&a!==1?uN.counterStart(a-1):ux.withCounter),i),o,l),children:e});return r==null?u.jsx(sc,{value:m,children:k}):u.jsx(sc,{value:m,children:u.jsxs("div",{className:"x78zum5 xdt5ytf",children:[u.jsx("div",{id:f,className:"x1p37lm5",children:r}),k]})})}bn.displayName="List";const dN=[];function xm({label:e,isLabelHidden:t=!1,description:n,status:r,value:s,onChange:a,changeAction:i,density:o="balanced",hasDividers:l=!1,isDisabled:c=!1,disabledMessage:d,isReadOnly:f=!1,children:h,ref:p,width:m,xstyle:k,className:b,style:g,"data-testid":y,...v}){const w=x.useId(),S=x.useId(),j=x.useId(),C=x.useId(),[,$]=x.useTransition(),A=s!==void 0,E=s??dN,[z,N]=x.useOptimistic(E),[T,R]=x.useOptimistic(null),_=c&&!!d,M=rs({placement:"above",focusTrigger:"always",isEnabled:_}),D=x.useCallback((O,L)=>{a==null||a(O),i&&$(async()=>{N(O),L!==void 0&&R(L),await i(O)})},[a,i,$,N,R]),I=x.useMemo(()=>({value:A?z:void 0,onChange:A?D:void 0,isDisabled:c,hasDisabledMessage:_,isReadOnly:f,loadingValue:T}),[A,z,D,c,_,f,T]);return u.jsxs(Uc,{...v,ref:p,"data-testid":y,label:e,isLabelHidden:t,description:n,inputID:w,labelID:S,isGroupLabel:!0,descriptionID:n?j:void 0,isDisabled:c,status:r?{type:r.type,message:r.message,messageID:r.message?C:void 0}:void 0,statusVariant:"detached",width:m,xstyle:k,...P(U("checkbox-list"),{className:b,style:g}),children:[u.jsx(Yf,{value:I,children:u.jsx("div",{ref:O=>{M.ref(O)},role:"group","aria-labelledby":S,"aria-describedby":[n?j:null,r!=null&&r.message?C:null,_?M.describedBy:null].filter(Boolean).join(" ")||void 0,children:u.jsx(bn,{density:o,hasDividers:l,children:h})})}),_&&M.renderTooltip(d)]})}xm.displayName="CheckboxList";const ib={withCounter:{kAmcRD:"xfrknyr",$$css:!0},withDivider:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},fN={noRadius:{kaIpWk:"x2u8bby",$$css:!0}};function yt({label:e,description:t,startContent:n,endContent:r,onClick:s,interactiveRef:a,href:i,target:o,rel:l,isDisabled:c=!1,isSelected:d=!1,xstyle:f,className:h,style:p,ref:m,...k}){const b=x.use(sc),g=(b==null?void 0:b.density)??"balanced",y=(b==null?void 0:b.hasDividers)??!1,v=(b==null?void 0:b.listStyle)??"none",w=v!=="none",S=v==="disc"?u.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:u.jsx("span",{className:"x1v4s8kt xols6we x16rqkct x19aspcf"})}):v==="circle"?u.jsx("span",{className:"xoi2r2e x9f619 x78zum5 x6s0dn4 xl56j7k x2lah0s x12xnipv x1233pnv",children:u.jsx("span",{className:"x1v4s8kt xols6we x16rqkct xmkeg23 x1y0btm7 xqcx1ss xjbqb8w"})}):v==="decimal"?u.jsx("span",{className:"xoi2r2e x2lah0s x1tgivj0 xjm74w1 xw6l6zx x12xnipv xc2ndz5"}):null;return u.jsx(Ho,{as:"li",ref:m,marker:S,startContent:n,label:e,description:t,endContent:r,onClick:s,interactiveRef:a,href:i,target:o,rel:l,isDisabled:c,isSelected:d,density:g,xstyle:[w&&ib.withCounter,y&&ib.withDivider,y&&fN.noRadius,f],...P(U("list-item"),{className:h,style:p}),...k})}yt.displayName="ListItem";const hN={selected:{kWkggS:"xgcxg3y",$$css:!0}};function pm({label:e,"aria-label":t,value:n,description:r,endContent:s,isDisabled:a=!1,isLoading:i=!1,isChecked:o,onCheck:l,ref:c,xstyle:d,className:f,style:h,onClick:p,...m}){const k=ke(),b=x.use(Yf);if(b&&b.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:k("@astryx.checkboxList.item.checkbox"));Zf("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 y=x.use(sc),w=((y==null?void 0:y.density)??"balanced")==="compact"?"sm":"md",S=((b==null?void 0:b.isDisabled)??!1)||a,j=(b==null?void 0:b.isReadOnly)??!1,C=i||((b==null?void 0:b.loadingValue)!=null&&n!==void 0?b.loadingValue===n:!1);let $=!1;b&&b.value!==void 0&&n!==void 0?$=b.value.includes(n):o!==void 0&&($=o);const A=!j&&(b!=null||l!=null),E=x.useRef(null),z=A||p!=null,N=()=>{var T,R;if(!(S||j||C))if(b&&b.value!==void 0&&n!==void 0)b.value.includes(n)?(T=b.onChange)==null||T.call(b,b.value.filter(M=>M!==n),n):(R=b.onChange)==null||R.call(b,[...b.value,n],n);else{const _=$!==!0;l==null||l(_)}};return u.jsx(yt,{...m,ref:c,label:e,description:r,endContent:s,isDisabled:S,interactiveRef:z?E:void 0,"aria-busy":C||void 0,xstyle:[$===!0&&!S&&!j&&hN.selected,d],className:f,style:h,startContent:u.jsx(Xw,{ref:E,label:g,isLabelHidden:!0,value:$,onChange:()=>N(),onClick:p,isDisabled:S,isReadOnly:j,isLoading:C,size:w})})}pm.displayName="CheckboxListItem";const Ap=120;function xN(e){let t=0,n=0;const r=[];for(const o of e){const l=o.width;if((l==null?void 0:l.type)==="pixel")n+=l.value;else{const c=(l==null?void 0:l.value)??1,d=l!=null?l.minWidth??Ap:0;t+=c,r.push({key:o.key,proportion:c,minWidth:d})}}let s=0;if(t>0)for(const o of r){const l=o.minWidth*t/o.proportion;l>s&&(s=l)}const a=n+s,i=new Map;for(const o of e){const l=o.width,c={};if((l==null?void 0:l.type)==="pixel")c.width=`${l.value}px`,c.minWidth=`${l.value}px`;else{const d=(l==null?void 0:l.value)??1;if(t>0&&(c.width=`${d/t*100}%`),l!=null){const f=l.minWidth??Ap;c.minWidth=`${f}px`}}i.set(o.key,{style:c})}return{columns:i,tableMinWidth:a}}function pN(e=1,t){return{type:"proportional",value:e,minWidth:(t==null?void 0:t.minWidth)??Ap}}function ob(e){return e.length===0?e:e.charAt(0).toUpperCase()+e.slice(1)}function gN(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 mN(e){return e==null?0:typeof e=="string"?e.length:typeof e=="number"||typeof e=="boolean"?String(e).length:0}function yN(e){if(e==null||typeof e!="string"&&typeof e!="number"&&typeof e!="boolean")return 0;const t=String(e);let n=0,r=0;for(let s=0;s<=t.length;s++)s===t.length||t[s]===" "||t[s]===" "||t[s]===`
|
|
151
|
-
`?(r>n&&(n=r),r=0):r++;return n}const bN=60,kN=8;function vN(e){if(e.length===0)return[];const t=e[0],n=Object.keys(t),r=e.slice(0,Math.min(5,e.length));return n.map(a=>{const i=ob(a).length;let o=i,l=i;for(const c of r){const d=mN(c[a]);d>o&&(o=d);const f=yN(c[a]);f>l&&(l=f)}return{key:a,headerLen:i,maxContentLen:o,maxWordLen:l}}).map(a=>{const i=a.maxContentLen<=6?1:a.maxContentLen<=15?2:3,o=Math.max(Math.max(a.headerLen,a.maxWordLen)*kN,bN);return{key:a.key,header:ob(a.key),width:pN(i,{minWidth:o})}})}const lb={x139im0d:"x139im0d",$$css:!0},N3={cell:{kVQacm:"xb3r6kr",kg5iWk:"xlyipyv",khDVqt:"xuxw1ft",ks0D6T:"x1m189uc",$$css:!0}},wN={cell:{kVQacm:"xb3r6kr",kHjlTd:"x1mzt3pk",kTgw9:"x13faqbe",ks0D6T:"x1m189uc",$$css:!0}},A3={compact:{kZCmMZ:"x5uh4xs",kwRFfy:"xbg7gas",$$css:!0},balanced:{kZCmMZ:"x9bi00s",kwRFfy:"xpilulx",$$css:!0},spacious:{kZCmMZ:"x18c6q21",kwRFfy:"x1wzlfcn",$$css:!0}},th=x.createContext(null);th.displayName="TableContext";const SN={row:{kWkggS:"x1dnou9g","--table-row-overlay":"x1rht92",$$css:!0}},jN={row:{kWkggS:"xe9uy6x","--table-row-overlay":"x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}},EN={row:{kWkggS:"x1dnou9g xe9uy6x","--table-row-overlay":"x1rht92 x1pkcbo2",k1ekBW:"x15406qy",kIyJzY:"xuedmi6",kAMwcw:"xlr8y92",$$css:!0}};function Hd({children:e,xstyle:t,ref:n,isHeaderRow:r=!1,...s}){const a=x.use(th);if(!a)return u.jsx("tr",{ref:n,...s,...P(U("table-row"),B(lb,t)),children:e});const i=[];return r||(a.isStriped&&a.hasHover?i.push(EN.row):a.isStriped?i.push(SN.row):a.hasHover&&i.push(jN.row)),a.dividers==="rows"||a.dividers,t&&i.push(...t),u.jsx("tr",{ref:n,...s,...P(U("table-row"),B(lb,...i)),children:e})}Hd.displayName="TableRow";const pu={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 gm({children:e,menuWidth:t,size:n="md",label:r,isDisabled:s=!1,onOpenChange:a,ref:i,className:o,style:l,xstyle:c,triggerXstyle:d,"data-testid":f,...h}){const p=ke(),m=r??p("@astryx.contextMenu.label"),{items:k,menuContent:b,...g}=h,y=k??[],v=b,w=x.useId(),S=x.useRef({x:0,y:0}),j=x.useRef(null),C=x.useRef(null),$=x.useRef(null),[A,E]=x.useState(!1),z=Lc({mode:"context",onHide:x.useCallback(()=>{E(!1),a==null||a(!1);const Y=$.current;$.current=null,Y&&document.contains(Y)&&Y.focus()},[a]),onShow:x.useCallback(()=>{E(!0),a==null||a(!0)},[a]),lightDismiss:!1}),N=x.useCallback(()=>{z.hide()},[z]),{listRef:T,handleKeyDown:R,focusFirst:_,focusItem:M,ownsEvent:D,getItems:I}=Vf({itemSelector:Zg,boundarySelector:Wg,wrap:!1,onEscape:N}),O=Vg({getItemLabels:()=>I().map(Y=>Y.textContent),onMatch:M,getCurrentIndex:()=>I().findIndex(Y=>Y===document.activeElement||Y.contains(document.activeElement))});x.useEffect(()=>{if(!A)return;const Y=G=>{const ae=T.current;ae&&!ae.contains(G.target)&&N()};return document.addEventListener("mousedown",Y),()=>{document.removeEventListener("mousedown",Y)}},[A,N,T]),x.useEffect(()=>{if(!A)return;const Y=G=>{G.key==="Escape"&&(G.isComposing||G.keyCode===229||(G.preventDefault(),N()))};return document.addEventListener("keydown",Y),()=>{document.removeEventListener("keydown",Y)}},[A,N]);const L=x.useCallback(Y=>{if(D(Y)){if(Y.key==="Enter"||Y.key===" "){Y.preventDefault();const G=document.activeElement;G&&Wf.has(G.getAttribute("role")??"")&&G.click();return}if(Y.key==="Tab"){N();return}if(O.onKeyDown(Y)){Y.preventDefault();return}R(Y)}},[R,N,O,D]),H=x.useCallback((Y,G,ae)=>{S.current={x:Y,y:G};const ce=j.current;ce&&(ce.style.left=`${Y}px`,ce.style.top=`${G}px`),$.current=document.activeElement instanceof HTMLElement?document.activeElement:ae,z.show(),requestAnimationFrame(()=>_())},[z,_]),F=x.useCallback(Y=>{if(s)return;Y.preventDefault();const G=C.current,ae=G==null?void 0:G.getBoundingClientRect(),ce=Y.clientX===0&&Y.clientY===0&&Y.detail===0,ve=ce||!ae?0:Y.clientX-ae.left,pe=ce||!ae?(ae==null?void 0:ae.height)??0:Y.clientY-ae.top;H(ve,pe,Y.currentTarget)},[s,H]),V=iT({disabled:s,onLongPress:x.useCallback(Y=>{var ae;const G=(ae=C.current)==null?void 0:ae.getBoundingClientRect();H(G?Y.x-G.left:Y.x,G?Y.y-G.top:Y.y,C.current)},[H])}),J=t?pu.popoverCustomWidth(t):pu.popover,W=x.useMemo(()=>({closeMenu:N,menuSize:n}),[N,n]),ne=k!==void 0?Kg(y):v;return u.jsxs(u.Fragment,{children:[u.jsxs("div",{ref:Wt(i,C),onContextMenu:F,...V,...g,"data-testid":f,...B(pu.trigger,...d?Array.isArray(d)?d:[d]:[]),children:[e,u.jsx("span",{ref:Wt(j,z.ref),"aria-hidden":"true",...P({className:"x10l6tqk xnalus7 xqtp20y x47corl"},{style:{left:`${S.current.x}px`,top:`${S.current.y}px`}})})]}),z.render(u.jsx("div",{ref:T,id:w,role:"menu","aria-label":m,onKeyDown:L,onContextMenu:Y=>Y.preventDefault(),...P(U("context-menu"),B(pu.menu,c),o,l),children:u.jsx(Hc,{value:W,children:ne})}),{placement:"below",alignment:"start",xstyle:[J,Qr.below]})]})}gm.displayName="ContextMenu";function z3(e){const t=[],n=new Map;for(const s of e){const a=s.group??"__ungrouped__";let i=n.get(a);i||(i=[],n.set(a,i),t.push(a)),i.push(s)}const r=[];return t.forEach((s,a)=>{a>0&&r.push({type:"divider"});for(const i of n.get(s)??[])r.push({label:typeof i.label=="string"?i.label:i.id,icon:i.checked?u.jsx(Ee,{icon:"check",size:"xsm","aria-hidden":!0}):i.icon,isDisabled:i.disabled,onClick:i.onSelect})}),r}function $N({element:e,getActions:t,triggerXstyle:n}){const[r,s]=x.useState(null);return u.jsx(gm,{items:r??[],triggerXstyle:n,onOpenChange:a=>{s(a?z3(t()):null)},children:e})}function R3(e,t,n){return typeof t=="function"?u.jsx($N,{element:e,getActions:t,triggerXstyle:n}):!t||t.length===0?e:u.jsx(gm,{items:z3(t),triggerXstyle:n,children:e})}function CN(e,t,n){const r=[];return(e.dividers==="rows"||e.dividers==="grid")&&r.push(t),(e.dividers==="columns"||e.dividers==="grid")&&r.push(n),r}function _3(e,t){return t?Array.isArray(t)?[...e,...t]:[...e,t]:e}function O3(){return x.use(th)}const TN={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}},MN={compact:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},balanced:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0},spacious:{kGuDYH:"xjm74w1",kB7OPa:"x9f619",$$css:!0}},NN={compact:{k8WAf4:"xu0wf1k",kg3NbH:"xf314gf",$$css:!0},balanced:{k8WAf4:"xce4md1",kg3NbH:"xrrkdod",$$css:!0},spacious:{k8WAf4:"x8o8v82",kg3NbH:"x1pzlopt",$$css:!0}},cb={fill:{k1xSpc:"x1lliihq",kB7OPa:"x9f619",kZKoxP:"x5yr21d",kzqmXN:"xh8yej3",$$css:!0}},AN={cell:{kZKoxP:"x5yr21d",$$css:!0}},zN={cell:{kt9PQ7:"x92x3c3 x1wp2rvj",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},RN={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}},_N={middle:{kXLuUW:"xxymvpz",$$css:!0},top:{kXLuUW:"x16dsc37",$$css:!0},bottom:{kXLuUW:"x3ajldb",$$css:!0}};function mm({children:e,xstyle:t,ref:n,className:r,style:s,contextMenuActions:a,...i}){const o=O3(),l=typeof a=="function"||Array.isArray(a)&&a.length>0,c=o?[l?MN[o.density]:TN[o.density],o.textOverflow==="truncate"?N3.cell:wN.cell,A3[o.density],_N[o.verticalAlign],...CN(o,zN.cell,RN.cell),...l?[AN.cell]:[]]:[],d=l&&o?[cb.fill,NN[o.density]]:l?cb.fill:void 0,f=R3(e,a,d);return u.jsx("td",{ref:n,...i,...P(U("table-cell",{density:o==null?void 0:o.density}),B(..._3(c,t)),r,s),children:f})}mm.displayName="TableCell";const ON={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}},DN={cell:{k63SB2:"x2mo6ok",kMwMTN:"xv1l7n4",k9WMMc:"x1yc453h",$$css:!0}},IN={cell:{kt9PQ7:"x92x3c3",kfdmCh:"x1q0q8m5",kL6WhQ:"xw8gpjh",$$css:!0}},LN={cell:{ke9TFa:"xw8tdv1 x1qlsc9e",k8ry5P:"x18b5jzi",kBCPoo:"x1gejf6u",$$css:!0}};function ym({children:e,xstyle:t,ref:n,className:r,style:s,contextMenuActions:a,...i}){const o=O3(),l=[];o&&(l.push(DN.cell,ON[o.density],IN.cell,N3.cell,A3[o.density]),(o.dividers==="columns"||o.dividers==="grid")&&l.push(LN.cell));const c=R3(e,a);return u.jsx("th",{ref:n,...i,...P(U("table-header-cell",{density:o==null?void 0:o.density}),B(..._3(l,t)),r,s),children:c})}ym.displayName="TableHeaderCell";function bm({ref:e,children:t,xstyle:n,className:r,style:s,...a}){return u.jsx("thead",{ref:e,...P(U("table-header"),B(n),r,s),...a,children:t})}bm.displayName="TableHeader";function km({ref:e,children:t,xstyle:n,className:r,style:s,...a}){return u.jsx("tbody",{ref:e,...P(U("table-body"),B(n),r,s),...a,children:t})}km.displayName="TableBody";const ub={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 Ka({title:e,description:t,icon:n,actions:r,headingLevel:s=3,isCompact:a=!1,xstyle:i,className:o,style:l,ref:c,...d}){const f=`h${s}`;return u.jsxs("div",{ref:c,role:"status",...P(U("empty-state",{variant:a?"compact":null}),B(ub.container,a&&ub.containerCompact,i),o,l),...d,children:[n!=null&&u.jsx("div",{"aria-hidden":"true",children:n}),u.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&&u.jsx("div",{...{0:{className:"x1ghz6dp xjb2p0i xjm74w1 x1sodnla xw6l6zx xv1l7n4"},1:{className:"x1ghz6dp xjb2p0i x1sodnla xw6l6zx xv1l7n4 x141an7d"}}[!!a<<0],children:t})]}),r!=null&&u.jsx("div",{...{0:{className:"x78zum5 x1q0g3np x6s0dn4 x1txdalj xcsaf9d"},1:{className:"x78zum5 x6s0dn4 x1txdalj xcsaf9d xdt5ytf"}}[!!a<<0],children:r})]})}Ka.displayName="EmptyState";const dx={table:{kzqmXN:"xh8yej3",kLvRdT:"x1mwwwfo",kheTzg:"x1gukg7c",kPzzVL:"x140o2bo",$$css:!0},tableAutoLayout:{kPzzVL:"x1drmoe9",$$css:!0}};function ja(e,t,n,...r){return e.reduce((s,a,i)=>{const o=t(a);if(!o)return s;try{return o(s,...r)}catch(l){return B2("Table",`Plugin at index ${i} threw in transform:`,l),s}},n)}const BN=[];function HN(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 qN({item:e,rowIndex:t,rowKey:n,columns:r,plugins:s,textOverflow:a,RowComponent:i,CellComponent:o,ariaRowIndex:l}){const c=r.map((h,p)=>{var w;const m={};h.align&&(m.style={textAlign:h.align});const b=ja(s,S=>S.transformBodyCell,{htmlProps:m,xstyle:[],columnIndex:p,columns:r},h,e,p,r),g=!h.renderCell,y=g?gN(e,h.key):((w=h.renderCell)==null?void 0:w.call(h,e))??null;let v;return g&&a==="truncate"&&typeof y=="string"&&y.length>0?v=u.jsx(Re,{type:"body",maxLines:1,children:y}):v=y,u.jsx(o,{...b.htmlProps,contextMenuActions:b.contextMenuActions,xstyle:b.xstyle,children:v},h.key)}),d=ja(s,h=>h.transformBodyRow,{htmlProps:l==null?{}:{"aria-rowindex":l},xstyle:[],children:u.jsx(u.Fragment,{children:c})},e,t);return u.jsx(i,{ref:d.ref,...d.htmlProps,xstyle:d.xstyle,children:d.children},n)}function UN(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,r=t.item,s=Object.keys(r);if(Object.keys(n).length!==s.length)return!1;for(const a of s)if(n[a]!==r[a])return!1;return!0}const PN=x.memo(qN,UN);function FN({data:e,columns:t,idKey:n,plugins:r,children:s,textOverflow:a="wrap",scrollWrapper:i,emptyState:o,rowIndexStart:l,rowCount:c,xstyle:d,className:f,style:h,ref:p,...m}){const k=ke(),b=r??BN,g=l!=null||c!=null,y=l??1,v=g?c??-1:void 0,w=Hd,S=mm,j=ym,C=t??(e?vN(e):[]),$=ja(b,O=>O.transformColumns,C),A=x.useRef($);HN(A.current,$)||(A.current=$);const E=A.current,z=xN(E),N=ja(b,O=>O.transformTable,{htmlProps:{},xstyle:s?[dx.table,dx.tableAutoLayout]:[dx.table]}),T=E.map((O,L)=>{var ge;const H=O.header??O.key,F={"data-column-key":O.key,scope:"col"};O.align&&(F.style={textAlign:O.align});const J=ja(b,le=>le.transformHeaderCell,{htmlProps:F,xstyle:[],content:H,columnIndex:L,columns:E},O,L,E),W=((ge=z.columns.get(O.key))==null?void 0:ge.style)??{},ne=J.htmlProps.style,Y={...J.htmlProps,style:ne?{...W,...ne}:W},G=J.content??H,ae=typeof G=="string"&&G.length>0?{title:G}:{},{before:ce,after:ve,overlay:pe,below:de}=J,K=ce!=null||ve!=null||pe!=null||de!=null?u.jsxs(u.Fragment,{children:[ce,ve!=null?u.jsxs("div",{className:"x3nfvp2 x6s0dn4 xzye2dw xeuugli",children:[G,ve]}):G,pe,de]}):G;return u.jsx(j,{...Y,...ae,contextMenuActions:J.contextMenuActions,xstyle:J.xstyle,children:K},O.key)}),R=ja(b,O=>O.transformHeaderRow,{htmlProps:{},xstyle:[],children:u.jsx(u.Fragment,{children:T})}),_=e!=null&&e.length>0,M=E.length>0,D={...N.htmlProps.style,...h,...z.tableMinWidth>0?{minWidth:`${z.tableMinWidth}px`}:null};let I=u.jsx("table",{ref:p,...v!=null?{"aria-rowcount":v}:null,...N.htmlProps,...P(U("base-table"),B(...N.xstyle,d),[N.htmlProps.className,f].filter(Boolean).join(" ")||void 0,D),...m,children:s||u.jsxs(u.Fragment,{children:[M&&u.jsx(bm,{children:u.jsx(w,{...R.htmlProps,isHeaderRow:!0,xstyle:R.xstyle,children:R.children})}),u.jsx(km,{children:_?e.map((O,L)=>{const H=n==null?L:typeof n=="function"?n(O):String(O[n]);return u.jsx(PN,{item:O,rowIndex:L,rowKey:H,columns:E,plugins:b,textOverflow:a,RowComponent:w,CellComponent:S,ariaRowIndex:g?y+L:void 0},H)}):e!=null&&o!==!1&&u.jsx("tr",{children:u.jsx("td",{colSpan:E.length,children:o??u.jsx(Ka,{title:k("@astryx.table.noData"),isCompact:!0})})})})]})});if(i){const O=ja(b,L=>L.transformScrollWrapper,{htmlProps:{},xstyle:[]});I=u.jsx(i,{htmlProps:O.htmlProps,xstyle:O.xstyle,beforeTable:O.beforeTable,afterTable:O.afterTable,children:I})}for(let O=b.length-1;O>=0;O--){const L=b[O];if(L.transformTableContext)try{I=L.transformTableContext(I)}catch(H){B2("Table","Plugin threw in transformTableContext:",H)}}return I}const D3=FN;D3.displayName="BaseTable";const I3=["columnSettings","sort","tree","selection","pagination"],db=new Map(I3.map((e,t)=>[e,t]));function GN(e){const t=I3.length;return e.sort(([n],[r])=>{const s=db.get(n)??t,a=db.get(r)??t;return s-a})}const gu=new Set(["transformColumns","transformTable","transformHeaderRow","transformHeaderCell","transformBodyRow","transformBodyCell","transformScrollWrapper","transformTableContext"]);function VN(e,t){const n=Object.keys(t);for(const s of n)gu.has(s)||Ba("Table",`Plugin "${e}" has unknown key "${s}". Valid keys: ${[...gu].join(", ")}. This key will be ignored.`);for(const s of n)if(gu.has(s)){const a=t[s];a!=null&&typeof a!="function"&&Ba()}n.some(s=>gu.has(s)&&typeof t[s]=="function")||Ba()}function XN(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&&ZN(a.userPlugins,t))return a.userPlugins=t,a.result}const r=t?GN(Object.entries(t)).map(([,a])=>a):[],s=[...e,...r];if(t)for(const[a,i]of Object.entries(t))VN(a,i);return n.current={basePlugins:e,userPlugins:t,result:s},s}function ZN(e,t){if(e===t)return!0;if(e==null||t==null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n)if(e[s]!==t[s])return!1;return!0}const WN={base:{kMv6JI:"xjb2p0i",kMwMTN:"x1tgivj0",$$css:!0}},fb={base:{kXHlph:"xw2csxc",kuHK5b:"x5lxg6s",$$css:!0},containerBleed:{keTefX:"xojxgvx",k71WvV:"x1fcf3bl",kzqmXN:"xx6qvi6",keoZOQ:"xkibk3",k1K539:"xlayyun",$$css:!0}};function KN({children:e,htmlProps:t,xstyle:n,beforeTable:r,afterTable:s}){const a=ke(),{ref:i,...o}=t??{};return u.jsxs("div",{ref:i,tabIndex:0,role:"group","aria-label":a("@astryx.table.label"),...o,...P(U("table-scroll-wrapper"),B(fb.base,fb.containerBleed,...n??[])),children:[r,e,s]})}function YN(){return{transformTable(e){const t=e.htmlProps.className??"",n=U("table").className;return{...e,htmlProps:{...e.htmlProps,className:t?`${t} ${n}`:n},xstyle:[...e.xstyle,WN.base]}}}}function QN({density:e="balanced",dividers:t="rows",isStriped:n=!1,hasHover:r=!1,verticalAlign:s="middle",textOverflow:a="wrap",plugins:i,columns:o,data:l,ref:c,...d}){const f=x.useMemo(()=>YN(),[]),h=x.useMemo(()=>[f],[f]),p=XN(h,i),m=x.useMemo(()=>({density:e,dividers:t,isStriped:n,hasHover:r,verticalAlign:s,textOverflow:a}),[e,t,n,r,s,a]);return u.jsx(th,{value:m,children:u.jsx(D3,{ref:c,data:l,columns:o,plugins:p,textOverflow:a,scrollWrapper:KN,...d})})}const L3=QN;L3.displayName="Table";function JN(e,t,n){if(e.length===0||t>e[e.length-1]){const r=[...e,t];for(;r.length>n;)r.shift();return r}return e}function eA(e,t,n,r){const s=t+e.length;if(n.length===0)return null;const a=n[0];if(s<=a)return null;const i=[];let o=t;o<a&&a<s&&(i.push({key:`settled-${r}`,text:e.slice(0,a-t),fading:!1}),o=a);for(let l=0;l<n.length;l++){const c=n[l],d=l+1<n.length?n[l+1]:s;if(c>=s||d<=o)continue;const f=Math.max(c,o),h=Math.min(d,s);f>=h||(i.push({key:`fade-${r}-b${c}`,text:e.slice(f-t,h-t),fading:!0}),o=h)}return i.length>0?i:null}const xa={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 B3({ref:e,source:t,number:n,variant:r="label",xstyle:s,className:a,style:i,"data-testid":o,...l}){const c=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,k=f?"a":"span",b=f?"doc-noteref":void 0,g=f?{href:f,target:"_blank",rel:"noopener noreferrer",title:d}:{title:d},y=e;return r==="number"?u.jsx(k,{...l,ref:y,role:b,"aria-label":c("@astryx.citation.label",{number:n,title:d}),"data-testid":o,...g,...P(U("citation",{variant:r}),B(xa.number,f!=null&&xa.numberHover,f!=null&&xa.numberInteractive,s),a,i),children:n}):u.jsxs(k,{...l,ref:y,role:b,"aria-label":c("@astryx.citation.label",{number:n,title:d}),"data-testid":o,...g,...P(U("citation",{variant:r}),B(xa.label,m&&xa.labelWithIcon,f!=null&&xa.labelHover,f!=null&&xa.labelInteractive,s),a,i),children:[m&&u.jsx("span",{"aria-hidden":"true",className:"x3nfvp2 x6s0dn4 xl56j7k x12xnipv x6b6gus xjspbzw x10xzikg x1litavf x1y0btm7 x14i3s5s xb3r6kr x2lah0s",children:h!=null?ss(h,{size:"sm"}):u.jsx("img",{src:p,alt:"",className:"x1ad1g3v x9gl9lo"})}),u.jsx("span",{className:"xb3r6kr xlyipyv xuxw1ft xeuugli",children:d})]})}B3.displayName="Citation";const tA={sourceIds:void 0,autolink:void 0};function vm(e){if(e==null)return tA;if(typeof e.has=="function")return{sourceIds:e,autolink:void 0};const t=e;return{sourceIds:t.sourceIds,autolink:t.autolink}}const nA=/^ {0,3}\[([^\]^](?:\\.|[^\]\\])*)\]:[ \t]*(?:<([^<>\n]*)>|(\S+))([ \t]+(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\)))?[ \t]*$/,rA=/^ {0,3}(?:"[^"\n]*"|'[^'\n]*'|\([^()\n]*\))[ \t]*$/;function ac(e){return e.trim().replace(/\s+/g," ").toLowerCase()}function sA(e){const t=nA.exec(e);if(t==null)return null;const n=ac(t[1]),r=t[2]!=null?t[2]:t[3];return n===""||r==null?null:{label:n,destination:r,hasTitle:t[4]!=null}}function H3(e){const t=e.split(`
|
|
152
|
-
`),n=new Map,r=new Array(t.length).fill(!0);let s=!0,a=!1,i="";for(let l=0;l<t.length;l++){const c=t[l];if(a){c.startsWith(i)?(a=!1,i="",s=!0):s=!1;continue}const d=c.match(/^(`{3,}|~{3,})/);if(d){a=!0,i=d[1],s=!1;continue}if(c.trim()===""){s=!0;continue}if(s){const f=sA(c);if(f!=null){n.has(f.label)||n.set(f.label,f.destination),r[l]=!1,!f.hasTitle&&l+1<t.length&&rA.test(t[l+1])&&(r[l+1]=!1,l++);continue}}s=/^ {0,3}#{1,6}(?: |\t|$)/.test(c)||wm(c)}if(n.size===0)return{defs:n,cleaned:e};const o=t.filter((l,c)=>r[c]).join(`
|
|
153
|
-
`);return{defs:n,cleaned:o}}function aA(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 iA(e,t,n,r){const s=e.indexOf("]",t+1);if(s===-1)return null;const a=e.slice(t+1,s);if(e[s+1]==="["){const o=e.indexOf("]",s+2);if(o!==-1){const l=e.slice(s+2,o),c=l===""?a:l,d=n.get(ac(c));if(d!=null)return{node:{type:"link",href:d,children:As(a,r)},end:o+1}}}if(a.trim()==="")return null;const i=n.get(ac(a));return i==null?null:{node:{type:"link",href:i,children:As(a,r)},end:s+1}}function oA(e,t,n){const r=e.indexOf("]",t+2);if(r===-1)return null;const s=e.slice(t+2,r);if(e[r+1]==="["){const i=e.indexOf("]",r+2);if(i!==-1){const o=e.slice(r+2,i),l=o===""?s:o,c=n.get(ac(l));if(c!=null)return{node:{type:"image",src:c,alt:s},end:i+1}}}if(s.trim()==="")return null;const a=n.get(ac(s));return a==null?null:{node:{type:"image",src:a,alt:s},end:r+1}}function hb(e,t){let n=1;for(let r=t;r<e.length;r++)if(e[r]==="(")n++;else if(e[r]===")"&&(n--,n===0))return r;return-1}function ji(e){return e==null?!1:/\w/.test(e)}function lA(e,t,n){if(!n.sourceIds||e[t]!=="【")return null;const r=e.indexOf("】",t+1);if(r===-1)return null;const s=e.slice(t+1,r);return s.length===0||!n.sourceIds.has(s)?null:{sourceId:s,end:r+1}}function cA(e,t,n){if(!n.sourceIds||e[t]!=="[")return null;const r=e.indexOf("]",t+1);if(r===-1||e[r+1]==="(")return null;const s=e.slice(t+1,r);return s.length===0||!n.sourceIds.has(s)?null:{sourceId:s,end:r+1}}function uA(e,t){return ic(e,vm(t))}function ic(e,t){const n=As(e,t);return t.autolink==="gfm"?F3(n):n}function As(e,t){const n=[];let r=0;for(;r<e.length;){if(e[r]==="\\"&&r+1<e.length){n.push({type:"text",content:e[r+1]}),r+=2;continue}if(e[r]==="`"){const o=e[r+1]==="`"?e[r+2]==="`"?3:2:1,l=r+o,c=e.indexOf("`".repeat(o),l);if(c!==-1){n.push({type:"code",content:e.slice(l,c)}),r=c+o;continue}}{const o=lA(e,r,t);if(o){n.push({type:"citation",sourceId:o.sourceId}),r=o.end;continue}}if(e[r]==="!"&&e[r+1]==="["){const o=e.indexOf("]",r+2);if(o!==-1&&e[o+1]==="("){const l=hb(e,o+2);if(l!==-1){n.push({type:"image",src:e.slice(o+2,l),alt:e.slice(r+2,o)}),r=l+1;continue}}}if(t.linkDefs!=null&&e[r]==="!"&&e[r+1]==="["){const o=oA(e,r,t.linkDefs);if(o){n.push(o.node),r=o.end;continue}}{const o=cA(e,r,t);if(o){n.push({type:"citation",sourceId:o.sourceId}),r=o.end;continue}}if(e[r]==="["){const o=e.indexOf("]",r+1);if(o!==-1&&e[o+1]==="("){const l=hb(e,o+2);if(l!==-1){n.push({type:"link",href:e.slice(o+2,l),children:As(e.slice(r+1,o),t)}),r=l+1;continue}}}if(t.linkDefs!=null&&e[r]==="["){const o=iA(e,r,t.linkDefs,t);if(o){n.push(o.node),r=o.end;continue}}if(e[r]==="*"&&e[r+1]==="*"&&e[r+2]==="*"||e[r]==="_"&&e[r+1]==="_"&&e[r+2]==="_"){const o=e.slice(r,r+3),l=e[r]==="_";if(!(l&&ji(e[r-1]))){const c=e.indexOf(o,r+3);if(c!==-1&&(!l||!ji(e[c+3]))){n.push({type:"bold",children:[{type:"italic",children:As(e.slice(r+3,c),t)}]}),r=c+3;continue}}}if(e[r]==="*"&&e[r+1]==="*"||e[r]==="_"&&e[r+1]==="_"){const o=e.slice(r,r+2),l=e[r]==="_";if(!(l&&ji(e[r-1]))){const c=e.indexOf(o,r+2);if(c!==-1&&(!l||!ji(e[c+2]))){n.push({type:"bold",children:As(e.slice(r+2,c),t)}),r=c+2;continue}}}if(e[r]==="~"&&e[r+1]==="~"){const o=e.indexOf("~~",r+2);if(o!==-1){n.push({type:"strikethrough",children:As(e.slice(r+2,o),t)}),r=o+2;continue}}if(e[r]==="*"||e[r]==="_"){const o=e[r]==="_";if(!(o&&ji(e[r-1]))){const l=e.indexOf(e[r],r+1);if(l!==-1&&l>r+1&&(!o||!ji(e[l+1]))){n.push({type:"italic",children:As(e.slice(r+1,l),t)}),r=l+1;continue}}}let s=r+1;for(;s<e.length&&!"*_~`[!\\\n【".includes(e[s]);)s++;const a=e.slice(r,s);if(s<e.length&&e[s]===`
|
|
154
|
-
`){const o=a.replace(/ +$/,"");if(a.length-o.length>=2){if(o.length>0){const l=n[n.length-1];(l==null?void 0:l.type)==="text"?l.content+=o:n.push({type:"text",content:o})}n.push({type:"break"}),r=s+1;continue}}const i=n[n.length-1];(i==null?void 0:i.type)==="text"?i.content+=a:n.push({type:"text",content:a}),r=s}return n}const q3="[^\\s<]+",dA="https?:\\/\\/",U3="[A-Za-z0-9._%+-]+",xb="[A-Za-z0-9-]+",P3=`${xb}(?:\\.${xb})+`,fA="[a-zA-Z][a-zA-Z0-9+.-]*",hA="[^<>\\s]*",xA=new RegExp(`${dA}${q3}`,"g"),pA=new RegExp(`www\\.${q3}`,"g"),gA=new RegExp(`${U3}@${P3}`,"g"),mA=new RegExp(`<(${fA}:${hA})>`,"g"),yA=new RegExp(`<(${U3}@${P3})>`,"g"),pb=new Set("?!.,:*_~"),bA=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._%+-@");function gb(e){let t=e;for(;t.length>0;){if(pb.has(t[t.length-1])){let n=t.length-1;for(;n>0&&pb.has(t[n-1]);)n--;t=t.slice(0,n);continue}if(t.endsWith(")")){let n=0,r=0;for(let s=0;s<t.length;s++)t[s]==="("?n++:t[s]===")"&&r++;if(r>n){t=t.slice(0,-1);continue}}break}return t}const kA=new Set("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789/=");function mb(e){return e==null?!0:!kA.has(e)}function vA(e){const t=[];{const s=new RegExp(mA.source,"g");let a;for(;(a=s.exec(e))!==null;){const i=a[1];t.push({start:a.index,end:a.index+a[0].length,href:i,display:i})}}{const s=new RegExp(yA.source,"g");let a;for(;(a=s.exec(e))!==null;){const i=a[1];t.push({start:a.index,end:a.index+a[0].length,href:`mailto:${i}`,display:i})}}{const s=new RegExp(xA.source,"g");let a;for(;(a=s.exec(e))!==null;){const i=e[a.index-1];if(!mb(i)||e.slice(a.index-2,a.index)==="](")continue;const o=gb(a[0]);o.length!==0&&t.push({start:a.index,end:a.index+o.length,href:o,display:o})}}{const s=new RegExp(pA.source,"g");let a;for(;(a=s.exec(e))!==null;){const i=e[a.index-1];if(!mb(i)||e.slice(a.index-3,a.index)==="://")continue;const o=gb(a[0]);o.length!==0&&t.push({start:a.index,end:a.index+o.length,href:`http://${o}`,display:o})}}{const s=new RegExp(gA.source,"g");let a;for(;(a=s.exec(e))!==null;){const i=e[a.index-1];i!=null&&bA.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((s,a)=>s.start-a.start);const n=[];let r=0;for(const s of t)s.start>=r&&(n.push(s),r=s.end);return n}function wA(e){const t=vA(e);if(t.length===0)return[{type:"text",content:e}];const n=[];let r=0;for(const s of t)s.start>r&&n.push({type:"text",content:e.slice(r,s.start)}),n.push({type:"link",href:s.href,children:[{type:"text",content:s.display}]}),r=s.end;return r<e.length&&n.push({type:"text",content:e.slice(r)}),n}function F3(e){const t=[];for(const n of e)if(n.type==="text"){const r=wA(n.content);for(const s of r){const a=t[t.length-1];s.type==="text"&&(a==null?void 0:a.type)==="text"?a.content+=s.content:t.push(s)}}else n.type==="bold"||n.type==="italic"||n.type==="strikethrough"?t.push({...n,children:F3(n.children)}):t.push(n);return t}function fx(e){let t=0;for(;t<e.length&&e[t]===" ";)t++;return t}function wm(e){const t=e.trim();if(t.length<3)return!1;const n=t.replace(/ /g,"");if(n.length<3)return!1;const r=n[0];if(r!=="-"&&r!=="*"&&r!=="_")return!1;for(let s=1;s<n.length;s++)if(n[s]!==r)return!1;return!0}function Ju(e){if(!e.includes("|"))return!1;const n=e.split("|").map(r=>r.trim()).filter(r=>r.length>0);return n.length>0&&n.every(r=>/^:?-+:?$/.test(r))}function SA(e){return!!(/^#{1,6} /.test(e)||/^(`{3,}|~{3,})/.test(e)||wm(e)||e.startsWith("> ")||e===">"||/^ {0,9}[-*+] /.test(e)||/^ {0,9}0*1[.)] /.test(e)||e.includes("|"))}function hx(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 r=e.slice(t,n),s=[];let a="";for(let i=0;i<r.length;i++)r[i]==="\\"&&i+1<r.length&&r[i+1]==="|"?(a+="\\|",i++):r[i]==="|"?(s.push(a.trim()),a=""):a+=r[i];return s.push(a.trim()),s}function jA(e,t,n){const r=hx(e[t]).map(o=>({children:ic(o,n)})),s=hx(e[t+1]).map(o=>{const l=o.trim(),c=l.startsWith(":"),d=l.endsWith(":");return c&&d?"center":d?"right":c?"left":null}),a=[];let i=t+2;for(;i<e.length&&e[i].includes("|")&&e[i].trim()!=="";)a.push(hx(e[i]).map(o=>({children:ic(o,n)}))),i++;return{node:{type:"table",headers:r,alignments:s,rows:a},nextIndex:i}}function yb(e,t,n,r){const s=[],a=fx(e[t]),i=n?e[t].match(/^ *(\d+)([.)]) /):null,o=i?i[2]:".",l=`\\${o}`,c=n?new RegExp(`^ {${a}}\\d+${l} `):new RegExp(`^ {${a}}[-*+] `),d=i?parseInt(i[1],10):void 0;let f=!1,h=t;for(;h<e.length&&c.test(e[h]);){const p=n?e[h].replace(new RegExp(`^ *\\d+${l} `),""):e[h].replace(/^ *[-*+] /,""),m=p.match(/^\[([ xX])\] (.*)/);let k,b;m?(k=m[1].toLowerCase()==="x",b=m[2]):b=p,h++;const g=[];for(;h<e.length&&e[h].trim()!==""&&fx(e[h])>a;)g.push(e[h]),h++;if(g.length>0){const v=Math.min(...g.map(S=>fx(S))),w=g.map(S=>S.slice(v));b+=`
|
|
155
|
-
`+w.join(`
|
|
156
|
-
`)}s.push({checked:k,children:Ta(b,r)});let y=h;for(;y<e.length&&e[y].trim()==="";)y++;y>h&&y<e.length&&c.test(e[y])&&(f=!0,h=y)}return{node:{type:"list",ordered:n,start:d,delimiter:n?o:void 0,loose:f||void 0,items:s},nextIndex:h}}function EA(e,t){return Ta(e,vm(t))}function Ta(e,t){const{defs:n,cleaned:r}=H3(e),s=t.linkDefs;let a;n.size===0?a=s:s==null?a=n:a=new Map([...n,...s]);const i=a!=null?{...t,linkDefs:a}:t,o=r.split(`
|
|
157
|
-
`),l=[];let c=0;for(;c<o.length;){const d=o[c];if(d.trim()===""){c++;continue}const f=d.match(/^(`{3,}|~{3,})(\w*)/);if(f){const k=f[1],b=f[2]||"plaintext",g=[];for(c++;c<o.length&&!o[c].startsWith(k);)g.push(o[c]),c++;c++,l.push({type:"codeblock",language:b,content:g.join(`
|
|
158
|
-
`)});continue}const h=d.match(/^(#{1,6}) +(.*)/);if(h){l.push({type:"heading",level:h[1].length,children:ic(h[2],i)}),c++;continue}if(wm(d)){l.push({type:"hr"}),c++;continue}const p=d.match(/^!\[([^\]]*)\]\(([^)]+)\)/);if(p&&d.trim()===p[0]){l.push({type:"image",alt:p[1],src:p[2]}),c++;continue}if(c+1<o.length&&d.includes("|")&&Ju(o[c+1])){const k=jA(o,c,i);l.push(k.node),c=k.nextIndex;continue}if(d.startsWith("> ")||d===">"){const k=[];for(;c<o.length&&(o[c].startsWith("> ")||o[c]===">");)k.push(o[c].replace(/^> ?/,"")),c++;l.push({type:"blockquote",children:Ta(k.join(`
|
|
159
|
-
`),i)});continue}if(/^ {0,9}[-*+] /.test(d)){const k=yb(o,c,!1,i);l.push(k.node),c=k.nextIndex;continue}if(/^ {0,9}\d+[.)] /.test(d)){const k=yb(o,c,!0,i);l.push(k.node),c=k.nextIndex;continue}const m=[d];for(c++;c<o.length&&!SA(o[c])&&o[c].trim()!=="";)m.push(o[c]),c++;l.push({type:"paragraph",children:ic(m.join(`
|
|
160
|
-
`),i)})}return l}function xx(){return{prevInput:"",settledText:"",settledBlocks:[],settledUpTo:0}}function $A(e){let t=!1,n="",r=-1;for(let s=0;s<e.length;s++){const a=e[s],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()===""&&s>0&&(r=s)}return t?-1:r}function bb(e){const t=e.lastIndexOf(`
|
|
161
|
-
`),n=t===-1?"":e.slice(0,t+1);let r=t===-1?e:e.slice(t+1);const s=r.lastIndexOf("[");if(s!==-1){const i=r.slice(s);if(!(i.includes("](")&&i.includes(")"))){const l=s>0&&r[s-1]==="!"?s-1:s;r=r.slice(0,l)}}let a=r.length;for(;a>0&&r[a-1]==="`";)a--;if(a<r.length&&a>0){const i=r.length-a;r.lastIndexOf("`".repeat(i),a-1)===-1&&(r=r.slice(0,a))}for(a=r.length;a>0&&r[a-1]==="*";)a--;if(a<r.length&&a>0){const i=r.length-a;i<=3&&r.lastIndexOf("*".repeat(i),a-1)===-1&&(r=r.slice(0,a))}{let i=0;const o=[];for(;i<r.length;){const c=r.indexOf("*",i);if(c===-1)break;let d=1;for(;c+d<r.length&&r[c+d]==="*";)d++;if(d>3){i=c+d;continue}o.push({pos:c,len:d}),i=c+d}const l=new Set;for(let c=0;c<o.length;c++)if(!l.has(c)){for(let d=c+1;d<o.length;d++)if(!l.has(d)&&o[d].len===o[c].len){l.add(c),l.add(d);break}}for(let c=o.length-1;c>=0;c--)if(!l.has(c)){const d=o[c];d.pos+d.len<r.length?r=r+"*".repeat(d.len):r=r.slice(0,d.pos)}}if(r.length>=2&&r.endsWith("~~"))r.lastIndexOf("~~",r.length-3)===-1&&(r=r.slice(0,-2));else if(r.endsWith("~")){const i=r.length-2;i>=0&&r[i]!=="~"&&(r=r.slice(0,-1))}{let i=0,o=0;const l=[];for(;;){const c=r.indexOf("~~",o);if(c===-1)break;l.push(c),i++,o=c+2}i%2===1&&(r=r.slice(0,l[l.length-1]))}return n+r}function CA(e){const t=e.split(`
|
|
162
|
-
`);for(;t.length>0;){const n=t[t.length-1],r=n.trim();if(r===""){t.pop();continue}if(/^ {0,9}[-*+] $/.test(n)||/^ {0,9}\d+[.)] $/.test(n)){t.pop();continue}if(r.includes("|")&&!Ju(n)){let s=!1;for(let a=t.length-2;a>=1;a--)if(Ju(t[a])&&t[a-1].includes("|")){s=!0;break}if(!s){t.pop();continue}}if(Ju(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],r=t[0];if(n.type==="list"&&r.type==="list"&&n.ordered===r.ordered&&n.delimiter===r.delimiter){const s={type:"list",ordered:n.ordered,start:n.start,delimiter:n.delimiter,loose:!0,items:[...n.items,...r.items]};return[...e.slice(0,-1),s,...t.slice(1)]}return[...e,...t]}function TA(e,t,n){const r=vm(n);if(t.autolink!==r.autolink&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.autolink=r.autolink),e==="")return t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=void 0,[];const{defs:s}=H3(e),a=aA(s);t.linkDefsKey!==a&&(t.prevInput="",t.settledText="",t.settledBlocks=[],t.settledUpTo=0,t.linkDefsKey=a);const i=s.size>0?{...r,linkDefs:s}:r,o=e.split(`
|
|
164
|
-
`),l=$A(o);if(l<0)return t.prevInput=e,Ta(e,i);const c=o.slice(0,l).join(`
|
|
165
|
-
`),d=o.slice(l).join(`
|
|
166
|
-
`).trim(),f=CA(d);let h;if(c===t.settledText)h=t.settledBlocks;else if(t.settledText.length>0&&c.startsWith(t.settledText)){const m=c.slice(t.settledText.length),k=Ta(m,i);h=kb(t.settledBlocks,k)}else h=Ta(c,i);const p=f?Ta(f,i):[];return t.settledText=c,t.settledBlocks=h,t.settledUpTo=l,t.prevInput=e,kb(h,p)}const mu={start:"0",center:"auto"},px={start:null,center:"auto"},MA={k7Eaqz:"xkj4a21",$$css:!0},jn={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=>[MA,{"--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)}]},yu={center:{k9WMMc:"x2b8uid",$$css:!0},end:{k9WMMc:"xp4054r",$$css:!0}},oe={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 vb(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 Ha(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+=Ha(n.children);break;case"break":t+=1;break;case"citation":t+=1;break}return t}function zp(e){let t=0;for(const n of e)switch(n.type){case"heading":case"paragraph":t+=Ha(n.children);break;case"codeblock":t+=n.content.length;break;case"blockquote":t+=zp(n.children);break;case"list":for(const r of n.items)t+=zp(r.children);break;case"table":for(const r of n.headers)t+=Ha(r.children);for(const r of n.rows)for(const s of r)t+=Ha(s.children);break;case"hr":break;case"image":t+=n.alt.length;break}return t}const NA={1:oe.h1,2:oe.h2,3:oe.h3,4:oe.h4,5:oe.h5,6:oe.h6},AA=/^(javascript|data|vbscript):/i;function Rp(e){const t=e.trim();return t.length===0||AA.test(t)?null:t}function zA(e,t){const n=[];for(const o of t){o.pattern.lastIndex=0;let l;for(;(l=o.pattern.exec(e))!==null;){let c;if(o.getEndIndex){const d=o.getEndIndex(e,l);if(d===!1)continue;c=d}else c=l.index+l[0].length;n.push({start:l.index,end:c,match:l,plugin:o})}}n.sort((o,l)=>o.start-l.start);const r=[];let s=0;for(const o of n)o.start>=s&&(r.push(o),s=o.end);if(r.length===0)return[{type:"text",content:e}];const a=[];let i=0;for(let o=0;o<r.length;o++){const l=r[o];l.start>i&&a.push({type:"text",content:e.slice(i,l.start)}),a.push({type:"plugin",element:l.plugin.render(l.match,`plugin-${o}`),matchLength:l.end-l.start}),i=l.end}return i<e.length&&a.push({type:"text",content:e.slice(i)}),a}function wb(e,t,n){const r=t.offset;if(t.offset+=e.length,!t.active)return e;const s=eA(e,r,t.boundaries,n);if(s==null)return e;const a=s.map(i=>i.fading?u.jsx("span",{className:"x1hc1fzr x19991ni x80gvsz x12w9bfk xlr8y92 x4itv7f",children:i.text},i.key):u.jsx("span",{children:i.text},i.key));return u.jsx("span",{children:a},`wrap-${n}`)}function RA(e,t){let n=e.numberMap.get(t);return n==null&&(n=e.nextNumber++,e.numberMap.set(t,n)),n}function Nn(e,t,n,r,s,a="a",i,o){switch(e.type){case"text":{if(i&&i.length>0){const l=zA(e.content,i);if(!(l.length===1&&l[0].type==="text")){const c=[];for(let d=0;d<l.length;d++){const f=l[d];f.type==="text"?c.push(wb(f.content,r,`${t}-seg-${d}`)):(r.offset+=f.matchLength,c.push(u.jsx(x.Fragment,{children:f.element},`plugin-${t}-${d}`)))}return u.jsx(x.Fragment,{children:c},t)}}return wb(e.content,r,t)}case"bold":return u.jsx("strong",{className:"x2mo6ok",children:e.children.map((l,c)=>Nn(l,c,n,r,s,a,i,o))},t);case"italic":return u.jsx("em",{children:e.children.map((l,c)=>Nn(l,c,n,r,s,a,i,o))},t);case"strikethrough":return u.jsx("del",{className:"xv1l7n4",children:e.children.map((l,c)=>Nn(l,c,n,r,s,a,i,o))},t);case"code":{r.offset+=e.content.length;const l=o==null?void 0:o.inlineCode;return l?u.jsx(l,{children:e.content},t):u.jsx(nm,{children:e.content},t)}case"link":{const l=Rp(e.href);if(l==null)return u.jsx("span",{children:e.children.map((p,m)=>Nn(p,m,n,r,s,a,i,o))},t);const c=o==null?void 0:o.link;if(c)return u.jsx(c,{href:l,children:e.children.map((p,m)=>Nn(p,m,n,r,s,a,i,o))},t);const d=l.startsWith("https://")||l.startsWith("http://"),f=n?p=>{n(l,p)===!1&&p.preventDefault()}:void 0,h=d?"a":a;return u.jsx(h,{href:l,onClick:f,...d?{target:"_blank",rel:"noopener noreferrer"}:{},className:"xjse4m1 x1bvjpef",children:e.children.map((p,m)=>Nn(p,m,n,r,s,a,i,o))},t)}case"image":{const l=Rp(e.src);if(l==null)return u.jsxs("span",{children:["[",e.alt,"]"]},t);const c=o==null?void 0:o.image;return c?u.jsx(c,{src:l,alt:e.alt},t):u.jsx("img",{src:l,alt:e.alt,className:"x193iq5w xh6dtrn"},t)}case"break":return r.offset+=1,u.jsx("br",{},t);case"citation":{if(r.offset+=1,!s)return u.jsxs("span",{children:["[",e.sourceId,"]"]},t);const l=RA(s,e.sourceId),c=s.sources[e.sourceId]??{title:e.sourceId},d=s.style==="number"?"number":"label",f=o==null?void 0:o.citation;return f?u.jsx(f,{source:c,number:l,variant:d},t):u.jsx(B3,{source:c,number:l,variant:d},t)}}}function _A(e,t){const n=t==="compact";switch(e.type){case"heading":return e.level<=3?n?oe.spacingHeadingMajorCompact:oe.spacingHeadingMajorDefault:n?oe.spacingHeadingMinorCompact:oe.spacingHeadingMinorDefault;case"paragraph":return n?oe.spacingParagraphCompact:oe.spacingParagraphDefault;case"codeblock":return n?oe.spacingCodeblockCompact:oe.spacingCodeblockDefault;case"blockquote":return n?oe.spacingBlockquoteCompact:oe.spacingBlockquoteDefault;case"list":return n?oe.spacingListCompact:oe.spacingListDefault;case"table":return n?oe.spacingTableCompact:oe.spacingTableDefault;case"hr":return n?oe.spacingHrCompact:oe.spacingHrDefault;case"image":return n?oe.spacingImageCompact:oe.spacingImageDefault}}function OA(e){return e.headers.map((t,n)=>{let r=Ha(t.children);for(const s of e.rows)if(s[n]){const a=Ha(s[n].children);a>r&&(r=a)}return r<=6?60:r<=15?80:120})}function vl(e,t,n,r,s,a,i,o,l,c,d="a",f,h,p){const m=px[c],k=m!=null?jn.blockAlign(m):null,b=_A(e,r),g=t===0,y=t===n-1;switch(e.type){case"heading":{const v=Math.min(e.level+s-1,6),w=e.children.map((C,$)=>Nn(C,$,a,i,o,d,f,h)),S=h==null?void 0:h.heading;if(S)return u.jsx(S,{level:v,children:w},t);const j=`h${v}`;return u.jsx(j,{...P(U("markdown-heading",{density:r,level:v}),B(oe.headingBase,NA[v],b,l!=null?jn.proseWidth(l):null,c!=="start"?jn.proseAlign(mu[c]):null,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd)),children:w},t)}case"paragraph":{const v=e.children.map((S,j)=>Nn(S,j,a,i,o,d,f,h)),w=h==null?void 0:h.paragraph;return w?u.jsx(w,{children:v},t):u.jsx("div",{role:"paragraph",...P(U("markdown-paragraph",{density:r}),B(b,l!=null?jn.proseWidth(l):null,c!=="start"?jn.proseAlign(mu[c]):null,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd)),children:v},t)}case"codeblock":{i.offset+=e.content.length;const v=h==null?void 0:h.code;return v?u.jsx(v,{code:e.content,language:e.language},t):u.jsx("div",{...P(U("markdown-codeblock",{density:r}),B(b,oe.codeBlockWrapper,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd)),children:u.jsx(o3,{code:e.content,language:e.language,isCollapsible:!0,xstyle:[l!=null?jn.blockWidth(l):void 0,k]})},t)}case"blockquote":{const v=h==null?void 0:h.blockquote;if(v){const w=e.children.map((S,j)=>vl(S,j,e.children.length,r,s,a,i,o,l,c,d,f,h,p));return u.jsx(v,{children:w},t)}return u.jsx(_w,{...U("markdown-blockquote",{density:r}),xstyle:[b,l!=null?jn.proseWidth(l):void 0,c!=="start"?jn.proseAlign(mu[c]):void 0,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd],children:e.children.map((w,S)=>vl(w,S,e.children.length,r,s,a,i,o,l,c,d,f,h,p))},t)}case"list":{if(e.items.length>0&&e.items.every(w=>w.checked!=null)){const w=e.items.map((S,j)=>({item:S,key:`task-${j}`})).filter(({item:S})=>S.checked).map(({key:S})=>S);return u.jsx("div",{...P(U("markdown-list",{density:r}),B(b,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd)),children:u.jsx(xm,{label:p("@astryx.markdown.taskList"),isLabelHidden:!0,value:w,xstyle:oe.blockIndent,isReadOnly:!0,density:"compact",children:e.items.map((S,j)=>{const C=S.children[0],A=S.children.length===1&&(C==null?void 0:C.type)==="paragraph"?u.jsx(u.Fragment,{children:C.children.map((E,z)=>Nn(E,z,a,i,o,d,f,h))}):u.jsx(u.Fragment,{children:S.children.map((E,z)=>vl(E,z,S.children.length,r,s,a,i,o,l,c,d,f,h,p))});return u.jsx(pm,{value:`task-${j}`,label:A},j)})})},t)}return u.jsx("div",{...P(U("markdown-list",{density:r}),B(b,l!=null?jn.proseWidth(l):null,c!=="start"?jn.proseAlign(mu[c]):null,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd)),children:u.jsx(bn,{listStyle:e.ordered?"decimal":"disc",density:"compact",start:e.ordered?e.start:void 0,xstyle:oe.blockIndent,children:e.items.map((w,S)=>{const j=w.children[0],$=w.children.length===1&&(j==null?void 0:j.type)==="paragraph"?u.jsx(u.Fragment,{children:j.children.map((A,E)=>Nn(A,E,a,i,o,d,f,h))}):u.jsx(u.Fragment,{children:w.children.map((A,E)=>vl(A,E,w.children.length,r,s,a,i,o,l,c,d,f,h,p))});return u.jsx(yt,{label:$},S)})})},t)}case"table":{const v=OA(e);return u.jsx("div",{tabIndex:0,role:"group","aria-label":p("@astryx.markdown.table"),...P(U("markdown-table",{density:r}),B(oe.tableWrapper,b,l!=null?jn.blockWidth(l):null,px[c]!=null?jn.blockAlign(px[c]):null,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd)),children:u.jsxs(L3,{dividers:"rows",textOverflow:"wrap",children:[u.jsx(bm,{children:u.jsx(Hd,{children:e.headers.map((w,S)=>u.jsx(ym,{xstyle:[jn.cellMinWidth(`${v[S]}px`),e.alignments[S]==="center"&&yu.center,e.alignments[S]==="right"&&yu.end],children:w.children.map((j,C)=>Nn(j,C,a,i,o,d,f,h))},S))})}),u.jsx(km,{children:e.rows.map((w,S)=>{const j=w.map((C,$)=>u.jsx(mm,{xstyle:[e.alignments[$]==="center"&&yu.center,e.alignments[$]==="right"&&yu.end],children:C.children.map((A,E)=>Nn(A,E,a,i,o,d,f,h))},$));return u.jsx(Hd,{children:j},S)})})]})},t)}case"hr":{const v=h==null?void 0:h.hr;return v?u.jsx(v,{},t):u.jsx("hr",{...P(U("markdown-hr",{density:r}),B(oe.hr,b,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd))},t)}case"image":{const v=Rp(e.src);if(v==null)return u.jsxs("div",{...P(U("markdown-image",{density:r}),B(b,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd)),children:["[",e.alt,"]"]},t);const w=h==null?void 0:h.image;return w?u.jsx(w,{src:v,alt:e.alt},t):u.jsx("div",{...P(U("markdown-image",{density:r}),B(b,g&&oe.noMarginBlockStart,y&&oe.noMarginBlockEnd)),children:u.jsx("img",{src:v,alt:e.alt,className:"x193iq5w xh6dtrn"})},t)}}}function Sm({ref:e,children:t,display:n="block",density:r="default",headingLevelStart:s=1,isStreaming:a=!1,onLinkClick:i,sources:o,citationStyle:l="label",contentWidth:c=680,contentAlign:d="start",components:f,inlinePlugins:h,autolink:p,xstyle:m,className:k,style:b,"data-testid":g}){const y=ke(),v=Bo(),w=x.useMemo(()=>o?new Set(Object.keys(o)):void 0,[o]),S=x.useMemo(()=>({sourceIds:w,autolink:p}),[w,p]),j=K9(t,a),C=x.useRef(xx()),$=x.useRef(p);$.current!==p&&(C.current=xx(),$.current=p);const A=x.useMemo(()=>{if(n==="inline")return[];if(a){if(j==="")return C.current=xx(),[];const H=bb(j);return TA(H,C.current,S)}return EA(t,S)},[n,j,t,a,S]),E=x.useMemo(()=>{if(n!=="inline")return[];const H=a?bb(j):t;return uA(H,S)},[n,j,t,a,S]),{token:z}=Pf(),N=x.useMemo(()=>{const H=vb(z("--duration-fast-max"))??230,F=vb(z("--duration-fast-min")),V=F!=null?Math.max(4,Math.round(F/10)):50;return Math.min(Math.ceil(H/V),12)},[z]),T=x.useRef([]),R=x.useRef([]),_=x.useRef([]),M=j.length,I={offset:0,boundaries:x.useMemo(()=>{const H=n==="inline"?Ha(R.current):zp(T.current),F=JN(_.current,H,N);return _.current=F,F},[n,M,N]),active:a},O=o?{sources:o,numberMap:new Map,nextNumber:1,style:l}:null;if(n==="inline"){const H=u.jsx("span",{ref:e,"data-testid":g,...P(U("markdown",{density:r}),B(oe.root,oe.inlineRoot,m),k,b),children:E.map((F,V)=>Nn(F,V,i,I,O,v,h,f))});return R.current=E,T.current=[],H}const L=u.jsx("div",{role:"document",ref:e,"data-testid":g,...P(U("markdown",{density:r}),B(oe.root,m),k,b),children:A.map((H,F)=>vl(H,F,A.length,r,s,i,I,O,c?typeof c=="number"?`${c}px`:c:null,d,v,h,f,y))});return T.current=A,R.current=[],L}Sm.displayName="Markdown";const G3=x.createContext(null);G3.displayName="CollapsibleGroupContext";const _p=x.createContext(null);_p.displayName="CollapsibleGroupPresentationContext";function DA(e){const{isCollapsible:t,value:n}=e,r=x.use(G3),s=r!=null&&n!=null,a=t===!0?{}:t||null,i=a!=null,[o,l]=x.useState(()=>s?!0:(a==null?void 0:a.isOpen)!==void 0?a.isOpen:(a==null?void 0:a.defaultIsOpen)??!0);let c;return s&&n!=null?c=r.isOpen(n):(a==null?void 0:a.isOpen)!==void 0?c=a.isOpen:c=o,{isEnabled:i,isOpen:c,toggle:()=>{var h;if(s&&n!=null){r.toggle(n);return}const f=!c;(a==null?void 0:a.isOpen)===void 0&&l(f),(h=a==null?void 0:a.onOpenChange)==null||h.call(a,f)}}}const Ei={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}},Yi={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}},IA={compact:Yi.triggerCompact,balanced:Yi.triggerBalanced,spacious:Yi.triggerSpacious},LA={compact:Yi.contentCompact,balanced:Yi.contentBalanced,spacious:Yi.contentSpacious};function V3({trigger:e,children:t,defaultIsOpen:n,isOpen:r,isDisabled:s=!1,onOpenChange:a,value:i,ref:o,xstyle:l,className:c,style:d,...f}){const h=r!==void 0?{isOpen:r,onOpenChange:a}:{defaultIsOpen:n??!0,onOpenChange:a},{isOpen:p,toggle:m}=DA({isCollapsible:h,value:i}),k=()=>{s||m()},b=x.use(_p),g=(b==null?void 0:b.hasDividers)??!1,y=(b==null?void 0:b.density)??null,v=tc("chevronDown"),w=x.useId();return u.jsxs("div",{ref:o,...P(U("collapsible",{density:y??void 0}),B(Ei.root,g&&Ei.divided,l),c,d),...f,children:[u.jsxs("button",{type:"button",onClick:k,"aria-disabled":s||void 0,"aria-expanded":p,"aria-controls":w,tabIndex:s?-1:void 0,...P(U("collapsible-trigger",{density:y??void 0}),B(Ei.trigger,y!=null&&IA[y],s&&Ei.triggerDisabled)),children:[u.jsx("span",{className:"x1b2iylo xwgcxoh",children:e}),u.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})]}),u.jsx("div",{id:w,...P(U("collapsible-content",{density:y??void 0}),B(Ei.content,y!=null&&LA[y],!p&&Ei.contentHidden)),children:b!=null?u.jsx(_p,{value:null,children:t}):t})]})}V3.displayName="Collapsible";const jm=x.createContext(null);jm.displayName="RadioListContext";function X3({ref:e,label:t,isLabelHidden:n=!1,description:r,value:s,onChange:a,orientation:i="vertical",isDisabled:o=!1,disabledMessage:l,isRequired:c=!1,isOptional:d=!1,size:f="md",status:h,labelTooltip:p,width:m,xstyle:k,className:b,style:g,"data-testid":y,htmlName:v,children:w}){const S=x.useId(),j=v??S,C=x.useId(),$=x.useId(),A=x.useId(),E=x.useId(),z=x.useRef(null),N=o&&!!l,T=rs({placement:"above",focusTrigger:"always",isEnabled:N}),R=x.useMemo(()=>({name:j,value:s,onChange:a,isDisabled:o,hasDisabledMessage:N,isRequired:c,size:f,status:h}),[j,s,a,o,N,c,f,h]),_=x.useCallback(M=>{if(s!=="")return;const D=z.current;if(!D)return;const I=M.relatedTarget;if(I){if(D.contains(I))return}else if(document.activeElement&&document.activeElement!==M.target&&D.contains(document.activeElement))return;const O=Array.from(D.querySelectorAll('input[type="radio"]:not([disabled])'));if(O.length===0)return;const L=M.target,H=O.findIndex(J=>J===L);if(H===-1)return;const V=H===O.length-1?O[O.length-1]:O[0];L!==V&&V.focus()},[s]);return u.jsxs(Uc,{ref:e,"data-testid":y,label:t,isLabelHidden:n,description:r,inputID:C,labelID:$,isGroupLabel:!0,descriptionID:r?A:void 0,isOptional:d,isRequired:c,isDisabled:o,status:h?{type:h.type,message:h.message,messageID:h.message?E:void 0}:void 0,labelTooltip:p,statusVariant:"detached",width:m,xstyle:k,className:b,style:g,children:[u.jsx("div",{ref:M=>{z.current=M,T.ref(M)},role:"radiogroup","aria-labelledby":$,onFocus:_,"aria-describedby":[r?A:null,h!=null&&h.message?E:null,N?T.describedBy:null].filter(Boolean).join(" ")||void 0,"aria-invalid":(h==null?void 0:h.type)==="error"?!0:void 0,"aria-required":c||void 0,...P(U("radio-list",{orientation:i,size:f}),{0:{className:"x78zum5 x1q0g3np x9mgr7n"},1:{className:"x78zum5 xdt5ytf x1txdalj"}}[(i==="vertical")<<0]),children:u.jsx(jm,{value:R,children:w})}),N&&T.renderTooltip(l)]})}X3.displayName="RadioList";const BA={xklqth5:"xklqth5",$$css:!0},ir={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}},Sb={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},HA={sm:{kzqmXN:"xw4jnvo",kZKoxP:"x1qx5ct2",$$css:!0},md:{kzqmXN:"xvy4d1p",kZKoxP:"xxk0z11",$$css:!0}},qA={sm:{kzqmXN:"x1xc55vz",kZKoxP:"xdk7pt",$$css:!0},md:{kzqmXN:"x1fsd2vl",kZKoxP:"x170jfvy",$$css:!0}},UA={root:{k8WAf4:"xt970qd",kg3NbH:"xnjsko4",kaIpWk:"x2u8bby",kUk6DE:"x98rzlu",k7Eaqz:"xeuugli",$$css:!0}};function Z3({ref:e,label:t,value:n,description:r,isDisabled:s=!1,startContent:a,endContent:i,xstyle:o,className:l,style:c,...d}){const f=x.use(jm);if(!f)throw new Error("RadioListItem must be used within an RadioList");const h=x.useId(),p=x.useId(),m=f.isDisabled||s,k=f.hasDisabledMessage&&!s,b=f.value===n,g=f.size,y=u.jsxs("div",{...B(ir.radioWrapper,Sb[g],!m&&ir.radioWrapperFocus),children:[u.jsx("input",{id:h,type:"radio",name:f.name,value:n,checked:b,disabled:m&&!k,"aria-disabled":k?"true":void 0,form:k?"":void 0,required:f.isRequired,onChange:()=>{m||f.onChange(n)},"aria-describedby":r?p:void 0,...B(ir.input,Sb[g],m&&ir.inputDisabled)}),u.jsx("div",{"aria-hidden":"true",...P(U("radio",{size:g,checked:b?"checked":null,disabled:m?"disabled":null}),B(ir.radio,HA[g],b?ir.radioChecked:ir.radioUnchecked,m&&ir.radioDisabled,m&&!b&&ir.radioDisabledUnchecked)),children:b&&u.jsx("div",{...P(U("radio-dot",{size:g}),B(ir.innerDot,qA[g]))})})]}),v=a!=null?u.jsxs(u.Fragment,{children:[y,a]}):y;return u.jsx("div",{ref:e,...P(U("radio-list-item"),B(ir.container,!m&&BA,o),l,c),...d,children:u.jsx(Ho,{startContent:v,label:u.jsx("label",{htmlFor:h,...{0:{},1:{className:"xnbbluu x1h6gzvc"}}[!!m<<0],children:t}),description:r!=null?u.jsx("span",{id:p,children:r}):void 0,endContent:i,xstyle:UA.root})})}Z3.displayName="RadioListItem";const PA=50,FA=40,W3="astryx-resizable:";function bu(e,t,n,r){const s=Math.min(n,Math.max(t,e));if(r.length>0){let a=r[0],i=Math.abs(s-a);for(let o=1;o<r.length;o++){const l=Math.abs(s-r[o]);l<i&&(a=r[o],i=l)}return Math.min(n,Math.max(t,a))}return s}function GA(e){if(typeof window>"u")return null;try{const t=localStorage.getItem(W3+e);if(t!=null){const n=JSON.parse(t);if(typeof n=="number")return n}}catch{}return null}function VA(e,t){if(!(typeof window>"u"))try{localStorage.setItem(W3+e,JSON.stringify(t))}catch{}}function XA(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 K3(e){const{defaultSize:t,minSizePx:n=PA,maxSizePx:r=1/0,collapsible:s=!1,collapsedSize:a=FA,snaps:i=[],autoSaveId:o,onSizeChange:l,onCollapseChange:c}=e,d=XA(t),f=o?GA(o):null,h=f??d,[p,m]=x.useState(()=>bu(h,n,r,i)),[k,b]=x.useState(()=>f===0&&s),g=x.useRef(p),y=x.useRef(p);x.useEffect(()=>{o&&VA(o,k?0:p)},[p,k,o]);const v=x.useCallback(()=>{s&&(g.current=p,b(!0),m(0),c==null||c(!0),l==null||l(0))},[s,p,c,l]),w=x.useCallback(()=>{b(!1);const E=g.current||d,z=bu(E,n,r,i);m(z),c==null||c(!1),l==null||l(z)},[d,n,r,i,c,l]),S=x.useCallback(E=>{const z=bu(E,n,r,i);m(z),b(!1),l==null||l(z)},[n,r,i,l]),j=x.useCallback(()=>{y.current=k?0:p},[p,k]),C=x.useCallback(E=>{const z=y.current+E;if(s&&z<a){k||(g.current=p,c==null||c(!0)),b(!0),m(0),l==null||l(0);return}k&&z>=a&&(b(!1),c==null||c(!1));const N=bu(z,n,r,i);m(N),l==null||l(N)},[s,a,k,p,n,r,i,l,c]),$=x.useCallback(()=>{},[]);return{size:k?0:p,isCollapsed:k,collapse:v,expand:w,resize:S,props:{_size:k?0:p,_isCollapsed:k,_onResizeStart:j,_onResizeMove:C,_onResizeEnd:$,_minSizePx:n,_maxSizePx:r,_snaps:i,_collapsedSize:a,_collapsible:s,_isResizableProps:!0}}}function ZA(e){const{regions:t,autoSaveId:n}=e,r=Object.entries(t),s=r.map(([i,o])=>K3({...o,autoSaveId:n?`${n}:${i}`:void 0})),a={};return r.forEach(([i],o)=>{a[i]=s[o]}),a}function WA(e){return"regions"in e?ZA(e):K3(e)}const KA=10,YA=50;function QA(e,t,n){if(e!=="auto")return e;const r=t?"end":"start";return n?r==="start"?"end":"start":r}function JA(e){return e==="center"?null:e==="start"?-1:1}const et={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}},ez={kLqNvP:"x1o0tod",k3aq6I:"x11wx31z x75qhwu",$$css:!0},tz={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},nz={kLqNvP:"x1o0tod",k3aq6I:"xsqj5wx",$$css:!0},rz={k87sOh:"x13vifvy",k3aq6I:"xsqj5wx",$$css:!0},ku={hitAreaOffsetX:e=>[ez,{"--x-qthpiu":`translate(calc(${e} * (3px + ${lr["--spacing-1"]}) - 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${lr["--spacing-1"]}) - 6.5px), -50%)`:void 0,"--x-sj6hyi":`translate(calc(${e} * (3px + ${lr["--spacing-1"]}) + 6.5px), -50%)`!=null?`translate(calc(${e} * (3px + ${lr["--spacing-1"]}) + 6.5px), -50%)`:void 0}],hitAreaOffsetY:e=>[tz,{"--x-transform":`translate(-50%, calc(${e} * (3px + ${lr["--spacing-1"]}) - 6.5px))`!=null?`translate(-50%, calc(${e} * (3px + ${lr["--spacing-1"]}) - 6.5px))`:void 0}],pillOffsetX:e=>[nz,{"--x-transform":`translate(calc(${e} * (100% + ${lr["--spacing-1"]})), -50%)`!=null?`translate(calc(${e} * (100% + ${lr["--spacing-1"]})), -50%)`:void 0}],pillOffsetY:e=>[rz,{"--x-transform":`translate(-50%, calc(${e} * (100% + ${lr["--spacing-1"]})))`!=null?`translate(-50%, calc(${e} * (100% + ${lr["--spacing-1"]})))`:void 0}]};function Y3({direction:e="horizontal",position:t="inline",isReversed:n=!1,isDisabled:r=!1,hasDivider:s=!1,isAlwaysVisible:a=!0,pillPlacement:i="auto",label:o,resizable:l,children:c,xstyle:d,className:f,ref:h,...p}){const m=ke(),k=o??m("@astryx.resizable.handle.label"),b=x.useRef(null),g=x.useRef(null),[y,v]=x.useState(!1),[w,S]=x.useState(!1),[j,C]=x.useState(!1),$=e==="horizontal",A=t==="overlay",E=n?-1:1,z=QA(i,n,(l==null?void 0:l._isCollapsed)??!1),N=JA(z),T=x.useCallback(()=>{const V=b.current;return V&&getComputedStyle(V).direction==="rtl"?-1:1},[]),R=w||j,_=x.useCallback(V=>{if(r||!l)return;V.preventDefault(),V.stopPropagation(),v(!0),l._onResizeStart();const J=$?V.clientX:V.clientY,W=$?T():1;document.body.style.cursor=$?"col-resize":"row-resize",document.body.style.userSelect="none";const ne=ce=>{const pe=(($?ce.clientX:ce.clientY)-J)*W*E;l._onResizeMove(pe)},Y=()=>{ae(),v(!1),l._onResizeEnd(),document.body.style.cursor="",document.body.style.userSelect=""},G=()=>{ae(),v(!1),document.body.style.cursor="",document.body.style.userSelect=""};function ae(){window.removeEventListener("pointermove",ne),window.removeEventListener("pointerup",Y),window.removeEventListener("pointercancel",G),g.current=null}window.addEventListener("pointermove",ne),window.addEventListener("pointerup",Y),window.addEventListener("pointercancel",G),g.current=ae},[r,l,$,T,E]),M=x.useCallback(V=>{if(r||!l)return;const J=V.shiftKey?YA:KA,W=$?T():1;switch(V.key){case"ArrowRight":case"ArrowDown":{V.preventDefault(),l._onResizeStart(),l._onResizeMove(J*($?W:1)*E),l._onResizeEnd();break}case"ArrowLeft":case"ArrowUp":{V.preventDefault(),l._onResizeStart(),l._onResizeMove(-J*($?W:1)*E),l._onResizeEnd();break}case"Home":{V.preventDefault(),l._onResizeStart(),l._onResizeMove(l._minSizePx-l._size),l._onResizeEnd();break}case"End":{V.preventDefault(),l._maxSizePx!==1/0&&(l._onResizeStart(),l._onResizeMove(l._maxSizePx-l._size),l._onResizeEnd());break}case"Enter":{V.preventDefault(),l._collapsible&&(l._onResizeStart(),l._onResizeMove(l._isCollapsed?l._minSizePx:-l._size),l._onResizeEnd());break}}},[r,l,$,T,E]),D=x.useCallback(()=>{r||!l||!l._collapsible||(l._onResizeStart(),l._onResizeMove(l._isCollapsed?l._minSizePx:-l._size),l._onResizeEnd())},[r,l]);x.useEffect(()=>()=>{g.current&&(g.current(),document.body.style.cursor="",document.body.style.userSelect="")},[]);const I=(l==null?void 0:l._isCollapsed)??!1,O=l?I?Math.max(l._size,l._minSizePx):l._size:void 0,L=l?l._minSizePx:void 0,H=l&&l._maxSizePx!==1/0?l._maxSizePx:void 0,F=l&&I?m("@astryx.resizable.collapsed"):void 0;return u.jsxs("div",{ref:Wt(h,b),role:"separator","aria-orientation":$?"vertical":"horizontal","aria-valuenow":O,"aria-valuemin":L,"aria-valuemax":H,"aria-valuetext":F,"aria-label":k,"aria-disabled":r||void 0,tabIndex:r?-1:0,onDoubleClick:D,onFocus:()=>C(!0),onBlur:()=>C(!1),"data-resizing":y||void 0,...P(U("resize-handle"),B(et.handle,A&&et.overlay,A&&($?et.overlayHorizontal:et.overlayVertical),!A&&($?et.horizontal:et.vertical),!A&&!s&&($?et.noDividerHorizontal:et.noDividerVertical),!A&&s&&R&&!y&&et.handleHover,!A&&s&&y&&et.handleActive,r&&et.disabled,d),f),...p,onKeyDown:V=>{var J;(J=p.onKeyDown)==null||J.call(p,V),M(V)},children:[u.jsx("div",{...B(et.hitArea,$?et.hitAreaHorizontal:et.hitAreaVertical,N==null?$?zd.centerInline("0px"):et.hitAreaCenteredY:$?ku.hitAreaOffsetX(N):ku.hitAreaOffsetY(N),r&&et.disabled),onPointerDown:_,onPointerEnter:()=>S(!0),onPointerLeave:()=>{y||S(!1)}}),c??u.jsx("div",{...P(U("resize-handle-pill"),B(et.pill,$?et.pillHorizontal:et.pillVertical,z==="center"?zd.centerInline("-50%"):$?ku.pillOffsetX(z==="start"?-1:1):ku.pillOffsetY(z==="start"?-1:1),a?et.pillVisible:et.pillHidden,R&&!y&&et.pillHover,y&&et.pillActive))})]})}Y3.displayName="ResizeHandle";const En={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}},gx={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 sz(e){e.preventDefault()}function Q3({as:e,label:t,href:n,hasUnderline:r=!1,isDisabled:s=!1,isExternalLink:a=!1,newTabLabel:i,target:o,onClick:l,tooltip:c,isStandalone:d=!1,type:f="body",size:h,weight:p,color:m="accent",display:k="inline",maxLines:b=0,children:g,rel:y,xstyle:v,className:w,style:S,ref:j,...C}){const $=ke(),A=i??$("@astryx.link.newTab"),E=Bo(e),z=Vw({href:n,onClick:l,isDisabled:s}),{target:N,rel:T}=Iw(a?"_blank":o,y),R=z==="button"||z==="inert"&&n==null,_=u.jsxs(u.Fragment,{children:[u.jsx(Re,{type:f,size:h,weight:p,color:m,display:k,maxLines:b,children:g}),a&&!R&&u.jsxs(u.Fragment,{children:[u.jsx(Ee,{icon:"externalLink",size:"xsm",color:"inherit"}),u.jsx(Lo,{children:A})]})]});let M;return R?M=u.jsx("button",{ref:j,type:"button",onClick:l,"aria-label":t||void 0,"aria-disabled":s||void 0,tabIndex:s?-1:void 0,disabled:s,...P(U("link",{color:m}),B(En.base,En.buttonReset,gx[m],r&&En.hasUnderline,d&&En.standalone,s&&En.disabled,v),w,S),...C,children:_}):s?M=u.jsx("a",{ref:j,onClick:sz,"aria-label":t||void 0,"aria-disabled":!0,tabIndex:-1,...P(U("link",{color:m}),B(En.base,gx[m],r&&En.hasUnderline,d&&En.standalone,En.disabled,v),w,S),...C,children:_}):M=u.jsx(E,{ref:j,href:n,target:N,rel:T,onClick:l,"aria-label":t||void 0,"aria-disabled":s||void 0,tabIndex:s?-1:void 0,...P(U("link",{color:m}),B(En.base,gx[m],r&&En.hasUnderline,d&&En.standalone,s&&En.disabled,v),w,S),...C,children:_}),c?u.jsx(qo,{content:c,placement:"above",children:M}):M}Q3.displayName="Link";function J3({ref:e,href:t,isDisabled:n,LinkComponent:r,linkStyleProps:s,labelContent:a,icon:i,endContent:o,removeButton:l,...c}){const d=x.useRef(null),f=x.useRef(null),{onClick:h,onMouseUp:p}=Xg({containerRef:d,interactiveRef:f,href:t,disabled:n});return u.jsxs("span",{ref:Wt(e,d),onClick:n?void 0:h,onMouseUp:n?void 0:p,...c,children:[i,u.jsx(r,{ref:f,href:t,"aria-disabled":n||void 0,...s,children:a}),o,l]})}J3.displayName="TokenLink";const $n={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}},vu={sm:{kZKoxP:"xzydfjl",kGuDYH:"x141an7d",kg3NbH:"xf314gf",$$css:!0},md:{kZKoxP:"xrmxcn7",kg3NbH:"xf314gf",$$css:!0},lg:{kZKoxP:"x102lyln",kg3NbH:"xf314gf",$$css:!0}},wu={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 Ys({label:e,size:t="md",color:n="default",icon:r,isDisabled:s=!1,onRemove:a,onClick:i,href:o,description:l,endContent:c,isLabelHidden:d=!1,xstyle:f,className:h,style:p,"data-testid":m,ref:k}){const b=ke(),g=Bo(),y=Vw({href:o,onClick:i,isDisabled:s}),v=i??(y==="button"?()=>{}:null),w=a!=null&&u.jsx("button",{type:"button","aria-label":b("@astryx.token.remove",{label:e}),onClick:C=>{C.stopPropagation(),a(C)},disabled:s,className:"x3nfvp2 x6s0dn4 xl56j7k x1n2onr6 x1717udv xkd40ry x1ypdohk xjspbzw x1kky2od xlup9mm x1heor9g x17nn4n9 x1s928wv x1j6awrg x1xsm0q9",children:u.jsx(Ee,{icon:"close",size:"xsm",color:"inherit"})}),S=u.jsxs(u.Fragment,{children:[r,u.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,w]}),j={"data-testid":m,"aria-label":d?e:void 0,"aria-description":l};if(y==="link")return a==null?u.jsx(g,{ref:k,href:o,"aria-disabled":s||void 0,...j,...P(U("token",{color:n,size:t}),B($n.base,vu[t],wu[n],$n.interactive,s&&$n.disabled,f),h,p),children:S}):u.jsx(J3,{ref:k,href:o,isDisabled:s,LinkComponent:g,icon:r,endContent:c,removeButton:w,linkStyleProps:{className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli"},labelContent:u.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}),...j,...P(U("token",{color:n,size:t}),B($n.base,vu[t],wu[n],$n.interactive,$n.focusVisibleOutline,s&&$n.disabled,f),h,p)});if(v!=null){const C=$=>{$.target.closest("button, a")||v($)};return u.jsxs("span",{ref:k,onClick:s?void 0:C,...j,...P(U("token",{color:n,size:t}),B($n.base,vu[t],wu[n],$n.interactive,$n.focusVisibleOutline,s&&$n.disabled,f),h,p),children:[r,u.jsx("button",{type:"button",onClick:v,disabled:s,className:"xmper1u xln7xf2 x1heor9g x1a2a7pz xb3r6kr xeuugli",children:u.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,w]})}return u.jsx("span",{ref:k,...j,...P(U("token",{color:n,size:t}),B($n.base,vu[t],wu[n],s&&$n.disabled,f),h,p),children:S})}Ys.displayName="Token";const cl={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)}]},az="@astryx.dropdownMenu.label";function nh({button:e,isMenuOpen:t,onOpenChange:n,menuWidth:r,onClick:s,hasChevron:a=!0,placement:i="below",alignment:o="start",className:l,style:c,xstyle:d,"data-testid":f,...h}){const p=ke(),m=e??{label:p(az)},k=("items"in h?h.items:void 0)??[],b=h.children,{items:g,children:y,...v}=h,w=x.useId(),S=m.size??"md",j=x.useRef(null),[C,$]=x.useState(!1),A=t!==void 0,E=A?t:C,z=x.useRef(0),N=x.useCallback(()=>{var ie;z.current=Date.now(),n==null||n(!1),A||$(!1),(ie=j.current)==null||ie.focus()},[A,n]),T=x.useRef(!1),R=x.useCallback(()=>{n==null||n(!0),A||$(!0)},[A,n]),_=Bc({onHide:N,onShow:R,hasLightDismiss:!0,hasCloseButton:!1,hasAutoFocus:!1,role:"none"}),M=x.useCallback(()=>{_.hide()},[_]),{listRef:D,handleKeyDown:I,focusFirst:O,focusItem:L,ownsEvent:H,getItems:F}=Vf({itemSelector:Zg,boundarySelector:Wg,wrap:!1,onEscape:M}),V=Vg({getItemLabels:()=>F().map(ie=>ie.textContent),onMatch:L,getCurrentIndex:()=>F().findIndex(ie=>ie===document.activeElement||ie.contains(document.activeElement))});x.useEffect(()=>{A&&(t&&!_.isOpen?(T.current=!0,_.show()):!t&&_.isOpen&&_.hide())},[t,A,_]),x.useEffect(()=>{!_.isOpen||!T.current||(T.current=!1,requestAnimationFrame(()=>O()))},[_.isOpen,O]);const J=x.useCallback(ie=>{if(H(ie)){if(ie.key==="Enter"||ie.key===" "){ie.preventDefault();const K=document.activeElement;K&&Wf.has(K.getAttribute("role")??"")&&K.click();return}if(ie.key==="Tab"){M();return}if(V.onKeyDown(ie)){ie.preventDefault();return}I(ie)}},[I,M,V,H]),W=x.useCallback(()=>{T.current=!0,_.show()},[_]),ne=x.useCallback(()=>{Date.now()-z.current<50||(s==null||s(),A?n==null||n(!t):_.isOpen?_.hide():W())},[s,A,n,t,_,W]),Y=x.useCallback(ie=>{_.isOpen||(ie.key==="ArrowDown"||ie.key==="Enter"||ie.key===" ")&&(ie.preventDefault(),W())},[_.isOpen,W]),G=m.isIconOnly===!0,ae=m.endContent??(a&&!G?u.jsx(Ee,{icon:"chevronDown",size:"sm",color:"inherit"}):void 0),ce=r?cl.popoverCustomWidth(r):cl.popover,ve=i==="above"||i==="below"?cl.popoverBlockGap:cl.popoverInlineGap,pe=x.useMemo(()=>({closeMenu:M,menuSize:S}),[M,S]),de=h.items!==void 0?Kg(k):b;return u.jsxs(u.Fragment,{children:[u.jsx($e,{...m,ref:ie=>{j.current=ie,_.triggerRef(ie);const K=m.ref;typeof K=="function"?K(ie):K&&(K.current=ie)},tooltip:E?void 0:m.tooltip,endContent:ae,onClick:ne,onKeyDown:Y,"aria-haspopup":"menu","aria-expanded":E,"aria-controls":w,"data-testid":f}),_.render(u.jsx("div",{...v,ref:D,id:w,role:"menu","aria-label":m.label,onKeyDown:J,...P(U("dropdown-menu"),B(cl.dropdown,d),l,c),children:u.jsx(Hc,{value:pe,children:de})}),{placement:i,alignment:o,xstyle:[ce,ve,Qr[i]]})]})}nh.displayName="DropdownMenu";const Hr={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}},iz={kzqmXN:"xn9wirt",ks0D6T:"xf68679",$$css:!0},oz={width:e=>[iz,{"--x-maxWidth":(t=>typeof t=="number"?t+"px":t??void 0)(`${e}px`)}]};function Em({isOpen:e,onOpenChange:t,children:n,header:r,width:s=320,side:a="auto",label:i,"data-testid":o,xstyle:l,className:c,style:d,onClick:f,ref:h,...p}){const m=ke(),k=Gf(),b=e??k.isMobileNavOpen,g=x.useId(),y=k.mobileNavId||g,v=x.useMemo(()=>t??(z=>{z?k.openMobileNav():k.closeMobileNav()}),[t,k]),w=x.useRef(null),S=x.useRef(null),[j,C]=x.useState(a==="auto"?"end":a);x.useEffect(()=>{const z=w.current;if(z){if(S.current&&(clearTimeout(S.current),S.current=null),b){if(a==="auto"){const N=document.activeElement;if(N&&N!==document.body){const T=N.getBoundingClientRect(),R=T.left+T.width/2;C(R<window.innerWidth/2?"start":"end")}}else C(a);z.open||z.showModal(),document.documentElement.style.overflow="clip"}else if(z.open){document.documentElement.style.overflow="";const N=window.matchMedia("(prefers-reduced-motion: reduce)").matches?10:250;S.current=setTimeout(()=>{z.close()},N)}return()=>{S.current&&(clearTimeout(S.current),S.current=null),document.documentElement.style.overflow="",z.open&&z.close()}}},[b,a]);const $=x.useCallback(z=>{z.preventDefault(),v(!1)},[v]),A=x.useCallback(z=>{z.target===z.currentTarget&&v(!1)},[v]),E=j==="start";return u.jsx("dialog",{ref:Wt(h,w),id:y,...P(U("mobile-nav",{side:j}),B(Hr.dialog,b&&Hr.open,Hr.backdrop,b&&Hr.backdropOpen,l),c,d),...p,"data-testid":o,"aria-label":i??(typeof r=="string"?r:m("@astryx.mobileNav.navigation")),onClick:D2(f,A),onCancel:$,children:u.jsxs("div",{tabIndex:-1,...B(Hr.drawer,oz.width(s),E&&Hr.drawerStart,E&&b&&Hr.drawerStartOpen,!E&&Hr.drawerEnd,!E&&b&&Hr.drawerEndOpen),children:[u.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 x1qughib x1k15mir xf314gf x2lah0s x92x3c3 x1q0q8m5 xw8gpjh"},1:{className:"x78zum5 x6s0dn4 x1k15mir xf314gf x2lah0s x92x3c3 x1q0q8m5 xw8gpjh x13a6bvl"}}[!r<<0],children:[typeof r=="string"?u.jsx("span",{className:"x11g1kdw",children:u.jsx(sm,{level:2,children:r})}):r??null,u.jsx($e,{variant:"ghost",label:m("@astryx.mobileNav.closeNavigation"),icon:u.jsx(Ee,{icon:"close",color:"inherit"}),onClick:()=>v(!1),isIconOnly:!0})]}),u.jsx("div",{className:"x98rzlu x1odjw0f x6ikm8r xish69e xx69xxh xf314gf xce4md1",children:n})]})})}Em.displayName="MobileNav";const ks={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}},rh=x.createContext({isCollapsed:!1,toggle:()=>{},isCollapsible:!1});rh.displayName="SideNavCollapseContext";function $m(){return x.use(rh)}function e5({ref:e,handleRef:t,label:n,children:r,onClick:s,...a}){const i=ke(),o=tc("chevronLeft"),{isCollapsed:l,toggle:c,isCollapsible:d}=lz(t),{isMobile:f}=Gf();return!d||f?null:u.jsx($e,{ref:e,label:n??i(l?"@astryx.sideNavCollapseButton.expandSidebar":"@astryx.sideNavCollapseButton.collapseSidebar"),variant:"ghost",...a,onClick:D2(s,c),icon:r??u.jsx("span",{...B(zd.mirror),children:u.jsx("span",{...{0:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92"},1:{className:"x3nfvp2 x6s0dn4 x11xpdln xuedmi6 xlr8y92 x19jd1h0"}}[!!l<<0],children:o})}),isIconOnly:!0})}e5.displayName="SideNavCollapseButton";function lz(e){var r;const t=$m();if(e==null)return t;const n=((r=e.current)==null?void 0:r.getCollapseState())??null;return{isCollapsed:(n==null?void 0:n.isCollapsed)??!1,toggle:()=>{var s,a;(a=(s=e.current)==null?void 0:s.getCollapseState())==null||a.toggle()},isCollapsible:(n==null?void 0:n.isCollapsible)??!0}}const cz=160,mx={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 t5({header:e,topContent:t,children:n,footer:r,footerIcons:s,collapsible:a=!1,resizable:i=!1,xstyle:o,className:l,style:c,"data-testid":d,ref:f,handleRef:h,...p}){const m=ke(),k=typeof a=="object"?a:{},b=!!a,g=k.hasButton??!0,y=k.defaultIsCollapsed??!1,v=k.isCollapsed,w=k.onCollapsedChange,S=typeof i=="object"?i:{},j=!!i,C=v!==void 0,[$,A]=x.useState(y),E=C?v:$,z=x.useRef(null),N=x.useRef({isCollapsed:E,toggle:()=>{},isCollapsible:b}),T=x.useCallback(ne=>{C||A(ne),w==null||w(ne)},[C,w]),R=WA({defaultSize:S.defaultWidth??260,minSizePx:S.minWidth??180,maxSizePx:S.maxWidth??480,collapsible:b,collapsedSize:cz,autoSaveId:S.autoSaveId,onSizeChange:S.onWidthChange,onCollapseChange:b?T:void 0}),_=x.useCallback(()=>{const ne=!E;N.current={...N.current,isCollapsed:ne},T(ne),j&&(ne?R.collapse():R.expand())},[E,T,j,R]),M=j&&!E;N.current={isCollapsed:E,toggle:_,isCollapsible:b};const D={isCollapsed:E,toggle:_,isCollapsible:b};x.useImperativeHandle(h,()=>({getCollapseState:()=>N.current}),[]);const I=zw();if(I==="topbar")return u.jsxs("div",{"data-testid":d,...P(U("side-nav",{mode:"topbar"}),B(mx.topbar,o),l,c),children:[e,u.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw xvc5jky",children:s})]});const O=!!(r||s);if(I==="drawer")return u.jsxs(Em,{header:e,"data-testid":d,children:[t,n,O&&u.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[r,s&&u.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:s})]})]});if(I==="drawer-content")return u.jsxs(u.Fragment,{children:[t,n,O&&u.jsxs("div",{className:"x78zum5 xdt5ytf xr1yuqi x1txdalj x1xye8es",children:[r,s&&u.jsx("div",{className:"x78zum5 x6s0dn4 xzye2dw",children:s})]})]});const L=!!(e||t),H=!!(r||s),F=b&&g,V=j?{...c??{},width:E?void 0:R.size}:c,J=u.jsxs("nav",{ref:Wt(f,z),role:"navigation","aria-label":m("@astryx.sideNav.label"),"data-testid":d,...P(U("side-nav"),B(mx.root,E&&mx.rootCollapsed,o),l,V),...p,children:[L&&u.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"}}[!!E<<0],children:[e,t&&u.jsx("div",{children:t})]}),u.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"}}[!!E<<2|!!L<<1|!!H<<0],children:n}),(H||F)&&u.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"}}[!!E<<0],children:[r,u.jsxs("div",{...{0:{className:"x78zum5 x6s0dn4 xzye2dw"},1:{className:"x78zum5 x6s0dn4 xzye2dw x3ieub6"}}[!!E<<0],children:[F&&u.jsx(e5,{}),s]})]})]}),W=M?u.jsxs("div",{className:"x1n2onr6 x78zum5 x2lah0s x5yr21d",children:[J,u.jsx(Y3,{"data-testid":"astryx-sidenav-resize-handle",direction:"horizontal",position:"overlay",pillPlacement:"end",isAlwaysVisible:!1,resizable:R.props,label:m("@astryx.sideNav.resizeSidebar")})]}):J;return b?u.jsx(rh,{value:D,children:W}):W}t5.displayName="SideNav";const $i={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}},uz={isCollapsed:!1,toggle:()=>{},isCollapsible:!1};function yx({href:e,as:t,isDisabled:n,onClick:r,ref:s,children:a,...i}){const o=Bo(t);return e&&!n?u.jsx(o,{ref:s,href:e,onClick:r,...i,children:a}):u.jsx("button",{ref:s,type:"button",onClick:r,disabled:n,...i,children:a})}function Ma({as:e,label:t,icon:n,selectedIcon:r,isSelected:s=!1,isDisabled:a=!1,href:i,onClick:o,endContent:l,children:c,collapsible:d,size:f="md","data-testid":h,ref:p,xstyle:m}){const k=ke(),b=tc("chevronDown"),{isCollapsed:g}=$m(),y=zw(),{closeMobileNav:v}=Gf(),w=y==="drawer"||y==="drawer-content",S=x.useId(),j=!!c,C=x.useRef(null),$=Bc({hasLightDismiss:!0,hasAutoFocus:!0,hasCloseButton:!1,dialogLabel:`${t} submenu`}),A=x.useMemo(()=>typeof d=="object"?d:{},[d]),E=j&&d!==!1,z=A.isCollapsed,N=z!==void 0,[T,R]=x.useState(A.defaultIsCollapsed??!1),_=N?z:T,M=x.useCallback(()=>{var ie;const de=!_;N||R(de),(ie=A.onCollapsedChange)==null||ie.call(A,de)},[_,N,A]),D=s&&r?r:n,O=E&&(!!i||!!o)&&!g,L=de=>{if(a){de.preventDefault();return}if(E&&!O&&!g){de.preventDefault(),M();return}o==null||o(de),w&&v()},H=de=>{de.preventDefault(),de.stopPropagation(),M()},F=x.useRef(null),V=x.useRef(null),J=x.useCallback(()=>{F.current&&(clearTimeout(F.current),F.current=null),V.current&&(clearTimeout(V.current),V.current=null)},[]),W=x.useCallback(()=>{J(),F.current=setTimeout(()=>{$.show({skipAutoFocus:!0})},150)},[J,$]),ne=x.useCallback(()=>{J(),V.current=setTimeout(()=>{$.hide()},200)},[J,$]),Y=x.useCallback(()=>{W()},[W]),G=x.useCallback(()=>{ne()},[ne]);if(g&&!n)return null;if(g){const de=D&&ss(D,{size:"sm",color:s?"primary":a?"disabled":"secondary"}),ie=P(U("side-nav-item",{size:f,selected:s?"selected":null}),B(ks.item,ks[f],$i.itemCollapsed,f==="sm"&&$i.itemCollapsedSm,f==="lg"&&$i.itemCollapsedLg,s&&ks.selected,a&&ks.disabled));if(j)return u.jsxs("div",{...B($i.root,m),children:[u.jsx("button",{ref:Wt(p,$.triggerRef),type:"button",onClick:$.toggle,onMouseEnter:Y,onMouseLeave:G,"aria-label":t,"data-testid":h,...$.triggerProps,...ie,children:de}),$.render(u.jsxs("div",{className:"x1litavf x1y0btm7 x14i3s5s xu0wf1k x7a5moj x11g1kdw xfb3i0g",onMouseEnter:Y,onMouseLeave:G,onClick:()=>$.hide(),children:[u.jsx("div",{className:"xf314gf xu0wf1k x141an7d x2mo6ok xv1l7n4 x1ltkj2j",children:t}),u.jsx(rh,{value:uz,children:c})]}),{placement:"end",alignment:"start"})]});const K={"aria-current":s?"page":void 0,"aria-disabled":a||void 0,"aria-label":t,"data-testid":h},ge=u.jsx(yx,{ref:p,href:i,as:e,isDisabled:a,onClick:L,...K,...ie,children:de});return u.jsxs("div",{ref:C,...B($i.root,m),children:[ge,u.jsx(qo,{content:t,placement:"end",anchorRef:C})]})}const ae=u.jsxs(u.Fragment,{children:[D&&ss(D,{size:"sm",color:s?"primary":a?"disabled":"secondary"}),!g&&u.jsx("span",{className:"x98rzlu xeuugli xb3r6kr xlyipyv xuxw1ft",children:t}),!g&&l&&u.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:l}),!g&&E&&!O&&u.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"}}[!_<<0],children:b})]}),ce=P(U("side-nav-item",{size:f,selected:s?"selected":null}),B(ks.item,ks[f],s&&ks.selected,a&&ks.disabled));let ve;if(O)ve=u.jsxs("div",{"data-testid":h,...ce,children:[u.jsx(yx,{ref:p,href:i,as:e,isDisabled:a,onClick:L,"aria-current":s?"page":void 0,className:"x78zum5 x6s0dn4 x1txdalj x98rzlu xeuugli x1heor9g x1hl2dhg x1717udv x1ghz6dp xc342km xng3xce xjbqb8w xjb2p0i x1qlqyl8 x1pd3egz x15bjb6t x1yc453h x1ypdohk",children:ae}),u.jsx("button",{type:"button",onClick:H,"aria-label":_?k("@astryx.sideNavItem.expand",{label:t}):k("@astryx.sideNavItem.collapse",{label:t}),"aria-expanded":!_,"aria-controls":`${S}-children`,className:"x3nfvp2 x6s0dn4 xl56j7k x2lah0s x1717udv x1ghz6dp xc342km xng3xce xjbqb8w x1heor9g x1ypdohk xh6dtrn xe9uy6x xyxi2l3",children:u.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"}}[!_<<0],children:b})})]});else{const de={"aria-current":s?"page":void 0,"aria-disabled":a||void 0,"aria-expanded":E?!_:void 0,"aria-controls":E?`${S}-children`:void 0,"data-testid":h};ve=u.jsx(yx,{ref:p,href:i,as:e,isDisabled:a,onClick:L,...de,...ce,children:ae})}return u.jsxs("div",{ref:C,...B($i.root,m),children:[ve,j&&!g&&u.jsx("div",{id:`${S}-children`,role:"group","aria-labelledby":`${S}-label`,"aria-hidden":_,inert:_?!0:void 0,...{0:{className:"xrvj5dj x1tu4anv x1qn9uv2 x80gvsz xlr8y92"},1:{className:"xrvj5dj x1qn9uv2 x80gvsz xlr8y92 xihq33y"}}[!!_<<0],children:u.jsxs("div",{className:"xb3r6kr x2lwn1j x31w388",children:[u.jsx("span",{id:`${S}-label`,hidden:!0,children:t}),c]})})]})}Ma.displayName="SideNavItem";const dz={root:{k1xSpc:"x78zum5",kXwgrk:"xdt5ytf",k8WAf4:"xu0wf1k",$$css:!0}};function ed({ref:e,title:t,subtitle:n,children:r,endContent:s,isHeaderHidden:a=!1,xstyle:i,className:o,style:l,"data-testid":c,...d}){const{isCollapsed:f}=$m(),p=`${x.useId()}-title`,m=u.jsxs(u.Fragment,{children:[u.jsxs("span",{className:"x78zum5 xdt5ytf x98rzlu xeuugli",children:[u.jsx("span",{id:p,className:"x141an7d x2mo6ok x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:t}),n&&u.jsx("span",{className:"x141an7d x1ltkj2j xv1l7n4 xb3r6kr xlyipyv xuxw1ft",children:n})]}),s&&u.jsx("span",{className:"x2lah0s x78zum5 x6s0dn4",children:s})]}),k=a||f,b=k?{position:"absolute",width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:0}:{};return u.jsxs("div",{ref:e,...P(U("side-nav-section"),B(dz.root,i),o,l),...d,role:"group","aria-labelledby":p,"data-testid":c,children:[u.jsx("div",{...P({className:"x78zum5 x6s0dn4 x1txdalj xf314gf xu0wf1k xt0e3qv x87ps6o"},{style:k?b:void 0}),children:m}),u.jsx("div",{className:"x78zum5 xdt5ytf x1lsbc85",children:r})]})}ed.displayName="SideNavSection";var n5={exports:{}},sh={},r5={exports:{}},s5={};/**
|
|
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(M,D){var I=M.length;M.push(D);e:for(;0<I;){var O=I-1>>>1,L=M[O];if(0<s(L,D))M[O]=D,M[I]=L,I=O;else break e}}function n(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var D=M[0],I=M.pop();if(I!==D){M[0]=I;e:for(var O=0,L=M.length,H=L>>>1;O<H;){var F=2*(O+1)-1,V=M[F],J=F+1,W=M[J];if(0>s(V,I))J<L&&0>s(W,V)?(M[O]=W,M[J]=I,O=J):(M[O]=V,M[F]=I,O=F);else if(J<L&&0>s(W,I))M[O]=W,M[J]=I,O=J;else break e}}return D}function s(M,D){var I=M.sortIndex-D.sortIndex;return I!==0?I:M.id-D.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 l=[],c=[],d=1,f=null,h=3,p=!1,m=!1,k=!1,b=!1,g=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function w(M){for(var D=n(c);D!==null;){if(D.callback===null)r(c);else if(D.startTime<=M)r(c),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(c)}}function S(M){if(k=!1,w(M),!m)if(n(l)!==null)m=!0,j||(j=!0,N());else{var D=n(c);D!==null&&_(S,D.startTime-M)}}var j=!1,C=-1,$=5,A=-1;function E(){return b?!0:!(e.unstable_now()-A<$)}function z(){if(b=!1,j){var M=e.unstable_now();A=M;var D=!0;try{e:{m=!1,k&&(k=!1,y(C),C=-1),p=!0;var I=h;try{t:{for(w(M),f=n(l);f!==null&&!(f.expirationTime>M&&E());){var O=f.callback;if(typeof O=="function"){f.callback=null,h=f.priorityLevel;var L=O(f.expirationTime<=M);if(M=e.unstable_now(),typeof L=="function"){f.callback=L,w(M),D=!0;break t}f===n(l)&&r(l),w(M)}else r(l);f=n(l)}if(f!==null)D=!0;else{var H=n(c);H!==null&&_(S,H.startTime-M),D=!1}}break e}finally{f=null,h=I,p=!1}D=void 0}}finally{D?N():j=!1}}}var N;if(typeof v=="function")N=function(){v(z)};else if(typeof MessageChannel<"u"){var T=new MessageChannel,R=T.port2;T.port1.onmessage=z,N=function(){R.postMessage(null)}}else N=function(){g(z,0)};function _(M,D){C=g(function(){M(e.unstable_now())},D)}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(M){M.callback=null},e.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<M?Math.floor(1e3/M):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_next=function(M){switch(h){case 1:case 2:case 3:var D=3;break;default:D=h}var I=h;h=D;try{return M()}finally{h=I}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(M,D){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var I=h;h=M;try{return D()}finally{h=I}},e.unstable_scheduleCallback=function(M,D,I){var O=e.unstable_now();switch(typeof I=="object"&&I!==null?(I=I.delay,I=typeof I=="number"&&0<I?O+I:O):I=O,M){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=I+L,M={id:d++,callback:D,priorityLevel:M,startTime:I,expirationTime:L,sortIndex:-1},I>O?(M.sortIndex=I,t(c,M),n(l)===null&&M===n(c)&&(k?(y(C),C=-1):k=!0,_(S,I-O))):(M.sortIndex=L,t(l,M),m||p||(m=!0,j||(j=!0,N()))),M},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(M){var D=h;return function(){var I=h;h=D;try{return M.apply(this,arguments)}finally{h=I}}}})(s5);r5.exports=s5;var fz=r5.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 kt=fz,a5=x,hz=rc;function q(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 i5(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pc(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 o5(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 l5(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 jb(e){if(Pc(e)!==e)throw Error(q(188))}function xz(e){var t=e.alternate;if(!t){if(t=Pc(e),t===null)throw Error(q(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var a=s.alternate;if(a===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===a.child){for(a=s.child;a;){if(a===n)return jb(s),e;if(a===r)return jb(s),t;a=a.sibling}throw Error(q(188))}if(n.return!==r.return)n=s,r=a;else{for(var i=!1,o=s.child;o;){if(o===n){i=!0,n=s,r=a;break}if(o===r){i=!0,r=s,n=a;break}o=o.sibling}if(!i){for(o=a.child;o;){if(o===n){i=!0,n=a,r=s;break}if(o===r){i=!0,r=a,n=s;break}o=o.sibling}if(!i)throw Error(q(189))}}if(n.alternate!==r)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?e:t}function c5(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=c5(e),t!==null)return t;e=e.sibling}return null}function vn(e,t,n,r,s,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,s,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&vn(e.child,t,n,r,s,a))return!0;e=e.sibling}return!1}function fi(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 Eb(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 u5(e){var t=[null,null],n=fi(e);return n===null||d5(t,e,n.child,{foundSelf:!1}),t}function d5(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&d5(e,t,n.child,r))return!0;n=n.sibling}return!1}function bt(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(q(559))}}var Ii=null,Op=null;function pz(e,t,n){return e===n?!0:e===t?(Ii=e,!0):!1}function gz(e,t,n){return e===n?(Op=e,!1):e===t?(Op!==null&&(Ii=e),!0):!1}function $b(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 Dp(e,t,n){for(var r=0,s=e;s;s=n(s))r++;s=0;for(var a=t;a;a=n(a))s++;for(;0<r-s;)e=n(e),r--;for(;0<s-r;)t=n(t),s--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var Pe=Object.assign,mz=Symbol.for("react.element"),Su=Symbol.for("react.transitional.element"),wl=Symbol.for("react.portal"),Li=Symbol.for("react.fragment"),f5=Symbol.for("react.strict_mode"),Ip=Symbol.for("react.profiler"),h5=Symbol.for("react.consumer"),Nr=Symbol.for("react.context"),Cm=Symbol.for("react.forward_ref"),Lp=Symbol.for("react.suspense"),Bp=Symbol.for("react.suspense_list"),Tm=Symbol.for("react.memo"),Ms=Symbol.for("react.lazy"),Hp=Symbol.for("react.activity"),yz=Symbol.for("react.legacy_hidden"),bz=Symbol.for("react.memo_cache_sentinel"),qp=Symbol.for("react.view_transition"),kz=Symbol.for("react.recoverable"),Cb=Symbol.iterator;function ul(e){return e===null||typeof e!="object"?null:(e=Cb&&e[Cb]||e["@@iterator"],typeof e=="function"?e:null)}var vz=Symbol.for("react.client.reference");function Up(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===vz?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Li:return"Fragment";case Ip:return"Profiler";case f5:return"StrictMode";case Lp:return"Suspense";case Bp:return"SuspenseList";case Hp:return"Activity";case qp:return"ViewTransition"}if(typeof e=="object")switch(e.$$typeof){case wl:return"Portal";case Nr:return e.displayName||"Context";case h5:return(e._context.displayName||"Context")+".Consumer";case Cm:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Tm:return t=e.displayName||null,t!==null?t:Up(e.type)||"Memo";case Ms:t=e._payload,e=e._init;try{return Up(e(t))}catch{}}return null}var Sl=Array.isArray,ue=a5.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ne=hz.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,qa={pending:!1,data:null,method:null,action:null},Pp=[],Bi=-1;function Ir(e){return{current:e}}function qt(e){0>Bi||(e.current=Pp[Bi],Pp[Bi]=null,Bi--)}function Xe(e,t){Bi++,Pp[Bi]=e.current,e.current=t}var _r=Ir(null),oc=Ir(null),Hs=Ir(null),qd=Ir(null);function Ud(e,t){switch(Xe(Hs,t),Xe(oc,e),Xe(_r,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Hk(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Hk(t),e=O6(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}qt(_r),Xe(_r,e)}function vo(){qt(_r),qt(oc),qt(Hs)}function Fp(e){var t=e.memoizedState;t!==null&&(Ao._currentValue=t.memoizedState,Xe(qd,e)),t=_r.current;var n=O6(t,e.type);t!==n&&(Xe(oc,e),Xe(_r,n))}function Pd(e){oc.current===e&&(qt(_r),qt(oc)),qd.current===e&&(qt(qd),Ao._currentValue=qa)}var bx,Tb;function js(e){if(bx===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);bx=t&&t[1]||"",Tb=-1<n.stack.indexOf(`
|
|
183
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
184
|
-
`+bx+e+Tb}var kx=!1;function vx(e,t){if(!e||kx)return"";kx=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(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]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var a=r.DetermineComponentFrameRoot(),i=a[0],o=a[1];if(i&&o){var l=i.split(`
|
|
185
|
-
`),c=o.split(`
|
|
186
|
-
`);for(s=r=0;r<l.length&&!l[r].includes("DetermineComponentFrameRoot");)r++;for(;s<c.length&&!c[s].includes("DetermineComponentFrameRoot");)s++;if(r===l.length||s===c.length)for(r=l.length-1,s=c.length-1;1<=r&&0<=s&&l[r]!==c[s];)s--;for(;1<=r&&0<=s;r--,s--)if(l[r]!==c[s]){if(r!==1||s!==1)do if(r--,s--,0>s||l[r]!==c[s]){var d=`
|
|
187
|
-
`+l[r].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=r&&0<=s);break}}}finally{kx=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?js(n):""}function wz(e,t){switch(e.tag){case 26:case 27:case 5:return js(e.type);case 16:return js("Lazy");case 13:return e.child!==t&&t!==null?js("Suspense Fallback"):js("Suspense");case 19:return js("SuspenseList");case 0:case 15:return vx(e.type,!1);case 11:return vx(e.type.render,!1);case 1:return vx(e.type,!0);case 31:return js("Activity");case 30:return js("ViewTransition");default:return""}}function Mb(e){try{var t="",n=null;do t+=wz(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
188
|
-
Error generating stack: `+r.message+`
|
|
189
|
-
`+r.stack}}var Gp=Object.prototype.hasOwnProperty,Mm=kt.unstable_scheduleCallback,wx=kt.unstable_cancelCallback,Sz=kt.unstable_shouldYield,jz=kt.unstable_requestPaint,Dn=kt.unstable_now,Ez=kt.unstable_getCurrentPriorityLevel,x5=kt.unstable_ImmediatePriority,p5=kt.unstable_UserBlockingPriority,Fd=kt.unstable_NormalPriority,$z=kt.unstable_LowPriority,g5=kt.unstable_IdlePriority,Cz=kt.log,Tz=kt.unstable_setDisableYieldValue,Fc=null,In=null;function _s(e){if(typeof Cz=="function"&&Tz(e),In&&typeof In.setStrictMode=="function")try{In.setStrictMode(Fc,e)}catch{}}var Ln=Math.clz32?Math.clz32:Az,Mz=Math.log,Nz=Math.LN2;function Az(e){return e>>>=0,e===0?32:31-(Mz(e)/Nz|0)|0}var ju=256,Eu=262144,$u=4194304;function ba(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 ah(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var s=0,a=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var o=r&134217727;return o!==0?(r=o&~a,r!==0?s=ba(r):(i&=o,i!==0?s=ba(i):n||(n=o&~e,n!==0&&(s=ba(n))))):(o=r&~a,o!==0?s=ba(o):i!==0?s=ba(i):n||(n=r&~e,n!==0&&(s=ba(n)))),s===0?0:t!==0&&t!==s&&!(t&a)&&(a=s&-s,n=t&-t,a>=n||a===32&&(n&4194048)!==0)?t:s}function Gc(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function m5(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Ln(n),s=1<<r;t|=e[r],n&=~s}return t}function zz(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 y5(){var e=$u;return $u<<=1,!($u&62914560)&&($u=4194304),e}function Sx(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Vc(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Rz(e,t,n,r,s,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,l=e.expirationTimes,c=e.hiddenUpdates;for(n=i&~n;0<n;){var d=31-Ln(n),f=1<<d;o[d]=0,l[d]=-1;var h=c[d];if(h!==null)for(c[d]=null,d=0;d<h.length;d++){var p=h[d];p!==null&&(p.lane&=-536870913)}n&=~f}r!==0&&b5(e,r,0),a!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=a&~(i&~t))}function b5(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ln(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function k5(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ln(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}function v5(e,t){var n=t&-t;return n=n&42?1:Nm(n),n&(e.suspendedLanes|t)?0:n}function Nm(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 Am(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function w5(){var e=Ne.p;return e!==0?e:(e=window.event,e===void 0?32:nS(e.type))}function Nb(e,t){var n=Ne.p;try{return Ne.p=e,t()}finally{Ne.p=n}}var fs=Math.random().toString(36).slice(2),Bt="__reactFiber$"+fs,wn="__reactProps$"+fs,Po="__reactContainer$"+fs,Ab="__reactEvents$"+fs,_z="__reactListeners$"+fs,Oz="__reactHandles$"+fs,zb="__reactResources$"+fs,Xc="__reactMarker$"+fs,Gd="__reactLoad$"+fs;function ih(e){delete e[Bt],delete e[wn],delete e[_z],delete e[Oz]}function Na(e){var t;if(t=e[Bt])return t;for(var n=e.parentNode;n;){if(t=n[Po]||n[Bt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Zk(e);e!==null;){if(n=e[Bt])return n;e=Zk(e)}return t}e=n,n=e.parentNode}return null}function Fo(e){if(e=e[Bt]||e[Po]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function jl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(q(33))}function Qi(e){var t=e[zb];return t||(t=e[zb]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Mt(e){e[Xc]=!0}function S5(e){e[Gd]=void 0}var j5=new Set,E5={};function hi(e,t){wo(e,t),wo(e+"Capture",t)}function wo(e,t){for(E5[e]=t,e=0;e<t.length;e++)j5.add(t[e])}var Dz=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]*$"),Rb={},_b={};function Iz(e){return Gp.call(_b,e)?!0:Gp.call(Rb,e)?!1:Dz.test(e)?_b[e]=!0:(Rb[e]=!0,!1)}var Te=!1;function Ob(){var e=Te;return Te=!1,e}function td(e,t,n){if(Iz(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,n)}}function Cu(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 qr(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Mn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $5(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Lz(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var s=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(i){n=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(i){n=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vp(e){if(!e._valueTracker){var t=$5(e)?"checked":"value";e._valueTracker=Lz(e,t,""+e[t])}}function C5(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=$5(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}var Bz=/[\n"\\]/g;function Zn(e){return e.replace(Bz,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xp(e,t,n,r,s,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=""+Mn(t)):e.value!==""+Mn(t)&&(e.value=""+Mn(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?i==="number"&&e.value==t?jx(e,Mn(e.value)):jx(e,Mn(t)):n!=null?jx(e,Mn(n)):r!=null&&e.removeAttribute("value"),s==null&&a!=null&&(e.defaultChecked=!!a),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.name=""+Mn(o):e.removeAttribute("name")}function T5(e,t,n,r,s,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)){Vp(e);return}n=n!=null?""+Mn(n):"",t=t!=null?""+Mn(t):n,o||t===e.value||(e.value=t),e.defaultValue=t}r=r??s,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=o?e.checked:!!r,e.defaultChecked=!!r,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i),Vp(e)}function jx(e,t){e.defaultValue!==""+t&&(e.defaultValue=""+t)}function Ji(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+Mn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function M5(e,t,n){if(t!=null&&(t=""+Mn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Mn(n):""}function N5(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(q(92));if(Sl(r)){if(1<r.length)throw Error(q(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=Mn(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),Vp(e)}function So(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Hz=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 Db(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||Hz.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function A5(e,t,n){if(t!=null&&typeof t!="object")throw Error(q(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="",Te=!0);for(var s in t)r=t[s],t.hasOwnProperty(s)&&n[s]!==r&&(Db(e,s,r),Te=!0)}else for(var a in t)t.hasOwnProperty(a)&&Db(e,a,t[a])}function zm(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 qz=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"]]),Uz=/^[\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 nd(e){return Uz.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ar(){}var Zp=null;function Rm(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Hi=null,eo=null;function Ib(e){var t=Fo(e);if(t&&(e=t.stateNode)){var n=e[wn]||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="'+Zn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=r[wn]||null;if(!s)throw Error(q(90));Xp(r,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&C5(r)}break e;case"textarea":M5(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Ji(e,!!n.multiple,t,!1)}}}var Ex=!1;function z5(e,t,n){if(Ex)return e(t,n);Ex=!0;try{var r=e(t);return r}finally{if(Ex=!1,(Hi!==null||eo!==null)&&(kh(),Hi&&(t=Hi,e=eo,eo=Hi=null,Ib(t),e)))for(t=0;t<e.length;t++)Ib(e[t])}}function lc(e,t){var n=e.stateNode;if(n===null)return null;var r=n[wn]||null;if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(q(231,t,typeof n));return n}var as=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wp=!1;if(as)try{var dl={};Object.defineProperty(dl,"passive",{get:function(){Wp=!0}}),window.addEventListener("test",dl,dl),window.removeEventListener("test",dl,dl)}catch{Wp=!1}var Os=null,_m=null,rd=null;function R5(){if(rd)return rd;var e,t=_m,n=t.length,r,s="value"in Os?Os.value:Os.textContent,a=s.length;for(e=0;e<n&&t[e]===s[e];e++);var i=n-e;for(r=1;r<=i&&t[n-r]===s[a-r];r++);return rd=s.slice(e,1<r?1-r:void 0)}function sd(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 Tu(){return!0}function Lb(){return!1}function cn(e){function t(n,r,s,a,i){this._reactName=n,this._targetInst=s,this.type=r,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)?Tu:Lb,this.isPropagationStopped=Lb,this}return Pe(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=Tu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Tu)},persist:function(){},isPersistent:Tu}),t}var ia={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oh=cn(ia),Zc=Pe({},ia,{view:0,detail:0}),Pz=cn(Zc),$x,Cx,fl,lh=Pe({},Zc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Om,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!==fl&&(fl&&e.type==="mousemove"?($x=e.screenX-fl.screenX,Cx=e.screenY-fl.screenY):Cx=$x=0,fl=e),$x)},movementY:function(e){return"movementY"in e?e.movementY:Cx}}),Bb=cn(lh),Fz=Pe({},lh,{dataTransfer:0}),Gz=cn(Fz),Vz=Pe({},Zc,{relatedTarget:0}),Tx=cn(Vz),Xz=Pe({},ia,{animationName:0,elapsedTime:0,pseudoElement:0}),Zz=cn(Xz),Wz=Pe({},ia,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kz=cn(Wz),Yz=Pe({},ia,{data:0}),Hb=cn(Yz),Qz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jz={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"},eR={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tR(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=eR[e])?!!t[e]:!1}function Om(){return tR}var nR=Pe({},Zc,{key:function(e){if(e.key){var t=Qz[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=sd(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jz[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Om,charCode:function(e){return e.type==="keypress"?sd(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?sd(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),rR=cn(nR),sR=Pe({},lh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qb=cn(sR),aR=Pe({},ia,{submitter:0}),iR=cn(aR),oR=Pe({},Zc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Om}),lR=cn(oR),cR=Pe({},ia,{propertyName:0,elapsedTime:0,pseudoElement:0}),uR=cn(cR),dR=Pe({},lh,{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}),fR=cn(dR),hR=Pe({},ia,{newState:0,oldState:0,source:0}),xR=cn(hR),pR=[9,13,27,32],Dm=as&&"CompositionEvent"in window,zl=null;as&&"documentMode"in document&&(zl=document.documentMode);var gR=as&&"TextEvent"in window&&!zl,_5=as&&(!Dm||zl&&8<zl&&11>=zl),Ub=" ",Pb=!1;function O5(e,t){switch(e){case"keyup":return pR.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function D5(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var qi=!1;function mR(e,t){switch(e){case"compositionend":return D5(t);case"keypress":return t.which!==32?null:(Pb=!0,Ub);case"textInput":return e=t.data,e===Ub&&Pb?null:e;default:return null}}function yR(e,t){if(qi)return e==="compositionend"||!Dm&&O5(e,t)?(e=R5(),rd=_m=Os=null,qi=!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 _5&&t.locale!=="ko"?null:t.data;default:return null}}var bR={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 Fb(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!bR[e.type]:t==="textarea"}function I5(e,t,n,r){Hi?eo?eo.push(r):eo=[r]:Hi=r,t=xf(t,"onChange"),0<t.length&&(n=new oh("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Rl=null,cc=null;function kR(e){z6(e,0)}function ch(e){var t=jl(e);if(C5(t))return e}function Gb(e,t){if(e==="change")return t}var L5=!1;if(as){var Mx;if(as){var Nx="oninput"in document;if(!Nx){var Vb=document.createElement("div");Vb.setAttribute("oninput","return;"),Nx=typeof Vb.oninput=="function"}Mx=Nx}else Mx=!1;L5=Mx&&(!document.documentMode||9<document.documentMode)}function Xb(){Rl&&(Rl.detachEvent("onpropertychange",B5),cc=Rl=null)}function B5(e){if(e.propertyName==="value"&&ch(cc)){var t=[];I5(t,cc,e,Rm(e)),z5(kR,t)}}function vR(e,t,n){e==="focusin"?(Xb(),Rl=t,cc=n,Rl.attachEvent("onpropertychange",B5)):e==="focusout"&&Xb()}function wR(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ch(cc)}function SR(e,t){if(e==="click")return ch(t)}function jR(e,t){if(e==="input"||e==="change")return ch(t)}function ER(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Hn=typeof Object.is=="function"?Object.is:ER;function uc(e,t){if(Hn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Gp.call(t,s)||!Hn(e[s],t[s]))return!1}return!0}function Kp(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 Zb(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wb(e,t){var n=Zb(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Zb(n)}}function H5(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?H5(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function q5(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Kp(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=Kp(e.document)}return t}function Im(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 $R=as&&"documentMode"in document&&11>=document.documentMode,Ui=null,Yp=null,_l=null,Qp=!1;function Kb(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qp||Ui==null||Ui!==Kp(r)||(r=Ui,"selectionStart"in r&&Im(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),_l&&uc(_l,r)||(_l=r,r=xf(Yp,"onSelect"),0<r.length&&(t=new oh("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Ui)))}function pa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Pi={animationend:pa("Animation","AnimationEnd"),animationiteration:pa("Animation","AnimationIteration"),animationstart:pa("Animation","AnimationStart"),transitionrun:pa("Transition","TransitionRun"),transitionstart:pa("Transition","TransitionStart"),transitioncancel:pa("Transition","TransitionCancel"),transitionend:pa("Transition","TransitionEnd")},Ax={},U5={};as&&(U5=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function xi(e){if(Ax[e])return Ax[e];if(!Pi[e])return e;var t=Pi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in U5)return Ax[e]=t[n];return e}var P5=xi("animationend"),F5=xi("animationiteration"),G5=xi("animationstart"),CR=xi("transitionrun"),TR=xi("transitionstart"),MR=xi("transitioncancel"),V5=xi("transitionend"),X5=new Map,Jp="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(" ");Jp.push("scrollEnd");function br(e,t){X5.set(e,t),hi(t,[e])}var NR=0;function is(e,t){if(e.name!=null&&e.name!=="auto")return e.name;if(t.autoName!==null)return t.autoName;e=gr.identifierPrefix;var n=NR++;return e="_"+e+"t_"+n.toString(32)+"_",t.autoName=e}function Yb(e){if(e==null||typeof e=="string")return e;var t=null,n=oo;if(n!==null)for(var r=0;r<n.length;r++){var s=e[n[r]];if(s!=null){if(s==="none")return"none";t=t==null?s:t+(" "+s)}}return t??e.default}function hs(e,t){return e=Yb(e),t=Yb(t),t==null?e==="auto"?null:e:t==="auto"?null:t}var Vd=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)},Gn=[],Fi=0,Lm=0;function uh(){for(var e=Fi,t=Lm=Fi=0;t<e;){var n=Gn[t];Gn[t++]=null;var r=Gn[t];Gn[t++]=null;var s=Gn[t];Gn[t++]=null;var a=Gn[t];if(Gn[t++]=null,r!==null&&s!==null){var i=r.pending;i===null?s.next=s:(s.next=i.next,i.next=s),r.pending=s}a!==0&&Z5(n,s,a)}}function dh(e,t,n,r){Gn[Fi++]=e,Gn[Fi++]=t,Gn[Fi++]=n,Gn[Fi++]=r,Lm|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Bm(e,t,n,r){return dh(e,t,n,r),Xd(e)}function pi(e,t){return dh(e,null,null,t),Xd(e)}function Z5(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var s=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(s=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,s&&t!==null&&(s=31-Ln(n),e=a.hiddenUpdates,r=e[s],r===null?e[s]=[t]:r.push(t),t.lane=n|536870912),a):null}function Xd(e){if(50<Fl)throw Fl=0,xd=null,Error(q(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Gi={};function AR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function yn(e,t,n,r){return new AR(e,t,n,r)}function Hm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ts(e,t){var n=e.alternate;return n===null?(n=yn(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 W5(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 ad(e,t,n,r,s,a){var i=0;if(r=e,typeof r=="function")Hm(r)&&(i=1);else if(typeof r=="string")i=aO(e,n,_r.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(r){case Hp:return e=yn(31,n,t,s),e.elementType=Hp,e.lanes=a,e;case Li:return Ua(n.children,s,a,t);case f5:i=8,s|=24;break;case Ip:return e=yn(12,n,t,s|2),e.elementType=Ip,e.lanes=a,e;case Lp:return e=yn(13,n,t,s),e.elementType=Lp,e.lanes=a,e;case Bp:return e=yn(19,n,t,s),e.elementType=Bp,e.lanes=a,e;case yz:case qp:return e=s|32,e=yn(30,n,t,e),e.elementType=qp,e.lanes=a,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case Nr:i=10;break e;case h5:i=9;break e;case Cm:i=11;break e;case Tm:i=14;break e;case Ms:i=16,r=null;break e}i=29,n=Error(q(130,e===null?"null":typeof e,"")),r=null}return t=yn(i,n,t,s),t.elementType=e,t.type=r,t.lanes=a,t}function Ua(e,t,n,r){return e=yn(7,e,r,t),e.lanes=n,e}function zx(e,t,n){return e=yn(6,e,null,t),e.lanes=n,e}function K5(e){var t=yn(18,null,null,0);return t.stateNode=e,t}function Rx(e,t,n){return t=yn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Qb=new WeakMap;function Wn(e,t){if(typeof e=="object"&&e!==null){var n=Qb.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Mb(t)},Qb.set(e,t),t)}return{value:e,source:t,stack:Mb(t)}}var Vi=[],Xi=0,Zd=null,dc=0,Vn=[],Xn=0,Qs=null,zr=1,Rr="";function Fr(e,t){Vi[Xi++]=dc,Vi[Xi++]=Zd,Zd=e,dc=t}function Y5(e,t,n){Vn[Xn++]=zr,Vn[Xn++]=Rr,Vn[Xn++]=Qs,Qs=e;var r=zr;e=Rr;var s=32-Ln(r)-1;r&=~(1<<s),n+=1;var a=32-Ln(t)+s;if(30<a){var i=s-s%5;a=(r&(1<<i)-1).toString(32),r>>=i,s-=i,zr=1<<32-Ln(t)+s|n<<s|r,Rr=a+e}else zr=1<<a|n<<s|r,Rr=e}function fh(e){e.return!==null&&(Fr(e,1),Y5(e,1,0))}function qm(e){for(;e===Zd;)Zd=Vi[--Xi],Vi[Xi]=null,dc=Vi[--Xi],Vi[Xi]=null;for(;e===Qs;)Qs=Vn[--Xn],Vn[Xn]=null,Rr=Vn[--Xn],Vn[Xn]=null,zr=Vn[--Xn],Vn[Xn]=null}function Q5(e,t){Vn[Xn++]=zr,Vn[Xn++]=Rr,Vn[Xn++]=Qs,zr=t.id,Rr=t.overflow,Qs=e}var At=null,Ge=null,me=!1,qs=null,Kn=!1,e1=Error(q(519));function Js(e){var t=Error(q(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw fc(Wn(t,e)),e1}function Jb(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Bt]=e,t[wn]=r,n){case"dialog":ye("cancel",t),ye("close",t);break;case"iframe":case"object":case"embed":ye("load",t);break;case"video":case"audio":for(n=0;n<gc.length;n++)ye(gc[n],t);break;case"source":ye("error",t);break;case"img":case"image":case"link":ye("error",t),ye("load",t);break;case"details":ye("toggle",t);break;case"input":ye("invalid",t),T5(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ye("invalid",t);break;case"textarea":ye("invalid",t),N5(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||_6(t.textContent,n)?(r.popover!=null&&(ye("beforetoggle",t),ye("toggle",t)),r.onScroll!=null&&ye("scroll",t),r.onScrollEnd!=null&&ye("scrollend",t),r.onClick!=null&&(t.onclick=Ar),t=!0):t=!1,t||Js(e,!0)}function Wd(e){for(At=e.return;At;)switch(At.tag){case 5:case 31:case 13:Kn=!1;return;case 27:case 3:Kn=!0;return;default:At=At.return}}function Ci(e){if(e!==At)return!1;if(!me)return Wd(e),me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||L1(e.type,e.memoizedProps)),n=!n),n&&Ge&&Js(e),Wd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));Ge=Xk(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(317));Ge=Xk(e)}else t===27?(t=Ge,oa(e.type)?(e=U1,U1=null,Ge=e):Ge=t):Ge=At?Qn(e.stateNode.nextSibling):null;return!0}function Ya(){Ge=At=null,me=!1}function _x(){var e=qs;return e!==null&&(pn===null?pn=e:pn.push.apply(pn,e),qs=null),e}function fc(e){qs===null?qs=[e]:qs.push(e)}var t1=Ir(null),gi=null,Kr=null;function Ds(e,t,n){Xe(t1,t._currentValue),t._currentValue=n}function ns(e){e._currentValue=t1.current,qt(t1)}function id(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function n1(e,t,n,r){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){var i=s.child;a=a.firstContext;e:for(;a!==null;){var o=a;a=s;for(var l=0;l<t.length;l++)if(o.context===t[l]){a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),id(a.return,n,e),r||(i=null);break e}a=o.next}}else if(s.tag===18){if(i=s.return,i===null)throw Error(q(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),id(i,n,e),i=null}else s.tag===13&&s.memoizedState!==null&&s.memoizedState.dehydrated===null?(s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),id(s.return,n,e),i=s.child,i=i!==null?i.sibling:null):i=s.child;if(i!==null)i.return=s;else for(i=s;i!==null;){if(i===e){i=null;break}if(s=i.sibling,s!==null){s.return=i.return,i=s;break}i=i.return}s=i}}function Qa(e,t,n,r){e=null;for(var s=t,a=!1;s!==null;){if(!a){if(s.flags&524288)a=!0;else if(s.flags&262144)break}if(s.tag===10){var i=s.alternate;if(i===null)throw Error(q(387));if(i=i.memoizedProps,i!==null){var o=s.type;Hn(s.pendingProps.value,i.value)||(e!==null?e.push(o):e=[o])}}else if(s===qd.current){if(i=s.alternate,i===null)throw Error(q(387));i.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Ao):e=[Ao])}s=s.return}return e!==null&&n1(t,e,n,r),t.flags|=262144,e!==null}function Kd(e){for(e=e.firstContext;e!==null;){if(!Hn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ja(e){gi=e,Kr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return J5(gi,e)}function Mu(e,t){return gi===null&&Ja(e),J5(e,t)}function J5(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Kr===null){if(e===null)throw Error(q(308));Kr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kr=Kr.next=t;return n}var zR=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},RR=kt.unstable_scheduleCallback,_R=kt.unstable_NormalPriority,dt={$$typeof:Nr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Um(){return{controller:new zR,data:new Map,refCount:0}}function Wc(e){e.refCount--,e.refCount===0&&RR(_R,function(){e.controller.abort()})}function ek(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var El=null;function OR(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Ol=null,r1=0,ei=0,to=null;function DR(e,t){if(Ol===null){var n=Ol=[];r1=0,ei=g0(),to={status:"pending",value:void 0,then:function(r){n.push(r)}}}return r1++,t.then(tk,tk),t}function tk(){if(--r1===0&&(El=null,Ol!==null)){to!==null&&(to.status="fulfilled");var e=Ol;Ol=null,ei=0,to=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function IR(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(s){n.push(s)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var s=0;s<n.length;s++)(0,n[s])(t)},function(s){for(r.status="rejected",r.reason=s,s=0;s<n.length;s++)(0,n[s])(void 0)}),r}var nk=ue.S;ue.S=function(e,t){if(m6=Dn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&DR(e,t),El!==null)for(var n=To;n!==null;)ek(n,El),n=n.next;if(n=e.types,n!==null){for(var r=To;r!==null;)ek(r,n),r=r.next;if(ei!==0){r=El,r===null&&(r=El=[]);for(var s=0;s<n.length;s++){var a=n[s];r.indexOf(a)===-1&&r.push(a)}}}nk!==null&&nk(e,t)};var Pa=Ir(null);function Pm(){var e=Pa.current;return e!==null?e:Ue.pooledCache}function od(e,t){t===null?Xe(Pa,Pa.current):Xe(Pa,t.pool)}function e4(){var e=Pm();return e===null?null:{parent:dt._currentValue,pool:e}}var Go=Error(q(460)),Fm=Error(q(474)),hh=Error(q(542)),Yd={then:function(){}};function rk(e){return e=e.status,e==="fulfilled"||e==="rejected"}function t4(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ar,Ar),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ak(e),e===void 0&&!("reason"in t)?Error(q(600)):e;default:if(typeof t.status=="string")t.then(Ar,Ar);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(q(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var s=t;s.status="fulfilled",s.value=r}},function(r){if(t.status==="pending"){var s=t;s.status="rejected",s.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ak(e),e}throw Fa=t,Go}}function ka(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Fa=n,Go):n}}var Fa=null;function sk(){if(Fa===null)throw Error(q(459));var e=Fa;return Fa=null,e}function ak(e){if(e===Go||e===hh)throw Error(q(483))}var no=null,hc=0;function Nu(e){var t=hc;return hc+=1,no===null&&(no=[]),t4(no,e,t)}function vs(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Au(e,t){throw t.$$typeof===mz?Error(q(525)):(e=Object.prototype.toString.call(t),Error(q(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function n4(e){function t(g,y){if(e){var v=g.deletions;v===null?(g.deletions=[y],g.flags|=16):v.push(y)}}function n(g,y){if(!e)return null;for(;y!==null;)t(g,y),y=y.sibling;return null}function r(g){for(var y=new Map;g!==null;)g.key===null?y.set(g.index,g):y.set(g.key,g),g=g.sibling;return y}function s(g,y){return g=ts(g,y),g.index=0,g.sibling=null,g}function a(g,y,v){return g.index=v,e?(v=g.alternate,v!==null?(v=v.index,v<y?(g.flags|=2,y):v):(g.flags|=134217730,y)):(g.flags|=1048576,y)}function i(g){return e&&g.alternate===null&&(g.flags|=134217730),g}function o(g,y,v,w){return y===null||y.tag!==6?(y=zx(v,g.mode,w),y.return=g,y):(y=s(y,v),y.return=g,y)}function l(g,y,v,w){var S=v.type;return S===Li?(g=d(g,y,v.props.children,w,v.key),vs(g,v),g):y!==null&&(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ms&&ka(S)===y.type)?(y=s(y,v.props),vs(y,v),y.return=g,y):(y=ad(v.type,v.key,v.props,null,g.mode,w),vs(y,v),y.return=g,y)}function c(g,y,v,w){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=Rx(v,g.mode,w),y.return=g,y):(y=s(y,v.children||[]),y.return=g,y)}function d(g,y,v,w,S){return y===null||y.tag!==7?(y=Ua(v,g.mode,w,S),y.return=g,y):(y=s(y,v),y.return=g,y)}function f(g,y,v){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=zx(""+y,g.mode,v),y.return=g,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Su:return v=ad(y.type,y.key,y.props,null,g.mode,v),vs(v,y),v.return=g,v;case wl:return y=Rx(y,g.mode,v),y.return=g,y;case Ms:return y=ka(y),f(g,y,v)}if(Sl(y)||ul(y))return y=Ua(y,g.mode,v,null),y.return=g,y;if(typeof y.then=="function")return f(g,Nu(y),v);if(y.$$typeof===Nr)return f(g,Mu(g,y),v);Au(g,y)}return null}function h(g,y,v,w){var S=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return S!==null?null:o(g,y,""+v,w);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:return v.key===S?l(g,y,v,w):null;case wl:return v.key===S?c(g,y,v,w):null;case Ms:return v=ka(v),h(g,y,v,w)}if(Sl(v)||ul(v))return S!==null?null:d(g,y,v,w,null);if(typeof v.then=="function")return h(g,y,Nu(v),w);if(v.$$typeof===Nr)return h(g,y,Mu(g,v),w);Au(g,v)}return null}function p(g,y,v,w,S){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return g=g.get(v)||null,o(y,g,""+w,S);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Su:return g=g.get(w.key===null?v:w.key)||null,l(y,g,w,S);case wl:return g=g.get(w.key===null?v:w.key)||null,c(y,g,w,S);case Ms:return w=ka(w),p(g,y,v,w,S)}if(Sl(w)||ul(w))return g=g.get(v)||null,d(y,g,w,S,null);if(typeof w.then=="function")return p(g,y,v,Nu(w),S);if(w.$$typeof===Nr)return p(g,y,v,Mu(y,w),S);Au(y,w)}return null}function m(g,y,v,w){for(var S=null,j=null,C=y,$=y=0,A=null;C!==null&&$<v.length;$++){C.index>$?(A=C,C=null):A=C.sibling;var E=h(g,C,v[$],w);if(E===null){C===null&&(C=A);break}e&&C&&E.alternate===null&&t(g,C),y=a(E,y,$),j===null?S=E:j.sibling=E,j=E,C=A}if($===v.length)return n(g,C),me&&Fr(g,$),S;if(C===null){for(;$<v.length;$++)C=f(g,v[$],w),C!==null&&(y=a(C,y,$),j===null?S=C:j.sibling=C,j=C);return me&&Fr(g,$),S}for(C=r(C);$<v.length;$++)A=p(C,g,$,v[$],w),A!==null&&(e&&(E=A.alternate,E!==null&&C.delete(E.key===null?$:E.key)),y=a(A,y,$),j===null?S=A:j.sibling=A,j=A);return e&&C.forEach(function(z){return t(g,z)}),me&&Fr(g,$),S}function k(g,y,v,w){if(v==null)throw Error(q(151));for(var S=null,j=null,C=y,$=y=0,A=null,E=v.next();C!==null&&!E.done;$++,E=v.next()){C.index>$?(A=C,C=null):A=C.sibling;var z=h(g,C,E.value,w);if(z===null){C===null&&(C=A);break}e&&C&&z.alternate===null&&t(g,C),y=a(z,y,$),j===null?S=z:j.sibling=z,j=z,C=A}if(E.done)return n(g,C),me&&Fr(g,$),S;if(C===null){for(;!E.done;$++,E=v.next())E=f(g,E.value,w),E!==null&&(y=a(E,y,$),j===null?S=E:j.sibling=E,j=E);return me&&Fr(g,$),S}for(C=r(C);!E.done;$++,E=v.next())E=p(C,g,$,E.value,w),E!==null&&(e&&(A=E.alternate,A!==null&&C.delete(A.key===null?$:A.key)),y=a(E,y,$),j===null?S=E:j.sibling=E,j=E);return e&&C.forEach(function(N){return t(g,N)}),me&&Fr(g,$),S}function b(g,y,v,w){if(typeof v=="object"&&v!==null&&v.type===Li&&v.key===null&&v.props.ref===void 0&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Su:e:{for(var S=v.key;y!==null;){if(y.key===S){if(S=v.type,S===Li){if(y.tag===7){n(g,y.sibling),w=s(y,v.props.children),vs(w,v),w.return=g,g=w;break e}}else if(y.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ms&&ka(S)===y.type){n(g,y.sibling),w=s(y,v.props),vs(w,v),w.return=g,g=w;break e}n(g,y);break}else t(g,y);y=y.sibling}v.type===Li?(w=Ua(v.props.children,g.mode,w,v.key),vs(w,v),w.return=g,g=w):(w=ad(v.type,v.key,v.props,null,g.mode,w),vs(w,v),w.return=g,g=w)}return i(g);case wl:e:{for(S=v.key;y!==null;){if(y.key===S)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(g,y.sibling),w=s(y,v.children||[]),w.return=g,g=w;break e}else{n(g,y);break}else t(g,y);y=y.sibling}w=Rx(v,g.mode,w),w.return=g,g=w}return i(g);case Ms:return v=ka(v),b(g,y,v,w)}if(Sl(v))return m(g,y,v,w);if(ul(v)){if(S=ul(v),typeof S!="function")throw Error(q(150));return v=S.call(v),k(g,y,v,w)}if(typeof v.then=="function")return b(g,y,Nu(v),w);if(v.$$typeof===Nr)return b(g,y,Mu(g,v),w);Au(g,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,y!==null&&y.tag===6?(n(g,y.sibling),w=s(y,v),w.return=g,g=w):(n(g,y),w=zx(v,g.mode,w),w.return=g,g=w),i(g)):n(g,y)}return function(g,y,v,w){try{hc=0;var S=b(g,y,v,w);return no=null,S}catch(C){if(C===Go||C===hh)throw C;var j=yn(29,C,null,g.mode);return j.lanes=w,j.return=g,j}finally{}}}var ti=n4(!0),r4=n4(!1),Ns=!1;function Gm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function s1(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 Us(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ps(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Me&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,t=Xd(e),Z5(e,null,n),t}return dh(e,r,t,n),Xd(e)}function Dl(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,k5(e,n)}}function Ox(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=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?s=a=i:a=a.next=i,n=n.next}while(n!==null);a===null?s=a=t:a=a.next=t}else s=a=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var a1=!1;function Il(){if(a1){var e=to;if(e!==null)throw e}}function Ll(e,t,n,r){a1=!1;var s=e.updateQueue;Ns=!1;var a=s.firstBaseUpdate,i=s.lastBaseUpdate,o=s.shared.pending;if(o!==null){s.shared.pending=null;var l=o,c=l.next;l.next=null,i===null?a=c:i.next=c,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,o=d.lastBaseUpdate,o!==i&&(o===null?d.firstBaseUpdate=c:o.next=c,d.lastBaseUpdate=l))}if(a!==null){var f=s.baseState;i=0,d=c=l=null,o=a;do{var h=o.lane&-536870913,p=h!==o.lane;if(p?(we&h)===h:(r&h)===h){h!==0&&h===ei&&(a1=!0),d!==null&&(d=d.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});e:{var m=e,k=o;h=t;var b=n;switch(k.tag){case 1:if(m=k.payload,typeof m=="function"){f=m.call(b,f,h);break e}f=m;break e;case 3:m.flags=m.flags&-65537|128;case 0:if(m=k.payload,h=typeof m=="function"?m.call(b,f,h):m,h==null)break e;f=Pe({},f,h);break e;case 2:Ns=!0}}h=o.callback,h!==null&&(e.flags|=64,p&&(e.flags|=8192),p=s.callbacks,p===null?s.callbacks=[h]:p.push(h))}else p={lane:h,tag:o.tag,payload:o.payload,callback:o.callback,next:null},d===null?(c=d=p,l=f):d=d.next=p,i|=h;if(o=o.next,o===null){if(o=s.shared.pending,o===null)break;p=o,o=p.next,p.next=null,s.lastBaseUpdate=p,s.shared.pending=null}}while(!0);d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,a===null&&(s.shared.lanes=0),na|=i,e.lanes=i,e.memoizedState=f}}function s4(e,t){if(typeof e!="function")throw Error(q(191,e));e.call(t)}function a4(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)s4(n[e],t)}var ea=Ir(null),Qd=Ir(0);function ik(e,t){e=us,Xe(Qd,e),Xe(ea,t),us=e|t.baseLanes}function i1(){Xe(Qd,us),Xe(ea,ea.current)}function Vm(){us=Qd.current,qt(ea),qt(Qd)}var Ft=Ir(null),Xt=null;function Fs(e){var t=e.alternate;Xe(Ut,Ut.current&1),Xe(Ft,e),Xt===null&&(t===null||ea.current!==null||t.memoizedState!==null)&&(Xt=e)}function o1(e){Xe(Ut,Ut.current),Xe(Ft,e),Xt===null&&(Xt=e)}function i4(e){e.tag===22?(Xe(Ut,Ut.current),Xe(Ft,e),Xt===null&&(Xt=e)):Gs()}function Gs(){Xe(Ut,Ut.current),Xe(Ft,Ft.current)}function An(e){qt(Ft),Xt===e&&(Xt=null),qt(Ut)}var Ut=Ir(0);function xc(e,t){Xe(Ft,Ft.current),Xe(Ut,t)}function Xm(e){qt(Ut),qt(Ft),Xt===e&&(Xt=null)}function Jd(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||q1(n)||k0(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 os=0,xe=null,Be=null,ut=null,ef=!1,ro=!1,ni=!1,tf=0,pc=0,so=null,LR=0;function at(){throw Error(q(321))}function Zm(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Hn(e[n],t[n]))return!1;return!0}function Wm(e,t,n,r,s,a){return os=a,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?I4:L4,ni=!1,a=n(r,s),ni=!1,ro&&(a=l4(t,n,r,s)),o4(e),a}function o4(e){ue.H=nf;var t=Be!==null&&Be.next!==null;if(os=0,ut=Be=xe=null,ef=!1,pc=0,so=null,t)throw Error(q(300));e===null||ft||(e=e.dependencies,e!==null&&Kd(e)&&(ft=!0))}function l4(e,t,n,r){xe=e;var s=0;do{if(ro&&(so=null),pc=0,ro=!1,25<=s)throw Error(q(301));if(s+=1,ut=Be=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}ue.H=VR,a=t(n,r)}while(ro);return a}function BR(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?Kc(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(xe.flags|=1024),t}function Km(){var e=tf!==0;return tf=0,e}function Ym(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Qm(e){if(ef){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ef=!1}os=0,ut=Be=xe=null,ro=!1,pc=tf=0,so=null}function an(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ut===null?xe.memoizedState=ut=e:ut=ut.next=e,ut}function ct(){if(Be===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=ut===null?xe.memoizedState:ut.next;if(t!==null)ut=t,Be=e;else{if(e===null)throw xe.alternate===null?Error(q(467)):Error(q(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},ut===null?xe.memoizedState=ut=e:ut=ut.next=e}return ut}function xh(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kc(e){var t=pc;return pc+=1,so===null&&(so=[]),e=t4(so,e,t),t=xe,(ut===null?t.memoizedState:ut.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?I4:L4),e}function ph(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Kc(e);if(e.$$typeof===kz)return;if(e.$$typeof===Nr)return Ht(e)}throw Error(q(438,String(e)))}function Jm(e){var t=null,n=xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=xe.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(s){return s.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=xh(),xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=bz;return t.index++,n}function ls(e,t){return typeof t=="function"?t(e):t}function ld(e){var t=ct();return e0(t,Be,e)}function e0(e,t,n){var r=e.queue;if(r===null)throw Error(q(311));r.lastRenderedReducer=n;var s=e.baseQueue,a=r.pending;if(a!==null){if(s!==null){var i=s.next;s.next=a.next,a.next=i}t.baseQueue=s=a,r.pending=null}if(a=e.baseState,s===null)e.memoizedState=a;else{t=s.next;var o=i=null,l=null,c=t,d=!1;do{var f=c.lane&-536870913;if(f!==c.lane?(we&f)===f:(os&f)===f){var h=c.revertLane;if(h===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),f===ei&&(d=!0);else if((os&h)===h){c=c.next,h===ei&&(d=!0);continue}else f={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=f,i=a):l=l.next=f,xe.lanes|=h,na|=h;f=c.action,ni&&n(a,f),a=c.hasEagerState?c.eagerState:n(a,f)}else h={lane:f,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},l===null?(o=l=h,i=a):l=l.next=h,xe.lanes|=f,na|=f;c=c.next}while(c!==null&&c!==t);if(l===null?i=a:l.next=o,!Hn(a,e.memoizedState)&&(ft=!0,d&&(n=to,n!==null)))throw n;e.memoizedState=a,e.baseState=i,e.baseQueue=l,r.lastRenderedState=a}return s===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Dx(e){var t=ct(),n=t.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,a=t.memoizedState;if(s!==null){n.pending=null;var i=s=s.next;do a=e(a,i.action),i=i.next;while(i!==s);Hn(a,t.memoizedState)||(ft=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function c4(e,t,n){var r=xe,s=ct(),a=me;if(a){if(n===void 0)throw Error(q(407));n=n()}else n=t();var i=!Hn((Be||s).memoizedState,n);if(i&&(s.memoizedState=n,ft=!0),s=s.queue,t0(f4.bind(null,r,s,e),[e]),e=s.getSnapshot!==t||i||ut!==null&&(ut.memoizedState.tag&1)!==0,jo(e?9:8,{destroy:void 0},d4.bind(null,r,s,n,t),null),e){if(r.flags|=2048,Ue===null)throw Error(q(349));a||os&127||u4(r,t,n)}return n}function u4(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t=xh(),xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function d4(e,t,n,r){t.value=n,t.getSnapshot=r,h4(t)&&x4(e)}function f4(e,t,n){return n(function(){h4(t)&&x4(e)})}function h4(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Hn(e,n)}catch{return!0}}function x4(e){var t=pi(e,2);t!==null&&kn(t,e,2)}function l1(e){var t=an();if(typeof e=="function"){var n=e;if(e=n(),ni){_s(!0);try{n()}finally{_s(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function p4(e,t,n,r){return e.baseState=n,e0(e,Be,typeof r=="function"?r:ls)}function HR(e,t,n,r,s){if(mh(e))throw Error(q(485));if(e=t.action,e!==null){var a={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){a.listeners.push(i)}};ue.T!==null?n(!0):a.isTransition=!1,r(a),n=t.pending,n===null?(a.next=t.pending=a,g4(t,a)):(a.next=n.next,t.pending=n.next=a)}}function g4(e,t){var n=t.action,r=t.payload,s=e.state;if(t.isTransition){var a=ue.T,i={};i.types=a!==null?a.types:null,ue.T=i;try{var o=n(s,r),l=ue.S;l!==null&&l(i,o),ok(e,t,o)}catch(c){c1(e,t,c)}finally{a!==null&&i.types!==null&&(a.types=i.types),ue.T=a}}else try{a=n(s,r),ok(e,t,a)}catch(c){c1(e,t,c)}}function ok(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){lk(e,t,r)},function(r){return c1(e,t,r)}):lk(e,t,n)}function lk(e,t,n){t.status="fulfilled",t.value=n,m4(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,g4(e,n)))}function c1(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,m4(t),t=t.next;while(t!==r)}e.action=null}function m4(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function y4(e,t){return t}function ck(e,t){if(me){var n=Ue.formState;if(n!==null){e:{var r=xe;if(me){if(Ge){t:{for(var s=Ge,a=Kn;s.nodeType!==8;){if(!a){s=null;break t}if(s=Qn(s.nextSibling),s===null){s=null;break t}}a=s.data,s=a==="F!"||a==="F"?s:null}if(s){Ge=Qn(s.nextSibling),r=s.data==="F!";break e}}Js(r)}r=!1}r&&(t=n[0])}}return n=an(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:y4,lastRenderedState:t},n.queue=r,n=_4.bind(null,xe,r),r.dispatch=n,r=l1(!1),a=a0.bind(null,xe,!1,r.queue),r=an(),s={state:t,dispatch:null,action:e,pending:null},r.queue=s,n=HR.bind(null,xe,s,a,n),s.dispatch=n,r.memoizedState=e,[t,n,!1]}function uk(e){var t=ct();return b4(t,Be,e)}function b4(e,t,n){if(t=e0(e,t,y4)[0],e=ld(ls)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Kc(t)}catch(i){throw i===Go?hh:i}else r=t;t=ct();var s=t.queue,a=s.dispatch;return n!==t.memoizedState&&(xe.flags|=2048,jo(9,{destroy:void 0},qR.bind(null,s,n),null)),[r,a,e]}function qR(e,t){e.action=t}function dk(e){var t=ct(),n=Be;if(n!==null)return b4(t,n,e);ct(),t=t.memoizedState,n=ct();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function jo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=xe.updateQueue,t===null&&(t=xh(),xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function k4(){return ct().memoizedState}function cd(e,t,n,r){var s=an();xe.flags|=e,s.memoizedState=jo(1|t,{destroy:void 0},n,r===void 0?null:r)}function gh(e,t,n,r){var s=ct();r=r===void 0?null:r;var a=s.memoizedState.inst;Be!==null&&r!==null&&Zm(r,Be.memoizedState.deps)?s.memoizedState=jo(t,a,n,r):(xe.flags|=e,s.memoizedState=jo(1|t,a,n,r))}function fk(e,t){cd(8390656,8,e,t)}function t0(e,t){gh(2048,8,e,t)}function UR(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=xh(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function v4(e){var t=ct().memoizedState;return UR({ref:t,nextImpl:e}),function(){if(Me&2)throw Error(q(440));return t.impl.apply(void 0,arguments)}}function w4(e,t){return gh(4,2,e,t)}function S4(e,t){return gh(4,4,e,t)}function j4(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 E4(e,t,n){n=n!=null?n.concat([e]):null,gh(4,4,j4.bind(null,t,e),n)}function n0(){}function $4(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Zm(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function C4(e,t){var n=ct();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Zm(t,r[1]))return r[0];if(r=e(),ni){_s(!0);try{e()}finally{_s(!1)}}return n.memoizedState=[r,t],r}function r0(e,t,n){return n===void 0||os&1073741824&&!(we&261930)?e.memoizedState=t:(e.memoizedState=n,e=b6(),xe.lanes|=e,na|=e,n)}function T4(e,t,n,r){return Hn(n,t)?n:ea.current!==null?(e=r0(e,n,r),Hn(e,t)||(ft=!0),e):!(os&106)||os&1073741824&&!(we&261930)?(ft=!0,e.memoizedState=n):(e=b6(),xe.lanes|=e,na|=e,t)}function M4(e,t,n,r,s){var a=Ne.p;Ne.p=a!==0&&8>a?a:8;var i=ue.T,o={};o.types=i!==null?i.types:null,ue.T=o,a0(e,!1,t,n);try{var l=s(),c=ue.S;if(c!==null&&c(o,l),l!==null&&typeof l=="object"&&typeof l.then=="function"){var d=IR(l,r);Bl(e,t,d,Bn(e))}else Bl(e,t,r,Bn(e))}catch(f){Bl(e,t,{then:function(){},status:"rejected",reason:f},Bn())}finally{Ne.p=a,i!==null&&o.types!==null&&(i.types=o.types),ue.T=i}}function PR(){}function u1(e,t,n,r){if(e.tag!==5)throw Error(q(476));var s=N4(e).queue;M4(e,s,t,qa,n===null?PR:function(){return A4(e),n(r)})}function N4(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:qa,baseState:qa,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:qa},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function A4(e){var t=N4(e);t.next===null&&(t=e.alternate.memoizedState),Bl(e,t.next.queue,{},Bn())}function s0(){return Ht(Ao)}function z4(){return ct().memoizedState}function R4(){return ct().memoizedState}function FR(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Bn();e=Us(n);var r=Ps(t,e,n);r!==null&&(kn(r,t,n),Dl(r,t,n)),t={cache:Um()},e.payload=t;return}t=t.return}}function GR(e,t,n){var r=Bn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},mh(e)?O4(t,n):(n=Bm(e,t,n,r),n!==null&&(kn(n,e,r),D4(n,t,r)))}function _4(e,t,n){var r=Bn();Bl(e,t,n,r)}function Bl(e,t,n,r){var s={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(mh(e))O4(t,s);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(s.hasEagerState=!0,s.eagerState=o,Hn(o,i))return dh(e,t,s,0),Ue===null&&uh(),!1}catch{}finally{}if(n=Bm(e,t,s,r),n!==null)return kn(n,e,r),D4(n,t,r),!0}return!1}function a0(e,t,n,r){if(r={lane:2,revertLane:g0(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},mh(e)){if(t)throw Error(q(479))}else t=Bm(e,n,r,2),t!==null&&kn(t,e,2)}function mh(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function O4(e,t){ro=ef=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function D4(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,k5(e,n)}}var nf={readContext:Ht,use:ph,useCallback:at,useContext:at,useEffect:at,useImperativeHandle:at,useLayoutEffect:at,useInsertionEffect:at,useMemo:at,useReducer:at,useRef:at,useState:at,useDebugValue:at,useDeferredValue:at,useTransition:at,useSyncExternalStore:at,useId:at,useHostTransitionStatus:at,useFormState:at,useActionState:at,useOptimistic:at,useMemoCache:at,useCacheRefresh:at,useEffectEvent:at},I4={readContext:Ht,use:ph,useCallback:function(e,t){return an().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:fk,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,cd(4194308,4,j4.bind(null,t,e),n)},useLayoutEffect:function(e,t){return cd(4194308,4,e,t)},useInsertionEffect:function(e,t){cd(4,2,e,t)},useMemo:function(e,t){var n=an();t=t===void 0?null:t;var r=e();if(ni){_s(!0);try{e()}finally{_s(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=an();if(n!==void 0){var s=n(t);if(ni){_s(!0);try{n(t)}finally{_s(!1)}}}else s=t;return r.memoizedState=r.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},r.queue=e,e=e.dispatch=GR.bind(null,xe,e),[r.memoizedState,e]},useRef:function(e){var t=an();return e={current:e},t.memoizedState=e},useState:function(e){e=l1(e);var t=e.queue,n=_4.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:n0,useDeferredValue:function(e,t){var n=an();return r0(n,e,t)},useTransition:function(){var e=l1(!1);return e=M4.bind(null,xe,e.queue,!0,!1),an().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=xe,s=an();if(me){if(n===void 0)throw Error(q(407));n=n()}else{if(n=t(),Ue===null)throw Error(q(349));we&127||u4(r,t,n)}s.memoizedState=n;var a={value:n,getSnapshot:t};return s.queue=a,fk(f4.bind(null,r,a,e),[e]),r.flags|=2048,jo(9,{destroy:void 0},d4.bind(null,r,a,n,t),null),n},useId:function(){var e=an(),t=Ue.identifierPrefix;if(me){var n=Rr,r=zr;n=(r&~(1<<32-Ln(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=tf++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=LR++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:s0,useFormState:ck,useActionState:ck,useOptimistic:function(e){var t=an();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=a0.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Jm,useCacheRefresh:function(){return an().memoizedState=FR.bind(null,xe)},useEffectEvent:function(e){var t=an(),n={impl:e};return t.memoizedState=n,function(){if(Me&2)throw Error(q(440));return n.impl.apply(void 0,arguments)}}},L4={readContext:Ht,use:ph,useCallback:$4,useContext:Ht,useEffect:t0,useImperativeHandle:E4,useInsertionEffect:w4,useLayoutEffect:S4,useMemo:C4,useReducer:ld,useRef:k4,useState:function(){return ld(ls)},useDebugValue:n0,useDeferredValue:function(e,t){var n=ct();return T4(n,Be.memoizedState,e,t)},useTransition:function(){var e=ld(ls)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Kc(e),t]},useSyncExternalStore:c4,useId:z4,useHostTransitionStatus:s0,useFormState:uk,useActionState:uk,useOptimistic:function(e,t){var n=ct();return p4(n,Be,e,t)},useMemoCache:Jm,useCacheRefresh:R4,useEffectEvent:v4},VR={readContext:Ht,use:ph,useCallback:$4,useContext:Ht,useEffect:t0,useImperativeHandle:E4,useInsertionEffect:w4,useLayoutEffect:S4,useMemo:C4,useReducer:Dx,useRef:k4,useState:function(){return Dx(ls)},useDebugValue:n0,useDeferredValue:function(e,t){var n=ct();return Be===null?r0(n,e,t):T4(n,Be.memoizedState,e,t)},useTransition:function(){var e=Dx(ls)[0],t=ct().memoizedState;return[typeof e=="boolean"?e:Kc(e),t]},useSyncExternalStore:c4,useId:z4,useHostTransitionStatus:s0,useFormState:dk,useActionState:dk,useOptimistic:function(e,t){var n=ct();return Be!==null?p4(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Jm,useCacheRefresh:R4,useEffectEvent:v4};function Ix(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:Pe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var d1={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Bn(),s=Us(r);s.payload=t,n!=null&&(s.callback=n),t=Ps(e,s,r),t!==null&&(kn(t,e,r),Dl(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Bn(),s=Us(r);s.tag=1,s.payload=t,n!=null&&(s.callback=n),t=Ps(e,s,r),t!==null&&(kn(t,e,r),Dl(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Bn(),r=Us(n);r.tag=2,t!=null&&(r.callback=t),t=Ps(e,r,n),t!==null&&(kn(t,e,n),Dl(t,e,n))}};function hk(e,t,n,r,s,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,a,i):t.prototype&&t.prototype.isPureReactComponent?!uc(n,r)||!uc(s,a):!0}function xk(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&d1.enqueueReplaceState(t,t.state,null)}function ri(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=Pe({},n));for(var s in e)n[s]===void 0&&(n[s]=e[s])}return n}function B4(e){Vd(e)}function H4(e){console.error(e)}function q4(e){Vd(e)}function rf(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function pk(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function f1(e,t,n){return n=Us(n),n.tag=3,n.payload={element:null},n.callback=function(){rf(e,t)},n}function U4(e){return e=Us(e),e.tag=3,e}function P4(e,t,n,r){var s=n.type.getDerivedStateFromError;if(typeof s=="function"){var a=r.value;e.payload=function(){return s(a)},e.callback=function(){pk(t,n,r)}}var i=n.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){pk(t,n,r),typeof s!="function"&&(Vs===null?Vs=new Set([this]):Vs.add(this));var o=r.stack;this.componentDidCatch(r.value,{componentStack:o!==null?o:""})})}function XR(e,t,n,r,s){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Qa(t,n,s,!0),n=Ft.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Xt===null?ff():n.alternate===null&&it===0&&(it=3),n.flags&=-257,n.flags|=65536,n.lanes=s,r===Yd?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Fx(e,r,s)),!1;case 22:return n.flags|=65536,r===Yd?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Fx(e,r,s)),!1}throw Error(q(435,n.tag))}return Fx(e,r,s),ff(),!1}if(me)return t=Ft.current,t!==null?(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=s,r!==e1&&(e=Error(q(422),{cause:r}),fc(Wn(e,n)))):(r!==e1&&(t=Error(q(423),{cause:r}),fc(Wn(t,n))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,r=Wn(r,n),s=f1(e.stateNode,r,s),Ox(e,s),it!==4&&(it=2)),!1;var a=Error(q(520),{cause:r});if(a=Wn(a,n),Pl===null?Pl=[a]:Pl.push(a),it!==4&&(it=2),t===null)return!0;r=Wn(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=s&-s,n.lanes|=e,e=f1(n.stateNode,r,e),Ox(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"&&(Vs===null||!Vs.has(a))))return n.flags|=65536,s&=-s,n.lanes|=s,s=U4(s),P4(s,e,n,r),Ox(n,s),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var i0=Error(q(461)),ft=!1;function mt(e,t,n,r){t.child=e===null?r4(t,null,n,r):ti(t,e.child,n,r)}function gk(e,t,n,r,s){n=n.render;var a=t.ref;if("ref"in r){var i={};for(var o in r)o!=="ref"&&(i[o]=r[o])}else i=r;return Ja(t),r=Wm(e,t,n,i,a,s),o=Km(),e!==null&&!ft?(Ym(e,t,s),cs(e,t,s)):(me&&o&&fh(t),t.flags|=1,mt(e,t,r,s),t.child)}function mk(e,t,n,r,s){if(e===null){var a=n.type;return typeof a=="function"&&!Hm(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,F4(e,t,a,r,s)):(e=ad(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!l0(e,s)){var i=a.memoizedProps;if(n=n.compare,n=n!==null?n:uc,n(i,r)&&e.ref===t.ref)return cs(e,t,s)}return t.flags|=1,e=ts(a,r),e.ref=t.ref,e.return=t,t.child=e}function F4(e,t,n,r,s){if(e!==null){var a=e.memoizedProps;if(uc(a,r)&&e.ref===t.ref)if(ft=!1,t.pendingProps=r=a,l0(e,s))e.flags&131072&&(ft=!0);else return t.lanes=e.lanes,cs(e,t,s)}return h1(e,t,n,r,s)}function G4(e,t,n,r){var s=r.children,a=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if(t.flags&128){if(a=a!==null?a.baseLanes|n:n,e!==null){for(r=t.child=e.child,s=0;r!==null;)s=s|r.lanes|r.childLanes,r=r.sibling;r=s&~a}else r=0,t.child=null;return yk(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&od(t,a!==null?a.cachePool:null),a!==null?ik(t,a):i1(),i4(t);else return r=t.lanes=536870912,yk(e,t,a!==null?a.baseLanes|n:n,n,r)}else a!==null?(od(t,a.cachePool),ik(t,a),Gs(),t.memoizedState=null):(e!==null&&od(t,null),i1(),Gs());return mt(e,t,s,n),t.child}function Hl(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function yk(e,t,n,r,s){var a=Pm();return a=a===null?null:{parent:dt._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&od(t,null),i1(),i4(t),e!==null&&Qa(e,t,r,!0),t.childLanes=s,null}function ud(e,t){return t=yh({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bk(e,t,n){return ti(t,e.child,null,n),e=ud(t,t.pendingProps),e.flags|=2,An(t),t.memoizedState=null,e}function ZR(e,t,n){var r=t.pendingProps,s=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(me){if(r.mode==="hidden")return e=ud(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Hl(null,e);if(o1(t),(e=Ge)?(e=F6(e,Kn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qs!==null?{id:zr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},n=K5(e),n.return=t,t.child=n,At=t,Ge=null)):e=null,e===null)throw Js(t);return t.lanes=536870912,null}return ud(t,r)}var a=e.memoizedState;if(a!==null){var i=a.dehydrated;if(o1(t),s)if(t.flags&256)t.flags&=-257,t=bk(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(q(558));else if(ft||Qa(e,t,n,!1),s=(n&e.childLanes)!==0,ft||s){if(ea.current===null){if(r=Ue,r!==null&&(i=v5(r,n),i!==0&&i!==a.retryLane))throw a.retryLane=i,pi(e,i),kn(r,e,i),i0;ff()}t=bk(e,t,n)}else e=a.treeContext,Ge=Qn(i.nextSibling),At=t,me=!0,qs=null,Kn=!1,e!==null&&Q5(t,e),t=ud(t,r),t.flags|=134221824;return t}return e=ts(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Ri(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(q(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function h1(e,t,n,r,s){return Ja(t),n=Wm(e,t,n,r,void 0,s),r=Km(),e!==null&&!ft?(Ym(e,t,s),cs(e,t,s)):(me&&r&&fh(t),t.flags|=1,mt(e,t,n,s),t.child)}function kk(e,t,n,r,s,a){return Ja(t),t.updateQueue=null,n=l4(t,r,n,s),o4(e),r=Km(),e!==null&&!ft?(Ym(e,t,a),cs(e,t,a)):(me&&r&&fh(t),t.flags|=1,mt(e,t,n,a),t.child)}function vk(e,t,n,r,s){if(Ja(t),t.stateNode===null){var a=Gi,i=n.contextType;typeof i=="object"&&i!==null&&(a=Ht(i)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=d1,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Gm(t),i=n.contextType,a.context=typeof i=="object"&&i!==null?Ht(i):Gi,a.state=t.memoizedState,i=n.getDerivedStateFromProps,typeof i=="function"&&(Ix(t,n,i,r),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&&d1.enqueueReplaceState(a,a.state,null),Ll(t,r,a,s),Il(),a.state=t.memoizedState),typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var o=t.memoizedProps,l=ri(n,o);a.props=l;var c=a.context,d=n.contextType;i=Gi,typeof d=="object"&&d!==null&&(i=Ht(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||c!==i)&&xk(t,a,r,i),Ns=!1;var h=t.memoizedState;a.state=h,Ll(t,r,a,s),Il(),c=t.memoizedState,o||h!==c||Ns?(typeof f=="function"&&(Ix(t,n,f,r),c=t.memoizedState),(l=Ns||hk(t,n,l,r,h,c,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=r,t.memoizedState=c),a.props=r,a.state=c,a.context=i,r=l):(typeof a.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,s1(e,t),i=t.memoizedProps,d=ri(n,i),a.props=d,f=t.pendingProps,h=a.context,c=n.contextType,l=Gi,typeof c=="object"&&c!==null&&(l=Ht(c)),o=n.getDerivedStateFromProps,(c=typeof o=="function"||typeof a.getSnapshotBeforeUpdate=="function")||typeof a.UNSAFE_componentWillReceiveProps!="function"&&typeof a.componentWillReceiveProps!="function"||(i!==f||h!==l)&&xk(t,a,r,l),Ns=!1,h=t.memoizedState,a.state=h,Ll(t,r,a,s),Il();var p=t.memoizedState;i!==f||h!==p||Ns||e!==null&&e.dependencies!==null&&Kd(e.dependencies)?(typeof o=="function"&&(Ix(t,n,o,r),p=t.memoizedState),(d=Ns||hk(t,n,d,r,h,p,l)||e!==null&&e.dependencies!==null&&Kd(e.dependencies))?(c||typeof a.UNSAFE_componentWillUpdate!="function"&&typeof a.componentWillUpdate!="function"||(typeof a.componentWillUpdate=="function"&&a.componentWillUpdate(r,p,l),typeof a.UNSAFE_componentWillUpdate=="function"&&a.UNSAFE_componentWillUpdate(r,p,l)),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=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=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),r=!1)}return a=r,Ri(e,t),r=(t.flags&128)!==0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:a.render(),t.flags|=1,e!==null&&r?(t.child=ti(t,e.child,null,s),t.child=ti(t,null,n,s)):mt(e,t,n,s),t.memoizedState=a.state,e=t.child):e=cs(e,t,s),e}function wk(e,t,n,r){return Ya(),t.flags|=256,mt(e,t,n,r),t.child}var x1={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function p1(e){return{baseLanes:e,cachePool:e4()}}function g1(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Rn),e}function V4(e,t,n){var r=t.pendingProps,s=!1,a=(t.flags&128)!==0,i;if((i=a)||(i=e!==null&&e.memoizedState===null?!1:(Ut.current&2)!==0),i&&(s=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(me){if(s?Fs(t):Gs(),(e=Ge)?(e=F6(e,Kn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Qs!==null?{id:zr,overflow:Rr}:null,retryLane:536870912,hydrationErrors:null},n=K5(e),n.return=t,t.child=n,At=t,Ge=null)):e=null,e===null)throw Js(t);return k0(e)?t.lanes=32:t.lanes=536870912,null}return a=r.children,r=r.fallback,s?(Gs(),s=t.mode,a=yh({mode:"hidden",children:a},s),r=Ua(r,s,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=p1(n),r.childLanes=g1(e,i,n),t.memoizedState=x1,Hl(null,r)):(Fs(t),o0(t,a))}var o=e.memoizedState;if(o!==null){var l=o.dehydrated;if(l!==null)return WR(e,t,a,i,r,l,o,n)}return s?(Gs(),s=r.fallback,a=t.mode,o=e.child,l=o.sibling,r=ts(o,{mode:"hidden",children:r.children}),r.subtreeFlags=o.subtreeFlags&1206910976,l!==null?s=ts(l,s):(s=Ua(s,a,n,null),s.flags|=2),s.return=t,r.return=t,r.sibling=s,t.child=r,Hl(null,r),r=t.child,s=e.child.memoizedState,s===null?s=p1(n):(a=s.cachePool,a!==null?(o=dt._currentValue,a=a.parent!==o?{parent:o,pool:o}:a):a=e4(),s={baseLanes:s.baseLanes|n,cachePool:a}),r.memoizedState=s,r.childLanes=g1(e,i,n),t.memoizedState=x1,Hl(e.child,r)):(Fs(t),n=e.child,e=n.sibling,n=ts(n,{mode:"visible",children:r.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 o0(e,t){return t=yh({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function yh(e,t){return e=yn(22,e,null,t),e.lanes=0,e}function zu(e,t,n){return ti(t,e.child,null,n),e=o0(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function WR(e,t,n,r,s,a,i,o){if(n)return t.flags&256?(Fs(t),t.flags&=-257,zu(e,t,o)):t.memoizedState!==null?(Gs(),t.child=e.child,t.flags|=128,null):(Gs(),a=s.fallback,i=t.mode,s=yh({mode:"visible",children:s.children},i),a=Ua(a,i,o,null),a.flags|=2,s.return=t,a.return=t,s.sibling=a,t.child=s,ti(t,e.child,null,o),s=t.child,s.memoizedState=p1(o),s.childLanes=g1(e,r,o),t.memoizedState=x1,Hl(null,s));if(Fs(t),k0(a)){if(r=a.nextSibling&&a.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==""&&(s=Error(q(419)),s.stack="",s.digest=r,fc({value:s,source:null,stack:null})),zu(e,t,o)}if(ft||Qa(e,t,o,!1),r=(o&e.childLanes)!==0,ft||r){if(ea.current!==null)return zu(e,t,o);if(r=Ue,r!==null&&(s=v5(r,o),s!==0&&s!==i.retryLane))throw i.retryLane=s,pi(e,s),kn(r,e,s),i0;return q1(a)||ff(),zu(e,t,o)}return q1(a)?(t.flags|=192,t.child=e.child,null):(e=i.treeContext,Ge=Qn(a.nextSibling),At=t,me=!0,qs=null,Kn=!1,e!==null&&Q5(t,e),t=o0(t,s.children),t.flags|=134221824,t)}function Sk(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),id(e.return,t,n)}function jk(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Jd(n)===null&&(t=e),e=e.sibling}return t}function Ru(e,t,n,r,s,a){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s,treeForkCount:a}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s,i.treeForkCount=a)}function Lx(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 m1(e,t,n){var r=t.pendingProps,s=r.revealOrder,a=r.tail;r=r.children;var i=Ut.current;if(t.flags&128)return xc(t,i),null;var o=(i&2)!==0;if(o?(i=i&1|2,t.flags|=128):i&=1,xc(t,i),s==="backwards"&&e!==null?(Lx(e),mt(e,t,r,n),Lx(e)):mt(e,t,r,n),r=me?dc:0,!o&&e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sk(e,n,t);else if(e.tag===19)Sk(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(s){case"backwards":n=jk(t.child),n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null,Lx(t)),Ru(t,!0,s,null,a,r);break;case"unstable_legacy-backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Jd(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}Ru(t,!0,n,null,a,r);break;case"together":Ru(t,!1,null,null,void 0,r);break;case"independent":t.memoizedState=null;break;default:n=jk(t.child),n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),Ru(t,!1,s,n,a,r)}return t.child}function Ek(e,t,n){var r=t.pendingProps;return Ds(t,t.type,r.value),mt(e,t,r.children,n),t.child}function cs(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),na|=t.lanes,!(n&t.childLanes))if(e!==null){if(Qa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(q(153));if(t.child!==null){for(e=t.child,n=ts(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ts(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function l0(e,t){return e.lanes&t?!0:(e=e.dependencies,!!(e!==null&&Kd(e)))}function KR(e,t,n){switch(t.tag){case 3:Ud(t,t.stateNode.containerInfo),Ds(t,dt,e.memoizedState.cache),Ya();break;case 27:case 5:Fp(t);break;case 4:Ud(t,t.stateNode.containerInfo);break;case 10:Ds(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,o1(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Fs(t),t.flags|=128,null;r=Qa(e,t,n,!1);var s=t.child.childLanes;return r||n&s?V4(e,t,n):(Fs(t),e=cs(e,t,n),e!==null?e.sibling:null)}Fs(t);break;case 19:if(t.flags&128)return m1(e,t,n);if(s=(e.flags&128)!==0,r=(n&t.childLanes)!==0,r||(Qa(e,t,n,!1),r=(n&t.childLanes)!==0),s){if(r)return m1(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),xc(t,Ut.current),r)break;return null;case 22:return t.lanes=0,G4(e,t,n,t.pendingProps);case 24:Ds(t,dt,e.memoizedState.cache)}return cs(e,t,n)}function X4(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)ft=!0;else{if(!l0(e,n)&&!(t.flags&128))return ft=!1,KR(e,t,n);ft=!!(e.flags&131072)}else ft=!1,me&&t.flags&1048576&&Y5(t,dc,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=ka(t.elementType),t.type=e,typeof e=="function")Hm(e)?(r=ri(e,r),t.tag=1,t=vk(null,t,e,r,n)):(t.tag=0,t=h1(null,t,e,r,n));else{if(e!=null){var s=e.$$typeof;if(s===Cm){t.tag=11,t=gk(null,t,e,r,n);break e}else if(s===Tm){t.tag=14,t=mk(null,t,e,r,n);break e}else if(s===Nr){t.tag=10,t.type=e,t=Ek(null,t,n);break e}}throw t=Up(e)||e,Error(q(306,t,""))}}return t;case 0:return h1(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,s=ri(r,t.pendingProps),vk(e,t,r,s,n);case 3:e:{if(Ud(t,t.stateNode.containerInfo),e===null)throw Error(q(387));r=t.pendingProps;var a=t.memoizedState;s=a.element,s1(e,t),Ll(t,r,null,n);var i=t.memoizedState;if(r=i.cache,Ds(t,dt,r),r!==a.cache&&n1(t,[dt],n,!0),Il(),r=i.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=wk(e,t,r,n);break e}else if(r!==s){s=Wn(Error(q(424)),t),fc(s),t=wk(e,t,r,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ge=Qn(e.firstChild),At=t,me=!0,qs=null,Kn=!0,n=r4(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(Ya(),r===s){t=cs(e,t,n);break e}mt(e,t,r,n)}t=t.child}return t;case 26:return Ri(e,t),e===null?(n=Kk(t.type,null,t.pendingProps,null))?t.memoizedState=n:me||(t.stateNode=D6(t.type,t.pendingProps,Hs.current,t)):t.memoizedState=Kk(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Fp(t),e===null&&me&&(r=t.stateNode=G6(t.type,t.pendingProps,Hs.current),At=t,Kn=!0,s=Ge,oa(t.type)?(U1=s,Ge=Qn(r.firstChild)):Ge=s),mt(e,t,t.pendingProps.children,n),Ri(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&me&&((s=r=Ge)&&(r=F_(r,t.type,t.pendingProps,Kn),r!==null?(t.stateNode=r,At=t,Ge=Qn(r.firstChild),Kn=!1,s=!0):s=!1),s||Js(t)),Fp(t),s=t.type,a=t.pendingProps,i=e!==null?e.memoizedProps:null,r=a.children,L1(s,a)?r=null:i!==null&&L1(s,i)&&(t.flags|=32),t.memoizedState!==null&&(s=Wm(e,t,BR,null,null,n),Ao._currentValue=s),Ri(e,t),mt(e,t,r,n),t.child;case 6:return e===null&&me&&((e=n=Ge)&&(n=G_(n,t.pendingProps,Kn),n!==null?(t.stateNode=n,At=t,Ge=null,e=!0):e=!1),e||Js(t)),null;case 13:return V4(e,t,n);case 4:return Ud(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ti(t,null,r,n):mt(e,t,r,n),t.child;case 11:return gk(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Ri(e,t),mt(e,t,r,n),t.child;case 8:return mt(e,t,t.pendingProps.children,n),t.child;case 12:return mt(e,t,t.pendingProps.children,n),t.child;case 10:return Ek(e,t,n);case 9:return s=t.type._context,r=t.pendingProps.children,Ja(t),s=Ht(s),r=r(s),t.flags|=1,mt(e,t,r,n),t.child;case 14:return mk(e,t,t.type,t.pendingProps,n);case 15:return F4(e,t,t.type,t.pendingProps,n);case 19:return m1(e,t,n);case 31:return ZR(e,t,n);case 22:return G4(e,t,n,t.pendingProps);case 24:return Ja(t),r=Ht(dt),e===null?(s=Pm(),s===null&&(s=Ue,a=Um(),s.pooledCache=a,a.refCount++,a!==null&&(s.pooledCacheLanes|=n),s=a),t.memoizedState={parent:r,cache:s},Gm(t),Ds(t,dt,s)):(e.lanes&n&&(s1(e,t),Ll(t,null,null,n),Il()),s=e.memoizedState,a=t.memoizedState,s.parent!==r?(s={parent:r,cache:r},t.memoizedState=s,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=s),Ds(t,dt,r)):(r=a.cache,Ds(t,dt,r),r!==s.cache&&n1(t,[dt],n,!0))),mt(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!=="auto"?t.flags|=e===null?18882560:18874368:me&&fh(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Ri(e,t),mt(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(q(156,t.tag))}function Ur(e){e.flags|=4}function Bx(e,t,n,r,s){var a;if((a=(e.mode&32)!==0)&&(a=n===null?Jk(t,r):Jk(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(w6())e.flags|=8192;else throw Fa=Yd,Fm}else e.flags&=-16777217}function $k(e,t){if(t.type!=="stylesheet"||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!W6(t))if(w6())e.flags|=8192;else throw Fa=Yd,Fm}function _u(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?y5():536870912,e.lanes|=t,Eo|=t)}function hl(e,t){if(!me)switch(e.tailMode){case"visible":break;case"collapsed":for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;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 Fe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&1206910976,r|=s.flags&1206910976,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function YR(e,t,n){var r=t.pendingProps;switch(qm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Fe(t),null;case 1:return Fe(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ns(dt),vo(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ci(t)?Ur(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_x())),Fe(t),null;case 26:var s=t.type,a=t.memoizedState;return e===null?(Ur(t),a!==null?(Fe(t),$k(t,a)):(Fe(t),Bx(t,s,null,r,n))):a?a!==e.memoizedState?(Ur(t),Fe(t),$k(t,a)):(Fe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&Ur(t),Fe(t),Bx(t,s,e,r,n)),null;case 27:if(Pd(t),n=Hs.current,s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ur(t);else{if(!r){if(t.stateNode===null)throw Error(q(166));return Fe(t),t.subtreeFlags&=-33554433,null}e=_r.current,Ci(t)?Jb(t):(e=G6(s,r,n),t.stateNode=e,Ur(t))}return Fe(t),t.subtreeFlags&=-33554433,null;case 5:if(Pd(t),s=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ur(t);else{if(!r){if(t.stateNode===null)throw Error(q(166));return Fe(t),t.subtreeFlags&=-33554433,null}if(a=_r.current,Ci(t))Jb(t);else{var i=yc(Hs.current);switch(a){case 1:a=i.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:a=i.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":a=i.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":a=i.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":a=i.createElement("div"),a.innerHTML="<script><\/script>",a=a.removeChild(a.firstChild);break;case"select":a=typeof r.is=="string"?i.createElement("select",{is:r.is}):i.createElement("select"),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is=="string"?i.createElement(s,{is:r.is}):i.createElement(s)}}a[Bt]=t,a[wn]=r;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(Pt(a,s,r),s){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Ur(t)}}return Fe(t),t.subtreeFlags&=-33554433,Bx(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ur(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(q(166));if(e=Hs.current,Ci(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,s=At,s!==null)switch(s.tag){case 27:case 5:r=s.memoizedProps}e[Bt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||_6(e.nodeValue,n)),e||Js(t,!0)}else e=yc(e).createTextNode(r),e[Bt]=t,t.stateNode=e}return Fe(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ci(t),n!==null){if(e===null){if(!r)throw Error(q(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(q(557));e[Bt]=t}else Ya(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fe(t),e=!1}else n=_x(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(An(t),t):(An(t),null);if(t.flags&128)throw Error(q(558))}return Fe(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=Ci(t),r!==null&&r.dehydrated!==null){if(e===null){if(!s)throw Error(q(318));if(s=t.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(q(317));s[Bt]=t}else Ya(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Fe(t),s=!1}else s=_x(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return t.flags&256?(An(t),t):(An(t),null)}return An(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,s=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(s=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==s&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),_u(t,t.updateQueue),Fe(t),null);case 4:return vo(),e===null&&m0(t.stateNode.containerInfo),t.flags|=67108864,Fe(t),null;case 10:return ns(t.type),Fe(t),null;case 19:if(Xm(t),r=t.memoizedState,r===null)return Fe(t),null;if(s=(t.flags&128)!==0,a=r.rendering,a===null)if(s)hl(r,!1);else{if(it!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=Jd(e),a!==null){for(t.flags|=128,hl(r,!1),e=a.updateQueue,t.updateQueue=e,_u(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)W5(n,e),n=n.sibling;return xc(t,Ut.current&1|2),me&&Fr(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Dn()>uf&&(t.flags|=128,s=!0,hl(r,!1),t.lanes=4194304)}else{if(!s)if(e=Jd(a),e!==null){if(t.flags|=128,s=!0,e=e.updateQueue,t.updateQueue=e,_u(t,e),hl(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!a.alternate&&!me)return Fe(t),null}else 2*Dn()-r.renderingStartTime>uf&&n!==536870912&&(t.flags|=128,s=!0,hl(r,!1),t.lanes=4194304);r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e!==null?e.sibling=a:t.child=a,r.last=a)}if(r.tail!==null){e=r.tail;e:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break e}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Dn(),e.sibling=null,a=Ut.current,a=s?a&1|2:a&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!n||me?xc(t,a):(n=a,Xe(Ft,t),Xe(Ut,n),Xt===null&&(Xt=t)),me&&Fr(t,r.treeForkCount),e}return Fe(t),null;case 22:case 23:return An(t),Vm(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Fe(t),t.subtreeFlags&6&&(t.flags|=8192)):Fe(t),n=t.updateQueue,n!==null&&_u(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&qt(Pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ns(dt),Fe(t),null;case 25:return null;case 30:return t.flags|=33554432,Fe(t),null}throw Error(q(156,t.tag))}function QR(e,t){switch(qm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ns(dt),vo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Pd(t),null;case 31:if(t.memoizedState!==null){if(An(t),t.alternate===null)throw Error(q(340));Ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(An(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(q(340));Ya()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Xm(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 vo(),null;case 10:return ns(t.type),null;case 22:case 23:return An(t),Vm(),e!==null&&qt(Pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ns(dt),null;case 25:return null;default:return null}}function Z4(e,t){switch(qm(t),t.tag){case 3:ns(dt),vo();break;case 26:case 27:case 5:Pd(t);break;case 4:vo();break;case 31:t.memoizedState!==null&&An(t);break;case 13:An(t);break;case 19:Xm(t);break;case 10:ns(t.type);break;case 22:case 23:An(t),Vm(),e!==null&&qt(Pa);break;case 24:ns(dt)}}function Yc(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var s=r.next;n=s;do{if((n.tag&e)===e){r=void 0;var a=n.create,i=n.inst;r=a(),i.destroy=r}n=n.next}while(n!==s)}}catch(o){De(t,t.return,o)}}function ta(e,t,n){try{var r=t.updateQueue,s=r!==null?r.lastEffect:null;if(s!==null){var a=s.next;r=a;do{if((r.tag&e)===e){var i=r.inst,o=i.destroy;if(o!==void 0){i.destroy=void 0,s=t;var l=n,c=o;try{c()}catch(d){De(s,l,d)}}}r=r.next}while(r!==a)}}catch(d){De(t,t.return,d)}}function W4(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{a4(t,n)}catch(r){De(e,e.return,r)}}}function K4(e,t,n){n.props=ri(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){De(e,t,r)}}function Tr(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var s=e.stateNode,a=is(e.memoizedProps,s);(s.ref===null||s.ref.name!==a)&&(s.ref=B6(a)),r=s.ref;break;case 7:if(e.stateNode===null){var i=new Un(e);vn(e.child,!1,U_,i,void 0,void 0),e.stateNode=i}r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(o){De(e,t,o)}}function Lt(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(s){De(e,t,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(s){De(e,t,s)}else n.current=null}function sf(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++)P6(e.stateNode,t[n])}function Ck(e){for(var t=e.return;t!==null&&(u0(t)&&P6(e.stateNode,t.stateNode),!c0(t));)t=t.return}function ql(e){for(var t=e.return;t!==null&&(u0(t)&&P_(e.stateNode,t.stateNode),!c0(t));)t=t.return}function c0(e){return e.tag===5||e.tag===3||e.tag===27}function u0(e){return e&&e.tag===7&&e.stateNode!==null}function y1(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(s){De(e,e.return,s)}}function Hx(e,t,n){try{var r=e.stateNode;j_(r,e.type,n,t),r[wn]=t}catch(s){De(e,e.return,s)}}function Y4(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&oa(e.type)||e.tag===4}function qx(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Y4(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&&oa(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 b1(e,t,n,r){var s=e.tag;if(s===5||s===6)s=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(s,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(s),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Ar)),sf(e,r),Te=!0;else if(s!==4&&(s===27&&(sf(e,r),r=null,oa(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(b1(e,t,n,r),e=e.sibling;e!==null;)b1(e,t,n,r),e=e.sibling}function af(e,t,n,r){var s=e.tag;if(s===5||s===6)s=e.stateNode,t?n.insertBefore(s,t):n.appendChild(s),sf(e,r),Te=!0;else if(s!==4&&(s===27&&(sf(e,r),r=null,oa(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(af(e,t,n,r),e=e.sibling;e!==null;)af(e,t,n,r),e=e.sibling}function Q4(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,s=t.attributes;s.length;)t.removeAttributeNode(s[0]);Pt(t,r,n),t[Bt]=e,t[wn]=n}catch(a){De(e,e.return,a)}}var of=!1,zn=null;function Tk(e){(e.tag===30||e.subtreeFlags&33554432)&&(of=!0)}var Mr=null;function Mk(){var e=Mr;return Mr=null,e}var mn=0;function Vo(e,t,n,r,s){return mn=0,J4(e.child,t,n,r,s)}function J4(e,t,n,r,s){for(var a=!1;e!==null;){if(e.tag===5){var i=e.stateNode;if(r!==null){var o=B1(i);r.push(o),o.view&&(a=!0)}else a||B1(i).view&&(a=!0);of=!0,I6(i,mn===0?t:t+"_"+mn,n),mn++}else(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&s||J4(e.child,t,n,r,s)&&(a=!0));e=e.sibling}return a}function Dr(e,t){for(;e!==null;)e.tag===5?L6(e.stateNode,e.memoizedProps):(e.tag!==22||e.memoizedState===null)&&(e.tag===30&&t||Dr(e.child,t)),e=e.sibling}function dd(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(dd(e),e.tag===30&&(e.flags&18874368)!==0&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name==="auto")throw Error(q(544));var n=t.name;t=hs(t.default,t.share),t!=="none"&&(Vo(e,n,t,null,!1)||Dr(e.child,!1))}e=e.sibling}}function k1(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,s=is(r,n),a=hs(r.default,n.paired?r.share:r.enter);a!=="none"?Vo(e,s,a,null,!1)?(dd(e),n.paired||t||$o(e,r.onEnter)):Dr(e.child,!1):dd(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)k1(e,t),e=e.sibling;else dd(e)}function v1(e){if(zn!==null&&zn.size!==0){var t=zn;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,r=n.name;if(r!=null&&r!=="auto"){var s=t.get(r);if(s!==void 0){var a=hs(n.default,n.share);if(a!=="none"&&(Vo(e,r,a,null,!1)?(a=e.stateNode,s.paired=a,a.paired=s,$o(e,n.onShare)):Dr(e.child,!1)),t.delete(r),t.size===0)break}}}v1(e)}e=e.sibling}}}function w1(e){if(e.tag===30){var t=e.memoizedProps,n=is(t,e.stateNode),r=zn!==null?zn.get(n):void 0,s=hs(t.default,r!==void 0?t.share:t.exit);s!=="none"&&(Vo(e,n,s,null,!1)?r!==void 0?(s=e.stateNode,r.paired=s,s.paired=r,zn.delete(n),$o(e,t.onShare)):$o(e,t.onExit):Dr(e.child,!1)),zn!==null&&v1(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)w1(e),e=e.sibling;else zn!==null&&v1(e)}function e6(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=is(t,e.stateNode);t=hs(t.default,t.update),e.flags&=-5,t!=="none"&&Vo(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&e6(e);e=e.sibling}}function S1(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,Dr(e.child,!1))}S1(e)}e=e.sibling}}function fd(e){if(e.tag===30)e.stateNode.paired=null,Dr(e.child,!1),S1(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)fd(e),e=e.sibling;else S1(e)}function t6(e){for(e=e.child;e!==null;)e.tag===30?Dr(e.child,!1):e.subtreeFlags&33554432&&t6(e),e=e.sibling}function d0(e,t,n,r,s,a,i){for(var o=!1;t!==null;){if(t.tag===5){var l=t.stateNode;if(a!==null&&mn<a.length){var c=a[mn],d=B1(l);(c.view||d.view)&&(o=!0);var f;if(f=(e.flags&4)===0)if(d.clip)f=!0;else{f=c.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=!c.abs:(c=c.rect,d=d.rect,d=c.height!==d.height||c.width!==d.width),d&&(e.flags|=32)}else e.flags|=32;e.flags&4&&I6(l,mn===0?n:n+"_"+mn,s),o&&e.flags&4||(Mr===null&&(Mr=[]),Mr.push(l,mn===0?r:r+"_"+mn,t.memoizedProps)),mn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&i?e.flags|=t.flags&32:d0(e,t.child,n,r,s,a,i)&&(o=!0));t=t.sibling}return o}function n6(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,s=is(n,r),a=hs(n.default,n.update),i;i=e.memoizedState,e.memoizedState=null,r=e;var o=e.child;mn=0,s=d0(r,o,s,s,a,i,!1),e.flags&4&&s&&$o(e,n.onUpdate)}else e.subtreeFlags&33554432&&n6(e);e=e.sibling}}var Ct=!1,ze=!1,wr=!1,Ux=!1,Nk=typeof WeakSet=="function"?WeakSet:Set,Tt=null,Sr=!1,$l=!1,lf=!1,j1=!1;function JR(e,t,n){if(e=e.containerInfo,D1=zo,e=q5(e),Im(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var s=r.getSelection&&r.getSelection();if(s&&s.rangeCount!==0){r=s.anchorNode;var a=s.anchorOffset,i=s.focusNode;s=s.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var o=0,l=-1,c=-1,d=0,f=0,h=e,p=null;t:for(;;){for(var m;h!==r||a!==0&&h.nodeType!==3||(l=o+a),h!==i||s!==0&&h.nodeType!==3||(c=o+s),h.nodeType===3&&(o+=h.nodeValue.length),(m=h.firstChild)!==null;)p=h,h=m;for(;;){if(h===e)break t;if(p===r&&++d===a&&(l=o),p===i&&++f===s&&(c=o),(m=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=m}r=l===-1||c===-1?null:{start:l,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(I1={focusedElem:e,selectionRange:r},zo=!1,n=(n&335544064)===n,Tt=t,t=n?9270:1024;Tt!==null;){if(e=Tt,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&w1(r[a]);if(e.alternate===null&&e.flags&2)n&&Tk(e),Ou(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&w1(r),Ou(n);continue}else if(r!==null&&r.memoizedState!==null){n&&Tk(e),Ou(n);continue}}r=e.child,e.subtreeFlags&t&&r!==null?(r.return=e,Tt=r):(n&&e6(e),Ou(n))}}zn=null}function Ou(e){for(;Tt!==null;){var t=Tt,n=e,r=t.alternate,s=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(s&1024&&r!==null){n=void 0,s=r.memoizedProps,r=r.memoizedState;var a=t.stateNode;try{var i=ri(t.type,s);n=a.getSnapshotBeforeUpdate(i,r),a.__reactInternalSnapshotBeforeUpdate=n}catch(o){De(t,t.return,o)}}break;case 3:if(s&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)H1(r);else if(n===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":H1(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=is(r.memoizedProps,r.stateNode),s=t.memoizedProps,s=hs(s.default,s.update),s!=="none"&&Vo(r,n,s,r.memoizedState=[],!0));break;default:if(s&1024)throw Error(q(163))}if(r=t.sibling,r!==null){r.return=t.return,Tt=r;break}Tt=t.return}}function r6(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:jr(e,n),r&4&&Yc(5,n);break;case 1:if(jr(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(i){De(n,n.return,i)}else{var s=ri(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(s,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){De(n,n.return,i)}}r&64&&W4(n),r&512&&Tr(n,n.return);break;case 3:if(jr(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{a4(e,t)}catch(i){De(n,n.return,i)}}break;case 27:t===null&&r&4&&Q4(n);case 26:case 5:jr(e,n),t===null&&r&4&&y1(n),r&512&&Tr(n,n.return);break;case 12:jr(e,n);break;case 31:jr(e,n),r&4&&o6(e,n);break;case 13:jr(e,n),r&4&&l6(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=d_.bind(null,n),V_(e,n))));break;case 22:if(r=n.memoizedState!==null||Ct,!r){var a=t!==null&&t.memoizedState!==null||ze;t=Ct,s=ze,Ct=r,(ze=a)&&!s?(r=2,n.subtreeFlags&8772&&(r|=1),cr(e,n,r)):jr(e,n),Ct=t,ze=s}break;case 30:jr(e,n),r&512&&Tr(n,n.return);break;case 7:r&512&&Tr(n,n.return);default:jr(e,n)}}function E1(e,t){for(e=e.child;e!==null;)s6(e,t),e=e.sibling}function s6(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"}else{var s=e.stateNode,a=e.memoizedProps.style,i=a!=null&&a.hasOwnProperty("display")?a.display:null;s.style.display=i==null||typeof i=="boolean"?"":(""+i).trim()}}catch(l){De(e,e.return,l)}$1(e,t);break;case 6:try{e.stateNode.nodeValue=t?"":e.memoizedProps,Te=!0}catch(l){De(e,e.return,l)}break;case 18:try{var o=e.stateNode;t?Fk(o,!0):Fk(e.stateNode,!1)}catch(l){De(e,e.return,l)}break;case 22:case 23:e.memoizedState===null&&E1(e,t);break;default:E1(e,t)}}function $1(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){e:{var n=e,r=t;switch(n.tag){case 4:s6(n,r);break e;case 22:n.memoizedState===null&&$1(n,r);break e;default:$1(n,r)}}e=e.sibling}}function a6(e){var t=e.alternate;t!==null&&(e.alternate=null,a6(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ih(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 Ke=null,xn=!1;function or(e,t,n){for(n=n.child;n!==null;)i6(e,t,n),n=n.sibling}function i6(e,t,n){if(In&&typeof In.onCommitFiberUnmount=="function")try{In.onCommitFiberUnmount(Fc,n)}catch{}switch(n.tag){case 26:ze||Lt(n,t),or(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!ze&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ze||Lt(n,t),ql(n);var r=Ke,s=xn;oa(n.type)&&(Ke=n.stateNode,xn=!1),or(e,t,n),V6(n.stateNode,n.type,n.memoizedProps),Ke=r,xn=s;break;case 5:ze||Lt(n,t),ql(n);case 6:if(n.tag===6&&ql(n),r=Ke,s=xn,Ke=null,or(e,t,n),Ke=r,xn=s,Ke!==null)if(xn)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode),Te=!0}catch(a){De(n,t,a)}else try{Ke.removeChild(n.stateNode),Te=!0}catch(a){De(n,t,a)}break;case 18:Ke!==null&&(xn?(e=Ke,Pk(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ro(e)):Pk(Ke,n.stateNode));break;case 4:r=Ke,s=xn,Ke=n.stateNode.containerInfo,xn=!0,or(e,t,n),Ke=r,xn=s;break;case 0:case 11:case 14:case 15:ta(2,n,t),ze||ta(4,n,t),or(e,t,n);break;case 1:ze||(Lt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&K4(n,t,r)),or(e,t,n);break;case 21:or(e,t,n);break;case 22:ze=(r=ze)||n.memoizedState!==null,or(e,t,n),ze=r;break;case 30:Lt(n,t),or(e,t,n);break;case 7:ze||Lt(n,t),or(e,t,n);break;default:or(e,t,n)}}function o6(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ro(e)}catch(n){De(t,t.return,n)}}}function l6(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ro(e)}catch(n){De(t,t.return,n)}}function e_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Nk),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Nk),t;default:throw Error(q(435,e.tag))}}function Du(e,t){var n=e_(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var s=f_.bind(null,e,r);r.then(s,s)}})}function nn(e,t,n){var r=t.deletions;if(r!==null)for(var s=0;s<r.length;s++){var a=r[s],i=e,o=t,l=o;e:for(;l!==null;){switch(l.tag){case 27:if(oa(l.type)){Ke=l.stateNode,xn=!1;break e}break;case 5:Ke=l.stateNode,xn=!1;break e;case 3:case 4:Ke=l.stateNode.containerInfo,xn=!0;break e}l=l.return}if(Ke===null)throw Error(q(160));i6(i,o,a),Ke=null,xn=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)c6(t,e,n),t=t.sibling}var hr=null;function c6(e,t,n){var r=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(s&4&&(r=e.updateQueue,r=r!==null?r.events:null,r!==null))for(var a=0;a<r.length;a++){var i=r[a];i.ref.impl=i.nextImpl}nn(t,e,n),rn(e),s&4&&(ta(3,e,e.return),Yc(3,e),ta(5,e,e.return));break;case 1:nn(t,e,n),rn(e),s&512&&(ze||r===null||Lt(r,r.return)),s&64&&Ct&&(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=hr,nn(t,e,n),rn(e),s&512&&(ze||r===null||Lt(r,r.return)),s&4)if(s=r!==null?r.memoizedState:null,n=e.memoizedState,r===null)if(n===null)if(e.stateNode===null)if(Ct)e.stateNode=D6(e.type,e.memoizedProps,t.containerInfo,e);else{e:{t=e.type,n=e.memoizedProps,s=a.ownerDocument||a;t:switch(t){case"title":r=s.getElementsByTagName("title")[0],(!r||r[Xc]||r[Bt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=s.createElement(t),s.head.insertBefore(r,s.querySelector("head > title"))),Pt(r,t,n),r[Bt]=e,Mt(r),t=r;break e;case"link":if(a=Qk("link","href",s).get(t+(n.href||""))){for(i=0;i<a.length;i++)if(r=a[i],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(i,1);break t}}r=s.createElement(t),Pt(r,t,n),s.head.appendChild(r);break;case"meta":if(a=Qk("meta","content",s).get(t+(n.content||""))){for(i=0;i<a.length;i++)if(r=a[i],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(i,1);break t}}r=s.createElement(t),Pt(r,t,n),s.head.appendChild(r);break;default:throw Error(q(468,t))}r[Bt]=e,Mt(r),t=r}e.stateNode=t}else Ct||P1(a,e.type,e.stateNode);else e.stateNode=Yk(a,n,e.memoizedProps);else s!==n?(s===null?(t=r.stateNode,t===null||ze||t.parentNode.removeChild(t)):s.count--,n===null?Ct||P1(a,e.type,e.stateNode):Yk(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&Hx(e,e.memoizedProps,r.memoizedProps);break;case 27:nn(t,e,n),rn(e),s&512&&(ze||r===null||Lt(r,r.return)),r!==null&&s&4&&Hx(e,e.memoizedProps,r.memoizedProps);break;case 5:if(a=wr,wr=!1,nn(t,e,n),wr=a,rn(e),s&512&&(ze||r===null||Lt(r,r.return)),e.flags&32){t=e.stateNode;try{So(t,""),Te=!0}catch(d){De(e,e.return,d)}}s&4&&e.stateNode!=null&&(t=e.memoizedProps,Hx(e,t,r!==null?r.memoizedProps:t)),s&1024&&(Ux=!0);break;case 6:if(nn(t,e,n),rn(e),s&4){if(e.stateNode===null)throw Error(q(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Te=!0}catch(d){De(e,e.return,d)}}break;case 3:if(Te=!1,gd=null,a=hr,hr=bc(t.containerInfo),nn(t,e,n),hr=a,rn(e),s&4&&r!==null&&r.memoizedState.isDehydrated)try{Ro(t.containerInfo)}catch(d){De(e,e.return,d)}Ux&&(Ux=!1,u6(e)),Te=!1;break;case 4:s=wr,wr=Ct,r=Ob(),a=hr,hr=bc(e.stateNode.containerInfo),nn(t,e,n),rn(e),hr=a,Te&&$l&&(lf=!0),Te=r,wr=s;break;case 12:nn(t,e,n),rn(e);break;case 31:nn(t,e,n),rn(e),s&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:nn(t,e,n),rn(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(bh=Dn()),s&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:a=e.memoizedState!==null,i=r!==null&&r.memoizedState!==null;var o=Ct,l=ze,c=wr;Ct=o||a,wr=c||a,ze=l||i,nn(t,e,n),ze=l,wr=c,Ct=o,rn(e),s&8192&&(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,!a||r===null||i||Ct||ze||(t=i||ze,n=Ct,r=ze,Ct=a||Ct,ze=t,Es(e,2),Ct=n,ze=r),!a&&wr||E1(e,a)),s&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:nn(t,e,n),rn(e),s&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:s&512&&(ze||r===null||Lt(r,r.return)),s=Ob(),a=$l,i=(n&335544064)===n,o=e.memoizedProps,$l=i&&hs(o.default,o.update)!=="none",nn(t,e,n),rn(e),i&&r!==null&&Te&&(e.flags|=4),$l=a,Te=s;break;case 21:break;case 7:s&512&&(ze||r===null||Lt(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:nn(t,e,n),rn(e)}}function rn(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Y4(r)){n=r;break}r=r.return}r=null;for(var s=e.return;s!==null;){if(u0(s)){var a=s.stateNode;r===null?r=[a]:r.push(a)}if(c0(s))break;s=s.return}var i=r;if(n==null)throw Error(q(160));switch(n.tag){case 27:var o=n.stateNode,l=qx(e);af(e,l,o,i);break;case 5:var c=n.stateNode;n.flags&32&&(So(c,""),n.flags&=-33);var d=qx(e);af(e,d,c,i);break;case 3:case 4:var f=n.stateNode.containerInfo,h=qx(e);b1(e,h,f,i);break;default:throw Error(q(161))}}catch(p){De(e,e.return,p)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function u6(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;u6(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,zo=!0,t.reset(),zo=!1),e=e.sibling}}function Ti(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)d6(t,e),t=t.sibling;else n6(t)}function d6(e,t){var n=e.alternate;if(n===null)k1(e,!1);else switch(e.tag){case 3:if(j1=Sr=!1,Mk(),Ti(t,e),!Sr&&!lf){if(e=Mr,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var s=e[r+1];L6(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+s+")"})}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"})),j1=!0}Mr=null;break;case 5:Ti(t,e);break;case 4:r=Sr,Sr=!1,Ti(t,e),Sr&&(lf=!0),Sr=r;break;case 22:e.memoizedState===null&&(n.memoizedState!==null?k1(e,!1):Ti(t,e));break;case 30:r=Sr,s=Mk(),Sr=!1,Ti(t,e),Sr&&(e.flags|=4);var a=e.memoizedProps,i=e.stateNode;t=is(a,i),i=is(n.memoizedProps,i);var o=hs(a.default,a.update);o==="none"?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,mn=0,t=d0(e,n,t,i,o,a,!0),mn!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?($o(e,e.memoizedProps.onUpdate),Mr=s):s!==null&&(s.push.apply(s,Mr),Mr=s),Sr=e.flags&32?!0:r;break;default:Ti(t,e)}}function jr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)r6(e,t.alternate,t),t=t.sibling}function Es(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:ta(4,n,n.return),Es(n,r);break;case 1:Lt(n,n.return);var s=n.stateNode;typeof s.componentWillUnmount=="function"&&K4(n,n.return,s),Es(n,r);break;case 27:r&2&&V6(n.stateNode,n.type,n.memoizedProps);case 5:Lt(n,n.return),n.tag!==5&&n.tag!==27||ql(n),Es(n,r);break;case 6:ql(n);break;case 26:Lt(n,n.return),s=n.stateNode,n.memoizedState!==null||s===null||ze||s.parentNode.removeChild(s),Es(n,r);break;case 22:n.memoizedState===null&&Es(n,r);break;case 30:Lt(n,n.return),Es(n,r);break;case 7:Lt(n,n.return);default:Es(n,r)}e=e.sibling}}function cr(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,s=e,a=t,i=a.flags,o=(n&1)!==0;switch(a.tag){case 0:case 11:case 15:cr(s,a,n),Yc(4,a);break;case 1:if(cr(s,a,n),r=a,s=r.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(d){De(r,r.return,d)}if(r=a,s=r.updateQueue,s!==null){var l=r.stateNode;try{var c=s.shared.hiddenCallbacks;if(c!==null)for(s.shared.hiddenCallbacks=null,s=0;s<c.length;s++)s4(c[s],l)}catch(d){De(r,r.return,d)}}o&&i&64&&W4(a),Tr(a,a.return);break;case 27:n&2&&Q4(a);case 5:a.tag!==5&&a.tag!==27||Ck(a),cr(s,a,n),o&&r===null&&i&4&&y1(a),Tr(a,a.return);break;case 6:Ck(a);break;case 26:l=a.stateNode,a.memoizedState!==null||l===null||Ct||P1(bc(l.ownerDocument),a.type,l),cr(s,a,n),o&&r===null&&i&4&&y1(a),Tr(a,a.return);break;case 12:cr(s,a,n);break;case 31:cr(s,a,n),o&&i&4&&o6(s,a);break;case 13:cr(s,a,n),o&&i&4&&l6(s,a);break;case 22:a.memoizedState===null&&cr(s,a,n),Tr(a,a.return);break;case 30:cr(s,a,n),Tr(a,a.return);break;case 7:Tr(a,a.return);default:cr(s,a,n)}t=t.sibling}}function f0(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&&Wc(n))}function h0(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Wc(e))}function Pn(e,t,n,r){var s=(n&335544064)===n;if(t.subtreeFlags&(s?10262:10256))for(t=t.child;t!==null;)f6(e,t,n,r),t=t.sibling;else s&&t6(t)}function f6(e,t,n,r){var s=(n&335544064)===n;s&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&fd(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Pn(e,t,n,r),a&2048&&Yc(9,t);break;case 1:Pn(e,t,n,r);break;case 3:Pn(e,t,n,r),s&&j1&&(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&&Wc(a)));break;case 12:if(a&2048){Pn(e,t,n,r),a=t.stateNode;try{var i=t.memoizedProps,o=i.id,l=i.onPostCommit;typeof l=="function"&&l(o,t.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(c){De(t,t.return,c)}}else Pn(e,t,n,r);break;case 31:Pn(e,t,n,r);break;case 13:Pn(e,t,n,r);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?(s&&o!==null&&o.memoizedState===null&&fd(o),i._visibility&2?Pn(e,t,n,r):Ul(e,t)):(s&&o!==null&&o.memoizedState!==null&&fd(t),i._visibility&2?Pn(e,t,n,r):(i._visibility|=2,_i(e,t,n,r,(t.subtreeFlags&10256)!==0||!1))),a&2048&&f0(o,t);break;case 24:Pn(e,t,n,r),a&2048&&h0(t.alternate,t);break;case 30:s&&(a=t.alternate,a!==null&&(Dr(a.child,!0),Dr(t.child,!0))),Pn(e,t,n,r);break;default:Pn(e,t,n,r)}}function _i(e,t,n,r,s){for(s=s&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var a=e,i=t,o=n,l=r,c=i.flags;switch(i.tag){case 0:case 11:case 15:_i(a,i,o,l,s),Yc(8,i);break;case 23:break;case 22:var d=i.stateNode;i.memoizedState!==null?d._visibility&2?_i(a,i,o,l,s):Ul(a,i):(d._visibility|=2,_i(a,i,o,l,s)),s&&c&2048&&f0(i.alternate,i);break;case 24:_i(a,i,o,l,s),s&&c&2048&&h0(i.alternate,i);break;default:_i(a,i,o,l,s)}t=t.sibling}}function Ul(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,s=r.flags;switch(r.tag){case 22:Ul(n,r),s&2048&&f0(r.alternate,r);break;case 24:Ul(n,r),s&2048&&h0(r.alternate,r);break;default:Ul(n,r)}t=t.sibling}}var va=8192;function ga(e,t,n){if(e.subtreeFlags&va)for(e=e.child;e!==null;)h6(e,t,n),e=e.sibling}function h6(e,t,n){switch(e.tag){case 26:ga(e,t,n),e.flags&va&&(e.memoizedState!==null?iO(n,hr,e.memoizedState,e.memoizedProps):(e=e.stateNode,(t&335544128)===t&&ev(n,e)));break;case 5:ga(e,t,n),e.flags&va&&(e=e.stateNode,(t&335544128)===t&&ev(n,e));break;case 3:case 4:var r=hr;hr=bc(e.stateNode.containerInfo),ga(e,t,n),hr=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=va,va=16777216,ga(e,t,n),va=r):ga(e,t,n));break;case 30:if(e.flags&va&&(r=e.memoizedProps.name,r!=null&&r!=="auto")){var s=e.stateNode;s.paired=null,zn===null&&(zn=new Map),zn.set(r,s)}ga(e,t,n);break;default:ga(e,t,n)}}function x6(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 xl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Tt=r,g6(r,e)}x6(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)p6(e),e=e.sibling}function p6(e){switch(e.tag){case 0:case 11:case 15:xl(e),e.flags&2048&&ta(9,e,e.return);break;case 3:xl(e);break;case 12:xl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,hd(e)):xl(e);break;default:xl(e)}}function hd(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Tt=r,g6(r,e)}x6(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ta(8,t,t.return),hd(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,hd(t));break;default:hd(t)}e=e.sibling}}function g6(e,t){for(;Tt!==null;){var n=Tt;switch(n.tag){case 0:case 11:case 15:ta(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Wc(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Tt=r;else e:for(n=e;Tt!==null;){r=Tt;var s=r.sibling,a=r.return;if(a6(r),r===n){Tt=null;break e}if(s!==null){s.return=a,Tt=s;break e}Tt=a}}}var t_={getCacheForType:function(e){var t=Ht(dt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ht(dt).controller.signal}},n_=typeof WeakMap=="function"?WeakMap:Map,Me=0,Ue=null,be=null,we=0,_e=0,Tn=null,Is=!1,Xo=!1,x0=!1,us=0,it=0,na=0,Ga=0,cf=0,Rn=0,Eo=0,Pl=null,pn=null,C1=!1,bh=0,m6=0,uf=1/0,df=null,Vs=null,nt=0,gr=null,si=null,Or=0,T1=0,M1=null,y6=null,ao=null,io=null,oo=null,Fl=0,xd=null;function Bn(){return Me&2&&we!==0?we&-we:ue.T!==null?g0():w5()}function b6(){if(Rn===0)if(!(we&536870912)||me){var e=Eu;Eu<<=1,!(Eu&3932160)&&(Eu=262144),Rn=e}else Rn=536870912;return e=Ft.current,e!==null&&(e.flags|=32),Rn}function $o(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=B6(is(e.memoizedProps,n))),io===null&&(io=[]),io.push(t.bind(null,r))}}function kn(e,t,n){(e===Ue&&(_e===2||_e===9)||e.cancelPendingCommit!==null)&&(Co(e,0),Ls(e,we,Rn,!1)),Vc(e,n),(!(Me&2)||e!==Ue)&&(e===Ue&&(!(Me&2)&&(Ga|=n),it===4&&Ls(e,we,Rn,!1)),Lr(e))}function k6(e,t,n){if(Me&6)throw Error(q(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Gc(e,t),s=r?a_(e,t):Px(e,t,!0),a=r;do{if(s===0){Xo&&!r&&Ls(e,t,0,!1);break}else{if(n=e.current.alternate,a&&!r_(n)){s=Px(e,t,!1),a=!1;continue}if(s===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;s=Pl;var l=o.current.memoizedState.isDehydrated;if(l&&(Co(o,i).flags|=256),i=Px(o,i,!1),i!==2&&i!==6){if(x0&&!l){o.errorRecoveryDisabledLanes|=a,Ga|=a,s=4;break e}a=pn,pn=s,a!==null&&(pn===null?pn=a:pn.push.apply(pn,a))}s=i}if(a=!1,s!==2)continue}}if(s===1){Co(e,0),Ls(e,t,0,!0);break}e:{switch(r=e,a=s,a){case 0:case 1:throw Error(q(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Ls(r,t,Rn,!Is);break e;case 2:pn=null;break;case 3:case 5:break;default:throw Error(q(329))}if((t&62914560)===t&&(s=bh+300-Dn(),10<s)){if(Ls(r,t,Rn,!Is),ah(r,0,!0)!==0)break e;Or=t,r.timeoutHandle=y0(Ak.bind(null,r,n,pn,df,C1,t,Rn,Ga,Eo,Is,a,"Throttled",-0,0),s);break e}Ak(r,n,pn,df,C1,t,Rn,Ga,Eo,Is,a,null,-0,0)}}break}while(!0);Lr(e)}function Ak(e,t,n,r,s,a,i,o,l,c,d,f,h,p){e.timeoutHandle=-1;var m=t.subtreeFlags,k=(a&335544064)===a;if(f=null,(k||m&8192||(m&16785408)===16785408)&&(f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ar},zn=null,h6(t,a,f),k&&(m=f,k=e.containerInfo,k=(k.nodeType===9?k:k.ownerDocument).__reactViewTransition,k!=null&&(m.count++,m.waitingForViewTransition=!0,m=kc.bind(m),k.finished.then(m,m))),m=(a&62914560)===a?bh-Dn():(a&4194048)===a?m6-Dn():0,m=oO(f,m),m!==null)){Or=a,e.cancelPendingCommit=m(Rk.bind(null,e,t,a,n,r,s,i,o,l,c,d,f,null,h,p)),Ls(e,a,i,!c);return}Rk(e,t,a,n,r,s,i,o,l,c,d,f)}function r_(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var s=n[r],a=s.getSnapshot;s=s.value;try{if(!Hn(a(),s))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 Ls(e,t,n,r){t=m5(e,t),t&=~cf,t&=~Ga,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var s=t;0<s;){var a=31-Ln(s),i=1<<a;r[a]=-1,s&=~i}n!==0&&b5(e,n,t)}function kh(){return Me&6?!0:(Qc(0),!1)}function p0(){if(be!==null){if(_e===0)var e=be.return;else e=be,Kr=gi=null,Qm(e),no=null,hc=0,e=be;for(;e!==null;)Z4(e.alternate,e),e=e.return;be=null}}function Co(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,C_(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Or=0,p0(),Ue=e,be=n=ts(e.current,null),we=t,_e=0,Tn=null,Is=!1,Xo=Gc(e,t),x0=!1,Eo=Rn=cf=Ga=na=it=0,pn=Pl=null,C1=!1,us=m5(e,t),uh(),n}function v6(e,t){xe=null,ue.H=nf,t===Go||t===hh?(t=sk(),_e=3):t===Fm?(t=sk(),_e=4):_e=t===i0?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Tn=t,be===null&&(it=1,rf(e,Wn(t,e.current)))}function w6(){var e=Ft.current;return e===null?!0:(we&4194048)===we?Xt===null:(we&62914560)===we||we&536870912?e===Xt:!1}function S6(){var e=ue.H;return ue.H=nf,e===null?nf:e}function j6(){var e=ue.A;return ue.A=t_,e}function ff(){it=4,Is||(we&4194048)!==we&&Ft.current!==null||(Xo=!0),!(na&134217727)&&!(Ga&134217727)||Ue===null||Ls(Ue,we,Rn,!1)}function Px(e,t,n){var r=Me;Me|=2;var s=S6(),a=j6();(Ue!==e||we!==t)&&(df=null,Co(e,t)),t=!1;var i=it;e:do try{if(_e!==0&&be!==null){var o=be,l=Tn;switch(_e){case 8:p0(),i=6;break e;case 3:case 2:case 9:case 6:Ft.current===null&&(t=!0);var c=_e;if(_e=0,Tn=null,Zi(e,o,l,c),n&&Xo){i=0;break e}break;default:c=_e,_e=0,Tn=null,Zi(e,o,l,c)}}s_(),i=it;break}catch(d){v6(e,d)}while(!0);return t&&e.shellSuspendCounter++,Kr=gi=null,Me=r,ue.H=s,ue.A=a,be===null&&(Ue=null,we=0,uh()),i}function s_(){for(;be!==null;)E6(be)}function a_(e,t){var n=Me;Me|=2;var r=S6(),s=j6();Ue!==e||we!==t?(df=null,uf=Dn()+500,Co(e,t)):Xo=Gc(e,t);e:do try{if(_e!==0&&be!==null){t=be;var a=Tn;t:switch(_e){case 1:_e=0,Tn=null,Zi(e,t,a,1);break;case 2:case 9:if(rk(a)){_e=0,Tn=null,zk(t);break}t=function(){_e!==2&&_e!==9||Ue!==e||(_e=7),Lr(e)},a.then(t,t);break e;case 3:_e=7;break e;case 4:_e=5;break e;case 7:rk(a)?(_e=0,Tn=null,zk(t)):(_e=0,Tn=null,Zi(e,t,a,7));break;case 5:var i=null;switch(be.tag){case 26:i=be.memoizedState;case 5:case 27:var o=be;if(i?W6(i):o.stateNode.complete){_e=0,Tn=null;var l=o.sibling;if(l!==null)be=l;else{var c=o.return;c!==null?(be=c,vh(c)):be=null}break t}}_e=0,Tn=null,Zi(e,t,a,5);break;case 6:_e=0,Tn=null,Zi(e,t,a,6);break;case 8:p0(),it=6;break e;default:throw Error(q(462))}}i_();break}catch(d){v6(e,d)}while(!0);return Kr=gi=null,ue.H=r,ue.A=s,Me=n,be!==null?0:(Ue=null,we=0,uh(),it)}function i_(){for(;be!==null&&!Sz();)E6(be)}function E6(e){var t=X4(e.alternate,e,us);e.memoizedProps=e.pendingProps,t===null?vh(e):be=t}function zk(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=kk(n,t,t.pendingProps,t.type,void 0,we);break;case 11:t=kk(n,t,t.pendingProps,t.type.render,t.ref,we);break;case 5:Qm(t);var r=t;r===At&&(me?(Wd(r),r.tag===5&&r.stateNode!=null&&(Ge=r.stateNode)):(Wd(r),me=!0));default:Z4(n,t),t=be=W5(t,us),t=X4(n,t,us)}e.memoizedProps=e.pendingProps,t===null?vh(e):be=t}function Zi(e,t,n,r){Kr=gi=null,Qm(t),no=null,hc=0;var s=t.return;try{if(XR(e,s,t,n,we)){it=1,rf(e,Wn(n,e.current)),be=null;return}}catch(a){if(s!==null)throw be=s,a;it=1,rf(e,Wn(n,e.current)),be=null;return}t.flags&32768?(me||r===1?e=!0:Xo||we&536870912?e=!1:(Is=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ft.current,r!==null&&r.tag===13&&(r.flags|=16384))),$6(t,e)):vh(t)}function vh(e){var t=e;do{if(t.flags&32768){$6(t,Is);return}e=t.return;var n=YR(t.alternate,t,us);if(n!==null){be=n;return}if(t=t.sibling,t!==null){be=t;return}be=t=e}while(t!==null);it===0&&(it=5)}function $6(e,t){do{var n=QR(e.alternate,e);if(n!==null){n.flags&=32767,be=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){be=e;return}be=e=n}while(e!==null);it=6,be=null}function Rk(e,t,n,r,s,a,i,o,l,c,d,f){e.cancelPendingCommit=null;do wh();while(nt!==0);if(Me&6)throw Error(q(327));if(t!==null){if(t===e.current)throw Error(q(177));e===Ue&&(be=Ue=null,we=0),si=t,gr=e,Or=n,M1=s,y6=r,o_(e,t,n,i,o,l,f)}}function o_(e,t,n,r,s,a,i){var o=t.lanes|t.childLanes;if(T1=o,o|=Lm,Rz(e,n,o,r,s,a),io=null,(n&335544064)===n?(oo=OR(e),r=10262):(oo=null,r=10256),t.subtreeFlags&r||t.flags&r?(e.callbackNode=null,e.callbackPriority=0,h_(Fd,function(){return R1(),null})):(e.callbackNode=null,e.callbackPriority=0),of=!1,r=(t.flags&13878)!==0,t.subtreeFlags&13878||r){r=ue.T,ue.T=null,s=Ne.p,Ne.p=2,a=Me,Me|=4;try{JR(e,t,n)}finally{Me=a,Ne.p=s,ue.T=r}}nt=1,of?ao=R_(i,e.containerInfo,oo,N1,A1,c_,z1,R1,l_):(N1(),A1(),z1())}function l_(e){if(nt!==0){var t=gr.onRecoverableError;t(e,{componentStack:null})}}function c_(){nt===3&&(nt=0,d6(si,gr),nt=4)}function N1(){if(nt===1){nt=0;var e=gr,t=si,n=Or,r=(t.flags&13878)!==0;if(t.subtreeFlags&13878||r){r=ue.T,ue.T=null;var s=Ne.p;Ne.p=2;var a=Me;Me|=4;try{$l=lf=!1,c6(t,e,n),n=I1;var i=q5(e.containerInfo),o=n.focusedElem,l=n.selectionRange;if(i!==o&&o&&o.ownerDocument&&H5(o.ownerDocument.documentElement,o)){if(l!==null&&Im(o)){var c=l.start,d=l.end;if(d===void 0&&(d=c),"selectionStart"in o)o.selectionStart=c,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,k=Math.min(l.start,m),b=l.end===void 0?k:Math.min(l.end,m);!p.extend&&k>b&&(i=b,b=k,k=i);var g=Wb(o,k),y=Wb(o,b);if(g&&y&&(p.rangeCount!==1||p.anchorNode!==g.node||p.anchorOffset!==g.offset||p.focusNode!==y.node||p.focusOffset!==y.offset)){var v=f.createRange();v.setStart(g.node,g.offset),p.removeAllRanges(),k>b?(p.addRange(v),p.extend(y.node,y.offset)):(v.setEnd(y.node,y.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}}zo=!!D1,I1=D1=null}finally{Me=a,Ne.p=s,ue.T=r}}e.current=t,nt=2}}function A1(){if(nt===2){nt=0;var e=gr,t=si,n=(t.flags&8772)!==0;if(t.subtreeFlags&8772||n){n=ue.T,ue.T=null;var r=Ne.p;Ne.p=2;var s=Me;Me|=4;try{r6(e,t.alternate,t)}finally{Me=s,Ne.p=r,ue.T=n}}nt=3}}function z1(){if(nt===4||nt===3){nt=0;var e=ao;ao=null,jz();var t=gr,n=si,r=Or,s=y6,a=(r&335544064)===r?10262:10256;if(n.subtreeFlags&a||n.flags&a?nt=5:(nt=0,si=gr=null,C6(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(Vs=null),Am(r),n=n.stateNode,In&&typeof In.onCommitFiberRoot=="function")try{In.onCommitFiberRoot(Fc,n,void 0,(n.current.flags&128)===128)}catch{}if(s!==null){n=ue.T,a=Ne.p,Ne.p=2,ue.T=null;try{for(var i=t.onRecoverableError,o=0;o<s.length;o++){var l=s[o];i(l.value,{componentStack:l.stack})}}finally{ue.T=n,Ne.p=a}}if(s=io,i=oo,oo=null,s!==null&&(io=null,i===null&&(i=[]),e!==null))for(l=0;l<s.length;l++)n=(0,s[l])(i),n!==void 0&&e.finished.finally(n);Or&3&&wh(),Lr(t),a=t.pendingLanes,r&261930&&a&42?t===xd?Fl++:(Fl=0,xd=t):(Fl=0,xd=null),Qc(0)}}function C6(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Wc(t)))}function wh(){return ao!==null&&(ao.skipTransition(),ao=null),N1(),A1(),z1(),R1()}function R1(){if(nt!==5)return!1;var e=gr,t=T1;T1=0;var n=Am(Or),r=ue.T,s=Ne.p;try{Ne.p=32>n?32:n,ue.T=null,n=M1,M1=null;var a=gr,i=Or;if(nt=0,si=gr=null,Or=0,Me&6)throw Error(q(331));var o=Me;if(Me|=4,p6(a.current),f6(a,a.current,i,n),Me=o,Qc(0,!1),In&&typeof In.onPostCommitFiberRoot=="function")try{In.onPostCommitFiberRoot(Fc,a)}catch{}return!0}finally{Ne.p=s,ue.T=r,C6(e,t)}}function _k(e,t,n){t=Wn(n,t),t=f1(e.stateNode,t,2),e=Ps(e,t,2),e!==null&&(Vc(e,2),Lr(e))}function De(e,t,n){if(e.tag===3)_k(e,e,n);else for(;t!==null;){if(t.tag===3){_k(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Vs===null||!Vs.has(r))){e=Wn(n,e),n=U4(2),r=Ps(t,n,2),r!==null&&(P4(n,r,t,e),Vc(r,2),Lr(r));break}}t=t.return}}function Fx(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new n_;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(x0=!0,s.add(n),e=u_.bind(null,e,t,n),t.then(e,e))}function u_(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ue===e&&(we&n)===n&&(it===4||it===3&&(we&62914560)===we&&300>Dn()-bh?Me&2?cf|=n:Co(e,0):cf|=n,Eo===we&&(Eo=0)),Lr(e)}function T6(e,t){t===0&&(t=y5()),e=pi(e,t),e!==null&&(Vc(e,t),Lr(e))}function d_(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),T6(e,n)}function f_(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(q(314))}r!==null&&r.delete(t),T6(e,n)}function h_(e,t){return Mm(e,t)}var To=null,Oi=null,_1=!1,hf=!1,Gx=!1,Bs=0;function Lr(e){e!==Oi&&e.next===null&&(Oi===null?To=Oi=e:Oi=Oi.next=e),hf=!0,_1||(_1=!0,p_())}function Qc(e,t){if(!Gx&&hf){Gx=!0;do for(var n=!1,r=To;r!==null;){if(e!==0){var s=r.pendingLanes;if(s===0)var a=0;else{var i=r.suspendedLanes,o=r.pingedLanes;a=(1<<31-Ln(42|e)+1)-1,a&=s&~(i&~o),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ok(r,a))}else a=we,a=ah(r,r===Ue?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Gc(r,a)||(n=!0,Ok(r,a));r=r.next}while(n);Gx=!1}}function x_(){M6()}function M6(){hf=_1=!1;var e=0;Bs!==0&&$_()&&(e=Bs);for(var t=Dn(),n=null,r=To;r!==null;){var s=r.next,a=N6(r,t);a===0?(r.next=null,n===null?To=s:n.next=s,s===null&&(Oi=n)):(n=r,(e!==0||a&3)&&(hf=!0)),r=s}nt!==0&&nt!==5||Qc(e),Bs!==0&&(Bs=0)}function N6(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var i=31-Ln(a),o=1<<i,l=s[i];l===-1?(!(o&n)||o&r)&&(s[i]=zz(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}if(t=Ue,n=we,n=ah(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(_e===2||_e===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&wx(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Gc(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&wx(r),Am(n)){case 2:case 8:n=p5;break;case 32:n=Fd;break;case 268435456:n=g5;break;default:n=Fd}return r=A6.bind(null,e),n=Mm(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&wx(r),e.callbackPriority=2,e.callbackNode=null,2}function A6(e,t){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(wh()&&e.callbackNode!==n)return null;var r=we;return r=ah(e,e===Ue?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(k6(e,r,t),N6(e,Dn()),e.callbackNode!=null&&e.callbackNode===n?A6.bind(null,e):null)}function Ok(e,t){if(wh())return null;k6(e,t,!0)}function p_(){T_(function(){Me&6?Mm(x5,x_):M6()})}function g0(){if(Bs===0){var e=ei;e===0&&(e=ju,ju<<=1,!(ju&261888)&&(ju=256)),Bs=e}return Bs}function Dk(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:nd(e)}function g_(e,t,n,r,s){if(t==="submit"&&n&&n.stateNode===s){var a=Dk((s[wn]||null).action),i=r.submitter;i&&(t=(t=i[wn]||null)?Dk(t.formAction):i.getAttribute("formAction"),t!==null&&(a=t,i=null));var o=new oh("action","action",null,r,s);e.push({event:o,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Bs!==0){var l=new FormData(s,i);u1(n,{pending:!0,data:l,method:s.method,action:a},null,l)}}else typeof a=="function"&&(o.preventDefault(),l=new FormData(s,i),u1(n,{pending:!0,data:l,method:s.method,action:a},a,l))},currentTarget:s}]})}}for(var Vx=0;Vx<Jp.length;Vx++){var Xx=Jp[Vx],m_=Xx.toLowerCase(),y_=Xx[0].toUpperCase()+Xx.slice(1);br(m_,"on"+y_)}br(P5,"onAnimationEnd");br(F5,"onAnimationIteration");br(G5,"onAnimationStart");br("dblclick","onDoubleClick");br("focusin","onFocus");br("focusout","onBlur");br(CR,"onTransitionRun");br(TR,"onTransitionStart");br(MR,"onTransitionCancel");br(V5,"onTransitionEnd");wo("onMouseEnter",["mouseout","mouseover"]);wo("onMouseLeave",["mouseout","mouseover"]);wo("onPointerEnter",["pointerout","pointerover"]);wo("onPointerLeave",["pointerout","pointerover"]);hi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));hi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));hi("onBeforeInput",["compositionend","keypress","textInput","paste"]);hi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));hi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));hi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var gc="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(" "),b_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(gc));function z6(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var i=r.length-1;0<=i;i--){var o=r[i],l=o.instance,c=o.currentTarget;if(o=o.listener,l!==a&&s.isPropagationStopped())break e;a=o,s.currentTarget=c;try{a(s)}catch(d){Vd(d)}s.currentTarget=null,a=l}else for(i=0;i<r.length;i++){if(o=r[i],l=o.instance,c=o.currentTarget,o=o.listener,l!==a&&s.isPropagationStopped())break e;a=o,s.currentTarget=c;try{a(s)}catch(d){Vd(d)}s.currentTarget=null,a=l}}}}function ye(e,t){var n=t[Ab];n===void 0&&(n=t[Ab]=new Set);var r=e+"__bubble";n.has(r)||(R6(t,e,2,!1),n.add(r))}function Zx(e,t,n){var r=0;t&&(r|=4),R6(n,e,r,t)}var Iu="_reactListening"+Math.random().toString(36).slice(2);function m0(e){if(!e[Iu]){e[Iu]=!0,j5.forEach(function(n){n!=="selectionchange"&&(b_.has(n)||Zx(n,!1,e),Zx(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Iu]||(t[Iu]=!0,Zx("selectionchange",!1,t))}}function R6(e,t,n,r){switch(nS(t)){case 2:var s=dO;break;case 8:s=fO;break;default:s=j0}n=s.bind(null,t,n,e),s=void 0,!Wp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Wx(e,t,n,r,s){var a=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var i=r.tag;if(i===3||i===4){var o=r.stateNode.containerInfo;if(o===s)break;if(i===4)for(i=r.return;i!==null;){var l=i.tag;if((l===3||l===4)&&i.stateNode.containerInfo===s)return;i=i.return}for(;o!==null;){if(i=Na(o),i===null)return;if(l=i.tag,l===5||l===6||l===26||l===27){r=a=i;continue e}o=o.parentNode}}r=r.return}z5(function(){var c=a,d=Rm(n),f=[];e:{var h=X5.get(e);if(h!==void 0){var p=oh,m=e;switch(e){case"keypress":if(sd(n)===0)break e;case"keydown":case"keyup":p=rR;break;case"focusin":m="focus",p=Tx;break;case"focusout":m="blur",p=Tx;break;case"beforeblur":case"afterblur":p=Tx;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=Bb;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Gz;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=lR;break;case P5:case F5:case G5:p=Zz;break;case V5:p=uR;break;case"scroll":case"scrollend":p=Pz;break;case"wheel":p=fR;break;case"copy":case"cut":case"paste":p=Kz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=qb;break;case"submit":p=iR;break;case"toggle":case"beforetoggle":p=xR}var k=(t&4)!==0,b=!k&&(e==="scroll"||e==="scrollend"),g=k?h!==null?h+"Capture":null:h;k=[];for(var y=c,v;y!==null;){var w=y;if(v=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||v===null||g===null||(w=lc(y,g),w!=null&&k.push(mc(y,w,v))),b)break;y=y.return}0<k.length&&(h=new p(h,m,null,n,d),f.push({event:h,listeners:k}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",h=e==="mouseout"||e==="pointerout",p&&n!==Zp&&(m=n.relatedTarget||n.fromElement)&&(Na(m)||m[Po]))break e;(h||p)&&(m=d.window===d?d:(p=d.ownerDocument)?p.defaultView||p.parentWindow:window,h?(p=n.relatedTarget||n.toElement,h=c,p=p?Na(p):null,p!==null&&(b=Pc(p),k=p.tag,p!==b||k!==5&&k!==27&&k!==6)&&(p=null)):(h=null,p=c),h!==p&&(k=Bb,w="onMouseLeave",g="onMouseEnter",y="mouse",(e==="pointerout"||e==="pointerover")&&(k=qb,w="onPointerLeave",g="onPointerEnter",y="pointer"),b=h==null?m:jl(h),v=p==null?m:jl(p),m=new k(w,y+"leave",h,n,d),m.target=b,m.relatedTarget=v,w=null,Na(d)===c&&(k=new k(g,y+"enter",p,n,d),k.target=v,k.relatedTarget=b,w=k),b=w,k=h&&p?Dp(h,p,k_):null,h!==null&&Ik(f,m,h,k,!1),p!==null&&b!==null&&Ik(f,b,p,k,!0)))}e:{if(h=c?jl(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var S=Gb;else if(Fb(h))if(L5)S=jR;else{S=wR;var j=vR}else p=h.nodeName,!p||p.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?c&&zm(c.elementType)&&(S=Gb):S=SR;if(S&&(S=S(e,c))){I5(f,S,n,d);break e}j&&j(e,h,c)}switch(j=c?jl(c):window,e){case"focusin":(Fb(j)||j.contentEditable==="true")&&(Ui=j,Yp=c,_l=null);break;case"focusout":_l=Yp=Ui=null;break;case"mousedown":Qp=!0;break;case"contextmenu":case"mouseup":case"dragend":Qp=!1,Kb(f,n,d);break;case"selectionchange":if($R)break;case"keydown":case"keyup":Kb(f,n,d)}var C;if(Dm)e:{switch(e){case"compositionstart":var $="onCompositionStart";break e;case"compositionend":$="onCompositionEnd";break e;case"compositionupdate":$="onCompositionUpdate";break e}$=void 0}else qi?O5(e,n)&&($="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&($="onCompositionStart");$&&(_5&&n.locale!=="ko"&&(qi||$!=="onCompositionStart"?$==="onCompositionEnd"&&qi&&(C=R5()):(Os=d,_m="value"in Os?Os.value:Os.textContent,qi=!0)),j=xf(c,$),0<j.length&&($=new Hb($,e,null,n,d),f.push({event:$,listeners:j}),C?$.data=C:(C=D5(n),C!==null&&($.data=C)))),(C=gR?mR(e,n):yR(e,n))&&($=xf(c,"onBeforeInput"),0<$.length&&(j=new Hb("onBeforeInput","beforeinput",null,n,d),f.push({event:j,listeners:$}),j.data=C)),g_(f,e,c,n,d)}z6(f,t)})}function mc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xf(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,a=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||a===null||(s=lc(e,n),s!=null&&r.unshift(mc(e,s,a)),s=lc(e,t),s!=null&&r.push(mc(e,s,a))),e.tag===3)return r;e=e.return}return[]}function k_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ik(e,t,n,r,s){for(var a=t._reactName,i=[];n!==null&&n!==r;){var o=n,l=o.alternate,c=o.stateNode;if(o=o.tag,l!==null&&l===r)break;o!==5&&o!==26&&o!==27||c===null||(l=c,s?(c=lc(n,a),c!=null&&i.unshift(mc(n,c,l))):s||(c=lc(n,a),c!=null&&i.push(mc(n,c,l)))),n=n.return}i.length!==0&&e.push({event:t,listeners:i})}var v_=/\r\n?/g,w_=/\u0000|\uFFFD/g;function Lk(e){return(typeof e=="string"?e:""+e).replace(v_,`
|
|
190
|
-
`).replace(w_,"")}function _6(e,t){return t=Lk(t),Lk(e)===t}function Oe(e,t,n,r,s,a){switch(n){case"children":if(typeof r=="string")t==="body"||t==="textarea"&&r===""||So(e,r);else if(typeof r=="number"||typeof r=="bigint")t!=="body"&&So(e,""+r);else return;break;case"className":Cu(e,"class",r);break;case"tabIndex":Cu(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Cu(e,n,r);break;case"style":A5(e,r,a);return;case"data":if(t!=="object"){Cu(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=nd(r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof a=="function"&&(n==="formAction"?(t!=="input"&&Oe(e,t,"name",s.name,s,null),Oe(e,t,"formEncType",s.formEncType,s,null),Oe(e,t,"formMethod",s.formMethod,s,null),Oe(e,t,"formTarget",s.formTarget,s,null)):(Oe(e,t,"encType",s.encType,s,null),Oe(e,t,"method",s.method,s,null),Oe(e,t,"target",s.target,s,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=nd(r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=Ar);return;case"onScroll":r!=null&&ye("scroll",e);return;case"onScrollEnd":r!=null&&ye("scrollend",e);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(q(61));if(n=r.__html,n!=null){if(s.children!=null)throw Error(q(60));(a!=null?a.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=nd(r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":ye("beforetoggle",e),ye("toggle",e),td(e,"popover",r);break;case"xlinkActuate":qr(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":qr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":qr(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":qr(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":qr(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":qr(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":qr(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":qr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":qr(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":td(e,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=qz.get(n)||n,td(e,n,r);else return}Te=!0}function O1(e,t,n,r,s,a){switch(n){case"style":A5(e,r,a);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(q(61));if(n=r.__html,n!=null){if(s.children!=null)throw Error(q(60));(a!=null?a.__html:void 0)!==n&&(e.innerHTML=n)}}break;case"children":if(typeof r=="string")So(e,r);else if(typeof r=="number"||typeof r=="bigint")So(e,""+r);else return;break;case"onScroll":r!=null&&ye("scroll",e);return;case"onScrollEnd":r!=null&&ye("scrollend",e);return;case"onClick":r!=null&&(e.onclick=Ar);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!E5.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(s=n.endsWith("Capture"),a=n.slice(2,s?n.length-7:void 0),t=e[wn]||null,t=t!=null?t[n]:null,typeof t=="function"&&e.removeEventListener(a,t,s),typeof r=="function")){typeof t!="function"&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(a,r,s);break e}Te=!0,n in e?e[n]=r:r===!0?e.setAttribute(n,""):td(e,n,r)}return}Te=!0}function Pt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ye("error",e),ye("load",e);var r=!1,s=!1,a;for(a in n)if(n.hasOwnProperty(a)){var i=n[a];if(i!=null)switch(a){case"src":r=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(q(137,t));default:Oe(e,t,a,i,n,null)}}s&&Oe(e,t,"srcSet",n.srcSet,n,null),r&&Oe(e,t,"src",n.src,n,null);return;case"input":ye("invalid",e);var o=a=i=s=null,l=null,c=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case"name":s=d;break;case"type":i=d;break;case"checked":l=d;break;case"defaultChecked":c=d;break;case"value":a=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(q(137,t));break;default:Oe(e,t,r,d,n,null)}}T5(e,a,o,l,c,i,s,!1);return;case"select":ye("invalid",e),r=i=a=null;for(s in n)if(n.hasOwnProperty(s)&&(o=n[s],o!=null))switch(s){case"value":a=o;break;case"defaultValue":i=o;break;case"multiple":r=o;default:Oe(e,t,s,o,n,null)}t=a,n=i,e.multiple=!!r,t!=null?Ji(e,!!r,t,!1):n!=null&&Ji(e,!!r,n,!0);return;case"textarea":ye("invalid",e),a=s=r=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":r=o;break;case"defaultValue":s=o;break;case"children":a=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(q(91));break;default:Oe(e,t,i,o,n,null)}N5(e,r,s,a);return;case"option":for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case"selected":e.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Oe(e,t,l,r,n,null)}return;case"dialog":ye("beforetoggle",e),ye("toggle",e),ye("cancel",e),ye("close",e);break;case"iframe":case"object":ye("load",e);break;case"video":case"audio":for(r=0;r<gc.length;r++)ye(gc[r],e);break;case"image":ye("error",e),ye("load",e);break;case"details":ye("toggle",e);break;case"embed":case"source":case"link":ye("error",e),ye("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(c in n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(q(137,t));default:Oe(e,t,c,r,n,null)}return;default:if(zm(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&O1(e,t,d,r,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(r=n[o],r!=null&&Oe(e,t,o,r,n,null))}var S_={};function j_(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,a=null,i=null,o=null,l=null,c=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":l=f;default:r.hasOwnProperty(p)||Oe(e,t,p,null,r,f)}}for(var h in r){var p=r[h];if(f=n[h],r.hasOwnProperty(h)&&(p!=null||f!=null))switch(h){case"type":p!==f&&(Te=!0),a=p;break;case"name":p!==f&&(Te=!0),s=p;break;case"checked":p!==f&&(Te=!0),c=p;break;case"defaultChecked":p!==f&&(Te=!0),d=p;break;case"value":p!==f&&(Te=!0),i=p;break;case"defaultValue":p!==f&&(Te=!0),o=p;break;case"children":case"dangerouslySetInnerHTML":if(p!=null)throw Error(q(137,t));break;default:p!==f&&Oe(e,t,h,p,r,f)}}Xp(e,i,o,l,c,d,a,s);return;case"select":p=i=o=h=null;for(a in n)if(l=n[a],n.hasOwnProperty(a)&&l!=null)switch(a){case"value":break;case"multiple":p=l;default:r.hasOwnProperty(a)||Oe(e,t,a,null,r,l)}for(s in r)if(a=r[s],l=n[s],r.hasOwnProperty(s)&&(a!=null||l!=null))switch(s){case"value":a!==l&&(Te=!0),h=a;break;case"defaultValue":a!==l&&(Te=!0),o=a;break;case"multiple":a!==l&&(Te=!0),i=a;default:a!==l&&Oe(e,t,s,a,r,l)}t=o,n=i,r=p,h!=null?Ji(e,!!n,h,!1):!!r!=!!n&&(t!=null?Ji(e,!!n,t,!0):Ji(e,!!n,n?[]:"",!1));return;case"textarea":p=h=null;for(o in n)if(s=n[o],n.hasOwnProperty(o)&&s!=null&&!r.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:Oe(e,t,o,null,r,s)}for(i in r)if(s=r[i],a=n[i],r.hasOwnProperty(i)&&(s!=null||a!=null))switch(i){case"value":s!==a&&(Te=!0),h=s;break;case"defaultValue":s!==a&&(Te=!0),p=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(q(91));break;default:s!==a&&Oe(e,t,i,s,r,a)}M5(e,h,p);return;case"option":for(var m in n)if(h=n[m],n.hasOwnProperty(m)&&h!=null&&!r.hasOwnProperty(m))switch(m){case"selected":e.selected=!1;break;default:Oe(e,t,m,null,r,h)}for(l in r)if(h=r[l],p=n[l],r.hasOwnProperty(l)&&h!==p&&(h!=null||p!=null))switch(l){case"selected":h!==p&&(Te=!0),e.selected=h&&typeof h!="function"&&typeof h!="symbol";break;default:Oe(e,t,l,h,r,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 k in n)h=n[k],n.hasOwnProperty(k)&&h!=null&&!r.hasOwnProperty(k)&&Oe(e,t,k,null,r,h);for(c in r)if(h=r[c],p=n[c],r.hasOwnProperty(c)&&h!==p&&(h!=null||p!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(q(137,t));break;default:Oe(e,t,c,h,r,p)}return;default:if(zm(t)){for(var b in n)h=n[b],n.hasOwnProperty(b)&&h!==void 0&&!r.hasOwnProperty(b)&&O1(e,t,b,void 0,r,h);for(d in r)h=r[d],p=n[d],!r.hasOwnProperty(d)||h===p||h===void 0&&p===void 0||O1(e,t,d,h,r,p);return}}for(var g in n)h=n[g],n.hasOwnProperty(g)&&h!=null&&!r.hasOwnProperty(g)&&Oe(e,t,g,null,r,h);for(f in r)h=r[f],p=n[f],!r.hasOwnProperty(f)||h===p||h==null&&p==null||Oe(e,t,f,h,r,p)}function Bk(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function E_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var s=n[r],a=s.transferSize,i=s.initiatorType,o=s.duration;if(a&&o&&Bk(i)){for(i=0,o=s.responseEnd,r+=1;r<n.length;r++){var l=n[r],c=l.startTime;if(c>o)break;var d=l.transferSize,f=l.initiatorType;d&&Bk(f)&&(l=l.responseEnd,i+=d*(l<o?1:(o-c)/(l-c)))}if(--r,t+=8*(a+i)/(s.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 D1=null,I1=null;function yc(e){return e.nodeType===9?e:e.ownerDocument}function Hk(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 O6(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 D6(e,t,n,r){return n=yc(n).createElement(e),n[Bt]=r,n[wn]=t,Pt(n,e,t),Mt(n),n}function L1(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 Kx=null;function $_(){var e=window.event;return e&&e.type==="popstate"?e===Kx?!1:(Kx=e,!0):(Kx=null,!1)}var y0=typeof setTimeout=="function"?setTimeout:void 0,C_=typeof clearTimeout=="function"?clearTimeout:void 0,qk=typeof Promise=="function"?Promise:void 0,Uk=typeof requestAnimationFrame=="function"?requestAnimationFrame:y0,T_=typeof queueMicrotask=="function"?queueMicrotask:typeof qk<"u"?function(e){return qk.resolve(null).then(e).catch(M_)}:y0;function M_(e){setTimeout(function(){throw e})}function oa(e){return e==="head"}function Pk(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(s),Ro(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")Qx(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Qx(n);for(var a=n.firstChild;a;){var i=a.nextSibling,o=a.nodeName;a[Xc]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=i}}else n==="body"&&Qx(e.ownerDocument.body);n=s}while(n);Ro(t)}function Fk(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function I6(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 r=1;else for(var s=r=0;s<t.length;s++){var a=t[s];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?"inline-block":"block",e.marginTop="-"+n.paddingTop,e.marginBottom="-"+n.paddingBottom)}}function L6(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 N_(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 B1(e){var t=e.getBoundingClientRect(),n=getComputedStyle(e);return N_(t,n,e)}function A_(e){return e.documentElement.clientHeight}function z_(e){this.addEventListener("load",e),this.addEventListener("error",e)}function R_(e,t,n,r,s,a,i,o,l){var c=t.nodeType===9?t:t.ownerDocument;try{var d=c.startViewTransition({update:function(){var h=c.defaultView,p=h.navigation&&h.navigation.transition,m=c.fonts.status;r();var k=[];if(m==="loaded"&&(A_(c),c.fonts.status==="loading"&&k.push(c.fonts.ready)),m=k.length,e!==null)for(var b=e.suspenseyImages,g=0,y=0;y<b.length;y++){var v=b[y];if(!v.complete){var w=v.getBoundingClientRect();if(0<w.bottom&&0<w.right&&w.top<h.innerHeight&&w.left<h.innerWidth){if(g+=K6(v),g>md){k.length=m;break}v=new Promise(z_.bind(v)),k.push(v)}}}if(0<k.length)return h=Promise.race([Promise.all(k),new Promise(function(S){return setTimeout(S,500)})]).then(s,s),(p?Promise.allSettled([p.finished,h]):h).then(a,a);if(s(),p)return p.finished.then(a,a);a()},types:n});c.__reactViewTransition=d;var f=[];return d.ready.then(function(){for(var h=c.documentElement.getAnimations({subtree:!0}),p=0;p<h.length;p++){var m=h[p],k=m.effect,b=k.pseudoElement;if(b!=null&&b.startsWith("::view-transition")){f.push(m),m=k.getKeyframes();for(var g=b=void 0,y=!0,v=0;v<m.length;v++){var w=m[v],S=w.width;if(b===void 0)b=S;else if(b!==S){y=!1;break}if(S=w.height,g===void 0)g=S;else if(g!==S){y=!1;break}delete w.width,delete w.height,w.transform==="none"&&delete w.transform}y&&b!==void 0&&g!==void 0&&(k.setKeyframes(m),y=getComputedStyle(k.target,k.pseudoElement),y.width!==b||y.height!==g)&&(y=m[0],y.width=b,y.height=g,y=m[m.length-1],y.width=b,y.height=g,k.setKeyframes(m))}}i()},function(h){c.__reactViewTransition===d&&(c.__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&&l(h)}finally{r(),s(),i()}}),d.finished.finally(function(){for(var h=0;h<f.length;h++)f[h].cancel();c.__reactViewTransition===d&&(c.__reactViewTransition=null),o()}),d}catch{return r(),s(),i(),null}}function Aa(e,t){this._scope=document.documentElement,this._selector="::view-transition-"+e+"("+t+")"}Aa.prototype.animate=function(e,t){return t=typeof t=="number"?{duration:t}:Pe({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)};Aa.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],s=0;s<n.length;s++){var a=n[s].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[s])}return r};Aa.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function B6(e){return{name:e,group:new Aa("group",e),imagePair:new Aa("image-pair",e),old:new Aa("old",e),new:new Aa("new",e)}}function Un(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Un.prototype.addEventListener=function(e,t,n){var r=null,s=null;if(!(n!=null&&typeof n!="boolean"&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(H6(a,e,t,n)===-1){var i=this,o=t;n!=null&&typeof n!="boolean"&&n.once===!0&&(o=function(l){i.removeEventListener(e,t,n),typeof t=="function"?t.call(this,l):t.handleEvent(l)}),r!==null&&(s=i.removeEventListener.bind(i,e,t,n),r.addEventListener("abort",s,{once:!0}),s=r.removeEventListener.bind(r,"abort",s)),r=Mo(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:o,cleanup:s}),vn(this._fragmentFiber.child,!1,__,e,o,r)}this._eventListeners=a}};function __(e,t,n,r){return bt(e).addEventListener(t,n,r),!1}Un.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=H6(r,e,t,n),t!==-1)){var s=r[t];n=s.attachedListener;var a=s.cleanup;s=Mo(s.optionsOrUseCapture),vn(this._fragmentFiber.child,!1,O_,e,n,s),r.splice(t,1),a!==null&&a()}};function O_(e,t,n,r){return bt(e).removeEventListener(t,n,r),!1}function Mo(e){return e!=null&&typeof e!="boolean"&&(e.once===!0||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Gk(e){return e==null?"c=0":typeof e=="boolean"?"c="+(e?"1":"0"):"c="+(e.capture?"1":"0")}function H6(e,t,n,r){if(e.length===0)return-1;r=Gk(r);for(var s=0;s<e.length;s++){var a=e[s];if(a.type===t&&a.listener===n&&Gk(a.optionsOrUseCapture)===r)return s}return-1}Un.prototype.dispatchEvent=function(e){var t=fi(this._fragmentFiber);if(t===null)return!0;t=bt(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(""):document.createTextNode("");if(n)for(var s=0;s<n.length;s++){var a=n[s];r.addEventListener(a.type,a.attachedListener,Mo(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(s=0;s<n.length;s++)a=n[s],r.removeEventListener(a.type,a.attachedListener,Mo(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)};Un.prototype.focus=function(e){vn(this._fragmentFiber.child,!0,q6,e,void 0,void 0)};function q6(e,t){return e.tag===6?!1:(e=bt(e),X_(e,t))}Un.prototype.focusLast=function(e){var t=[];vn(this._fragmentFiber.child,!0,b0,t,void 0,void 0);for(var n=t.length-1;0<=n&&!q6(t[n],e);n--);};function b0(e,t){return t.push(e),!1}Un.prototype.blur=function(){var e=fi(this._fragmentFiber);e!==null&&(e=bt(e),e=yc(e).activeElement,e!==null&&vn(this._fragmentFiber.child,!1,D_,e,void 0,void 0))};function D_(e,t){return e.tag===6?!1:(e=bt(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Un.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),vn(this._fragmentFiber.child,!1,I_,e,void 0,void 0)};function I_(e,t){return e.tag===6||(e=bt(e),t.observe(e)),!1}Un.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),vn(this._fragmentFiber.child,!1,L_,e,void 0,void 0);for(var n=t=0;n<xr.length;n++){var r=xr[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):xr[t++]=r}xr.length=t}};function L_(e,t){return e.tag===6||(e=bt(e),t.unobserve(e)),!1}var xr=[],Yx=!1;function B_(e,t,n){xr.push({fragmentInstance:e,observer:t,instance:n}),Yx||(Yx=!0,Z_(function(){Yx=!1;var r=xr;xr=[];for(var s=0;s<r.length;s++){var a=r[s];a.observer.unobserve(a.instance)}}))}Un.prototype.getClientRects=function(){var e=[];return vn(this._fragmentFiber.child,!1,H_,e,void 0,void 0),e};function H_(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=bt(e),t.push.apply(t,e.getClientRects());return!1}Un.prototype.getRootNode=function(e){var t=fi(this._fragmentFiber);return t===null?this:bt(t).getRootNode(e)};Un.prototype.compareDocumentPosition=function(e){var t=fi(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];vn(this._fragmentFiber.child,!1,b0,n,void 0,void 0);var r=bt(t);if(n.length===0){if(n=r,Eb(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 s=r=n.compareDocumentPosition(e);return n===e?s=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=u5(t)[1],n===null?s=Node.DOCUMENT_POSITION_PRECEDING:(e=bt(n).compareDocumentPosition(e),s=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),s|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=bt(n[0]),s=bt(n[n.length-1]);var a=Eb(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(s)&Node.DOCUMENT_POSITION_CONTAINED_BY;var i=t.compareDocumentPosition(e),o=s.compareDocumentPosition(e),l=i&Node.DOCUMENT_POSITION_CONTAINED_BY||o&Node.DOCUMENT_POSITION_CONTAINED_BY;return o=r&&a&&i&Node.DOCUMENT_POSITION_FOLLOWING&&o&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&s===e||l||o?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&s===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:i,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||q_(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function q_(e,t,n,r,s){var a=Na(s);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=s.ownerDocument,s===a||s===a.documentElement||s===a.body;e:{for(a=t,t=fi(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=Dp(n,a,$b),t===null?t=!1:(vn(t,!0,pz,a,n),a=Ii,Ii=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=Dp(r,a,$b),t===null?t=!1:(vn(t,!0,gz,a,r),a=Ii,Op=Ii=null,t=a!==null)),t):!1}function Vk(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)}Un.prototype.scrollIntoView=function(e){if(typeof e=="object")throw Error(q(566));var t=[];vn(this._fragmentFiber.child,!1,b0,t,void 0,void 0);var n=e!==!1;if(t.length===0){var r=u5(this._fragmentFiber);if(r=n?r[1]||r[0]||fi(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=bt(r),Vk(e,n);return}if(r=bt(r),r.nodeType!==9){if(r.nodeType===11){n="host"in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var s=t[r];s.tag===6?(s=bt(s),Vk(s,n)):bt(s).scrollIntoView(e),r+=n?-1:1}};function U_(e,t){return e=bt(e),U6(e,t),!1}function U6(e,t){e.reactFragments==null&&(e.reactFragments=new Set),e.reactFragments.add(t)}function P6(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];e.addEventListener(s.type,s.attachedListener,Mo(s.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(a){for(var i=0,o=0;o<xr.length;o++){var l=xr[o];(l.fragmentInstance!==t||l.observer!==a||l.instance!==e)&&(xr[i++]=l)}xr.length=i,a.observe(e)}),U6(e,t))}function P_(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];e.removeEventListener(s.type,s.attachedListener,Mo(s.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(a){typeof a.rootMargin=="string"?B_(t,a,e):a.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function H1(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":H1(n),ih(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function F_(e,t,n,r){for(;e.nodeType===1;){var s=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Xc])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!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(a=e.getAttribute("src"),(a!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&a&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var a=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===a)return e}else return e;if(e=Qn(e.nextSibling),e===null)break}return null}function G_(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Qn(e.nextSibling),e===null))return null;return e}function F6(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qn(e.nextSibling),e===null))return null;return e}function q1(e){return e.data==="$?"||e.data==="$~"}function k0(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function V_(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Qn(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 U1=null;function Xk(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Qn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Zk(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 X_(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener("focus",n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener("focus",n,!0)}return r}function Z_(e){Uk(function(){Uk(function(t){return e(t)})})}function G6(e,t,n){switch(t=yc(n),e){case"html":if(e=t.documentElement,!e)throw Error(q(452));return e;case"head":if(e=t.head,!e)throw Error(q(453));return e;case"body":if(e=t.body,!e)throw Error(q(454));return e;default:throw Error(q(451))}}function V6(e,t,n){for(var r in n){var s=n[r];n.hasOwnProperty(r)&&s!=null&&Oe(e,t,r,null,S_,s)}n.dangerouslySetInnerHTML!=null&&(e.textContent=""),e.onclick===Ar&&(e.onclick=null),ih(e)}function Qx(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ih(e)}var er=new Map,Wk=new Set;function bc(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 xs=Ne.d;Ne.d={f:W_,r:K_,D:Y_,C:Q_,L:J_,m:eO,X:nO,S:tO,M:rO};function W_(){var e=xs.f(),t=kh();return e||t}function K_(e){var t=Fo(e);t!==null&&t.tag===5&&t.type==="form"?A4(t):xs.r(e)}var Zo=typeof document>"u"?null:document;function X6(e,t,n){var r=Zo;if(r&&typeof t=="string"&&t){var s=Zn(t);s='link[rel="'+e+'"][href="'+s+'"]',typeof n=="string"&&(s+='[crossorigin="'+n+'"]'),Wk.has(s)||(Wk.add(s),e={rel:e,crossOrigin:n,href:t},r.querySelector(s)===null&&(t=r.createElement("link"),Pt(t,"link",e),Mt(t),r.head.appendChild(t)))}}function Y_(e){xs.D(e),X6("dns-prefetch",e,null)}function Q_(e,t){xs.C(e,t),X6("preconnect",e,t)}function J_(e,t,n){xs.L(e,t,n);var r=Zo;if(r&&e&&t){var s='link[rel="preload"][as="'+Zn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(s+='[imagesrcset="'+Zn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(s+='[imagesizes="'+Zn(n.imageSizes)+'"]')):s+='[href="'+Zn(e)+'"]';var a=s;switch(t){case"style":a=No(e);break;case"script":a=Wo(e)}if(!(er.has(a)||(e=Pe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),er.set(a,e),r.querySelector(s)!==null||t==="style"&&r.querySelector(Jc(a))||t==="script"&&r.querySelector(eu(a))))){var i=r.createElement("link");Pt(i,"link",e),t==="style"&&(i[Gd]=!0,i.onload=i.onerror=function(){S5(i)}),Mt(i),r.head.appendChild(i)}}}function eO(e,t){xs.m(e,t);var n=Zo;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",s='link[rel="modulepreload"][as="'+Zn(r)+'"][href="'+Zn(e)+'"]',a=s;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":a=Wo(e)}if(!er.has(a)&&(e=Pe({rel:"modulepreload",href:e},t),er.set(a,e),n.querySelector(s)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(eu(a)))return}r=n.createElement("link"),Pt(r,"link",e),Mt(r),n.head.appendChild(r)}}}function tO(e,t,n){xs.S(e,t,n);var r=Zo;if(r&&e){var s=Qi(r).hoistableStyles,a=No(e);t=t||"default";var i=s.get(a);if(!i){var o={loading:0,preload:null};if(i=r.querySelector(Jc(a)))o.loading=5;else{e=Pe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=er.get(a))&&v0(e,n);var l=i=r.createElement("link");Mt(l),Pt(l,"link",e),l._p=new Promise(function(c,d){l.onload=c,l.onerror=d}),l.addEventListener("load",function(){o.loading|=1}),l.addEventListener("error",function(){o.loading|=2}),o.loading|=4,pd(i,t,r)}i={type:"stylesheet",instance:i,count:1,state:o},s.set(a,i)}}}function nO(e,t){xs.X(e,t);var n=Zo;if(n&&e){var r=Qi(n).hoistableScripts,s=Wo(e),a=r.get(s);a||(a=n.querySelector(eu(s)),a||(e=Pe({src:e,async:!0},t),(t=er.get(s))&&w0(e,t),a=n.createElement("script"),Mt(a),Pt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(s,a))}}function rO(e,t){xs.M(e,t);var n=Zo;if(n&&e){var r=Qi(n).hoistableScripts,s=Wo(e),a=r.get(s);a||(a=n.querySelector(eu(s)),a||(e=Pe({src:e,async:!0,type:"module"},t),(t=er.get(s))&&w0(e,t),a=n.createElement("script"),Mt(a),Pt(a,"link",e),n.head.appendChild(a)),a={type:"script",instance:a,count:1,state:null},r.set(s,a))}}function Kk(e,t,n,r){var s=(s=Hs.current)?bc(s):null;if(!s)throw Error(q(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(n=No(n.href),t=Qi(s).hoistableStyles,r=t.get(n),r||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=No(n.href);var a=Qi(s).hoistableStyles,i=a.get(e);if(i||(s=s.ownerDocument||s,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},a.set(e,i),(a=s.querySelector(Jc(e)))?a._p||(i.instance=a,i.state.loading=5):(a=er.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},er.set(e,a)),sO(s,e,a,i.state))),t&&r===null)throw Error(q(528,""));return i}if(t&&r!==null)throw Error(q(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(n=Wo(n),t=Qi(s).hoistableScripts,r=t.get(n),r||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(q(444,e))}}function No(e){return'href="'+Zn(e)+'"'}function Jc(e){return'link[rel="stylesheet"]['+e+"]"}function Z6(e){return Pe({},e,{"data-precedence":e.precedence,precedence:null})}function sO(e,t,n,r){if(t=e.querySelector('link[rel="preload"][as="style"]['+t+"]")){if(t[Gd]!==!0){r.loading=1;return}}else t=e.createElement("link"),t[Gd]=!0,t.onload=t.onerror=S5.bind(null,t),Pt(t,"link",n),Mt(t),e.head.appendChild(t);r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2})}function Wo(e){return'[src="'+Zn(e)+'"]'}function eu(e){return"script[async]"+e}function Yk(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+Zn(n.href)+'"]');if(r)return t.instance=r,Mt(r),r;var s=Pe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Mt(r),Pt(r,"style",s),pd(r,n.precedence,e),t.instance=r;case"stylesheet":s=No(n.href);var a=e.querySelector(Jc(s));if(a)return t.state.loading|=4,t.instance=a,Mt(a),a;r=Z6(n),(s=er.get(s))&&v0(r,s),a=(e.ownerDocument||e).createElement("link"),Mt(a);var i=a;return i._p=new Promise(function(o,l){i.onload=o,i.onerror=l}),Pt(a,"link",r),t.state.loading|=4,pd(a,n.precedence,e),t.instance=a;case"script":return a=Wo(n.src),(s=e.querySelector(eu(a)))?(t.instance=s,Mt(s),s):(r=n,(s=er.get(a))&&(r=Pe({},n),w0(r,s)),e=e.ownerDocument||e,s=e.createElement("script"),Mt(s),Pt(s,"link",r),e.head.appendChild(s),t.instance=s);case"void":return null;default:throw Error(q(443,t.type))}else t.type==="stylesheet"&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,pd(r,n.precedence,e));return t.instance}function pd(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=r.length?r[r.length-1]:null,a=s,i=0;i<r.length;i++){var o=r[i];if(o.dataset.precedence===t)a=o;else if(a!==s)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function v0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function w0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var gd=null;function Qk(e,t,n){if(gd===null){var r=new Map,s=gd=new Map;s.set(n,r)}else s=gd,r=s.get(n),r||(r=new Map,s.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),s=0;s<n.length;s++){var a=n[s];if(!(a[Xc]||a[Bt]||e==="link"&&a.getAttribute("rel")==="stylesheet")&&a.namespaceURI!=="http://www.w3.org/2000/svg"){var i=a.getAttribute(t)||"";i=e+i;var o=r.get(i);o?o.push(a):r.set(i,[a])}}return r}function P1(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function aO(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 Jk(e,t){return e==="img"&&t.src!=null&&t.src!==""&&t.onLoad==null&&t.loading!=="lazy"}function W6(e){return!(e.type==="stylesheet"&&!(e.state.loading&3))}function K6(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function ev(e,t){typeof t.decode=="function"&&(e.imgCount++,t.complete||(e.imgBytes+=K6(t),e.suspenseyImages.push(t)),e=lO.bind(e),t.decode().then(e,e))}function iO(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var s=No(r.href),a=t.querySelector(Jc(s));if(a){t=a._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=kc.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Mt(a);return}a=t.ownerDocument||t,r=Z6(r),(s=er.get(s))&&v0(r,s),a=a.createElement("link"),Mt(a);var i=a;i._p=new Promise(function(o,l){i.onload=o,i.onerror=l}),Pt(a,"link",r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=kc.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var md=0;function oO(e,t){return e.stylesheets&&e.count===0&&yd(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&yd(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4+t);0<e.imgBytes&&md===0&&(md=62500*E_());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&yd(e,e.stylesheets),e.unsuspend)){var a=e.unsuspend;e.unsuspend=null,a()}},(e.imgBytes>md?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(s)}}:null}function Y6(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)yd(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function kc(){this.count--,Y6(this)}function lO(){this.imgCount--,Y6(this)}var pf=null;function yd(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,pf=new Map,t.forEach(cO,e),pf=null,kc.call(e))}function cO(e,t){if(!(t.state.loading&4)){var n=pf.get(e);if(n)var r=n.get(null);else{n=new Map,pf.set(e,n);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a<s.length;a++){var i=s[a];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(n.set(i.dataset.precedence,i),r=i)}r&&n.set(null,r)}s=t.instance,i=s.getAttribute("data-precedence"),a=n.get(i)||r,a===r&&n.set(null,s),n.set(i,s),this.count++,r=kc.bind(this),s.addEventListener("load",r),s.addEventListener("error",r),a?a.parentNode.insertBefore(s,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),t.state.loading|=4}}var Ao={$$typeof:Nr,Provider:null,Consumer:null,_currentValue:qa,_currentValue2:qa,_threadCount:0};function uO(e,t,n,r,s,a,i,o,l){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Sx(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Sx(0),this.hiddenUpdates=Sx(null),this.identifierPrefix=r,this.onUncaughtError=s,this.onCaughtError=a,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.transitionTypes=null,this.incompleteTransitions=new Map}function Q6(e,t,n,r,s,a,i,o,l,c,d,f){return e=new uO(e,t,n,i,l,c,d,f,o),t=1,a===!0&&(t|=24),a=yn(3,null,null,t),e.current=a,a.stateNode=e,t=Um(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},Gm(a),e}function J6(e){return e?(e=Gi,e):Gi}function eS(e,t,n,r,s,a){s=J6(s),r.context===null?r.context=s:r.pendingContext=s,r=Us(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ps(e,r,t),n!==null&&(kn(n,e,t),Dl(n,e,t))}function tv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function S0(e,t){tv(e,t),(e=e.alternate)&&tv(e,t)}function tS(e){if(e.tag===13||e.tag===31){var t=pi(e,67108864);t!==null&&kn(t,e,67108864),S0(e,67108864)}}function nv(e){if(e.tag===13||e.tag===31){var t=Bn();t=Nm(t);var n=pi(e,t);n!==null&&kn(n,e,t),S0(e,t)}}var zo=!0;function dO(e,t,n,r){var s=ue.T;ue.T=null;var a=Ne.p;try{Ne.p=2,j0(e,t,n,r)}finally{Ne.p=a,ue.T=s}}function fO(e,t,n,r){var s=ue.T;ue.T=null;var a=Ne.p;try{Ne.p=8,j0(e,t,n,r)}finally{Ne.p=a,ue.T=s}}function j0(e,t,n,r){if(zo){var s=F1(r);if(s===null)Wx(e,t,r,gf,n),rv(e,r);else if(xO(s,e,t,n,r))r.stopPropagation();else if(rv(e,r),t&4&&-1<hO.indexOf(e)){for(;s!==null;){var a=Fo(s);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var i=ba(a.pendingLanes);if(i!==0){var o=a;for(o.pendingLanes|=2,o.entangledLanes|=2;i;){var l=1<<31-Ln(i);o.entanglements[1]|=l,i&=~l}Lr(a),!(Me&6)&&(uf=Dn()+500,Qc(0))}}break;case 31:case 13:o=pi(a,2),o!==null&&kn(o,a,2),kh(),S0(a,2)}if(a=F1(r),a===null&&Wx(e,t,r,gf,n),a===s)break;s=a}s!==null&&r.stopPropagation()}else Wx(e,t,r,null,n)}}function F1(e){return e=Rm(e),E0(e)}var gf=null;function E0(e){if(gf=null,e=Na(e),e!==null){var t=Pc(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=o5(t),e!==null)return e;e=null}else if(n===31){if(e=l5(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 gf=e,null}function nS(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(Ez()){case x5:return 2;case p5:return 8;case Fd:case $z:return 32;case g5:return 268435456;default:return 32}default:return 32}}var G1=!1,Xs=null,Zs=null,Ws=null,vc=new Map,wc=new Map,zs=[],hO="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 rv(e,t){switch(e){case"focusin":case"focusout":Xs=null;break;case"dragenter":case"dragleave":Zs=null;break;case"mouseover":case"mouseout":Ws=null;break;case"pointerover":case"pointerout":vc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wc.delete(t.pointerId)}}function pl(e,t,n,r,s,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[s]},t!==null&&(t=Fo(t),t!==null&&tS(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function xO(e,t,n,r,s){switch(t){case"focusin":return Xs=pl(Xs,e,t,n,r,s),!0;case"dragenter":return Zs=pl(Zs,e,t,n,r,s),!0;case"mouseover":return Ws=pl(Ws,e,t,n,r,s),!0;case"pointerover":var a=s.pointerId;return vc.set(a,pl(vc.get(a)||null,e,t,n,r,s)),!0;case"gotpointercapture":return a=s.pointerId,wc.set(a,pl(wc.get(a)||null,e,t,n,r,s)),!0}return!1}function rS(e){var t=Na(e.target);if(t!==null){var n=Pc(t);if(n!==null){if(t=n.tag,t===13){if(t=o5(n),t!==null){e.blockedOn=t,Nb(e.priority,function(){nv(n)});return}}else if(t===31){if(t=l5(n),t!==null){e.blockedOn=t,Nb(e.priority,function(){nv(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 bd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=F1(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Zp=r,n.target.dispatchEvent(r),Zp=null}else return t=Fo(n),t!==null&&tS(t),e.blockedOn=n,!1;t.shift()}return!0}function sv(e,t,n){bd(e)&&n.delete(t)}function pO(){G1=!1,Xs!==null&&bd(Xs)&&(Xs=null),Zs!==null&&bd(Zs)&&(Zs=null),Ws!==null&&bd(Ws)&&(Ws=null),vc.forEach(sv),wc.forEach(sv)}function Lu(e,t){e.blockedOn===t&&(e.blockedOn=null,G1||(G1=!0,kt.unstable_scheduleCallback(kt.unstable_NormalPriority,pO)))}var Bu=null;function av(e){Bu!==e&&(Bu=e,kt.unstable_scheduleCallback(kt.unstable_NormalPriority,function(){Bu===e&&(Bu=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],s=e[t+2];if(typeof r!="function"){if(E0(r||n)===null)continue;break}var a=Fo(n);a!==null&&(e.splice(t,3),t-=3,u1(a,{pending:!0,data:s,method:n.method,action:r},r,s))}}))}function Ro(e){function t(l){return Lu(l,e)}Xs!==null&&Lu(Xs,e),Zs!==null&&Lu(Zs,e),Ws!==null&&Lu(Ws,e),vc.forEach(t),wc.forEach(t);for(var n=0;n<zs.length;n++){var r=zs[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<zs.length&&(n=zs[0],n.blockedOn===null);)rS(n),n.blockedOn===null&&zs.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var s=n[r],a=n[r+1],i=s[wn]||null;if(typeof a=="function")i||av(n);else if(i){var o=null;if(a&&a.hasAttribute("formAction")){if(s=a,i=a[wn]||null)o=i.formAction;else if(E0(s)!==null)continue}else o=i.action;typeof o=="function"?n[r+1]=o:(n.splice(r,3),r-=3),av(n)}}}function sS(){function e(a){a.canIntercept&&a.info==="react-transition"&&a.intercept({handler:function(){return new Promise(function(i){return s=i})},focusReset:"manual",scroll:"manual"})}function t(){s!==null&&(s(),s=null),r||setTimeout(n,20)}function n(){if(!r&&!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 r=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),s!==null&&(s(),s=null)}}}function $0(e){this._internalRoot=e}Sh.prototype.render=$0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(q(409));var n=t.current,r=Bn();eS(n,r,e,t,null,null)};Sh.prototype.unmount=$0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;eS(e.current,2,null,e,null,null),kh(),t[Po]=null}};function Sh(e){this._internalRoot=e}Sh.prototype.unstable_scheduleHydration=function(e){if(e){var t=w5();e={blockedOn:null,target:e,priority:t};for(var n=0;n<zs.length&&t!==0&&t<zs[n].priority;n++);zs.splice(n,0,e),n===0&&rS(e)}};var iv=a5.version;if(iv!=="19.3.0")throw Error(q(527,iv,"19.3.0"));Ne.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(q(188)):(e=Object.keys(e).join(","),Error(q(268,e)));return e=xz(t),e=e!==null?c5(e):null,e=e===null?null:e.stateNode,e};var gO={bundleType:0,version:"19.3.0",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.3.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hu.isDisabled&&Hu.supportsFiber)try{Fc=Hu.inject(gO),In=Hu}catch{}}sh.createRoot=function(e,t){if(!i5(e))throw Error(q(299));var n=!1,r="",s=B4,a=H4,i=q4;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(s=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Q6(e,1,!1,null,null,n,r,null,s,a,i,sS),e[Po]=t.current,m0(e),new $0(t)};sh.hydrateRoot=function(e,t,n){if(!i5(e))throw Error(q(299));var r=!1,s="",a=B4,i=H4,o=q4,l=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(s=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&&(l=n.formState)),t=Q6(e,1,!0,t,n??null,r,s,l,a,i,o,sS),t.context=J6(null),n=t.current,r=Bn(),r=Nm(r),s=Us(r),s.callback=null,Ps(n,s,r),n=r,t.current.lanes=n,Vc(t,n),Lr(t),e[Po]=t.current,m0(e),new Sh(t)};sh.version="19.3.0";function aS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(aS)}catch(e){console.error(e)}}aS(),n5.exports=sh;var iS=n5.exports;let Cn=null,ov=null;const lv=["data-theme",gn("theme")];function mO(e){const t=()=>{let r=null;for(const s of lv){const a=document.documentElement.getAttribute(s);a==null?e.removeAttribute(s):(e.setAttribute(s,a),s==="data-theme"&&(r=a))}r==="light"||r==="dark"?e.style.colorScheme=r:e.style.removeProperty("color-scheme")};t(),new MutationObserver(t).observe(document.documentElement,{attributes:!0,attributeFilter:[...lv]})}function yO(){if(Cn)return Cn;if(typeof document>"u")throw new Error("useToast: Cannot create fallback viewport during SSR. Wrap your app with <LayerProvider> or <AppShell>.");Ig();const e=document.createElement("div");e.setAttribute("data-astryx-toast-fallback",""),document.body.appendChild(e),mO(e);let t;const n=new Promise(i=>{t=i}),r=()=>{const i=x.use(Qf),o=x.useRef(!1);return x.useEffect(()=>{i&&!o.current&&(o.current=!0,Cn=i,t==null||t(i))},[i]),null};ov=iS.createRoot(e),ov.render(u.jsx(em,{children:u.jsx(r,{})}));const s=[],a={addToast:i=>{Cn&&Cn!==a?Cn.addToast(i):(s.push(i),n.then(o=>{for(const l of s)o.addToast(l);s.length=0}))},removeToast:(i,o)=>{Cn&&Cn!==a&&Cn.removeToast(i,o)},findByUniqueID:i=>{if(Cn&&Cn!==a)return Cn.findByUniqueID(i)}};return Cn=a,a}let bO=0;function kO(){return`astryx-toast-${++bO}`}function vO(){const e=x.use(Qf);return x.useCallback(n=>{const r=e??yO(),s=kO(),a={id:s,options:n,createdAt:Date.now()};return r.addToast(a),()=>r.removeToast(s,"manual")},[e])}const Jx={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}},wO={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 _o({variant:e,label:t,isPulsing:n=!1,tooltip:r,xstyle:s,className:a,style:i,ref:o,...l}){const c=u.jsx("span",{ref:o,role:"img","aria-label":t,...P(U("statusdot",{variant:e}),B(Jx.base,wO[e],n&&Jx.pulsing,n&&Jx.reducedMotion,s),a,i),...l});return r?u.jsx(qo,{content:r,children:c}):c}_o.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 SO=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 jO(e,t,n=[]){if(t==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:SO(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 EO=e=>{let t="",n=!1;for(const r of e){if(r==="-"||r==="_"||r<=" "){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,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 $O=e=>{const t=EO(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 V1=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.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 ma={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 ep(e){return e!=null}function CO(e,t={}){var h,p;const n=t.attributeNames??{},r=m=>n[m]??m,s=e.size??e.width??ma.width,a=e.size??e.height??ma.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],l=((p=t.className)==null?void 0:p.split(" ").filter(Boolean))??[],c=t.includeDefaultClasses===!1?V1(...l):V1("lucide",...o,...l),d=t.absoluteStrokeWidth?Number(t.strokeWidth??ma["stroke-width"])*Number(e.size??e.width??ma.width)/Number(t.size??t.width??ma.width):t.strokeWidth??ma["stroke-width"];return["svg",{...Object.entries(ma).reduce((m,[k,b])=>(m[r(k)]=b,m),{}),..."color"in t&&t.color&&{[r("stroke")]:t.color},..."size"in t&&ep(t.size)&&{[r("width")]:t.size,[r("height")]:t.size},..."width"in t&&ep(t.width)&&{[r("width")]:t.width},..."height"in t&&ep(t.height)&&{[r("height")]:t.height},[r("stroke-width")]:d,...c&&{[r("class")]:c},[r("viewBox")]:`0 0 ${s} ${a}`,...t.hasA11yProp===!1?{[r("aria-hidden")]:"true"}:{},..."attributes"in t&&t.attributes},e.node.map(m=>{const[k,b,g]=m,y=t.nonScalingStroke?{[r("vector-effect")]:"non-scaling-stroke",...b}:b;return g?[k,y,g]:[k,y]})]}/**
|
|
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 TO(e,t={}){return CO(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 MO=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1},NO=x.createContext({}),AO=()=>x.useContext(NO),zO=x.forwardRef(({color:e,size:t,width:n,height:r,strokeWidth:s,absoluteStrokeWidth:a,nonScalingStroke:i,className:o="",children:l,iconNode:c=[],icon:d={node:c,aliases:[],size:24},...f},h)=>{const{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:k=!1,nonScalingStroke:b=!1,color:g="currentColor",className:y=""}=AO()??{},v=!!l||MO(f),[w,S,j=[]]=TO(d,{color:e??g,width:n??t??p,height:r??t??p,strokeWidth:s??m,absoluteStrokeWidth:a??k,nonScalingStroke:i??b,className:V1(y,o),hasA11yProp:v,attributes:f});return x.createElement(w,{ref:h,...S},[...j.map(([C,$])=>x.createElement(C,$)),...Array.isArray(l)?l:[l]])});/**
|
|
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 He(e,t=[],n=[]){const r=typeof e=="string"?jO(e,t,n):e,s=x.forwardRef(({className:a,...i},o)=>x.createElement(zO,{ref:o,icon:r,className:a,...i}));return r.name&&(s.displayName=$O(r.name)),s}/**
|
|
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 oS={name:"arrow-down",size:24,node:[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]]};oS.node;const RO=He(oS);/**
|
|
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 lS={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"}]]};lS.node;const _O=He(lS);/**
|
|
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 cS={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};cS.node;const OO=He(cS);/**
|
|
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 uS={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"}]]};uS.node;const DO=He(uS);/**
|
|
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 dS={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"}]]};dS.node;const IO=He(dS);/**
|
|
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 fS={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};fS.node;const LO=He(fS);/**
|
|
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 hS={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};hS.node;const BO=He(hS);/**
|
|
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 xS={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};xS.node;const HO=He(xS);/**
|
|
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 pS={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};pS.node;const qO=He(pS);/**
|
|
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 gS={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"}]]};gS.node;const UO=He(gS);/**
|
|
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 mS={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"}]]};mS.node;const PO=He(mS);/**
|
|
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 yS={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"]};yS.node;const FO=He(yS);/**
|
|
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 bS={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"]};bS.node;const GO=He(bS);/**
|
|
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 kS={name:"clock",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]]};kS.node;const VO=He(kS);/**
|
|
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 vS={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"]};vS.node;const XO=He(vS);/**
|
|
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 wS={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"}]]};wS.node;const ZO=He(wS);/**
|
|
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 SS={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"]};SS.node;const WO=He(SS);/**
|
|
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 jS={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"}]]};jS.node;const KO=He(jS);/**
|
|
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 ES={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"}]]};ES.node;const YO=He(ES);/**
|
|
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 $S={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"]};$S.node;const QO=He($S);/**
|
|
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 CS={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"}]]};CS.node;const JO=He(CS);/**
|
|
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 TS={name:"menu",size:24,node:[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]]};TS.node;const eD=He(TS);/**
|
|
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 MS={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"}]]};MS.node;const tD=He(MS);/**
|
|
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 NS={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};NS.node;const nD=He(NS);/**
|
|
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 AS={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};AS.node;const rD=He(AS);/**
|
|
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 zS={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"]};zS.node;const sD=He(zS);/**
|
|
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 RS={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"}]]};RS.node;const aD=He(RS);/**
|
|
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 _S={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};_S.node;const iD=He(_S);var Le={size:"1em","aria-hidden":!0},oD={close:u.jsx(iD,{...Le}),chevronDown:u.jsx(BO,{...Le}),chevronLeft:u.jsx(HO,{...Le}),chevronRight:u.jsx(qO,{...Le}),chevronsLeft:u.jsx(UO,{...Le}),chevronsRight:u.jsx(PO,{...Le}),check:u.jsx(LO,{...Le}),success:u.jsx(FO,{...Le}),error:u.jsx(GO,{...Le}),warning:u.jsx(sD,{...Le}),info:u.jsx(JO,{...Le}),calendar:u.jsx(DO,{...Le}),clock:u.jsx(VO,{...Le}),externalLink:u.jsx(KO,{...Le}),menu:u.jsx(eD,{...Le}),moreHorizontal:u.jsx(WO,{...Le}),search:u.jsx(nD,{...Le}),arrowUp:u.jsx(OO,{...Le}),arrowDown:u.jsx(RO,{...Le}),arrowsUpDown:u.jsx(_O,{...Le}),funnel:u.jsx(QO,{...Le}),eyeSlash:u.jsx(YO,{...Le}),viewColumns:u.jsx(XO,{...Le}),copy:u.jsx(ZO,{...Le}),checkDouble:u.jsx(IO,{...Le}),wrench:u.jsx(aD,{...Le}),stop:u.jsx(rD,{...Le}),microphone:u.jsx(tD,{...Le})};const lD={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:oD};function cD(e,t){const n=new Map(t.map(c=>[c.id,c])),r=new Map,s=new Map;for(const c of e.conversations){if(c.archived===!0)continue;const d=c.home;if(d.kind==="project"&&!e.projects.some(h=>h.path===d.path))continue;const f=n.get(c.id);f!==void 0&&(s.set(c.id,c),r.set(c.id,{summary:f,children:[]}))}for(const c of t){const d=[c];let f=c;for(;!s.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(s.has(f.id))for(let h=d.length-1;h>=0;h--){const p=d[h];if(r.has(p.id)||r.set(p.id,{summary:p,children:[]}),h<d.length-1){const m=r.get(d[h+1].id),k=r.get(p.id);m.children.includes(k)||m.children.push(k)}}}const a=(c,d)=>c.summary.id-d.summary.id,i=c=>o(r.get(c.id)),o=c=>({summary:c.summary,children:[...c.children].sort(a).map(o)}),l=[...s.values()].sort((c,d)=>d.createdAt-c.createdAt);return{chats:l.filter(c=>c.home.kind==="chat").map(i),projects:[...e.projects].sort((c,d)=>d.addedAt-c.addedAt).map(c=>({project:c,conversations:l.filter(d=>d.home.kind==="project"&&d.home.path===c.path).map(i)}))}}function cv(e,t){const n=r=>{for(const s of r){if(s.summary.id===t)return s;const a=n(s.children);if(a!==void 0)return a}};return n([...e.chats,...e.projects.flatMap(r=>r.conversations)])}function uD(e,t,n){var o,l;const r=(o=e.checkouts)==null?void 0:o.find(c=>c.conversationId===n);if(r!==void 0)return r;const s=new Map(t.map(c=>[c.id,c])),a=new Set;let i=s.get(n);for(;i!==void 0&&!a.has(i.id);){a.add(i.id);const c=(l=e.checkouts)==null?void 0:l.find(d=>d.conversationId===i.id);if(c!==void 0)return c;i=i.parent===void 0?void 0:s.get(i.parent)}}function dD(e,t,n){const r=e.conversations.find(o=>o.id===n);if(r!==void 0)return r.home;const s=new Map(t.map(o=>[o.id,o])),a=new Set;let i=s.get(n);for(;i!==void 0&&!a.has(i.id);){a.add(i.id);const o=e.conversations.find(l=>l.id===i.id);if(o!==void 0)return o.home;i=i.parent===void 0?void 0:s.get(i.parent)}}function za(e,t,n){return e>=t&&e<=n}function OS(e){return e===8205}function fD(e){return za(e,55296,56319)}function uv(e){return za(e,127462,127487)}function DS(e){return za(e,65024,65039)}function IS(e){return za(e,768,879)||za(e,6832,6911)||za(e,7616,7679)||za(e,65056,65071)}function kd(e){return e>65535?2:1}function dv(e,t){for(;t<e.length;){const n=e.codePointAt(t);if(IS(n)||DS(n))t+=kd(n);else break}return t}function LS(e,t){const n=e.codePointAt(t);let r=t+kd(n);for(r=dv(e,r);r<e.length-1&&OS(e.codePointAt(r));){const s=e.codePointAt(r+1);r+=1+kd(s),r=dv(e,r)}return uv(n)&&r<e.length&&uv(e.codePointAt(r))&&(r+=kd(e.codePointAt(r))),r}function BS(e){return e>=768&&(fD(e)||IS(e)||DS(e)||OS(e))}function hD(e,t){let n=0,r=0;for(;r<e.length;)if(r=LS(e,r),++n>=t)return!0;return!1}function xD(e,t){let n=0,r=0;for(;r<e.length;)if(r=LS(e,r),++n>t)return!1;return!0}function pD(e,t){if(t===0)return!0;if(e.length<t)return!1;let n=0;for(;;){if(BS(e.charCodeAt(n)))return hD(e,t);if(++n>=t)return!0}}function gD(e,t){if(e.length<=t)return!0;let n=0;for(;;){if(BS(e.charCodeAt(n)))return xD(e,t);if(++n>t)return!1}}function Ie(e){return Array.isArray(e)}function tr(e){return re(typeof e,"bigint")}function mi(e){return re(typeof e,"boolean")}function HS(e){if(ht(e)||!Sc(e))return!1;const t=Function.prototype.toString.call(e);return!!(/^class\s/.test(t)||/\[native code\]/.test(t))}function Sc(e){return re(typeof e,"function")}function qS(e){return Number.isInteger(e)}function tu(e){return re(e,null)}function Rt(e){return Number.isFinite(e)}function mD(e){return ot(e)&&!Ie(e)}function ot(e){return re(typeof e,"object")&&!tu(e)}function vt(e){return re(typeof e,"string")}function US(e){return re(typeof e,"symbol")}function ht(e){return re(e,void 0)}function re(e,t){return e===t}function PS(e,t){return e>t}function FS(e,t){return e<t}function Ko(e,t){return e<=t}function jh(e,t){return e>=t}function yD(e,t){if(tr(e)||tr(t))return BigInt(e)%BigInt(t)===0n;const n=1e-10;if(!Rt(e)||qS(e)&&1/t%1===0)return!0;const r=e%t;return Math.min(Math.abs(r),Math.abs(r-t),Math.abs(r+t))<n}function bD(e){if(!ot(e))return!1;const t=globalThis.Object.getPrototypeOf(e);return tu(t)?!1:re(typeof t.constructor,"function")&&!(re(t.constructor,globalThis.Object)||re(t.constructor.name,"Object"))}function GS(e){return tr(e)||mi(e)||tu(e)||Rt(e)||vt(e)||ht(e)}function kD(e,t){return gD(e,t)}function vD(e,t){return pD(e,t)}function Gt(e,t,n){return e.every((r,s)=>s<t||n(r,s))}function VS(e,t){return e.some((n,r)=>t(n,r))}function wD(e,t){let n=!1;return e.forEach((r,s)=>{t(r,s)&&(n=!0)}),n}function XS(e,t){return e.reduce((n,r,s)=>t(r,s)?++n:n,0)}function Eh(e){return re(e,"__proto__")||re(e,"constructor")||re(e,"prototype")}function te(e,t){return Eh(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function ai(e){return Object.entries(e)}function wt(e){return Object.getOwnPropertyNames(e)}function SD(e){return Object.getOwnPropertySymbols(e)}function jD(e,t){if(!ot(t))return!1;const n=wt(e);return re(n.length,wt(t).length)&&n.every(r=>$h(e[r],t[r]))}function ED(e,t){return Ie(t)&&re(e.length,t.length)&&e.every((n,r)=>$h(e[r],t[r]))}function $h(e,t){return Ie(e)?ED(e,t):ot(e)?jD(e,t):re(e,t)}function $D(e){return e instanceof Boolean}function CD(e){return e instanceof Number}function TD(e){return e instanceof String}function ZS(e){return globalThis.ArrayBuffer.isView(e)}function WS(e){return e instanceof globalThis.RegExp}function MD(e){return e instanceof globalThis.Date}function ND(e){return e instanceof globalThis.Set}function AD(e){return e instanceof globalThis.Map}const zD={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function KS(){return zD}function RD(e){return te(e,"~kind")||te(e,"~unsafe")}function _D(e){const t={};for(const n of wt(e)){if(Eh(n))continue;const r=Object.getOwnPropertyDescriptor(e,n);r.value=ii(r.value),re(r.enumerable,!0)?t[n]=r.value:Object.defineProperty(t,n,r)}return t}function OD(e){const t={};for(const n of wt(e))Eh(n)||(t[n]=ii(e[n]));for(const n of SD(e))t[n]=ii(e[n]);return t}function DD(e){return bD(e)?e:RD(e)?_D(e):OD(e)}function ID(e){return e.map(t=>ii(t))}function LD(e){return e.slice()}function BD(e){return new RegExp(e.source,e.flags)}function HD(e){return new Map(ii([...e.entries()]))}function qD(e){return new Set(ii([...e.values()]))}function ii(e){return ZS(e)?LD(e):WS(e)?BD(e):AD(e)?HD(e):ND(e)?qD(e):Ie(e)?ID(e):ot(e)?DD(e):e}function UD(e){return ii(e)}function PD(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 FD(e,t){return{...e,...t}}function la(e,t,n={}){const r=FD(t,n),s=PD(r,e);return s}function YS(e,t,n){const r=KS(),s=UD(e);for(const a of Object.keys(t))Object.defineProperty(s,a,{configurable:!0,writable:!0,enumerable:r.enumerableKind,value:t[a]});for(const a of Object.keys(n))Object.defineProperty(s,a,{configurable:!0,enumerable:!0,writable:!0,value:n[a]});return s}function GD(e){return ot(e)}function VD(e){return YS(e,{"~optional":!0},{})}function XD(e,t){return YS(VD(e),{},t)}function yi(e,t){return la({"~kind":"Array"},{type:"array",items:e},t)}function ZD(e,t={}){return XD(e,t)}function Va(e){return ZD(e)}function WD(e){return GD(e)&&te(e,"~optional")}function KD(e){return wt(e).filter(t=>!WD(e[t]))}function ln(e,t={}){const n=KD(e),r=n.length>0?{required:n}:{};return la({"~kind":"Object"},{type:"object",...r,properties:e},t)}function C0(e){return la({"~kind":"Unknown"},{},e)}function QS(e,t){var n;return((n=t[e.length])==null?void 0:n.call(t,...e))??(()=>{throw Error("Invalid Arguments")})()}function YD(){throw new Error("Unreachable")}function QD(e){const t=new Set;let n=e;for(;n&&n!==Object.prototype;){for(const r of Reflect.ownKeys(n))r!=="constructor"&&typeof r!="symbol"&&t.add(r);n=Object.getPrototypeOf(n)}return[...t]}function JD(e){return typeof e=="number"}var Yt;(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"})(Yt||(Yt={}));let Wi=BigInt("14695981039346656037");const[eI,tI]=[BigInt("1099511628211"),BigInt("18446744073709551616")],nI=Array.from({length:256}).map((e,t)=>BigInt(t)),JS=new Float64Array(1),ej=new DataView(JS.buffer),tj=new Uint8Array(JS.buffer);function St(e){Wi=Wi^nI[e],Wi=Wi*eI%tI}function rI(e){St(Yt.Array);for(const t of e)ra(t)}function sI(e){St(Yt.BigInt),ej.setBigInt64(0,e);for(const t of tj)St(t)}function fv(e){St(Yt.Boolean),St(e?1:0)}function aI(e){St(Yt.Constructor),ra(e.toString())}function iI(e){St(Yt.Date),ra(e.getTime())}function oI(e){St(Yt.Function),ra(e.toString())}function lI(e){St(Yt.Null)}function hv(e){St(Yt.Number),ej.setFloat64(0,e,!0);for(const t of tj)St(t)}function cI(e){St(Yt.Object);for(const t of QD(e).sort())ra(t),ra(e[t])}function uI(e){St(Yt.RegExp),X1(e.toString())}const dI=new TextEncoder;function X1(e){St(Yt.String);for(const t of dI.encode(e))St(t)}function fI(e){St(Yt.Symbol),ra(e.toString())}function hI(e){St(Yt.TypeArray);const t=new Uint8Array(e.buffer);for(let n=0;n<t.length;n++)St(t[n])}function xI(e){return St(Yt.Undefined)}function ra(e){return ZS(e)?hI(e):MD(e)?iI(e):WS(e)?uI(e):$D(e)?fv(e.valueOf()):TD(e)?X1(e.valueOf()):CD(e)?hv(e.valueOf()):JD(e)?hv(e):Ie(e)?rI(e):mi(e)?fv(e):tr(e)?sI(e):HS(e)?aI(e):tu(e)?lI():ot(e)?cI(e):vt(e)?X1(e):US(e)?fI(e):ht(e)?xI():Sc(e)?oI(e):YD()}function pI(e){return Wi=BigInt("14695981039346656037"),ra(e),Wi}function gI(e){return pI(e).toString(16).padStart(16,"0")}function mI(e){return la({"~kind":"Boolean"},{type:"boolean"},e)}class yI extends Error{constructor(t){super("Invalid Literal value"),Object.defineProperty(this,"cause",{value:{value:t},writable:!1,configurable:!1,enumerable:!1})}}function bI(e){return tr(e)?"bigint":mi(e)?"boolean":Rt(e)?"number":vt(e)?"string":(()=>{throw new yI(e)})()}function _n(e,t){return la({"~kind":"Literal"},{type:bI(e),const:e},t)}function Gl(e){return la({"~kind":"Number"},{type:"number"},e)}function Zt(e){return la({"~kind":"String"},{type:"string"},e)}function Ch(e,t={}){return la({"~kind":"Union"},{anyOf:e},t)}function Z1(e,t){return Array.from({length:t-e+1},(n,r)=>String.fromCharCode(e+r))}[...Z1(97,122),...Z1(65,90)];const kI="0",vI=Z1(49,57);[...vI];function wI(e){return te(e,"~refine")&&Ie(e["~refine"])&&Gt(e["~refine"],0,t=>ot(t)&&te(t,"check")&&te(t,"error")&&Sc(t.check)&&Sc(t.error))}function qn(e){return ot(e)&&!Ie(e)}function mf(e){return mi(e)}function rt(e){return qn(e)||mf(e)}function SI(e){return te(e,"additionalItems")&&rt(e.additionalItems)}function jI(e){return te(e,"additionalProperties")&&rt(e.additionalProperties)}function EI(e){return te(e,"allOf")&&Ie(e.allOf)&&e.allOf.every(t=>rt(t))}function W1(e){return te(e,"$anchor")&&vt(e.$anchor)}function $I(e){return te(e,"anyOf")&&Ie(e.anyOf)&&e.anyOf.every(t=>rt(t))}function CI(e){return te(e,"const")}function T0(e){return te(e,"contains")&&rt(e.contains)}function TI(e){return te(e,"dependencies")&&ot(e.dependencies)&&Object.values(e.dependencies).every(t=>rt(t)||Ie(t)&&t.every(n=>vt(n)))}function MI(e){return te(e,"dependentRequired")&&ot(e.dependentRequired)&&Object.values(e.dependentRequired).every(t=>Ie(t)&&t.every(n=>vt(n)))}function NI(e){return te(e,"dependentSchemas")&&ot(e.dependentSchemas)&&Object.values(e.dependentSchemas).every(t=>rt(t))}function oi(e){return te(e,"$dynamicAnchor")&&vt(e.$dynamicAnchor)}function AI(e){return te(e,"$dynamicRef")&&vt(e.$dynamicRef)}function zI(e){return te(e,"else")&&rt(e.else)}function RI(e){return te(e,"enum")&&Ie(e.enum)}function _I(e){return te(e,"exclusiveMaximum")&&(Rt(e.exclusiveMaximum)||tr(e.exclusiveMaximum))}function OI(e){return te(e,"exclusiveMinimum")&&(Rt(e.exclusiveMinimum)||tr(e.exclusiveMinimum))}function DI(e){return te(e,"format")&&vt(e.format)}function yr(e){return te(e,"$id")&&vt(e.$id)}function II(e){return te(e,"if")&&rt(e.if)}function M0(e){return te(e,"items")&&(rt(e.items)||Ie(e.items)&&e.items.every(t=>rt(t)))}function LI(e){return M0(e)&&Ie(e.items)}function BI(e){return te(e,"maximum")&&(Rt(e.maximum)||tr(e.maximum))}function HI(e){return te(e,"maxContains")&&Rt(e.maxContains)}function qI(e){return te(e,"maxItems")&&Rt(e.maxItems)}function UI(e){return te(e,"maxLength")&&Rt(e.maxLength)}function PI(e){return te(e,"maxProperties")&&Rt(e.maxProperties)}function FI(e){return te(e,"minimum")&&(Rt(e.minimum)||tr(e.minimum))}function nj(e){return te(e,"minContains")&&Rt(e.minContains)}function GI(e){return te(e,"minItems")&&Rt(e.minItems)}function VI(e){return te(e,"minLength")&&Rt(e.minLength)}function XI(e){return te(e,"minProperties")&&Rt(e.minProperties)}function ZI(e){return te(e,"multipleOf")&&(Rt(e.multipleOf)||tr(e.multipleOf))}function WI(e){return te(e,"not")&&rt(e.not)}function KI(e){return te(e,"oneOf")&&Ie(e.oneOf)&&e.oneOf.every(t=>rt(t))}function YI(e){return te(e,"pattern")&&(vt(e.pattern)||e.pattern instanceof RegExp)}function rj(e){return te(e,"patternProperties")&&ot(e.patternProperties)&&Object.values(e.patternProperties).every(t=>rt(t))}function sj(e){return te(e,"prefixItems")&&Ie(e.prefixItems)&&e.prefixItems.every(t=>rt(t))}function aj(e){return te(e,"properties")&&ot(e.properties)&&Object.values(e.properties).every(t=>rt(t))}function QI(e){return te(e,"propertyNames")&&(ot(e.propertyNames)||rt(e.propertyNames))}function JI(e){return te(e,"$recursiveAnchor")&&mi(e.$recursiveAnchor)}function K1(e){return JI(e)&&re(e.$recursiveAnchor,!0)}function eL(e){return te(e,"$recursiveRef")&&vt(e.$recursiveRef)}function tL(e){return te(e,"$ref")&&vt(e.$ref)}function ij(e){return te(e,"required")&&Ie(e.required)&&e.required.every(t=>vt(t))}function nL(e){return te(e,"then")&&rt(e.then)}function rL(e){return te(e,"type")&&(vt(e.type)||Ie(e.type)&&e.type.every(t=>vt(t)))}function sL(e){return te(e,"uniqueItems")&&mi(e.uniqueItems)}function aL(e){return te(e,"unevaluatedItems")&&rt(e.unevaluatedItems)}function iL(e){return te(e,"unevaluatedProperties")&&rt(e.unevaluatedProperties)}class Yo{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(r=>this.GetIndices().add(r)),n.GetKeys().forEach(r=>this.GetKeys().add(r));return!0}}function oL(e,t,n,r){return Gt(n["~refine"],0,(s,a)=>s.check(r))}function lL(e){return M0(e)&&Ie(e.items)}function cL(e,t,n,r){return lL(n)?Gt(r,0,(a,i)=>FS(i,n.items.length)||bi(e,t,n.additionalItems,a)&&t.AddIndex(i)):!0}function N0(e){return new RegExp(e,"u")}function uL(e){return`^${e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}$`}function dL(e){const t=[];return rj(e)&&t.push(...wt(e.patternProperties)),aj(e)&&t.push(...wt(e.properties).map(uL)),re(t.length,0)?"(?!)":`(${t.join("|")})`}function fL(e,t,n,r){const s=N0(dL(n));return Gt(wt(r),0,(i,o)=>s.test(i)||bi(e,t,n.additionalProperties,r[i])&&t.AddKey(i))}function hL(e,t,n,r){const s=n.allOf.reduce((a,i)=>{const o=new Yo;return xt(e,o,i,r)?[...a,o]:a},[]);return re(s.length,n.allOf.length)&&t.Merge(s)}function xL(e,t,n,r){const s=n.anyOf.reduce((a,i)=>{const o=new Yo;return xt(e,o,i,r)?[...a,o]:a},[]);return PS(s.length,0)&&t.Merge(s)}function pL(e,t,n,r){return n}function gL(e,t,n,r){return GS(n.const)?re(r,n.const):$h(r,n.const)}function mL(e){return!(nj(e)&&re(e.minContains,0))}function yL(e,t,n,r){return mL(n)?!re(r.length,0)&&wD(r,(s,a)=>xt(e,t,n.contains,s)&&t.AddIndex(a)):!0}function bL(e,t,n,r){const s=re(wt(r).length,0),a=Gt(ai(n.dependencies),0,([i,o])=>!te(r,i)||(Ie(o)?o.every(l=>te(r,l)):xt(e,t,o,r)));return s||a}function kL(e,t,n,r){const s=re(wt(r).length,0),a=Gt(ai(n.dependentRequired),0,([i,o])=>!te(r,i)||o.every(l=>te(r,l)));return s||a}function vL(e,t,n,r){const s=re(wt(r).length,0),a=Gt(ai(n.dependentSchemas),0,([i,o])=>!te(r,i)||xt(e,t,o,r));return s||a}function wL(e,t,n,r){const s=e.DynamicRef(n)??!1;return rt(s)&&xt(e,t,s,r)}function SL(e,t,n,r){return VS(n.enum,s=>GS(s)?re(r,s):$h(r,s))}function jL(e,t,n,r){return FS(r,n.exclusiveMaximum)}function EL(e,t,n,r){return PS(r,n.exclusiveMinimum)}const $L=[0,31,28,31,30,31,30,31,31,30,31,30,31],CL=/^(\d\d\d\d)-(\d\d)-(\d\d)$/;function TL(e){return e%4===0&&(e%100!==0||e%400===0)}function oj(e){const t=CL.exec(e);if(!t)return!1;const n=+t[1],r=+t[2],s=+t[3];return r>=1&&r<=12&&s>=1&&s<=(r===2&&TL(n)?29:$L[r])}const ML=/^(\d\d):(\d\d):(\d\d)(?:\.\d+)?(?:([Zz])|([+-])(\d\d):(\d\d))?$/;function lj(e,t=!0){const n=ML.exec(e);if(!n||t&&!n[4]&&!n[5])return!1;const r=+n[1],s=+n[2],a=+n[3];if(r>23||s>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),l=+(n[7]||0);return((r*60+s-i*(o*60+l))%1440+1440)%1440===1439}function NL(e){const t=e.split(/T/i);return t.length===2&&oj(t[0])&&lj(t[1])}const AL=/^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 zL(e){return AL.test(e)}const RL=/^(?:[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 _L(e){return RL.test(e)}const OL=new RegExp("^(?!-).*(?<!-)$"),DL=/^(?!..--)/,IL=/^[a-zA-Z0-9-]*$/,A0=/[^\p{ASCII}]/u,LL=/[0-9]/,BL=/[\u{0660}-\u{0669}]/u,HL=/[\u{06f0}-\u{06f9}]/u,qL=/[\u{002e}\u{002c}\u{003a}\u{002f}]/u,UL=/[\u{002d}\u{002b}]/u,cj=new RegExp("\\p{Mn}","u"),PL=new RegExp("\\p{Mc}","u"),FL=/[\p{Mn}\p{Mc}\p{Me}]/u,uj=new RegExp("\\p{L}","u"),GL=new RegExp("\\p{Nd}","u"),VL=new RegExp("\\p{Script=Greek}","u"),dj=new RegExp("\\p{Script=Hebrew}","u"),XL=/[\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Han}]/u,ZL=/[\p{Script=Arabic}\p{Script=Syriac}\p{Script=Thaana}\p{Script=Mandaic}]/u,xv=/[\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,WL=/[\u{0640}\u{07fa}\u{302e}\u{302f}\u{3031}\u{3032}\u{3033}\u{3034}\u{3035}\u{303b}]/u,KL=/[\u{00b7}\u{0375}\u{05f3}\u{05f4}\u{200c}\u{200d}\u{30fb}]/u,YL=/[\u{00df}\u{03c2}\u{06fd}\u{06fe}\u{0f0b}\u{3007}]/u,QL=new RegExp([LL,HL].map(e=>e.source).join("|"),"u"),JL=new RegExp([uj,UL,qL,GL,cj,PL,KL,YL].map(e=>e.source).join("|"),"u");function eB(e){return OL.test(e)&&DL.test(e)&&IL.test(e)}const pr=36,Vl=1,jc=26,tB=38,nB=700,fj=72,hj=128;function tp(){throw null}function xj(e){return e.toLowerCase().startsWith("xn--")}function pj(e,t,n){e=n?Math.floor(e/nB):e>>1,e+=Math.floor(e/t);let r=0;for(;e>(pr-Vl)*jc>>1;)e=Math.floor(e/(pr-Vl)),r+=pr;return r+Math.floor((pr-Vl+1)*e/(e+tB))}function gj(e){const t=[];let n=hj,r=0,s=fj;const a=e.lastIndexOf("-");if(a>0)for(let o=0;o<a;o++){const l=e.charCodeAt(o);l>=128&&tp(),t.push(l)}let i=a<0?0:a+1;for(;i<e.length;){const o=r;let l=1,c=pr;for(;;){i>=e.length&&tp();const f=e.charCodeAt(i++);let h;f>=97&&f<=122?h=f-97:f>=48&&f<=57?h=f-48+26:tp(),r+=h*l;const p=c<=s?Vl:c>=s+jc?jc:c-s;if(h<p)break;l*=pr-p,c+=pr}const d=t.length+1;s=pj(r-o,d,o===0),n+=Math.floor(r/d),r%=d,t.splice(r,0,n),r++}return String.fromCodePoint(...t)}function pv(e){return e<26?String.fromCharCode(e+97):String.fromCharCode(e-26+48)}const rB=new RegExp(A0.source,"gu");function sB(e){const t=e.replace(rB,""),n=t.length,r=n>0?[t,"-"]:[],s=Array.from(e,c=>c.codePointAt(0));let a=hj,i=0,o=fj,l=n;for(;l<s.length;){let c=1/0;for(const d of s)d>=a&&d<c&&(c=d);i+=(c-a)*(l+1),a=c;for(const d of s)if(d<a&&i++,d===a){let f=i;for(let h=pr;;h+=pr){const p=h<=o?Vl:h>=o+jc?jc:h-o;if(f<p)break;const m=p+(f-p)%(pr-p);r.push(pv(m)),f=Math.floor((f-p)/(pr-p))}r.push(pv(f)),o=pj(i,l+1,l===n),i=0,l++}i++,a++}return r.join("")}const aB=/^(?:R|AL|AN|EN|ES|CS|ET|ON|BN|NSM)$/,gv=/^(?:L|EN|ES|CS|ET|ON|BN|NSM)$/,iB=/^(?:R|AL|AN)$/;function oB(e){if(xj(e))try{return Y1(gj(e.slice(4).toLowerCase()))}catch{return!1}return Y1(e)}function mj(e){const t=String.fromCodePoint(e);return QL.test(t)?"EN":BL.test(t)?"AN":cj.test(t)?"NSM":dj.test(t)?"R":ZL.test(t)?"AL":uj.test(t)?"L":"ON"}function Y1(e){for(const t of e)if(iB.test(mj(t.codePointAt(0))))return!0;return!1}function yj(e){let t=!1,n=gv,r=!1,s=!1,a=!0;for(const i of e){const o=mj(i.codePointAt(0));if(a){if(o!=="L"&&o!=="R"&&o!=="AL")return!1;t=o==="R"||o==="AL",n=t?aB:gv,a=!1}if(!n.test(o))return!1;o==="EN"?r=!0:o==="AN"&&(s=!0)}return!(t&&r&&s)}function lB(e){return A0.test(e)&&sB(e).length+4>63}function cB(e){return e[0]==="-"||e[e.length-1]==="-"?!0:e.slice(2).join("").startsWith("--")}function bj(e){if(lB(e)||Y1(e)&&!yj(e))return!1;const t=[...e],n=t.map(a=>a.codePointAt(0)),r=n.length;if(cB(t)||FL.test(t[0]))return!1;let s=!1;for(let a=0;a<r;a++){const i=n[a],o=t[a];if(WL.test(o)||!JL.test(o))return!1;XL.test(o)&&(s=!0);const l=n[a-1],c=n[a+1];switch(i){case 183:if(l!==108||c!==108)return!1;break;case 885:if(!c||!VL.test(t[a+1]))return!1;break;case 1523:case 1524:if(!l||!dj.test(t[a-1]))return!1;break;case 8204:if(!l||l<128&&!xv.test(t[a-1]))return!1;break;case 8205:if(!l||!xv.test(t[a-1]))return!1;break}}return!(e.includes("・")&&!s)}function kj(e){if(!xj(e))return!1;try{const t=e.slice(4).toLowerCase();if(t.lastIndexOf("-")===0)return!1;const n=gj(t);return A0.test(n)?bj(n):!1}catch{return!1}}function uB(e){return e.length>0&&e.length<=63}function dB(e){return uB(e)&&(kj(e)||eB(e))}function fB(e){return e.length===0||e.length>253||e.charCodeAt(e.length-1)===46?!1:e.split(".").every(t=>dB(t))}function hB(e){return e.length>0&&e.length<=63}function xB(e){return hB(e)&&(kj(e)||bj(e))}function pB(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 gB(e){if(e.length===0||e.includes(" "))return!1;const t=pB(e);if(t.length>253)return!1;const n=t.split("."),r=n.some(s=>oB(s));return n.every(s=>xB(s)&&(!r||yj(s)))}function mB(e){return fB(e)}const yB=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 bB(e){return yB.test(e.normalize("NFC"))}function kB(e){return gB(e)}const vB=/^(?:(?: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 wB(e){return vB.test(e)}const SB=/^(?:(?:(?:[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 jB(e){return SB.test(e)}const EB=/[\x00-\x20\x7F\\]|%(?![0-9a-fA-F]{2})/,$B=/^[a-zA-Z][a-zA-Z0-9+\-.]*\/\//;function CB(e){return!EB.test(e)&&!$B.test(e)&&URL.canParse(e,"http://example.com")}const TB=2048,MB=/\[[vV][0-9a-fA-F]+\.[^\]]+\]/,NB=/[\x00-\x20<>\^`{|}\\]/,AB=/%(?![0-9a-fA-F]{2})/;function zB(e){return e.length<TB?e.replace(MB,"[::1]"):e}function RB(e){return NB.test(e)||AB.test(e)?!1:URL.canParse(zB(e))}const _B=/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i;function OB(e){return _B.test(e)}const DB=/^(?:\/(?:[^~/]|~0|~1)*)*$/;function IB(e){return DB.test(e)}function LB(e){try{return new RegExp(e,"u"),!0}catch{return!1}}const BB=/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/;function HB(e){return BB.test(e)}const qB=/^(?:[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 UB(e){return qB.test(e)}const PB=/^(?:(?:[^\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 FB(e){return PB.test(e)}const GB=/^[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 VB(e){return GB.test(e)}function XB(e){return URL.canParse(e)}const ZB=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function WB(e){return ZB.test(e)}const tt=new Map;function KB(){tt.clear()}function YB(e,t){var n;return((n=tt.get(e))==null?void 0:n(t))??!0}function QB(){KB(),tt.set("date-time",NL),tt.set("date",oj),tt.set("duration",zL),tt.set("email",_L),tt.set("hostname",mB),tt.set("idn-email",bB),tt.set("idn-hostname",kB),tt.set("ipv4",wB),tt.set("ipv6",jB),tt.set("iri-reference",CB),tt.set("iri",RB),tt.set("json-pointer-uri-fragment",OB),tt.set("json-pointer",IB),tt.set("regex",LB),tt.set("relative-json-pointer",HB),tt.set("time",lj),tt.set("uri-reference",UB),tt.set("uri-template",FB),tt.set("uri",VB),tt.set("url",XB),tt.set("uuid",WB)}QB();function JB(e,t,n,r){return YB(n.format,r)}function eH(e,t,n,r){const s=nL(n)?n.then:!0,a=zI(n)?n.else:!0;return xt(e,t,n.if,r)?xt(e,t,s,r):xt(e,t,a,r)}function tH(e,t,n,r){return Gt(n.items,0,(s,a)=>Ko(r.length,a)||bi(e,t,s,r[a])&&t.AddIndex(a))}function nH(e,t,n,r){const s=sj(n)?n.prefixItems.length:0;return Gt(r,s,(a,i)=>bi(e,t,n.items,a)&&t.AddIndex(i))}function rH(e,t,n,r){return LI(n)?tH(e,t,n,r):nH(e,t,n,r)}function sH(e){return T0(e)}function aH(e,t,n,r){if(!sH(n))return!0;const s=XS(r,a=>xt(e,t,n.contains,a));return Ko(s,n.maxContains)}function iH(e,t,n,r){return Ko(r,n.maximum)}function oH(e,t,n,r){return Ko(r.length,n.maxItems)}function lH(e,t,n,r){return kD(r,n.maxLength)}function cH(e,t,n,r){return Ko(wt(r).length,n.maxProperties)}function uH(e){return T0(e)}function dH(e,t,n,r){if(!uH(n))return!0;const s=XS(r,(a,i)=>xt(e,t,n.contains,a)&&t.AddIndex(i));return jh(s,n.minContains)}function fH(e,t,n,r){return jh(r,n.minimum)}function hH(e,t,n,r){return jh(r.length,n.minItems)}function xH(e,t,n,r){return vD(r,n.minLength)}function pH(e,t,n,r){return jh(wt(r).length,n.minProperties)}function gH(e,t,n,r){return yD(r,n.multipleOf)}function mH(e,t,n,r){const s=new Yo;return!xt(e,s,n.not,r)&&t.Merge([s])}function yH(e,t,n,r){const s=n.oneOf.reduce((a,i)=>{const o=new Yo;return xt(e,o,i,r)?[...a,o]:a},[]);return re(s.length,1)&&t.Merge(s)}function bH(e,t,n,r){return(vt(n.pattern)?N0(n.pattern):n.pattern).test(r)}function kH(e,t,n,r){return Gt(ai(n.patternProperties),0,([s,a])=>{const i=N0(s);return Gt(ai(r),0,([o,l])=>!i.test(o)||bi(e,t,a,l)&&t.AddKey(o))})}function vH(e,t,n,r){return re(r.length,0)||Gt(n.prefixItems,0,(s,a)=>Ko(r.length,a)||bi(e,t,s,r[a])&&t.AddIndex(a))}function wH(e,t){return e.includes(t)||KS().exactOptionalPropertyTypes}function SH(e,t){return ht(e[t])}function jH(e,t,n,r){const s=ij(n)?n.required:[];return Gt(ai(n.properties),0,([i,o])=>{const l=!te(r,i)||bi(e,t,o,r[i])&&t.AddKey(i);return wH(s,i)?l:SH(r,i)||l})}function EH(e,t,n,r){return Gt(wt(r),0,(s,a)=>xt(e,t,n.propertyNames,s))}function $H(e,t,n,r){const s=e.RecursiveRef(n)??!1;return rt(s)&&xt(e,t,s,r)}function CH(e,t,n,r){const s=e.Ref(n)??!1,a=new Yo,i=rt(s)&&xt(e,a,s,r);return i&&t.Merge([a]),i}function TH(e,t,n,r){return Gt(n.required,0,s=>te(r,s))}function vj(e,t,n,r,s){return re(n,"object")?mD(s):re(n,"array")?Ie(s):re(n,"boolean")?mi(s):re(n,"integer")?qS(s):re(n,"number")?Rt(s):re(n,"null")?tu(s):re(n,"string")?vt(s):re(n,"bigint")?tr(s):re(n,"constructor")?HS(s):re(n,"function")?Sc(s):re(n,"symbol")?US(s):re(n,"undefined")||re(n,"void")?ht(s):!0}function MH(e,t,n,r,s){return VS(n,a=>vj(e,t,a,r,s))}function NH(e,t,n,r){return Ie(n.type)?MH(e,t,n.type,n,r):vj(e,t,n.type,n,r)}function AH(e,t,n,r){const s=t.GetIndices();return Gt(r,0,(a,i)=>(s.has(i)||xt(e,t,n.unevaluatedItems,a))&&t.AddIndex(i))}function zH(e,t,n,r){const s=t.GetKeys();return Gt(ai(r),0,([a,i])=>s.has(a)||xt(e,t,n.unevaluatedProperties,i)&&t.AddKey(a))}function RH(e){return!re(e.uniqueItems,!1)}function _H(e,t,n,r){if(!RH(n))return!0;const s=new Set(r.map(gI)).size,a=r.length;return re(s,a)}function bi(e,t,n,r){return t.Push()&&xt(e,t,n,r)&&t.Pop()}function xt(e,t,n,r){e.Push(n);const s=mf(n)?pL(e,t,n):(!rL(n)||NH(e,t,n,r))&&(!(ot(r)&&!Ie(r))||(!ij(n)||TH(e,t,n,r))&&(!jI(n)||fL(e,t,n,r))&&(!TI(n)||bL(e,t,n,r))&&(!MI(n)||kL(e,t,n,r))&&(!NI(n)||vL(e,t,n,r))&&(!rj(n)||kH(e,t,n,r))&&(!aj(n)||jH(e,t,n,r))&&(!QI(n)||EH(e,t,n,r))&&(!XI(n)||pH(e,t,n,r))&&(!PI(n)||cH(e,t,n,r)))&&(!Ie(r)||(!SI(n)||cL(e,t,n,r))&&(!T0(n)||yL(e,t,n,r))&&(!M0(n)||rH(e,t,n,r))&&(!HI(n)||aH(e,t,n,r))&&(!qI(n)||oH(e,t,n,r))&&(!nj(n)||dH(e,t,n,r))&&(!GI(n)||hH(e,t,n,r))&&(!sj(n)||vH(e,t,n,r))&&(!sL(n)||_H(e,t,n,r)))&&(!vt(r)||(!UI(n)||lH(e,t,n,r))&&(!VI(n)||xH(e,t,n,r))&&(!DI(n)||JB(e,t,n,r))&&(!YI(n)||bH(e,t,n,r)))&&(!(Rt(r)||tr(r))||(!_I(n)||jL(e,t,n,r))&&(!OI(n)||EL(e,t,n,r))&&(!BI(n)||iH(e,t,n,r))&&(!FI(n)||fH(e,t,n,r))&&(!ZI(n)||gH(e,t,n,r)))&&(!tL(n)||CH(e,t,n,r))&&(!eL(n)||$H(e,t,n,r))&&(!AI(n)||wL(e,t,n,r))&&(!CI(n)||gL(e,t,n,r))&&(!RI(n)||SL(e,t,n,r))&&(!II(n)||eH(e,t,n,r))&&(!WI(n)||mH(e,t,n,r))&&(!EI(n)||hL(e,t,n,r))&&(!$I(n)||xL(e,t,n,r))&&(!KI(n)||yH(e,t,n,r))&&(!aL(n)||!Ie(r)||AH(e,t,n,r))&&(!iL(n)||!ot(r)||zH(e,t,n,r))&&(!wI(n)||oL(e,t,n,r));return e.Pop(n),s}function OH(e,t){return ot(t)&&!Eh(e)?t[e]:void 0}function DH(e,t){return e.reduce((n,r)=>OH(r,n),t)}function IH(e){if(re(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 LH(e,t){const n=IH(t);return DH(n,e)}const Th="https://json-schema.org";function wj(e,t){if(ot(e)&&oi(e)&&re(e.$dynamicAnchor,t))return e;if(ot(e))for(const n of wt(e)){const r=wj(e[n],t);if(r)return r}}function Q1(e,t,n){if(re(e,n))return t.href;const r=qn(e)&&yr(e)?new URL(e.$id,t.href):t;if(Ie(e))for(const s of e){const a=Q1(s,r,n);if(!ht(a))return a}else if(ot(e))for(const s of wt(e)){const a=Q1(e[s],r,n);if(!ht(a))return a}}function BH(e,t,n){if(re(e.$id,n.hash))return e;const r=new URL(n.href,t.href);if(re(t.pathname,r.pathname))return n.hash.startsWith("#")?Sj(e,n):e}function HH(e,t,n){const r=new URL(`#${e.$anchor}`,t.href),s=new URL(n.href,t.href);return re(r.href,s.href)?e:void 0}function qH(e,t,n){const r=new URL(`#${e.$dynamicAnchor}`,t.href),s=new URL(n.href,t.href);return re(r.href,s.href)?e:void 0}function Sj(e,t){if(t.href.endsWith("#"))return e;if(!t.hash.startsWith("#"))return;const n=decodeURIComponent(t.hash.slice(1));return n.startsWith("/")?LH(e,n):void 0}function UH(e,t,n){if(yr(e)){const r=BH(e,t,n);if(!ht(r))return r}if(W1(e)){const r=HH(e,t,n);if(!ht(r))return r}if(oi(e)){const r=qH(e,t,n);if(!ht(r))return r}return Sj(e,n)}function PH(e,t,n){return e.reduce((r,s)=>{const a=Mh(s,t,n);return ht(a)?r:a},void 0)}function FH(e){return re(e,"const")||re(e,"enum")}function GH(e,t,n){return wt(e).reduce((r,s)=>{if(FH(s))return r;const a=Mh(e[s],t,n);return ht(a)?r:a},void 0)}function Mh(e,t,n){const r=qn(e)&&yr(e)?new URL(e.$id,t.href):t;if(qn(e)){const s=UH(e,r,n);if(!ht(s))return s}if(Ie(e))return PH(e,r,n);if(ot(e))return GH(e,r,n)}function VH(e,t,n){return Q1(e,new URL(t||".",Th),n)}function XH(e,t,n,r){const s=Nh(e,t,n,r,!1);return qn(s)&&yr(s)?s:void 0}function mv(e){return e.href.split("#")[0]}function ZH(e,t){return te(e,t)?e[t]:void 0}function WH(e,t,n){return Mh(e,t,n)}function KH(e,t,n){const r=mv(n);if(re(r,mv(t))||!te(e,r))return;const s=e[r],a=qn(s)&&yr(s)?new URL(s.$id,r):new URL(r);return re(n.hash,"")?s:Mh(s,a,n)}function YH(e,t,n,r,s){if(!r.$ref.startsWith("#")||te(e,"$schema"))return;const a=VH(t,n,s);if(!(ht(a)||re(a,n)))return{target:s,base:a,root:t}}function QH(e,t,n){const r=e[t];if(qn(r))return{target:n,base:t,root:r}}function JH(e,t,n,r,s){const a=s?QH(e.context,r,n):void 0;return ht(a)?YH(e.root,e.lexicalSchema,e.referenceBase,t,n):a}function eq(e,t,n,r,s,a){if(yr(s))return;const i=XH(e,t,n,r);if(!(!i||a.includes(i)))return{target:s,resource:i}}function Nh(e,t,n,r,s=!0){const a=new URL(n||".",Th),i=s&&yr(t)?new URL(t.$id,a):a,o=new URL(r,i.href);return ZH(e,r)??WH(t,i,o)??KH(e,i,o)}function tq(e,t,n,r,s,a){const i=new URL(n||".",Th),o=s.$dynamicRef.startsWith("#")?r:t,l=Nh(e,o,n,s.$dynamicRef,!1);if(ht(l)){const f=new URL(s.$dynamicRef,i).hash;if(!f.startsWith("#/")&&f.startsWith("#")){const h=decodeURIComponent(f.slice(1));return a.find(m=>re(m.$dynamicAnchor,h))??wj(t,h)}return}return!qn(l)||!oi(l)||new URL(s.$dynamicRef,i).hash.startsWith("#/")?l:a.find(f=>re(f.$dynamicAnchor,l.$dynamicAnchor))??l}function nq(e,t){const n=e.inRetrievedFrame?e.lexicalSchema:e.root,r=t.$ref.startsWith("#")?e.lexicalSchema:n,s=Nh(e.context,r,e.referenceBase,t.$ref,!1);if(!s||!qn(s))return{schema:s};const a=new URL(t.$ref,e.referenceBase).href.split("#")[0],i=!re(a,e.resourceBase),o=JH(e,t,s,a,i),l=i?eq(e.context,e.root,e.referenceBase,a,s,e.ids):void 0;return{schema:s,retrievedResource:o,resolvedResource:l}}function rq(e,t){const n=K1(e.lexicalSchema)?e.recursiveAnchors[0]:e.lexicalSchema;return Nh(e.context,n,e.lexicalBase,t.$recursiveRef,!1)}function sq(e,t){return tq(e.context,e.root,e.lexicalBase,e.lexicalSchema,t,e.dynamicAnchors)}var Ze=function(e,t,n,r){if(n==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n==="m"?r:n==="a"?r.call(e):r?r.value:t.get(e)},qe,vd,jj,J1,qu,yv,bv,kv,vv,np,rp,eg,tg,wv,Ej;class aq{constructor(t,n){qe.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 Ze(this,qe,"m",J1).call(this,this.ids)}Push(t){if(!qn(t))return;yr(t)&&Ze(this,qe,"m",eg).call(this,t),W1(t)&&this.anchors.push(t),K1(t)&&this.recursiveAnchors.push(t),oi(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){qn(t)&&(yr(t)&&Ze(this,qe,"m",tg).call(this,t),W1(t)&&this.anchors.pop(),K1(t)&&this.recursiveAnchors.pop(),oi(t)&&this.dynamicAnchors.pop(),this.retrievedResources.has(t)&&this.retrievedFrames.pop(),Ze(this,qe,"m",Ej).call(this,t))}Ref(t){const n=nq(Ze(this,qe,"m",vd).call(this),t);return Ze(this,qe,"m",jj).call(this,n),n.schema}RecursiveRef(t){const n=rq(Ze(this,qe,"m",vd).call(this),t);return n&&(this.pendingResource=!0),n}DynamicRef(t){const n=sq(Ze(this,qe,"m",vd).call(this),t);return n&&(this.pendingResource=!0),n}}qe=new WeakSet,vd=function(){return{context:this.context,root:this.schema,ids:this.ids,lexicalSchema:Ze(this,qe,"m",bv).call(this),lexicalBase:this.LexicalBaseURL(),referenceBase:Ze(this,qe,"m",yv).call(this),resourceBase:Ze(this,qe,"m",qu).call(this),recursiveAnchors:this.recursiveAnchors,dynamicAnchors:this.dynamicAnchors,inRetrievedFrame:this.retrievedFrames.length>0}},jj=function(t){ht(t.schema)||(this.pendingResource=!0),ht(t.resolvedResource)||Ze(this,qe,"m",wv).call(this,t.resolvedResource.target,t.resolvedResource.resource),ht(t.retrievedResource)||this.retrievedResources.set(t.retrievedResource.target,{base:t.retrievedResource.base,root:t.retrievedResource.root})},J1=function(t){const n=this.retrievedFrames[this.retrievedFrames.length-1],r=n?new URL(n.base):new URL(Th);return(n?t.slice(n.idDepth):t).reduce((a,i)=>new URL(i.$id,a),r).href},qu=function(){const t=this.retrievedFrames[this.retrievedFrames.length-1];return t?this.resourceIds.slice(t.resourceDepth).reduce((n,r)=>new URL(r.$id,n),new URL(t.base)).href:Ze(this,qe,"m",J1).call(this,this.resourceIds)},yv=function(){if(this.retrievedFrames.length>0)return Ze(this,qe,"m",qu).call(this);const t=this.ids[this.ids.length-1];return t&&!/^[A-Za-z][A-Za-z0-9+.-]*:/.test(t.$id)?this.LexicalBaseURL():Ze(this,qe,"m",qu).call(this)},bv=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},kv=function(t){t.forEach(n=>Ze(this,qe,"m",np).call(this,n,!1))},vv=function(t){t.forEach(n=>Ze(this,qe,"m",rp).call(this,n,!1))},np=function e(t,n=!0){if(mf(t))return;if(Ie(t))return Ze(this,qe,"m",kv).call(this,t);if(!qn(t))return;const r=t;if(!(!n&&yr(r))){!n&&oi(r)&&this.dynamicAnchors.push(r);for(const s of wt(r))Ze(this,qe,"m",e).call(this,r[s],!1)}},rp=function e(t,n=!0){if(mf(t))return;if(Ie(t))return Ze(this,qe,"m",vv).call(this,t);if(!qn(t))return;const r=t;if(!(!n&&yr(r))){!n&&oi(r)&&this.dynamicAnchors.pop();for(const s of wt(r))Ze(this,qe,"m",e).call(this,r[s],!1)}},eg=function(t){this.ids.push(t);const n=this.pendingResource;this.pendingResource=!1,n&&this.resourceIds.push(t),Ze(this,qe,"m",np).call(this,t,!0)},tg=function(t){this.ids.pop(),this.resourceIds.length>0&&re(this.resourceIds[this.resourceIds.length-1],t)&&this.resourceIds.pop(),Ze(this,qe,"m",rp).call(this,t,!0)},wv=function(t,n){Ze(this,qe,"m",eg).call(this,n),this.resolvedResources.set(t,n)},Ej=function(t){if(!this.resolvedResources.has(t))return;const n=this.resolvedResources.get(t);Ze(this,qe,"m",tg).call(this,n),this.resolvedResources.delete(t)};function iq(...e){const[t,n,r]=QS(e,{3:(i,o,l)=>[i,o,l],2:(i,o)=>[{},i,o]}),s=new aq(t,n),a=new Yo;return xt(s,a,n,r)}function Uu(...e){const[t,n,r]=QS(e,{3:(s,a,i)=>[s,a,i],2:(s,a)=>[{},s,a]});return iq(t,n,r)}BigInt(Number.MAX_SAFE_INTEGER);BigInt(Number.MIN_SAFE_INTEGER);const oq=ln({type:_n("insert"),path:Zt(),value:C0()}),lq=Object({type:_n("update"),path:Zt(),value:C0()}),cq=ln({type:_n("delete"),path:Zt()});Ch([oq,lq,cq]);const uq=ln({text:Zt({minLength:1}),status:Ch([_n("pending"),_n("in_progress"),_n("completed")])}),dq=ln({items:yi(uq)}),fq=ln({label:Zt({minLength:1}),description:Va(Zt())}),hq=ln({question:Zt({minLength:1}),header:Zt({minLength:1,maxLength:16}),options:yi(fq,{minItems:2,maxItems:4}),multiSelect:Va(mI())}),xq=ln({selected:yi(Zt()),other:Va(Zt())}),pq=Ch([ln({outcome:_n("answered"),answers:yi(xq),at:Gl()}),ln({outcome:_n("dismissed"),at:Gl()}),ln({outcome:_n("cancelled"),at:Gl()})]),gq=ln({id:Zt({minLength:1}),questions:yi(hq,{minItems:1,maxItems:4}),askedAt:Gl(),resolution:Va(pq)}),mq=ln({requests:yi(gq)}),yq=ln({patch:Zt()}),bq=ln({name:Zt(),args:Zt(),status:Ch([_n("running"),_n("ok"),_n("error"),_n("cancelled")]),durationMs:Va(Gl()),error:Va(Zt()),details:Va(C0())}),kq=ln({code:Zt(),calls:yi(bq)});function Ah(e,t){return e==="pinomad.todo"&&Uu(dq,t)?{type:"pinomad.todo",value:t}:e==="pinomad.question"&&Uu(mq,t)?{type:"pinomad.question",value:t}:e==="pinomad.diff"&&Uu(yq,t)?{type:"pinomad.diff",value:t}:e==="pinomad.codemode"&&Uu(kq,t)?{type:"pinomad.codemode",value:t}:{type:"fallback",value:t}}const vq=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/,wq=/^\+\s*\d+ /,Sq=/^-\s*\d+ /;function jq(e){let t=0,n=0,r=0,s=0,a=!1;for(const i of e.split(`
|
|
381
|
-
`)){const o=vq.exec(i);if(o){r=Number.parseInt(o[2]??"1",10),s=Number.parseInt(o[4]??"1",10),a=!0;continue}if(!a)continue;if(r===0&&s===0){a=!1;continue}const l=i.charAt(0);l===" "?(r-=1,s-=1):l==="-"?(r-=1,n+=1):l==="+"&&(s-=1,t+=1)}return{additions:t,deletions:n}}function Eq(e){let t=0,n=0;for(const r of e.split(`
|
|
382
|
-
`))wq.test(r)?t+=1:Sq.test(r)&&(n+=1);return{additions:t,deletions:n}}function $q(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:r,diff:s}=n,a=typeof r=="string"?jq(r):typeof s=="string"?Eq(s):void 0;return a!==void 0&&(a.additions>0||a.deletions>0)?a:void 0}function Cq(e){return e.pinomad}function $j(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}function Tq(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 lo=e=>e.type==="toolCall"&&e.id!==void 0;function Mq(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 Nq(e){if(typeof e!="object"||e===null)return;const t=e.conversationId;return typeof t=="number"?t:void 0}function Aq(e,t,n){const r=e.status==="ok"?"output-available":e.status==="error"?"output-error":t&&e.status==="running"?"input-available":"output-error",s=e.status==="error"?e.error:r==="output-error"?"Cancelled":void 0,a=e.details===void 0?void 0:Ah(n[e.name],e.details),i=(a==null?void 0:a.type)==="pinomad.diff"?{kind:"diff",patch:a.value.patch}:void 0;return{state:r,toolName:e.name,argsText:e.args,...s===void 0?{}:{output:s},...e.durationMs===void 0?{}:{durationMs:e.durationMs},...i===void 0?{}:{pinomad:i}}}function zq(e,t,n,r){const s=e.id,a=t.results.get(s),i=t.partial?void 0:n.get(s),o=(i==null?void 0:i.name)??e.name,l=Mq(e.arguments,o);let c,d;a!==void 0?(c=a.isError===!0?"output-error":"output-available",d=$j(a.content)):(i==null?void 0:i.status)==="running"?(c="input-available",d=i.output):t.partial===!0?c="input-streaming":t.msg.stopReason!=="toolUse"?(c="output-error",d="Not run: the answer was interrupted."):(c="input-available",d=i==null?void 0:i.output);const f=(a==null?void 0:a.details)??(i==null?void 0:i.details),h=f===void 0?void 0:Ah(r[o??""],f),p=a!==void 0&&a.isError!==!0?$q({details:a.details}):void 0,m=a===void 0?[]:Tq(a.content),k=Nq(f);let b,g;if((h==null?void 0:h.type)==="pinomad.diff"?b={kind:"diff",patch:h.value.patch}:k!==void 0&&(b={kind:"subagent",conversationId:k,...d===void 0?{}:{output:d}}),(h==null?void 0:h.type)==="pinomad.codemode"){const y=a===void 0;g=h.value.calls.map(v=>Aq(v,y,r))}return{state:c,toolCallId:s,...o===void 0?{}:{toolName:o},...l===void 0?{}:{argsText:l},...d===void 0?{}:{output:d},...p===void 0?{}:{diffStat:p},...m.length===0?{}:{images:m},...g===void 0||g.length===0?{}:{children:g},...b===void 0?{}:{pinomad:b}}}function Rq(e){const t=[];for(const n of e)if(lo(n)){const r=t[t.length-1];(r==null?void 0:r.kind)==="tools"?r.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 _q(e,t,n,r,s){var E,z,N;const a=new Map(((E=r?n.tools:void 0)==null?void 0:E.map(T=>[T.callId,T]))??[]),i=r?(z=n.generation)==null?void 0:z.message:void 0,o=new Map,l=[...t.assistants.map(({id:T,msg:R,results:_})=>({id:T,msg:R,results:_})),...i===void 0?[]:[{id:"live",msg:i,partial:!0,results:o}]],c=l[l.length-1],d=t.assistants[t.assistants.length-1],f=!r,p=(c===void 0?[]:c.msg.content.filter(T=>T.type==="text")).map(T=>T.text??"").join(""),m=(c==null?void 0:c.msg.content.some(lo))===!0,k=p!==""&&(f||!m),b=(T,R)=>lo(R)&&!T.results.has(R.id)&&(T.partial===!0||T.msg.stopReason==="toolUse"),g=l.some(T=>T.msg.content.some(R=>b(T,R))),y=c==null?void 0:c.msg.content[c.msg.content.length-1];let v;f?v="settled":k?v="answering":g||y!==void 0&&lo(y)?v="acting":l.length>0?v="thinking":v="hidden";const w=v==="thinking"||v==="acting",S=[];for(const T of l){const R=T===c,_=T.msg.content;Rq(_).forEach((M,D)=>{if(M.kind==="tools"){const O=M.blocks.filter(H=>b(T,H)),L=w&&O.length>0;S.push({kind:"tools",id:`${T.id}-tools-${D}`,tools:M.blocks.map(H=>zq(H,T,a,s)),live:L,...L&&O[0]!==void 0?{activeToolCallId:O[0].id}:{}});return}if(M.kind==="text"){R&&k||S.push({kind:"interim",id:`${T.id}-text-${D}`,text:M.block.text??""});return}const I=_.indexOf(M.block);S.push({kind:"thinking",id:`${T.id}-thinking-${D}`,text:M.block.thinking??"",live:w&&T.partial===!0&&I===_.length-1})})}const j=(d==null?void 0:d.msg.stopReason)==="aborted",C=f&&(d==null?void 0:d.msg.stopReason)==="error",$=(N=l[0])==null?void 0:N.msg.timestamp;let A;if(f&&$!==void 0){const T=k?c==null?void 0:c.msg.timestamp:t.lastTs??(c==null?void 0:c.msg.timestamp);A=T===void 0?void 0:T-$}return{kind:"run",id:e,cot:{phase:v,...C===!0?{outcome:"failed"}:{},...$===void 0?{}:{anchorMs:$},...A===void 0?{}:{elapsedMs:A},steps:S,...k?{answer:{text:p,streaming:(c==null?void 0:c.partial)===!0}}:{}},interrupted:j,...f&&!j&&C!==!0&&d!==void 0?{forkEntryId:d.id}:{},...C===!0?{failure:(d==null?void 0:d.msg.errorMessage)??"The run failed."}:{}}}function Oq(e,t,n){var l;const r=[],s=e.docs["pi.live"]??{};let a,i=0;const o=c=>{var d;if(a!==void 0){if(a.assistants.length>0||a.orphans.size>0||c){const f=((d=a.assistants[0])==null?void 0:d.id)??`open-${i++}`;r.push(_q(`run-${f}`,a,s,c,t))}a=void 0}};for(const c of e.entries){const d=(l=c.model)==null?void 0:l[0],f=String(c.id);if(c.kind==="pi.user"&&(d==null?void 0:d.role)==="user")o(!1),r.push({kind:"user",id:f,text:$j(d.content)});else if(c.kind==="pi.compaction")o(!1),r.push({kind:"compaction",id:f});else if(c.kind==="pi.reset")o(!1),r.push({kind:"reset",id:f});else if(c.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(!lo(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(c.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=>lo(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),r}function Dq(e){return typeof e=="string"?e:e.flatMap(t=>t.type==="text"&&t.text!==void 0?[t.text]:[]).join("")}const Iq=e=>e.docs["pi.live"]??{},Cj=e=>e.docs["pi.agent"]??{};function Lq(e){var s;const t=Iq(e),n=t.generation,r=(s=t.compactions)==null?void 0:s[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...":r!==void 0?r.retry?`Retrying ${r.reason} compaction (attempt ${r.attempt+1})...`:`Compacting (${r.reason})...`:""}function Bq(e){return(e.docs["pi.inbox"]??{items:[]}).items.map(n=>({id:n.id,mode:n.mode,text:n.mode==="write"?`<${String(n.entry.kind)}>`:Dq(n.content)}))}function Hq(e){const t=e.state,n=t.status==="waiting"?`waiting on ${t.on.join(", ")}`:t.status==="completing"?`completing (${t.outcome})`:`${t.status} ${t.phase}`,r=[e.background?"background":"",e.abortRequested?"aborting":""].filter(Boolean),s=e.conversations.length>0?` owns conversation ${e.conversations.join(", ")}`:"";return`${e.kind} #${e.id}: ${n}${r.length>0?` [${r.join(", ")}]`:""}${s}`}function qq(e){const t=e.docs["pi.usage"];return t===void 0?[]:[...Object.entries(t.models),...Object.entries(t.tools)].map(([n,r])=>({key:n,input:r.input,output:r.output,cost:r.cost.total}))}function Tj(e){const t=Object.values(e.tasks),n=new Set(t.flatMap(i=>i.conversations)),r=i=>t.filter(o=>o.owner===i.id||o.owner===void 0&&i.conversations.includes(o.conversationId)),s=[],a=(i,o)=>{s.push({id:i.id,depth:o,label:Hq(i)});for(const l of r(i))a(l,o+1)};for(const i of t)i.owner===void 0&&!n.has(i.conversationId)&&a(i,0);return s}const Uq={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none"},Mj=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n,absoluteStrokeWidth:r=!1,className:s="",altIcon:a,showAlt:i=!1,icon:o,primaryColor:l,secondaryColor:c,disableSecondaryOpacity:d=!1,...f},h)=>{const p=n!==void 0?r?Number(n)*24/Number(t):n:void 0,m=p!==void 0?{strokeWidth:p,stroke:"currentColor"}:{},k={ref:h,...Uq,width:t,height:t,color:l||e,className:s,...m,...f},g=[...i&&a?a:o].sort(([,y],[,v])=>{const w=y.opacity!==void 0;return v.opacity!==void 0?1:w?-1:0}).map(([y,v])=>{const w=v.opacity!==void 0,S=w&&!d?v.opacity:void 0,j=c?{...v.stroke!==void 0?{stroke:w?c:l||e}:{fill:w?c:l||e}}:{};return x.createElement(y,{...v,...m,...j,opacity:S,key:v.key})});return x.createElement("svg",k,g)});Mj.displayName="HugeiconsIcon";const Pq=[["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"}]],Fq=[["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"}]],Gq=[["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"}]],Vq=[["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"}]],Xq=[["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"}]],Zq=[["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"}]],Wq=[["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"}]],Kq=[["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"}]],Yq=[["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"}]],Qq=[["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"}]],Jq=[["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"}]],eU=[["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"}]],tU=[["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"}]],nU=[["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"}]],rU=[["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"}]],sU=[["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"}]],aU=[["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"}]],iU=[["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"}]],oU=[["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"}]],lU=[["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"}]],cU=[["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"}]],uU=[["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"}]],dU=[["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"}]],fU=[["path",{d:"M5 14L8.5 17.5L19 6.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",key:"0"}]],hU=[["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"}]],xU=1.5;function We(e){return function(n){return u.jsx(Mj,{color:"currentColor",icon:e,strokeWidth:xU,...n})}}const pU=We(Fq),gU=We(Gq),wd=We(Vq),Nj=We(Xq),nu=We(Zq),Sv=We(fU),yf=We(Wq),mU=We(Yq),Aj=We(Jq),zj=We(eU),ng=We(tU),rg=We(rU),yU=We(nU),Rj=We(sU),bU=We(aU),kU=We(iU),_j=We(oU),vU=We(lU),Sd=We(Pq),wU=We(cU),Oj=We(Kq),SU=We(uU),jU=We(dU),EU=We(Qq),Dj=We(hU);function z0(e,t){return function({size:r=24,isAnimated:s=!0,className:a,ref:i,...o}){const l=x.useRef(null);return x.useImperativeHandle(i,()=>l.current,[]),x.useLayoutEffect(()=>{const c=l.current,d=c==null?void 0:c.closest("button, a, [role='menuitem']");if(!s||!c||!d)return;let f=d.matches(":hover");const h=k=>{k.relatedTarget instanceof Node&&!k.relatedTarget.isConnected&&(f=!0)},p=k=>{f||k.pointerType!=="mouse"||k.buttons!==0||d.matches(":disabled, [aria-disabled='true']")||(f=!0,c.setAttribute("data-icon-hover",""))},m=()=>{f=!1,c.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),c.removeAttribute("data-icon-hover")}},[s]),u.jsx("svg",{ref:l,xmlns:"http://www.w3.org/2000/svg",width:r,height:r,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":s?e:void 0,...o,children:t})}}const $U=z0("new-chat",u.jsxs(u.Fragment,{children:[u.jsxs("g",{"data-icon-part":"bubble",children:[u.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"}),u.jsx("path",{d:"M8.5 15H15.5M8.5 10H12"})]}),u.jsx("path",{"data-icon-part":"add",d:"M15 5.5H22M18.5 2L18.5 9"})]})),Ij=u.jsxs(u.Fragment,{children:[u.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"}),u.jsx("path",{"data-icon-part":"divider",d:"M9 3V21"})]}),sg=z0("sidebar",Ij),CU=z0("sidebar",u.jsx("g",{transform:"translate(24 0) scale(-1 1)",children:Ij}));function TU({remote:e,connected:t,onClose:n}){const[r,s]=x.useState(""),a=()=>{e.controller.addProject(r.trim()),n()};return u.jsx(ui,{isOpen:!0,onOpenChange:i=>i?void 0:n(),purpose:"form",width:480,children:u.jsx(sa,{header:u.jsx(di,{title:"Add project",subtitle:"A local directory on the host that conversations can work in.",onOpenChange:()=>n()}),content:u.jsx(aa,{children:u.jsx(Uo,{label:"Path",value:r,onChange:s})}),footer:u.jsx(qc,{children:u.jsxs(Kt,{gap:2,hAlign:"end",children:[u.jsx($e,{label:"Cancel",variant:"secondary",onClick:n}),u.jsx($e,{label:"Add project",variant:"primary",isDisabled:!t||r.trim()==="",onClick:a})]})})})})}function MU({project:e,remote:t,connected:n,onClose:r}){const s=()=>{t.controller.removeProject(e.path),r()};return u.jsx(ui,{isOpen:!0,onOpenChange:a=>a?void 0:r(),purpose:"form",width:480,children:u.jsx(sa,{header:u.jsx(di,{title:`Remove project ${e.name}?`,subtitle:"The directory and its conversations are kept; only the registration is removed.",onOpenChange:()=>r()}),content:u.jsx(aa,{}),footer:u.jsx(qc,{children:u.jsxs(Kt,{gap:2,hAlign:"end",children:[u.jsx($e,{label:"Cancel",variant:"secondary",onClick:r}),u.jsx($e,{label:"Remove project",variant:"primary",isDisabled:!n,onClick:s})]})})})})}const Lj="pinomad.projectSidebar.expanded",NU=()=>{const e=window.localStorage.getItem(Lj);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{}}},jv=e=>{window.localStorage.setItem(Lj,JSON.stringify(e))},Bj=e=>e.flatMap(t=>[t,...Bj(t.children)]);function Ev(e){const t=`pinomad.sidebarSection.${e}.expanded`,[n,r]=x.useState(()=>typeof window>"u"||window.localStorage.getItem(t)!=="false"),s=x.useId();return{expanded:n,contentId:s,toggle:()=>{const i=!n;window.localStorage.setItem(t,String(i)),r(i)}}}function Hj({connection:e}){return e==="connected"?u.jsx(_o,{variant:"success",label:"Connected",tooltip:"Connected to the host"}):u.jsx(_o,{variant:e==="closed"?"error":"warning",label:e,tooltip:e,isPulsing:!0})}function AU({connection:e,onCollapse:t}){return u.jsxs("div",{className:"flex h-6 items-center justify-between px-2",children:[u.jsx(Zr,{icon:u.jsx(sg,{className:"size-4"}),label:"Collapse sidebar",size:"sm",variant:"ghost",onClick:t}),u.jsx(Hj,{connection:e})]})}function $v({view:e,onOpenDevices:t,onSelect:n}){return u.jsx(Ma,{icon:u.jsx(yf,{"aria-hidden":"true"}),label:"Devices",isDisabled:e.connection!=="connected",onClick:()=>{t(),n==null||n()}})}function Cv({title:e,expanded:t,contentId:n,onToggle:r,actions:s}){return u.jsxs("div",{className:"pigui-sidenav-section-header",children:[u.jsxs("button",{type:"button",className:"pigui-sidenav-section-toggle","aria-label":t?`Collapse ${e}`:`Expand ${e}`,"aria-expanded":t,"aria-controls":n,onClick:r,children:[u.jsx("span",{className:"pigui-sidenav-section-toggle__title",children:e}),u.jsx(nu,{"aria-hidden":"true",className:"pigui-sidenav-section-toggle__chevron","data-expanded":t?"true":"false"})]}),u.jsx(Kt,{className:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:s})]})}function ag(){return u.jsx("span",{className:"pigui-session-glyph","data-testid":"session-glyph"})}function zU({expanded:e}){const t=e?yU:ng;return u.jsxs("span",{"aria-hidden":"true",className:"pigui-project-expansion-indicator","data-expanded":e?"true":"false",children:[u.jsx(t,{className:"pigui-project-expansion-indicator__state"}),u.jsx(nu,{className:"pigui-project-expansion-indicator__chevron"})]})}function ig({node:e,depth:t,shown:n,disabled:r,remote:s,onSelect:a}){const{summary:i}=e,o=u.jsx(Ma,{icon:u.jsx(ag,{}),label:i.title??"New conversation",isSelected:i.id===n,isDisabled:r,endContent:u.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"}),onClick:()=>{s.controller.switchConversation(i.id),a==null||a()},children:e.children.length===0?void 0:e.children.map(l=>u.jsx(ig,{node:l,depth:t+1,shown:n,disabled:r,remote:s,onSelect:a},l.summary.id))});return t>0?o:u.jsxs("div",{className:"pigui-sidenav-row-with-actions pigui-sidenav-session-row",children:[o,u.jsx(Kt,{className:"pigui-sidenav-row-actions pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:u.jsx(nh,{hasChevron:!1,button:{icon:u.jsx(_j,{"aria-hidden":"true"}),isIconOnly:!0,label:"Conversation actions",size:"sm",variant:"ghost",isDisabled:r},items:[{label:"Archive",icon:u.jsx(pU,{"aria-hidden":"true",size:16}),onClick:()=>void s.controller.archive(i.id,!0)}]})})]})}function RU({view:e,remote:t,draftingChat:n,shownId:r,onDraft:s,onSelect:a}){const i=e.connection!=="connected",[o,l]=x.useState(!1),[c,d]=x.useState(),[f,h]=x.useState(NU),p=Ev("chats"),m=Ev("projects"),k=y=>{s(y),a==null||a()},b=x.useMemo(()=>{var y;return r===void 0||(y=e.organized.projects.find(({conversations:v})=>Bj(v).some(w=>w.summary.id===r)))==null?void 0:y.project.path},[r,e.organized.projects]);x.useEffect(()=>{b!==void 0&&h(y=>{if(y[b]!==!1)return y;const v={...y,[b]:!0};return jv(v),v})},[b]);const g=y=>h(v=>{const w={...v,[y]:!(v[y]??!0)};return jv(w),w});return u.jsxs(u.Fragment,{children:[u.jsx(ed,{isHeaderHidden:!0,title:"New chat",children:u.jsx(Ma,{icon:u.jsx($U,{className:"size-4"}),label:"New chat",isSelected:n,isDisabled:i,onClick:()=>k({kind:"chat"})})}),u.jsxs(ed,{isHeaderHidden:!0,title:"Chats",children:[u.jsx(Cv,{title:"Chats",expanded:p.expanded,contentId:p.contentId,onToggle:p.toggle,actions:u.jsx(Zr,{icon:u.jsx(Sd,{"aria-hidden":"true"}),label:"New chat without a project",tooltip:"New chat",size:"sm",variant:"ghost",isDisabled:i,onClick:()=>k({kind:"chat"})})}),u.jsx(pt,{id:p.contentId,gap:.5,children:p.expanded?e.organized.chats.length===0?u.jsx(Ma,{icon:u.jsx(ag,{}),isDisabled:!0,label:"No chats"}):e.organized.chats.map(y=>u.jsx(ig,{node:y,depth:0,shown:r,disabled:i,remote:t,onSelect:a},y.summary.id)):null})]}),u.jsxs(ed,{isHeaderHidden:!0,title:"Projects",children:[u.jsx(Cv,{title:"Projects",expanded:m.expanded,contentId:m.contentId,onToggle:m.toggle,actions:u.jsx(Zr,{icon:u.jsx(Sd,{"aria-hidden":"true"}),label:"Add project",tooltip:"Add project",size:"sm",variant:"ghost",isDisabled:i,onClick:()=>l(!0)})}),u.jsx(pt,{id:m.contentId,gap:.5,children:m.expanded?e.organized.projects.map(({project:y,conversations:v})=>{const w=f[y.path]??!0;return u.jsxs("div",{className:"pigui-sidenav-row-with-actions",children:[u.jsx(Ma,{collapsible:{isCollapsed:!w,onCollapsedChange:()=>g(y.path)},icon:u.jsx(zU,{expanded:w}),label:y.name,isDisabled:i,endContent:u.jsx("span",{"aria-hidden":"true",className:"pigui-sidenav-actions-spacer"}),children:v.length===0?u.jsx(Ma,{icon:u.jsx(ag,{}),isDisabled:!0,label:"No conversations"}):v.map(S=>u.jsx(ig,{node:S,depth:0,shown:r,disabled:i,remote:t,onSelect:a},S.summary.id))}),u.jsx(Kt,{className:"pigui-sidenav-row-actions",gap:.5,vAlign:"center",children:u.jsxs(Kt,{className:"pigui-sidenav-hover-actions",gap:.5,vAlign:"center",children:[u.jsx(Zr,{icon:u.jsx(Sd,{"aria-hidden":"true"}),label:`New conversation in ${y.name}`,size:"sm",variant:"ghost",isDisabled:i,onClick:()=>k({kind:"project",path:y.path})}),u.jsx(nh,{hasChevron:!1,button:{icon:u.jsx(_j,{"aria-hidden":"true"}),isIconOnly:!0,label:`Project actions for ${y.name}`,size:"sm",variant:"ghost",isDisabled:i},items:[{label:"Remove project",icon:u.jsx(EU,{"aria-hidden":"true",size:16}),onClick:()=>d(y)}]})]})})]},y.path)}):null})]}),o?u.jsx(TU,{remote:t,connected:!i,onClose:()=>l(!1)}):null,c===void 0?null:u.jsx(MU,{project:c,remote:t,connected:!i,onClose:()=>d(void 0)})]})}var Ea=(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))(Ea||{});const _U=[0,1],qj=[1,0],Uj=[2,3],Pj=[3,2],OU={L:_U,M:qj,Q:Uj,H:Pj},DU=/^\d*$/,IU=/^[A-Z0-9 $%*+./:-]*$/,sp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:",R0=1,_0=40,Tv=3,LU=3,Pu=40,BU=10,Fj=[[-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]],Gj=[[-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 HU{constructor(t,n,r,s){ee(this,"size");ee(this,"mask");ee(this,"modules",[]);ee(this,"types",[]);if(this.version=t,this.ecc=n,t<R0||t>_0)throw new RangeError("Version value out of range");if(s<-1||s>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(r);if(this.drawCodewords(i),s===-1){let o=1e9;for(let l=0;l<8;l++){this.applyMask(l),this.drawFormatBits(l);const c=this.getPenaltyScore();c<o&&(s=l,o=c),this.applyMask(l)}}this.mask=s,this.applyMask(s),this.drawFormatBits(s)}getModule(t,n){return t>=0&&t<this.size&&n>=0&&n<this.size&&this.modules[n][t]}drawFunctionPatterns(){for(let r=0;r<this.size;r++)this.setFunctionModule(6,r,r%2===0,Ea.Timing),this.setFunctionModule(r,6,r%2===0,Ea.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 r=0;r<n;r++)for(let s=0;s<n;s++)r===0&&s===0||r===0&&s===n-1||r===n-1&&s===0||this.drawAlignmentPattern(t[r],t[s]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(t){const n=this.ecc[1]<<3|t;let r=n;for(let a=0;a<10;a++)r=r<<1^(r>>>9)*1335;const s=(n<<10|r)^21522;for(let a=0;a<=5;a++)this.setFunctionModule(8,a,Pr(s,a));this.setFunctionModule(8,7,Pr(s,6)),this.setFunctionModule(8,8,Pr(s,7)),this.setFunctionModule(7,8,Pr(s,8));for(let a=9;a<15;a++)this.setFunctionModule(14-a,8,Pr(s,a));for(let a=0;a<8;a++)this.setFunctionModule(this.size-1-a,8,Pr(s,a));for(let a=8;a<15;a++)this.setFunctionModule(8,this.size-15+a,Pr(s,a));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let t=this.version;for(let r=0;r<12;r++)t=t<<1^(t>>>11)*7973;const n=this.version<<12|t;for(let r=0;r<18;r++){const s=Pr(n,r),a=this.size-11+r%3,i=Math.floor(r/3);this.setFunctionModule(a,i,s),this.setFunctionModule(i,a,s)}}drawFinderPattern(t,n){for(let r=-4;r<=4;r++)for(let s=-4;s<=4;s++){const a=Math.max(Math.abs(s),Math.abs(r)),i=t+s,o=n+r;i>=0&&i<this.size&&o>=0&&o<this.size&&this.setFunctionModule(i,o,a!==2&&a!==4,Ea.Position)}}drawAlignmentPattern(t,n){for(let r=-2;r<=2;r++)for(let s=-2;s<=2;s++)this.setFunctionModule(t+s,n+r,Math.max(Math.abs(s),Math.abs(r))!==1,Ea.Alignment)}setFunctionModule(t,n,r,s=Ea.Function){this.modules[n][t]=r,this.types[n][t]=s}addEccAndInterleave(t){const n=this.version,r=this.ecc;if(t.length!==jd(n,r))throw new RangeError("Invalid argument");const s=Gj[r[0]][n],a=Fj[r[0]][n],i=Math.floor(og(n)/8),o=s-i%s,l=Math.floor(i/s),c=[],d=WU(a);for(let h=0,p=0;h<s;h++){const m=t.slice(p,p+l-a+(h<o?0:1));p+=m.length;const k=KU(m,d);h<o&&m.push(0),c.push(m.concat(k))}const f=[];for(let h=0;h<c[0].length;h++)c.forEach((p,m)=>{(h!==l-a||m>=o)&&f.push(p[h])});return f}drawCodewords(t){if(t.length!==Math.floor(og(this.version)/8))throw new RangeError("Invalid argument");let n=0;for(let r=this.size-1;r>=1;r-=2){r===6&&(r=5);for(let s=0;s<this.size;s++)for(let a=0;a<2;a++){const i=r-a,l=(r+1&2)===0?this.size-1-s:s;!this.types[l][i]&&n<t.length*8&&(this.modules[l][i]=Pr(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 r=0;r<this.size;r++){let s;switch(t){case 0:s=(r+n)%2===0;break;case 1:s=n%2===0;break;case 2:s=r%3===0;break;case 3:s=(r+n)%3===0;break;case 4:s=(Math.floor(r/3)+Math.floor(n/2))%2===0;break;case 5:s=r*n%2+r*n%3===0;break;case 6:s=(r*n%2+r*n%3)%2===0;break;case 7:s=((r+n)%2+r*n%3)%2===0;break;default:throw new Error("Unreachable")}!this.types[n][r]&&s&&(this.modules[n][r]=!this.modules[n][r])}}getPenaltyScore(){let t=0;for(let a=0;a<this.size;a++){let i=!1,o=0;const l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[a][c]===i?(o++,o===5?t+=Tv:o>5&&t++):(this.finderPenaltyAddHistory(o,l),i||(t+=this.finderPenaltyCountPatterns(l)*Pu),i=this.modules[a][c],o=1);t+=this.finderPenaltyTerminateAndCount(i,o,l)*Pu}for(let a=0;a<this.size;a++){let i=!1,o=0;const l=[0,0,0,0,0,0,0];for(let c=0;c<this.size;c++)this.modules[c][a]===i?(o++,o===5?t+=Tv:o>5&&t++):(this.finderPenaltyAddHistory(o,l),i||(t+=this.finderPenaltyCountPatterns(l)*Pu),i=this.modules[c][a],o=1);t+=this.finderPenaltyTerminateAndCount(i,o,l)*Pu}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+=LU)}let n=0;for(const a of this.modules)n=a.reduce((i,o)=>i+(o?1:0),n);const r=this.size*this.size,s=Math.ceil(Math.abs(n*20-r*10)/r)-1;return t+=s*BU,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,r=[6];for(let s=this.size-7;r.length<t;s-=n)r.splice(1,0,s);return r}}finderPenaltyCountPatterns(t){const n=t[1],r=n>0&&t[2]===n&&t[3]===n*3&&t[4]===n&&t[5]===n;return(r&&t[0]>=n*4&&t[6]>=n?1:0)+(r&&t[6]>=n*4&&t[0]>=n?1:0)}finderPenaltyTerminateAndCount(t,n,r){return t&&(this.finderPenaltyAddHistory(n,r),n=0),n+=this.size,this.finderPenaltyAddHistory(n,r),this.finderPenaltyCountPatterns(r)}finderPenaltyAddHistory(t,n){n[0]===0&&(t+=this.size),n.pop(),n.unshift(t)}}function Gr(e,t,n){if(t<0||t>31||e>>>t)throw new RangeError("Value out of range");for(let r=t-1;r>=0;r--)n.push(e>>>r&1)}function Pr(e,t){return(e>>>t&1)!==0}class O0{constructor(t,n,r){if(this.mode=t,this.numChars=n,this.bitData=r,n<0)throw new RangeError("Invalid argument");this.bitData=r.slice()}getData(){return this.bitData.slice()}}const qU=[1,10,12,14],UU=[2,9,11,13],PU=[4,8,16,16];function Vj(e,t){return e[Math.floor((t+7)/17)+1]}function Xj(e){const t=[];for(const n of e)Gr(n,8,t);return new O0(PU,e.length,t)}function FU(e){if(!Zj(e))throw new RangeError("String contains non-numeric characters");const t=[];for(let n=0;n<e.length;){const r=Math.min(e.length-n,3);Gr(Number.parseInt(e.substring(n,n+r),10),r*3+1,t),n+=r}return new O0(qU,e.length,t)}function GU(e){if(!Wj(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 r=sp.indexOf(e.charAt(n))*45;r+=sp.indexOf(e.charAt(n+1)),Gr(r,11,t)}return n<e.length&&Gr(sp.indexOf(e.charAt(n)),6,t),new O0(UU,e.length,t)}function VU(e){return e===""?[]:Zj(e)?[FU(e)]:Wj(e)?[GU(e)]:[Xj(ZU(e))]}function Zj(e){return DU.test(e)}function Wj(e){return IU.test(e)}function XU(e,t){let n=0;for(const r of e){const s=Vj(r.mode,t);if(r.numChars>=1<<s)return Number.POSITIVE_INFINITY;n+=4+s+r.bitData.length}return n}function ZU(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 og(e){if(e<R0||e>_0)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 jd(e,t){return Math.floor(og(e)/8)-Fj[t[0]][e]*Gj[t[0]][e]}function WU(e){if(e<1||e>255)throw new RangeError("Degree out of range");const t=[];for(let r=0;r<e-1;r++)t.push(0);t.push(1);let n=1;for(let r=0;r<e;r++){for(let s=0;s<t.length;s++)t[s]=lg(t[s],n),s+1<t.length&&(t[s]^=t[s+1]);n=lg(n,2)}return t}function KU(e,t){const n=t.map(r=>0);for(const r of e){const s=r^n.shift();n.push(0),t.forEach((a,i)=>n[i]^=lg(a,s))}return n}function lg(e,t){if(e>>>8||t>>>8)throw new RangeError("Byte out of range");let n=0;for(let r=7;r>=0;r--)n=n<<1^(n>>>7)*285,n^=(t>>>r&1)*e;return n}function YU(e,t,n=1,r=40,s=-1,a=!0){if(!(R0<=n&&n<=r&&r<=_0)||s<-1||s>7)throw new RangeError("Invalid value");let i,o;for(i=n;;i++){const f=jd(i,t)*8,h=XU(e,i);if(h<=f){o=h;break}if(i>=r)throw new RangeError("Data too long")}for(const f of[qj,Uj,Pj])a&&o<=jd(i,f)*8&&(t=f);const l=[];for(const f of e){Gr(f.mode[0],4,l),Gr(f.numChars,Vj(f.mode,i),l);for(const h of f.getData())l.push(h)}const c=jd(i,t)*8;Gr(0,Math.min(4,c-l.length),l),Gr(0,(8-l.length%8)%8,l);for(let f=236;l.length<c;f^=253)Gr(f,8,l);const d=Array.from({length:Math.ceil(l.length/8)},()=>0);return l.forEach((f,h)=>d[h>>>3]|=f<<7-(h&7)),new HU(i,t,d,s)}function QU(e,t){var f;const{ecc:n="L",boostEcc:r=!1,minVersion:s=1,maxVersion:a=40,maskPattern:i=-1,border:o=1}=t||{},l=typeof e=="string"?VU(e):Array.isArray(e)?[Xj(e)]:void 0;if(!l)throw new Error(`uqr only supports encoding string and binary data, but got: ${typeof e}`);const c=YU(l,OU[n],s,a,i,r),d=JU({version:c.version,maskPattern:c.mask,size:c.size,data:c.modules,types:c.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 JU(e,t=1){if(!t)return e;const{size:n}=e,r=n+t*2;e.size=r,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:r},i=>!1)),e.data.push(Array.from({length:r},i=>!1));const s=Ea.Border;e.types.forEach(a=>{for(let i=0;i<t;i++)a.unshift(s),a.push(s)});for(let a=0;a<t;a++)e.types.unshift(Array.from({length:r},i=>s)),e.types.push(Array.from({length:r},i=>s));return e}/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function cg(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const bf=e=>e?`"${e}" `:"";function ug(e,t=""){if(typeof e!="boolean")throw new TypeError(bf(t)+"expected boolean, got type="+typeof e);return e}function co(e,t=""){if(typeof e!="number")throw new TypeError(bf(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(bf(t)+"expected integer >= 0, got "+e);return e}function Nt(e,t,n=""){if(cg(e)&&(t===void 0||e.length===t))return e;t!==void 0&&co(t,"length");const r=cg(e),s=t!==void 0?` of length ${t}`:"",a=r?`length=${e.length}`:`type=${typeof e}`,i=bf(n)+"expected Uint8Array"+s+", got "+a;throw r?new RangeError(i):new TypeError(i)}const Mv=(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 Nv(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function eP(e,t){Nt(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Yr(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function Ks(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function tP(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const uo=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function nP(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function rP(e){for(let t=0;t<e.length;t++)e[t]=nP(e[t]);return e}const Ra=uo?e=>e:rP;function sP(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 aP(e,t){if(sP(e,t)&&e.byteOffset<t.byteOffset)throw new Error("complex overlap of input and output is not supported")}function iP(e,t){return Mv(e,"defaults"),Mv(t,"opts"),Object.assign(e,t)}function oP(e,t){if(e=Nt(e),t=Nt(t),e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function lP(e,t,n){const r=t,s=()=>[],a=(o,l)=>r(l,...s(o)).update(o).digest(),i=r(new Uint8Array(e),...s(new Uint8Array(0)));return a.outputLen=i.outputLen,a.blockLen=i.blockLen,a.create=(o,...l)=>r(o,...l),a}const cP=(e,t)=>{function n(r,...s){if(Nt(r,void 0,"key"),e.nonceLength!==void 0){const f=s[0];Nt(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<s.length;f++)if(cg(s[f]))throw new Error("AAD not supported")}e.withAAD&&s[i]!==void 0&&Nt(s[i],void 0,"AAD");const o=t(r,...s),l=(f,h)=>{if(h!==void 0){if(f!==2)throw new Error("cipher output not supported");Nt(h,void 0,"output")}};let c=!1;return{encrypt(f,h){if(c)throw new Error("cannot encrypt() twice with same key + nonce");return c=!0,Nt(f,void 0,"data"),l(o.encrypt.length,h),o.encrypt(f,h)},decrypt(f,h){if(Nt(f,void 0,"data"),a&&f.length<a)throw new Error('"ciphertext" expected length >= tagLength='+a);return l(o.decrypt.length,h),o.decrypt(f,h)}}}return Object.assign(n,e),n};function dg(e,t,n=!0){if(t===void 0)return new Uint8Array(e);if(Nt(t,e,"output"),n&&!kf(t))throw new Error("invalid output, must be aligned");return t}function uP(e,t,n){co(e),co(t),ug(n);const r=new Uint8Array(16),s=tP(r);return s.setBigUint64(0,BigInt(t),n),s.setBigUint64(8,BigInt(e),n),r}function kf(e){return e.byteOffset%4===0}function vf(e){return Uint8Array.from(Nt(e))}const Kj=e=>Uint8Array.from(e.split(""),t=>t.charCodeAt(0)),dP=Ra(Yr(Kj("expand 16-byte k"))),fP=Ra(Yr(Kj("expand 32-byte k")));function Ce(e,t){return e<<t|e>>>32-t}const gl=64,hP=16,fg=2**32-1,Av=Uint32Array.of();function xP(e,t,n,r,s,a,i,o){const l=s.length,c=new Uint8Array(gl),d=Yr(c),f=uo&&kf(s)&&kf(a),h=f?Yr(s):Av,p=f?Yr(a):Av;if(!uo){for(let m=0;m<l;i++){if(e(t,n,r,d,i,o),Ra(d),i>=fg)throw new Error("arx: counter overflow");const k=Math.min(gl,l-m);for(let b=0,g;b<k;b++)g=m+b,a[g]=s[g]^c[b];m+=k}return}for(let m=0;m<l;i++){if(e(t,n,r,d,i,o),i>=fg)throw new Error("arx: counter overflow");const k=Math.min(gl,l-m);if(f&&k===gl){const b=m/4;if(m%4!==0)throw new Error("arx: invalid block position");for(let g=0,y;g<hP;g++)y=b+g,p[y]=h[y]^d[g];m+=gl;continue}for(let b=0,g;b<k;b++)g=m+b,a[g]=s[g]^c[b];m+=k}}function pP(e,t){const{allowShortKeys:n,extendNonceFn:r,counterLength:s,counterRight:a,rounds:i}=iP({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if(typeof e!="function")throw new Error("core must be a function");return co(s),co(i),ug(a),ug(n),(o,l,c,d,f=0)=>{Nt(o,void 0,"key"),Nt(l,void 0,"nonce"),Nt(c,void 0,"data");const h=c.length,p=d!==void 0;if(d=dg(h,d,!1),p&&aP(c,d),co(f),f<0||f>=fg)throw new Error("arx: counter overflow");const m=[];let k=o.length,b,g;if(k===32)m.push(b=vf(o)),g=fP;else if(k===16&&n)b=new Uint8Array(32),b.set(o),b.set(o,16),g=dP,m.push(b);else throw Nt(o,32,"arx key"),new Error("invalid key size");(!uo||!kf(l))&&m.push(l=vf(l));let y=Yr(b);if(r){if(l.length!==24)throw new Error("arx: extended nonce must be 24 bytes");const S=l.subarray(0,16);if(uo)r(g,y,Yr(S),y);else{const j=Ra(Uint32Array.from(g));r(j,y,Yr(S),y),Ks(j),Ra(y)}l=l.subarray(16)}else uo||Ra(y);const v=16-s;if(v!==l.length)throw new Error(`arx: nonce must be ${v} or 16 bytes`);if(v!==12){const S=new Uint8Array(12);S.set(l,a?0:12-l.length),l=S,m.push(l)}const w=Ra(Yr(l));try{return xP(e,g,y,w,c,d,f,i),d}finally{Ks(...m)}}}function Ot(e,t){return e[t++]&255|(e[t++]&255)<<8}class gP{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=vf(Nt(t,32,"key"));const n=Ot(t,0),r=Ot(t,2),s=Ot(t,4),a=Ot(t,6),i=Ot(t,8),o=Ot(t,10),l=Ot(t,12),c=Ot(t,14);this.r[0]=n&8191,this.r[1]=(n>>>13|r<<3)&8191,this.r[2]=(r>>>10|s<<6)&7939,this.r[3]=(s>>>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|l<<5)&8065,this.r[8]=(l>>>8|c<<8)&8191,this.r[9]=c>>>5&127;for(let d=0;d<8;d++)this.pad[d]=Ot(t,16+2*d)}process(t,n,r=!1){const s=r?0:2048,{h:a,r:i}=this,o=i[0],l=i[1],c=i[2],d=i[3],f=i[4],h=i[5],p=i[6],m=i[7],k=i[8],b=i[9],g=Ot(t,n+0),y=Ot(t,n+2),v=Ot(t,n+4),w=Ot(t,n+6),S=Ot(t,n+8),j=Ot(t,n+10),C=Ot(t,n+12),$=Ot(t,n+14);let A=a[0]+(g&8191),E=a[1]+((g>>>13|y<<3)&8191),z=a[2]+((y>>>10|v<<6)&8191),N=a[3]+((v>>>7|w<<9)&8191),T=a[4]+((w>>>4|S<<12)&8191),R=a[5]+(S>>>1&8191),_=a[6]+((S>>>14|j<<2)&8191),M=a[7]+((j>>>11|C<<5)&8191),D=a[8]+((C>>>8|$<<8)&8191),I=a[9]+($>>>5|s),O=0,L=O+A*o+E*(5*b)+z*(5*k)+N*(5*m)+T*(5*p);O=L>>>13,L&=8191,L+=R*(5*h)+_*(5*f)+M*(5*d)+D*(5*c)+I*(5*l),O+=L>>>13,L&=8191;let H=O+A*l+E*o+z*(5*b)+N*(5*k)+T*(5*m);O=H>>>13,H&=8191,H+=R*(5*p)+_*(5*h)+M*(5*f)+D*(5*d)+I*(5*c),O+=H>>>13,H&=8191;let F=O+A*c+E*l+z*o+N*(5*b)+T*(5*k);O=F>>>13,F&=8191,F+=R*(5*m)+_*(5*p)+M*(5*h)+D*(5*f)+I*(5*d),O+=F>>>13,F&=8191;let V=O+A*d+E*c+z*l+N*o+T*(5*b);O=V>>>13,V&=8191,V+=R*(5*k)+_*(5*m)+M*(5*p)+D*(5*h)+I*(5*f),O+=V>>>13,V&=8191;let J=O+A*f+E*d+z*c+N*l+T*o;O=J>>>13,J&=8191,J+=R*(5*b)+_*(5*k)+M*(5*m)+D*(5*p)+I*(5*h),O+=J>>>13,J&=8191;let W=O+A*h+E*f+z*d+N*c+T*l;O=W>>>13,W&=8191,W+=R*o+_*(5*b)+M*(5*k)+D*(5*m)+I*(5*p),O+=W>>>13,W&=8191;let ne=O+A*p+E*h+z*f+N*d+T*c;O=ne>>>13,ne&=8191,ne+=R*l+_*o+M*(5*b)+D*(5*k)+I*(5*m),O+=ne>>>13,ne&=8191;let Y=O+A*m+E*p+z*h+N*f+T*d;O=Y>>>13,Y&=8191,Y+=R*c+_*l+M*o+D*(5*b)+I*(5*k),O+=Y>>>13,Y&=8191;let G=O+A*k+E*m+z*p+N*h+T*f;O=G>>>13,G&=8191,G+=R*d+_*c+M*l+D*o+I*(5*b),O+=G>>>13,G&=8191;let ae=O+A*b+E*k+z*m+N*p+T*h;O=ae>>>13,ae&=8191,ae+=R*f+_*d+M*c+D*l+I*o,O+=ae>>>13,ae&=8191,O=(O<<2)+O|0,O=O+L|0,L=O&8191,O=O>>>13,H+=O,a[0]=L,a[1]=H,a[2]=F,a[3]=V,a[4]=J,a[5]=W,a[6]=ne,a[7]=Y,a[8]=G,a[9]=ae}finalize(){const{h:t,pad:n}=this,r=new Uint16Array(10);let s=t[1]>>>13;t[1]&=8191;for(let o=2;o<10;o++)t[o]+=s,s=t[o]>>>13,t[o]&=8191;t[0]+=s*5,s=t[0]>>>13,t[0]&=8191,t[1]+=s,s=t[1]>>>13,t[1]&=8191,t[2]+=s,r[0]=t[0]+5,s=r[0]>>>13,r[0]&=8191;for(let o=1;o<10;o++)r[o]=t[o]+s,s=r[o]>>>13,r[o]&=8191;r[9]-=8192;let a=(s^1)-1;for(let o=0;o<10;o++)r[o]&=a;a=~a;for(let o=0;o<10;o++)t[o]=t[o]&a|r[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;Ks(r)}update(t){Nv(this),Nt(t),t=vf(t);const{buffer:n,blockLen:r}=this,s=t.length;for(let a=0;a<s;){const i=Math.min(r-this.pos,s-a);if(i===r){for(;r<=s-a;a+=r)this.process(t,a);continue}n.set(t.subarray(a,a+i),this.pos),this.pos+=i,a+=i,this.pos===r&&(this.process(n,0,!1),this.pos=0)}return this}destroy(){this.destroyed=!0,Ks(this.h,this.r,this.buffer,this.pad)}digestInto(t){Nv(this),eP(t,this),this.finished=!0;const{buffer:n,h:r}=this;let{pos:s}=this;if(s){for(n[s++]=1;s<16;s++)n[s]=0;this.process(n,0,!0)}this.finalize();let a=0;for(let i=0;i<8;i++)t[a++]=r[i]>>>0,t[a++]=r[i]>>>8}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}}const mP=lP(32,e=>new gP(e));function yP(e,t,n,r,s,a=20){let i=e[0],o=e[1],l=e[2],c=e[3],d=t[0],f=t[1],h=t[2],p=t[3],m=t[4],k=t[5],b=t[6],g=t[7],y=s,v=n[0],w=n[1],S=n[2],j=i,C=o,$=l,A=c,E=d,z=f,N=h,T=p,R=m,_=k,M=b,D=g,I=y,O=v,L=w,H=S;for(let V=0;V<a;V+=2)j=j+E|0,I=Ce(I^j,16),R=R+I|0,E=Ce(E^R,12),j=j+E|0,I=Ce(I^j,8),R=R+I|0,E=Ce(E^R,7),C=C+z|0,O=Ce(O^C,16),_=_+O|0,z=Ce(z^_,12),C=C+z|0,O=Ce(O^C,8),_=_+O|0,z=Ce(z^_,7),$=$+N|0,L=Ce(L^$,16),M=M+L|0,N=Ce(N^M,12),$=$+N|0,L=Ce(L^$,8),M=M+L|0,N=Ce(N^M,7),A=A+T|0,H=Ce(H^A,16),D=D+H|0,T=Ce(T^D,12),A=A+T|0,H=Ce(H^A,8),D=D+H|0,T=Ce(T^D,7),j=j+z|0,H=Ce(H^j,16),M=M+H|0,z=Ce(z^M,12),j=j+z|0,H=Ce(H^j,8),M=M+H|0,z=Ce(z^M,7),C=C+N|0,I=Ce(I^C,16),D=D+I|0,N=Ce(N^D,12),C=C+N|0,I=Ce(I^C,8),D=D+I|0,N=Ce(N^D,7),$=$+T|0,O=Ce(O^$,16),R=R+O|0,T=Ce(T^R,12),$=$+T|0,O=Ce(O^$,8),R=R+O|0,T=Ce(T^R,7),A=A+E|0,L=Ce(L^A,16),_=_+L|0,E=Ce(E^_,12),A=A+E|0,L=Ce(L^A,8),_=_+L|0,E=Ce(E^_,7);let F=0;r[F++]=i+j|0,r[F++]=o+C|0,r[F++]=l+$|0,r[F++]=c+A|0,r[F++]=d+E|0,r[F++]=f+z|0,r[F++]=h+N|0,r[F++]=p+T|0,r[F++]=m+R|0,r[F++]=k+_|0,r[F++]=b+M|0,r[F++]=g+D|0,r[F++]=y+I|0,r[F++]=v+O|0,r[F++]=w+L|0,r[F++]=S+H|0}const bP=pP(yP,{counterRight:!1,counterLength:4,allowShortKeys:!1}),kP=new Uint8Array(16),zv=(e,t)=>{e.update(t);const n=t.length%16;n&&e.update(kP.subarray(n))},vP=new Uint8Array(32);function Rv(e,t,n,r,s){s!==void 0&&Nt(s,void 0,"AAD");const a=e(t,n,vP),i=uP(r.length,s?s.length:0,!0),o=mP.create(a);s&&zv(o,s),zv(o,r),o.update(i);const l=o.digest();return Ks(a,i),l}const wP=e=>(t,n,r)=>({encrypt(a,i){const o=a.length;i=dg(o+16,i,!1),i.set(a);const l=i.subarray(0,-16);e(t,n,l,l,1);const c=Rv(e,t,n,l,r);return i.set(c,o),Ks(c),i},decrypt(a,i){i=dg(a.length-16,i,!1);const o=a.subarray(0,-16),l=a.subarray(-16),c=Rv(e,t,n,o,r);if(!oP(l,c))throw Ks(c),new Error("invalid tag");return i.set(a.subarray(0,-16)),e(t,n,i,i,1),Ks(c),i}}),_v=cP({blockSize:64,nonceLength:12,tagLength:16,withAAD:!0},wP(bP)),SP=e=>e/2**32|0,jP=e=>e>>>0;function hg(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name==="Uint8Array"&&"BYTES_PER_ELEMENT"in e&&e.BYTES_PER_ELEMENT===1}const xg=e=>e?`"${e}" `:"";function ds(e,t=""){if(typeof e!="number")throw new TypeError(xg(t)+"expected number, got "+typeof e);if(!Number.isSafeInteger(e)||e<0)throw new RangeError(xg(t)+"expected integer >= 0, got "+e);return e}function Jn(e,t,n=""){if(hg(e)&&(t===void 0||e.length===t))return e;t!==void 0&&ds(t,"length");const r=hg(e),s=t!==void 0?` of length ${t}`:"",a=r?`length=${e.length}`:`type=${typeof e}`,i=xg(n)+"expected Uint8Array"+s+", got "+a;throw r?new RangeError(i):new TypeError(i)}function Ov(e){return Uint8Array.from(Jn(e))}function EP(e){if(typeof e!="function"||typeof e.create!="function")throw new TypeError("expected hash wrapped by utils.createHasher");if(ds(e.outputLen),ds(e.blockLen),e.outputLen<1||e.blockLen<1)throw new Error("hash blockLen / outputLen must be >= 1")}const $P=(e,t)=>{if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError((t==="object"?"":`"${t}" `)+"expected object, got type="+typeof e)},Dv=(e,t)=>{$P(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 wf(e,t=!0){if(e.destroyed)throw new Error("hash was destroyed");if(t&&e.finished)throw new Error("digest() was already called")}function Yj(e,t){Jn(e,void 0,"output");const n=t.outputLen;if(!(e.length>=n))throw new RangeError('"output" expected length >= '+n)}function Sf(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}function pg(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function jf(e,t){return e<<32-t|e>>>t}const Qj=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;function Jj(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}const Cl=Qj?e=>e:e=>Jj(e)>>>0;function CP(e){for(let t=0;t<e.length;t++)e[t]=Jj(e[t]);return e}const Mi=Qj?e=>e:CP,eE=typeof Uint8Array.from([]).toHex=="function"&&typeof Uint8Array.fromHex=="function",TP=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));function D0(e){if(Jn(e),eE)return e.toHex();let t="";for(let n=0;n<e.length;n++)t+=TP[e[n]];return t}function Iv(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function tE(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);if(eE)try{return Uint8Array.fromHex(e)}catch(s){throw s instanceof SyntaxError?new RangeError(s.message):s}const t=e.length,n=t/2;if(t%2)throw new RangeError("hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(n);for(let s=0,a=0;s<n;s++,a+=2){const i=Iv(e.charCodeAt(a)),o=Iv(e.charCodeAt(a+1));if(i===void 0||o===void 0){const l=e[a]+e[a+1];throw new RangeError('hex string expected, got non-hex character "'+l+'" at index '+a)}r[s]=i*16+o}return r}function nE(e,t,n="opts"){return Dv(e,"defaults"),t!==void 0&&Dv(t,n),Object.assign(Object.create(null),e,t)}function MP(e,t={}){if(typeof e!="function")throw new TypeError('"hashCons" expected function, got type='+typeof e);t=nE({},t,"info");const n=(s,a)=>e(a).update(s).digest(),r=e(void 0);return n.outputLen=r.outputLen,n.blockLen=r.blockLen,n.canXOF=r.canXOF,n.create=s=>e(s),Object.assign(n,t),Object.freeze(n)}function NP(e=32){ds(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 AP=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function rE(e,t,n=()=>{}){if(!Array.isArray(e))throw new TypeError(`"${t}" expected array, got type=${typeof e}`);for(let r=0;r<e.length;r++)n(e[r],`${t}[${r}]`);return e}const fo=(e,t,n)=>Jn(e,t,n),sE=ds;function ho(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 Xl(e,t){if(typeof e!="function")throw new TypeError(`"${t}" is invalid: expected function, got ${typeof e}`);return e}const zP=D0,RP=e=>tE(e),aE=hg,iE=e=>NP(e),Ef=BigInt(0),Lv=BigInt(1),_P=e=>e?`"${e}" `:"";function zh(e,t=""){if(typeof e!="boolean")throw new TypeError(_P(t)+"expected boolean, got type="+typeof e);return e}function OP(e){if(typeof e=="bigint"){if(!Xa(e))throw new RangeError("positive bigint expected, got "+e)}else sE(e);return e}function gg(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 oE(e){if(typeof e!="string")throw new TypeError("hex string expected, got "+typeof e);return e===""?Ef:BigInt("0x"+e)}function lE(e){return oE(D0(e))}function $f(e){return oE(D0(Ec(Jn(e)).reverse()))}function cE(e,t){if(ds(t),t===0)throw new Error("zero output length is invalid");e=OP(e);const n=t*2,r=e.toString(16);if(r.length>n)throw new RangeError("number is too large");return tE(r.padStart(n,"0"))}function uE(e,t){return cE(e,t).reverse()}function Ec(e){return Uint8Array.from(fo(e))}function Xa(e){return typeof e=="bigint"&&Ef<=e}function dE(e,t,n){return Xa(e)&&Xa(t)&&Xa(n)&&t<=e&&e<n}function Zl(e,t,n,r){if(!dE(t,n,r))throw new RangeError("expected valid "+e+": "+n+" <= n < "+r+", got "+t)}function DP(e){if(e<Ef)throw new Error("expected non-negative bigint, got "+e);return e===Ef?0:e.toString(2).length}const IP=e=>(gg(e,"n"),(Lv<<BigInt(e))-Lv);function Cf(e,t={},n={},r="object"){ho(e,r),ho(t,"fields"),ho(n,"optFields");function s(i,o,l){const c=r==="object"?`param "${String(i)}"`:`"${r}.${String(i)}"`,d=e[i];if(!Object.hasOwn(e,i)&&(l?d!==void 0:o!=="function"))throw new TypeError(`${c} is invalid: expected own property`);if(l&&d===void 0)return;const f=typeof d;if(f!==o||d===null)throw new TypeError(`${c} is invalid: expected ${o}, got ${f}`)}const a=(i,o)=>Object.entries(i).forEach(([l,c])=>s(l,c,o));a(t,!1),a(n,!0)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const zt=BigInt(0),Qe=BigInt(1),_a=BigInt(2),fE=BigInt(3),I0=BigInt(4),hE=BigInt(5),LP=BigInt(7),xE=BigInt(8),BP=BigInt(9),HP=BigInt(15),pE=BigInt(16),qP=BigInt("0x10000000000000000");function Ye(e,t){if(t<=zt)throw new Error("mod: expected positive modulus, got "+t);const n=e%t;return n>=zt?n:t+n}function UP(e,t,n){if(n<=Qe)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<zt)throw new Error("invalid exponent, negatives unsupported");if(t===zt)return Qe;if(t===Qe)return e;let r=e%n;if(r<zt&&(r+=n),t<qP){let o=Qe;for(;t>zt;)t&Qe&&(o=o*r%n),r=r*r%n,t>>=Qe;return o}const s=[];for(;t>zt;)s.push(Number(t&HP)),t>>=I0;const a=new Array(16);a[0]=Qe,a[1]=r;for(let o=2;o<16;o++)a[o]=a[o-1]*r%n;let i=a[s[s.length-1]];for(let o=s.length-2;o>=0;o--){i=i*i%n,i=i*i%n,i=i*i%n,i=i*i%n;const l=s[o];l!==0&&(i=i*a[l]%n)}return i}function ur(e,t,n){if(n<=Qe)throw new Error("pow2: expected modulus > 1, got "+n);if(t<zt)throw new Error("pow2: expected non-negative exponent, got "+t);let r=e;for(;t-- >zt;)r*=r,r%=n;return r}function Bv(e,t){if(e===zt)throw new Error("invert: expected non-zero number");if(t<=Qe)throw new Error("invert: expected modulus > 1, got "+t);let n=Ye(e,t),r=t,s=zt,a=Qe;for(;n!==zt;){const o=r/n,l=r-n*o,c=s-a*o;r=n,n=l,s=a,a=c}if(r!==Qe)throw new Error("invert: does not exist");return Ye(s,t)}function L0(e,t,n){const r=e;if(!r.eql(r.sqr(t),n))throw new Error("Cannot find square root")}function B0(e,t){if((e&Qe)===zt)throw new Error(t+": expected odd modulus, got "+e)}function gE(e,t){const n=e,r=(n.ORDER+Qe)/I0,s=n.pow(t,r);return L0(n,s,t),s}function PP(e,t){const n=e,r=(n.ORDER-hE)/xE,s=n.mul(t,_a),a=n.pow(s,r),i=n.mul(t,a),o=n.mul(n.mul(i,_a),a),l=n.mul(i,n.sub(o,n.ONE));return L0(n,l,t),l}function FP(e){const t=H0(e),n=mE(e),r=n(t,t.neg(t.ONE)),s=n(t,r),a=n(t,t.neg(r)),i=(e+LP)/pE;return(o,l)=>{const c=o;let d=c.pow(l,i),f=c.mul(d,r);const h=c.mul(d,s),p=c.mul(d,a),m=c.eql(c.sqr(f),l),k=c.eql(c.sqr(h),l);d=c.cmov(d,f,m),f=c.cmov(p,h,k);const b=c.eql(c.sqr(f),l),g=c.cmov(d,f,b);return L0(c,g,l),g}}function mE(e){if(e<fE)throw new Error("sqrt is not defined for small field");B0(e,"tonelliShanks");let t=e-Qe,n=0;for(;t%_a===zt;)t/=_a,n++;let r=_a;const s=H0(e);for(;Tf(s,r)===1;)if(r++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(n===1)return gE;let a=s.pow(r,t);const i=(t+Qe)/_a;return function(l,c){const d=l;if(d.is0(c))return c;if(Tf(d,c)!==1)throw new Error("Cannot find square root");let f=n,h=d.mul(d.ONE,a),p=d.pow(c,t),m=d.pow(c,i);for(;!d.eql(p,d.ONE);){if(d.is0(p))throw new Error("Cannot find square root: probably non-prime P");let k=1,b=d.sqr(p);for(;!d.eql(b,d.ONE);)if(k++,b=d.sqr(b),k===f)throw new Error("Cannot find square root");const g=Qe<<BigInt(f-k-1),y=d.pow(h,g);f=k,h=d.sqr(y),p=d.mul(p,h),m=d.mul(m,y)}return m}}function GP(e){return B0(e,"Fp.sqrt"),e%I0===fE?gE:e%xE===hE?PP:e%pE===BP?FP(e):mE(e)}const VP=(e,t)=>(Ye(e,t)&Qe)===Qe,XP=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function $c(e){if(ho(e,"field"),typeof e.ORDER!="bigint")throw new TypeError('param "ORDER" is invalid: expected bigint, got '+typeof e.ORDER);gg(e.BYTES,"BYTES"),gg(e.BITS,"BITS");for(const t of XP)Xl(e[t],"field."+t);if(e.BYTES<1||e.BITS<1)throw new Error("invalid field: expected BYTES/BITS > 0");if(e.ORDER<=Qe)throw new Error("invalid field: expected ORDER > 1, got "+e.ORDER);return e}function yE(e,t,n=!1){$c(e),rE(t,"nums"),zh(n,"passZero");const r=e,s=new Array(t.length).fill(n?r.ZERO:void 0),a=t.reduce((o,l,c)=>r.is0(l)?o:(s[c]=o,r.mul(o,l)),r.ONE),i=r.inv(a);return t.reduceRight((o,l,c)=>r.is0(l)?o:(s[c]=r.mul(o,s[c]),r.mul(o,l)),i),s}function Tf(e,t){$c(e);const n=e;B0(n.ORDER,"FpLegendre");const r=(n.ORDER-Qe)/_a,s=n.pow(t,r),a=n.eql(s,n.ONE),i=n.eql(s,n.ZERO),o=n.eql(s,n.neg(n.ONE));if(!a&&!i&&!o)throw new Error("invalid Legendre symbol result");return a?1:i?0:-1}function ZP(e,t){if(t!==void 0&&sE(t),e<=zt)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=DP(e);if(t!==void 0&&t<n)throw new Error(`invalid n length: expected nBitLength (${t}) >= bitLen(n) (${n})`);const r=t!==void 0?t:n,s=Math.ceil(r/8);return{nBitLength:r,nByteLength:s}}const Hv=new WeakMap;class qv{constructor(t,n={}){ee(this,"ORDER");ee(this,"BITS");ee(this,"BYTES");ee(this,"isLE");ee(this,"ZERO",zt);ee(this,"ONE",Qe);ee(this,"_lengths");ee(this,"_mod");if(t<=Qe)throw new Error("invalid field: expected ORDER > 1, got "+t);let r;this.isLE=!1,n!=null&&typeof n=="object"&&(typeof n.BITS=="number"&&(r=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:s,nByteLength:a}=ZP(t,r);if(a>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=t,this.BITS=s,this.BYTES=a,Object.freeze(this)}create(t){return Ye(t,this.ORDER)}isValid(t){if(typeof t!="bigint")throw new TypeError("invalid field element: expected bigint, got "+typeof t);return zt<=t&&t<this.ORDER}is0(t){return t===zt}isValidNot0(t){return!this.is0(t)&&this.isValid(t)}isOdd(t){return(t&Qe)===Qe}neg(t){return Ye(-t,this.ORDER)}eql(t,n){return t===n}sqr(t){return Ye(t*t,this.ORDER)}add(t,n){return Ye(t+n,this.ORDER)}sub(t,n){return Ye(t-n,this.ORDER)}mul(t,n){return Ye(t*n,this.ORDER)}pow(t,n){return UP(t,n,this.ORDER)}div(t,n){return Ye(t*Bv(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 Bv(t,this.ORDER)}sqrt(t){let n=Hv.get(this);return n||Hv.set(this,n=GP(this.ORDER)),n(this,t)}toBytes(t){return this.isLE?uE(t,this.BYTES):cE(t,this.BYTES)}fromBytes(t,n=!1){fo(t);const{_lengths:r,BYTES:s,isLE:a,ORDER:i,_mod:o}=this;if(r){if(t.length<1||!r.includes(t.length)||t.length>s)throw new Error("Field.fromBytes: expected "+r+" bytes, got "+t.length);const c=new Uint8Array(s);c.set(t,a?0:c.length-t.length),t=c}if(t.length!==s)throw new Error("Field.fromBytes: expected "+s+" bytes, got "+t.length);let l=a?$f(t):lE(t);if(o&&(l=Ye(l,i)),!n&&!this.isValid(l))throw new Error("invalid field element: outside of range 0..ORDER");return l}invertBatch(t){return yE(this,t,!0)}cmov(t,n,r){return zh(r,"condition"),r?n:t}}function H0(e,t={}){return Object.freeze(qv.prototype),new qv(e,t)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const q0=BigInt(0),Cc=BigInt(1),WP=BigInt(4),ap=16,Uv=128,KP=5,Pv=2**31;function U0(e){const t=e;if(typeof t!="function")throw new TypeError('"Point" expected constructor, got type='+typeof e);Xl(t.fromAffine,"Point.fromAffine"),Xl(t.fromBytes,"Point.fromBytes"),Xl(t.fromHex,"Point.fromHex"),ho(t.BASE,"Point.BASE"),ho(t.ZERO,"Point.ZERO"),$c(t.Fp),$c(t.Fn)}function YP(e,t){U0(e),bE(t,e);const n=yE(e.Fp,t.map(r=>r.Z));return t.map((r,s)=>e.fromAffine(r.toAffine(n[s])))}function QP(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 JP(e,t){const n=e*(4*t+128);if(n>Pv)throw new Error("invalid window size: table would need ~"+Math.ceil(n/2**20)+" MiB, max "+Pv/2**20+" MiB")}function eF(e,t){if(e!==void 0){Xl(e,"randomBytes");try{const n=e(t);if(!aE(n)||n.length!==t)return}catch{return}return e}}function bE(e,t){rE(e,"points"),e.forEach((n,r)=>{if(!(n instanceof t))throw new Error("invalid point at index "+r)})}function tF(e,t,n){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach((r,s)=>{if(!(n===void 0?t.isValid(r):Xa(r)&&r<n))throw new Error("invalid scalar at index "+s)})}const kE=new WeakMap;function ip(e){return kE.get(e)||1}function nF(e,t){const n=e.double(),r=[e];for(let s=1;s<t;s++)r.push(r[s-1].add(n));return r}function rF(e,t){const n=2**t,r=n/2,s=BigInt(n-1),a=[];for(;e>q0;){let i=0;e&Cc&&(i=Number(e&s),i>=r&&(i-=n),e-=BigInt(i)),a.push(i),e>>=Cc}return a}function sF(e,t,n){const r=2**t,s=r/2,a=BigInt(r-1),i=BigInt(t),o=[];for(let l=0;l<n;l++){let c=Number(e&a);e>>=i,c>s&&(c-=r,e+=Cc),o.push(c)}if(e!==q0)throw new Error("invalid wnaf");return o}function aF(e,t,n){let r=0;for(const a of n)r=Math.max(r,a.length);let s=e;for(let a=r-1;a>=0;a--){a!==r-1&&(s=s.double());for(let i=0;i<n.length;i++){const o=n[i][a];if(o){const l=t[i][Math.abs(o)-1>>1];s=s.add(o<0?l.negate():l)}}}return s}class iF{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");U0(t),this.randomBytes=eF(n,ap),this.Point=t,this.BASE=t.BASE,this.ZERO=t.ZERO,this.bits=t.Fn.BITS}buildWnafTable(t,n,r){const s=Math.ceil(r/n)+1,a=2**(n-1),i=[];let o=t;for(let l=0;l<s;l++){let c=o;for(let d=0;d<a;d++)i.push(c),c=c.add(o);o=i[i.length-1].double()}return{W:n,bits:r,windows:s,comp:i}}wnafCachedCT(t,n){const{W:r,windows:s,comp:a}=t,i=2**(r-1),o=sF(n,r,s);let l=this.ZERO,c=this.BASE;for(let d=0;d<s;d++){const f=o[d],h=d*i,p=Math.abs(f)-1;let m=a[h];for(let b=1;b<i;b++)m=b===p?a[h+b]:m;const k=m.negate();f===0?c=c.add(a[h]):l=l.add(f<0?k:m)}return{p:l,f:c}}getWnafPrecomputes(t,n,r,s){let a=this.wnafPrecomputes.get(n),i=a==null?void 0:a.find(o=>o.W===t&&o.bits===r);return i||(i=this.buildWnafTable(n,t,r),typeof s=="function"&&(i={...i,comp:s(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),!dE(n,Cc,this.Point.Fn.ORDER))throw new Error("invalid scalar")}runCT(t,n,r,s){const a=ip(t);return a===1?this.fixedWindowCT(t,n,r):this.wnafCachedCT(this.getWnafPrecomputes(a,t,r,s),n)}mulCT(t,n,r){return this.validateMulInput(t,n),this.runCT(t,n,this.bits,r)}mulCTBlinded(t,n,r){if(this.validateMulInput(t,n),this.randomBytes===void 0)throw new Error("randomBytes is required for scalar blinding");const s=this.Point.Fn.BITS+Uv,a=this.randomBytes(ap);if(!aE(a)||a.length!==ap)throw new Error("randomBytes returned invalid byte array");a[0]=a[0]&63|128;const i=n+lE(a)*this.Point.Fn.ORDER;return this.runCT(t,i,s,r)}fixedWindowCT(t,n,r){const s=KP,a=1<<s,i=IP(s),o=new Array(a);o[0]=this.ZERO;for(let d=1;d<a;d++)o[d]=o[d-1].add(t);const l=Math.ceil(r/s);let c=this.ZERO;for(let d=l-1;d>=0;d--){if(d!==l-1)for(let p=0;p<s;p++)c=c.double();const f=Number(n>>BigInt(d*s)&i);let h=o[0];for(let p=1;p<a;p++)h=p===f?o[p]:h;c=c.add(h)}return{p:c,f:c}}shouldBlind(t,n){return this.randomBytes===void 0?!1:n===Cc?!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,r,s){return this.shouldBlind(t,r)?this.mulCTBlinded(t,n,s):this.mulCT(t,n,s)}mulUnsafe(t,n,r){if(this.assertPoint(t),!Xa(n))throw new Error("invalid scalar");const s=ip(t);if(s===1||n>=this.Point.Fn.ORDER)return oF(this.Point,[t],[n],!0);const a=this.getWnafPrecomputes(s,t,this.bits,r);return this.wnafCachedCT(a,n).p}setWindowSize(t,n){this.assertPoint(t),QP(n,this.bits);const r=Math.ceil((this.bits+Uv)/n)+1;JP(r*2**(n-1),this.Point.Fp.BYTES),kE.set(t,n),this.wnafPrecomputes.delete(t)}hasWindowSize(t){return ip(t)!==1}}function oF(e,t,n,r=!1){if(U0(e),bE(t,e),zh(r,"allowOversized"),tF(n,e.Fn,r?e.Fn.ORDER**WP:void 0),t.length!==n.length)throw new Error("arrays of points and scalars must have equal length");const s=t.map(i=>nF(i,4)),a=n.map(i=>rF(i,4));return aF(e.ZERO,s,a)}function Fv(e,t,n){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return $c(t),t}else return H0(e,{isLE:n})}function lF(e,t,n={},r){if(r===void 0&&(r=e==="edwards"),!t||typeof t!="object")throw new Error(`expected valid ${e} CURVE object`);Cf(n);for(const l of["p","n","h"]){const c=t[l];if(!(Xa(c)&&c!==q0))throw new Error(`CURVE.${l} must be positive bigint`)}const s=Fv(t.p,n.Fp,r),a=Fv(t.n,n.Fn,r),o=["Gx","Gy","a","d"];for(const l of o)if(!s.isValid(t[l]))throw new Error(`CURVE.${l} must be valid field element of CURVE.Fp`);return t=Object.freeze(Object.assign({},t)),{CURVE:t,Fp:s,Fn:a}}function cF(e,t){return function(r){const s=e(r);return{secretKey:s,publicKey:t(s)}}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Fu=BigInt(0),Gu=BigInt(1),Vu=BigInt(2),uF=BigInt(4),Gv=BigInt(8);function dF(e,t,n,r){const s=e.sqr(n),a=e.sqr(r),i=e.add(e.mul(t.a,s),a),o=e.add(e.ONE,e.mul(t.d,e.mul(s,a)));return e.eql(i,o)}function fF(e,t={}){Cf(t,{},{},"extraOpts");const n=t,r=lF("edwards",e,n,n.FpFnLE),{Fp:s,Fn:a}=r;let i=r.CURVE;const{h:o}=i;if(Tf(s,i.a)!==1)throw new Error("edwards: CURVE.a must be a square in Fp for complete addition formulas");if(Tf(s,i.d)!==-1)throw new Error("edwards: CURVE.d must be a non-square in Fp for complete addition formulas");Cf(n,{},{uvRatio:"function",randomBytes:"function"});const l=n.randomBytes===void 0?iE:n.randomBytes,c=Vu<<BigInt(s.BYTES*8)-Gu;function d(v){if(!s.isOdd)throw new Error("Field does not have .isOdd()");return s.isOdd(v)}const f=n.uvRatio===void 0?(v,w)=>{try{return{isValid:!0,value:s.sqrt(s.div(v,w))}}catch{return{isValid:!1,value:Fu}}}:n.uvRatio;if(!dF(s,i,i.Gx,i.Gy))throw new Error("bad curve params: generator point");const h=s.eql(i.a,s.neg(s.ONE))?v=>s.neg(v):s.eql(i.a,s.ONE)?v=>v:v=>s.mul(i.a,v);function p(v,w,S=!1){const j=S?Gu:Fu;return Zl("coordinate "+v,w,j,c),w}function m(v){if(!(v instanceof k))throw new Error("EdwardsPoint expected")}const y=class y{constructor(w,S,j,C){ee(this,"X");ee(this,"Y");ee(this,"Z");ee(this,"T");this.X=p("x",w),this.Y=p("y",S),this.Z=p("z",j,!0),this.T=p("t",C),Object.freeze(this)}static CURVE(){return i}static fromAffine(w){if(w instanceof y)throw new Error("extended point not allowed");const{x:S,y:j}=w||{};return p("x",S),p("y",j),new y(S,j,s.ONE,s.mul(S,j))}static fromBytes(w,S=!1){const j=s.BYTES,{a:C,d:$}=i;w=Ec(fo(w,j,"point")),zh(S,"zip215");const A=Ec(w),E=w[j-1];A[j-1]=E&-129;const z=$f(A),N=S?c:s.ORDER;Zl("point.y",z,Fu,N);const T=s.sqr(z),R=s.sub(T,s.ONE),_=s.sub(s.mulN($,T),C);let{isValid:M,value:D}=f(R,_);if(!M)throw new Error("bad point: invalid y coordinate");const I=d(D),O=(E&128)!==0;if(!S&&s.is0(D)&&O)throw new Error("bad point: x=0 and x_0=1");return O!==I&&(D=s.neg(D)),y.fromAffine({x:D,y:z})}static fromHex(w,S=!1){return y.fromBytes(RP(w),S)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(w=6,S=!0){return g.setWindowSize(this,w),S||this.multiply(Vu),this}assertValidity(){const w=this,{a:S,d:j}=i;if(w.is0())throw new Error("bad point: ZERO");const{X:C,Y:$,Z:A,T:E}=w,z=s.sqr(C),N=s.sqr($),T=s.sqr(A),R=s.sqr(T),_=s.mul(z,S),M=s.mul(s.add(_,N),T),D=s.add(R,s.mul(j,s.mul(z,N)));if(!s.eql(M,D))throw new Error("bad point: equation left != right (1)");const I=s.mul(C,$),O=s.mul(A,E);if(!s.eql(I,O))throw new Error("bad point: equation left != right (2)")}equals(w){m(w);const{X:S,Y:j,Z:C}=this,{X:$,Y:A,Z:E}=w,z=s.mul(S,E),N=s.mul($,C),T=s.mul(j,E),R=s.mul(A,C);return s.eql(z,N)&&s.eql(T,R)}is0(){return this.equals(y.ZERO)}negate(){return new y(s.neg(this.X),this.Y,this.Z,s.neg(this.T))}double(){const{X:w,Y:S,Z:j}=this,C=s.sqr(w),$=s.sqr(S),A=s.mul(s.sqr(j),Vu),E=h(C),z=s.addN(w,S),N=s.sub(s.subN(s.sqr(z),C),$),T=s.addN(E,$),R=s.subN(T,A),_=s.subN(E,$),M=s.mul(N,R),D=s.mul(T,_),I=s.mul(N,_),O=s.mul(R,T);return new y(M,D,O,I)}add(w){m(w);const{d:S}=i,{X:j,Y:C,Z:$,T:A}=this,{X:E,Y:z,Z:N,T}=w,R=s.mul(j,E),_=s.mul(C,z),M=s.mul(s.mulN(A,S),T),D=s.mul($,N),I=s.sub(s.subN(s.mulN(s.addN(j,C),s.addN(E,z)),R),_),O=s.subN(D,M),L=s.addN(D,M),H=s.sub(_,h(R)),F=s.mul(I,O),V=s.mul(L,H),J=s.mul(I,H),W=s.mul(O,L);return new y(F,V,W,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:S,f:j}=g.mulSecret(this,w,o,b);return b([S,j])[0]}multiplyUnsafe(w){if(!a.isValid(w))throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");return w===Fu?y.ZERO:this.is0()||w===Gu?this:g.mulUnsafe(this,w,b)}isSmallOrder(){return this.clearCofactor().is0()}isTorsionFree(){return g.mulUnsafe(this,i.n).is0()}toAffine(w){const S=this;let j=w;if(j!=null&&typeof j!="bigint")throw new TypeError('"invertedZ" expected bigint, got type='+typeof j);const{X:C,Y:$,Z:A}=S,E=S.is0();j==null&&(j=E?s.create(Gv):s.inv(A));const z=s.mul(C,j),N=s.mul($,j),T=s.mul(A,j);if(E)return{x:s.ZERO,y:s.ONE};if(!s.eql(T,s.ONE))throw new Error("invZ was invalid");return{x:z,y:N}}clearCofactor(){return o===Gu?this:o===Vu?this.double():o===uF?this.double().double():o===Gv?this.double().double().double():this.multiplyUnsafe(o)}toBytes(){const{x:w,y:S}=this.toAffine(),j=s.toBytes(S);return j[j.length-1]|=d(w)?128:0,j}toHex(){return zP(this.toBytes())}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}};ee(y,"BASE",new y(i.Gx,i.Gy,s.ONE,s.mul(i.Gx,i.Gy))),ee(y,"ZERO",new y(s.ZERO,s.ONE,s.ONE,s.ZERO)),ee(y,"Fp",s),ee(y,"Fn",a);let k=y;const b=v=>YP(k,v),g=new iF(k,l);return g.bits>=6&&k.BASE.precompute(6),Object.freeze(k.prototype),Object.freeze(k),k}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ya=BigInt(0),Fn=BigInt(1),Xu=BigInt(2);function Vv(e,t){return e+t-(t>>Fn<<Fn)}function hF(e){const t=BigInt(6)*e;return(n,r,s)=>{const a=r+s,o=((t+s-r)*n+r)%e;return{x_2:o,x_3:a-o}}}function xF(e){return Cf(e,{P:"bigint",type:"string",adjustScalarBytes:"function",powPminus2:"function"},{randomBytes:"function",scalarMultBase:"function"}),Object.freeze({...e})}function pF(e){const t=xF(e),{P:n,type:r,adjustScalarBytes:s,powPminus2:a,randomBytes:i}=t,o=t.scalarMultBase,l=r==="x25519";if(!l&&r!=="x448")throw new Error("invalid type");const c=i===void 0?iE:i,d=l?255:448,f=hF(n),h=l?32:56,p=BigInt(l?9:5),m=BigInt(l?121665:39081),k=l?Xu**BigInt(254):Xu**BigInt(447),b=l?BigInt(8)*(Xu**BigInt(251)-Fn):BigInt(4)*(Xu**BigInt(445)-Fn),g=k+b+Fn,y=M=>Ye(M,n),v=w(p);function w(M){return uE(y(M),h)}function S(M){const D=Ec(fo(M,h,"uCoordinate"));return l&&(D[31]&=127),y($f(D))}function j(M){return $f(s(Ec(fo(M,h,"scalar"))))}const C=new Set(l?[ya,Fn,n-Fn,BigInt("325606250916557431795983626356110631294008115727848805560023387167927233504"),BigInt("39382357235489614581723060781553021112529911719440698176882885853963445705823")]:[ya,Fn,n-Fn]);function $(M,D){const I=S(D);if(C.has(I))throw new Error("invalid private or public key received");const O=N(I,j(M));if(O===ya)throw new Error("invalid private or public key received");return w(O)}function A(M){if(o===void 0)return $(M,v);const D=j(M);Zl("scalar",D,k,g);const I=y(o(D));if(I===ya)throw new Error("invalid private or public key received");return w(I)}const E=A,z=$;function N(M,D){Zl("u",M,ya,n),Zl("scalar",D,k,g);const I=D,O=M;let L=Fn,H=ya,F=M,V=Fn;const J=I^I>>Fn;for(let Y=BigInt(d-1);Y>=ya;Y--){const G=Vv(n,J>>Y);({x_2:L,x_3:F}=f(G,L,F)),{x_2:H,x_3:V}=f(G,H,V);const ae=L+H,ce=y(ae*ae),ve=L-H,pe=y(ve*ve),de=ce-pe,ie=F+V,K=F-V,ge=y(K*ae),le=y(ie*ve),he=ge+le,un=ge-le;F=y(he*he),V=y(O*y(un*un)),L=y(ce*pe),H=y(de*(ce+y(m*de)))}const W=Vv(n,I);({x_2:L,x_3:F}=f(W,L,F)),{x_2:H,x_3:V}=f(W,H,V);const ne=a(H);return y(L*ne)}const T={secretKey:h,publicKey:h,seed:h},R=M=>(M=M===void 0?c(h):M,fo(M,T.seed,"seed"),M),_={randomSecretKey:R};return Object.freeze(T),Object.freeze(_),Object.freeze({keygen:cF(R,E),getSharedSecret:z,getPublicKey:E,scalarMult:$,scalarMultBase:A,utils:_,GuBytes:v.slice(),lengths:T})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Xv=BigInt(0),gF=BigInt(1),Zv=BigInt(2),mF=BigInt(3),yF=BigInt(5),bF=BigInt(8),Rh=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffed"),kF={p:Rh,n:BigInt("0x1000000000000000000000000000000014def9dea2f79cd65812631a5cf5d3ed"),h:bF,a:BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec"),d:BigInt("0x52036cee2b6ffe738cc740797779e89800700a4d4141d8ab75eb4dca135978a3"),Gx:BigInt("0x216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a"),Gy:BigInt("0x6666666666666666666666666666666666666666666666666666666666666658")};function vE(e){const t=BigInt(10),n=BigInt(20),r=BigInt(40),s=BigInt(80),a=Rh,o=e*e%a*e%a,l=ur(o,Zv,a)*o%a,c=ur(l,gF,a)*e%a,d=ur(c,yF,a)*c%a,f=ur(d,t,a)*d%a,h=ur(f,n,a)*f%a,p=ur(h,r,a)*h%a,m=ur(p,s,a)*p%a,k=ur(m,s,a)*p%a,b=ur(k,t,a)*d%a;return{pow_p_5_8:ur(b,Zv,a)*e%a,b2:o}}function vF(e){return e[0]&=248,e[31]&=127,e[31]|=64,e}const Wv=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");function wF(e,t){const n=Rh,r=Ye(t*t*t,n),s=Ye(r*r*t,n),a=vE(e*s).pow_p_5_8;let i=Ye(e*r*a,n);const o=Ye(t*i*i,n),l=i,c=Ye(i*Wv,n),d=o===e,f=o===Ye(-e,n),h=o===Ye(-e*Wv,n);return d&&(i=l),(f||h)&&(i=c),VP(i,n)&&(i=Ye(-i,n)),{isValid:d||f,value:i}}const Kv=fF(kF,{uvRatio:wF}),P0=(()=>{const e=Rh,t=n=>{const{pow_p_5_8:r,b2:s}=vE(n);return Ye(ur(r,mF,e)*s,e)};return pF({P:e,type:"x25519",powPminus2:t,adjustScalarBytes:vF,scalarMultBase:n=>{const r=Ye(n,Kv.Fn.ORDER);if(r===Xv)return Xv;const s=Kv.BASE.multiply(r);return Ye((s.Z+s.Y)*t(Ye(s.Z-s.Y,e)),e)}})})(),SF=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 ws(e,t,n,r,s){return e=e+t+s|0,r=jf(r^e,16),n=n+r|0,t=jf(t^n,12),{a:e,b:t,c:n,d:r}}function Ss(e,t,n,r,s){return e=e+t+s|0,r=jf(r^e,8),n=n+r|0,t=jf(t^n,7),{a:e,b:t,c:n,d:r}}function jF(e,t={},n,r,s){if(ds(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&&Jn(i,r,"salt"),o!==void 0&&Jn(o,s,"personalization")}class EF{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);ds(t),ds(n),this.blockLen=t,this.outputLen=n,this.buffer=new Uint8Array(t),this.buffer32=Sf(this.buffer)}update(t){wf(this),Jn(t);const{blockLen:n,buffer:r,buffer32:s}=this,a=t.length,i=t.byteOffset,o=t.buffer;for(let l=0;l<a;){this.pos===n&&(Mi(s),this.compress(s,0,!1),Mi(s),this.pos=0);const c=Math.min(n-this.pos,a-l),d=i+l;if(c===n&&!(d%4)&&l+c<a){const f=new Uint32Array(o,d,Math.floor((a-l)/4));Mi(f);for(let h=0;l+n<a;h+=s.length,l+=n)this.length+=n,this.compress(f,h,!1);Mi(f);continue}r.set(l===0&&c===a?t:t.subarray(l,l+c),this.pos),this.pos+=c,this.length+=c,l+=c}return this}digestInto(t){if(wf(this),Yj(t,this),t.byteOffset&3)throw new RangeError('"output" expected 4-byte aligned byteOffset, got '+t.byteOffset);const{pos:n,buffer32:r}=this;this.finished=!0,this.buffer.fill(0,n),Mi(r),this.compress(r,0,!0),Mi(r);const s=this.get(),a=t===this.buffer?r:Sf(t),i=Math.floor(this.outputLen/4);for(let d=0;d<i;d++)a[d]=Cl(s[d]);const o=this.outputLen%4;if(!o)return;const l=i*4,c=s[i];for(let d=0;d<o;d++)t[l+d]=c>>>8*d}digest(){const{buffer:t,outputLen:n}=this;this.digestInto(t);const r=t.slice(0,n);return this.destroy(),r}_cloneInto(t){const{buffer:n,length:r,finished:s,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=s,t.length=r,t.pos=o,t.outputLen=i,t}clone(){return this._cloneInto()}}function $F(e,t,n,r,s,a,i,o,l,c,d,f,h,p,m,k,b,g,y,v){let w=0;for(let S=0;S<r;S++)({a:s,b:l,c:h,d:b}=ws(s,l,h,b,n[t+e[w++]])),{a:s,b:l,c:h,d:b}=Ss(s,l,h,b,n[t+e[w++]]),{a,b:c,c:p,d:g}=ws(a,c,p,g,n[t+e[w++]]),{a,b:c,c:p,d:g}=Ss(a,c,p,g,n[t+e[w++]]),{a:i,b:d,c:m,d:y}=ws(i,d,m,y,n[t+e[w++]]),{a:i,b:d,c:m,d:y}=Ss(i,d,m,y,n[t+e[w++]]),{a:o,b:f,c:k,d:v}=ws(o,f,k,v,n[t+e[w++]]),{a:o,b:f,c:k,d:v}=Ss(o,f,k,v,n[t+e[w++]]),{a:s,b:c,c:m,d:v}=ws(s,c,m,v,n[t+e[w++]]),{a:s,b:c,c:m,d:v}=Ss(s,c,m,v,n[t+e[w++]]),{a,b:d,c:k,d:b}=ws(a,d,k,b,n[t+e[w++]]),{a,b:d,c:k,d:b}=Ss(a,d,k,b,n[t+e[w++]]),{a:i,b:f,c:h,d:g}=ws(i,f,h,g,n[t+e[w++]]),{a:i,b:f,c:h,d:g}=Ss(i,f,h,g,n[t+e[w++]]),{a:o,b:l,c:p,d:y}=ws(o,l,p,y,n[t+e[w++]]),{a:o,b:l,c:p,d:y}=Ss(o,l,p,y,n[t+e[w++]]);return{v0:s,v1:a,v2:i,v3:o,v4:l,v5:c,v6:d,v7:f,v8:h,v9:p,v10:m,v11:k,v12:b,v13:g,v14:y,v15:v}}const Dt=AP.slice();class CF extends EF{constructor(n={}){n=nE({},n);const r=n.dkLen===void 0?32:n.dkLen;super(64,r);ee(this,"v0",Dt[0]|0);ee(this,"v1",Dt[1]|0);ee(this,"v2",Dt[2]|0);ee(this,"v3",Dt[3]|0);ee(this,"v4",Dt[4]|0);ee(this,"v5",Dt[5]|0);ee(this,"v6",Dt[6]|0);ee(this,"v7",Dt[7]|0);jF(r,n,32,8,8);let{key:s,personalization:a,salt:i}=n,o=0;if(s!==void 0&&(Jn(s,void 0,"key"),o=s.length),this.v0^=this.outputLen|o<<8|65536|1<<24,i!==void 0){Jn(i,void 0,"salt");const l=Sf(Ov(i));this.v4^=Cl(l[0]),this.v5^=Cl(l[1])}if(a!==void 0){Jn(a,void 0,"personalization");const l=Sf(Ov(a));this.v6^=Cl(l[0]),this.v7^=Cl(l[1])}if(s!==void 0){const l=new Uint8Array(this.blockLen);l.set(s),this.update(l),pg(l)}}get(){const{v0:n,v1:r,v2:s,v3:a,v4:i,v5:o,v6:l,v7:c}=this;return[n,r,s,a,i,o,l,c]}set(n,r,s,a,i,o,l,c){this.v0=n|0,this.v1=r|0,this.v2=s|0,this.v3=a|0,this.v4=i|0,this.v5=o|0,this.v6=l|0,this.v7=c|0}compress(n,r,s){const a=jP(this.length),i=SP(this.length),{v0:o,v1:l,v2:c,v3:d,v4:f,v5:h,v6:p,v7:m,v8:k,v9:b,v10:g,v11:y,v12:v,v13:w,v14:S,v15:j}=$F(SF,r,n,10,this.v0,this.v1,this.v2,this.v3,this.v4,this.v5,this.v6,this.v7,Dt[0],Dt[1],Dt[2],Dt[3],a^Dt[4],i^Dt[5],s?~Dt[6]:Dt[6],Dt[7]);this.v0^=o^k,this.v1^=l^b,this.v2^=c^g,this.v3^=d^y,this.v4^=f^v,this.v5^=h^w,this.v6^=p^S,this.v7^=m^j}destroy(){this.destroyed=!0,pg(this.buffer32),this.set(0,0,0,0,0,0,0,0)}}const Ed=MP(e=>new CF(e));class Yv{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(EP(t),Jn(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 r=this.blockLen,s=new Uint8Array(r);s.set(n.length>r?t.create().update(n).digest():n);for(let a=0;a<s.length;a++)s[a]^=54;this.iHash.update(s),this.oHash=t.create();for(let a=0;a<s.length;a++)s[a]^=106;this.oHash.update(s),pg(s)}update(t){return wf(this),this.iHash.update(t),this}digestInto(t){wf(this),Yj(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:r,finished:s,destroyed:a,blockLen:i,outputLen:o,canXOF:l}=this;return t=t,t.finished=s,t.destroyed=a,t.blockLen=i,t.outputLen=o,t.canXOF=l,t.oHash=n._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const op=(()=>{const e=(t,n,r)=>new Yv(t,n).update(r).digest();return e.create=(t,n)=>new Yv(t,n),e})(),TF=new TextEncoder().encode("Noise_IK_25519_ChaChaPoly_BLAKE2s"),Vr=32,Qv=65535,MF=2n**64n-1n,Jv=e=>Ed(e,{dkLen:Vr}),Mf=(...e)=>{const t=new Uint8Array(e.reduce((r,s)=>r+s.length,0));let n=0;for(const r of e)t.set(r,n),n+=r.length;return t};function e2(e,t,n){const r=op(Ed,e,t),s=op(Ed,r,new Uint8Array([1])),a=op(Ed,r,Mf(s,new Uint8Array([2])));return[s,a]}function wE(){return mg(P0.utils.randomSecretKey())}function mg(e){if(e.length!==Vr)throw new Error(`X25519 private key must be ${Vr} bytes`);return{publicKey:P0.getPublicKey(e),privateKey:e}}const Nf=(e,t)=>P0.getSharedSecret(e.privateKey,t);var xo,Da,Tc,yg;class lp{constructor(){Ae(this,Tc);Ae(this,xo);Ae(this,Da,0n)}setKey(t){je(this,xo,t),je(this,Da,0n)}encrypt(t,n=new Uint8Array(0)){const r=X(this,xo);return r===void 0?t:_v(r,Q(this,Tc,yg).call(this),n).encrypt(t)}decrypt(t,n=new Uint8Array(0)){const r=X(this,xo);return r===void 0?t:_v(r,Q(this,Tc,yg).call(this),n).decrypt(t)}}xo=new WeakMap,Da=new WeakMap,Tc=new WeakSet,yg=function(){if(X(this,Da)===MF)throw new Error("nonce exhausted");const t=new Uint8Array(12);return new DataView(t.buffer).setBigUint64(4,X(this,Da),!0),je(this,Da,X(this,Da)+1n),t};var Ia,Er;class NF{constructor(){Ae(this,Ia);Ae(this,Er);ee(this,"cipher",new lp);const t=TF;je(this,Er,t.length<=Vr?Mf(t,new Uint8Array(Vr-t.length)):Jv(t)),je(this,Ia,X(this,Er).slice())}mixKey(t){const[n,r]=e2(X(this,Ia),t);je(this,Ia,n),this.cipher.setKey(r.subarray(0,Vr))}mixHash(t){je(this,Er,Jv(Mf(X(this,Er),t)))}encryptAndHash(t){const n=this.cipher.encrypt(t,X(this,Er));return this.mixHash(n),n}decryptAndHash(t){const n=this.cipher.decrypt(t,X(this,Er));return this.mixHash(t),n}get handshakeHash(){return X(this,Er)}split(){const[t,n]=e2(X(this,Ia),new Uint8Array(0)),r=new lp;r.setKey(t.subarray(0,Vr));const s=new lp;return s.setKey(n.subarray(0,Vr)),[r,s]}}Ia=new WeakMap,Er=new WeakMap;function SE(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 AF(e,t,n,r){t.push(n.ephemeral.publicKey),e.mixHash(n.ephemeral.publicKey),e.mixKey(Nf(n.ephemeral,r)),t.push(e.encryptAndHash(n.static.publicKey)),e.mixKey(Nf(n.static,r))}function zF(e,t,n){const r=SE(t,Vr).slice();return e.mixHash(r),e.mixKey(Nf(n.ephemeral,r)),e.mixKey(Nf(n.static,r)),r}const t2=(e,t)=>{if(e.length>Qv)throw new Error(`${t} exceeds ${Qv} bytes`)};function RF(e,t){const n=new NF;return n.mixHash(e),n.mixHash(t),n}function _F(e){const t=e.ephemeral??wE(),n=RF(e.prologue,e.remoteStatic);return{writeMessage1(r){const s=[];AF(n,s,{static:e.static,ephemeral:t},e.remoteStatic),s.push(n.encryptAndHash(r));const a=Mf(...s);return t2(a,"handshake message"),a},readMessage2(r){t2(r,"handshake message");const s={buffer:r,offset:0};zF(n,s,{ephemeral:t,static:e.static});const a=n.decryptAndHash(SE(s,r.length-s.offset)),[i,o]=n.split();return{payload:a,result:{send:i,receive:o,handshakeHash:n.handshakeHash}}}}}const OF=new TextEncoder().encode("pinomad/1"),jE=new TextEncoder,EE=new TextDecoder("utf-8",{fatal:!0}),DF=e=>jE.encode(JSON.stringify(e));function IF(e){try{return JSON.parse(EE.decode(e))}catch{throw new Error("handshake payload is not JSON")}}function LF(e){const t=IF(e);if((t==null?void 0:t.v)!==1)throw new Error("unsupported host hello");return{v:1}}const Tl="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";function $E(e){let t="";for(let n=0;n<e.length;n+=3){const r=e[n],s=e[n+1],a=e[n+2];t+=Tl[r>>2]+Tl[(r&3)<<4|(s??0)>>4],s!==void 0&&(t+=Tl[(s&15)<<2|(a??0)>>6]),a!==void 0&&(t+=Tl[a&63])}return t}function Za(e){if(e.length%4===1)throw new Error("invalid base64url");const t=new Map(Array.from(Tl,(r,s)=>[r,s])),n=[];for(let r=0;r<e.length;r+=4){const a=[...e.slice(r,r+4)].map(o=>{const l=t.get(o);if(l===void 0)throw new Error("invalid base64url");return l}),i=a.reduce((o,l,c)=>o|l<<18-c*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 Zu=65518;var Mc,Nc,po;class BF{constructor(t){Ae(this,Mc);Ae(this,Nc);Ae(this,po,[]);je(this,Mc,t.send),je(this,Nc,t.receive)}seal(t){const n=jE.encode(t),r=[];for(let s=0;s<=n.length;s+=Zu){const a=s+Zu>=n.length,i=new Uint8Array(1+Math.min(Zu,n.length-s));if(i[0]=a?0:1,i.set(n.subarray(s,s+Zu),1),r.push(X(this,Mc).encrypt(i)),a)break}return r}open(t){const n=X(this,Nc).decrypt(t),r=n[0];if(r!==0&&r!==1)throw new Error("bad record flag");if(X(this,po).push(n.subarray(1)),r===1)return;const s=HF(X(this,po));return je(this,po,[]),EE.decode(s)}}Mc=new WeakMap,Nc=new WeakMap,po=new WeakMap;function HF(e){const t=new Uint8Array(e.reduce((r,s)=>r+s.length,0));let n=0;for(const r of e)t.set(r,n),n+=r.length;return t}function qF(e){let t=e.pairing;return{label:e.url,open(n){const r=new WebSocket(e.url);r.binaryType="arraybuffer";const s=_F({prologue:OF,static:e.device,remoteStatic:e.hostKey});let a,i=[],o=!1;const l=(d,f)=>{o||(o=!0,n.closed(d,f))},c=d=>{r.close(),l(1008,d)};return r.onopen=()=>{const d=t===void 0?{v:1}:{v:1,pair:t};r.send(s.writeMessage1(DF(d)))},r.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}=s.readMessage2(h);LF(p),a=new BF(m),t!==void 0&&(t=void 0,(f=e.onPaired)==null||f.call(e));const k=i;i=[];for(const b of k)for(const g of a.seal(b))r.send(g)}else{const p=a.open(h);p!==void 0&&n.message(p)}}catch(h){c(h instanceof Error?h.message:"secure channel failure")}},r.onclose=d=>l(d.code,d.reason===""?void 0:d.reason),r.onerror=()=>{},{send(d){if(a===void 0){i.push(d);return}for(const f of a.seal(d))r.send(f)},close(){r.close()}}}}}function UF({view:e,remote:t,self:n,onClose:r}){const s=e.connection==="connected",a=n===void 0?void 0:$E(n.publicKey),[i,o]=x.useState(),[l,c]=x.useState(),d=()=>{c(void 0),t.controller.createPairing().then(o,f=>{c(f instanceof Error?f.message:String(f))})};return u.jsx(ui,{isOpen:!0,onOpenChange:f=>f?void 0:r(),width:440,children:u.jsx(sa,{header:u.jsx(di,{title:"Devices",subtitle:"Paired devices can reach this host over the secure channel.",onOpenChange:()=>r()}),content:u.jsx(aa,{children:u.jsxs(pt,{gap:4,padding:2,children:[e.devices.length===0?u.jsx(Re,{type:"supporting",children:"No paired devices."}):u.jsx(bn,{density:"compact",children:e.devices.map(f=>u.jsx(PF,{device:f,isSelf:f.publicKey===a,connected:s,remote:t},f.publicKey))}),l===void 0?null:u.jsx(Wa,{status:"error",title:"Could not create a pairing offer",description:l}),i===void 0?u.jsx($e,{label:"Pair a device",variant:"secondary",isDisabled:!s,onClick:d}):u.jsx(FF,{url:i.url,expiresAt:i.expiresAt,onRenew:d})]})})})})}function PF({device:e,isSelf:t,connected:n,remote:r}){return u.jsx(yt,{label:e.name,description:`Paired ${new Date(e.pairedAt).toLocaleDateString()}`,endContent:u.jsxs(Kt,{gap:2,vAlign:"center",children:[t?u.jsx(Ys,{label:"This device",size:"sm"}):null,u.jsx($e,{label:"Revoke",variant:"ghost",size:"sm",isDisabled:!n,onClick:()=>void r.controller.revokeDevice(e.publicKey)})]})})}function FF({url:e,expiresAt:t,onRenew:n}){const[r,s]=x.useState(Date.now());x.useEffect(()=>{const i=setInterval(()=>s(Date.now()),1e3);return()=>clearInterval(i)},[]);const a=Math.max(0,Math.ceil((t-r)/1e3));return a===0?u.jsxs(Kt,{gap:2,vAlign:"center",children:[u.jsx(Re,{type:"supporting",children:"Expired"}),u.jsx($e,{label:"New code",variant:"secondary",size:"sm",onClick:n})]}):u.jsxs(pt,{gap:3,hAlign:"center",children:[u.jsx(GF,{text:e}),u.jsx(Re,{type:"supporting",style:{wordBreak:"break-all",userSelect:"all"},children:e}),u.jsxs(Re,{type:"supporting",children:["Expires in ",Math.floor(a/60),":",String(a%60).padStart(2,"0")]})]})}const cp=2;function GF({text:e}){const t=x.useMemo(()=>QU(e,{border:0}),[e]),n=t.size+cp*2;return u.jsxs("svg",{role:"img","aria-label":"Pairing QR code",viewBox:`0 0 ${n} ${n}`,width:200,height:200,style:{display:"block"},children:[u.jsx("rect",{width:n,height:n,fill:"#ffffff"}),u.jsx("path",{shapeRendering:"crispEdges",fill:"#000000",d:t.data.flatMap((r,s)=>r.map((a,i)=>a?`M${i+cp} ${s+cp}h1v1h-1z`:"")).filter(r=>r!=="").join("")})]})}const VF={pending:"pending",in_progress:"in progress",completed:"completed"};function XF({doc:e}){if(e.value===null)return null;const t=Ah(e.presentation,e.value),n=t.type==="pinomad.todo"?"Todo":t.type==="pinomad.question"?"Questions":e.kind,r=t.type==="pinomad.todo"?u.jsx(ZF,{doc:t.value}):t.type==="pinomad.question"?u.jsx(KF,{doc:t.value}):u.jsx(YF,{value:t.value});return u.jsxs(pt,{gap:1,children:[u.jsx(Re,{type:"label",weight:"semibold",children:n}),r]})}function ZF({doc:e}){return u.jsx(bn,{density:"compact",children:e.items.length===0?u.jsx(yt,{label:"Empty"}):e.items.map((t,n)=>u.jsx(yt,{label:t.text,startContent:u.jsx(Ys,{label:VF[t.status],size:"sm"})},n))})}function WF(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 r=n.answers[t];if(r===void 0||r.selected.length===0&&r.other===void 0)return{label:"skipped",color:"gray"};const s=[r.selected.join(", "),...r.other===void 0?[]:[`other: "${r.other}"`]].filter(a=>a!=="").join("; ");return{label:s===""?"skipped":s,color:"green"}}function KF({doc:e}){return u.jsx(bn,{density:"compact",children:e.requests.length===0?u.jsx(yt,{label:"Empty"}):e.requests.flatMap(t=>t.questions.map((n,r)=>{const s=WF(t,r);return u.jsx(yt,{label:n.question,description:s.label,startContent:u.jsx(Ys,{label:n.header,size:"sm"})},`${t.id}-${r}`)}))})}function YF({value:e}){const t=typeof e=="object"&&e!==null&&!Array.isArray(e)?Object.entries(e):[["value",e]];return u.jsx(bn,{density:"compact",children:t.map(([n,r])=>u.jsx(yt,{label:n,description:QF(r)},n))})}function QF(e){const t=JSON.stringify(e);return t.length<=120?t:`${t.slice(0,117)}...`}function JF({view:e,remote:t,conversation:n}){return u.jsx("div",{className:"w-80 shrink-0 overflow-y-auto border-l border-border p-3","aria-label":"Live state",children:u.jsx(CE,{view:e,remote:t,conversation:n})})}function eG({open:e,onOpenChange:t,view:n,remote:r,conversation:s}){return u.jsx(ui,{isOpen:e,onOpenChange:t,width:360,children:u.jsx(sa,{header:u.jsx(di,{title:"Live state",onOpenChange:t}),content:u.jsx(aa,{children:u.jsx(CE,{view:n,remote:r,conversation:s})})})})}function CE({view:e,remote:t,conversation:n}){var l;const r=e.tasks===void 0?[]:Tj(e.tasks),s=[...e.notices].reverse().slice(0,5),a=n===void 0?[]:qq(n),i=n===void 0||(l=e.checkout)==null?void 0:l.branch,o=n===void 0?void 0:Cj(n).cwd;return u.jsxs(pt,{gap:4,children:[n===void 0||i===void 0&&o===void 0?null:u.jsxs(bn,{density:"compact",header:u.jsx(Re,{type:"label",weight:"semibold",children:"Workspace"}),children:[i===void 0?null:u.jsx(yt,{label:"Branch",description:i}),o===void 0?null:u.jsx(yt,{label:"Path",description:o})]}),e.docs.map(c=>u.jsx(XF,{doc:c,remote:t,connected:e.connection==="connected"},c.kind)),u.jsx(bn,{density:"compact",header:u.jsx(Re,{type:"label",weight:"semibold",children:"Tasks"}),children:r.length===0?u.jsx(yt,{label:"No live tasks"}):r.map(c=>u.jsx(yt,{label:`${" ".repeat(c.depth)}${c.depth>0?"└ ":""}${c.label}`},c.id))}),s.length===0?null:u.jsx(bn,{density:"compact",header:u.jsx(Re,{type:"label",weight:"semibold",children:"Notices"}),children:s.map(c=>u.jsx(yt,{label:c.message,startContent:u.jsx(_o,{variant:c.level==="error"?"error":c.level==="warning"?"warning":"neutral",label:c.level})},c.id))}),a.length===0?null:u.jsx(bn,{density:"compact",header:u.jsx(Re,{type:"label",weight:"semibold",children:"Usage"}),children:a.map(c=>u.jsx(yt,{label:c.key,description:`↑${c.input} ↓${c.output} · $${c.cost.toFixed(4)}`},c.key))}),u.jsx(nG,{view:e})]})}const tG={connecting:"warning",connected:"success",failed:"error",disabled:"neutral"};function nG({view:e}){const t=e.mcp;return t===null||t.servers.length===0&&t.errors.length===0?null:u.jsxs(bn,{density:"compact",header:u.jsx(Re,{type:"label",weight:"semibold",children:"MCP"}),children:[t.servers.map(n=>u.jsx(yt,{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:u.jsx(_o,{variant:tG[n.state],label:n.state,isPulsing:n.state==="connecting"})},n.name)),t.errors.map((n,r)=>u.jsx(yt,{label:n,startContent:u.jsx(_o,{variant:"error",label:"config error"})},r))]})}const TE="pinomad.sidebar.open",rG=()=>typeof window>"u"||window.localStorage.getItem(TE)!=="false";function sG({view:e,remote:t,device:n,narrow:r,drafting:s,draftingChat:a,draftLabel:i,conversation:o,summary:l,parentSummary:c,banner:d,onDraft:f,onOpenChanges:h,children:p}){const[m,k]=x.useState(rG),[b,g]=x.useState(!1),[y,v]=x.useState(!1),[w,S]=x.useState(!1),j=()=>{window.localStorage.setItem(TE,String(!m)),k(!m)},C=E=>void t.controller.switchConversation(E),$=e.tasks!==void 0&&Tj(e.tasks).length>0,A=u.jsx(RU,{view:e,remote:t,draftingChat:a,shownId:o==null?void 0:o.conversation.id,onDraft:f,onSelect:()=>v(!1)});return u.jsxs(u.Fragment,{children:[u.jsx(Rw,{className:"pigui-app-layout text-foreground",contentPadding:0,mobileNav:!1,variant:"elevated",sideNav:r||!m?void 0:u.jsx(t5,{resizable:{defaultWidth:260,minWidth:240,maxWidth:320,autoSaveId:"pinomad-app-shell"},header:u.jsx(AU,{connection:e.connection,onCollapse:j}),footer:u.jsx($v,{view:e,onOpenDevices:()=>S(!0)}),children:A}),children:u.jsxs("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:[u.jsx(iG,{narrow:r,sidebarOpen:m,onToggleSidebar:j,onOpenNav:()=>v(!0),title:s?i:(l==null?void 0:l.title)??"New conversation",parentSummary:c,onBackToParent:C,showChanges:o!==void 0,onOpenChanges:h,dockOpen:b,onDockChange:g,liveActivity:$}),d,u.jsxs("div",{className:"flex min-h-0 min-w-0 flex-1",children:[u.jsx("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:p}),!r&&b?u.jsx(JF,{view:e,remote:t,conversation:o}):null]})]})}),r?u.jsxs(Em,{className:"pigui-app-layout text-foreground",isOpen:y,onOpenChange:v,header:u.jsxs("span",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-sm font-semibold",children:"PiNomad"}),u.jsx(Hj,{connection:e.connection})]}),children:[A,u.jsx($v,{view:e,onOpenDevices:()=>S(!0),onSelect:()=>v(!1)})]}):null,r?u.jsx(eG,{open:b,onOpenChange:g,view:e,remote:t,conversation:o}):null,w?u.jsx(UF,{view:e,remote:t,self:n,onClose:()=>S(!1)}):null,u.jsx(em,{position:"topEnd",inset:{top:48},isTopLayer:!0,children:u.jsx(aG,{notices:e.notices})})]})}function aG({notices:e}){const t=vO(),n=x.useRef(void 0);return x.useEffect(()=>{var s;const r=(s=e[e.length-1])==null?void 0:s.id;if(n.current===void 0){n.current=r??-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)});r!==void 0&&(n.current=r)},[e,t]),null}function iG({narrow:e,sidebarOpen:t,onToggleSidebar:n,onOpenNav:r,title:s,parentSummary:a,onBackToParent:i,showChanges:o,onOpenChanges:l,dockOpen:c,onDockChange:d,liveActivity:f}){return u.jsxs("div",{className:"flex h-10 shrink-0 items-center gap-1 border-b border-border px-3",children:[e?u.jsx(Zr,{icon:u.jsx(sg,{className:"size-4"}),label:"Open navigation",size:"sm",variant:"ghost",onClick:r}):t?null:u.jsx(Zr,{icon:u.jsx(sg,{className:"size-4"}),label:"Expand sidebar",size:"sm",variant:"ghost",onClick:n}),u.jsx("h1",{className:"min-w-0 flex-1 truncate text-sm font-normal",children:a===void 0?s:u.jsxs("span",{className:"flex items-center gap-1",children:[u.jsx($e,{label:a.title??"New conversation","aria-label":`Back to ${a.title??"New conversation"}`,variant:"ghost",size:"sm",onClick:()=>i(a.id)}),u.jsx("span",{"aria-hidden":"true",className:"text-muted",children:"›"}),u.jsx("span",{className:"truncate",children:s})]})}),o?u.jsx(Zr,{icon:u.jsx(zj,{className:"size-4"}),label:"Changes",size:"sm",variant:"ghost",onClick:l}):null,u.jsxs("span",{className:"relative",children:[u.jsx(Zr,{"aria-pressed":c,icon:u.jsx(CU,{className:"size-4"}),label:"Dock",size:"sm",tooltip:c?"Hide dock":"Show dock",variant:"ghost",onClick:()=>d(!c)}),!c&&f?u.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 Ml({chrome:e,icon:t,label:n,testId:r}){const s=e==="selector";return u.jsxs("span",{className:`inline-flex h-7 min-w-0 max-w-[16rem] items-center text-sm font-medium ${s?"gap-2 px-3 text-foreground":"gap-1.5 px-2 text-muted"}`,"data-testid":r,children:[u.jsx(t,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),u.jsx("span",{className:"truncate",children:n}),s?u.jsx(Nj,{"aria-hidden":"true",className:"invisible size-4 shrink-0"}):null]})}function ME({location:e,branch:t,meter:n}){return u.jsxs("span",{className:"flex w-full min-w-0 items-center gap-2",children:[e,t,u.jsx("span",{className:"ml-auto inline-flex shrink-0",children:n})]})}function oG({value:e,onChange:t,isDisabled:n=!1}){return u.jsx("div",{className:"max-w-full","data-testid":"checkout-strategy-picker",children:u.jsx(im,{isLabelHidden:!0,label:"Where to work",placement:"below",isDisabled:n,options:[{value:"worktree",label:"Git worktree",icon:u.jsx(rg,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})},{value:"local",label:"Project folder",icon:u.jsx(yf,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"})}],size:"sm",startIcon:e==="worktree"?u.jsx(rg,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}):u.jsx(yf,{"aria-hidden":"true",className:"size-4 shrink-0 text-muted"}),value:e,variant:"ghost",onChange:r=>t(r==="worktree"?"worktree":"local")})})}const n2={off:"Off",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"X-High",max:"Max"},up=(e,t)=>e!==void 0&&t!==void 0&&e.provider===t.provider&&e.modelId===t.modelId;function NE({models:e,selected:t,isDisabled:n=!1,onModelChange:r,onLevelChange:s}){const[a,i]=x.useState(""),o=e.find(f=>up(f,t.model)),l=(o==null?void 0:o.thinkingLevels)??["off"],c=a.trim().toLowerCase(),d=c===""?e:e.filter(f=>f.name.toLowerCase().includes(c)||`${f.provider}/${f.modelId}`.toLowerCase().includes(c));return u.jsx(e3,{alignment:"start",label:"Model and Thinking",placement:"above",width:236,content:u.jsxs("div",{className:"flex w-full flex-col gap-1 p-1","data-testid":"model-thinking-popover",onClick:f=>f.stopPropagation(),onMouseDown:f=>f.stopPropagation(),onPointerDown:f=>f.stopPropagation(),children:[u.jsx(Uo,{isLabelHidden:!0,label:"Search models",placeholder:"Search models",size:"sm",value:a,width:"100%",onChange:f=>i(f)}),u.jsx(bn,{"aria-label":"Model",className:"max-h-72 overflow-y-auto",density:"compact",children:d.map(f=>u.jsx(yt,{description:f.provider,endContent:up(f,t.model)?u.jsx(Sv,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,isSelected:up(f,t.model),label:f.name,onClick:()=>r({provider:f.provider,modelId:f.modelId})},`${f.provider}/${f.modelId}`))}),l.length>1?u.jsxs("div",{"aria-label":"Thinking",role:"group",children:[u.jsx("p",{className:"px-2 pt-1 text-xs text-muted",children:"Thinking"}),u.jsx(bn,{density:"compact",children:l.map(f=>u.jsx(yt,{endContent:f===t.level?u.jsx(Sv,{"aria-hidden":"true",className:"size-4 shrink-0 text-foreground"}):void 0,isDisabled:n,label:n2[f],onClick:()=>s(f)},f))})]}):null]}),children:u.jsx($e,{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:u.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[u.jsx("span",{className:"truncate",children:(()=>{var h;const f=(o==null?void 0:o.name)??((h=t.model)==null?void 0:h.modelId)??"No model";return l.length>1?`${f} · ${n2[t.level]}`:f})()}),u.jsx(Nj,{"aria-hidden":"true",className:"size-4 shrink-0"})]})})})}const AE="pinomad.draft.model",r2=["off","minimal","low","medium","high","xhigh","max"],dp=(e,t)=>{if(e.includes(t))return t;const n=r2.indexOf(t);return e.filter(r=>r2.indexOf(r)<=n).at(-1)??"off"},ml=(e,t)=>t===void 0?void 0:e.find(n=>n.provider===t.provider&&n.modelId===t.modelId);function lG(e){try{const t=localStorage.getItem(AE);if(t===null)return;const n=JSON.parse(t);if(typeof n.provider=="string"&&typeof n.modelId=="string"&&typeof n.thinkingLevel=="string"&&e.some(r=>r.provider===n.provider&&r.modelId===n.modelId))return n}catch{}}function cG(e){var i;const[t,n]=x.useState(()=>{var f;const o=lG(e.models),l=o!==void 0?{provider:o.provider,modelId:o.modelId}:e.defaults.model??(e.models[0]===void 0?void 0:{provider:e.models[0].provider,modelId:e.models[0].modelId}),c=((f=ml(e.models,l))==null?void 0:f.thinkingLevels)??["off"],d=(o==null?void 0:o.thinkingLevel)??e.defaults.thinkingLevel??"off";return{model:l,level:dp(c,d)}}),r=(o,l)=>{localStorage.setItem(AE,JSON.stringify({...o,thinkingLevel:l}))},s=t.model!==void 0&&ml(e.models,t.model)!==void 0?t.model:ml(e.models,e.defaults.model)!==void 0?e.defaults.model:e.models[0]===void 0?void 0:{provider:e.models[0].provider,modelId:e.models[0].modelId},a=dp(((i=ml(e.models,s))==null?void 0:i.thinkingLevels)??["off"],t.level);return{pick:{model:s,level:a},setModel:o=>{var c;const l=dp(((c=ml(e.models,o))==null?void 0:c.thinkingLevels)??["off"],a);n({model:o,level:l}),r(o,l)},setLevel:o=>{n(l=>({...l,level:o})),s!==void 0&&r(s,o)}}}function s2(e){return(e==null?void 0:e.querySelector('[aria-multiline="true"]'))??null}function uG({disabled:e=!1,placeholder:t,inputRef:n,onSubmitRequest:r,value:s,onValueChange:a}){const i=x.useRef(null),o=x.useRef(null);x.useEffect(()=>{if(n)return n.current={focus:()=>{var c;return(c=o.current)==null?void 0:c.focus()},focusAtEnd:()=>{const c=s2(i.current);if(!c)return;c.focus();const d=window.getSelection();if(!d)return;const f=document.createRange();f.selectNodeContents(c),f.collapse(!1),d.removeAllRanges(),d.addRange(f)}},()=>{n.current=null}},[n]),x.useEffect(()=>{const c=s2(i.current);c&&(t?c.setAttribute("aria-placeholder",t):c.removeAttribute("aria-placeholder"),e?c.setAttribute("aria-disabled","true"):c.removeAttribute("aria-disabled"))},[t,e]);const l=c=>{c.nativeEvent.isComposing||c.nativeEvent.keyCode===229||c.key==="Enter"&&(c.shiftKey||(c.preventDefault(),r()))};return u.jsx(dm,{ref:i,className:"prompt-input__input",handleRef:o,hasHistory:!1,isDisabled:e,label:"Prompt",pasteAsToken:!1,placeholder:t,value:s,onChange:c=>a==null?void 0:a(c),onKeyDown:l})}function zE({value:e,status:t="ready",className:n="",placeholder:r,inputRef:s,isDisabled:a=!1,startActions:i,endActions:o,footer:l,error:c,accent:d,accentFocusRing:f=!1,onSubmit:h,onStop:p,onValueChange:m,...k}){const g=(t==="streaming"||t==="submitted")&&!e.trim()&&!!p,y=!!e.trim(),v=()=>{y&&(h==null||h())};return u.jsxs("div",{className:`prompt-input ${n}`.trim(),"data-accent":d,"data-accent-focus":d&&f?"":void 0,"data-slot":"prompt-input","data-status":t,...k,children:[u.jsx(w3,{elevation:"low",footerActions:i,input:u.jsx(uG,{disabled:a,inputRef:s,placeholder:r,value:e,onValueChange:m,onSubmitRequest:v}),isStopShown:g&&!a,placeholder:r,sendActions:o,sendButton:u.jsx(fm,{className:"pigui-pressable",isDisabled:a||!g&&!y,onSend:v}),status:c?{type:"error",message:c}:void 0,value:e,onChange:w=>m==null?void 0:m(w),onStop:p,onSubmit:v}),l?u.jsx("div",{className:"prompt-input__footer","data-slot":"prompt-input-footer",children:l}):null]})}function Wl({children:e,className:t="",...n}){return u.jsx("div",{className:`prompt-suggestion prompt-suggestion--pill ${t}`.trim(),"data-slot":"prompt-suggestion",...n,children:e})}function dG({children:e,className:t="",...n}){return u.jsx("div",{className:`prompt-suggestion__items prompt-suggestion__items--pill ${t}`.trim(),"data-slot":"prompt-suggestion-items",...n,children:e})}function fG({children:e,className:t="",showEndIcon:n=!0,onPress:r,...s}){return u.jsxs("button",{className:`prompt-suggestion__item ${t}`.trim(),"data-slot":"prompt-suggestion-item",type:"button",onClick:r,...s,children:[e,n?u.jsx("span",{"aria-hidden":"true",className:"prompt-suggestion__item-end-icon",children:u.jsx(gU,{size:14})}):null]})}Wl.Items=dG;Wl.Item=fG;function _h({children:e,className:t="",tone:n="default",...r}){const s=n==="brand"?" text-shimmer--brand":"";return u.jsx("span",{className:`text-shimmer${s} ${t}`.trim(),"data-slot":"text-shimmer","data-tone":n,...r,children:e})}const hG=[{Icon:kU,label:"Explain this repo's architecture"},{Icon:Dj,label:"Fix the failing test"},{Icon:Oj,label:"Add a CLI flag with docs"},{Icon:zj,label:"Review my uncommitted changes"}];function xG({view:e,remote:t,draft:n,onDraft:r,connected:s}){const[a,i]=x.useState(""),[o,l]=x.useState(!1),c=x.useRef(!1),[d,f]=x.useState("worktree"),h=x.useRef(null),{pick:p,setModel:m,setLevel:k}=cG(e),b=n.kind==="project"?u.jsx(oG,{value:d,onChange:f,isDisabled:!s}):u.jsx(Ml,{chrome:"selector",icon:wd,label:"Chat",testId:"composer-location-label"});return u.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:u.jsxs("div",{className:"mx-auto my-auto flex w-full max-w-[44rem] flex-col items-center justify-center gap-6",children:[u.jsxs("h2",{className:"text-center text-3xl font-normal tracking-tight text-foreground max-lg:text-2xl",children:["Build something useful with ",u.jsx(_h,{tone:"brand",children:"PiNomad"})]}),u.jsx("div",{className:"flex w-full flex-wrap justify-center gap-2",children:u.jsx(im,{isLabelHidden:!0,label:"Project",placeholder:"No project",placement:"below",variant:"ghost",size:"sm",isDisabled:!s,value:n.kind==="chat"?"chat":n.path,startIcon:n.kind==="chat"?u.jsx(wd,{"aria-hidden":"true",className:"size-4 shrink-0"}):u.jsx(ng,{"aria-hidden":"true",className:"size-4 shrink-0"}),options:[{value:"chat",label:"No project",icon:u.jsx(wd,{"aria-hidden":"true",className:"size-4 shrink-0"})},...e.organized.projects.map(g=>({value:g.project.path,label:g.project.name,icon:u.jsx(ng,{"aria-hidden":"true",className:"size-4 shrink-0"})}))],onChange:g=>r(g==="chat"?{kind:"chat"}:{kind:"project",path:g})})}),u.jsx("div",{className:"flex w-full flex-col gap-3",children:u.jsx(zE,{accent:"brand",accentFocusRing:!0,value:a,inputRef:h,onValueChange:i,status:o?"submitted":"ready",onSubmit:()=>{const g=a.trim();g===""||c.current||(c.current=!0,l(!0),t.controller.createConversation(n,g,{...n.kind==="project"&&d==="local"?{checkout:"project"}:{},...p.model===void 0?{}:{model:p.model},thinkingLevel:p.level}).finally(()=>{c.current=!1,l(!1)}))},isDisabled:!s,placeholder:"Do anything with Pi",startActions:u.jsx(NE,{models:e.models,selected:{model:p.model,level:p.level},isDisabled:!s,onModelChange:m,onLevelChange:k}),footer:u.jsx(ME,{location:b})})}),u.jsx(Wl,{className:"w-full max-w-[35rem]",children:u.jsx(Wl.Items,{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:hG.map(({Icon:g,label:y})=>u.jsx(Wl.Item,{className:"items-center justify-start",showEndIcon:!1,onPress:()=>{var v;i(y),(v=h.current)==null||v.focusAtEnd()},children:u.jsxs("span",{className:"inline-flex min-w-0 items-center gap-2",children:[u.jsx(g,{"aria-hidden":"true",className:"size-4 shrink-0"}),u.jsx("span",{className:"truncate",children:y})]})},y))})})]})})}function pG({body:e,tag:t,className:n,...r}){return u.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",...r,children:[u.jsx("p",{className:"chat-queued-message__body min-w-0 flex-1 truncate","data-slot":"queued-message-body",title:e,children:e}),u.jsx("span",{className:"shrink-0 text-xs font-medium text-muted",children:t})]})}const gG={steer:"Steer",followUp:"Follow-up",write:"Write"};function mG({items:e}){return e.length===0?null:u.jsx("div",{className:"mx-auto mb-3 grid w-full gap-1.5","data-testid":"queued-message-list",children:e.map(t=>u.jsx(pG,{body:t.text,tag:gG[t.mode]},t.id))})}function yG({view:e,remote:t,conversation:n,busy:r,narrow:s}){var b;const[a,i]=x.useState(""),o=Cj(n),l=Lq(n),c=e.connection!=="connected",d=Bq(n),f=e.checkout,p=((b=e.home)==null?void 0:b.kind)==="project"?f!==void 0?u.jsx(Ml,{chrome:"selector",icon:rg,label:"Git worktree",testId:"composer-location-label"}):u.jsx(Ml,{chrome:"selector",icon:yf,label:"Project folder",testId:"composer-location-label"}):u.jsx(Ml,{chrome:"selector",icon:wd,label:"Chat",testId:"composer-location-label"}),m=f===void 0?null:u.jsx(Ml,{chrome:"button",icon:Rj,label:f.branch,testId:"composer-branch-label"}),k=g=>{const y=a.trim();y!==""&&(t.controller.submit(y,g),i(""))};return u.jsxs(u.Fragment,{children:[l===""?null:u.jsx(Re,{type:"supporting",children:l}),u.jsx(mG,{items:d}),u.jsx(zE,{value:a,status:r?"streaming":"ready",isDisabled:c,placeholder:r?"Steer the running turn…":"Ask the agent…",onValueChange:i,onSubmit:()=>k("steer"),onStop:r?()=>void t.controller.abort():void 0,startActions:u.jsxs(u.Fragment,{children:[u.jsx(nh,{button:{label:"More actions",variant:"ghost",size:"sm",isIconOnly:!0,icon:u.jsx(Sd,{"aria-hidden":"true"}),isDisabled:c},items:[{label:"Compact conversation",isDisabled:c,onClick:()=>void t.controller.compact(void 0)}]}),u.jsx(NE,{models:e.models,selected:{model:o.model,level:o.thinkingLevel??"off"},isDisabled:c,onModelChange:g=>void t.controller.setModel(g),onLevelChange:g=>void t.controller.setThinkingLevel(g)})]}),endActions:r&&a.trim()!==""?u.jsx($e,{label:"Follow-up",variant:"ghost",size:s?"md":"sm",tooltip:"Queue after the running turn",isDisabled:c,onClick:()=>k("followUp")}):null,footer:u.jsx(ME,{location:p,branch:m})})]})}const a2={};function ru(e,t){const n=x.useRef(a2);return n.current===a2&&(n.current=e(t)),n}const fp=O2[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],bG=fp&&fp!==x.useLayoutEffect?fp:e=>e();function li(e){const t=ru(kG).current;return t.next=e,bG(t.effect),t.trampoline}function kG(){const e={next:void 0,callback:vG,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function vG(){}function F0(e,...t){const n=new URL(`https://base-ui.com/production-error/${e}`);return t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function bg(e,t,n,r){const s=ru(RE).current;return SG(s,e,t,n,r)&&_E(s,[e,t,n,r]),s.callback}function wG(e){const t=ru(RE).current;return jG(t,e)&&_E(t,e),t.callback}function RE(){return{callback:null,cleanup:null,refs:[]}}function SG(e,t,n,r,s){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==s}function jG(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function _E(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 r=Array(t.length).fill(null);for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const i=a(n);typeof i=="function"&&(r[s]=i);break}case"object":{a.current=n;break}}}e.cleanup=()=>{for(let s=0;s<t.length;s+=1){const a=t[s];if(a!=null)switch(typeof a){case"function":{const i=r[s];typeof i=="function"?i():a(null);break}case"object":{a.current=null;break}}}}}}}const EG=parseInt(x.version,10);function $G(e){return EG>=e}function i2(e){if(!x.isValidElement(e))return null;const t=e,n=t.props;return($G(19)?n==null?void 0:n.ref:t.ref)??null}function kg(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function CG(e,t){const n={};for(const r in e){const s=e[r];if(t!=null&&t.hasOwnProperty(r)){const a=t[r](s);a!=null&&Object.assign(n,a);continue}s===!0?n[`data-${r.toLowerCase()}`]="":s&&(n[`data-${r.toLowerCase()}`]=s.toString())}return n}function TG(e,t){return typeof e=="function"?e(t):e}function MG(e,t){return typeof e=="function"?e(t):e}const Kl={};function OE(e,t,n,r,s){let a={...vg(e,Kl)};return t&&(a=$d(a,t)),n&&(a=$d(a,n)),r&&(a=$d(a,r)),a}function NG(e){if(e.length===0)return Kl;if(e.length===1)return vg(e[0],Kl);let t={...vg(e[0],Kl)};for(let n=1;n<e.length;n+=1)t=$d(t,e[n]);return t}function $d(e,t){return DE(t)?t(e):AG(e,t)}function AG(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=kg(e.style,r);break}case"className":{e[n]=IE(e.className,r);break}default:zG(n,r)?e[n]=RG(e[n],r):e[n]=r}}return e}function zG(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),s=e.charCodeAt(2);return n===111&&r===110&&s>=65&&s<=90&&(typeof t=="function"||typeof t>"u")}function DE(e){return typeof e=="function"}function vg(e,t){return DE(e)?e(t):e??Kl}function RG(e,t){return t?e?n=>{if(_G(n)){const s=n;wg(s);const a=t(s);return s.baseUIHandlerPrevented||e==null||e(s),a}const r=t(n);return e==null||e(n),r}:t:e}function wg(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function IE(e,t){return t?e?t+" "+e:t:e}function _G(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}const $a=Object.freeze({});function G0(e,t,n={}){const r=t.render,s=OG(t,n);if(n.enabled===!1)return null;const a=n.state??$a;return DG(e,r,s,a)}function OG(e,t={}){const{className:n,style:r,render:s}=e,{state:a=$a,ref:i,props:o,stateAttributesMapping:l,enabled:c=!0}=t,d=c?TG(n,a):void 0,f=c?MG(r,a):void 0,h=c?CG(a,l):$a,p=c?kg(h,Array.isArray(o)?NG(o):o)??$a:$a;return typeof document<"u"&&(c?Array.isArray(i)?p.ref=wG([p.ref,i2(s),...i]):p.ref=bg(p.ref,i2(s),i):bg(null,null)),c?(d!==void 0&&(p.className=IE(p.className,d)),f!==void 0&&(p.style=kg(p.style,f)),p):$a}function DG(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const s=OE(n,t.props);return s.ref=n.ref,x.cloneElement(t,s)}if(e&&typeof e=="string")return IG(e,n);throw new Error(F0(8))}function IG(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 LG({controlled:e,default:t,name:n,state:r="value"}){const{current:s}=x.useRef(e!==void 0),[a,i]=x.useState(t),o=s?e:a,l=x.useCallback(c=>{s||i(c)},[]);return[o,l]}const BG=()=>{},On=typeof document<"u"?x.useLayoutEffect:BG,HG={...O2};let o2=0;function qG(e,t="mui"){const[n,r]=x.useState(e),s=e||n;return x.useEffect(()=>{n==null&&(o2+=1,r(`${t}-${o2}`))},[n,t]),s}const l2=HG.useId;function UG(e,t){if(l2!==void 0){const n=l2();return`${t}-${n}`}return qG(e,t)}function PG(e){return UG(e,"base-ui")}const FG="none",GG="trigger-press";function LE(e,t,n,r){let s=!1,a=!1;const i=$a;return{reason:e,event:t??new Event("base-ui"),cancel(){s=!0},allowPropagation(){a=!0},get isCanceled(){return s},get isPropagationAllowed(){return a},trigger:n,...i}}const VG=[];function BE(e){x.useEffect(e,VG)}const Wu=null;class XG{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 s;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let a=0;a<n.length;a+=1)(s=n[a])==null||s.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 Ku=new XG;class lt{constructor(){ee(this,"currentId",Wu);ee(this,"cancel",()=>{this.currentId!==Wu&&(Ku.cancel(this.currentId),this.currentId=Wu)});ee(this,"disposeEffect",()=>this.cancel)}static create(){return new lt}static request(t){return Ku.request(t)}static cancel(t){return Ku.cancel(t)}request(t){this.cancel(),this.currentId=Ku.request(()=>{this.currentId=Wu,t()})}}function HE(){const e=ru(lt.create).current;return BE(e.disposeEffect),e}function ZG(e){return e==null?e:"current"in e?e.current:e}function qE(e,t=!1,n=!0){const r=HE();return li((s,a=null)=>{r.cancel();const i=ZG(e);i!=null&&(typeof i.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED?s():r.request(()=>{function o(){i&&Promise.all(i.getAnimations().map(l=>l.finished)).then(()=>{a!=null&&a.aborted||rc.flushSync(s)}).catch(()=>{if(n){if(a!=null&&a.aborted)return;rc.flushSync(s)}else i.getAnimations().length>0&&i.getAnimations().some(l=>l.pending||l.playState!=="finished")&&o()})}t?r.request(o):o()}))})}function WG(e,t=!1,n=!1){const[r,s]=x.useState(e&&t?"idle":void 0),[a,i]=x.useState(e);return e&&!a&&(i(!0),s("starting")),!e&&a&&r!=="ending"&&!n&&s("ending"),!e&&!a&&r==="ending"&&s(void 0),On(()=>{if(!e&&a&&r!=="ending"&&n){const o=lt.request(()=>{s("ending")});return()=>{lt.cancel(o)}}},[e,a,r,n]),On(()=>{if(!e||t)return;const o=lt.request(()=>{rc.flushSync(()=>{s(void 0)})});return()=>{lt.cancel(o)}},[t,e]),On(()=>{if(!e||!t)return;e&&a&&r!=="idle"&&s("starting");const o=lt.request(()=>{s("idle")});return()=>{lt.cancel(o)}},[t,e,a,s,r]),x.useMemo(()=>({mounted:a,setMounted:i,transitionStatus:r}),[a,r])}function KG(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:s}=e,a=t!==void 0,[i,o]=LG({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:l,setMounted:c,transitionStatus:d}=WG(i,!0,!0),[f,h]=x.useState(i),[{height:p,width:m},k]=x.useState({height:void 0,width:void 0}),b=PG(),[g,y]=x.useState(),v=g??b,[w,S]=x.useState(!1),[j,C]=x.useState(!1),$=x.useRef(null),A=x.useRef(null),E=x.useRef(null),z=x.useRef(null),N=qE(z,!1),T=li(R=>{const _=!i,M=LE(GG,R.nativeEvent);if(r(_,M),M.isCanceled)return;const D=z.current;A.current==="css-animation"&&D!=null&&D.style.removeProperty("animation-name"),!w&&!j&&(A.current!=null&&A.current!=="css-animation"&&!l&&_&&c(!0),A.current==="css-animation"&&(!f&&_&&h(!0),!l&&_&&c(!0))),o(_),A.current==="none"&&l&&!_&&c(!1)});return On(()=>{a&&A.current==="none"&&!j&&!i&&c(!1)},[a,j,i,t,c]),x.useMemo(()=>({abortControllerRef:$,animationTypeRef:A,disabled:s,handleTrigger:T,height:p,mounted:l,open:i,panelId:v,panelRef:z,runOnceAnimationsFinish:N,setDimensions:k,setHiddenUntilFound:S,setKeepMounted:C,setMounted:c,setOpen:o,setPanelIdState:y,setVisible:h,transitionDimensionRef:E,transitionStatus:d,visible:f,width:m}),[$,A,s,T,p,l,i,v,z,N,k,S,C,c,o,h,E,d,f,m])}const UE=x.createContext(void 0);function PE(){const e=x.useContext(UE);if(e===void 0)throw new Error(F0(15));return e}let Af=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({});const YG={[Af.startingStyle]:""},QG={[Af.endingStyle]:""},FE={transitionStatus(e){return e==="starting"?YG:e==="ending"?QG:null}};let Yl=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Af.startingStyle]="startingStyle",e[e.endingStyle=Af.endingStyle]="endingStyle",e}({}),JG=function(e){return e.panelOpen="data-panel-open",e}({});const eV={[Yl.open]:""},tV={[Yl.closed]:""},nV={open(e){return e?{[JG.panelOpen]:""}:null}},rV={open(e){return e?eV:tV}},GE={...rV,...FE},V0=x.forwardRef(function(t,n){const{render:r,className:s,defaultOpen:a=!1,disabled:i=!1,onOpenChange:o,open:l,...c}=t,d=li(o),f=KG({open:l,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=G0("div",t,{state:h,ref:n,props:c,stateAttributesMapping:GE});return u.jsx(UE.Provider,{value:p,children:m})});function sV(){return typeof window<"u"}function aV(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function iV(e){return sV()?e instanceof HTMLElement||e instanceof aV(e).HTMLElement:!1}const oV=x.createContext(void 0);function lV(e=!1){const t=x.useContext(oV);if(t===void 0&&!e)throw new Error(F0(16));return t}function cV(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:s=0,isNativeButton:a}=e,i=r&&t!==!1,o=r&&t===!1;return{props:x.useMemo(()=>{const c={onKeyDown(d){n&&t&&d.key!=="Tab"&&d.preventDefault()}};return r||(c.tabIndex=s,!a&&n&&(c.tabIndex=t?s:-1)),(a&&(t||i)||!a&&n)&&(c["aria-disabled"]=n),a&&(!t||o)&&(c.disabled=n),c},[r,n,t,i,o,a,s])}}function uV(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:s=!0}=e,a=x.useRef(null),i=lV(!0)!==void 0,o=li(()=>{const h=a.current;return!!((h==null?void 0:h.tagName)==="A"&&(h!=null&&h.href))}),{props:l}=cV({focusableWhenDisabled:n,disabled:t,composite:i,tabIndex:r,isNativeButton:s}),c=x.useCallback(()=>{const h=a.current;dV(h)&&i&&t&&l.disabled===void 0&&h.disabled&&(h.disabled=!1)},[t,l.disabled,i]);On(c,[c]);const d=x.useCallback((h={})=>{const{onClick:p,onMouseDown:m,onKeyUp:k,onKeyDown:b,onPointerDown:g,...y}=h;return OE({type:s?"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||(wg(w),b==null||b(w)),w.baseUIHandlerPrevented)return;const S=w.target===w.currentTarget&&!s&&!o()&&!t,j=w.key==="Enter",C=w.key===" ";S&&((C||j)&&w.preventDefault(),j&&(p==null||p(w)))},onKeyUp(w){t||(wg(w),k==null||k(w)),!w.baseUIHandlerPrevented&&w.target===w.currentTarget&&!s&&!t&&w.key===" "&&(p==null||p(w))},onPointerDown(w){if(t){w.preventDefault();return}g==null||g(w)}},s?void 0:{role:"button"},l,y)},[t,l,s,o]),f=li(h=>{a.current=h,c()});return{getButtonProps:d,buttonRef:f}}function dV(e){return iV(e)&&e.tagName==="BUTTON"}const fV={...nV,...FE},X0=x.forwardRef(function(t,n){const{panelId:r,open:s,handleTrigger:a,state:i,disabled:o}=PE(),{className:l,disabled:c=o,id:d,render:f,nativeButton:h=!0,...p}=t,{getButtonProps:m,buttonRef:k}=uV({disabled:c,focusableWhenDisabled:!0,native:h}),b=x.useMemo(()=>({"aria-controls":s?r:void 0,"aria-expanded":s,disabled:c,onClick:a}),[r,c,s,a]);return G0("button",t,{state:i,ref:[n,k],props:[b,p,m],stateAttributesMapping:fV})});let hV=function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e}({});function xV(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:s,hiddenUntilFound:a,keepMounted:i,id:o,mounted:l,onOpenChange:c,open:d,panelRef:f,runOnceAnimationsFinish:h,setDimensions:p,setMounted:m,setOpen:k,setVisible:b,transitionDimensionRef:g,visible:y,width:v}=e,w=x.useRef(!1),S=x.useRef(null),j=x.useRef(d),C=x.useRef(d),$=HE(),A=x.useMemo(()=>n.current==="css-animation"?!y:!d&&!l,[d,l,y,n]),E=li(N=>{if(!N)return;if(n.current==null||g.current==null){const _=getComputedStyle(N),M=_.animationName!=="none"&&_.animationName!=="",D=_.transitionDuration!=="0s"&&_.transitionDuration!=="";M&&D||(_.animationName==="none"&&_.transitionDuration!=="0s"?n.current="css-transition":_.animationName!=="none"&&_.transitionDuration==="0s"?n.current="css-animation":n.current="none"),N.getAttribute(hV.orientation)==="horizontal"||_.transitionProperty.indexOf("width")>-1?g.current="width":g.current="height"}if(n.current!=="css-transition")return;(s===void 0||v===void 0)&&(p({height:N.scrollHeight,width:N.scrollWidth}),C.current&&N.style.setProperty("transition-duration","0s"));let T=-1,R=-1;return T=lt.request(()=>{C.current=!1,R=lt.request(()=>{setTimeout(()=>{N.style.removeProperty("transition-duration")})})}),()=>{lt.cancel(T),lt.cancel(R)}}),z=bg(r,f,E);return On(()=>{if(n.current!=="css-transition")return;const N=f.current;if(!N)return;let T=-1;if(t.current!=null&&(t.current.abort(),t.current=null),d){const R={"justify-content":N.style.justifyContent,"align-items":N.style.alignItems,"align-content":N.style.alignContent,"justify-items":N.style.justifyItems};Object.keys(R).forEach(_=>{N.style.setProperty(_,"initial","important")}),!C.current&&!i&&N.setAttribute(Yl.startingStyle,""),p({height:N.scrollHeight,width:N.scrollWidth}),T=lt.request(()=>{Object.entries(R).forEach(([_,M])=>{M===""?N.style.removeProperty(_):N.style.setProperty(_,M)})})}else{if(N.scrollHeight===0&&N.scrollWidth===0)return;p({height:N.scrollHeight,width:N.scrollWidth});const R=new AbortController;t.current=R;const _=R.signal;let M=null;const D=Yl.endingStyle;return M=new MutationObserver(I=>{I.some(L=>L.type==="attributes"&&L.attributeName===D)&&(M==null||M.disconnect(),M=null,h(()=>{p({height:0,width:0}),N.style.removeProperty("content-visibility"),m(!1),t.current===R&&(t.current=null)},_))}),M.observe(N,{attributes:!0,attributeFilter:[D]}),()=>{M==null||M.disconnect(),$.cancel(),t.current===R&&(R.abort(),t.current=null)}}return()=>{lt.cancel(T)}},[t,n,$,a,i,l,d,f,h,p,m]),On(()=>{if(n.current!=="css-animation")return;const N=f.current;N&&(S.current=N.style.animationName||S.current,N.style.setProperty("animation-name","none"),p({height:N.scrollHeight,width:N.scrollWidth}),!j.current&&!w.current&&N.style.removeProperty("animation-name"),d?(t.current!=null&&(t.current.abort(),t.current=null),m(!0),b(!0)):(t.current=new AbortController,h(()=>{m(!1),b(!1),t.current=null},t.current.signal)))},[t,n,d,f,h,p,m,b,y]),BE(()=>{const N=lt.request(()=>{j.current=!1});return()=>lt.cancel(N)}),On(()=>{if(!a)return;const N=f.current;if(!N)return;let T=-1,R=-1;return d&&w.current&&(N.style.transitionDuration="0s",p({height:N.scrollHeight,width:N.scrollWidth}),T=lt.request(()=>{w.current=!1,R=lt.request(()=>{setTimeout(()=>{N.style.removeProperty("transition-duration")})})})),()=>{lt.cancel(T),lt.cancel(R)}},[a,d,f,p]),On(()=>{const N=f.current;N&&a&&A&&(N.setAttribute("hidden","until-found"),n.current==="css-transition"&&N.setAttribute(Yl.startingStyle,""))},[a,A,n,f]),x.useEffect(function(){const T=f.current;if(!T)return;function R(_){w.current=!0,k(!0),c(!0,LE(FG,_))}return T.addEventListener("beforematch",R),()=>{T.removeEventListener("beforematch",R)}},[c,f,k]),x.useMemo(()=>({props:{hidden:A,id:o,ref:z}}),[A,o,z])}let c2=function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e}({});function pV(e){const t=ru(gV,e).current;return t.next=e,On(t.effect),t}function gV(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function mV(e){const{enabled:t=!0,open:n,ref:r,onComplete:s}=e,a=pV(n),i=li(s),o=qE(r,n);x.useEffect(()=>{t&&o(()=>{n===a.current&&i()})},[t,n,i,o,a])}const Z0=x.forwardRef(function(t,n){const{className:r,hiddenUntilFound:s,keepMounted:a,render:i,id:o,...l}=t,{abortControllerRef:c,animationTypeRef:d,height:f,mounted:h,onOpenChange:p,open:m,panelId:k,panelRef:b,runOnceAnimationsFinish:g,setDimensions:y,setHiddenUntilFound:v,setKeepMounted:w,setMounted:S,setPanelIdState:j,setOpen:C,setVisible:$,state:A,transitionDimensionRef:E,visible:z,width:N,transitionStatus:T}=PE(),R=s??!1,_=a??!1;On(()=>{if(o)return j(o),()=>{j(void 0)}},[o,j]),On(()=>{v(R)},[v,R]),On(()=>{w(_)},[w,_]);const{props:M}=xV({abortControllerRef:c,animationTypeRef:d,externalRef:n,height:f,hiddenUntilFound:R,id:k,keepMounted:_,mounted:h,onOpenChange:p,open:m,panelRef:b,runOnceAnimationsFinish:g,setDimensions:y,setMounted:S,setOpen:C,setVisible:$,transitionDimensionRef:E,visible:z,width:N});mV({open:m&&T==="idle",ref:b,onComplete(){m&&y({height:void 0,width:void 0})}});const D=x.useMemo(()=>({...A,transitionStatus:T}),[A,T]),I=G0("div",t,{state:D,ref:[n,b],props:[M,{style:{[c2.collapsiblePanelHeight]:f===void 0?"auto":`${f}px`,[c2.collapsiblePanelWidth]:N===void 0?"auto":`${N}px`}},l],stateAttributesMapping:GE});return _||R||!_&&h?I:null}),yV=860,bV=Array.from({length:9},(e,t)=>{const n=Math.floor(t/3);return(t%3+Math.abs(n-1))*90});function kV({className:e="",periodMs:t=yV,style:n,...r}){return u.jsx("span",{"aria-hidden":"true",className:`chat-pixel-loader ${e}`.trim(),"data-slot":"chat-pixel-loader",style:{"--chat-pixel-period":`${t}ms`,...n},...r,children:bV.map((s,a)=>u.jsx("span",{className:"chat-pixel-loader__cell",style:{animationDelay:`${s}ms`}},a))})}function vV(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 wV=["Thinking","Pondering","Mulling","Reasoning","Exploring","Connecting dots","Weighing options","Sketching a plan"],SV=["Working","Digging in","Checking","Poking around","Running things","Reading the room","Following the trail"],jV=4e3;function EV(e,t){const n=e==="thinking"?wV:SV,s=Math.floor(Math.max(0,t)/jV)*1103515245+12345>>>0;return n[s%n.length]}function $V({className:e="",elapsedMs:t,phase:n,...r}){return u.jsxs("p",{className:`chat-status-line ${e}`.trim(),"data-slot":"chat-status-line",role:"status",...r,children:[u.jsx(kV,{}),u.jsxs(_h,{className:"chat-status-line__word",children:[EV(n,t??0),"…"]}),t===void 0?null:u.jsx("span",{className:"chat-status-line__clock",children:vV(t)})]})}function CV(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),r=Math.floor(t%3600/60),s=t%60;return`Worked for ${n}h ${r}m ${s}s`}function TV(e,t){const[n,r]=x.useState(()=>Date.now());if(x.useEffect(()=>{if(!t)return;const s=window.setInterval(()=>r(Date.now()),100);return()=>window.clearInterval(s)},[t]),e!==void 0)return Math.max(0,n-e)}function Ql({children:e,className:t="",defaultOpen:n=!1,elapsedMs:r,hasSteps:s=!0,phase:a,outcome:i,startedAtMs:o,...l}){const[c,d]=x.useState(n),f=a==="thinking"||a==="acting",h=TV(o,f&&r===void 0);if(a==="hidden")return null;const p=a==="settled",m=CV(r),k=i==="failed"?m.replace("Worked for","Failed after").replace("Worked","Failed"):m;return u.jsxs("div",{className:`chain-of-thought ${t}`.trim(),"data-phase":a,"data-slot":"chain-of-thought",...l,children:[u.jsxs(V0,{open:p?c:!0,onOpenChange:d,children:[p?s?u.jsxs(X0,{className:"chain-of-thought__trigger","data-slot":"chain-of-thought-trigger",children:[k,u.jsx(nu,{"aria-hidden":"true",className:"chat-step__chevron"})]}):u.jsx("p",{className:"chain-of-thought__label","data-slot":"chain-of-thought-label",children:k}):null,u.jsx(Z0,{keepMounted:!0,className:"chain-of-thought__content","data-slot":"chain-of-thought-content",children:e})]}),f?u.jsx($V,{elapsedMs:r??h,phase:a}):null]})}function MV({children:e,className:t="",...n}){return u.jsx("ol",{className:`chain-of-thought__steps ${t}`.trim(),"data-slot":"chain-of-thought-steps",...n,children:e})}function NV({children:e,className:t="",...n}){return u.jsx("li",{className:`chain-of-thought__step ${t}`.trim(),"data-slot":"chain-of-thought-step",...n,children:e})}Ql.Steps=MV;Ql.Step=NV;const Sg=x.createContext(!1);function AV(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),r=/:(\d+)(?::\d+)?$/.exec(t??""),s=r?t.slice(0,r.index):t??"";if(!s||s.endsWith("/"))return null;const a=Number(((o=/^L(\d+)(?:-L?\d+)?$/.exec(n))==null?void 0:o[1])??(r==null?void 0:r[1])),i=s.slice(s.lastIndexOf("/")+1);return{path:s,name:i,...Number.isSafeInteger(a)&&a>0?{line:a}:{}}}function zV(e){return typeof e=="string"?e:Array.isArray(e)&&e.every(t=>typeof t=="string")?e.join(""):null}function RV({href:e,children:t}){const n=AV(e);if(!n){const a=/^https?:\/\//.test(e);return u.jsx(Q3,{color:"accent",hasUnderline:!0,href:e,type:"inherit",...a?{target:"_blank",rel:"noopener noreferrer"}:{},children:u.jsx(Sg.Provider,{value:!0,children:t})})}const r=zV(t),s=r!==null&&(r===e||r===n.path||n.line!==void 0&&r===`${n.path}:${n.line}`);return u.jsxs("a",{className:"chat-file-link","data-slot":"chat-file-link",href:e,title:n.line?`${n.path}:${n.line}`:n.path,children:[u.jsx(Aj,{"aria-hidden":!0,className:"chat-file-link__icon"}),u.jsx(Sg.Provider,{value:!0,children:s?n.line?`${n.name}:${n.line}`:n.name:t})]})}const VE=3,XE=x.createContext(void 0);function ZE({children:e}){const t=x.useContext(XE),n=x.useContext(Sg),r=u.jsx(nm,{className:"chat-inline-code","data-slot":"chat-inline-code",children:e}),s=typeof e=="string"?e.trim():e;return!n&&typeof s=="string"&&(t!=null&&t.has(s))?u.jsx("a",{href:s,className:"chat-inline-code-link","data-slot":"chat-inline-code-link",title:s,children:r}):r}const WE={inlineCode:ZE},KE={inlineCode:ZE,link:RV};function YE({children:e,fileLinks:t=!1,linkedInlineCode:n,className:r="",...s}){return u.jsx("div",{className:`chat-markdown ${r}`.trim(),"data-slot":"chat-markdown","data-testid":"markdown-renderer",...s,children:u.jsx(XE.Provider,{value:t?n:void 0,children:u.jsx(Sm,{components:t?KE:WE,density:"compact",headingLevelStart:VE,children:e})})})}function _V({children:e,isStreaming:t=!1,fileLinks:n=!1,className:r="",...s}){return u.jsx("div",{className:`chat-markdown chat-markdown--stream ${r}`.trim(),"data-is-streaming":String(!!t),"data-slot":"chat-stream-markdown","data-testid":"stream-markdown-renderer",...s,children:u.jsx(Sm,{components:n?KE:WE,density:"compact",headingLevelStart:VE,isStreaming:t,children:e})})}function OV({children:e,className:t="",...n}){return u.jsx(hm,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-user",sender:"user",...n,children:e})}function DV({children:e,className:t="",...n}){return u.jsx(hm,{className:`chat-message ${t}`.trim(),"data-slot":"chat-message-assistant",sender:"assistant",...n,children:e})}function IV({children:e,className:t="",...n}){return u.jsx(j3,{className:t||void 0,"data-slot":"chat-message-bubble",...n,children:e})}function LV({children:e,className:t="",...n}){return u.jsx("div",{className:`chat-message__body ${t}`.trim(),"data-slot":"chat-message-body",...n,children:e})}function BV({children:e,className:t="",...n}){return u.jsx("div",{className:`chat-message__content ${t}`.trim(),"data-slot":"chat-message-content",...n,children:e})}function Oh({"aria-label":e,tooltip:t,onPress:n,children:r,className:s="",...a}){return u.jsx("button",{"aria-label":e,className:`chat-message__action ${s}`.trim(),"data-slot":"chat-message-action",title:t,type:"button",onClick:n,...a,children:r})}function ci({children:e,className:t="",...n}){return u.jsx("div",{className:`chat-message__actions ${t}`.trim(),"data-slot":"chat-message-actions",...n,children:e})}function HV(e){return u.jsx(Oh,{...e,children:u.jsx(mU,{"aria-hidden":"true",size:16})})}function qV(e){return u.jsx(Oh,{...e,children:u.jsx(jU,{"aria-hidden":"true",size:16})})}function UV(e){return u.jsx(Oh,{...e,children:u.jsx(SU,{"aria-hidden":"true",size:16})})}ci.Copy=HV;ci.ThumbsUp=qV;ci.ThumbsDown=UV;const Oa={User:OV,Assistant:DV,Bubble:IV,Body:LV,Content:BV,Action:Oh},PV=new Set(["ECONNREFUSED","ETIMEDOUT","ENOTFOUND","EAI_AGAIN","ECONNRESET","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_SOCKET"]);function FV(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 QE(e,t=0){if(t>4)return{message:""};const n=FV(e);if(!e||typeof e!="object")return{message:n};const r=e,s=GV(r),a=typeof r.code=="string"&&PV.has(r.code)?r.code:void 0,i=QE(r.cause,t+1),o=i.message&&!n.includes(i.message)?i.message:"";return{status:s??i.status,networkCode:a??i.networkCode,message:[n,o].filter(Boolean).join(" ")}}function GV(e){if(typeof e.statusCode=="number")return e.statusCode;if(typeof e.status=="number")return e.status;const t=e.$metadata;if(u2(t)&&typeof t.httpStatusCode=="number")return t.httpStatusCode;const n=e.$response;if(u2(n)&&typeof n.statusCode=="number")return n.statusCode}function u2(e){return typeof e=="object"&&e!==null}const VV=/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,XV=/invalid_grant|oauth refresh failed|refresh.?token/i;function ZV(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||VV.test(e.message)?"network":/invalid.?api.?key|authentication_error|unauthorized/i.test(e.message)||XV.test(e.message)?"auth":"unknown"}function WV(e){return ZV(QE(e))}function KV(e){const t=WV(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 YV({error:e,onRetry:t,onOpenProviderSettings:n,modelControl:r,className:s,...a}){const[i,o]=x.useState(!1),[l,c]=x.useState(!1),d=x.useRef(!1),[f,h]=x.useState(null),p=KV(e),m=async()=>{if(!(!t||d.current)){d.current=!0,o(!0),h(null);try{await t()}catch(k){h(k instanceof Error?k.message:"Retry could not start.")}finally{d.current=!1,o(!1)}}};return u.jsxs(pt,{className:s,gap:2,...a,children:[u.jsx(Wa,{status:"error",title:p.title,description:p.description}),u.jsxs(Kt,{gap:2,wrap:"wrap",children:[n?u.jsx($e,{label:"Provider settings",size:"sm",variant:"secondary",onClick:n}):null,r,t?u.jsx($e,{label:"Retry request",size:"sm",variant:"secondary",isDisabled:i,onClick:()=>void m()}):null]}),f?u.jsx(Re,{role:"alert",style:{color:"var(--danger)"},children:f}):null,u.jsx(V3,{trigger:u.jsx(Re,{type:"body",size:"sm",color:"secondary",children:"Error details"}),isOpen:l,onOpenChange:c,children:l?u.jsx(Re,{as:"div",type:"body",size:"sm",style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:e}):null})]})}const QV=/(\*\*[^*]+\*\*|\*[^*]+\*|`[^`]+`)/g;function JV(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 eX(e){return e.replace(/(^|\n)\*\*([^*\n]+)\*\*(?=\n|$)/g,"$1$2")}function tX(e){return e.split(QV).map((t,n)=>t.startsWith("**")&&t.endsWith("**")&&t.length>4?u.jsx("strong",{children:t.slice(2,-2)},n):t.startsWith("*")&&t.endsWith("*")&&t.length>2&&!t.startsWith("**")?u.jsx("em",{children:t.slice(1,-1)},n):t.startsWith("`")&&t.endsWith("`")&&t.length>2?u.jsx("code",{children:t.slice(1,-1)},n):t)}function JE({text:e,unwrapLines:t=!1,className:n,...r}){let s=JV(e);return t&&(s=eX(s)),u.jsx("span",{className:`chat-thought-md ${n??""}`.trim(),...r,children:tX(s)})}const nX=300,rX=700;function sX(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function e8({children:e,className:t="",dwellMs:n=rX,pageKey:r="",...s}){const a=Math.max(n,nX),[i,o]=x.useState({key:r,node:e}),[l,c]=x.useState(null),d=x.useRef({key:r,node:e}),f=x.useRef({key:r,node:e}),h=x.useRef(Date.now()),p=x.useRef(null);return x.useEffect(()=>{if(f.current={key:r,node:e},r===d.current.key){d.current=f.current;return}const m=()=>{const b=d.current;d.current=f.current,h.current=Date.now(),o(f.current),c(sX()?null:b.node)};if(p.current!==null)return;const k=a-(Date.now()-h.current);if(k<=0){m();return}p.current=window.setTimeout(()=>{p.current=null,f.current.key!==d.current.key&&m()},k)},[e,a,r]),x.useEffect(()=>()=>{p.current!==null&&window.clearTimeout(p.current)},[]),u.jsx("span",{className:`chat-inline-pager ${t}`.trim(),"data-slot":"chat-inline-pager",...s,children:u.jsxs("span",{className:"chat-inline-pager__flip",children:[l?u.jsx("span",{className:"chat-inline-pager__page","data-motion":"out",children:l}):null,u.jsx("span",{className:"chat-inline-pager__page","data-motion":l?"in":void 0,onAnimationEnd:m=>{m.target===m.currentTarget&&c(null)},children:r===i.key?e:i.node})]})})}function aX(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?"briefly":`${Math.round(e/1e3)}s`}function iX({className:e="",dwellMs:t,step:n,...r}){const s=n.text.trim(),a=aX(n.durationMs),i=u.jsx(e8,{dwellMs:t,pageKey:n.live?"live":"settled",children:n.live?u.jsx(_h,{className:"chat-step__label",children:"Thinking…"}):u.jsx("span",{className:"chat-step__label",children:a?u.jsxs(u.Fragment,{children:["Thought ",u.jsx("span",{className:"chat-step__meta",children:a})]}):"Thought"})});return s?u.jsxs(V0,{className:`chat-step ${e}`.trim(),"data-slot":"chat-thought-step",...r,children:[u.jsxs(X0,{className:"chat-step__trigger",children:[i,u.jsx(nu,{"aria-hidden":"true",className:"chat-step__chevron"})]}),u.jsx(Z0,{keepMounted:!0,className:"chat-step__panel",children:u.jsx("div",{className:"chat-step__body",children:u.jsx(JE,{text:n.text})})})]}):u.jsx("p",{className:`chat-step chat-step--plain ${e}`.trim(),"data-slot":"chat-thought-step",...r,children:i})}const oX={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 t8(e){return(e??"").trim().toLowerCase().replace(/-/g,"_")}function zf(e){return oX[t8(e)]??"tool"}function lX(e){const t=new Set(e.map(n=>zf(n.toolName)));return t.size===1?[...t][0]:"tool"}const cX={shell:Oj,search:wU,web:bU,file:Aj,edit:vU,tool:Dj};function Cd({className:e="",kind:t,...n}){const r=cX[t];return u.jsx("span",{"aria-hidden":"true",className:`chat-tool-kind ${e}`.trim(),"data-kind":t,"data-slot":"chat-tool-kind",...n,children:u.jsx(r,{})})}function Jl(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)}`}const uX={"input-streaming":"running","input-available":"running","output-available":"complete","output-error":"error"},dX=["path","file_path","filePath","command","cmd","query","pattern","url","name","description","task"],d2=120;function n8(e){if(!e)return;let t;try{t=JSON.parse(e)}catch{return}if(!(typeof t!="object"||t===null))for(const n of dX){const r=t[n];if(typeof r=="string"&&r.length>0)return r.length>d2?`${r.slice(0,d2)}…`:r}}function r8(e){if(!(e===void 0||!Number.isFinite(e)||e<0))return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(1)}s`}function s8(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 a8({tool:e,className:t,...n}){var r,s;return u.jsxs("div",{className:t,...n,children:[e.detail!==void 0&&e.detail!==null?e.detail:u.jsxs(u.Fragment,{children:[e.argsText!=null?u.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-args",children:e.argsText}):null,e.output!==void 0?u.jsx("pre",{className:"chat-tool__section","data-slot":"chat-tool-result",children:e.output}):null]}),(r=e.children)!=null&&r.length?u.jsx("ol",{className:"chat-tool-step__list","data-slot":"chat-tool-children",children:e.children.map((a,i)=>u.jsxs("li",{className:"chat-tool-step__item",children:[u.jsx(Cd,{kind:zf(a.toolName)}),u.jsx(i8,{tools:[a]})]},a.toolCallId??i))}):null,(s=e.images)==null?void 0:s.map((a,i)=>u.jsx("img",{src:`data:${a.mimeType};base64,${a.data}`,alt:"",style:{maxWidth:"100%"}},i))]})}function fX(e,t){const n=s8(e)?u.jsx(a8,{tool:e}):void 0;return{name:Jl(e.toolName)??"tool",status:uX[e.state],target:n8(e.argsText),...e.diffStat?{additions:e.diffStat.additions,deletions:e.diffStat.deletions}:{},duration:r8(e.durationMs),errorMessage:e.state==="output-error"?e.output:void 0,key:e.toolCallId??`tool-${t}`,resultDetail:n}}function i8({tools:e,className:t="",...n}){return e.length?u.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:u.jsx(C3,{calls:e.map(fX)})}):null}const yl={past:"Ran",noun:["command","commands"]},hp={past:"Read",noun:["file","files"]},f2={past:"Edited",noun:["file","files"]},h2={past:"Wrote",noun:["file","files"]},x2={past:"Searched",noun:["pattern","patterns"]},p2={past:"Searched",noun:["path","paths"]},hX={past:"Listed",noun:["directory","directories"]},g2={past:"Searched",noun:["web page","web pages"]},Yu={past:"Fetched",noun:["page","pages"]},xX={bash:yl,shell:yl,sh:yl,terminal:yl,cmd:yl,read:hp,read_file:hp,cat:hp,edit:f2,str_replace:f2,write:h2,write_file:h2,grep:x2,find:p2,glob:p2,ls:hX,search:x2,web_search:g2,websearch:g2,webfetch:Yu,web_fetch:Yu,web:Yu,browser:Yu},o8={past:"Used",noun:["tool","tools"]};function m2(e){return xX[t8(e)]??o8}const y2=72;function pX(e){return e.length<=y2?e:e.includes("/")&&!e.includes(" ")?`…${e.slice(-71)}`:`${e.slice(0,y2-1)}…`}function b2(e,[t,n]){return e!==1?`${e} ${n}`:`${t==="tool"?"a":"1"} ${t}`}function gX(e){if(e.length===1){const[n]=e,r=m2(n.toolName),s=n8(n.argsText);return s?`${r.past} ${pX(s)}`:r===o8?`Used ${Jl(n.toolName)??"a tool"}`:`${r.past} ${b2(1,r.noun)}`}const t=new Map;for(const n of e){const r=m2(n.toolName),s=`${r.past}:${r.noun[1]}`,a=t.get(s)??{verb:r,count:0};a.count+=1,t.set(s,a)}return[...t.values()].map(({verb:n,count:r},s)=>{const a=`${n.past} ${b2(r,n.noun)}`;return s===0?a:a.charAt(0).toLowerCase()+a.slice(1)}).join(", ")}function l8(e){const t=[];for(const n of e.children??[])t.push(n,...l8(n));return t}function mX({className:e="",dwellMs:t,step:n,...r}){const{tools:s}=n,a=s.filter(b=>b.state==="output-error").length,i=s.flatMap(l8),o=i.length,l=i.filter(b=>b.state==="output-error").length,c=s.reduce((b,g)=>b+(g.durationMs??0),0),d=s.reduce((b,g)=>g.diffStat?{additions:((b==null?void 0:b.additions)??0)+g.diffStat.additions,deletions:((b==null?void 0:b.deletions)??0)+g.diffStat.deletions}:b,void 0),f=s.find(b=>b.toolCallId===n.activeToolCallId)??s[s.length-1];let h,p=f;for(;p;){const b=(p.children??[]).filter(y=>y.state==="input-available"),g=b[b.length-1];if(!g)break;h=g,p=g}const m=n.live?zf(f==null?void 0:f.toolName):lX(s),k=n.live?`running:${(f==null?void 0:f.toolCallId)??"none"}`:"settled";return u.jsxs(V0,{className:`chat-step chat-tool-step ${e}`.trim(),"data-slot":"chat-tool-step",...r,children:[u.jsxs(X0,{className:"chat-step__trigger",children:[u.jsx(e8,{dwellMs:t,pageKey:k,children:n.live?u.jsxs("span",{className:"chat-tool-step__page",children:[u.jsx(Cd,{kind:m}),u.jsx(_h,{className:"chat-step__label",children:f!=null&&f.toolName?h!=null&&h.toolName?`Running ${Jl(f.toolName)} › ${Jl(h.toolName)}…`:`Running ${Jl(f.toolName)}…`:"Running…"})]}):u.jsxs("span",{className:"chat-tool-step__page",children:[u.jsx(Cd,{kind:m}),u.jsx("span",{className:"chat-step__label",children:gX(s)}),o>0?u.jsx("span",{className:"chat-step__meta","data-slot":"chat-tool-nested-count",children:o===1?"1 nested call":`${o} nested calls`}):null,l>0?u.jsx("span",{className:"chat-step__meta chat-step__meta--error","data-slot":"chat-tool-nested-failed",children:l===1?"1 nested failed":`${l} nested failed`}):null,d?u.jsxs("span",{className:"chat-step__meta","data-slot":"chat-tool-diff-stat",children:[u.jsxs("span",{className:"text-success",children:["+",d.additions]})," ",u.jsxs("span",{className:"text-danger",children:["-",d.deletions]})]}):null,a>0?u.jsx("span",{className:"chat-step__meta chat-step__meta--error",children:a===1?"1 failed":`${a} failed`}):null,c>0?u.jsx("span",{className:"chat-step__meta",children:r8(c)}):null]})}),u.jsx(nu,{"aria-hidden":"true",className:"chat-step__chevron"})]}),u.jsx(Z0,{keepMounted:!0,className:"chat-step__panel",children:s.length===1?s8(s[0])?u.jsx("div",{className:"chat-tool-step__detail","data-slot":"chat-tool-step-detail",children:u.jsx(a8,{tool:s[0]})}):null:u.jsx("ol",{className:"chat-tool-step__list",children:s.map((b,g)=>u.jsxs("li",{className:"chat-tool-step__item",children:[u.jsx(Cd,{kind:zf(b.toolName)}),u.jsx(i8,{tools:[b]})]},b.toolCallId??g))})})]})}const xp=(e,t,n)=>e.startsWith(`${t} ${n}`)?e.slice(t.length+1+n.length):e.slice(t.length+1);function yX(e){const t=[];let n,r=0,s=0,a=!1;const i=l=>({path:l,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 l of e.split(`
|
|
383
|
-
`)){if((r>0||s>0)&&n!==void 0){l.startsWith("\\")?n.lines.push({kind:"ctx",text:l}):l.startsWith("+")?(n.additions+=1,n.lines.push({kind:"add",text:l}),s-=1):l.startsWith("-")?(n.deletions+=1,n.lines.push({kind:"del",text:l}),r-=1):(n.lines.push({kind:"ctx",text:l}),r-=1,s-=1);continue}if(l.startsWith("@@")){const c=/^@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/.exec(l);n!==void 0&&c!==null&&(r=c[2]===void 0?1:Number(c[2]),s=c[4]===void 0?1:Number(c[4]),n.lines.push({kind:"meta",text:l}));continue}if(l.startsWith("diff --git ")){o();const c=/^diff --git a\/(\S+) b\/(\S+)$/.exec(l);n=i((c==null?void 0:c[2])??l.slice(11)),a=!0;continue}if(l.startsWith("--- ")){n!==void 0&&a?(a=!1,l==="--- /dev/null"?n.isNew=!0:n.oldPath=xp(l,"---","a/")):(o(),n=i(""),l==="--- /dev/null"?n.isNew=!0:n.oldPath=xp(l,"---","a/"));continue}n!==void 0&&(l.startsWith("+++ ")?l==="+++ /dev/null"?n.isDeleted=!0:n.path=xp(l,"+++","b/"):l.startsWith("new file mode")?n.isNew=!0:l.startsWith("deleted file mode")?n.isDeleted=!0:l.startsWith("rename from ")?n.oldPath=l.slice(12):l.startsWith("rename to ")?n.path=l.slice(10):l.startsWith("copy from ")?n.oldPath=l.slice(10):l.startsWith("copy to ")?n.path=l.slice(8):(l.startsWith("Binary files")||l.startsWith("GIT binary patch"))&&(n.binary=!0))}return o(),t}const bX={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)"},kX={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 c8({patch:e}){const t=x.useMemo(()=>yX(e),[e]);return t.length===0?u.jsx(Re,{type:"supporting",children:"No changes."}):u.jsx(pt,{gap:2,children:t.map((n,r)=>u.jsxs(pt,{gap:0,children:[u.jsxs(Kt,{gap:2,vAlign:"center",padding:1,children:[u.jsx(Re,{type:"supporting",weight:"semibold",maxLines:1,children:n.oldPath!==void 0&&n.oldPath!==n.path?`${n.oldPath} → ${n.path}`:n.path}),n.isNew?u.jsx(Ys,{label:"new",color:"green",size:"sm"}):null,n.isDeleted?u.jsx(Ys,{label:"deleted",color:"red",size:"sm"}):null,u.jsxs(Re,{type:"supporting",children:["+",n.additions," −",n.deletions]})]}),n.binary===!0?u.jsx(Re,{type:"supporting",children:"Binary file"}):n.lines.length===0?null:u.jsx("div",{style:bX,children:n.lines.map((s,a)=>u.jsx("div",{style:kX[s.kind],children:s.text},a))})]},`${n.path}-${r}`))})}function vX(e,t,n){return e.kind==="diff"?u.jsx(c8,{patch:e.patch}):u.jsxs(pt,{gap:2,hAlign:"start",children:[u.jsx(Kt,{children:u.jsx($e,{label:"Open conversation",variant:"secondary",size:"sm",onClick:()=>n(e.conversationId)})}),t.state==="output-error"||e.output===void 0||e.output===""?null:u.jsx(YE,{children:e.output})]})}function wX(e,t){const n=r=>{var o;const s=Cq(r),a=s===void 0?void 0:vX(s,r,t),i=(o=r.children)==null?void 0:o.map(n);return a===void 0&&i===void 0?r:{...r,...a===void 0?{}:{detail:a},...i===void 0?{}:{children:i}}};return{...e,steps:e.steps.map(r=>r.kind==="tools"?{...r,tools:r.tools.map(n)}:r)}}function SX({entry:e,connected:t,openConversation:n,onFork:r}){switch(e.kind){case"user":return u.jsx(Oa.User,{children:u.jsxs("div",{className:"flex flex-col items-end gap-1",children:[u.jsx(Oa.Bubble,{children:u.jsx(Oa.Content,{children:e.text})}),u.jsx(ci,{className:"shrink-0",children:u.jsx(ci.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var s;(s=navigator.clipboard)==null||s.writeText(e.text)}})})]})});case"run":return u.jsx(jX,{entry:e,connected:t,openConversation:n,onFork:r});case"compaction":return u.jsx(Np,{variant:"divider",children:"Earlier context summarized"});case"reset":return u.jsx(Np,{variant:"divider",children:"New context"})}}function jX({entry:e,connected:t,openConversation:n,onFork:r}){const s=x.useMemo(()=>wX(e.cot,n),[e.cot,n]),a=s.answer,i=s.phase==="settled"&&(a!==void 0||e.forkEntryId!==void 0);return u.jsx(Oa.Assistant,{children:u.jsxs(Oa.Body,{children:[e.interrupted?u.jsx("p",{className:"mb-1",children:u.jsx(Ys,{label:"interrupted",color:"orange",size:"sm"})}):null,u.jsx(EX,{view:s}),a===void 0?null:u.jsx(Oa.Content,{children:a.streaming?u.jsx(_V,{isStreaming:!0,children:a.text}):u.jsx(YE,{children:a.text})}),e.failure===void 0?null:u.jsx(YV,{error:e.failure}),i?u.jsxs(ci,{className:"chat-message__actions--persist",children:[a===void 0?null:u.jsx(ci.Copy,{"aria-label":"Copy",tooltip:"Copy",onPress:()=>{var o;(o=navigator.clipboard)==null||o.writeText(a.text)}}),e.forkEntryId===void 0?null:u.jsx(Oa.Action,{"aria-label":"Fork",tooltip:"Continue from here in a new conversation",disabled:!t,onPress:()=>r(e.forkEntryId),children:u.jsx(Rj,{"aria-hidden":"true",className:"size-4"})})]}):null]})})}function EX({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:u.jsx(Ql,{...t?{startedAtMs:e.anchorMs}:{elapsedMs:e.elapsedMs},hasSteps:e.steps.length>0,phase:e.phase,outcome:e.outcome,children:u.jsx(Ql.Steps,{children:e.steps.map(n=>u.jsx(Ql.Step,{children:n.kind==="thinking"?u.jsx(iX,{step:n}):n.kind==="tools"?u.jsx(mX,{step:n}):u.jsx("div",{className:"chain-of-thought__interim","data-slot":"chat-interim-output",children:u.jsx(JE,{text:n.text})})},n.id))})})}const $X={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 CX({view:e,remote:t}){const n=e.docs.flatMap(r=>{const s=Ah(r.presentation,r.value);return s.type!=="pinomad.question"?[]:s.value.requests.filter(a=>a.resolution===void 0).map(a=>({kind:r.kind,request:a}))});return n.length===0?null:u.jsx(pt,{gap:2,padding:2,"data-testid":"pending-questions",children:n.map(({kind:r,request:s})=>u.jsx(TX,{kind:r,request:s,remote:t,connected:e.connection==="connected"},s.id))})}function TX({kind:e,request:t,remote:n,connected:r}){const[s,a]=x.useState(()=>t.questions.map(()=>[])),[i,o]=x.useState(()=>t.questions.map(()=>"")),l=(f,h)=>a(p=>p.map((m,k)=>k===f?h:m)),c=(f,h)=>o(p=>p.map((m,k)=>k===f?h:m)),d=()=>{const f=t.questions.map((h,p)=>{var m;return{selected:s[p]??[],...((m=i[p])==null?void 0:m.trim())===""?{}:{other:i[p]}}});n.controller.answer(e,t.id,f)};return u.jsxs(pt,{gap:3,style:$X,children:[u.jsx(Re,{type:"label",weight:"semibold",children:"The agent asks"}),t.questions.map((f,h)=>{var p;return u.jsxs(pt,{gap:1,children:[u.jsxs(Kt,{gap:2,vAlign:"center",children:[u.jsx(Ys,{label:f.header,size:"sm"}),u.jsx(Re,{type:"body",children:f.question})]}),f.multiSelect===!0?u.jsx(xm,{label:f.header,isLabelHidden:!0,value:s[h]??[],onChange:m=>l(h,m),children:f.options.map(m=>u.jsx(pm,{label:m.label,value:m.label,...m.description===void 0?{}:{description:m.description}},m.label))}):u.jsx(X3,{label:f.header,isLabelHidden:!0,value:((p=s[h])==null?void 0:p[0])??"",onChange:m=>l(h,[m]),children:f.options.map(m=>u.jsx(Z3,{label:m.label,value:m.label,...m.description===void 0?{}:{description:m.description}},m.label))}),u.jsx(Uo,{label:"Other",value:i[h]??"",onChange:m=>c(h,m),placeholder:"Type a custom answer…"})]},h)}),u.jsx(Kt,{hAlign:"end",children:u.jsx($e,{label:"Submit",variant:"primary",isDisabled:!r,onClick:d})})]})}function MX(e){const t=e.docs["pi.live"];return(t==null?void 0:t.run)!==void 0}const NX="ws://127.0.0.1:7420",Td="pinomad.device";function u8(e){if(e!==null)try{const t=JSON.parse(e);return typeof t.url!="string"||typeof t.hostKey!="string"||typeof t.privateKey!="string"||Za(t.hostKey).length!==32||Za(t.privateKey).length!==32?void 0:{url:t.url,hostKey:t.hostKey,privateKey:t.privateKey}}catch{return}}function AX(e,t,n){const r=new URLSearchParams(e.replace(/^#/,"")),s=r.get("token");if(s!==null&&s!=="")return{kind:"token",url:r.get("url")??NX,token:s};const a=r.get("pair");if(a!==null){const o=a.indexOf(".");if(o<=0||a.indexOf(".",o+1)!==-1)return;const l=a.slice(0,o),c=a.slice(o+1);try{if(Za(l).length!==32||Za(c).length===0)return}catch{return}return{kind:"pair",url:r.get("url")??`${t.protocol==="https:"?"wss":"ws"}://${t.host}/`,hostKey:l,secret:c}}if(e.replace(/^#/,"")!=="")return;const i=u8(n);return i===void 0?void 0:{kind:"device",...i}}function zX(e,t){return new URL(e).host===t.host}function RX(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,r=[t,n].filter(s=>s!==void 0).join(" ");return r===""?"Browser":r}const ec=e=>e!==null&&typeof e=="object",_X=new Set(["__proto__","constructor","prototype"]);class Oo extends Error{constructor(n){super(`unsafe path segment: ${String(n)}`);ee(this,"segment");this.segment=n,this.name="UnsafePathError"}}function d8(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");Ni(e[1],!0);return;case"d":if(e.length!==2)throw new TypeError("d arity");Ni(e[1],!0);return;case"a":if(e.length!==3||typeof e[2]!="string")throw new TypeError("a shape");Ni(e[1],!0);return;case"t":if(e.length!==3||!Number.isInteger(e[2])||e[2]<0)throw new TypeError("t shape");Ni(e[1],!0);return;case"p":{if(e.length!==5)throw new TypeError("p arity");if(Ni(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");Ni(e[1]),OX(e[2]);return;default:throw new TypeError(`unknown op verb: ${String(e[0])}`)}}function Ni(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");f8(e)}function OX(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 f8(e){for(const t of e)if(typeof t=="string"){if(_X.has(t))throw new Oo(t)}else if(!Number.isInteger(t)||t<0)throw new Oo(t)}function DX(e,t){if(t>e.length)throw new Oo(t)}class Yn extends Error{constructor(n){super(`unresolvable path: ${JSON.stringify(n)}`);ee(this,"path");this.path=n,this.name="PathError"}}function IX(e,t){let n=e;for(const r of t){if(d8(r),r[0]==="r"){n=r[1];continue}const s=r[1];if(f8(s),r[0]==="p"){const c=s.length===0?n:pp(n,s);if(!Array.isArray(c))throw new Yn(s);c.splice(r[2],r[3]);const d=1e4;for(let f=0;f<r[4].length;f+=d)c.splice(r[2]+f,0,...r[4].slice(f,f+d));continue}if(r[0]==="m"){const c=s.length===0?n:pp(n,s);if(!Array.isArray(c)||c.length!==r[2].length)throw new Yn(s);const d=c.slice();for(let f=0;f<r[2].length;f++)c[f]=d[r[2][f]];continue}const a=pp(n,s.slice(0,-1)),i=s[s.length-1];if(Array.isArray(a)){if(typeof i!="number")throw new Oo(i);DX(a,i)}const o=c=>{Object.defineProperty(a,i,{value:c,writable:!0,enumerable:!0,configurable:!0})},l=()=>Object.hasOwn(a,i)?a[i]:void 0;switch(r[0]){case"s":o(r[2]);break;case"d":if(Array.isArray(a)){if(typeof i!="number"||i>=a.length)throw new Yn(s);a.splice(i,1)}else delete a[i];break;case"a":{const c=l();if(typeof c!="string")throw new Yn(s);o(`${c}${r[2]}`);break}case"t":{const c=l();if(typeof c!="string")throw new Yn(s);o(c.slice(r[2]));break}}}return n}function LX(e,t){return BX(e,[t])}function BX(e,t){let n=e;const r=new WeakSet;for(const s of t)for(const a of s){if(d8(a),a[0]==="r"){n=a[1];continue}n=HX(n,a[0]==="p"||a[0]==="m"?a[1]:a[1].slice(0,-1),r),n=IX(n,[a])}return n}function HX(e,t,n){const r=i=>{if(Array.isArray(i))return i.slice();if(!ec(i))throw new Yn(t);const o=Object.create(Object.getPrototypeOf(i)===null?null:Object.prototype);for(const l of Object.keys(i))Object.defineProperty(o,l,{value:i[l],writable:!0,enumerable:!0,configurable:!0});return o};if(!ec(e))throw new Yn(t);let s;n.has(e)?s=e:(s=r(e),n.add(s));let a=s;for(const i of t){if(!Object.hasOwn(a,i))throw new Yn(t);if(Array.isArray(a)&&typeof i!="number")throw new Oo(i);const o=a[i];if(!ec(o))throw new Yn(t);if(n.has(o)){a=o;continue}const l=r(o);Object.defineProperty(a,i,{value:l,writable:!0,enumerable:!0,configurable:!0}),n.add(l),a=l}return s}function qX(e,t){let n=e;for(const r of t){if(!ec(n))throw new Yn(t);if(Array.isArray(n)&&typeof r!="number")throw new Oo(r);if(!Object.hasOwn(n,r))throw new Yn(t);n=n[r]}return n}function pp(e,t){const n=qX(e,t);if(!ec(n))throw new Yn(t);return n}const k2=e=>`conversation:${e}`,v2=(e,t)=>`doc:${e}:${t}`,w2=4401,S2=4;function UX(e,t){return{label:e,open(n){const r=new URL(e);r.searchParams.set("token",t);const s=new WebSocket(r);return s.onmessage=a=>n.message(String(a.data)),s.onclose=a=>n.closed(a.code),{send:a=>s.send(a),close:()=>s.close()}}}}function PX(e){return new FX(e).ready}class jg 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 h8 extends Error{constructor(n,r){super(`Host protocol mismatch: host speaks ${n}, this client speaks ${r}`);ee(this,"host");ee(this,"client");this.name="ProtocolMismatchError",this.host=n,this.client=r}}var Ac,go,gt,fn,mo,_f,La,Rs,yo,fr,sn,hn,Of,Df,zc,$r,bo,Cr,Rc,ko,Z,Eg,x8,$s,p8,g8,wa,Nl,Cs,Ts,Sa,Vt,dn,m8,y8,Md,b8,k8;class FX{constructor(t){Ae(this,Z);ee(this,"ready");Ae(this,Ac);Ae(this,go,new Set);Ae(this,gt,new Map);Ae(this,fn,new Set(["conversations","index","devices","mcp"]));Ae(this,mo,[]);Ae(this,_f,{});Ae(this,La,new Map);Ae(this,Rs,new Map);Ae(this,yo);Ae(this,fr);Ae(this,sn);Ae(this,hn);Ae(this,Of,1);Ae(this,Df,1);Ae(this,zc,0);Ae(this,$r,!1);Ae(this,bo,!1);Ae(this,Cr,Promise.resolve());Ae(this,Rc);Ae(this,ko);je(this,Ac,t),je(this,yo,"transport"in t?t.transport:UX(t.url,t.token)),this.ready=new Promise((n,r)=>{je(this,Rc,n),je(this,ko,r)}),Q(this,Z,Eg).call(this)}}Ac=new WeakMap,go=new WeakMap,gt=new WeakMap,fn=new WeakMap,mo=new WeakMap,_f=new WeakMap,La=new WeakMap,Rs=new WeakMap,yo=new WeakMap,fr=new WeakMap,sn=new WeakMap,hn=new WeakMap,Of=new WeakMap,Df=new WeakMap,zc=new WeakMap,$r=new WeakMap,bo=new WeakMap,Cr=new WeakMap,Rc=new WeakMap,ko=new WeakMap,Z=new WeakSet,Eg=function(){const t=X(this,yo).open({message:n=>{X(this,fr)===t&&Q(this,Z,p8).call(this,JSON.parse(n))},closed:(n,r)=>Q(this,Z,x8).call(this,t,n,r)});je(this,fr,t)},x8=function(t,n,r){if(X(this,fr)!==t)return;je(this,fr,void 0);for(const o of X(this,Rs).values())o.reject(new Error("Disconnected from host"));if(X(this,Rs).clear(),X(this,sn)===void 0){je(this,$r,!0),X(this,ko).call(this,n===w2?new jg:new Error(r??`Could not connect to ${X(this,yo).label}`));return}if(X(this,$r))return;if(n===w2){je(this,$r,!0),Q(this,Z,Ts).call(this,{connection:"closed"}),Q(this,Z,Sa).call(this,"error",new jg().message);return}Q(this,Z,Ts).call(this,{connection:"reconnecting"});const{min:s,max:a}=X(this,Ac).reconnectDelayMs??{min:200,max:2e3},i=Math.min(a,s*2**au(this,zc)._++);setTimeout(()=>{X(this,$r)||Q(this,Z,Eg).call(this)},i)},$s=function(t){var n;(n=X(this,fr))==null||n.send(JSON.stringify(t))},p8=function(t){var n,r,s;switch(t.type){case"hello":{if(t.protocol!==S2){const a=new h8(t.protocol,S2);je(this,$r,!0),X(this,sn)===void 0?X(this,ko).call(this,a):(Q(this,Z,Ts).call(this,{connection:"outdated"}),Q(this,Z,Sa).call(this,"error",a.message)),(n=X(this,fr))==null||n.close();return}if(je(this,zc,0),je(this,mo,t.docs),je(this,_f,t.toolPresentations),X(this,hn)!==void 0)for(const a of Q(this,Z,Nl).call(this,X(this,hn)))X(this,fn).add(a);for(const a of X(this,fn))Q(this,Z,$s).call(this,{type:"subscribe",stream:a});X(this,sn)!==void 0?Q(this,Z,Ts).call(this,{session:t.session,models:t.models,toolPresentations:t.toolPresentations,defaults:t.defaults??{},connection:"connected"}):Q(this,Z,g8).call(this,t);return}case"snapshot":if(!X(this,fn).has(t.stream))return;X(this,gt).set(t.stream,t.value),Q(this,Z,Cs).call(this);for(const a of((r=X(this,La).get(t.stream))==null?void 0:r.splice(0))??[])a.resolve();return;case"ops":if(!X(this,fn).has(t.stream)||!X(this,gt).has(t.stream))return;X(this,gt).set(t.stream,LX(X(this,gt).get(t.stream),t.ops)),Q(this,Z,Cs).call(this);return;case"ended":X(this,fn).delete(t.stream),X(this,gt).delete(t.stream);for(const a of((s=X(this,La).get(t.stream))==null?void 0:s.splice(0))??[])a.reject(new Error(`Stream ${t.stream} ended: ${t.reason}`));Q(this,Z,Cs).call(this);return;case"result":{const a=X(this,Rs).get(t.id);X(this,Rs).delete(t.id),t.ok?a==null||a.resolve(t.value):a==null||a.reject(new Error(t.error));return}case"notice":Q(this,Z,Sa).call(this,t.level,t.message);return}},g8=function(t){Promise.all([Q(this,Z,wa).call(this,"conversations"),Q(this,Z,wa).call(this,"index"),Q(this,Z,wa).call(this,"devices"),Q(this,Z,wa).call(this,"mcp")]).then(()=>{je(this,sn,{session:t.session,organized:{chats:[],projects:[]},models:t.models,defaults:t.defaults??{},notices:[],connection:"connected",docs:[],toolPresentations:t.toolPresentations,devices:[],mcp:null}),Q(this,Z,Cs).call(this),X(this,Rc).call(this,{view:Q(this,Z,m8).call(this),controller:Q(this,Z,y8).call(this),close:()=>Q(this,Z,k8).call(this)})})},wa=function(t){return new Promise((n,r)=>{const s=X(this,La).get(t)??[];s.push({resolve:n,reject:r}),X(this,La).set(t,s)})},Nl=function(t){return[k2(t),...X(this,mo).map(n=>v2(n.kind,t))]},Cs=function(){var l;if(X(this,sn)===void 0)return;const t=X(this,hn),n=t===void 0?void 0:X(this,gt).get(k2(t)),r=X(this,gt).get("conversations")??[],s=X(this,gt).get("index")??{projects:[],conversations:[]},a=((l=X(this,gt).get("devices"))==null?void 0:l.devices)??[],i=X(this,fn).has("tasks")?X(this,gt).get("tasks"):void 0,o=t===void 0?[]:X(this,mo).flatMap(c=>{const d=v2(c.kind,t);return X(this,gt).has(d)?[{kind:c.kind,presentation:c.presentation,value:X(this,gt).get(d)}]:[]});Q(this,Z,Ts).call(this,{conversation:n,organized:cD(s,r),home:t===void 0?void 0:dD(s,r,t),checkout:t===void 0?void 0:uD(s,r,t),tasks:i,docs:o,devices:a,mcp:X(this,gt).get("mcp")??null})},Ts=function(t){X(this,sn)!==void 0&&(je(this,sn,{...X(this,sn),...t}),!X(this,bo)&&(je(this,bo,!0),queueMicrotask(()=>{je(this,bo,!1);for(const n of X(this,go))n()})))},Sa=function(t,n){X(this,sn)!==void 0&&Q(this,Z,Ts).call(this,{notices:[...X(this,sn).notices,{id:au(this,Df)._++,level:t,message:n}].slice(-20)})},Vt=function(t,n){var s;if(X(this,fr)===void 0||((s=X(this,sn))==null?void 0:s.connection)!=="connected")return Promise.reject(new Error("Not connected to the host"));const r=au(this,Of)._++;return new Promise((a,i)=>{X(this,Rs).set(r,{resolve:a,reject:i}),Q(this,Z,$s).call(this,{type:"call",id:r,method:t,args:n})})},dn=function(t){return je(this,Cr,X(this,Cr).then(t).then(()=>{},n=>Q(this,Z,Sa).call(this,"error",n instanceof Error?n.message:String(n)))),X(this,Cr)},m8=function(){return{current:()=>X(this,sn),subscribe:t=>(X(this,go).add(t),()=>X(this,go).delete(t))}},y8=function(){const t=()=>Array.from(crypto.getRandomValues(new Uint8Array(16)),r=>r.toString(16).padStart(2,"0")).join(""),n=()=>{if(X(this,hn)===void 0)throw new Error("No conversation selected");return X(this,hn)};return{addProject:r=>Q(this,Z,dn).call(this,()=>Q(this,Z,Vt).call(this,"addProject",{path:r})),removeProject:r=>Q(this,Z,dn).call(this,()=>Q(this,Z,Vt).call(this,"removeProject",{path:r})),createConversation:(r,s,a)=>Q(this,Z,dn).call(this,async()=>{const{conversationId:i}=await Q(this,Z,Vt).call(this,"createConversation",{home:r,text:s,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}});await Q(this,Z,Md).call(this,i)}),archive:(r,s)=>Q(this,Z,dn).call(this,async()=>{await Q(this,Z,Vt).call(this,"archive",{conversationId:r,archived:s}),s&&r===X(this,hn)&&Q(this,Z,b8).call(this)}),submit:(r,s)=>Q(this,Z,dn).call(this,()=>Q(this,Z,Vt).call(this,"submit",{conversationId:n(),text:r,whenBusy:s,requestId:t()})),compact:r=>Q(this,Z,dn).call(this,()=>Q(this,Z,Vt).call(this,"compact",{conversationId:n(),...r===void 0?{}:{instructions:r}})),abort:()=>X(this,hn)===void 0?(Q(this,Z,Sa).call(this,"error","No conversation selected"),Promise.resolve()):Q(this,Z,Vt).call(this,"abort",{conversationId:n()}).then(()=>{},r=>Q(this,Z,Sa).call(this,"error",r instanceof Error?r.message:String(r))),setThinkingLevel:r=>Q(this,Z,dn).call(this,()=>Q(this,Z,Vt).call(this,"setThinkingLevel",{conversationId:n(),level:r})),setModel:r=>Q(this,Z,dn).call(this,()=>Q(this,Z,Vt).call(this,"setModel",{conversationId:n(),model:r})),toggleTasks:()=>Q(this,Z,dn).call(this,async()=>{if(X(this,fn).delete("tasks")){Q(this,Z,$s).call(this,{type:"unsubscribe",stream:"tasks"}),X(this,gt).delete("tasks"),Q(this,Z,Cs).call(this);return}X(this,fn).add("tasks");const r=Q(this,Z,wa).call(this,"tasks");Q(this,Z,$s).call(this,{type:"subscribe",stream:"tasks"}),await r}),switchConversation:r=>Q(this,Z,dn).call(this,()=>Q(this,Z,Md).call(this,r)),fork:(r,s,a)=>Q(this,Z,dn).call(this,async()=>{const{conversationId:i}=await Q(this,Z,Vt).call(this,"fork",{conversationId:n(),entryId:r,...a===void 0?{}:{removeTools:a}});await Q(this,Z,Md).call(this,i),await Q(this,Z,Vt).call(this,"submit",{conversationId:i,text:s,whenBusy:"followUp",requestId:t()})}),answer:(r,s,a)=>Q(this,Z,dn).call(this,()=>Q(this,Z,Vt).call(this,"answer",{conversationId:n(),kind:r,requestId:s,answers:a})),changes:()=>{const r=X(this,Cr).then(()=>Q(this,Z,Vt).call(this,"changes",{conversationId:n()}));return je(this,Cr,r.then(()=>{},()=>{})),r},createPairing:()=>{const r=X(this,Cr).then(()=>Q(this,Z,Vt).call(this,"createPairing",{}));return je(this,Cr,r.then(()=>{},()=>{})),r},revokeDevice:r=>Q(this,Z,dn).call(this,()=>Q(this,Z,Vt).call(this,"revokeDevice",{publicKey:r}))}},Md=async function(t){const n=X(this,hn);if(t===n)return;const r=Q(this,Z,Nl).call(this,t);for(const a of r)X(this,fn).add(a);const s=Promise.all(r.map(a=>Q(this,Z,wa).call(this,a)));for(const a of r)Q(this,Z,$s).call(this,{type:"subscribe",stream:a});await s,je(this,hn,t);for(const a of n===void 0?[]:Q(this,Z,Nl).call(this,n))X(this,fn).delete(a),X(this,gt).delete(a),Q(this,Z,$s).call(this,{type:"unsubscribe",stream:a});Q(this,Z,Cs).call(this)},b8=function(){const t=X(this,hn);if(t!==void 0){je(this,hn,void 0);for(const n of Q(this,Z,Nl).call(this,t))X(this,fn).delete(n),X(this,gt).delete(n),Q(this,Z,$s).call(this,{type:"unsubscribe",stream:n});Q(this,Z,Cs).call(this)}},k8=function(){var t;X(this,$r)||(je(this,$r,!0),Q(this,Z,Ts).call(this,{connection:"closed"}),(t=X(this,fr))==null||t.close())};function GX(e,t){const[n,r]=x.useState({status:"connecting"});return x.useEffect(()=>{let s,a=!1;return PX({reconnectDelayMs:{min:200,max:2e3},...e}).then(i=>{if(a){i.close();return}s=i,i.controller.toggleTasks(),r({status:"ready",remote:i})},i=>{a||r({status:"failed",error:i instanceof Error?i.message:String(i),unauthorized:i instanceof jg,...i instanceof h8?{mismatch:i}:{}})}),()=>{a=!0,s==null||s.close()}},[t]),n}function VX(e){return x.useSyncExternalStore(e.view.subscribe,e.view.current)}const XX={height:"100dvh",width:"100%",backgroundColor:"var(--color-background-body)",color:"var(--color-text-primary)"},ZX={flex:1,minHeight:0};function WX(){const e=x.useMemo(()=>AX(window.location.hash,window.location,localStorage.getItem(Td)),[]);return e===void 0?u.jsx(Rf,{children:u.jsx(Ka,{title:"No host link",description:"Open the token link the host printed, or scan a pairing QR on this device."})}):u.jsx(KX,{address:e})}function Rf({children:e}){return u.jsx(pt,{style:XX,isScrollable:!0,children:u.jsx(pt,{minHeight:"100%",style:{flexShrink:0},hAlign:"center",vAlign:"center",padding:6,children:e})})}function KX({address:e}){return e.kind==="token"?u.jsx(v8,{options:e,connectionKey:`${e.url} ${e.token}`,label:e.url}):u.jsx(YX,{address:e})}function YX({address:e}){const t=x.useMemo(()=>u8(localStorage.getItem(Td)),[]),n=x.useMemo(()=>e.kind==="pair"&&t!==void 0&&t.hostKey===e.hostKey?mg(Za(t.privateKey)):e.kind==="device"?mg(Za(e.privateKey)):wE(),[e,t]),r=x.useMemo(()=>({transport:qF({url:e.url,hostKey:Za(e.hostKey),device:n,...e.kind==="pair"?{pairing:{secret:e.secret,name:RX(navigator.userAgent)},onPaired:()=>{localStorage.setItem(Td,JSON.stringify({url:e.url,hostKey:e.hostKey,privateKey:$E(n.privateKey)})),history.replaceState(null,"",window.location.pathname+window.location.search)}}:{}})}),[e,n]),s=e.kind==="pair"?u.jsxs(pt,{gap:4,hAlign:"center",children:[u.jsx(Ka,{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."}),t===void 0?null:u.jsx($e,{label:"Use saved pairing",variant:"secondary",onClick:()=>{history.replaceState(null,"",window.location.pathname+window.location.search),window.location.reload()}})]}):u.jsxs(pt,{gap:4,hAlign:"center",children:[u.jsx(Ka,{title:"This device isn't paired",description:"It isn't paired with the host, or was revoked."}),u.jsx($e,{label:"Forget this host",variant:"secondary",onClick:()=>{localStorage.removeItem(Td),window.location.reload()}})]});return u.jsx(v8,{options:r,connectionKey:`${e.url} ${e.hostKey}`,label:e.url,rejected:s,device:n})}function v8({options:e,connectionKey:t,label:n,rejected:r,device:s}){const a=GX(e,t);return a.status==="connecting"?u.jsx(Rf,{children:u.jsx(Ka,{title:"Connecting",description:n})}):a.status==="failed"?u.jsx(Rf,{children:a.mismatch!==void 0?u.jsx(w8,{wsUrl:n,host:a.mismatch.host}):r!==void 0&&a.unauthorized?r:u.jsx(Wa,{status:"error",title:"Could not connect to the host",description:a.error})}):u.jsx(QX,{remote:a.remote,wsUrl:n,rejected:r,device:s})}const $g="pinomad.reloadedForProtocol";function w8({wsUrl:e,host:t}){const[n]=x.useState(()=>!zX(e,window.location)||sessionStorage.getItem($g)===String(t)?!1:(sessionStorage.setItem($g,String(t)),window.location.reload(),!0));return n?null:u.jsx(Wa,{status:"error",container:"section",title:"Host version mismatch",description:"The host was upgraded past this client. Reload the page, or update the client you're using."})}function QX({remote:e,wsUrl:t,rejected:n,device:r}){var C,$,A;const s=VX(e),[a,i]=x.useState(!0),[o,l]=x.useState({kind:"chat"});x.useEffect(()=>i(s.conversation===void 0),[(C=s.conversation)==null?void 0:C.conversation.id]);const c=a?void 0:s.conversation,d=c!==void 0&&MX(c),f=x.useMemo(()=>c===void 0?[]:Oq(c,s.toolPresentations,d),[c,s.toolPresentations,d]),h=o.kind==="chat"?"New chat":`New conversation in ${nZ(s.organized,o.path)}`,p=c===void 0||($=cv(s.organized,c.conversation.id))==null?void 0:$.summary,m=(p==null?void 0:p.kind)==="subagent"?p.parent:void 0,k=m===void 0||(A=cv(s.organized,m))==null?void 0:A.summary,b=x.useCallback(E=>void e.controller.switchConversation(E),[e]),g=E=>{l(E),i(!0)},y=Io("(max-width: 1023px)"),[v,w]=x.useState(),[S,j]=x.useState(!1);return x.useEffect(()=>{s.connection==="connected"&&sessionStorage.removeItem($g)},[s.connection]),s.connection==="closed"&&n!==void 0?u.jsx(Rf,{children:n}):u.jsxs(u.Fragment,{children:[u.jsx(sG,{view:s,remote:e,device:r,narrow:y,drafting:a,draftingChat:a&&o.kind==="chat",draftLabel:h,conversation:c,summary:p,parentSummary:k,banner:u.jsx(tZ,{view:s,wsUrl:t}),onDraft:g,onOpenChanges:()=>j(!0),children:c===void 0?u.jsx(xG,{view:s,remote:e,draft:o,onDraft:g,connected:s.connection==="connected"}):u.jsx(M3,{style:ZX,composer:u.jsx("div",{className:"mx-auto w-full max-w-[44rem]",children:u.jsxs(pt,{gap:1,children:[u.jsx(CX,{view:s,remote:e}),u.jsx(yG,{view:s,remote:e,conversation:c,busy:d,narrow:y})]})}),emptyState:u.jsx(Ka,{title:"Nothing here yet",description:"Ask the agent something. Every client sees it."}),children:f.length===0?null:u.jsx(S3,{isStreaming:d,gap:0,children:u.jsx("div",{className:"mx-auto flex w-full max-w-[44rem] flex-col gap-8 px-4 pb-6 pt-2",children:f.map(E=>u.jsx(SX,{entry:E,connected:s.connection==="connected",openConversation:b,onFork:w},E.id))})})},c.conversation.id)}),v===void 0?null:u.jsx(JX,{entryId:v,remote:e,connected:s.connection==="connected",onClose:()=>w(void 0)}),S&&c!==void 0&&u.jsx(eZ,{view:s,remote:e,busy:d,onClose:()=>j(!1)})]})}function JX({entryId:e,remote:t,connected:n,onClose:r}){const[s,a]=x.useState("Continue from here."),i=()=>{t.controller.fork(e,s.trim()),r()};return u.jsx(ui,{isOpen:!0,onOpenChange:o=>o?void 0:r(),purpose:"form",width:480,children:u.jsx(sa,{header:u.jsx(di,{title:"Fork from this answer",subtitle:"The fork sees the conversation up to here and gets its own copy of the files as of now.",onOpenChange:()=>r()}),content:u.jsx(aa,{children:u.jsx(Uo,{label:"First message",value:s,onChange:a})}),footer:u.jsx(qc,{children:u.jsxs(Kt,{gap:2,hAlign:"end",children:[u.jsx($e,{label:"Cancel",variant:"secondary",onClick:r}),u.jsx($e,{label:"Fork",variant:"primary",isDisabled:!n||s.trim()==="",onClick:i})]})})})})}function eZ({view:e,remote:t,busy:n,onClose:r}){const[s,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 l=e.checkout===void 0;return u.jsx(ui,{isOpen:!0,onOpenChange:c=>c?void 0:r(),width:720,children:u.jsx(sa,{header:u.jsx(di,{title:"Changes",onOpenChange:()=>r()}),content:u.jsx(aa,{children:u.jsx(pt,{gap:2,padding:3,children:s===void 0?u.jsx(Re,{type:"supporting",children:"Loading…"}):s.available?u.jsxs(u.Fragment,{children:[l?u.jsx(Re,{type:"supporting",children:"These are the project directory's uncommitted changes, shared with other conversations working there."}):null,s.truncated?u.jsx(Re,{type:"supporting",children:"The diff is truncated; the rest is not shown."}):null,u.jsx(c8,{patch:s.patch})]}):u.jsx(Re,{type:"supporting",children:s.reason})})}),footer:u.jsx(qc,{children:u.jsxs(Kt,{gap:2,hAlign:"end",children:[u.jsx($e,{label:"Refresh",variant:"secondary",isDisabled:e.connection!=="connected",onClick:i}),u.jsx($e,{label:"Close",variant:"primary",onClick:r})]})})})})}function tZ({view:e,wsUrl:t}){return e.connection==="outdated"?u.jsx(w8,{wsUrl:t,host:"outdated"}):e.connection==="reconnecting"?u.jsx(Wa,{status:"warning",container:"section",title:"Host connection lost",description:"Reconnecting… the view keeps the last state the host sent."}):e.connection==="closed"?u.jsx(Wa,{status:"error",container:"section",title:"Disconnected from the host"}):null}function nZ(e,t){var n;return((n=e.projects.find(r=>r.project.path===t))==null?void 0:n.project.name)??t.split("/").at(-1)??t}iS.createRoot(document.getElementById("root")).render(u.jsx(x.StrictMode,{children:u.jsx(Zw,{theme:lD,children:u.jsx(WX,{})})}));
|