@fungi.computer/grove 0.24.1 → 0.24.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mushroom-Czy5e_rO.js","assets/document-BlZ-xOhz.js","assets/renderer-DZUc--C2.js","assets/rolldown-runtime-CbXtAM7H.js","assets/document-C8kKsaV-.js","assets/cat-YC0YT2iN.js","assets/base-face-DIKb83_T.js","assets/index-DM0FsGEU.js","assets/index-CNv2vz-v.css","assets/burger-Dsdp_Hx3.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mushroom-Czy5e_rO.js","assets/document-BlZ-xOhz.js","assets/renderer-DZUc--C2.js","assets/rolldown-runtime-CbXtAM7H.js","assets/document-C8kKsaV-.js","assets/cat-CsQptK53.js","assets/base-face-DIKb83_T.js","assets/index-Cs1h3Dn0.js","assets/index-CNv2vz-v.css","assets/burger-DHwVN0-y.js"])))=>i.map(i=>d[i]);
2
2
  import{n as e,t}from"./rolldown-runtime-CbXtAM7H.js";import{$ as n,$i as r,$n as i,$r as a,$t as o,Aa as s,Ai as c,An as l,Ao as u,At as d,B as f,Ba as p,Bi as m,Bn as h,Br as g,Bt as _,Ca as v,Cn as y,Co as b,Cr as x,Ct as S,Di as C,Dn as w,Do as ee,Dt as te,Ea as ne,En as re,Eo as ie,Er as T,Et as ae,F as oe,Fa as se,Fi as ce,Fn as le,Fr as ue,Ft as de,G as fe,Ga as pe,Gi as me,Gn as he,Gr as ge,Gt as _e,Ha as E,Hi as D,Hn as ve,Ht as ye,Ia as be,Ii as xe,In as Se,It as Ce,J as we,Ji as Te,Jn as Ee,Jr as De,Jt as O,K as Oe,Ka as k,Ki as ke,Kn as Ae,Kr as je,Kt as Me,L as Ne,La as A,Li as Pe,Ln as Fe,Lr as Ie,Lt as Le,M as Re,Ma as ze,Mi as Be,Mn as Ve,Mo as He,Mr as Ue,Mt as We,N as Ge,Na as Ke,Nn as qe,No as Je,Nr as Ye,Nt as Xe,Oa as Ze,Oi as Qe,On as $e,Oo as et,Or as tt,Ot as nt,P as rt,Pa as it,Pi as at,Pn as ot,Po as st,Pr as ct,Pt as lt,Q as ut,Qa as dt,Qn as ft,Qr as pt,Qt as mt,R as ht,Ra as gt,Ri as _t,Rn as vt,Rr as yt,Rt as bt,S as xt,Sa as St,Si as Ct,Sn as wt,So as Tt,St as Et,Ta as Dt,Ti as Ot,Tn as kt,To as At,Tt as jt,Ui as Mt,Un as Nt,Ur as Pt,Ut as Ft,V as It,Va as Lt,Vi as Rt,Vn as zt,Vt as Bt,W as Vt,Wa as Ht,Wi as Ut,Wn as Wt,Wr as Gt,Wt as Kt,X as qt,Xa as Jt,Xi as Yt,Xn as Xt,Xr as Zt,Xt as Qt,Y as $t,Ya as en,Yi as tn,Yn as nn,Yt as rn,Z as an,Za as on,Zi as sn,Zn as cn,Zt as ln,_ as un,_i as dn,_n as fn,_o as pn,_r as mn,_t as hn,ai as gn,an as _n,ao as vn,ar as yn,at as bn,b as xn,ba as Sn,bn as Cn,bo as wn,br as Tn,bt as En,ca as Dn,ci as On,cn as kn,cr as An,ct as j,di as jn,dn as Mn,do as Nn,dr as Pn,dt as Fn,ea as In,ei as Ln,en as Rn,eo as zn,er as Bn,et as Vn,fi as Hn,fn as Un,fo as Wn,ft as Gn,gi as Kn,gn as qn,go as Jn,gr as Yn,gt as Xn,h as Zn,hi as Qn,hn as $n,ho as er,ht as tr,i as nr,ia as rr,ii as ir,in as ar,io as or,it as sr,ja as cr,ji as lr,jn as ur,jo as dr,jt as fr,k as pr,ka as mr,ki as hr,kn as gr,ko as _r,kr as vr,kt as yr,li as br,ln as xr,lo as Sr,lr as Cr,lt as wr,m as Tr,mi as Er,mn as Dr,mo as Or,mr as kr,mt as Ar,n as jr,na as Mr,ni as Nr,nn as Pr,nt as Fr,oa as Ir,oi as Lr,on as Rr,or as zr,ot as Br,p as Vr,pi as Hr,pn as Ur,po as Wr,pr as Gr,pt as Kr,q as qr,qa as Jr,qi as Yr,qn as Xr,qr as Zr,qt as Qr,ra as $r,ri as ei,rn as ti,rr as ni,rt as ri,sa as ii,si as ai,sn as oi,so as si,sr as ci,st as li,t as ui,ti as di,tn as fi,tr as pi,tt as mi,ui as hi,un as gi,ur as _i,ut as vi,v as yi,vi as bi,vn as xi,vo as Si,vt as Ci,wa as wi,wi as Ti,wn as Ei,wo as Di,wr as Oi,wt as ki,x as Ai,xi as ji,xn as Mi,xo as Ni,xt as Pi,yi as Fi,yn as Ii,yo as Li,yt as Ri,za as zi,zi as Bi,zn as Vi,zt as Hi}from"./document-BlZ-xOhz.js";var Ui=t((e=>{var t=Symbol.for(`react.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.provider`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.iterator;function p(e){return typeof e!=`object`||!e?null:(e=f&&e[f]||e[`@@iterator`],typeof e==`function`?e:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},h=Object.assign,g={};function _(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}_.prototype.isReactComponent={},_.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`setState(...): 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`)},_.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function v(){}v.prototype=_.prototype;function y(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||m}var b=y.prototype=new v;b.constructor=y,h(b,_.prototype),b.isPureReactComponent=!0;var x=Array.isArray,S=Object.prototype.hasOwnProperty,C={current:null},w={key:!0,ref:!0,__self:!0,__source:!0};function ee(e,n,r){var i,a={},o=null,s=null;if(n!=null)for(i in n.ref!==void 0&&(s=n.ref),n.key!==void 0&&(o=``+n.key),n)S.call(n,i)&&!w.hasOwnProperty(i)&&(a[i]=n[i]);var c=arguments.length-2;if(c===1)a.children=r;else if(1<c){for(var l=Array(c),u=0;u<c;u++)l[u]=arguments[u+2];a.children=l}if(e&&e.defaultProps)for(i in c=e.defaultProps,c)a[i]===void 0&&(a[i]=c[i]);return{$$typeof:t,type:e,key:o,ref:s,props:a,_owner:C.current}}function te(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function ne(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function re(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ie=/\/+/g;function T(e,t){return typeof e==`object`&&e&&e.key!=null?re(``+e.key):t.toString(36)}function ae(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0}}if(c)return c=e,o=o(c),e=a===``?`.`+T(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(ie,`$&/`)+`/`),ae(o,r,i,``,function(e){return e})):o!=null&&(ne(o)&&(o=te(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(ie,`$&/`)+`/`)+e)),r.push(o)),1;if(c=0,a=a===``?`.`:a+`:`,x(e))for(var l=0;l<e.length;l++){s=e[l];var u=a+T(s,l);c+=ae(s,r,i,u,o)}else if(u=p(e),typeof u==`function`)for(e=u.call(e),l=0;!(s=e.next()).done;)s=s.value,u=a+T(s,l++),c+=ae(s,r,i,u,o);else if(s===`object`)throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`);return c}function oe(e,t,n){if(e==null)return e;var r=[],i=0;return ae(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function se(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ce={current:null},le={transition:null},ue={ReactCurrentDispatcher:ce,ReactCurrentBatchConfig:le,ReactCurrentOwner:C};function de(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:oe,forEach:function(e,t,n){oe(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return oe(e,function(){t++}),t},toArray:function(e){return oe(e,function(e){return e})||[]},only:function(e){if(!ne(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}},e.Component=_,e.Fragment=r,e.Profiler=a,e.PureComponent=y,e.StrictMode=i,e.Suspense=l,e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ue,e.act=de,e.cloneElement=function(e,n,r){if(e==null)throw Error(`React.cloneElement(...): The argument must be a React element, but you passed `+e+`.`);var i=h({},e.props),a=e.key,o=e.ref,s=e._owner;if(n!=null){if(n.ref!==void 0&&(o=n.ref,s=C.current),n.key!==void 0&&(a=``+n.key),e.type&&e.type.defaultProps)var c=e.type.defaultProps;for(l in n)S.call(n,l)&&!w.hasOwnProperty(l)&&(i[l]=n[l]===void 0&&c!==void 0?c[l]:n[l])}var l=arguments.length-2;if(l===1)i.children=r;else if(1<l){c=Array(l);for(var u=0;u<l;u++)c[u]=arguments[u+2];i.children=c}return{$$typeof:t,type:e.type,key:a,ref:o,props:i,_owner:s}},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:o,_context:e},e.Consumer=e},e.createElement=ee,e.createFactory=function(e){var t=ee.bind(null,e);return t.type=e,t},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ne,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:se}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=le.transition;le.transition={};try{e()}finally{le.transition=t}},e.unstable_act=de,e.useCallback=function(e,t){return ce.current.useCallback(e,t)},e.useContext=function(e){return ce.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return ce.current.useDeferredValue(e)},e.useEffect=function(e,t){return ce.current.useEffect(e,t)},e.useId=function(){return ce.current.useId()},e.useImperativeHandle=function(e,t,n){return ce.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return ce.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return ce.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return ce.current.useMemo(e,t)},e.useReducer=function(e,t,n){return ce.current.useReducer(e,t,n)},e.useRef=function(e){return ce.current.useRef(e)},e.useState=function(e){return ce.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return ce.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return ce.current.useTransition()},e.version=`18.3.1`})),Wi=t(((e,t)=>{t.exports=Ui()})),M=e(Wi(),1),Gi=be(),Ki=A(()=>Ke(`status`,[E({status:gt(`available`)}).strict(),E({status:gt(`unavailable`),reason:k()}).strict()])),qi=Gi,Ji=A(()=>Ht(k(),qi)),Yi=e=>qi.parse(e),Xi=e=>Ji.parse(e),Zi=A(()=>E({code:k().min(1).max(160),message:k().min(1).max(512),details:qi.optional()}).strict()),Qi=e=>Zi.parse(e),$i=Ji,ea=A(()=>k().refine(e=>e.trim().length>0)),ta=Ki,na=A(()=>en([E({type:gt(`action`)}).strict(),E({type:gt(`custom`),data:Ji}).strict(),E({type:gt(`choice`),options:Ze(E({value:qi,label:ea,description:ea.optional()}))}).strict(),E({type:gt(`form`),submitLabel:ea.optional()}).strict(),E({type:gt(`confirmation`),message:ea,confirmLabel:ea.optional(),cancelLabel:ea.optional()}).strict()])),ra=A(()=>E({inputSchema:$i.optional(),outputSchema:$i.optional(),presentation:na.optional()}).strict()),ia=A(()=>Lt().int().refine(e=>Number.isSafeInteger(e))),aa=A(()=>E({hint:ea.pipe(k().max(120)),words:Ze(E({word:k().regex(/^\S{1,64}$/u),description:ea.pipe(k().max(512)).optional(),arguments:Ji}).strict()).max(32).optional(),text:E({field:ea.pipe(k().max(120)),arguments:Ji,requestIdField:ea.pipe(k().max(120)).optional()}).strict().optional()}).strict().refine(e=>e.words!==void 0||e.text!==void 0,`slash arguments need words or text`)),oa=A(()=>E({order:ia.optional()}).strict()),sa=A(()=>E({bindings:E({order:ia.optional(),values:Ze(ea).max(16)}).strict().optional(),agent:E({keybind:ea.optional(),order:ia.optional()}).strict().optional(),help:oa.optional(),menu:oa.optional(),palette:oa.optional(),slash:E({aliases:Ze(ea).max(16),consumesDraft:cr().optional(),order:ia.optional(),arguments:aa.optional()}).strict().optional()}).strict()),ca=A(()=>E({id:ea.refine(e=>!e.includes(`:`)),title:ea,category:ea,description:ea.optional(),projections:sa.optional(),action:ra.optional(),availability:ta.optional()}).strict()),la=e=>ca.parse(e),ua=A(()=>E({inputSchema:$i.optional(),outputSchema:$i.optional()}).strict()),da=k().min(1).brand(),fa=A(()=>E({commandId:da,command:E({namespace:k(),id:k()}).strict(),sourceId:k(),scope:k().optional(),title:k(),category:k(),description:k().optional(),order:Lt(),availability:Ki,action:ua.optional(),keybind:k().optional()}).strict());Ze(fa);var pa=8192,ma=ea.pipe(k().max(pa)),ha=ea.pipe(k().max(60)),ga=on({protocol:/^https?$/u}),_a=E({label:ma,value:ma}).strict(),va={summary:ma.optional(),facts:Ze(_a).max(4).optional(),body:ma.optional(),bodyLabel:ma.optional(),details:Ze(_a).max(24).optional()},ya=Ke(`type`,[E({type:gt(`choice`),message:ha,...va,current:ma.optional(),collapsedGroup:ma.optional(),options:Ze(E({value:ma,label:ma,description:ma.optional(),group:ma.optional(),destructive:gt(!0).optional()}).strict()).min(1).max(256)}).strict(),E({type:gt(`text`),message:ha,...va,placeholder:ma.optional(),secret:cr().optional()}).strict(),E({type:gt(`confirmation`),message:ha,...va,confirmLabel:ma.optional(),cancelLabel:ma.optional(),destructive:gt(!0).optional()}).strict(),E({type:gt(`decision`),message:ha,...va,options:Ze(E({value:ma,label:ma,description:ma.optional(),destructive:gt(!0).optional()}).strict()).min(1).max(8).refine(e=>new Set(e.map(e=>e.value)).size===e.length,`Decision option values must be unique`),multiple:cr().optional(),other:E({label:ma,placeholder:ma.optional(),maxLength:Lt().int().min(1).max(pa),blank:ma.optional()}).strict().optional(),escape:ma.optional()}).strict().refine(e=>[e.escape,e.other?.blank].every(t=>t===void 0||e.options.some(e=>e.value===t)),`A decision's escape and blank answers must be offered options`)]),ba=A(()=>Ke(`type`,[E({type:gt(`info`),message:ma,links:Ze(E({url:ga,label:ma.optional()}).strict()).max(16).optional()}).strict(),E({type:gt(`progress`),message:ma}).strict(),E({type:gt(`handoff`),url:ga,code:ma.optional(),message:ma.optional()}).strict(),E({type:gt(`success`),message:ma}).strict()])),xa=e=>ya.parse(e),Sa=e=>ba.parse(e),Ca={decision:e=>{let t=ya.options[3].parse(e),n=new Set(t.options.map(e=>e.value));return E({selected:Ze(k()).max(t.options.length),text:it(ea.pipe(k().max(t.other?.maxLength??1)))}).strict().superRefine((e,r)=>{let i=e=>{r.addIssue({code:`custom`,message:e})};(e.selected.some(e=>!n.has(e))||new Set(e.selected).size!==e.selected.length)&&i(`Pick each offered option at most once`),t.multiple!==!0&&e.selected.length>1&&i(`Pick one option`),e.selected.length===0&&e.text===void 0&&i(`Pick an option or write an answer`),t.other===void 0&&e.text!==void 0&&i(`This decision takes no written answer`),t.multiple!==!0&&e.selected.length>0&&e.text!==void 0&&i(`Pick an option or write an answer, not both`)})},confirmation:e=>(ya.options[2].parse(e),cr()),text:e=>(ya.options[1].parse(e),k().max(pa)),choice:e=>{let t=ya.options[0].parse(e);return k().refine(e=>t.options.some(t=>t.value===e))}};function wa(e){let t=Ca[e.type](e);return e=>{let n=t.safeParse(e);return n.success?{kind:`accepted`,value:n.data}:{kind:`invalid`,cause:n.error}}}var Ta=class extends Error{code;details;constructor(e,t,n){super(t),this.code=e,this.details=n,this.name=`WhistleActionError`}},Ea=class extends Error{constructor(){super(`Whistle runtime is closed`),this.name=`WhistleClosedError`}};function Da(){let e=!1,t=oo,n=[],r=[],i=!1,a=[],o=new Set,s=()=>{for(let e of o)e()};return Object.freeze({close:()=>{e||(e=!0,n=[],a=[],r=[],t=oo,s(),o.clear())},contribute:t=>{if(Ia(t),e)throw new Ea;La(t,n),Ra(t,n);let r=Symbol(`whistle-contribution`);Fa(t)||(n=[...n,{contribution:za(t),generation:r}],i=!0,s());let a=!0;return io(o=>{if(!a||e)return;let c={...t,commands:o};Ia(c);let l=n.findIndex(e=>e.generation===r),u=n.filter(e=>e.generation!==r);La(c,u),Ra(c,u);let d=za(c);if(Fa(c)){if(l<0)return;n=u}else n=l<0?[...n,{contribution:d,generation:r}]:n.map(e=>e.generation===r?{contribution:d,generation:r}:e);i=!0,s()},()=>{a&&(a=!1,n.find(e=>e.generation===r)!==void 0&&(n=n.filter(e=>e.generation!==r),i=!0,s()))})},execute:async(t,r)=>{if(t.namespace.trim().length===0||t.id.trim().length===0)return{status:`invalid`};if(e)return{status:`closed`};let i=Pa(t,n);if(i===void 0)return{status:`missing`};let o;try{let e=co(i);if(e.status===`unavailable`)return e;let n=a.at(-1)?.presenter;r.interaction===void 0&&n!==void 0&&Oa.has(r.origin)&&(o=n({commandId:Na(t.namespace,t.id),title:i.title}));let s={...r,signal:r.signal??new AbortController().signal};o!==void 0&&(s.interaction=o.interaction,s.signal=AbortSignal.any([s.signal,o.interaction.signal]));let c=await i.handler(s);return o?.settle({status:`handled`}),c===void 0?{status:`handled`}:{status:`handled`,result:c}}catch(e){let t=uo(e instanceof Error?e:Error(`Command handler threw a non-Error value`));return o?.settle(o.interaction.signal.aborted?{status:`cancelled`}:{status:`failed`,message:t.message}),{status:`failed`,error:t}}},present:t=>{let n={presenter:t};return e||(a=[...a,n]),()=>{a=a.filter(e=>e!==n)}},snapshot:()=>{if(e)return oo;let a=n.flatMap(e=>e.contribution.commands.map(co));return(i||a.some((e,t)=>!lo(e,r[t])))&&(t=fo(n,a),r=a,i=!1),t},subscribe:t=>e?()=>void 0:(o.add(t),()=>{o.delete(t)})})}var Oa=new Set([`browser`,`keyboard`,`menu`,`palette`,`slash`,`terminal`]),ka=16,Aa=32,ja=64,Ma=256;function Na(e,t){return da.parse(`${e}:${t}`)}function Pa(e,t){for(let n of t)if(n.contribution.namespace===e.namespace){for(let t of n.contribution.commands)if(t.id===e.id)return t}}function Fa(e){return e.commands.length===0}function Ia(e){no(e.sourceId,`source ID`),no(e.namespace,`namespace`),e.scope!==void 0&&no(e.scope,`scope`);for(let t of e.commands)Za(t)}function La(e,t){t.find(t=>t.contribution.namespace===e.namespace&&t.contribution.sourceId!==e.sourceId)!==void 0&&ao(`Namespace is already owned by another source`);let n=new Set,r=new Set;for(let i of t){let t=i.contribution.scope===e.scope;for(let e of i.contribution.commands)if(n.add(Na(i.contribution.namespace,e.id)),t)for(let t of e.projections?.slash?.aliases??[])r.add(t)}for(let t of e.commands){let i=Na(e.namespace,t.id);n.has(i)&&ao(`Canonical command ID is already registered`),n.add(i);for(let e of t.projections?.slash?.aliases??[])r.has(e)&&ao(`Slash alias is already registered`),r.add(e)}}function Ra(e,t){t.length>=ja&&ao(`Live contribution capacity exceeded`),t.reduce((e,t)=>e+t.contribution.commands.length,0)+e.commands.length>Ma&&ao(`Live command capacity exceeded`)}function za(e){let t={sourceId:e.sourceId,namespace:e.namespace,commands:e.commands.map(Ba)};return e.scope===void 0?t:{...t,scope:e.scope}}function Ba(e){let t={id:e.id,title:e.title,category:e.category,handler:e.handler};return e.description!==void 0&&(t.description=e.description),e.action!==void 0&&(t.action=Va(e.action)),e.availability!==void 0&&(t.availability=e.availability),e.projections!==void 0&&(t.projections=Ga(e.projections)),t}function Va(e){let t={};return e.inputSchema!==void 0&&(t.inputSchema=Ha(e.inputSchema)),e.outputSchema!==void 0&&(t.outputSchema=Ha(e.outputSchema)),e.presentation!==void 0&&(t.presentation=Wa(e.presentation)),Object.freeze(t)}function Ha(e){return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Ua(t)])))}function Ua(e){return Array.isArray(e)?Object.freeze(e.map(Ua)):e!==null&&e instanceof Object?Object.freeze(Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Ua(t)]))):e}function Wa(e){switch(e.type){case`action`:return Object.freeze({type:`action`});case`custom`:return Object.freeze({type:`custom`,data:Ha(e.data)});case`choice`:return Object.freeze({type:`choice`,options:Object.freeze(e.options.map(e=>Object.freeze({...e,value:Ua(e.value)})))});case`form`:return Object.freeze({...e});case`confirmation`:return Object.freeze({...e})}}function Ga(e){let t={};return e.bindings!==void 0&&(t.bindings=Ka(e.bindings)),e.agent!==void 0&&(t.agent=qa(e.agent)),e.help!==void 0&&(t.help=Ja(e.help.order)),e.menu!==void 0&&(t.menu=Ja(e.menu.order)),e.palette!==void 0&&(t.palette=Ja(e.palette.order)),e.slash!==void 0&&(t.slash=Ya(e.slash)),t}function Ka(e){let t={values:[...e.values]};return e.order!==void 0&&(t.order=e.order),t}function qa(e){let t={};return e.keybind!==void 0&&(t.keybind=e.keybind),e.order!==void 0&&(t.order=e.order),t}function Ja(e){let t={};return e!==void 0&&(t.order=e),t}function Ya(e){let t={aliases:[...e.aliases]};return e.order!==void 0&&(t.order=e.order),e.consumesDraft!==void 0&&(t.consumesDraft=e.consumesDraft),e.arguments!==void 0&&(t.arguments=Xa(e.arguments)),t}function Xa(e){let t={hint:e.hint};return e.words!==void 0&&(t.words=Object.freeze(e.words.map(e=>Object.freeze({...e,arguments:Ha(e.arguments)})))),e.text!==void 0&&(t.text=Object.freeze({...e.text,arguments:Ha(e.text.arguments)})),Object.freeze(t)}function Za(e){no(e.id,`command ID`,!0),no(e.title,`title`),no(e.category,`category`),Qa(e.action),$a(e.projections)}function Qa(e){if(e?.presentation!==void 0)switch(e.presentation.type){case`action`:case`custom`:return;case`choice`:for(let t of e.presentation.options)no(t.label,`choice label`),t.description!==void 0&&no(t.description,`choice description`);return;case`form`:e.presentation.submitLabel!==void 0&&no(e.presentation.submitLabel,`submit label`);return;case`confirmation`:no(e.presentation.message,`confirmation message`),e.presentation.confirmLabel!==void 0&&no(e.presentation.confirmLabel,`confirmation label`),e.presentation.cancelLabel!==void 0&&no(e.presentation.cancelLabel,`cancellation label`)}}function $a(e){if(e!==void 0){for(let t of[e.bindings,e.palette,e.slash,e.help,e.menu,e.agent])t!==void 0&&ro(t.order);if(e.bindings!==void 0&&to(e.bindings.values,`binding`),e.slash!==void 0){to(e.slash.aliases,`slash alias`);for(let t of e.slash.aliases)/\s/u.test(t)&&ao(`slash alias must not contain whitespace`);eo(e.slash.arguments)}e.agent?.keybind!==void 0&&no(e.agent.keybind,`agent keybind`)}}function eo(e){if(e===void 0)return;no(e.hint,`argument hint`),e.words===void 0&&e.text===void 0&&ao(`slash arguments need words or text`);let t=new Set;for(let n of e.words??[])no(n.word,`argument word`),/\s/u.test(n.word)&&ao(`argument word must not contain whitespace`),t.has(n.word)&&ao(`argument word is repeated`),t.add(n.word),n.description!==void 0&&no(n.description,`argument word description`);t.size>Aa&&ao(`argument word count exceeds 32`),e.text!==void 0&&(no(e.text.field,`argument text field`),e.text.requestIdField!==void 0&&no(e.text.requestIdField,`request id field`))}function to(e,t){e.length>ka&&ao(`${t} count exceeds 16`);for(let n of e)no(n,t)}function no(e,t,n=!1){e.trim().length===0&&ao(`${t} must not be blank`),n&&e.includes(`:`)&&ao(`${t} must not contain a colon`)}function ro(e){e!==void 0&&!Number.isSafeInteger(e)&&ao(`order must be a safe integer`)}function io(e=()=>void 0,t=()=>void 0){return Object.freeze({update:e,dispose:t})}function ao(e){throw Error(e)}var oo=Object.freeze({bindings:Object.freeze([]),palette:Object.freeze([]),slash:Object.freeze([]),help:Object.freeze([]),menu:Object.freeze([]),agent:Object.freeze([])}),so=Object.freeze({status:`available`});function co(e){let t=e.availability?.()??so;return t.status===`available`?so:Object.freeze({status:`unavailable`,reason:t.reason})}function lo(e,t){return e.status===`available`?t?.status===`available`:t?.status===`unavailable`&&e.reason===t.reason}function uo(e){if(e instanceof Ta){let t={code:e.code,message:e.message};return Object.freeze(e.details===void 0?t:{...t,details:Ua(e.details)})}return Object.freeze({code:`command_failed`,message:e.message})}function fo(e,t){let n=[],r=[],i=[],a=[],o=[],s=[],c=0;for(let l of e){let e=l.contribution;for(let l of e.commands){let u=l.projections,d=t[c++]??so;if(u?.bindings!==void 0)for(let t of u.bindings.values)n.push({...yo(e,l,u.bindings.order,d),binding:t});if(u?.palette!==void 0&&r.push({...yo(e,l,u.palette.order,d)}),u?.slash!==void 0)for(let t of u.slash.aliases){let n={...yo(e,l,u.slash.order,d),alias:t};u.slash.consumesDraft!==void 0&&(n={...n,consumesDraft:u.slash.consumesDraft}),u.slash.arguments!==void 0&&(n={...n,arguments:u.slash.arguments}),i.push(n)}u?.help!==void 0&&a.push({...yo(e,l,u.help.order,d)}),u?.menu!==void 0&&o.push({...yo(e,l,u.menu.order,d)}),u?.agent!==void 0&&s.push(xo(e,l,u.agent,d))}}return go(n),_o(i),ho(r),ho(a),ho(o),ho(s),Object.freeze({bindings:vo(n),palette:vo(r),slash:vo(i),help:vo(a),menu:vo(o),agent:vo(s)})}var po=new TextEncoder;function mo(e,t){let n=po.encode(e),r=po.encode(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e]??0,i=r[e]??0;if(t!==i)return t<i?-1:1}return n.length<r.length?-1:+(n.length>r.length)}function ho(e){e.sort((e,t)=>e.order-t.order||mo(e.commandId,t.commandId))}function go(e){e.sort((e,t)=>e.order-t.order||mo(e.commandId,t.commandId)||mo(e.binding,t.binding))}function _o(e){e.sort((e,t)=>e.order-t.order||mo(e.commandId,t.commandId)||mo(e.alias,t.alias))}function vo(e){return Object.freeze(e.map(e=>Object.freeze(e)))}function yo(e,t,n,r){let i=bo(e,t,n,r);return e.scope===void 0?i:{...i,scope:e.scope}}function bo(e,t,n,r){let i={commandId:Na(e.namespace,t.id),command:Object.freeze({namespace:e.namespace,id:t.id}),sourceId:e.sourceId,title:t.title,category:t.category,order:n??0,availability:r},a=t.description===void 0?i:{...i,description:t.description};return t.action===void 0?a:{...a,action:t.action}}function xo(e,t,n,r){let i=yo(e,t,n.order,r),a=i.action===void 0?i:{...i,action:So(i.action)};return n.keybind===void 0?a:{...a,keybind:n.keybind}}function So(e){let t={};return e.inputSchema!==void 0&&(t.inputSchema=e.inputSchema),e.outputSchema!==void 0&&(t.outputSchema=e.outputSchema),Object.freeze(t)}var Co=e=>e>0?Math.floor(e):0,wo=e=>Math.max(1,Co(e)),To=e=>{let t=e[Symbol.iterator]().next();if(t.done)throw Error(`headUnsafe: empty iterable`);return t.value},Eo=`~effect/BigDecimal`,Do={[Eo]:Eo,[_t](){let e=Fo(this);return at(Pe(String(e.value)),xe(e.scale))},[Be](e){return Oo(e)&&Bo(this,e)===0},toString(){return`BigDecimal(${Ho(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[bi](){return this.toJSON()},pipe(){return Dn(this,arguments)}},Oo=e=>Bi(e,Eo),ko=(e,t)=>{if(!Number.isSafeInteger(t))throw RangeError(`Scale must be a safe integer, got ${t}`);let n=Object.create(Do);return n.value=e,n.scale=t,n},Ao=(e,t)=>{let n=ko(e,t);return n.normalized=n,n},jo=BigInt(0),Mo=BigInt(1),No=BigInt(10),Po=Ao(jo,0),Fo=e=>{if(e.normalized===void 0){if(e.value===jo)e.normalized=Po;else{let t=`${e.value}`,n=t.length;for(;t[n-1]===`0`;)n--;e.normalized=Ao(BigInt(t.slice(0,n)),e.scale-(t.length-n))}}return e.normalized},Io=100,Lo=[Mo],Ro=(e,t)=>e===t?0:e<t?-1:1,zo=(e,t)=>{let n=`${e.value<jo?-e.value:e.value}`,r=`${t.value<jo?-t.value:t.value}`,i=BigInt(n.length-r.length)-BigInt(e.scale)+BigInt(t.scale);if(i!==jo)return i<jo?-1:1;let a=Math.max(n.length,r.length);return Gt(n.padEnd(a,`0`),r.padEnd(a,`0`))},Bo=(e,t)=>{if(e.scale===t.scale)return Ro(e.value,t.value);let n=Vo(e),r=Vo(t);if(n!==r)return n<r?-1:1;if(n===0)return 0;let i=e.scale-t.scale,a=Math.abs(i);if(a>Io)return n===-1?zo(t,e):zo(e,t);let o=Lo[a]??=No**BigInt(a);return i>0?Ro(e.value,t.value*o):Ro(e.value*o,t.value)},Vo=e=>e.value===jo?0:e.value<jo?-1:1,Ho=e=>{let t=Fo(e);if(Math.abs(t.scale)>=16)return Uo(t);let n=t.value<jo,r=`${n?-t.value:t.value}`,i=t.scale>0?r.padStart(t.scale+1,`0`):r.padEnd(r.length-t.scale,`0`),a=i.length-t.scale,o=t.scale>0?`${i.slice(0,a)}.${i.slice(a)}`:i;return n?`-${o}`:o},Uo=e=>{if(Wo(e))return`0e+0`;let t=Fo(e),n=`${t.value}`,r=t.value<jo?2:1,i=n.slice(0,r),a=n.slice(r),o=a.length-t.scale;return`${i}${a===``?``:`.${a}`}e${o>=0?`+`:``}${o}`},Wo=e=>e.value===jo,Go=a,Ko=`~effect/encoding/EncodingError`,qo=class extends Go(`EncodingError`){[Ko]=Ko},Jo=Hn,Yo=ei,Xo=Nr,Zo=di,Qo=Ve,$o=Un,es=Dr,ts=$e,ns=gr,rs=Ur,is=hi,as=ir,os=oi;zr()(`effect/Cause/StackTrace`),zr()(`effect/Cause/InterruptorStackTrace`);var ss=br,cs=On,ls=ai,us=Lr,ds=wt,fs=Mi,ps=Cn,ms=xi,hs={"~effect/Deferred":{_A:Mr,_E:Mr},pipe(){return Dn(this,arguments)}},gs=function(){this.resumes=void 0,this.effect=void 0};gs.prototype=hs;var _s=()=>new gs,vs=()=>nn(()=>_s()),ys=e=>gi(t=>e.effect?t(e.effect):(e.resumes??=[],e.resumes.push(t),nn(()=>{let n=e.resumes;if(n===void 0)return;let r=n.indexOf(t);r>=0&&n.splice(r,1)}))),bs=In(2,(e,t)=>nn(()=>Cs(e,t))),xs=In(2,(e,t)=>bs(e,ai(t))),Ss=In(2,(e,t)=>bs(e,br(t))),Cs=(e,t)=>{if(e.effect)return!1;if(e.effect=t,e.resumes){let n=e.resumes;e.resumes=void 0;for(let e=0;e<n.length;e++)n[e](t)}return!0},ws=he,Ts=Nt,Es=Wt,Ds=vt,Os=h,ks=ve,As=zt,js=Rr,Ms=qn,Ns=`~effect/DateTime`,Ps=`~effect/DateTime/TimeZone`,Fs={[Ns]:Ns,pipe(){return Dn(this,arguments)},[bi](){return this.toString()},toJSON(){return rc(this).toJSON()}},Is={...Fs,_tag:`Utc`,[_t](){return xe(this.epochMilliseconds)},[Be](e){return Bs(e)&&e._tag===`Utc`&&this.epochMilliseconds===e.epochMilliseconds},toString(){return`DateTime.Utc(${rc(this).toJSON()})`}};({...Fs});var Ls={[Ps]:Ps,[bi](){return this.toString()}},Rs={...Ls,_tag:`Named`,[_t](){return Pe(`Named:${this.id}`)},[Be](e){return Vs(e)&&e._tag===`Named`&&this.id===e.id},toString(){return`TimeZone.Named(${this.id})`},toJSON(){return{_id:`TimeZone`,_tag:`Named`,id:this.id}}},zs={...Ls,_tag:`Offset`,[_t](){return Pe(`Offset:${this.offset}`)},[Be](e){return Vs(e)&&e._tag===`Offset`&&this.offset===e.offset},toString(){return`TimeZone.Offset(${ic(this.offset)})`},toJSON(){return{_id:`TimeZone`,_tag:`Offset`,offset:this.offset}}},Bs=e=>Bi(e,Ns),Vs=e=>Bi(e,Ps),Hs=e=>e._tag===`Utc`,Us=e=>{let t=Object.create(Is);return t.epochMilliseconds=e,Object.defineProperty(t,"partsUtc",{value:void 0,enumerable:!1,writable:!0}),t},Ws=e=>{let t=e.getTime();if(Number.isNaN(t))throw new os(`Invalid date`);return Us(t)},Gs=e=>{if(Bs(e))return e;if(e instanceof Date)return Ws(e);if(typeof e==`object`){if(`epochMilliseconds`in e)return Ws(new Date(e.epochMilliseconds));let t=new Date(0);return ac(t,e),Ws(t)}return typeof e==`string`&&!Ks(e)?Ws(new Date(e+`Z`)):Ws(new Date(e))},Ks=e=>/Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(e),qs=ue(Gs),Js=e=>Us(e.epochMilliseconds),Ys=new Map,Xs={day:`numeric`,month:`numeric`,year:`numeric`,hour:`numeric`,minute:`numeric`,second:`numeric`,timeZoneName:`longOffset`,fractionalSecondDigits:3,hourCycle:`h23`},Zs=e=>{let t=e.resolvedOptions().timeZone,n=Ys.get(t);if(n!==void 0)return n;let r=Object.create(Rs);return r.id=t,r.format=e,Ys.set(t,r),r},Qs=e=>{let t=Ys.get(e);if(t!==void 0)return t;try{let t=Zs(new Intl.DateTimeFormat(`en-US`,{...Xs,timeZone:e}));return Ys.set(e,t),t}catch{throw new os(`Invalid time zone: ${e}`)}},$s=e=>{let t=Object.create(zs);return t.offset=e,t},ec=ue(Qs),tc=/^(?:GMT|[+-])/,nc=e=>{if(tc.test(e)){let t=sc(e);return t===null?yt():g($s(t))}return ec(e)},rc=e=>new Date(e.epochMilliseconds),ic=e=>{let t=Math.abs(e),n=Math.floor(t/36e5),r=Math.round(t%36e5/6e4);return r===60&&(n+=1,r=0),`${e<0?`-`:`+`}${String(n).padStart(2,`0`)}:${String(r).padStart(2,`0`)}`},ac=(e,t)=>{if((t.year!==void 0||t.month!==void 0||t.day!==void 0)&&e.setUTCFullYear(t.year??e.getUTCFullYear(),t.month===void 0?e.getUTCMonth():t.month-1,t.day??e.getUTCDate()),t.weekDay!==void 0){let n=t.weekDay-e.getUTCDay();e.setUTCDate(e.getUTCDate()+n)}t.hour!==void 0&&e.setUTCHours(t.hour),t.minute!==void 0&&e.setUTCMinutes(t.minute),t.second!==void 0&&e.setUTCSeconds(t.second),t.millisecond!==void 0&&e.setUTCMilliseconds(t.millisecond)},oc=/([+-])(\d{2}):(\d{2})$/,sc=e=>{let t=oc.exec(e);if(t===null)return null;let[,n,r,i]=t;return(n===`+`?1:-1)*(Number(r)*60+Number(i))*60*1e3},cc=e=>rc(e).toISOString();globalThis.String;var lc=e=>e.toLowerCase(),uc=e=>e.trim(),dc=e=>e.length>0,fc=In(2,(e,t)=>Mn(e,gc,e=>t(e))),pc=e=>e.reasons.some(mc),mc=e=>e._tag===`Fail`&&is(e.error),hc=e=>{let t,n=!1;for(let r of e.reasons)mc(r)?t??=r.error:r._tag!==`Interrupt`&&(n=!0);return t===void 0?Tn(e):n?Tn(Yo(e.reasons.filter(e=>!mc(e)))):tt(t)},gc=e=>{let t=hc(e);return x(t)?t:tt(t.success.value)},_c=e=>{let t=hc(e);return x(t)?cs(t.failure):ss(t.success.value)},vc=yn(`effect/Metric/CurrentMetricAttributes`,{defaultValue:()=>({})}),yc=yn(`effect/Metric/MetricRegistry`,{defaultValue:()=>new Map}),bc=`~effect/Metric`,xc=class{[bc]=bc;#e;#t=``;id;description;attributes;constructor(e,t,n){this.id=e,this.description=t,this.attributes=n}valueUnsafe(e){return this.hook(e).get(e)}modifyUnsafe(e,t){return this.hook(t).modify(e,t)}updateUnsafe(e,t){return this.hook(t).update(e,t)}hook(e){let t=Cr(e,vc);t!==this.#e&&(this.#e=t,this.#t=Oc(this,N(this.attributes,t)));let n=Cr(e,yc),r=n.get(this.#t);return Yt(r)&&(r={id:this.id,type:this.type,description:this.description,attributes:Object.keys(t).length>0?N(this.attributes,t):this.attributes,hooks:this.createHooks()},n.set(this.#t,r)),r.hooks}pipe(){return Dn(this,arguments)}},Sc=BigInt(0),Cc=class extends xc{type=`Counter`;#e;#t;constructor(e,t){super(e,t?.description,Ac(t?.attributes)),this.#e=t?.bigint??!1,this.#t=t?.incremental??!1}createHooks(){let e=this.#e?Sc:0,t=this.#t?this.#e?e=>e>=Sc:e=>e>=0:e=>!0;return kc(()=>({count:e,incremental:this.#t}),n=>{t(n)&&(e+=n)})}},wc=class extends xc{type;metric;valueUnsafe;updateUnsafe;modifyUnsafe;constructor(e,t,n,r){super(e.id,e.description,e.attributes),this.metric=e,this.valueUnsafe=t,this.updateUnsafe=n,this.modifyUnsafe=r,this.type=e.type}createHooks(){return this.metric.createHooks()}},Tc=(e,t)=>new Cc(e,t),Ec=In(2,(e,t)=>$n(n=>nn(()=>e.updateUnsafe(t,n)))),Dc=In(2,(e,t)=>{let n=jc(t);return new wc(e,t=>e.valueUnsafe(n(t)),(t,r)=>e.updateUnsafe(t,n(r)),(t,r)=>e.modifyUnsafe(t,n(r)))});function Oc(e,t){let n=Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:+(e[0]>t[0]));return JSON.stringify([e.type,e.id,e.description,n])}function kc(e,t,n){return{get:e,update:t,modify:n??t}}function N(e,t){return{...Ac(e),...Ac(t)}}function Ac(e){return Ut(e)&&Array.isArray(e)?e.reduce((e,[t,n])=>(Ti(e,t,n),e),{}):e}function jc(e){let t,n={};return r=>{let i=Cr(r,vc);return i!==t&&(t=i,n=N(i,e)),ci(r,vc,n)}}var Mc=Bs,Nc=Hs,Pc=Gs,Fc=qs,Ic=Js;zr()(`effect/DateTime/CurrentTimeZone`);var Lc=cc,Rc=e=>Bc(typeof e==`string`?Vc.encode(e):e),zc=e=>{let t=Hc(e),n=t.length;if(n%4!=0)return Tn(new qo({kind:`Decode`,module:`Base64`,input:t,message:`Length must be a multiple of 4, but is ${n}`}));let r=t.indexOf(`=`);if(r!==-1&&(r<n-2||r===n-2&&t[n-1]!==`=`))return Tn(new qo({kind:`Decode`,module:`Base64`,input:t,message:`Found a '=' character, but it is not at the end`}));try{let e=t.endsWith(`==`)?2:+!!t.endsWith(`=`),r=new Uint8Array(n/4*3-e);for(let e=0,i=0;e<n;e+=4,i+=3){let n=Gc(t.charCodeAt(e))<<18|Gc(t.charCodeAt(e+1))<<12|Gc(t.charCodeAt(e+2))<<6|Gc(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return tt(r)}catch(e){return Tn(new qo({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},Bc=e=>{let t=e.length,n=``,r;for(r=2;r<t;r+=3)n+=Uc[e[r-2]>>2],n+=Uc[(e[r-2]&3)<<4|e[r-1]>>4],n+=Uc[(e[r-1]&15)<<2|e[r]>>6],n+=Uc[e[r]&63];return r===t+1&&(n+=Uc[e[r-2]>>2],n+=Uc[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=Uc[e[r-2]>>2],n+=Uc[(e[r-2]&3)<<4|e[r-1]>>4],n+=Uc[(e[r-1]&15)<<2],n+=`=`),n},Vc=new TextEncoder,Hc=e=>e.replace(/[\n\r]/g,``),Uc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Wc=new Uint8Array(123).fill(255);for(let e=0;e<64;e++)Wc[Uc.charCodeAt(e)]=e;Wc[61]=0;var Gc=e=>{if(e>=Wc.length||Wc[e]===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return Wc[e]};Go(`CookiesError`),{...dn},{...dn};var Kc=new WeakMap,qc=`~effect/Redacted`,Jc=e=>Bi(e,qc),Yc=(e,t)=>{let n=Object.create(Xc);return t?.label&&(n.label=t.label),Kc.set(n,e),n},Xc={[qc]:{_A:e=>e},label:void 0,...pt,toJSON(){return this.toString()},toString(){return`<redacted${tn(this.label)?`:`+this.label:``}>`},[_t](){return ce(Kc.get(this))},[Be](e){return Jc(e)&&hr(Kc.get(this),Kc.get(e))}};({...pt});function Zc(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}function Qc(e){return t=>Zc(t)?.[e]}var $c=`~structural`,el=`~identifier`,tl=`~sentinels`,nl=`~constructor`,rl=[`title`,`description`,`default`,`examples`,`readOnly`,`writeOnly`,`format`,`contentEncoding`,`contentMediaType`,`contentSchema`],il=Qc(`identifier`),al=Qc(el),ol=Qc(`title`),sl=Qc(`description`),cl=$r(e=>{let t=Zc(e)?.identifier;return typeof t==`string`?t:e.getExpected(cl)}),ll=new Set([tl,$c,`representation`,`arbitraryConstraint`,`toJsonSchema`,`toCode`,`toEquivalence`,`toFormatter`,`toCodec`,`toCodecJson`,`toCodecStringTree`,`toCodecIso`,`toCodecArbitrary`]),ul=Symbol(),dl=ss,fl=dl(ul),pl=dl(ul),ml=e=>e===ul?yt():g(e),hl=e=>e._tag===`None`?fl:dl(e.value),gl=`~effect/SchemaIssue/Issue`;function _l(e){return Bi(e,gl)&&e[gl]===gl}function vl(e){return Object.hasOwn(e,`input`)}var yl=class{[gl]=gl;constructor(e,t){t?.reportInput===!0&&e!==ul&&(this.input=e)}},bl=class extends yl{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},xl=class extends yl{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},Sl=class extends yl{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},Cl=class extends yl{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},wl=class extends yl{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Tl=class extends yl{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},El=class extends yl{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},Dl=class extends yl{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},Ol=class extends yl{_tag=`Forbidden`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},kl=class extends yl{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},Al=class extends yl{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function jl(e,t,n){if(_l(e))return e;if(typeof e==`string`)return new Dl({message:e},t,n);let r=typeof e.issue==`string`?new Dl({message:e.issue},t,n):e.issue;return new Sl(e.path,r)}function Ml(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new Dl(void 0,t,n):jl(e,t,n)}function Nl(e,t,n,r){return Array.isArray(t)?kr(t)?t.length===1?jl(t[0],n,r):new Tl(e,Yn(t,e=>jl(e,n,r)),n,r):void 0:Ml(t,n,r)}var Pl=e=>{let t=Gl(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return zl(cl(e.ast),e);case`InvalidValue`:{let t=Rl(e);if(t!==void 0)return zl(t,e);let n=Ll(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=Ll(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=Ll(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},Fl=e=>Gl(e.issue)??Gl(e);function Il(e){return t=>({issues:Bl(t,[],e?.leafHook??Pl,e?.checkHook??Fl)})}function Ll(e){return vl(e)?Fi(e.input):void 0}function Rl(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function zl(e,t){let n=Ll(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function Bl(e,t,n,r){switch(e._tag){case`Filter`:{let i=r(e);if(i!==void 0)return[{path:t,message:i}];if(e.issue._tag!==`InvalidValue`)return Bl(e.issue,t,n,r);let a=Rl(e.issue);return[{path:t,message:a===void 0?zl(Vl(e.filter),e):zl(a,e.issue)}]}case`Encoding`:return Bl(e.issue,t,n,r);case`Pointer`:return Bl(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>Bl(e,t,n,r));case`AnyOf`:return e.issues.length===0?[{path:t,message:Gl(e)??zl(cl(e.ast),e)}]:e.issues.flatMap(e=>Bl(e,t,n,r));default:return[{path:t,message:n(e)}]}}function Vl(e){let t=e.annotations?.expected;if(typeof t==`string`)return t;switch(e._tag){case`Filter`:return`<filter>`;case`FilterGroup`:return e.checks.map(e=>Vl(e)).join(` & `)}}function Hl(){return e=>Wl(e,``)}var Ul=Hl();function Wl(e,t){let n;switch(e._tag){case`Filter`:{let r=Fl(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return Wl(e.issue,t);let r=Rl(e.issue);n=r===void 0?zl(Vl(e.filter),e):zl(r,e.issue)}break}case`Encoding`:return Wl(e.issue,t);case`Pointer`:return Wl(e.issue,t+ji(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>Wl(e,t)).join(`
3
3
  `);n=Gl(e)??zl(cl(e.ast),e);break;default:n=Pl(e)}return t?`${n}\n at ${t}`:n}function Gl(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return Gl(e.issue);let t=(e._tag===`Filter`?e.filter.annotations:`annotations`in e?e.annotations:e.ast.annotations)?.[e._tag===`MissingKey`?`messageMissingKey`:e._tag===`UnexpectedKey`?`messageUnexpectedKey`:`message`];if(typeof t==`string`)return t}function Kl(e){let t;for(let n of e.reasons){if(!Jo(n)||!_l(n.error))return;t??=n.error}return t}function ql(e,t){let n=Kl(e);if(n===void 0)throw Error(t,{cause:e});return n}var Jl=e=>Object.assign(Object.create(ii),e);function Yl(e){return ru((t,n)=>bn(e(t,n)))}function Xl(e){return Yl((t,n)=>{let r={message:e(t)};return ct(t)?new Ol(r,t.value,n):new Ol(r)})}var Zl=Xl(()=>`Encoding is not supported`),Ql=Jl({_tag:`Passthrough`});function $l(){return Ql}function eu(e){return Jl({_tag:`Transform`,transform:e})}function tu(e){return Jl({_tag:`TransformEffect`,transform:e})}function nu(e){return Jl({_tag:`TransformOptional`,transform:e})}function ru(e){return Jl({_tag:`TransformOptionalEffect`,transform:e})}function iu(){return nu(()=>yt())}function au(e){return ru(t=>{let n=vr(t,Ut);return ct(n)?O(n):ki(e,g)})}function ou(){return eu(globalThis.String)}function su(){return eu(globalThis.Number)}function cu(){return eu(uc)}function lu(e){return tu((t,n)=>fi({try:()=>JSON.parse(t,e?.reviver),catch:()=>new Dl({expected:`a valid JSON string`},t,n)}))}function uu(e){return tu((t,n)=>fi({try:()=>{let n=JSON.stringify(t,e?.replacer,e?.space);if(n===void 0)throw TypeError(`Value cannot be represented as JSON`);return n},catch:()=>new Dl({expected:`a JSON-serializable value`},t,n)}))}function du(){return eu(Rc)}function fu(){return tu((e,t)=>ae(Ri(zc(e)),()=>new Dl({expected:`a valid Base64 string`},e,t)))}var pu=class extends Ir{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new pu(this.encode,this.decode)}},mu=`~effect/SchemaTransformation/Transformation`,hu=class extends Ir{[mu]=mu;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new hu(this.encode,this.decode)}};function gu(e){return Bi(e,mu)&&e[mu]===mu}var _u=e=>gu(e)?e:new hu(e.decode,e.encode);function vu(e){return new hu(tu(e.decode),tu(e.encode))}function yu(){return new hu(cu(),$l())}var bu=new hu($l(),$l());function xu(){return bu}var Su=new hu(su(),ou()),Cu=new hu(fu(),du());function wu(e){return new hu(lu(e??{}),uu(e))}function Tu(e){return t=>t._tag===e}var Eu=Tu(`Declaration`),Du=Tu(`Null`),Ou=Tu(`Undefined`),ku=Tu(`Never`),Au=Tu(`String`),ju=Tu(`Number`),Mu=Tu(`Boolean`),Nu=Tu(`Literal`),Pu=Tu(`UniqueSymbol`),Fu=Tu(`Arrays`),Iu=Tu(`Objects`),Lu=Tu(`Union`),Ru=Tu(`Suspend`),zu=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},Bu={},Vu=class{isOptional;isMutable;constructorDefault;annotations;constructor(e,t,n=void 0,r=void 0){this.isOptional=e,this.isMutable=t,this.constructorDefault=n,this.annotations=r}},Hu=`~effect/Schema`,Uu=class{[Hu]=Hu;annotations;checks;encoding;context;constructor(e=void 0,t=void 0,n=void 0,r=void 0){this.annotations=e,this.checks=t,this.encoding=n,this.context=r}toString(){return`<${this._tag}>`}},Wu=class extends Uu{_tag=`Declaration`;typeParameters;run;encodingChecks;encodingRun;constructor(e,t,n,r,i,a,o,s){super(n,r,i,a),this.typeParameters=e,this.run=t,this.encodingChecks=o,this.encodingRun=s}getParser(){let e;return(t,n)=>t===ul?fl:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(e,t,n,r,i){let a=gf(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new Wu(a,r,this.annotations,t,void 0,this.context,n,i)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks,this.run,this.encodingRun)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks,this.encodingRun??this.run,this.run)}getExpected(){let e=this.annotations?.expected;return typeof e==`string`?e:`<Declaration>`}},Gu=new class extends Uu{_tag=`Null`;getParser(){return If(this,null)}getExpected(){return`null`}},Ku=class extends Uu{_tag=`Undefined`;getParser(){return If(this,void 0)}toCodecJson(){return rf(this,[qu])}getExpected(){return`undefined`}},qu=new zu(Gu,new hu(eu(()=>void 0),eu(()=>null))),Ju=new Ku,Yu=new class extends Uu{_tag=`Never`;getParser(){return Lf(this,D)}getExpected(){return`never`}},Xu=new class extends Uu{_tag=`Unknown`;getParser(){return Lf(this,sn)}getExpected(){return`unknown`}},Zu=class extends Uu{_tag=`Literal`;literal;constructor(e,t,n,r,i){if(super(t,n,r,i),typeof e==`number`&&!globalThis.Number.isFinite(e))throw Error(`A numeric literal must be finite, got ${Fi(e)}`);this.literal=e}getParser(){return If(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?Qu(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:Qu(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function Qu(e){let t=globalThis.String(e.literal);return rf(e,[new zu(new Zu(t),new hu(eu(()=>e.literal),eu(()=>t)))])}var $u=new class extends Uu{_tag=`String`;getParser(){return Lf(this,tn)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&qf(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},ed=class extends Uu{_tag=`Number`;getParser(){return Lf(this,me)}matchKey(e,t){return this._match(Hf,e,t)}matchPart(e,t){return this._match(Vf,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:qf(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(td(this.checks,`effect/schema/isFinite`)||td(this.checks,`effect/schema/isInt`))?this:rf(this,[Qd])}toCodecStringTree(){return this.toCodecJson()===this?rf(this,[Gf]):rf(this,[Kf])}getExpected(){return`number`}};function td(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&td(e.checks,t))}var nd=new ed,rd=new class extends Uu{_tag=`Boolean`;getParser(){return Lf(this,m)}getExpected(){return`boolean`}},id=class extends Uu{_tag=`Arrays`;isMutable;elements;rest;encodingChecks;constructor(e,t,n,r,i,a,o,s){super(r,i,a,o),this.isMutable=e,this.elements=t,this.rest=n,this.encodingChecks=s;let c=!1;for(let e=0;e<t.length;e++)if(Ef(t[e]))c=!0;else if(c)throw Error(`A required element cannot follow an optional element. ts(1257)`);if(c&&n.length>1)throw Error(`A required element cannot follow an optional element. ts(1257)`);for(let e=1;e<n.length;e++)if(Ef(n[e]))throw Error(`An optional element cannot follow a rest element. ts(1266)`)}getParser(e,t=e){let n=this,r,i,a=n.elements.length,o=Math.max(0,n.rest.length-1);function s(e,t){return t<a?r[t]:t>=e?i[t-e+1]:i[0]}let c=e=>{let{input:t,len:r,options:i}=e;if(n.rest.length===0&&r>a)for(let o=a;o<r;o++){let r=new wl(n,t[o],i),a=new Sl([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return bn(new Tl(n,[a],t,i))}return e.issues?bn(new Tl(n,e.issues,t,i)):dl(e.output)},l=(e,t)=>{let r=e.length,i={ast:n,getParser:s,input:e,len:r,tailThreshold:Math.max(a,r-o),output:new globalThis.Array(r),issues:void 0,options:t},u=n.rest.length===0?a:Math.max(r,a+o),d=t.concurrency===void 0?1:Vi(t.concurrency),f=d===1?sd(i,e,0,u):cd(i,e,{concurrency:d,end:u});if(!f)return c(i);if(fn(f))return wr(f,()=>c(i));let p=!0;return rn(()=>p?(p=!1,j(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===ul)return fl;try{return Array.isArray(e)?(r||(r=n.elements.map(e=>({ast:e,parser:t(e)})),i=n.rest.map(e=>({ast:e,parser:t(e)}))),l(e,a)):bn(new El(n,e,a))}catch(e){return Fr(e)}}}_rebuild(e,t,n){let r=gf(this.elements,e),i=gf(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new id(this.isMutable,r,i,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}getExpected(){return`array`}};function ad(e,t,n,r){if(n._tag===`Failure`)return ld(e,e.ast,r,n);let i=n===pl?t:n[Ln];if(i!==ul)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(Ef(t.ast))return;let n=new Sl([r],new Cl(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return ls(new Tl(e.ast,[n],e.input,e.options))}}var od={onItem(e,t,n){let r=n<e.len?t:ul;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:ad},sd=ot()(od),cd=qe()(od),ld=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Kl(r.cause);if(i===void 0)return cs($o(r.cause,r=>new Tl(t,[new Sl([n],r)],e.input,e.options)));let a=new Sl([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return ls(new Tl(t,[a],e.input,e.options))},ud=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function dd(e,t,n=Bu){let r,i;function a(t){switch(t._tag){case`String`:case`TemplateLiteral`:return(r??=Object.keys(e)).filter(e=>t.matchPart(e,n)!==void 0);case`Number`:return(r??=Object.keys(e)).filter(e=>t.matchKey(e,n)!==void 0);case`Symbol`:return(i??=Object.getOwnPropertySymbols(e)).filter(r=>Object.prototype.propertyIsEnumerable.call(e,r)&&t.matchKey(r,n)!==void 0);case`Union`:return[...new Set(t.types.flatMap(a))];default:return[]}}return a(Rf(Mf(t)))}var fd=class{name;type;constructor(e,t){this.name=e,this.type=t}};function pd(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(pd);default:return!1}}function md(e){let t=of(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(md);default:return!1}}function hd(e){return pd(e)&&md(e)}var gd=class{parameter;type;constructor(e,t){if(!hd(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,Ef(t)&&!Ff(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},_d=class extends Uu{_tag=`Objects`;propertySignatures;indexSignatures;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.propertySignatures=e,this.indexSignatures=t,this.encodingChecks=o}getParser(e,t=e){let n=this,r=n.propertySignatures.length,i=n.indexSignatures.length;if(!r&&!i)return Lf(n,Mt);let a,o,s=()=>(a||(a=n.propertySignatures.map(e=>({parser:t(e.type),name:e.name,type:e.type})),o=i?n.indexSignatures.map(n=>({is:n,parserKey:e(Rf(n.parameter)),parserValue:t(n.type)})):void 0),a),c=()=>{let e=new Set(n.propertySignatures.map(e=>typeof e.name==`number`?globalThis.String(e.name):e.name)),t=(t,i,a,o,s)=>{if(s._tag===`Failure`)return ld(t,n,i,s)??ds;let c=s===pl?o:s[Ln];if(a!==ul&&c!==ul){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return ds;Ti(t.out,a,c)}return ds},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!fn(t))return j(sr(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return ld(e,n,r,a)??ds;let o=a===pl?r:a[Ln],s=e.input[r],l=i.parserValue(s,e.options);return fn(l)?t(e,r,o,s,l):j(sr(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return fn(a)?t(e,n,n,i,a):j(sr(a),r=>t(e,n,n,i,r))},u=i?qe()({onItem:(e,[t,n])=>n.is.parameter===$u?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return Gn(function*(t,d){if(t===ul)return ul;if(!(typeof t==`object`&&t&&!Array.isArray(t)))return yield*bn(new El(n,t,d));s();let f=t,p={},m={ast:n,input:f,out:p,issues:void 0,options:d},h=d.errors===`all`,g=d.onExcessProperty===`error`,_=d.concurrency===void 0?1:Vi(d.concurrency),v=i&&g?n.indexSignatures.map(e=>dd(f,e.parameter,d)):void 0;if(g){let r=v?new Set(e):e;if(v)for(let e of v)for(let t of e)r.add(t);let i=Reflect.ownKeys(f);for(let e=0;e<i.length;e++){let a=i[e];if(!r.has(a)&&Object.prototype.propertyIsEnumerable.call(f,a)){let e=new wl(n,f[a],d),r=new Sl([a],e);if(h){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*bn(new Tl(n,[r],t,d))}}}if(r){let e=_===1?bd(m,a):xd(m,a,{concurrency:_});e&&(yield*e)}if(i&&_===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===$u?l:c,r=v?.[e]??(t.is.parameter===$u?Object.keys(f):dd(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!fn(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Pn();for(let t=0;t<i;t++){let n=o[t],r=v?.[t]??(n.is.parameter===$u?Object.keys(f):dd(f,n.is.parameter,d));for(let t=0;t<r.length;t++)e.push([r[t],n])}let t=u(m,e,{concurrency:_});t&&(yield*t)}return m.issues?yield*bn(new Tl(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return j(sr(n),n=>{let i=vd(e,r,n);if(i)return i;let o=()=>dl(e.out),s=bd(e,a.slice(t+1));return s?wr(s,o):o()})};return(e,t)=>{if(e===ul)return fl;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&Vi(t.concurrency)!==1)return(l??=c())(e,t);if(!(typeof e==`object`&&e&&!Array.isArray(e)))return bn(new El(n,e,t));let r=s(),i=e,a={},o={ast:n,input:i,out:a,issues:void 0,options:t};try{for(let e=0;e<r.length;e++){let n=r[e],s=n.name,c=Pd(i,s),l=c?i[s]:ul,d=n.parser(l,t);if(!fn(d))return u(o,e,d);if(d===pl){c&&Ti(a,s,l);continue}let f=vd(o,n,d);if(f)return f}}catch(e){return Fr(e)}return dl(a)}}_rebuild(e,t,n,r){let i=gf(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new fd(t.name,n)}),a=gf(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new gd(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new _d(i,a,this.annotations,n,void 0,this.context,r)}flip(e){return this._rebuild(e,e,this.encodingChecks,this.checks)}recur(e,t=e){return this._rebuild(e,t,this.checks,this.encodingChecks)}getExpected(){return this.propertySignatures.length===0&&this.indexSignatures.length===0?`object | array`:`object`}};function vd(e,t,n){if(n._tag===`Failure`)return ld(e,e.ast,t.name,n);if(n===pl)return;let r=n[Ln];if(r!==ul){Ti(e.out,t.name,r);return}if(delete e.out[t.name],!Ef(t.type)){let n=new Sl([t.name],new Cl(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return ls(new Tl(e.ast,[n],e.input,e.options))}}var yd={onItem(e,t){if(!Pd(e.input,t.name))return t.parser(ul,e.options);let n=e.input[t.name];return Ti(e.out,t.name,n),t.parser(n,e.options)},step:vd},bd=ot()(yd),xd=qe()(yd);function Sd(e,t){return e?t?[...e,...t]:e:t}function Cd(e,t,n){return new _d(Reflect.ownKeys(e).map(t=>new fd(t,e[t].ast)),[],n,t)}function wd(e){return e.ast}function Td(e,t=void 0){return new id(!1,e.map(e=>e.ast),[],void 0,t)}function Ed(e,t,n){return new Id(e.map(wd),t,void 0,n)}function Dd(e){if(e.encoding)throw Error(`mutable does not support encodings`);return new id(!0,e.elements,e.rest,e.annotations,e.checks,void 0,e.context,e.encodingChecks)}var Od=rr(e=>{for(;;){if(Ru(e))return Xu;let t=e.encoding;if(!t)return e.recur?.(Od,Mr)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==Mr))return Xu;e=t[t.length-1].to}});function kd(e){switch(e._tag){case`Null`:return[`null`];case`Undefined`:return[`undefined`];case`String`:case`TemplateLiteral`:return[`string`];case`Number`:return[`number`];case`Boolean`:return[`boolean`];case`Symbol`:case`UniqueSymbol`:return[`symbol`];case`BigInt`:return[`bigint`];case`Arrays`:return[`array`];case`ObjectKeyword`:return[`object`,`array`,`function`];case`Objects`:return e.propertySignatures.length||e.indexSignatures.length?[`object`]:[`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`];case`Enum`:return Array.from(new Set(e.enums.map(([,e])=>typeof e)));case`Literal`:return[typeof e.literal];case`Union`:return Array.from(new Set(e.types.flatMap(kd)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function Ad(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[tl];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!Ef(t)){if(Nu(t))return[{key:e.name,literal:t.literal}];if(Pu(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!Ef(e)){if(Nu(e))return[{key:t,literal:e.literal}];if(Pu(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>Ad(Od(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return Ad(e.thunk())}}var jd=new WeakMap,Md=Object.freeze([]),Nd=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,Pd=(e,t)=>t===`__proto__`?Object.hasOwn(e,t):t in e;function Fd(e){let t=jd.get(e);if(t)return t;let n,r=0,i,a,o=!0,s=[];for(let t=0;t<e.length;t++){let c=e[t],l=Od(c);if(ku(l))continue;if(Nu(l)||Pu(l)){a??=new Map;let e=Nu(l)?l.literal:l.symbol;s[t]=e;let n=a.get(e);n||a.set(e,n=[]),n.push(t)}else o=!1;let u=Ad(l);if(u.length){n??=new Map,r++;for(let{key:e,literal:r}of u){let i=n.get(e);i||n.set(e,i=[new Map,new Set]),i[1].add(t);let a=i[0].get(r);a||i[0].set(r,a=new Set),a.add(t)}}else{i??={};let e=kd(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??Md);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??Md;else if(n?.size===1&&!i){let[r,[i]]=n.entries().next().value,a=new Map;for(let[e,t]of i)a.set(e,Object.freeze(Array.from(t)));let o=Object.freeze(e.map((e,t)=>t));t=(e,t)=>{if(Yr(e)){let n=Pd(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??Md;if(t)return o}return Md}}else if(n){let e;for(let t of n)(!e||t[1][0].size>e[1][0].size)&&t[1][1].size===r&&(e=t);t=(t,r)=>{let a=Nd(t);if(!Yr(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=Pd(t,n),u=c?t[n]:void 0;if(c&&(!r||u!==void 0)){let e=i.get(u);if(!e)return l(a);for(let t of e)o.add(t);s=n}}if(s===void 0)for(let[e,[i,a]]of n){let n=Pd(t,e),s=n?t[e]:void 0;if(n&&(!r||s!==void 0)){let e=i.get(s);if(e)for(let t of e)o.add(t)}else if(r)for(let e of a)o.add(e)}for(let[e,[i,a]]of n){if(e===s)continue;let n=Pd(t,e),c=n?t[e]:void 0;if(n&&(!r||c!==void 0)){let e=i.get(c);for(let t of o)a.has(t)&&!e?.has(t)&&o.delete(t)}}return Array.from(o).sort((e,t)=>e-t)}}else t=e=>{let t=l(Nd(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return jd.set(e,t),t}var Id=class extends Uu{_tag=`Union`;types;options;encodingChecks;constructor(e,t,n,r,i,a,o){super(n,r,i,a),this.types=e,this.options=t,this.encodingChecks=o}getParser(e,t){let n=this,r=t!==void 0,i=[],a=t=>i[t]??=e(n.types[t]),o;return(e,t)=>{if(e===ul)return fl;let i=(o??=Fd(n.types))(e,r);if(i.length===0)return bn(new kl(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:fn(r)?Ld(n,r.cause,e,t):Rd(n,r,e,t)}return zd(n,a,i,e,t)}}_rebuild(e,t,n){let r=gf(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new Id(r,this.options,this.annotations,t,void 0,this.context,n)}recur(e){return this._rebuild(e,this.checks,this.encodingChecks)}flip(e){return this._rebuild(e,this.encodingChecks,this.checks)}matchPart(e,t){for(let n of this.types){let r=n.matchPart(e,t);if(r!==void 0)return r}}getExpected(e){let t=this.annotations?.expected;if(typeof t==`string`)return t;if(this.types.length===0)return`never`;let n=this.types.map(t=>{let n=Mf(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(Nu);if(t.length>0)return`${Ud(n.isMutable)}[ ${t.map(t=>e(t)+Wd(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>Nu(e.type));if(t.length>0)return`{ ${t.map(t=>`${Ud(t.type.context?.isMutable)}${Ct(t.name)}${Wd(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function Ld(e,t,n,r){let i=Kl(t);return i?ls(new kl(e,[i],n,r)):cs(t)}function Rd(e,t,r,i){return n(t,t=>Ld(e,t,r,i))}function zd(e,t,n,r,i){let a={ast:e,parser:t,input:r,out:void 0,successes:e.options?.mode===`oneOf`?[]:void 0,issues:void 0,options:i},o=Vd(a,n);if(!o)return a.out?a.out:bn(new kl(e,a.issues??[],r,i));if(fn(o))return Bd(o,a);let s=!0;return rn(()=>s?(s=!1,Bd(o,a)):zd(e,t,n,r,i))}function Bd(e,t){return wr(e,e=>t.out===pl?O(t.input):t.out?t.out:bn(new kl(t.ast,t.issues??[],t.input,t.options)))}var Vd=ot()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Kl(n.cause);if(t===void 0)return n;e.issues?e.issues.push(t):e.issues=[t]}else{if(e.out&&e.successes)return e.successes.push(e.ast.types[t]),ls(new Al(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return ds}}}),Hd=new Id([new Zu(`Infinity`),new Zu(`-Infinity`),new Zu(`NaN`)]);function Ud(e){return e?``:`readonly `}function Wd(e){return e?`?`:``}var Gd=class extends Uu{_tag=`Suspend`;thunk;constructor(e,t,n,r,i){if(n)throw Error(`Cannot add checks to Suspend`);super(t,void 0,r,i);let a;this.thunk=()=>a??=e()}getParser(e){let t;return(n,r)=>(t??=e(this.thunk()))(n,r)}recur(e){return new Gd(()=>e(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},Kd=class extends Ir{_tag=`Filter`;run;annotations;aborted;constructor(e,t=void 0,n=!1){super(),this.run=e,this.annotations=t,this.aborted=n}annotate(e){return new Kd(this.run,{...this.annotations,...e},this.aborted)}abort(){return new Kd(this.run,this.annotations,!0)}and(e,t){return new qd([this,e],t)}},qd=class extends Ir{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new qd(this.checks,{...this.annotations,...e})}and(e,t){return new qd([this,e],t)}};function Jd(e,t,n=!1){return new Kd((t,n,r)=>Nl(n,e(t,n,r),t,r),t,n)}function Yd(e,t){return new Kd((t,n,r)=>e(t)?void 0:new Dl(void 0,t,r),t,!0)}function Xd(e){return Jd(e=>globalThis.Number.isFinite(e),{expected:`a finite number`,representation:{id:`effect/schema/isFinite`,payload:null},toJsonSchema:()=>({type:`number`}),toCode:()=>({runtime:`Schema.isFinite()`}),arbitraryConstraint:{number:`finite`},...e})}var Zd=lf(nd,[Xd()]),Qd=new zu(new Id([Zd,Hd]),new hu(su(),eu(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function $d(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return Jd(e=>(n.lastIndex=0,n.test(e)),{expected:`a string matching the RegExp ${r.source}`,representation:{id:`effect/schema/isPattern`,payload:r},toJsonSchema:()=>[{},!0],arbitraryConstraint:{patterns:[r]},...t})}var ef=new WeakMap;function tf(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&ef.set(n,nf(e)),n}function nf(e){let t=ef.get(e);if(t!==void 0)return t;if(e.encoding===void 0)return e;let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,{encoding:void 0});return ef.set(e,n),n}function rf(e,t){return e.encoding===t?e:tf(e,{encoding:t})}function af(e,t){if(e.context===t)return e;let n=nf(e);return n.context===t&&n.encoding===e.encoding?n:tf(e,{context:t})}function of(e){return e.encoding?of(e.encoding[e.encoding.length-1].to):e}function sf(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return cf(e,_i(e.checks.slice(0,-1),n.annotate(t)))}return tf(e,{annotations:{...e.annotations,...t}})}function cf(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:tf(e,{checks:t})}function lf(e,t){return cf(e,Sd(e.checks,t))}function uf(e,t){let n=t(e.to);return n===e.to?e:new zu(n,e.transformation)}function df(e,t){let n=e,r=n[n.length-1],i=uf(r,t);return i===r?e:_i(e.slice(0,e.length-1),i)}function ff(e){return t=>t.encoding?rf(t,df(t.encoding,e)):t}function pf(e,t){return ff(e=>af(e,t))(e)}function mf(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:rf(r,df(r.encoding,n))}return e(r)}return rr(n)}function hf(e,t,n){let r=new zu(e,t);return rf(n,n.encoding?[...n.encoding,r]:[r])}function gf(e,t){let n;for(let r=0;r<e.length;r++){let i=e[r],a=t(i);if(n)n[r]=a;else if(a!==i){n=Array(e.length);for(let t=0;t<r;t++)n[t]=e[t];n[r]=a}}return n??e}function _f(e,t){return af(e,e.context?new Vu(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new Vu(!1,!1,void 0,t))}var vf=rr(e=>yf(af(e,e.context?e.context.isOptional===!1?new Vu(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new Vu(!0,!1)))),yf=ff(vf),bf=$r(e=>vf(new Id([e,Ju]))),xf=rr(e=>Sf(af(e,e.context?e.context.isMutable===!1?new Vu(e.context.isOptional,!0,e.context.constructorDefault,e.context.annotations):e.context:new Vu(!1,!0)))),Sf=ff(xf);function Cf(e,t,n){return hf(e,n,t)}function wf(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:Te(e.literal)&&!t.includes(e.literal)&&t.push(e.literal);return;case`UniqueSymbol`:t.includes(e.symbol)||t.push(e.symbol);return;case`Never`:return;case`Union`:for(let t=0;t<e.types.length;t++)r(e.types[t]);return;default:n.push(e)}}return r(e),{literals:t,parameters:n}}function Tf(e,t){let{literals:n,parameters:r}=wf(e);return new _d(n.map(e=>new fd(e,t)),r.map(e=>new gd(e,t)))}function Ef(e){return e.context?.isOptional??!1}function Df(e){return e.context?.isMutable??!1}function Of(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(Of)}function kf(e){function t(e){return Of(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return Gr(n)?n:void 0}function Af(e){let t=!0;function n(e){return t=t&&!e.encoding&&!Ru(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var jf=rr(e=>{let t=nf(e);if(t!==e){let n=jf(t);return n===t&&e.encoding===void 0?e:af(n,e.context)}let n=`recur`in e?e.recur(jf):e;if(`encodingChecks`in n&&n.encodingChecks){let t=Af(e)?n.encodingChecks:Fu(n)||Iu(n)||Eu(n)&&n.typeParameters.length>0?kf(n.encodingChecks):void 0;return tf(n,{encodingChecks:void 0,checks:Sd(n.checks,t)})}return n}),Mf=rr(e=>jf(Pf(e)));function Nf(e,t){let n=t,r=n.length,i=n[r-1],a=[new zu(Pf(rf(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new zu(Pf(n[e-1].to),n[e].transformation.flip()));let o=Pf(i.to);return o.encoding?rf(o,[...o.encoding,...a]):rf(o,a)}var Pf=$r(e=>{if(e.encoding)return Nf(e,e.encoding);let t=nf(e);if(t!==e){let n=Pf(t);return n===t?e:af(n,e.context)}return`flip`in e?e.flip(Pf):`recur`in e?e.recur(Pf):e});function Ff(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(Ff);default:return!1}}function If(e,t){let n=t===0?pl:dl(t);return(r,i)=>r===ul?fl:r===t?n:bn(new El(e,r,i))}function Lf(e,t){return(n,r)=>n===ul?fl:t(n)?pl:bn(new El(e,n,r))}var Rf=mf(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Rf)}}),zf=mf(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(zf)}}),Bf=`[\\s\\S]*?`,Vf=new globalThis.RegExp(`^${ud}$`),Hf=new globalThis.RegExp(`^(?:${ud}|Infinity|-Infinity|NaN)$`);function Uf(e){return $d(Vf,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Vf.source}),...e})}var Wf=lf($u,[Uf()]),Gf=new zu(Wf,Su),Kf=new zu(new Id([Wf,Hd]),Su);function qf(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=qf(o.checks,t,n,r,i),n&&(i.errors!==`all`||n[n.length-1].filter.aborted))return n}else{let e=o.run(t,r,i);if(e){let r=new bl(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function Jf(e){if(!Eu(e))return;let t=e.annotations?.[nl];return Rt(t)?t(e.typeParameters):void 0}var Yf=Zc,Xf=ol,Zf=sl;function Qf(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function $f(e){return e===void 0||typeof e==`string`}function ep(e,t){let n=new WeakMap,r=[];outer:for(;;){if(typeof e!=`object`||!e){if(!t(e))return!1}else{let t=e,i=n.get(t);if(i===!1)return!1;if(i===void 0){let e=Array.isArray(t);if(!e){let e=Object.getPrototypeOf(t);if(e!==null&&e!==Object.prototype&&Object.getPrototypeOf(e)!==null)return!1}n.set(t,!1),r.push({value:t,keys:e?t.length:Object.keys(t),index:0})}}for(;r.length>0;){let t=r[r.length-1],i=t.keys;if(typeof i==`number`){if(t.index<i){e=t.value[t.index++];continue outer}}else if(t.index<i.length){e=t.value[i[t.index++]];continue outer}n.set(t.value,!0),r.pop()}return!0}}function tp(e){return ep(e,Qf)}var np=new Wu([],()=>(e,t,n)=>tp(e)?pl:bn(new El(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>op}),rp=new zu(np,xu()),ip=new zu(new Id([new id(!1,[],[np]),new _d([],[new gd($u,np)])]),xu());function ap(e){return ep(e,$f)}var op=new zu(new Wu([],()=>(e,t,n)=>ap(e)?pl:bn(new El(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),xu()),sp=(e,t,n)=>e===pl?n(t):wr(e,n);function cp(e){if(e._tag===`Middleware`)return(t,n,r)=>lp(t===pl?e.decode(dl(ml(n)),r):e.decode(ki(t,ml),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>e===pl?dl(t):e;case`Transform`:{let e=e=>e===ul?fl:dl(t.transform(e));return(t,n)=>sp(t,n,e)}case`TransformOptional`:{let e=e=>hl(t.transform(ml(e)));return(t,n)=>sp(t,n,e)}case`TransformEffect`:return(e,n,r)=>sp(e,n,e=>e===ul?fl:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>sp(e,n,e=>lp(t.transform(ml(e),r)))}}var lp=e=>wr(e,hl),up=(e,t,r,i)=>n(i,n=>li(()=>$o(n,n=>new xl(e,n,t,r))));function dp(e,t){let n=cp(e.link.transformation),r;return(i,a)=>{if(i===ul)return fl;if(e.isConstructed(i))return pl;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function fp(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==ul&&r!==void 0)return t(r,i);let a=n;if(fn(a)&&a._tag===`Success`){let e=t(a[Ln],i);return e===pl?a:e}return wr(up(e,r,i,a),e=>{let n=t(e,i);return n===pl?dl(e):n})}}function pp(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:fp(e,n)}function mp(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?Jf(e):void 0,o=a?dp(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>cp(e.transformation)),u=e.encodingChecks;if(!c&&!s&&!u)return o;let d,f=(t,n)=>{let r=o(t,n);if(u&&!n.disableChecks){if(fn(r)){if(r._tag===`Success`){let i=r===pl?t:r[Ln];if(t!==ul&&i!==ul){let i=qf(u,t,void 0,e,n);i&&(r=bn(new Tl(e,i,t,n)))}}}else r=j(r,r=>{if(t!==ul&&r!==ul){let r=qf(u,t,void 0,e,n);if(r)return bn(new Tl(e,r,t,n))}return O(r)})}if(s&&!n.disableChecks){if(fn(r)){if(r._tag===`Success`){let i=r===pl?t:r[Ln];if(i===ul)return r;let a=qf(s,i,void 0,e,n);a&&(r=bn(new Tl(e,a,i,n)))}}else r=j(r,t=>{if(t!==ul){let r=qf(s,t,void 0,e,n);if(r)return bn(new Tl(e,r,t,n))}return O(t)})}return r},p=i===void 0?f:i(f);return c?(n,r)=>{let i=d??=c.map(e=>t(e.to)),a=n,o=i[i.length-1](n,r);for(let e=c.length-1;e>=0;e--)if(o=l[e](o,a,r),e!==0){let t=i[e-1];o._tag===`Success`?(a=o[Ln],o=t(a,r)):o=wr(o,e=>{let n=t(e,r);return n===pl?dl(e):n})}if(o._tag===`Success`){let e=o[Ln],t=p(e,r);return t===pl?o:t}return o=up(e,n,r,o),wr(o,e=>{let t=p(e,r);return t===pl?dl(e):t})}:p}var hp=Symbol(),gp=new WeakMap,_p=e=>xp(e).parser,vp=e=>xp(e).makeEffect,yp=e=>pp(e,vp),bp=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=mp(this.ast,_p)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=mp(this.ast,vp,yp)}};function xp(e){let t=gp.get(e);if(t!==void 0)return t;let n=new bp(e);return gp.set(e,n),n}function Sp(e){let t=e.ast,n;return(e,r)=>(n??=Ip(Up,jf(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function Cp(e){let t=Sp(e);return(e,n)=>{let r=_e(t(e,n));return fs(r)?g(r.value):(ql(r.cause,`Option adapter can only return none for schema issues`),yt())}}function wp(e){return Vp(jf(e.ast))}function Tp(e){return Dp(e.ast)}function Ep(e){{let t=Lp(Pp(e));return e=>{let n=t(e,Bu);return fs(n)?!0:(ql(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function Dp(e){let t=jf(e),n=e=>(n=Ep(t),n(e));return e=>n(e)}function Op(e,t){let n=Pp(e.ast);return t===void 0?n:(e,r)=>n(e,Mp(t,r))}function kp(e,t){return Rp(Op(e,t))}function Ap(e,t){return zp(Op(e,t))}function jp(e,t){let n=Pp(Pf(e.ast));return t===void 0?n:(e,r)=>n(e,Mp(t,r))}var Mp=(e,t)=>t?{...e,...t}:e,Np=e=>e===ul?bn(new Dl):O(e);function Pp(e){return Ip(Hp,e)}function Fp(e,t){return e===pl?O(t):fn(e)?e[Ln]===ul?Np(ul):e:wr(e,Np)}function Ip(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??Bu);return a===pl?O(r):fn(a)?a[Ln]===ul?Np(ul):a:wr(a,Np)}}function Lp(e){return(t,n)=>_e(e(t,n))}function Rp(e){let t=Lp(e);return(e,n)=>{let r=t(e,n);return fs(r)?g(r.value):(ql(r.cause,`Option adapter can only return none for schema issues`),yt())}}function zp(e){let t=Lp(e);return(e,n)=>{let r=t(e,n);return fs(r)?tt(r.value):Tn(ql(r.cause,`Result adapter can only return schema issues`))}}function Bp(e,t){let n=_e(e);if(fs(n))return n.value;let r=ql(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}function Vp(e){let t,n;return(r,i)=>{t??=xp(e);let a=i?.disableChecks?i.parseOptions?{...i.parseOptions,disableChecks:!0}:{disableChecks:!0}:i?.parseOptions??Bu,o=t.make;if(o!==void 0&&r!==ul){let e;try{e=o(r,a)}catch(e){throw ql(Zo(e),`Constructor adapter can only throw schema issues`),e}if(e!==hp&&e!==ul)return e}return Bp(Fp((n??=t.makeEffect)(r,a),r),`Constructor adapter can only throw schema issues`)}}var Hp=e=>xp(e).parser,Up=e=>xp(e).makeEffect,Wp=`~effect/Schema/Schema`,Gp=Symbol(),Kp={[Wp]:Wp,get make(){let e=wp(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=Sp(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=Cp(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return Dn(this,arguments)},annotate(e){return this.rebuild(sf(this.ast,e))},annotateKey(e){return this.rebuild(_f(this.ast,e))},check(...e){return this.rebuild(lf(this.ast,e))},rebuild(e){return qp(e,this[Gp])}};function qp(e,t){function n(){}let r=Object.setPrototypeOf(n,Kp);return t&&(Object.hasOwn(t,`name`)||Object.hasOwn(t,`length`)||Object.hasOwn(t,`__proto__`))?Object.defineProperties(r,Object.getOwnPropertyDescriptors({...t})):Object.assign(r,t),r[Gp]=t,r.ast=e,r}function Jp(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Yp(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Xp(e){return encodeURI(Jp(e)).replace(/#/g,`%23`)}function Zp(e){if(e.length===0||e===`#`)return``;if(!e.startsWith(`#`))return;let t=e.slice(1);try{if(encodeURI(t).replace(/%25/g,`%`).replace(/#/g,`%23`)!==t)return;let e=decodeURIComponent(t);return e.startsWith(`/`)&&!/~(?:[^01]|$)/.test(e)?e:void 0}catch{return}}function Qp(e){let t=Zp(e);return t===void 0?void 0:t.length===0?[]:t.slice(1).split(`/`).map(Yp)}function $p(e){return e.reduce((e,t)=>`${e}/${Xp(t)}`,`#`)}var em=`http://json-schema.org/draft-07/schema#`;function tm(e,t){return e===t||e===(t.endsWith(`#`)?t.slice(0,-1):`${t}#`)}function nm(e){return{dialect:`draft-07`,...mm(e,Em)}}function rm(e,t){return n(e,!1,!0);function n(e,r,i=!1){if(!ke(e))return e;let a=r||!i&&pm(e.$id),o={};for(let t of Object.keys(e)){let r=e[t],i=r;switch(t){case`$defs`:case`properties`:case`patternProperties`:case`dependentSchemas`:i=om(r,e=>n(e,a))??r;break;case`allOf`:case`anyOf`:case`oneOf`:case`prefixItems`:i=Array.isArray(r)?r.map(e=>n(e,a)):r;break;case`not`:case`additionalProperties`:case`propertyNames`:case`unevaluatedProperties`:case`items`:case`contains`:case`unevaluatedItems`:case`if`:case`then`:case`else`:case`contentSchema`:i=n(r,a)}Ti(o,t,i)}return t(o,a),o}}function im(e,t){return rm(e,e=>{am(e,t)})}function am(e,t){typeof e.$ref==`string`&&Ti(e,`$ref`,t(e.$ref,`$ref`)),typeof e.$dynamicRef==`string`&&Ti(e,`$dynamicRef`,t(e.$dynamicRef,`$dynamicRef`))}function om(e,t){if(!ke(e))return;let n={};for(let r of Object.keys(e))Ti(n,r,t(e[r],r));return n}function sm(e,t,n){let r=new Map,i=[],a=cm;function o(e,n=[],r=[]){return n.length===0&&t?.trackIds&&(a=um(ke(e)?u(e):void 0,cm)??cm),l(e,n,r,{sourceRoot:[],targetRoot:[],uri:a})}function s(){for(let[e,t,n]of i){let i=t,a=lm(t,n);if(a!==void 0){let e=Qp(a.hash);if(a.hash=``,e!==void 0){let n=r.get(fm(a.href,e));n!==void 0&&(i=dm(t,n))}}Ti(e,`$ref`,i)}}let c=n(o);return s(),c;function l(n,r,a,o){if(typeof n==`boolean`)return d(r,a,o),t?.booleanAdapter?.(n)??n;if(!ke(n))return n;let s=o,c=u(n);if(r.length>0&&t?.trackIds&&pm(c)){let e=um(c,o.uri);e!==void 0&&(s={parent:o,sourceRoot:r,targetRoot:a,uri:e})}d(r,a,s);let f=s.uri;return e(n,{isDocumentRoot:r.length===0,schema(e,t,n=t){return l(e,[...r,t],[...a,n],s)},schemaAt(e,t,n){return l(e,[...r,...t],[...a,...n],s)},schemaArray(e,t,n=t){return Array.isArray(e)?e.map((e,i)=>l(e,[...r,t,String(i)],[...a,n,String(i)],s)):e},schemaMap(e,t,n=t){return ke(e)?om(e,(e,i)=>l(e,[...r,t,i],[...a,n,i],s)):e},reference(e,t){typeof t==`string`?i.push([e,t,f]):Ti(e,`$ref`,t)}})}function u(e){return t?.ignoreRefSiblings===!0&&typeof e.$ref==`string`?void 0:e.$id}function d(e,t,n){n.parent!==void 0&&d(e,t,n.parent),r.set(fm(n.uri,e.slice(n.sourceRoot.length)),t.slice(n.targetRoot.length))}}var cm=`https://effect.invalid/.json-schema/`;function lm(e,t){return URL.canParse(e,t)?new URL(e,t):void 0}function um(e,t){if(typeof e!=`string`)return;let n=lm(e,t);if(n!==void 0)return n.hash=``,n.href}function dm(e,t){let n=e.indexOf(`#`);return n===-1&&t.length===0?e:`${n===-1?e:e.slice(0,n)}${$p(t)}`}function fm(e,t){return`${e}\u0000${JSON.stringify(t)}`}function pm(e){return typeof e==`string`&&e.length>0&&e[0]!==`#`}function mm(e,t,n){return sm(t,{...n,trackIds:!0},t=>({schema:t(e.schema),definitions:om(e.definitions,(e,n)=>t(e,[`$defs`,n],[`definitions`,n]))}))}var hm=new Set([`properties`,`patternProperties`]),gm=new Set([`allOf`,`anyOf`,`oneOf`]),_m=new Set([`not`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`contentSchema`]);function vm(e,t,n,r,i,a=hm){let o;if(a.has(t))o=r.schemaMap(n,t);else if(gm.has(t))o=r.schemaArray(n,t);else if(i.has(t))o=r.schema(n,t);else return!1;return Ti(e,t,o),!0}var ym=[`$anchor`,`$defs`,`$dynamicAnchor`,`$dynamicRef`,`$vocabulary`,`contentSchema`,`dependentRequired`,`dependentSchemas`,`maxContains`,`minContains`,`prefixItems`,`unevaluatedItems`,`unevaluatedProperties`];[...ym],[...ym];var bm=/^[A-Za-z_][-A-Za-z0-9._]*$/,xm=/^[A-Za-z][-A-Za-z0-9._:]*$/;function Sm(e,t,n){throw Error(`Cannot convert JSON Schema keyword "${e}" to ${t}: ${n}`)}function Cm(e,t,n,r){for(let i of t)Object.hasOwn(e,i)&&Sm(i,n,`it is not active in ${r} but would become active in the target`)}var wm=[`additionalItems`,`definitions`,`dependencies`];function Tm(e,t,n,r,i){n.isDocumentRoot?Ti(e,`$schema`,tm(t,`https://json-schema.org/draft/2020-12/schema`)?r:t):tm(t,`https://json-schema.org/draft/2020-12/schema`)||Sm(`$schema`,i,`an embedded resource cannot declare a different dialect`)}function Em(e,t){Cm(e,wm,`Draft-07`,`Draft 2020-12`);let n={},r,i,a;for(let o of Object.keys(e)){let s=e[o];if(!vm(n,o,s,t,_m))switch(o){case`$ref`:r=s;break;case`$schema`:Tm(n,s,t,em,`Draft-07`);break;case`$id`:case`$anchor`:break;case`$defs`:Ti(n,`definitions`,t.schemaMap(s,o,`definitions`));break;case`prefixItems`:i=s;break;case`items`:a=s;break;case`dependentRequired`:case`dependentSchemas`:case`minContains`:case`maxContains`:break;case`$dynamicRef`:case`$dynamicAnchor`:case`$vocabulary`:case`unevaluatedProperties`:case`unevaluatedItems`:Sm(o,`Draft-07`,`the target dialect has no equivalent`);case`required`:if(Array.isArray(s)&&s.length===0)break;Ti(n,o,s);break;default:Ti(n,o,s)}}if(Dm(n,i,a,t),Object.hasOwn(e,`contains`)){let t=e.minContains,r=e.maxContains;(t!==void 0&&t!==1||r!==void 0)&&Sm(`minContains/maxContains`,`Draft-07`,`contains cardinality cannot be represented`),Object.hasOwn(e,`minContains`)&&Ti(n,`minContains`,t)}else Object.hasOwn(e,`minContains`)&&Ti(n,`minContains`,e.minContains),Object.hasOwn(e,`maxContains`)&&Ti(n,`maxContains`,e.maxContains);return km(e,n,t,`draft-07`),jm(e,n,`$id`,`Draft-07`),Om(n,r,t),n}function Dm(e,t,n,r){if(t===void 0){n!==void 0&&Ti(e,`items`,r.schema(n,`items`));return}Ti(e,`items`,r.schemaArray(t,`prefixItems`,`items`)),n!==void 0&&Ti(e,`additionalItems`,r.schema(n,`items`,`additionalItems`))}function Om(e,t,n){if(t!==void 0){if(typeof t==`string`&&Object.keys(e).length>0){let r={};n.reference(r,t),Am(e,r)}else n.reference(e,t)}}function km(e,t,n,r){let i=ke(e.dependentRequired)?e.dependentRequired:void 0,a=ke(e.dependentSchemas)?e.dependentSchemas:void 0;if(i===void 0&&a===void 0)return;let o={},s=new Set([...Object.keys(i??{}),...Object.keys(a??{})]);for(let e of s){let t=i?.[e],s=a?.[e],c=r===`draft-04`&&Array.isArray(t)&&t.length===0;s===void 0?c||Ti(o,e,t):t===void 0||c?Ti(o,e,n.schemaAt(s,[`dependentSchemas`,e],[`dependencies`,e])):Ti(o,e,{allOf:[n.schemaAt(s,[`dependentSchemas`,e],[`dependencies`,e,`allOf`,`0`]),{required:t}]})}Object.keys(o).length>0&&Ti(t,`dependencies`,o)}function Am(e,t){Array.isArray(e.allOf)?e.allOf.push(t):Ti(e,`allOf`,[t])}function jm(e,t,n,r){let i=e.$id,a=e.$anchor;if(a===void 0){i!==void 0&&Ti(t,n,i);return}(typeof a!=`string`||!bm.test(a))&&Sm(`$anchor`,r,`the anchor is not valid`),xm.test(a)||Sm(`$anchor`,r,`the anchor cannot be represented as a plain-name fragment identifier`),i===void 0?Ti(t,n,`#${a}`):Sm(`$anchor`,r,`it cannot be combined with the schema $id`)}function Mm(e){return qp(Nm(e.ast),{schema:e})}var Nm=mf(e=>{let t=Rm(e,Nm),n=e.context;return t===e||n===void 0?t:pf(t,Pm(n))});function Pm(e){return e.constructorDefault===void 0?e:new Vu(e.isOptional,e.isMutable,void 0,e.annotations)}function Fm(e){if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e})}function Im(e){return t=>{let n=[...t].sort((t,n)=>e(Mf(t))-e(Mf(n)));return n.some((e,n)=>e!==t[n])?n:t}}var Lm=Im(e=>{switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function Rm(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(!Rt(n))return rf(e,[rp]);let r=n(e.typeParameters.map(e=>qp(Mf(e))));return r===void 0?e:rf(e,[uf(r,t)])}case`Unknown`:return rf(e,[rp]);case`ObjectKeyword`:return rf(e,[ip]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return Fm(e),e.recur(t,zf);case`Union`:{let n=Lm(e.types);return n===e.types?e.recur(t):new Id(n,e.options,e.annotations,e.checks,e.encoding,e.context,e.encodingChecks).recur(t)}case`Arrays`:case`Suspend`:return e.recur(t)}return e}globalThis.RegExp;var zm=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,`\\$&`);function Bm(e,t){return t.length>0&&(e+=`\n at ${ji(t)}`),Error(e)}function Vm(e){return`#/$defs/${Xp(e)}`}var Hm=new Set([...ll,el,...rl]);function Um(e,t){if(e===void 0)return;let n={},r=e.title;typeof r==`string`&&(n.title=r);let i=e.description,a=e.expected;typeof i==`string`?n.description=i:t?.generateDescriptions===!0&&typeof a==`string`&&(n.description=a);let o=e.default;tp(o)&&(n.default=o);let s=e.examples;Array.isArray(s)&&tp(s)&&(n.examples=s);let c=e.readOnly;typeof c==`boolean`&&(n.readOnly=c);let l=e.writeOnly;typeof l==`boolean`&&(n.writeOnly=l);let u=e.format;typeof u==`string`&&(n.format=u);let d=e.contentEncoding;typeof d==`string`&&(n.contentEncoding=d);let f=e.contentMediaType;typeof f==`string`&&(n.contentMediaType=f);let p=e.contentSchema;if(tp(p)&&(n.contentSchema=p),t?.includeAnnotationKey!==void 0)for(let[r,i]of Object.entries(e))Hm.has(r)||!t.includeAnnotationKey(r)||tp(i)&&Ti(n,r,i);return Object.keys(n).length===0?void 0:n}function Wm(e){let t=e.type===`number`||e.type===`integer`?e.type:void 0,n=e;if(t!==void 0&&(n={...e},delete n.type),Array.isArray(n.allOf)){let e=[],r=!1;for(let i of n.allOf){let n=Wm(i);n.type!==void 0&&(r=!0,(t===void 0||n.type===`integer`)&&(t=n.type)),Object.keys(n.schema).length>0&&e.push(n.schema)}if(r){let{allOf:t,...r}=n;n=e.length===0?r:{...r,allOf:e}}}return{type:t,schema:n}}function Gm(e){if(!Array.isArray(e.anyOf)||e.anyOf.length!==2||e.anyOf[0]?.type!==`number`)return!1;let t=e.anyOf[1];return t?.type===`string`&&Array.isArray(t.enum)&&t.enum.length===3&&t.enum.includes(`NaN`)&&t.enum.includes(`Infinity`)&&t.enum.includes(`-Infinity`)}var Km=`|type|format|pattern|multipleOf|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minProperties|maxProperties|propertyNames|`;function qm(e,t){return Object.keys(e).every(e=>t.includes(`|${e}|`))}function Jm(e,t){return typeof e.$ref!=`string`&&t.every(t=>!Object.hasOwn(e,t))}var Ym=`|title|description|default|examples|readOnly|writeOnly|`,Xm=Km+Ym;function Zm(e,t,n){if(Object.keys(e).length===0)return t;let r=Object.keys(t);if(r.length===0)return e;let i=e.type===`number`||e.type===`integer`?e.type:void 0,a=Gm(e);if(i!==void 0||a){let r=Wm(t);if(r.type!==void 0){let t=i===`integer`||r.type===`integer`?`integer`:`number`,o={...e,type:t};a&&delete o.anyOf;let s=Object.keys(r.schema);return s.length===0?o:qm(r.schema,Ym)&&Jm(o,s)?{...o,...r.schema}:Zm(o,r.schema,n)}}if(n&&Jm(e,r))return{...e,...t};let o=Array.isArray(t.allOf)&&r.length===1?t.allOf:[t];return Array.isArray(e.allOf)?{...e,allOf:[...e.allOf,...o]}:typeof e.$ref==`string`?{allOf:[e,...o]}:{...e,allOf:o}}function Qm(e,t=new Set){return typeof e==`boolean`?e:t.has(e)?!0:(t.add(e),e.every(e=>Qm(e,t)))}function $m(e){return Array.isArray(e)}function eh(e,t,n,r){let i=new Map,a=new Map,o=new WeakMap,s=new Map,c=new Map,l=Object.keys(n);for(let e of l)m(e,[`references`,e]);let u=Yn(e,(e,n)=>v(e,t[n],[]));for(let[e,t]of s.values())if(!Qm(e))for(let e of t)Array.isArray(e.oneOf)&&(e.anyOf=e.oneOf,delete e.oneOf);for(let e of l){let t=n[e],r=g(t);if(r===void 0)continue;let o=i.get(e)[0],s=c.get(r),l=s?.find(e=>hr(i.get(e)[0],o));l===void 0?s===void 0?c.set(r,[e]):s.push(e):a.set(e,l)}let d=Yn(u,h),f={};for(let e of l)a.has(e)||Ti(f,e,h(i.get(e)[0]));return{dialect:`draft-2020-12`,schemas:d,definitions:f};function p(e){return Array.isArray(e.oneOf)&&s.get(e.oneOf)?.[1].push(e),e}function m(e,t){if(!Object.hasOwn(n,e))throw Bm(`Invalid reference ${e}`,[...t,`$ref`]);let r=i.get(e);if(r!==void 0)return r;let a=[{},[]];return i.set(e,a),a[0]=v(n[e],[`references`,e],a[1]),a}function h(e){return im(e,e=>{let t=Zp(e);if(t===void 0){if(/^#(?:\/|%2f)/i.test(e))throw Error(`Invalid JSON Pointer URI fragment ${JSON.stringify(e)}`);return e}if(!t.startsWith(`/$defs/`))return e;let n=t.indexOf(`/`,7),r=a.get(Yp(t.slice(7,n<0?void 0:n)));return r===void 0?e:e.replace(/^#(?:\/|%2f).*?(?:\/|%2f).*?(?=\/|%2f|$)/i,Vm(r))})}function g(e){if(e._tag===`Reference`)return;let t=e.checks.length===0?e.annotations:e.checks[e.checks.length-1].annotations;return typeof t?.identifier!=`string`&&typeof t?.[`~identifier`]==`string`?t[el]:void 0}function _(e,t,n,i){let a=e.annotations,o=a?.toJsonSchema;if(o!==void 0){let s=o({type:t,schemas:e.representation?.schemas?.map((e,t)=>v(e,[...n,`representation`,`schemas`,t],i))??[]}),c=$m(s);c&&i.push(!1);let l=c?s[0]:s,u=Um(a,r),d=u===void 0?l:{...l,...u},f=u===void 0?Km:Xm;return[d,e._tag===`Filter`&&qm(d,f)&&(u===void 0||qm(u,Ym))?!0:void 0]}if(e._tag===`Filter`){i.push(!1);return}let s=e.checks.flatMap((e,r)=>{let a=_(e,t,[...n,`checks`,r],i);return a===void 0?[]:[a[0]]});if(s.length===0)return;let c=Um(a,r),l={allOf:s};return[c===void 0?l:{...l,...c}]}function v(e,t,n){if(e._tag===`Reference`)return n.push(m(e.$ref,t)[1]),{$ref:Vm(e.$ref)};let i=o.get(e);if(i!==void 0)return n.push(i[1]),i[0];let a=[];n.push(a);let s=y(e,t,a),c=Um(e.annotations,r);c!==void 0&&(s={...s,...c});for(let n=0;n<e.checks.length;n++){let r=typeof s.type==`string`&&th(s.type)?s.type:void 0,i=_(e.checks[n],r,[...t,`checks`,n],a);i!==void 0&&(s=Zm(s,...i))}return o.set(e,[s,a]),p(s)}function y(e,t,n){switch(e._tag){case`Any`:case`Unknown`:return{};case`ObjectKeyword`:return{anyOf:[{type:`object`},{type:`array`}]};case`Void`:case`Undefined`:case`Null`:return{type:`null`};case`BigInt`:return{type:`string`,allOf:[{pattern:`^-?\\d+$`}]};case`Symbol`:return{type:`string`,allOf:[{pattern:`^Symbol\\(([\\s\\S]*)\\)$`}]};case`UniqueSymbol`:return globalThis.Symbol.keyFor(e.symbol)===void 0?{not:{}}:{type:`string`,enum:[globalThis.String(e.symbol)]};case`Declaration`:return n.push(!1),{};case`Suspend`:return v(e.thunk,[...t,`thunk`],n);case`Never`:return{not:{}};case`String`:return{type:`string`};case`Number`:return{anyOf:[{type:`number`},{type:`string`,enum:[`NaN`,`Infinity`,`-Infinity`]}]};case`Boolean`:return{type:`boolean`};case`Literal`:{let t=e.literal;return typeof t==`bigint`?{type:`string`,enum:[globalThis.String(t)]}:{type:typeof t,enum:[t]}}case`Enum`:{let n=e.enums.map(([e,n],r)=>{if(typeof n==`number`&&!globalThis.Number.isFinite(n))throw Bm(`Invalid numeric enum value ${globalThis.String(n)}`,[...t,`enums`,r,1]);return{type:typeof n,enum:[n],title:e}});return n.length===0?{not:{}}:{anyOf:n}}case`TemplateLiteral`:return{type:`string`,pattern:`^${e.parts.map(rh).join(``)}$`};case`Arrays`:{if(e.rest.length>1)throw Bm(`Invalid schema representation document`,[...t,`rest`]);let i={type:`array`},a=e.elements.length,o=e.elements.map((e,i)=>{e.isOptional&&a--;let o=v(e.type,[...t,`elements`,i,`type`],n),s=Um(e.annotations,r);return s===void 0?o:p(Zm(o,s))});if(o.length>0?(i.prefixItems=o,i.maxItems=e.elements.length,a>0&&(i.minItems=a)):i.items=!1,e.rest.length===1){delete i.maxItems;let r=v(e.rest[0],[...t,`rest`,0],n);Object.keys(r).length>0?i.items=r:delete i.items}return i}case`Objects`:{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return{not:{type:`null`}};let i={type:`object`},a={},o=[];for(let i=0;i<e.propertySignatures.length;i++){let s=e.propertySignatures[i];if(typeof s.name!=`string`)throw Bm(`Invalid schema representation document`,[...t,`propertySignatures`,i,`name`]);let c=s.name,l=v(s.type,[...t,`propertySignatures`,i,`type`],n),u=Um(s.annotations,r);Ti(a,c,u===void 0?l:p(Zm(l,u))),s.isOptional||o.push(c)}e.propertySignatures.length>0&&(i.properties=a),o.length>0&&(i.required=o);let s={},c=[],l=[],u=!1;for(let r=0;r<e.indexSignatures.length;r++){let i=e.indexSignatures[r],a=v(i.type,[...t,`indexSignatures`,r,`type`],n);hr(a,{not:{}})&&(a=!1),l.push(a);let o=b(i.parameter,[...t,`indexSignatures`,r,`parameter`],new Set);if(o===void 0){u=!0,n.push(!1);continue}if(o.length===0)c.push(a);else for(let e of o){let t=s[e];Ti(s,e,t===void 0?a:t===!1||a===!1?!1:p(Zm(t,a)))}}let d=Object.keys(s).length>0;if(d&&(i.patternProperties=s),u&&r?.onExcessProperty===`error`){let r=[];e.propertySignatures.length>0&&r.push({enum:Object.keys(a)});for(let i=0;i<e.indexSignatures.length;i++)r.push(v(e.indexSignatures[i].parameter,[...t,`indexSignatures`,i,`parameter`],n));i.propertyNames=r.length===1?r[0]:{anyOf:r},i.additionalProperties=l.length===1?l[0]:{anyOf:l},c.length>0&&(i.allOf=c.map(e=>({type:`object`,additionalProperties:e})))}else c.length===0?i.additionalProperties=u||r?.onExcessProperty!==`error`:c.length===1&&e.propertySignatures.length===0&&!d?i.additionalProperties=c[0]:c.length>0&&(i.allOf=c.map(e=>({type:`object`,additionalProperties:e})));return typeof i.additionalProperties==`object`&&i.additionalProperties!==null&&Object.keys(i.additionalProperties).length===0&&delete i.additionalProperties,i}case`Union`:{let r=[],i=e.types.map((e,n)=>v(e,[...t,`types`,n],r));if(n.push(r),i.length===0)return{not:{}};let a=e.options?.mode??`anyOf`;if(a===`anyOf`&&i.length>1){let e=nh(i);if(e!==void 0)return e}return a===`oneOf`&&s.set(i,[r,[]]),{[a]:i}}}}function b(e,t,r){switch(e._tag){case`Reference`:{if(!Object.hasOwn(n,e.$ref))throw Bm(`Invalid reference ${e.$ref}`,[...t,`$ref`]);if(m(e.$ref,t),r.has(e.$ref))return;let i=new Set(r).add(e.$ref);return b(n[e.$ref],[`references`,e.$ref],i)}case`String`:{if(e.checks.length===0)return[];if(e.checks.length!==1||e.checks[0]._tag!==`Filter`||e.checks[0].annotations?.toJsonSchema===void 0)return;let n=[],r=v(e,t,n);return Qm(n)&&r.type===`string`&&typeof r.pattern==`string`&&qm(r,`|type|pattern|title|description|default|examples|readOnly|writeOnly|`)?[r.pattern]:void 0}case`TemplateLiteral`:return e.checks.length===0?[`^${e.parts.map(rh).join(``)}$`]:void 0;case`Union`:{if(e.types.length===0||e.checks.length>0||e.options?.mode===`oneOf`)return;let n=[];for(let i=0;i<e.types.length;i++){let a=b(e.types[i],[...t,`types`,i],r);if(a===void 0)return;if(a.length===0)return[];n.push(...a)}return n}default:throw Bm(`Invalid schema representation document`,t)}}}function th(e){return e===`string`||e===`number`||e===`boolean`||e===`array`||e===`object`||e===`null`||e===`integer`}function nh(e){let t,n=[];for(let r of e){if(Object.keys(r).length!==2||r.type===void 0||!Array.isArray(r.enum)||r.enum.length===0)return;if(t===void 0)t=r.type;else if(r.type!==t)return;for(let e of r.enum){if(n.includes(e))return;n.push(e)}}return{type:t,enum:n}}function rh(e){switch(e._tag){case`Literal`:return zm(globalThis.String(e.literal));case`String`:return Bf;case`Number`:return ud;case`TemplateLiteral`:return e.parts.map(rh).join(``);case`Union`:return`(?:${e.types.map(rh).join(`|`)})`;default:throw Bm(`Invalid schema representation document`,[])}}function ih(e,t){let n=eh([e.representation],[[`representation`]],e.references,t);return{dialect:n.dialect,schema:n.schemas[0],definitions:n.definitions}}var ah=({identifier:e})=>e;function oh(e){return e===void 0?void 0:{annotations:e}}function sh(e,t){let{references:n,representations:r}=ch([e],t);return{representation:r[0],references:n}}function ch(e,t){let n={},r=new Map,i=new Set,a=new Map,o=new Set;for(let t of e)f(t);let s=t?.referencePolicy??ah;for(let e of a.values())for(let t of e.values()){let e=s({ast:t.ast,occurrences:t.occurrences,identifier:t.identifier});e===void 0?t.isRecursive&&(t.reference=c(`${t.ast._tag}_`,t,``)):t.reference=c(e,t,e===t.identifier||!e.endsWith(`_`)?`_`:``)}return{representations:Yn(e,e=>m(e)),references:n};function c(e,t,n=`_`){let i=e,a=0;for(;r.has(i);){if(r.get(i)===t)return i;i=`${e}${n}${++a}`}return r.set(i,t),i}function l(e,t,n){let r=t.fallback;return r===void 0?n===t.identifier?e:sf(e,{identifier:n}):al(e)===r?e:sf(e,{[el]:r})}function u(e,t){if(!Object.hasOwn(n,e)&&!i.has(e)){i.add(e);let r=h(t);i.delete(e),Ti(n,e,r)}return{_tag:`Reference`,$ref:e}}function d(e){let t=of(e),n=nf(t),r=il(t),i=r===void 0?(t===e?void 0:il(e))??al(t):void 0;i!==void 0&&(r=`${i}Encoded`);let o=a.get(n);o===void 0&&(o=new Map,a.set(n,o));let s=o.get(r);return s===void 0&&(s={ast:n,identifier:r,fallback:i,occurrences:0,isRecursive:!1,reference:void 0},o.set(r,s)),s}function f(e){let t=d(e),n=t.ast;if(t.occurrences++,o.has(t)){t.isRecursive=!0;return}if(!(t.occurrences>1)){switch(o.add(t),p(n.checks),n._tag){case`Declaration`:case`Arrays`:case`Objects`:case`Union`:n.recur(e=>(f(e),e));break;case`TemplateLiteral`:n.parts.forEach(f);break;case`Suspend`:f(n.thunk())}o.delete(t)}}function p(e){e?.forEach(e=>{e.annotations?.representation?.schemas?.forEach(e=>f(jf(e))),e._tag===`FilterGroup`&&p(e.checks)})}function m(e){let t=d(e),n=t.ast,r=t.reference;return r===void 0?h(n):u(r,t.identifier===void 0?n:l(n,t,r))}function h(e){let t=g(e.checks);switch(e._tag){case`Declaration`:return{_tag:`Declaration`,typeParameters:e.typeParameters.map(e=>m(e)),checks:t,...v(e.annotations)};case`Null`:case`Undefined`:case`Void`:case`Never`:case`Unknown`:case`Any`:case`String`:case`Boolean`:case`Number`:case`BigInt`:case`Symbol`:case`ObjectKeyword`:return{_tag:e._tag,checks:t,...oh(e.annotations)};case`Literal`:return{_tag:`Literal`,literal:e.literal,checks:t,...oh(e.annotations)};case`UniqueSymbol`:return{_tag:`UniqueSymbol`,symbol:e.symbol,checks:t,...oh(e.annotations)};case`Enum`:return{_tag:`Enum`,enums:e.enums,checks:t,...oh(e.annotations)};case`TemplateLiteral`:return{_tag:`TemplateLiteral`,parts:e.parts.map(e=>m(e)),checks:t,...oh(e.annotations)};case`Arrays`:return{_tag:`Arrays`,elements:e.elements.map(e=>{let t=of(e),n=t.context?.annotations;return{isOptional:Ef(t),type:m(e),...oh(n)}}),rest:e.rest.map(e=>m(e)),checks:t,...oh(e.annotations)};case`Objects`:return{_tag:`Objects`,propertySignatures:e.propertySignatures.map(e=>{let t=of(e.type),n=t.context?.annotations;return{name:e.name,type:m(e.type),isOptional:Ef(t),isMutable:Df(t),...oh(n)}}),indexSignatures:e.indexSignatures.map(e=>({parameter:m(e.parameter),type:m(e.type)})),checks:t,...oh(e.annotations)};case`Union`:return{_tag:`Union`,types:e.types.map(e=>m(e)),...e.options===void 0?{}:{options:e.options},checks:t,...oh(e.annotations)};case`Suspend`:return{_tag:`Suspend`,checks:[],thunk:m(e.thunk()),...oh(e.annotations)}}}function g(e){return e?.map(_)??[]}function _(e){switch(e._tag){case`Filter`:return{_tag:`Filter`,aborted:e.aborted,...y(e.annotations)};case`FilterGroup`:return{_tag:`FilterGroup`,checks:Yn(e.checks,_),...y(e.annotations)}}}function v(e){if(e===void 0)return;let{representation:t,...n}=e;return{...t===void 0?void 0:{representation:t},...Object.keys(n).length===0?void 0:{annotations:n}}}function y(e){if(e===void 0)return;let{representation:t,...n}=e,r=t===void 0?void 0:t.schemas===void 0?t:{...t,schemas:t.schemas.map(e=>m(jf(e)))};return{...r===void 0?void 0:{representation:r},...Object.keys(n).length===0?void 0:{annotations:n}}}}function lh(e){return fs(e)?e.value:{issues:[{message:rs(e.cause)}]}}function uh(e,t){let n=Op(e),r={errors:`all`,...t?.parseOptions},i=Il(t),a=e=>{let t=new ft(`sync`),a=_(te(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?lh(o):new Promise(e=>{a.addObserver(t=>{e(lh(t))})})};if(Object.hasOwn(e,`~standard`)){let t=e;return`validate`in t[`~standard`]||Object.assign(t[`~standard`],{validate:a}),t}return Object.assign(e,{"~standard":{version:1,vendor:`effect`,validate:a}})}function dh(e){return ih(sh(Nm(e)))}function fh(e,t){let n=dh(e);if(t===`draft-2020-12`){let e=n.schema;return Object.keys(n.definitions).length>0&&(e.$defs=n.definitions),e}if(t===`draft-07`){let e=nm(n),t=e.schema;return Object.keys(e.definitions).length>0&&(t.definitions=e.definitions),t}throw new globalThis.Error(`Unsupported target: ${t}`)}function ph(e){let t={input(t){return fh(e.ast,t.target)},output(t){return fh(jf(e.ast),t.target)}};if(Object.hasOwn(e,`~standard`)){let n=e;return`jsonSchema`in n[`~standard`]||Object.assign(n[`~standard`],{jsonSchema:t}),n}return Object.assign(e,{"~standard":{version:1,vendor:`effect`,jsonSchema:t}})}var mh=$r(e=>hh(e));function hh(e){let t=Zc(e)?.toEquivalence;if(t)return t(Eu(e)?e.typeParameters.map(hh):[]);switch(e._tag){case`Never`:return Qe();case`Declaration`:return gh(e);case`Null`:case`Undefined`:case`Void`:case`Unknown`:case`Any`:case`String`:case`Number`:case`Boolean`:case`BigInt`:case`Symbol`:case`Literal`:case`UniqueSymbol`:case`ObjectKeyword`:case`Enum`:case`TemplateLiteral`:return hr;case`Arrays`:{let t=e.elements.map(hh),n=e.rest.map(hh),[r,...i]=n,a=i.length;return C((o,s)=>{if(!Array.isArray(o)||!Array.isArray(s))return!1;let c=o.length;if(c!==s.length)return!1;let l=0;for(;l<Math.min(c,e.elements.length);l++)if(!t[l](o[l],s[l]))return!1;if(n.length>0){for(;l<c-a;l++)if(!r(o[l],s[l]))return!1;for(let e=0;e<a;e++)if(!i[e](o[l+e],s[l+e]))return!1}return!0})}case`Objects`:{if(e.propertySignatures.length===0&&e.indexSignatures.length===0)return hr;let t=e.propertySignatures.map(e=>hh(e.type)),n=e.indexSignatures.map(e=>hh(e.type));return C((r,i)=>{if(!ke(r)||!ke(i))return!1;for(let n=0;n<t.length;n++){let a=e.propertySignatures[n],o=a.name,s=Object.hasOwn(r,o),c=Object.hasOwn(i,o);if(Ef(a.type)&&s!==c||s&&c&&!t[n](r[o],i[o]))return!1}for(let t=0;t<n.length;t++){let a=e.indexSignatures[t],o=dd(r,a.parameter),s=dd(i,a.parameter);if(o.length!==s.length)return!1;for(let e=0;e<o.length;e++){let a=o[e];if(!Object.hasOwn(i,a)||!n[t](r[a],i[a]))return!1}}return!0})}case`Union`:{let t=jf(e).types,n=Fd(t),r=t.map((t,n)=>[Dp(t),hh(e.types[n])]);return C((e,t)=>{let i=n(e,!1);for(let n=0;n<i.length;n++){let[a,o]=r[i[n]];if(a(e)&&a(t))return o(e,t)}return!1})}case`Suspend`:{let t;return C((n,r)=>(t??=mh(e.thunk()))(n,r))}}}function gh(e){let t=e.annotations?.representation;if(t===void 0)return hr;switch(t.id){case`effect/schema/Option`:{let[t]=_h(e);return(e,n)=>e._tag===n._tag&&(e._tag===`None`||t(e.value,n.value))}case`effect/schema/Result`:{let[t,n]=_h(e);return(e,r)=>e._tag===r._tag&&(e._tag===`Success`?t(e.success,r.success):n(e.failure,r.failure))}case`effect/schema/CauseReason`:{let[t,n]=_h(e);return vh(t,n)}case`effect/schema/Cause`:{let[t,n]=_h(e);return yh(t,n)}case`effect/schema/Exit`:{let[t,n,r]=_h(e),i=yh(n,r);return(e,n)=>e._tag===n._tag&&(e._tag===`Success`?t(e.value,n.value):i(e.cause,n.cause))}case`effect/schema/ReadonlyMap`:{let[t,n]=_h(e);return c(t,n)}case`effect/schema/ReadonlySet`:return lr(_h(e)[0]);case`effect/schema/RegExp`:return(e,t)=>e.source===t.source&&e.flags===t.flags;case`effect/schema/URL`:return(e,t)=>e.toString()===t.toString();default:return hr}}function _h(e){return e.typeParameters.map(hh)}function vh(e,t){return(n,r)=>{if(n._tag!==r._tag)return!1;switch(n._tag){case`Fail`:return e(n.error,r.error);case`Die`:return t(n.defect,r.defect);case`Interrupt`:return n.fiberId===r.fiberId}}}function yh(e,t){let n=Ot(vh(e,t));return(e,t)=>n(e.reasons,t.reasons)}var bh=In(2,(e,t)=>({...e,...t})),xh=e=>e,Sh=`~effect/Schema/SchemaError`;function Ch(e){return Bi(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}var wh=Wp;function Th(){return(e,t,n)=>Hh(new Wu(e.map(wd),e=>t(e.map(e=>Hh(e))),n))}function Eh(e,t){return Th()([],()=>(t,n,r)=>e(t)?O(t):bn(new El(n,t,r)),t)}var Dh=class extends Go(`SchemaError`){[Sh]=Sh;constructor(e){let t=Qn();Kn(0);try{super({issue:e})}finally{Kn(t)}}get message(){return Ul(this.issue)}toString(){return`SchemaError(${this.message})`}};function Oh(e){return Ch(e)}function kh(e){return fn(e)?Ah(e):n(e,e=>li(()=>$o(e,e=>new Dh(e))))}function Ah(e){return fs(e)?e:cs($o(e.cause,e=>new Dh(e)))}function jh(e,t){let n;for(let r of e.reasons){if(!Jo(r)||!Oh(r.error))throw new globalThis.Error(t,{cause:e});n??=r.error}if(n===void 0)throw new globalThis.Error(t,{cause:e});return n}function Mh(e){let t=_e(e);if(fs(t))return t.value;throw jh(t.cause,`Sync adapter can only throw schema errors`)}function Nh(e,t){return uh(e,t)}function Ph(e){return ph(e)}var Fh=Tp;function Ih(e,t){let n=Op(e,t);return(e,t)=>kh(n(e,t))}var Lh=kp;function P(e,t){let n=Ap(e,t);return(e,t)=>T(n(e,t),e=>new Dh(e))}function Rh(e,t){let n=Ih(e,t);return(e,t)=>Mh(n(e,t))}function zh(e,t){let n=jp(e,t);return(e,t)=>kh(n(e,t))}function Bh(e,t){let n=zh(e,t);return(e,t)=>Mh(n(e,t))}var Vh=Bh,Hh=qp;function Uh(e){return Bi(e,wh)&&e[wh]===wh}var F=xh(e=>Hh(vf(e.ast),{schema:e})),I=xh(e=>{let t=ag(e);return Hh(bf(e.ast),{schema:t})}),Wh=xh(e=>Hh(xf(e.ast),{schema:e})),Gh=xh(e=>Hh(jf(e.ast),{schema:e})),Kh=xh(e=>Hh(Mf(e.ast),{schema:e}));function L(e){let t=Hh(new Zu(e),{literal:e,transform(n){return t.pipe(lg(L(n),{decode:eu(()=>n),encode:eu(()=>e)}))}});return t}var qh=Hh(Yu),Jh=Hh(Xu),Yh=Hh(Gu),Xh=Hh(Ju),R=Hh($u),z=Hh(nd),Zh=Hh(rd);function Qh(e,t){return Hh(e,{fields:t,mapFields(e,t){let n=e(this.fields);return Qh(Cd(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function B(e){return Qh(Cd(e,void 0),e)}function $h(e,t){return Hh(Tf(e.ast,t.ast),{key:e,value:t})}function eg(e,t){return Hh(e,{elements:t,mapElements(e,t){let n=e(this.elements);return eg(Td(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function tg(e){return eg(Td(e),e)}var V=xh(e=>Hh(new id(!1,[],[e.ast]),{value:e})),ng=xh(e=>Hh(Dd(e.ast),{schema:e}));function rg(e,t){return Hh(e,{members:t,mapMembers(e,t){let n=e(this.members);return rg(Ed(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function ig(e,t){return rg(Ed(e,t,void 0),e)}function H(e){let t=e.map(L);return Hh(Ed(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return ig(e(this.members))},pick(e){return H(e)},transform(e){return ig(t.map((t,n)=>t.transform(e[n])))}})}var U=xh(e=>ig([e,Yh])),ag=xh(e=>ig([e,Xh]));function og(e){return Hh(new Gd(()=>e().ast))}function W(...e){return t=>t.check(...e)}function sg(e,t){return n=>Hh(lf(n.ast,[Yd(e,t)]),{schema:n})}function cg(e){return t=>Hh(t.ast,{schema:t,identifier:e})}function lg(e,t){return n=>Hh(Cf(n.ast,e.ast,t?_u(t):xu()),{from:n,to:e})}function ug(){return(e,t)=>_g()(e,{decode:t,encode:Zl})}function dg(e,t){return n=>t?lg(n,t)(e):lg(n)(e)}function fg(e){return n(e,e=>li(()=>$o(e,e=>e.issue)))}function pg(e,t){let n=t?.encodingStrategy===`omit`?iu():$l();return t=>F(Kh(t)).pipe(lg(t,{decode:au(fg(e)),encode:n}))}function mg(e,t){let n=t?.encodingStrategy===`omit`?iu():$l();return t=>I(Kh(t)).pipe(lg(t,{decode:au(fg(e)),encode:n}))}function hg(e,t){return n=>Gh(n).pipe(mg(e,t),dg(I(n)))}function gg(e,t){return Eh(t=>t instanceof e,t)}function _g(){return(e,t)=>new zu(e.ast,_u(t))}var vg=Jd,yg=`^\\S[\\s\\S]*\\S$|^\\S$|^$`;function bg(e){let t=new globalThis.RegExp(yg);return vg(e=>e.trim()===e,{expected:`a string with no leading or trailing whitespace`,representation:{id:`effect/schema/isTrimmed`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isTrimmed()`}),arbitraryConstraint:{patterns:[{source:yg,flags:``}]},...e})}function xg(e,t){let n=e.source,r=e.flags,i=/^[dg]*uy?$/.test(r),a=r===``?`new RegExp(${Fi(n)})`:`new RegExp(${Fi(n)}, ${Fi(r)})`;return $d(e,{toJsonSchema:()=>i?{pattern:r.endsWith(`y`)?`^(?:${n})`:n}:[{},!0],toCode:()=>({runtime:`Schema.isPattern(${a})`}),...t})}function Sg(e){let t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;return xg(t,{expected:`a base64 encoded string`,representation:{id:`effect/schema/isBase64`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isBase64()`}),...e})}var Cg=Hh(Zd),wg=Xd;function Tg(e){let t=ge(e.order),n=e.formatter??Fi;return(r,i)=>vg(e=>t(e,r),{expected:`a value greater than ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r,exclusiveMinimum:!0},...e.annotate?.(r),...i})}function Eg(e){let t=je(e.order),n=e.formatter??Fi;return(r,i)=>vg(e=>t(e,r),{expected:`a value greater than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r},...e.annotate?.(r),...i})}function Dg(e){let t=De(e.order),n=e.formatter??Fi;return(r,i)=>vg(e=>t(e,r),{expected:`a value less than or equal to ${n(r)}`,arbitraryConstraint:{order:e.order,maximum:r},...e.annotate?.(r),...i})}function Og(e){let t=je(e.order),n=ge(e.order),r=De(e.order),i=Zr(e.order),a=e.formatter??Fi;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return vg(e=>c(e,o.minimum)&&l(e,o.maximum),{expected:`a value between ${a(o.minimum)}${o.exclusiveMinimum?` (excluded)`:``} and ${a(o.maximum)}${o.exclusiveMaximum?` (excluded)`:``}`,arbitraryConstraint:{order:e.order,minimum:o.minimum,maximum:o.maximum,...o.exclusiveMinimum&&{exclusiveMinimum:!0},...o.exclusiveMaximum&&{exclusiveMaximum:!0}},...e.annotate?.(o),...s})}}function kg(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${Fi(e)}`);return e}var Ag=Tg({order:Pt,annotate:e=>({representation:{id:`effect/schema/isGreaterThan`,payload:{exclusiveMinimum:kg(e)}},toJsonSchema:()=>({exclusiveMinimum:e}),toCode:()=>({runtime:`Schema.isGreaterThan(${Fi(e)})`})})}),jg=Eg({order:Pt,annotate:e=>({representation:{id:`effect/schema/isGreaterThanOrEqualTo`,payload:{minimum:kg(e)}},toJsonSchema:()=>({minimum:e}),toCode:()=>({runtime:`Schema.isGreaterThanOrEqualTo(${Fi(e)})`})})}),Mg=Dg({order:Pt,annotate:e=>({representation:{id:`effect/schema/isLessThanOrEqualTo`,payload:{maximum:kg(e)}},toJsonSchema:()=>({maximum:e}),toCode:()=>({runtime:`Schema.isLessThanOrEqualTo(${Fi(e)})`})})}),Ng=Og({order:Pt,annotate:e=>{let t=e.exclusiveMinimum?!0:void 0,n=e.exclusiveMaximum?!0:void 0;return{representation:{id:`effect/schema/isBetween`,payload:{minimum:kg(e.minimum),maximum:kg(e.maximum),...t&&{exclusiveMinimum:t},...n&&{exclusiveMaximum:n}}},toJsonSchema:()=>({[t?`exclusiveMinimum`:`minimum`]:e.minimum,[n?`exclusiveMaximum`:`maximum`]:e.maximum}),toCode:()=>({runtime:`Schema.isBetween({ minimum: ${Fi(e.minimum)}, maximum: ${Fi(e.maximum)}, exclusiveMinimum: ${Fi(t)}, exclusiveMaximum: ${Fi(n)} })`})}}});function Pg(e){return vg(e=>globalThis.Number.isSafeInteger(e),{expected:`an integer`,representation:{id:`effect/schema/isInt`,payload:null},toJsonSchema:()=>[{type:`integer`},!0],toCode:()=>({runtime:`Schema.isInt()`}),arbitraryConstraint:{number:`integer`},...e})}var G=z.check(Pg());function Fg(e,t){return e=Rg(e),Ig(e,Math.ceil(e/2),t)}function Ig(e,t,n){return vg(t=>t.length>=e,{expected:`a value with a length of at least ${e}`,representation:{id:`effect/schema/isMinLength`,payload:{minLength:e}},toJsonSchema:({type:n})=>n===`string`?e<=1?{minLength:t}:[{minLength:t},!0]:n===`array`?{minItems:e}:n===void 0?[{minLength:t,minItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMinLength(${e})`}),[$c]:!0,arbitraryConstraint:{minLength:e},...n})}function Lg(e){return Ig(1,1,e)}function K(e,t){return e=Rg(e),vg(t=>t.length<=e,{expected:`a value with a length of at most ${e}`,representation:{id:`effect/schema/isMaxLength`,payload:{maxLength:e}},toJsonSchema:({type:t})=>t===`string`?e===0?{maxLength:e}:[{maxLength:e},!0]:t===`array`?{maxItems:e}:t===void 0?[{maxLength:e,maxItems:e},!0]:[{},!0],toCode:()=>({runtime:`Schema.isMaxLength(${e})`}),[$c]:!0,arbitraryConstraint:{maxLength:e},...t})}function Rg(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${e}`);return Math.max(0,Math.floor(e))}var zg=R.check(Lg());globalThis.RegExp,globalThis.URL;var Bg=R.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function Vg(e,t){return Bg.pipe(lg(e,wu(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var Hg=R.annotate({expected:`a string that will be decoded as a number`}).pipe(lg(z,Su)),Ug=R.check(bg()),Wg=R.annotate({expected:`a string that will be decoded as a trimmed string`}).pipe(lg(Ug,yu())),Gg=R.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),Kg=gg(globalThis.Uint8Array,{representation:{id:`effect/schema/Uint8Array`,payload:null},toCode:()=>({runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`}),expected:`Uint8Array`,toCodecJson:()=>_g()(Gg,Cu)}),qg=vu({decode:(e,t)=>Ie(Fc(e),{onNone:()=>bn(new Dl({expected:`a valid UTC DateTime string`},e,t)),onSome:e=>O(Ic(e))}),encode:e=>O(Lc(e))}),Jg=-864e13,Yg=864e13;function Xg(e,t,n){let r=Math.max(t,e?.minimum===void 0?t:e.minimum.epochMilliseconds+ +(e.exclusiveMinimum===!0)),i=Math.min(n,e?.maximum===void 0?n:e.maximum.epochMilliseconds-+(e.exclusiveMaximum===!0));return r<=i?[r,i]:[t,n]}function Zg(e,t){return G.check(Ng({minimum:e,maximum:t}))}var Qg=Eh(e=>Mc(e)&&Nc(e),{representation:{id:`effect/schema/DateTimeUtc`,payload:null},toCode:()=>({runtime:`Schema.DateTimeUtc`,Type:`DateTime.Utc`,importDeclarations:[`import * as DateTime from "effect/DateTime"`]}),expected:`DateTime.Utc`,toCodecArbitrary:({constraint:e})=>{let[t,n]=Xg(e,Jg,Yg);return ug()(Zg(t,n),eu(Pc))},toCodecJson:()=>_g()(R,qg),toFormatter:()=>e=>e.toString()}),$g=R.annotate({expected:`a string that will be decoded as a DateTime.Utc`}).pipe(lg(Qg,qg));function e_(e){return mh(e.ast)}function t_(e,t){return ih(sh(Nm(e.ast),t),t)}var n_=Mm,r_=Hh(sf(np,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),i_=$h(R,r_),a_=t((e=>{var t=Wi(),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),o_=t(((e,t)=>{t.exports=a_()})),q=o_(),s_=M.createContext(void 0),c_=e=>{let t=M.useContext(s_);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},l_=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,q.jsx)(s_.Provider,{value:e,children:t})),u_={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},d_=new class{#e=u_;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function f_(e){setTimeout(e,0)}var p_=typeof window>`u`||`Deno`in globalThis;function m_(){}function h_(e,t){return typeof e==`function`?e(t):e}function g_(e){return typeof e==`number`&&e>=0&&e!==1/0}function __(e,t){return Math.max(e+(t||0)-Date.now(),0)}function v_(e,t){return typeof e==`function`?e(t):e}function y_(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==x_(o,t.options))return!1}else if(!C_(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function b_(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(S_(t.options.mutationKey)!==S_(a))return!1}else if(!C_(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function x_(e,t){return(t?.queryKeyHashFn||S_)(e)}function S_(e){return JSON.stringify(e,(e,t)=>O_(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function C_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){for(let n=0;n<t.length;n++)if(!C_(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!C_(e[r],t[r]))return!1;return!0}return!1}var w_=Object.prototype.hasOwnProperty;function T_(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=D_(e)&&D_(t);if(!r&&!(O_(e)&&O_(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:w_.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=T_(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function E_(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function D_(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function O_(e){if(!k_(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!k_(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function k_(e){return Object.prototype.toString.call(e)===`[object Object]`}function A_(e){return new Promise(t=>{d_.setTimeout(t,e)})}function j_(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:T_(e,t)}function M_(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function N_(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var P_=Symbol();function F_(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===P_?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function I_(e,t){return typeof e==`function`?e(...t):!!e}function L_(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var R_=()=>p_,z_=()=>R_(),B_=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},V_=new class extends B_{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e();return window.addEventListener(`visibilitychange`,t,!1),()=>{window.removeEventListener(`visibilitychange`,t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},H_=f_;function U_(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=H_,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var W_=U_(),G_=new class extends B_{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let t=()=>e(!0),n=()=>e(!1);return window.addEventListener(`online`,t,!1),window.addEventListener(`offline`,n,!1),()=>{window.removeEventListener(`online`,t),window.removeEventListener(`offline`,n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function K_(e){return Math.min(1e3*2**e,3e4)}function q_(e){return(e??`online`)!==`online`||G_.isOnline()}var J_=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function Y_(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(m_);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new J_(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>V_.isFocused()&&(e.networkMode===`always`||G_.isOnline())&&e.canRun(),p=()=>q_(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=()=>new Promise(t=>{r=e=>{(c()||f())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(z_()?0:3),a=e.retryDelay??K_,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!s){h(r);return}n++,e.onFail?.(n,r),A_(o).then(()=>f()?void 0:g()).then(()=>{t?h(r):_()})})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g().then(_),s)}}var X_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),g_(this.gcTime)&&(this.#e=d_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(z_()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(d_.clearTimeout(this.#e),this.#e=void 0)}};function Z_(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{L_(e,()=>t.signal,()=>n=!0)},u=F_(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?N_:M_;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?$_:Q_,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:Q_(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function Q_(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function $_(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function ev(e,t){return t?Q_(e,t)!=null:!1}function tv(e,t){return!t||!e.getPreviousPageParam?!1:$_(e,t)!=null}var nv=class extends X_{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=av(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=av(this.options);e.data!==void 0&&(this.setState(iv(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=j_(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(m_).catch(m_):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>v_(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===P_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>v_(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!__(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=F_(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?Z_(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=Y_({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof J_&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof J_){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...rv(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...iv(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:`idle`,status:`error`,isInvalidated:!0};case`invalidate`:return{...t,isInvalidated:!0};case`setState`:return{...t,...e.state}}};this.state=t(this.state),W_.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function rv(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:q_(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function iv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function av(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?`success`:`pending`,fetchStatus:`idle`}}var ov=class extends B_{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),cv(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lv(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof v_(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!E_(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&uv(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||v_(this.options.enabled,this.#t)!==v_(t.enabled,this.#t)||v_(this.options.staleTime,this.#t)!==v_(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||v_(this.options.enabled,this.#t)!==v_(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return E_(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(m_)),t}#h(e){return!z_()&&v_(this.options.enabled,this.#t)!==!1&&g_(e)}#g(){this.#b();let e=v_(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=__(this.#r.dataUpdatedAt,e)+1;this.#u=d_.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#f=e,!(this.#f===0||!this.#h(this.#f))&&(this.#d=d_.setInterval(()=>{(this.options.refetchIntervalInBackground||V_.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(d_.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(d_.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&cv(e,t),o=i&&uv(e,n,t,r);(a||o)&&(l={...l,...rv(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=j_(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=j_(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:dv(e,t),refetch:this.refetch,isEnabled:v_(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),E_(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();W_.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function sv(e,t){return v_(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||v_(t.retryOnMount,e)!==!1)}function cv(e,t){return sv(e,t)||e.state.data!==void 0&&lv(e,t,t.refetchOnMount)}function lv(e,t,n){if(v_(t.enabled,e)!==!1&&v_(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&dv(e,t)}return!1}function uv(e,t,n,r){return(e!==t||v_(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&dv(e,n)}function dv(e,t){return v_(t.enabled,e)!==!1&&e.isStaleByTime(v_(t.staleTime,e))}var fv=class extends ov{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:ev(t,n.data),hasPreviousPage:tv(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},pv=class extends X_{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||mv(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=Y_({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=t=>{switch(e.type){case`failed`:return{...t,failureCount:e.failureCount,failureReason:e.error};case`pause`:return{...t,isPaused:!0};case`continue`:return{...t,isPaused:!1};case`pending`:return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:`pending`,variables:e.variables,submittedAt:Date.now()};case`success`:return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:`success`,isPaused:!1};case`error`:return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:`error`}}};this.state=t(this.state),W_.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function mv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var hv=class extends B_{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new pv({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=gv(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=gv(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=gv(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=gv(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){W_.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>b_(t,e))}findAll(e={}){return this.getAll().filter(t=>b_(e,t))}notify(e){W_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return W_.batch(()=>Promise.all(e.map(e=>e.continue().catch(m_))))}};function gv(e){return e.options.scope?.id}var _v=class extends B_{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),E_(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&S_(t.mutationKey)!==S_(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??mv();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){W_.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},vv=class extends B_{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??x_(r,t),a=this.get(i);return a||(a=new nv({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){W_.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>y_(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>y_(e,t)):t}notify(e){W_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){W_.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){W_.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},yv=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new vv,this.#t=e.mutationCache||new hv,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=V_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=G_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(v_(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=h_(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return W_.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;W_.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return W_.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=W_.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(m_).catch(m_)}invalidateQueries(e,t={}){return W_.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=W_.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(m_)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(m_)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(v_(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(v_(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(m_).catch(m_)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(m_).catch(m_)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return G_.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(S_(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{C_(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(S_(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{C_(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=x_(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===P_&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function bv({streamFn:e,refetchMode:t=`reset`,reducer:n=(e,t)=>M_(e,t),initialValue:r=[]}){return async i=>{let a=i.client.getQueryCache().find({queryKey:i.queryKey,exact:!0}),o=!!a&&a.isFetched();o&&t===`reset`&&a.setState({...a.resetState,fetchStatus:`fetching`});let s=r,c=!1,l=await e(L_({client:i.client,meta:i.meta,queryKey:i.queryKey,pageParam:i.pageParam,direction:i.direction},()=>i.signal,()=>c=!0)),u=o&&t===`replace`;for await(let e of l){if(c)break;u?s=n(s,e):i.client.setQueryData(i.queryKey,t=>n(t===void 0?r:t,e))}return u&&!c&&i.client.setQueryData(i.queryKey,s),i.client.getQueryData(i.queryKey)??r}}function xv(e){return e}function Sv(e){return e}var Cv=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=typeof setTimeout==`function`?setTimeout:null,_=typeof clearTimeout==`function`?clearTimeout:null,v=typeof setImmediate<`u`?setImmediate:null;typeof navigator<`u`&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function y(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function b(e){if(h=!1,y(e),!m){if(n(c)!==null)m=!0,oe(x);else{var t=n(l);t!==null&&se(b,t.startTime-e)}}}function x(t,i){m=!1,h&&(h=!1,_(w),w=-1),p=!0;var a=f;try{for(y(i),d=n(c);d!==null&&(!(d.expirationTime>i)||t&&!ne());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=i);i=e.unstable_now(),typeof s==`function`?d.callback=s:d===n(c)&&r(c),y(i)}else r(c);d=n(c)}if(d!==null)var u=!0;else{var g=n(l);g!==null&&se(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,ee=5,te=-1;function ne(){return!(e.unstable_now()-te<ee)}function re(){if(C!==null){var t=e.unstable_now();te=t;var n=!0;try{n=C(!0,t)}finally{n?ie():(S=!1,C=null)}}else S=!1}var ie;if(typeof v==`function`)ie=function(){v(re)};else if(typeof MessageChannel<`u`){var T=new MessageChannel,ae=T.port2;T.port1.onmessage=re,ie=function(){ae.postMessage(null)}}else ie=function(){g(re,0)};function oe(e){C=e,S||(S=!0,ie())}function se(t,n){w=g(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_continueExecution=function(){m||p||(m=!0,oe(x))},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ee=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_getFirstCallbackNode=function(){return n(c)},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(_(w),w=-1):h=!0,se(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,oe(x))),r},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),wv=t(((e,t)=>{t.exports=Cv()})),Tv=t((e=>{var t=Wi(),n=wv();function r(e){for(var t=`https://reactjs.org/docs/error-decoder.html?invariant=`+e,n=1;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.`}var i=new Set,a={};function o(e,t){s(e,t),s(e+`Capture`,t)}function s(e,t){for(a[e]=t,e=0;e<t.length;e++)i.add(t[e])}var c=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),l=Object.prototype.hasOwnProperty,u=/^[: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]*$/,d={},f={};function p(e){return l.call(f,e)?!0:l.call(d,e)?!1:u.test(e)?f[e]=!0:(d[e]=!0,!1)}function m(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case`function`:case`symbol`:return!0;case`boolean`:return r?!1:n===null?(e=e.toLowerCase().slice(0,5),e!==`data-`&&e!==`aria-`):!n.acceptsBooleans;default:return!1}}function h(e,t,n,r){if(t==null||m(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function g(e,t,n,r,i,a,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var _={};`children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style`.split(` `).forEach(function(e){_[e]=new g(e,0,!1,e,null,!1,!1)}),[[`acceptCharset`,`accept-charset`],[`className`,`class`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`]].forEach(function(e){var t=e[0];_[t]=new g(t,1,!1,e[1],null,!1,!1)}),[`contentEditable`,`draggable`,`spellCheck`,`value`].forEach(function(e){_[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)}),[`autoReverse`,`externalResourcesRequired`,`focusable`,`preserveAlpha`].forEach(function(e){_[e]=new g(e,2,!1,e,null,!1,!1)}),`allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope`.split(` `).forEach(function(e){_[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)}),[`checked`,`multiple`,`muted`,`selected`].forEach(function(e){_[e]=new g(e,3,!0,e,null,!1,!1)}),[`capture`,`download`].forEach(function(e){_[e]=new g(e,4,!1,e,null,!1,!1)}),[`cols`,`rows`,`size`,`span`].forEach(function(e){_[e]=new g(e,6,!1,e,null,!1,!1)}),[`rowSpan`,`start`].forEach(function(e){_[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}`accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height`.split(` `).forEach(function(e){var t=e.replace(v,y);_[t]=new g(t,1,!1,e,null,!1,!1)}),`xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type`.split(` `).forEach(function(e){var t=e.replace(v,y);_[t]=new g(t,1,!1,e,`http://www.w3.org/1999/xlink`,!1,!1)}),[`xml:base`,`xml:lang`,`xml:space`].forEach(function(e){var t=e.replace(v,y);_[t]=new g(t,1,!1,e,`http://www.w3.org/XML/1998/namespace`,!1,!1)}),[`tabIndex`,`crossOrigin`].forEach(function(e){_[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)}),_.xlinkHref=new g(`xlinkHref`,1,!1,`xlink:href`,`http://www.w3.org/1999/xlink`,!0,!1),[`src`,`href`,`action`,`formAction`].forEach(function(e){_[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)});function b(e,t,n,r){var i=_.hasOwnProperty(t)?_[t]:null;(i===null?r||!(2<t.length)||t[0]!==`o`&&t[0]!==`O`||t[1]!==`n`&&t[1]!==`N`:i.type!==0)&&(h(t,n,i,r)&&(n=null),r||i===null?p(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,``+n)):i.mustUseProperty?e[i.propertyName]=n===null?i.type!==3&&``:n:(t=i.attributeName,r=i.attributeNamespace,n===null?e.removeAttribute(t):(i=i.type,n=i===3||i===4&&!0===n?``:``+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var x=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,S=Symbol.for(`react.element`),C=Symbol.for(`react.portal`),w=Symbol.for(`react.fragment`),ee=Symbol.for(`react.strict_mode`),te=Symbol.for(`react.profiler`),ne=Symbol.for(`react.provider`),re=Symbol.for(`react.context`),ie=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),ae=Symbol.for(`react.suspense_list`),oe=Symbol.for(`react.memo`),se=Symbol.for(`react.lazy`),ce=Symbol.for(`react.offscreen`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Object.assign,fe;function pe(e){if(fe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||``}return`
4
4
  `+fe+e}var me=!1;function he(e,t){if(!e||me)return``;me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t){if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var i=t.stack.split(`
@@ -7,50 +7,50 @@ import{n as e,t}from"./rolldown-runtime-CbXtAM7H.js";import{$ as n,$i as r,$n as
7
7
  `+i[o].replace(` at new `,` at `);return e.displayName&&c.includes(`<anonymous>`)&&(c=c.replace(`<anonymous>`,e.displayName)),c}while(1<=o&&0<=s);break}}}finally{me=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?pe(e):``}function ge(e){switch(e.tag){case 5:return pe(e.type);case 16:return pe(`Lazy`);case 13:return pe(`Suspense`);case 19:return pe(`SuspenseList`);case 0:case 2:case 15:return e=he(e.type,!1),e;case 11:return e=he(e.type.render,!1),e;case 1:return e=he(e.type,!0),e;default:return``}}function _e(e){if(e==null)return null;if(typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case w:return`Fragment`;case C:return`Portal`;case te:return`Profiler`;case ee:return`StrictMode`;case T:return`Suspense`;case ae:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case re:return(e.displayName||`Context`)+`.Consumer`;case ne:return(e._context.displayName||`Context`)+`.Provider`;case ie:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case oe:return t=e.displayName||null,t===null?_e(e.type)||`Memo`:t;case se:t=e._payload,e=e._init;try{return _e(e(t))}catch{}}return null}function E(e){var t=e.type;switch(e.tag){case 24:return`Cache`;case 9:return(t.displayName||`Context`)+`.Consumer`;case 10:return(t._context.displayName||`Context`)+`.Provider`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return _e(t);case 8:return t===ee?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t}return null}function D(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function ve(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function ye(e){var t=ve(e)?`checked`:`value`,n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=``+e[t];if(!e.hasOwnProperty(t)&&n!==void 0&&typeof n.get==`function`&&typeof n.set==`function`){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function be(e){e._valueTracker||=ye(e)}function xe(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=ve(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function Se(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ce(e,t){var n=t.checked;return de({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function we(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=D(t.value==null?n:t.value),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type===`checkbox`||t.type===`radio`?t.checked!=null:t.value!=null}}function Te(e,t){t=t.checked,t!=null&&b(e,`checked`,t,!1)}function Ee(e,t){Te(e,t);var n=D(t.value),r=t.type;if(n!=null)r===`number`?(n===0&&e.value===``||e.value!=n)&&(e.value=``+n):e.value!==``+n&&(e.value=``+n);else if(r===`submit`||r===`reset`){e.removeAttribute(`value`);return}t.hasOwnProperty(`value`)?O(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&O(e,t.type,D(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function De(e,t,n){if(t.hasOwnProperty(`value`)||t.hasOwnProperty(`defaultValue`)){var r=t.type;if(!(r!==`submit`&&r!==`reset`||t.value!==void 0&&t.value!==null))return;t=``+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==``&&(e.name=``),e.defaultChecked=!!e._wrapperState.initialChecked,n!==``&&(e.name=n)}function O(e,t,n){(t!==`number`||Se(e.ownerDocument)!==e)&&(n==null?e.defaultValue=``+e._wrapperState.initialValue:e.defaultValue!==``+n&&(e.defaultValue=``+n))}var Oe=Array.isArray;function k(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+D(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function ke(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(r(91));return de({},t,{value:void 0,defaultValue:void 0,children:``+e._wrapperState.initialValue})}function Ae(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(r(92));if(Oe(n)){if(1<n.length)throw Error(r(93));n=n[0]}t=n}t??=``,n=t}e._wrapperState={initialValue:D(n)}}function je(e,t){var n=D(t.value),r=D(t.defaultValue);n!=null&&(n=``+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=``+r)}function Me(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==``&&t!==null&&(e.value=t)}function Ne(e){switch(e){case`svg`:return`http://www.w3.org/2000/svg`;case`math`:return`http://www.w3.org/1998/Math/MathML`;default:return`http://www.w3.org/1999/xhtml`}}function A(e,t){return e==null||e===`http://www.w3.org/1999/xhtml`?Ne(t):e===`http://www.w3.org/2000/svg`&&t===`foreignObject`?`http://www.w3.org/1999/xhtml`:e}var Pe,Fe=function(e){return typeof MSApp<`u`&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,i)})}:e}(function(e,t){if(e.namespaceURI!==`http://www.w3.org/2000/svg`||`innerHTML`in e)e.innerHTML=t;else{for(Pe||=document.createElement(`div`),Pe.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Pe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Ie(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Le={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Re=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Le).forEach(function(e){Re.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Le[t]=Le[e]})});function ze(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Le.hasOwnProperty(e)&&Le[e]?(``+t).trim():t+`px`}function Be(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=ze(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var Ve=de({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function He(e,t){if(t){if(Ve[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(r(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(r(60));if(typeof t.dangerouslySetInnerHTML!=`object`||!(`__html`in t.dangerouslySetInnerHTML))throw Error(r(61))}if(t.style!=null&&typeof t.style!=`object`)throw Error(r(62))}}function Ue(e,t){if(e.indexOf(`-`)===-1)return typeof t.is==`string`;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 We=null;function Ge(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ke=null,qe=null,Je=null;function Ye(e){if(e=Yi(e)){if(typeof Ke!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Zi(t),Ke(e.stateNode,e.type,t))}}function Xe(e){qe?Je?Je.push(e):Je=[e]:qe=e}function Ze(){if(qe){var e=qe,t=Je;if(Je=qe=null,Ye(e),t)for(e=0;e<t.length;e++)Ye(t[e])}}function Qe(e,t){return e(t)}function $e(){}var et=!1;function tt(e,t,n){if(et)return e(t,n);et=!0;try{return Qe(e,t,n)}finally{et=!1,(qe!==null||Je!==null)&&($e(),Ze())}}function nt(e,t){var n=e.stateNode;if(n===null)return null;var i=Zi(n);if(i===null)return null;n=i[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(i=!i.disabled)||(e=e.type,i=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!i;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(r(231,t,typeof n));return n}var rt=!1;if(c)try{var it={};Object.defineProperty(it,"passive",{get:function(){rt=!0}}),window.addEventListener(`test`,it,it),window.removeEventListener(`test`,it,it)}catch{rt=!1}function at(e,t,n,r,i,a,o,s,c){var l=Array.prototype.slice.call(arguments,3);try{t.apply(n,l)}catch(e){this.onError(e)}}var ot=!1,st=null,ct=!1,lt=null,ut={onError:function(e){ot=!0,st=e}};function dt(e,t,n,r,i,a,o,s,c){ot=!1,st=null,at.apply(ut,arguments)}function ft(e,t,n,i,a,o,s,c,l){if(dt.apply(this,arguments),ot){if(ot){var u=st;ot=!1,st=null}else throw Error(r(198));ct||(ct=!0,lt=u)}}function pt(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function mt(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 ht(e){if(pt(e)!==e)throw Error(r(188))}function gt(e){var t=e.alternate;if(!t){if(t=pt(e),t===null)throw Error(r(188));return t===e?e:null}for(var n=e,i=t;;){var a=n.return;if(a===null)break;var o=a.alternate;if(o===null){if(i=a.return,i!==null){n=i;continue}break}if(a.child===o.child){for(o=a.child;o;){if(o===n)return ht(a),e;if(o===i)return ht(a),t;o=o.sibling}throw Error(r(188))}if(n.return!==i.return)n=a,i=o;else{for(var s=!1,c=a.child;c;){if(c===n){s=!0,n=a,i=o;break}if(c===i){s=!0,i=a,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,i=a;break}if(c===i){s=!0,i=o,n=a;break}c=c.sibling}if(!s)throw Error(r(189))}}if(n.alternate!==i)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function _t(e){return e=gt(e),e===null?null:vt(e)}function vt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=vt(e);if(t!==null)return t;e=e.sibling}return null}var yt=n.unstable_scheduleCallback,bt=n.unstable_cancelCallback,xt=n.unstable_shouldYield,St=n.unstable_requestPaint,Ct=n.unstable_now,wt=n.unstable_getCurrentPriorityLevel,Tt=n.unstable_ImmediatePriority,Et=n.unstable_UserBlockingPriority,Dt=n.unstable_NormalPriority,Ot=n.unstable_LowPriority,kt=n.unstable_IdlePriority,At=null,jt=null;function Mt(e){if(jt&&typeof jt.onCommitFiberRoot==`function`)try{jt.onCommitFiberRoot(At,e,void 0,(e.current.flags&128)==128)}catch{}}var Nt=Math.clz32?Math.clz32:It,Pt=Math.log,Ft=Math.LN2;function It(e){return e>>>=0,e===0?32:31-(Pt(e)/Ft|0)|0}var Lt=64,Rt=4194304;function zt(e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bt(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=n&268435455;if(o!==0){var s=o&~i;s===0?(a&=o,a!==0&&(r=zt(a))):r=zt(s)}else o=n&~i,o===0?a!==0&&(r=zt(a)):r=zt(o);if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===16&&a&4194240))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-Nt(t),i=1<<n,r|=e[n],t&=~i;return r}function Vt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ht(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Nt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Vt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Ut(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Wt(){var e=Lt;return Lt<<=1,!(Lt&4194240)&&(Lt=64),e}function Gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Kt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Nt(t),e[t]=n}function qt(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-Nt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Jt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Nt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Yt=0;function Xt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Zt,Qt,$t,en,tn,nn=!1,rn=[],an=null,on=null,sn=null,cn=new Map,ln=new Map,un=[],dn=`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 submit`.split(` `);function fn(e,t){switch(e){case`focusin`:case`focusout`:an=null;break;case`dragenter`:case`dragleave`:on=null;break;case`mouseover`:case`mouseout`:sn=null;break;case`pointerover`:case`pointerout`:cn.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:ln.delete(t.pointerId)}}function pn(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Yi(t),t!==null&&Qt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function mn(e,t,n,r,i){switch(t){case`focusin`:return an=pn(an,e,t,n,r,i),!0;case`dragenter`:return on=pn(on,e,t,n,r,i),!0;case`mouseover`:return sn=pn(sn,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return cn.set(a,pn(cn.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,ln.set(a,pn(ln.get(a)||null,e,t,n,r,i)),!0}return!1}function hn(e){var t=Ji(e.target);if(t!==null){var n=pt(t);if(n!==null){if(t=n.tag,t===13){if(t=mt(n),t!==null){e.blockedOn=t,tn(e.priority,function(){$t(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 gn(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Dn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);We=r,n.target.dispatchEvent(r),We=null}else return t=Yi(n),t!==null&&Qt(t),e.blockedOn=n,!1;t.shift()}return!0}function _n(e,t,n){gn(e)&&n.delete(t)}function vn(){nn=!1,an!==null&&gn(an)&&(an=null),on!==null&&gn(on)&&(on=null),sn!==null&&gn(sn)&&(sn=null),cn.forEach(_n),ln.forEach(_n)}function yn(e,t){e.blockedOn===t&&(e.blockedOn=null,nn||(nn=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,vn)))}function bn(e){function t(t){return yn(t,e)}if(0<rn.length){yn(rn[0],e);for(var n=1;n<rn.length;n++){var r=rn[n];r.blockedOn===e&&(r.blockedOn=null)}}for(an!==null&&yn(an,e),on!==null&&yn(on,e),sn!==null&&yn(sn,e),cn.forEach(t),ln.forEach(t),n=0;n<un.length;n++)r=un[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<un.length&&(n=un[0],n.blockedOn===null);)hn(n),n.blockedOn===null&&un.shift()}var xn=x.ReactCurrentBatchConfig,Sn=!0;function Cn(e,t,n,r){var i=Yt,a=xn.transition;xn.transition=null;try{Yt=1,Tn(e,t,n,r)}finally{Yt=i,xn.transition=a}}function wn(e,t,n,r){var i=Yt,a=xn.transition;xn.transition=null;try{Yt=4,Tn(e,t,n,r)}finally{Yt=i,xn.transition=a}}function Tn(e,t,n,r){if(Sn){var i=Dn(e,t,n,r);if(i===null)bi(e,t,r,En,n),fn(e,r);else if(mn(i,e,t,n,r))r.stopPropagation();else if(fn(e,r),t&4&&-1<dn.indexOf(e)){for(;i!==null;){var a=Yi(i);if(a!==null&&Zt(a),a=Dn(e,t,n,r),a===null&&bi(e,t,r,En,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else bi(e,t,r,null,n)}}var En=null;function Dn(e,t,n,r){if(En=null,e=Ge(r),e=Ji(e),e!==null){if(t=pt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=mt(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 En=e,null}function On(e){switch(e){case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 1;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`toggle`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 4;case`message`:switch(wt()){case Tt:return 1;case Et:return 4;case Dt:case Ot:return 16;case kt:return 536870912;default:return 16}default:return 16}}var kn=null,An=null,j=null;function jn(){if(j)return j;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return j=i.slice(e,1<r?1-r:void 0)}function Mn(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 Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return de(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=de({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=de({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:er,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!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(de({},Un,{dataTransfer:0})),Kn=Fn(de({},Rn,{relatedTarget:0})),qn=Fn(de({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Jn=Fn(de({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Yn=Fn(de({},In,{data:0})),Xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Zn={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`},Qn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function $n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qn[e])?!!t[e]:!1}function er(){return $n}var tr=Fn(de({},Rn,{key:function(e){if(e.key){var t=Xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:er,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),nr=Fn(de({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),rr=Fn(de({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:er})),ir=Fn(de({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),ar=Fn(de({},Un,{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})),or=[9,13,27,32],sr=c&&`CompositionEvent`in window,cr=null;c&&`documentMode`in document&&(cr=document.documentMode);var lr=c&&`TextEvent`in window&&!cr,ur=c&&(!sr||cr&&8<cr&&11>=cr),dr=` `,fr=!1;function pr(e,t){switch(e){case`keyup`:return or.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var hr=!1;function gr(e,t){switch(e){case`compositionend`:return mr(t);case`keypress`:return t.which===32?(fr=!0,dr):null;case`textInput`:return e=t.data,e===dr&&fr?null:e;default:return null}}function _r(e,t){if(hr)return e===`compositionend`||!sr&&pr(e,t)?(e=jn(),j=An=kn=null,hr=!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 ur&&t.locale!==`ko`?null:t.data;default:return null}}var vr={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 yr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!vr[e.type]:t===`textarea`}function br(e,t,n,r){Xe(r),t=Si(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var xr=null,Sr=null;function Cr(e){mi(e,0)}function wr(e){if(xe(Xi(e)))return e}function Tr(e,t){if(e===`change`)return t}var Er=!1;if(c){var Dr;if(c){var Or=`oninput`in document;if(!Or){var kr=document.createElement(`div`);kr.setAttribute(`oninput`,`return;`),Or=typeof kr.oninput==`function`}Dr=Or}else Dr=!1;Er=Dr&&(!document.documentMode||9<document.documentMode)}function Ar(){xr&&(xr.detachEvent(`onpropertychange`,jr),Sr=xr=null)}function jr(e){if(e.propertyName===`value`&&wr(Sr)){var t=[];br(t,Sr,e,Ge(e)),tt(Cr,t)}}function Mr(e,t,n){e===`focusin`?(Ar(),xr=t,Sr=n,xr.attachEvent(`onpropertychange`,jr)):e===`focusout`&&Ar()}function Nr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return wr(Sr)}function Pr(e,t){if(e===`click`)return wr(t)}function Fr(e,t){if(e===`input`||e===`change`)return wr(t)}function Ir(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Lr=typeof Object.is==`function`?Object.is:Ir;function Rr(e,t){if(Lr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!l.call(t,i)||!Lr(e[i],t[i]))return!1}return!0}function zr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Br(e,t){var n=zr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=zr(n)}}function Vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hr(){for(var e=window,t=Se();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Se(e.document)}return t}function Ur(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`)}function Wr(e){var t=Hr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Vr(n.ownerDocument.documentElement,n)){if(r!==null&&Ur(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),`selectionStart`in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=r.end===void 0?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=Br(n,a);var o=Br(n,r);i&&o&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus==`function`&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Gr=c&&`documentMode`in document&&11>=document.documentMode,Kr=null,qr=null,Jr=null,Yr=!1;function Xr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Yr||Kr==null||Kr!==Se(r)||(r=Kr,`selectionStart`in r&&Ur(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}),Jr&&Rr(Jr,r)||(Jr=r,r=Si(qr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Kr)))}function Zr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Qr={animationend:Zr(`Animation`,`AnimationEnd`),animationiteration:Zr(`Animation`,`AnimationIteration`),animationstart:Zr(`Animation`,`AnimationStart`),transitionend:Zr(`Transition`,`TransitionEnd`)},$r={},ei={};c&&(ei=document.createElement(`div`).style,`AnimationEvent`in window||(delete Qr.animationend.animation,delete Qr.animationiteration.animation,delete Qr.animationstart.animation),`TransitionEvent`in window||delete Qr.transitionend.transition);function ti(e){if($r[e])return $r[e];if(!Qr[e])return e;var t=Qr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ei)return $r[e]=t[n];return e}var ni=ti(`animationend`),ri=ti(`animationiteration`),ii=ti(`animationstart`),ai=ti(`transitionend`),oi=new Map,si=`abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);function ci(e,t){oi.set(e,t),o(t,[e])}for(var li=0;li<si.length;li++){var ui=si[li];ci(ui.toLowerCase(),`on`+(ui[0].toUpperCase()+ui.slice(1)))}ci(ni,`onAnimationEnd`),ci(ri,`onAnimationIteration`),ci(ii,`onAnimationStart`),ci(`dblclick`,`onDoubleClick`),ci(`focusin`,`onFocus`),ci(`focusout`,`onBlur`),ci(ai,`onTransitionEnd`),s(`onMouseEnter`,[`mouseout`,`mouseover`]),s(`onMouseLeave`,[`mouseout`,`mouseover`]),s(`onPointerEnter`,[`pointerout`,`pointerover`]),s(`onPointerLeave`,[`pointerout`,`pointerover`]),o(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),o(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),o(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),o(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),o(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var di=`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(` `),fi=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(di));function pi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,ft(r,t,void 0,e),e.currentTarget=null}function mi(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;pi(i,s,l),a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;pi(i,s,l),a=c}}}if(ct)throw e=lt,ct=!1,lt=null,e}function hi(e,t){var n=t[Gi];n===void 0&&(n=t[Gi]=new Set);var r=e+`__bubble`;n.has(r)||(yi(t,e,2,!1),n.add(r))}function gi(e,t,n){var r=0;t&&(r|=4),yi(n,e,r,t)}var _i=`_reactListening`+Math.random().toString(36).slice(2);function vi(e){if(!e[_i]){e[_i]=!0,i.forEach(function(t){t!==`selectionchange`&&(fi.has(t)||gi(t,!1,e),gi(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[_i]||(t[_i]=!0,gi(`selectionchange`,!1,t))}}function yi(e,t,n,r){switch(On(t)){case 1:var i=Cn;break;case 4:i=wn;break;default:i=Tn}n=i.bind(null,t,n,e),i=void 0,!rt||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function bi(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i||s.nodeType===8&&s.parentNode===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&(c=o.stateNode.containerInfo,c===i||c.nodeType===8&&c.parentNode===i))return;o=o.return}for(;s!==null;){if(o=Ji(s),o===null)return;if(c=o.tag,c===5||c===6){r=a=o;continue a}s=s.parentNode}}r=r.return}tt(function(){var r=a,i=Ge(n),o=[];a:{var s=oi.get(e);if(s!==void 0){var c=Ln,l=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:c=tr;break;case`focusin`:l=`focus`,c=Kn;break;case`focusout`:l=`blur`,c=Kn;break;case`beforeblur`:case`afterblur`:c=Kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:c=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=rr;break;case ni:case ri:case ii:c=qn;break;case ai:c=ir;break;case`scroll`:c=zn;break;case`wheel`:c=ar;break;case`copy`:case`cut`:case`paste`:c=Jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=nr}var u=!!(t&4),d=!u&&e===`scroll`,f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){m=p;var h=m.stateNode;if(m.tag===5&&h!==null&&(m=h,f!==null&&(h=nt(p,f),h!=null&&u.push(xi(p,h,m)))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==We&&(l=n.relatedTarget||n.fromElement)&&(Ji(l)||l[M]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ji(l):null,l!==null&&(d=pt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Wn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=nr,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:Xi(c),m=l==null?s:Xi(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ji(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=c,f=l,p=0,m=u;m;m=Ci(m))p++;for(m=0,h=f;h;h=Ci(h))m++;for(;0<p-m;)u=Ci(u),p--;for(;0<m-p;)f=Ci(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=Ci(u),f=Ci(f)}u=null}else u=null;c!==null&&wi(o,s,c,u,!1),l!==null&&d!==null&&wi(o,d,l,u,!0)}}a:{if(s=r?Xi(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var g=Tr;else if(yr(s)){if(Er)g=Fr;else{g=Nr;var _=Mr}}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Pr);if(g&&=g(e,r)){br(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&O(s,`number`,s.value)}switch(_=r?Xi(r):window,e){case`focusin`:(yr(_)||_.contentEditable===`true`)&&(Kr=_,qr=r,Jr=null);break;case`focusout`:Jr=qr=Kr=null;break;case`mousedown`:Yr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Yr=!1,Xr(o,n,i);break;case`selectionchange`:if(Gr)break;case`keydown`:case`keyup`:Xr(o,n,i)}var v;if(sr)b:{switch(e){case`compositionstart`:var y=`onCompositionStart`;break b;case`compositionend`:y=`onCompositionEnd`;break b;case`compositionupdate`:y=`onCompositionUpdate`;break b}y=void 0}else hr?pr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(ur&&n.locale!==`ko`&&(hr||y!==`onCompositionStart`?y===`onCompositionEnd`&&hr&&(v=jn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,hr=!0)),_=Si(r,y),0<_.length&&(y=new Yn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=mr(n),v!==null&&(y.data=v)))),(v=lr?gr(e,n):_r(e,n))&&(r=Si(r,`onBeforeInput`),0<r.length&&(i=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}mi(o,t)})}function xi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Si(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=nt(e,n),a!=null&&r.unshift(xi(e,a,i)),a=nt(e,t),a!=null&&r.push(xi(e,a,i))),e=e.return}return r}function Ci(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function wi(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(c!==null&&c===r)break;s.tag===5&&l!==null&&(s=l,i?(c=nt(n,a),c!=null&&o.unshift(xi(n,c,s))):i||(c=nt(n,a),c!=null&&o.push(xi(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ti=/\r\n?/g,Ei=/\u0000|\uFFFD/g;function Di(e){return(typeof e==`string`?e:``+e).replace(Ti,`
8
8
  `).replace(Ei,``)}function Oi(e,t,n){if(t=Di(t),Di(e)!==t&&n)throw Error(r(425))}function ki(){}var Ai=null,ji=null;function Mi(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ni=typeof setTimeout==`function`?setTimeout:void 0,Pi=typeof clearTimeout==`function`?clearTimeout:void 0,Fi=typeof Promise==`function`?Promise:void 0,Ii=typeof queueMicrotask==`function`?queueMicrotask:Fi===void 0?Ni:function(e){return Fi.resolve(null).then(e).catch(Li)};function Li(e){setTimeout(function(){throw e})}function Ri(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`){if(r===0){e.removeChild(i),bn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++}n=i}while(n);bn(t)}function zi(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===`$?`)break;if(t===`/$`)return null}}return e}function Bi(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`){if(t===0)return e;t--}else n===`/$`&&t++}e=e.previousSibling}return null}var Vi=Math.random().toString(36).slice(2),Hi=`__reactFiber$`+Vi,Ui=`__reactProps$`+Vi,M=`__reactContainer$`+Vi,Gi=`__reactEvents$`+Vi,Ki=`__reactListeners$`+Vi,qi=`__reactHandles$`+Vi;function Ji(e){var t=e[Hi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[M]||n[Hi]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Bi(e);e!==null;){if(n=e[Hi])return n;e=Bi(e)}return t}e=n,n=e.parentNode}return null}function Yi(e){return e=e[Hi]||e[M],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(r(33))}function Zi(e){return e[Ui]||null}var Qi=[],$i=-1;function ea(e){return{current:e}}function ta(e){0>$i||(e.current=Qi[$i],Qi[$i]=null,$i--)}function na(e,t){$i++,Qi[$i]=e.current,e.current=t}var ra={},ia=ea(ra),aa=ea(!1),oa=ra;function sa(e,t){var n=e.type.contextTypes;if(!n)return ra;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in n)i[a]=t[a];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function ca(e){return e=e.childContextTypes,e!=null}function la(){ta(aa),ta(ia)}function ua(e,t,n){if(ia.current!==ra)throw Error(r(168));na(ia,t),na(aa,n)}function da(e,t,n){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!=`function`)return n;for(var a in i=i.getChildContext(),i)if(!(a in t))throw Error(r(108,E(e)||`Unknown`,a));return de({},n,i)}function fa(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ra,oa=ia.current,na(ia,e),na(aa,aa.current),!0}function pa(e,t,n){var i=e.stateNode;if(!i)throw Error(r(169));n?(e=da(e,t,oa),i.__reactInternalMemoizedMergedChildContext=e,ta(aa),ta(ia),na(ia,e)):ta(aa),na(aa,n)}var ma=null,ha=!1,ga=!1;function _a(e){ma===null?ma=[e]:ma.push(e)}function va(e){ha=!0,_a(e)}function ya(){if(!ga&&ma!==null){ga=!0;var e=0,t=Yt;try{var n=ma;for(Yt=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ma=null,ha=!1}catch(t){throw ma!==null&&(ma=ma.slice(e+1)),yt(Tt,ya),t}finally{Yt=t,ga=!1}}return null}var ba=[],xa=0,Sa=null,Ca=0,wa=[],Ta=0,Ea=null,Da=1,Oa=``;function ka(e,t){ba[xa++]=Ca,ba[xa++]=Sa,Sa=e,Ca=t}function Aa(e,t,n){wa[Ta++]=Da,wa[Ta++]=Oa,wa[Ta++]=Ea,Ea=e;var r=Da;e=Oa;var i=32-Nt(r)-1;r&=~(1<<i),n+=1;var a=32-Nt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Da=1<<32-Nt(t)+i|n<<i|r,Oa=a+e}else Da=1<<a|n<<i|r,Oa=e}function ja(e){e.return!==null&&(ka(e,1),Aa(e,1,0))}function Ma(e){for(;e===Sa;)Sa=ba[--xa],ba[xa]=null,Ca=ba[--xa],ba[xa]=null;for(;e===Ea;)Ea=wa[--Ta],wa[Ta]=null,Oa=wa[--Ta],wa[Ta]=null,Da=wa[--Ta],wa[Ta]=null}var Na=null,Pa=null,Fa=!1,Ia=null;function La(e,t){var n=du(5,null,null,0);n.elementType=`DELETED`,n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function Ra(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null&&(e.stateNode=t,Na=e,Pa=zi(t.firstChild),!0);case 6:return t=e.pendingProps===``||t.nodeType!==3?null:t,t!==null&&(e.stateNode=t,Na=e,Pa=null,!0);case 13:return t=t.nodeType===8?t:null,t!==null&&(n=Ea===null?null:{id:Da,overflow:Oa},e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=du(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Na=e,Pa=null,!0);default:return!1}}function za(e){return!!(e.mode&1)&&!(e.flags&128)}function Ba(e){if(Fa){var t=Pa;if(t){var n=t;if(!Ra(e,t)){if(za(e))throw Error(r(418));t=zi(n.nextSibling);var i=Na;t&&Ra(e,t)?La(i,n):(e.flags=e.flags&-4097|2,Fa=!1,Na=e)}}else{if(za(e))throw Error(r(418));e.flags=e.flags&-4097|2,Fa=!1,Na=e}}}function Va(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Na=e}function Ha(e){if(e!==Na)return!1;if(!Fa)return Va(e),Fa=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!==`head`&&t!==`body`&&!Mi(e.type,e.memoizedProps)),t&&=Pa){if(za(e))throw Ua(),Error(r(418));for(;t;)La(e,t),t=zi(t.nextSibling)}if(Va(e),e.tag===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(r(317));a:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`){if(t===0){Pa=zi(e.nextSibling);break a}t--}else n!==`$`&&n!==`$!`&&n!==`$?`||t++}e=e.nextSibling}Pa=null}}else Pa=Na?zi(e.stateNode.nextSibling):null;return!0}function Ua(){for(var e=Pa;e;)e=zi(e.nextSibling)}function Wa(){Pa=Na=null,Fa=!1}function Ga(e){Ia===null?Ia=[e]:Ia.push(e)}var Ka=x.ReactCurrentBatchConfig;function qa(e,t,n){if(e=n.ref,e!==null&&typeof e!=`function`&&typeof e!=`object`){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(r(309));var i=n.stateNode}if(!i)throw Error(r(147,e));var a=i,o=``+e;return t!==null&&t.ref!==null&&typeof t.ref==`function`&&t.ref._stringRef===o?t.ref:(t=function(e){var t=a.refs;e===null?delete t[o]:t[o]=e},t._stringRef=o,t)}if(typeof e!=`string`)throw Error(r(284));if(!n._owner)throw Error(r(290,e))}return e}function Ja(e,t){throw e=Object.prototype.toString.call(t),Error(r(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e))}function Ya(e){var t=e._init;return t(e._payload)}function Xa(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function i(e,t){for(e=new Map;t!==null;)t.key===null?e.set(t.index,t):e.set(t.key,t),t=t.sibling;return e}function a(e,t){return e=mu(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=2,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=2),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=vu(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===w?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===se&&Ya(i)===t.type)?(r=a(t,n.props),r.ref=qa(e,t,n),r.return=e,r):(r=hu(n.type,n.key,n.props,null,e.mode,r),r.ref=qa(e,t,n),r.return=e,r)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=yu(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=gu(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`)return t=vu(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case S:return n=hu(t.type,t.key,t.props,null,e.mode,n),n.ref=qa(e,null,t),n.return=e,n;case C:return t=yu(t,e.mode,n),t.return=e,t;case se:var r=t._init;return f(e,r(t._payload),n)}if(Oe(t)||ue(t))return t=gu(t,e.mode,n,null),t.return=e,t;Ja(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case S:return n.key===i?l(e,t,n,r):null;case C:return n.key===i?u(e,t,n,r):null;case se:return i=n._init,p(e,t,i(n._payload),r)}if(Oe(n)||ue(n))return i===null?d(e,t,n,r,null):null;Ja(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case S:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case C:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case se:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Oe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);Ja(t,r)}return null}function h(r,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(r,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(r,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(r,d),Fa&&ka(r,h),l;if(d===null){for(;h<s.length;h++)d=f(r,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Fa&&ka(r,h),l}for(d=i(r,d);h<s.length;h++)g=m(d,r,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(r,e)}),Fa&&ka(r,h),l}function g(a,s,c,l){var u=ue(c);if(typeof u!=`function`)throw Error(r(150));if(c=u.call(c),c==null)throw Error(r(151));for(var d=u=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Fa&&ka(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Fa&&ka(a,g),u}for(h=i(a,h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Fa&&ka(a,g),u}function _(e,r,i,o){if(typeof i==`object`&&i&&i.type===w&&i.key===null&&(i=i.props.children),typeof i==`object`&&i){switch(i.$$typeof){case S:a:{for(var c=i.key,l=r;l!==null;){if(l.key===c){if(c=i.type,c===w){if(l.tag===7){n(e,l.sibling),r=a(l,i.props.children),r.return=e,e=r;break a}}else if(l.elementType===c||typeof c==`object`&&c&&c.$$typeof===se&&Ya(c)===l.type){n(e,l.sibling),r=a(l,i.props),r.ref=qa(e,l,i),r.return=e,e=r;break a}n(e,l);break}t(e,l),l=l.sibling}i.type===w?(r=gu(i.props.children,e.mode,o,i.key),r.return=e,e=r):(o=hu(i.type,i.key,i.props,null,e.mode,o),o.ref=qa(e,r,i),o.return=e,e=o)}return s(e);case C:a:{for(l=i.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),r=a(r,i.children||[]),r.return=e,e=r;break a}n(e,r);break}t(e,r),r=r.sibling}r=yu(i,e.mode,o),r.return=e,e=r}return s(e);case se:return l=i._init,_(e,r,l(i._payload),o)}if(Oe(i))return h(e,r,i,o);if(ue(i))return g(e,r,i,o);Ja(e,i)}return typeof i==`string`&&i!==``||typeof i==`number`?(i=``+i,r!==null&&r.tag===6?(n(e,r.sibling),r=a(r,i),r.return=e,e=r):(n(e,r),r=vu(i,e.mode,o),r.return=e,e=r),s(e)):n(e,r)}return _}var Za=Xa(!0),Qa=Xa(!1),$a=ea(null),eo=null,to=null,no=null;function ro(){no=to=eo=null}function io(e){var t=$a.current;ta($a),e._currentValue=t}function ao(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function oo(e,t){eo=e,no=to=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Xs=!0),e.firstContext=null)}function so(e){var t=e._currentValue;if(no!==e){if(e={context:e,memoizedValue:t,next:null},to===null){if(eo===null)throw Error(r(308));to=e,eo.dependencies={lanes:0,firstContext:e}}else to=to.next=e}return t}var co=null;function lo(e){co===null?co=[e]:co.push(e)}function uo(e,t,n,r){var i=t.interleaved;return i===null?(n.next=n,lo(t)):(n.next=i.next,i.next=n),t.interleaved=n,fo(e,r)}function fo(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var po=!1;function mo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ho(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function go(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function _o(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,al&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,fo(e,n)}return i=r.interleaved,i===null?(t.next=t,lo(r)):(t.next=i.next,i.next=t),r.interleaved=t,fo(e,n)}function vo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194240)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jt(e,n)}}function yo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bo(e,t,n,r){var i=e.updateQueue;po=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane,p=s.eventTime;if((r&f)===f){u!==null&&(u=u.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});a:{var m=e,h=s;switch(f=t,p=n,h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(p,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(p,d,f):m,f==null)break a;d=de({},d,f);break a;case 2:po=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=i.effects,f===null?i.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(1);if(u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,t=i.shared.interleaved,t!==null){i=t;do o|=i.lane,i=i.next;while(i!==t)}else a===null&&(i.shared.lanes=0);pl|=o,e.lanes=o,e.memoizedState=d}}function xo(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=n,typeof a!=`function`)throw Error(r(191,a));a.call(i)}}}var So={},Co=ea(So),wo=ea(So),To=ea(So);function Eo(e){if(e===So)throw Error(r(174));return e}function Do(e,t){switch(na(To,t),na(wo,e),na(Co,So),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:A(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=A(t,e)}ta(Co),na(Co,t)}function Oo(){ta(Co),ta(wo),ta(To)}function ko(e){Eo(To.current);var t=Eo(Co.current),n=A(t,e.type);t!==n&&(na(wo,e),na(Co,n))}function Ao(e){wo.current===e&&(ta(Co),ta(wo))}var jo=ea(0);function Mo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data===`$?`||n.data===`$!`))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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 No=[];function Po(){for(var e=0;e<No.length;e++)No[e]._workInProgressVersionPrimary=null;No.length=0}var Fo=x.ReactCurrentDispatcher,Io=x.ReactCurrentBatchConfig,Lo=0,Ro=null,zo=null,Bo=null,Vo=!1,Ho=!1,Uo=0,Wo=0;function Go(){throw Error(r(321))}function Ko(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Lr(e[n],t[n]))return!1;return!0}function qo(e,t,n,i,a,o){if(Lo=o,Ro=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Fo.current=e===null||e.memoizedState===null?As:js,e=n(i,a),Ho){o=0;do{if(Ho=!1,Uo=0,25<=o)throw Error(r(301));o+=1,Bo=zo=null,t.updateQueue=null,Fo.current=Ms,e=n(i,a)}while(Ho)}if(Fo.current=ks,t=zo!==null&&zo.next!==null,Lo=0,Bo=zo=Ro=null,Vo=!1,t)throw Error(r(300));return e}function Jo(){var e=Uo!==0;return Uo=0,e}function Yo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bo===null?Ro.memoizedState=Bo=e:Bo=Bo.next=e,Bo}function Xo(){if(zo===null){var e=Ro.alternate;e=e===null?null:e.memoizedState}else e=zo.next;var t=Bo===null?Ro.memoizedState:Bo.next;if(t!==null)Bo=t,zo=e;else{if(e===null)throw Error(r(310));zo=e,e={memoizedState:zo.memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},Bo===null?Ro.memoizedState=Bo=e:Bo=Bo.next=e}return Bo}function Zo(e,t){return typeof t==`function`?t(e):t}function Qo(e){var t=Xo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=zo,a=i.baseQueue,o=n.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}i.baseQueue=a=o,n.pending=null}if(a!==null){o=a.next,i=i.baseState;var c=s=null,l=null,u=o;do{var d=u.lane;if((Lo&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),i=u.hasEagerState?u.eagerState:e(i,u.action);else{var f={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(c=l=f,s=i):l=l.next=f,Ro.lanes|=d,pl|=d}u=u.next}while(u!==null&&u!==o);l===null?s=i:l.next=c,Lr(i,t.memoizedState)||(Xs=!0),t.memoizedState=i,t.baseState=s,t.baseQueue=l,n.lastRenderedState=i}if(e=n.interleaved,e!==null){a=e;do o=a.lane,Ro.lanes|=o,pl|=o,a=a.next;while(a!==e)}else a===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function $o(e){var t=Xo(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var i=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Lr(o,t.memoizedState)||(Xs=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,i]}function es(){}function ts(e,t){var n=Ro,i=Xo(),a=t(),o=!Lr(i.memoizedState,a);if(o&&(i.memoizedState=a,Xs=!0),i=i.queue,ps(is.bind(null,n,i,e),[e]),i.getSnapshot!==t||o||Bo!==null&&Bo.memoizedState.tag&1){if(n.flags|=2048,cs(9,rs.bind(null,n,i,a,t),void 0,null),ol===null)throw Error(r(349));Lo&30||ns(n,t,a)}return a}function ns(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ro.updateQueue,t===null?(t={lastEffect:null,stores:null},Ro.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rs(e,t,n,r){t.value=n,t.getSnapshot=r,as(t)&&os(e)}function is(e,t,n){return n(function(){as(t)&&os(e)})}function as(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Lr(e,n)}catch{return!0}}function os(e){var t=fo(e,1);t!==null&&Nl(t,e,1,-1)}function ss(e){var t=Yo();return typeof e==`function`&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Zo,lastRenderedState:e},t.queue=e,e=e.dispatch=Ts.bind(null,Ro,e),[t.memoizedState,e]}function cs(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Ro.updateQueue,t===null?(t={lastEffect:null,stores:null},Ro.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ls(){return Xo().memoizedState}function us(e,t,n,r){var i=Yo();Ro.flags|=e,i.memoizedState=cs(1|t,n,void 0,r===void 0?null:r)}function ds(e,t,n,r){var i=Xo();r=r===void 0?null:r;var a=void 0;if(zo!==null){var o=zo.memoizedState;if(a=o.destroy,r!==null&&Ko(r,o.deps)){i.memoizedState=cs(t,n,a,r);return}}Ro.flags|=e,i.memoizedState=cs(1|t,n,a,r)}function fs(e,t){return us(8390656,8,e,t)}function ps(e,t){return ds(2048,8,e,t)}function ms(e,t){return ds(4,2,e,t)}function hs(e,t){return ds(4,4,e,t)}function gs(e,t){if(typeof t==`function`)return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function _s(e,t,n){return n=n==null?null:n.concat([e]),ds(4,4,gs.bind(null,t,e),n)}function vs(){}function ys(e,t){var n=Xo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ko(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function bs(e,t){var n=Xo();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Ko(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function xs(e,t,n){return Lo&21?(Lr(n,t)||(n=Wt(),Ro.lanes|=n,pl|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Xs=!0),e.memoizedState=n)}function Ss(e,t){var n=Yt;Yt=n!==0&&4>n?n:4,e(!0);var r=Io.transition;Io.transition={};try{e(!1),t()}finally{Yt=n,Io.transition=r}}function Cs(){return Xo().memoizedState}function ws(e,t,n){var r=Ml(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Es(e))Ds(t,n);else if(n=uo(e,t,n,r),n!==null){var i=jl();Nl(n,e,r,i),Os(n,t,r)}}function Ts(e,t,n){var r=Ml(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Es(e))Ds(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o)){var c=t.interleaved;c===null?(i.next=i,lo(t)):(i.next=c.next,c.next=i),t.interleaved=i;return}}catch{}n=uo(e,t,i,r),n!==null&&(i=jl(),Nl(n,e,r,i),Os(n,t,r))}}function Es(e){var t=e.alternate;return e===Ro||t!==null&&t===Ro}function Ds(e,t){Ho=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Os(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Jt(e,n)}}var ks={readContext:so,useCallback:Go,useContext:Go,useEffect:Go,useImperativeHandle:Go,useInsertionEffect:Go,useLayoutEffect:Go,useMemo:Go,useReducer:Go,useRef:Go,useState:Go,useDebugValue:Go,useDeferredValue:Go,useTransition:Go,useMutableSource:Go,useSyncExternalStore:Go,useId:Go,unstable_isNewReconciler:!1},As={readContext:so,useCallback:function(e,t){return Yo().memoizedState=[e,t===void 0?null:t],e},useContext:so,useEffect:fs,useImperativeHandle:function(e,t,n){return n=n==null?null:n.concat([e]),us(4194308,4,gs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return us(4194308,4,e,t)},useInsertionEffect:function(e,t){return us(4,2,e,t)},useMemo:function(e,t){var n=Yo();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Yo();return t=n===void 0?t:n(t),r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=ws.bind(null,Ro,e),[r.memoizedState,e]},useRef:function(e){var t=Yo();return e={current:e},t.memoizedState=e},useState:ss,useDebugValue:vs,useDeferredValue:function(e){return Yo().memoizedState=e},useTransition:function(){var e=ss(!1),t=e[0];return e=Ss.bind(null,e[1]),Yo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var i=Ro,a=Yo();if(Fa){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),ol===null)throw Error(r(349));Lo&30||ns(i,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,fs(is.bind(null,i,o,e),[e]),i.flags|=2048,cs(9,rs.bind(null,i,o,n,t),void 0,null),n},useId:function(){var e=Yo(),t=ol.identifierPrefix;if(Fa){var n=Oa,r=Da;n=(r&~(1<<32-Nt(r)-1)).toString(32)+n,t=`:`+t+`R`+n,n=Uo++,0<n&&(t+=`H`+n.toString(32)),t+=`:`}else n=Wo++,t=`:`+t+`r`+n.toString(32)+`:`;return e.memoizedState=t},unstable_isNewReconciler:!1},js={readContext:so,useCallback:ys,useContext:so,useEffect:ps,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:Qo,useRef:ls,useState:function(){return Qo(Zo)},useDebugValue:vs,useDeferredValue:function(e){return xs(Xo(),zo.memoizedState,e)},useTransition:function(){return[Qo(Zo)[0],Xo().memoizedState]},useMutableSource:es,useSyncExternalStore:ts,useId:Cs,unstable_isNewReconciler:!1},Ms={readContext:so,useCallback:ys,useContext:so,useEffect:ps,useImperativeHandle:_s,useInsertionEffect:ms,useLayoutEffect:hs,useMemo:bs,useReducer:$o,useRef:ls,useState:function(){return $o(Zo)},useDebugValue:vs,useDeferredValue:function(e){var t=Xo();return zo===null?t.memoizedState=e:xs(t,zo.memoizedState,e)},useTransition:function(){return[$o(Zo)[0],Xo().memoizedState]},useMutableSource:es,useSyncExternalStore:ts,useId:Cs,unstable_isNewReconciler:!1};function Ns(e,t){if(e&&e.defaultProps){for(var n in t=de({},t),e=e.defaultProps,e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function Ps(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:de({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fs={isMounted:function(e){return(e=e._reactInternals)?pt(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=jl(),i=Ml(e),a=go(r,i);a.payload=t,n!=null&&(a.callback=n),t=_o(e,a,i),t!==null&&(Nl(t,e,i,r),vo(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=jl(),i=Ml(e),a=go(r,i);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=_o(e,a,i),t!==null&&(Nl(t,e,i,r),vo(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=jl(),r=Ml(e),i=go(n,r);i.tag=2,t!=null&&(i.callback=t),t=_o(e,i,r),t!==null&&(Nl(t,e,r,n),vo(t,e,r))}};function Is(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Rr(n,r)||!Rr(i,a):!0}function Ls(e,t,n){var r=!1,i=ra,a=t.contextType;return typeof a==`object`&&a?a=so(a):(i=ca(t)?oa:ia.current,r=t.contextTypes,a=(r=r!=null)?sa(e,i):ra),t=new t(n,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Fs,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Rs(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&&Fs.enqueueReplaceState(t,t.state,null)}function zs(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs={},mo(e);var a=t.contextType;typeof a==`object`&&a?i.context=so(a):(a=ca(t)?oa:ia.current,i.context=sa(e,a)),i.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a==`function`&&(Ps(e,t,a,n),i.state=e.memoizedState),typeof t.getDerivedStateFromProps==`function`||typeof i.getSnapshotBeforeUpdate==`function`||typeof i.UNSAFE_componentWillMount!=`function`&&typeof i.componentWillMount!=`function`||(t=i.state,typeof i.componentWillMount==`function`&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount==`function`&&i.UNSAFE_componentWillMount(),t!==i.state&&Fs.enqueueReplaceState(i,i.state,null),bo(e,n,i,r),i.state=e.memoizedState),typeof i.componentDidMount==`function`&&(e.flags|=4194308)}function Bs(e,t){try{var n=``,r=t;do n+=ge(r),r=r.return;while(r);var i=n}catch(e){i=`
9
9
  Error generating stack: `+e.message+`
10
- `+e.stack}return{value:e,source:t,stack:i,digest:null}}function Vs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Hs(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Us=typeof WeakMap==`function`?WeakMap:Map;function Ws(e,t,n){n=go(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xl||(xl=!0,Sl=r),Hs(e,t)},n}function Gs(e,t,n){n=go(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Hs(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Hs(e,t),typeof r!=`function`&&(Cl===null?Cl=new Set([this]):Cl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Ks(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Us;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=iu.bind(null,e,t,n),t.then(e,e))}function qs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Js(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=go(-1,1),t.tag=2,_o(n,t,1))),n.lanes|=1),e)}var Ys=x.ReactCurrentOwner,Xs=!1;function Zs(e,t,n,r){t.child=e===null?Qa(t,null,n,r):Za(t,e.child,n,r)}function Qs(e,t,n,r,i){n=n.render;var a=t.ref;return oo(t,i),r=qo(e,t,n,r,a,i),n=Jo(),e!==null&&!Xs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,vc(e,t,i)):(Fa&&n&&ja(t),t.flags|=1,Zs(e,t,r,i),t.child)}function $s(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!fu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,ec(e,t,a,r,i)):(e=hu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Rr:n,n(o,r)&&e.ref===t.ref)return vc(e,t,i)}return t.flags|=1,e=mu(a,r),e.ref=t.ref,e.return=t,t.child=e}function ec(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Rr(a,r)&&e.ref===t.ref){if(Xs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Xs=!0);else return t.lanes=e.lanes,vc(e,t,i)}}return rc(e,t,n,r,i)}function tc(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`){if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},na(ul,ll),ll|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,na(ul,ll),ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,na(ul,ll),ll|=r}}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),na(ul,ll),ll|=r;return Zs(e,t,i,n),t.child}function nc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function rc(e,t,n,r,i){var a=ca(n)?oa:ia.current;return a=sa(t,a),oo(t,i),n=qo(e,t,n,r,a,i),r=Jo(),e!==null&&!Xs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,vc(e,t,i)):(Fa&&r&&ja(t),t.flags|=1,Zs(e,t,n,i),t.child)}function ic(e,t,n,r,i){if(ca(n)){var a=!0;fa(t)}else a=!1;if(oo(t,i),t.stateNode===null)_c(e,t),Ls(t,n,r),zs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=so(l):(l=ca(n)?oa:ia.current,l=sa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Rs(t,o,r,l),po=!1;var f=t.memoizedState;o.state=f,bo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||aa.current||po?(typeof u==`function`&&(Ps(t,n,u,r),c=t.memoizedState),(s=po||Is(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ho(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ns(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=so(c):(c=ca(n)?oa:ia.current,c=sa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Rs(t,o,r,c),po=!1,f=t.memoizedState,o.state=f,bo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||aa.current||po?(typeof p==`function`&&(Ps(t,n,p,r),m=t.memoizedState),(l=po||Is(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ac(e,t,n,r,a,i)}function ac(e,t,n,r,i,a){nc(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&pa(t,n,!1),vc(e,t,a);r=t.stateNode,Ys.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Za(t,e.child,null,a),t.child=Za(t,null,s,a)):Zs(e,t,s,a),t.memoizedState=r.state,i&&pa(t,n,!0),t.child}function oc(e){var t=e.stateNode;t.pendingContext?ua(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ua(e,t.context,!1),Do(e,t.containerInfo)}function sc(e,t,n,r,i){return Wa(),Ga(i),t.flags|=256,Zs(e,t,n,r),t.child}var cc={dehydrated:null,treeContext:null,retryLane:0};function lc(e){return{baseLanes:e,cachePool:null,transitions:null}}function uc(e,t,n){var r=t.pendingProps,i=jo.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),na(jo,i&1),e===null)return Ba(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=_u(o,r,0,null),e=gu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=lc(n),t.memoizedState=cc,e):dc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return pc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=mu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=gu(a,o,n,null),a.flags|=2):a=mu(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?lc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=cc,r}return a=e.child,e=a.sibling,r=mu(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function dc(e,t){return t=_u({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function fc(e,t,n,r){return r!==null&&Ga(r),Za(t,e.child,null,n),e=dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Vs(Error(r(422))),fc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=_u({mode:`visible`,children:i.children},a,0,null),o=gu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Za(t,e.child,null,s),t.child.memoizedState=lc(s),t.memoizedState=cc,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return fc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Vs(o,i,void 0),fc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Xs||c){if(i=ol,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,fo(e,a),Nl(i,e,a,-1))}return ql(),i=Vs(Error(r(421))),fc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=ou.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Pa=zi(a.nextSibling),Na=t,Fa=!0,Ia=null,e!==null&&(wa[Ta++]=Da,wa[Ta++]=Oa,wa[Ta++]=Ea,Da=e.id,Oa=e.overflow,Ea=t),t=dc(t,i.children),t.flags|=4096,t)}function mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ao(e.return,t,n)}function hc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function gc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Zs(e,t,r.children,n),r=jo.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mc(e,n,t);else if(e.tag===19)mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(na(jo,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),hc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}hc(t,!0,n,null,a);break;case`together`:hc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _c(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=mu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function yc(e,t,n){switch(t.tag){case 3:oc(t),Wa();break;case 5:ko(t);break;case 1:ca(t.type)&&fa(t);break;case 4:Do(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;na($a,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(na(jo,jo.current&1),e=vc(e,t,n),e===null?null:e.sibling):uc(e,t,n):(na(jo,jo.current&1),t.flags|=128,null);na(jo,jo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return gc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),na(jo,jo.current),r)break;return null;case 22:case 23:return t.lanes=0,tc(e,t,n)}return vc(e,t,n)}var bc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},xc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Eo(Co.current);var o=null;switch(n){case`input`:i=Ce(e,i),r=Ce(e,r),o=[];break;case`select`:i=de({},i,{value:void 0}),r=de({},r,{value:void 0}),o=[];break;case`textarea`:i=ke(e,i),r=ke(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=ki)}He(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null){if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null))}for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null)){if(u===`style`){if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l}else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&hi(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},Sc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Cc(e,t){if(!Fa)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function wc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Tc(e,t,n){var i=t.pendingProps;switch(Ma(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wc(t),null;case 1:return ca(t.type)&&la(),wc(t),null;case 3:return i=t.stateNode,Oo(),ta(aa),ta(ia),Po(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ha(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ia!==null&&(Ll(Ia),Ia=null))),wc(t),null;case 5:Ao(t);var o=Eo(To.current);if(n=t.type,e!==null&&t.stateNode!=null)xc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return wc(t),null}if(e=Eo(Co.current),Ha(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Hi]=t,i[Ui]=s,e=!!(t.mode&1),n){case`dialog`:hi(`cancel`,i),hi(`close`,i);break;case`iframe`:case`object`:case`embed`:hi(`load`,i);break;case`video`:case`audio`:for(o=0;o<di.length;o++)hi(di[o],i);break;case`source`:hi(`error`,i);break;case`img`:case`image`:case`link`:hi(`error`,i),hi(`load`,i);break;case`details`:hi(`toggle`,i);break;case`input`:we(i,s),hi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},hi(`invalid`,i);break;case`textarea`:Ae(i,s),hi(`invalid`,i)}for(var c in He(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Oi(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Oi(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&hi(`scroll`,i)}switch(n){case`input`:be(i),De(i,s,!0);break;case`textarea`:be(i),Me(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=ki)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ne(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Hi]=t,e[Ui]=i,bc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ue(n,i),n){case`dialog`:hi(`cancel`,e),hi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:hi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<di.length;o++)hi(di[o],e);o=i;break;case`source`:hi(`error`,e),o=i;break;case`img`:case`image`:case`link`:hi(`error`,e),hi(`load`,e),o=i;break;case`details`:hi(`toggle`,e),o=i;break;case`input`:we(e,i),o=Ce(e,i),hi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=de({},i,{value:void 0}),hi(`invalid`,e);break;case`textarea`:Ae(e,i),o=ke(e,i),hi(`invalid`,e);break;default:o=i}for(s in He(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Be(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Fe(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Ie(e,u):typeof u==`number`&&Ie(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&hi(`scroll`,e):u!=null&&b(e,s,u,c))}switch(n){case`input`:be(e),De(e,i,!1);break;case`textarea`:be(e),Me(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+D(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&k(e,!!i.multiple,i.defaultValue,!0):k(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=ki)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return wc(t),null;case 6:if(e&&t.stateNode!=null)Sc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=Eo(To.current),Eo(Co.current),Ha(t)){if(i=t.stateNode,n=t.memoizedProps,i[Hi]=t,(s=i.nodeValue!==n)&&(e=Na,e!==null))switch(e.tag){case 3:Oi(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Oi(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Hi]=t,t.stateNode=i}return wc(t),null;case 13:if(ta(jo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Fa&&Pa!==null&&t.mode&1&&!(t.flags&128))Ua(),Wa(),t.flags|=98560,s=!1;else if(s=Ha(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Hi]=t}else Wa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;wc(t),s=!1}else Ia!==null&&(Ll(Ia),Ia=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||jo.current&1?dl===0&&(dl=3):ql())),t.updateQueue!==null&&(t.flags|=4),wc(t),null);case 4:return Oo(),e===null&&vi(t.stateNode.containerInfo),wc(t),null;case 10:return io(t.type._context),wc(t),null;case 17:return ca(t.type)&&la(),wc(t),null;case 19:if(ta(jo),s=t.memoizedState,s===null)return wc(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null){if(i)Cc(s,!1);else{if(dl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Mo(e),c!==null){for(t.flags|=128,Cc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return na(jo,jo.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ct()>yl&&(t.flags|=128,i=!0,Cc(s,!1),t.lanes=4194304)}}else{if(!i){if(e=Mo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Fa)return wc(t),null}else 2*Ct()-s.renderingStartTime>yl&&n!==1073741824&&(t.flags|=128,i=!0,Cc(s,!1),t.lanes=4194304)}s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(wc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ct(),t.sibling=null,n=jo.current,na(jo,i?n&1|2:n&1),t);case 22:case 23:return Ul(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?ll&1073741824&&(wc(t),t.subtreeFlags&6&&(t.flags|=8192)):wc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Ec(e,t){switch(Ma(t),t.tag){case 1:return ca(t.type)&&la(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oo(),ta(aa),ta(ia),Po(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ao(t),null;case 13:if(ta(jo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ta(jo),null;case 4:return Oo(),null;case 10:return io(t.type._context),null;case 22:case 23:return Ul(),null;case 24:return null;default:return null}}var Dc=!1,Oc=!1,kc=typeof WeakSet==`function`?WeakSet:Set,N=null;function Ac(e,t){var n=e.ref;if(n!==null){if(typeof n==`function`)try{n(null)}catch(n){ru(e,t,n)}else n.current=null}}function jc(e,t,n){try{n()}catch(n){ru(e,t,n)}}var Mc=!1;function Nc(e,t){if(Ai=Sn,e=Hr(),Ur(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ji={focusedElem:e,selectionRange:n},Sn=!1,N=t;N!==null;)if(t=N,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ns(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){ru(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return h=Mc,Mc=!1,h}function Pc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&jc(t,n,a)}i=i.next}while(i!==r)}}function Fc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ic(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Lc(e){var t=e.alternate;t!==null&&(e.alternate=null,Lc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Hi],delete t[Ui],delete t[Gi],delete t[Ki],delete t[qi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rc(e){return e.tag===5||e.tag===3||e.tag===4}function zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Rc(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.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ki));else if(r!==4&&(e=e.child,e!==null))for(Bc(e,t,n),e=e.sibling;e!==null;)Bc(e,t,n),e=e.sibling}function Vc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Vc(e,t,n),e=e.sibling;e!==null;)Vc(e,t,n),e=e.sibling}var Hc=null,Uc=!1;function Wc(e,t,n){for(n=n.child;n!==null;)Gc(e,t,n),n=n.sibling}function Gc(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount==`function`)try{jt.onCommitFiberUnmount(At,n)}catch{}switch(n.tag){case 5:Oc||Ac(n,t);case 6:var r=Hc,i=Uc;Hc=null,Wc(e,t,n),Hc=r,Uc=i,Hc!==null&&(Uc?(e=Hc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Hc.removeChild(n.stateNode));break;case 18:Hc!==null&&(Uc?(e=Hc,n=n.stateNode,e.nodeType===8?Ri(e.parentNode,n):e.nodeType===1&&Ri(e,n),bn(e)):Ri(Hc,n.stateNode));break;case 4:r=Hc,i=Uc,Hc=n.stateNode.containerInfo,Uc=!0,Wc(e,t,n),Hc=r,Uc=i;break;case 0:case 11:case 14:case 15:if(!Oc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&jc(n,t,o),i=i.next}while(i!==r)}Wc(e,t,n);break;case 1:if(!Oc&&(Ac(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){ru(n,t,e)}Wc(e,t,n);break;case 21:Wc(e,t,n);break;case 22:n.mode&1?(Oc=(r=Oc)||n.memoizedState!==null,Wc(e,t,n),Oc=r):Wc(e,t,n);break;default:Wc(e,t,n)}}function Kc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kc),t.forEach(function(t){var r=su.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function qc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Hc=c.stateNode,Uc=!1;break a;case 3:Hc=c.stateNode.containerInfo,Uc=!0;break a;case 4:Hc=c.stateNode.containerInfo,Uc=!0;break a}c=c.return}if(Hc===null)throw Error(r(160));Gc(o,s,a),Hc=null,Uc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){ru(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Jc(t,e),t=t.sibling}function Jc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qc(t,e),Yc(e),i&4){try{Pc(3,e,e.return),Fc(3,e)}catch(t){ru(e,e.return,t)}try{Pc(5,e,e.return)}catch(t){ru(e,e.return,t)}}break;case 1:qc(t,e),Yc(e),i&512&&n!==null&&Ac(n,n.return);break;case 5:if(qc(t,e),Yc(e),i&512&&n!==null&&Ac(n,n.return),e.flags&32){var a=e.stateNode;try{Ie(a,``)}catch(t){ru(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Te(a,o),Ue(c,s);var u=Ue(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Be(a,f):d===`dangerouslySetInnerHTML`?Fe(a,f):d===`children`?Ie(a,f):b(a,d,f,u)}switch(c){case`input`:Ee(a,o);break;case`textarea`:je(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?k(a,!!o.multiple,o.multiple?[]:``,!1):k(a,!!o.multiple,o.defaultValue,!0)):k(a,!!o.multiple,m,!1)}a[Ui]=o}catch(t){ru(e,e.return,t)}}break;case 6:if(qc(t,e),Yc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){ru(e,e.return,t)}}break;case 3:if(qc(t,e),Yc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{bn(t.containerInfo)}catch(t){ru(e,e.return,t)}break;case 4:qc(t,e),Yc(e);break;case 13:qc(t,e),Yc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(vl=Ct())),i&4&&Kc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Oc=(u=Oc)||d,qc(t,e),Oc=u):qc(t,e),Yc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(N=e,d=e.child;d!==null;){for(f=N=d;N!==null;){switch(p=N,m=p.child,p.tag){case 0:case 11:case 14:case 15:Pc(4,p,p.return);break;case 1:Ac(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){ru(i,n,e)}}break;case 5:Ac(p,p.return);break;case 22:if(p.memoizedState!==null){$c(f);continue}}m===null?$c(f):(m.return=p,N=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=ze(`display`,s))}catch(t){ru(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){ru(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:qc(t,e),Yc(e),i&4&&Kc(e);break;case 21:break;default:qc(t,e),Yc(e)}}function Yc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Rc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ie(a,``),i.flags&=-33),Vc(e,zc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Bc(e,zc(e),o);break;default:throw Error(r(161))}}catch(t){ru(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xc(e,t,n){N=e,Zc(e,t,n)}function Zc(e,t,n){for(var r=!!(e.mode&1);N!==null;){var i=N,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Dc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Oc;s=Dc;var l=Oc;if(Dc=o,(Oc=c)&&!l)for(N=i;N!==null;)o=N,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?el(i):(c.return=o,N=c);for(;a!==null;)N=a,Zc(a,t,n),a=a.sibling;N=i,Dc=s,Oc=l}Qc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,N=a):Qc(e,t,n)}}function Qc(e){for(;N!==null;){var t=N;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oc||Fc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Oc){if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ns(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}}var o=t.updateQueue;o!==null&&xo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&bn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Oc||t.flags&512&&Ic(t)}catch(e){ru(t,t.return,e)}}if(t===e){N=null;break}if(n=t.sibling,n!==null){n.return=t.return,N=n;break}N=t.return}}function $c(e){for(;N!==null;){var t=N;if(t===e){N=null;break}var n=t.sibling;if(n!==null){n.return=t.return,N=n;break}N=t.return}}function el(e){for(;N!==null;){var t=N;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fc(4,t)}catch(e){ru(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){ru(t,i,e)}}var a=t.return;try{Ic(t)}catch(e){ru(t,a,e)}break;case 5:var o=t.return;try{Ic(t)}catch(e){ru(t,o,e)}}}catch(e){ru(t,t.return,e)}if(t===e){N=null;break}var s=t.sibling;if(s!==null){s.return=t.return,N=s;break}N=t.return}}var tl=Math.ceil,nl=x.ReactCurrentDispatcher,rl=x.ReactCurrentOwner,il=x.ReactCurrentBatchConfig,al=0,ol=null,sl=null,cl=0,ll=0,ul=ea(0),dl=0,fl=null,pl=0,ml=0,hl=0,gl=null,_l=null,vl=0,yl=1/0,bl=null,xl=!1,Sl=null,Cl=null,wl=!1,Tl=null,El=0,Dl=0,Ol=null,kl=-1,Al=0;function jl(){return al&6?Ct():kl===-1?kl=Ct():kl}function Ml(e){return e.mode&1?al&2&&cl!==0?cl&-cl:Ka.transition===null?(e=Yt,e===0?(e=window.event,e=e===void 0?16:On(e.type),e):e):(Al===0&&(Al=Wt()),Al):1}function Nl(e,t,n,i){if(50<Dl)throw Dl=0,Ol=null,Error(r(185));Kt(e,n,i),(!(al&2)||e!==ol)&&(e===ol&&(!(al&2)&&(ml|=n),dl===4&&zl(e,cl)),Pl(e,i),n===1&&al===0&&!(t.mode&1)&&(yl=Ct()+500,ha&&ya()))}function Pl(e,t){var n=e.callbackNode;Ht(e,t);var r=Bt(e,e===ol?cl:0);if(r===0)n!==null&&bt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&bt(n),t===1)e.tag===0?va(Bl.bind(null,e)):_a(Bl.bind(null,e)),Ii(function(){!(al&6)&&ya()}),n=null;else{switch(Xt(r)){case 1:n=Tt;break;case 4:n=Et;break;case 16:n=Dt;break;case 536870912:n=kt;break;default:n=Dt}n=lu(n,Fl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fl(e,t){if(kl=-1,Al=0,al&6)throw Error(r(327));var n=e.callbackNode;if(tu()&&e.callbackNode!==n)return null;var i=Bt(e,e===ol?cl:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Jl(e,i);else{t=i;var a=al;al|=2;var o=Kl();(ol!==e||cl!==t)&&(bl=null,yl=Ct()+500,Wl(e,t));do try{Xl();break}catch(t){Gl(e,t)}while(1);ro(),nl.current=o,al=a,sl===null?(ol=null,cl=0,t=dl):t=0}if(t!==0){if(t===2&&(a=Ut(e),a!==0&&(i=a,t=Il(e,a))),t===1)throw n=fl,Wl(e,0),zl(e,i),Pl(e,Ct()),n;if(t===6)zl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Rl(a)&&(t=Jl(e,i),t===2&&(o=Ut(e),o!==0&&(i=o,t=Il(e,o))),t===1))throw n=fl,Wl(e,0),zl(e,i),Pl(e,Ct()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:$l(e,_l,bl);break;case 3:if(zl(e,i),(i&130023424)===i&&(t=vl+500-Ct(),10<t)){if(Bt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){jl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ni($l.bind(null,e,_l,bl),t);break}$l(e,_l,bl);break;case 4:if(zl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Nt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=Ct()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*tl(i/1960))-i,10<i){e.timeoutHandle=Ni($l.bind(null,e,_l,bl),i);break}$l(e,_l,bl);break;case 5:$l(e,_l,bl);break;default:throw Error(r(329))}}}return Pl(e,Ct()),e.callbackNode===n?Fl.bind(null,e):null}function Il(e,t){var n=gl;return e.current.memoizedState.isDehydrated&&(Wl(e,t).flags|=256),e=Jl(e,t),e!==2&&(t=_l,_l=n,t!==null&&Ll(t)),e}function Ll(e){_l===null?_l=e:_l.push.apply(_l,e)}function Rl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Lr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zl(e,t){for(t&=~hl,t&=~ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function Bl(e){if(al&6)throw Error(r(327));tu();var t=Bt(e,0);if(!(t&1))return Pl(e,Ct()),null;var n=Jl(e,t);if(e.tag!==0&&n===2){var i=Ut(e);i!==0&&(t=i,n=Il(e,i))}if(n===1)throw n=fl,Wl(e,0),zl(e,t),Pl(e,Ct()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$l(e,_l,bl),Pl(e,Ct()),null}function Vl(e,t){var n=al;al|=1;try{return e(t)}finally{al=n,al===0&&(yl=Ct()+500,ha&&ya())}}function Hl(e){Tl!==null&&Tl.tag===0&&!(al&6)&&tu();var t=al;al|=1;var n=il.transition,r=Yt;try{if(il.transition=null,Yt=1,e)return e()}finally{Yt=r,il.transition=n,al=t,!(al&6)&&ya()}}function Ul(){ll=ul.current,ta(ul)}function Wl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Pi(n)),sl!==null)for(n=sl.return;n!==null;){var r=n;switch(Ma(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&la();break;case 3:Oo(),ta(aa),ta(ia),Po();break;case 5:Ao(r);break;case 4:Oo();break;case 13:ta(jo);break;case 19:ta(jo);break;case 10:io(r.type._context);break;case 22:case 23:Ul()}n=n.return}if(ol=e,sl=e=mu(e.current,null),cl=ll=t,dl=0,fl=null,hl=ml=pl=0,_l=gl=null,co!==null){for(t=0;t<co.length;t++)if(n=co[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}co=null}return e}function Gl(e,t){do{var n=sl;try{if(ro(),Fo.current=ks,Vo){for(var i=Ro.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Vo=!1}if(Lo=0,Bo=zo=Ro=null,Ho=!1,Uo=0,rl.current=null,n===null||n.return===null){dl=1,fl=t,sl=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=cl,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=qs(s);if(m!==null){m.flags&=-257,Js(m,s,c,o,t),m.mode&1&&Ks(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}if(!(t&1)){Ks(o,u,t),ql();break a}l=Error(r(426))}else if(Fa&&c.mode&1){var _=qs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Js(_,s,c,o,t),Ga(Bs(l,c));break a}}o=l=Bs(l,c),dl!==4&&(dl=2),gl===null?gl=[o]:gl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Ws(o,l,t);yo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(Cl===null||!Cl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Gs(o,c,t);yo(o,x);break a}}o=o.return}while(o!==null)}Ql(n)}catch(e){t=e,sl===n&&n!==null&&(sl=n=n.return);continue}break}while(1)}function Kl(){var e=nl.current;return nl.current=ks,e===null?ks:e}function ql(){(dl===0||dl===3||dl===2)&&(dl=4),ol===null||!(pl&268435455)&&!(ml&268435455)||zl(ol,cl)}function Jl(e,t){var n=al;al|=2;var i=Kl();(ol!==e||cl!==t)&&(bl=null,Wl(e,t));do try{Yl();break}catch(t){Gl(e,t)}while(1);if(ro(),al=n,nl.current=i,sl!==null)throw Error(r(261));return ol=null,cl=0,dl}function Yl(){for(;sl!==null;)Zl(sl)}function Xl(){for(;sl!==null&&!xt();)Zl(sl)}function Zl(e){var t=cu(e.alternate,e,ll);e.memoizedProps=e.pendingProps,t===null?Ql(e):sl=t,rl.current=null}function Ql(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ec(n,t),n!==null){n.flags&=32767,sl=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{dl=6,sl=null;return}}else if(n=Tc(n,t,ll),n!==null){sl=n;return}if(t=t.sibling,t!==null){sl=t;return}sl=t=e}while(t!==null);dl===0&&(dl=5)}function $l(e,t,n){var r=Yt,i=il.transition;try{il.transition=null,Yt=1,eu(e,t,n,r)}finally{il.transition=i,Yt=r}return null}function eu(e,t,n,i){do tu();while(Tl!==null);if(al&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(qt(e,o),e===ol&&(sl=ol=null,cl=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wl||(wl=!0,lu(Dt,function(){return tu(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=il.transition,il.transition=null;var s=Yt;Yt=1;var c=al;al|=4,rl.current=null,Nc(e,n),Jc(n,e),Wr(ji),Sn=!!Ai,ji=Ai=null,e.current=n,Xc(n,e,a),St(),al=c,Yt=s,il.transition=o}else e.current=n;if(wl&&(wl=!1,Tl=e,El=a),o=e.pendingLanes,o===0&&(Cl=null),Mt(n.stateNode,i),Pl(e,Ct()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(xl)throw xl=!1,e=Sl,Sl=null,e;return El&1&&e.tag!==0&&tu(),o=e.pendingLanes,o&1?e===Ol?Dl++:(Dl=0,Ol=e):Dl=0,ya(),null}function tu(){if(Tl!==null){var e=Xt(El),t=il.transition,n=Yt;try{if(il.transition=null,Yt=16>e?16:e,Tl===null)var i=!1;else{if(e=Tl,Tl=null,El=0,al&6)throw Error(r(331));var a=al;for(al|=4,N=e.current;N!==null;){var o=N,s=o.child;if(N.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(N=u;N!==null;){var d=N;switch(d.tag){case 0:case 11:case 15:Pc(8,d,o)}var f=d.child;if(f!==null)f.return=d,N=f;else for(;N!==null;){d=N;var p=d.sibling,m=d.return;if(Lc(d),d===u){N=null;break}if(p!==null){p.return=m,N=p;break}N=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}N=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,N=s;else b:for(;N!==null;){if(o=N,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Pc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,N=v;break b}N=o.return}}var y=e.current;for(N=y;N!==null;){s=N;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,N=b;else b:for(s=y;N!==null;){if(c=N,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Fc(9,c)}}catch(e){ru(c,c.return,e)}if(c===s){N=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,N=x;break b}N=c.return}}if(al=a,ya(),jt&&typeof jt.onPostCommitFiberRoot==`function`)try{jt.onPostCommitFiberRoot(At,e)}catch{}i=!0}return i}finally{Yt=n,il.transition=t}}return!1}function nu(e,t,n){t=Bs(n,t),t=Ws(e,t,1),e=_o(e,t,1),t=jl(),e!==null&&(Kt(e,1,t),Pl(e,t))}function ru(e,t,n){if(e.tag===3)nu(e,e,n);else for(;t!==null;){if(t.tag===3){nu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Cl===null||!Cl.has(r))){e=Bs(n,e),e=Gs(t,e,1),t=_o(t,e,1),e=jl(),t!==null&&(Kt(t,1,e),Pl(t,e));break}}t=t.return}}function iu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=jl(),e.pingedLanes|=e.suspendedLanes&n,ol===e&&(cl&n)===n&&(dl===4||dl===3&&(cl&130023424)===cl&&500>Ct()-vl?Wl(e,0):hl|=n),Pl(e,t)}function au(e,t){t===0&&(e.mode&1?(t=Rt,Rt<<=1,!(Rt&130023424)&&(Rt=4194304)):t=1);var n=jl();e=fo(e,t),e!==null&&(Kt(e,t,n),Pl(e,n))}function ou(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),au(e,n)}function su(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),au(e,n)}var cu=function(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps||aa.current)Xs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Xs=!1,yc(e,t,n);Xs=!!(e.flags&131072)}}else Xs=!1,Fa&&t.flags&1048576&&Aa(t,Ca,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;_c(e,t),e=t.pendingProps;var a=sa(t,ia.current);oo(t,n),a=qo(null,t,i,e,a,n);var o=Jo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ca(i)?(o=!0,fa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,mo(t),a.updater=Fs,t.stateNode=a,a._reactInternals=t,zs(t,i,e,n),t=ac(null,t,i,!0,o,n)):(t.tag=0,Fa&&o&&ja(t),Zs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(_c(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=pu(i),e=Ns(i,e),a){case 0:t=rc(null,t,i,e,n);break a;case 1:t=ic(null,t,i,e,n);break a;case 11:t=Qs(null,t,i,e,n);break a;case 14:t=$s(null,t,i,Ns(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ns(i,a),rc(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ns(i,a),ic(e,t,i,a,n);case 3:a:{if(oc(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,ho(e,t),bo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Bs(Error(r(423)),t),t=sc(e,t,i,n,a);break a}if(i!==a){a=Bs(Error(r(424)),t),t=sc(e,t,i,n,a);break a}for(Pa=zi(t.stateNode.containerInfo.firstChild),Na=t,Fa=!0,Ia=null,n=Qa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wa(),i===a){t=vc(e,t,n);break a}Zs(e,t,i,n)}t=t.child}return t;case 5:return ko(t),e===null&&Ba(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Mi(i,a)?s=null:o!==null&&Mi(i,o)&&(t.flags|=32),nc(e,t),Zs(e,t,s,n),t.child;case 6:return e===null&&Ba(t),null;case 13:return uc(e,t,n);case 4:return Do(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Za(t,null,i,n):Zs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ns(i,a),Qs(e,t,i,a,n);case 7:return Zs(e,t,t.pendingProps,n),t.child;case 8:return Zs(e,t,t.pendingProps.children,n),t.child;case 12:return Zs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,na($a,i._currentValue),i._currentValue=s,o!==null){if(Lr(o.value,s)){if(o.children===a.children&&!aa.current){t=vc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=go(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ao(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),ao(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}}Zs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,oo(t,n),a=so(a),i=i(a),t.flags|=1,Zs(e,t,i,n),t.child;case 14:return i=t.type,a=Ns(i,t.pendingProps),a=Ns(i.type,a),$s(e,t,i,a,n);case 15:return ec(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ns(i,a),_c(e,t),t.tag=1,ca(i)?(e=!0,fa(t)):e=!1,oo(t,n),Ls(t,i,a),zs(t,i,a,n),ac(null,t,i,!0,e,n);case 19:return gc(e,t,n);case 22:return tc(e,t,n)}throw Error(r(156,t.tag))};function lu(e,t){return yt(e,t)}function uu(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.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 du(e,t,n,r){return new uu(e,t,n,r)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pu(e){if(typeof e==`function`)return+!!fu(e);if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===oe)return 14}return 2}function mu(e,t){var n=e.alternate;return n===null?(n=du(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&14680064,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}function hu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)fu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case w:return gu(n.children,a,o,t);case ee:s=8,a|=8;break;case te:return e=du(12,n,t,a|2),e.elementType=te,e.lanes=o,e;case T:return e=du(13,n,t,a),e.elementType=T,e.lanes=o,e;case ae:return e=du(19,n,t,a),e.elementType=ae,e.lanes=o,e;case ce:return _u(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case ne:s=10;break a;case re:s=9;break a;case ie:s=11;break a;case oe:s=14;break a;case se:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=du(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function gu(e,t,n,r){return e=du(7,e,r,t),e.lanes=n,e}function _u(e,t,n,r){return e=du(22,e,r,t),e.elementType=ce,e.lanes=n,e.stateNode={isHidden:!1},e}function vu(e,t,n){return e=du(6,e,null,t),e.lanes=n,e}function yu(e,t,n){return t=du(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gt(0),this.expirationTimes=Gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xu(e,t,n,r,i,a,o,s,c){return e=new bu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=du(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mo(a),e}function Su(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function Cu(e){if(!e)return ra;e=e._reactInternals;a:{if(pt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(ca(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(ca(n))return da(e,n,t)}return t}function wu(e,t,n,r,i,a,o,s,c){return e=xu(n,r,!0,e,i,a,o,s,c),e.context=Cu(null),n=e.current,r=jl(),i=Ml(n),a=go(r,i),a.callback=t??null,_o(n,a,i),e.current.lanes=i,Kt(e,i,r),Pl(e,r),e}function Tu(e,t,n,r){var i=t.current,a=jl(),o=Ml(i);return n=Cu(n),t.context===null?t.context=n:t.pendingContext=n,t=go(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=_o(i,t,o),e!==null&&(Nl(e,i,o,a),vo(e,i,o)),o}function Eu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Du(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ou(e,t){Du(e,t),(e=e.alternate)&&Du(e,t)}function ku(){return null}var Au=typeof reportError==`function`?reportError:function(e){console.error(e)};function ju(e){this._internalRoot=e}Mu.prototype.render=ju.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));Tu(e,t,null,null)},Mu.prototype.unmount=ju.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hl(function(){Tu(null,e,null,null)}),t[M]=null}};function Mu(e){this._internalRoot=e}Mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=en();e={blockedOn:null,target:e,priority:t};for(var n=0;n<un.length&&t!==0&&t<un[n].priority;n++);un.splice(n,0,e),n===0&&hn(e)}};function Nu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Fu(){}function Iu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=Eu(o);a.call(e)}}var o=wu(t,r,e,0,null,!1,!1,``,Fu);return e._reactRootContainer=o,e[M]=o.current,vi(e.nodeType===8?e.parentNode:e),Hl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=Eu(c);s.call(e)}}var c=xu(e,0,!1,null,null,!1,!1,``,Fu);return e._reactRootContainer=c,e[M]=c.current,vi(e.nodeType===8?e.parentNode:e),Hl(function(){Tu(t,c,n,r)}),c}function Lu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=Eu(o);s.call(e)}}Tu(t,o,e,i)}else o=Iu(n,t,e,i,r);return Eu(o)}Zt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=zt(t.pendingLanes);n!==0&&(Jt(t,n|1),Pl(t,Ct()),!(al&6)&&(yl=Ct()+500,ya()))}break;case 13:Hl(function(){var t=fo(e,1);t!==null&&Nl(t,e,1,jl())}),Ou(e,1)}},Qt=function(e){if(e.tag===13){var t=fo(e,134217728);t!==null&&Nl(t,e,134217728,jl()),Ou(e,134217728)}},$t=function(e){if(e.tag===13){var t=Ml(e),n=fo(e,t);n!==null&&Nl(n,e,t,jl()),Ou(e,t)}},en=function(){return Yt},tn=function(e,t){var n=Yt;try{return Yt=e,t()}finally{Yt=n}},Ke=function(e,t,n){switch(t){case`input`:if(Ee(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Zi(i);if(!a)throw Error(r(90));xe(i),Ee(i,a)}}}break;case`textarea`:je(e,n);break;case`select`:t=n.value,t!=null&&k(e,!!n.multiple,t,!1)}},Qe=Vl,$e=Hl;var Ru={usingClientEntryPoint:!1,Events:[Yi,Xi,Zi,Xe,Ze,Vl]},zu={findFiberByHostInstance:Ji,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Bu={bundleType:zu.bundleType,version:zu.version,rendererPackageName:zu.rendererPackageName,rendererConfig:zu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_t(e),e===null?null:e.stateNode},findFiberByHostInstance:zu.findFiberByHostInstance||ku,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{At=Vu.inject(Bu),jt=Vu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ru,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Nu(t))throw Error(r(200));return Su(e,t,null,n)},e.createRoot=function(e,t){if(!Nu(e))throw Error(r(299));var n=!1,i=``,a=Au;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=xu(e,1,!1,null,null,n,!1,i,a),e[M]=t.current,vi(e.nodeType===8?e.parentNode:e),new ju(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=_t(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Hl(e)},e.hydrate=function(e,t,n){if(!Pu(t))throw Error(r(200));return Lu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Nu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=Au;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=wu(t,null,e,1,n??null,a,!1,o,s),e[M]=t.current,vi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Mu(t)},e.render=function(e,t,n){if(!Pu(t))throw Error(r(200));return Lu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Pu(e))throw Error(r(40));return e._reactRootContainer?(Hl(function(){Lu(null,null,e,!1,function(){e._reactRootContainer=null,e[M]=null})}),!0):!1},e.unstable_batchedUpdates=Vl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Pu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Lu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),Ev=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Tv()})),Dv=e=>crypto.getRandomValues(new Uint8Array(e)),Ov=(e,t,n)=>{let r=256-256%e.length;if(r===256){let r=e.length-1;return(i=t)=>{if(!i)return``;let a=``;for(;;){let t=n(i),o=i;for(;o--;)if(a+=e[t[o]&r],a.length>=i)return a}}}let i=Math.ceil(409.6*t/r);return(a=t)=>{if(!a)return``;let o=``;for(;;){let t=n(i),s=i;for(;s--;)if(t[s]<r&&(o+=e[t[s]%e.length],o.length>=a))return o}}},kv=(e,t=21)=>Ov(e,t|0,Dv),Av=`abcdefghijklmnopqrstuvwxyz0123456789`;function jv(e=21){if(e===1/0||e===-1/0)throw RangeError(`nanoid length must be finite`);return kv(Av,e)()}var Mv=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Nv=/^[a-z][a-z0-9]*(?:_[a-z][a-z0-9]*)*$/,Pv=k().min(1).max(64).regex(Mv),Fv=k().min(1).max(64).regex(Mv),Iv=k().min(1).max(32).regex(Nv),Lv=E({prefix:Iv}),Rv=E({family:Pv,version:gt(1),kinds:Ht(Fv,Lv)}).superRefine((e,t)=>{let n=Object.entries(e.kinds);if(n.length<1||n.length>64){t.addIssue({code:`custom`,message:`Identifier families must declare between one and 64 kinds`});return}let r=new Set;for(let[,e]of n){if(r.has(e.prefix)){t.addIssue({code:`custom`,message:`Identifier kind prefixes must be distinct`});return}r.add(e.prefix)}}),zv=k(),Bv=/^[a-z0-9]+$/,Vv=new TextEncoder;function Hv(e){return e===32||e>=9&&e<=13}function Uv(e){let t=0,n=e.length;for(;t<n&&Hv(e.charCodeAt(t));)t+=1;for(;n>t&&Hv(e.charCodeAt(n-1));)--n;return e.slice(t,n).replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Wv(e){let t=`${e.prefix}_`;function n(e){if(!e.startsWith(t))return!1;let n=e.slice(t.length);return n.length===21&&Bv.test(n)}let r=A(()=>ze(e=>{let t=zv.safeParse(e);return t.success&&n(t.data)}));function i(i){let a,o=i,s=Vv.encode(o).byteLength,c=r.safeParse(o),l=o.startsWith(t)?o.slice(t.length):void 0;if(s<3||s>96)a=`bounds`;else if(l!==void 0&&Array.from(l).length!==21)a=`bounds`;else if(c.success)return{ok:!0,value:c.data};else a=n(Uv(o))?`non_canonical`:`grammar`;return{ok:!1,error:{code:`invalid_id`,family:e.family,kind:e.kind,version:1,reason:a}}}let a=A(()=>zv.transform((e,t)=>{let n=i(e);return n.ok?n.value:(t.addIssue({code:`custom`,message:n.error.reason}),st)}));function o(){let n;try{n=jv(21)}catch{throw e.entropyUnavailable()}return r.parse(`${t}${n}`)}return{family:e.family,kind:e.kind,version:1,generate:o,schema:a,parse:i,is:e=>i(e).ok}}var Gv=Ht(k(),E({family:k(),kind:k(),version:gt(1),generate:v(),schema:wi(Sn),parse:v(),is:v()})),Kv=class extends Error{name=`CairnDefinitionError`;code=`invalid_definition`;constructor(){super(`Cairn identifier family definition is invalid`)}},qv=class extends Error{name=`CairnGenerationError`;code=`entropy_unavailable`;family;kind;version=1;constructor(e){super(`Cairn entropy source is unavailable`),this.family=e.family,this.kind=e.kind}};function Jv(e){let t;try{t=Rv.safeParse(e)}catch{throw new Kv}if(!t.success)throw new Kv;let n=t.data,r={};for(let[t,i]of Object.entries(n.kinds)){let a=i.prefix;r[t]=Wv({family:e.family,kind:t,prefix:a,entropyUnavailable:()=>new qv({family:n.family,kind:t})})}let i=ze(e=>{let t=Gv.safeParse(e);if(!t.success)return!1;let r=Object.entries(t.data);return r.length===Object.keys(n.kinds).length&&r.every(([e,t])=>Object.hasOwn(n.kinds,e)&&t.kind===e&&t.family===n.family)}).safeParse(r);if(!i.success)throw new Kv;return i.data}var Yv=[];for(let e=0;e<256;++e)Yv.push((e+256).toString(16).slice(1));function Xv(e,t=0){return(Yv[e[t+0]]+Yv[e[t+1]]+Yv[e[t+2]]+Yv[e[t+3]]+`-`+Yv[e[t+4]]+Yv[e[t+5]]+`-`+Yv[e[t+6]]+Yv[e[t+7]]+`-`+Yv[e[t+8]]+Yv[e[t+9]]+`-`+Yv[e[t+10]]+Yv[e[t+11]]+Yv[e[t+12]]+Yv[e[t+13]]+Yv[e[t+14]]+Yv[e[t+15]]).toLowerCase()}var Zv,Qv=new Uint8Array(16);function $v(){if(!Zv){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Zv=crypto.getRandomValues.bind(crypto)}return Zv(Qv)}var ey={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ty(e,t,n){if(ey.randomUUID&&!t&&!e)return ey.randomUUID();e||={};let r=e.random??e.rng?.()??$v();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Xv(r)}var ny=dt({version:`v7`}),ry=k().regex(/^replay_[a-f0-9]{64}$/);ze(e=>ry.safeParse(e).success);var iy=dt({version:`v4`});ze(e=>ny.safeParse(e).success);var ay=ze(e=>iy.safeParse(e).success);function oy(){return ay.parse(ty())}var sy=e(Ev(),1),cy=St([`plain`,`pencil`,`manga`,`riso`,`halftone`,`blueprint`,`crt`,`watercolor`]),ly={ink:`var(--sprite-ink, var(--color-base-content, #1c1c1a))`,paper:`var(--sprite-paper, var(--color-base-100, #fbfaf6))`,accent:`var(--sprite-accent, var(--color-accent, #d20f39))`,risoFirst:`var(--sprite-riso-first, var(--color-info, #1e66f5))`,risoSecond:`var(--sprite-riso-second, var(--color-accent, #ea76cb))`,blueprint:`var(--sprite-blueprint, color-mix(in oklab, var(--color-info, #1e66f5) 55%, #0b2350))`,blueprintLine:`var(--sprite-blueprint-line, color-mix(in oklab, var(--color-info-content, #ffffff) 25%, #ffffff))`,screen:`var(--sprite-screen, color-mix(in oklab, var(--color-base-content, #111111) 12%, #050805))`,phosphor:`var(--sprite-phosphor, var(--color-success, #40a02b))`},J=(e,t={},...n)=>({tag:e,attributes:t,children:n}),uy=(e,t,n=1)=>J(`feFlood`,{style:`flood-color: ${e}`,"flood-opacity":n,result:t}),dy=(e,t,n)=>[J(`feImage`,{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='${String(t)}' height='${String(t)}'>${e}</svg>`)}`,width:t,height:t,result:`${n}Cell`}),J(`feTile`,{in:`${n}Cell`,result:n})],fy=(e,t,n)=>J(`feColorMatrix`,{in:t,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ${e}`,result:n}),py=(e,t)=>fy(`-0.333 -0.333 -0.333 1 0`,e,t),my=(e,t,n,r=1.1)=>[J(`feConvolveMatrix`,{in:e,order:3,kernelMatrix:`0 1 0 1 -4 1 0 1 0`,result:`${t}In`}),J(`feConvolveMatrix`,{in:e,order:3,kernelMatrix:`0 -1 0 -1 4 -1 0 -1 0`,result:`${t}Out`}),J(`feComposite`,{in:`${t}In`,in2:`${t}Out`,operator:`arithmetic`,k2:1,k3:1,result:`${t}Edges`}),fy(`${String(n)} ${String(n)} ${String(n)} ${String(r)} 0`,`${t}Edges`,t)],hy=(e,t,n,r)=>[J(`feConvolveMatrix`,{in:e,order:3,kernelMatrix:`0 1 0 1 -4 1 0 1 0`,preserveAlpha:`true`,result:`${t}In`}),J(`feConvolveMatrix`,{in:e,order:3,kernelMatrix:`0 -1 0 -1 4 -1 0 -1 0`,preserveAlpha:`true`,result:`${t}Out`}),J(`feComposite`,{in:`${t}In`,in2:`${t}Out`,operator:`arithmetic`,k2:1,k3:1,result:`${t}Edges`}),fy(`${String(n)} ${String(n)} ${String(n)} 0 -0.15`,`${t}Edges`,`${t}Inner`),J(`feMorphology`,{in:e,operator:`dilate`,radius:r,result:`${t}Grown`}),J(`feComposite`,{in:`${t}Grown`,in2:e,operator:`out`,result:`${t}Ring`}),fy(`0 0 0 1 0`,`${t}Ring`,`${t}Outline`),_y(t,`${t}Inner`,`${t}Outline`)],gy=(e,t,n)=>J(`feComponentTransfer`,{in:e,result:n},J(`feFuncA`,{type:`discrete`,tableValues:t})),_y=(e,...t)=>J(`feMerge`,{result:e},...t.map(e=>J(`feMergeNode`,{in:e}))),vy=(e,t,n,r=1)=>[uy(e,`${n}Flood`,r),J(`feComposite`,{in:`${n}Flood`,in2:t,operator:`in`,result:n})],yy={x:`0%`,y:`0%`,width:`100%`,height:`100%`},by={x:`-8%`,y:`-8%`,width:`116%`,height:`116%`},xy={value:1.6,line:6,outline:2.4,midHatch:[3.2,-.05],darkHatch:[3.4,-.4],tooth:`0 0 0 -0.7 1.45`,opacity:1},Sy=e=>({region:by,primitives:[J(`feComponentTransfer`,{in:`SourceGraphic`,result:`valued`},...[`feFuncR`,`feFuncG`,`feFuncB`].map(t=>J(t,{type:`gamma`,amplitude:1,exponent:e.value,offset:0}))),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.05,numOctaves:2,seed:1,result:`wobble`,"data-sprite-boil":`wobble`}),J(`feDisplacementMap`,{in:`valued`,in2:`wobble`,scale:2.6,xChannelSelector:`R`,yChannelSelector:`G`,result:`drawn`}),...my(`drawn`,`line`,e.line,e.outline),py(`drawn`,`dark`),...dy(`<path d='M-1 1l2-2M0 6l6-6M5 7l2-2' stroke='black' stroke-width='1.1'/>`,6,`hatch45`),J(`feOffset`,{in:`hatch45`,dx:0,dy:0,result:`hatchOffset`,"data-sprite-boil":`hatch`}),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.07,numOctaves:2,seed:5,result:`strokeBend`}),J(`feDisplacementMap`,{in:`hatchOffset`,in2:`strokeBend`,scale:4,xChannelSelector:`R`,yChannelSelector:`B`,result:`hatchA`}),...dy(`<path d='M-1 4l2 2M0 0l5 5M4 -1l2 2' stroke='black' stroke-width='0.9'/>`,5,`hatch135`),J(`feDisplacementMap`,{in:`hatch135`,in2:`strokeBend`,scale:3,xChannelSelector:`G`,yChannelSelector:`R`,result:`hatchB`}),J(`feComposite`,{in:`dark`,in2:`hatchA`,operator:`arithmetic`,k1:e.midHatch[0],k4:e.midHatch[1],result:`shadeA`}),J(`feComposite`,{in:`dark`,in2:`hatchB`,operator:`arithmetic`,k1:e.darkHatch[0],k4:e.darkHatch[1],result:`shadeB`}),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.9,numOctaves:1,seed:3,result:`tooth`}),fy(e.tooth,`tooth`,`toothMask`),fy(`0 0 0 6 -4.6`,`dark`,`solid`),_y(`graphiteRaw`,`solid`,`shadeA`,`shadeB`,`line`),J(`feComposite`,{in:`graphiteRaw`,in2:`toothMask`,operator:`in`,result:`graphite`}),...vy(ly.ink,`graphite`,`pencil`,e.opacity)],boil:{intervalMs:160,tracks:[{name:`wobble`,attribute:`seed`,frames:[1,2,3]},{name:`hatch`,attribute:`dx`,frames:[0,1,2]}]}}),Cy={region:by,primitives:[J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.04,numOctaves:2,seed:2,result:`brush`,"data-sprite-boil":`brush`}),J(`feDisplacementMap`,{in:`SourceGraphic`,in2:`brush`,scale:2,xChannelSelector:`R`,yChannelSelector:`G`,result:`drawn`}),...vy(ly.paper,`SourceAlpha`,`paperFill`),py(`drawn`,`dark`),...dy(`<circle cx='2.5' cy='2.5' r='1.15' fill='black'/>`,5,`dots`),gy(`dark`,`0 1 1 0`,`midTone`),J(`feComposite`,{in:`dots`,in2:`midTone`,operator:`in`,result:`tone`}),gy(`dark`,`0 0 0 1`,`solid`),fy(`3 -3 0 0 -0.35`,`drawn`,`satRG`),fy(`-3 3 0 0 -0.35`,`drawn`,`satGR`),fy(`0 3 -3 0 -0.35`,`drawn`,`satGB`),fy(`0 -3 3 0 -0.35`,`drawn`,`satBG`),_y(`saturation`,`satRG`,`satGR`,`satGB`,`satBG`),gy(`saturation`,`0 1`,`accentMask`),...vy(ly.accent,`accentMask`,`accentFill`),...hy(`drawn`,`edge`,2,2.2),J(`feMorphology`,{in:`edge`,operator:`dilate`,radius:.25,result:`stroke`}),_y(`inkRaw`,`tone`,`solid`,`stroke`),...vy(ly.ink,`inkRaw`,`ink`),_y(`manga`,`paperFill`,`accentFill`,`ink`)],boil:{intervalMs:180,tracks:[{name:`brush`,attribute:`seed`,frames:[2,4,6]}]}},wy={region:by,primitives:[fy(`-0.55 -0.55 -0.55 1.65 0`,`SourceGraphic`,`dark`),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.85,numOctaves:1,seed:7,result:`grain`}),fy(`0 0 0 -0.9 1.35`,`grain`,`grainMask`),J(`feComposite`,{in:`dark`,in2:`grainMask`,operator:`in`,result:`firstMask`}),...vy(ly.risoFirst,`firstMask`,`firstInk`,.92),fy(`0 -1.9 0 1.9 0`,`SourceGraphic`,`secondMask`),...vy(ly.risoSecond,`secondMask`,`secondInk`,.9),J(`feOffset`,{in:`firstInk`,dx:-1.5,dy:1,result:`firstPlate`,"data-sprite-boil":`register`}),J(`feOffset`,{in:`secondInk`,dx:1.5,dy:-.5,result:`secondPlate`}),J(`feBlend`,{in:`firstPlate`,in2:`secondPlate`,mode:`multiply`})],boil:{intervalMs:240,tracks:[{name:`register`,attribute:`dx`,frames:[-1.5,-1,-2]}]}},Ty={region:by,primitives:[fy(`-0.5 -0.5 -0.5 1.65 0`,`SourceGraphic`,`value`),fy(`0 0 0 0.16 0`,`SourceGraphic`,`floor`),_y(`dark`,`floor`,`value`),...dy(`<defs><radialGradient id='d'><stop offset='0' stop-opacity='1'/><stop offset='1' stop-opacity='0'/></radialGradient></defs><rect width='6' height='6' fill='url(#d)'/>`,6,`screen`),J(`feComposite`,{in:`dark`,in2:`screen`,operator:`arithmetic`,k2:1,k3:1,k4:-.92,result:`dotField`}),J(`feComponentTransfer`,{in:`dotField`,result:`dotsRaw`},J(`feFuncA`,{type:`linear`,slope:12,intercept:0})),J(`feComposite`,{in:`dotsRaw`,in2:`SourceAlpha`,operator:`in`,result:`dots`}),...vy(ly.ink,`dots`,`halftone`)]},Ey={region:yy,primitives:[uy(ly.blueprint,`ground`),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.05,numOctaves:1,seed:4,result:`hand`,"data-sprite-boil":`hand`}),J(`feDisplacementMap`,{in:`SourceGraphic`,in2:`hand`,scale:1.6,xChannelSelector:`R`,yChannelSelector:`G`,result:`drawn`}),...dy(`<path d='M0 0.5h16M0.5 0v16' stroke='black' stroke-width='1' stroke-opacity='0.22'/>`,16,`grid`),...vy(ly.blueprintLine,`grid`,`gridLines`),...vy(ly.blueprintLine,`SourceAlpha`,`wash`,.12),...hy(`drawn`,`edge`,3,1.2),J(`feMorphology`,{in:`edge`,operator:`dilate`,radius:.3,result:`stroke`}),...vy(ly.blueprintLine,`stroke`,`lines`),_y(`blueprint`,`ground`,`gridLines`,`wash`,`lines`)],boil:{intervalMs:200,tracks:[{name:`hand`,attribute:`seed`,frames:[4,5,6]}]}},Dy={region:yy,primitives:[uy(ly.screen,`ground`),J(`feColorMatrix`,{in:`SourceGraphic`,type:`luminanceToAlpha`,result:`lumRaw`}),J(`feComposite`,{in:`lumRaw`,in2:`SourceAlpha`,operator:`in`,result:`lum`}),J(`feComponentTransfer`,{in:`lum`,result:`beam`},J(`feFuncA`,{type:`linear`,slope:1.5,intercept:-.35})),J(`feComposite`,{in:`beam`,in2:`SourceAlpha`,operator:`in`,result:`trace`}),...vy(ly.phosphor,`trace`,`glow`),J(`feGaussianBlur`,{in:`glow`,stdDeviation:2.5,result:`bloom`}),...dy(`<rect y='2' width='3' height='1' fill='black'/>`,3,`scan`),J(`feOffset`,{in:`scan`,dx:0,dy:0,result:`scanRoll`,"data-sprite-boil":`roll`}),...vy(ly.screen,`scanRoll`,`scanlines`,.6),_y(`crt`,`ground`,`bloom`,`glow`,`scanlines`)],boil:{intervalMs:120,tracks:[{name:`roll`,attribute:`dy`,frames:[0,1,2]}]}},Oy={region:by,primitives:[J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.03,numOctaves:3,seed:9,result:`flow`}),J(`feDisplacementMap`,{in:`SourceGraphic`,in2:`flow`,scale:7,xChannelSelector:`R`,yChannelSelector:`G`,result:`bled`}),J(`feGaussianBlur`,{in:`bled`,stdDeviation:1.4,result:`wash`}),J(`feComponentTransfer`,{in:`wash`,result:`thin`},J(`feFuncR`,{type:`linear`,slope:.78,intercept:.2}),J(`feFuncG`,{type:`linear`,slope:.78,intercept:.2}),J(`feFuncB`,{type:`linear`,slope:.78,intercept:.2}),J(`feFuncA`,{type:`linear`,slope:.9,intercept:0})),J(`feGaussianBlur`,{in:`wash`,stdDeviation:3,result:`spread`}),J(`feComposite`,{in:`wash`,in2:`spread`,operator:`arithmetic`,k2:1.6,k3:-1.4,result:`rimMask`}),J(`feComponentTransfer`,{in:`wash`,result:`deep`},J(`feFuncR`,{type:`linear`,slope:.6,intercept:0}),J(`feFuncG`,{type:`linear`,slope:.6,intercept:0}),J(`feFuncB`,{type:`linear`,slope:.6,intercept:0})),J(`feComposite`,{in:`deep`,in2:`rimMask`,operator:`in`,result:`rim`}),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.7,numOctaves:2,seed:11,result:`tooth`}),fy(`0 0 0 -0.8 1.5`,`tooth`,`toothMask`),py(`SourceGraphic`,`dark`),fy(`0 0 0 5 -3.8`,`dark`,`keyMask`),...vy(ly.ink,`keyMask`,`key`,.9),_y(`paint`,`thin`,`rim`,`key`),J(`feComposite`,{in:`paint`,in2:`toothMask`,operator:`in`})]},ky=Sy(xy),Ay={manga:Cy,riso:wy,halftone:Ty,blueprint:Ey,crt:Dy,watercolor:Oy},jy=e=>e===`pencil`?ky:Ay[e],My=`http://www.w3.org/2000/svg`,Ny=(e,t)=>{let n=e.createElementNS(My,t.tag);for(let[e,r]of Object.entries(t.attributes))n.setAttribute(e,String(r));for(let r of t.children)n.append(Ny(e,r));return n};function Py(e){let t=`sprite-style-${oy()}`,n=e.ownerDocument,r=n.defaultView,i=`plain`,a,o,s=!1,c=!0,l,u=0,d=()=>{l!==void 0&&clearInterval(l),l=void 0},f=()=>{if(d(),i===`plain`||!o||s||!c||n.hidden)return;let e=jy(i).boil;if(!e)return;let t=o;l=setInterval(()=>{if(!n.hidden){u+=1;for(let n of e.tracks){let e=n.frames[u%n.frames.length];t.querySelector(`[data-sprite-boil="${n.name}"]`)?.setAttribute(n.attribute,String(e))}}},e.intervalMs)},p=r?.IntersectionObserver,m=p?new p(e=>{c=e.some(e=>e.isIntersecting),f()}):void 0;m?.observe(e);let h=()=>{d(),o?.remove(),o=void 0,a&&(a.style.filter=``)};return{set(r,s){if(r===i&&s===a||(h(),i=r,a=s,r===`plain`))return;let c=jy(r),l=`${t}-${r}`,u=n.createElementNS(My,`svg`);u.setAttribute(`aria-hidden`,`true`),u.setAttribute(`focusable`,`false`),u.setAttribute(`width`,`0`),u.setAttribute(`height`,`0`),u.style.cssText=`position:absolute;width:0;height:0;overflow:hidden`,u.append(Ny(n,J(`filter`,{id:l,...c.region,"color-interpolation-filters":`sRGB`},...c.primitives))),e.append(u),o=u,s.style.filter=`url(#${l})`,f()},still(e){e!==s&&(s=e,f())},dispose(){h(),a=void 0,m?.disconnect()}}}var Fy=[`mushroom`,`cat`,`burger`];St([`shift`,`keep`]);var Iy=k().regex(/^#[0-9a-f]{6}$/i),Ly=en([Iy,Lt(),cr()]),Ry=16,zy=pe({v:gt(1),character:St(Fy),appearance:Ht(k().min(1),Ly).refine(e=>Object.keys(e).length<=Ry,{message:`Avatar appearance cannot exceed ${String(Ry)} keys`}),expression:k().min(1),renderStyle:cy});function By(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(-1,Math.min(n-3,9-n,1));return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function Vy(e){let t=2166136261;for(let n of e)t^=n.codePointAt(0)??0,t=Math.imul(t,16777619)>>>0;return t}function Hy(e){let t=Vy(e)%360;return{cap:By(t,68,72),capSpot:By(t,70,92)}}function Uy(e){return{v:1,character:`mushroom`,appearance:Hy(e),expression:`normal`,renderStyle:`plain`}}var Wy=Symbol.for(`effect/MutableList/Empty`),Gy=()=>({head:void 0,tail:void 0,length:0}),Ky=e=>{let t=e.head;t.offset>=1024&&t===e.tail&&t.mutable&&(t.array.length-t.offset)*8<=t.offset&&(e.head=e.tail={array:t.array.slice(t.offset),mutable:!0,offset:0,next:void 0})},qy=()=>({array:[],mutable:!0,offset:0,next:void 0}),Jy=(e,t)=>{e.tail?e.tail.mutable||(e.tail.next=qy(),e.tail=e.tail.next):e.head=e.tail=qy(),e.tail.array.push(t),e.length++},Yy=e=>{e.head=e.tail=void 0,e.length=0},Xy=(e,t)=>{if(t=Co(t),t<=0||!e.head)return[];if(t=Math.min(t,e.length),t===e.length&&e.head?.offset===0&&!e.head.next){let t=e.head.array;return Yy(e),t}let n=Array(t),r=0,i=e.head;for(;i;){for(;i.offset<i.array.length;)if(n[r++]=i.array[i.offset],i.mutable&&(i.array[i.offset]=void 0),i.offset++,r===t)return e.head=i.offset===i.array.length&&i.next?i.next:i,e.length-=t,e.length===0?Yy(e):Ky(e),n;i=i.next}return Yy(e),n},Zy=e=>{if(!e.head)return Wy;let t=e.head.array[e.head.offset];return e.head.mutable&&(e.head.array[e.head.offset]=void 0),e.head.offset++,e.length--,e.head.offset===e.head.array.length?e.head.next?e.head=e.head.next:Yy(e):Ky(e),t},Qy=`~effect/Queue`,$y=`~effect/Queue/Enqueue`,eb=`~effect/Queue/Dequeue`,tb={_A:Mr,_E:Mr},nb={[Qy]:tb,[$y]:tb,[eb]:tb,...pt,toJSON(){return{_id:`effect/Queue`,state:this.state._tag,size:_b(this)}}},rb=e=>Er(t=>{let n=Object.create(nb);return n.dispatcher=t.currentDispatcher,n.capacity=e?.capacity??1/0,n.strategy=e?.strategy??`suspend`,n.messages=Gy(),n.scheduleRunning=!1,n.state={_tag:`Open`,takers:new Set,offers:new Set,awaiters:new Set},Ae(n)}),ib=e=>rb({capacity:e}),ab=In(2,(e,t)=>Ee(()=>ob(e,t)?yb:e.state._tag===`Open`&&e.strategy===`suspend`?Ob(e,t):vb)),ob=(e,t)=>e.state._tag===`Open`?e.messages.length>=e.capacity?e.strategy===`sliding`?(Zy(e.messages),Jy(e.messages,t),!0):e.capacity<=0&&e.state.takers.size>0&&(Jy(e.messages,t),Sb(e),!0):(Jy(e.messages,t),Cb(e),!0):!1,sb=In(2,(e,t)=>cb(e,Nr(t))),cb=In(2,(e,t)=>nn(()=>lb(e,t))),lb=(e,t)=>{if(e.state._tag!==`Open`)return!1;let n=On(t),r=y(n,bb);return e.state.offers.size===0&&e.messages.length===0?(Nb(e,r),!0):(e.state={...e.state,_tag:`Closing`,exit:r},Cb(e),!0)},ub=e=>lb(e,Nr(Zt())),db=e=>nn(()=>fb(e)),fb=e=>{if(e.state._tag===`Done`)return!1;Yy(e.messages);let t=e.state.offers;Nb(e,e.state._tag===`Open`?xb:e.state.exit);for(let e of t)Ab(e);return!0},pb=e=>mb(e,1,1/0),mb=In(3,(e,t,n)=>(t=Co(t),n=Co(n),Tb(()=>wb(e,t,n)??kn(Db(e,()=>Eb(e,t)),mb(e,t,n))))),hb=e=>Tb(()=>gb(e)??kn(Db(e,()=>Eb(e,1)),hb(e))),gb=e=>{if(e.state._tag===`Done`)return e.state.exit;if(e.messages.length>0){let t=Zy(e.messages);return Mb(e),br(t)}if(e.capacity<=0&&e.state.offers.size>0){let t=jb(e.state.offers);return Mb(e),br(t)}},_b=e=>e.state._tag===`Done`?0:e.messages.length,vb=br(!1),yb=br(!0),bb=ai(Zt()),xb=Ii(),Sb=e=>{if(e.state._tag!==`Done`&&e.state.takers.size!==0){for(let t of e.state.takers)if(t.ready()&&(e.state.takers.delete(t),t.resume(wt),e.messages.length===0))break}},Cb=e=>{e.scheduleRunning||e.state._tag===`Done`||e.state.takers.size===0||(e.scheduleRunning=!0,e.dispatcher.scheduleTask(()=>{e.scheduleRunning=!1,Sb(e)},0))},wb=(e,t,n)=>{if(e.state._tag===`Done`)return e.state.exit;if(n<=0||t<=0)return br([]);if(!Eb(e,t))return;let r=e.messages.length>0?Xy(e.messages,n):[jb(e.state.offers)];return Mb(e),br(r)},Tb=Hr({op:`QueueTake`,[gn](e){let t=this[Ln]();return jn(t)?t[gn](e):t}}),Eb=(e,t)=>e.messages.length>=(e.state._tag===`Closing`?1:Math.min(t,e.capacity||1))||e.capacity<=0&&e.state._tag!==`Done`&&e.state.offers.size>0,Db=(e,t)=>gi(n=>{if(e.state._tag===`Done`)return n(e.state.exit);if(t())return n(wt);let r={ready:t,resume:n};return e.state.takers.add(r),nn(()=>{e.state._tag!==`Done`&&e.state.takers.delete(r)})}),Ob=(e,t)=>gi(n=>ob(e,t)?n(yb):kb(e,{_tag:`Single`,message:t,resume:n})),kb=(e,t)=>{if(e.state._tag!==`Open`)return Ab(t);let n=e.state.offers;return n.add(t),nn(()=>{e.state._tag!==`Done`&&(n.delete(t),e.state._tag===`Closing`&&n.size===0&&e.messages.length===0&&Nb(e,e.state.exit))})},Ab=e=>e._tag===`Single`?e.resume(vb):e.resume(br(e.remaining.slice(e.offset))),jb=e=>{let t=e.values().next().value;if(t._tag===`Single`)return e.delete(t),t.resume(yb),t.message;let n=t.remaining[t.offset++];return t.offset===t.remaining.length&&(e.delete(t),t.resume(br([]))),n},Mb=e=>{if(e.state._tag===`Done`)return pc(e.state.exit.cause);if(e.state.offers.size===0)return e.state._tag===`Closing`&&e.messages.length===0&&(Nb(e,e.state.exit),pc(e.state.exit.cause));for(let t of e.state.offers){let n=e.capacity-e.messages.length;if(n<=0)break;if(t._tag===`Single`)Jy(e.messages,t.message),e.state.offers.delete(t),t.resume(yb);else{for(;t.offset<t.remaining.length;t.offset++){if(n===0)return!1;Jy(e.messages,t.remaining[t.offset]),n--}e.state.offers.delete(t),t.resume(br([]))}let r=e.state;if(r._tag===`Done`)return pc(r.exit.cause)}return!1},Nb=(e,t)=>{if(e.state._tag===`Done`)return;let n=e.state;e.state={_tag:`Done`,exit:t};for(let e of n.takers)e.resume(t);n.takers.clear();for(let e of n.awaiters)e(t);n.awaiters.clear()},Pb=Ei,Fb=re,Ib=kt,Lb=ur,Rb=w,zb=Se,Bb=le,Vb=e=>new Ub(e),Hb=(e,t,n)=>gi(r=>{if(e.free>=t)return r(n);let i=()=>{e.free<t||(e.waiters.delete(i),r(n))};return e.waiters.add(i),nn(()=>{e.waiters.delete(i)})}),Ub=class{waiters=new Set;taken=0;permits;constructor(e){this.permits=e}get free(){return this.permits-this.taken}take(e){let t=Ee(()=>this.free<e?Hb(this,e,t):(this.taken+=e,Ae(e)));return t}takeIfAvailable(e){return Ee(()=>this.free<e?Ae(!1):(this.taken+=e,Ae(!0)))}releaseUnsafe(e,t){return this.taken-=t,this.waiters.size>0&&e.currentDispatcher.scheduleTask(()=>{for(let e of this.waiters){if(this.free<=0)break;e()}},0),this.free}resize(e){return Er(t=>(this.permits=e,this.free<0||this.releaseUnsafe(t,0),cn))}release(e){return Er(t=>Ae(this.releaseUnsafe(t,e)))}get releaseAll(){return Er(e=>Ae(this.releaseUnsafe(e,this.taken)))}withPermits(e){return t=>Xt(n=>{let r=Ee(()=>{if(this.free<e){let t=Hb(this,e,cn);return l(n(t),()=>r)}return this.taken+=e,Fe(n(t),()=>{this.releaseUnsafe(ur(),e)},!0)});return r})}withPermit=this.withPermits(1);withPermitsIfAvailable(e){return t=>Xt(n=>this.free<e?Xr:(this.taken+=e,Fe(n(xr(t)),()=>{this.releaseUnsafe(ur(),e)},!0)))}},Wb=e=>nn(()=>new Ub(e)),Gb=`~effect/Channel`,Kb=e=>Bi(e,Gb),qb={[Gb]:{_Env:Mr,_InErr:Mr,_InElem:Mr,_OutErr:Mr,_OutElem:Mr},pipe(){return Dn(this,arguments)}},Jb=e=>{let t=Object.create(qb);return t.transform=(t,r)=>n(e(t,r),e=>O(Br(e))),t},Yb=(e,t)=>Jb((n,r)=>j(Qb(e)(n,r),e=>t(e,r))),Xb=e=>Jb((t,n)=>e),Zb=e=>Jb(Fn(function*(t,n){let r=ks(n),i=e=>As(r,_c(e)),a=yield*We(e(t,n,r),i);return We(a,i)})),Qb=e=>e.transform,$b=4096,ex=(e,t,r)=>rb({capacity:r?.bufferSize,strategy:r?.strategy}).pipe(ln(t=>Os(e,db(t))),ln(r=>Ds(t(r),e).pipe(n(e=>cb(r,e)),hn(e)))),tx=(e,t)=>Jb((n,r)=>S(ex(r,e,t),pb)),nx=e=>Jb((t,n)=>rn(()=>Qb(e())(t,n))),rx=e=>Xb(Qt(()=>{let t=e();return rn(()=>{let e=t.next();return e.done?as(e.value):O(e.value)})})),ix=(e,t=$b)=>{let n=wo(t);return Xb(Qt(()=>{let t=e(),r=yt();return rn(()=>{if(r._tag===`Some`)return as(r.value);let e=[];for(;e.length<n;){let n=t.next();if(n.done){if(e.length===0)return as(n.value);r=g(n.value);break}e.push(n.value)}return O(e)})}))},ax=(e,t=$b)=>ix(()=>e[Symbol.iterator](),t),ox=e=>ux(O(e)),sx=Xb(O(as())),cx=e=>Xb(O(bn(e))),lx=e=>Xb(Br(e)),ux=e=>Xb(Qt(()=>{let t=!1;return rn(()=>t?as():(t=!0,e))})),dx=e=>Xb(O(pb(e))),fx=(e,t)=>Jb(Fn(function*(n,r){let i=e[Symbol.asyncIterator]();return i.return&&(yield*Os(r,Le(()=>i.return()))),j(Rn({try:()=>i.next(),catch:t}),e=>e.done?as(e.value):O(e.value))})),px=(e,t)=>mx(fx(e,t),mn),mx=In(2,(e,t)=>Yb(e,e=>Qt(()=>{let n=0;return S(e,e=>t(e,n++))}))),hx=e=>e===void 0||e!==`unbounded`&&e<=1,gx=In(e=>Kb(e[0]),(e,t,n)=>hx(n?.concurrency)?_x(e,t):vx(e,t,n)),_x=(e,t)=>Jb((n,r)=>{let i=0;return S(Qb(e)(n,r),j(e=>t(e,i++)))}),vx=(e,t,i)=>Zb(Fn(function*(a,o,s){let c=0,l=yield*Qb(e)(a,o),u=i.concurrency===`unbounded`?2**53-1:i.concurrency,d=yield*ib(0);yield*Os(s,db(d));let f=Bt(yield*mi()),p=Rb(s);if(i.unordered){let e=Vb(u),i=r(e.release(1)),a=nt({onFailure:e=>j(cb(d,e),i),onSuccess:e=>j(ab(d,e),i)});yield*e.take(1).pipe(j(()=>l),j(e=>{let n=c++;return p(f(a(rn(()=>t(e,n))))),ar}),Ar({disableYield:!0}),n(t=>e.withPermits(u-1)(cb(d,t))),hn(s))}else{let e=yield*ib(u-2);yield*Os(s,db(e)),yield*hb(e).pipe(vi,j(e=>ab(d,e)),Ar({disableYield:!0}),n(e=>cb(d,e)),hn(s));let r,i=e=>{e._tag!==`Success`&&(r=e.cause,lb(d,e.cause))};yield*l.pipe(j(n=>{if(r)return Br(r);let a=c++,o=f(rn(()=>t(n,a)));return p(o),o.addObserver(i),ab(e,Fb(o))}),Ar({disableYield:!0}),n(t=>ab(e,cs(t)).pipe(we(cb(e,t)))),hn(s))}return hb(d)})),yx=In(e=>Kb(e[0]),(e,t,n)=>hx(n?.concurrency)?bx(e,t):xx(e,t,n)),bx=(e,t)=>Jb((n,r)=>S(Qb(e)(n,r),e=>{let i,a,o=j(e,e=>(a??=ks(r),wr(Qb(t(e))(n,a),e=>(i=s(e),i)))),s=fc(e=>{if(i=void 0,a.state._tag===`Empty`)return o;let t=As(a,ds);return a=void 0,j(t,()=>o)});return rn(()=>i??o)})),xx=(e,t,n)=>e.pipe(mx(t),Ex(n)),Sx=e=>yx(e,Mr),Cx=e=>Yb(e,e=>{let t,n=0,r=rn(function r(){if(t===void 0)return j(e,e=>{switch(e.length){case 0:return r();case 1:return O(e[0]);default:return t=e,O(e[n++])}});let i=t[n++];return n>=t.length&&(t=void 0,n=0),O(i)});return O(r)}),wx=In(2,(e,t)=>Yb(e,e=>O(j(e,function n(r){let i=[];for(let e=0;e<r.length;e++)t(r[e])&&i.push(r[e]);return kr(i)?O(i):j(e,n)})))),Tx=In(2,(e,t)=>Jb((r,i)=>{let a=ks(i);return S(Qb(e)(r,a),e=>{let o=e.pipe(n(e=>{if(pc(e))return Br(e);let n=a;return a=ks(i),As(n,cs(e)).pipe(we(Qb(t(e))(r,a)),j(e=>(o=e,e)))}));return rn(()=>o)})})),Ex=In(2,(e,{bufferSize:t=16,concurrency:r,switch:i=!1})=>Zb(Fn(function*(a,o,s){let c=r===`unbounded`?2**53-1:Math.max(1,r),l=i?void 0:Vb(c),u=yield*Bb(!0),d=new Set,f=yield*ib(t);yield*Os(s,db(f));let p=yield*Qb(e)(a,o);return yield*En(function*(){for(;;){let e;l&&(d.size<c?yield*l.take(1):(e=yield*tr(p),yield*Hi(l.take(1),we(Fb(e),fr))));let t=e===void 0?yield*p:yield*Fb(e),n=ks(s),r=yield*Qb(t)(a,n);for(;d.size>=c;){let e=To(d);d.delete(e),d.size===0&&(yield*u.open),yield*Ib(e)}let i=yield*r.pipe(ln(()=>_n),j(e=>ab(f,e)),Ar({disableYield:!0}),We(Fn(function*(e){let t=_c(e),r=yield*sr(As(n,t));if(!d.has(i))return;let a=ms([t,r]);ps(a)&&(yield*cb(f,a.cause)),d.delete(i),l&&(yield*l.release(1)),d.size===0&&(yield*u.open)})),tr);u.closeUnsafe(),d.add(i)}}).pipe(n(e=>{let t=hc(e);return Oi(t)?u.whenOpen(cb(f,e)):cb(f,e)}),hn(s)),hb(f)}))),Dx=In(e=>Kb(e[0])&&Kb(e[1]),(e,t,n)=>Zb(Fn(function*(r,i,a){let o=n?.haltStrategy??`both`,s=yield*ib(0);yield*Os(a,db(s));let c=0;function l(e,t){if(c++,!pc(t))return cb(s,t);switch(o){case`both`:return c===2?cb(s,t):ar;case`left`:case`right`:return e===o?cb(s,t):ar;case`either`:return cb(s,t)}}let u=(e,t,n)=>Qb(t)(r,n).pipe(j(e=>e.pipe(j(e=>ab(s,e)),Ar)),We(t=>lt(_c(t),e=>As(n,e)).pipe(nt({onFailure:t=>l(e,t),onSuccess:()=>l(e,t)}))),hn(a));return yield*u(`left`,e,ks(a)),yield*u(`right`,t,ks(a)),hb(s)}))),Ox=e=>Jb((t,n)=>{let r;return O(rn(()=>r||e.pipe(Ds(n),j(e=>Qb(e)(t,n)),j(e=>r=e))))}),kx=In(2,(e,t)=>Dx(e,Xb(O(j(t,as))),{haltStrategy:`either`})),Ax=Fn(function*(e){let t=Vb(1),n=yield*mi(),r=Cr(n,ws);return(yield*Qb(e)(as(),r)).pipe(bt(n),t.withPermits(1))},n(e=>O(Br(e)))),jx=(e,t)=>Qb(e)(as(),t),Mx=`~effect/Stream`,Nx={_R:Mr,_E:Mr,_A:Mr},Px=function(e){this.channel=e};Px.prototype={[Mx]:Nx,pipe(){return Dn(this,arguments)}};var Fx=e=>new Px(e),Ix=`~effect/Sink`,Lx={_A:Mr,_In:Mr,_L:Mr,_E:Mr,_R:Mr},Rx={[Ix]:Lx,pipe(){return Dn(this,arguments)}},zx=e=>{let t=Object.create(Rx);return t.transform=e,t},Bx=((e,t,n)=>zx(r=>{let i=e(),a;return t(i)?r.pipe(j(e=>{for(let r=0;r<e.length;r++)if(i=n(i,e[r]),!t(i))return r+1<e.length&&(a=e.slice(r+1)),as();return ar}),Ar({disableYield:!0}),fc(()=>O([i,a]))):O([i])}))(yt,Ye,(e,t)=>g(t)),Vx=()=>Bx,Hx=`~effect/Stream`,Ux=e=>Bi(e,Hx),Wx=Fx,Gx=e=>Wx(ux(S(e,mn))),Kx=e=>qx(O(j(e,()=>as()))),qx=e=>Wx(Xb(e)),Jx=(e,t)=>Wx(Jb((n,r)=>j(jx(e.channel,r),e=>t(e,r)))),Yx=e=>e.channel,Xx=(e,t)=>Wx(tx(e,t)),Zx=Wx(sx),Qx=e=>Wx(ox(mn(e))),$x=e=>Wx(nx(()=>e().channel)),eS=e=>Wx(cx(e)),tS=e=>Wx(lx(e)),nS=(e,t)=>Array.isArray(e)&&t?.chunkSize===void 0?rS(e):Wx(ax(e,t?.chunkSize)),rS=e=>kr(e)?Wx(ox(e)):Zx,iS=e=>Wx(dx(e)),aS=(e,t)=>Wx(px(e,t)),oS=e=>Wx(Ox(S(e,Yx))),sS=In(e=>Ux(e[0]),(e,t,n)=>e.channel.pipe(Cx,gx(t,n),mx(mn),Wx)),cS=In(e=>Ux(e[0]),(e,t,n)=>e.channel.pipe(Cx,yx(e=>t(e).channel,n),Wx)),lS=In(2,(e,t)=>{let n=i(t.duration);if(!Bn(n))return e;if(pi(n))return $x(t.orElse);let r=Symbol();return gS($x(()=>{let t=Lb().getRef(js),i=ni(n),a,o=zb(!1);return pS(Jx(e,(e,n)=>rn(()=>(a=t.currentTimeMillisUnsafe()+i,o.openUnsafe(),e)).pipe(S(e=>(o.closeUnsafe(),a=void 0,e)),O)),Kx(En(function*(){for(;;)if(yield*o.await,a!==void 0&&(yield*Qr(a-t.currentTimeMillisUnsafe()),a!==void 0&&!(a-t.currentTimeMillisUnsafe()>0)))return yield*Fr(r)})),{haltStrategy:`left`})}),e=>e.reasons.find(e=>e._tag===`Die`&&e.defect===r)?t.orElse():tS(e))}),uS=In(2,(e,t)=>{let n=Wx(Sx(rx(()=>fS(e,t))));return dS.set(n,[e,t]),n}),dS=new WeakMap;function*fS(e,t){let n=[t,e];for(;n.length>0;){let e=n.pop(),t=dS.get(e);t===void 0?yield e.channel:n.push(t[1],t[0])}}var pS=In(e=>Ux(e[0])&&Ux(e[1]),(e,t,n)=>Wx(Dx(Yx(e),Yx(t),n))),mS=In(2,(e,t)=>Wx(wx(Yx(e),t))),hS=In(2,Fn(function*(e,t){let r,i=yield*Ax(e.channel),a=n(i,e=>(r=e,Br(e))),[o,s]=yield*Me(e=>t.transform(a,e)),c=r?Zx:qx(O(i));return s&&(c=uS(rS(s),c)),[o,c]})),gS=In(2,(e,t)=>e.channel.pipe(Tx(e=>t(e).channel),Wx)),_S=In(e=>Ux(e[0]),(e,t,n)=>Jx(e,(e,r)=>Qt(()=>{let r=0,i=!1;return j(rn(()=>i?as():e),e=>{let a=e.findIndex(e=>t(e,r++));if(a>=0){i=!0;let t=e.slice(0,n?.excludeLast?a:a+1);return kr(t)?O(t):as()}return O(e)})}))),vS=In(2,(e,t)=>Wx(kx(e.channel,t))),yS=In(2,(e,t)=>({[Symbol.asyncIterator](){let n=Ft(t),r=Bt(t),i=Es(),a,o,s,c,l=e=>{if(c)return c;let t=s;return c=n(qt(we(t?Ib(t):ar,As(i,e)),{done:!0,value:void 0})),c},u=async e=>{try{await l(e)}catch(e){await n(Et(`Suppressed error while closing Stream async iterator`,e))}};return{async next(){if(c)return c;if(o){let e=o.next();if(!e.done)return e;o=void 0}let t=r(a??j(jx(e.channel,i),e=>(a=e,e)));s=t;let d=await n(Pb(t));if(s===t&&(s=void 0),fs(d))return o=d.value[Symbol.iterator](),o.next();if(pc(d.cause))return l(ds);if(c&&Qo(d.cause))return c;throw await u(d),es(d.cause)},return(){return l(ds)},async throw(e){throw await u(us(e)),e}}}})),bS=e=>yS(e,An()),xS=R.pipe(W(Fg(1)),W(K(4096))),SS=R.pipe(W(Fg(1)),W(K(513))),CS=B({params:V(B({key:R.check(Fg(1),K(64)),value:R.check(K(4096))})).check(K(16))}),wS=B({id:SS,title:xS,detail:I(R.pipe(W(K(1024)))),tone:I(H([`attention`,`running`,`error`,`settled`,`muted`])),status:I(B({label:xS,tone:H([`neutral`,`primary`,`secondary`,`accent`,`success`,`info`,`warning`,`error`])})),open:I(CS)}),TS=V(wS).pipe(W(K(200)));B({...wS.fields,media:I(B({path:xS,format:H([`fungi:image`,`fungi:video`])}))});var ES=e=>new Set(e).size===e.length,DS=R.pipe(W(K(256)),W(vg(e=>e.trim().length>0,{message:`Declared command text must not be blank`}))),OS=DS.pipe(W(K(64))),kS=V(B({key:OS,label:DS,kind:H([`computer`,`repository`,`branch`]),required:Zh,options:I(DS)}).check(vg(e=>e.kind!==`computer`||e.options===void 0,{message:`Computer options are host-owned`}))).check(K(4),vg(e=>ES(e.map(e=>e.key)),{message:`Gill parameter keys must be unique`})),AS=ig([B({storage:DS}),B({binding:DS})]),jS=DS.pipe(W(vg(e=>!e.includes(`:`),{message:`Gill IDs are App-local`}))),MS=B({sizes:V(H([`S`,`M`,`L`])).check(Fg(1),K(3),vg(ES,{message:`Desktop Gill sizes must be unique`}))}),NS=e=>B({id:jS,view:e,title:DS,source:DS,params:I(kS),watch:I(AS),desktop:I(MS)}),PS=NS(L(`rows`)),FS=B({id:jS,title:DS,view:L(`surface`),desktop:MS}),IS=ig([PS,FS]),LS=ig([NS(L(`rows`).pipe(pg(O(`rows`)))),FS]),RS=$h(OS,R.check(K(256))).check(vg(e=>Object.keys(e).length<=4,{message:`Gill placement supports at most four parameters`}));B({viewId:SS,params:I(RS),after:I(R.check(K(1024))),options:I(OS)}),B({id:SS,params:I(RS),after:I(R.check(K(1024))),options:I(OS)});var zS=ig([B({viewId:SS,title:xS,state:L(`empty`),rows:tg([]),emptyText:I(R.pipe(W(Fg(1)),W(K(120)))),action:I(B({kind:L(`open`)})),next:I(R.pipe(W(K(1024))))}),B({viewId:SS,title:xS,state:L(`error`),rows:tg([]),reason:I(H([`exec_isolation_required`,`params_required`,`disabled`])),error:R.pipe(W(Fg(1)),W(K(512))),recovery:I(ig([B({kind:L(`configure`),param:OS}),B({kind:L(`open`)})]))}),B({viewId:SS,title:xS,state:L(`full`),rows:TS.pipe(W(Fg(1))),next:I(R.pipe(W(K(1024))))})]);Rh(zS,{onExcessProperty:`error`});var BS=B({options:V(B({value:R.check(K(256)),label:xS,detail:I(R.check(K(1024)))})).check(K(200)),next:I(R.check(K(1024)))});Rh(ig([zS,BS]),{onExcessProperty:`error`}),Rh(BS,{onExcessProperty:`error`});var VS=Je(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);b.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>Di(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ie(e,t,n),e.parseAsync=async(t,n)=>At(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ee(e,t,n),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0}),e.with=e.check,e.clone=(t,n)=>_r(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),HS=Je(`ZodMiniString`,(e,t)=>{Tt.init(e,t),VS.init(e,t)});function US(e){return Sr(HS,e)}var WS=Je(`ZodMiniNumber`,(e,t)=>{Si.init(e,t),VS.init(e,t)});function GS(e){return vn(WS,e)}var KS=Je(`ZodMiniNumberFormat`,(e,t)=>{Li.init(e,t),WS.init(e,t)});function qS(e){return zn(KS,e)}var JS=Je(`ZodMiniNever`,(e,t)=>{Jn.init(e,t),VS.init(e,t)});function YS(e){return or(JS,e)}var XS=Je(`ZodMiniArray`,(e,t)=>{Nn.init(e,t),VS.init(e,t)});function ZS(e,t){return new XS({type:`array`,element:e,...He(t)})}var QS=Je(`ZodMiniObject`,(e,t)=>{wn.init(e,t),VS.init(e,t),u(e,`shape`,()=>t.shape)});function $S(e,t){return new QS({type:`object`,shape:e??{},...He(t)})}function eC(e,t){return new QS({type:`object`,shape:e,catchall:YS(),...He(t)})}var tC=Je(`ZodMiniDiscriminatedUnion`,(e,t)=>{Wr.init(e,t),VS.init(e,t)});function nC(e,t,n){return new tC({type:`union`,options:t,discriminator:e,...He(n)})}var rC=Je(`ZodMiniLiteral`,(e,t)=>{er.init(e,t),VS.init(e,t)});function iC(e,t){return new rC({type:`literal`,values:Array.isArray(e)?e:[e],...He(t)})}var aC=Je(`ZodMiniOptional`,(e,t)=>{Ni.init(e,t),VS.init(e,t)});function oC(e){return new aC({type:`optional`,innerType:e})}var sC=Je(`ZodMiniNullable`,(e,t)=>{pn.init(e,t),VS.init(e,t)});function cC(e){return new sC({type:`nullable`,innerType:e})}var lC=Je(`ZodMiniLazy`,(e,t)=>{Or.init(e,t),VS.init(e,t)});function uC(e){return new lC({type:`lazy`,getter:e})}var dC=Je(`ZodMiniCustom`,(e,t)=>{Wn.init(e,t),VS.init(e,t)});function fC(e,t={}){return si(dC,e,t)}function pC(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function mC(...e){return t=>{let n=!1,r=e.map(e=>{let r=pC(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():pC(e[t],null)}}}}function hC(...e){return M.useCallback(mC(...e),e)}function gC(e){let t=M.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];wC(r)&&typeof OC==`function`&&(r=OC(r._payload)),M.Children.forEach(r,e=>{if(SC(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;wC(n)&&typeof OC==`function`&&(n=OC(n._payload)),a=yC(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=M.cloneElement(a,void 0,s):!o&&M.Children.count(r)===1&&M.isValidElement(r)&&(a=r);let c=a?xC(a):void 0,l=hC(n,c);if(!a){if(r||r===0)throw Error(o?DC(e):EC(e));return r}let u=bC(i,a.props??{});return a.type!==M.Fragment&&(u.ref=n?l:c),M.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var _C=gC(`Slot`),vC=Symbol.for(`radix.slottable`),yC=(e,t)=>{if(`child`in e.props){let t=e.props.child;return M.isValidElement(t)?M.cloneElement(t,void 0,e.props.children(t.props.children)):null}return M.isValidElement(t)?t:null};function bC(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function xC(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function SC(e){return M.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===vC}var CC=Symbol.for(`react.lazy`);function wC(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===CC&&`_payload`in e&&TC(e._payload)}function TC(e){return typeof e==`object`&&!!e&&`then`in e}var EC=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,DC=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,OC=M.use,kC=Object.freeze({alphaIntercept:-9,alphaSlope:19,blurStdDeviation:1.5}),AC=Object.freeze([`2xs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`]);Object.freeze(`--stipe-font-synthesis.--stipe-surface-frame-width.--stipe-surface-frame-image.--stipe-surface-molding-contrast.--stipe-shadow-raised.--stipe-shadow-inset.--stipe-shadow-edge.--stipe-display-gasket-face.--stipe-display-texture-image.--stipe-display-text-shadow.--stipe-canvas.--stipe-surface.--stipe-surface-raised.--stipe-surface-selected.--stipe-fg-muted.--stipe-linework.--stipe-hairline.--stipe-hairline-quiet.--stipe-figure-ink.--stipe-density-compact.--stipe-density-comfortable.--stipe-motion-spring.--stipe-motion-squish.--stipe-motion-fast.--stipe-motion-normal.--stipe-motion-slow.--stipe-motion-ease.--stipe-motion-ease-exit.--stipe-motion-bounce.--stipe-motion-spring-duration.--stipe-motion-stretch.--stipe-motion-distance.--stipe-motion-stagger.--stipe-motion-blur.--stipe-motion-shake.--stipe-motion-steps.--stipe-motion-fuse.--stipe-press-depth.--stipe-press-scale.--stipe-layer-desktop.--stipe-layer-windows.--stipe-layer-chrome.--stipe-layer-popover.--stipe-layer-dialog.--stipe-layer-toast.--stipe-layer-tooltip.--stipe-overlay-shadow-outset.--stipe-icon-size-sm.--stipe-icon-size-md.--stipe-icon-size-lg.--stipe-icon-stroke.--stipe-card-rim.--stipe-card-rim-edge.--stipe-card-face.--stipe-card-panel.--stipe-card-ink.--stipe-card-ink-muted.--stipe-card-accent.--stipe-card-shadow.--stipe-card-foil-highlight.--stipe-card-foil-warm.--stipe-card-foil-cool.--stipe-avatar-shadow.--stipe-art-coral.--stipe-art-blue.--stipe-art-mint.--stipe-art-grape.--stipe-art-yellow.--stipe-art-cream.--stipe-art-ink.--stipe-art-inkcap.--stipe-art-graphite.--stipe-sketch-ink`.split(`.`));function jC(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=jC(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function MC(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jC(e))&&(r&&(r+=` `),r+=t);return r}var NC=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,PC=MC,FC=(e,t)=>n=>{if(t?.variants==null)return PC(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=NC(t)||NC(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return PC(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},IC=Object.defineProperty,LC=((e,t)=>{let n={};for(var r in e)IC(n,r,{get:e[r],enumerable:!0});return t||IC(n,Symbol.toStringTag,{value:`Module`}),n})({isAny:()=>ZC,isAnyNonArbitrary:()=>nw,isArbitraryFamilyName:()=>yw,isArbitraryImage:()=>xw,isArbitraryLength:()=>gw,isArbitraryNumber:()=>_w,isArbitraryPosition:()=>bw,isArbitraryShadow:()=>Sw,isArbitrarySize:()=>mw,isArbitraryValue:()=>hw,isArbitraryVariable:()=>Cw,isArbitraryVariableFamilyName:()=>Tw,isArbitraryVariableImage:()=>Ow,isArbitraryVariableLength:()=>ww,isArbitraryVariablePosition:()=>Ew,isArbitraryVariableShadow:()=>kw,isArbitraryVariableSize:()=>Dw,isArbitraryVariableWeight:()=>Aw,isArbitraryWeight:()=>vw,isFraction:()=>KC,isInteger:()=>JC,isNamedContainerQuery:()=>rw,isNumber:()=>qC,isPercent:()=>YC,isTshirtSize:()=>XC}),RC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,BC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,VC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,UC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,WC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,KC=e=>BC.test(e),qC=e=>!!e&&!Number.isNaN(Number(e)),JC=e=>!!e&&Number.isInteger(Number(e)),YC=e=>e.endsWith(`%`)&&qC(e.slice(0,-1)),XC=e=>VC.test(e),ZC=()=>!0,QC=e=>HC.test(e)&&!UC.test(e),$C=()=>!1,ew=e=>WC.test(e),tw=e=>GC.test(e),nw=e=>!hw(e)&&!Cw(e),rw=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),iw=(e,t,n)=>{let r=RC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},aw=(e,t,n=!1)=>{let r=zC.exec(e);return r?r[1]?t(r[1]):n:!1},ow=e=>e===`position`||e===`percentage`,sw=e=>e===`image`||e===`url`,cw=e=>e===`length`||e===`size`||e===`bg-size`,lw=e=>e===`length`,uw=e=>e===`number`,dw=e=>e===`family-name`,fw=e=>e===`number`||e===`weight`,pw=e=>e===`shadow`,mw=e=>iw(e,cw,$C),hw=e=>RC.test(e),gw=e=>iw(e,lw,QC),_w=e=>iw(e,uw,qC),vw=e=>iw(e,fw,ZC),yw=e=>iw(e,dw,$C),bw=e=>iw(e,ow,$C),xw=e=>iw(e,sw,tw),Sw=e=>iw(e,pw,ew),Cw=e=>zC.test(e),ww=e=>aw(e,lw),Tw=e=>aw(e,dw),Ew=e=>aw(e,ow),Dw=e=>aw(e,cw),Ow=e=>aw(e,sw),kw=e=>aw(e,pw,!0),Aw=e=>aw(e,fw,!0),jw=(e,t)=>{let n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]==`string`},Mw=e=>typeof e==`function`&&e.isThemeGetter===!0,Nw=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),Pw=(e,t)=>{let n=Nw(e);t.prefix!==void 0&&(n.prefix=t.prefix);let r=(e,t)=>{if(t)for(let n in t)t[n]!==void 0&&(e[n]=t[n])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));let a=(e,t)=>{if(t)for(let n in t){let r=t[n];r&&(e[n]=(e[n]??[]).concat(r))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},Fw={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},Iw=25,Lw=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),Rw=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},zw=(e,t)=>{if(typeof t==`function`){let n=e.fnName.get(t);return n===void 0&&(n=`$c`+e.fnName.size,e.fnName.set(t,n),e.impls[n]=t),Rw(e,n,t)}let n=t.$v,r=LC[n];if(Fw[n]===void 0||!r)throw Error(`cn: unknown validator "${n}"`);return Rw(e,n,r)},Bw=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),Vw=(e,t)=>e.theme[t]??[],Hw=(e,t,n)=>{let r=Bw(),i=(e,t)=>{for(let n of t.split(`-`)){let t=e.nextPart.get(n);t||(t=Bw(),e.nextPart.set(n,t)),e=t}return e},a=(n,r,o)=>{if(typeof n==`string`){let e=n===``?r:i(r,n);e.classGroupId=o;return}if(typeof n==`function`){if(Mw(n)){for(let t of n(e.theme))a(t,r,o);return}(r.validators??=[]).push({validatorId:zw(t,n),groupId:o});return}if(jw(n,`$t`)){for(let t of Vw(e,n.$t))a(t,r,o);return}if(jw(n,`$v`)){(r.validators??=[]).push({validatorId:zw(t,n),groupId:o});return}for(let[e,t]of Object.entries(n)){let n=i(r,e);for(let e of t)a(e,n,o)}};for(let[t,i]of Object.entries(e.classGroups)){let e=n(t);for(let t of i)a(t,r,e)}return r},Uw=e=>{let t=Lw(),n=[],r=new Map,i=e=>{let t=r.get(e);return t===void 0&&(t=n.length,n.push(e),r.set(e,t)),t},a=Hw(e,t,i),o=e=>{if(e.validators)return!1;for(let t of e.nextPart.values())if(!o(t))return!1;return!0},s=(e,t,n)=>{e.classGroupId>=0&&n.push({tail:t,gid:e.classGroupId});for(let[r,i]of e.nextPart)s(i,t+`-`+r,n)},c=e=>{for(let[t,n]of[...e.nextPart])o(n)?(s(n,t,e.lit),e.nextPart.delete(t)):c(n)};c(a);let l=[{edges:new Map,groupId:-1,vlist:-1}],u=()=>(l.push({edges:new Map,groupId:-1,vlist:-1}),l.length-1),d=[],f=new Map,p=e=>{let t=e.map(e=>e.validatorId+`:`+e.groupId).join(`,`),n=f.get(t);return n===void 0&&(n=d.length,d.push(e.map(e=>[e.validatorId,e.groupId])),f.set(t,n)),n},m=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e),i=l[n].edges.get(r);i===void 0&&(i=u(),l[n].edges.set(r,i)),n=i}return n},h=[],g=(e,t,n)=>{e.classGroupId>=0&&(l[t].groupId=e.classGroupId),e.validators&&(l[t].vlist=p(e.validators));for(let{tail:n,gid:r}of e.lit)h.push({anchor:t,tail:n,gid:r});for(let[r,i]of e.nextPart){let e=t;if(!n){let n=l[t].edges.get(45);n===void 0&&(n=u(),l[t].edges.set(45,n)),e=n}let a=m(e,r);g(i,a,!1)}};g(a,0,!0);let _=new Set(h.map(e=>e.anchor)),v=e=>l[e].groupId>=0||l[e].vlist>=0||_.has(e),y=new Map,b=[],x=e=>{let t=b.length;y.set(e,t);let n={edges:[],groupId:l[e].groupId,vlist:l[e].vlist};b.push(n);let r=[...l[e].edges.entries()].sort((e,t)=>e[0]-t[0]);for(let[e,t]of r){let r=String.fromCharCode(e),i=t;for(;l[i].edges.size===1&&!v(i);){let[[e,t]]=l[i].edges.entries();r+=String.fromCharCode(e),i=t}n.edges.push({label:r,oldTarget:i})}for(let e of n.edges)x(e.oldTarget);return t};x(0);let S=b.length,C=0;for(let e of b)C+=e.edges.length;let w=new Int32Array(S),ee=new Int32Array(C),te=``,ne=new Int32Array(S),re=new Int32Array(S),ie=[];{let e=0;for(let t=0;t<S;t++){let n=b[t];w[t]=n.edges.length;for(let t of n.edges)ee[e]=t.label.length,te+=t.label,ie.push(y.get(t.oldTarget)),e++;ne[t]=n.groupId,re[t]=n.vlist}}{let e=new Int32Array(S);for(let t=S-1;t>=0;t--){let n=1,r=t+1;for(let i=0;i<w[t];i++)n+=e[r],r+=e[r];e[t]=n}let t=0;for(let n=0;n<S;n++){let r=n+1;for(let i=0;i<w[n];i++){if(r!==ie[t])throw Error(`cn compiler: edge target mismatch at ${t}`);r+=e[r],t++}}}for(let e of h)e.anchor=y.get(e.anchor);{let e=new Int32Array(d.length).fill(-1),t=[];for(let n=0;n<S;n++){let r=re[n];r>=0&&(e[r]===-1&&(e[r]=t.length,t.push(d[r])),re[n]=e[r])}d.length=0,d.push(...t)}let T=0;for(let e of d)T+=e.length;let ae=new Int32Array(T),oe=new Int32Array(T);{let e=0;for(let t of d)for(let[n,r]of t)ae[e]=n,oe[e]=r,e++}h.sort((e,t)=>e.anchor-t.anchor||e.gid-t.gid||(e.tail<t.tail?-1:1));let se=[];for(let e of h){let t=se[se.length-1];t&&t.anchor===e.anchor&&t.gid===e.gid?t.tails.push(e.tail):se.push({anchor:e.anchor,gid:e.gid,tails:[e.tail],set:-1})}let ce=new Map,le=[];for(let e of se){let t=e.tails.join(` `),n=ce.get(t);n===void 0&&(n=le.length,ce.set(t,n),le.push(e.tails)),e.set=n}for(let e of le.flat())if(e.includes(`|`)||e.includes(` `))throw Error(`cn compiler: tail contains delimiter: `+e);let ue=new Set(le.flat()).size;se.sort((e,t)=>e.anchor-t.anchor||e.set-t.set);for(let t of Object.values(e.conflictingClassGroups))for(let e of t)i(e);for(let t of Object.values(e.conflictingClassGroupModifiers))for(let e of t)i(e);for(let t of e.postfixLookupClassGroups??[])i(t);let de=n.length,fe=new Int32Array(de).fill(-1),pe=0,me=e=>(fe[e]===-1&&(fe[e]=pe++),fe[e]);for(let e=0;e<oe.length;e++)oe[e]=me(oe[e]);for(let e of se)e.gid=me(e.gid);for(let e=0;e<ne.length;e++)ne[e]>=0&&(ne[e]=me(ne[e]));for(let e=0;e<de;e++)fe[e]===-1&&(fe[e]=pe++);let he=Array(de);for(let e=0;e<de;e++)he[fe[e]]=n[e];let ge=[],_e=[],E=[],D=[],ve=[];for(let t=0;t<de;t++){let n=he[t],i=(e.conflictingClassGroups[n]??[]).map(e=>fe[r.get(e)]),a=(e.conflictingClassGroupModifiers[n]??[]).map(e=>fe[r.get(e)]);i.length&&(ge.push(t),_e.push(i.length),E.push(...i));for(let e of a)D.push(t),ve.push(e)}let ye=(e.postfixLookupClassGroups??[]).map(e=>fe[r.get(e)]),be=[],xe=new Int32Array(ae.length);for(let e=0;e<ae.length;e++){let n=t.names[ae[e]],r=Fw[n];if(r!==void 0)xe[e]=r;else{let t=be.indexOf(n);t===-1&&(t=be.length,be.push(n)),xe[e]=Iw+t}}let Se=new Map,Ce=[],we=[],Te=[];{let e=0;for(let t of d){let n=[];for(let r=0;r<t.length;r++)n.push(xe[e++]);let r=n.join(`,`),i=Se.get(r);i===void 0&&(i=Ce.length,Se.set(r,i),Ce.push(n.length),we.push(...n)),Te.push(i)}}let Ee={};for(let e of be)Ee[e]=t.classifierFns.get(e);return{G:de,customNames:be,impls:Ee,edgeCounts:w,edgeLabelLen:ee,labelText:te,edgeTargetActual:ie,nodeGroup:ne,nodeVlist:re,nodeCount:S,totalEdges:C,patCounts:Ce,patOps:we,listPat:Te,vlistGroup:oe,litEntries:h,sets:le,attachments:se,uniqueTailCount:ue,adjGid:ge,adjCnt:_e,adjTgt:E,patGid:D,patTgt:ve,postfixLookup:ye,orderSensitiveModifiers:e.orderSensitiveModifiers.join(` `),prefix:e.prefix}},Ww=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},Gw=e=>{let t=Uw(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n),o=``,s=new Int32Array(t.uniqueTailCount*2);{let e=new Map,n=0,c=0;for(let l of t.attachments)for(let u of t.sets[l.set]){let t=e.get(u);t===void 0&&(t=n++,e.set(u,t),s[t*2]=o.length,s[t*2+1]=u.length,o+=u),r[c]=l.anchor,i[c]=l.gid,a[c]=t,c++}}return{tables:{GROUP_COUNT:t.G,edgeStart:Ww(t.edgeCounts),labelStart:Ww(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:Ww(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:s,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:Ww(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},Kw=`line`in Error(),qw=-1,Jw=-1,Yw=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Xw=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15|0},Zw=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:ee,orderSensitiveModifiers:te}=e,ne=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)ne[y[e]]=e;let re=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>re&&(re=t)}let ie=32;for(;ie<2*(1+re+S.length);)ie<<=1;let T=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)T[e+1]=T[e]+u[f[e]+1]-u[f[e]];let ae=new Uint8Array(r);for(let e=0;e<w.length;e++)ae[w[e]]=1;let oe=i.length-1,se=new Uint8Array(oe),ce=0,le=!0;for(let e=0;e<m.length;e++){se[m[e]]=1;let t=_[g[e]*2+1];t>ce&&(ce=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(le=!1)}let ue=1;for(;ue<m.length*2;)ue<<=1;let de=new Int32Array(ue).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Yw(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&ue-1;for(;de[n]!==-1;)n=n+1&ue-1;de[n]=e}let fe=(e,t,n,r)=>{let i=(Yw(t,n,r)^Math.imul(e,2654435761)|0)&ue-1,a=r-n;for(;;){let r=de[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&ue-1}},pe=n.cacheSize??8192,me=n.prefix??e.prefix??``,he=me===``?``:me+`:`,ge=he.length,_e=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),E=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,D=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ye=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,be=0,xe=-1,Se=-1,Ce=-1,we=-1,Te=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,Ee=e=>/\s/.test(String.fromCharCode(e)),De=(e,t,n)=>{if(be=0,xe=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)be=1;else if(r===40&&i===41)be=2;else return;Ce=t+1,we=n-1;let a=t+1;if(Te(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!Te(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(xe=t+1,Se=a,Ce=a+1)}},O=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},Oe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,k=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ke=e=>!!e&&!Number.isNaN(Number(e)),Ae=(e,t,n)=>{if(n-t<11||!O(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&O(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&O(e,t+10,t+18,`-normal/`)},je=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Me=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Ne=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],A=(e,t,n,r)=>{if(e>=10){if(e>=25)return _e[e-25](t.slice(n,r));let i=e-10;if(be!==je[i])return!1;if(xe>=0){for(let e of Me[i])if(O(t,xe,Se,e))return!0;return!1}switch(Ne[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(Ce,we);return E.test(e)&&!D.test(e)}case 3:return ke(t.slice(Ce,we));case 4:return ye.test(t.slice(Ce,we));default:return ve.test(t.slice(Ce,we))}}switch(e){case 0:return!0;case 1:return be===0;case 2:return be===1;case 3:return be===2;case 4:return Oe.test(t.slice(n,r));case 5:return ke(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&ke(t.slice(n,r-1));case 8:return k.test(t.slice(n,r));default:return Ae(t,n,r)}},Pe=new Set(typeof te==`string`?te.split(` `):te),Fe=(e,t,n,r,i,a)=>{let o=Yw(t,n,r)^(i?2654435769:0)|0,s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Ie=new Map,Le=new Map,Re=2,ze=4096,Be=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Pe.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Le.get(s);return c===void 0&&Le.set(s,c=Re++),c},Ve=new Map,He=r,Ue=r+4096,We=()=>He++,Ge=2097152,Ke=8192,qe=new Int32Array(Ke),Je=Array(Ke).fill(null),Ye=new Int32Array(Ke),Xe=new Int32Array(Ke),Ze=new Uint8Array(Ke),Qe=0,$e=(e,t,n,r,i,a,o,s)=>{let c=e;if(Je[e]!==null){if(Je[e|1]===null)c=e|1;else if(!(Qe++&3))c=e|Qe>>2&1;else return}Je[c]=t.slice(n,r),qe[c]=i,Ye[c]=a,Xe[c]=o,Ze[c]=s},et=()=>Je.fill(null),tt=256,nt=[new Int32Array(tt),new Int32Array(tt),new Int32Array(tt),new Int32Array(tt)],[rt,it,at,ot]=nt,st=new Uint8Array(tt),ct=new Uint8Array(tt),lt=()=>{tt*=2,nt=nt.map(e=>{let t=new Int32Array(tt);return t.set(e),t}),[rt,it,at,ot]=nt;let e=new Uint8Array(tt);e.set(st),st=e,ct=new Uint8Array(tt)},ut=64,dt=new Int32Array(ut),ft=new Int32Array(ut),pt=new Int32Array(r),mt=2048,ht=21,gt=new Float64Array(mt),_t=new Int32Array(mt),vt=0,yt=(e,t)=>{if(e===0&&t<r)return pt[t]===vt?1:(pt[t]=vt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>ht;for(;_t[i]===vt;){if(gt[i]===n)return 1;i=i+1&mt-1}return gt[i]=n,_t[i]=vt,0},bt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?qw:Fe(Ve,e,t+1,r,0,We)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=ft[t];if(r>n)continue;let i=dt[t],a=n-r;if(se[i]===1&&a>0&&a<=ce){let t=e.charCodeAt(r);if(le===!1||t!==91&&t!==40){let t=fe(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;De(e,r,n);let h=T[o]-c;for(let t=c;t<m;t++)if(A(d[t],e,r,n))return p[h+t]}return qw},xt=e=>{let t=e.length,n=0,c=0,u=!1;(Re>ze||Ie.size>ze)&&(Ie=new Map,Le=new Map,Re=2,et()),He>Ue&&(Ve=new Map,He=r,et());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&Ee(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&Ee(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===tt&&lt();let _=n++;rt[_]=p,it[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(qe[y]===v&&Je[y]!==null&&Je[y].length===g?t=y:qe[y|1]===v&&Je[y|1]!==null&&Je[y|1].length===g&&(t=y|1),t>=0){let n=Je[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){at[_]=Ye[t],ot[_]=Xe[t],st[_]=Ze[t];continue}}}let b=p;if(ge!==0){if(h-p<=ge||!e.startsWith(he,p)){at[_]=qw,$e(y,e,p,h,v,qw,0,0);continue}b=p+ge}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let ee=C>=b?C+1:b,te=ee,ne=h,re=!1,ie=0;ne>te&&e.charCodeAt(ne-1)===33?(re=!0,ne--):ne>te&&e.charCodeAt(te)===33&&(re=!0,te++,ie=1);let T=-1;w>ee&&(T=w+ie,T>=ne&&(T=-1));let oe=te;ne-te>1&&e.charCodeAt(te)===45&&(oe=te+1);let ce=0,le=0,ue=0,de=-1,fe=0;(l[0]>=0||se[0]===1)&&(dt[0]=0,ft[0]=oe,fe=1);let pe=Jw,me=0;for(let t=oe;t<ne;t++)if(t===T&&(pe=le<ue?Jw:ce,me=fe),ce!==Jw){let n=e.charCodeAt(t),r=-1;if(le<ue)o.charCodeAt(le)===n?(le++,le===ue&&(r=ce=de)):ce=Jw;else{let e=i[ce],t=i[ce+1],c=Jw;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(le=e+1,ue=a[i+1],de=s[i],c=ce);break}}ce=c}if(r>=0&&(l[r]>=0||se[r]===1)&&t+1<ne&&e.charCodeAt(t+1)===45){if(fe===ut){ut*=2;let e=new Int32Array(ut);e.set(dt),dt=e;let t=new Int32Array(ut);t.set(ft),ft=t}dt[fe]=r,ft[fe]=t+2,fe++}}T===ne&&(pe=le<ue?Jw:ce,me=fe);let _e=le<ue?Jw:ce,E,D=!1;if(T>=0){if(D=!0,E=bt(e,te,T,pe,me),E!==qw&&E<r&&ae[E]){let t=bt(e,te,ne,_e,fe);t!==qw&&t!==E&&(E=t,D=!1)}else E===qw&&(E=bt(e,te,ne,_e,fe),D=!1)}else E=bt(e,te,ne,_e,fe);let ve=0,ye=0;E===qw?at[_]=qw:(ye=+!!D,ve=b>=C?+!!re:Fe(Ie,e,b,C,+!!re,e=>Be(e,re)),at[_]=E,st[_]=ye,ot[_]=ve),$e(y,e,p,h,v,E,ve,ye)}if(n===0)return``;if(n===1)return rt[0]===0&&it[0]===t?e:e.slice(rt[0],it[0]);if(n*ie>mt){for(;n*ie>mt;)mt<<=1,ht--;gt=new Float64Array(mt),_t=new Int32Array(mt)}if(Re>=Ge||He>=Ge)throw Error(`cn: too many distinct classes in one merge`);vt=vt+1|0,vt===0&&(pt.fill(0),_t.fill(0),vt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=at[e];if(t===qw){ct[e]=1;continue}let n=ot[e];if(yt(n,t)===1){ct[e]=0,f=!0;continue}if(ct[e]=1,t<r){let r=ne[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)yt(n,x[e]);if(st[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&yt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!ct[m]){m++;continue}let t=rt[m],r=it[m],i=m+1;for(;i<n&&ct[i]&&rt[i]===r+1&&e.charCodeAt(r)===32;)r=it[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},St=16384,Ct=new Int32Array(St*2),wt=0,Tt=1,Et=Object.create(null),Dt=Object.create(null),Ot=new Map,kt=new Map,At=0,jt=0,Mt=()=>{wt^=St,Tt=Tt+1|0,jt=0},Nt=e=>{let t=Et[e];if(t!==void 0)return t;let n=Xw(e,0,e.length),r=(n&16383)+wt,i=Ct[r]===(n^Tt)||Ct[r^St]===(n^Tt-1);return i&&(t=Dt[e],t!==void 0)?(Et[e]=t,t):(t=xt(e),i?(Et[e]=t,++At>pe&&(At=0,Dt=Et,Et=Object.create(null),Mt())):(Ct[r]=n^Tt,++jt>St&&Mt()),t)},Pt=e=>{let t=Ot.get(e);if(t!==void 0)return t;let n=Xw(e,0,e.length),r=(n&16383)+wt,i=Ct[r]===(n^Tt)||Ct[r^St]===(n^Tt-1);return i&&(t=kt.get(e),t!==void 0)?(Ot.set(e,t),t):(t=xt(e),i?(Ot.set(e,t),++At>pe&&(At=0,kt=Ot,Ot=new Map,Mt())):(Ct[r]=n^Tt,++jt>St&&Mt()),t)},Ft=e=>{let t=Xw(e,0,e.length),n=(t&16383)+wt;return Ct[n]===(t^Tt)||Ct[n^St]===(t^Tt-1)||(Ct[n]=t^Tt,++jt>St&&Mt(),!1)},It=pe===0?xt:Kw?e=>{let t=Ot.get(e);return t===void 0?Pt(e):t}:Nt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?It(arguments[0]):It(eT.apply(null,arguments))},mergeString:It,seenBefore:pe===0?()=>!1:Ft,mergeUncached:xt}},Qw=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Qw(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},$w=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Qw(i,t);a&&(n&&(n+=` `),n+=a)}return n},eT=function(){return $w(arguments,!1)},tT=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},l=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},u=(t,c)=>{let u=t.length,d=s===null?null:s.n;if(!c){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let f=``,p=-1,m=0,h=!1;for(let e=0;e<u;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Qw(n,!0),!n)continue;h=!0}p<0&&(f=n,p=e),m++}}if(m===0)return``;if(m===1)return e(f);if(h){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let g=i.get(f);g===void 0&&(g=a.get(f),g!==void 0&&i.set(f,g));let _=null;if(g!==void 0)outer:for(let e=0;e<g.length;e++){let n=g[e];if(n.t!==m)continue;let r=n.a,i=1;for(let e=p+1;e<u;e++){let n=t[e];if(n&&n!==r[i++])continue outer}_=n;break}if(_===null){let s=f,c=[f];for(let e=p+1;e<u;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);_={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},g===void 0&&i.set(f,g=[]),g.length>=256&&g.shift(),g.push(_),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==_&&(s.n=_),s=_,_.r},d=t=>Array.isArray(t)?u(t.slice(),!1):e(Qw(t,!0));return function(t,n,r){let i=arguments.length;if((i|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&c(i,t,n,r))return s=i,i.r;if(e!==i&&c(e,t,n,r))return e.r}return u([t,n,r],!0)}if(i===1)return typeof t==`string`?e(t):d(t);let a=s;if(a!==null){let e=a.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<i;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(a!==e){let e=a.a,t=0,n=!0;for(let r=0;r<i;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===a.t)return a.r}}let o=[];for(let e=0;e<i;e++)o.push(arguments[e]);return u(o,!0)}},nT=`{"theme":{"animate":[{"$v":"isAny"}],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]},"columns-auto"],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],"box":[{"box":["border","content"]}],"display":["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],"sr":["sr-only","not-sr-only"],"float":[{"float":["right","left","none","start","end"]}],"clear":[{"clear":["left","right","both","none","start","end"]}],"isolation":["isolate","isolation-auto"],"object-fit":[{"object":["contain","cover","fill","none","scale-down"]}],"object-position":[{"object":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"inline":[{"$t":"container"}]}],"min-inline-size":[{"min-inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"min-inline":[{"$t":"container"}]}],"max-inline-size":[{"max-inline":["none",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"max-inline":[{"$t":"container"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},"max-h-none"],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],"tracking":[{"tracking":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":[{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"whitespace":[{"whitespace":["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],"break":[{"break":["normal","words","all","keep"]}],"wrap":[{"wrap":["break-word","anywhere","normal"]}],"hyphens":[{"hyphens":["none","manual","auto"]}],"content":[{"content":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]},"bg-conic"],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]},"shadow-inner"],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{"mask":["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{"closest":["side","corner"],"farthest":["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"color-scheme":[{"scheme":["normal","dark","light","light-dark","only-dark","only-light"]}],"cursor":[{"cursor":["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],"resize":[{"resize":["none","","y","x"]}],"scroll-behavior":[{"scroll":["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"snap-align":[{"snap":["start","end","center","align-none"]}],"snap-stop":[{"snap":["normal","always"]}],"snap-type":[{"snap":["none","x","y","both"]}],"snap-strictness":[{"snap":["mandatory","proximity"]}],"touch":[{"touch":["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],"select":[{"select":["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"conflictingClassGroups":{"container-named":["container-type"],"overflow":["overflow-x","overflow-y"],"overscroll":["overscroll-x","overscroll-y"],"inset":["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],"flex":["basis","grow","shrink"],"gap":["gap-x","gap-y"],"p":["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],"px":["pr","pl"],"py":["pt","pb"],"m":["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],"mx":["mr","ml"],"my":["mt","mb"],"size":["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],"rounded":["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"translate":["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],"touch":["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}`,rT=()=>JSON.parse(nT),iT=e=>`classGroups`in e&&`theme`in e&&`conflictingClassGroups`in e,aT=e=>e===void 0?{config:rT()}:typeof e==`function`?{config:e(rT())}:iT(e)?{config:e}:{config:Pw(rT(),e),cacheSize:e.cacheSize},oT=e=>{let{config:t,cacheSize:n}=aT(e),{tables:r,validatorImpls:i,prefix:a}=Gw(t);return Zw(r,i,{cacheSize:n,prefix:a})},Y=(e=>{let t=null,n=()=>t??=oT(e);return tT(e=>n().mergeString(e),{seenBefore:e=>n().seenBefore(e),mergeUncached:e=>n().mergeUncached(e)})})({extend:{theme:{spacing:[...AC]}}});function sT(e,t){return typeof e==`function`?e(t):e}var cT=Object.freeze({reduced:!1,squish:90,fast:120,normal:180,slow:280,springDuration:320,bounce:.3,stretch:.28,distance:4,stagger:24,blur:0,shake:3,steps:0,fuse:1,pressDepth:.5,pressScale:1,ease:`cubic-bezier(0.2, 0, 0, 1)`,easeExit:`cubic-bezier(0.4, 0, 1, 1)`}),lT=`(prefers-reduced-motion: reduce)`;function uT(e){let t=e.ownerDocument.defaultView;if(!t)return cT;let n=t.getComputedStyle(e),r=(e,t)=>{let r=n.getPropertyValue(e).trim(),i=Number.parseFloat(r);return Number.isFinite(i)?Math.max(0,i):t},i=(e,t)=>{let i=n.getPropertyValue(e).trim();return r(e,t)*(i.endsWith(`s`)&&!i.endsWith(`ms`)?1e3:1)},a=t.matchMedia?.(lT).matches??!1,o=(e,t)=>a?120:i(`--stipe-motion-${e}`,t),s=(e,t)=>a?0:r(`--stipe-motion-${e}`,t);return{reduced:a,squish:o(`squish`,cT.squish),fast:o(`fast`,cT.fast),normal:o(`normal`,cT.normal),slow:o(`slow`,cT.slow),springDuration:o(`spring-duration`,cT.springDuration),bounce:Math.min(1,s(`bounce`,cT.bounce)),stretch:s(`stretch`,cT.stretch),distance:s(`distance`,cT.distance),stagger:a?0:i(`--stipe-motion-stagger`,cT.stagger),blur:s(`blur`,cT.blur),shake:s(`shake`,cT.shake),steps:Math.floor(s(`steps`,cT.steps)),fuse:r(`--stipe-motion-fuse`,cT.fuse),pressDepth:a?0:r(`--stipe-press-depth`,cT.pressDepth),pressScale:a?1:r(`--stipe-press-scale`,cT.pressScale),ease:n.getPropertyValue(`--stipe-motion-ease`).trim()||cT.ease,easeExit:n.getPropertyValue(`--stipe-motion-ease-exit`).trim()||cT.easeExit}}function dT(e){let[t,n]=(0,M.useState)(()=>({...cT,reduced:!0}));return(0,M.useLayoutEffect)(()=>{let t=e.current,r=t?.ownerDocument.defaultView;if(!t||!r)return;let i=()=>{let e=uT(t);n(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};i();let a=new r.MutationObserver(i);for(let e=t;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`data-theme`,`class`,`style`]});let o=r.matchMedia?.(lT);return o?.addEventListener(`change`,i),()=>{a.disconnect(),o?.removeEventListener(`change`,i)}},[e]),t}function fT(e,t){return e.reduced?0:Math.round(t*e.normal/cT.normal)}function pT(e,t){if(e.reduced)return 0;let n=t*e.bounce/cT.bounce;return Math.min(.9,Math.max(0,n))}function mT(e,t){return e.reduced?0:Math.round(t*e.springDuration/cT.springDuration)}function hT(e,t){return e.steps>0?`steps(${String(e.steps)}, end)`:t}function gT(e){return`animate`in e}var _T=globalThis;function vT(){return _T.matchMedia?.(lT).matches??!1}function yT(e){let t=_T.matchMedia?.(lT);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function bT(){return!0}function xT(){return(0,M.useSyncExternalStore)(yT,vT,bT)}var ST=(0,M.forwardRef)(function({asChild:e=!1,className:t,...n},r){let i=Y(`absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]`,t);return e?(0,q.jsx)(_C,{...n,className:i,ref:r}):(0,q.jsx)(`span`,{...n,className:i,ref:r})}),CT=ht*10,wT=class{constructor(e={}){let t=!pr(e.bounce)||!pr(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/ht,this.maxIterations=this.maxDuration/this.timeStep/ht,this.bn=yi(Vr(e.bounce,.5),-1,1),this.pd=yi(Vr(e.duration,628),10*Ne.timeScale,CT*Ne.timeScale),this.m=yi(Vr(e.mass,1),1,CT),this.s=yi(Vr(e.stiffness,100),f,CT),this.d=yi(Vr(e.damping,10),f,CT),this.v=yi(Vr(e.velocity,0),-CT,CT),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||It,t&&this.calculateSDFromBD(),this.compute(),this.ease=e=>{let t=e*this.settlingDuration,n=this.completed,r=this.pd;return t>=r&&!n&&(this.completed=!0,this.onComplete(this.parent)),t<r&&n&&(this.completed=!1),e===0||e===1?e:this.solve(e*this.solverDuration)}}solve(e){let{zeta:t,w0:n,wd:r,b:i}=this,a=e;return a=t<1?Ai(-a*t*n)*(1*xn(r*a)+i*rt(r*a)):t===1?(1+i*a)*Ai(-a*n):((1+i)*Ai((-t*n+r)*a)+(1-i)*Ai((-t*n-r)*a))/2,1-a}calculateSDFromBD(){let e=Ne.timeScale===1?this.pd/ht:this.pd;this.m=1,this.v=0,this.s=Re(2*Tr/e,2),this.d=this.bn>=0?(1-this.bn)*4*Tr/e:4*Tr/(e*(1+this.bn)),this.s=Ge(yi(this.s,f,CT),3),this.d=Ge(yi(this.d,f,300),3)}calculateBDFromSD(){let e=2*Tr/oe(this.s);this.pd=e*(Ne.timeScale===1?ht:1),this.bn=this.d/(2*oe(this.s))<=1?1-this.d*e/(4*Tr):4*Tr/(this.d*e)-1,this.bn=Ge(yi(this.bn,-1,1),3),this.pd=Ge(yi(this.pd,10*Ne.timeScale,CT*Ne.timeScale),3)}compute(){let{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:i,d:a,s:o,v:s}=this,c=this.w0=yi(oe(o/i),f,ht),l=this.zeta=a/(2*oe(o*i));l<1?(this.wd=c*oe(1-l*l),this.b=(l*c+-s)/this.wd):l===1?(this.wd=0,this.b=-s+c):(this.wd=c*oe(l*l-1),this.b=(l*c+-s)/this.wd);let u=0,d=0,p=0;for(;d<=e&&p<=t;)Zn(1-this.solve(u))<n?d++:d=0,this.solverDuration=u,u+=r,p++;this.settlingDuration=Ge(this.solverDuration*ht,0)*Ne.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=yi(Vr(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=yi(Vr(e,1),10*Ne.timeScale,CT*Ne.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=yi(Vr(e,100),f,CT),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=yi(Vr(e,10),f,CT),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=yi(Vr(e,1),1,CT),this.compute()}get velocity(){return this.v}set velocity(e){this.v=yi(Vr(e,0),-CT,CT),this.compute()}},TT=e=>new wT(e),ET=(e=10,t)=>{let n=t?un:xt;return t=>n(yi(t,0,1)*e)*(1/e)},DT=(0,M.forwardRef)(function({id:e,transform:t},n){return(0,q.jsxs)(`radialGradient`,{ref:n,id:e,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`-1.6`,r:`5.6`,gradientTransform:t,children:[(0,q.jsx)(`stop`,{offset:`0`,stopColor:`color-mix(in oklab, var(--color-white) calc(var(--depth) * 50%), currentColor)`}),(0,q.jsx)(`stop`,{offset:`1`,stopColor:`currentColor`})]})});function OT({id:e}){return(0,q.jsx)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,q.jsx)(`feDropShadow`,{dx:`0`,dy:`1.5`,stdDeviation:`1`,floodColor:`currentColor`,style:{floodOpacity:`calc(var(--depth) * 0.6)`}})})}function kT({id:e}){return(0,q.jsxs)(`filter`,{id:e,x:`-10%`,y:`-10%`,width:`120%`,height:`120%`,colorInterpolationFilters:`sRGB`,children:[(0,q.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.3`,result:`soft-edge`}),(0,q.jsx)(`feOffset`,{in:`soft-edge`,dx:`0.25`,dy:`0.45`,result:`lower-edge`}),(0,q.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`lower-edge`,operator:`out`,result:`inner-shadow`}),(0,q.jsx)(`feFlood`,{floodColor:`var(--color-black)`,floodOpacity:`calc(var(--depth) * 0.28)`}),(0,q.jsx)(`feComposite`,{in2:`inner-shadow`,operator:`in`,result:`shade`}),(0,q.jsx)(`feOffset`,{in:`soft-edge`,dx:`-0.2`,dy:`-0.35`,result:`upper-edge`}),(0,q.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`upper-edge`,operator:`out`,result:`inner-highlight`}),(0,q.jsx)(`feFlood`,{floodColor:`var(--color-white)`,floodOpacity:`calc(var(--depth) * 0.7)`}),(0,q.jsx)(`feComposite`,{in2:`inner-highlight`,operator:`in`,result:`highlight`}),(0,q.jsxs)(`feMerge`,{children:[(0,q.jsx)(`feMergeNode`,{in:`SourceGraphic`}),(0,q.jsx)(`feMergeNode`,{in:`shade`}),(0,q.jsx)(`feMergeNode`,{in:`highlight`})]})]})}var AT=Object.freeze({alphaIntercept:-8,alphaSlope:18,blurStdDeviation:2});function jT({id:e,values:t=kC}){return(0,q.jsxs)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,q.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:t.blurStdDeviation,result:`blur`}),(0,q.jsx)(`feColorMatrix`,{in:`blur`,values:`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${String(t.alphaSlope)} ${String(t.alphaIntercept)}`,result:`gooey`}),(0,q.jsx)(`feComposite`,{in:`SourceGraphic`,in2:`gooey`,operator:`atop`})]})}function MT(e,t){let n=e.ownerDocument,r=!0,i=()=>{t(r&&!n.hidden)},a=globalThis,o=`IntersectionObserver`in globalThis&&a.IntersectionObserver?new a.IntersectionObserver(t=>{let n=t.find(t=>t.target===e);n&&(r=n.isIntersecting,i())}):void 0;return o?.observe(e),n.addEventListener(`visibilitychange`,i),i(),()=>{o?.disconnect(),n.removeEventListener(`visibilitychange`,i)}}function NT(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function PT(e,t){let n=Math.max(0,Math.min(1,(t-(e-1)*.085)/.68));return Math.sin(n*Math.PI)**2}function FT(e,t,n){let r=n*Math.PI*2,i=t*2.1,a=Math.sin(r*2+i)*.15,o={rx:4*(1+a),ry:4/(1+a)};if(e===`line`){let e=7.5+4*Math.cos(r+(t===2?-.45:0));return{cx:(t-1)*e,cy:Math.sin(r+i)*.7,...o}}if(e===`square`){let e=4.7+2.7*Math.cos(r);return{cx:(t%2?1:-1)*e,cy:(t<2?-1:1)*e,...o}}if(e===`donut`){let e=NT(n/.66)*Math.PI*2,o=Math.min(e,t*Math.PI/8)-Math.PI/2,s=NT((n-.79)/.21),c=8+Math.sin(r*2+i)*.35*Math.sin(n*Math.PI);return{cx:Math.cos(o)*c*(1-s),cy:Math.sin(o)*c*(1-s)-8*s,rx:3.6*(1+a*Math.sin(n*Math.PI)),ry:3.6/(1+a*Math.sin(n*Math.PI))}}if(e===`bloom`){if(t===0){let e=[1,2,3,4].reduce((e,t)=>e+PT(t,n),0),t=Math.sqrt(49-e*4);return{cx:Math.sin(r)*.4,cy:Math.sin(r*2)*.4,rx:t*(1+a),ry:t/(1+a)}}let e=PT(t,n),i=(t-1)*Math.PI/2-Math.PI/4+Math.sin(r)*.22;return{cx:Math.cos(i)*14*e,cy:Math.sin(i)*14*e,rx:3.2*(1+a),ry:3.2/(1+a)}}return{cx:Math.sin(r+i)*6+Math.sin(r*3+i)*2.5,cy:Math.cos(r*2+i)*6,...o}}var IT={line:1700,square:1900,donut:3e3,wander:4600,bloom:2800},LT=2;function RT({variant:e,pace:t=`working`}){let n=`caps-loader-${(0,M.useId)().replaceAll(`:`,``)}`,r=(0,M.useRef)(null),i=(0,M.useRef)(null),a=dT(i),{reduced:o}=a,s=e===`donut`?16:e===`bloom`?5:e===`square`?4:3;return(0,M.useLayoutEffect)(()=>{if(!r.current||!i.current||o&&t===`idle`)return;let n=o?[nr(r.current,{opacity:[.55,1],duration:a.slow*10,ease:`inOutSine`,alternate:!0,loop:!0})]:[...r.current.querySelectorAll(`ellipse`)].map((n,r)=>nr(n,{keyframes:Array.from({length:48},(n,i)=>({...FT(e,r,(i+1)/48),duration:fT(a,IT[e]*(t===`idle`?LT:1))/48})),ease:`linear`,loop:!0})),s=MT(i.current,e=>{for(let t of n)e?t.resume():t.pause()});return()=>{s();for(let e of n)e.revert()}},[e,t,o,a]),(0,q.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,focusable:`false`,viewBox:e===`line`?`-20 -10 40 20`:`-20 -20 40 40`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsx)(jT,{id:n,values:AT}),(0,q.jsx)(DT,{id:`${n}-surface`,transform:e===`line`?`matrix(3.4 0 0 1.4 0 0)`:`matrix(3 0 0 3 0 0)`}),(0,q.jsx)(OT,{id:`${n}-shadow`}),(0,q.jsx)(`mask`,{id:`${n}-mask`,maskUnits:`userSpaceOnUse`,x:`-20`,y:`-20`,width:`40`,height:`40`,style:{maskType:`alpha`},children:(0,q.jsx)(`g`,{ref:r,fill:`currentColor`,filter:`url(#${n})`,children:Array.from({length:s},(t,n)=>(0,q.jsx)(`ellipse`,{...FT(e,n,0)},n))})})]}),(0,q.jsx)(`g`,{filter:`url(#${n}-shadow)`,children:(0,q.jsx)(`rect`,{x:`-20`,y:`-20`,width:`40`,height:`40`,fill:`url(#${n}-surface)`,mask:`url(#${n}-mask)`})})]})}var zT={sm:`caps-loader-sm`,md:`caps-loader-md`,lg:`caps-loader-lg`,fill:`caps-loader-fill`},BT={neutral:`text-base-content`,accent:`text-accent`,primary:`text-primary`,success:`text-success`,current:`text-current`},VT=(0,M.forwardRef)(function({"aria-label":e,"aria-labelledby":t,className:n,decorative:r=!1,label:i=`Loading`,size:a=`md`,variant:o=`line`,pace:s=`working`,tone:c=`neutral`,...l},u){let d=`${(0,M.useId)()}-label`,f=!r&&e===void 0&&t===void 0;return(0,q.jsxs)(`span`,{...l,"aria-label":r?void 0:e,"aria-hidden":r||void 0,"aria-labelledby":r?void 0:t??(e===void 0?d:void 0),className:Y(`caps-loader`,zT[a],BT[c],n),"data-variant":o,"data-pace":s,role:r?void 0:`status`,ref:u,children:[(0,q.jsx)(RT,{variant:o,pace:s}),f?(0,q.jsx)(ST,{id:d,children:i}):null]})}),HT=`disabled:bg-base-200 disabled:text-base-content disabled:outline-1 disabled:outline-solid disabled:outline-base-content/25 aria-disabled:bg-base-200 aria-disabled:text-base-content aria-disabled:outline-1 aria-disabled:outline-solid aria-disabled:outline-base-content/25`,UT=FC(`btn caps-button disabled:pointer-events-none`,{variants:{variant:{primary:`btn-primary caps-button-filled`,secondary:`btn-secondary caps-button-filled`,accent:`btn-accent caps-button-filled`,destructive:`btn-error caps-button-filled`,outline:`btn-outline ${HT}`,ghost:`btn-ghost`,"ghost-destructive":`btn-ghost caps-button-ghost-destructive`,link:`btn-link ${HT}`},size:{xs:`btn-xs`,sm:`btn-sm`,default:`btn-md`,lg:`btn-lg`,icon:`btn-square btn-md`,menubar:`caps-button-menubar`}},defaultVariants:{variant:`primary`,size:`default`}}),WT=(0,M.forwardRef)(function({asChild:e=!1,children:t,className:n,disabled:r,loading:i=!1,result:a,resultLabel:o,onResultEnd:s,size:c=`default`,variant:l=`primary`,...u},d){let f=Y(UT({size:c,variant:l}),n),p=(0,M.useRef)(a).current,m=(0,M.useRef)(null);return(0,M.useImperativeHandle)(d,()=>m.current),GT(m,i,a),e?(0,q.jsx)(_C,{...u,"aria-busy":i?!0:u[`aria-busy`],"aria-disabled":r===!0||i?!0:void 0,className:f,ref:m,children:t}):(0,q.jsx)(`button`,{...u,"aria-busy":i?!0:u[`aria-busy`],className:f,disabled:r===!0||i,ref:m,type:u.type??`button`,children:a===void 0&&o===void 0?(0,q.jsxs)(q.Fragment,{children:[i?(0,q.jsx)(VT,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,t]}):(0,q.jsx)(XT,{label:o,loading:i,onResultEnd:s,result:a,settled:p,children:t})})});function GT(e,t,n){let r=(0,M.useRef)(null),i=(0,M.useRef)(null),a=(0,M.useRef)(null);(0,M.useLayoutEffect)(()=>{let o=e.current;if(!o)return;let s=JSON.stringify([t,n??null,o.textContent]),c=s!==i.current;i.current=s;let l=a.current;if(!c&&l)return;let u=l?o.offsetWidth:r.current;l&&(a.current=null,l.cancel(),o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`));let d=o.offsetWidth;if(r.current=d>0?d:null,!c||u===null||d===0||Math.abs(u-d)<1||!gT(o))return;let f=uT(o);if(f.reduced)return;let p=o.animate([{width:`${String(u)}px`},{width:`${String(d)}px`}],{duration:f.normal,easing:hT(f,f.ease)});a.current=p,o.style.overflow=`clip`,o.style.whiteSpace=`nowrap`;let m=()=>{a.current===p&&(a.current=null,o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`))};p.onfinish=m,p.oncancel=m})}var KT=1100;function qT(e,t){let n=t.bounce/.3,r=1+.05*Math.min(1.4,.4+n),i=1-.02*Math.min(1.4,n);return e.animate([{transform:`scale(1)`},{transform:`scale(${String(r)})`,offset:.35},{transform:`scale(${String(i)})`,offset:.7},{transform:`scale(1)`}],{duration:t.springDuration,easing:hT(t,`ease-out`)})}function JT(e,t){let n=t.shake;return e.animate([{transform:`none`},{transform:`translateX(${String(-n)}px)`},{transform:`translateX(${String(n)}px)`},{transform:`translateX(${String(-n*.6)}px)`},{transform:`translateX(${String(n*.3)}px)`},{transform:`none`}],{duration:t.slow*1.3,easing:hT(t,`linear`)})}function YT(e,t,n){let r=n.distance+2,i=`blur(${String(n.blur)}px)`;return[e.animate([{opacity:1,transform:`none`,filter:`blur(0px)`},{opacity:0,transform:`translateY(${String(-r)}px)`,filter:i}],{duration:n.fast,easing:hT(n,n.ease)}),t.animate([{opacity:0,transform:`translateY(${String(r)}px)`,filter:i},{opacity:1,transform:`none`,filter:`blur(0px)`}],{duration:n.normal,easing:hT(n,n.ease),fill:`backwards`})]}function XT({children:e,label:t,loading:n,onResultEnd:r,result:i,settled:a}){let o=(0,M.useRef)(null),s=xT(),[c,l]=(0,M.useState)(!1),[u,d]=(0,M.useState)(!1);c&&!u&&d(!0);let f=(0,M.useRef)(a),p=(0,M.useRef)(r);(0,M.useEffect)(()=>{p.current=r},[r]),(0,M.useLayoutEffect)(()=>{let e=f.current;if(f.current=i,i===e)return;if(i===`done`){l(!0);let e=setTimeout(()=>{p.current?p.current():l(!1)},KT);return()=>{clearTimeout(e)}}l(!1);let t=o.current;if(i!==`failed`||!t||!gT(t))return;let n=uT(t);if(n.shake<=0)return;let r=JT(t,n);return()=>{r.cancel()}},[i,s]);let m=(0,M.useRef)(c);return(0,M.useLayoutEffect)(()=>{let e=o.current;if(!e||m.current===c)return;m.current=c;let t=e.querySelector(`[data-face="label"]`),n=e.querySelector(`[data-face="result"]`);if(!t||!n||!gT(e)){c||d(!1);return}let r=uT(e),i=c?YT(t,n,r):YT(n,t,r);if(c||i[0]?.addEventListener(`finish`,()=>{d(!1)}),c&&!r.reduced){i.push(qT(e.closest(`button`)??e,r));let t=n.querySelector(`path`);t&&i.push(t.animate([{strokeDashoffset:1},{strokeDashoffset:0}],{duration:r.normal*1.4,delay:r.fast/2,easing:hT(r,r.ease),fill:`backwards`}))}return()=>{for(let e of i)e.cancel()}},[c,s]),(0,q.jsxs)(`span`,{ref:o,className:`caps-button-faces`,"data-showing":c?`result`:`label`,children:[(0,q.jsxs)(`span`,{className:`caps-button-face`,"data-face":`label`,"aria-hidden":c?!0:void 0,children:[n||c?(0,q.jsx)(VT,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,e]}),u?(0,q.jsxs)(`span`,{className:`caps-button-face`,"data-face":`result`,"aria-hidden":!c||void 0,children:[(0,q.jsx)(`svg`,{className:`caps-button-check`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,q.jsx)(`path`,{d:`M4.5 12.5 9.5 17.5 19.5 6.5`,pathLength:1})}),t===void 0?e:t]}):null]})}function ZT(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var QT=ZT(`https://base-ui.com/production-error`,`Base UI`),$T={};function eE(e,t){let n=M.useRef($T);return n.current===$T&&(n.current=e(t)),n}function tE(e,t,n,r){let i=eE(rE).current;return iE(i,e,t,n,r)&&oE(i,[e,t,n,r]),i.callback}function nE(e){let t=eE(rE).current;return aE(t,e)&&oE(t,e),t.callback}function rE(){return{callback:null,cleanup:null,refs:[]}}function iE(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function aE(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function oE(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var sE=18;function cE(e){return sE>=e}function lE(e){if(!M.isValidElement(e))return null;let t=e,n=t.props;return(cE(19)?n?.ref:t.ref)??null}function uE(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function dE(){}var fE=Object.freeze([]),pE=Object.freeze({});function mE(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function hE(e,t){return typeof e==`function`?e(t):e}function gE(e,t){return typeof e==`function`?e(t):e}var _E={};function vE(e,t,n,r,i){if(!n&&!r&&!i&&!e)return bE(t);let a=bE(e);return t&&(a=xE(a,t)),n&&(a=xE(a,n)),r&&(a=xE(a,r)),i&&(a=xE(a,i)),a}function yE(e){if(e.length===0)return _E;if(e.length===1)return bE(e[0]);let t=bE(e[0]);for(let n=1;n<e.length;n+=1)t=xE(t,e[n]);return t}function bE(e){return TE(e)?{...e(_E)}:SE(e)}function xE(e,t){return TE(t)?t(e):CE(e,t)}function SE(e){let t={...e};for(let e in t){let n=t[e];wE(e,n)&&(t[e]=DE(n))}return t}function CE(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=uE(e.style,r);break;case`className`:e[n]=kE(e.className,r);break;default:e[n]=wE(n,r)?EE(e[n],r):r}}return e}function wE(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function TE(e){return typeof e==`function`}function EE(e,t){return t?e?(...n)=>{let r=n[0];if(AE(r)){let i=r;OE(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:DE(t):e}function DE(e){return e&&((...t)=>{let n=t[0];return AE(n)&&OE(n),e(...t)})}function OE(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function kE(e,t){return t?e?t+` `+e:t:e}function AE(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function jE(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=FE(r));let i=ME(t,n,r);if(n.enabled===!1)return null;let a=n.state??pE;return IE(e,r,i,a)}function ME(e,t,n){let{className:r,style:i}=e,{state:a=pE,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?hE(r,a):void 0,d=l?gE(i,a):void 0,f=l?mE(a,c):pE,p=l&&s?NE(s):void 0,m=l?uE(f,p)??{}:pE;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?nE([m.ref,lE(n),...o]):tE(m.ref,lE(n),o):tE(null,null)),l?(u!==void 0&&(m.className=kE(m.className,u)),d!==void 0&&(m.style=uE(m.style,d)),m):pE}function NE(e){return Array.isArray(e)?yE(e):vE(void 0,e)}var PE=Symbol.for(`react.lazy`);function FE(e){if(e?.$$typeof!==PE)return e;let t=M.Children.toArray(e)[0];return M.isValidElement(t)?t:e}function IE(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=vE(n,t.props);return e.ref=n.ref,M.cloneElement(t,e)}return LE(e,n)}function LE(e,t){return e===`button`?(0,M.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,M.createElement)(`img`,{alt:``,...t,key:t.key}):M.createElement(e,t)}var RE=`data-starting-style`,zE=`data-ending-style`,BE={[RE]:``},VE={[zE]:``},HE={transitionStatus(e){return e===`starting`?BE:e===`ending`?VE:null}},UE=`data-open`,WE=`data-closed`,GE=`data-anchor-hidden`,KE=`data-popup-open`,qE=`data-pressed`,JE={[KE]:``},YE={[KE]:``,[qE]:``},XE={[UE]:``},ZE={[WE]:``},QE={[GE]:``},$E={open(e){return e?JE:null}},eD={open(e){return e?YE:null}},tD={open(e){return e?XE:ZE},anchorHidden(e){return e?QE:null}},nD={...tD,...HE},rD=`none`,iD=`trigger-press`,aD=`trigger-hover`,oD=`trigger-focus`,sD=`outside-press`,cD=`item-press`,lD=`close-press`,uD=`focus-out`,dD=`escape-key`,fD=`list-navigation`,pD=`keyboard`,mD=`pointer`,hD=`cancel-open`,gD=`sibling-open`,_D=`disabled`,vD=`imperative-action`;function yD({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=M.useRef(e!==void 0),[a,o]=M.useState(()=>t);return[i&&e!==void 0?e:a,M.useCallback(e=>{i||o(e)},[])]}function bD(){return typeof window<`u`}function xD(e){return wD(e)?(e.nodeName||``).toLowerCase():`#document`}function SD(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function CD(e){return((wD(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function wD(e){return bD()?e instanceof Node||e instanceof SD(e).Node:!1}function TD(e){return bD()?e instanceof Element||e instanceof SD(e).Element:!1}function ED(e){return bD()?e instanceof HTMLElement||e instanceof SD(e).HTMLElement:!1}function DD(e){return!bD()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof SD(e).ShadowRoot}function OD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=zD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function kD(e){return/^(table|td|th)$/.test(xD(e))}function AD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var jD=/transform|translate|scale|rotate|perspective|filter/,MD=/paint|layout|strict|content/,ND=e=>!!e&&e!==`none`,PD;function FD(e){let t=TD(e)?zD(e):e;return ND(t.transform)||ND(t.translate)||ND(t.scale)||ND(t.rotate)||ND(t.perspective)||!LD()&&(ND(t.backdropFilter)||ND(t.filter))||jD.test(t.willChange||``)||MD.test(t.contain||``)}function ID(e){let t=VD(e);for(;ED(t)&&!RD(t);){if(FD(t))return t;if(AD(t))return null;t=VD(t)}return null}function LD(){return PD??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),PD}function RD(e){return/^(html|body|#document)$/.test(xD(e))}function zD(e){return SD(e).getComputedStyle(e)}function BD(e){return TD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function VD(e){if(xD(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||DD(e)&&e.host||CD(e);return DD(t)?t.host:t}function HD(e){let t=VD(e);return RD(t)?(e.ownerDocument||e).body:ED(t)&&OD(t)?t:HD(t)}function UD(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=HD(e),i=r===e.ownerDocument?.body,a=SD(r);if(i){let e=WD(a);return t.concat(a,a.visualViewport||[],OD(r)?r:[],e&&n?UD(e):[])}return t.concat(r,UD(r,[],n))}function WD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var GD={...M},KD=GD.useInsertionEffect,qD=KD&&KD!==GD.useLayoutEffect?KD:e=>e();function JD(e){let t=eE(YD).current;return t.next=e,qD(t.effect),t.trampoline}function YD(){let e={next:void 0,callback:XD,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function XD(){}var ZD=typeof document<`u`?M.useLayoutEffect:()=>{},QD=M.createContext(void 0);function $D(e=!1){let t=M.useContext(QD);if(t===void 0&&!e)throw Error(QT(16));return t}function eO(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:M.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function tO(e){return e?.ownerDocument||document}function nO(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(SD(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function rO(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=M.useRef(null),s=$D(!0),c=a??s!==void 0,{props:l}=eO({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=M.useCallback(()=>{let e=o.current;iO(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return ZD(u,[u]),{getButtonProps:M.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return vE({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(OE(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=iO(r),s=!i&&aO(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),nO(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),nO(r,e)))},onKeyUp(e){if(!t){if(OE(e),a?.(e),e.target===e.currentTarget&&i&&c&&iO(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),nO(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:JD(e=>{o.current=e,u()})}}function iO(e){return ED(e)&&e.tagName===`BUTTON`}function aO(e){return ED(e)&&e.tagName===`A`&&!!e.href}function oO(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:sO,platform:cO,maxTouchPoints:lO}=oO(),uO=sO.toLowerCase(),dO=cO.toLowerCase(),fO=/^i(os$|p)/.test(dO)||dO===`macintel`&&lO>1,pO=`android`,mO=dO===pO||uO.includes(pO),hO=!fO&&dO.startsWith(`mac`);dO.startsWith(`win`),!mO&&/^(linux|chrome os)/.test(dO);var gO=hO||fO,_O=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!_O&&uO.includes(`firefox`),!_O&&uO.includes(`chrom`);var vO=gO,yO=/jsdom|happydom/.test(uO);function bO(){let[,e]=M.useState({});return M.useCallback(()=>{e({})},[])}var xO=0;function SO(e,t=`mui`){let n=M.useRef(void 0),r=bO(),i=e??n.current;return M.useEffect(()=>{n.current??(xO+=1,n.current=`${t}-${xO}`,e??r())},[e,t,r]),i}var CO=GD.useId;function wO(e,t){if(CO!==void 0){let n=CO();return e??(t?`${t}-${n}`:n)}return SO(e,t)}function TO(e){return wO(e,`base-ui`)}function EO(e,t,n,r){let i=!1,a=!1,o=r??pE;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function DO(e,t,n){let r=n??pE;return{reason:e,event:t??new Event(`base-ui`),...r}}function OO(e){M.useEffect(e,fE)}var kO=null;globalThis.requestAnimationFrame;var AO=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},jO=class e{static create(){return new e}static request(e){return AO.request(e)}static cancel(e){return AO.cancel(e)}currentId=kO;request(e){this.cancel(),this.currentId=AO.request(()=>{this.currentId=kO,e()})}cancel=()=>{this.currentId!==kO&&(AO.cancel(this.currentId),this.currentId=kO)};disposeEffect=()=>this.cancel};function MO(){let e=eE(jO.create).current;return OO(e.disposeEffect),e}function NO(e,t=!1,n=!1,r=!1){let[i,a]=M.useState(e&&t?`idle`:void 0),[o,s]=M.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),ZD(()=>{if(!e&&o&&i!==`ending`&&n){let e=jO.request(()=>{a(`ending`)});return()=>{jO.cancel(e)}}},[e,o,i,n]),ZD(()=>{if(!e||t||i===void 0)return;let n=jO.request(()=>{a(void 0)});return()=>{jO.cancel(n)}},[t,e,i]),ZD(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=jO.request(()=>{a(`idle`)});return()=>{jO.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function PO(e){return e==null?e:`current`in e?e.current:e}function FO(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var IO=null;function LO(e){if(!IO){let e=[];IO=e,queueMicrotask(()=>{IO=null,sy.flushSync(()=>{for(let t of e)t()})})}IO.push(e)}function RO(e,t=!1,n=!1){let r=MO();return JD((i,a=null)=>{r.cancel();let o=PO(e);if(o==null)return;let s=o,c=()=>{if(!n){sy.flushSync(i);return}LO(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(FO(s).map(e=>e.finished.then(dE))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(FO(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=RE;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function zO(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=JD(a),s=RO(r,n,i);M.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var BO=0,VO=class e{static create(){return new e}currentId=BO;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=BO,t()},e)}isStarted(){return this.currentId!==BO}clear=()=>{this.currentId!==BO&&(clearTimeout(this.currentId),this.currentId=BO)};disposeEffect=()=>this.clear};function HO(){let e=eE(VO.create).current;return OO(e.disposeEffect),e}function UO(e){e.preventDefault(),e.stopPropagation()}function WO(e){return`nativeEvent`in e}function GO(e){return e.pointerType===``&&e.isTrusted?!0:mO&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function KO(e){return yO?!1:!mO&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(mO||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function qO(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function JO(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function YO(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function XO(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&DD(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function ZO(e,t){let n=e;for(;n;){if(TD(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(DD(n)?n.host:null)}return null}function QO(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var $O=`data-base-ui-focusable`,ek=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,tk=`ArrowLeft`,nk=`ArrowRight`,rk=`ArrowUp`,ik=`ArrowDown`,ak=`data-trigger-disabled`;function ok(e,t){if(!TD(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(ak);for(let[,e]of t.entries())if(XO(e,n))return!e.hasAttribute(ak);return!1}function sk(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function ck(e){return e.matches(`html,body`)}function lk(e){return ED(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function uk(e){return ZO(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${ek}`)!=null}function dk(e){return e?e.getAttribute(`role`)===`combobox`&&lk(e):!1}function fk(e){if(!e||yO)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function pk(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function mk(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function hk(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function gk(e){let t=eE(_k,e).current;return t.next=e,ZD(t.effect),t}function _k(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var vk={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},yk={...vk,position:`fixed`,margin:0,top:0,left:0};({...vk});var bk=M.forwardRef(function(e,t){let[n,r]=M.useState();ZD(()=>{vO&&_O&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,q.jsx)(`span`,{...e,ref:t,style:yk,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function xk(e,t){return t<0||t>=e.length}function Sk(e,t){return Tk(e.current,{disabledIndices:t})}function Ck(e,t){return Tk(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function wk(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Tk(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:xk(e,u)?-1:u,wrapped:d}}function Tk(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Ek(e,a,r));return a}function Ek(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Ok(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function Dk(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Ok(e,t=e?zD(e):null){return!e||!e.isConnected||!t||Dk(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var kk=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Ak(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return DD(n)?n.host:null}function jk(e){for(let t of Array.from(e.children))if(xD(t)===`summary`)return t;return null}function Mk(e,t){let n=jk(t);return!!n&&(e===n||XO(n,e))}function Nk(e){let t=e?xD(e):``;return e!=null&&e.matches(kk)&&(t!==`summary`||e.parentElement!=null&&xD(e.parentElement)===`details`&&jk(e.parentElement)===e)&&(t!==`details`||jk(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Pk(e){if(!Nk(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Ak(t)){let n=t!==e,r=xD(t)===`slot`;if(t.hasAttribute(`inert`)||n&&xD(t)===`details`&&!t.open&&!Mk(e,t)||t.hasAttribute(`hidden`)||!r&&!Fk(t,n))return!1}return!0}function Fk(e,t){let n=zD(e);return t?n.display!==`none`:Ok(e,n)}function Ik(e){let t=e.tabIndex;if(t<0){let t=xD(e);if(t===`details`||t===`audio`||t===`video`||ED(e)&&e.isContentEditable)return 0}return t}function Lk(e){if(xD(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Rk(e,t){let n=Lk(e);if(!n)return!0;let r=t.find(e=>{let t=Lk(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=Lk(e);return t?.name===n.name&&t.form===n.form})===n}function zk(e){if(ED(e)&&xD(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return ED(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Bk(e,t){zk(e).forEach(e=>{Nk(e)&&t.push(e),Bk(e,t)})}function Vk(e,t,n){zk(e).forEach(e=>{ED(e)&&e.matches(t)&&n.push(e),Vk(e,t,n)})}function Hk(e){return Pk(e)&&Ik(e)>=0}function Uk(e){let t=[];return Bk(e,t),t.filter(Pk)}function Wk(e){let t=Uk(e);return t.filter(e=>Ik(e)>=0&&Rk(e,t))}function Gk(e,t){let n=Wk(e),r=n.length;if(r===0)return;let i=YO(tO(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Kk(e){return Gk(tO(e).body,1)||e}function qk(e){return Gk(tO(e).body,-1)||e}function Jk(e,t,n){if(!e)return null;let r=[];Bk(tO(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Pk);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!XO(n,o)&&Hk(o)&&Rk(o,a))return o}return r[i]}function Yk(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!XO(n,r)}function Xk(e){Wk(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Zk(e){let t=[];Vk(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function Qk(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Qk(e,t.id,n)])}function $k(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function eA(e){return`data-base-ui-${e}`}var tA=0;function nA(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(tA);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),dE;let o=requestAnimationFrame(a);return tA=o,()=>{tA===o&&(cancelAnimationFrame(o),tA=0)}}var rA=`data-base-ui-inert`,iA=new WeakMap,aA=new WeakSet,oA=new WeakMap,sA=0;function cA(e){return e?DD(e)?e.host:cA(e.parentNode):null}var lA=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=cA(t);return e.contains(n)?n:null}).filter(e=>e!=null),uA=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},dA=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{xD(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function fA(e,t,n,{mark:r=!0}){let i=lA(t,e),a=r?dA(t,uA(i),new Set(i)):[],o=[],s=[];if(n){let e=lA(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);dA(t,uA(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(iA.get(e)||0)+1;iA.set(e,r),o.push(e),r===1&&n&&aA.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(oA.get(e)||0)+1;oA.set(e,t),s.push(e),t===1&&e.setAttribute(rA,``)}),sA+=1,()=>{o.forEach(e=>{let t=(iA.get(e)||0)-1;iA.set(e,t),t||(aA.has(e)||e.removeAttribute(`aria-hidden`),aA.delete(e))}),r&&s.forEach(e=>{let t=(oA.get(e)||0)-1;oA.set(e,t),t||e.removeAttribute(rA)}),--sA,sA||(iA=new WeakMap,aA=new WeakSet,oA=new WeakMap)}}function pA(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=tO(e[0]).body;return fA(e,i,n,{mark:r})}var mA={style:{transition:`none`}},hA=`data-base-ui-click-trigger`,gA={fallbackAxisSide:`none`},_A={fallbackAxisSide:`end`},vA={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},yA=M.createContext(null),bA=()=>M.useContext(yA),xA=eA(`portal`);function SA(e={}){let{ref:t,container:n,componentProps:r=pE,elementProps:i}=e,a=wO(),o=bA()?.portalNode,[s,c]=M.useState(null),[l,u]=M.useState(null),d=JD(e=>{e!==null&&u(e)}),f=M.useRef(null);ZD(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(wD(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=jE(`div`,r,{ref:[t,d],props:[{id:a,[xA]:``},i]}),m=s&&p?sy.createPortal(p,s):null;return{node:l,nodeId:M.isValidElement(p)?p.props.id:void 0,subtree:m}}var CA=M.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=SA({container:o,ref:t,componentProps:e,elementProps:c}),f=M.useRef(null),p=M.useRef(null),m=M.useRef(null),h=M.useRef(null),[g,_]=M.useState(null),v=M.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;M.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Yk(e)&&(e.type===`focusin`?v.current&&=(Zk(l),!1):(Xk(l),v.current=!0))}return hk(mk(l,`focusin`,e,!0),mk(l,`focusout`,e,!0))},[l,y]),ZD(()=>{!l||b!==!0||!v.current||(Zk(l),v.current=!1)},[b,l]);let S=M.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,q.jsxs)(M.Fragment,{children:[d,(0,q.jsxs)(yA.Provider,{value:S,children:[x&&l&&(0,q.jsx)(bk,{"data-type":`outside`,ref:f,onFocus:e=>{Yk(e,l)?m.current?.focus():qk(g?g.domReference:null)?.focus()}}),x&&l&&(0,q.jsx)(`span`,{role:s,"aria-owns":u,style:vA}),l&&sy.createPortal(a,l),x&&l&&(0,q.jsx)(bk,{"data-type":`outside`,ref:p,onFocus:e=>{Yk(e,l)?h.current?.focus():(Kk(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,EO(`focus-out`,e.nativeEvent)))}})]})]})});function wA(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var TA=class{nodesRef={current:[]};events=wA();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},EA=M.createContext(null),DA=M.createContext(null),OA=()=>M.useContext(EA)?.id||null,kA=e=>{let t=M.useContext(DA);return e??t};function AA(e){let t=wO(),n=kA(e),r=OA();return ZD(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function jA(e){let{children:t,id:n}=e,r=OA();return(0,q.jsx)(EA.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function MA(e){let{children:t,externalTree:n}=e,r=eE(()=>n??new TA).current;return(0,q.jsx)(DA.Provider,{value:r,children:t})}function NA(e,t){let n=SD(QO(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(GO(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var PA=20,FA=[];function IA(){FA=FA.filter(e=>e.deref()?.isConnected)}function LA(e){IA(),e&&xD(e)!==`body`&&(FA.push(new WeakRef(e)),FA.length>PA&&(FA=FA.slice(-20)))}function RA(){return IA(),FA[FA.length-1]?.deref()}function zA(e){return e?Hk(e)?e:Wk(e)[0]||e:null}function BA(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Uk(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Hk(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function VA(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=JD(()=>b.current.floatingContext?.nodeId),S=i===!1,C=dk(_)&&S,w=gk(i),ee=gk(a),te=gk(o),ne=gk(u),re=gk(g),ie=kA(m),T=bA(),ae=M.useRef(!1),oe=M.useRef(!1),se=M.useRef(!1),ce=M.useRef(null),le=M.useRef(``),ue=M.useRef(``),de=M.useRef(null),fe=M.useRef(null),pe=tE(de,p,T?.beforeInsideRef),me=tE(fe,T?.afterInsideRef),he=HO(),ge=HO(),_e=MO(),E=T!=null,D=pk(v),ve=JD((e=D)=>e?Wk(e):[]),ye=JD(()=>h?.().filter(e=>e!=null)??[]);M.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&XO(D,YO(tO(D)))&&ve().length===0&&!C&&UO(e)}return mk(tO(D),`keydown`,e)},[r,D,c,C,ve]),M.useEffect(()=>{if(r||!g)return;let e=tO(D);function t(){se.current=!1}function n(e){let t=QO(e),n=ye(),r=XO(v,t)||XO(_,t)||XO(T?.portalNode,t)||n.some(e=>e===t||XO(e,t));se.current=!r,ue.current=e.pointerType||`keyboard`,ZO(t,`[data-base-ui-click-trigger]`)&&(oe.current=!0,ge.start(0,()=>{oe.current=!1}))}function i(){ue.current=`keyboard`}return hk(mk(e,`pointerdown`,n,!0),mk(e,`pointerup`,t,!0),mk(e,`pointercancel`,t,!0),mk(e,`keydown`,i,!0),t)},[r,v,_,D,g,T,ge,ye]),M.useEffect(()=>{if(r||!l)return;let e=tO(D);function n(){oe.current=!0,ge.start(0,()=>{oe.current=!1})}function i(e){let t=QO(e);Hk(t)&&(ce.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=QO(n);c&&r==null&&a!=null&&XO(v,a)&&LA(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ye(),p=r?.hasAttribute(eA(`focus-guard`))&&[de.current,fe.current,T?.beforeInsideRef.current,T?.afterInsideRef.current,T?.beforeOutsideRef.current,T?.afterOutsideRef.current,PO(f),PO(d)].includes(r),m=!(XO(_,r)||XO(v,r)||XO(r,v)||XO(T?.portalNode,r)||u.some(e=>e===r||XO(e,r))||l.hasMatchingElement(e=>XO(e,r))||p||ie&&(Qk(ie.nodesRef.current,o).find(e=>XO(e.context?.elements.floating,r)||XO(e.context?.elements.domReference,r))||$k(ie.nodesRef.current,o).find(e=>[e.context?.elements.floating,pk(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&D&&BA(D),s&&i!==_&&!Ok(a)&&YO(e)===e.body){if(ED(D)&&(D.focus(),s===`popup`)){_e.request(()=>{D.focus()});return}let e=ve(),t=ce.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||D;ED(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!oe.current&&(C||r!==RA())&&(ae.current=!0,t.setOpen(!1,EO(uD,n)))})}function o(){se.current||(b.current.insideReactTree=!0,he.start(0,()=>{b.current.insideReactTree=!1}))}let u=ED(_)?_:null;if(!(!v&&!u))return hk(u&&mk(u,`focusout`,a),u&&mk(u,`pointerdown`,n),v&&mk(v,`focusin`,i),v&&mk(v,`focusout`,a),v&&T&&mk(v,`focusout`,o,!0))},[r,_,v,D,c,ie,T,t,l,s,ve,C,x,b,he,ge,_e,d,f,ye]),M.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(T?.portalNode?.querySelectorAll(`[${eA(`portal`)}]`)||[]),t=(ie?$k(ie.nodesRef.current,x()):[]).find(e=>dk(e.context?.elements.domReference||null))?.context?.elements.domReference,n=pA([v,...e,de.current,fe.current,T?.beforeOutsideRef.current,T?.afterOutsideRef.current,...ye(),t,PO(f),PO(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=pA([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,T,C,ie,x,d,f,ye]),ZD(()=>{if(!g||r||!ED(D))return;le.current=``,ue.current=``;let e=tO(D),t=YO(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(ne.current||``):n;if(r===void 0||r===!1||XO(D,t))return;let i=null,a=()=>(i??=ve(D),i[0]||D),o;o=r===!0||r===null?a():PO(r),o||=a();let s=XO(D,YO(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&GO(c);nA(o,{sync:l,preventScroll:o===D,shouldFocus(){if(!re.current)return!1;if(s)return!0;let t=YO(e);return!(t!==o&&XO(D,t))}})})},[r,g,D,ve,w,ne,re,b]);let be=M.useRef(null);ZD(()=>{if(r||!D){be.current=null;return}be.current&&=(be.current.cancelled=!0,null);let e=tO(D),t=YO(e),n=ne.current==null;LA(t);function i(e){if(e.open||(le.current=NA(e.nativeEvent,ue.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(eA(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(ae.current=!0),e.reason===`outside-press`){if(e.nested)ae.current=!1;else if(GO(e.nativeEvent)||KO(e.nativeEvent))ae.current=!1;else{let e=!1;tO(D).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?ae.current=!1:ae.current=!0}}}y.on(`openchange`,i);function a(e){let r=ee.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&xD(t)!==`body`?t:null,s=n?o||a:a||o;return s||=RA()||null,typeof i==`boolean`?s:PO(i)||s||null}return()=>{y.off(`openchange`,i);let t=YO(e),n=ye(),r=XO(v,t)||n.some(e=>e===t||XO(e,t))||ie&&Qk(ie.nodesRef.current,x(),!1).some(e=>XO(e.context?.elements.floating,t)),o=ee.current,s=le.current,c=a(s),l={cancelled:!1};be.current=l,queueMicrotask(()=>{be.current===l&&(be.current=null);let n=zA(c),i=te.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!ae.current&&ED(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}ae.current=!1})}},[r,v,D,ee,te,ne,y,ie,_,x,ye]),ZD(()=>{if(!_O||g||!v)return;let e=YO(tO(v));!ED(e)||!lk(e)||XO(v,e)&&e.blur()},[g,v]),ZD(()=>{if(!(r||!T))return T.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{T.setFocusManagerState(null)}},[r,T,c,g,t,l,_]),ZD(()=>{if(!(r||!D))return BA(D),()=>{queueMicrotask(IA)}},[r,D]);let xe=!r&&(!c||!C)&&(E||c);return(0,q.jsxs)(M.Fragment,{children:[xe&&(0,q.jsx)(bk,{"data-type":`inside`,ref:pe,onFocus:e=>{if(c){let e=ve();nA(e[e.length-1])}else T?.portalNode&&(ae.current=!1,Yk(e,T.portalNode)?Kk(_)?.focus():PO(f??T.beforeOutsideRef)?.focus())}}),n,xe&&(0,q.jsx)(bk,{"data-type":`inside`,ref:me,onFocus:e=>{c?nA(ve()[0]):T?.portalNode&&(l&&(ae.current=!0),Yk(e,T.portalNode)?qk(_)?.focus():PO(d??T.afterOutsideRef)?.focus())}})]})}function HA(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=iD}=t,l=e.context.dataRef,u=M.useRef(void 0),d=MO(),f=HO(),p=M.useMemo(()=>{function t(t,n,r,i){let a=EO(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=qO(e.pointerType,!0)&&KO(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||qO(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=QO(s),p=lk(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;if(r===`mousedown`&&o){u.current=void 0;return}qO(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return M.useMemo(()=>n?{reference:p}:pE,[n,p])}function UA(){return!1}function WA(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function GA(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=UA,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=kA(c),m=JD(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=JD(()=>a),{escapeKey:v,outsidePress:y}=WA(s),b=M.useRef(!1),x=M.useRef(!1),S=M.useRef(!1),C=M.useRef(!1),w=M.useRef(!1),ee=M.useRef(``),te=M.useRef(null),ne=HO(),re=HO(),ie=HO(),T=JD(()=>{re.clear(),d.current.insideReactTree=!1}),ae=JD(e=>{let t=d.current.floatingContext?.nodeId;return(p?Qk(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),oe=JD(t=>sk(t,e.select(`floatingElement`))||sk(t,e.select(`domReferenceElement`))),se=JD(t=>{o()&&e.setOpen(!1,EO(iD,t.nativeEvent))}),ce=JD(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=WO(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&ae(`__escapeKeyBubbles`))return;let a=EO(dD,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),le=JD(()=>{d.current.insideReactTree=!0,re.start(0,T)}),ue=JD(t=>{if(!l||!n||t.button!==0)return;let r=QO(t.nativeEvent);XO(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),de=JD(e=>{!l||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});M.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),M.useEffect(()=>T,[T]),M.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,ee.current=``,te.current=null),T;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new VO,i=tO(u);function a(){ie.clear(),w.current=!0}function o(){w.current=!0,ie.start(_O?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=ee.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function re(e){let t=d.current.floatingContext?.nodeId,n=p&&Qk(p.nodesRef.current,t).some(t=>sk(e,t.context?.elements.floating));return oe(e)||n}function se(n){if(m(n)){n.type!==`click`&&!oe(n)&&(t.clear(),S.current=!1),T();return}if(d.current.insideReactTree){T();return}let r=QO(n),i=`[${eA(`inert`)}]`,a=TD(r)?r.getRootNode():null,o=Array.from((DD(a)?a:tO(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>XO(e,r))))return;let c=TD(r)?r:null;for(;c&&!RD(c);){let e=VD(c);if(RD(e)||!TD(e))break;c=e}if(!(o.length&&TD(r)&&!ck(r)&&!XO(r,e.select(`floatingElement`))&&o.every(e=>!XO(c,e)))){if(ED(r)&&!(`touches`in n)){let e=RD(r),t=zD(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!re(n)){if(f()===`intentional`){if(n.detail!==0&&!GO(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||ae(`__outsidePressBubbles`)||(e.setOpen(!1,EO(sD,n)),T())}}}function le(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||oe(t)||se(t)}function ue(t){if(f()!==`sloppy`||!e.select(`open`)||!n||oe(t))return;let r=t.touches[0];r&&(te.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},ne.start(1e3,()=>{te.current&&(te.current.dismissOnTouchEnd=!1,te.current.dismissOnMouseDown=!1)}))}function de(e,t){let n=QO(e);if(!n)return;let r=mk(n,e.type,()=>{t(e),r()})}function fe(e){ee.current=`touch`,de(e,ue)}function pe(e){ne.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),ee.current=e.pointerType),!(e.type===`mousedown`&&te.current&&!te.current.dismissOnMouseDown)&&de(e,e=>{e.type===`pointerdown`?le(e):se(e)})}function me(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;if(c(),f()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!re(e)){if(n){s();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,T())}}}function he(e){if(f()!==`sloppy`||!te.current||oe(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-te.current.startX),r=Math.abs(t.clientY-te.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(te.current.dismissOnTouchEnd=!0),i>10&&(se(e),ne.clear(),te.current=null)}function ge(e){de(e,he)}function _e(e){f()!==`sloppy`||!te.current||oe(e)||(te.current.dismissOnTouchEnd&&se(e),ne.clear(),te.current=null)}function E(e){de(e,_e)}let D=hk(r&&hk(mk(i,`keydown`,ce),mk(i,`compositionstart`,a),mk(i,`compositionend`,o)),g&&hk(mk(i,`click`,pe,!0),mk(i,`pointerdown`,pe,!0),mk(i,`pointerup`,me,!0),mk(i,`pointercancel`,me,!0),mk(i,`mousedown`,pe,!0),mk(i,`mouseup`,me,!0),mk(i,`touchstart`,fe,{capture:!0,passive:!0}),mk(i,`touchmove`,ge,{capture:!0,passive:!0}),mk(i,`touchend`,E,{capture:!0,passive:!0})));return()=>{D(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,ce,T,_,ae,oe,p,e,ne,ie]);let fe=M.useMemo(()=>({onKeyDown:ce,onPointerDown:se,onClick:se}),[ce,se]),pe=M.useMemo(()=>({onKeyDown:ce,onPointerDown:de,onMouseDown:de,onClickCapture:le,onMouseDownCapture(e){le(),ue(e)},onPointerDownCapture(e){le(),ue(e)},onMouseUpCapture:le,onTouchEndCapture:le,onTouchMoveCapture:le}),[ce,le,ue,de]);return M.useMemo(()=>n?{reference:fe,floating:pe,trigger:fe}:{},[n,fe,pe])}function KA(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),ZD(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};TD(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function qA(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=JD(i),{mounted:c,setMounted:l,transitionStatus:u}=NO(t,!1,!1,o),d=!t&&r;ZD(()=>{t&&s(!1)},[t,s]);let f=M.useRef(c),p=M.useRef(!1),m=bO(),h=()=>{f.current=!1,l(!1),a()};ZD(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=JD(()=>{if(f.current){if(t){p.current=!0,m();return}h()}});return zO({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var JA={tabIndex:-1,[$O]:``};function YA(e){return t=>t!==`touch`||e.current}function XA(e,t=!1){let n=wO(),r=OA()!=null,i=eE(()=>e(n,r)).current;return KA({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function ZA({handle:e,store:t}){return ZD(()=>e.attachStore(t),[e,t]),null}function QA(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function $A(e,t){let n=M.useRef(null);return JD(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),QA(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),QA(t))})}function ej(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function tj(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function nj(e,t,n,r={}){let i=n.reason,a=i===aD,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=tj(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=ej(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?sy.flushSync(l):l()}function rj(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=$A(e,n),o=JD(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=JD(e=>{a(e),e&&o(e)});return ZD(()=>(s(t.current),()=>s(null)),[s,t,n,e]),ZD(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function ij(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=M.useRef(null),i=e.useState(`open`);ZD(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=EO(rD);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function aj(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=qA({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return eE(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function oj(e,t){e.useSyncedValues(t),ZD(()=>()=>{e.update({activeTriggerProps:pE,inactiveTriggerProps:pE,popupProps:pE})},[e])}function sj(e,t){ZD(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),ZD(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var cj=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},lj=t((e=>{var t=Wi();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),uj=t(((e,t)=>{t.exports=lj()})),dj=t((e=>{var t=Wi(),n=uj();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),fj=t(((e,t)=>{t.exports=dj()})),pj=uj(),mj=fj(),hj=[],gj=void 0;function _j(){return gj}function vj(e){hj.push(e)}function yj(e){let t=(t,n)=>{let r=eE(xj).current,i;try{gj=r;for(let e of hj)e.before(r);i=e(t,n);for(let e of hj)e.after(r);r.didInitialize=!0}finally{gj=void 0}return i};return t.displayName=e.displayName||e.name,t}function bj(e){return M.forwardRef(yj(e))}function xj(){return{didInitialize:!1}}var Sj=cE(19)?Tj:Ej;function Cj(e,t,n,r,i){return Sj(e,t,n,r,i)}function wj(e,t,n,r,i){let a=M.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,pj.useSyncExternalStore)(e.subscribe,a,a)}vj({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,pj.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Tj(e,t,n,r,i){let a=_j();if(!a)return wj(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Ej(e,t,n,r,i){return(0,mj.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var Dj=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Cj(this,e,t,n,r)}},Oj=class extends Dj{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){M.useDebugValue(e);let n=this;ZD(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;ZD(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;ZD(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){M.useDebugValue(e);let n=this,r=t!==void 0;ZD(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return M.useDebugValue(e),Cj(this,this.selectors[e],t,n,r)}useContextCallback(e,t){M.useDebugValue(e);let n=JD(t??dE);this.context[e]=n}useStateSetter(e){let t=M.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},kj={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Aj=class extends Oj{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:wA(),nested:n,triggerElements:i},kj),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&JO(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function jj(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Aj({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:pE,inactiveTriggerProps:pE,popupProps:pE}}var Mj=e=>e.triggerIdProp??e.activeTriggerId,Nj=e=>e.openProp??e.open,Pj=e=>(e.popupElement?.id??e.floatingId)||void 0;function Fj(e,t){return t!==void 0&&Nj(e)&&Mj(e)===t}function Ij(e,t){return Fj(e,t)?!0:t!==void 0&&Nj(e)&&Mj(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var Lj={open:Nj,mounted:e=>e.mounted,transitionStatus:e=>Nj(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Mj,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Pj,isTriggerActive:(e,t)=>t!==void 0&&Mj(e)===t,isOpenedByTrigger:(e,t)=>Fj(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Mj(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Ij(e,t)?Pj(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Rj(e){let t=M.useCallback(t=>e===void 0?dE:e.subscribeStore(t),[e]),n=M.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,pj.useSyncExternalStore)(t,n,()=>e?.serverStore)}var zj=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);function Bj(e){return cE(19)?e:e?`true`:void 0}var Vj=M.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,q.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Hj={},Uj={},Wj=``;function Gj(e,t){return OD(e)?e:t}function Kj(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Gj(t,n)).overflowY)}function qj(e){if(typeof document>`u`)return!1;let t=tO(e);return SD(t).innerWidth-t.documentElement.clientWidth>0}function Jj(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=tO(e),n=t.documentElement,r=t.body,i=Gj(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Yj(e){let t=tO(e),n=t.documentElement,r=t.body,i=Gj(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Xj(e){let t=tO(e),n=t.documentElement,r=t.body,i=SD(n),a=0,o=0,s=!1,c=jO.create();if(_O&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Hj={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Wj=n.style.scrollBehavior,Uj={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Gj(n,r);if(s=Jj(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Hj),Object.assign(r.style,Uj),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Wj)}function d(){u(),c.request(l)}l();let f=mk(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Zj=new class{lockCount=0;restore=null;timeoutLock=VO.create();timeoutUnlock=VO.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=tO(e),n=t.documentElement,r=t.body,i=SD(n);if(Kj(i,n,r)){let t=new i.MutationObserver(()=>{Kj(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=fO||!qj(e);this.restore=a?Yj(e):Xj(e)}};function Qj(e=!0,t=null){ZD(()=>{if(e)return Zj.acquire(t)},[e,t])}function $j(e){let t=M.useRef(``),n=M.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:M.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function eM(e,t){let n=M.useRef(e),r=JD(t);ZD(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function tM(e,t){let{onClick:n,onPointerDown:r}=$j(JD((n,r)=>{(typeof e==`function`?e():e)||t(r||(fO?`touch`:``))}));return M.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function nM(e){let[t,n]=M.useState(null),r=tM(e,n);return eM(e,t=>{t&&!e&&n(null)}),M.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var rM=`data-glide-stand-in`;function iM(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left+e.scrollLeft-e.clientLeft,y:r.top-n.top+e.scrollTop-e.clientTop,width:r.width,height:r.height}}function aM(e){return{transform:`translate(${String(e.x)}px, ${String(e.y)}px)`,width:`${String(e.width)}px`,height:`${String(e.height)}px`}}function oM(e){let t=(0,M.useRef)(null);return(0,M.useCallback)(n=>{t.current?.(),t.current=n?sM(n,e):null},[e])}function sM(e,t){if(!gT(e))return()=>void 0;let n=e.ownerDocument,r=e.querySelector(t),i=r?iM(e,r):null,a=null,o=null,s=new Set,c=()=>{for(let e of s)e.removeAttribute(rM);s.clear(),a&&(a.hidden=!0),o=null},l=()=>{if(a)return a;let t=n.createElement(`span`);return t.className=`caps-glide`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t),e.classList.add(`caps-glide-host`),getComputedStyle(e).position===`static`&&e.classList.add(`caps-glide-anchor`),a=t,t},u=(t,n)=>{let r=uT(e),u=iM(e,t),d=o&&a?iM(e,a):i;if(i=u,o?.cancel(),c(),r.reduced||d===null||Math.abs(d.y-u.y)<1&&Math.abs(d.x-u.x)<1)return;t.setAttribute(rM,`measure`);let f=getComputedStyle(t),p=f.backgroundColor,m=f.borderRadius;for(let e of[t,n])e&&(e.setAttribute(rM,``),s.add(e));let h=l();h.hidden=!1,h.style.backgroundColor=p,h.style.borderRadius=m;let g=h.animate([aM(d),aM(u)],{duration:r.normal,easing:hT(r,r.ease),fill:`forwards`});o=g,g.addEventListener(`finish`,()=>{o===g&&c()})},d=()=>{let n=e.querySelector(t);if(n===r)return;let i=r;r=n,n&&u(n,i)},f=new MutationObserver(d);return f.observe(e,{subtree:!0,attributes:!0,attributeFilter:[`data-highlighted`,`data-active`,`data-navigation`,`aria-selected`]}),e.addEventListener(`pointerover`,d),e.addEventListener(`pointerout`,d),()=>{f.disconnect(),e.removeEventListener(`pointerover`,d),e.removeEventListener(`pointerout`,d),o?.cancel(),c(),a?.remove()}}var cM=(0,M.createContext)(void 0),lM=(0,M.createContext)(null);function uM(e){let t=(0,M.useContext)(lM);return t===null?Object.hasOwn(globalThis,`document`)?document.body:null:t[e]}function dM(e){let t=(0,M.useContext)(cM),n=(0,M.useRef)(e);n.current=e,(0,M.useEffect)(()=>t?.(()=>{n.current()}),[t])}var fM=Object.freeze({ease:`linear`,duration:0});function pM(e,t){let n=mT(e,t.duration);return n<=0?fM:e.steps>0?{ease:ET(e.steps),duration:n}:{ease:TT({bounce:pT(e,t.bounce),duration:n}),duration:n}}function mM(e,t){let n=fT(e,t.duration);return{ease:e.steps>0?ET(e.steps):t.ease,duration:n}}var hM={dot:{y:-4,height:8,cy:0},pill:{y:-16,height:32,cy:0},bang:{y:-16,height:20,cy:12}};function gM({className:e,glyph:t,motion:n}){let r=`caps-status-${(0,M.useId)().replaceAll(`:`,``)}`,i=(0,M.useRef)(null),a=(0,M.useRef)(null),o=(0,M.useRef)(null),s=(0,M.useRef)(null),c=(0,M.useRef)(null),l=(0,M.useRef)(null),u=(0,M.useRef)(hM[t]).current,d=(0,M.useRef)(t===`dot`?1:4).current,f=(0,M.useRef)(+(t===`bang`)).current,p=(0,M.useRef)(t),m=dT(s),{reduced:h}=m;return(0,M.useLayoutEffect)(()=>{if(!i.current||!a.current||!c.current||!l.current)return;let e=hM[t],n=h||p.current===t;p.current=t;let r=uT(i.current),o=n?{duration:0}:pM(r,{bounce:.3,duration:360}),s=nr(i.current,{y:e.y,height:e.height,...o}),u=nr(a.current,{cy:e.cy,...n?{duration:0}:{delay:fT(r,35),...pM(r,{bounce:.3,duration:420})}}),d=nr(c.current,{gradientTransform:`matrix(1 0 0 ${t===`dot`?`1`:`4`} 0 0)`,...o}),f=nr(l.current,{opacity:+(t===`bang`),...n?fM:mM(r,{ease:`inOutSine`,duration:220})});return()=>{s.cancel(),u.cancel(),d.cancel(),f.cancel()}},[t,h]),(0,M.useLayoutEffect)(()=>{if(!o.current||!s.current||h||n===`none`)return;let e=n===`pulse`?nr(o.current,{opacity:[1,.45],...mM(m,{ease:`inOutSine`,duration:750}),alternate:!0,loop:!0}):nr(o.current,{keyframes:{"0%":{translateY:0,scaleX:1,scaleY:1},"18%":{translateY:.25,scaleX:1.1,scaleY:.91},"42%":{translateY:-1.3,scaleX:.94,scaleY:1.06},"62%":{translateY:-1.65,scaleX:1,scaleY:1},"82%":{translateY:.15,scaleX:1.06,scaleY:.95},"100%":{translateY:0,scaleX:1,scaleY:1}},...mM(m,{ease:`inOutSine`,duration:1e3}),loop:!0}),t=MT(s.current,t=>{t?e.resume():e.pause()});return()=>{t(),e.revert()}},[n,h,m]),(0,q.jsxs)(`svg`,{ref:s,"aria-hidden":`true`,className:`caps-status-bead ${e??``}`,width:`8`,height:`8`,viewBox:`-4 -4 8 8`,focusable:`false`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsx)(jT,{id:r,values:AT}),(0,q.jsx)(DT,{ref:c,id:`${r}-surface`,transform:`matrix(1 0 0 ${String(d)} 0 0)`}),(0,q.jsxs)(`radialGradient`,{id:`${r}-drop-light`,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`10.4`,r:`5.6`,children:[(0,q.jsx)(`stop`,{offset:`0`,stopColor:`var(--color-white)`,style:{stopOpacity:`calc(var(--depth) * 0.5)`}}),(0,q.jsx)(`stop`,{offset:`1`,stopColor:`var(--color-white)`,stopOpacity:`0`})]}),(0,q.jsx)(OT,{id:`${r}-shadow`}),(0,q.jsx)(`mask`,{id:`${r}-silhouette`,maskUnits:`userSpaceOnUse`,x:`-12`,y:`-24`,width:`24`,height:`48`,style:{maskType:`alpha`},children:(0,q.jsxs)(`g`,{fill:`var(--color-white)`,filter:`url(#${r})`,children:[(0,q.jsx)(`rect`,{ref:i,x:`-4`,y:u.y,width:`8`,height:u.height,rx:`4`}),(0,q.jsx)(`circle`,{ref:a,cx:`0`,cy:u.cy,r:`4`})]})})]}),(0,q.jsx)(`g`,{ref:o,filter:`url(#${r}-shadow)`,children:(0,q.jsxs)(`g`,{mask:`url(#${r}-silhouette)`,children:[(0,q.jsx)(`rect`,{x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-surface)`}),(0,q.jsx)(`rect`,{ref:l,x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-drop-light)`,opacity:f})]})})]})}var _M=.28;function vM(e,t){switch(e){case`ring`:return{dashes:1,track:0,arc:0,sweep:0,disc:0,tick:0,cross:0};case`arc`:return{dashes:0,track:1,arc:1,sweep:t===void 0?_M:Math.min(1,Math.max(0,t)),disc:0,tick:0,cross:0};case`check`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:1,cross:0};case`cross`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:0,cross:1}}}var yM=7.25;function bM({className:e,glyph:t,progress:n}){let r=`caps-status-mark-${(0,M.useId)().replaceAll(`:`,``)}`,i=(0,M.useRef)(null),a=(0,M.useRef)(null),o=(0,M.useRef)(null),s=(0,M.useRef)(null),c=(0,M.useRef)(null),l=(0,M.useRef)(null),u=(0,M.useRef)(null),d=(0,M.useRef)(null),f=(0,M.useRef)(vM(t,n)).current,p=(0,M.useRef)(t),m=xT();(0,M.useLayoutEffect)(()=>{let e=i.current,r=a.current,c=o.current,f=s.current,h=l.current,g=u.current,_=d.current;if(!e||!r||!c||!f||!h||!g||!_)return;let v=vM(t,n),y=p.current;p.current=t;let b=uT(e),x=m||y===t&&t!==`arc`,S=x?m?{ease:b.ease,duration:b.fast}:fM:mM(b,{ease:`outQuad`,duration:160}),C=(t===`check`||t===`cross`)&&!x,w=mM(b,{ease:`inOutSine`,duration:220}),ee=[nr(r,{opacity:v.dashes,...S}),nr(c,{opacity:v.track*.28,...S}),nr(f,{opacity:v.arc,"stroke-dasharray":`${String(v.sweep)} 1`,...x?m?fM:S:w}),nr(h,{r:v.disc*yM,...C?{delay:w.duration*.7,...pM(b,{bounce:.35,duration:360})}:m?fM:mM(b,{ease:`inCubic`,duration:140})}),nr(g,{"stroke-dashoffset":1-v.tick,...C&&v.tick>0?{delay:w.duration*.7+b.fast,...mM(b,{ease:`outCubic`,duration:240})}:fM}),nr(_,{"stroke-dashoffset":1-v.cross,...C&&v.cross>0?{delay:w.duration*.7+b.fast,...mM(b,{ease:`outCubic`,duration:240})}:fM})];return t===`cross`&&C&&b.shake>0&&ee.push(nr(e,{translateX:[0,-b.shake,b.shake,-b.shake/2,0],delay:w.duration+b.fast,...mM(b,{ease:`linear`,duration:300})})),()=>{for(let e of ee)e.cancel()}},[t,n,m]);let h=t===`arc`&&n===void 0&&!m;return(0,M.useLayoutEffect)(()=>{if(!h||!c.current||!i.current)return;let e=uT(i.current),t=nr(c.current,{rotate:[0,360],...mM(e,{ease:`linear`,duration:900}),loop:!0}),n=MT(i.current,e=>{e?t.resume():t.pause()});return()=>{n(),t.revert()}},[h]),(0,q.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,className:`caps-status-mark ${e??``}`,viewBox:`0 0 16 16`,focusable:`false`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsx)(DT,{id:`${r}-surface`,transform:`matrix(1.6 0 0 1.6 8 8)`}),(0,q.jsxs)(`mask`,{id:`${r}-knock`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`16`,height:`16`,children:[(0,q.jsx)(`rect`,{width:`16`,height:`16`,fill:`var(--color-white)`}),(0,q.jsx)(`path`,{ref:u,d:`M4.9 8.3 7.1 10.5 11.2 5.9`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.tick}),(0,q.jsx)(`path`,{ref:d,d:`M5.4 5.4 10.6 10.6 M10.6 5.4 5.4 10.6`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.cross})]})]}),(0,q.jsx)(`circle`,{ref:a,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`1.7 2.2`,opacity:f.dashes}),(0,q.jsx)(`circle`,{ref:o,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,opacity:f.track*.28}),(0,q.jsx)(`g`,{ref:c,className:`caps-status-mark-spin`,children:(0,q.jsx)(`circle`,{ref:s,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`${String(f.sweep)} 1`,transform:`rotate(-90 8 8)`,opacity:f.arc})}),(0,q.jsx)(`circle`,{ref:l,cx:`8`,cy:`8`,r:f.disc*yM,fill:`url(#${r}-surface)`,mask:`url(#${r}-knock)`})]})}var xM=new Set([`ring`,`arc`,`check`,`cross`]);function SM(e){return xM.has(e)}var CM={neutral:`text-base-content`,primary:`text-primary`,secondary:`text-secondary`,accent:`text-accent`,success:`text-success`,info:`text-info`,warning:`text-warning`,error:`text-error`},wM=(0,M.forwardRef)(function({className:e,label:t,glyph:n=`dot`,motion:r=`none`,tone:i=`neutral`,size:a=`default`,appearance:o=`plain`,progress:s,...c},l){return(0,q.jsxs)(`span`,{...c,className:Y(`caps-status`,a===`compact`&&`caps-status-compact`,o===`chip`&&`caps-status-chip`,e),"data-tone":o===`chip`?i:void 0,"data-glyph":n,"data-motion":r,ref:l,children:[SM(n)?(0,q.jsx)(bM,{className:CM[i],glyph:n,progress:s}):(0,q.jsx)(gM,{className:CM[i],glyph:n,motion:r}),t===void 0?null:(0,q.jsx)(`span`,{children:t})]})}),TM=(0,M.forwardRef)(function({className:e,count:t,density:n=`row`,dismissAriaLabel:r,dismissLabel:i=`Dismiss`,message:a,onDismiss:o,onRetry:s,retryAriaLabel:c,retryLabel:l=`Retry`,role:u=`status`,...d},f){return(0,q.jsxs)(`div`,{...d,className:Y(`caps-failure-line`,e),"data-density":n,ref:f,role:u,children:[(0,q.jsx)(wM,{glyph:`dot`,tone:`error`}),(0,q.jsxs)(`span`,{className:`caps-failure-line-copy`,children:[(0,q.jsx)(`span`,{children:a}),t!==void 0&&t>1?(0,q.jsxs)(`span`,{className:`caps-failure-line-count`,children:[`Failed `,t,` times`]}):null]}),s||o?(0,q.jsxs)(`span`,{className:`caps-failure-line-actions`,children:[s?(0,q.jsx)(WT,{"aria-label":c,size:`sm`,variant:`outline`,onClick:s,children:l}):null,o?(0,q.jsx)(WT,{"aria-label":r,size:`sm`,variant:`ghost`,onClick:o,children:i}):null]}):null]})}),EM={xs:`size-3`,sm:`size-[var(--stipe-icon-size-sm)]`,md:`size-[var(--stipe-icon-size-md)]`,lg:`size-[var(--stipe-icon-size-lg)]`},DM=(0,M.forwardRef)(function({active:e=!1,icon:t,iconSize:n=`xs`,className:r,reveal:i=!1,size:a=`xs`,tone:o=`default`,variant:s=`ghost`,...c},l){let u=a===`responsive`;return(0,q.jsx)(WT,{...c,resultLabel:c.result===void 0?void 0:null,ref:l,size:u?`sm`:a,variant:s,className:Y(`caps-icon-button btn-circle`,u&&`caps-icon-button-responsive md:btn-xs`,e&&`text-accent`,i&&`scale-0 transition-transform group-hover:scale-100 focus-visible:scale-100`,o===`destructive`&&`hover:text-error`,r),children:(0,q.jsx)(`span`,{"aria-hidden":`true`,className:Y(`inline-flex shrink-0 [&>svg]:size-full [&>svg]:[stroke-width:var(--stipe-icon-stroke)]`,EM[n]),children:t})})});function OM({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][^\\u0007\\u001B\\u009C]*(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}var kM=OM();function AM(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes(`\x1B`)&&!e.includes(`›`)?e:e.replace(kM,``)}function jM(e){return AM(e).replace(/\r\n?/gu,`
10
+ `+e.stack}return{value:e,source:t,stack:i,digest:null}}function Vs(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function Hs(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}var Us=typeof WeakMap==`function`?WeakMap:Map;function Ws(e,t,n){n=go(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){xl||(xl=!0,Sl=r),Hs(e,t)},n}function Gs(e,t,n){n=go(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r==`function`){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){Hs(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch==`function`&&(n.callback=function(){Hs(e,t),typeof r!=`function`&&(Cl===null?Cl=new Set([this]):Cl.add(this));var n=t.stack;this.componentDidCatch(t.value,{componentStack:n===null?``:n})}),n}function Ks(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Us;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=iu.bind(null,e,t,n),t.then(e,e))}function qs(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t===null||t.dehydrated!==null),t)return e;e=e.return}while(e!==null);return null}function Js(e,t,n,r,i){return e.mode&1?(e.flags|=65536,e.lanes=i,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=go(-1,1),t.tag=2,_o(n,t,1))),n.lanes|=1),e)}var Ys=x.ReactCurrentOwner,Xs=!1;function Zs(e,t,n,r){t.child=e===null?Qa(t,null,n,r):Za(t,e.child,n,r)}function Qs(e,t,n,r,i){n=n.render;var a=t.ref;return oo(t,i),r=qo(e,t,n,r,a,i),n=Jo(),e!==null&&!Xs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,vc(e,t,i)):(Fa&&n&&ja(t),t.flags|=1,Zs(e,t,r,i),t.child)}function $s(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!fu(a)&&a.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=a,ec(e,t,a,r,i)):(e=hu(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&i)===0){var o=a.memoizedProps;if(n=n.compare,n=n===null?Rr:n,n(o,r)&&e.ref===t.ref)return vc(e,t,i)}return t.flags|=1,e=mu(a,r),e.ref=t.ref,e.return=t,t.child=e}function ec(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Rr(a,r)&&e.ref===t.ref){if(Xs=!1,t.pendingProps=r=a,(e.lanes&i)!==0)e.flags&131072&&(Xs=!0);else return t.lanes=e.lanes,vc(e,t,i)}}return rc(e,t,n,r,i)}function tc(e,t,n){var r=t.pendingProps,i=r.children,a=e===null?null:e.memoizedState;if(r.mode===`hidden`){if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},na(ul,ll),ll|=n;else{if(!(n&1073741824))return e=a===null?n:a.baseLanes|n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,na(ul,ll),ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=a===null?n:a.baseLanes,na(ul,ll),ll|=r}}else a===null?r=n:(r=a.baseLanes|n,t.memoizedState=null),na(ul,ll),ll|=r;return Zs(e,t,i,n),t.child}function nc(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function rc(e,t,n,r,i){var a=ca(n)?oa:ia.current;return a=sa(t,a),oo(t,i),n=qo(e,t,n,r,a,i),r=Jo(),e!==null&&!Xs?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,vc(e,t,i)):(Fa&&r&&ja(t),t.flags|=1,Zs(e,t,n,i),t.child)}function ic(e,t,n,r,i){if(ca(n)){var a=!0;fa(t)}else a=!1;if(oo(t,i),t.stateNode===null)_c(e,t),Ls(t,n,r),zs(t,n,r,i),r=!0;else if(e===null){var o=t.stateNode,s=t.memoizedProps;o.props=s;var c=o.context,l=n.contextType;typeof l==`object`&&l?l=so(l):(l=ca(n)?oa:ia.current,l=sa(t,l));var u=n.getDerivedStateFromProps,d=typeof u==`function`||typeof o.getSnapshotBeforeUpdate==`function`;d||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==r||c!==l)&&Rs(t,o,r,l),po=!1;var f=t.memoizedState;o.state=f,bo(t,r,o,i),c=t.memoizedState,s!==r||f!==c||aa.current||po?(typeof u==`function`&&(Ps(t,n,u,r),c=t.memoizedState),(s=po||Is(t,n,s,r,f,c,l))?(d||typeof o.UNSAFE_componentWillMount!=`function`&&typeof o.componentWillMount!=`function`||(typeof o.componentWillMount==`function`&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount==`function`&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount==`function`&&(t.flags|=4194308)):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=c),o.props=r,o.state=c,o.context=l,r=s):(typeof o.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,ho(e,t),s=t.memoizedProps,l=t.type===t.elementType?s:Ns(t.type,s),o.props=l,d=t.pendingProps,f=o.context,c=n.contextType,typeof c==`object`&&c?c=so(c):(c=ca(n)?oa:ia.current,c=sa(t,c));var p=n.getDerivedStateFromProps;(u=typeof p==`function`||typeof o.getSnapshotBeforeUpdate==`function`)||typeof o.UNSAFE_componentWillReceiveProps!=`function`&&typeof o.componentWillReceiveProps!=`function`||(s!==d||f!==c)&&Rs(t,o,r,c),po=!1,f=t.memoizedState,o.state=f,bo(t,r,o,i);var m=t.memoizedState;s!==d||f!==m||aa.current||po?(typeof p==`function`&&(Ps(t,n,p,r),m=t.memoizedState),(l=po||Is(t,n,l,r,f,m,c)||!1)?(u||typeof o.UNSAFE_componentWillUpdate!=`function`&&typeof o.componentWillUpdate!=`function`||(typeof o.componentWillUpdate==`function`&&o.componentWillUpdate(r,m,c),typeof o.UNSAFE_componentWillUpdate==`function`&&o.UNSAFE_componentWillUpdate(r,m,c)),typeof o.componentDidUpdate==`function`&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),o.props=r,o.state=m,o.context=c,r=l):(typeof o.componentDidUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!=`function`||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return ac(e,t,n,r,a,i)}function ac(e,t,n,r,i,a){nc(e,t);var o=!!(t.flags&128);if(!r&&!o)return i&&pa(t,n,!1),vc(e,t,a);r=t.stateNode,Ys.current=t;var s=o&&typeof n.getDerivedStateFromError!=`function`?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Za(t,e.child,null,a),t.child=Za(t,null,s,a)):Zs(e,t,s,a),t.memoizedState=r.state,i&&pa(t,n,!0),t.child}function oc(e){var t=e.stateNode;t.pendingContext?ua(e,t.pendingContext,t.pendingContext!==t.context):t.context&&ua(e,t.context,!1),Do(e,t.containerInfo)}function sc(e,t,n,r,i){return Wa(),Ga(i),t.flags|=256,Zs(e,t,n,r),t.child}var cc={dehydrated:null,treeContext:null,retryLane:0};function lc(e){return{baseLanes:e,cachePool:null,transitions:null}}function uc(e,t,n){var r=t.pendingProps,i=jo.current,a=!1,o=!!(t.flags&128),s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:!!(i&2)),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(i|=1),na(jo,i&1),e===null)return Ba(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.lanes=t.mode&1?e.data===`$!`?8:1073741824:1,null):(o=r.children,e=r.fallback,a?(r=t.mode,a=t.child,o={mode:`hidden`,children:o},!(r&1)&&a!==null?(a.childLanes=0,a.pendingProps=o):a=_u(o,r,0,null),e=gu(e,r,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=lc(n),t.memoizedState=cc,e):dc(t,o));if(i=e.memoizedState,i!==null&&(s=i.dehydrated,s!==null))return pc(e,t,o,r,s,i,n);if(a){a=r.fallback,o=t.mode,i=e.child,s=i.sibling;var c={mode:`hidden`,children:r.children};return!(o&1)&&t.child!==i?(r=t.child,r.childLanes=0,r.pendingProps=c,t.deletions=null):(r=mu(i,c),r.subtreeFlags=i.subtreeFlags&14680064),s===null?(a=gu(a,o,n,null),a.flags|=2):a=mu(s,a),a.return=t,r.return=t,r.sibling=a,t.child=r,r=a,a=t.child,o=e.child.memoizedState,o=o===null?lc(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},a.memoizedState=o,a.childLanes=e.childLanes&~n,t.memoizedState=cc,r}return a=e.child,e=a.sibling,r=mu(a,{mode:`visible`,children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function dc(e,t){return t=_u({mode:`visible`,children:t},e.mode,0,null),t.return=e,e.child=t}function fc(e,t,n,r){return r!==null&&Ga(r),Za(t,e.child,null,n),e=dc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function pc(e,t,n,i,a,o,s){if(n)return t.flags&256?(t.flags&=-257,i=Vs(Error(r(422))),fc(e,t,s,i)):t.memoizedState===null?(o=i.fallback,a=t.mode,i=_u({mode:`visible`,children:i.children},a,0,null),o=gu(o,a,s,null),o.flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,t.mode&1&&Za(t,e.child,null,s),t.child.memoizedState=lc(s),t.memoizedState=cc,o):(t.child=e.child,t.flags|=128,null);if(!(t.mode&1))return fc(e,t,s,null);if(a.data===`$!`){if(i=a.nextSibling&&a.nextSibling.dataset,i)var c=i.dgst;return i=c,o=Error(r(419)),i=Vs(o,i,void 0),fc(e,t,s,i)}if(c=(s&e.childLanes)!==0,Xs||c){if(i=ol,i!==null){switch(s&-s){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=(a&(i.suspendedLanes|s))===0?a:0,a!==0&&a!==o.retryLane&&(o.retryLane=a,fo(e,a),Nl(i,e,a,-1))}return ql(),i=Vs(Error(r(421))),fc(e,t,s,i)}return a.data===`$?`?(t.flags|=128,t.child=e.child,t=ou.bind(null,e),a._reactRetry=t,null):(e=o.treeContext,Pa=zi(a.nextSibling),Na=t,Fa=!0,Ia=null,e!==null&&(wa[Ta++]=Da,wa[Ta++]=Oa,wa[Ta++]=Ea,Da=e.id,Oa=e.overflow,Ea=t),t=dc(t,i.children),t.flags|=4096,t)}function mc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ao(e.return,t,n)}function hc(e,t,n,r,i){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function gc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Zs(e,t,r.children,n),r=jo.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&mc(e,n,t);else if(e.tag===19)mc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(na(jo,r),!(t.mode&1))t.memoizedState=null;else switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Mo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),hc(t,!1,i,n,a);break;case`backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Mo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}hc(t,!0,n,null,a);break;case`together`:hc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function _c(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function vc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),pl|=t.lanes,(n&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=mu(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=mu(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function yc(e,t,n){switch(t.tag){case 3:oc(t),Wa();break;case 5:ko(t);break;case 1:ca(t.type)&&fa(t);break;case 4:Do(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;na($a,r._currentValue),r._currentValue=i;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(na(jo,jo.current&1),e=vc(e,t,n),e===null?null:e.sibling):uc(e,t,n):(na(jo,jo.current&1),t.flags|=128,null);na(jo,jo.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return gc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),na(jo,jo.current),r)break;return null;case 22:case 23:return t.lanes=0,tc(e,t,n)}return vc(e,t,n)}var bc=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},xc=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Eo(Co.current);var o=null;switch(n){case`input`:i=Ce(e,i),r=Ce(e,r),o=[];break;case`select`:i=de({},i,{value:void 0}),r=de({},r,{value:void 0}),o=[];break;case`textarea`:i=ke(e,i),r=ke(e,r),o=[];break;default:typeof i.onClick!=`function`&&typeof r.onClick==`function`&&(e.onclick=ki)}He(n,r);var s;for(u in n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&i[u]!=null){if(u===`style`){var c=i[u];for(s in c)c.hasOwnProperty(s)&&(n||={},n[s]=``)}else u!==`dangerouslySetInnerHTML`&&u!==`children`&&u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&u!==`autoFocus`&&(a.hasOwnProperty(u)?o||=[]:(o||=[]).push(u,null))}for(u in r){var l=r[u];if(c=i?.[u],r.hasOwnProperty(u)&&l!==c&&(l!=null||c!=null)){if(u===`style`){if(c){for(s in c)!c.hasOwnProperty(s)||l&&l.hasOwnProperty(s)||(n||={},n[s]=``);for(s in l)l.hasOwnProperty(s)&&c[s]!==l[s]&&(n||={},n[s]=l[s])}else n||(o||=[],o.push(u,n)),n=l}else u===`dangerouslySetInnerHTML`?(l=l?l.__html:void 0,c=c?c.__html:void 0,l!=null&&c!==l&&(o||=[]).push(u,l)):u===`children`?typeof l!=`string`&&typeof l!=`number`||(o||=[]).push(u,``+l):u!==`suppressContentEditableWarning`&&u!==`suppressHydrationWarning`&&(a.hasOwnProperty(u)?(l!=null&&u===`onScroll`&&hi(`scroll`,e),o||c===l||(o=[])):(o||=[]).push(u,l))}}n&&(o||=[]).push(`style`,n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},Sc=function(e,t,n,r){n!==r&&(t.flags|=4)};function Cc(e,t){if(!Fa)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function wc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&14680064,r|=i.flags&14680064,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Tc(e,t,n){var i=t.pendingProps;switch(Ma(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return wc(t),null;case 1:return ca(t.type)&&la(),wc(t),null;case 3:return i=t.stateNode,Oo(),ta(aa),ta(ia),Po(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ha(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Ia!==null&&(Ll(Ia),Ia=null))),wc(t),null;case 5:Ao(t);var o=Eo(To.current);if(n=t.type,e!==null&&t.stateNode!=null)xc(e,t,n,i,o),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(r(166));return wc(t),null}if(e=Eo(Co.current),Ha(t)){i=t.stateNode,n=t.type;var s=t.memoizedProps;switch(i[Hi]=t,i[Ui]=s,e=!!(t.mode&1),n){case`dialog`:hi(`cancel`,i),hi(`close`,i);break;case`iframe`:case`object`:case`embed`:hi(`load`,i);break;case`video`:case`audio`:for(o=0;o<di.length;o++)hi(di[o],i);break;case`source`:hi(`error`,i);break;case`img`:case`image`:case`link`:hi(`error`,i),hi(`load`,i);break;case`details`:hi(`toggle`,i);break;case`input`:we(i,s),hi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},hi(`invalid`,i);break;case`textarea`:Ae(i,s),hi(`invalid`,i)}for(var c in He(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&Oi(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&Oi(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&hi(`scroll`,i)}switch(n){case`input`:be(i),De(i,s,!0);break;case`textarea`:be(i),Me(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=ki)}i=o,t.updateQueue=i,i!==null&&(t.flags|=4)}else{c=o.nodeType===9?o:o.ownerDocument,e===`http://www.w3.org/1999/xhtml`&&(e=Ne(n)),e===`http://www.w3.org/1999/xhtml`?n===`script`?(e=c.createElement(`div`),e.innerHTML=`<script><\/script>`,e=e.removeChild(e.firstChild)):typeof i.is==`string`?e=c.createElement(n,{is:i.is}):(e=c.createElement(n),n===`select`&&(c=e,i.multiple?c.multiple=!0:i.size&&(c.size=i.size))):e=c.createElementNS(e,n),e[Hi]=t,e[Ui]=i,bc(e,t,!1,!1),t.stateNode=e;a:{switch(c=Ue(n,i),n){case`dialog`:hi(`cancel`,e),hi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:hi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<di.length;o++)hi(di[o],e);o=i;break;case`source`:hi(`error`,e),o=i;break;case`img`:case`image`:case`link`:hi(`error`,e),hi(`load`,e),o=i;break;case`details`:hi(`toggle`,e),o=i;break;case`input`:we(e,i),o=Ce(e,i),hi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=de({},i,{value:void 0}),hi(`invalid`,e);break;case`textarea`:Ae(e,i),o=ke(e,i),hi(`invalid`,e);break;default:o=i}for(s in He(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Be(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Fe(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Ie(e,u):typeof u==`number`&&Ie(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&hi(`scroll`,e):u!=null&&b(e,s,u,c))}switch(n){case`input`:be(e),De(e,i,!1);break;case`textarea`:be(e),Me(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+D(i.value));break;case`select`:e.multiple=!!i.multiple,s=i.value,s==null?i.defaultValue!=null&&k(e,!!i.multiple,i.defaultValue,!0):k(e,!!i.multiple,s,!1);break;default:typeof o.onClick==`function`&&(e.onclick=ki)}switch(n){case`button`:case`input`:case`select`:case`textarea`:i=!!i.autoFocus;break a;case`img`:i=!0;break a;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return wc(t),null;case 6:if(e&&t.stateNode!=null)Sc(e,t,e.memoizedProps,i);else{if(typeof i!=`string`&&t.stateNode===null)throw Error(r(166));if(n=Eo(To.current),Eo(Co.current),Ha(t)){if(i=t.stateNode,n=t.memoizedProps,i[Hi]=t,(s=i.nodeValue!==n)&&(e=Na,e!==null))switch(e.tag){case 3:Oi(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Oi(i.nodeValue,n,!!(e.mode&1))}s&&(t.flags|=4)}else i=(n.nodeType===9?n:n.ownerDocument).createTextNode(i),i[Hi]=t,t.stateNode=i}return wc(t),null;case 13:if(ta(jo),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Fa&&Pa!==null&&t.mode&1&&!(t.flags&128))Ua(),Wa(),t.flags|=98560,s=!1;else if(s=Ha(t),i!==null&&i.dehydrated!==null){if(e===null){if(!s)throw Error(r(318));if(s=t.memoizedState,s=s===null?null:s.dehydrated,!s)throw Error(r(317));s[Hi]=t}else Wa(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;wc(t),s=!1}else Ia!==null&&(Ll(Ia),Ia=null),s=!0;if(!s)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||jo.current&1?dl===0&&(dl=3):ql())),t.updateQueue!==null&&(t.flags|=4),wc(t),null);case 4:return Oo(),e===null&&vi(t.stateNode.containerInfo),wc(t),null;case 10:return io(t.type._context),wc(t),null;case 17:return ca(t.type)&&la(),wc(t),null;case 19:if(ta(jo),s=t.memoizedState,s===null)return wc(t),null;if(i=!!(t.flags&128),c=s.rendering,c===null){if(i)Cc(s,!1);else{if(dl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(c=Mo(e),c!==null){for(t.flags|=128,Cc(s,!1),i=c.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=n,n=t.child;n!==null;)s=n,e=i,s.flags&=14680066,c=s.alternate,c===null?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=c.childLanes,s.lanes=c.lanes,s.child=c.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=c.memoizedProps,s.memoizedState=c.memoizedState,s.updateQueue=c.updateQueue,s.type=c.type,e=c.dependencies,s.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return na(jo,jo.current&1|2),t.child}e=e.sibling}s.tail!==null&&Ct()>yl&&(t.flags|=128,i=!0,Cc(s,!1),t.lanes=4194304)}}else{if(!i){if(e=Mo(c),e!==null){if(t.flags|=128,i=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Cc(s,!0),s.tail===null&&s.tailMode===`hidden`&&!c.alternate&&!Fa)return wc(t),null}else 2*Ct()-s.renderingStartTime>yl&&n!==1073741824&&(t.flags|=128,i=!0,Cc(s,!1),t.lanes=4194304)}s.isBackwards?(c.sibling=t.child,t.child=c):(n=s.last,n===null?t.child=c:n.sibling=c,s.last=c)}return s.tail===null?(wc(t),null):(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Ct(),t.sibling=null,n=jo.current,na(jo,i?n&1|2:n&1),t);case 22:case 23:return Ul(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?ll&1073741824&&(wc(t),t.subtreeFlags&6&&(t.flags|=8192)):wc(t),null;case 24:return null;case 25:return null}throw Error(r(156,t.tag))}function Ec(e,t){switch(Ma(t),t.tag){case 1:return ca(t.type)&&la(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Oo(),ta(aa),ta(ia),Po(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Ao(t),null;case 13:if(ta(jo),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ta(jo),null;case 4:return Oo(),null;case 10:return io(t.type._context),null;case 22:case 23:return Ul(),null;case 24:return null;default:return null}}var Dc=!1,Oc=!1,kc=typeof WeakSet==`function`?WeakSet:Set,N=null;function Ac(e,t){var n=e.ref;if(n!==null){if(typeof n==`function`)try{n(null)}catch(n){ru(e,t,n)}else n.current=null}}function jc(e,t,n){try{n()}catch(n){ru(e,t,n)}}var Mc=!1;function Nc(e,t){if(Ai=Sn,e=Hr(),Ur(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var i=n.getSelection&&n.getSelection();if(i&&i.rangeCount!==0){n=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(ji={focusedElem:e,selectionRange:n},Sn=!1,N=t;N!==null;)if(t=N,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,N=e;else for(;N!==null;){t=N;try{var h=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var g=h.memoizedProps,_=h.memoizedState,v=t.stateNode;v.__reactInternalSnapshotBeforeUpdate=v.getSnapshotBeforeUpdate(t.elementType===t.type?g:Ns(t.type,g),_)}break;case 3:var y=t.stateNode.containerInfo;y.nodeType===1?y.textContent=``:y.nodeType===9&&y.documentElement&&y.removeChild(y.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(e){ru(t,t.return,e)}if(e=t.sibling,e!==null){e.return=t.return,N=e;break}N=t.return}return h=Mc,Mc=!1,h}function Pc(e,t,n){var r=t.updateQueue;if(r=r===null?null:r.lastEffect,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,a!==void 0&&jc(t,n,a)}i=i.next}while(i!==r)}}function Fc(e,t){if(t=t.updateQueue,t=t===null?null:t.lastEffect,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ic(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t==`function`?t(e):t.current=e}}function Lc(e){var t=e.alternate;t!==null&&(e.alternate=null,Lc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Hi],delete t[Ui],delete t[Gi],delete t[Ki],delete t[qi])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Rc(e){return e.tag===5||e.tag===3||e.tag===4}function zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Rc(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.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ki));else if(r!==4&&(e=e.child,e!==null))for(Bc(e,t,n),e=e.sibling;e!==null;)Bc(e,t,n),e=e.sibling}function Vc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Vc(e,t,n),e=e.sibling;e!==null;)Vc(e,t,n),e=e.sibling}var Hc=null,Uc=!1;function Wc(e,t,n){for(n=n.child;n!==null;)Gc(e,t,n),n=n.sibling}function Gc(e,t,n){if(jt&&typeof jt.onCommitFiberUnmount==`function`)try{jt.onCommitFiberUnmount(At,n)}catch{}switch(n.tag){case 5:Oc||Ac(n,t);case 6:var r=Hc,i=Uc;Hc=null,Wc(e,t,n),Hc=r,Uc=i,Hc!==null&&(Uc?(e=Hc,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Hc.removeChild(n.stateNode));break;case 18:Hc!==null&&(Uc?(e=Hc,n=n.stateNode,e.nodeType===8?Ri(e.parentNode,n):e.nodeType===1&&Ri(e,n),bn(e)):Ri(Hc,n.stateNode));break;case 4:r=Hc,i=Uc,Hc=n.stateNode.containerInfo,Uc=!0,Wc(e,t,n),Hc=r,Uc=i;break;case 0:case 11:case 14:case 15:if(!Oc&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,o!==void 0&&(a&2||a&4)&&jc(n,t,o),i=i.next}while(i!==r)}Wc(e,t,n);break;case 1:if(!Oc&&(Ac(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){ru(n,t,e)}Wc(e,t,n);break;case 21:Wc(e,t,n);break;case 22:n.mode&1?(Oc=(r=Oc)||n.memoizedState!==null,Wc(e,t,n),Oc=r):Wc(e,t,n);break;default:Wc(e,t,n)}}function Kc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kc),t.forEach(function(t){var r=su.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))})}}function qc(e,t){var n=t.deletions;if(n!==null)for(var i=0;i<n.length;i++){var a=n[i];try{var o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 5:Hc=c.stateNode,Uc=!1;break a;case 3:Hc=c.stateNode.containerInfo,Uc=!0;break a;case 4:Hc=c.stateNode.containerInfo,Uc=!0;break a}c=c.return}if(Hc===null)throw Error(r(160));Gc(o,s,a),Hc=null,Uc=!1;var l=a.alternate;l!==null&&(l.return=null),a.return=null}catch(e){ru(a,t,e)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Jc(t,e),t=t.sibling}function Jc(e,t){var n=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(qc(t,e),Yc(e),i&4){try{Pc(3,e,e.return),Fc(3,e)}catch(t){ru(e,e.return,t)}try{Pc(5,e,e.return)}catch(t){ru(e,e.return,t)}}break;case 1:qc(t,e),Yc(e),i&512&&n!==null&&Ac(n,n.return);break;case 5:if(qc(t,e),Yc(e),i&512&&n!==null&&Ac(n,n.return),e.flags&32){var a=e.stateNode;try{Ie(a,``)}catch(t){ru(e,e.return,t)}}if(i&4&&(a=e.stateNode,a!=null)){var o=e.memoizedProps,s=n===null?o:n.memoizedProps,c=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{c===`input`&&o.type===`radio`&&o.name!=null&&Te(a,o),Ue(c,s);var u=Ue(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Be(a,f):d===`dangerouslySetInnerHTML`?Fe(a,f):d===`children`?Ie(a,f):b(a,d,f,u)}switch(c){case`input`:Ee(a,o);break;case`textarea`:je(a,o);break;case`select`:var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!o.multiple;var m=o.value;m==null?p!==!!o.multiple&&(o.defaultValue==null?k(a,!!o.multiple,o.multiple?[]:``,!1):k(a,!!o.multiple,o.defaultValue,!0)):k(a,!!o.multiple,m,!1)}a[Ui]=o}catch(t){ru(e,e.return,t)}}break;case 6:if(qc(t,e),Yc(e),i&4){if(e.stateNode===null)throw Error(r(162));a=e.stateNode,o=e.memoizedProps;try{a.nodeValue=o}catch(t){ru(e,e.return,t)}}break;case 3:if(qc(t,e),Yc(e),i&4&&n!==null&&n.memoizedState.isDehydrated)try{bn(t.containerInfo)}catch(t){ru(e,e.return,t)}break;case 4:qc(t,e),Yc(e);break;case 13:qc(t,e),Yc(e),a=e.child,a.flags&8192&&(o=a.memoizedState!==null,a.stateNode.isHidden=o,!o||a.alternate!==null&&a.alternate.memoizedState!==null||(vl=Ct())),i&4&&Kc(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(Oc=(u=Oc)||d,qc(t,e),Oc=u):qc(t,e),Yc(e),i&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&e.mode&1)for(N=e,d=e.child;d!==null;){for(f=N=d;N!==null;){switch(p=N,m=p.child,p.tag){case 0:case 11:case 14:case 15:Pc(4,p,p.return);break;case 1:Ac(p,p.return);var h=p.stateNode;if(typeof h.componentWillUnmount==`function`){i=p,n=p.return;try{t=i,h.props=t.memoizedProps,h.state=t.memoizedState,h.componentWillUnmount()}catch(e){ru(i,n,e)}}break;case 5:Ac(p,p.return);break;case 22:if(p.memoizedState!==null){$c(f);continue}}m===null?$c(f):(m.return=p,N=m)}d=d.sibling}a:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{a=f.stateNode,u?(o=a.style,typeof o.setProperty==`function`?o.setProperty(`display`,`none`,`important`):o.display=`none`):(c=f.stateNode,l=f.memoizedProps.style,s=l!=null&&l.hasOwnProperty(`display`)?l.display:null,c.style.display=ze(`display`,s))}catch(t){ru(e,e.return,t)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=u?``:f.memoizedProps}catch(t){ru(e,e.return,t)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break a;for(;f.sibling===null;){if(f.return===null||f.return===e)break a;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:qc(t,e),Yc(e),i&4&&Kc(e);break;case 21:break;default:qc(t,e),Yc(e)}}function Yc(e){var t=e.flags;if(t&2){try{a:{for(var n=e.return;n!==null;){if(Rc(n)){var i=n;break a}n=n.return}throw Error(r(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(Ie(a,``),i.flags&=-33),Vc(e,zc(e),a);break;case 3:case 4:var o=i.stateNode.containerInfo;Bc(e,zc(e),o);break;default:throw Error(r(161))}}catch(t){ru(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xc(e,t,n){N=e,Zc(e,t,n)}function Zc(e,t,n){for(var r=!!(e.mode&1);N!==null;){var i=N,a=i.child;if(i.tag===22&&r){var o=i.memoizedState!==null||Dc;if(!o){var s=i.alternate,c=s!==null&&s.memoizedState!==null||Oc;s=Dc;var l=Oc;if(Dc=o,(Oc=c)&&!l)for(N=i;N!==null;)o=N,c=o.child,o.tag===22&&o.memoizedState!==null||c===null?el(i):(c.return=o,N=c);for(;a!==null;)N=a,Zc(a,t,n),a=a.sibling;N=i,Dc=s,Oc=l}Qc(e,t,n)}else i.subtreeFlags&8772&&a!==null?(a.return=i,N=a):Qc(e,t,n)}}function Qc(e){for(;N!==null;){var t=N;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oc||Fc(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Oc){if(n===null)i.componentDidMount();else{var a=t.elementType===t.type?n.memoizedProps:Ns(t.type,n.memoizedProps);i.componentDidUpdate(a,n.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}}var o=t.updateQueue;o!==null&&xo(t,o,i);break;case 3:var s=t.updateQueue;if(s!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}xo(t,s,n)}break;case 5:var c=t.stateNode;if(n===null&&t.flags&4){n=c;var l=t.memoizedProps;switch(t.type){case`button`:case`input`:case`select`:case`textarea`:l.autoFocus&&n.focus();break;case`img`:l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&bn(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Oc||t.flags&512&&Ic(t)}catch(e){ru(t,t.return,e)}}if(t===e){N=null;break}if(n=t.sibling,n!==null){n.return=t.return,N=n;break}N=t.return}}function $c(e){for(;N!==null;){var t=N;if(t===e){N=null;break}var n=t.sibling;if(n!==null){n.return=t.return,N=n;break}N=t.return}}function el(e){for(;N!==null;){var t=N;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Fc(4,t)}catch(e){ru(t,n,e)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount==`function`){var i=t.return;try{r.componentDidMount()}catch(e){ru(t,i,e)}}var a=t.return;try{Ic(t)}catch(e){ru(t,a,e)}break;case 5:var o=t.return;try{Ic(t)}catch(e){ru(t,o,e)}}}catch(e){ru(t,t.return,e)}if(t===e){N=null;break}var s=t.sibling;if(s!==null){s.return=t.return,N=s;break}N=t.return}}var tl=Math.ceil,nl=x.ReactCurrentDispatcher,rl=x.ReactCurrentOwner,il=x.ReactCurrentBatchConfig,al=0,ol=null,sl=null,cl=0,ll=0,ul=ea(0),dl=0,fl=null,pl=0,ml=0,hl=0,gl=null,_l=null,vl=0,yl=1/0,bl=null,xl=!1,Sl=null,Cl=null,wl=!1,Tl=null,El=0,Dl=0,Ol=null,kl=-1,Al=0;function jl(){return al&6?Ct():kl===-1?kl=Ct():kl}function Ml(e){return e.mode&1?al&2&&cl!==0?cl&-cl:Ka.transition===null?(e=Yt,e===0?(e=window.event,e=e===void 0?16:On(e.type),e):e):(Al===0&&(Al=Wt()),Al):1}function Nl(e,t,n,i){if(50<Dl)throw Dl=0,Ol=null,Error(r(185));Kt(e,n,i),(!(al&2)||e!==ol)&&(e===ol&&(!(al&2)&&(ml|=n),dl===4&&zl(e,cl)),Pl(e,i),n===1&&al===0&&!(t.mode&1)&&(yl=Ct()+500,ha&&ya()))}function Pl(e,t){var n=e.callbackNode;Ht(e,t);var r=Bt(e,e===ol?cl:0);if(r===0)n!==null&&bt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&bt(n),t===1)e.tag===0?va(Bl.bind(null,e)):_a(Bl.bind(null,e)),Ii(function(){!(al&6)&&ya()}),n=null;else{switch(Xt(r)){case 1:n=Tt;break;case 4:n=Et;break;case 16:n=Dt;break;case 536870912:n=kt;break;default:n=Dt}n=lu(n,Fl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Fl(e,t){if(kl=-1,Al=0,al&6)throw Error(r(327));var n=e.callbackNode;if(tu()&&e.callbackNode!==n)return null;var i=Bt(e,e===ol?cl:0);if(i===0)return null;if(i&30||(i&e.expiredLanes)!==0||t)t=Jl(e,i);else{t=i;var a=al;al|=2;var o=Kl();(ol!==e||cl!==t)&&(bl=null,yl=Ct()+500,Wl(e,t));do try{Xl();break}catch(t){Gl(e,t)}while(1);ro(),nl.current=o,al=a,sl===null?(ol=null,cl=0,t=dl):t=0}if(t!==0){if(t===2&&(a=Ut(e),a!==0&&(i=a,t=Il(e,a))),t===1)throw n=fl,Wl(e,0),zl(e,i),Pl(e,Ct()),n;if(t===6)zl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Rl(a)&&(t=Jl(e,i),t===2&&(o=Ut(e),o!==0&&(i=o,t=Il(e,o))),t===1))throw n=fl,Wl(e,0),zl(e,i),Pl(e,Ct()),n;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(r(345));case 2:$l(e,_l,bl);break;case 3:if(zl(e,i),(i&130023424)===i&&(t=vl+500-Ct(),10<t)){if(Bt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){jl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Ni($l.bind(null,e,_l,bl),t);break}$l(e,_l,bl);break;case 4:if(zl(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var s=31-Nt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=Ct()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*tl(i/1960))-i,10<i){e.timeoutHandle=Ni($l.bind(null,e,_l,bl),i);break}$l(e,_l,bl);break;case 5:$l(e,_l,bl);break;default:throw Error(r(329))}}}return Pl(e,Ct()),e.callbackNode===n?Fl.bind(null,e):null}function Il(e,t){var n=gl;return e.current.memoizedState.isDehydrated&&(Wl(e,t).flags|=256),e=Jl(e,t),e!==2&&(t=_l,_l=n,t!==null&&Ll(t)),e}function Ll(e){_l===null?_l=e:_l.push.apply(_l,e)}function Rl(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Lr(a(),i))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function zl(e,t){for(t&=~hl,t&=~ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Nt(t),r=1<<n;e[n]=-1,t&=~r}}function Bl(e){if(al&6)throw Error(r(327));tu();var t=Bt(e,0);if(!(t&1))return Pl(e,Ct()),null;var n=Jl(e,t);if(e.tag!==0&&n===2){var i=Ut(e);i!==0&&(t=i,n=Il(e,i))}if(n===1)throw n=fl,Wl(e,0),zl(e,t),Pl(e,Ct()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$l(e,_l,bl),Pl(e,Ct()),null}function Vl(e,t){var n=al;al|=1;try{return e(t)}finally{al=n,al===0&&(yl=Ct()+500,ha&&ya())}}function Hl(e){Tl!==null&&Tl.tag===0&&!(al&6)&&tu();var t=al;al|=1;var n=il.transition,r=Yt;try{if(il.transition=null,Yt=1,e)return e()}finally{Yt=r,il.transition=n,al=t,!(al&6)&&ya()}}function Ul(){ll=ul.current,ta(ul)}function Wl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Pi(n)),sl!==null)for(n=sl.return;n!==null;){var r=n;switch(Ma(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&la();break;case 3:Oo(),ta(aa),ta(ia),Po();break;case 5:Ao(r);break;case 4:Oo();break;case 13:ta(jo);break;case 19:ta(jo);break;case 10:io(r.type._context);break;case 22:case 23:Ul()}n=n.return}if(ol=e,sl=e=mu(e.current,null),cl=ll=t,dl=0,fl=null,hl=ml=pl=0,_l=gl=null,co!==null){for(t=0;t<co.length;t++)if(n=co[t],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,a=n.pending;if(a!==null){var o=a.next;a.next=i,r.next=o}n.pending=r}co=null}return e}function Gl(e,t){do{var n=sl;try{if(ro(),Fo.current=ks,Vo){for(var i=Ro.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}Vo=!1}if(Lo=0,Bo=zo=Ro=null,Ho=!1,Uo=0,rl.current=null,n===null||n.return===null){dl=1,fl=t,sl=null;break}a:{var o=e,s=n.return,c=n,l=t;if(t=cl,c.flags|=32768,typeof l==`object`&&l&&typeof l.then==`function`){var u=l,d=c,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var m=qs(s);if(m!==null){m.flags&=-257,Js(m,s,c,o,t),m.mode&1&&Ks(o,u,t),t=m,l=u;var h=t.updateQueue;if(h===null){var g=new Set;g.add(l),t.updateQueue=g}else h.add(l);break a}if(!(t&1)){Ks(o,u,t),ql();break a}l=Error(r(426))}else if(Fa&&c.mode&1){var _=qs(s);if(_!==null){!(_.flags&65536)&&(_.flags|=256),Js(_,s,c,o,t),Ga(Bs(l,c));break a}}o=l=Bs(l,c),dl!==4&&(dl=2),gl===null?gl=[o]:gl.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t;var v=Ws(o,l,t);yo(o,v);break a;case 1:c=l;var y=o.type,b=o.stateNode;if(!(o.flags&128)&&(typeof y.getDerivedStateFromError==`function`||b!==null&&typeof b.componentDidCatch==`function`&&(Cl===null||!Cl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t;var x=Gs(o,c,t);yo(o,x);break a}}o=o.return}while(o!==null)}Ql(n)}catch(e){t=e,sl===n&&n!==null&&(sl=n=n.return);continue}break}while(1)}function Kl(){var e=nl.current;return nl.current=ks,e===null?ks:e}function ql(){(dl===0||dl===3||dl===2)&&(dl=4),ol===null||!(pl&268435455)&&!(ml&268435455)||zl(ol,cl)}function Jl(e,t){var n=al;al|=2;var i=Kl();(ol!==e||cl!==t)&&(bl=null,Wl(e,t));do try{Yl();break}catch(t){Gl(e,t)}while(1);if(ro(),al=n,nl.current=i,sl!==null)throw Error(r(261));return ol=null,cl=0,dl}function Yl(){for(;sl!==null;)Zl(sl)}function Xl(){for(;sl!==null&&!xt();)Zl(sl)}function Zl(e){var t=cu(e.alternate,e,ll);e.memoizedProps=e.pendingProps,t===null?Ql(e):sl=t,rl.current=null}function Ql(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Ec(n,t),n!==null){n.flags&=32767,sl=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{dl=6,sl=null;return}}else if(n=Tc(n,t,ll),n!==null){sl=n;return}if(t=t.sibling,t!==null){sl=t;return}sl=t=e}while(t!==null);dl===0&&(dl=5)}function $l(e,t,n){var r=Yt,i=il.transition;try{il.transition=null,Yt=1,eu(e,t,n,r)}finally{il.transition=i,Yt=r}return null}function eu(e,t,n,i){do tu();while(Tl!==null);if(al&6)throw Error(r(327));n=e.finishedWork;var a=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(r(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(qt(e,o),e===ol&&(sl=ol=null,cl=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wl||(wl=!0,lu(Dt,function(){return tu(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=il.transition,il.transition=null;var s=Yt;Yt=1;var c=al;al|=4,rl.current=null,Nc(e,n),Jc(n,e),Wr(ji),Sn=!!Ai,ji=Ai=null,e.current=n,Xc(n,e,a),St(),al=c,Yt=s,il.transition=o}else e.current=n;if(wl&&(wl=!1,Tl=e,El=a),o=e.pendingLanes,o===0&&(Cl=null),Mt(n.stateNode,i),Pl(e,Ct()),t!==null)for(i=e.onRecoverableError,n=0;n<t.length;n++)a=t[n],i(a.value,{componentStack:a.stack,digest:a.digest});if(xl)throw xl=!1,e=Sl,Sl=null,e;return El&1&&e.tag!==0&&tu(),o=e.pendingLanes,o&1?e===Ol?Dl++:(Dl=0,Ol=e):Dl=0,ya(),null}function tu(){if(Tl!==null){var e=Xt(El),t=il.transition,n=Yt;try{if(il.transition=null,Yt=16>e?16:e,Tl===null)var i=!1;else{if(e=Tl,Tl=null,El=0,al&6)throw Error(r(331));var a=al;for(al|=4,N=e.current;N!==null;){var o=N,s=o.child;if(N.flags&16){var c=o.deletions;if(c!==null){for(var l=0;l<c.length;l++){var u=c[l];for(N=u;N!==null;){var d=N;switch(d.tag){case 0:case 11:case 15:Pc(8,d,o)}var f=d.child;if(f!==null)f.return=d,N=f;else for(;N!==null;){d=N;var p=d.sibling,m=d.return;if(Lc(d),d===u){N=null;break}if(p!==null){p.return=m,N=p;break}N=m}}}var h=o.alternate;if(h!==null){var g=h.child;if(g!==null){h.child=null;do{var _=g.sibling;g.sibling=null,g=_}while(g!==null)}}N=o}}if(o.subtreeFlags&2064&&s!==null)s.return=o,N=s;else b:for(;N!==null;){if(o=N,o.flags&2048)switch(o.tag){case 0:case 11:case 15:Pc(9,o,o.return)}var v=o.sibling;if(v!==null){v.return=o.return,N=v;break b}N=o.return}}var y=e.current;for(N=y;N!==null;){s=N;var b=s.child;if(s.subtreeFlags&2064&&b!==null)b.return=s,N=b;else b:for(s=y;N!==null;){if(c=N,c.flags&2048)try{switch(c.tag){case 0:case 11:case 15:Fc(9,c)}}catch(e){ru(c,c.return,e)}if(c===s){N=null;break b}var x=c.sibling;if(x!==null){x.return=c.return,N=x;break b}N=c.return}}if(al=a,ya(),jt&&typeof jt.onPostCommitFiberRoot==`function`)try{jt.onPostCommitFiberRoot(At,e)}catch{}i=!0}return i}finally{Yt=n,il.transition=t}}return!1}function nu(e,t,n){t=Bs(n,t),t=Ws(e,t,1),e=_o(e,t,1),t=jl(),e!==null&&(Kt(e,1,t),Pl(e,t))}function ru(e,t,n){if(e.tag===3)nu(e,e,n);else for(;t!==null;){if(t.tag===3){nu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Cl===null||!Cl.has(r))){e=Bs(n,e),e=Gs(t,e,1),t=_o(t,e,1),e=jl(),t!==null&&(Kt(t,1,e),Pl(t,e));break}}t=t.return}}function iu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=jl(),e.pingedLanes|=e.suspendedLanes&n,ol===e&&(cl&n)===n&&(dl===4||dl===3&&(cl&130023424)===cl&&500>Ct()-vl?Wl(e,0):hl|=n),Pl(e,t)}function au(e,t){t===0&&(e.mode&1?(t=Rt,Rt<<=1,!(Rt&130023424)&&(Rt=4194304)):t=1);var n=jl();e=fo(e,t),e!==null&&(Kt(e,t,n),Pl(e,n))}function ou(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),au(e,n)}function su(e,t){var n=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(r(314))}i!==null&&i.delete(t),au(e,n)}var cu=function(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps||aa.current)Xs=!0;else{if((e.lanes&n)===0&&!(t.flags&128))return Xs=!1,yc(e,t,n);Xs=!!(e.flags&131072)}}else Xs=!1,Fa&&t.flags&1048576&&Aa(t,Ca,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;_c(e,t),e=t.pendingProps;var a=sa(t,ia.current);oo(t,n),a=qo(null,t,i,e,a,n);var o=Jo();return t.flags|=1,typeof a==`object`&&a&&typeof a.render==`function`&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ca(i)?(o=!0,fa(t)):o=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,mo(t),a.updater=Fs,t.stateNode=a,a._reactInternals=t,zs(t,i,e,n),t=ac(null,t,i,!0,o,n)):(t.tag=0,Fa&&o&&ja(t),Zs(null,t,a,n),t=t.child),t;case 16:i=t.elementType;a:{switch(_c(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=pu(i),e=Ns(i,e),a){case 0:t=rc(null,t,i,e,n);break a;case 1:t=ic(null,t,i,e,n);break a;case 11:t=Qs(null,t,i,e,n);break a;case 14:t=$s(null,t,i,Ns(i.type,e),n);break a}throw Error(r(306,i,``))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ns(i,a),rc(e,t,i,a,n);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ns(i,a),ic(e,t,i,a,n);case 3:a:{if(oc(t),e===null)throw Error(r(387));i=t.pendingProps,o=t.memoizedState,a=o.element,ho(e,t),bo(t,i,null,n);var s=t.memoizedState;if(i=s.element,o.isDehydrated){if(o={element:i,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){a=Bs(Error(r(423)),t),t=sc(e,t,i,n,a);break a}if(i!==a){a=Bs(Error(r(424)),t),t=sc(e,t,i,n,a);break a}for(Pa=zi(t.stateNode.containerInfo.firstChild),Na=t,Fa=!0,Ia=null,n=Qa(t,null,i,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Wa(),i===a){t=vc(e,t,n);break a}Zs(e,t,i,n)}t=t.child}return t;case 5:return ko(t),e===null&&Ba(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,s=a.children,Mi(i,a)?s=null:o!==null&&Mi(i,o)&&(t.flags|=32),nc(e,t),Zs(e,t,s,n),t.child;case 6:return e===null&&Ba(t),null;case 13:return uc(e,t,n);case 4:return Do(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Za(t,null,i,n):Zs(e,t,i,n),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ns(i,a),Qs(e,t,i,a,n);case 7:return Zs(e,t,t.pendingProps,n),t.child;case 8:return Zs(e,t,t.pendingProps.children,n),t.child;case 12:return Zs(e,t,t.pendingProps.children,n),t.child;case 10:a:{if(i=t.type._context,a=t.pendingProps,o=t.memoizedProps,s=a.value,na($a,i._currentValue),i._currentValue=s,o!==null){if(Lr(o.value,s)){if(o.children===a.children&&!aa.current){t=vc(e,t,n);break a}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var c=o.dependencies;if(c!==null){s=o.child;for(var l=c.firstContext;l!==null;){if(l.context===i){if(o.tag===1){l=go(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),ao(o.return,n,t),c.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(r(341));s.lanes|=n,c=s.alternate,c!==null&&(c.lanes|=n),ao(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}}Zs(e,t,a.children,n),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,oo(t,n),a=so(a),i=i(a),t.flags|=1,Zs(e,t,i,n),t.child;case 14:return i=t.type,a=Ns(i,t.pendingProps),a=Ns(i.type,a),$s(e,t,i,a,n);case 15:return ec(e,t,t.type,t.pendingProps,n);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Ns(i,a),_c(e,t),t.tag=1,ca(i)?(e=!0,fa(t)):e=!1,oo(t,n),Ls(t,i,a),zs(t,i,a,n),ac(null,t,i,!0,e,n);case 19:return gc(e,t,n);case 22:return tc(e,t,n)}throw Error(r(156,t.tag))};function lu(e,t){return yt(e,t)}function uu(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.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 du(e,t,n,r){return new uu(e,t,n,r)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pu(e){if(typeof e==`function`)return+!!fu(e);if(e!=null){if(e=e.$$typeof,e===ie)return 11;if(e===oe)return 14}return 2}function mu(e,t){var n=e.alternate;return n===null?(n=du(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&14680064,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}function hu(e,t,n,i,a,o){var s=2;if(i=e,typeof e==`function`)fu(e)&&(s=1);else if(typeof e==`string`)s=5;else a:switch(e){case w:return gu(n.children,a,o,t);case ee:s=8,a|=8;break;case te:return e=du(12,n,t,a|2),e.elementType=te,e.lanes=o,e;case T:return e=du(13,n,t,a),e.elementType=T,e.lanes=o,e;case ae:return e=du(19,n,t,a),e.elementType=ae,e.lanes=o,e;case ce:return _u(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case ne:s=10;break a;case re:s=9;break a;case ie:s=11;break a;case oe:s=14;break a;case se:s=16,i=null;break a}throw Error(r(130,e==null?e:typeof e,``))}return t=du(s,n,t,a),t.elementType=e,t.type=i,t.lanes=o,t}function gu(e,t,n,r){return e=du(7,e,r,t),e.lanes=n,e}function _u(e,t,n,r){return e=du(22,e,r,t),e.elementType=ce,e.lanes=n,e.stateNode={isHidden:!1},e}function vu(e,t,n){return e=du(6,e,null,t),e.lanes=n,e}function yu(e,t,n){return t=du(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function bu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Gt(0),this.expirationTimes=Gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function xu(e,t,n,r,i,a,o,s,c){return e=new bu(e,t,n,s,c),t===1?(t=1,!0===a&&(t|=8)):t=0,a=du(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},mo(a),e}function Su(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:C,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}function Cu(e){if(!e)return ra;e=e._reactInternals;a:{if(pt(e)!==e||e.tag!==1)throw Error(r(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break a;case 1:if(ca(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break a}}t=t.return}while(t!==null);throw Error(r(171))}if(e.tag===1){var n=e.type;if(ca(n))return da(e,n,t)}return t}function wu(e,t,n,r,i,a,o,s,c){return e=xu(n,r,!0,e,i,a,o,s,c),e.context=Cu(null),n=e.current,r=jl(),i=Ml(n),a=go(r,i),a.callback=t??null,_o(n,a,i),e.current.lanes=i,Kt(e,i,r),Pl(e,r),e}function Tu(e,t,n,r){var i=t.current,a=jl(),o=Ml(i);return n=Cu(n),t.context===null?t.context=n:t.pendingContext=n,t=go(a,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=_o(i,t,o),e!==null&&(Nl(e,i,o,a),vo(e,i,o)),o}function Eu(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function Du(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ou(e,t){Du(e,t),(e=e.alternate)&&Du(e,t)}function ku(){return null}var Au=typeof reportError==`function`?reportError:function(e){console.error(e)};function ju(e){this._internalRoot=e}Mu.prototype.render=ju.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));Tu(e,t,null,null)},Mu.prototype.unmount=ju.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hl(function(){Tu(null,e,null,null)}),t[M]=null}};function Mu(e){this._internalRoot=e}Mu.prototype.unstable_scheduleHydration=function(e){if(e){var t=en();e={blockedOn:null,target:e,priority:t};for(var n=0;n<un.length&&t!==0&&t<un[n].priority;n++);un.splice(n,0,e),n===0&&hn(e)}};function Nu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==` react-mount-point-unstable `))}function Fu(){}function Iu(e,t,n,r,i){if(i){if(typeof r==`function`){var a=r;r=function(){var e=Eu(o);a.call(e)}}var o=wu(t,r,e,0,null,!1,!1,``,Fu);return e._reactRootContainer=o,e[M]=o.current,vi(e.nodeType===8?e.parentNode:e),Hl(),o}for(;i=e.lastChild;)e.removeChild(i);if(typeof r==`function`){var s=r;r=function(){var e=Eu(c);s.call(e)}}var c=xu(e,0,!1,null,null,!1,!1,``,Fu);return e._reactRootContainer=c,e[M]=c.current,vi(e.nodeType===8?e.parentNode:e),Hl(function(){Tu(t,c,n,r)}),c}function Lu(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if(typeof i==`function`){var s=i;i=function(){var e=Eu(o);s.call(e)}}Tu(t,o,e,i)}else o=Iu(n,t,e,i,r);return Eu(o)}Zt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=zt(t.pendingLanes);n!==0&&(Jt(t,n|1),Pl(t,Ct()),!(al&6)&&(yl=Ct()+500,ya()))}break;case 13:Hl(function(){var t=fo(e,1);t!==null&&Nl(t,e,1,jl())}),Ou(e,1)}},Qt=function(e){if(e.tag===13){var t=fo(e,134217728);t!==null&&Nl(t,e,134217728,jl()),Ou(e,134217728)}},$t=function(e){if(e.tag===13){var t=Ml(e),n=fo(e,t);n!==null&&Nl(n,e,t,jl()),Ou(e,t)}},en=function(){return Yt},tn=function(e,t){var n=Yt;try{return Yt=e,t()}finally{Yt=n}},Ke=function(e,t,n){switch(t){case`input`:if(Ee(e,n),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name=`+JSON.stringify(``+t)+`][type="radio"]`),t=0;t<n.length;t++){var i=n[t];if(i!==e&&i.form===e.form){var a=Zi(i);if(!a)throw Error(r(90));xe(i),Ee(i,a)}}}break;case`textarea`:je(e,n);break;case`select`:t=n.value,t!=null&&k(e,!!n.multiple,t,!1)}},Qe=Vl,$e=Hl;var Ru={usingClientEntryPoint:!1,Events:[Yi,Xi,Zi,Xe,Ze,Vl]},zu={findFiberByHostInstance:Ji,bundleType:0,version:`18.3.1`,rendererPackageName:`react-dom`},Bu={bundleType:zu.bundleType,version:zu.version,rendererPackageName:zu.rendererPackageName,rendererConfig:zu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=_t(e),e===null?null:e.stateNode},findFiberByHostInstance:zu.findFiberByHostInstance||ku,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:`18.3.1-next-f1338f8080-20240426`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Vu.isDisabled&&Vu.supportsFiber)try{At=Vu.inject(Bu),jt=Vu}catch{}}e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ru,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Nu(t))throw Error(r(200));return Su(e,t,null,n)},e.createRoot=function(e,t){if(!Nu(e))throw Error(r(299));var n=!1,i=``,a=Au;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=xu(e,1,!1,null,null,n,!1,i,a),e[M]=t.current,vi(e.nodeType===8?e.parentNode:e),new ju(t)},e.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(r(188)):(e=Object.keys(e).join(`,`),Error(r(268,e)));return e=_t(t),e=e===null?null:e.stateNode,e},e.flushSync=function(e){return Hl(e)},e.hydrate=function(e,t,n){if(!Pu(t))throw Error(r(200));return Lu(null,e,t,!0,n)},e.hydrateRoot=function(e,t,n){if(!Nu(e))throw Error(r(405));var i=n!=null&&n.hydratedSources||null,a=!1,o=``,s=Au;if(n!=null&&(!0===n.unstable_strictMode&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onRecoverableError!==void 0&&(s=n.onRecoverableError)),t=wu(t,null,e,1,n??null,a,!1,o,s),e[M]=t.current,vi(e),i)for(e=0;e<i.length;e++)n=i[e],a=n._getVersion,a=a(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,a]:t.mutableSourceEagerHydrationData.push(n,a);return new Mu(t)},e.render=function(e,t,n){if(!Pu(t))throw Error(r(200));return Lu(null,e,t,!1,n)},e.unmountComponentAtNode=function(e){if(!Pu(e))throw Error(r(40));return e._reactRootContainer?(Hl(function(){Lu(null,null,e,!1,function(){e._reactRootContainer=null,e[M]=null})}),!0):!1},e.unstable_batchedUpdates=Vl,e.unstable_renderSubtreeIntoContainer=function(e,t,n,i){if(!Pu(n))throw Error(r(200));if(e==null||e._reactInternals===void 0)throw Error(r(38));return Lu(e,t,n,!1,i)},e.version=`18.3.1-next-f1338f8080-20240426`})),Ev=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Tv()})),Dv=e=>crypto.getRandomValues(new Uint8Array(e)),Ov=(e,t,n)=>{let r=256-256%e.length;if(r===256){let r=e.length-1;return(i=t)=>{if(!i)return``;let a=``;for(;;){let t=n(i),o=i;for(;o--;)if(a+=e[t[o]&r],a.length>=i)return a}}}let i=Math.ceil(409.6*t/r);return(a=t)=>{if(!a)return``;let o=``;for(;;){let t=n(i),s=i;for(;s--;)if(t[s]<r&&(o+=e[t[s]%e.length],o.length>=a))return o}}},kv=(e,t=21)=>Ov(e,t|0,Dv),Av=`abcdefghijklmnopqrstuvwxyz0123456789`;function jv(e=21){if(e===1/0||e===-1/0)throw RangeError(`nanoid length must be finite`);return kv(Av,e)()}var Mv=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Nv=/^[a-z][a-z0-9]*(?:_[a-z][a-z0-9]*)*$/,Pv=k().min(1).max(64).regex(Mv),Fv=k().min(1).max(64).regex(Mv),Iv=k().min(1).max(32).regex(Nv),Lv=E({prefix:Iv}),Rv=E({family:Pv,version:gt(1),kinds:Ht(Fv,Lv)}).superRefine((e,t)=>{let n=Object.entries(e.kinds);if(n.length<1||n.length>64){t.addIssue({code:`custom`,message:`Identifier families must declare between one and 64 kinds`});return}let r=new Set;for(let[,e]of n){if(r.has(e.prefix)){t.addIssue({code:`custom`,message:`Identifier kind prefixes must be distinct`});return}r.add(e.prefix)}}),zv=k(),Bv=/^[a-z0-9]+$/,Vv=new TextEncoder;function Hv(e){return e===32||e>=9&&e<=13}function Uv(e){let t=0,n=e.length;for(;t<n&&Hv(e.charCodeAt(t));)t+=1;for(;n>t&&Hv(e.charCodeAt(n-1));)--n;return e.slice(t,n).replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Wv(e){let t=`${e.prefix}_`;function n(e){if(!e.startsWith(t))return!1;let n=e.slice(t.length);return n.length===21&&Bv.test(n)}let r=A(()=>ze(e=>{let t=zv.safeParse(e);return t.success&&n(t.data)}));function i(i){let a,o=i,s=Vv.encode(o).byteLength,c=r.safeParse(o),l=o.startsWith(t)?o.slice(t.length):void 0;if(s<3||s>96)a=`bounds`;else if(l!==void 0&&Array.from(l).length!==21)a=`bounds`;else if(c.success)return{ok:!0,value:c.data};else a=n(Uv(o))?`non_canonical`:`grammar`;return{ok:!1,error:{code:`invalid_id`,family:e.family,kind:e.kind,version:1,reason:a}}}let a=A(()=>zv.transform((e,t)=>{let n=i(e);return n.ok?n.value:(t.addIssue({code:`custom`,message:n.error.reason}),st)}));function o(){let n;try{n=jv(21)}catch{throw e.entropyUnavailable()}return r.parse(`${t}${n}`)}return{family:e.family,kind:e.kind,version:1,generate:o,schema:a,parse:i,is:e=>i(e).ok}}var Gv=Ht(k(),E({family:k(),kind:k(),version:gt(1),generate:v(),schema:wi(Sn),parse:v(),is:v()})),Kv=class extends Error{name=`CairnDefinitionError`;code=`invalid_definition`;constructor(){super(`Cairn identifier family definition is invalid`)}},qv=class extends Error{name=`CairnGenerationError`;code=`entropy_unavailable`;family;kind;version=1;constructor(e){super(`Cairn entropy source is unavailable`),this.family=e.family,this.kind=e.kind}};function Jv(e){let t;try{t=Rv.safeParse(e)}catch{throw new Kv}if(!t.success)throw new Kv;let n=t.data,r={};for(let[t,i]of Object.entries(n.kinds)){let a=i.prefix;r[t]=Wv({family:e.family,kind:t,prefix:a,entropyUnavailable:()=>new qv({family:n.family,kind:t})})}let i=ze(e=>{let t=Gv.safeParse(e);if(!t.success)return!1;let r=Object.entries(t.data);return r.length===Object.keys(n.kinds).length&&r.every(([e,t])=>Object.hasOwn(n.kinds,e)&&t.kind===e&&t.family===n.family)}).safeParse(r);if(!i.success)throw new Kv;return i.data}var Yv=[];for(let e=0;e<256;++e)Yv.push((e+256).toString(16).slice(1));function Xv(e,t=0){return(Yv[e[t+0]]+Yv[e[t+1]]+Yv[e[t+2]]+Yv[e[t+3]]+`-`+Yv[e[t+4]]+Yv[e[t+5]]+`-`+Yv[e[t+6]]+Yv[e[t+7]]+`-`+Yv[e[t+8]]+Yv[e[t+9]]+`-`+Yv[e[t+10]]+Yv[e[t+11]]+Yv[e[t+12]]+Yv[e[t+13]]+Yv[e[t+14]]+Yv[e[t+15]]).toLowerCase()}var Zv,Qv=new Uint8Array(16);function $v(){if(!Zv){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Zv=crypto.getRandomValues.bind(crypto)}return Zv(Qv)}var ey={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function ty(e,t,n){if(ey.randomUUID&&!t&&!e)return ey.randomUUID();e||={};let r=e.random??e.rng?.()??$v();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Xv(r)}var ny=dt({version:`v7`}),ry=k().regex(/^replay_[a-f0-9]{64}$/);ze(e=>ry.safeParse(e).success);var iy=dt({version:`v4`});ze(e=>ny.safeParse(e).success);var ay=ze(e=>iy.safeParse(e).success);function oy(){return ay.parse(ty())}var sy=e(Ev(),1),cy=St([`plain`,`pencil`,`manga`,`riso`,`halftone`,`blueprint`,`crt`,`watercolor`]),ly={ink:`var(--sprite-ink, var(--color-base-content, #1c1c1a))`,paper:`var(--sprite-paper, var(--color-base-100, #fbfaf6))`,accent:`var(--sprite-accent, var(--color-accent, #d20f39))`,risoFirst:`var(--sprite-riso-first, var(--color-info, #1e66f5))`,risoSecond:`var(--sprite-riso-second, var(--color-accent, #ea76cb))`,blueprint:`var(--sprite-blueprint, color-mix(in oklab, var(--color-info, #1e66f5) 55%, #0b2350))`,blueprintLine:`var(--sprite-blueprint-line, color-mix(in oklab, var(--color-info-content, #ffffff) 25%, #ffffff))`,screen:`var(--sprite-screen, color-mix(in oklab, var(--color-base-content, #111111) 12%, #050805))`,phosphor:`var(--sprite-phosphor, var(--color-success, #40a02b))`},J=(e,t={},...n)=>({tag:e,attributes:t,children:n}),uy=(e,t,n=1)=>J(`feFlood`,{style:`flood-color: ${e}`,"flood-opacity":n,result:t}),dy=(e,t,n)=>[J(`feImage`,{href:`data:image/svg+xml,${encodeURIComponent(`<svg xmlns='http://www.w3.org/2000/svg' width='${String(t)}' height='${String(t)}'>${e}</svg>`)}`,width:t,height:t,result:`${n}Cell`}),J(`feTile`,{in:`${n}Cell`,result:n})],fy=(e,t,n)=>J(`feColorMatrix`,{in:t,type:`matrix`,values:`0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ${e}`,result:n}),py=(e,t)=>fy(`-0.333 -0.333 -0.333 1 0`,e,t),my=(e,t,n,r=1.1)=>[J(`feConvolveMatrix`,{in:e,order:3,kernelMatrix:`0 1 0 1 -4 1 0 1 0`,result:`${t}In`}),J(`feConvolveMatrix`,{in:e,order:3,kernelMatrix:`0 -1 0 -1 4 -1 0 -1 0`,result:`${t}Out`}),J(`feComposite`,{in:`${t}In`,in2:`${t}Out`,operator:`arithmetic`,k2:1,k3:1,result:`${t}Edges`}),fy(`${String(n)} ${String(n)} ${String(n)} ${String(r)} 0`,`${t}Edges`,t)],hy=(e,t,n,r)=>[J(`feConvolveMatrix`,{in:e,order:3,kernelMatrix:`0 1 0 1 -4 1 0 1 0`,preserveAlpha:`true`,result:`${t}In`}),J(`feConvolveMatrix`,{in:e,order:3,kernelMatrix:`0 -1 0 -1 4 -1 0 -1 0`,preserveAlpha:`true`,result:`${t}Out`}),J(`feComposite`,{in:`${t}In`,in2:`${t}Out`,operator:`arithmetic`,k2:1,k3:1,result:`${t}Edges`}),fy(`${String(n)} ${String(n)} ${String(n)} 0 -0.15`,`${t}Edges`,`${t}Inner`),J(`feMorphology`,{in:e,operator:`dilate`,radius:r,result:`${t}Grown`}),J(`feComposite`,{in:`${t}Grown`,in2:e,operator:`out`,result:`${t}Ring`}),fy(`0 0 0 1 0`,`${t}Ring`,`${t}Outline`),_y(t,`${t}Inner`,`${t}Outline`)],gy=(e,t,n)=>J(`feComponentTransfer`,{in:e,result:n},J(`feFuncA`,{type:`discrete`,tableValues:t})),_y=(e,...t)=>J(`feMerge`,{result:e},...t.map(e=>J(`feMergeNode`,{in:e}))),vy=(e,t,n,r=1)=>[uy(e,`${n}Flood`,r),J(`feComposite`,{in:`${n}Flood`,in2:t,operator:`in`,result:n})],yy={x:`0%`,y:`0%`,width:`100%`,height:`100%`},by={x:`-8%`,y:`-8%`,width:`116%`,height:`116%`},xy={value:1.6,line:6,outline:2.4,midHatch:[3.2,-.05],darkHatch:[3.4,-.4],tooth:`0 0 0 -0.7 1.45`,opacity:1},Sy=e=>({region:by,primitives:[J(`feComponentTransfer`,{in:`SourceGraphic`,result:`valued`},...[`feFuncR`,`feFuncG`,`feFuncB`].map(t=>J(t,{type:`gamma`,amplitude:1,exponent:e.value,offset:0}))),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.05,numOctaves:2,seed:1,result:`wobble`,"data-sprite-boil":`wobble`}),J(`feDisplacementMap`,{in:`valued`,in2:`wobble`,scale:2.6,xChannelSelector:`R`,yChannelSelector:`G`,result:`drawn`}),...my(`drawn`,`line`,e.line,e.outline),py(`drawn`,`dark`),...dy(`<path d='M-1 1l2-2M0 6l6-6M5 7l2-2' stroke='black' stroke-width='1.1'/>`,6,`hatch45`),J(`feOffset`,{in:`hatch45`,dx:0,dy:0,result:`hatchOffset`,"data-sprite-boil":`hatch`}),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.07,numOctaves:2,seed:5,result:`strokeBend`}),J(`feDisplacementMap`,{in:`hatchOffset`,in2:`strokeBend`,scale:4,xChannelSelector:`R`,yChannelSelector:`B`,result:`hatchA`}),...dy(`<path d='M-1 4l2 2M0 0l5 5M4 -1l2 2' stroke='black' stroke-width='0.9'/>`,5,`hatch135`),J(`feDisplacementMap`,{in:`hatch135`,in2:`strokeBend`,scale:3,xChannelSelector:`G`,yChannelSelector:`R`,result:`hatchB`}),J(`feComposite`,{in:`dark`,in2:`hatchA`,operator:`arithmetic`,k1:e.midHatch[0],k4:e.midHatch[1],result:`shadeA`}),J(`feComposite`,{in:`dark`,in2:`hatchB`,operator:`arithmetic`,k1:e.darkHatch[0],k4:e.darkHatch[1],result:`shadeB`}),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.9,numOctaves:1,seed:3,result:`tooth`}),fy(e.tooth,`tooth`,`toothMask`),fy(`0 0 0 6 -4.6`,`dark`,`solid`),_y(`graphiteRaw`,`solid`,`shadeA`,`shadeB`,`line`),J(`feComposite`,{in:`graphiteRaw`,in2:`toothMask`,operator:`in`,result:`graphite`}),...vy(ly.ink,`graphite`,`pencil`,e.opacity)],boil:{intervalMs:160,tracks:[{name:`wobble`,attribute:`seed`,frames:[1,2,3]},{name:`hatch`,attribute:`dx`,frames:[0,1,2]}]}}),Cy={region:by,primitives:[J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.04,numOctaves:2,seed:2,result:`brush`,"data-sprite-boil":`brush`}),J(`feDisplacementMap`,{in:`SourceGraphic`,in2:`brush`,scale:2,xChannelSelector:`R`,yChannelSelector:`G`,result:`drawn`}),...vy(ly.paper,`SourceAlpha`,`paperFill`),py(`drawn`,`dark`),...dy(`<circle cx='2.5' cy='2.5' r='1.15' fill='black'/>`,5,`dots`),gy(`dark`,`0 1 1 0`,`midTone`),J(`feComposite`,{in:`dots`,in2:`midTone`,operator:`in`,result:`tone`}),gy(`dark`,`0 0 0 1`,`solid`),fy(`3 -3 0 0 -0.35`,`drawn`,`satRG`),fy(`-3 3 0 0 -0.35`,`drawn`,`satGR`),fy(`0 3 -3 0 -0.35`,`drawn`,`satGB`),fy(`0 -3 3 0 -0.35`,`drawn`,`satBG`),_y(`saturation`,`satRG`,`satGR`,`satGB`,`satBG`),gy(`saturation`,`0 1`,`accentMask`),...vy(ly.accent,`accentMask`,`accentFill`),...hy(`drawn`,`edge`,2,2.2),J(`feMorphology`,{in:`edge`,operator:`dilate`,radius:.25,result:`stroke`}),_y(`inkRaw`,`tone`,`solid`,`stroke`),...vy(ly.ink,`inkRaw`,`ink`),_y(`manga`,`paperFill`,`accentFill`,`ink`)],boil:{intervalMs:180,tracks:[{name:`brush`,attribute:`seed`,frames:[2,4,6]}]}},wy={region:by,primitives:[fy(`-0.55 -0.55 -0.55 1.65 0`,`SourceGraphic`,`dark`),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.85,numOctaves:1,seed:7,result:`grain`}),fy(`0 0 0 -0.9 1.35`,`grain`,`grainMask`),J(`feComposite`,{in:`dark`,in2:`grainMask`,operator:`in`,result:`firstMask`}),...vy(ly.risoFirst,`firstMask`,`firstInk`,.92),fy(`0 -1.9 0 1.9 0`,`SourceGraphic`,`secondMask`),...vy(ly.risoSecond,`secondMask`,`secondInk`,.9),J(`feOffset`,{in:`firstInk`,dx:-1.5,dy:1,result:`firstPlate`,"data-sprite-boil":`register`}),J(`feOffset`,{in:`secondInk`,dx:1.5,dy:-.5,result:`secondPlate`}),J(`feBlend`,{in:`firstPlate`,in2:`secondPlate`,mode:`multiply`})],boil:{intervalMs:240,tracks:[{name:`register`,attribute:`dx`,frames:[-1.5,-1,-2]}]}},Ty={region:by,primitives:[fy(`-0.5 -0.5 -0.5 1.65 0`,`SourceGraphic`,`value`),fy(`0 0 0 0.16 0`,`SourceGraphic`,`floor`),_y(`dark`,`floor`,`value`),...dy(`<defs><radialGradient id='d'><stop offset='0' stop-opacity='1'/><stop offset='1' stop-opacity='0'/></radialGradient></defs><rect width='6' height='6' fill='url(#d)'/>`,6,`screen`),J(`feComposite`,{in:`dark`,in2:`screen`,operator:`arithmetic`,k2:1,k3:1,k4:-.92,result:`dotField`}),J(`feComponentTransfer`,{in:`dotField`,result:`dotsRaw`},J(`feFuncA`,{type:`linear`,slope:12,intercept:0})),J(`feComposite`,{in:`dotsRaw`,in2:`SourceAlpha`,operator:`in`,result:`dots`}),...vy(ly.ink,`dots`,`halftone`)]},Ey={region:yy,primitives:[uy(ly.blueprint,`ground`),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.05,numOctaves:1,seed:4,result:`hand`,"data-sprite-boil":`hand`}),J(`feDisplacementMap`,{in:`SourceGraphic`,in2:`hand`,scale:1.6,xChannelSelector:`R`,yChannelSelector:`G`,result:`drawn`}),...dy(`<path d='M0 0.5h16M0.5 0v16' stroke='black' stroke-width='1' stroke-opacity='0.22'/>`,16,`grid`),...vy(ly.blueprintLine,`grid`,`gridLines`),...vy(ly.blueprintLine,`SourceAlpha`,`wash`,.12),...hy(`drawn`,`edge`,3,1.2),J(`feMorphology`,{in:`edge`,operator:`dilate`,radius:.3,result:`stroke`}),...vy(ly.blueprintLine,`stroke`,`lines`),_y(`blueprint`,`ground`,`gridLines`,`wash`,`lines`)],boil:{intervalMs:200,tracks:[{name:`hand`,attribute:`seed`,frames:[4,5,6]}]}},Dy={region:yy,primitives:[uy(ly.screen,`ground`),J(`feColorMatrix`,{in:`SourceGraphic`,type:`luminanceToAlpha`,result:`lumRaw`}),J(`feComposite`,{in:`lumRaw`,in2:`SourceAlpha`,operator:`in`,result:`lum`}),J(`feComponentTransfer`,{in:`lum`,result:`beam`},J(`feFuncA`,{type:`linear`,slope:1.5,intercept:-.35})),J(`feComposite`,{in:`beam`,in2:`SourceAlpha`,operator:`in`,result:`trace`}),...vy(ly.phosphor,`trace`,`glow`),J(`feGaussianBlur`,{in:`glow`,stdDeviation:2.5,result:`bloom`}),...dy(`<rect y='2' width='3' height='1' fill='black'/>`,3,`scan`),J(`feOffset`,{in:`scan`,dx:0,dy:0,result:`scanRoll`,"data-sprite-boil":`roll`}),...vy(ly.screen,`scanRoll`,`scanlines`,.6),_y(`crt`,`ground`,`bloom`,`glow`,`scanlines`)],boil:{intervalMs:120,tracks:[{name:`roll`,attribute:`dy`,frames:[0,1,2]}]}},Oy={region:by,primitives:[J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.03,numOctaves:3,seed:9,result:`flow`}),J(`feDisplacementMap`,{in:`SourceGraphic`,in2:`flow`,scale:7,xChannelSelector:`R`,yChannelSelector:`G`,result:`bled`}),J(`feGaussianBlur`,{in:`bled`,stdDeviation:1.4,result:`wash`}),J(`feComponentTransfer`,{in:`wash`,result:`thin`},J(`feFuncR`,{type:`linear`,slope:.78,intercept:.2}),J(`feFuncG`,{type:`linear`,slope:.78,intercept:.2}),J(`feFuncB`,{type:`linear`,slope:.78,intercept:.2}),J(`feFuncA`,{type:`linear`,slope:.9,intercept:0})),J(`feGaussianBlur`,{in:`wash`,stdDeviation:3,result:`spread`}),J(`feComposite`,{in:`wash`,in2:`spread`,operator:`arithmetic`,k2:1.6,k3:-1.4,result:`rimMask`}),J(`feComponentTransfer`,{in:`wash`,result:`deep`},J(`feFuncR`,{type:`linear`,slope:.6,intercept:0}),J(`feFuncG`,{type:`linear`,slope:.6,intercept:0}),J(`feFuncB`,{type:`linear`,slope:.6,intercept:0})),J(`feComposite`,{in:`deep`,in2:`rimMask`,operator:`in`,result:`rim`}),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.7,numOctaves:2,seed:11,result:`tooth`}),fy(`0 0 0 -0.8 1.5`,`tooth`,`toothMask`),py(`SourceGraphic`,`dark`),fy(`0 0 0 5 -3.8`,`dark`,`keyMask`),...vy(ly.ink,`keyMask`,`key`,.9),_y(`paint`,`thin`,`rim`,`key`),J(`feComposite`,{in:`paint`,in2:`toothMask`,operator:`in`})]},ky=Sy(xy),Ay={manga:Cy,riso:wy,halftone:Ty,blueprint:Ey,crt:Dy,watercolor:Oy},jy=e=>e===`pencil`?ky:Ay[e],My=`http://www.w3.org/2000/svg`,Ny=(e,t)=>{let n=e.createElementNS(My,t.tag);for(let[e,r]of Object.entries(t.attributes))n.setAttribute(e,String(r));for(let r of t.children)n.append(Ny(e,r));return n};function Py(e){let t=`sprite-style-${oy()}`,n=e.ownerDocument,r=n.defaultView,i=`plain`,a,o,s=!1,c=!0,l,u=0,d=()=>{l!==void 0&&clearInterval(l),l=void 0},f=()=>{if(d(),i===`plain`||!o||s||!c||n.hidden)return;let e=jy(i).boil;if(!e)return;let t=o;l=setInterval(()=>{if(!n.hidden){u+=1;for(let n of e.tracks){let e=n.frames[u%n.frames.length];t.querySelector(`[data-sprite-boil="${n.name}"]`)?.setAttribute(n.attribute,String(e))}}},e.intervalMs)},p=r?.IntersectionObserver,m=p?new p(e=>{c=e.some(e=>e.isIntersecting),f()}):void 0;m?.observe(e);let h=()=>{d(),o?.remove(),o=void 0,a&&(a.style.filter=``)};return{set(r,s){if(r===i&&s===a||(h(),i=r,a=s,r===`plain`))return;let c=jy(r),l=`${t}-${r}`,u=n.createElementNS(My,`svg`);u.setAttribute(`aria-hidden`,`true`),u.setAttribute(`focusable`,`false`),u.setAttribute(`width`,`0`),u.setAttribute(`height`,`0`),u.style.cssText=`position:absolute;width:0;height:0;overflow:hidden`,u.append(Ny(n,J(`filter`,{id:l,...c.region,"color-interpolation-filters":`sRGB`},...c.primitives))),e.append(u),o=u,s.style.filter=`url(#${l})`,f()},still(e){e!==s&&(s=e,f())},dispose(){h(),a=void 0,m?.disconnect()}}}var Fy=[`mushroom`,`cat`,`burger`];St([`shift`,`keep`]);var Iy=k().regex(/^#[0-9a-f]{6}$/i),Ly=en([Iy,Lt(),cr()]),Ry=16,zy=pe({v:gt(1),character:St(Fy),appearance:Ht(k().min(1),Ly).refine(e=>Object.keys(e).length<=Ry,{message:`Avatar appearance cannot exceed ${String(Ry)} keys`}),expression:k().min(1),renderStyle:cy});function By(e,t,n){let r=t/100,i=n/100,a=r*Math.min(i,1-i),o=t=>{let n=(t+e/30)%12,r=i-a*Math.max(-1,Math.min(n-3,9-n,1));return Math.round(255*r).toString(16).padStart(2,`0`)};return`#${o(0)}${o(8)}${o(4)}`}function Vy(e){let t=2166136261;for(let n of e)t^=n.codePointAt(0)??0,t=Math.imul(t,16777619)>>>0;return t}function Hy(e){let t=Vy(e)%360;return{cap:By(t,68,72),capSpot:By(t,70,92)}}function Uy(e){return{v:1,character:`mushroom`,appearance:Hy(e),expression:`normal`,renderStyle:`plain`}}var Wy=Symbol.for(`effect/MutableList/Empty`),Gy=()=>({head:void 0,tail:void 0,length:0}),Ky=e=>{let t=e.head;t.offset>=1024&&t===e.tail&&t.mutable&&(t.array.length-t.offset)*8<=t.offset&&(e.head=e.tail={array:t.array.slice(t.offset),mutable:!0,offset:0,next:void 0})},qy=()=>({array:[],mutable:!0,offset:0,next:void 0}),Jy=(e,t)=>{e.tail?e.tail.mutable||(e.tail.next=qy(),e.tail=e.tail.next):e.head=e.tail=qy(),e.tail.array.push(t),e.length++},Yy=e=>{e.head=e.tail=void 0,e.length=0},Xy=(e,t)=>{if(t=Co(t),t<=0||!e.head)return[];if(t=Math.min(t,e.length),t===e.length&&e.head?.offset===0&&!e.head.next){let t=e.head.array;return Yy(e),t}let n=Array(t),r=0,i=e.head;for(;i;){for(;i.offset<i.array.length;)if(n[r++]=i.array[i.offset],i.mutable&&(i.array[i.offset]=void 0),i.offset++,r===t)return e.head=i.offset===i.array.length&&i.next?i.next:i,e.length-=t,e.length===0?Yy(e):Ky(e),n;i=i.next}return Yy(e),n},Zy=e=>{if(!e.head)return Wy;let t=e.head.array[e.head.offset];return e.head.mutable&&(e.head.array[e.head.offset]=void 0),e.head.offset++,e.length--,e.head.offset===e.head.array.length?e.head.next?e.head=e.head.next:Yy(e):Ky(e),t},Qy=`~effect/Queue`,$y=`~effect/Queue/Enqueue`,eb=`~effect/Queue/Dequeue`,tb={_A:Mr,_E:Mr},nb={[Qy]:tb,[$y]:tb,[eb]:tb,...pt,toJSON(){return{_id:`effect/Queue`,state:this.state._tag,size:_b(this)}}},rb=e=>Er(t=>{let n=Object.create(nb);return n.dispatcher=t.currentDispatcher,n.capacity=e?.capacity??1/0,n.strategy=e?.strategy??`suspend`,n.messages=Gy(),n.scheduleRunning=!1,n.state={_tag:`Open`,takers:new Set,offers:new Set,awaiters:new Set},Ae(n)}),ib=e=>rb({capacity:e}),ab=In(2,(e,t)=>Ee(()=>ob(e,t)?yb:e.state._tag===`Open`&&e.strategy===`suspend`?Ob(e,t):vb)),ob=(e,t)=>e.state._tag===`Open`?e.messages.length>=e.capacity?e.strategy===`sliding`?(Zy(e.messages),Jy(e.messages,t),!0):e.capacity<=0&&e.state.takers.size>0&&(Jy(e.messages,t),Sb(e),!0):(Jy(e.messages,t),Cb(e),!0):!1,sb=In(2,(e,t)=>cb(e,Nr(t))),cb=In(2,(e,t)=>nn(()=>lb(e,t))),lb=(e,t)=>{if(e.state._tag!==`Open`)return!1;let n=On(t),r=y(n,bb);return e.state.offers.size===0&&e.messages.length===0?(Nb(e,r),!0):(e.state={...e.state,_tag:`Closing`,exit:r},Cb(e),!0)},ub=e=>lb(e,Nr(Zt())),db=e=>nn(()=>fb(e)),fb=e=>{if(e.state._tag===`Done`)return!1;Yy(e.messages);let t=e.state.offers;Nb(e,e.state._tag===`Open`?xb:e.state.exit);for(let e of t)Ab(e);return!0},pb=e=>mb(e,1,1/0),mb=In(3,(e,t,n)=>(t=Co(t),n=Co(n),Tb(()=>wb(e,t,n)??kn(Db(e,()=>Eb(e,t)),mb(e,t,n))))),hb=e=>Tb(()=>gb(e)??kn(Db(e,()=>Eb(e,1)),hb(e))),gb=e=>{if(e.state._tag===`Done`)return e.state.exit;if(e.messages.length>0){let t=Zy(e.messages);return Mb(e),br(t)}if(e.capacity<=0&&e.state.offers.size>0){let t=jb(e.state.offers);return Mb(e),br(t)}},_b=e=>e.state._tag===`Done`?0:e.messages.length,vb=br(!1),yb=br(!0),bb=ai(Zt()),xb=Ii(),Sb=e=>{if(e.state._tag!==`Done`&&e.state.takers.size!==0){for(let t of e.state.takers)if(t.ready()&&(e.state.takers.delete(t),t.resume(wt),e.messages.length===0))break}},Cb=e=>{e.scheduleRunning||e.state._tag===`Done`||e.state.takers.size===0||(e.scheduleRunning=!0,e.dispatcher.scheduleTask(()=>{e.scheduleRunning=!1,Sb(e)},0))},wb=(e,t,n)=>{if(e.state._tag===`Done`)return e.state.exit;if(n<=0||t<=0)return br([]);if(!Eb(e,t))return;let r=e.messages.length>0?Xy(e.messages,n):[jb(e.state.offers)];return Mb(e),br(r)},Tb=Hr({op:`QueueTake`,[gn](e){let t=this[Ln]();return jn(t)?t[gn](e):t}}),Eb=(e,t)=>e.messages.length>=(e.state._tag===`Closing`?1:Math.min(t,e.capacity||1))||e.capacity<=0&&e.state._tag!==`Done`&&e.state.offers.size>0,Db=(e,t)=>gi(n=>{if(e.state._tag===`Done`)return n(e.state.exit);if(t())return n(wt);let r={ready:t,resume:n};return e.state.takers.add(r),nn(()=>{e.state._tag!==`Done`&&e.state.takers.delete(r)})}),Ob=(e,t)=>gi(n=>ob(e,t)?n(yb):kb(e,{_tag:`Single`,message:t,resume:n})),kb=(e,t)=>{if(e.state._tag!==`Open`)return Ab(t);let n=e.state.offers;return n.add(t),nn(()=>{e.state._tag!==`Done`&&(n.delete(t),e.state._tag===`Closing`&&n.size===0&&e.messages.length===0&&Nb(e,e.state.exit))})},Ab=e=>e._tag===`Single`?e.resume(vb):e.resume(br(e.remaining.slice(e.offset))),jb=e=>{let t=e.values().next().value;if(t._tag===`Single`)return e.delete(t),t.resume(yb),t.message;let n=t.remaining[t.offset++];return t.offset===t.remaining.length&&(e.delete(t),t.resume(br([]))),n},Mb=e=>{if(e.state._tag===`Done`)return pc(e.state.exit.cause);if(e.state.offers.size===0)return e.state._tag===`Closing`&&e.messages.length===0&&(Nb(e,e.state.exit),pc(e.state.exit.cause));for(let t of e.state.offers){let n=e.capacity-e.messages.length;if(n<=0)break;if(t._tag===`Single`)Jy(e.messages,t.message),e.state.offers.delete(t),t.resume(yb);else{for(;t.offset<t.remaining.length;t.offset++){if(n===0)return!1;Jy(e.messages,t.remaining[t.offset]),n--}e.state.offers.delete(t),t.resume(br([]))}let r=e.state;if(r._tag===`Done`)return pc(r.exit.cause)}return!1},Nb=(e,t)=>{if(e.state._tag===`Done`)return;let n=e.state;e.state={_tag:`Done`,exit:t};for(let e of n.takers)e.resume(t);n.takers.clear();for(let e of n.awaiters)e(t);n.awaiters.clear()},Pb=Ei,Fb=re,Ib=kt,Lb=ur,Rb=w,zb=Se,Bb=le,Vb=e=>new Ub(e),Hb=(e,t,n)=>gi(r=>{if(e.free>=t)return r(n);let i=()=>{e.free<t||(e.waiters.delete(i),r(n))};return e.waiters.add(i),nn(()=>{e.waiters.delete(i)})}),Ub=class{waiters=new Set;taken=0;permits;constructor(e){this.permits=e}get free(){return this.permits-this.taken}take(e){let t=Ee(()=>this.free<e?Hb(this,e,t):(this.taken+=e,Ae(e)));return t}takeIfAvailable(e){return Ee(()=>this.free<e?Ae(!1):(this.taken+=e,Ae(!0)))}releaseUnsafe(e,t){return this.taken-=t,this.waiters.size>0&&e.currentDispatcher.scheduleTask(()=>{for(let e of this.waiters){if(this.free<=0)break;e()}},0),this.free}resize(e){return Er(t=>(this.permits=e,this.free<0||this.releaseUnsafe(t,0),cn))}release(e){return Er(t=>Ae(this.releaseUnsafe(t,e)))}get releaseAll(){return Er(e=>Ae(this.releaseUnsafe(e,this.taken)))}withPermits(e){return t=>Xt(n=>{let r=Ee(()=>{if(this.free<e){let t=Hb(this,e,cn);return l(n(t),()=>r)}return this.taken+=e,Fe(n(t),()=>{this.releaseUnsafe(ur(),e)},!0)});return r})}withPermit=this.withPermits(1);withPermitsIfAvailable(e){return t=>Xt(n=>this.free<e?Xr:(this.taken+=e,Fe(n(xr(t)),()=>{this.releaseUnsafe(ur(),e)},!0)))}},Wb=e=>nn(()=>new Ub(e)),Gb=`~effect/Channel`,Kb=e=>Bi(e,Gb),qb={[Gb]:{_Env:Mr,_InErr:Mr,_InElem:Mr,_OutErr:Mr,_OutElem:Mr},pipe(){return Dn(this,arguments)}},Jb=e=>{let t=Object.create(qb);return t.transform=(t,r)=>n(e(t,r),e=>O(Br(e))),t},Yb=(e,t)=>Jb((n,r)=>j(Qb(e)(n,r),e=>t(e,r))),Xb=e=>Jb((t,n)=>e),Zb=e=>Jb(Fn(function*(t,n){let r=ks(n),i=e=>As(r,_c(e)),a=yield*We(e(t,n,r),i);return We(a,i)})),Qb=e=>e.transform,$b=4096,ex=(e,t,r)=>rb({capacity:r?.bufferSize,strategy:r?.strategy}).pipe(ln(t=>Os(e,db(t))),ln(r=>Ds(t(r),e).pipe(n(e=>cb(r,e)),hn(e)))),tx=(e,t)=>Jb((n,r)=>S(ex(r,e,t),pb)),nx=e=>Jb((t,n)=>rn(()=>Qb(e())(t,n))),rx=e=>Xb(Qt(()=>{let t=e();return rn(()=>{let e=t.next();return e.done?as(e.value):O(e.value)})})),ix=(e,t=$b)=>{let n=wo(t);return Xb(Qt(()=>{let t=e(),r=yt();return rn(()=>{if(r._tag===`Some`)return as(r.value);let e=[];for(;e.length<n;){let n=t.next();if(n.done){if(e.length===0)return as(n.value);r=g(n.value);break}e.push(n.value)}return O(e)})}))},ax=(e,t=$b)=>ix(()=>e[Symbol.iterator](),t),ox=e=>ux(O(e)),sx=Xb(O(as())),cx=e=>Xb(O(bn(e))),lx=e=>Xb(Br(e)),ux=e=>Xb(Qt(()=>{let t=!1;return rn(()=>t?as():(t=!0,e))})),dx=e=>Xb(O(pb(e))),fx=(e,t)=>Jb(Fn(function*(n,r){let i=e[Symbol.asyncIterator]();return i.return&&(yield*Os(r,Le(()=>i.return()))),j(Rn({try:()=>i.next(),catch:t}),e=>e.done?as(e.value):O(e.value))})),px=(e,t)=>mx(fx(e,t),mn),mx=In(2,(e,t)=>Yb(e,e=>Qt(()=>{let n=0;return S(e,e=>t(e,n++))}))),hx=e=>e===void 0||e!==`unbounded`&&e<=1,gx=In(e=>Kb(e[0]),(e,t,n)=>hx(n?.concurrency)?_x(e,t):vx(e,t,n)),_x=(e,t)=>Jb((n,r)=>{let i=0;return S(Qb(e)(n,r),j(e=>t(e,i++)))}),vx=(e,t,i)=>Zb(Fn(function*(a,o,s){let c=0,l=yield*Qb(e)(a,o),u=i.concurrency===`unbounded`?2**53-1:i.concurrency,d=yield*ib(0);yield*Os(s,db(d));let f=Bt(yield*mi()),p=Rb(s);if(i.unordered){let e=Vb(u),i=r(e.release(1)),a=nt({onFailure:e=>j(cb(d,e),i),onSuccess:e=>j(ab(d,e),i)});yield*e.take(1).pipe(j(()=>l),j(e=>{let n=c++;return p(f(a(rn(()=>t(e,n))))),ar}),Ar({disableYield:!0}),n(t=>e.withPermits(u-1)(cb(d,t))),hn(s))}else{let e=yield*ib(u-2);yield*Os(s,db(e)),yield*hb(e).pipe(vi,j(e=>ab(d,e)),Ar({disableYield:!0}),n(e=>cb(d,e)),hn(s));let r,i=e=>{e._tag!==`Success`&&(r=e.cause,lb(d,e.cause))};yield*l.pipe(j(n=>{if(r)return Br(r);let a=c++,o=f(rn(()=>t(n,a)));return p(o),o.addObserver(i),ab(e,Fb(o))}),Ar({disableYield:!0}),n(t=>ab(e,cs(t)).pipe(we(cb(e,t)))),hn(s))}return hb(d)})),yx=In(e=>Kb(e[0]),(e,t,n)=>hx(n?.concurrency)?bx(e,t):xx(e,t,n)),bx=(e,t)=>Jb((n,r)=>S(Qb(e)(n,r),e=>{let i,a,o=j(e,e=>(a??=ks(r),wr(Qb(t(e))(n,a),e=>(i=s(e),i)))),s=fc(e=>{if(i=void 0,a.state._tag===`Empty`)return o;let t=As(a,ds);return a=void 0,j(t,()=>o)});return rn(()=>i??o)})),xx=(e,t,n)=>e.pipe(mx(t),Ex(n)),Sx=e=>yx(e,Mr),Cx=e=>Yb(e,e=>{let t,n=0,r=rn(function r(){if(t===void 0)return j(e,e=>{switch(e.length){case 0:return r();case 1:return O(e[0]);default:return t=e,O(e[n++])}});let i=t[n++];return n>=t.length&&(t=void 0,n=0),O(i)});return O(r)}),wx=In(2,(e,t)=>Yb(e,e=>O(j(e,function n(r){let i=[];for(let e=0;e<r.length;e++)t(r[e])&&i.push(r[e]);return kr(i)?O(i):j(e,n)})))),Tx=In(2,(e,t)=>Jb((r,i)=>{let a=ks(i);return S(Qb(e)(r,a),e=>{let o=e.pipe(n(e=>{if(pc(e))return Br(e);let n=a;return a=ks(i),As(n,cs(e)).pipe(we(Qb(t(e))(r,a)),j(e=>(o=e,e)))}));return rn(()=>o)})})),Ex=In(2,(e,{bufferSize:t=16,concurrency:r,switch:i=!1})=>Zb(Fn(function*(a,o,s){let c=r===`unbounded`?2**53-1:Math.max(1,r),l=i?void 0:Vb(c),u=yield*Bb(!0),d=new Set,f=yield*ib(t);yield*Os(s,db(f));let p=yield*Qb(e)(a,o);return yield*En(function*(){for(;;){let e;l&&(d.size<c?yield*l.take(1):(e=yield*tr(p),yield*Hi(l.take(1),we(Fb(e),fr))));let t=e===void 0?yield*p:yield*Fb(e),n=ks(s),r=yield*Qb(t)(a,n);for(;d.size>=c;){let e=To(d);d.delete(e),d.size===0&&(yield*u.open),yield*Ib(e)}let i=yield*r.pipe(ln(()=>_n),j(e=>ab(f,e)),Ar({disableYield:!0}),We(Fn(function*(e){let t=_c(e),r=yield*sr(As(n,t));if(!d.has(i))return;let a=ms([t,r]);ps(a)&&(yield*cb(f,a.cause)),d.delete(i),l&&(yield*l.release(1)),d.size===0&&(yield*u.open)})),tr);u.closeUnsafe(),d.add(i)}}).pipe(n(e=>{let t=hc(e);return Oi(t)?u.whenOpen(cb(f,e)):cb(f,e)}),hn(s)),hb(f)}))),Dx=In(e=>Kb(e[0])&&Kb(e[1]),(e,t,n)=>Zb(Fn(function*(r,i,a){let o=n?.haltStrategy??`both`,s=yield*ib(0);yield*Os(a,db(s));let c=0;function l(e,t){if(c++,!pc(t))return cb(s,t);switch(o){case`both`:return c===2?cb(s,t):ar;case`left`:case`right`:return e===o?cb(s,t):ar;case`either`:return cb(s,t)}}let u=(e,t,n)=>Qb(t)(r,n).pipe(j(e=>e.pipe(j(e=>ab(s,e)),Ar)),We(t=>lt(_c(t),e=>As(n,e)).pipe(nt({onFailure:t=>l(e,t),onSuccess:()=>l(e,t)}))),hn(a));return yield*u(`left`,e,ks(a)),yield*u(`right`,t,ks(a)),hb(s)}))),Ox=e=>Jb((t,n)=>{let r;return O(rn(()=>r||e.pipe(Ds(n),j(e=>Qb(e)(t,n)),j(e=>r=e))))}),kx=In(2,(e,t)=>Dx(e,Xb(O(j(t,as))),{haltStrategy:`either`})),Ax=Fn(function*(e){let t=Vb(1),n=yield*mi(),r=Cr(n,ws);return(yield*Qb(e)(as(),r)).pipe(bt(n),t.withPermits(1))},n(e=>O(Br(e)))),jx=(e,t)=>Qb(e)(as(),t),Mx=`~effect/Stream`,Nx={_R:Mr,_E:Mr,_A:Mr},Px=function(e){this.channel=e};Px.prototype={[Mx]:Nx,pipe(){return Dn(this,arguments)}};var Fx=e=>new Px(e),Ix=`~effect/Sink`,Lx={_A:Mr,_In:Mr,_L:Mr,_E:Mr,_R:Mr},Rx={[Ix]:Lx,pipe(){return Dn(this,arguments)}},zx=e=>{let t=Object.create(Rx);return t.transform=e,t},Bx=((e,t,n)=>zx(r=>{let i=e(),a;return t(i)?r.pipe(j(e=>{for(let r=0;r<e.length;r++)if(i=n(i,e[r]),!t(i))return r+1<e.length&&(a=e.slice(r+1)),as();return ar}),Ar({disableYield:!0}),fc(()=>O([i,a]))):O([i])}))(yt,Ye,(e,t)=>g(t)),Vx=()=>Bx,Hx=`~effect/Stream`,Ux=e=>Bi(e,Hx),Wx=Fx,Gx=e=>Wx(ux(S(e,mn))),Kx=e=>qx(O(j(e,()=>as()))),qx=e=>Wx(Xb(e)),Jx=(e,t)=>Wx(Jb((n,r)=>j(jx(e.channel,r),e=>t(e,r)))),Yx=e=>e.channel,Xx=(e,t)=>Wx(tx(e,t)),Zx=Wx(sx),Qx=e=>Wx(ox(mn(e))),$x=e=>Wx(nx(()=>e().channel)),eS=e=>Wx(cx(e)),tS=e=>Wx(lx(e)),nS=(e,t)=>Array.isArray(e)&&t?.chunkSize===void 0?rS(e):Wx(ax(e,t?.chunkSize)),rS=e=>kr(e)?Wx(ox(e)):Zx,iS=e=>Wx(dx(e)),aS=(e,t)=>Wx(px(e,t)),oS=e=>Wx(Ox(S(e,Yx))),sS=In(e=>Ux(e[0]),(e,t,n)=>e.channel.pipe(Cx,gx(t,n),mx(mn),Wx)),cS=In(e=>Ux(e[0]),(e,t,n)=>e.channel.pipe(Cx,yx(e=>t(e).channel,n),Wx)),lS=In(2,(e,t)=>{let n=i(t.duration);if(!Bn(n))return e;if(pi(n))return $x(t.orElse);let r=Symbol();return gS($x(()=>{let t=Lb().getRef(js),i=ni(n),a,o=zb(!1);return pS(Jx(e,(e,n)=>rn(()=>(a=t.currentTimeMillisUnsafe()+i,o.openUnsafe(),e)).pipe(S(e=>(o.closeUnsafe(),a=void 0,e)),O)),Kx(En(function*(){for(;;)if(yield*o.await,a!==void 0&&(yield*Qr(a-t.currentTimeMillisUnsafe()),a!==void 0&&!(a-t.currentTimeMillisUnsafe()>0)))return yield*Fr(r)})),{haltStrategy:`left`})}),e=>e.reasons.find(e=>e._tag===`Die`&&e.defect===r)?t.orElse():tS(e))}),uS=In(2,(e,t)=>{let n=Wx(Sx(rx(()=>fS(e,t))));return dS.set(n,[e,t]),n}),dS=new WeakMap;function*fS(e,t){let n=[t,e];for(;n.length>0;){let e=n.pop(),t=dS.get(e);t===void 0?yield e.channel:n.push(t[1],t[0])}}var pS=In(e=>Ux(e[0])&&Ux(e[1]),(e,t,n)=>Wx(Dx(Yx(e),Yx(t),n))),mS=In(2,(e,t)=>Wx(wx(Yx(e),t))),hS=In(2,Fn(function*(e,t){let r,i=yield*Ax(e.channel),a=n(i,e=>(r=e,Br(e))),[o,s]=yield*Me(e=>t.transform(a,e)),c=r?Zx:qx(O(i));return s&&(c=uS(rS(s),c)),[o,c]})),gS=In(2,(e,t)=>e.channel.pipe(Tx(e=>t(e).channel),Wx)),_S=In(e=>Ux(e[0]),(e,t,n)=>Jx(e,(e,r)=>Qt(()=>{let r=0,i=!1;return j(rn(()=>i?as():e),e=>{let a=e.findIndex(e=>t(e,r++));if(a>=0){i=!0;let t=e.slice(0,n?.excludeLast?a:a+1);return kr(t)?O(t):as()}return O(e)})}))),vS=In(2,(e,t)=>Wx(kx(e.channel,t))),yS=In(2,(e,t)=>({[Symbol.asyncIterator](){let n=Ft(t),r=Bt(t),i=Es(),a,o,s,c,l=e=>{if(c)return c;let t=s;return c=n(qt(we(t?Ib(t):ar,As(i,e)),{done:!0,value:void 0})),c},u=async e=>{try{await l(e)}catch(e){await n(Et(`Suppressed error while closing Stream async iterator`,e))}};return{async next(){if(c)return c;if(o){let e=o.next();if(!e.done)return e;o=void 0}let t=r(a??j(jx(e.channel,i),e=>(a=e,e)));s=t;let d=await n(Pb(t));if(s===t&&(s=void 0),fs(d))return o=d.value[Symbol.iterator](),o.next();if(pc(d.cause))return l(ds);if(c&&Qo(d.cause))return c;throw await u(d),es(d.cause)},return(){return l(ds)},async throw(e){throw await u(us(e)),e}}}})),bS=e=>yS(e,An()),xS=R.pipe(W(Fg(1)),W(K(4096))),SS=R.pipe(W(Fg(1)),W(K(513))),CS=B({params:V(B({key:R.check(Fg(1),K(64)),value:R.check(K(4096))})).check(K(16))}),wS=B({id:SS,title:xS,detail:I(R.pipe(W(K(1024)))),tone:I(H([`attention`,`running`,`error`,`settled`,`muted`])),status:I(B({label:xS,tone:H([`neutral`,`primary`,`secondary`,`accent`,`success`,`info`,`warning`,`error`])})),open:I(CS)}),TS=V(wS).pipe(W(K(200)));B({...wS.fields,media:I(B({path:xS,format:H([`fungi:image`,`fungi:video`])}))});var ES=e=>new Set(e).size===e.length,DS=R.pipe(W(K(256)),W(vg(e=>e.trim().length>0,{message:`Declared command text must not be blank`}))),OS=DS.pipe(W(K(64))),kS=V(B({key:OS,label:DS,kind:H([`computer`,`repository`,`branch`]),required:Zh,options:I(DS)}).check(vg(e=>e.kind!==`computer`||e.options===void 0,{message:`Computer options are host-owned`}))).check(K(4),vg(e=>ES(e.map(e=>e.key)),{message:`Gill parameter keys must be unique`})),AS=ig([B({storage:DS}),B({binding:DS})]),jS=DS.pipe(W(vg(e=>!e.includes(`:`),{message:`Gill IDs are App-local`}))),MS=B({sizes:V(H([`S`,`M`,`L`])).check(Fg(1),K(3),vg(ES,{message:`Desktop Gill sizes must be unique`}))}),NS=e=>B({id:jS,view:e,title:DS,source:DS,params:I(kS),watch:I(AS),desktop:I(MS)}),PS=NS(L(`rows`)),FS=B({id:jS,title:DS,view:L(`surface`),desktop:MS}),IS=ig([PS,FS]),LS=ig([NS(L(`rows`).pipe(pg(O(`rows`)))),FS]),RS=$h(OS,R.check(K(256))).check(vg(e=>Object.keys(e).length<=4,{message:`Gill placement supports at most four parameters`}));B({viewId:SS,params:I(RS),after:I(R.check(K(1024))),options:I(OS)}),B({id:SS,params:I(RS),after:I(R.check(K(1024))),options:I(OS)});var zS=ig([B({viewId:SS,title:xS,state:L(`empty`),rows:tg([]),emptyText:I(R.pipe(W(Fg(1)),W(K(120)))),action:I(B({kind:L(`open`)})),next:I(R.pipe(W(K(1024))))}),B({viewId:SS,title:xS,state:L(`error`),rows:tg([]),reason:I(H([`exec_isolation_required`,`params_required`,`disabled`])),error:R.pipe(W(Fg(1)),W(K(512))),recovery:I(ig([B({kind:L(`configure`),param:OS}),B({kind:L(`open`)})]))}),B({viewId:SS,title:xS,state:L(`full`),rows:TS.pipe(W(Fg(1))),next:I(R.pipe(W(K(1024))))})]);Rh(zS,{onExcessProperty:`error`});var BS=B({options:V(B({value:R.check(K(256)),label:xS,detail:I(R.check(K(1024)))})).check(K(200)),next:I(R.check(K(1024)))});Rh(ig([zS,BS]),{onExcessProperty:`error`}),Rh(BS,{onExcessProperty:`error`});var VS=Je(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);b.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>Di(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>ie(e,t,n),e.parseAsync=async(t,n)=>At(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>ee(e,t,n),e.check=(...n)=>e.clone({...t,checks:[...t.checks??[],...n.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]},{parent:!0}),e.with=e.check,e.clone=(t,n)=>_r(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),HS=Je(`ZodMiniString`,(e,t)=>{Tt.init(e,t),VS.init(e,t)});function US(e){return Sr(HS,e)}var WS=Je(`ZodMiniNumber`,(e,t)=>{Si.init(e,t),VS.init(e,t)});function GS(e){return vn(WS,e)}var KS=Je(`ZodMiniNumberFormat`,(e,t)=>{Li.init(e,t),WS.init(e,t)});function qS(e){return zn(KS,e)}var JS=Je(`ZodMiniNever`,(e,t)=>{Jn.init(e,t),VS.init(e,t)});function YS(e){return or(JS,e)}var XS=Je(`ZodMiniArray`,(e,t)=>{Nn.init(e,t),VS.init(e,t)});function ZS(e,t){return new XS({type:`array`,element:e,...He(t)})}var QS=Je(`ZodMiniObject`,(e,t)=>{wn.init(e,t),VS.init(e,t),u(e,`shape`,()=>t.shape)});function $S(e,t){return new QS({type:`object`,shape:e??{},...He(t)})}function eC(e,t){return new QS({type:`object`,shape:e,catchall:YS(),...He(t)})}var tC=Je(`ZodMiniDiscriminatedUnion`,(e,t)=>{Wr.init(e,t),VS.init(e,t)});function nC(e,t,n){return new tC({type:`union`,options:t,discriminator:e,...He(n)})}var rC=Je(`ZodMiniLiteral`,(e,t)=>{er.init(e,t),VS.init(e,t)});function iC(e,t){return new rC({type:`literal`,values:Array.isArray(e)?e:[e],...He(t)})}var aC=Je(`ZodMiniOptional`,(e,t)=>{Ni.init(e,t),VS.init(e,t)});function oC(e){return new aC({type:`optional`,innerType:e})}var sC=Je(`ZodMiniNullable`,(e,t)=>{pn.init(e,t),VS.init(e,t)});function cC(e){return new sC({type:`nullable`,innerType:e})}var lC=Je(`ZodMiniLazy`,(e,t)=>{Or.init(e,t),VS.init(e,t)});function uC(e){return new lC({type:`lazy`,getter:e})}var dC=Je(`ZodMiniCustom`,(e,t)=>{Wn.init(e,t),VS.init(e,t)});function fC(e,t={}){return si(dC,e,t)}function pC(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function mC(...e){return t=>{let n=!1,r=e.map(e=>{let r=pC(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():pC(e[t],null)}}}}function hC(...e){return M.useCallback(mC(...e),e)}function gC(e){let t=M.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];wC(r)&&typeof OC==`function`&&(r=OC(r._payload)),M.Children.forEach(r,e=>{if(SC(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;wC(n)&&typeof OC==`function`&&(n=OC(n._payload)),a=yC(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=M.cloneElement(a,void 0,s):!o&&M.Children.count(r)===1&&M.isValidElement(r)&&(a=r);let c=a?xC(a):void 0,l=hC(n,c);if(!a){if(r||r===0)throw Error(o?DC(e):EC(e));return r}let u=bC(i,a.props??{});return a.type!==M.Fragment&&(u.ref=n?l:c),M.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var _C=gC(`Slot`),vC=Symbol.for(`radix.slottable`),yC=(e,t)=>{if(`child`in e.props){let t=e.props.child;return M.isValidElement(t)?M.cloneElement(t,void 0,e.props.children(t.props.children)):null}return M.isValidElement(t)?t:null};function bC(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`&&(n[r]=[i,a].filter(Boolean).join(` `))}return{...e,...n}}function xC(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function SC(e){return M.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===vC}var CC=Symbol.for(`react.lazy`);function wC(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===CC&&`_payload`in e&&TC(e._payload)}function TC(e){return typeof e==`object`&&!!e&&`then`in e}var EC=e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,DC=e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,OC=M.use,kC=Object.freeze({alphaIntercept:-9,alphaSlope:19,blurStdDeviation:1.5}),AC=Object.freeze([`2xs`,`xs`,`sm`,`md`,`lg`,`xl`,`2xl`,`3xl`,`4xl`]);Object.freeze(`--stipe-font-synthesis.--stipe-surface-frame-width.--stipe-surface-frame-image.--stipe-surface-molding-contrast.--stipe-shadow-raised.--stipe-shadow-inset.--stipe-shadow-edge.--stipe-display-gasket-face.--stipe-display-texture-image.--stipe-display-text-shadow.--stipe-canvas.--stipe-surface.--stipe-surface-raised.--stipe-surface-selected.--stipe-fg-muted.--stipe-linework.--stipe-hairline.--stipe-hairline-quiet.--stipe-figure-ink.--stipe-density-compact.--stipe-density-comfortable.--stipe-motion-spring.--stipe-motion-squish.--stipe-motion-fast.--stipe-motion-normal.--stipe-motion-slow.--stipe-motion-ease.--stipe-motion-ease-exit.--stipe-motion-bounce.--stipe-motion-spring-duration.--stipe-motion-stretch.--stipe-motion-distance.--stipe-motion-stagger.--stipe-motion-blur.--stipe-motion-shake.--stipe-motion-steps.--stipe-motion-fuse.--stipe-press-depth.--stipe-press-scale.--stipe-layer-desktop.--stipe-layer-windows.--stipe-layer-chrome.--stipe-layer-popover.--stipe-layer-dialog.--stipe-layer-toast.--stipe-layer-tooltip.--stipe-overlay-shadow-outset.--stipe-icon-size-sm.--stipe-icon-size-md.--stipe-icon-size-lg.--stipe-icon-stroke.--stipe-card-rim.--stipe-card-rim-edge.--stipe-card-face.--stipe-card-panel.--stipe-card-ink.--stipe-card-ink-muted.--stipe-card-accent.--stipe-card-shadow.--stipe-card-foil-highlight.--stipe-card-foil-warm.--stipe-card-foil-cool.--stipe-avatar-shadow.--stipe-art-coral.--stipe-art-blue.--stipe-art-mint.--stipe-art-grape.--stipe-art-yellow.--stipe-art-cream.--stipe-art-ink.--stipe-art-inkcap.--stipe-art-graphite.--stipe-sketch-ink`.split(`.`));function jC(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=jC(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function MC(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=jC(e))&&(r&&(r+=` `),r+=t);return r}var NC=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,PC=MC,FC=(e,t)=>n=>{if(t?.variants==null)return PC(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=NC(t)||NC(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return PC(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},IC=Object.defineProperty,LC=((e,t)=>{let n={};for(var r in e)IC(n,r,{get:e[r],enumerable:!0});return t||IC(n,Symbol.toStringTag,{value:`Module`}),n})({isAny:()=>ZC,isAnyNonArbitrary:()=>nw,isArbitraryFamilyName:()=>yw,isArbitraryImage:()=>xw,isArbitraryLength:()=>gw,isArbitraryNumber:()=>_w,isArbitraryPosition:()=>bw,isArbitraryShadow:()=>Sw,isArbitrarySize:()=>mw,isArbitraryValue:()=>hw,isArbitraryVariable:()=>Cw,isArbitraryVariableFamilyName:()=>Tw,isArbitraryVariableImage:()=>Ow,isArbitraryVariableLength:()=>ww,isArbitraryVariablePosition:()=>Ew,isArbitraryVariableShadow:()=>kw,isArbitraryVariableSize:()=>Dw,isArbitraryVariableWeight:()=>Aw,isArbitraryWeight:()=>vw,isFraction:()=>KC,isInteger:()=>JC,isNamedContainerQuery:()=>rw,isNumber:()=>qC,isPercent:()=>YC,isTshirtSize:()=>XC}),RC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,BC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,VC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,HC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,UC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,WC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,GC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,KC=e=>BC.test(e),qC=e=>!!e&&!Number.isNaN(Number(e)),JC=e=>!!e&&Number.isInteger(Number(e)),YC=e=>e.endsWith(`%`)&&qC(e.slice(0,-1)),XC=e=>VC.test(e),ZC=()=>!0,QC=e=>HC.test(e)&&!UC.test(e),$C=()=>!1,ew=e=>WC.test(e),tw=e=>GC.test(e),nw=e=>!hw(e)&&!Cw(e),rw=e=>e.startsWith(`@container`)&&(e[10]===`/`&&e[11]!==void 0||e[11]===`s`&&e[16]!==void 0&&e.startsWith(`-size/`,10)||e[11]===`n`&&e[18]!==void 0&&e.startsWith(`-normal/`,10)),iw=(e,t,n)=>{let r=RC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},aw=(e,t,n=!1)=>{let r=zC.exec(e);return r?r[1]?t(r[1]):n:!1},ow=e=>e===`position`||e===`percentage`,sw=e=>e===`image`||e===`url`,cw=e=>e===`length`||e===`size`||e===`bg-size`,lw=e=>e===`length`,uw=e=>e===`number`,dw=e=>e===`family-name`,fw=e=>e===`number`||e===`weight`,pw=e=>e===`shadow`,mw=e=>iw(e,cw,$C),hw=e=>RC.test(e),gw=e=>iw(e,lw,QC),_w=e=>iw(e,uw,qC),vw=e=>iw(e,fw,ZC),yw=e=>iw(e,dw,$C),bw=e=>iw(e,ow,$C),xw=e=>iw(e,sw,tw),Sw=e=>iw(e,pw,ew),Cw=e=>zC.test(e),ww=e=>aw(e,lw),Tw=e=>aw(e,dw),Ew=e=>aw(e,ow),Dw=e=>aw(e,cw),Ow=e=>aw(e,sw),kw=e=>aw(e,pw,!0),Aw=e=>aw(e,fw,!0),jw=(e,t)=>{let n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]==`string`},Mw=e=>typeof e==`function`&&e.isThemeGetter===!0,Nw=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),Pw=(e,t)=>{let n=Nw(e);t.prefix!==void 0&&(n.prefix=t.prefix);let r=(e,t)=>{if(t)for(let n in t)t[n]!==void 0&&(e[n]=t[n])},i=t.override;i&&(i.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...i.orderSensitiveModifiers]),r(n.theme,i.theme),r(n.classGroups,i.classGroups),r(n.conflictingClassGroups,i.conflictingClassGroups),r(n.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers));let a=(e,t)=>{if(t)for(let n in t){let r=t[n];r&&(e[n]=(e[n]??[]).concat(r))}},o=t.extend;return o&&(o.orderSensitiveModifiers&&(n.orderSensitiveModifiers=[...n.orderSensitiveModifiers,...o.orderSensitiveModifiers]),a(n.theme,o.theme),a(n.classGroups,o.classGroups),a(n.conflictingClassGroups,o.conflictingClassGroups),a(n.conflictingClassGroupModifiers,o.conflictingClassGroupModifiers)),n},Fw={isAny:0,isAnyNonArbitrary:1,isArbitraryValue:2,isArbitraryVariable:3,isFraction:4,isNumber:5,isInteger:6,isPercent:7,isTshirtSize:8,isNamedContainerQuery:9,isArbitraryLength:10,isArbitraryNumber:11,isArbitraryWeight:12,isArbitraryFamilyName:13,isArbitraryPosition:14,isArbitrarySize:15,isArbitraryImage:16,isArbitraryShadow:17,isArbitraryVariableLength:18,isArbitraryVariableFamilyName:19,isArbitraryVariablePosition:20,isArbitraryVariableSize:21,isArbitraryVariableImage:22,isArbitraryVariableShadow:23,isArbitraryVariableWeight:24},Iw=25,Lw=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),Rw=(e,t,n)=>{let r=e.idByName.get(t);return r===void 0&&(r=e.names.length,e.names.push(t),e.idByName.set(t,r),e.classifierFns.set(t,n)),r},zw=(e,t)=>{if(typeof t==`function`){let n=e.fnName.get(t);return n===void 0&&(n=`$c`+e.fnName.size,e.fnName.set(t,n),e.impls[n]=t),Rw(e,n,t)}let n=t.$v,r=LC[n];if(Fw[n]===void 0||!r)throw Error(`cn: unknown validator "${n}"`);return Rw(e,n,r)},Bw=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),Vw=(e,t)=>e.theme[t]??[],Hw=(e,t,n)=>{let r=Bw(),i=(e,t)=>{for(let n of t.split(`-`)){let t=e.nextPart.get(n);t||(t=Bw(),e.nextPart.set(n,t)),e=t}return e},a=(n,r,o)=>{if(typeof n==`string`){let e=n===``?r:i(r,n);e.classGroupId=o;return}if(typeof n==`function`){if(Mw(n)){for(let t of n(e.theme))a(t,r,o);return}(r.validators??=[]).push({validatorId:zw(t,n),groupId:o});return}if(jw(n,`$t`)){for(let t of Vw(e,n.$t))a(t,r,o);return}if(jw(n,`$v`)){(r.validators??=[]).push({validatorId:zw(t,n),groupId:o});return}for(let[e,t]of Object.entries(n)){let n=i(r,e);for(let e of t)a(e,n,o)}};for(let[t,i]of Object.entries(e.classGroups)){let e=n(t);for(let t of i)a(t,r,e)}return r},Uw=e=>{let t=Lw(),n=[],r=new Map,i=e=>{let t=r.get(e);return t===void 0&&(t=n.length,n.push(e),r.set(e,t)),t},a=Hw(e,t,i),o=e=>{if(e.validators)return!1;for(let t of e.nextPart.values())if(!o(t))return!1;return!0},s=(e,t,n)=>{e.classGroupId>=0&&n.push({tail:t,gid:e.classGroupId});for(let[r,i]of e.nextPart)s(i,t+`-`+r,n)},c=e=>{for(let[t,n]of[...e.nextPart])o(n)?(s(n,t,e.lit),e.nextPart.delete(t)):c(n)};c(a);let l=[{edges:new Map,groupId:-1,vlist:-1}],u=()=>(l.push({edges:new Map,groupId:-1,vlist:-1}),l.length-1),d=[],f=new Map,p=e=>{let t=e.map(e=>e.validatorId+`:`+e.groupId).join(`,`),n=f.get(t);return n===void 0&&(n=d.length,d.push(e.map(e=>[e.validatorId,e.groupId])),f.set(t,n)),n},m=(e,t)=>{let n=e;for(let e=0;e<t.length;e++){let r=t.charCodeAt(e),i=l[n].edges.get(r);i===void 0&&(i=u(),l[n].edges.set(r,i)),n=i}return n},h=[],g=(e,t,n)=>{e.classGroupId>=0&&(l[t].groupId=e.classGroupId),e.validators&&(l[t].vlist=p(e.validators));for(let{tail:n,gid:r}of e.lit)h.push({anchor:t,tail:n,gid:r});for(let[r,i]of e.nextPart){let e=t;if(!n){let n=l[t].edges.get(45);n===void 0&&(n=u(),l[t].edges.set(45,n)),e=n}let a=m(e,r);g(i,a,!1)}};g(a,0,!0);let _=new Set(h.map(e=>e.anchor)),v=e=>l[e].groupId>=0||l[e].vlist>=0||_.has(e),y=new Map,b=[],x=e=>{let t=b.length;y.set(e,t);let n={edges:[],groupId:l[e].groupId,vlist:l[e].vlist};b.push(n);let r=[...l[e].edges.entries()].sort((e,t)=>e[0]-t[0]);for(let[e,t]of r){let r=String.fromCharCode(e),i=t;for(;l[i].edges.size===1&&!v(i);){let[[e,t]]=l[i].edges.entries();r+=String.fromCharCode(e),i=t}n.edges.push({label:r,oldTarget:i})}for(let e of n.edges)x(e.oldTarget);return t};x(0);let S=b.length,C=0;for(let e of b)C+=e.edges.length;let w=new Int32Array(S),ee=new Int32Array(C),te=``,ne=new Int32Array(S),re=new Int32Array(S),ie=[];{let e=0;for(let t=0;t<S;t++){let n=b[t];w[t]=n.edges.length;for(let t of n.edges)ee[e]=t.label.length,te+=t.label,ie.push(y.get(t.oldTarget)),e++;ne[t]=n.groupId,re[t]=n.vlist}}{let e=new Int32Array(S);for(let t=S-1;t>=0;t--){let n=1,r=t+1;for(let i=0;i<w[t];i++)n+=e[r],r+=e[r];e[t]=n}let t=0;for(let n=0;n<S;n++){let r=n+1;for(let i=0;i<w[n];i++){if(r!==ie[t])throw Error(`cn compiler: edge target mismatch at ${t}`);r+=e[r],t++}}}for(let e of h)e.anchor=y.get(e.anchor);{let e=new Int32Array(d.length).fill(-1),t=[];for(let n=0;n<S;n++){let r=re[n];r>=0&&(e[r]===-1&&(e[r]=t.length,t.push(d[r])),re[n]=e[r])}d.length=0,d.push(...t)}let T=0;for(let e of d)T+=e.length;let ae=new Int32Array(T),oe=new Int32Array(T);{let e=0;for(let t of d)for(let[n,r]of t)ae[e]=n,oe[e]=r,e++}h.sort((e,t)=>e.anchor-t.anchor||e.gid-t.gid||(e.tail<t.tail?-1:1));let se=[];for(let e of h){let t=se[se.length-1];t&&t.anchor===e.anchor&&t.gid===e.gid?t.tails.push(e.tail):se.push({anchor:e.anchor,gid:e.gid,tails:[e.tail],set:-1})}let ce=new Map,le=[];for(let e of se){let t=e.tails.join(` `),n=ce.get(t);n===void 0&&(n=le.length,ce.set(t,n),le.push(e.tails)),e.set=n}for(let e of le.flat())if(e.includes(`|`)||e.includes(` `))throw Error(`cn compiler: tail contains delimiter: `+e);let ue=new Set(le.flat()).size;se.sort((e,t)=>e.anchor-t.anchor||e.set-t.set);for(let t of Object.values(e.conflictingClassGroups))for(let e of t)i(e);for(let t of Object.values(e.conflictingClassGroupModifiers))for(let e of t)i(e);for(let t of e.postfixLookupClassGroups??[])i(t);let de=n.length,fe=new Int32Array(de).fill(-1),pe=0,me=e=>(fe[e]===-1&&(fe[e]=pe++),fe[e]);for(let e=0;e<oe.length;e++)oe[e]=me(oe[e]);for(let e of se)e.gid=me(e.gid);for(let e=0;e<ne.length;e++)ne[e]>=0&&(ne[e]=me(ne[e]));for(let e=0;e<de;e++)fe[e]===-1&&(fe[e]=pe++);let he=Array(de);for(let e=0;e<de;e++)he[fe[e]]=n[e];let ge=[],_e=[],E=[],D=[],ve=[];for(let t=0;t<de;t++){let n=he[t],i=(e.conflictingClassGroups[n]??[]).map(e=>fe[r.get(e)]),a=(e.conflictingClassGroupModifiers[n]??[]).map(e=>fe[r.get(e)]);i.length&&(ge.push(t),_e.push(i.length),E.push(...i));for(let e of a)D.push(t),ve.push(e)}let ye=(e.postfixLookupClassGroups??[]).map(e=>fe[r.get(e)]),be=[],xe=new Int32Array(ae.length);for(let e=0;e<ae.length;e++){let n=t.names[ae[e]],r=Fw[n];if(r!==void 0)xe[e]=r;else{let t=be.indexOf(n);t===-1&&(t=be.length,be.push(n)),xe[e]=Iw+t}}let Se=new Map,Ce=[],we=[],Te=[];{let e=0;for(let t of d){let n=[];for(let r=0;r<t.length;r++)n.push(xe[e++]);let r=n.join(`,`),i=Se.get(r);i===void 0&&(i=Ce.length,Se.set(r,i),Ce.push(n.length),we.push(...n)),Te.push(i)}}let Ee={};for(let e of be)Ee[e]=t.classifierFns.get(e);return{G:de,customNames:be,impls:Ee,edgeCounts:w,edgeLabelLen:ee,labelText:te,edgeTargetActual:ie,nodeGroup:ne,nodeVlist:re,nodeCount:S,totalEdges:C,patCounts:Ce,patOps:we,listPat:Te,vlistGroup:oe,litEntries:h,sets:le,attachments:se,uniqueTailCount:ue,adjGid:ge,adjCnt:_e,adjTgt:E,patGid:D,patTgt:ve,postfixLookup:ye,orderSensitiveModifiers:e.orderSensitiveModifiers.join(` `),prefix:e.prefix}},Ww=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},Gw=e=>{let t=Uw(e),n=t.litEntries.length,r=new Int32Array(n),i=new Int32Array(n),a=new Int32Array(n),o=``,s=new Int32Array(t.uniqueTailCount*2);{let e=new Map,n=0,c=0;for(let l of t.attachments)for(let u of t.sets[l.set]){let t=e.get(u);t===void 0&&(t=n++,e.set(u,t),s[t*2]=o.length,s[t*2+1]=u.length,o+=u),r[c]=l.anchor,i[c]=l.gid,a[c]=t,c++}}return{tables:{GROUP_COUNT:t.G,edgeStart:Ww(t.edgeCounts),labelStart:Ww(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:Ww(t.patCounts),vlistOps:Int32Array.from(t.patOps),vlistRef:Int32Array.from(t.listPat),vlistGroup:t.vlistGroup,litAnchor:r,litGroup:i,litPool:a,poolOffsets:s,poolText:o,adjGid:Int32Array.from(t.adjGid),adjStart:Ww(t.adjCnt),adjTgt:Int32Array.from(t.adjTgt),patGid:Int32Array.from(t.patGid),patTgt:Int32Array.from(t.patTgt),postfixLookupGroups:Int32Array.from(t.postfixLookup),customValidatorNames:t.customNames,orderSensitiveModifiers:t.orderSensitiveModifiers},validatorImpls:t.impls,prefix:t.prefix}},Kw=`line`in Error(),qw=-1,Jw=-1,Yw=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Xw=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15|0},Zw=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:ee,orderSensitiveModifiers:te}=e,ne=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)ne[y[e]]=e;let re=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>re&&(re=t)}let ie=32;for(;ie<2*(1+re+S.length);)ie<<=1;let T=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)T[e+1]=T[e]+u[f[e]+1]-u[f[e]];let ae=new Uint8Array(r);for(let e=0;e<w.length;e++)ae[w[e]]=1;let oe=i.length-1,se=new Uint8Array(oe),ce=0,le=!0;for(let e=0;e<m.length;e++){se[m[e]]=1;let t=_[g[e]*2+1];t>ce&&(ce=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(le=!1)}let ue=1;for(;ue<m.length*2;)ue<<=1;let de=new Int32Array(ue).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Yw(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&ue-1;for(;de[n]!==-1;)n=n+1&ue-1;de[n]=e}let fe=(e,t,n,r)=>{let i=(Yw(t,n,r)^Math.imul(e,2654435761)|0)&ue-1,a=r-n;for(;;){let r=de[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&ue-1}},pe=n.cacheSize??8192,me=n.prefix??e.prefix??``,he=me===``?``:me+`:`,ge=he.length,_e=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),E=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,D=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,ve=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ye=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,be=0,xe=-1,Se=-1,Ce=-1,we=-1,Te=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,Ee=e=>/\s/.test(String.fromCharCode(e)),De=(e,t,n)=>{if(be=0,xe=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)be=1;else if(r===40&&i===41)be=2;else return;Ce=t+1,we=n-1;let a=t+1;if(Te(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!Te(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(xe=t+1,Se=a,Ce=a+1)}},O=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},Oe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,k=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ke=e=>!!e&&!Number.isNaN(Number(e)),Ae=(e,t,n)=>{if(n-t<11||!O(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&O(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&O(e,t+10,t+18,`-normal/`)},je=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],Me=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),Ne=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],A=(e,t,n,r)=>{if(e>=10){if(e>=25)return _e[e-25](t.slice(n,r));let i=e-10;if(be!==je[i])return!1;if(xe>=0){for(let e of Me[i])if(O(t,xe,Se,e))return!0;return!1}switch(Ne[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(Ce,we);return E.test(e)&&!D.test(e)}case 3:return ke(t.slice(Ce,we));case 4:return ye.test(t.slice(Ce,we));default:return ve.test(t.slice(Ce,we))}}switch(e){case 0:return!0;case 1:return be===0;case 2:return be===1;case 3:return be===2;case 4:return Oe.test(t.slice(n,r));case 5:return ke(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&ke(t.slice(n,r-1));case 8:return k.test(t.slice(n,r));default:return Ae(t,n,r)}},Pe=new Set(typeof te==`string`?te.split(` `):te),Fe=(e,t,n,r,i,a)=>{let o=Yw(t,n,r)^(i?2654435769:0)|0,s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Ie=new Map,Le=new Map,Re=2,ze=4096,Be=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||Pe.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Le.get(s);return c===void 0&&Le.set(s,c=Re++),c},Ve=new Map,He=r,Ue=r+4096,We=()=>He++,Ge=2097152,Ke=8192,qe=new Int32Array(Ke),Je=Array(Ke).fill(null),Ye=new Int32Array(Ke),Xe=new Int32Array(Ke),Ze=new Uint8Array(Ke),Qe=0,$e=(e,t,n,r,i,a,o,s)=>{let c=e;if(Je[e]!==null){if(Je[e|1]===null)c=e|1;else if(!(Qe++&3))c=e|Qe>>2&1;else return}Je[c]=t.slice(n,r),qe[c]=i,Ye[c]=a,Xe[c]=o,Ze[c]=s},et=()=>Je.fill(null),tt=256,nt=[new Int32Array(tt),new Int32Array(tt),new Int32Array(tt),new Int32Array(tt)],[rt,it,at,ot]=nt,st=new Uint8Array(tt),ct=new Uint8Array(tt),lt=()=>{tt*=2,nt=nt.map(e=>{let t=new Int32Array(tt);return t.set(e),t}),[rt,it,at,ot]=nt;let e=new Uint8Array(tt);e.set(st),st=e,ct=new Uint8Array(tt)},ut=64,dt=new Int32Array(ut),ft=new Int32Array(ut),pt=new Int32Array(r),mt=2048,ht=21,gt=new Float64Array(mt),_t=new Int32Array(mt),vt=0,yt=(e,t)=>{if(e===0&&t<r)return pt[t]===vt?1:(pt[t]=vt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>ht;for(;_t[i]===vt;){if(gt[i]===n)return 1;i=i+1&mt-1}return gt[i]=n,_t[i]=vt,0},bt=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?qw:Fe(Ve,e,t+1,r,0,We)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=ft[t];if(r>n)continue;let i=dt[t],a=n-r;if(se[i]===1&&a>0&&a<=ce){let t=e.charCodeAt(r);if(le===!1||t!==91&&t!==40){let t=fe(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;De(e,r,n);let h=T[o]-c;for(let t=c;t<m;t++)if(A(d[t],e,r,n))return p[h+t]}return qw},xt=e=>{let t=e.length,n=0,c=0,u=!1;(Re>ze||Ie.size>ze)&&(Ie=new Map,Le=new Map,Re=2,et()),He>Ue&&(Ve=new Map,He=r,et());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&Ee(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&Ee(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===tt&&lt();let _=n++;rt[_]=p,it[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(qe[y]===v&&Je[y]!==null&&Je[y].length===g?t=y:qe[y|1]===v&&Je[y|1]!==null&&Je[y|1].length===g&&(t=y|1),t>=0){let n=Je[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){at[_]=Ye[t],ot[_]=Xe[t],st[_]=Ze[t];continue}}}let b=p;if(ge!==0){if(h-p<=ge||!e.startsWith(he,p)){at[_]=qw,$e(y,e,p,h,v,qw,0,0);continue}b=p+ge}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let ee=C>=b?C+1:b,te=ee,ne=h,re=!1,ie=0;ne>te&&e.charCodeAt(ne-1)===33?(re=!0,ne--):ne>te&&e.charCodeAt(te)===33&&(re=!0,te++,ie=1);let T=-1;w>ee&&(T=w+ie,T>=ne&&(T=-1));let oe=te;ne-te>1&&e.charCodeAt(te)===45&&(oe=te+1);let ce=0,le=0,ue=0,de=-1,fe=0;(l[0]>=0||se[0]===1)&&(dt[0]=0,ft[0]=oe,fe=1);let pe=Jw,me=0;for(let t=oe;t<ne;t++)if(t===T&&(pe=le<ue?Jw:ce,me=fe),ce!==Jw){let n=e.charCodeAt(t),r=-1;if(le<ue)o.charCodeAt(le)===n?(le++,le===ue&&(r=ce=de)):ce=Jw;else{let e=i[ce],t=i[ce+1],c=Jw;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(le=e+1,ue=a[i+1],de=s[i],c=ce);break}}ce=c}if(r>=0&&(l[r]>=0||se[r]===1)&&t+1<ne&&e.charCodeAt(t+1)===45){if(fe===ut){ut*=2;let e=new Int32Array(ut);e.set(dt),dt=e;let t=new Int32Array(ut);t.set(ft),ft=t}dt[fe]=r,ft[fe]=t+2,fe++}}T===ne&&(pe=le<ue?Jw:ce,me=fe);let _e=le<ue?Jw:ce,E,D=!1;if(T>=0){if(D=!0,E=bt(e,te,T,pe,me),E!==qw&&E<r&&ae[E]){let t=bt(e,te,ne,_e,fe);t!==qw&&t!==E&&(E=t,D=!1)}else E===qw&&(E=bt(e,te,ne,_e,fe),D=!1)}else E=bt(e,te,ne,_e,fe);let ve=0,ye=0;E===qw?at[_]=qw:(ye=+!!D,ve=b>=C?+!!re:Fe(Ie,e,b,C,+!!re,e=>Be(e,re)),at[_]=E,st[_]=ye,ot[_]=ve),$e(y,e,p,h,v,E,ve,ye)}if(n===0)return``;if(n===1)return rt[0]===0&&it[0]===t?e:e.slice(rt[0],it[0]);if(n*ie>mt){for(;n*ie>mt;)mt<<=1,ht--;gt=new Float64Array(mt),_t=new Int32Array(mt)}if(Re>=Ge||He>=Ge)throw Error(`cn: too many distinct classes in one merge`);vt=vt+1|0,vt===0&&(pt.fill(0),_t.fill(0),vt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=at[e];if(t===qw){ct[e]=1;continue}let n=ot[e];if(yt(n,t)===1){ct[e]=0,f=!0;continue}if(ct[e]=1,t<r){let r=ne[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)yt(n,x[e]);if(st[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&yt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!ct[m]){m++;continue}let t=rt[m],r=it[m],i=m+1;for(;i<n&&ct[i]&&rt[i]===r+1&&e.charCodeAt(r)===32;)r=it[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},St=16384,Ct=new Int32Array(St*2),wt=0,Tt=1,Et=Object.create(null),Dt=Object.create(null),Ot=new Map,kt=new Map,At=0,jt=0,Mt=()=>{wt^=St,Tt=Tt+1|0,jt=0},Nt=e=>{let t=Et[e];if(t!==void 0)return t;let n=Xw(e,0,e.length),r=(n&16383)+wt,i=Ct[r]===(n^Tt)||Ct[r^St]===(n^Tt-1);return i&&(t=Dt[e],t!==void 0)?(Et[e]=t,t):(t=xt(e),i?(Et[e]=t,++At>pe&&(At=0,Dt=Et,Et=Object.create(null),Mt())):(Ct[r]=n^Tt,++jt>St&&Mt()),t)},Pt=e=>{let t=Ot.get(e);if(t!==void 0)return t;let n=Xw(e,0,e.length),r=(n&16383)+wt,i=Ct[r]===(n^Tt)||Ct[r^St]===(n^Tt-1);return i&&(t=kt.get(e),t!==void 0)?(Ot.set(e,t),t):(t=xt(e),i?(Ot.set(e,t),++At>pe&&(At=0,kt=Ot,Ot=new Map,Mt())):(Ct[r]=n^Tt,++jt>St&&Mt()),t)},Ft=e=>{let t=Xw(e,0,e.length),n=(t&16383)+wt;return Ct[n]===(t^Tt)||Ct[n^St]===(t^Tt-1)||(Ct[n]=t^Tt,++jt>St&&Mt(),!1)},It=pe===0?xt:Kw?e=>{let t=Ot.get(e);return t===void 0?Pt(e):t}:Nt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?It(arguments[0]):It(eT.apply(null,arguments))},mergeString:It,seenBefore:pe===0?()=>!1:Ft,mergeUncached:xt}},Qw=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Qw(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},$w=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Qw(i,t);a&&(n&&(n+=` `),n+=a)}return n},eT=function(){return $w(arguments,!1)},tT=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},l=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},u=(t,c)=>{let u=t.length,d=s===null?null:s.n;if(!c){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let f=``,p=-1,m=0,h=!1;for(let e=0;e<u;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Qw(n,!0),!n)continue;h=!0}p<0&&(f=n,p=e),m++}}if(m===0)return``;if(m===1)return e(f);if(h){if(d!==null&&l(d,t))return s=d,d.r;if(s!==null&&s!==d&&l(s,t))return s.r}let g=i.get(f);g===void 0&&(g=a.get(f),g!==void 0&&i.set(f,g));let _=null;if(g!==void 0)outer:for(let e=0;e<g.length;e++){let n=g[e];if(n.t!==m)continue;let r=n.a,i=1;for(let e=p+1;e<u;e++){let n=t[e];if(n&&n!==r[i++])continue outer}_=n;break}if(_===null){let s=f,c=[f];for(let e=p+1;e<u;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);_={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},g===void 0&&i.set(f,g=[]),g.length>=256&&g.shift(),g.push(_),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==_&&(s.n=_),s=_,_.r},d=t=>Array.isArray(t)?u(t.slice(),!1):e(Qw(t,!0));return function(t,n,r){let i=arguments.length;if((i|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&c(i,t,n,r))return s=i,i.r;if(e!==i&&c(e,t,n,r))return e.r}return u([t,n,r],!0)}if(i===1)return typeof t==`string`?e(t):d(t);let a=s;if(a!==null){let e=a.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<i;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(a!==e){let e=a.a,t=0,n=!0;for(let r=0;r<i;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===a.t)return a.r}}let o=[];for(let e=0;e<i;e++)o.push(arguments[e]);return u(o,!0)}},nT=`{"theme":{"animate":[{"$v":"isAny"}],"aspect":["video"],"blur":[{"$v":"isTshirtSize"}],"breakpoint":[{"$v":"isTshirtSize"}],"color":[{"$v":"isAny"}],"container":[{"$v":"isTshirtSize"}],"drop-shadow":[{"$v":"isTshirtSize"}],"ease":["in","out","in-out"],"font":[{"$v":"isAnyNonArbitrary"}],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[{"$v":"isTshirtSize"}],"leading":["none","tight","snug","normal","relaxed","loose"],"perspective":["dramatic","near","normal","midrange","distant","none"],"radius":[{"$v":"isTshirtSize"}],"shadow":[{"$v":"isTshirtSize"}],"spacing":["px",{"$v":"isNumber"}],"text":[{"$v":"isTshirtSize"}],"text-shadow":[{"$v":"isTshirtSize"}],"tracking":["tighter","tight","normal","wide","wider","widest"]},"classGroups":{"aspect":[{"aspect":["auto","square",{"$v":"isFraction"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"aspect"}]}],"container":["container"],"container-type":[{"@container":["","normal","size",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"container-named":[{"$v":"isNamedContainerQuery"}],"columns":[{"columns":[{"$v":"isNumber"},{"$v":"isArbitraryValue"},{"$v":"isArbitraryVariable"},{"$t":"container"}]},"columns-auto"],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],"box":[{"box":["border","content"]}],"display":["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],"sr":["sr-only","not-sr-only"],"float":[{"float":["right","left","none","start","end"]}],"clear":[{"clear":["left","right","both","none","start","end"]}],"isolation":["isolate","isolation-auto"],"object-fit":[{"object":["contain","cover","fill","none","scale-down"]}],"object-position":[{"object":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"overflow":[{"overflow":["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],"overscroll":[{"overscroll":["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],"position":["static","fixed","absolute","relative","sticky"],"inset":[{"inset":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-x":[{"inset-x":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-y":[{"inset-y":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"start":[{"inset-s":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"start":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"end":[{"inset-e":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}],"end":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-bs":[{"inset-bs":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inset-be":[{"inset-be":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"top":[{"top":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"right":[{"right":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"bottom":[{"bottom":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"left":[{"left":[{"$v":"isFraction"},"full","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"visibility":["visible","invisible","collapse"],"z":[{"z":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"basis":[{"basis":[{"$v":"isFraction"},"full","auto",{"$t":"container"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"flex-direction":[{"flex":["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{"flex":["nowrap","wrap","wrap-reverse"]}],"flex":[{"flex":[{"$v":"isNumber"},{"$v":"isFraction"},"auto","initial","none",{"$v":"isArbitraryValue"}]}],"grow":[{"grow":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shrink":[{"shrink":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"order":[{"order":[{"$v":"isInteger"},"first","last","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-cols":[{"grid-cols":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start-end":[{"col":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-start":[{"col-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"col-end":[{"col-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-rows":[{"grid-rows":[{"$v":"isInteger"},"none","subgrid",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start-end":[{"row":["auto",{"span":["full",{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-start":[{"row-start":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"row-end":[{"row-end":[{"$v":"isInteger"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-cols":[{"$t":"spacing"}]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"auto-rows":[{"$t":"spacing"}]}],"gap":[{"gap":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-x":[{"gap-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"gap-y":[{"gap-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"justify-content":[{"justify":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe","normal"]}],"justify-items":[{"justify-items":["start","end","center","stretch","center-safe","end-safe","normal"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"align-content":[{"content":["normal","start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"align-items":[{"items":["start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"align-self":[{"self":["auto","start","end","center","stretch","center-safe","end-safe",{"baseline":["","last"]}]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"]}],"place-items":[{"place-items":["start","end","center","stretch","center-safe","end-safe","baseline"]}],"place-self":[{"place-self":["auto","start","end","center","stretch","center-safe","end-safe"]}],"p":[{"p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"px":[{"px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"py":[{"py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ps":[{"ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pe":[{"pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbs":[{"pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pbe":[{"pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pt":[{"pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pr":[{"pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pb":[{"pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"pl":[{"pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"m":[{"m":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mx":[{"mx":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"my":[{"my":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ms":[{"ms":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"me":[{"me":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbs":[{"mbs":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mbe":[{"mbe":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mt":[{"mt":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mr":[{"mr":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"mb":[{"mb":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"ml":[{"ml":["auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x":[{"space-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"space-y-reverse":["space-y-reverse"],"size":[{"size":[{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"inline-size":[{"inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"inline":[{"$t":"container"}]}],"min-inline-size":[{"min-inline":["auto",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"min-inline":[{"$t":"container"}]}],"max-inline-size":[{"max-inline":["none",{"$v":"isFraction"},"screen","full","dvw","lvw","svw","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},{"max-inline":[{"$t":"container"}]}],"block-size":[{"block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-block-size":[{"min-block":["auto",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-block-size":[{"max-block":["none",{"$v":"isFraction"},"screen","full","lh","dvh","lvh","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"w":[{"w":[{"$t":"container"},"screen",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-w":[{"min-w":[{"$t":"container"},"screen","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-w":[{"max-w":[{"$t":"container"},"screen","none","prose",{"screen":[{"$t":"breakpoint"}]},{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"h":[{"h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"min-h":[{"min-h":["screen","lh","none",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"max-h":[{"max-h":["screen","lh",{"$v":"isFraction"},"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]},"max-h-none"],"font-size":[{"text":["base",{"$t":"text"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{"font":[{"$t":"font-weight"},{"$v":"isArbitraryVariableWeight"},{"$v":"isArbitraryWeight"}]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",{"$v":"isPercent"},{"$v":"isArbitraryValue"}]}],"font-family":[{"font":[{"$v":"isArbitraryVariableFamilyName"},{"$v":"isArbitraryFamilyName"},{"$t":"font"}]}],"font-features":[{"font-features":[{"$v":"isArbitraryValue"}]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],"tracking":[{"tracking":[{"$t":"tracking"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"line-clamp":[{"line-clamp":[{"$v":"isNumber"},"none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryNumber"}]}],"leading":[{"leading":[{"$t":"leading"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"list-image":[{"list-image":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"list-style-position":[{"list":["inside","outside"]}],"list-style-type":[{"list":["disc","decimal","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-alignment":[{"text":["left","center","right","justify","start","end"]}],"placeholder-color":[{"placeholder":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-color":[{"text":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{"decoration":["solid","dashed","dotted","double","wavy"]}],"text-decoration-thickness":[{"decoration":[{"$v":"isNumber"},"from-font","auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryLength"}]}],"text-decoration-color":[{"decoration":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"underline-offset":[{"underline-offset":[{"$v":"isNumber"},"auto",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{"text":["wrap","nowrap","balance","pretty"]}],"indent":[{"indent":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"tab-size":[{"tab":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"vertical-align":[{"align":["baseline","top","middle","bottom","text-top","text-bottom","sub","super",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"whitespace":[{"whitespace":["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],"break":[{"break":["normal","words","all","keep"]}],"wrap":[{"wrap":["break-word","anywhere","normal"]}],"hyphens":[{"hyphens":["none","manual","auto"]}],"content":[{"content":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"bg-attachment":[{"bg":["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{"bg":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-repeat":[{"bg":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"bg-size":[{"bg":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"bg-image":[{"bg":["none",{"linear":[{"to":["t","tr","r","br","b","bl","l","tl"]},{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"radial":["",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}],"conic":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]},{"$v":"isArbitraryVariableImage"},{"$v":"isArbitraryImage"}]},{"bg-gradient-to":["t","tr","r","br","b","bl","l","tl"]},"bg-conic"],"bg-color":[{"bg":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-from-pos":[{"from":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-via-pos":[{"via":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-to-pos":[{"to":[{"$v":"isPercent"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"gradient-from":[{"from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-via":[{"via":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"gradient-to":[{"to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded":[{"rounded":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-s":[{"rounded-s":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-e":[{"rounded-e":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-t":[{"rounded-t":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-r":[{"rounded-r":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-b":[{"rounded-b":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-l":[{"rounded-l":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ss":[{"rounded-ss":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-se":[{"rounded-se":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-ee":[{"rounded-ee":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-es":[{"rounded-es":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tl":[{"rounded-tl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-tr":[{"rounded-tr":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-br":[{"rounded-br":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rounded-bl":[{"rounded-bl":["","none","full",{"$t":"radius"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-w":[{"border":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-x":[{"border-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-y":[{"border-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-s":[{"border-s":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-e":[{"border-e":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-bs":[{"border-bs":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-be":[{"border-be":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-t":[{"border-t":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-r":[{"border-r":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-b":[{"border-b":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"border-w-l":[{"border-l":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x":[{"divide-x":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{"border":["solid","dashed","dotted","double","hidden","none"]}],"divide-style":[{"divide":["solid","dashed","dotted","double","hidden","none"]}],"border-color":[{"border":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-x":[{"border-x":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-y":[{"border-y":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-s":[{"border-s":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-e":[{"border-e":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-bs":[{"border-bs":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-be":[{"border-be":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-t":[{"border-t":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-r":[{"border-r":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-b":[{"border-b":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-color-l":[{"border-l":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"divide-color":[{"divide":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-style":[{"outline":["solid","dashed","dotted","double","none","hidden"]}],"outline-offset":[{"outline-offset":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"outline-w":[{"outline":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"outline-color":[{"outline":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"shadow":[{"shadow":["","none",{"$t":"shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]},"shadow-inner"],"shadow-color":[{"shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-shadow":[{"inset-shadow":["none",{"$t":"inset-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"inset-shadow-color":[{"inset-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-w":[{"ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"ring-w-inset":["ring-inset"],"ring-color":[{"ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ring-offset-w":[{"ring-offset":[{"$v":"isNumber"},{"$v":"isArbitraryLength"}]}],"ring-offset-color":[{"ring-offset":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"inset-ring-w":[{"inset-ring":["",{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"}]}],"inset-ring-color":[{"inset-ring":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"text-shadow":[{"text-shadow":["none",{"$t":"text-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"text-shadow-color":[{"text-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"opacity":[{"opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{"mask":["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[{"$v":"isNumber"}]}],"mask-image-linear-from-pos":[{"mask-linear-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-to-pos":[{"mask-linear-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-linear-from-color":[{"mask-linear-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-linear-to-color":[{"mask-linear-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-from-pos":[{"mask-t-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-to-pos":[{"mask-t-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-t-from-color":[{"mask-t-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-t-to-color":[{"mask-t-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-from-pos":[{"mask-r-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-to-pos":[{"mask-r-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-r-from-color":[{"mask-r-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-r-to-color":[{"mask-r-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-from-pos":[{"mask-b-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-to-pos":[{"mask-b-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-b-from-color":[{"mask-b-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-b-to-color":[{"mask-b-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-from-pos":[{"mask-l-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-to-pos":[{"mask-l-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-l-from-color":[{"mask-l-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-l-to-color":[{"mask-l-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-from-pos":[{"mask-x-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-to-pos":[{"mask-x-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-x-from-color":[{"mask-x-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-x-to-color":[{"mask-x-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-from-pos":[{"mask-y-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-to-pos":[{"mask-y-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-y-from-color":[{"mask-y-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-y-to-color":[{"mask-y-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial":[{"mask-radial":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-from-pos":[{"mask-radial-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-to-pos":[{"mask-radial-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-radial-from-color":[{"mask-radial-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-to-color":[{"mask-radial-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{"closest":["side","corner"],"farthest":["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"]}],"mask-image-conic-pos":[{"mask-conic":[{"$v":"isNumber"}]}],"mask-image-conic-from-pos":[{"mask-conic-from":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-to-pos":[{"mask-conic-to":[{"$v":"isNumber"},{"$v":"isPercent"},{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"}]}],"mask-image-conic-from-color":[{"mask-conic-from":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-image-conic-to-color":[{"mask-conic-to":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"mask-mode":[{"mask":["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{"mask":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariablePosition"},{"$v":"isArbitraryPosition"},{"position":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-repeat":[{"mask":["no-repeat",{"repeat":["","x","y","space","round"]}]}],"mask-size":[{"mask":["auto","cover","contain",{"$v":"isArbitraryVariableSize"},{"$v":"isArbitrarySize"},{"size":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}]}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{"mask":["none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"filter":[{"filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"blur":[{"blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"brightness":[{"brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contrast":[{"contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"drop-shadow":[{"drop-shadow":["","none",{"$t":"drop-shadow"},{"$v":"isArbitraryVariableShadow"},{"$v":"isArbitraryShadow"}]}],"drop-shadow-color":[{"drop-shadow":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"grayscale":[{"grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"hue-rotate":[{"hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"invert":[{"invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"saturate":[{"saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"sepia":[{"sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-filter":[{"backdrop-filter":["","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-blur":[{"backdrop-blur":["","none",{"$t":"blur"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-brightness":[{"backdrop-brightness":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-contrast":[{"backdrop-contrast":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-grayscale":[{"backdrop-grayscale":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-invert":[{"backdrop-invert":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-opacity":[{"backdrop-opacity":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-saturate":[{"backdrop-saturate":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backdrop-sepia":[{"backdrop-sepia":["",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"border-collapse":[{"border":["collapse","separate"]}],"border-spacing":[{"border-spacing":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-x":[{"border-spacing-x":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"border-spacing-y":[{"border-spacing-y":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"table-layout":[{"table":["auto","fixed"]}],"caption":[{"caption":["top","bottom"]}],"transition":[{"transition":["","all","colors","opacity","shadow","transform","none",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transition-behavior":[{"transition":["normal","discrete"]}],"duration":[{"duration":[{"$v":"isNumber"},"initial",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"ease":[{"ease":["linear","initial",{"$t":"ease"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"delay":[{"delay":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"animate":[{"animate":["none",{"$t":"animate"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"backface":[{"backface":["hidden","visible"]}],"perspective":[{"perspective":[{"$t":"perspective"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"perspective-origin":[{"perspective-origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate":[{"rotate":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-x":[{"rotate-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-y":[{"rotate-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"rotate-z":[{"rotate-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale":[{"scale":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-x":[{"scale-x":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-y":[{"scale-y":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-z":[{"scale-z":["none",{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scale-3d":["scale-3d"],"skew":[{"skew":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-x":[{"skew-x":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"skew-y":[{"skew-y":[{"$v":"isNumber"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform":[{"transform":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},"","none","gpu","cpu"]}],"transform-origin":[{"origin":["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"transform-style":[{"transform":["3d","flat"]}],"translate":[{"translate":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-x":[{"translate-x":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-y":[{"translate-y":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-z":[{"translate-z":[{"$v":"isFraction"},"full",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"translate-none":["translate-none"],"zoom":[{"zoom":[{"$v":"isInteger"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"accent":[{"accent":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"appearance":[{"appearance":["none","auto"]}],"caret-color":[{"caret":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"color-scheme":[{"scheme":["normal","dark","light","light-dark","only-dark","only-light"]}],"cursor":[{"cursor":["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],"resize":[{"resize":["none","","y","x"]}],"scroll-behavior":[{"scroll":["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-track-color":[{"scrollbar-track":[{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{"scrollbar":["auto","thin","none"]}],"scroll-m":[{"scroll-m":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mx":[{"scroll-mx":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-my":[{"scroll-my":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ms":[{"scroll-ms":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-me":[{"scroll-me":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbs":[{"scroll-mbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mbe":[{"scroll-mbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mt":[{"scroll-mt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mr":[{"scroll-mr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-mb":[{"scroll-mb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ml":[{"scroll-ml":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-p":[{"scroll-p":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-px":[{"scroll-px":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-py":[{"scroll-py":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-ps":[{"scroll-ps":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pe":[{"scroll-pe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbs":[{"scroll-pbs":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pbe":[{"scroll-pbe":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pt":[{"scroll-pt":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pr":[{"scroll-pr":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pb":[{"scroll-pb":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"scroll-pl":[{"scroll-pl":[{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"},{"$t":"spacing"}]}],"snap-align":[{"snap":["start","end","center","align-none"]}],"snap-stop":[{"snap":["normal","always"]}],"snap-type":[{"snap":["none","x","y","both"]}],"snap-strictness":[{"snap":["mandatory","proximity"]}],"touch":[{"touch":["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],"select":[{"select":["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"fill":[{"fill":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"stroke-w":[{"stroke":[{"$v":"isNumber"},{"$v":"isArbitraryVariableLength"},{"$v":"isArbitraryLength"},{"$v":"isArbitraryNumber"}]}],"stroke":[{"stroke":["none",{"$t":"color"},{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}],"contain":[{"contain":["none","content","strict",{"$v":"isArbitraryVariable"},{"$v":"isArbitraryValue"}]}],"contain-size":[{"contain":["size","inline-size"]}],"contain-layout":["contain-layout"],"contain-paint":["contain-paint"],"contain-style":["contain-style"]},"conflictingClassGroups":{"container-named":["container-type"],"overflow":["overflow-x","overflow-y"],"overscroll":["overscroll-x","overscroll-y"],"inset":["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],"flex":["basis","grow","shrink"],"gap":["gap-x","gap-y"],"p":["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],"px":["pr","pl"],"py":["pt","pb"],"m":["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],"mx":["mr","ml"],"my":["mt","mb"],"size":["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],"rounded":["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"translate":["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],"touch":["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"],"contain":["contain-size","contain-layout","contain-paint","contain-style"],"contain-size":["contain"],"contain-layout":["contain"],"contain-paint":["contain"],"contain-style":["contain"]},"conflictingClassGroupModifiers":{"font-size":["leading"]},"orderSensitiveModifiers":["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"],"postfixLookupClassGroups":["container-type"]}`,rT=()=>JSON.parse(nT),iT=e=>`classGroups`in e&&`theme`in e&&`conflictingClassGroups`in e,aT=e=>e===void 0?{config:rT()}:typeof e==`function`?{config:e(rT())}:iT(e)?{config:e}:{config:Pw(rT(),e),cacheSize:e.cacheSize},oT=e=>{let{config:t,cacheSize:n}=aT(e),{tables:r,validatorImpls:i,prefix:a}=Gw(t);return Zw(r,i,{cacheSize:n,prefix:a})},Y=(e=>{let t=null,n=()=>t??=oT(e);return tT(e=>n().mergeString(e),{seenBefore:e=>n().seenBefore(e),mergeUncached:e=>n().mergeUncached(e)})})({extend:{theme:{spacing:[...AC]}}});function sT(e,t){return typeof e==`function`?e(t):e}var cT=Object.freeze({reduced:!1,squish:90,fast:120,normal:180,slow:280,springDuration:320,bounce:.3,stretch:.28,distance:4,stagger:24,blur:0,shake:3,steps:0,fuse:1,pressDepth:.5,pressScale:1,ease:`cubic-bezier(0.2, 0, 0, 1)`,easeExit:`cubic-bezier(0.4, 0, 1, 1)`}),lT=`(prefers-reduced-motion: reduce)`;function uT(e){let t=e.ownerDocument.defaultView;if(!t)return cT;let n=t.getComputedStyle(e),r=(e,t)=>{let r=n.getPropertyValue(e).trim(),i=Number.parseFloat(r);return Number.isFinite(i)?Math.max(0,i):t},i=(e,t)=>{let i=n.getPropertyValue(e).trim();return r(e,t)*(i.endsWith(`s`)&&!i.endsWith(`ms`)?1e3:1)},a=t.matchMedia?.(lT).matches??!1,o=(e,t)=>a?120:i(`--stipe-motion-${e}`,t),s=(e,t)=>a?0:r(`--stipe-motion-${e}`,t);return{reduced:a,squish:o(`squish`,cT.squish),fast:o(`fast`,cT.fast),normal:o(`normal`,cT.normal),slow:o(`slow`,cT.slow),springDuration:o(`spring-duration`,cT.springDuration),bounce:Math.min(1,s(`bounce`,cT.bounce)),stretch:s(`stretch`,cT.stretch),distance:s(`distance`,cT.distance),stagger:a?0:i(`--stipe-motion-stagger`,cT.stagger),blur:s(`blur`,cT.blur),shake:s(`shake`,cT.shake),steps:Math.floor(s(`steps`,cT.steps)),fuse:r(`--stipe-motion-fuse`,cT.fuse),pressDepth:a?0:r(`--stipe-press-depth`,cT.pressDepth),pressScale:a?1:r(`--stipe-press-scale`,cT.pressScale),ease:n.getPropertyValue(`--stipe-motion-ease`).trim()||cT.ease,easeExit:n.getPropertyValue(`--stipe-motion-ease-exit`).trim()||cT.easeExit}}function dT(e,t){let n=e.createElement(`div`);n.setAttribute(`style`,t??``);let r=new Map;for(let e of n.style)(e.startsWith(`--stipe-motion-`)||e.startsWith(`--stipe-press-`))&&r.set(e,n.style.getPropertyValue(e).trim());return r}function fT(e){let t=e.target;if(e.attributeName!==`style`||!(t instanceof Element))return!0;let n=t.ownerDocument,r=dT(n,e.oldValue),i=dT(n,t.getAttribute(`style`));return r.size!==i.size||[...i].some(([e,t])=>r.get(e)!==t)}function pT(e){let[t,n]=(0,M.useState)(()=>({...cT,reduced:!0}));return(0,M.useLayoutEffect)(()=>{let t=e.current,r=t?.ownerDocument.defaultView;if(!t||!r)return;let i=()=>{let e=uT(t);n(t=>JSON.stringify(t)===JSON.stringify(e)?t:e)};i();let a=new r.MutationObserver(e=>{e.some(fT)&&i()});for(let e=t;e;e=e.parentElement)a.observe(e,{attributes:!0,attributeFilter:[`data-theme`,`class`,`style`],attributeOldValue:!0});let o=r.matchMedia?.(lT);return o?.addEventListener(`change`,i),()=>{a.disconnect(),o?.removeEventListener(`change`,i)}},[e]),t}function mT(e,t){return e.reduced?0:Math.round(t*e.normal/cT.normal)}function hT(e,t){if(e.reduced)return 0;let n=t*e.bounce/cT.bounce;return Math.min(.9,Math.max(0,n))}function gT(e,t){return e.reduced?0:Math.round(t*e.springDuration/cT.springDuration)}function _T(e,t){return e.steps>0?`steps(${String(e.steps)}, end)`:t}function vT(e){return`animate`in e}var yT=globalThis;function bT(){return yT.matchMedia?.(lT).matches??!1}function xT(e){let t=yT.matchMedia?.(lT);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function ST(){return!0}function CT(){return(0,M.useSyncExternalStore)(xT,bT,ST)}var wT=(0,M.forwardRef)(function({asChild:e=!1,className:t,...n},r){let i=Y(`absolute h-px w-px overflow-hidden whitespace-nowrap border-0 p-0 [clip:rect(0,0,0,0)]`,t);return e?(0,q.jsx)(_C,{...n,className:i,ref:r}):(0,q.jsx)(`span`,{...n,className:i,ref:r})}),TT=ht*10,ET=class{constructor(e={}){let t=!pr(e.bounce)||!pr(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/ht,this.maxIterations=this.maxDuration/this.timeStep/ht,this.bn=yi(Vr(e.bounce,.5),-1,1),this.pd=yi(Vr(e.duration,628),10*Ne.timeScale,TT*Ne.timeScale),this.m=yi(Vr(e.mass,1),1,TT),this.s=yi(Vr(e.stiffness,100),f,TT),this.d=yi(Vr(e.damping,10),f,TT),this.v=yi(Vr(e.velocity,0),-TT,TT),this.w0=0,this.zeta=0,this.wd=0,this.b=0,this.completed=!1,this.solverDuration=0,this.settlingDuration=0,this.parent=null,this.onComplete=e.onComplete||It,t&&this.calculateSDFromBD(),this.compute(),this.ease=e=>{let t=e*this.settlingDuration,n=this.completed,r=this.pd;return t>=r&&!n&&(this.completed=!0,this.onComplete(this.parent)),t<r&&n&&(this.completed=!1),e===0||e===1?e:this.solve(e*this.solverDuration)}}solve(e){let{zeta:t,w0:n,wd:r,b:i}=this,a=e;return a=t<1?Ai(-a*t*n)*(1*xn(r*a)+i*rt(r*a)):t===1?(1+i*a)*Ai(-a*n):((1+i)*Ai((-t*n+r)*a)+(1-i)*Ai((-t*n-r)*a))/2,1-a}calculateSDFromBD(){let e=Ne.timeScale===1?this.pd/ht:this.pd;this.m=1,this.v=0,this.s=Re(2*Tr/e,2),this.d=this.bn>=0?(1-this.bn)*4*Tr/e:4*Tr/(e*(1+this.bn)),this.s=Ge(yi(this.s,f,TT),3),this.d=Ge(yi(this.d,f,300),3)}calculateBDFromSD(){let e=2*Tr/oe(this.s);this.pd=e*(Ne.timeScale===1?ht:1),this.bn=this.d/(2*oe(this.s))<=1?1-this.d*e/(4*Tr):4*Tr/(this.d*e)-1,this.bn=Ge(yi(this.bn,-1,1),3),this.pd=Ge(yi(this.pd,10*Ne.timeScale,TT*Ne.timeScale),3)}compute(){let{maxRestSteps:e,maxIterations:t,restThreshold:n,timeStep:r,m:i,d:a,s:o,v:s}=this,c=this.w0=yi(oe(o/i),f,ht),l=this.zeta=a/(2*oe(o*i));l<1?(this.wd=c*oe(1-l*l),this.b=(l*c+-s)/this.wd):l===1?(this.wd=0,this.b=-s+c):(this.wd=c*oe(l*l-1),this.b=(l*c+-s)/this.wd);let u=0,d=0,p=0;for(;d<=e&&p<=t;)Zn(1-this.solve(u))<n?d++:d=0,this.solverDuration=u,u+=r,p++;this.settlingDuration=Ge(this.solverDuration*ht,0)*Ne.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=yi(Vr(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=yi(Vr(e,1),10*Ne.timeScale,TT*Ne.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=yi(Vr(e,100),f,TT),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=yi(Vr(e,10),f,TT),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=yi(Vr(e,1),1,TT),this.compute()}get velocity(){return this.v}set velocity(e){this.v=yi(Vr(e,0),-TT,TT),this.compute()}},DT=e=>new ET(e),OT=(e=10,t)=>{let n=t?un:xt;return t=>n(yi(t,0,1)*e)*(1/e)},kT=(0,M.forwardRef)(function({id:e,transform:t},n){return(0,q.jsxs)(`radialGradient`,{ref:n,id:e,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`-1.6`,r:`5.6`,gradientTransform:t,children:[(0,q.jsx)(`stop`,{offset:`0`,stopColor:`color-mix(in oklab, var(--color-white) calc(var(--depth) * 50%), currentColor)`}),(0,q.jsx)(`stop`,{offset:`1`,stopColor:`currentColor`})]})});function AT({id:e}){return(0,q.jsx)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:(0,q.jsx)(`feDropShadow`,{dx:`0`,dy:`1.5`,stdDeviation:`1`,floodColor:`currentColor`,style:{floodOpacity:`calc(var(--depth) * 0.6)`}})})}function jT({id:e}){return(0,q.jsxs)(`filter`,{id:e,x:`-10%`,y:`-10%`,width:`120%`,height:`120%`,colorInterpolationFilters:`sRGB`,children:[(0,q.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.3`,result:`soft-edge`}),(0,q.jsx)(`feOffset`,{in:`soft-edge`,dx:`0.25`,dy:`0.45`,result:`lower-edge`}),(0,q.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`lower-edge`,operator:`out`,result:`inner-shadow`}),(0,q.jsx)(`feFlood`,{floodColor:`var(--color-black)`,floodOpacity:`calc(var(--depth) * 0.28)`}),(0,q.jsx)(`feComposite`,{in2:`inner-shadow`,operator:`in`,result:`shade`}),(0,q.jsx)(`feOffset`,{in:`soft-edge`,dx:`-0.2`,dy:`-0.35`,result:`upper-edge`}),(0,q.jsx)(`feComposite`,{in:`SourceAlpha`,in2:`upper-edge`,operator:`out`,result:`inner-highlight`}),(0,q.jsx)(`feFlood`,{floodColor:`var(--color-white)`,floodOpacity:`calc(var(--depth) * 0.7)`}),(0,q.jsx)(`feComposite`,{in2:`inner-highlight`,operator:`in`,result:`highlight`}),(0,q.jsxs)(`feMerge`,{children:[(0,q.jsx)(`feMergeNode`,{in:`SourceGraphic`}),(0,q.jsx)(`feMergeNode`,{in:`shade`}),(0,q.jsx)(`feMergeNode`,{in:`highlight`})]})]})}var MT=Object.freeze({alphaIntercept:-8,alphaSlope:18,blurStdDeviation:2});function NT({id:e,values:t=kC}){return(0,q.jsxs)(`filter`,{id:e,x:`-50%`,y:`-50%`,width:`200%`,height:`200%`,children:[(0,q.jsx)(`feGaussianBlur`,{in:`SourceGraphic`,stdDeviation:t.blurStdDeviation,result:`blur`}),(0,q.jsx)(`feColorMatrix`,{in:`blur`,values:`1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 ${String(t.alphaSlope)} ${String(t.alphaIntercept)}`,result:`gooey`}),(0,q.jsx)(`feComposite`,{in:`SourceGraphic`,in2:`gooey`,operator:`atop`})]})}function PT(e,t){let n=e.ownerDocument,r=!0,i=()=>{t(r&&!n.hidden)},a=globalThis,o=`IntersectionObserver`in globalThis&&a.IntersectionObserver?new a.IntersectionObserver(t=>{let n=t.find(t=>t.target===e);n&&(r=n.isIntersecting,i())}):void 0;return o?.observe(e),n.addEventListener(`visibilitychange`,i),i(),()=>{o?.disconnect(),n.removeEventListener(`visibilitychange`,i)}}function FT(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function IT(e,t){let n=Math.max(0,Math.min(1,(t-(e-1)*.085)/.68));return Math.sin(n*Math.PI)**2}function LT(e,t,n){let r=n*Math.PI*2,i=t*2.1,a=Math.sin(r*2+i)*.15,o={rx:4*(1+a),ry:4/(1+a)};if(e===`line`){let e=7.5+4*Math.cos(r+(t===2?-.45:0));return{cx:(t-1)*e,cy:Math.sin(r+i)*.7,...o}}if(e===`square`){let e=4.7+2.7*Math.cos(r);return{cx:(t%2?1:-1)*e,cy:(t<2?-1:1)*e,...o}}if(e===`donut`){let e=FT(n/.66)*Math.PI*2,o=Math.min(e,t*Math.PI/8)-Math.PI/2,s=FT((n-.79)/.21),c=8+Math.sin(r*2+i)*.35*Math.sin(n*Math.PI);return{cx:Math.cos(o)*c*(1-s),cy:Math.sin(o)*c*(1-s)-8*s,rx:3.6*(1+a*Math.sin(n*Math.PI)),ry:3.6/(1+a*Math.sin(n*Math.PI))}}if(e===`bloom`){if(t===0){let e=[1,2,3,4].reduce((e,t)=>e+IT(t,n),0),t=Math.sqrt(49-e*4);return{cx:Math.sin(r)*.4,cy:Math.sin(r*2)*.4,rx:t*(1+a),ry:t/(1+a)}}let e=IT(t,n),i=(t-1)*Math.PI/2-Math.PI/4+Math.sin(r)*.22;return{cx:Math.cos(i)*14*e,cy:Math.sin(i)*14*e,rx:3.2*(1+a),ry:3.2/(1+a)}}return{cx:Math.sin(r+i)*6+Math.sin(r*3+i)*2.5,cy:Math.cos(r*2+i)*6,...o}}var RT={line:1700,square:1900,donut:3e3,wander:4600,bloom:2800},zT=2;function BT({variant:e,pace:t=`working`}){let n=`caps-loader-${(0,M.useId)().replaceAll(`:`,``)}`,r=(0,M.useRef)(null),i=(0,M.useRef)(null),a=pT(i),{reduced:o}=a,s=e===`donut`?16:e===`bloom`?5:e===`square`?4:3;return(0,M.useLayoutEffect)(()=>{if(!r.current||!i.current||o&&t===`idle`)return;let n=o?[nr(r.current,{opacity:[.55,1],duration:a.slow*10,ease:`inOutSine`,alternate:!0,loop:!0})]:[...r.current.querySelectorAll(`ellipse`)].map((n,r)=>nr(n,{keyframes:Array.from({length:48},(n,i)=>({...LT(e,r,(i+1)/48),duration:mT(a,RT[e]*(t===`idle`?zT:1))/48})),ease:`linear`,loop:!0})),s=PT(i.current,e=>{for(let t of n)e?t.resume():t.pause()});return()=>{s();for(let e of n)e.revert()}},[e,t,o,a]),(0,q.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,focusable:`false`,viewBox:e===`line`?`-20 -10 40 20`:`-20 -20 40 40`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsx)(NT,{id:n,values:MT}),(0,q.jsx)(kT,{id:`${n}-surface`,transform:e===`line`?`matrix(3.4 0 0 1.4 0 0)`:`matrix(3 0 0 3 0 0)`}),(0,q.jsx)(AT,{id:`${n}-shadow`}),(0,q.jsx)(`mask`,{id:`${n}-mask`,maskUnits:`userSpaceOnUse`,x:`-20`,y:`-20`,width:`40`,height:`40`,style:{maskType:`alpha`},children:(0,q.jsx)(`g`,{ref:r,fill:`currentColor`,filter:`url(#${n})`,children:Array.from({length:s},(t,n)=>(0,q.jsx)(`ellipse`,{...LT(e,n,0)},n))})})]}),(0,q.jsx)(`g`,{filter:`url(#${n}-shadow)`,children:(0,q.jsx)(`rect`,{x:`-20`,y:`-20`,width:`40`,height:`40`,fill:`url(#${n}-surface)`,mask:`url(#${n}-mask)`})})]})}var VT={sm:`caps-loader-sm`,md:`caps-loader-md`,lg:`caps-loader-lg`,fill:`caps-loader-fill`},HT={neutral:`text-base-content`,accent:`text-accent`,primary:`text-primary`,success:`text-success`,current:`text-current`},UT=(0,M.forwardRef)(function({"aria-label":e,"aria-labelledby":t,className:n,decorative:r=!1,label:i=`Loading`,size:a=`md`,variant:o=`line`,pace:s=`working`,tone:c=`neutral`,...l},u){let d=`${(0,M.useId)()}-label`,f=!r&&e===void 0&&t===void 0;return(0,q.jsxs)(`span`,{...l,"aria-label":r?void 0:e,"aria-hidden":r||void 0,"aria-labelledby":r?void 0:t??(e===void 0?d:void 0),className:Y(`caps-loader`,VT[a],HT[c],n),"data-variant":o,"data-pace":s,role:r?void 0:`status`,ref:u,children:[(0,q.jsx)(BT,{variant:o,pace:s}),f?(0,q.jsx)(wT,{id:d,children:i}):null]})}),WT=`disabled:bg-base-200 disabled:text-base-content disabled:outline-1 disabled:outline-solid disabled:outline-base-content/25 aria-disabled:bg-base-200 aria-disabled:text-base-content aria-disabled:outline-1 aria-disabled:outline-solid aria-disabled:outline-base-content/25`,GT=FC(`btn caps-button disabled:pointer-events-none`,{variants:{variant:{primary:`btn-primary caps-button-filled`,secondary:`btn-secondary caps-button-filled`,accent:`btn-accent caps-button-filled`,destructive:`btn-error caps-button-filled`,outline:`btn-outline ${WT}`,ghost:`btn-ghost`,"ghost-destructive":`btn-ghost caps-button-ghost-destructive`,link:`btn-link ${WT}`},size:{xs:`btn-xs`,sm:`btn-sm`,default:`btn-md`,lg:`btn-lg`,icon:`btn-square btn-md`,menubar:`caps-button-menubar`}},defaultVariants:{variant:`primary`,size:`default`}}),KT=(0,M.forwardRef)(function({asChild:e=!1,children:t,className:n,disabled:r,loading:i=!1,result:a,resultLabel:o,onResultEnd:s,size:c=`default`,variant:l=`primary`,...u},d){let f=Y(GT({size:c,variant:l}),n),p=(0,M.useRef)(a).current,m=(0,M.useRef)(null);return(0,M.useImperativeHandle)(d,()=>m.current),qT(m,i,a),e?(0,q.jsx)(_C,{...u,"aria-busy":i?!0:u[`aria-busy`],"aria-disabled":r===!0||i?!0:void 0,className:f,ref:m,children:t}):(0,q.jsx)(`button`,{...u,"aria-busy":i?!0:u[`aria-busy`],className:f,disabled:r===!0||i,ref:m,type:u.type??`button`,children:a===void 0&&o===void 0?(0,q.jsxs)(q.Fragment,{children:[i?(0,q.jsx)(UT,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,t]}):(0,q.jsx)(QT,{label:o,loading:i,onResultEnd:s,result:a,settled:p,children:t})})});function qT(e,t,n){let r=(0,M.useRef)(null),i=(0,M.useRef)(null),a=(0,M.useRef)(null);(0,M.useLayoutEffect)(()=>{let o=e.current;if(!o)return;let s=JSON.stringify([t,n??null,o.textContent]),c=s!==i.current;i.current=s;let l=a.current;if(!c&&l)return;let u=l?o.offsetWidth:r.current;l&&(a.current=null,l.cancel(),o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`));let d=o.offsetWidth;if(r.current=d>0?d:null,!c||u===null||d===0||Math.abs(u-d)<1||!vT(o))return;let f=uT(o);if(f.reduced)return;let p=o.animate([{width:`${String(u)}px`},{width:`${String(d)}px`}],{duration:f.normal,easing:_T(f,f.ease)});a.current=p,o.style.overflow=`clip`,o.style.whiteSpace=`nowrap`;let m=()=>{a.current===p&&(a.current=null,o.style.removeProperty(`overflow`),o.style.removeProperty(`white-space`))};p.onfinish=m,p.oncancel=m})}var JT=1100;function YT(e,t){let n=t.bounce/.3,r=1+.05*Math.min(1.4,.4+n),i=1-.02*Math.min(1.4,n);return e.animate([{transform:`scale(1)`},{transform:`scale(${String(r)})`,offset:.35},{transform:`scale(${String(i)})`,offset:.7},{transform:`scale(1)`}],{duration:t.springDuration,easing:_T(t,`ease-out`)})}function XT(e,t){let n=t.shake;return e.animate([{transform:`none`},{transform:`translateX(${String(-n)}px)`},{transform:`translateX(${String(n)}px)`},{transform:`translateX(${String(-n*.6)}px)`},{transform:`translateX(${String(n*.3)}px)`},{transform:`none`}],{duration:t.slow*1.3,easing:_T(t,`linear`)})}function ZT(e,t,n){let r=n.distance+2,i=`blur(${String(n.blur)}px)`;return[e.animate([{opacity:1,transform:`none`,filter:`blur(0px)`},{opacity:0,transform:`translateY(${String(-r)}px)`,filter:i}],{duration:n.fast,easing:_T(n,n.ease)}),t.animate([{opacity:0,transform:`translateY(${String(r)}px)`,filter:i},{opacity:1,transform:`none`,filter:`blur(0px)`}],{duration:n.normal,easing:_T(n,n.ease),fill:`backwards`})]}function QT({children:e,label:t,loading:n,onResultEnd:r,result:i,settled:a}){let o=(0,M.useRef)(null),s=CT(),[c,l]=(0,M.useState)(!1),[u,d]=(0,M.useState)(!1);c&&!u&&d(!0);let f=(0,M.useRef)(a),p=(0,M.useRef)(r);(0,M.useEffect)(()=>{p.current=r},[r]),(0,M.useLayoutEffect)(()=>{let e=f.current;if(f.current=i,i===e)return;if(i===`done`){l(!0);let e=setTimeout(()=>{p.current?p.current():l(!1)},JT);return()=>{clearTimeout(e)}}l(!1);let t=o.current;if(i!==`failed`||!t||!vT(t))return;let n=uT(t);if(n.shake<=0)return;let r=XT(t,n);return()=>{r.cancel()}},[i,s]);let m=(0,M.useRef)(c);return(0,M.useLayoutEffect)(()=>{let e=o.current;if(!e||m.current===c)return;m.current=c;let t=e.querySelector(`[data-face="label"]`),n=e.querySelector(`[data-face="result"]`);if(!t||!n||!vT(e)){c||d(!1);return}let r=uT(e),i=c?ZT(t,n,r):ZT(n,t,r);if(c||i[0]?.addEventListener(`finish`,()=>{d(!1)}),c&&!r.reduced){i.push(YT(e.closest(`button`)??e,r));let t=n.querySelector(`path`);t&&i.push(t.animate([{strokeDashoffset:1},{strokeDashoffset:0}],{duration:r.normal*1.4,delay:r.fast/2,easing:_T(r,r.ease),fill:`backwards`}))}return()=>{for(let e of i)e.cancel()}},[c,s]),(0,q.jsxs)(`span`,{ref:o,className:`caps-button-faces`,"data-showing":c?`result`:`label`,children:[(0,q.jsxs)(`span`,{className:`caps-button-face`,"data-face":`label`,"aria-hidden":c?!0:void 0,children:[n||c?(0,q.jsx)(UT,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,e]}),u?(0,q.jsxs)(`span`,{className:`caps-button-face`,"data-face":`result`,"aria-hidden":!c||void 0,children:[(0,q.jsx)(`svg`,{className:`caps-button-check`,viewBox:`0 0 24 24`,"aria-hidden":`true`,focusable:`false`,children:(0,q.jsx)(`path`,{d:`M4.5 12.5 9.5 17.5 19.5 6.5`,pathLength:1})}),t===void 0?e:t]}):null]})}function $T(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var eE=$T(`https://base-ui.com/production-error`,`Base UI`),tE={};function nE(e,t){let n=M.useRef(tE);return n.current===tE&&(n.current=e(t)),n}function rE(e,t,n,r){let i=nE(aE).current;return oE(i,e,t,n,r)&&cE(i,[e,t,n,r]),i.callback}function iE(e){let t=nE(aE).current;return sE(t,e)&&cE(t,e),t.callback}function aE(){return{callback:null,cleanup:null,refs:[]}}function oE(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function sE(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function cE(e,t){if(e.refs=t,t.every(e=>e==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var lE=18;function uE(e){return lE>=e}function dE(e){if(!M.isValidElement(e))return null;let t=e,n=t.props;return(uE(19)?n?.ref:t.ref)??null}function fE(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function pE(){}var mE=Object.freeze([]),hE=Object.freeze({});function gE(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e);continue}i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function _E(e,t){return typeof e==`function`?e(t):e}function vE(e,t){return typeof e==`function`?e(t):e}var yE={};function bE(e,t,n,r,i){if(!n&&!r&&!i&&!e)return SE(t);let a=SE(e);return t&&(a=CE(a,t)),n&&(a=CE(a,n)),r&&(a=CE(a,r)),i&&(a=CE(a,i)),a}function xE(e){if(e.length===0)return yE;if(e.length===1)return SE(e[0]);let t=SE(e[0]);for(let n=1;n<e.length;n+=1)t=CE(t,e[n]);return t}function SE(e){return DE(e)?{...e(yE)}:wE(e)}function CE(e,t){return DE(t)?t(e):TE(e,t)}function wE(e){let t={...e};for(let e in t){let n=t[e];EE(e,n)&&(t[e]=kE(n))}return t}function TE(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=fE(e.style,r);break;case`className`:e[n]=jE(e.className,r);break;default:e[n]=EE(n,r)?OE(e[n],r):r}}return e}function EE(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function DE(e){return typeof e==`function`}function OE(e,t){return t?e?(...n)=>{let r=n[0];if(ME(r)){let i=r;AE(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:kE(t):e}function kE(e){return e&&((...t)=>{let n=t[0];return ME(n)&&AE(n),e(...t)})}function AE(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function jE(e,t){return t?e?t+` `+e:t:e}function ME(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function NE(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=LE(r));let i=PE(t,n,r);if(n.enabled===!1)return null;let a=n.state??hE;return RE(e,r,i,a)}function PE(e,t,n){let{className:r,style:i}=e,{state:a=hE,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?_E(r,a):void 0,d=l?vE(i,a):void 0,f=l?gE(a,c):hE,p=l&&s?FE(s):void 0,m=l?fE(f,p)??{}:hE;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?iE([m.ref,dE(n),...o]):rE(m.ref,dE(n),o):rE(null,null)),l?(u!==void 0&&(m.className=jE(m.className,u)),d!==void 0&&(m.style=fE(m.style,d)),m):hE}function FE(e){return Array.isArray(e)?xE(e):bE(void 0,e)}var IE=Symbol.for(`react.lazy`);function LE(e){if(e?.$$typeof!==IE)return e;let t=M.Children.toArray(e)[0];return M.isValidElement(t)?t:e}function RE(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=bE(n,t.props);return e.ref=n.ref,M.cloneElement(t,e)}return zE(e,n)}function zE(e,t){return e===`button`?(0,M.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,M.createElement)(`img`,{alt:``,...t,key:t.key}):M.createElement(e,t)}var BE=`data-starting-style`,VE=`data-ending-style`,HE={[BE]:``},UE={[VE]:``},WE={transitionStatus(e){return e===`starting`?HE:e===`ending`?UE:null}},GE=`data-open`,KE=`data-closed`,qE=`data-anchor-hidden`,JE=`data-popup-open`,YE=`data-pressed`,XE={[JE]:``},ZE={[JE]:``,[YE]:``},QE={[GE]:``},$E={[KE]:``},eD={[qE]:``},tD={open(e){return e?XE:null}},nD={open(e){return e?ZE:null}},rD={open(e){return e?QE:$E},anchorHidden(e){return e?eD:null}},iD={...rD,...WE},aD=`none`,oD=`trigger-press`,sD=`trigger-hover`,cD=`trigger-focus`,lD=`outside-press`,uD=`item-press`,dD=`close-press`,fD=`focus-out`,pD=`escape-key`,mD=`list-navigation`,hD=`keyboard`,gD=`pointer`,_D=`cancel-open`,vD=`sibling-open`,yD=`disabled`,bD=`imperative-action`;function xD({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=M.useRef(e!==void 0),[a,o]=M.useState(()=>t);return[i&&e!==void 0?e:a,M.useCallback(e=>{i||o(e)},[])]}function SD(){return typeof window<`u`}function CD(e){return ED(e)?(e.nodeName||``).toLowerCase():`#document`}function wD(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function TD(e){return((ED(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ED(e){return SD()?e instanceof Node||e instanceof wD(e).Node:!1}function DD(e){return SD()?e instanceof Element||e instanceof wD(e).Element:!1}function OD(e){return SD()?e instanceof HTMLElement||e instanceof wD(e).HTMLElement:!1}function kD(e){return!SD()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof wD(e).ShadowRoot}function AD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=VD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function jD(e){return/^(table|td|th)$/.test(CD(e))}function MD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ND=/transform|translate|scale|rotate|perspective|filter/,PD=/paint|layout|strict|content/,FD=e=>!!e&&e!==`none`,ID;function LD(e){let t=DD(e)?VD(e):e;return FD(t.transform)||FD(t.translate)||FD(t.scale)||FD(t.rotate)||FD(t.perspective)||!zD()&&(FD(t.backdropFilter)||FD(t.filter))||ND.test(t.willChange||``)||PD.test(t.contain||``)}function RD(e){let t=UD(e);for(;OD(t)&&!BD(t);){if(LD(t))return t;if(MD(t))return null;t=UD(t)}return null}function zD(){return ID??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ID}function BD(e){return/^(html|body|#document)$/.test(CD(e))}function VD(e){return wD(e).getComputedStyle(e)}function HD(e){return DD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function UD(e){if(CD(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||kD(e)&&e.host||TD(e);return kD(t)?t.host:t}function WD(e){let t=UD(e);return BD(t)?(e.ownerDocument||e).body:OD(t)&&AD(t)?t:WD(t)}function GD(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=WD(e),i=r===e.ownerDocument?.body,a=wD(r);if(i){let e=KD(a);return t.concat(a,a.visualViewport||[],AD(r)?r:[],e&&n?GD(e):[])}return t.concat(r,GD(r,[],n))}function KD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var qD={...M},JD=qD.useInsertionEffect,YD=JD&&JD!==qD.useLayoutEffect?JD:e=>e();function XD(e){let t=nE(ZD).current;return t.next=e,YD(t.effect),t.trampoline}function ZD(){let e={next:void 0,callback:QD,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function QD(){}var $D=typeof document<`u`?M.useLayoutEffect:()=>{},eO=M.createContext(void 0);function tO(e=!1){let t=M.useContext(eO);if(t===void 0&&!e)throw Error(eE(16));return t}function nO(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:M.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function rO(e){return e?.ownerDocument||document}function iO(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(wD(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function aO(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=M.useRef(null),s=tO(!0),c=a??s!==void 0,{props:l}=nO({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=M.useCallback(()=>{let e=o.current;oO(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return $D(u,[u]),{getButtonProps:M.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return bE({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(AE(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=oO(r),s=!i&&sO(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),iO(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),iO(r,e)))},onKeyUp(e){if(!t){if(AE(e),a?.(e),e.target===e.currentTarget&&i&&c&&oO(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),iO(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:XD(e=>{o.current=e,u()})}}function oO(e){return OD(e)&&e.tagName===`BUTTON`}function sO(e){return OD(e)&&e.tagName===`A`&&!!e.href}function cO(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:lO,platform:uO,maxTouchPoints:dO}=cO(),fO=lO.toLowerCase(),pO=uO.toLowerCase(),mO=/^i(os$|p)/.test(pO)||pO===`macintel`&&dO>1,hO=`android`,gO=pO===hO||fO.includes(hO),_O=!mO&&pO.startsWith(`mac`);pO.startsWith(`win`),!gO&&/^(linux|chrome os)/.test(pO);var vO=_O||mO,yO=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!yO&&fO.includes(`firefox`),!yO&&fO.includes(`chrom`);var bO=vO,xO=/jsdom|happydom/.test(fO);function SO(){let[,e]=M.useState({});return M.useCallback(()=>{e({})},[])}var CO=0;function wO(e,t=`mui`){let n=M.useRef(void 0),r=SO(),i=e??n.current;return M.useEffect(()=>{n.current??(CO+=1,n.current=`${t}-${CO}`,e??r())},[e,t,r]),i}var TO=qD.useId;function EO(e,t){if(TO!==void 0){let n=TO();return e??(t?`${t}-${n}`:n)}return wO(e,t)}function DO(e){return EO(e,`base-ui`)}function OO(e,t,n,r){let i=!1,a=!1,o=r??hE;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function kO(e,t,n){let r=n??hE;return{reason:e,event:t??new Event(`base-ui`),...r}}function AO(e){M.useEffect(e,mE)}var jO=null;globalThis.requestAnimationFrame;var MO=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},NO=class e{static create(){return new e}static request(e){return MO.request(e)}static cancel(e){return MO.cancel(e)}currentId=jO;request(e){this.cancel(),this.currentId=MO.request(()=>{this.currentId=jO,e()})}cancel=()=>{this.currentId!==jO&&(MO.cancel(this.currentId),this.currentId=jO)};disposeEffect=()=>this.cancel};function PO(){let e=nE(NO.create).current;return AO(e.disposeEffect),e}function FO(e,t=!1,n=!1,r=!1){let[i,a]=M.useState(e&&t?`idle`:void 0),[o,s]=M.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),$D(()=>{if(!e&&o&&i!==`ending`&&n){let e=NO.request(()=>{a(`ending`)});return()=>{NO.cancel(e)}}},[e,o,i,n]),$D(()=>{if(!e||t||i===void 0)return;let n=NO.request(()=>{a(void 0)});return()=>{NO.cancel(n)}},[t,e,i]),$D(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=NO.request(()=>{a(`idle`)});return()=>{NO.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function IO(e){return e==null?e:`current`in e?e.current:e}function LO(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var RO=null;function zO(e){if(!RO){let e=[];RO=e,queueMicrotask(()=>{RO=null,sy.flushSync(()=>{for(let t of e)t()})})}RO.push(e)}function BO(e,t=!1,n=!1){let r=PO();return XD((i,a=null)=>{r.cancel();let o=IO(e);if(o==null)return;let s=o,c=()=>{if(!n){sy.flushSync(i);return}zO(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(LO(s).map(e=>e.finished.then(pE))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(LO(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=BE;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0});return}r.request(l)})}function VO(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=XD(a),s=BO(r,n,i);M.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var HO=0,UO=class e{static create(){return new e}currentId=HO;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=HO,t()},e)}isStarted(){return this.currentId!==HO}clear=()=>{this.currentId!==HO&&(clearTimeout(this.currentId),this.currentId=HO)};disposeEffect=()=>this.clear};function WO(){let e=nE(UO.create).current;return AO(e.disposeEffect),e}function GO(e){e.preventDefault(),e.stopPropagation()}function KO(e){return`nativeEvent`in e}function qO(e){return e.pointerType===``&&e.isTrusted?!0:gO&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function JO(e){return xO?!1:!gO&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(gO||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function YO(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function XO(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function ZO(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function QO(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&kD(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $O(e,t){let n=e;for(;n;){if(DD(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(kD(n)?n.host:null)}return null}function ek(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var tk=`data-base-ui-focusable`,nk=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,rk=`ArrowLeft`,ik=`ArrowRight`,ak=`ArrowUp`,ok=`ArrowDown`,sk=`data-trigger-disabled`;function ck(e,t){if(!DD(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(sk);for(let[,e]of t.entries())if(QO(e,n))return!e.hasAttribute(sk);return!1}function lk(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function uk(e){return e.matches(`html,body`)}function dk(e){return OD(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function fk(e){return $O(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${nk}`)!=null}function pk(e){return e?e.getAttribute(`role`)===`combobox`&&dk(e):!1}function mk(e){if(!e||xO)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function hk(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function gk(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function _k(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function vk(e){let t=nE(yk,e).current;return t.next=e,$D(t.effect),t}function yk(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var bk={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},xk={...bk,position:`fixed`,margin:0,top:0,left:0};({...bk});var Sk=M.forwardRef(function(e,t){let[n,r]=M.useState();$D(()=>{bO&&yO&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,q.jsx)(`span`,{...e,ref:t,style:xk,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function Ck(e,t){return t<0||t>=e.length}function wk(e,t){return Dk(e.current,{disabledIndices:t})}function Tk(e,t){return Dk(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Ek(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>Dk(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:Ck(e,u)?-1:u,wrapped:d}}function Dk(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&Ok(e,a,r));return a}function Ok(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!Ak(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function kk(e){return e.visibility===`hidden`||e.visibility===`collapse`}function Ak(e,t=e?VD(e):null){return!e||!e.isConnected||!t||kk(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var jk=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function Mk(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return kD(n)?n.host:null}function Nk(e){for(let t of Array.from(e.children))if(CD(t)===`summary`)return t;return null}function Pk(e,t){let n=Nk(t);return!!n&&(e===n||QO(n,e))}function Fk(e){let t=e?CD(e):``;return e!=null&&e.matches(jk)&&(t!==`summary`||e.parentElement!=null&&CD(e.parentElement)===`details`&&Nk(e.parentElement)===e)&&(t!==`details`||Nk(e)==null)&&(t!==`input`||e.type!==`hidden`)}function Ik(e){if(!Fk(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=Mk(t)){let n=t!==e,r=CD(t)===`slot`;if(t.hasAttribute(`inert`)||n&&CD(t)===`details`&&!t.open&&!Pk(e,t)||t.hasAttribute(`hidden`)||!r&&!Lk(t,n))return!1}return!0}function Lk(e,t){let n=VD(e);return t?n.display!==`none`:Ak(e,n)}function Rk(e){let t=e.tabIndex;if(t<0){let t=CD(e);if(t===`details`||t===`audio`||t===`video`||OD(e)&&e.isContentEditable)return 0}return t}function zk(e){if(CD(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Bk(e,t){let n=zk(e);if(!n)return!0;let r=t.find(e=>{let t=zk(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=zk(e);return t?.name===n.name&&t.form===n.form})===n}function Vk(e){if(OD(e)&&CD(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return OD(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Hk(e,t){Vk(e).forEach(e=>{Fk(e)&&t.push(e),Hk(e,t)})}function Uk(e,t,n){Vk(e).forEach(e=>{OD(e)&&e.matches(t)&&n.push(e),Uk(e,t,n)})}function Wk(e){return Ik(e)&&Rk(e)>=0}function Gk(e){let t=[];return Hk(e,t),t.filter(Ik)}function Kk(e){let t=Gk(e);return t.filter(e=>Rk(e)>=0&&Bk(e,t))}function qk(e,t){let n=Kk(e),r=n.length;if(r===0)return;let i=ZO(rO(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Jk(e){return qk(rO(e).body,1)||e}function Yk(e){return qk(rO(e).body,-1)||e}function Xk(e,t,n){if(!e)return null;let r=[];Hk(rO(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(Ik);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!QO(n,o)&&Wk(o)&&Bk(o,a))return o}return r[i]}function Zk(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!QO(n,r)}function Qk(e){Kk(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function $k(e){let t=[];Uk(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}function eA(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...eA(e,t.id,n)])}function tA(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function nA(e){return`data-base-ui-${e}`}var rA=0;function iA(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(rA);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),pE;let o=requestAnimationFrame(a);return rA=o,()=>{rA===o&&(cancelAnimationFrame(o),rA=0)}}var aA=`data-base-ui-inert`,oA=new WeakMap,sA=new WeakSet,cA=new WeakMap,lA=0;function uA(e){return e?kD(e)?e.host:uA(e.parentNode):null}var dA=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=uA(t);return e.contains(n)?n:null}).filter(e=>e!=null),fA=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},pA=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{CD(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function mA(e,t,n,{mark:r=!0}){let i=dA(t,e),a=r?pA(t,fA(i),new Set(i)):[],o=[],s=[];if(n){let e=dA(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);pA(t,fA(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(oA.get(e)||0)+1;oA.set(e,r),o.push(e),r===1&&n&&sA.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(cA.get(e)||0)+1;cA.set(e,t),s.push(e),t===1&&e.setAttribute(aA,``)}),lA+=1,()=>{o.forEach(e=>{let t=(oA.get(e)||0)-1;oA.set(e,t),t||(sA.has(e)||e.removeAttribute(`aria-hidden`),sA.delete(e))}),r&&s.forEach(e=>{let t=(cA.get(e)||0)-1;cA.set(e,t),t||e.removeAttribute(aA)}),--lA,lA||(oA=new WeakMap,sA=new WeakSet,cA=new WeakMap)}}function hA(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=rO(e[0]).body;return mA(e,i,n,{mark:r})}var gA={style:{transition:`none`}},_A=`data-base-ui-click-trigger`,vA={fallbackAxisSide:`none`},yA={fallbackAxisSide:`end`},bA={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},xA=M.createContext(null),SA=()=>M.useContext(xA),CA=nA(`portal`);function wA(e={}){let{ref:t,container:n,componentProps:r=hE,elementProps:i}=e,a=EO(),o=SA()?.portalNode,[s,c]=M.useState(null),[l,u]=M.useState(null),d=XD(e=>{e!==null&&u(e)}),f=M.useRef(null);$D(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(ED(n)?n:n.current))??o??document.body;if(e==null){f.current&&(f.current=null,u(null),c(null));return}f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=NE(`div`,r,{ref:[t,d],props:[{id:a,[CA]:``},i]}),m=s&&p?sy.createPortal(p,s):null;return{node:l,nodeId:M.isValidElement(p)?p.props.id:void 0,subtree:m}}var TA=M.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=wA({container:o,ref:t,componentProps:e,elementProps:c}),f=M.useRef(null),p=M.useRef(null),m=M.useRef(null),h=M.useRef(null),[g,_]=M.useState(null),v=M.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;M.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&Zk(e)&&(e.type===`focusin`?v.current&&=($k(l),!1):(Qk(l),v.current=!0))}return _k(gk(l,`focusin`,e,!0),gk(l,`focusout`,e,!0))},[l,y]),$D(()=>{!l||b!==!0||!v.current||($k(l),v.current=!1)},[b,l]);let S=M.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,q.jsxs)(M.Fragment,{children:[d,(0,q.jsxs)(xA.Provider,{value:S,children:[x&&l&&(0,q.jsx)(Sk,{"data-type":`outside`,ref:f,onFocus:e=>{Zk(e,l)?m.current?.focus():Yk(g?g.domReference:null)?.focus()}}),x&&l&&(0,q.jsx)(`span`,{role:s,"aria-owns":u,style:bA}),l&&sy.createPortal(a,l),x&&l&&(0,q.jsx)(Sk,{"data-type":`outside`,ref:p,onFocus:e=>{Zk(e,l)?h.current?.focus():(Jk(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,OO(`focus-out`,e.nativeEvent)))}})]})]})});function EA(){let e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var DA=class{nodesRef={current:[]};events=EA();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},OA=M.createContext(null),kA=M.createContext(null),AA=()=>M.useContext(OA)?.id||null,jA=e=>{let t=M.useContext(kA);return e??t};function MA(e){let t=EO(),n=jA(e),r=AA();return $D(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function NA(e){let{children:t,id:n}=e,r=AA();return(0,q.jsx)(OA.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function PA(e){let{children:t,externalTree:n}=e,r=nE(()=>n??new DA).current;return(0,q.jsx)(kA.Provider,{value:r,children:t})}function FA(e,t){let n=wD(ek(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(qO(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var IA=20,LA=[];function RA(){LA=LA.filter(e=>e.deref()?.isConnected)}function zA(e){RA(),e&&CD(e)!==`body`&&(LA.push(new WeakRef(e)),LA.length>IA&&(LA=LA.slice(-20)))}function BA(){return RA(),LA[LA.length-1]?.deref()}function VA(e){return e?Wk(e)?e:Kk(e)[0]||e:null}function HA(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Gk(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Wk(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function UA(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=XD(()=>b.current.floatingContext?.nodeId),S=i===!1,C=pk(_)&&S,w=vk(i),ee=vk(a),te=vk(o),ne=vk(u),re=vk(g),ie=jA(m),T=SA(),ae=M.useRef(!1),oe=M.useRef(!1),se=M.useRef(!1),ce=M.useRef(null),le=M.useRef(``),ue=M.useRef(``),de=M.useRef(null),fe=M.useRef(null),pe=rE(de,p,T?.beforeInsideRef),me=rE(fe,T?.afterInsideRef),he=WO(),ge=WO(),_e=PO(),E=T!=null,D=hk(v),ve=XD((e=D)=>e?Kk(e):[]),ye=XD(()=>h?.().filter(e=>e!=null)??[]);M.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&QO(D,ZO(rO(D)))&&ve().length===0&&!C&&GO(e)}return gk(rO(D),`keydown`,e)},[r,D,c,C,ve]),M.useEffect(()=>{if(r||!g)return;let e=rO(D);function t(){se.current=!1}function n(e){let t=ek(e),n=ye(),r=QO(v,t)||QO(_,t)||QO(T?.portalNode,t)||n.some(e=>e===t||QO(e,t));se.current=!r,ue.current=e.pointerType||`keyboard`,$O(t,`[data-base-ui-click-trigger]`)&&(oe.current=!0,ge.start(0,()=>{oe.current=!1}))}function i(){ue.current=`keyboard`}return _k(gk(e,`pointerdown`,n,!0),gk(e,`pointerup`,t,!0),gk(e,`pointercancel`,t,!0),gk(e,`keydown`,i,!0),t)},[r,v,_,D,g,T,ge,ye]),M.useEffect(()=>{if(r||!l)return;let e=rO(D);function n(){oe.current=!0,ge.start(0,()=>{oe.current=!1})}function i(e){let t=ek(e);Wk(t)&&(ce.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=ek(n);c&&r==null&&a!=null&&QO(v,a)&&zA(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ye(),p=r?.hasAttribute(nA(`focus-guard`))&&[de.current,fe.current,T?.beforeInsideRef.current,T?.afterInsideRef.current,T?.beforeOutsideRef.current,T?.afterOutsideRef.current,IO(f),IO(d)].includes(r),m=!(QO(_,r)||QO(v,r)||QO(r,v)||QO(T?.portalNode,r)||u.some(e=>e===r||QO(e,r))||l.hasMatchingElement(e=>QO(e,r))||p||ie&&(eA(ie.nodesRef.current,o).find(e=>QO(e.context?.elements.floating,r)||QO(e.context?.elements.domReference,r))||tA(ie.nodesRef.current,o).find(e=>[e.context?.elements.floating,hk(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&D&&HA(D),s&&i!==_&&!Ak(a)&&ZO(e)===e.body){if(OD(D)&&(D.focus(),s===`popup`)){_e.request(()=>{D.focus()});return}let e=ve(),t=ce.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||D;OD(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!oe.current&&(C||r!==BA())&&(ae.current=!0,t.setOpen(!1,OO(fD,n)))})}function o(){se.current||(b.current.insideReactTree=!0,he.start(0,()=>{b.current.insideReactTree=!1}))}let u=OD(_)?_:null;if(!(!v&&!u))return _k(u&&gk(u,`focusout`,a),u&&gk(u,`pointerdown`,n),v&&gk(v,`focusin`,i),v&&gk(v,`focusout`,a),v&&T&&gk(v,`focusout`,o,!0))},[r,_,v,D,c,ie,T,t,l,s,ve,C,x,b,he,ge,_e,d,f,ye]),M.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(T?.portalNode?.querySelectorAll(`[${nA(`portal`)}]`)||[]),t=(ie?tA(ie.nodesRef.current,x()):[]).find(e=>pk(e.context?.elements.domReference||null))?.context?.elements.domReference,n=hA([v,...e,de.current,fe.current,T?.beforeOutsideRef.current,T?.afterOutsideRef.current,...ye(),t,IO(f),IO(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=hA([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,T,C,ie,x,d,f,ye]),$D(()=>{if(!g||r||!OD(D))return;le.current=``,ue.current=``;let e=rO(D),t=ZO(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(ne.current||``):n;if(r===void 0||r===!1||QO(D,t))return;let i=null,a=()=>(i??=ve(D),i[0]||D),o;o=r===!0||r===null?a():IO(r),o||=a();let s=QO(D,ZO(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&qO(c);iA(o,{sync:l,preventScroll:o===D,shouldFocus(){if(!re.current)return!1;if(s)return!0;let t=ZO(e);return!(t!==o&&QO(D,t))}})})},[r,g,D,ve,w,ne,re,b]);let be=M.useRef(null);$D(()=>{if(r||!D){be.current=null;return}be.current&&=(be.current.cancelled=!0,null);let e=rO(D),t=ZO(e),n=ne.current==null;zA(t);function i(e){if(e.open||(le.current=FA(e.nativeEvent,ue.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(nA(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(ae.current=!0),e.reason===`outside-press`){if(e.nested)ae.current=!1;else if(qO(e.nativeEvent)||JO(e.nativeEvent))ae.current=!1;else{let e=!1;rO(D).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?ae.current=!1:ae.current=!0}}}y.on(`openchange`,i);function a(e){let r=ee.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&CD(t)!==`body`?t:null,s=n?o||a:a||o;return s||=BA()||null,typeof i==`boolean`?s:IO(i)||s||null}return()=>{y.off(`openchange`,i);let t=ZO(e),n=ye(),r=QO(v,t)||n.some(e=>e===t||QO(e,t))||ie&&eA(ie.nodesRef.current,x(),!1).some(e=>QO(e.context?.elements.floating,t)),o=ee.current,s=le.current,c=a(s),l={cancelled:!1};be.current=l,queueMicrotask(()=>{be.current===l&&(be.current=null);let n=VA(c),i=te.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!ae.current&&OD(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}ae.current=!1})}},[r,v,D,ee,te,ne,y,ie,_,x,ye]),$D(()=>{if(!yO||g||!v)return;let e=ZO(rO(v));!OD(e)||!dk(e)||QO(v,e)&&e.blur()},[g,v]),$D(()=>{if(!(r||!T))return T.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{T.setFocusManagerState(null)}},[r,T,c,g,t,l,_]),$D(()=>{if(!(r||!D))return HA(D),()=>{queueMicrotask(RA)}},[r,D]);let xe=!r&&(!c||!C)&&(E||c);return(0,q.jsxs)(M.Fragment,{children:[xe&&(0,q.jsx)(Sk,{"data-type":`inside`,ref:pe,onFocus:e=>{if(c){let e=ve();iA(e[e.length-1])}else T?.portalNode&&(ae.current=!1,Zk(e,T.portalNode)?Jk(_)?.focus():IO(f??T.beforeOutsideRef)?.focus())}}),n,xe&&(0,q.jsx)(Sk,{"data-type":`inside`,ref:me,onFocus:e=>{c?iA(ve()[0]):T?.portalNode&&(l&&(ae.current=!0),Zk(e,T.portalNode)?Yk(_)?.focus():IO(d??T.afterOutsideRef)?.focus())}})]})}function WA(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=oD}=t,l=e.context.dataRef,u=M.useRef(void 0),d=PO(),f=WO(),p=M.useMemo(()=>{function t(t,n,r,i){let a=OO(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=YO(e.pointerType,!0)&&JO(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||YO(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=ek(s),p=dk(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;if(r===`mousedown`&&o){u.current=void 0;return}YO(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return M.useMemo(()=>n?{reference:p}:hE,[n,p])}function GA(){return!1}function KA(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function qA(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=GA,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=jA(c),m=XD(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=XD(()=>a),{escapeKey:v,outsidePress:y}=KA(s),b=M.useRef(!1),x=M.useRef(!1),S=M.useRef(!1),C=M.useRef(!1),w=M.useRef(!1),ee=M.useRef(``),te=M.useRef(null),ne=WO(),re=WO(),ie=WO(),T=XD(()=>{re.clear(),d.current.insideReactTree=!1}),ae=XD(e=>{let t=d.current.floatingContext?.nodeId;return(p?eA(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),oe=XD(t=>lk(t,e.select(`floatingElement`))||lk(t,e.select(`domReferenceElement`))),se=XD(t=>{o()&&e.setOpen(!1,OO(oD,t.nativeEvent))}),ce=XD(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=KO(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&ae(`__escapeKeyBubbles`))return;let a=OO(pD,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),le=XD(()=>{d.current.insideReactTree=!0,re.start(0,T)}),ue=XD(t=>{if(!l||!n||t.button!==0)return;let r=ek(t.nativeEvent);QO(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),de=XD(e=>{!l||!n||(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});M.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),M.useEffect(()=>T,[T]),M.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,ee.current=``,te.current=null),T;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new UO,i=rO(u);function a(){ie.clear(),w.current=!0}function o(){w.current=!0,ie.start(yO?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=ee.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function re(e){let t=d.current.floatingContext?.nodeId,n=p&&eA(p.nodesRef.current,t).some(t=>lk(e,t.context?.elements.floating));return oe(e)||n}function se(n){if(m(n)){n.type!==`click`&&!oe(n)&&(t.clear(),S.current=!1),T();return}if(d.current.insideReactTree){T();return}let r=ek(n),i=`[${nA(`inert`)}]`,a=DD(r)?r.getRootNode():null,o=Array.from((kD(a)?a:rO(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>QO(e,r))))return;let c=DD(r)?r:null;for(;c&&!BD(c);){let e=UD(c);if(BD(e)||!DD(e))break;c=e}if(!(o.length&&DD(r)&&!uk(r)&&!QO(r,e.select(`floatingElement`))&&o.every(e=>!QO(c,e)))){if(OD(r)&&!(`touches`in n)){let e=BD(r),t=VD(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!re(n)){if(f()===`intentional`){if(n.detail!==0&&!qO(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||ae(`__outsidePressBubbles`)||(e.setOpen(!1,OO(lD,n)),T())}}}function le(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||oe(t)||se(t)}function ue(t){if(f()!==`sloppy`||!e.select(`open`)||!n||oe(t))return;let r=t.touches[0];r&&(te.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},ne.start(1e3,()=>{te.current&&(te.current.dismissOnTouchEnd=!1,te.current.dismissOnMouseDown=!1)}))}function de(e,t){let n=ek(e);if(!n)return;let r=gk(n,e.type,()=>{t(e),r()})}function fe(e){ee.current=`touch`,de(e,ue)}function pe(e){ne.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),ee.current=e.pointerType),!(e.type===`mousedown`&&te.current&&!te.current.dismissOnMouseDown)&&de(e,e=>{e.type===`pointerdown`?le(e):se(e)})}function me(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;if(c(),f()===`intentional`){if(e.type===`pointercancel`){n&&s();return}if(!re(e)){if(n){s();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,T())}}}function he(e){if(f()!==`sloppy`||!te.current||oe(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-te.current.startX),r=Math.abs(t.clientY-te.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(te.current.dismissOnTouchEnd=!0),i>10&&(se(e),ne.clear(),te.current=null)}function ge(e){de(e,he)}function _e(e){f()!==`sloppy`||!te.current||oe(e)||(te.current.dismissOnTouchEnd&&se(e),ne.clear(),te.current=null)}function E(e){de(e,_e)}let D=_k(r&&_k(gk(i,`keydown`,ce),gk(i,`compositionstart`,a),gk(i,`compositionend`,o)),g&&_k(gk(i,`click`,pe,!0),gk(i,`pointerdown`,pe,!0),gk(i,`pointerup`,me,!0),gk(i,`pointercancel`,me,!0),gk(i,`mousedown`,pe,!0),gk(i,`mouseup`,me,!0),gk(i,`touchstart`,fe,{capture:!0,passive:!0}),gk(i,`touchmove`,ge,{capture:!0,passive:!0}),gk(i,`touchend`,E,{capture:!0,passive:!0})));return()=>{D(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,ce,T,_,ae,oe,p,e,ne,ie]);let fe=M.useMemo(()=>({onKeyDown:ce,onPointerDown:se,onClick:se}),[ce,se]),pe=M.useMemo(()=>({onKeyDown:ce,onPointerDown:de,onMouseDown:de,onClickCapture:le,onMouseDownCapture(e){le(),ue(e)},onPointerDownCapture(e){le(),ue(e)},onMouseUpCapture:le,onTouchEndCapture:le,onTouchMoveCapture:le}),[ce,le,ue,de]);return M.useMemo(()=>n?{reference:fe,floating:pe,trigger:fe}:{},[n,fe,pe])}function JA(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),$D(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};DD(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function YA(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=XD(i),{mounted:c,setMounted:l,transitionStatus:u}=FO(t,!1,!1,o),d=!t&&r;$D(()=>{t&&s(!1)},[t,s]);let f=M.useRef(c),p=M.useRef(!1),m=SO(),h=()=>{f.current=!1,l(!1),a()};$D(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=XD(()=>{if(f.current){if(t){p.current=!0,m();return}h()}});return VO({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var XA={tabIndex:-1,[tk]:``};function ZA(e){return t=>t!==`touch`||e.current}function QA(e,t=!1){let n=EO(),r=AA()!=null,i=nE(()=>e(n,r)).current;return JA({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function $A({handle:e,store:t}){return $D(()=>e.attachStore(t),[e,t]),null}function ej(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function tj(e,t){let n=M.useRef(null);return XD(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),ej(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),ej(t))})}function nj(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function rj(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function ij(e,t,n,r={}){let i=n.reason,a=i===sD,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=rj(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=nj(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?sy.flushSync(l):l()}function aj(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=tj(e,n),o=XD(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e);return}if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=XD(e=>{a(e),e&&o(e)});return $D(()=>(s(t.current),()=>s(null)),[s,t,n,e]),$D(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function oj(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=M.useRef(null),i=e.useState(`open`);$D(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=OO(aD);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function sj(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=YA({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return nE(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function cj(e,t){e.useSyncedValues(t),$D(()=>()=>{e.update({activeTriggerProps:hE,inactiveTriggerProps:hE,popupProps:hE})},[e])}function lj(e,t){$D(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),$D(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var uj=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},dj=t((e=>{var t=Wi();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),fj=t(((e,t)=>{t.exports=dj()})),pj=t((e=>{var t=Wi(),n=fj();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),mj=t(((e,t)=>{t.exports=pj()})),hj=fj(),gj=mj(),_j=[],vj=void 0;function yj(){return vj}function bj(e){_j.push(e)}function xj(e){let t=(t,n)=>{let r=nE(Cj).current,i;try{vj=r;for(let e of _j)e.before(r);i=e(t,n);for(let e of _j)e.after(r);r.didInitialize=!0}finally{vj=void 0}return i};return t.displayName=e.displayName||e.name,t}function Sj(e){return M.forwardRef(xj(e))}function Cj(){return{didInitialize:!1}}var wj=uE(19)?Dj:Oj;function Tj(e,t,n,r,i){return wj(e,t,n,r,i)}function Ej(e,t,n,r,i){let a=M.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,hj.useSyncExternalStore)(e.subscribe,a,a)}bj({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,hj.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Dj(e,t,n,r,i){let a=yj();if(!a)return Ej(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function Oj(e,t,n,r,i){return(0,gj.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var kj=class{static create(e){return new this(e)}constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Tj(this,e,t,n,r)}},Aj=class extends kj{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){M.useDebugValue(e);let n=this;$D(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;$D(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;$D(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){M.useDebugValue(e);let n=this,r=t!==void 0;$D(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return M.useDebugValue(e),Tj(this,this.selectors[e],t,n,r)}useContextCallback(e,t){M.useDebugValue(e);let n=XD(t??pE);this.context[e]=n}useStateSetter(e){let t=M.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}},jj={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},Mj=class extends Aj{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:EA(),nested:n,triggerElements:i},jj),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&XO(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit(`openchange`,n)};setOpen=(e,t)=>{if(this.syncOnly){this.context.onOpenChange?.(e,t);return}this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function Nj(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new Mj({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:hE,inactiveTriggerProps:hE,popupProps:hE}}var Pj=e=>e.triggerIdProp??e.activeTriggerId,Fj=e=>e.openProp??e.open,Ij=e=>(e.popupElement?.id??e.floatingId)||void 0;function Lj(e,t){return t!==void 0&&Fj(e)&&Pj(e)===t}function Rj(e,t){return Lj(e,t)?!0:t!==void 0&&Fj(e)&&Pj(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var zj={open:Fj,mounted:e=>e.mounted,transitionStatus:e=>Fj(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:Pj,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:Ij,isTriggerActive:(e,t)=>t!==void 0&&Pj(e)===t,isOpenedByTrigger:(e,t)=>Lj(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&Pj(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>Rj(e,t)?Ij(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Bj(e){let t=M.useCallback(t=>e===void 0?pE:e.subscribeStore(t),[e]),n=M.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,hj.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Vj=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);function Hj(e){return uE(19)?e:e?`true`:void 0}var Uj=M.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,q.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})}),Wj={},Gj={},Kj=``;function qj(e,t){return AD(e)?e:t}function Jj(e,t,n){return/hidden|clip/.test(e.getComputedStyle(qj(t,n)).overflowY)}function Yj(e){if(typeof document>`u`)return!1;let t=rO(e);return wD(t).innerWidth-t.documentElement.clientWidth>0}function Xj(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=rO(e),n=t.documentElement,r=t.body,i=qj(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Zj(e){let t=rO(e),n=t.documentElement,r=t.body,i=qj(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Qj(e){let t=rO(e),n=t.documentElement,r=t.body,i=wD(n),a=0,o=0,s=!1,c=NO.create();if(yO&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Wj={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Kj=n.style.scrollBehavior,Gj={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=qj(n,r);if(s=Xj(e),s){n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`;return}Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`}function u(){Object.assign(n.style,Wj),Object.assign(r.style,Gj),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Kj)}function d(){u(),c.request(l)}l();let f=gk(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var $j=new class{lockCount=0;restore=null;timeoutLock=UO.create();timeoutUnlock=UO.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=rO(e),n=t.documentElement,r=t.body,i=wD(n);if(Jj(i,n,r)){let t=new i.MutationObserver(()=>{Jj(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=mO||!Yj(e);this.restore=a?Zj(e):Qj(e)}};function eM(e=!0,t=null){$D(()=>{if(e)return $j.acquire(t)},[e,t])}function tM(e){let t=M.useRef(``),n=M.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:M.useCallback(n=>{if(n.detail===0){e(n,`keyboard`);return}`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``},[e]),onPointerDown:n}}function nM(e,t){let n=M.useRef(e),r=XD(t);$D(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function rM(e,t){let{onClick:n,onPointerDown:r}=tM(XD((n,r)=>{(typeof e==`function`?e():e)||t(r||(mO?`touch`:``))}));return M.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function iM(e){let[t,n]=M.useState(null),r=rM(e,n);return nM(e,t=>{t&&!e&&n(null)}),M.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var aM=`data-glide-stand-in`;function oM(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();return{x:r.left-n.left+e.scrollLeft-e.clientLeft,y:r.top-n.top+e.scrollTop-e.clientTop,width:r.width,height:r.height}}function sM(e){return{transform:`translate(${String(e.x)}px, ${String(e.y)}px)`,width:`${String(e.width)}px`,height:`${String(e.height)}px`}}function cM(e){let t=(0,M.useRef)(null);return(0,M.useCallback)(n=>{t.current?.(),t.current=n?lM(n,e):null},[e])}function lM(e,t){if(!vT(e))return()=>void 0;let n=e.ownerDocument,r=e.querySelector(t),i=r?oM(e,r):null,a=null,o=null,s=new Set,c=()=>{for(let e of s)e.removeAttribute(aM);s.clear(),a&&(a.hidden=!0),o=null},l=()=>{if(a)return a;let t=n.createElement(`span`);return t.className=`caps-glide`,t.setAttribute(`aria-hidden`,`true`),e.prepend(t),e.classList.add(`caps-glide-host`),getComputedStyle(e).position===`static`&&e.classList.add(`caps-glide-anchor`),a=t,t},u=(t,n)=>{let r=uT(e),u=oM(e,t),d=o&&a?oM(e,a):i;if(i=u,o?.cancel(),c(),r.reduced||d===null||Math.abs(d.y-u.y)<1&&Math.abs(d.x-u.x)<1)return;t.setAttribute(aM,`measure`);let f=getComputedStyle(t),p=f.backgroundColor,m=f.borderRadius;for(let e of[t,n])e&&(e.setAttribute(aM,``),s.add(e));let h=l();h.hidden=!1,h.style.backgroundColor=p,h.style.borderRadius=m;let g=h.animate([sM(d),sM(u)],{duration:r.normal,easing:_T(r,r.ease),fill:`forwards`});o=g,g.addEventListener(`finish`,()=>{o===g&&c()})},d=()=>{let n=e.querySelector(t);if(n===r)return;let i=r;r=n,n&&u(n,i)},f=new MutationObserver(d);return f.observe(e,{subtree:!0,attributes:!0,attributeFilter:[`data-highlighted`,`data-active`,`data-navigation`,`aria-selected`]}),e.addEventListener(`pointerover`,d),e.addEventListener(`pointerout`,d),()=>{f.disconnect(),e.removeEventListener(`pointerover`,d),e.removeEventListener(`pointerout`,d),o?.cancel(),c(),a?.remove()}}var uM=(0,M.createContext)(void 0),dM=(0,M.createContext)(null);function fM(e){let t=(0,M.useContext)(dM);return t===null?Object.hasOwn(globalThis,`document`)?document.body:null:t[e]}function pM(e){let t=(0,M.useContext)(uM),n=(0,M.useRef)(e);n.current=e,(0,M.useEffect)(()=>t?.(()=>{n.current()}),[t])}var mM=Object.freeze({ease:`linear`,duration:0});function hM(e,t){let n=gT(e,t.duration);return n<=0?mM:e.steps>0?{ease:OT(e.steps),duration:n}:{ease:DT({bounce:hT(e,t.bounce),duration:n}),duration:n}}function gM(e,t){let n=mT(e,t.duration);return{ease:e.steps>0?OT(e.steps):t.ease,duration:n}}var _M={dot:{y:-4,height:8,cy:0},pill:{y:-16,height:32,cy:0},bang:{y:-16,height:20,cy:12}};function vM({className:e,glyph:t,motion:n}){let r=`caps-status-${(0,M.useId)().replaceAll(`:`,``)}`,i=(0,M.useRef)(null),a=(0,M.useRef)(null),o=(0,M.useRef)(null),s=(0,M.useRef)(null),c=(0,M.useRef)(null),l=(0,M.useRef)(null),u=(0,M.useRef)(_M[t]).current,d=(0,M.useRef)(t===`dot`?1:4).current,f=(0,M.useRef)(+(t===`bang`)).current,p=(0,M.useRef)(t),m=pT(s),{reduced:h}=m;return(0,M.useLayoutEffect)(()=>{if(!i.current||!a.current||!c.current||!l.current)return;let e=_M[t],n=h||p.current===t;p.current=t;let r=uT(i.current),o=n?{duration:0}:hM(r,{bounce:.3,duration:360}),s=nr(i.current,{y:e.y,height:e.height,...o}),u=nr(a.current,{cy:e.cy,...n?{duration:0}:{delay:mT(r,35),...hM(r,{bounce:.3,duration:420})}}),d=nr(c.current,{gradientTransform:`matrix(1 0 0 ${t===`dot`?`1`:`4`} 0 0)`,...o}),f=nr(l.current,{opacity:+(t===`bang`),...n?mM:gM(r,{ease:`inOutSine`,duration:220})});return()=>{s.cancel(),u.cancel(),d.cancel(),f.cancel()}},[t,h]),(0,M.useLayoutEffect)(()=>{if(!o.current||!s.current||h||n===`none`)return;let e=n===`pulse`?nr(o.current,{opacity:[1,.45],...gM(m,{ease:`inOutSine`,duration:750}),alternate:!0,loop:!0}):nr(o.current,{keyframes:{"0%":{translateY:0,scaleX:1,scaleY:1},"18%":{translateY:.25,scaleX:1.1,scaleY:.91},"42%":{translateY:-1.3,scaleX:.94,scaleY:1.06},"62%":{translateY:-1.65,scaleX:1,scaleY:1},"82%":{translateY:.15,scaleX:1.06,scaleY:.95},"100%":{translateY:0,scaleX:1,scaleY:1}},...gM(m,{ease:`inOutSine`,duration:1e3}),loop:!0}),t=PT(s.current,t=>{t?e.resume():e.pause()});return()=>{t(),e.revert()}},[n,h,m]),(0,q.jsxs)(`svg`,{ref:s,"aria-hidden":`true`,className:`caps-status-bead ${e??``}`,width:`8`,height:`8`,viewBox:`-4 -4 8 8`,focusable:`false`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsx)(NT,{id:r,values:MT}),(0,q.jsx)(kT,{ref:c,id:`${r}-surface`,transform:`matrix(1 0 0 ${String(d)} 0 0)`}),(0,q.jsxs)(`radialGradient`,{id:`${r}-drop-light`,gradientUnits:`userSpaceOnUse`,cx:`-1.2`,cy:`10.4`,r:`5.6`,children:[(0,q.jsx)(`stop`,{offset:`0`,stopColor:`var(--color-white)`,style:{stopOpacity:`calc(var(--depth) * 0.5)`}}),(0,q.jsx)(`stop`,{offset:`1`,stopColor:`var(--color-white)`,stopOpacity:`0`})]}),(0,q.jsx)(AT,{id:`${r}-shadow`}),(0,q.jsx)(`mask`,{id:`${r}-silhouette`,maskUnits:`userSpaceOnUse`,x:`-12`,y:`-24`,width:`24`,height:`48`,style:{maskType:`alpha`},children:(0,q.jsxs)(`g`,{fill:`var(--color-white)`,filter:`url(#${r})`,children:[(0,q.jsx)(`rect`,{ref:i,x:`-4`,y:u.y,width:`8`,height:u.height,rx:`4`}),(0,q.jsx)(`circle`,{ref:a,cx:`0`,cy:u.cy,r:`4`})]})})]}),(0,q.jsx)(`g`,{ref:o,filter:`url(#${r}-shadow)`,children:(0,q.jsxs)(`g`,{mask:`url(#${r}-silhouette)`,children:[(0,q.jsx)(`rect`,{x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-surface)`}),(0,q.jsx)(`rect`,{ref:l,x:`-12`,y:`-24`,width:`24`,height:`48`,fill:`url(#${r}-drop-light)`,opacity:f})]})})]})}var yM=.28;function bM(e,t){switch(e){case`ring`:return{dashes:1,track:0,arc:0,sweep:0,disc:0,tick:0,cross:0};case`arc`:return{dashes:0,track:1,arc:1,sweep:t===void 0?yM:Math.min(1,Math.max(0,t)),disc:0,tick:0,cross:0};case`check`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:1,cross:0};case`cross`:return{dashes:0,track:0,arc:1,sweep:1,disc:1,tick:0,cross:1}}}var xM=7.25;function SM({className:e,glyph:t,progress:n}){let r=`caps-status-mark-${(0,M.useId)().replaceAll(`:`,``)}`,i=(0,M.useRef)(null),a=(0,M.useRef)(null),o=(0,M.useRef)(null),s=(0,M.useRef)(null),c=(0,M.useRef)(null),l=(0,M.useRef)(null),u=(0,M.useRef)(null),d=(0,M.useRef)(null),f=(0,M.useRef)(bM(t,n)).current,p=(0,M.useRef)(t),m=CT();(0,M.useLayoutEffect)(()=>{let e=i.current,r=a.current,c=o.current,f=s.current,h=l.current,g=u.current,_=d.current;if(!e||!r||!c||!f||!h||!g||!_)return;let v=bM(t,n),y=p.current;p.current=t;let b=uT(e),x=m||y===t&&t!==`arc`,S=x?m?{ease:b.ease,duration:b.fast}:mM:gM(b,{ease:`outQuad`,duration:160}),C=(t===`check`||t===`cross`)&&!x,w=gM(b,{ease:`inOutSine`,duration:220}),ee=[nr(r,{opacity:v.dashes,...S}),nr(c,{opacity:v.track*.28,...S}),nr(f,{opacity:v.arc,"stroke-dasharray":`${String(v.sweep)} 1`,...x?m?mM:S:w}),nr(h,{r:v.disc*xM,...C?{delay:w.duration*.7,...hM(b,{bounce:.35,duration:360})}:m?mM:gM(b,{ease:`inCubic`,duration:140})}),nr(g,{"stroke-dashoffset":1-v.tick,...C&&v.tick>0?{delay:w.duration*.7+b.fast,...gM(b,{ease:`outCubic`,duration:240})}:mM}),nr(_,{"stroke-dashoffset":1-v.cross,...C&&v.cross>0?{delay:w.duration*.7+b.fast,...gM(b,{ease:`outCubic`,duration:240})}:mM})];return t===`cross`&&C&&b.shake>0&&ee.push(nr(e,{translateX:[0,-b.shake,b.shake,-b.shake/2,0],delay:w.duration+b.fast,...gM(b,{ease:`linear`,duration:300})})),()=>{for(let e of ee)e.cancel()}},[t,n,m]);let h=t===`arc`&&n===void 0&&!m;return(0,M.useLayoutEffect)(()=>{if(!h||!c.current||!i.current)return;let e=uT(i.current),t=nr(c.current,{rotate:[0,360],...gM(e,{ease:`linear`,duration:900}),loop:!0}),n=PT(i.current,e=>{e?t.resume():t.pause()});return()=>{n(),t.revert()}},[h]),(0,q.jsxs)(`svg`,{ref:i,"aria-hidden":`true`,className:`caps-status-mark ${e??``}`,viewBox:`0 0 16 16`,focusable:`false`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsx)(kT,{id:`${r}-surface`,transform:`matrix(1.6 0 0 1.6 8 8)`}),(0,q.jsxs)(`mask`,{id:`${r}-knock`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`16`,height:`16`,children:[(0,q.jsx)(`rect`,{width:`16`,height:`16`,fill:`var(--color-white)`}),(0,q.jsx)(`path`,{ref:u,d:`M4.9 8.3 7.1 10.5 11.2 5.9`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,strokeLinejoin:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.tick}),(0,q.jsx)(`path`,{ref:d,d:`M5.4 5.4 10.6 10.6 M10.6 5.4 5.4 10.6`,fill:`none`,stroke:`var(--color-black)`,strokeWidth:`1.9`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`1 1`,strokeDashoffset:1-f.cross})]})]}),(0,q.jsx)(`circle`,{ref:a,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeDasharray:`1.7 2.2`,opacity:f.dashes}),(0,q.jsx)(`circle`,{ref:o,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,opacity:f.track*.28}),(0,q.jsx)(`g`,{ref:c,className:`caps-status-mark-spin`,children:(0,q.jsx)(`circle`,{ref:s,cx:`8`,cy:`8`,r:`6.25`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,pathLength:1,strokeDasharray:`${String(f.sweep)} 1`,transform:`rotate(-90 8 8)`,opacity:f.arc})}),(0,q.jsx)(`circle`,{ref:l,cx:`8`,cy:`8`,r:f.disc*xM,fill:`url(#${r}-surface)`,mask:`url(#${r}-knock)`})]})}var CM=new Set([`ring`,`arc`,`check`,`cross`]);function wM(e){return CM.has(e)}var TM={neutral:`text-base-content`,primary:`text-primary`,secondary:`text-secondary`,accent:`text-accent`,success:`text-success`,info:`text-info`,warning:`text-warning`,error:`text-error`},EM=(0,M.forwardRef)(function({className:e,label:t,glyph:n=`dot`,motion:r=`none`,tone:i=`neutral`,size:a=`default`,appearance:o=`plain`,progress:s,...c},l){return(0,q.jsxs)(`span`,{...c,className:Y(`caps-status`,a===`compact`&&`caps-status-compact`,o===`chip`&&`caps-status-chip`,e),"data-tone":o===`chip`?i:void 0,"data-glyph":n,"data-motion":r,ref:l,children:[wM(n)?(0,q.jsx)(SM,{className:TM[i],glyph:n,progress:s}):(0,q.jsx)(vM,{className:TM[i],glyph:n,motion:r}),t===void 0?null:(0,q.jsx)(`span`,{children:t})]})}),DM=(0,M.forwardRef)(function({className:e,count:t,density:n=`row`,dismissAriaLabel:r,dismissLabel:i=`Dismiss`,message:a,onDismiss:o,onRetry:s,retryAriaLabel:c,retryLabel:l=`Retry`,role:u=`status`,...d},f){return(0,q.jsxs)(`div`,{...d,className:Y(`caps-failure-line`,e),"data-density":n,ref:f,role:u,children:[(0,q.jsx)(EM,{glyph:`dot`,tone:`error`}),(0,q.jsxs)(`span`,{className:`caps-failure-line-copy`,children:[(0,q.jsx)(`span`,{children:a}),t!==void 0&&t>1?(0,q.jsxs)(`span`,{className:`caps-failure-line-count`,children:[`Failed `,t,` times`]}):null]}),s||o?(0,q.jsxs)(`span`,{className:`caps-failure-line-actions`,children:[s?(0,q.jsx)(KT,{"aria-label":c,size:`sm`,variant:`outline`,onClick:s,children:l}):null,o?(0,q.jsx)(KT,{"aria-label":r,size:`sm`,variant:`ghost`,onClick:o,children:i}):null]}):null]})}),OM={xs:`size-3`,sm:`size-[var(--stipe-icon-size-sm)]`,md:`size-[var(--stipe-icon-size-md)]`,lg:`size-[var(--stipe-icon-size-lg)]`},kM=(0,M.forwardRef)(function({active:e=!1,icon:t,iconSize:n=`xs`,className:r,reveal:i=!1,size:a=`xs`,tone:o=`default`,variant:s=`ghost`,...c},l){let u=a===`responsive`;return(0,q.jsx)(KT,{...c,resultLabel:c.result===void 0?void 0:null,ref:l,size:u?`sm`:a,variant:s,className:Y(`caps-icon-button btn-circle`,u&&`caps-icon-button-responsive md:btn-xs`,e&&`text-accent`,i&&`scale-0 transition-transform group-hover:scale-100 focus-visible:scale-100`,o===`destructive`&&`hover:text-error`,r),children:(0,q.jsx)(`span`,{"aria-hidden":`true`,className:Y(`inline-flex shrink-0 [&>svg]:size-full [&>svg]:[stroke-width:var(--stipe-icon-stroke)]`,OM[n]),children:t})})});function AM({onlyFirst:e=!1}={}){return RegExp(`(?:\\u001B\\][^\\u0007\\u001B\\u009C]*(?:\\u0007|\\u001B\\u005C|\\u009C))|[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]`,e?void 0:`g`)}var jM=AM();function MM(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes(`\x1B`)&&!e.includes(`›`)?e:e.replace(jM,``)}function NM(e){return MM(e).replace(/\r\n?/gu,`
11
11
  `).replace(/[\p{Cc}\u200b\u200e\u200f\u061c\u202a-\u202e\u2066-\u2069\u2060\ufeff]/gu,e=>e===`
12
- `||e===` `?e:``)}var MM=()=>void 0;function NM(e){let t=new Map;for(let{id:n,name:r}of e){let e=t.get(r)??new Set;e.add(n),t.set(r,e)}return new Map(e.map(({id:e,name:n})=>[e,(t.get(n)?.size??0)>1?`${n} · ${e.slice(-6)}`:n]))}var PM=45e3,FM=zg.check(K(256)),IM=G.check(jg(0)),LM=B({agentId:FM,sessionId:FM,name:FM}),RM=B({by:LM,reason:H([`escalated`,`sender_archived`,`sender_absent`]),note:F(R.check(K(1e3)))}),zM=B({id:FM,kind:zg.check(K(64)),summary:zg.check(K(200)),since:IM,expiresAt:I(IM),inbox:I(L(!1)),waitingOn:I(LM),escalated:I(RM)}),BM=zM.mapFields(e=>({...e,extensionId:FM})),VM=V(BM).check(K(64)),HM=H([`contract`,`extensions`,`instructions`,`model`,`runtime`,`store`,`tools`]),UM=H([`closed`,`conflict`,`incompatible`,`invalid`,`rejected`,`unavailable`,`state_reset_required`,`storage_pressure`,`archived`,`secret_in_prompt`]),WM=R.pipe(W(Fg(1)),W(K(256))),GM=B({_tag:L(`ShiitakeError`),boundary:HM,cause:UM,message:R,requestId:F(WM)}),KM=class extends Error{boundary;requestId;_tag=`ShiitakeError`;cause;underlying;constructor(e,t,n,r,i){super(n),this.boundary=e,this.requestId=r,this.name=`ShiitakeError`,this.cause=t,this.underlying=i}},qM=R.pipe(W(Fg(1)),W(K(256))),JM=[`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],YM=B({providerId:qM,modelId:qM,reasoning:I(H(JM))}),XM=Rh(U(YM)),ZM=Rh(Vg(U(YM))),QM=new TextEncoder;function $M(e){return R.check(Fg(1),K(e),vg(t=>QM.encode(t).byteLength<=e))}var eN=/\p{Cs}/u,tN=$M(256).check(vg(e=>!eN.test(e))),nN=$M(262144),rN=B({type:L(`image`),data:R.check(Fg(1),K(1048576),Sg()),mimeType:R.check(vg(e=>[`image/png`,`image/jpeg`,`image/gif`,`image/webp`].includes(e)))}),iN=V(rN).check(Fg(1),K(8)),aN=H([`steer`,`followUp`]),oN=tN;P(B({commandId:tN,timeoutMs:G.check(jg(0),Mg(3e4))}),{onExcessProperty:`error`}),P(B({commandId:tN,timeoutMs:Hg.check(Pg(),Ng({minimum:0,maximum:3e4}))}),{onExcessProperty:`error`});var sN=P($M(512)),cN=B({requestId:tN}),lN=B({delivery:aN,requestId:tN,type:L(`prompt`),text:R.check(K(262144),vg(e=>QM.encode(e).byteLength<=262144)),images:F(iN)}).check(vg(e=>(e.text.length>0||(e.images?.length??0)>0)&&QM.encode(e.text).byteLength+(e.images??[]).reduce((e,t)=>e+t.data.length,0)<=1048576)),uN=B({type:L(`abort`)}),dN=B({commandId:tN,onlyIfPending:I(Zh),type:L(`cancel`)}),fN=B({type:L(`operator`),requestId:tN,author:H([`operator`,`party`]),text:nN}),pN=B({type:L(`branch`),entryId:tN}),mN=B({type:L(`fork`),entryId:tN}),hN=R.check(Fg(1),K(4096)),gN=B({type:L(`compact`),requestId:tN,instructions:F(hN)}),_N=ig([lN,gN]),vN=R.check(vg(e=>e.length>0&&e.trim()===e&&!/\p{Cc}/u.test(e)&&Array.from(e).length<=120)),yN=ig([lN,uN,dN,pN,mN,fN,gN,B({type:L(`title`),title:U(vN)})]),bN=B({command:yN}),xN=B({includeSandboxFailures:I(Zh),limit:I(G.check(Ng({minimum:1,maximum:200}))),before:I($M(512))}),SN=B({includeSandboxFailures:I(L(`true`)),limit:I(Hg.check(Pg(),Ng({minimum:1,maximum:200}))),before:I($M(512))}),CN=B({includeSandboxFailures:I(Zh),after:I(R)}),wN=B({includeSandboxFailures:I(L(`true`)),mode:I(L(`subscribe`)),after:I(R),limit:I(Hg.check(Pg(),Ng({minimum:1,maximum:200})))}),TN={onExcessProperty:`error`},EN=P(oN,TN),DN=P(cN,TN);P(_N,TN),P(tN),P(yN,TN),P(bN,TN);var ON=P(ig([xN,Xh]),TN);P(SN,TN);var kN=P(CN,TN);P(wN,TN);function AN(e){let t=EN(e);if(t._tag===`Failure`)throw new KM(`contract`,`invalid`,`Session id is invalid`);return t.success}function jN(e){let t=sN(e);if(t._tag===`Failure`)throw new KM(`contract`,`invalid`,`Session cursor is invalid`);return t.success}function MN(e){let t=DN(e);if(t._tag===`Failure`)throw new KM(`contract`,`invalid`,`Session creation request is invalid`);return t.success.requestId}function NN(e){let t=ON(e);if(t._tag===`Failure`)throw new KM(`contract`,`invalid`,`Read options are invalid`);let n=t.success??{},r={limit:n.limit??200};return n.before!==void 0&&(r={...r,before:n.before}),n.includeSandboxFailures!==void 0&&(r={...r,includeSandboxFailures:n.includeSandboxFailures}),Object.freeze(r)}function PN(e){let t=kN(e);if(t._tag===`Failure`)throw new KM(`contract`,`invalid`,`Subscribe options are invalid`);let n={};return t.success.after!==void 0&&(n={...n,after:t.success.after}),t.success.includeSandboxFailures!==void 0&&(n={...n,includeSandboxFailures:t.success.includeSandboxFailures}),Object.freeze(n)}var FN=be();function IN(e){return e!==null&&!Array.isArray(e)&&typeof e==`object`}function LN(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length);for(let r=0;r<n;r+=1){let n=e.charCodeAt(r)-t.charCodeAt(r);if(n!==0)return n}return e.length-t.length}function RN(e){return e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).replace(/[_./:-]/g,` `).toLowerCase().trim()}function zN(e){return e.split(/[^a-zA-Z0-9]+/).filter(e=>e.length>0)}var BN=new Set([`the`,`a`,`an`,`for`,`to`,`of`,`that`,`this`,`with`,`in`,`on`]);function VN(e){return BN.has(e)}function HN(e){let t=[],n=n=>{n!==e&&n.length>=3&&!t.includes(n)&&t.push(n)};return e.endsWith(`ing`)&&e.length>4&&n(e.slice(0,-3)),e.endsWith(`ed`)&&e.length>3&&n(e.slice(0,-2)),e.endsWith(`ation`)&&e.length>6&&n(`${e.slice(0,-3)}e`),e.endsWith(`ies`)&&e.length>4&&(n(e.slice(0,-3)),n(`${e.slice(0,-3)}y`)),e.endsWith(`es`)&&e.length>3&&n(e.slice(0,-2)),e.endsWith(`s`)&&!e.endsWith(`ss`)&&e.length>3&&n(e.slice(0,-1)),t}function UN(e){let t=8997,n=33826,r=40164,i=52210;for(let a=0;a<e.length;a+=1){let o=t^e.charCodeAt(a),s=o*435,c=n*435+(s>>>16),l=r*435+(c>>>16)+(o<<8),u=i*435+(l>>>16)+(n<<8);t=s&65535,n=c&65535,r=l&65535,i=u&65535}return i.toString(16).padStart(4,`0`)+r.toString(16).padStart(4,`0`)+n.toString(16).padStart(4,`0`)+t.toString(16).padStart(4,`0`)}function WN(e){return e.slice(e.indexOf(`.`)+1)}function GN(e){return e.slice(0,e.indexOf(`.`))}var KN=/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)+$/,qN=1e3,JN=221;function YN(e,t){if(t>16)return t;if(Array.isArray(e)){let n=t;for(let r of e)n=Math.max(n,YN(r,t+1));return n}if(!IN(e))return t;let n=t;for(let r of Object.values(e))n=Math.max(n,YN(r,t+1));return n}var XN=A(()=>Ht(k(),be()).superRefine((e,t)=>{Object.keys(e).length>100&&t.addIssue({code:`custom`,message:`Sample exceeds the entry bound`}),JSON.stringify(e).length>4e3&&t.addIssue({code:`custom`,message:`Sample exceeds the byte bound`}),YN(e,0)>16&&t.addIssue({code:`custom`,message:`Sample exceeds the depth bound`})})),ZN=A(()=>E({query:k().max(200),maxResults:Lt().int().min(1).max(50).default(50)})),QN=A(()=>E({path:k().max(160),detail:St([`index`,`full`]).default(`full`),methods:Ze(k().max(80)).max(50).optional()})),$N=E({cursor:k().max(400).optional(),limit:Lt().int().min(1).max(50).default(50),namespace:k().min(1).max(160).regex(/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/).optional()}),eP=A(()=>E({path:k().max(160),capabilityNotes:k().max(500).optional()})),tP=E({path:k().max(160),description:k().max(1e3).optional(),score:Lt().min(0).max(JN),matchReason:k().max(500).optional(),sample:XN.optional(),capabilityNotes:k().max(500).optional(),peers:Ze(eP).max(1e3).optional()}),nP=A(()=>E({results:Ze(tP).max(50),total:Lt().int().min(0).max(qN),truncated:cr(),topScore:Lt().min(0).max(JN),margin:Lt().min(0).max(JN),catalogStamp:k().length(16).regex(/^[0-9a-f]{16}$/)})),rP=E({results:Ze(tP).max(50),total:Lt().int().min(0).max(qN),nextCursor:k().max(400).nullable(),catalogStamp:k().length(16).regex(/^[0-9a-f]{16}$/)}),iP=A(()=>E({path:k().max(160),description:k().max(1e3).optional(),types:k().max(2e4),inputSchema:be().refine(e=>JSON.stringify(e).length<=2e4&&YN(e,0)<=16,`Input schema exceeds the description bounds`).optional(),kind:St([`module`,`operation`]),usage:k().max(300).optional()}));A(()=>E({code:St([`empty_query`,`empty_catalog`,`unknown_target`,`duplicate_operation`,`invalid_input`]),message:k().max(1e3)}));var aP=A(()=>E({"~standard":E({jsonSchema:E({input:wi(Function),output:wi(Function)})})})),oP=A(()=>ze(e=>aP.safeParse(e).success,`Expected a Standard JSON Schema`)),sP=A(()=>E({path:k().min(3).max(160).regex(KN),description:k().max(1e3).optional(),input:oP,output:oP.optional(),capabilityNotes:k().max(500).optional(),instructions:k().max(1e3).optional()})),cP=A(()=>E({revision:k().min(1).max(160),operations:Ze(sP).max(qN)})),lP=class extends Error{code;failure;constructor(e,t,n){let r=t.slice(0,1e3);super(r,n),this.name=`ForageError`,this.code=e,this.failure={code:e,message:r}}},uP=en([zi({$ref:k().optional(),$defs:Ht(k(),Jt()).optional(),definitions:Ht(k(),Jt()).optional(),const:Jt().optional(),enum:Ze(Jt()).optional(),oneOf:Ze(Jt()).optional(),anyOf:Ze(Jt()).optional(),allOf:Ze(Jt()).optional(),type:en([k(),Ze(k())]).optional(),properties:Ht(k(),Jt()).optional(),additionalProperties:Jt().optional(),required:Ze(k()).optional(),prefixItems:Ze(Jt()).optional(),items:Jt().optional(),examples:Ze(Jt()).optional(),default:Jt().optional()}),cr()]),dP=new WeakMap;function fP(e,t){let n=dP.get(e),r=n?.[t];if(r!==void 0)return r;let i;try{i=e[`~standard`].jsonSchema[t]({target:`draft-2020-12`})}catch{throw new lP(`invalid_input`,`Schema cannot be projected to JSON Schema`)}hP(i);let a={raw:i};return n===void 0&&(n={},dP.set(e,n)),n[t]=a,a}function pP(e,t){return fP(e,t).raw}function mP(e,t){let n=fP(e,t);try{return n.text??=JSON.stringify(n.raw),n.text}catch{throw new lP(`invalid_input`,`Schema cannot be projected to JSON Schema`)}}function hP(e){let t=uP.safeParse(e);if(!t.success)throw new lP(`invalid_input`,`Schema cannot be projected to JSON Schema`);return t.data}var gP=256,_P=/^#\/(?:\$defs|definitions)\/([^/]+)$/u;function vP(e,t,n){let r=_P.exec(e)?.[1];if(r===void 0||n.expanding.has(r))return`unknown`;let i=n.definitions[r];if(i===void 0)return`unknown`;if(n.budget.expansions+=1,n.budget.expansions>gP)throw new lP(`invalid_input`,`Schema references expand more than ${String(gP)} times; flatten its shared definitions`);return bP(hP(i),t,{definitions:n.definitions,expanding:new Set([...n.expanding,r]),budget:n.budget})}function yP(e,t){if(e===!0||e===!1)return!1;if(e.$ref!==void 0){let n=_P.exec(e.$ref)?.[1],r=n===void 0||t.expanding.has(n)?void 0:t.definitions[n];return n!==void 0&&r!==void 0&&yP(hP(r),{definitions:t.definitions,expanding:new Set([...t.expanding,n]),budget:t.budget})}return e.const===void 0?e.enum!==void 0&&e.enum.length>1||e.oneOf!==void 0&&e.oneOf.length>1||e.anyOf!==void 0&&e.anyOf.length>1:!1}function bP(e,t,n){if(t>12||e===!0||e===!1)return`unknown`;let r=n??{definitions:{...e.definitions,...e.$defs},expanding:new Set,budget:{expansions:0}};if(e.$ref)return vP(e.$ref,t,r);if(e.const!==void 0)return JSON.stringify(e.const);if(e.enum)return e.enum.map(e=>JSON.stringify(e)).join(` | `);if(e.oneOf)return e.oneOf.map(e=>bP(hP(e),t+1,r)).join(` | `);if(e.anyOf)return e.anyOf.map(e=>bP(hP(e),t+1,r)).join(` | `);if(e.allOf)return e.allOf.map(e=>{let n=hP(e),i=bP(n,t+1,r);return yP(n,r)?`(${i})`:i}).join(` & `);if(e.type===`object`||e.properties){let n=Object.entries(e.properties??{}).sort(([e],[t])=>LN(e,t));if(n.length===0){let n=e.additionalProperties;return n===!1?`Record<string, never>`:n&&n!==!0?`Record<string, ${bP(hP(n),t+1,r)}>`:`Record<string, unknown>`}let i=new Set(e.required??[]);return`{
13
- ${n.map(([e,n])=>{let a=bP(hP(n),t+1,r),o=i.has(e)?``:`?`,s=/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)?e:JSON.stringify(e);return`${` `.repeat(t+1)}${s}${o}: ${a};`}).join(`
12
+ `||e===` `?e:``)}var PM=()=>void 0;function FM(e){let t=new Map;for(let{id:n,name:r}of e){let e=t.get(r)??new Set;e.add(n),t.set(r,e)}return new Map(e.map(({id:e,name:n})=>[e,(t.get(n)?.size??0)>1?`${n} · ${e.slice(-6)}`:n]))}var IM=45e3,LM=zg.check(K(256)),RM=G.check(jg(0)),zM=B({agentId:LM,sessionId:LM,name:LM}),BM=B({by:zM,reason:H([`escalated`,`sender_archived`,`sender_absent`]),note:F(R.check(K(1e3)))}),VM=B({id:LM,kind:zg.check(K(64)),summary:zg.check(K(200)),since:RM,expiresAt:I(RM),inbox:I(L(!1)),waitingOn:I(zM),escalated:I(BM)}),HM=VM.mapFields(e=>({...e,extensionId:LM})),UM=V(HM).check(K(64)),WM=H([`contract`,`extensions`,`instructions`,`model`,`runtime`,`store`,`tools`]),GM=H([`closed`,`conflict`,`incompatible`,`invalid`,`rejected`,`unavailable`,`state_reset_required`,`storage_pressure`,`archived`,`secret_in_prompt`]),KM=R.pipe(W(Fg(1)),W(K(256))),qM=B({_tag:L(`ShiitakeError`),boundary:WM,cause:GM,message:R,requestId:F(KM)}),JM=class extends Error{boundary;requestId;_tag=`ShiitakeError`;cause;underlying;constructor(e,t,n,r,i){super(n),this.boundary=e,this.requestId=r,this.name=`ShiitakeError`,this.cause=t,this.underlying=i}},YM=R.pipe(W(Fg(1)),W(K(256))),XM=[`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],ZM=B({providerId:YM,modelId:YM,reasoning:I(H(XM))}),QM=Rh(U(ZM)),$M=Rh(Vg(U(ZM))),eN=new TextEncoder;function tN(e){return R.check(Fg(1),K(e),vg(t=>eN.encode(t).byteLength<=e))}var nN=/\p{Cs}/u,rN=tN(256).check(vg(e=>!nN.test(e))),iN=tN(262144),aN=B({type:L(`image`),data:R.check(Fg(1),K(1048576),Sg()),mimeType:R.check(vg(e=>[`image/png`,`image/jpeg`,`image/gif`,`image/webp`].includes(e)))}),oN=V(aN).check(Fg(1),K(8)),sN=H([`steer`,`followUp`]),cN=rN;P(B({commandId:rN,timeoutMs:G.check(jg(0),Mg(3e4))}),{onExcessProperty:`error`}),P(B({commandId:rN,timeoutMs:Hg.check(Pg(),Ng({minimum:0,maximum:3e4}))}),{onExcessProperty:`error`});var lN=P(tN(512)),uN=B({requestId:rN}),dN=B({delivery:sN,requestId:rN,type:L(`prompt`),text:R.check(K(262144),vg(e=>eN.encode(e).byteLength<=262144)),images:F(oN)}).check(vg(e=>(e.text.length>0||(e.images?.length??0)>0)&&eN.encode(e.text).byteLength+(e.images??[]).reduce((e,t)=>e+t.data.length,0)<=1048576)),fN=B({type:L(`abort`)}),pN=B({commandId:rN,onlyIfPending:I(Zh),type:L(`cancel`)}),mN=B({type:L(`operator`),requestId:rN,author:H([`operator`,`party`]),text:iN}),hN=B({type:L(`branch`),entryId:rN}),gN=B({type:L(`fork`),entryId:rN}),_N=R.check(Fg(1),K(4096)),vN=B({type:L(`compact`),requestId:rN,instructions:F(_N)}),yN=ig([dN,vN]),bN=R.check(vg(e=>e.length>0&&e.trim()===e&&!/\p{Cc}/u.test(e)&&Array.from(e).length<=120)),xN=ig([dN,fN,pN,hN,gN,mN,vN,B({type:L(`title`),title:U(bN)})]),SN=B({command:xN}),CN=B({includeSandboxFailures:I(Zh),limit:I(G.check(Ng({minimum:1,maximum:200}))),before:I(tN(512))}),wN=B({includeSandboxFailures:I(L(`true`)),limit:I(Hg.check(Pg(),Ng({minimum:1,maximum:200}))),before:I(tN(512))}),TN=B({includeSandboxFailures:I(Zh),after:I(R)}),EN=B({includeSandboxFailures:I(L(`true`)),mode:I(L(`subscribe`)),after:I(R),limit:I(Hg.check(Pg(),Ng({minimum:1,maximum:200})))}),DN={onExcessProperty:`error`},ON=P(cN,DN),kN=P(uN,DN);P(yN,DN),P(rN),P(xN,DN),P(SN,DN);var AN=P(ig([CN,Xh]),DN);P(wN,DN);var jN=P(TN,DN);P(EN,DN);function MN(e){let t=ON(e);if(t._tag===`Failure`)throw new JM(`contract`,`invalid`,`Session id is invalid`);return t.success}function NN(e){let t=lN(e);if(t._tag===`Failure`)throw new JM(`contract`,`invalid`,`Session cursor is invalid`);return t.success}function PN(e){let t=kN(e);if(t._tag===`Failure`)throw new JM(`contract`,`invalid`,`Session creation request is invalid`);return t.success.requestId}function FN(e){let t=AN(e);if(t._tag===`Failure`)throw new JM(`contract`,`invalid`,`Read options are invalid`);let n=t.success??{},r={limit:n.limit??200};return n.before!==void 0&&(r={...r,before:n.before}),n.includeSandboxFailures!==void 0&&(r={...r,includeSandboxFailures:n.includeSandboxFailures}),Object.freeze(r)}function IN(e){let t=jN(e);if(t._tag===`Failure`)throw new JM(`contract`,`invalid`,`Subscribe options are invalid`);let n={};return t.success.after!==void 0&&(n={...n,after:t.success.after}),t.success.includeSandboxFailures!==void 0&&(n={...n,includeSandboxFailures:t.success.includeSandboxFailures}),Object.freeze(n)}var LN=be();function RN(e){return e!==null&&!Array.isArray(e)&&typeof e==`object`}function zN(e,t){if(e===t)return 0;let n=Math.min(e.length,t.length);for(let r=0;r<n;r+=1){let n=e.charCodeAt(r)-t.charCodeAt(r);if(n!==0)return n}return e.length-t.length}function BN(e){return e.replace(/([a-z])([A-Z])/g,`$1 $2`).replace(/([A-Z]+)([A-Z][a-z])/g,`$1 $2`).replace(/[_./:-]/g,` `).toLowerCase().trim()}function VN(e){return e.split(/[^a-zA-Z0-9]+/).filter(e=>e.length>0)}var HN=new Set([`the`,`a`,`an`,`for`,`to`,`of`,`that`,`this`,`with`,`in`,`on`]);function UN(e){return HN.has(e)}function WN(e){let t=[],n=n=>{n!==e&&n.length>=3&&!t.includes(n)&&t.push(n)};return e.endsWith(`ing`)&&e.length>4&&n(e.slice(0,-3)),e.endsWith(`ed`)&&e.length>3&&n(e.slice(0,-2)),e.endsWith(`ation`)&&e.length>6&&n(`${e.slice(0,-3)}e`),e.endsWith(`ies`)&&e.length>4&&(n(e.slice(0,-3)),n(`${e.slice(0,-3)}y`)),e.endsWith(`es`)&&e.length>3&&n(e.slice(0,-2)),e.endsWith(`s`)&&!e.endsWith(`ss`)&&e.length>3&&n(e.slice(0,-1)),t}function GN(e){let t=8997,n=33826,r=40164,i=52210;for(let a=0;a<e.length;a+=1){let o=t^e.charCodeAt(a),s=o*435,c=n*435+(s>>>16),l=r*435+(c>>>16)+(o<<8),u=i*435+(l>>>16)+(n<<8);t=s&65535,n=c&65535,r=l&65535,i=u&65535}return i.toString(16).padStart(4,`0`)+r.toString(16).padStart(4,`0`)+n.toString(16).padStart(4,`0`)+t.toString(16).padStart(4,`0`)}function KN(e){return e.slice(e.indexOf(`.`)+1)}function qN(e){return e.slice(0,e.indexOf(`.`))}var JN=/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)+$/,YN=1e3,XN=221;function ZN(e,t){if(t>16)return t;if(Array.isArray(e)){let n=t;for(let r of e)n=Math.max(n,ZN(r,t+1));return n}if(!RN(e))return t;let n=t;for(let r of Object.values(e))n=Math.max(n,ZN(r,t+1));return n}var QN=A(()=>Ht(k(),be()).superRefine((e,t)=>{Object.keys(e).length>100&&t.addIssue({code:`custom`,message:`Sample exceeds the entry bound`}),JSON.stringify(e).length>4e3&&t.addIssue({code:`custom`,message:`Sample exceeds the byte bound`}),ZN(e,0)>16&&t.addIssue({code:`custom`,message:`Sample exceeds the depth bound`})})),$N=A(()=>E({query:k().max(200),maxResults:Lt().int().min(1).max(50).default(50)})),eP=A(()=>E({path:k().max(160),detail:St([`index`,`full`]).default(`full`),methods:Ze(k().max(80)).max(50).optional()})),tP=E({cursor:k().max(400).optional(),limit:Lt().int().min(1).max(50).default(50),namespace:k().min(1).max(160).regex(/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/).optional()}),nP=A(()=>E({path:k().max(160),capabilityNotes:k().max(500).optional()})),rP=E({path:k().max(160),description:k().max(1e3).optional(),score:Lt().min(0).max(XN),matchReason:k().max(500).optional(),sample:QN.optional(),capabilityNotes:k().max(500).optional(),peers:Ze(nP).max(1e3).optional()}),iP=A(()=>E({results:Ze(rP).max(50),total:Lt().int().min(0).max(YN),truncated:cr(),topScore:Lt().min(0).max(XN),margin:Lt().min(0).max(XN),catalogStamp:k().length(16).regex(/^[0-9a-f]{16}$/)})),aP=E({results:Ze(rP).max(50),total:Lt().int().min(0).max(YN),nextCursor:k().max(400).nullable(),catalogStamp:k().length(16).regex(/^[0-9a-f]{16}$/)}),oP=A(()=>E({path:k().max(160),description:k().max(1e3).optional(),types:k().max(2e4),inputSchema:be().refine(e=>JSON.stringify(e).length<=2e4&&ZN(e,0)<=16,`Input schema exceeds the description bounds`).optional(),kind:St([`module`,`operation`]),usage:k().max(300).optional()}));A(()=>E({code:St([`empty_query`,`empty_catalog`,`unknown_target`,`duplicate_operation`,`invalid_input`]),message:k().max(1e3)}));var sP=A(()=>E({"~standard":E({jsonSchema:E({input:wi(Function),output:wi(Function)})})})),cP=A(()=>ze(e=>sP.safeParse(e).success,`Expected a Standard JSON Schema`)),lP=A(()=>E({path:k().min(3).max(160).regex(JN),description:k().max(1e3).optional(),input:cP,output:cP.optional(),capabilityNotes:k().max(500).optional(),instructions:k().max(1e3).optional()})),uP=A(()=>E({revision:k().min(1).max(160),operations:Ze(lP).max(YN)})),dP=class extends Error{code;failure;constructor(e,t,n){let r=t.slice(0,1e3);super(r,n),this.name=`ForageError`,this.code=e,this.failure={code:e,message:r}}},fP=en([zi({$ref:k().optional(),$defs:Ht(k(),Jt()).optional(),definitions:Ht(k(),Jt()).optional(),const:Jt().optional(),enum:Ze(Jt()).optional(),oneOf:Ze(Jt()).optional(),anyOf:Ze(Jt()).optional(),allOf:Ze(Jt()).optional(),type:en([k(),Ze(k())]).optional(),properties:Ht(k(),Jt()).optional(),additionalProperties:Jt().optional(),required:Ze(k()).optional(),prefixItems:Ze(Jt()).optional(),items:Jt().optional(),examples:Ze(Jt()).optional(),default:Jt().optional()}),cr()]),pP=new WeakMap;function mP(e,t){let n=pP.get(e),r=n?.[t];if(r!==void 0)return r;let i;try{i=e[`~standard`].jsonSchema[t]({target:`draft-2020-12`})}catch{throw new dP(`invalid_input`,`Schema cannot be projected to JSON Schema`)}_P(i);let a={raw:i};return n===void 0&&(n={},pP.set(e,n)),n[t]=a,a}function hP(e,t){return mP(e,t).raw}function gP(e,t){let n=mP(e,t);try{return n.text??=JSON.stringify(n.raw),n.text}catch{throw new dP(`invalid_input`,`Schema cannot be projected to JSON Schema`)}}function _P(e){let t=fP.safeParse(e);if(!t.success)throw new dP(`invalid_input`,`Schema cannot be projected to JSON Schema`);return t.data}var vP=256,yP=/^#\/(?:\$defs|definitions)\/([^/]+)$/u;function bP(e,t,n){let r=yP.exec(e)?.[1];if(r===void 0||n.expanding.has(r))return`unknown`;let i=n.definitions[r];if(i===void 0)return`unknown`;if(n.budget.expansions+=1,n.budget.expansions>vP)throw new dP(`invalid_input`,`Schema references expand more than ${String(vP)} times; flatten its shared definitions`);return SP(_P(i),t,{definitions:n.definitions,expanding:new Set([...n.expanding,r]),budget:n.budget})}function xP(e,t){if(e===!0||e===!1)return!1;if(e.$ref!==void 0){let n=yP.exec(e.$ref)?.[1],r=n===void 0||t.expanding.has(n)?void 0:t.definitions[n];return n!==void 0&&r!==void 0&&xP(_P(r),{definitions:t.definitions,expanding:new Set([...t.expanding,n]),budget:t.budget})}return e.const===void 0?e.enum!==void 0&&e.enum.length>1||e.oneOf!==void 0&&e.oneOf.length>1||e.anyOf!==void 0&&e.anyOf.length>1:!1}function SP(e,t,n){if(t>12||e===!0||e===!1)return`unknown`;let r=n??{definitions:{...e.definitions,...e.$defs},expanding:new Set,budget:{expansions:0}};if(e.$ref)return bP(e.$ref,t,r);if(e.const!==void 0)return JSON.stringify(e.const);if(e.enum)return e.enum.map(e=>JSON.stringify(e)).join(` | `);if(e.oneOf)return e.oneOf.map(e=>SP(_P(e),t+1,r)).join(` | `);if(e.anyOf)return e.anyOf.map(e=>SP(_P(e),t+1,r)).join(` | `);if(e.allOf)return e.allOf.map(e=>{let n=_P(e),i=SP(n,t+1,r);return xP(n,r)?`(${i})`:i}).join(` & `);if(e.type===`object`||e.properties){let n=Object.entries(e.properties??{}).sort(([e],[t])=>zN(e,t));if(n.length===0){let n=e.additionalProperties;return n===!1?`Record<string, never>`:n&&n!==!0?`Record<string, ${SP(_P(n),t+1,r)}>`:`Record<string, unknown>`}let i=new Set(e.required??[]);return`{
13
+ ${n.map(([e,n])=>{let a=SP(_P(n),t+1,r),o=i.has(e)?``:`?`,s=/^[A-Za-z_$][A-Za-z0-9_$]*$/.test(e)?e:JSON.stringify(e);return`${` `.repeat(t+1)}${s}${o}: ${a};`}).join(`
14
14
  `)}
15
- ${` `.repeat(t)}}`}if(e.type===`array`){let n=e.items;if(e.prefixItems&&e.prefixItems.length>0){let i=e.prefixItems.map(e=>bP(hP(e),t+1,r));return n!==void 0&&n!==!0&&!Array.isArray(n)&&i.push(`...${bP(hP(n),t+1,r)}[]`),`[${i.join(`, `)}]`}if(n!==void 0&&Array.isArray(n))return`[${n.map(e=>bP(hP(e),t+1,r)).join(`, `)}][]`;let i=n===void 0||hP(n),a=bP(i,t+1,r);return`${i!==!0&&i!==!1&&(i.oneOf!==void 0||i.anyOf!==void 0||i.allOf!==void 0)?`(${a})`:a}[]`}switch(e.type){case`string`:return`string`;case`number`:case`integer`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;default:return`unknown`}}function xP(e,t=`input`){return bP(hP(pP(e,t)),0)}function SP(e){return e.replace(/[^A-Za-z0-9_$]/g,`_`)}function CP(e,t,n){let r=`(input: ${t}) => Promise<${n}>`;for(let t of e.split(`.`).reverse())r=`{ [${JSON.stringify(t)}]: ${r} }`;return r}function wP(e){return e.length===0?``:`export declare const env: ${e.map(e=>e.indexEnvironment).join(` & `)};`}function TP(e){let t=e.map(e=>e.types).join(`
15
+ ${` `.repeat(t)}}`}if(e.type===`array`){let n=e.items;if(e.prefixItems&&e.prefixItems.length>0){let i=e.prefixItems.map(e=>SP(_P(e),t+1,r));return n!==void 0&&n!==!0&&!Array.isArray(n)&&i.push(`...${SP(_P(n),t+1,r)}[]`),`[${i.join(`, `)}]`}if(n!==void 0&&Array.isArray(n))return`[${n.map(e=>SP(_P(e),t+1,r)).join(`, `)}][]`;let i=n===void 0||_P(n),a=SP(i,t+1,r);return`${i!==!0&&i!==!1&&(i.oneOf!==void 0||i.anyOf!==void 0||i.allOf!==void 0)?`(${a})`:a}[]`}switch(e.type){case`string`:return`string`;case`number`:case`integer`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;default:return`unknown`}}function CP(e,t=`input`){return SP(_P(hP(e,t)),0)}function wP(e){return e.replace(/[^A-Za-z0-9_$]/g,`_`)}function TP(e,t,n){let r=`(input: ${t}) => Promise<${n}>`;for(let t of e.split(`.`).reverse())r=`{ [${JSON.stringify(t)}]: ${r} }`;return r}function EP(e){return e.length===0?``:`export declare const env: ${e.map(e=>e.indexEnvironment).join(` & `)};`}function DP(e){let t=e.map(e=>e.types).join(`
16
16
 
17
- `);return e.length===0?t:`${t}\nexport declare const env: ${e.map(e=>e.environment).join(` & `)};`}var EP=new WeakMap;function DP(e){let t=EP.get(e);if(t!==void 0)return t;let n=SP(e.path.replace(/\./g,`$`)),r=xP(e.input,`input`),i=e.output?xP(e.output,`output`):`unknown`,a=Object.freeze({indexEnvironment:CP(e.path,r,i),environment:CP(e.path,`${n}_Input`,`${n}_Output`),types:`export type ${n}_Input = ${r};\nexport type ${n}_Output = ${i};`});return EP.set(e,a),a}function OP(e){let t=hP(pP(e,`input`));if(t===!0||t===!1||!t.properties)return;let n={},r=!1,i=Object.entries(t.properties).sort(([e],[t])=>LN(e,t));for(let[e,t]of i){let i=hP(t);if(i===!0||i===!1)continue;let a=i.examples;if(a&&a.length>0){let t=FN.safeParse(a[0]);t.success&&(n[e]=t.data,r=!0)}else if(i.default!==void 0){let t=FN.safeParse(i.default);t.success&&(n[e]=t.data,r=!0)}}return r?n:void 0}function kP(e){return e&&e.length>0?e:void 0}function AP(e){let t=iP.safeParse(e);if(!t.success)throw new lP(`invalid_input`,`Description output exceeded its bounds`);return t.data}function jP(e,t){let n=e.find(e=>e.path===t.path);if(n){let e=`env.${n.path}`,t=FN.safeParse(pP(n.input,`input`));if(!t.success)throw new lP(`invalid_input`,`Schema cannot be projected to JSON Schema`);let r={path:n.path,description:kP(n.description),types:TP([DP(n)]),kind:`operation`,inputSchema:t.data,usage:`await ${e}({ ... })`};if(r.types.length>2e4)throw new lP(`invalid_input`,`Operation description exceeds the bounded output`);return AP(r)}let r=`${t.path}.`,i=e.filter(e=>e.path.startsWith(r)).sort((e,t)=>LN(e.path,t.path));if(i.length===0)throw new lP(`unknown_target`,`Unknown target: ${t.path}`);let a=i[0];if(!a)throw new lP(`unknown_target`,`Unknown target: ${t.path}`);let o=t.methods?.length?i.filter(e=>t.methods?.includes(e.path.slice(r.length))):i,s;if(s=t.detail===`index`||t.methods?.length&&o.length===0?wP(i.map(DP)):TP((o.length>0?o:i).map(DP)),s.length>2e4)throw new lP(`invalid_input`,`Description types exceed the bounded output`);return AP({path:t.path,description:kP(a.instructions),types:s,kind:`module`})}function MP(e){let t=mP(e.input,`input`),n=e.output?mP(e.output,`output`):``;return Object.freeze({...e,fingerprint:UN(t+`
18
- `+n),inputBytes:t.length,outputBytes:n.length,sample:OP(e.input)})}var NP={exact:14,startsWith:9,phrase:6,token:4,prefix:2,substring:2,includes:1},PP={path:12,namespace:8,method:10,description:5},FP=25,IP=10,LP=8,RP=20,zP=Math.max(FP,IP)+LP+RP,BP=1+Math.max(...Object.values(NP))*Math.max(...Object.values(PP))+zP;function VP(e){return UN([...e].sort((e,t)=>LN(e.path,t.path)).map(e=>JSON.stringify([e.path,e.description??null,e.capabilityNotes??null,e.instructions??null,e.fingerprint])).join(`
19
- `))}function HP(e,t){if(e===t)return`exact`;if(e.startsWith(t))return`startsWith`;let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);if(RegExp(`\\b${n}\\b`).test(e))return`phrase`;let r=zN(e);return r.some(e=>e===t)?`token`:r.some(e=>e.startsWith(t))?`prefix`:r.some(e=>e.includes(t))?`substring`:e.includes(t)?`includes`:`none`}function UP(e,t,n){let r=RN(e),i=`none`,a=0,o=[];for(let e of n){let n=[e,...HN(e)],s=`none`;for(let e of n){let t=HP(r,e);if(t!==`none`){s=t;break}}if(s===`none`)continue;let c=NP[s]*PP[t];o.includes(e)||o.push(e),c>a&&(i=s,a=c)}return{level:i,score:a,matchedTokens:o}}function WP(e,t){let n=RN(e);return[t,...HN(t)].some(e=>n.includes(e))}function GP(e){let t=[];for(let[n,r]of e){if(r.level===`none`)continue;let e=r.matchedTokens.slice(0,4).map(e=>e.slice(0,20));t.push(`${n}:${r.level}(${e.join(` `)})`)}return t.length>0?t.join(`; `):void 0}function KP(e){let t=nP.safeParse(e);if(!t.success)throw new lP(`invalid_input`,`Search output exceeded its bounds`);return t.data}function qP(e){return[WN(e.path),(e.description??``).trim().toLowerCase().replace(/\s+/g,` `),e.fingerprint].join(`\0`)}function JP(e){return KP({results:[],total:0,truncated:!1,topScore:0,margin:0,catalogStamp:e})}function YP(e,t,n){let r=GN(e.path),i=WN(e.path),a=e.description??``,o=[e.path,r,i,a],s=UP(e.path,`path`,t),c=UP(r,`namespace`,t),l=UP(i,`method`,t),u=UP(a,`description`,t),d=n.filter(e=>o.some(t=>WP(t,e))).length;if(d===0)return;let f=d/n.length,p=Math.max(s.score,c.score,l.score,u.score);if(p===0)return;let m=d===n.length?FP:f*IP,h=n[0];h&&o.some(e=>WP(e,h))&&(m+=LP),(s.level===`exact`||l.level===`exact`)&&(m+=RP);let g={path:e.path,score:d+(p+m)/BP};a&&(g.description=a);let _=GP([[`method`,l],[`description`,u],[`path`,s],[`namespace`,c]]);return _&&(g.matchReason=_),e.sample&&(g.sample=e.sample),e.capabilityNotes&&(g.capabilityNotes=e.capabilityNotes),{result:g,cluster:qP(e),pathScore:s.score}}function XP(e){let t=new Map;for(let n of e){let e=t.get(n.cluster)??[];e.push(n),t.set(n.cluster,e)}let n=[];for(let e of t.values()){let t=[...e].sort((e,t)=>t.pathScore-e.pathScore||t.result.score-e.result.score||LN(e.result.path,t.result.path)),r=t[0];if(!r)continue;let i=[],a=t.slice(1).sort((e,t)=>LN(e.result.path,t.result.path));for(let e of a){let t={path:e.result.path};e.result.capabilityNotes&&(t.capabilityNotes=e.result.capabilityNotes),i.push(t)}let o={...r.result,score:Math.max(...t.map(e=>e.result.score))};i.length>0&&(o.peers=i),n.push(o)}return n.sort((e,t)=>t.score-e.score||LN(e.path,t.path))}function ZP(e,t,n){let r=e.slice(0,t),i=r[0],a=r[1];return KP({results:r,total:e.length,truncated:e.length>t,topScore:i?.score??0,margin:i&&a?i.score-a.score:0,catalogStamp:n})}function QP(e,t,n=50,r){let i=Math.min(50,Math.max(1,Math.floor(n))),a=zN(RN(t)),o=a.filter(e=>!VN(e));if(o.length===0)return JP(r);let s=[];for(let t of e){let e=YP(t,a,o);e&&s.push(e)}return ZP(XP(s),i,r)}var $P=pe({catalogStamp:rP.shape.catalogStamp,namespace:$N.shape.namespace.unwrap().nullable(),after:tP.shape.path});function eF(e,t,n){let r=$N.safeParse(n);if(!r.success)throw new lP(`invalid_input`,r.error.message);let i=r.data,a=i.namespace??null,o=e.filter(e=>a===null||e.path.startsWith(`${a}.`)).sort((e,t)=>LN(GN(e.path),GN(t.path))||LN(e.path,t.path)),s=0;if(i.cursor!==void 0){let e;try{e=$P.parse(JSON.parse(i.cursor))}catch(e){throw new lP(`invalid_input`,`Invalid listing cursor`,{cause:e})}if(e.catalogStamp!==t||e.namespace!==a)throw new lP(`invalid_input`,`Listing cursor belongs to a different catalog or namespace`);let n=o.findIndex(t=>t.path===e.after);if(n<0)throw new lP(`invalid_input`,`Listing cursor operation is absent from this view`);s=n+1}let c=o.slice(s,s+i.limit),l=c.at(-1);return rP.parse({results:c,total:o.length,catalogStamp:t,nextCursor:s+c.length<o.length&&l!==void 0?JSON.stringify({catalogStamp:t,namespace:a,after:l.path}):null})}var tF=1e6;function nF(e,t=0){if(t>=16)return e.length===0?t:t+1;let n=t;for(let r=e.length-1;r>=0;--r){let i=e[r],a=t+1;if(Array.isArray(i)?a=nF(i,a):dr(i)&&(a=nF(Object.values(i),a)),n=Math.max(n,a),n>16)return n}return n}function rF(e){let t=cP.safeParse(e);if(!t.success)throw new lP(`invalid_input`,t.error.message);if(t.data.operations.length===0)throw new lP(`empty_catalog`,`Catalog must contain an operation`);let n=[...t.data.operations].sort((e,t)=>LN(e.path,t.path)),r=new Set,i=[],a=0;for(let e of n){if(r.has(e.path))throw new lP(`duplicate_operation`,`Duplicate operation path: ${e.path}`);if(r.add(e.path),mP(e.input,`input`).length>2e4||nF(Object.values(pP(e.input,`input`)))>16)throw new lP(`invalid_input`,`Schema projection is too large: ${e.path}`);if((e.output?mP(e.output,`output`).length:0)>2e4||e.output!==void 0&&nF(Object.values(pP(e.output,`output`)))>16)throw new lP(`invalid_input`,`Schema output projection is too large: ${e.path}`);let t=MP(e),n=t.sample,o=n===void 0?0:JSON.stringify(n).length;if(n!==void 0&&(Object.keys(n).length>100||o>4e3||YN(n,0)>16))throw new lP(`invalid_input`,`Schema projection is too large: ${e.path}`);if(i.push(t),a+=t.inputBytes+t.outputBytes+o+e.path.length,a+=e.description?.length??0,a+=e.capabilityNotes?.length??0,a+=e.instructions?.length??0,a>tF)throw new lP(`invalid_input`,`Catalog metadata exceeds the bounded projection`)}return{revision:t.data.revision,operations:i}}function iF(e){let t=rF(e),n=Object.freeze(t.operations),r=VP(n),i=n.map(e=>{let t={path:e.path,score:0};return e.description!==void 0&&(t.description=e.description),e.sample!==void 0&&(t.sample=e.sample),e.capabilityNotes!==void 0&&(t.capabilityNotes=e.capabilityNotes),t});return Object.freeze({revision:t.revision,search:e=>{let t=ZN.safeParse(e);if(!t.success)throw new lP(`invalid_input`,t.error.message);if(t.data.query.trim().length===0)throw new lP(`empty_query`,`Search query must not be empty`);return QP(n,t.data.query,t.data.maxResults,r)},describe:e=>{let t=QN.safeParse(e);if(!t.success)throw new lP(`invalid_input`,t.error.message);if(t.data.path.trim().length===0)throw new lP(`empty_query`,`Description target must not be empty`);return jP(n,t.data)},list:e=>eF(i,r,e),stamp:()=>r})}var aF=A(()=>k().min(1).max(75).regex(/^[A-Za-z][A-Za-z0-9_]*$/)),oF=A(()=>Ht(k(),be()));A(()=>en([oF,cr()]));var sF=A(()=>E({tool:aF,title:k().max(120),description:k().max(1e3),input:Ht(k(),be()),output:Ht(k(),be()),call:Ht(k(),be())}).catchall(be()));A(()=>Ke(`kind`,[pe({kind:gt(`unindexed`)}),pe({kind:gt(`ready`),tools:Ze(sF).max(100).refine(e=>new Set(e.map(e=>e.tool)).size===e.length,{message:`Tool family names must be distinct`})})]));var cF=Object.freeze({replay:`safe`,path:`forage.search`,description:`Search operation names and descriptions with short keywords, such as read or shell. If no results match, retry with one relevant keyword. Describe known operation paths directly with forage.describe.`,input:ZN,output:nP}),lF=Object.freeze({replay:`safe`,path:`forage.describe`,description:`Describe a capability`,input:QN,output:iP}),uF=Object.freeze({replay:`safe`,path:`forage.list`,description:`List every available operation in stable namespace then path order (UTF-16 code units). Use limit (1–50) and nextCursor to page without duplicates, optionally filtering by exact namespace. total counts all operations in that filter; summaries match search, with score 0 and no peer merging. A cursor belongs to this catalog and filter; describe paths before calling them.`,input:$N,output:rP});Object.freeze({createCatalog:iF,forageSearchDefinition:cF,forageDescribeDefinition:lF,forageListDefinition:uF});var dF=`invalid_definition`,fF=`runtime_closed`,pF=`source_failure`,mF=class extends Error{code=dF;constructor(e){super(e),this.name=`MyceliumDefinitionError`}},hF=class extends Error{code=fF;constructor(e=`Mycelium runtime is closed`){super(e),this.name=`MyceliumClosedError`}},gF=class extends Error{sourceId;phase;code=pF;constructor(e,t){super(e===void 0?`Capability source ${t} failed`:`Capability source ${t} failed: ${e}`),this.sourceId=e,this.phase=t,this.name=`MyceliumSourceError`}},_F=class extends Error{issues;constructor(e){super(`Invalid operation input`),this.issues=e,this.name=`InvalidOperationInput`}},vF=class extends Error{issues;constructor(e){super(`Operation output failed its declared schema`),this.issues=e,this.name=`InvalidOperationOutput`}},yF=class extends Go(`SourceInvalid`){},bF=class extends Go(`GuestThrew`){},xF=class extends Go(`DeadlineExceeded`){},SF=class extends Go(`SandboxBusy`){code=`sandbox-busy`},CF=class extends Go(`Cancelled`){},wF=class extends Go(`DispatchLost`){},TF=class extends Go(`SandboxCrashed`){},EF=class extends Go(`BadResponse`){},DF=class extends Go(`ResultTooLarge`){},OF=class extends Go(`ResultNotJson`){},kF=class extends Go(`CapabilityFailed`){constructor(e){super(e),this.message=MF(this)}},AF=class extends Go(`Unknown`){};function jF(e,t){switch(e._tag){case`SourceInvalid`:return new yF({line:e.line,column:e.column,excerpt:e.excerpt,ref:t});case`GuestThrew`:return new bF({name:e.name,message:e.message,missingVariable:e.missingVariable,transportMessage:e.transportMessage,ref:t});case`DeadlineExceeded`:return new xF({limitMs:e.limitMs,elapsedMs:e.elapsedMs,acknowledged:e.acknowledged,ref:t});case`SandboxBusy`:return new SF({capacity:e.capacity,waitedMs:e.waitedMs,ref:t});case`Cancelled`:return new CF({by:e.by,acknowledged:e.acknowledged,ref:t});case`DispatchLost`:return new wF({elapsedMs:e.elapsedMs,transport:e.transport,errno:e.errno,rawCause:e.rawCause,ref:t});case`SandboxCrashed`:return new TF({exit:e.exit,errno:e.errno,rawCause:e.rawCause,ref:t});case`BadResponse`:return new EF({reason:e.reason,rawCause:e.rawCause,ref:t});case`ResultTooLarge`:return new DF({size:e.size,ref:t});case`ResultNotJson`:return new OF({kind:e.kind,rawCause:e.rawCause,ref:t});case`CapabilityFailed`:return new kF({namespace:e.namespace,operation:e.operation,cause:e.cause,rawCause:e.rawCause,ref:t});case`Unknown`:return new AF({rawCause:e.rawCause,ref:t})}}function MF(e,t=!0){let n;switch(e._tag){case`SourceInvalid`:n=`SyntaxError in submitted source line ${String(e.line)}, column ${String(e.column)}: ${e.excerpt.slice(0,160)}. Nothing ran. Fix quote/heredoc nesting: quote multi-line shell text with a JavaScript template literal or \\n escapes; escape backticks and \${ inside it. If a nested heredoc is hard to quote, write the script with Files, then execute it.`;break;case`GuestThrew`:{let t=e.name.slice(0,80),r=e.message.slice(0,512),i=e.missingVariable;n=`${t}: ${r}${i===void 0?``:`. Declare ${i} with const or let before assigning it; this sandbox does not create implicit globals. Each execute call has its own variables.`}`;break}case`DeadlineExceeded`:n=`execute hit its ${String(e.limitMs)} ms deadline after ${String(e.elapsedMs)} ms; split the work or persist progress${e.acknowledged===!1?`; sandbox did not acknowledge cancellation`:``}`;break;case`SandboxBusy`:n=`sandbox-busy: all ${String(e.capacity)} sandbox slots remained occupied after waiting ${String(e.waitedMs)} ms. Nothing ran; retry this call after capacity becomes available.`;break;case`Cancelled`:n=e.acknowledged===!1?`Sandbox did not acknowledge cancellation`:`Execution was cancelled`;break;case`DispatchLost`:n=`The sandbox lost contact after ${String(e.elapsedMs)} ms; a running command may still be running; check its effects before retrying`;break;case`SandboxCrashed`:n=`The sandbox process stopped before answering; check effects before retrying`;break;case`BadResponse`:n=`The sandbox returned an unreadable result; retry once, split the call if it recurs`;break;case`ResultTooLarge`:n=`Sandbox result exceeds 256 KiB`;break;case`ResultNotJson`:n=`Sandbox returned non-JSON data`;break;case`CapabilityFailed`:n=e.cause.message.slice(0,1e3);break;case`Unknown`:return`The sandbox failed for an unrecognized reason${t?` (ref ${e.ref??`unavailable`})`:``}`}return!t||e.ref===void 0?n:`${n} (ref ${e.ref})`}var NF=A(()=>en([wi(yF),wi(bF),wi(xF),wi(SF),wi(CF),wi(wF),wi(TF),wi(EF),wi(DF),wi(OF),wi(kF),wi(AF)])),PF=A(()=>Jt().pipe(en([wi(Error).transform(e=>({kind:`error`,value:e})),Dt().transform(e=>({kind:`null`,value:e})),ne().transform(e=>({kind:`undefined`,value:e})),k().transform(e=>({kind:`string`,value:e})),cr().transform(e=>({kind:`boolean`,value:e})),en([Lt(),p(),gt(1/0),gt(-1/0)]).transform(e=>({kind:`number`,value:e})),s().transform(e=>({kind:`bigint`,value:e})),Jr().transform(e=>({kind:`symbol`,value:e})),wi(Function).transform(e=>({kind:`function`,value:e})),Ze(Jt()).transform(e=>({kind:`array`,value:e})),en([wi(Object),Ht(k(),Jt())]).transform(e=>({kind:`object`,value:e})),Jt().transform(()=>({kind:`opaque`}))])));function FF(e){return NF.safeParse(e).success}function IF(e){let t=NF.safeParse(e);return t.success?t.data:new AF({rawCause:e})}function LF(e){let t=PF.parse(e);switch(t.kind){case`error`:case`array`:case`null`:return`object`;default:return t.kind}}A(()=>be().optional());function RF(e){return zF(e,new Set)}function zF(e,t){let n=PF.parse(e);switch(n.kind){case`null`:case`undefined`:return null;case`string`:case`boolean`:return n.value;case`number`:return Number.isFinite(n.value)?n.value:String(n.value);case`bigint`:case`symbol`:return String(n.value);case`function`:return{kind:`function`,name:n.value.name};case`opaque`:return{kind:`opaque`};case`error`:case`array`:case`object`:{let r=n.value;if(t.has(e))return{kind:`circular_reference`};t.add(e);try{if(n.kind===`array`)return n.value.map(e=>zF(e,t));let e=Object.fromEntries(Object.entries(r).map(([e,n])=>[e,zF(n,t)]));if(n.kind===`error`){let r=n.value;e.name=r.name,e.message=r.message,r.stack!==void 0&&(e.stack=r.stack),r.cause!==void 0&&(e.cause=zF(r.cause,t)),r instanceof AggregateError&&(e.errors=zF(r.errors,t))}return e}finally{t.delete(e)}}}}var BF=A(()=>E({name:gt(`ReferenceError`),message:k().regex(/^[\p{ID_Start}_$][\p{ID_Continue}$]* is not defined$/u)}).transform(e=>({...e,missingVariable:e.message.slice(0,-15)})));A(()=>en([BF,E({name:k(),message:k()})]).and(E({transportMessage:k().max(512).optional()})));var VF=A(()=>pe({v:gt(1),kind:gt(`sandbox_failure`),tag:St([`SourceInvalid`,`GuestThrew`,`DeadlineExceeded`,`SandboxBusy`,`Cancelled`,`DispatchLost`,`SandboxCrashed`,`BadResponse`,`ResultTooLarge`,`ResultNotJson`,`CapabilityFailed`,`Unknown`]),ref:k().min(1).max(32),message:k().max(160)})),HF=P(Vg(Jh)),UF=A(()=>k().transform((e,t)=>{let n=HF(e);return x(n)?(t.addIssue({code:`custom`,message:`Invalid sandbox transport JSON`}),st):n.success})).pipe(VF);pe({error:UF}),A(()=>Jt().pipe(en([gt(`Execution timed out`).transform(()=>({kind:`deadline`})),Jt().transform(e=>({kind:`bad_response`,rawCause:e}))])));var WF=pe({sandboxCapacity:se().positive().optional(),admissionWaitMs:se().min(1).max(9e5).optional()});function GF(e,t){let n=WF.safeParse(e??{}),r=se().positive().safeParse(t??2);if(!n.success||!r.success)throw new mF(`Sandbox admission policy is invalid`);return Object.freeze({capacity:n.data.sandboxCapacity??Math.min(32,Math.max(2,r.data)),waitMs:n.data.admissionWaitMs??18e4})}var KF=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],qF=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],JF=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,YF=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,XF={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},ZF=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,QF={5:ZF,"5module":ZF+` export import`,6:ZF+` const class extends export import super`},$F=/^in(stanceof)?$/,eI=RegExp(`[`+YF+`]`),tI=RegExp(`[`+YF+JF+`]`);function nI(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function rI(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&eI.test(String.fromCharCode(e)):t!==!1&&nI(e,qF)}function iI(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&tI.test(String.fromCharCode(e)):t===!1?!1:nI(e,qF)||nI(e,KF)}var aI=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function oI(e,t){return new aI(e,{beforeExpr:!0,binop:t})}var sI={beforeExpr:!0},cI={startsExpr:!0},lI={};function uI(e,t){return t===void 0&&(t={}),t.keyword=e,lI[e]=new aI(e,t)}var X={num:new aI(`num`,cI),regexp:new aI(`regexp`,cI),string:new aI(`string`,cI),name:new aI(`name`,cI),privateId:new aI(`privateId`,cI),eof:new aI(`eof`),bracketL:new aI(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new aI(`]`),braceL:new aI(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new aI(`}`),parenL:new aI(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new aI(`)`),comma:new aI(`,`,sI),semi:new aI(`;`,sI),colon:new aI(`:`,sI),dot:new aI(`.`),question:new aI(`?`,sI),questionDot:new aI(`?.`),arrow:new aI(`=>`,sI),template:new aI(`template`),invalidTemplate:new aI(`invalidTemplate`),ellipsis:new aI(`...`,sI),backQuote:new aI("`",cI),dollarBraceL:new aI("${",{beforeExpr:!0,startsExpr:!0}),eq:new aI(`=`,{beforeExpr:!0,isAssign:!0}),assign:new aI(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new aI(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new aI(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:oI(`||`,1),logicalAND:oI(`&&`,2),bitwiseOR:oI(`|`,3),bitwiseXOR:oI(`^`,4),bitwiseAND:oI(`&`,5),equality:oI(`==/!=/===/!==`,6),relational:oI(`</>/<=/>=`,7),bitShift:oI(`<</>>/>>>`,8),plusMin:new aI(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:oI(`%`,10),star:oI(`*`,10),slash:oI(`/`,10),starstar:new aI(`**`,{beforeExpr:!0}),coalesce:oI(`??`,1),_break:uI(`break`),_case:uI(`case`,sI),_catch:uI(`catch`),_continue:uI(`continue`),_debugger:uI(`debugger`),_default:uI(`default`,sI),_do:uI(`do`,{isLoop:!0,beforeExpr:!0}),_else:uI(`else`,sI),_finally:uI(`finally`),_for:uI(`for`,{isLoop:!0}),_function:uI(`function`,cI),_if:uI(`if`),_return:uI(`return`,sI),_switch:uI(`switch`),_throw:uI(`throw`,sI),_try:uI(`try`),_var:uI(`var`),_const:uI(`const`),_while:uI(`while`,{isLoop:!0}),_with:uI(`with`),_new:uI(`new`,{beforeExpr:!0,startsExpr:!0}),_this:uI(`this`,cI),_super:uI(`super`,cI),_class:uI(`class`,cI),_extends:uI(`extends`,sI),_export:uI(`export`),_import:uI(`import`,cI),_null:uI(`null`,cI),_true:uI(`true`,cI),_false:uI(`false`,cI),_in:uI(`in`,{beforeExpr:!0,binop:7}),_instanceof:uI(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:uI(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:uI(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:uI(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},dI=/\r\n?|\n|\u2028|\u2029/,fI=new RegExp(dI.source,`g`);function pI(e){return e===10||e===13||e===8232||e===8233}function mI(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(pI(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var hI=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,gI=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,_I=Object.prototype,vI=_I.hasOwnProperty,yI=_I.toString,bI=Object.hasOwn||(function(e,t){return vI.call(e,t)}),xI=Array.isArray||(function(e){return yI.call(e)===`[object Array]`}),SI=Object.create(null);function CI(e){return SI[e]||(SI[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function wI(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var TI=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,EI=function(e,t){this.line=e,this.column=t};EI.prototype.offset=function(e){return new EI(this.line,this.column+e)};var DI=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function OI(e,t){for(var n=1,r=0;;){var i=mI(e,r,t);if(i<0)return new EI(n,t-r);++n,r=i}}var kI={ecmaVersion:null,sourceType:`script`,strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},AI=!1;function jI(e){var t={};for(var n in kI)t[n]=e&&bI(e,n)?e[n]:kI[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!AI&&typeof console==`object`&&console.warn&&(AI=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
20
- Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),xI(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(xI(t.onComment)&&(t.onComment=MI(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function MI(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new DI(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var NI=1,PI=2,FI=4,II=8,LI=16,RI=32,zI=64,BI=128,VI=256,HI=512,UI=1024,WI=NI|PI|VI;function GI(e,t){return PI|(e?FI:0)|(t?II:0)}var KI=0,qI=1,JI=2,YI=3,XI=4,ZI=5,QI=function(e,t,n){this.options=e=jI(e),this.sourceFile=e.sourceFile,this.keywords=CI(QF[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=XF[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=CI(r);var i=(r?r+` `:``)+XF.strict;this.reservedWordsStrict=CI(i),this.reservedWordsStrictBind=CI(i+` `+XF.strictBind),this.input=String(t),this.containsEsc=!1,this.pos=n||0,this.curLine=1,e.startLocation?(this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line):n?(this.lineStart=this.input.lastIndexOf(`
21
- `,n-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(dI).length)):this.lineStart=0,this.type=X.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType===`commonjs`?PI:NI),this.regexpState=null,this.privateNameStack=[]},$I={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};QI.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})},$I.inFunction.get=function(){return(this.currentVarScope().flags&PI)>0},$I.inGenerator.get=function(){return(this.currentVarScope().flags&II)>0},$I.inAsync.get=function(){return(this.currentVarScope().flags&FI)>0},$I.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(VI|HI))return!1;if(t&PI)return(t&FI)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},$I.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&NI)},$I.allowSuper.get=function(){return(this.currentThisScope().flags&zI)>0||this.options.allowSuperOutsideMethod},$I.allowDirectSuper.get=function(){return(this.currentThisScope().flags&BI)>0},$I.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},$I.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(VI|HI)||t&PI&&!(t&LI))return!0}return!1},$I.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&UI||!this.inModule&&e&NI)},$I.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&VI)>0},QI.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},QI.parse=function(e,t){return new this(t,e).parse()},QI.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},QI.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(QI.prototype,$I);var eL=QI.prototype,tL=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;eL.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){gI.lastIndex=e,e+=gI.exec(this.input)[0].length;var t=tL.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){gI.lastIndex=e+t[0].length;var n=gI.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||dI.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,gI.lastIndex=e,e+=gI.exec(this.input)[0].length,this.input[e]===`;`&&e++}},eL.eat=function(e){return this.type===e&&(this.next(),!0)},eL.isContextual=function(e){return this.type===X.name&&this.value===e&&!this.containsEsc},eL.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},eL.catchStackOverflow=function(e){try{return e()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,`Not enough stack space to parse input`);else throw e}},eL.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},eL.canInsertSemicolon=function(){return this.type===X.eof||this.type===X.braceR||dI.test(this.input.slice(this.lastTokEnd,this.start))},eL.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},eL.semicolon=function(){!this.eat(X.semi)&&!this.insertSemicolon()&&this.unexpected()},eL.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},eL.expect=function(e){this.eat(e)||this.unexpected()},eL.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var nL=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};eL.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},eL.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},eL.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},eL.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var Z=QI.prototype;Z.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==X.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType===`commonjs`?`script`:this.options.sourceType,this.finishNode(e,`Program`)};var rL={kind:`loop`},iL={kind:`switch`};Z.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;gI.lastIndex=this.pos;var t=gI.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(rI(r)){var i=n;do n+=r<=65535?1:2;while(iI(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!$F.test(a))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;gI.lastIndex=this.pos;var e=gI.exec(this.input),t=this.pos+e[0].length,n;return!dI.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(iI(n=this.fullCharCodeAt(t+8))||n===92))},Z.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;gI.lastIndex=this.pos;var n=gI.exec(this.input),r=this.pos+n[0].length;if(dI.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!==`using`||i===this.input.length||iI(a=this.fullCharCodeAt(i))||a===92)return!1;gI.lastIndex=i;var o=gI.exec(this.input);if(r=i+o[0].length,o&&dI.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!rI(s)&&s!==92)return!1;var c=r;do r+=s<=65535?1:2;while(iI(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(c,r);if($F.test(l))return!1;if(t&&!e&&l===`of`){gI.lastIndex=r;var u=gI.exec(this.input);if(r+=u[0].length,this.input.charCodeAt(r)!==61||(s=this.input.charCodeAt(r+1))===61||s===62)return!1}return!0},Z.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},Z.isUsing=function(e){return this.isUsingKeyword(!1,e)},Z.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=X._var,a=`let`),r){case X._break:case X._continue:return this.parseBreakContinueStatement(i,r.keyword);case X._debugger:return this.parseDebuggerStatement(i);case X._do:return this.parseDoStatement(i);case X._for:return this.parseForStatement(i);case X._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case X._class:return e&&this.unexpected(),this.parseClass(i,!0);case X._if:return this.parseIfStatement(i);case X._return:return this.parseReturnStatement(i);case X._switch:return this.parseSwitchStatement(i);case X._throw:return this.parseThrowStatement(i);case X._try:return this.parseTryStatement(i);case X._const:case X._var:return a||=this.value,e&&a!==`var`&&this.unexpected(),this.parseVarStatement(i,a);case X._while:return this.parseWhileStatement(i);case X._with:return this.parseWithStatement(i);case X.braceL:return this.parseBlock(!0,i);case X.semi:return this.parseEmptyStatement(i);case X._export:case X._import:if(this.options.ecmaVersion>10&&r===X._import){gI.lastIndex=this.pos;var o=gI.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),r===X._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,`Using declaration is not allowed in single-statement positions`),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return r===X.name&&d.type===`Identifier`&&this.eat(X.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},Z.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(X.semi)||this.insertSemicolon()?e.label=null:this.type===X.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},Z.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},Z.parseDoStatement=function(e){return this.next(),this.labels.push(rL),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(X._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(X.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},Z.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(rL),this.enterScope(0),this.expect(X.parenL),this.type===X.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===X._var||this.type===X._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new nL,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===X._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===X._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!l&&f.type===`Identifier`&&f.name===`async`?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},Z.parseForAfterInit=function(e,t,n){return(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.type===X._in?((t.kind===`using`||t.kind===`await using`)&&!t.declarations[0].init&&this.raise(this.start,`Using declaration is not allowed in for-in loops`),this.options.ecmaVersion>=9&&n>-1&&this.unexpected(n)):this.options.ecmaVersion>=9&&(e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},Z.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,oL|(n?0:sL),!1,t)},Z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(X._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},Z.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(X.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},Z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(X.braceL),this.labels.push(iL),this.enterScope(UI);for(var t,n=!1;this.type!==X.braceR;)if(this.type===X._case||this.type===X._default){var r=this.type===X._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(X.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},Z.parseThrowStatement=function(e){return this.next(),dI.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var aL=[];Z.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?RI:0),this.checkLValPattern(e,t?XI:JI),this.expect(X.parenR),e},Z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===X._catch){var t=this.startNode();this.next(),this.eat(X.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(X._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},Z.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},Z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(rL),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},Z.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},Z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},Z.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===X._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},Z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},Z.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(X.braceL),e&&this.enterScope(0);this.type!==X.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},Z.parseFor=function(e,t){return e.init=t,this.expect(X.semi),e.test=this.type===X.semi?null:this.parseExpression(),this.expect(X.semi),e.update=this.type===X.parenR?null:this.parseExpression(),this.expect(X.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},Z.parseForIn=function(e,t){var n=this.type===X._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(X.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},Z.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(X.eq)?i.init=this.parseMaybeAssign(t):!r&&n===`const`&&!(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))?this.unexpected():!r&&(n===`using`||n===`await using`)&&this.options.ecmaVersion>=17&&this.type!==X._in&&!this.isContextual(`of`)?this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):!r&&i.id.type!==`Identifier`&&!(t&&(this.type===X._in||this.isContextual(`of`)))?this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):i.init=null,e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(X.comma))break}return e},Z.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?qI:JI,!1)};var oL=1,sL=2,cL=4;Z.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===X.star&&t&sL&&this.unexpected(),e.generator=this.eat(X.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&oL&&(e.id=t&cL&&this.type!==X.name?null:this.parseIdent(),e.id&&!(t&sL)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?qI:JI:YI));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(GI(e.async,e.generator)),t&oL||(e.id=this.type===X.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&oL?`FunctionDeclaration`:`FunctionExpression`)},Z.parseFunctionParams=function(e){this.expect(X.parenL),e.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Z.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(X.braceL);this.type!==X.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&lL(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},Z.parseClassElement=function(e){if(this.eat(X.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(X.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===X.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&((this.isClassElementNameStart()||this.type===X.star)&&!this.canInsertSemicolon()?a=!0:r=`async`),!r&&(t>=9||!a)&&this.eat(X.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===X.parenL||o!==`method`||i||a){var l=!n.static&&uL(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},Z.isClassElementNameStart=function(){return this.type===X.name||this.type===X.privateId||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword},Z.parseClassElementName=function(e){this.type===X.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Z.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&uL(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},Z.parseClassField=function(e){return uL(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&uL(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(X.eq)?(this.enterScope(HI|zI),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},Z.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(VI|zI);this.type!==X.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},Z.parseClassId=function(e,t){this.type===X.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,JI,!1)):(t===!0&&this.unexpected(),e.id=null)},Z.parseClassSuper=function(e){e.superClass=this.eat(X._extends)?this.parseExprSubscripts(null,!1):null},Z.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Z.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];bI(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function lL(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type===`MethodDefinition`&&(t.kind===`get`||t.kind===`set`)&&(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):r?!0:(e[n]=i,!1)}function uL(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}Z.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==X.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},Z.parseExport=function(e,t){if(this.next(),this.eat(X.star))return this.parseExportAllDeclaration(e,t);if(this.eat(X._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==X.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},Z.parseExportDeclaration=function(e){return this.parseStatement(null)},Z.parseExportDefaultDeclaration=function(){var e;if(this.type===X._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,oL|cL,!1,e)}if(this.type===X._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}var r=this.parseMaybeAssign();return this.semicolon(),r},Z.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),bI(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},Z.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},Z.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},Z.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},Z.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},Z.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(X.braceL);!this.eat(X.braceR);){if(n)n=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;t.push(this.parseExportSpecifier(e))}return t},Z.parseImport=function(e){return this.next(),this.type===X.string?(e.specifiers=aL,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===X.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},Z.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,JI),this.finishNode(e,`ImportSpecifier`)},Z.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,JI),this.finishNode(e,`ImportDefaultSpecifier`)},Z.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,JI),this.finishNode(e,`ImportNamespaceSpecifier`)},Z.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===X.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(X.comma)))return e;if(this.type===X.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(X.braceL);!this.eat(X.braceR);){if(t)t=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;e.push(this.parseImportSpecifier())}return e},Z.parseWithClause=function(){var e=[];if(!this.eat(X._with))return e;this.expect(X.braceL);for(var t={},n=!0;!this.eat(X.braceR);){if(n)n=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;bI(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},Z.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(X.colon),this.type!==X.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},Z.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===X.string){var e=this.parseLiteral(this.value);return TI.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},Z.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},Z.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var dL=QI.prototype;dL.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type===`RestElement`&&(a.argument.type===`ArrayPattern`||a.argument.type===`ObjectPattern`)&&this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},dL.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},dL.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},dL.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==X.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},dL.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case X.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(X.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case X.braceL:return this.parseObj(!0)}return this.parseIdent()},dL.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(X.comma),t&&this.type===X.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===X.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===X.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},dL.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},dL.parseBindingListItem=function(e){return e},dL.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(X.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},dL.checkLValSimple=function(e,t,n){t===void 0&&(t=KI);var r=t!==KI;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===JI&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(bI(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==ZI&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},dL.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=KI),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},dL.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=KI),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var fL=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},pL={b_stat:new fL(`{`,!1),b_expr:new fL(`{`,!0),b_tmpl:new fL("${",!1),p_stat:new fL(`(`,!1),p_expr:new fL(`(`,!0),q_tmpl:new fL("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new fL(`function`,!1),f_expr:new fL(`function`,!0),f_expr_gen:new fL(`function`,!0,!1,null,!0),f_gen:new fL(`function`,!1,!1,null,!0)},mL=QI.prototype;mL.initialContext=function(){return[pL.b_stat]},mL.curContext=function(){return this.context[this.context.length-1]},mL.braceIsBlock=function(e){var t=this.curContext();return t===pL.f_expr||t===pL.f_stat?!0:e===X.colon&&(t===pL.b_stat||t===pL.b_expr)?!t.isExpr:e===X._return||e===X.name&&this.exprAllowed?dI.test(this.input.slice(this.lastTokEnd,this.start)):e===X._else||e===X.semi||e===X.eof||e===X.parenR||e===X.arrow?!0:e===X.braceL?t===pL.b_stat:e===X._var||e===X._const||e===X.name?!1:!this.exprAllowed},mL.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},mL.updateContext=function(e){var t,n=this.type;n.keyword&&e===X.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},mL.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},X.parenR.updateContext=X.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===pL.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},X.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?pL.b_stat:pL.b_expr),this.exprAllowed=!0},X.dollarBraceL.updateContext=function(){this.context.push(pL.b_tmpl),this.exprAllowed=!0},X.parenL.updateContext=function(e){var t=e===X._if||e===X._for||e===X._with||e===X._while;this.context.push(t?pL.p_stat:pL.p_expr),this.exprAllowed=!0},X.incDec.updateContext=function(){},X._function.updateContext=X._class.updateContext=function(e){e.beforeExpr&&e!==X._else&&(e!==X.semi||this.curContext()===pL.p_stat)&&!(e===X._return&&dI.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==X.colon&&e!==X.braceL||this.curContext()!==pL.b_stat)?this.context.push(pL.f_expr):this.context.push(pL.f_stat),this.exprAllowed=!1},X.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},X.backQuote.updateContext=function(){this.curContext()===pL.q_tmpl?this.context.pop():this.context.push(pL.q_tmpl),this.exprAllowed=!1},X.star.updateContext=function(e){if(e===X._function){var t=this.context.length-1;this.context[t]===pL.f_expr?this.context[t]=pL.f_expr_gen:this.context[t]=pL.f_gen}this.exprAllowed=!0},X.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==X.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var hL=QI.prototype;hL.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`)&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case`Identifier`:i=r.name;break;case`Literal`:i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,`Redefinition of __proto__ property`)),t.proto=!0);return}i=`$`+i;var o=t[i];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,`Redefinition of property`):o=t[i]={init:!1,get:!1,set:!1},o[a]=!0}},hL.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var r=n.start,i=n.startLoc,a=n.parseMaybeAssign(e,t);if(n.type===X.comma){var o=n.startNodeAt(r,i);for(o.expressions=[a];n.eat(X.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(o,`SequenceExpression`)}return a})},hL.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new nL,r=!0);var s=this.start,c=this.startLoc;(this.type===X.parenL||this.type===X.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===X.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===X.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},hL.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if((i.type!==`ArrowFunctionExpression`||i.start!==n)&&this.eat(X.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(X.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},hL.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},hL.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==X._in)&&a>r){var o=this.type===X.logicalOR||this.type===X.logicalAND,s=this.type===X.coalesce;s&&(a=X.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===X.coalesce||s&&(this.type===X.logicalOR||this.type===X.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},hL.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},hL.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,o;if(this.isContextual(`await`)&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===X.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&gL(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&_L(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,o=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(!t&&this.type===X.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==X._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,a);l.operator=this.value,l.prefix=!1,l.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(l,`UpdateExpression`)}}if(!n&&(o.type!==`ArrowFunctionExpression`||o.start!==i)&&this.eat(X.starstar)){if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,r),`**`,!1)}else return o};function gL(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&gL(e.expression)}function _L(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&_L(e.expression)||e.type===`ParenthesizedExpression`&&_L(e.expression)}hL.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type===`MemberExpression`&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a},hL.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s===e||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s}},hL.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(X.arrow)},hL.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},hL.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(X.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(X.bracketL);if(l||c&&this.type!==X.parenL&&this.type!==X.backQuote||this.eat(X.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(X.bracketR)):u.property=this.type===X.privateId&&e.type!==`Super`?this.parsePrivateIdent():this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(X.parenL)){var d=new nL,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===X.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},hL.parseExprAtom=function(e,t,n){this.type===X.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case X._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type===X.parenL&&!this.allowDirectSuper&&this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==X.dot&&this.type!==X.bracketL&&this.type!==X.parenL&&this.unexpected(),this.finishNode(r,`Super`);case X._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case X.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(X._function))return this.overrideContext(pL.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(X.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===X.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(X.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case X.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case X.num:case X.string:return this.parseLiteral(this.value);case X._null:case X._true:case X._false:return r=this.startNode(),r.value=this.type===X._null?null:this.type===X._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case X.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case X.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(X.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case X.braceL:return this.overrideContext(pL.b_expr),this.parseObj(!1,e);case X._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case X._class:return this.parseClass(this.startNode(),!1);case X._new:return this.parseNew();case X.backQuote:return this.parseTemplate();case X._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},hL.parseExprAtomDefault=function(){this.unexpected()},hL.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===X.parenL&&!e)return this.parseDynamicImport(t);if(this.type===X.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}this.unexpected()},hL.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(X.parenR)?e.options=null:(this.expect(X.comma),this.afterTrailingComma(X.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(X.parenR)||(this.expect(X.comma),this.afterTrailingComma(X.parenR)||this.unexpected())));else if(!this.eat(X.parenR)){var t=this.start;this.eat(X.comma)&&this.eat(X.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},hL.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType!==`module`&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},hL.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},hL.parseParenExpression=function(){this.expect(X.parenL);var e=this.parseExpression();return this.expect(X.parenR),e},hL.shouldParseArrow=function(e){return!this.canInsertSemicolon()},hL.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,c=[],l=!0,u=!1,d=new nL,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==X.parenR;){if(l?l=!1:this.expect(X.comma),a&&this.afterTrailingComma(X.parenR,!0)){u=!0;break}if(this.type===X.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===X.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(X.parenR),e&&this.shouldParseArrow(c)&&this.eat(X.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,r,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,s),i.expressions=c,this.finishNodeAt(i,`SequenceExpression`,h,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,r);return _.expression=i,this.finishNode(_,`ParenthesizedExpression`)}return i},hL.parseParenItem=function(e){return e},hL.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var vL=[];hL.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===X.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type===`Super`&&this.raiseRecoverable(r,`Invalid use of 'super'`),e.arguments=this.eat(X.parenL)?this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1):vL,this.finishNode(e,`NewExpression`)},hL.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===X.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
17
+ `);return e.length===0?t:`${t}\nexport declare const env: ${e.map(e=>e.environment).join(` & `)};`}var OP=new WeakMap;function kP(e){let t=OP.get(e);if(t!==void 0)return t;let n=wP(e.path.replace(/\./g,`$`)),r=CP(e.input,`input`),i=e.output?CP(e.output,`output`):`unknown`,a=Object.freeze({indexEnvironment:TP(e.path,r,i),environment:TP(e.path,`${n}_Input`,`${n}_Output`),types:`export type ${n}_Input = ${r};\nexport type ${n}_Output = ${i};`});return OP.set(e,a),a}function AP(e){let t=_P(hP(e,`input`));if(t===!0||t===!1||!t.properties)return;let n={},r=!1,i=Object.entries(t.properties).sort(([e],[t])=>zN(e,t));for(let[e,t]of i){let i=_P(t);if(i===!0||i===!1)continue;let a=i.examples;if(a&&a.length>0){let t=LN.safeParse(a[0]);t.success&&(n[e]=t.data,r=!0)}else if(i.default!==void 0){let t=LN.safeParse(i.default);t.success&&(n[e]=t.data,r=!0)}}return r?n:void 0}function jP(e){return e&&e.length>0?e:void 0}function MP(e){let t=oP.safeParse(e);if(!t.success)throw new dP(`invalid_input`,`Description output exceeded its bounds`);return t.data}function NP(e,t){let n=e.find(e=>e.path===t.path);if(n){let e=`env.${n.path}`,t=LN.safeParse(hP(n.input,`input`));if(!t.success)throw new dP(`invalid_input`,`Schema cannot be projected to JSON Schema`);let r={path:n.path,description:jP(n.description),types:DP([kP(n)]),kind:`operation`,inputSchema:t.data,usage:`await ${e}({ ... })`};if(r.types.length>2e4)throw new dP(`invalid_input`,`Operation description exceeds the bounded output`);return MP(r)}let r=`${t.path}.`,i=e.filter(e=>e.path.startsWith(r)).sort((e,t)=>zN(e.path,t.path));if(i.length===0)throw new dP(`unknown_target`,`Unknown target: ${t.path}`);let a=i[0];if(!a)throw new dP(`unknown_target`,`Unknown target: ${t.path}`);let o=t.methods?.length?i.filter(e=>t.methods?.includes(e.path.slice(r.length))):i,s;if(s=t.detail===`index`||t.methods?.length&&o.length===0?EP(i.map(kP)):DP((o.length>0?o:i).map(kP)),s.length>2e4)throw new dP(`invalid_input`,`Description types exceed the bounded output`);return MP({path:t.path,description:jP(a.instructions),types:s,kind:`module`})}function PP(e){let t=gP(e.input,`input`),n=e.output?gP(e.output,`output`):``;return Object.freeze({...e,fingerprint:GN(t+`
18
+ `+n),inputBytes:t.length,outputBytes:n.length,sample:AP(e.input)})}var FP={exact:14,startsWith:9,phrase:6,token:4,prefix:2,substring:2,includes:1},IP={path:12,namespace:8,method:10,description:5},LP=25,RP=10,zP=8,BP=20,VP=Math.max(LP,RP)+zP+BP,HP=1+Math.max(...Object.values(FP))*Math.max(...Object.values(IP))+VP;function UP(e){return GN([...e].sort((e,t)=>zN(e.path,t.path)).map(e=>JSON.stringify([e.path,e.description??null,e.capabilityNotes??null,e.instructions??null,e.fingerprint])).join(`
19
+ `))}function WP(e,t){if(e===t)return`exact`;if(e.startsWith(t))return`startsWith`;let n=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);if(RegExp(`\\b${n}\\b`).test(e))return`phrase`;let r=VN(e);return r.some(e=>e===t)?`token`:r.some(e=>e.startsWith(t))?`prefix`:r.some(e=>e.includes(t))?`substring`:e.includes(t)?`includes`:`none`}function GP(e,t,n){let r=BN(e),i=`none`,a=0,o=[];for(let e of n){let n=[e,...WN(e)],s=`none`;for(let e of n){let t=WP(r,e);if(t!==`none`){s=t;break}}if(s===`none`)continue;let c=FP[s]*IP[t];o.includes(e)||o.push(e),c>a&&(i=s,a=c)}return{level:i,score:a,matchedTokens:o}}function KP(e,t){let n=BN(e);return[t,...WN(t)].some(e=>n.includes(e))}function qP(e){let t=[];for(let[n,r]of e){if(r.level===`none`)continue;let e=r.matchedTokens.slice(0,4).map(e=>e.slice(0,20));t.push(`${n}:${r.level}(${e.join(` `)})`)}return t.length>0?t.join(`; `):void 0}function JP(e){let t=iP.safeParse(e);if(!t.success)throw new dP(`invalid_input`,`Search output exceeded its bounds`);return t.data}function YP(e){return[KN(e.path),(e.description??``).trim().toLowerCase().replace(/\s+/g,` `),e.fingerprint].join(`\0`)}function XP(e){return JP({results:[],total:0,truncated:!1,topScore:0,margin:0,catalogStamp:e})}function ZP(e,t,n){let r=qN(e.path),i=KN(e.path),a=e.description??``,o=[e.path,r,i,a],s=GP(e.path,`path`,t),c=GP(r,`namespace`,t),l=GP(i,`method`,t),u=GP(a,`description`,t),d=n.filter(e=>o.some(t=>KP(t,e))).length;if(d===0)return;let f=d/n.length,p=Math.max(s.score,c.score,l.score,u.score);if(p===0)return;let m=d===n.length?LP:f*RP,h=n[0];h&&o.some(e=>KP(e,h))&&(m+=zP),(s.level===`exact`||l.level===`exact`)&&(m+=BP);let g={path:e.path,score:d+(p+m)/HP};a&&(g.description=a);let _=qP([[`method`,l],[`description`,u],[`path`,s],[`namespace`,c]]);return _&&(g.matchReason=_),e.sample&&(g.sample=e.sample),e.capabilityNotes&&(g.capabilityNotes=e.capabilityNotes),{result:g,cluster:YP(e),pathScore:s.score}}function QP(e){let t=new Map;for(let n of e){let e=t.get(n.cluster)??[];e.push(n),t.set(n.cluster,e)}let n=[];for(let e of t.values()){let t=[...e].sort((e,t)=>t.pathScore-e.pathScore||t.result.score-e.result.score||zN(e.result.path,t.result.path)),r=t[0];if(!r)continue;let i=[],a=t.slice(1).sort((e,t)=>zN(e.result.path,t.result.path));for(let e of a){let t={path:e.result.path};e.result.capabilityNotes&&(t.capabilityNotes=e.result.capabilityNotes),i.push(t)}let o={...r.result,score:Math.max(...t.map(e=>e.result.score))};i.length>0&&(o.peers=i),n.push(o)}return n.sort((e,t)=>t.score-e.score||zN(e.path,t.path))}function $P(e,t,n){let r=e.slice(0,t),i=r[0],a=r[1];return JP({results:r,total:e.length,truncated:e.length>t,topScore:i?.score??0,margin:i&&a?i.score-a.score:0,catalogStamp:n})}function eF(e,t,n=50,r){let i=Math.min(50,Math.max(1,Math.floor(n))),a=VN(BN(t)),o=a.filter(e=>!UN(e));if(o.length===0)return XP(r);let s=[];for(let t of e){let e=ZP(t,a,o);e&&s.push(e)}return $P(QP(s),i,r)}var tF=pe({catalogStamp:aP.shape.catalogStamp,namespace:tP.shape.namespace.unwrap().nullable(),after:rP.shape.path});function nF(e,t,n){let r=tP.safeParse(n);if(!r.success)throw new dP(`invalid_input`,r.error.message);let i=r.data,a=i.namespace??null,o=e.filter(e=>a===null||e.path.startsWith(`${a}.`)).sort((e,t)=>zN(qN(e.path),qN(t.path))||zN(e.path,t.path)),s=0;if(i.cursor!==void 0){let e;try{e=tF.parse(JSON.parse(i.cursor))}catch(e){throw new dP(`invalid_input`,`Invalid listing cursor`,{cause:e})}if(e.catalogStamp!==t||e.namespace!==a)throw new dP(`invalid_input`,`Listing cursor belongs to a different catalog or namespace`);let n=o.findIndex(t=>t.path===e.after);if(n<0)throw new dP(`invalid_input`,`Listing cursor operation is absent from this view`);s=n+1}let c=o.slice(s,s+i.limit),l=c.at(-1);return aP.parse({results:c,total:o.length,catalogStamp:t,nextCursor:s+c.length<o.length&&l!==void 0?JSON.stringify({catalogStamp:t,namespace:a,after:l.path}):null})}var rF=1e6;function iF(e,t=0){if(t>=16)return e.length===0?t:t+1;let n=t;for(let r=e.length-1;r>=0;--r){let i=e[r],a=t+1;if(Array.isArray(i)?a=iF(i,a):dr(i)&&(a=iF(Object.values(i),a)),n=Math.max(n,a),n>16)return n}return n}function aF(e){let t=uP.safeParse(e);if(!t.success)throw new dP(`invalid_input`,t.error.message);if(t.data.operations.length===0)throw new dP(`empty_catalog`,`Catalog must contain an operation`);let n=[...t.data.operations].sort((e,t)=>zN(e.path,t.path)),r=new Set,i=[],a=0;for(let e of n){if(r.has(e.path))throw new dP(`duplicate_operation`,`Duplicate operation path: ${e.path}`);if(r.add(e.path),gP(e.input,`input`).length>2e4||iF(Object.values(hP(e.input,`input`)))>16)throw new dP(`invalid_input`,`Schema projection is too large: ${e.path}`);if((e.output?gP(e.output,`output`).length:0)>2e4||e.output!==void 0&&iF(Object.values(hP(e.output,`output`)))>16)throw new dP(`invalid_input`,`Schema output projection is too large: ${e.path}`);let t=PP(e),n=t.sample,o=n===void 0?0:JSON.stringify(n).length;if(n!==void 0&&(Object.keys(n).length>100||o>4e3||ZN(n,0)>16))throw new dP(`invalid_input`,`Schema projection is too large: ${e.path}`);if(i.push(t),a+=t.inputBytes+t.outputBytes+o+e.path.length,a+=e.description?.length??0,a+=e.capabilityNotes?.length??0,a+=e.instructions?.length??0,a>rF)throw new dP(`invalid_input`,`Catalog metadata exceeds the bounded projection`)}return{revision:t.data.revision,operations:i}}function oF(e){let t=aF(e),n=Object.freeze(t.operations),r=UP(n),i=n.map(e=>{let t={path:e.path,score:0};return e.description!==void 0&&(t.description=e.description),e.sample!==void 0&&(t.sample=e.sample),e.capabilityNotes!==void 0&&(t.capabilityNotes=e.capabilityNotes),t});return Object.freeze({revision:t.revision,search:e=>{let t=$N.safeParse(e);if(!t.success)throw new dP(`invalid_input`,t.error.message);if(t.data.query.trim().length===0)throw new dP(`empty_query`,`Search query must not be empty`);return eF(n,t.data.query,t.data.maxResults,r)},describe:e=>{let t=eP.safeParse(e);if(!t.success)throw new dP(`invalid_input`,t.error.message);if(t.data.path.trim().length===0)throw new dP(`empty_query`,`Description target must not be empty`);return NP(n,t.data)},list:e=>nF(i,r,e),stamp:()=>r})}var sF=A(()=>k().min(1).max(75).regex(/^[A-Za-z][A-Za-z0-9_]*$/)),cF=A(()=>Ht(k(),be()));A(()=>en([cF,cr()]));var lF=A(()=>E({tool:sF,title:k().max(120),description:k().max(1e3),input:Ht(k(),be()),output:Ht(k(),be()),call:Ht(k(),be())}).catchall(be()));A(()=>Ke(`kind`,[pe({kind:gt(`unindexed`)}),pe({kind:gt(`ready`),tools:Ze(lF).max(100).refine(e=>new Set(e.map(e=>e.tool)).size===e.length,{message:`Tool family names must be distinct`})})]));var uF=Object.freeze({replay:`safe`,path:`forage.search`,description:`Search operation names and descriptions with short keywords, such as read or shell. If no results match, retry with one relevant keyword. Describe known operation paths directly with forage.describe.`,input:$N,output:iP}),dF=Object.freeze({replay:`safe`,path:`forage.describe`,description:`Describe a capability`,input:eP,output:oP}),fF=Object.freeze({replay:`safe`,path:`forage.list`,description:`List every available operation in stable namespace then path order (UTF-16 code units). Use limit (1–50) and nextCursor to page without duplicates, optionally filtering by exact namespace. total counts all operations in that filter; summaries match search, with score 0 and no peer merging. A cursor belongs to this catalog and filter; describe paths before calling them.`,input:tP,output:aP});Object.freeze({createCatalog:oF,forageSearchDefinition:uF,forageDescribeDefinition:dF,forageListDefinition:fF});var pF=`invalid_definition`,mF=`runtime_closed`,hF=`source_failure`,gF=class extends Error{code=pF;constructor(e){super(e),this.name=`MyceliumDefinitionError`}},_F=class extends Error{code=mF;constructor(e=`Mycelium runtime is closed`){super(e),this.name=`MyceliumClosedError`}},vF=class extends Error{sourceId;phase;code=hF;constructor(e,t){super(e===void 0?`Capability source ${t} failed`:`Capability source ${t} failed: ${e}`),this.sourceId=e,this.phase=t,this.name=`MyceliumSourceError`}},yF=class extends Error{issues;constructor(e){super(`Invalid operation input`),this.issues=e,this.name=`InvalidOperationInput`}},bF=class extends Error{issues;constructor(e){super(`Operation output failed its declared schema`),this.issues=e,this.name=`InvalidOperationOutput`}},xF=class extends Go(`SourceInvalid`){},SF=class extends Go(`GuestThrew`){},CF=class extends Go(`DeadlineExceeded`){},wF=class extends Go(`SandboxBusy`){code=`sandbox-busy`},TF=class extends Go(`Cancelled`){},EF=class extends Go(`DispatchLost`){},DF=class extends Go(`SandboxCrashed`){},OF=class extends Go(`BadResponse`){},kF=class extends Go(`ResultTooLarge`){},AF=class extends Go(`ResultNotJson`){},jF=class extends Go(`CapabilityFailed`){constructor(e){super(e),this.message=PF(this)}},MF=class extends Go(`Unknown`){};function NF(e,t){switch(e._tag){case`SourceInvalid`:return new xF({line:e.line,column:e.column,excerpt:e.excerpt,ref:t});case`GuestThrew`:return new SF({name:e.name,message:e.message,missingVariable:e.missingVariable,transportMessage:e.transportMessage,ref:t});case`DeadlineExceeded`:return new CF({limitMs:e.limitMs,elapsedMs:e.elapsedMs,acknowledged:e.acknowledged,ref:t});case`SandboxBusy`:return new wF({capacity:e.capacity,waitedMs:e.waitedMs,ref:t});case`Cancelled`:return new TF({by:e.by,acknowledged:e.acknowledged,ref:t});case`DispatchLost`:return new EF({elapsedMs:e.elapsedMs,transport:e.transport,errno:e.errno,rawCause:e.rawCause,ref:t});case`SandboxCrashed`:return new DF({exit:e.exit,errno:e.errno,rawCause:e.rawCause,ref:t});case`BadResponse`:return new OF({reason:e.reason,rawCause:e.rawCause,ref:t});case`ResultTooLarge`:return new kF({size:e.size,ref:t});case`ResultNotJson`:return new AF({kind:e.kind,rawCause:e.rawCause,ref:t});case`CapabilityFailed`:return new jF({namespace:e.namespace,operation:e.operation,cause:e.cause,rawCause:e.rawCause,ref:t});case`Unknown`:return new MF({rawCause:e.rawCause,ref:t})}}function PF(e,t=!0){let n;switch(e._tag){case`SourceInvalid`:n=`SyntaxError in submitted source line ${String(e.line)}, column ${String(e.column)}: ${e.excerpt.slice(0,160)}. Nothing ran. Fix quote/heredoc nesting: quote multi-line shell text with a JavaScript template literal or \\n escapes; escape backticks and \${ inside it. If a nested heredoc is hard to quote, write the script with Files, then execute it.`;break;case`GuestThrew`:{let t=e.name.slice(0,80),r=e.message.slice(0,512),i=e.missingVariable;n=`${t}: ${r}${i===void 0?``:`. Declare ${i} with const or let before assigning it; this sandbox does not create implicit globals. Each execute call has its own variables.`}`;break}case`DeadlineExceeded`:n=`execute hit its ${String(e.limitMs)} ms deadline after ${String(e.elapsedMs)} ms; split the work or persist progress${e.acknowledged===!1?`; sandbox did not acknowledge cancellation`:``}`;break;case`SandboxBusy`:n=`sandbox-busy: all ${String(e.capacity)} sandbox slots remained occupied after waiting ${String(e.waitedMs)} ms. Nothing ran; retry this call after capacity becomes available.`;break;case`Cancelled`:n=e.acknowledged===!1?`Sandbox did not acknowledge cancellation`:`Execution was cancelled`;break;case`DispatchLost`:n=`The sandbox lost contact after ${String(e.elapsedMs)} ms; a running command may still be running; check its effects before retrying`;break;case`SandboxCrashed`:n=`The sandbox process stopped before answering; check effects before retrying`;break;case`BadResponse`:n=`The sandbox returned an unreadable result; retry once, split the call if it recurs`;break;case`ResultTooLarge`:n=`Sandbox result exceeds 256 KiB`;break;case`ResultNotJson`:n=`Sandbox returned non-JSON data`;break;case`CapabilityFailed`:n=e.cause.message.slice(0,1e3);break;case`Unknown`:return`The sandbox failed for an unrecognized reason${t?` (ref ${e.ref??`unavailable`})`:``}`}return!t||e.ref===void 0?n:`${n} (ref ${e.ref})`}var FF=A(()=>en([wi(xF),wi(SF),wi(CF),wi(wF),wi(TF),wi(EF),wi(DF),wi(OF),wi(kF),wi(AF),wi(jF),wi(MF)])),IF=A(()=>Jt().pipe(en([wi(Error).transform(e=>({kind:`error`,value:e})),Dt().transform(e=>({kind:`null`,value:e})),ne().transform(e=>({kind:`undefined`,value:e})),k().transform(e=>({kind:`string`,value:e})),cr().transform(e=>({kind:`boolean`,value:e})),en([Lt(),p(),gt(1/0),gt(-1/0)]).transform(e=>({kind:`number`,value:e})),s().transform(e=>({kind:`bigint`,value:e})),Jr().transform(e=>({kind:`symbol`,value:e})),wi(Function).transform(e=>({kind:`function`,value:e})),Ze(Jt()).transform(e=>({kind:`array`,value:e})),en([wi(Object),Ht(k(),Jt())]).transform(e=>({kind:`object`,value:e})),Jt().transform(()=>({kind:`opaque`}))])));function LF(e){return FF.safeParse(e).success}function RF(e){let t=FF.safeParse(e);return t.success?t.data:new MF({rawCause:e})}function zF(e){let t=IF.parse(e);switch(t.kind){case`error`:case`array`:case`null`:return`object`;default:return t.kind}}A(()=>be().optional());function BF(e){return VF(e,new Set)}function VF(e,t){let n=IF.parse(e);switch(n.kind){case`null`:case`undefined`:return null;case`string`:case`boolean`:return n.value;case`number`:return Number.isFinite(n.value)?n.value:String(n.value);case`bigint`:case`symbol`:return String(n.value);case`function`:return{kind:`function`,name:n.value.name};case`opaque`:return{kind:`opaque`};case`error`:case`array`:case`object`:{let r=n.value;if(t.has(e))return{kind:`circular_reference`};t.add(e);try{if(n.kind===`array`)return n.value.map(e=>VF(e,t));let e=Object.fromEntries(Object.entries(r).map(([e,n])=>[e,VF(n,t)]));if(n.kind===`error`){let r=n.value;e.name=r.name,e.message=r.message,r.stack!==void 0&&(e.stack=r.stack),r.cause!==void 0&&(e.cause=VF(r.cause,t)),r instanceof AggregateError&&(e.errors=VF(r.errors,t))}return e}finally{t.delete(e)}}}}var HF=A(()=>E({name:gt(`ReferenceError`),message:k().regex(/^[\p{ID_Start}_$][\p{ID_Continue}$]* is not defined$/u)}).transform(e=>({...e,missingVariable:e.message.slice(0,-15)})));A(()=>en([HF,E({name:k(),message:k()})]).and(E({transportMessage:k().max(512).optional()})));var UF=A(()=>pe({v:gt(1),kind:gt(`sandbox_failure`),tag:St([`SourceInvalid`,`GuestThrew`,`DeadlineExceeded`,`SandboxBusy`,`Cancelled`,`DispatchLost`,`SandboxCrashed`,`BadResponse`,`ResultTooLarge`,`ResultNotJson`,`CapabilityFailed`,`Unknown`]),ref:k().min(1).max(32),message:k().max(160)})),WF=P(Vg(Jh)),GF=A(()=>k().transform((e,t)=>{let n=WF(e);return x(n)?(t.addIssue({code:`custom`,message:`Invalid sandbox transport JSON`}),st):n.success})).pipe(UF);pe({error:GF}),A(()=>Jt().pipe(en([gt(`Execution timed out`).transform(()=>({kind:`deadline`})),Jt().transform(e=>({kind:`bad_response`,rawCause:e}))])));var KF=pe({sandboxCapacity:se().positive().optional(),admissionWaitMs:se().min(1).max(9e5).optional()});function qF(e,t){let n=KF.safeParse(e??{}),r=se().positive().safeParse(t??2);if(!n.success||!r.success)throw new gF(`Sandbox admission policy is invalid`);return Object.freeze({capacity:n.data.sandboxCapacity??Math.min(32,Math.max(2,r.data)),waitMs:n.data.admissionWaitMs??18e4})}var JF=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,7,9,32,4,318,1,78,5,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,68,8,2,0,3,0,2,3,2,4,2,0,15,1,83,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,7,19,58,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,199,7,137,9,54,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,55,9,266,3,10,1,2,0,49,6,4,4,14,10,5350,0,7,14,11465,27,2343,9,87,9,39,4,60,6,26,9,535,9,470,0,2,54,8,3,82,0,12,1,19628,1,4178,9,519,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,245,1,2,9,233,0,3,0,8,1,6,0,475,6,110,6,6,9,4759,9,787719,239],YF=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,4,51,13,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,7,25,39,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,39,27,10,22,251,41,7,1,17,5,57,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,31,9,2,0,3,0,2,37,2,0,26,0,2,0,45,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,200,32,32,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,24,43,261,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,26,3994,6,582,6842,29,1763,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,433,44,212,63,33,24,3,24,45,74,6,0,67,12,65,1,2,0,15,4,10,7381,42,31,98,114,8702,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,229,29,3,0,208,30,2,2,2,1,2,6,3,4,10,1,225,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4381,3,5773,3,7472,16,621,2467,541,1507,4938,6,8489],XF=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,ZF=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,QF={3:`abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile`,5:`class enum extends super const export import`,6:`enum`,strict:`implements interface let package private protected public static yield`,strictBind:`eval arguments`},$F=`break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this`,eI={5:$F,"5module":$F+` export import`,6:$F+` const class extends export import super`},tI=/^in(stanceof)?$/,nI=RegExp(`[`+ZF+`]`),rI=RegExp(`[`+ZF+XF+`]`);function iI(e,t){for(var n=65536,r=0;r<t.length;r+=2){if(n+=t[r],n>e)return!1;if(n+=t[r+1],n>=e)return!0}return!1}function aI(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&nI.test(String.fromCharCode(e)):t!==!1&&iI(e,YF)}function oI(e,t){return e<48?e===36:e<58?!0:e<65?!1:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&rI.test(String.fromCharCode(e)):t===!1?!1:iI(e,YF)||iI(e,JF)}var sI=function(e,t){t===void 0&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function cI(e,t){return new sI(e,{beforeExpr:!0,binop:t})}var lI={beforeExpr:!0},uI={startsExpr:!0},dI={};function fI(e,t){return t===void 0&&(t={}),t.keyword=e,dI[e]=new sI(e,t)}var X={num:new sI(`num`,uI),regexp:new sI(`regexp`,uI),string:new sI(`string`,uI),name:new sI(`name`,uI),privateId:new sI(`privateId`,uI),eof:new sI(`eof`),bracketL:new sI(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new sI(`]`),braceL:new sI(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new sI(`}`),parenL:new sI(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new sI(`)`),comma:new sI(`,`,lI),semi:new sI(`;`,lI),colon:new sI(`:`,lI),dot:new sI(`.`),question:new sI(`?`,lI),questionDot:new sI(`?.`),arrow:new sI(`=>`,lI),template:new sI(`template`),invalidTemplate:new sI(`invalidTemplate`),ellipsis:new sI(`...`,lI),backQuote:new sI("`",uI),dollarBraceL:new sI("${",{beforeExpr:!0,startsExpr:!0}),eq:new sI(`=`,{beforeExpr:!0,isAssign:!0}),assign:new sI(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new sI(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new sI(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:cI(`||`,1),logicalAND:cI(`&&`,2),bitwiseOR:cI(`|`,3),bitwiseXOR:cI(`^`,4),bitwiseAND:cI(`&`,5),equality:cI(`==/!=/===/!==`,6),relational:cI(`</>/<=/>=`,7),bitShift:cI(`<</>>/>>>`,8),plusMin:new sI(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:cI(`%`,10),star:cI(`*`,10),slash:cI(`/`,10),starstar:new sI(`**`,{beforeExpr:!0}),coalesce:cI(`??`,1),_break:fI(`break`),_case:fI(`case`,lI),_catch:fI(`catch`),_continue:fI(`continue`),_debugger:fI(`debugger`),_default:fI(`default`,lI),_do:fI(`do`,{isLoop:!0,beforeExpr:!0}),_else:fI(`else`,lI),_finally:fI(`finally`),_for:fI(`for`,{isLoop:!0}),_function:fI(`function`,uI),_if:fI(`if`),_return:fI(`return`,lI),_switch:fI(`switch`),_throw:fI(`throw`,lI),_try:fI(`try`),_var:fI(`var`),_const:fI(`const`),_while:fI(`while`,{isLoop:!0}),_with:fI(`with`),_new:fI(`new`,{beforeExpr:!0,startsExpr:!0}),_this:fI(`this`,uI),_super:fI(`super`,uI),_class:fI(`class`,uI),_extends:fI(`extends`,lI),_export:fI(`export`),_import:fI(`import`,uI),_null:fI(`null`,uI),_true:fI(`true`,uI),_false:fI(`false`,uI),_in:fI(`in`,{beforeExpr:!0,binop:7}),_instanceof:fI(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:fI(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:fI(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:fI(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},pI=/\r\n?|\n|\u2028|\u2029/,mI=new RegExp(pI.source,`g`);function hI(e){return e===10||e===13||e===8232||e===8233}function gI(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(hI(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var _I=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,vI=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,yI=Object.prototype,bI=yI.hasOwnProperty,xI=yI.toString,SI=Object.hasOwn||(function(e,t){return bI.call(e,t)}),CI=Array.isArray||(function(e){return xI.call(e)===`[object Array]`}),wI=Object.create(null);function TI(e){return wI[e]||(wI[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function EI(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var DI=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,OI=function(e,t){this.line=e,this.column=t};OI.prototype.offset=function(e){return new OI(this.line,this.column+e)};var kI=function(e,t,n){this.start=t,this.end=n,e.sourceFile!==null&&(this.source=e.sourceFile)};function AI(e,t){for(var n=1,r=0;;){var i=gI(e,r,t);if(i<0)return new OI(n,t-r);++n,r=i}}var jI={ecmaVersion:null,sourceType:`script`,strict:!1,onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,startLocation:null,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},MI=!1;function NI(e){var t={};for(var n in jI)t[n]=e&&SI(e,n)?e[n]:jI[n];if(t.ecmaVersion===`latest`?t.ecmaVersion=1e8:t.ecmaVersion==null?(!MI&&typeof console==`object`&&console.warn&&(MI=!0,console.warn(`Since Acorn 8.0.0, options.ecmaVersion is required.
20
+ Defaulting to 2020, but this will stop working in the future.`)),t.ecmaVersion=11):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),t.allowReserved??=t.ecmaVersion<5,(!e||e.allowHashBang==null)&&(t.allowHashBang=t.ecmaVersion>=14),CI(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(CI(t.onComment)&&(t.onComment=PI(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function PI(e,t){return function(n,r,i,a,o,s){var c={type:n?`Block`:`Line`,value:r,start:i,end:a};e.locations&&(c.loc=new kI(this,o,s)),e.ranges&&(c.range=[i,a]),t.push(c)}}var FI=1,II=2,LI=4,RI=8,zI=16,BI=32,VI=64,HI=128,UI=256,WI=512,GI=1024,KI=FI|II|UI;function qI(e,t){return II|(e?LI:0)|(t?RI:0)}var JI=0,YI=1,XI=2,ZI=3,QI=4,$I=5,eL=function(e,t,n){this.options=e=NI(e),this.sourceFile=e.sourceFile,this.keywords=TI(eI[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=QF[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=TI(r);var i=(r?r+` `:``)+QF.strict;this.reservedWordsStrict=TI(i),this.reservedWordsStrictBind=TI(i+` `+QF.strictBind),this.input=String(t),this.containsEsc=!1,this.pos=n||0,this.curLine=1,e.startLocation?(this.lineStart=this.pos-e.startLocation.column,this.curLine=e.startLocation.line):n?(this.lineStart=this.input.lastIndexOf(`
21
+ `,n-1)+1,this.options.locations&&(this.curLine=this.input.slice(0,this.lineStart).split(pI).length)):this.lineStart=0,this.type=X.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule=e.sourceType===`module`,this.strict=this.inModule||e.strict===!0||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),this.pos===0&&e.allowHashBang&&this.input.slice(0,2)===`#!`&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(this.options.sourceType===`commonjs`?II:FI),this.regexpState=null,this.privateNameStack=[]},tL={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowReturn:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},allowUsing:{configurable:!0},inClassStaticBlock:{configurable:!0}};eL.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})},tL.inFunction.get=function(){return(this.currentVarScope().flags&II)>0},tL.inGenerator.get=function(){return(this.currentVarScope().flags&RI)>0},tL.inAsync.get=function(){return(this.currentVarScope().flags&LI)>0},tL.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(UI|WI))return!1;if(t&II)return(t&LI)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},tL.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&FI)},tL.allowSuper.get=function(){return(this.currentThisScope().flags&VI)>0||this.options.allowSuperOutsideMethod},tL.allowDirectSuper.get=function(){return(this.currentThisScope().flags&HI)>0},tL.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},tL.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(UI|WI)||t&II&&!(t&zI))return!0}return!1},tL.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&GI||!this.inModule&&e&FI)},tL.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&UI)>0},eL.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var n=this,r=0;r<e.length;r++)n=e[r](n);return n},eL.parse=function(e,t){return new this(t,e).parse()},eL.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},eL.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(eL.prototype,tL);var nL=eL.prototype,rL=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;nL.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){vI.lastIndex=e,e+=vI.exec(this.input)[0].length;var t=rL.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){vI.lastIndex=e+t[0].length;var n=vI.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||pI.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,vI.lastIndex=e,e+=vI.exec(this.input)[0].length,this.input[e]===`;`&&e++}},nL.eat=function(e){return this.type===e&&(this.next(),!0)},nL.isContextual=function(e){return this.type===X.name&&this.value===e&&!this.containsEsc},nL.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},nL.catchStackOverflow=function(e){try{return e()}catch(e){if(e instanceof Error&&(/\bstack\b.*\b(exceeded|overflow)\b/i.test(e.message)||/\btoo much recursion\b/i.test(e.message)))this.raise(this.start,`Not enough stack space to parse input`);else throw e}},nL.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},nL.canInsertSemicolon=function(){return this.type===X.eof||this.type===X.braceR||pI.test(this.input.slice(this.lastTokEnd,this.start))},nL.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},nL.semicolon=function(){!this.eat(X.semi)&&!this.insertSemicolon()&&this.unexpected()},nL.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},nL.expect=function(e){this.eat(e)||this.unexpected()},nL.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var iL=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};nL.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,`Comma is not permitted after the rest element`);var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,t?`Assigning to rvalue`:`Parenthesized pattern`)}},nL.checkExpressionErrors=function(e,t){if(!e)return!1;var n=e.shorthandAssign,r=e.doubleProto;if(!t)return n>=0||r>=0;n>=0&&this.raise(n,`Shorthand property assignments are valid only in destructuring patterns`),r>=0&&this.raiseRecoverable(r,`Redefinition of __proto__ property`)},nL.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)&&this.raise(this.yieldPos,`Yield expression cannot be a default value`),this.awaitPos&&this.raise(this.awaitPos,`Await expression cannot be a default value`)},nL.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var Z=eL.prototype;Z.parseTopLevel=function(e){var t=Object.create(null);for(e.body||=[];this.type!==X.eof;){var n=this.parseStatement(null,!0,t);e.body.push(n)}if(this.inModule)for(var r=0,i=Object.keys(this.undefinedExports);r<i.length;r+=1){var a=i[r];this.raiseRecoverable(this.undefinedExports[a].start,`Export '`+a+`' is not defined`)}return this.adaptDirectivePrologue(e.body),this.next(),e.sourceType=this.options.sourceType===`commonjs`?`script`:this.options.sourceType,this.finishNode(e,`Program`)};var aL={kind:`loop`},oL={kind:`switch`};Z.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;vI.lastIndex=this.pos;var t=vI.exec(this.input),n=this.pos+t[0].length,r=this.fullCharCodeAt(n);if(r===91||r===92)return!0;if(e)return!1;if(r===123)return!0;if(aI(r)){var i=n;do n+=r<=65535?1:2;while(oI(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!tI.test(a))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;vI.lastIndex=this.pos;var e=vI.exec(this.input),t=this.pos+e[0].length,n;return!pI.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(oI(n=this.fullCharCodeAt(t+8))||n===92))},Z.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;vI.lastIndex=this.pos;var n=vI.exec(this.input),r=this.pos+n[0].length;if(pI.test(this.input.slice(this.pos,r)))return!1;if(e){var i=r+5,a;if(this.input.slice(r,i)!==`using`||i===this.input.length||oI(a=this.fullCharCodeAt(i))||a===92)return!1;vI.lastIndex=i;var o=vI.exec(this.input);if(r=i+o[0].length,o&&pI.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!aI(s)&&s!==92)return!1;var c=r;do r+=s<=65535?1:2;while(oI(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(c,r);if(tI.test(l))return!1;if(t&&!e&&l===`of`){vI.lastIndex=r;var u=vI.exec(this.input);if(r+=u[0].length,this.input.charCodeAt(r)!==61||(s=this.input.charCodeAt(r+1))===61||s===62)return!1}return!0},Z.isAwaitUsing=function(e){return this.isUsingKeyword(!0,e)},Z.isUsing=function(e){return this.isUsingKeyword(!1,e)},Z.parseStatement=function(e,t,n){var r=this.type,i=this.startNode(),a;switch(this.isLet(e)&&(r=X._var,a=`let`),r){case X._break:case X._continue:return this.parseBreakContinueStatement(i,r.keyword);case X._debugger:return this.parseDebuggerStatement(i);case X._do:return this.parseDoStatement(i);case X._for:return this.parseForStatement(i);case X._function:return e&&(this.strict||e!==`if`&&e!==`label`)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case X._class:return e&&this.unexpected(),this.parseClass(i,!0);case X._if:return this.parseIfStatement(i);case X._return:return this.parseReturnStatement(i);case X._switch:return this.parseSwitchStatement(i);case X._throw:return this.parseThrowStatement(i);case X._try:return this.parseTryStatement(i);case X._const:case X._var:return a||=this.value,e&&a!==`var`&&this.unexpected(),this.parseVarStatement(i,a);case X._while:return this.parseWhileStatement(i);case X._with:return this.parseWithStatement(i);case X.braceL:return this.parseBlock(!0,i);case X.semi:return this.parseEmptyStatement(i);case X._export:case X._import:if(this.options.ecmaVersion>10&&r===X._import){vI.lastIndex=this.pos;var o=vI.exec(this.input),s=this.pos+o[0].length,c=this.input.charCodeAt(s);if(c===40||c===46)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,`'import' and 'export' may only appear at the top level`),this.inModule||this.raise(this.start,`'import' and 'export' may appear only with 'sourceType: module'`)),r===X._import?this.parseImport(i):this.parseExport(i,n);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var l=this.isAwaitUsing(!1)?`await using`:this.isUsing(!1)?`using`:null;if(l)return this.allowUsing||this.raise(this.start,"Using declaration cannot appear in the top level when source type is `script` or in the bare case statement"),e&&this.raise(this.start,`Using declaration is not allowed in single-statement positions`),l===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.next(),this.parseVar(i,!1,l),this.semicolon(),this.finishNode(i,`VariableDeclaration`);var u=this.value,d=this.parseExpression();return r===X.name&&d.type===`Identifier`&&this.eat(X.colon)?this.parseLabeledStatement(i,u,d,e):this.parseExpressionStatement(i,d)}},Z.parseBreakContinueStatement=function(e,t){var n=t===`break`;this.next(),this.eat(X.semi)||this.insertSemicolon()?e.label=null:this.type===X.name?(e.label=this.parseIdent(),this.semicolon()):this.unexpected();for(var r=0;r<this.labels.length;++r){var i=this.labels[r];if((e.label==null||i.name===e.label.name)&&(i.kind!=null&&(n||i.kind===`loop`)||e.label&&n))break}return r===this.labels.length&&this.raise(e.start,`Unsyntactic `+t),this.finishNode(e,n?`BreakStatement`:`ContinueStatement`)},Z.parseDebuggerStatement=function(e){return this.next(),this.semicolon(),this.finishNode(e,`DebuggerStatement`)},Z.parseDoStatement=function(e){return this.next(),this.labels.push(aL),e.body=this.parseStatement(`do`),this.labels.pop(),this.expect(X._while),e.test=this.parseParenExpression(),this.options.ecmaVersion>=6?this.eat(X.semi):this.semicolon(),this.finishNode(e,`DoWhileStatement`)},Z.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual(`await`)?this.lastTokStart:-1;if(this.labels.push(aL),this.enterScope(0),this.expect(X.parenL),this.type===X.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var n=this.isLet();if(this.type===X._var||this.type===X._const||n){var r=this.startNode(),i=n?`let`:this.value;return this.next(),this.parseVar(r,!0,i),this.finishNode(r,`VariableDeclaration`),this.parseForAfterInit(e,r,t)}var a=this.isContextual(`let`),o=!1,s=this.isUsing(!0)?`using`:this.isAwaitUsing(!0)?`await using`:null;if(s){var c=this.startNode();return this.next(),s===`await using`&&(this.canAwait||this.raise(this.start,`Await using cannot appear outside of async function`),this.next()),this.parseVar(c,!0,s),this.finishNode(c,`VariableDeclaration`),this.parseForAfterInit(e,c,t)}var l=this.containsEsc,u=new iL,d=this.start,f=t>-1?this.parseExprSubscripts(u,`await`):this.parseExpression(!0,u);return this.type===X._in||(o=this.options.ecmaVersion>=6&&this.isContextual(`of`))?(t>-1?(this.type===X._in&&this.unexpected(t),e.await=!0):o&&this.options.ecmaVersion>=8&&(f.start===d&&!l&&f.type===`Identifier`&&f.name===`async`?this.unexpected():this.options.ecmaVersion>=9&&(e.await=!1)),a&&o&&this.raise(f.start,`The left-hand side of a for-of loop may not start with 'let'.`),this.toAssignable(f,!1,u),this.checkLValPattern(f),this.parseForIn(e,f)):(this.checkExpressionErrors(u,!0),t>-1&&this.unexpected(t),this.parseFor(e,f))},Z.parseForAfterInit=function(e,t,n){return(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))&&t.declarations.length===1?(this.type===X._in?((t.kind===`using`||t.kind===`await using`)&&!t.declarations[0].init&&this.raise(this.start,`Using declaration is not allowed in for-in loops`),this.options.ecmaVersion>=9&&n>-1&&this.unexpected(n)):this.options.ecmaVersion>=9&&(e.await=n>-1),this.parseForIn(e,t)):(n>-1&&this.unexpected(n),this.parseFor(e,t))},Z.parseFunctionStatement=function(e,t,n){return this.next(),this.parseFunction(e,cL|(n?0:lL),!1,t)},Z.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(`if`),e.alternate=this.eat(X._else)?this.parseStatement(`if`):null,this.finishNode(e,`IfStatement`)},Z.parseReturnStatement=function(e){return this.allowReturn||this.raise(this.start,`'return' outside of function`),this.next(),this.eat(X.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,`ReturnStatement`)},Z.parseSwitchStatement=function(e){this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(X.braceL),this.labels.push(oL),this.enterScope(GI);for(var t,n=!1;this.type!==X.braceR;)if(this.type===X._case||this.type===X._default){var r=this.type===X._case;t&&this.finishNode(t,`SwitchCase`),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),r?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,`Multiple default clauses`),n=!0,t.test=null),this.expect(X.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,`SwitchCase`),this.next(),this.labels.pop(),this.finishNode(e,`SwitchStatement`)},Z.parseThrowStatement=function(e){return this.next(),pI.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,`Illegal newline after throw`),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,`ThrowStatement`)};var sL=[];Z.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?BI:0),this.checkLValPattern(e,t?QI:XI),this.expect(X.parenR),e},Z.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===X._catch){var t=this.startNode();this.next(),this.eat(X.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,`CatchClause`)}return e.finalizer=this.eat(X._finally)?this.parseBlock():null,!e.handler&&!e.finalizer&&this.raise(e.start,`Missing catch or finally clause`),this.finishNode(e,`TryStatement`)},Z.parseVarStatement=function(e,t,n){return this.next(),this.parseVar(e,!1,t,n),this.semicolon(),this.finishNode(e,`VariableDeclaration`)},Z.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(aL),e.body=this.parseStatement(`while`),this.labels.pop(),this.finishNode(e,`WhileStatement`)},Z.parseWithStatement=function(e){return this.strict&&this.raise(this.start,`'with' in strict mode`),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(`with`),this.finishNode(e,`WithStatement`)},Z.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,`EmptyStatement`)},Z.parseLabeledStatement=function(e,t,n,r){for(var i=0,a=this.labels;i<a.length;i+=1)a[i].name===t&&this.raise(n.start,`Label '`+t+`' is already declared`);for(var o=this.type.isLoop?`loop`:this.type===X._switch?`switch`:null,s=this.labels.length-1;s>=0;s--){var c=this.labels[s];if(c.statementStart===e.start)c.statementStart=this.start,c.kind=o;else break}return this.labels.push({name:t,kind:o,statementStart:this.start}),e.body=this.parseStatement(r?r.indexOf(`label`)===-1?r+`label`:r:`label`),this.labels.pop(),e.label=n,this.finishNode(e,`LabeledStatement`)},Z.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,`ExpressionStatement`)},Z.parseBlock=function(e,t,n){for(e===void 0&&(e=!0),t===void 0&&(t=this.startNode()),t.body=[],this.expect(X.braceL),e&&this.enterScope(0);this.type!==X.braceR;){var r=this.parseStatement(null);t.body.push(r)}return n&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,`BlockStatement`)},Z.parseFor=function(e,t){return e.init=t,this.expect(X.semi),e.test=this.type===X.semi?null:this.parseExpression(),this.expect(X.semi),e.update=this.type===X.parenR?null:this.parseExpression(),this.expect(X.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,`ForStatement`)},Z.parseForIn=function(e,t){var n=this.type===X._in;return this.next(),t.type===`VariableDeclaration`&&t.declarations[0].init!=null&&(!n||this.options.ecmaVersion<8||this.strict||t.kind!==`var`||t.declarations[0].id.type!==`Identifier`)&&this.raise(t.start,(n?`for-in`:`for-of`)+` loop variable declaration may not have an initializer`),e.left=t,e.right=n?this.parseExpression():this.parseMaybeAssign(),this.expect(X.parenR),e.body=this.parseStatement(`for`),this.exitScope(),this.labels.pop(),this.finishNode(e,n?`ForInStatement`:`ForOfStatement`)},Z.parseVar=function(e,t,n,r){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(X.eq)?i.init=this.parseMaybeAssign(t):!r&&n===`const`&&!(this.type===X._in||this.options.ecmaVersion>=6&&this.isContextual(`of`))?this.unexpected():!r&&(n===`using`||n===`await using`)&&this.options.ecmaVersion>=17&&this.type!==X._in&&!this.isContextual(`of`)?this.raise(this.lastTokEnd,`Missing initializer in `+n+` declaration`):!r&&i.id.type!==`Identifier`&&!(t&&(this.type===X._in||this.isContextual(`of`)))?this.raise(this.lastTokEnd,`Complex binding patterns require an initialization value`):i.init=null,e.declarations.push(this.finishNode(i,`VariableDeclarator`)),!this.eat(X.comma))break}return e},Z.parseVarId=function(e,t){e.id=t===`using`||t===`await using`?this.parseIdent():this.parseBindingAtom(),this.checkLValPattern(e.id,t===`var`?YI:XI,!1)};var cL=1,lL=2,uL=4;Z.parseFunction=function(e,t,n,r,i){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!r)&&(this.type===X.star&&t&lL&&this.unexpected(),e.generator=this.eat(X.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&cL&&(e.id=t&uL&&this.type!==X.name?null:this.parseIdent(),e.id&&!(t&lL)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?YI:XI:ZI));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qI(e.async,e.generator)),t&cL||(e.id=this.type===X.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n,!1,i),this.yieldPos=a,this.awaitPos=o,this.awaitIdentPos=s,this.finishNode(e,t&cL?`FunctionDeclaration`:`FunctionExpression`)},Z.parseFunctionParams=function(e){this.expect(X.parenL),e.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},Z.parseClass=function(e,t){this.next();var n=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var r=this.enterClassBody(),i=this.startNode(),a=!1;for(i.body=[],this.expect(X.braceL);this.type!==X.braceR;){var o=this.parseClassElement(e.superClass!==null);o&&(i.body.push(o),o.type===`MethodDefinition`&&o.kind===`constructor`?(a&&this.raiseRecoverable(o.start,`Duplicate constructor in the same class`),a=!0):o.key&&o.key.type===`PrivateIdentifier`&&dL(r,o)&&this.raiseRecoverable(o.key.start,`Identifier '#`+o.key.name+`' has already been declared`))}return this.strict=n,this.next(),e.body=this.finishNode(i,`ClassBody`),this.exitClassBody(),this.finishNode(e,t?`ClassDeclaration`:`ClassExpression`)},Z.parseClassElement=function(e){if(this.eat(X.semi))return null;var t=this.options.ecmaVersion,n=this.startNode(),r=``,i=!1,a=!1,o=`method`,s=!1;if(this.eatContextual(`static`)){if(t>=13&&this.eat(X.braceL))return this.parseClassStaticBlock(n),n;this.isClassElementNameStart()||this.type===X.star?s=!0:r=`static`}if(n.static=s,!r&&t>=8&&this.eatContextual(`async`)&&((this.isClassElementNameStart()||this.type===X.star)&&!this.canInsertSemicolon()?a=!0:r=`async`),!r&&(t>=9||!a)&&this.eat(X.star)&&(i=!0),!r&&!a&&!i){var c=this.value;(this.eatContextual(`get`)||this.eatContextual(`set`))&&(this.isClassElementNameStart()?o=c:r=c)}if(r?(n.computed=!1,n.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),n.key.name=r,this.finishNode(n.key,`Identifier`)):this.parseClassElementName(n),t<13||this.type===X.parenL||o!==`method`||i||a){var l=!n.static&&fL(n,`constructor`),u=l&&e;l&&o!==`method`&&this.raise(n.key.start,`Constructor can't have get/set modifier`),n.kind=l?`constructor`:o,this.parseClassMethod(n,i,a,u)}else this.parseClassField(n);return n},Z.isClassElementNameStart=function(){return this.type===X.name||this.type===X.privateId||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword},Z.parseClassElementName=function(e){this.type===X.privateId?(this.value===`constructor`&&this.raise(this.start,`Classes can't have an element named '#constructor'`),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},Z.parseClassMethod=function(e,t,n,r){var i=e.key;e.kind===`constructor`?(t&&this.raise(i.start,`Constructor can't be a generator`),n&&this.raise(i.start,`Constructor can't be an async method`)):e.static&&fL(e,`prototype`)&&this.raise(i.start,`Classes may not have a static property named prototype`);var a=e.value=this.parseMethod(t,n,r);return e.kind===`get`&&a.params.length!==0&&this.raiseRecoverable(a.start,`getter should have no params`),e.kind===`set`&&a.params.length!==1&&this.raiseRecoverable(a.start,`setter should have exactly one param`),e.kind===`set`&&a.params[0].type===`RestElement`&&this.raiseRecoverable(a.params[0].start,`Setter cannot use rest params`),this.finishNode(e,`MethodDefinition`)},Z.parseClassField=function(e){return fL(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&fL(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(X.eq)?(this.enterScope(WI|VI),e.value=this.parseMaybeAssign(),this.exitScope()):e.value=null,this.semicolon(),this.finishNode(e,`PropertyDefinition`)},Z.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(UI|VI);this.type!==X.braceR;){var n=this.parseStatement(null);e.body.push(n)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,`StaticBlock`)},Z.parseClassId=function(e,t){this.type===X.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,XI,!1)):(t===!0&&this.unexpected(),e.id=null)},Z.parseClassSuper=function(e){e.superClass=this.eat(X._extends)?this.parseExprSubscripts(null,!1):null},Z.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},Z.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,n=e.used;if(this.options.checkPrivateFields)for(var r=this.privateNameStack.length,i=r===0?null:this.privateNameStack[r-1],a=0;a<n.length;++a){var o=n[a];SI(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function dL(e,t){var n=t.key.name,r=e[n],i=`true`;return t.type===`MethodDefinition`&&(t.kind===`get`||t.kind===`set`)&&(i=(t.static?`s`:`i`)+t.kind),r===`iget`&&i===`iset`||r===`iset`&&i===`iget`||r===`sget`&&i===`sset`||r===`sset`&&i===`sget`?(e[n]=`true`,!1):r?!0:(e[n]=i,!1)}function fL(e,t){var n=e.computed,r=e.key;return!n&&(r.type===`Identifier`&&r.name===t||r.type===`Literal`&&r.value===t)}Z.parseExportAllDeclaration=function(e,t){return this.options.ecmaVersion>=11&&(this.eatContextual(`as`)?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual(`from`),this.type!==X.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ExportAllDeclaration`)},Z.parseExport=function(e,t){if(this.next(),this.eat(X.star))return this.parseExportAllDeclaration(e,t);if(this.eat(X._default))return this.checkExport(t,`default`,this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,`ExportDefaultDeclaration`);if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),e.declaration.type===`VariableDeclaration`?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[]);else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual(`from`))this.type!==X.string&&this.unexpected(),e.source=this.parseExprAtom(),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause());else{for(var n=0,r=e.specifiers;n<r.length;n+=1){var i=r[n];this.checkUnreserved(i.local),this.checkLocalExport(i.local),i.local.type===`Literal`&&this.raise(i.local.start,"A string literal cannot be used as an exported binding without `from`.")}e.source=null,this.options.ecmaVersion>=16&&(e.attributes=[])}this.semicolon()}return this.finishNode(e,`ExportNamedDeclaration`)},Z.parseExportDeclaration=function(e){return this.parseStatement(null)},Z.parseExportDefaultDeclaration=function(){var e;if(this.type===X._function||(e=this.isAsyncFunction())){var t=this.startNode();return this.next(),e&&this.next(),this.parseFunction(t,cL|uL,!1,e)}if(this.type===X._class){var n=this.startNode();return this.parseClass(n,`nullableID`)}var r=this.parseMaybeAssign();return this.semicolon(),r},Z.checkExport=function(e,t,n){e&&(typeof t!=`string`&&(t=t.type===`Identifier`?t.name:t.value),SI(e,t)&&this.raiseRecoverable(n,`Duplicate export '`+t+`'`),e[t]=!0)},Z.checkPatternExport=function(e,t){var n=t.type;if(n===`Identifier`)this.checkExport(e,t,t.start);else if(n===`ObjectPattern`)for(var r=0,i=t.properties;r<i.length;r+=1){var a=i[r];this.checkPatternExport(e,a)}else if(n===`ArrayPattern`)for(var o=0,s=t.elements;o<s.length;o+=1){var c=s[o];c&&this.checkPatternExport(e,c)}else n===`Property`?this.checkPatternExport(e,t.value):n===`AssignmentPattern`?this.checkPatternExport(e,t.left):n===`RestElement`&&this.checkPatternExport(e,t.argument)},Z.checkVariableExport=function(e,t){if(e)for(var n=0,r=t;n<r.length;n+=1){var i=r[n];this.checkPatternExport(e,i.id)}},Z.shouldParseExportStatement=function(){return this.type.keyword===`var`||this.type.keyword===`const`||this.type.keyword===`class`||this.type.keyword===`function`||this.isLet()||this.isAsyncFunction()},Z.parseExportSpecifier=function(e){var t=this.startNode();return t.local=this.parseModuleExportName(),t.exported=this.eatContextual(`as`)?this.parseModuleExportName():t.local,this.checkExport(e,t.exported,t.exported.start),this.finishNode(t,`ExportSpecifier`)},Z.parseExportSpecifiers=function(e){var t=[],n=!0;for(this.expect(X.braceL);!this.eat(X.braceR);){if(n)n=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;t.push(this.parseExportSpecifier(e))}return t},Z.parseImport=function(e){return this.next(),this.type===X.string?(e.specifiers=sL,e.source=this.parseExprAtom()):(e.specifiers=this.parseImportSpecifiers(),this.expectContextual(`from`),e.source=this.type===X.string?this.parseExprAtom():this.unexpected()),this.options.ecmaVersion>=16&&(e.attributes=this.parseWithClause()),this.semicolon(),this.finishNode(e,`ImportDeclaration`)},Z.parseImportSpecifier=function(){var e=this.startNode();return e.imported=this.parseModuleExportName(),this.eatContextual(`as`)?e.local=this.parseIdent():(this.checkUnreserved(e.imported),e.local=e.imported),this.checkLValSimple(e.local,XI),this.finishNode(e,`ImportSpecifier`)},Z.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,XI),this.finishNode(e,`ImportDefaultSpecifier`)},Z.parseImportNamespaceSpecifier=function(){var e=this.startNode();return this.next(),this.expectContextual(`as`),e.local=this.parseIdent(),this.checkLValSimple(e.local,XI),this.finishNode(e,`ImportNamespaceSpecifier`)},Z.parseImportSpecifiers=function(){var e=[],t=!0;if(this.type===X.name&&(e.push(this.parseImportDefaultSpecifier()),!this.eat(X.comma)))return e;if(this.type===X.star)return e.push(this.parseImportNamespaceSpecifier()),e;for(this.expect(X.braceL);!this.eat(X.braceR);){if(t)t=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;e.push(this.parseImportSpecifier())}return e},Z.parseWithClause=function(){var e=[];if(!this.eat(X._with))return e;this.expect(X.braceL);for(var t={},n=!0;!this.eat(X.braceR);){if(n)n=!1;else if(this.expect(X.comma),this.afterTrailingComma(X.braceR))break;var r=this.parseImportAttribute(),i=r.key.type===`Identifier`?r.key.name:r.key.value;SI(t,i)&&this.raiseRecoverable(r.key.start,`Duplicate attribute key '`+i+`'`),t[i]=!0,e.push(r)}return e},Z.parseImportAttribute=function(){var e=this.startNode();return e.key=this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`),this.expect(X.colon),this.type!==X.string&&this.unexpected(),e.value=this.parseExprAtom(),this.finishNode(e,`ImportAttribute`)},Z.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===X.string){var e=this.parseLiteral(this.value);return DI.test(e.value)&&this.raise(e.start,`An export name cannot include a lone surrogate.`),e}return this.parseIdent(!0)},Z.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t)e[t].directive=e[t].expression.raw.slice(1,-1)},Z.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type===`ExpressionStatement`&&e.expression.type===`Literal`&&typeof e.expression.value==`string`&&(this.input[e.start]===`"`||this.input[e.start]===`'`)};var pL=eL.prototype;pL.toAssignable=function(e,t,n){if(this.options.ecmaVersion>=6&&e)switch(e.type){case`Identifier`:this.inAsync&&e.name===`await`&&this.raise(e.start,`Cannot use 'await' as identifier inside an async function`);break;case`ObjectPattern`:case`ArrayPattern`:case`AssignmentPattern`:case`RestElement`:break;case`ObjectExpression`:e.type=`ObjectPattern`,n&&this.checkPatternErrors(n,!0);for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.toAssignable(a,t),a.type===`RestElement`&&(a.argument.type===`ArrayPattern`||a.argument.type===`ObjectPattern`)&&this.raise(a.argument.start,`Unexpected token`)}break;case`Property`:e.kind!==`init`&&this.raise(e.key.start,`Object pattern can't contain getter or setter`),this.toAssignable(e.value,t);break;case`ArrayExpression`:e.type=`ArrayPattern`,n&&this.checkPatternErrors(n,!0),this.toAssignableList(e.elements,t);break;case`SpreadElement`:e.type=`RestElement`,this.toAssignable(e.argument,t),e.argument.type===`AssignmentPattern`&&this.raise(e.argument.start,`Rest elements cannot have a default value`);break;case`AssignmentExpression`:e.operator!==`=`&&this.raise(e.left.end,`Only '=' operator can be used for specifying default value.`),e.type=`AssignmentPattern`,delete e.operator,this.toAssignable(e.left,t);break;case`ParenthesizedExpression`:this.toAssignable(e.expression,t,n);break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:if(!t)break;default:this.raise(e.start,`Assigning to rvalue`)}else n&&this.checkPatternErrors(n,!0);return e},pL.toAssignableList=function(e,t){for(var n=e.length,r=0;r<n;r++){var i=e[r];i&&this.toAssignable(i,t)}if(n){var a=e[n-1];this.options.ecmaVersion===6&&t&&a&&a.type===`RestElement`&&a.argument.type!==`Identifier`&&this.unexpected(a.argument.start)}return e},pL.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},pL.parseRestBinding=function(){var e=this.startNode();return this.next(),this.options.ecmaVersion===6&&this.type!==X.name&&this.unexpected(),e.argument=this.parseBindingAtom(),this.finishNode(e,`RestElement`)},pL.parseBindingAtom=function(){if(this.options.ecmaVersion>=6)switch(this.type){case X.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(X.bracketR,!0,!0),this.finishNode(e,`ArrayPattern`);case X.braceL:return this.parseObj(!0)}return this.parseIdent()},pL.parseBindingList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);)if(a?a=!1:this.expect(X.comma),t&&this.type===X.comma)i.push(null);else if(n&&this.afterTrailingComma(e))break;else if(this.type===X.ellipsis){var o=this.parseRestBinding();this.parseBindingListItem(o),i.push(o),this.type===X.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.expect(e);break}else i.push(this.parseAssignableListItem(r));return i},pL.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},pL.parseBindingListItem=function(e){return e},pL.parseMaybeDefault=function(e,t,n){if(n||=this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(X.eq))return n;var r=this.startNodeAt(e,t);return r.left=n,r.right=this.parseMaybeAssign(),this.finishNode(r,`AssignmentPattern`)},pL.checkLValSimple=function(e,t,n){t===void 0&&(t=JI);var r=t!==JI;switch(e.type){case`Identifier`:this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(r?`Binding `:`Assigning to `)+e.name+` in strict mode`),r&&(t===XI&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(SI(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==$I&&this.declareName(e.name,t,e.start));break;case`ChainExpression`:this.raiseRecoverable(e.start,`Optional chaining cannot appear in left-hand side`);break;case`MemberExpression`:r&&this.raiseRecoverable(e.start,`Binding member expression`);break;case`ParenthesizedExpression`:return r&&this.raiseRecoverable(e.start,`Binding parenthesized expression`),this.checkLValSimple(e.expression,t,n);default:this.raise(e.start,(r?`Binding`:`Assigning to`)+` rvalue`)}},pL.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=JI),e.type){case`ObjectPattern`:for(var r=0,i=e.properties;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,t,n)}break;case`ArrayPattern`:for(var o=0,s=e.elements;o<s.length;o+=1){var c=s[o];c&&this.checkLValInnerPattern(c,t,n)}break;default:this.checkLValSimple(e,t,n)}},pL.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=JI),e.type){case`Property`:this.checkLValInnerPattern(e.value,t,n);break;case`AssignmentPattern`:this.checkLValPattern(e.left,t,n);break;case`RestElement`:this.checkLValPattern(e.argument,t,n);break;default:this.checkLValPattern(e,t,n)}};var mL=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},hL={b_stat:new mL(`{`,!1),b_expr:new mL(`{`,!0),b_tmpl:new mL("${",!1),p_stat:new mL(`(`,!1),p_expr:new mL(`(`,!0),q_tmpl:new mL("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new mL(`function`,!1),f_expr:new mL(`function`,!0),f_expr_gen:new mL(`function`,!0,!1,null,!0),f_gen:new mL(`function`,!1,!1,null,!0)},gL=eL.prototype;gL.initialContext=function(){return[hL.b_stat]},gL.curContext=function(){return this.context[this.context.length-1]},gL.braceIsBlock=function(e){var t=this.curContext();return t===hL.f_expr||t===hL.f_stat?!0:e===X.colon&&(t===hL.b_stat||t===hL.b_expr)?!t.isExpr:e===X._return||e===X.name&&this.exprAllowed?pI.test(this.input.slice(this.lastTokEnd,this.start)):e===X._else||e===X.semi||e===X.eof||e===X.parenR||e===X.arrow?!0:e===X.braceL?t===hL.b_stat:e===X._var||e===X._const||e===X.name?!1:!this.exprAllowed},gL.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token===`function`)return t.generator}return!1},gL.updateContext=function(e){var t,n=this.type;n.keyword&&e===X.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},gL.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},X.parenR.updateContext=X.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=!0;return}var e=this.context.pop();e===hL.b_stat&&this.curContext().token===`function`&&(e=this.context.pop()),this.exprAllowed=!e.isExpr},X.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?hL.b_stat:hL.b_expr),this.exprAllowed=!0},X.dollarBraceL.updateContext=function(){this.context.push(hL.b_tmpl),this.exprAllowed=!0},X.parenL.updateContext=function(e){var t=e===X._if||e===X._for||e===X._with||e===X._while;this.context.push(t?hL.p_stat:hL.p_expr),this.exprAllowed=!0},X.incDec.updateContext=function(){},X._function.updateContext=X._class.updateContext=function(e){e.beforeExpr&&e!==X._else&&(e!==X.semi||this.curContext()===hL.p_stat)&&!(e===X._return&&pI.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==X.colon&&e!==X.braceL||this.curContext()!==hL.b_stat)?this.context.push(hL.f_expr):this.context.push(hL.f_stat),this.exprAllowed=!1},X.colon.updateContext=function(){this.curContext().token===`function`&&this.context.pop(),this.exprAllowed=!0},X.backQuote.updateContext=function(){this.curContext()===hL.q_tmpl?this.context.pop():this.context.push(hL.q_tmpl),this.exprAllowed=!1},X.star.updateContext=function(e){if(e===X._function){var t=this.context.length-1;this.context[t]===hL.f_expr?this.context[t]=hL.f_expr_gen:this.context[t]=hL.f_gen}this.exprAllowed=!0},X.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==X.dot&&(this.value===`of`&&!this.exprAllowed||this.value===`yield`&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var _L=eL.prototype;_L.checkPropClash=function(e,t,n){if(!(this.options.ecmaVersion>=9&&e.type===`SpreadElement`)&&!(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var r=e.key,i;switch(r.type){case`Identifier`:i=r.name;break;case`Literal`:i=String(r.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6){i===`__proto__`&&a===`init`&&(t.proto&&(n?n.doubleProto<0&&(n.doubleProto=r.start):this.raiseRecoverable(r.start,`Redefinition of __proto__ property`)),t.proto=!0);return}i=`$`+i;var o=t[i];o?(a===`init`?this.strict&&o.init||o.get||o.set:o.init||o[a])&&this.raiseRecoverable(r.start,`Redefinition of property`):o=t[i]={init:!1,get:!1,set:!1},o[a]=!0}},_L.parseExpression=function(e,t){var n=this;return this.catchStackOverflow(function(){var r=n.start,i=n.startLoc,a=n.parseMaybeAssign(e,t);if(n.type===X.comma){var o=n.startNodeAt(r,i);for(o.expressions=[a];n.eat(X.comma);)o.expressions.push(n.parseMaybeAssign(e,t));return n.finishNode(o,`SequenceExpression`)}return a})},_L.parseMaybeAssign=function(e,t,n){if(this.isContextual(`yield`)){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var r=!1,i=-1,a=-1,o=-1;t?(i=t.parenthesizedAssign,a=t.trailingComma,o=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new iL,r=!0);var s=this.start,c=this.startLoc;(this.type===X.parenL||this.type===X.name)&&(this.potentialArrowAt=this.start,this.potentialArrowInForAwait=e===`await`);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,s,c)),this.type.isAssign){var u=this.startNodeAt(s,c);return u.operator=this.value,this.type===X.eq&&(l=this.toAssignable(l,!1,t)),r||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=l.start&&(t.shorthandAssign=-1),this.type===X.eq?this.checkLValPattern(l):this.checkLValSimple(l),u.left=l,this.next(),u.right=this.parseMaybeAssign(e),o>-1&&(t.doubleProto=o),this.finishNode(u,`AssignmentExpression`)}return r&&this.checkExpressionErrors(t,!0),i>-1&&(t.parenthesizedAssign=i),a>-1&&(t.trailingComma=a),l},_L.parseMaybeConditional=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return i;if((i.type!==`ArrowFunctionExpression`||i.start!==n)&&this.eat(X.question)){var a=this.startNodeAt(n,r);return a.test=i,a.consequent=this.parseMaybeAssign(),this.expect(X.colon),a.alternate=this.parseMaybeAssign(e),this.finishNode(a,`ConditionalExpression`)}return i},_L.parseExprOps=function(e,t){var n=this.start,r=this.startLoc,i=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||i.start===n&&i.type===`ArrowFunctionExpression`?i:this.parseExprOp(i,n,r,-1,e)},_L.parseExprOp=function(e,t,n,r,i){var a=this.type.binop;if(a!=null&&(!i||this.type!==X._in)&&a>r){var o=this.type===X.logicalOR||this.type===X.logicalAND,s=this.type===X.coalesce;s&&(a=X.logicalAND.binop);var c=this.value;this.next();var l=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,i),l,u,a,i),f=this.buildBinary(t,n,e,d,c,o||s);return(o&&this.type===X.coalesce||s&&(this.type===X.logicalOR||this.type===X.logicalAND))&&this.raiseRecoverable(this.start,`Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses`),this.parseExprOp(f,t,n,r,i)}return e},_L.buildBinary=function(e,t,n,r,i,a){r.type===`PrivateIdentifier`&&this.raise(r.start,`Private identifier can only be left side of binary expression`);var o=this.startNodeAt(e,t);return o.left=n,o.operator=i,o.right=r,this.finishNode(o,a?`LogicalExpression`:`BinaryExpression`)},_L.parseMaybeUnary=function(e,t,n,r){var i=this.start,a=this.startLoc,o;if(this.isContextual(`await`)&&this.canAwait)o=this.parseAwait(r),t=!0;else if(this.type.prefix){var s=this.startNode(),c=this.type===X.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,c,r),this.checkExpressionErrors(e,!0),c?this.checkLValSimple(s.argument):this.strict&&s.operator===`delete`&&vL(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&yL(s.argument)?this.raiseRecoverable(s.start,`Private fields can not be deleted`):t=!0,o=this.finishNode(s,c?`UpdateExpression`:`UnaryExpression`)}else if(!t&&this.type===X.privateId)(r||this.privateNameStack.length===0)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==X._in&&this.unexpected();else{if(o=this.parseExprSubscripts(e,r),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var l=this.startNodeAt(i,a);l.operator=this.value,l.prefix=!1,l.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(l,`UpdateExpression`)}}if(!n&&(o.type!==`ArrowFunctionExpression`||o.start!==i)&&this.eat(X.starstar)){if(t)this.unexpected(this.lastTokStart);else return this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,r),`**`,!1)}else return o};function vL(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&vL(e.expression)}function yL(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&yL(e.expression)||e.type===`ParenthesizedExpression`&&yL(e.expression)}_L.parseExprSubscripts=function(e,t){var n=this.start,r=this.startLoc,i=this.parseExprAtom(e,t);if(i.type===`ArrowFunctionExpression`&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==`)`)return i;var a=this.parseSubscripts(i,n,r,!1,t);return e&&a.type===`MemberExpression`&&(e.parenthesizedAssign>=a.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=a.start&&(e.parenthesizedBind=-1),e.trailingComma>=a.start&&(e.trailingComma=-1)),a},_L.parseSubscripts=function(e,t,n,r,i){for(var a=this.options.ecmaVersion>=8&&e.type===`Identifier`&&e.name===`async`&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start,o=!1;;){var s=this.parseSubscript(e,t,n,r,a,o,i);if(s.optional&&(o=!0),s===e||s.type===`ArrowFunctionExpression`){if(o){var c=this.startNodeAt(t,n);c.expression=s,s=this.finishNode(c,`ChainExpression`)}return s}e=s}},_L.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(X.arrow)},_L.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},_L.parseSubscript=function(e,t,n,r,i,a,o){var s=this.options.ecmaVersion>=11,c=s&&this.eat(X.questionDot);r&&c&&this.raise(this.lastTokStart,`Optional chaining cannot appear in the callee of new expressions`);var l=this.eat(X.bracketL);if(l||c&&this.type!==X.parenL&&this.type!==X.backQuote||this.eat(X.dot)){var u=this.startNodeAt(t,n);u.object=e,l?(u.property=this.parseExpression(),this.expect(X.bracketR)):u.property=this.type===X.privateId&&e.type!==`Super`?this.parsePrivateIdent():this.parseIdent(this.options.allowReserved!==`never`),u.computed=!!l,s&&(u.optional=c),e=this.finishNode(u,`MemberExpression`)}else if(!r&&this.eat(X.parenL)){var d=new iL,f=this.yieldPos,p=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var h=this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1,d);if(i&&!c&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,`Cannot use 'await' as identifier inside an async function`),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=m,this.parseSubscriptAsyncArrow(t,n,h,o);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=m||this.awaitIdentPos;var g=this.startNodeAt(t,n);g.callee=e,g.arguments=h,s&&(g.optional=c),e=this.finishNode(g,`CallExpression`)}else if(this.type===X.backQuote){(c||a)&&this.raise(this.start,`Optional chaining cannot appear in the tag of tagged template expressions`);var _=this.startNodeAt(t,n);_.tag=e,_.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(_,`TaggedTemplateExpression`)}return e},_L.parseExprAtom=function(e,t,n){this.type===X.slash&&this.readRegexp();var r,i=this.potentialArrowAt===this.start;switch(this.type){case X._super:return this.allowSuper||this.raise(this.start,`'super' keyword outside a method`),r=this.startNode(),this.next(),this.type===X.parenL&&!this.allowDirectSuper&&this.raise(r.start,`super() call outside constructor of a subclass`),this.type!==X.dot&&this.type!==X.bracketL&&this.type!==X.parenL&&this.unexpected(),this.finishNode(r,`Super`);case X._this:return r=this.startNode(),this.next(),this.finishNode(r,`ThisExpression`);case X.name:var a=this.start,o=this.startLoc,s=this.containsEsc,c=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&c.name===`async`&&!this.canInsertSemicolon()&&this.eat(X._function))return this.overrideContext(hL.f_expr),this.parseFunction(this.startNodeAt(a,o),0,!1,!0,t);if(i&&!this.canInsertSemicolon()){if(this.eat(X.arrow))return this.parseArrowExpression(this.startNodeAt(a,o),[c],!1,t);if(this.options.ecmaVersion>=8&&c.name===`async`&&this.type===X.name&&!s&&(!this.potentialArrowInForAwait||this.value!==`of`||this.containsEsc))return c=this.parseIdent(!1),(this.canInsertSemicolon()||!this.eat(X.arrow))&&this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,o),[c],!0,t)}return c;case X.regexp:var l=this.value;return r=this.parseLiteral(l.value),r.regex={pattern:l.pattern,flags:l.flags},r;case X.num:case X.string:return this.parseLiteral(this.value);case X._null:case X._true:case X._false:return r=this.startNode(),r.value=this.type===X._null?null:this.type===X._true,r.raw=this.type.keyword,this.next(),this.finishNode(r,`Literal`);case X.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(i,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case X.bracketL:return r=this.startNode(),this.next(),r.elements=this.parseExprList(X.bracketR,!0,!0,e),this.finishNode(r,`ArrayExpression`);case X.braceL:return this.overrideContext(hL.b_expr),this.parseObj(!1,e);case X._function:return r=this.startNode(),this.next(),this.parseFunction(r,0);case X._class:return this.parseClass(this.startNode(),!1);case X._new:return this.parseNew();case X.backQuote:return this.parseTemplate();case X._import:return this.options.ecmaVersion>=11?this.parseExprImport(n):this.unexpected();default:return this.parseExprAtomDefault()}},_L.parseExprAtomDefault=function(){this.unexpected()},_L.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword import`),this.next(),this.type===X.parenL&&!e)return this.parseDynamicImport(t);if(this.type===X.dot){var n=this.startNodeAt(t.start,t.loc&&t.loc.start);return n.name=`import`,t.meta=this.finishNode(n,`Identifier`),this.parseImportMeta(t)}this.unexpected()},_L.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),this.options.ecmaVersion>=16)this.eat(X.parenR)?e.options=null:(this.expect(X.comma),this.afterTrailingComma(X.parenR)?e.options=null:(e.options=this.parseMaybeAssign(),this.eat(X.parenR)||(this.expect(X.comma),this.afterTrailingComma(X.parenR)||this.unexpected())));else if(!this.eat(X.parenR)){var t=this.start;this.eat(X.comma)&&this.eat(X.parenR)?this.raiseRecoverable(t,`Trailing comma is not allowed in import()`):this.unexpected(t)}return this.finishNode(e,`ImportExpression`)},_L.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`meta`&&this.raiseRecoverable(e.property.start,`The only valid meta property for import is 'import.meta'`),t&&this.raiseRecoverable(e.start,`'import.meta' must not contain escaped characters`),this.options.sourceType!==`module`&&!this.options.allowImportExportEverywhere&&this.raiseRecoverable(e.start,`Cannot use 'import.meta' outside a module`),this.finishNode(e,`MetaProperty`)},_L.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),t.raw.charCodeAt(t.raw.length-1)===110&&(t.bigint=t.value==null?t.raw.slice(0,-1).replace(/_/g,``):t.value.toString()),this.next(),this.finishNode(t,`Literal`)},_L.parseParenExpression=function(){this.expect(X.parenL);var e=this.parseExpression();return this.expect(X.parenR),e},_L.shouldParseArrow=function(e){return!this.canInsertSemicolon()},_L.parseParenAndDistinguishExpression=function(e,t){var n=this.start,r=this.startLoc,i,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,s=this.startLoc,c=[],l=!0,u=!1,d=new iL,f=this.yieldPos,p=this.awaitPos,m;for(this.yieldPos=0,this.awaitPos=0;this.type!==X.parenR;){if(l?l=!1:this.expect(X.comma),a&&this.afterTrailingComma(X.parenR,!0)){u=!0;break}if(this.type===X.ellipsis){m=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===X.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`);break}c.push(this.parseMaybeAssign(!1,d,this.parseParenItem))}var h=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(X.parenR),e&&this.shouldParseArrow(c)&&this.eat(X.arrow))return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=f,this.awaitPos=p,this.parseParenArrowList(n,r,c,t);(!c.length||u)&&this.unexpected(this.lastTokStart),m&&this.unexpected(m),this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,c.length>1?(i=this.startNodeAt(o,s),i.expressions=c,this.finishNodeAt(i,`SequenceExpression`,h,g)):i=c[0]}else i=this.parseParenExpression();if(this.options.preserveParens){var _=this.startNodeAt(n,r);return _.expression=i,this.finishNode(_,`ParenthesizedExpression`)}return i},_L.parseParenItem=function(e){return e},_L.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var bL=[];_L.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword new`);var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===X.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name=`new`,e.meta=this.finishNode(t,`Identifier`),this.next();var n=this.containsEsc;return e.property=this.parseIdent(!0),e.property.name!==`target`&&this.raiseRecoverable(e.property.start,`The only valid meta property for new is 'new.target'`),n&&this.raiseRecoverable(e.start,`'new.target' must not contain escaped characters`),this.allowNewDotTarget||this.raiseRecoverable(e.start,`'new.target' can only be used in functions and class static block`),this.finishNode(e,`MetaProperty`)}var r=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),r,i,!0,!1),e.callee.type===`Super`&&this.raiseRecoverable(r,`Invalid use of 'super'`),e.arguments=this.eat(X.parenL)?this.parseExprList(X.parenR,this.options.ecmaVersion>=8,!1):bL,this.finishNode(e,`NewExpression`)},_L.parseTemplateElement=function(e){var t=e.isTagged,n=this.startNode();return this.type===X.invalidTemplate?(t||this.raiseRecoverable(this.start,`Bad escape sequence in untagged template literal`),n.value={raw:this.value.replace(/\r\n?/g,`
22
22
  `),cooked:null}):n.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,`
23
- `),cooked:this.value},this.next(),n.tail=this.type===X.backQuote,this.finishNode(n,`TemplateElement`)},hL.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===X.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(X.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(X.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},hL.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===X.name||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===X.star)&&!dI.test(this.input.slice(this.lastTokEnd,this.start))},hL.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(X.braceR);){if(r)r=!1;else if(this.expect(X.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(X.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},hL.parseProperty=function(e,t){var n=this.startNode(),r,i,a,o;if(this.options.ecmaVersion>=9&&this.eat(X.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===X.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(n,`RestElement`)):(n.argument=this.parseMaybeAssign(!1,t),this.type===X.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,`SpreadElement`));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(r=this.eat(X.star)));var s=this.containsEsc;return this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(X.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,o,t,s),this.finishNode(n,`Property`)},hL.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},hL.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===X.colon&&this.unexpected(),this.eat(X.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===X.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.type!==X.comma&&this.type!==X.braceR&&this.type!==X.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===X.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected()},hL.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(X.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(X.bracketR),e.key;e.computed=!1}return e.key=this.type===X.num||this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},hL.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},hL.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(GI(t,r.generator)|zI|(n?BI:0)),this.expect(X.parenL),r.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},hL.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(GI(n,!1)|LI),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},hL.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==X.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||s)&&(o=this.strictDirective(this.end),o&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,ZI),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},hL.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},hL.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,qI,t?null:n)}},hL.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(X.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===X.comma?o=null:this.type===X.ellipsis?(o=this.parseSpread(r),r&&this.type===X.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},hL.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),!(this.currentThisScope().flags&WI)&&r===`arguments`&&this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),this.inClassStaticBlock&&(r===`arguments`||r===`await`)&&this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(!this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},hL.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},hL.parseIdentNode=function(){var e=this.startNode();return this.type===X.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name===`class`||e.name===`function`)&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=X.name):this.unexpected(),e},hL.parsePrivateIdent=function(){var e=this.startNode();return this.type===X.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},hL.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===X.semi||this.canInsertSemicolon()||this.type!==X.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(X.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},hL.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var yL=QI.prototype;yL.raise=function(e,t){var n=OI(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},yL.raiseRecoverable=yL.raise,yL.curPosition=function(){if(this.options.locations)return new EI(this.curLine,this.pos-this.lineStart)};var bL=QI.prototype,xL=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};bL.enterScope=function(e){this.scopeStack.push(new xL(e))},bL.exitScope=function(){this.scopeStack.pop()},bL.treatFunctionsAsVarInScope=function(e){return e.flags&PI||!this.inModule&&e.flags&NI},bL.declareName=function(e,t,n){var r=!1;if(t===JI){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&NI&&delete this.undefinedExports[e]}else if(t===XI)this.currentScope().lexical.push(e);else if(t===YI){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(s.flags&RI&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&NI&&delete this.undefinedExports[e],s.flags&WI)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},bL.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},bL.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},bL.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(WI|HI|VI))return t}},bL.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(WI|HI|VI)&&!(t.flags&LI))return t}};var SL=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new DI(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},CL=QI.prototype;CL.startNode=function(){return new SL(this,this.start,this.startLoc)},CL.startNodeAt=function(e,t){return new SL(this,e,t)};function wL(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}CL.finishNode=function(e,t){return wL.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},CL.finishNodeAt=function(e,t,n,r){return wL.call(this,e,t,n,r)},CL.copyNode=function(e){var t=new SL(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var TL=`Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz`,EL=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,DL=EL+` Extended_Pictographic`,OL=DL,kL=OL+` EBase EComp EMod EPres ExtPict`,AL=kL,jL={9:EL,10:DL,11:OL,12:kL,13:AL,14:AL},ML={9:``,10:``,11:``,12:``,13:``,14:`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`},NL=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,PL=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,FL=PL+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,IL=FL+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,LL=IL+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,RL=LL+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,zL={9:PL,10:FL,11:IL,12:LL,13:RL,14:RL+` `+TL},BL={};function VL(e){var t=BL[e]={binary:CI(jL[e]+` `+NL),binaryOfStrings:CI(ML[e]),nonBinary:{General_Category:CI(NL),Script:CI(zL[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var HL=0,UL=[9,10,11,12,13,14];HL<UL.length;HL+=1){var WL=UL[HL];VL(WL)}var Q=QI.prototype,GL=function(e,t){this.parent=e,this.base=t||this};GL.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},GL.prototype.sibling=function(){return new GL(this.parent,this.base)};var KL=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=BL[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};KL.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=e|0,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},KL.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},KL.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},KL.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i=n.charCodeAt(e),a;return!(t||this.switchU)||i<=55295||i>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},KL.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},KL.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},KL.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},KL.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},KL.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},Q.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)};function qL(e){for(var t in e)return!0;return!1}Q.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&qL(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},Q.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},Q.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new GL(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},Q.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Q.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},Q.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Q.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},Q.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Q.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},Q.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Q.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Q.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},Q.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},Q.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&JL(n);)t+=wI(n),e.advance();return t};function JL(e){return e===105||e===109||e===115}Q.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Q.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},Q.regexp_eatSyntaxCharacter=function(e){var t=e.current();return YL(t)?(e.lastIntValue=t,e.advance(),!0):!1};function YL(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}Q.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!YL(n);)e.advance();return e.pos!==t},Q.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124&&(e.advance(),!0)},Q.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n){if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`)}t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},Q.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},Q.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=wI(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=wI(e.lastIntValue);return!0}return!1},Q.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),XL(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function XL(e){return rI(e,!0)||e===36||e===95}Q.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),ZL(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function ZL(e){return iI(e,!0)||e===36||e===95||e===8204||e===8205}Q.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},Q.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Q.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},Q.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Q.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Q.regexp_eatZero=function(e){return e.current()===48&&!lR(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Q.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114&&(e.lastIntValue=13,e.advance(),!0)},Q.regexp_eatControlLetter=function(e){var t=e.current();return QL(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function QL(e){return e>=65&&e<=90||e>=97&&e<=122}Q.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&$L(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function $L(e){return e>=0&&e<=1114111}Q.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)&&(e.lastIntValue=t,e.advance(),!0)},Q.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var eR=0,tR=1,nR=2;Q.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(rR(t))return e.lastIntValue=-1,e.advance(),tR;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===nR&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return eR};function rR(e){return e===100||e===68||e===115||e===83||e===119||e===87}Q.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),tR}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return eR},Q.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){bI(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},Q.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return tR;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return nR;e.raise(`Invalid property name`)},Q.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;iR(t=e.current());)e.lastStringValue+=wI(t),e.advance();return e.lastStringValue!==``};function iR(e){return QL(e)||e===95}Q.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;aR(t=e.current());)e.lastStringValue+=wI(t),e.advance();return e.lastStringValue!==``};function aR(e){return iR(e)||lR(e)}Q.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Q.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===nR&&e.raise(`Negated character class may contain strings`),!0}return!1},Q.regexp_classContents=function(e){return e.current()===93?tR:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),tR)},Q.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},Q.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||fR(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r!==93&&(e.lastIntValue=r,e.advance(),!0)},Q.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Q.regexp_classSetExpression=function(e){var t=tR,n;if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e)){n===nR&&(t=nR);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==nR&&(t=tR);continue}e.raise(`Invalid character in character class`)}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return t}else e.raise(`Invalid character in character class`)}for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===nR&&(t=nR)}},Q.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},Q.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?tR:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Q.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===nR&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},Q.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},Q.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===nR&&(t=nR);return t},Q.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?tR:nR},Q.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&oR(n)||sR(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function oR(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function sR(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}Q.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return cR(t)?(e.lastIntValue=t,e.advance(),!0):!1};function cR(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}Q.regexp_eatClassControlLetter=function(e){var t=e.current();return lR(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},Q.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},Q.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;lR(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function lR(e){return e>=48&&e<=57}Q.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;uR(n=e.current());)e.lastIntValue=16*e.lastIntValue+dR(n),e.advance();return e.pos!==t};function uR(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function dR(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}Q.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;e.lastIntValue=t<=3&&this.regexp_eatOctalDigit(e)?t*64+n*8+e.lastIntValue:t*8+n}else e.lastIntValue=t;return!0}return!1},Q.regexp_eatOctalDigit=function(e){var t=e.current();return fR(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function fR(e){return e>=48&&e<=55}Q.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!uR(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+dR(i),e.advance()}return!0};var pR=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new DI(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},mR=QI.prototype;mR.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new pR(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},mR.getToken=function(){return this.next(),new pR(this)},typeof Symbol<`u`&&(mR[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===X.eof,value:t}}}}),mR.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(X.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},mR.readToken=function(e){return rI(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},mR.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},mR.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},mR.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=mI(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},mR.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!pI(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},mR.skipSpace=function(){loop:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(e>8&&e<14||e>=5760&&hI.test(String.fromCharCode(e)))++this.pos;else break loop}}},mR.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},mR.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(X.ellipsis)):(++this.pos,this.finishToken(X.dot))},mR.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(X.assign,2):this.finishOp(X.slash,1)},mR.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?X.star:X.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=X.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(X.assign,n+1):this.finishOp(r,n)},mR.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(X.assign,3):this.finishOp(e===124?X.logicalOR:X.logicalAND,2):t===61?this.finishOp(X.assign,2):this.finishOp(e===124?X.bitwiseOR:X.bitwiseAND,1)},mR.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(X.assign,2):this.finishOp(X.bitwiseXOR,1)},mR.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||dI.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(X.incDec,2):t===61?this.finishOp(X.assign,2):this.finishOp(X.plusMin,1)},mR.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(X.assign,n+1):this.finishOp(X.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(X.relational,n))},mR.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(X.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(X.arrow)):this.finishOp(e===61?X.eq:X.prefix,1)},mR.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(X.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(X.assign,3):this.finishOp(X.coalesce,2)}return this.finishOp(X.question,1)},mR.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),rI(t,!0)||t===92))return this.finishToken(X.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+wI(t)+`'`)},mR.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(X.parenL);case 41:return++this.pos,this.finishToken(X.parenR);case 59:return++this.pos,this.finishToken(X.semi);case 44:return++this.pos,this.finishToken(X.comma);case 91:return++this.pos,this.finishToken(X.bracketL);case 93:return++this.pos,this.finishToken(X.bracketR);case 123:return++this.pos,this.finishToken(X.braceL);case 125:return++this.pos,this.finishToken(X.braceR);case 58:return++this.pos,this.finishToken(X.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(X.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(X.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+wI(e)+`'`)},mR.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},mR.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(dI.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new KL(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(X.regexp,{pattern:i,flags:o,value:c})},mR.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95){i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;continue}if(d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,d>=e)break;s=u,o=o*e+d}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o};function hR(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function gR(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}mR.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=gR(this.input.slice(t,this.pos)),++this.pos):rI(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(X.num,n)},mR.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=gR(this.input.slice(t,this.pos));return++this.pos,rI(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(X.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),rI(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=hR(this.input.slice(t,this.pos),n);return this.finishToken(X.num,a)},mR.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,`Code point out of bounds`)}else t=this.readHexChar(4);return t},mR.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(pI(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(X.string,t)};var _R={};mR.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===_R)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},mR.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw _R;this.raise(e,t)},mR.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===X.template||this.type===X.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(X.dollarBraceL)):(++this.pos,this.finishToken(X.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(X.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(pI(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
24
- `;break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},mR.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(X.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
23
+ `),cooked:this.value},this.next(),n.tail=this.type===X.backQuote,this.finishNode(n,`TemplateElement`)},_L.parseTemplate=function(e){e===void 0&&(e={});var t=e.isTagged;t===void 0&&(t=!1);var n=this.startNode();this.next(),n.expressions=[];var r=this.parseTemplateElement({isTagged:t});for(n.quasis=[r];!r.tail;)this.type===X.eof&&this.raise(this.pos,`Unterminated template literal`),this.expect(X.dollarBraceL),n.expressions.push(this.parseExpression()),this.expect(X.braceR),n.quasis.push(r=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(n,`TemplateLiteral`)},_L.isAsyncProp=function(e){return!e.computed&&e.key.type===`Identifier`&&e.key.name===`async`&&(this.type===X.name||this.type===X.num||this.type===X.string||this.type===X.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===X.star)&&!pI.test(this.input.slice(this.lastTokEnd,this.start))},_L.parseObj=function(e,t){var n=this.startNode(),r=!0,i={};for(n.properties=[],this.next();!this.eat(X.braceR);){if(r)r=!1;else if(this.expect(X.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(X.braceR))break;var a=this.parseProperty(e,t);e||this.checkPropClash(a,i,t),n.properties.push(a)}return this.finishNode(n,e?`ObjectPattern`:`ObjectExpression`)},_L.parseProperty=function(e,t){var n=this.startNode(),r,i,a,o;if(this.options.ecmaVersion>=9&&this.eat(X.ellipsis))return e?(n.argument=this.parseIdent(!1),this.type===X.comma&&this.raiseRecoverable(this.start,`Comma is not permitted after the rest element`),this.finishNode(n,`RestElement`)):(n.argument=this.parseMaybeAssign(!1,t),this.type===X.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(n,`SpreadElement`));this.options.ecmaVersion>=6&&(n.method=!1,n.shorthand=!1,(e||t)&&(a=this.start,o=this.startLoc),e||(r=this.eat(X.star)));var s=this.containsEsc;return this.parsePropertyName(n),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(n)?(i=!0,r=this.options.ecmaVersion>=9&&this.eat(X.star),this.parsePropertyName(n)):i=!1,this.parsePropertyValue(n,e,r,i,a,o,t,s),this.finishNode(n,`Property`)},_L.parseGetterSetter=function(e){var t=e.key.name;this.parsePropertyName(e),e.value=this.parseMethod(!1),e.kind=t;var n=e.kind===`get`?0:1;if(e.value.params.length!==n){var r=e.value.start;e.kind===`get`?this.raiseRecoverable(r,`getter should have no params`):this.raiseRecoverable(r,`setter should have exactly one param`)}else e.kind===`set`&&e.value.params[0].type===`RestElement`&&this.raiseRecoverable(e.value.params[0].start,`Setter cannot use rest params`)},_L.parsePropertyValue=function(e,t,n,r,i,a,o,s){(n||r)&&this.type===X.colon&&this.unexpected(),this.eat(X.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind=`init`):this.options.ecmaVersion>=6&&this.type===X.parenL?(t&&this.unexpected(),e.method=!0,e.value=this.parseMethod(n,r),e.kind=`init`):!t&&!s&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type===`Identifier`&&(e.key.name===`get`||e.key.name===`set`)&&this.type!==X.comma&&this.type!==X.braceR&&this.type!==X.eq?((n||r)&&this.unexpected(),this.parseGetterSetter(e)):this.options.ecmaVersion>=6&&!e.computed&&e.key.type===`Identifier`?((n||r)&&this.unexpected(),this.checkUnreserved(e.key),e.key.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=i),t?e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key)):this.type===X.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(i,a,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.kind=`init`,e.shorthand=!0):this.unexpected()},_L.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(X.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(X.bracketR),e.key;e.computed=!1}return e.key=this.type===X.num||this.type===X.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!==`never`)},_L.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},_L.parseMethod=function(e,t,n){var r=this.startNode(),i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.initFunction(r),this.options.ecmaVersion>=6&&(r.generator=e),this.options.ecmaVersion>=8&&(r.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(qI(t,r.generator)|VI|(n?HI:0)),this.expect(X.parenL),r.params=this.parseBindingList(X.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(r,!1,!0,!1),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(r,`FunctionExpression`)},_L.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(qI(n,!1)|zI),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,r),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=o,this.finishNode(e,`ArrowFunctionExpression`)},_L.parseFunctionBody=function(e,t,n,r){var i=t&&this.type!==X.braceL,a=this.strict,o=!1;if(i)e.body=this.parseMaybeAssign(r),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);(!a||s)&&(o=this.strictDirective(this.end),o&&s&&this.raiseRecoverable(e.start,`Illegal 'use strict' directive in function with non-simple parameter list`));var c=this.labels;this.labels=[],o&&(this.strict=!0),this.checkParams(e,!a&&!o&&!t&&!n&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,$I),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},_L.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},_L.checkParams=function(e,t){for(var n=Object.create(null),r=0,i=e.params;r<i.length;r+=1){var a=i[r];this.checkLValInnerPattern(a,YI,t?null:n)}},_L.parseExprList=function(e,t,n,r){for(var i=[],a=!0;!this.eat(e);){if(a)a=!1;else if(this.expect(X.comma),t&&this.afterTrailingComma(e))break;var o=void 0;n&&this.type===X.comma?o=null:this.type===X.ellipsis?(o=this.parseSpread(r),r&&this.type===X.comma&&r.trailingComma<0&&(r.trailingComma=this.start)):o=this.parseMaybeAssign(!1,r),i.push(o)}return i},_L.checkUnreserved=function(e){var t=e.start,n=e.end,r=e.name;this.inGenerator&&r===`yield`&&this.raiseRecoverable(t,`Cannot use 'yield' as identifier inside a generator`),this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use 'await' as identifier inside an async function`),!(this.currentThisScope().flags&KI)&&r===`arguments`&&this.raiseRecoverable(t,`Cannot use 'arguments' in class field initializer`),this.inClassStaticBlock&&(r===`arguments`||r===`await`)&&this.raise(t,`Cannot use `+r+` in class static initialization block`),this.keywords.test(r)&&this.raise(t,`Unexpected keyword '`+r+`'`),!(this.options.ecmaVersion<6&&this.input.slice(t,n).indexOf(`\\`)!==-1)&&(this.strict?this.reservedWordsStrict:this.reservedWords).test(r)&&(!this.inAsync&&r===`await`&&this.raiseRecoverable(t,`Cannot use keyword 'await' outside an async function`),this.raiseRecoverable(t,`The keyword '`+r+`' is reserved`))},_L.parseIdent=function(e){var t=this.parseIdentNode();return this.next(!!e),this.finishNode(t,`Identifier`),e||(this.checkUnreserved(t),t.name===`await`&&!this.awaitIdentPos&&(this.awaitIdentPos=t.start)),t},_L.parseIdentNode=function(){var e=this.startNode();return this.type===X.name?e.name=this.value:this.type.keyword?(e.name=this.type.keyword,(e.name===`class`||e.name===`function`)&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)&&this.context.pop(),this.type=X.name):this.unexpected(),e},_L.parsePrivateIdent=function(){var e=this.startNode();return this.type===X.privateId?e.name=this.value:this.unexpected(),this.next(),this.finishNode(e,`PrivateIdentifier`),this.options.checkPrivateFields&&(this.privateNameStack.length===0?this.raise(e.start,`Private field '#`+e.name+`' must be declared in an enclosing class`):this.privateNameStack[this.privateNameStack.length-1].used.push(e)),e},_L.parseYield=function(e){this.yieldPos||=this.start;var t=this.startNode();return this.next(),this.type===X.semi||this.canInsertSemicolon()||this.type!==X.star&&!this.type.startsExpr?(t.delegate=!1,t.argument=null):(t.delegate=this.eat(X.star),t.argument=this.parseMaybeAssign(e)),this.finishNode(t,`YieldExpression`)},_L.parseAwait=function(e){this.awaitPos||=this.start;var t=this.startNode();return this.next(),t.argument=this.parseMaybeUnary(null,!0,!1,e),this.finishNode(t,`AwaitExpression`)};var xL=eL.prototype;xL.raise=function(e,t){var n=AI(this.input,e);t+=` (`+n.line+`:`+n.column+`)`,this.sourceFile&&(t+=` in `+this.sourceFile);var r=SyntaxError(t);throw r.pos=e,r.loc=n,r.raisedAt=this.pos,r},xL.raiseRecoverable=xL.raise,xL.curPosition=function(){if(this.options.locations)return new OI(this.curLine,this.pos-this.lineStart)};var SL=eL.prototype,CL=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};SL.enterScope=function(e){this.scopeStack.push(new CL(e))},SL.exitScope=function(){this.scopeStack.pop()},SL.treatFunctionsAsVarInScope=function(e){return e.flags&II||!this.inModule&&e.flags&FI},SL.declareName=function(e,t,n){var r=!1;if(t===XI){var i=this.currentScope();r=i.lexical.indexOf(e)>-1||i.functions.indexOf(e)>-1||i.var.indexOf(e)>-1,i.lexical.push(e),this.inModule&&i.flags&FI&&delete this.undefinedExports[e]}else if(t===QI)this.currentScope().lexical.push(e);else if(t===ZI){var a=this.currentScope();r=this.treatFunctionsAsVar?a.lexical.indexOf(e)>-1:a.lexical.indexOf(e)>-1||a.var.indexOf(e)>-1,a.functions.push(e)}else for(var o=this.scopeStack.length-1;o>=0;--o){var s=this.scopeStack[o];if(s.lexical.indexOf(e)>-1&&!(s.flags&BI&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&FI&&delete this.undefinedExports[e],s.flags&KI)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},SL.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},SL.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},SL.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(KI|WI|UI))return t}},SL.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(KI|WI|UI)&&!(t.flags&zI))return t}};var wL=function(e,t,n){this.type=``,this.start=t,this.end=0,e.options.locations&&(this.loc=new kI(e,n)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},TL=eL.prototype;TL.startNode=function(){return new wL(this,this.start,this.startLoc)},TL.startNodeAt=function(e,t){return new wL(this,e,t)};function EL(e,t,n,r){return e.type=t,e.end=n,this.options.locations&&(e.loc.end=r),this.options.ranges&&(e.range[1]=n),e}TL.finishNode=function(e,t){return EL.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},TL.finishNodeAt=function(e,t,n,r){return EL.call(this,e,t,n,r)},TL.copyNode=function(e){var t=new wL(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var DL=`Berf Beria_Erfe Gara Garay Gukh Gurung_Khema Hrkt Katakana_Or_Hiragana Kawi Kirat_Rai Krai Nag_Mundari Nagm Ol_Onal Onao Sidetic Sidt Sunu Sunuwar Tai_Yo Tayo Todhri Todr Tolong_Siki Tols Tulu_Tigalari Tutg Unknown Zzzz`,OL=`ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS`,kL=OL+` Extended_Pictographic`,AL=kL,jL=AL+` EBase EComp EMod EPres ExtPict`,ML=jL,NL={9:OL,10:kL,11:AL,12:jL,13:ML,14:ML},PL={9:``,10:``,11:``,12:``,13:``,14:`Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji`},FL=`Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu`,IL=`Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb`,LL=IL+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,RL=LL+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,zL=RL+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,BL=zL+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,VL={9:IL,10:LL,11:RL,12:zL,13:BL,14:BL+` `+DL},HL={};function UL(e){var t=HL[e]={binary:TI(NL[e]+` `+FL),binaryOfStrings:TI(PL[e]),nonBinary:{General_Category:TI(FL),Script:TI(VL[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script,t.nonBinary.gc=t.nonBinary.General_Category,t.nonBinary.sc=t.nonBinary.Script,t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var WL=0,GL=[9,10,11,12,13,14];WL<GL.length;WL+=1){var KL=GL[WL];UL(KL)}var Q=eL.prototype,qL=function(e,t){this.parent=e,this.base=t||this};qL.prototype.separatedFrom=function(e){for(var t=this;t;t=t.parent)for(var n=e;n;n=n.parent)if(t.base===n.base&&t!==n)return!0;return!1},qL.prototype.sibling=function(){return new qL(this.parent,this.base)};var JL=function(e){this.parser=e,this.validFlags=`gim`+(e.options.ecmaVersion>=6?`uy`:``)+(e.options.ecmaVersion>=9?`s`:``)+(e.options.ecmaVersion>=13?`d`:``)+(e.options.ecmaVersion>=15?`v`:``),this.unicodeProperties=HL[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source=``,this.flags=``,this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue=``,this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=Object.create(null),this.backReferenceNames=[],this.branchID=null};JL.prototype.reset=function(e,t,n){var r=n.indexOf(`v`)!==-1,i=n.indexOf(`u`)!==-1;this.start=e|0,this.source=t+``,this.flags=n,r&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=i&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=i&&this.parser.options.ecmaVersion>=9)},JL.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},JL.prototype.at=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return-1;var i=n.charCodeAt(e);if(!(t||this.switchU)||i<=55295||i>=57344||e+1>=r)return i;var a=n.charCodeAt(e+1);return a>=56320&&a<=57343?(i<<10)+a-56613888:i},JL.prototype.nextIndex=function(e,t){t===void 0&&(t=!1);var n=this.source,r=n.length;if(e>=r)return r;var i=n.charCodeAt(e),a;return!(t||this.switchU)||i<=55295||i>=57344||e+1>=r||(a=n.charCodeAt(e+1))<56320||a>57343?e+1:e+2},JL.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},JL.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},JL.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},JL.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},JL.prototype.eatChars=function(e,t){t===void 0&&(t=!1);for(var n=this.pos,r=0,i=e;r<i.length;r+=1){var a=i[r],o=this.at(n,t);if(o===-1||o!==a)return!1;n=this.nextIndex(n,t)}return this.pos=n,!0},Q.validateRegExpFlags=function(e){for(var t=e.validFlags,n=e.flags,r=!1,i=!1,a=0;a<n.length;a++){var o=n.charAt(a);t.indexOf(o)===-1&&this.raise(e.start,`Invalid regular expression flag`),n.indexOf(o,a+1)>-1&&this.raise(e.start,`Duplicate regular expression flag`),o===`u`&&(r=!0),o===`v`&&(i=!0)}this.options.ecmaVersion>=15&&r&&i&&this.raise(e.start,`Invalid regular expression flag`)};function YL(e){for(var t in e)return!0;return!1}Q.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&YL(e.groupNames)&&(e.switchN=!0,this.regexp_pattern(e))},Q.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue=``,e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames=Object.create(null),e.backReferenceNames.length=0,e.branchID=null,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise(`Unmatched ')'`),(e.eat(93)||e.eat(125))&&e.raise(`Lone quantifier brackets`)),e.maxBackReference>e.numCapturingParens&&e.raise(`Invalid escape`);for(var t=0,n=e.backReferenceNames;t<n.length;t+=1){var r=n[t];e.groupNames[r]||e.raise(`Invalid named capture referenced`)}},Q.regexp_disjunction=function(e){var t=this.options.ecmaVersion>=16;for(t&&(e.branchID=new qL(e.branchID,null)),this.regexp_alternative(e);e.eat(124);)t&&(e.branchID=e.branchID.sibling()),this.regexp_alternative(e);t&&(e.branchID=e.branchID.parent),this.regexp_eatQuantifier(e,!0)&&e.raise(`Nothing to repeat`),e.eat(123)&&e.raise(`Lone quantifier brackets`)},Q.regexp_alternative=function(e){for(;e.pos<e.source.length&&this.regexp_eatTerm(e););},Q.regexp_eatTerm=function(e){return this.regexp_eatAssertion(e)?(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)&&e.switchU&&e.raise(`Invalid quantifier`),!0):(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e))?(this.regexp_eatQuantifier(e),!0):!1},Q.regexp_eatAssertion=function(e){var t=e.pos;if(e.lastAssertionIsQuantifiable=!1,e.eat(94)||e.eat(36))return!0;if(e.eat(92)){if(e.eat(66)||e.eat(98))return!0;e.pos=t}if(e.eat(40)&&e.eat(63)){var n=!1;if(this.options.ecmaVersion>=9&&(n=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise(`Unterminated group`),e.lastAssertionIsQuantifiable=!n,!0}return e.pos=t,!1},Q.regexp_eatQuantifier=function(e,t){return t===void 0&&(t=!1),this.regexp_eatQuantifierPrefix(e,t)?(e.eat(63),!0):!1},Q.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Q.regexp_eatBracedQuantifier=function(e,t){var n=e.pos;if(e.eat(123)){var r=0,i=-1;if(this.regexp_eatDecimalDigits(e)&&(r=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(i=e.lastIntValue),e.eat(125)))return i!==-1&&i<r&&!t&&e.raise(`numbers out of order in {} quantifier`),!0;e.switchU&&!t&&e.raise(`Incomplete quantifier`),e.pos=n}return!1},Q.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)},Q.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e))return!0;e.pos=t}return!1},Q.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)){if(this.options.ecmaVersion>=16){var n=this.regexp_eatModifiers(e),r=e.eat(45);if(n||r){for(var i=0;i<n.length;i++){var a=n.charAt(i);n.indexOf(a,i+1)>-1&&e.raise(`Duplicate regular expression modifiers`)}if(r){var o=this.regexp_eatModifiers(e);!n&&!o&&e.current()===58&&e.raise(`Invalid regular expression modifiers`);for(var s=0;s<o.length;s++){var c=o.charAt(s);(o.indexOf(c,s+1)>-1||n.indexOf(c)>-1)&&e.raise(`Duplicate regular expression modifiers`)}}}}if(e.eat(58)){if(this.regexp_disjunction(e),e.eat(41))return!0;e.raise(`Unterminated group`)}}e.pos=t}return!1},Q.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9?this.regexp_groupSpecifier(e):e.current()===63&&e.raise(`Invalid group`),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise(`Unterminated group`)}return!1},Q.regexp_eatModifiers=function(e){for(var t=``,n=0;(n=e.current())!==-1&&XL(n);)t+=EI(n),e.advance();return t};function XL(e){return e===105||e===109||e===115}Q.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)},Q.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise(`Nothing to repeat`),!1},Q.regexp_eatSyntaxCharacter=function(e){var t=e.current();return ZL(t)?(e.lastIntValue=t,e.advance(),!0):!1};function ZL(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}Q.regexp_eatPatternCharacters=function(e){for(var t=e.pos,n=0;(n=e.current())!==-1&&!ZL(n);)e.advance();return e.pos!==t},Q.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124&&(e.advance(),!0)},Q.regexp_groupSpecifier=function(e){if(e.eat(63)){this.regexp_eatGroupName(e)||e.raise(`Invalid group`);var t=this.options.ecmaVersion>=16,n=e.groupNames[e.lastStringValue];if(n){if(t)for(var r=0,i=n;r<i.length;r+=1)i[r].separatedFrom(e.branchID)||e.raise(`Duplicate capture group name`);else e.raise(`Duplicate capture group name`)}t?(n||(e.groupNames[e.lastStringValue]=[])).push(e.branchID):e.groupNames[e.lastStringValue]=!0}},Q.regexp_eatGroupName=function(e){if(e.lastStringValue=``,e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise(`Invalid capture group name`)}return!1},Q.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue=``,this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=EI(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=EI(e.lastIntValue);return!0}return!1},Q.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),QL(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function QL(e){return aI(e,!0)||e===36||e===95}Q.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,n=this.options.ecmaVersion>=11,r=e.current(n);return e.advance(n),r===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,n)&&(r=e.lastIntValue),$L(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function $L(e){return oI(e,!0)||e===36||e===95||e===8204||e===8205}Q.regexp_eatAtomEscape=function(e){return this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)?!0:(e.switchU&&(e.current()===99&&e.raise(`Invalid unicode escape`),e.raise(`Invalid escape`)),!1)},Q.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var n=e.lastIntValue;if(e.switchU)return n>e.maxBackReference&&(e.maxBackReference=n),!0;if(n<=e.numCapturingParens)return!0;e.pos=t}return!1},Q.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise(`Invalid named reference`)}return!1},Q.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Q.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Q.regexp_eatZero=function(e){return e.current()===48&&!dR(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Q.regexp_eatControlEscape=function(e){var t=e.current();return t===116?(e.lastIntValue=9,e.advance(),!0):t===110?(e.lastIntValue=10,e.advance(),!0):t===118?(e.lastIntValue=11,e.advance(),!0):t===102?(e.lastIntValue=12,e.advance(),!0):t===114&&(e.lastIntValue=13,e.advance(),!0)},Q.regexp_eatControlLetter=function(e){var t=e.current();return eR(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function eR(e){return e>=65&&e<=90||e>=97&&e<=122}Q.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){t===void 0&&(t=!1);var n=e.pos,r=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(r&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343)return e.lastIntValue=(i-55296)*1024+(o-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(r&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&tR(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function tR(e){return e>=0&&e<=1114111}Q.regexp_eatIdentityEscape=function(e){if(e.switchU)return this.regexp_eatSyntaxCharacter(e)?!0:e.eat(47)?(e.lastIntValue=47,!0):!1;var t=e.current();return t!==99&&(!e.switchN||t!==107)&&(e.lastIntValue=t,e.advance(),!0)},Q.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do e.lastIntValue=10*e.lastIntValue+(t-48),e.advance();while((t=e.current())>=48&&t<=57);return!0}return!1};var nR=0,rR=1,iR=2;Q.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(aR(t))return e.lastIntValue=-1,e.advance(),rR;var n=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((n=t===80)||t===112)){e.lastIntValue=-1,e.advance();var r;if(e.eat(123)&&(r=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return n&&r===iR&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return nR};function aR(e){return e===100||e===68||e===115||e===83||e===119||e===87}Q.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var n=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var r=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,n,r),rR}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return nR},Q.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){SI(e.unicodeProperties.nonBinary,t)||e.raise(`Invalid property name`),e.unicodeProperties.nonBinary[t].test(n)||e.raise(`Invalid property value`)},Q.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(e.unicodeProperties.binary.test(t))return rR;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return iR;e.raise(`Invalid property name`)},Q.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;oR(t=e.current());)e.lastStringValue+=EI(t),e.advance();return e.lastStringValue!==``};function oR(e){return eR(e)||e===95}Q.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;sR(t=e.current());)e.lastStringValue+=EI(t),e.advance();return e.lastStringValue!==``};function sR(e){return oR(e)||dR(e)}Q.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Q.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),n=this.regexp_classContents(e);return e.eat(93)||e.raise(`Unterminated character class`),t&&n===iR&&e.raise(`Negated character class may contain strings`),!0}return!1},Q.regexp_classContents=function(e){return e.current()===93?rR:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),rR)},Q.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var n=e.lastIntValue;e.switchU&&(t===-1||n===-1)&&e.raise(`Invalid character class`),t!==-1&&n!==-1&&t>n&&e.raise(`Range out of order in character class`)}}},Q.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var n=e.current();(n===99||mR(n))&&e.raise(`Invalid class escape`),e.raise(`Invalid escape`)}e.pos=t}var r=e.current();return r!==93&&(e.lastIntValue=r,e.advance(),!0)},Q.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Q.regexp_classSetExpression=function(e){var t=rR,n;if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e)){n===iR&&(t=iR);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==iR&&(t=rR);continue}e.raise(`Invalid character in character class`)}if(r!==e.pos)return t;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise(`Invalid character in character class`);if(r!==e.pos)return t}else e.raise(`Invalid character in character class`)}for(;;)if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e),!n)return t;n===iR&&(t=iR)}},Q.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;return n!==-1&&r!==-1&&n>r&&e.raise(`Range out of order in character class`),!0}e.pos=t}return!1},Q.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?rR:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Q.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var n=e.eat(94),r=this.regexp_classContents(e);if(e.eat(93))return n&&r===iR&&e.raise(`Negated character class may contain strings`),r;e.pos=t}if(e.eat(92)){var i=this.regexp_eatCharacterClassEscape(e);if(i)return i;e.pos=t}return null},Q.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var n=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return n}else e.raise(`Invalid escape`);e.pos=t}return null},Q.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)this.regexp_classString(e)===iR&&(t=iR);return t},Q.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?rR:iR},Q.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return this.regexp_eatCharacterEscape(e)||this.regexp_eatClassSetReservedPunctuator(e)?!0:e.eat(98)?(e.lastIntValue=8,!0):(e.pos=t,!1);var n=e.current();return n<0||n===e.lookahead()&&cR(n)||lR(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function cR(e){return e===33||e>=35&&e<=38||e>=42&&e<=44||e===46||e>=58&&e<=64||e===94||e===96||e===126}function lR(e){return e===40||e===41||e===45||e===47||e>=91&&e<=93||e>=123&&e<=125}Q.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return uR(t)?(e.lastIntValue=t,e.advance(),!0):!1};function uR(e){return e===33||e===35||e===37||e===38||e===44||e===45||e>=58&&e<=62||e===64||e===96||e===126}Q.regexp_eatClassControlLetter=function(e){var t=e.current();return dR(t)||t===95?(e.lastIntValue=t%32,e.advance(),!0):!1},Q.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise(`Invalid escape`),e.pos=t}return!1},Q.regexp_eatDecimalDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;dR(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function dR(e){return e>=48&&e<=57}Q.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;fR(n=e.current());)e.lastIntValue=16*e.lastIntValue+pR(n),e.advance();return e.pos!==t};function fR(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function pR(e){return e>=65&&e<=70?10+(e-65):e>=97&&e<=102?10+(e-97):e-48}Q.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var n=e.lastIntValue;e.lastIntValue=t<=3&&this.regexp_eatOctalDigit(e)?t*64+n*8+e.lastIntValue:t*8+n}else e.lastIntValue=t;return!0}return!1},Q.regexp_eatOctalDigit=function(e){var t=e.current();return mR(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function mR(e){return e>=48&&e<=55}Q.regexp_eatFixedHexDigits=function(e,t){var n=e.pos;e.lastIntValue=0;for(var r=0;r<t;++r){var i=e.current();if(!fR(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+pR(i),e.advance()}return!0};var hR=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new kI(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},gR=eL.prototype;gR.next=function(e){!e&&this.type.keyword&&this.containsEsc&&this.raiseRecoverable(this.start,`Escape sequence in keyword `+this.type.keyword),this.options.onToken&&this.options.onToken(new hR(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},gR.getToken=function(){return this.next(),new hR(this)},typeof Symbol<`u`&&(gR[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===X.eof,value:t}}}}),gR.nextToken=function(){var e=this.curContext();if((!e||!e.preserveSpace)&&this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length)return this.finishToken(X.eof);if(e.override)return e.override(this);this.readToken(this.fullCharCodeAtPos())},gR.readToken=function(e){return aI(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},gR.fullCharCodeAt=function(e){var t=this.input.charCodeAt(e);if(t<=55295||t>=56320)return t;var n=this.input.charCodeAt(e+1);return n<=56319||n>=57344?t:(t<<10)+n-56613888},gR.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},gR.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,n=this.input.indexOf(`*/`,this.pos+=2);if(n===-1&&this.raise(this.pos-2,`Unterminated comment`),this.pos=n+2,this.options.locations)for(var r=void 0,i=t;(r=gI(this.input,i,this.pos))>-1;)++this.curLine,i=this.lineStart=r;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,n),t,this.pos,e,this.curPosition())},gR.skipLineComment=function(e){for(var t=this.pos,n=this.options.onComment&&this.curPosition(),r=this.input.charCodeAt(this.pos+=e);this.pos<this.input.length&&!hI(r);)r=this.input.charCodeAt(++this.pos);this.options.onComment&&this.options.onComment(!1,this.input.slice(t+e,this.pos),t,this.pos,n,this.curPosition())},gR.skipSpace=function(){loop:for(;this.pos<this.input.length;){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:this.input.charCodeAt(this.pos+1)===10&&++this.pos;case 10:case 8232:case 8233:++this.pos,this.options.locations&&(++this.curLine,this.lineStart=this.pos);break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break loop}break;default:if(e>8&&e<14||e>=5760&&_I.test(String.fromCharCode(e)))++this.pos;else break loop}}},gR.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},gR.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&e===46&&t===46?(this.pos+=3,this.finishToken(X.ellipsis)):(++this.pos,this.finishToken(X.dot))},gR.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):e===61?this.finishOp(X.assign,2):this.finishOp(X.slash,1)},gR.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,r=e===42?X.star:X.modulo;return this.options.ecmaVersion>=7&&e===42&&t===42&&(++n,r=X.starstar,t=this.input.charCodeAt(this.pos+2)),t===61?this.finishOp(X.assign,n+1):this.finishOp(r,n)},gR.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(X.assign,3):this.finishOp(e===124?X.logicalOR:X.logicalAND,2):t===61?this.finishOp(X.assign,2):this.finishOp(e===124?X.bitwiseOR:X.bitwiseAND,1)},gR.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(X.assign,2):this.finishOp(X.bitwiseXOR,1)},gR.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||pI.test(this.input.slice(this.lastTokEnd,this.pos)))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(X.incDec,2):t===61?this.finishOp(X.assign,2):this.finishOp(X.plusMin,1)},gR.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2,this.input.charCodeAt(this.pos+n)===61?this.finishOp(X.assign,n+1):this.finishOp(X.bitShift,n)):t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45?(this.skipLineComment(4),this.skipSpace(),this.nextToken()):(t===61&&(n=2),this.finishOp(X.relational,n))},gR.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return t===61?this.finishOp(X.equality,this.input.charCodeAt(this.pos+2)===61?3:2):e===61&&t===62&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(X.arrow)):this.finishOp(e===61?X.eq:X.prefix,1)},gR.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var n=this.input.charCodeAt(this.pos+2);if(n<48||n>57)return this.finishOp(X.questionDot,2)}if(t===63)return e>=12&&this.input.charCodeAt(this.pos+2)===61?this.finishOp(X.assign,3):this.finishOp(X.coalesce,2)}return this.finishOp(X.question,1)},gR.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),aI(t,!0)||t===92))return this.finishToken(X.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+EI(t)+`'`)},gR.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(X.parenL);case 41:return++this.pos,this.finishToken(X.parenR);case 59:return++this.pos,this.finishToken(X.semi);case 44:return++this.pos,this.finishToken(X.comma);case 91:return++this.pos,this.finishToken(X.bracketL);case 93:return++this.pos,this.finishToken(X.bracketR);case 123:return++this.pos,this.finishToken(X.braceL);case 125:return++this.pos,this.finishToken(X.braceR);case 58:return++this.pos,this.finishToken(X.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(X.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(t===111||t===79)return this.readRadixNumber(8);if(t===98||t===66)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(X.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,`Unexpected character '`+EI(e)+`'`)},gR.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},gR.readRegexp=function(){for(var e,t,n=this.pos;;){this.pos>=this.input.length&&this.raise(n,`Unterminated regular expression`);var r=this.input.charAt(this.pos);if(pI.test(r)&&this.raise(n,`Unterminated regular expression`),e)e=!1;else{if(r===`[`)t=!0;else if(r===`]`&&t)t=!1;else if(r===`/`&&!t)break;e=r===`\\`}++this.pos}var i=this.input.slice(n,this.pos);++this.pos;var a=this.pos,o=this.readWord1();this.containsEsc&&this.unexpected(a);var s=this.regexpState||=new JL(this);s.reset(n,i,o),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var c=null;try{c=new RegExp(i,o)}catch{}return this.finishToken(X.regexp,{pattern:i,flags:o,value:c})},gR.readInt=function(e,t,n){for(var r=this.options.ecmaVersion>=12&&t===void 0,i=n&&this.input.charCodeAt(this.pos)===48,a=this.pos,o=0,s=0,c=0,l=t??1/0;c<l;++c,++this.pos){var u=this.input.charCodeAt(this.pos),d=void 0;if(r&&u===95){i&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed in legacy octal numeric literals`),s===95&&this.raiseRecoverable(this.pos,`Numeric separator must be exactly one underscore`),c===0&&this.raiseRecoverable(this.pos,`Numeric separator is not allowed at the first of digits`),s=u;continue}if(d=u>=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0,d>=e)break;s=u,o=o*e+d}return r&&s===95&&this.raiseRecoverable(this.pos-1,`Numeric separator is not allowed at the last of digits`),this.pos===a||t!=null&&this.pos-a!==t?null:o};function _R(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function vR(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}gR.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var n=this.readInt(e);return n??this.raise(this.start+2,`Expected number in radix `+e),this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110?(n=vR(this.input.slice(t,this.pos)),++this.pos):aI(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(X.num,n)},gR.readNumber=function(e){var t=this.pos;!e&&this.readInt(10,void 0,!0)===null&&this.raise(t,`Invalid number`);var n=this.pos-t>=2&&this.input.charCodeAt(t)===48;n&&this.strict&&this.raise(t,`Invalid number`);var r=this.input.charCodeAt(this.pos);if(!n&&!e&&this.options.ecmaVersion>=11&&r===110){var i=vR(this.input.slice(t,this.pos));return++this.pos,aI(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(X.num,i)}n&&/[89]/.test(this.input.slice(t,this.pos))&&(n=!1),r===46&&!n&&(++this.pos,this.readInt(10),r=this.input.charCodeAt(this.pos)),(r===69||r===101)&&!n&&(r=this.input.charCodeAt(++this.pos),(r===43||r===45)&&++this.pos,this.readInt(10)===null&&this.raise(t,`Invalid number`)),aI(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=_R(this.input.slice(t,this.pos),n);return this.finishToken(X.num,a)},gR.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;t=this.readHexChar(this.input.indexOf(`}`,this.pos)-this.pos),++this.pos,t>1114111&&this.invalidStringToken(n,`Code point out of bounds`)}else t=this.readHexChar(4);return t},gR.readString=function(e){for(var t=``,n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated string constant`);var r=this.input.charCodeAt(this.pos);if(r===e)break;r===92?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):r===8232||r===8233?(this.options.ecmaVersion<10&&this.raise(this.start,`Unterminated string constant`),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(hI(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(X.string,t)};var yR={};gR.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===yR)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},gR.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw yR;this.raise(e,t)},gR.readTmplToken=function(){for(var e=``,t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,`Unterminated template`);var n=this.input.charCodeAt(this.pos);if(n===96||n===36&&this.input.charCodeAt(this.pos+1)===123)return this.pos===this.start&&(this.type===X.template||this.type===X.invalidTemplate)?n===36?(this.pos+=2,this.finishToken(X.dollarBraceL)):(++this.pos,this.finishToken(X.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(X.template,e));if(n===92)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(hI(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:e+=`
24
+ `;break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},gR.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++)switch(this.input[this.pos]){case`\\`:++this.pos;break;case`$`:if(this.input[this.pos+1]!==`{`)break;case"`":return this.finishToken(X.invalidTemplate,this.input.slice(this.start,this.pos));case`\r`:this.input[this.pos+1]===`
25
25
  `&&++this.pos;case`
26
- `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,`Unterminated template`)},mR.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
27
- `;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return wI(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return pI(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},mR.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},mR.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(iI(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?rI:iI)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=wI(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},mR.readWord=function(){var e=this.readWord1(),t=X.name;return this.keywords.test(e)&&(t=lI[e]),this.finishToken(t,e)},QI.acorn={Parser:QI,version:`8.18.0`,defaultOptions:kI,Position:EI,SourceLocation:DI,getLineInfo:OI,Node:SL,TokenType:aI,tokTypes:X,keywordTypes:lI,TokContext:fL,tokContexts:pL,isIdentifierChar:iI,isIdentifierStart:rI,Token:pR,isNewLine:pI,lineBreak:dI,lineBreakG:fI,nonASCIIwhitespace:hI};function vR(e,t){return QI.parse(e,t)}A(()=>Ke(`ok`,[pe({ok:gt(!0),value:Jt()}),pe({ok:gt(!1),error:pe({kind:gt(`guest_threw`),name:k().max(80),message:k().max(512),transportMessage:k().max(512).optional()})})]));var yR=A(()=>k().regex(/^[A-Za-z][A-Za-z0-9_]*$/u)),bR=yR.refine(e=>{if(e===`env`)return!1;try{return vR(`let ${e};`,{ecmaVersion:`latest`,sourceType:`module`}),!0}catch(e){if(!(e instanceof SyntaxError))throw e;return!1}},`Invalid sandbox transport alias`);A(()=>Ht(bR,Ze(yR).min(1))),A(()=>Ht(bR,Ze(k().regex(/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/u))));var xR=H([`read`,`write`]),SR=Zh,CR=B({access:I(xR),confirm:I(SR)}),wR=H([`none`,`read`,`write`]),TR=P(CR),ER=P(wR);function DR(e){let t=TR({access:e.access,confirm:e.confirm});if(x(t))throw new mF(`Access labels must be access: "read" | "write" and confirm: boolean`);return{access:t.success.access??`write`,confirm:t.success.confirm??!1}}function OR(e,t){let n=`${t.module}.${t.operation}`;switch(e){case`not-granted`:return`${n} is not granted to this Agent.`;case`read-only`:return`${n} changes something, and this Agent has read-only access to ${t.module}.`;case`confirmation-unavailable`:return`${n} needs a person's approval, and no one can be asked here.`;case`declined`:return`${n} was not approved.`}}function kR(e,t){return Object.freeze({refused:!0,module:t.module,operation:t.operation,reason:e,message:OR(e,t)})}function AR(e,t,n){let r=e.sessionGrants?.(t),i=r!==void 0&&Object.hasOwn(r,n)?r:e.grants;if(i===void 0||!Object.hasOwn(i,n))return e.required?.includes(n)===!0?`none`:e.defaultGrant??`write`;let a=ER(i[n]);return Oi(a)?a.success:`none`}async function jR(e,t,n,r,i){let a=await MR(e,t,n,r,i);return a!==void 0&&e.onRefused?.(a,t),a}async function MR(e,t,n,r,i){await e.beforeCall?.(i),i.throwIfAborted();let a=NR(e,t,n);if(a!==void 0)return a;if(!(!n.confirm&&(e.confirmWrites!==!0||n.access===`read`)))return e.confirm===void 0?kR(`confirmation-unavailable`,n):await e.confirm({module:n.module,operation:n.operation,access:n.access,sessionId:t.sessionId,input:r},i)?(await e.beforeCall?.(i),i.throwIfAborted(),NR(e,t,n)):kR(`declined`,n)}function NR(e,t,n){let r=AR(e,t,n.module);if(r===`none`)return kR(`not-granted`,n);if(r===`read`&&n.access!==`read`)return kR(`read-only`,n)}function PR(e,t,n){let r={module:e.module,operation:e.descriptor.name,...DR(e)};return{...e,prepare:i=>Rn({try:e=>jR(t,n,r,i.arguments,e),catch:()=>({message:`Access check failed`})}).pipe(j(t=>t===void 0?e.prepare(i):O({execute:()=>Qx({type:`result`,result:{content:[{type:`text`,text:JSON.stringify(t)}],isError:!1}})})))}}var FR=Il();async function IR(e){let t=await ye(e);if(fs(t))return{value:t.value};let n=ts(t.cause);if(x(n))throw es(t.cause);return{issues:FR(n.success.issue).issues}}function LR(e){let t=n_(e),n=Ph(t)[`~standard`].jsonSchema,r=Ih(t),i=zh(t);return Object.freeze({description:{"~standard":{jsonSchema:{input:n.input,output:n.input}}},decode:e=>IR(r(e)),encode:e=>IR(i(e))})}function RR(e){let t=async t=>e[`~standard`].validate(t);return Object.freeze({description:e,decode:t,encode:t})}function zR(e){return Uh(e)?LR(e):RR(e)}var BR=Symbol(`mycelium.operation`),VR=Symbol(`mycelium.module`),HR=new WeakMap,UR=new WeakMap;function WR(e){let t=Object.freeze({[BR]:!0}),n=zR(e.input),r=e.output===void 0?void 0:zR(e.output),i={replay:e.replay??`unsafe`,...DR(e),input:n.description,invoke:async(t,i)=>{let a=await n.decode(t);if(a.issues!==void 0)throw new _F(a.issues);let o=await e.execute(a.value,i);if(r===void 0)return o;let s=await r.encode(o);if(s.issues!==void 0)throw new EF({reason:`Capability output failed its declared schema`,rawCause:new vF(s.issues)});return s.value}};e.description!==void 0&&(i.description=e.description),r!==void 0&&(i.output=r.description);let a=Object.freeze(i);return HR.set(t,a),t}function GR(e){let t=Ze(yR).safeParse(e.namespace??[]);if(!t.success)throw new mF(`Invalid module namespace`);let n=Object.freeze({[VR]:!0}),r={id:e.id,grantKey:e.id,name:e.name??e.id,namespace:Object.freeze(t.data),operations:Object.freeze({...e.operations})};e.description!==void 0&&(r.description=e.description);let i=Object.freeze(r);return UR.set(n,i),n}function KR(e){return UR.has(e)}function qR(e){return HR.get(e)}function JR(e){return UR.get(e)}function YR(e,t,n){let r=JR(e);if(r===void 0)throw new mF(`Unknown module registration`);let i={};for(let[e,a]of Object.entries(r.operations)){let r=n===``?e:`${n}.${e}`;if(KR(a)){let n=JR(a);if(n===void 0)throw new mF(`Unknown child module registration`);i[e]=YR(a,t,[r,...n.namespace].join(`.`));continue}let o=qR(a);if(o===void 0)throw new mF(`Unknown operation registration: ${e}`);let s=Object.freeze({[BR]:!0});HR.set(s,Object.freeze({...o,invoke:async(e,n)=>{let i=await t({operation:r,context:n});return i.kind===`refuse`?i.value:await o.invoke(e,n)}})),i[e]=s}return XR(GR(r.description===void 0?{id:r.id,name:r.name,namespace:r.namespace,operations:i}:{id:r.id,name:r.name,namespace:r.namespace,description:r.description,operations:i}),r.grantKey)}function XR(e,t){let n=JR(e);if(n===void 0)throw new mF(`Unknown module registration`);let r=Object.freeze({[VR]:!0});return UR.set(r,Object.freeze({...n,grantKey:t})),r}function ZR(e,t){if(t.length===0||t.length>160)throw new mF(`Grant key must be non-empty and bounded`);return XR(e,t)}function QR(e,t){return YR(e,t,``)}function $R(e,t){return e<t?-1:+(e>t)}function ez(e){return e instanceof Error?e.message:`Capability declarations could not be compiled`}var tz=160;function nz(e){if(e.length===0||e.length>tz)throw new mF(`Module id must be non-empty and bounded`)}function rz(e){if(!e.split(`.`).every(e=>yR.safeParse(e).success))throw new mF(`Operation key must be a path segment or a dotted relative path`)}function iz(e){let t=e.replace(/[^A-Za-z0-9_]/g,`_`);return/^[A-Za-z]/.test(t)?t:`module_${t}`}function az(e){let t=iz(e);return bR.safeParse(t).success?t:`module_${t}`}function oz(e,t){let n=new Set([`forage`,`env`]),r=new Map;for(let i of e){let e=t===`logical`?i.namespace:[],a=t===`logical`?iz(i.name):az(i.name),o=t=>[...e,t].join(`.`),s=a,c=2;for(;n.has(o(s));)s=`${a}_${String(c)}`,c+=1;n.add(o(s)),r.set(i.id,s)}return r}var sz=14695981039346656037n,cz=1099511628211n,lz=18446744073709551615n;function uz(e,t){let n=e,r=BigInt(t.length);for(let e=0;e<8;e+=1)n=(n^r&255n)*cz&lz,r>>=8n;for(let e=0;e<t.length;e+=1){let r=t.charCodeAt(e);n=(n^BigInt(r&255))*cz&lz,n=(n^BigInt(r>>>8&255))*cz&lz}return n}function dz(e,t,n){let r=uz(sz,e),i=[...t.entries()].sort(([e],[t])=>$R(e,t));for(let[e,t]of i)r=uz(r,e),r=uz(r,t);let a=[...n].sort((e,t)=>$R(e.id,t.id));for(let e of a)r=uz(r,e.id),r=uz(r,e.version);return`installed-${r.toString(16).padStart(16,`0`)}`}function fz(){return[lF,cF,uF]}function pz(e,t,n,r,i,a=[]){return Object.entries(t.operations).flatMap(([t,o])=>{if(rz(t),KR(o)){let s=JR(o);if(s===void 0)throw new mF(`Unknown child module registration`);return pz(e,s,n,[...r,t,...s.namespace],s.description??i,[...a,t,...s.namespace])}let s=qR(o);if(s===void 0)throw new mF(`Unknown operation registration: ${[...r,t].join(`.`)}`);return[Object.freeze({grantKey:e,path:[...r,t].join(`.`),namespace:n,name:[...a,t].join(`.`),moduleDescription:i,operation:s})]})}function mz(e,t=[]){let n=e.map(e=>{let t=JR(e);if(t===void 0)throw new mF(`Unknown module registration`);return nz(t.id),t}).sort((e,t)=>$R(e.id,t.id)),r=new Set;for(let e of n){if(r.has(e.id))throw new mF(`Duplicate module id: ${e.id}`);r.add(e.id)}let i=oz(n,`transport`),a=oz(n,`logical`),o=Object.freeze(Object.fromEntries(n.map(e=>{let t=i.get(e.id);if(t===void 0)throw new mF(`Missing module alias: ${e.id}`);let n=a.get(e.id);if(n===void 0)throw new mF(`Missing logical alias: ${e.id}`);return[t,Object.freeze([...e.namespace,n])]}))),s=n.flatMap(e=>{let t=i.get(e.id);if(t===void 0)throw new mF(`Missing module alias: ${e.id}`);let n=o[t];if(n===void 0)throw new mF(`Missing namespace path: ${e.id}`);return pz(e.grantKey,e,t,n,e.description)}).sort((e,t)=>$R(e.path,t.path)),c=new Set(s.map(e=>e.path));if(c.size!==s.length)throw new mF(`Duplicate operation path`);for(let e of fz()){if(c.has(e.path))throw new mF(`Reserved intrinsic path: ${e.path}`);c.add(e.path)}for(let e of c){let t=e.split(`.`);for(let n=1;n<t.length;n+=1)if(c.has(t.slice(0,n).join(`.`)))throw new mF(`Operation conflicts with namespace: ${e}`)}let l;try{l=iF({revision:`prepared-content-stamp`,operations:[...s.map(({path:e,moduleDescription:t,operation:n})=>{let r={path:e,input:n.input};return n.description!==void 0&&(r.description=n.description),n.output!==void 0&&(r.output=n.output),t!==void 0&&(r.instructions=t),r}),...fz()]})}catch(e){throw new mF(ez(e))}let u=dz(l.stamp(),i,t),d=Object.freeze({revision:u,search:l.search,describe:l.describe,list:l.list,stamp:l.stamp}),f=Object.freeze(Object.fromEntries([...i.entries()].map(([e,t])=>[t,e])));return Object.freeze({revision:u,catalog:d,operations:Object.freeze(s),moduleAliases:f,namespacePaths:o})}function hz(){return null}var gz=be(),_z=A(()=>en([Dt(),k(),cr(),Lt()])),vz=A(()=>Ht(k(),Jt())),yz=A(()=>WF.extend({timeoutMs:Lt().int().min(1).max(9e5).optional(),abortGraceMs:Lt().int().min(1).max(3e4).optional()}).optional()),bz=64,xz=262144,Sz=new TextEncoder,Cz=e=>{e(O(void 0))};function wz(e){let t=yz.safeParse(e);if(!t.success)throw new mF(`Execution policy is invalid`);let n=t.data?.timeoutMs??18e4;return Object.freeze({timeoutMs:n,abortGraceMs:t.data?.abortGraceMs??5e3,...GF({sandboxCapacity:t.data?.sandboxCapacity,admissionWaitMs:t.data?.admissionWaitMs??n},(t.data?.sandboxCapacity,void 0))})}function Tz(e){return En(function*(){let t=yield*Wb(e);return Object.freeze({createGroup:()=>{let e=0,n=new Set,r=ut(t=>e===0?(t(O(void 0)),Qt(()=>void 0)):(n.add(t),Qt(()=>n.delete(t))));return Object.freeze({start:r=>ti(i=>Qt(()=>{e+=1}).pipe(we(Xn(i(t.withPermits(1)(r)).pipe(ri(Qt(()=>{if(--e,e===0){let e=[...n];n.clear(),e.forEach(Cz)}}))))))),awaitIdle:r})}})})}function Ez(e,t=0){if(t>bz)throw Error(`JSON value exceeds the nesting bound`);let n=_z.safeParse(e);if(n.success)return n.data;if(Array.isArray(e))return e.map(e=>Ez(e,t+1));let r=vz.safeParse(e);if(!r.success)throw r.error;return Object.fromEntries(Object.entries(r.data).filter(([,e])=>e!==void 0).map(([e,n])=>[e,Ez(n,t+1)]))}function Dz(e){return gz.parse(Ez(e))}function Oz(e){let t=JSON.stringify(Dz(e)),n=Sz.encode(t).byteLength;if(n>xz)throw new DF({size:n});return Object.freeze({text:t})}function kz(e,t){return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,n])=>[e,Object.freeze(Object.fromEntries(Object.entries(n).map(([n,r])=>[n,async i=>{t();try{return Dz(await r(i))}catch(t){throw FF(t)?t:t instanceof lP?new kF({namespace:e,operation:n,cause:{kind:`Forage`,message:t.message},rawCause:t}):t instanceof _F?new kF({namespace:e,operation:n,cause:{kind:`InvalidInput`,message:`Invalid operation input: ${et({issues:t.issues})}; use forage.describe`},rawCause:t}):t}}])))])))}function Az(e){return ut(t=>{let n=t.bind(void 0,ar);return e.aborted?n():e.addEventListener(`abort`,n,{once:!0}),Qt(e.removeEventListener.bind(e,`abort`,n))})}function jz(e,t){if(e===void 0)return()=>void 0;let n=t.bind(void 0);return e.aborted?(n(),()=>void 0):(e.addEventListener(`abort`,n,{once:!0}),e.removeEventListener.bind(e,`abort`,n))}function Mz(e,t,n){return e===`deadline_exceeded`?new xF({limitMs:t,elapsedMs:n??0}):new CF({by:`caller`})}function Nz(e){return Ms.pipe(S(t=>t-e))}function Pz(e){return Ms.pipe(j(t=>rn(()=>{let r=e.executionId,i=new AbortController,a=t,s={kind:`waiting`},c,l=e=>{c===void 0&&s.kind!==`refused`&&(c=e,i.abort())},u=t=>{let n=new SF({capacity:e.policy.capacity,waitedMs:Math.max(0,t-a)});return s={kind:`refused`,failure:n},n},d=()=>{if(i.signal.aborted)throw Mz(c,e.policy.timeoutMs)},f=jz(e.callerSignal,()=>{l(`cancelled`)}),p=t+e.policy.timeoutMs,m={executionId:r,deadlineAt:p,signal:i.signal,images:e.images};e.toolCallId!==void 0&&Object.assign(m,{toolCallId:e.toolCallId}),e.output!==void 0&&Object.assign(m,{output:e.output});let h=Object.freeze(m),g=rn(()=>Ms.pipe(j(o=>s.kind===`refused`?bn(s.failure):(o>=p&&l(`deadline_exceeded`),i.signal.aborted?Nz(t).pipe(j(t=>bn(Mz(c,e.policy.timeoutMs,t)))):o>=a+e.policy.waitMs?bn(u(o)):(s={kind:`admitted`},e.sandbox.execute(Object.freeze({executionId:r,code:e.code,timeoutMs:e.policy.timeoutMs,bindings:kz(e.createBindings(h),d),modules:e.modules,namespacePaths:e.namespacePaths,sessionId:e.sessionId}),i.signal).pipe(n(e=>Qo(e)?Br(e):bn(IF(es(e)))))))))),_=t=>Ib(t).pipe(o({duration:e.policy.abortGraceMs,orElse:()=>bn(c===`deadline_exceeded`?new xF({limitMs:e.policy.timeoutMs,elapsedMs:e.policy.timeoutMs,acknowledged:!1}):new CF({by:`caller`,acknowledged:!1}))})),v,y=!1,b=i=>(y=!0,Nz(t).pipe(j(t=>{let a=IF(i),o=a instanceof xF?new xF({limitMs:a.limitMs,elapsedMs:t,acknowledged:a.acknowledged}):a,s=jF(o,r),c=Ht(k(),be()).parse(RF(o));c.ref=r;let l={kind:`sandbox_failure`,ref:r,executionId:r,adapter:e.sandbox.adapter??`effect`,buildSha:e.sandbox.buildSha??hz(),tag:s._tag,fields:c,healthAlert:s._tag===`Unknown`},u=rn(()=>e.sandbox.onFailure?.(l)??ar);return Et(`sandbox_failure`,l).pipe($t({executionId:r,ref:r,adapter:l.adapter,tag:l.tag,buildSha:l.buildSha}),we(s._tag===`Unknown`?Ec(Dc(Tc(`sandbox_unknown`),{adapter:l.adapter}),1).pipe(we(Et(`sandbox_health_alert`).pipe($t({ref:r,adapter:l.adapter})))):ar),we(u.pipe(n(e=>Et(`sandbox_failure_record_failed`,e)))),qt(s))})));return En(function*(){if(i.signal.aborted){let n=yield*Nz(t);return yield*bn(Mz(c,e.policy.timeoutMs,n))}a=yield*Ms,v=yield*e.backingWork.start(g);let n=yield*Ms,r=Qr(Math.max(0,a+e.policy.waitMs-n)).pipe(we(Ms),j(e=>s.kind===`admitted`?fr:s.kind===`refused`?O({kind:`busy`,failure:s.failure}):i.signal.aborted?O({kind:`cancelled`}):e>=p?(l(`deadline_exceeded`),O({kind:`deadline`})):O({kind:`busy`,failure:u(e)}))),o=yield*Hi(Pb(v).pipe(S(e=>Object.freeze({kind:`settled`,exit:e}))),Hi(Qr(Math.max(0,p-n)).pipe(we(Qt(()=>(l(`deadline_exceeded`),Object.freeze({kind:`deadline`}))))),Hi(Az(i.signal).pipe(qt(Object.freeze({kind:`cancelled`}))),r))),d=s.kind===`refused`?s.failure:o.kind===`busy`?o.failure:void 0;if(d!==void 0)return yield*_(v).pipe(we(bn(d)));if(o.kind===`settled`&&c===void 0)return yield*yr(o.exit,{onFailure:Br,onSuccess:e=>fi({try:()=>Oz(e),catch:t=>FF(t)?t:new OF({kind:LF(e),rawCause:t})})});o.kind===`deadline`&&l(`deadline_exceeded`);let f=yield*Nz(t);return yield*_(v).pipe(we(bn(Mz(c,e.policy.timeoutMs,f))))}).pipe(de(()=>(l(`cancelled`),(v===void 0?ar:Ib(v).pipe(mt(e.policy.abortGraceMs),an)).pipe(we(rn(()=>y?ar:b(new CF({by:`operator`})).pipe(an))))))).pipe(Vn(e=>b(e).pipe(j(bn))),ri(Qt(f)))})))}var Fz=og(()=>ig([Xh,Yh,Zh,z,R,Kg,gg(AbortSignal),V(Fz),Iz])),Iz=$h(R,Fz),Lz=new Map([[`openai`,`OpenAI`],[`openai-codex`,`OpenAI`],[`anthropic`,`Anthropic`],[`cloudflare-workers-ai`,`Cloudflare Workers AI`]]),Rz=$h(R,r_);Rh(B({samplingParams:F(Rz),samplingParamsByThinkingLevel:F(B({off:F(Rz),minimal:F(Rz),low:F(Rz),medium:F(Rz),high:F(Rz),xhigh:F(Rz),max:F(Rz)}))}));var zz=`modulepreload`,Bz=function(e){return`/`+e},Vz={},Hz=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Bz(t,n),t=s(t),t in Vz)return;Vz[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:zz,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Uz=B({error:B({code:I(R),type:I(R)})});Lh(B({type:L(`response.failed`),response:Uz})),Lh(Vg(Uz)),Lh(B({type:L(`error`),status:I(z.check(Pg(),Ng({minimum:100,maximum:599}))),code:I(R),error:I(Uz.fields.error)})),Rh(gg(Uint8Array)),Lh(Hg.check(Ng({minimum:0,maximum:60}))),Lh(Hg.check(Pg(),Ng({minimum:0,maximum:864e10}))),Lh(H([`five_hour`,`seven_day`,`seven_day_opus`,`seven_day_sonnet`])),Lh(L(`rejected`)),Lh(L(`0`)),Lh($g),Lh(B({type:L(`error`),error:B({type:L(`overloaded_error`)})}));var Wz=B({provider:R,cause:ig([ig([B({code:L(`usage-limit-reached`),cause:F(L(`quota`)),resetAt:F(z),limit:F(H([`five_hour`,`seven_day`,`seven_day_opus`,`seven_day_sonnet`]))}),B({code:L(`rate-limit`),retryAfterMs:F(z)}),B({code:L(`overloaded`)}),B({code:L(`provider_unavailable`),status:F(z)}),B({code:L(`provider_rejected`),status:z})]),B({code:H([`setup_required`,`tools_unsupported`,`request_failed`])})])}),Gz={assign:0,create:0,clone:0,discard:0,update:0};function Kz(e){return Jz(e,null)}function qz(e){return Jz(typeof e,`object`)&&!Kz(e)}function Jz(e,t){return e===t}function Yz(e){return Jz(e,`__proto__`)||Jz(e,`constructor`)||Jz(e,`prototype`)}function Xz(e,t){return Yz(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Zz(e){return Object.getOwnPropertyNames(e)}var Qz={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function $z(){return Qz}function eB(e){return $z().immutableTypes?Object.freeze(e):e}function tB(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function nB(e,t){return{...e,...t}}function rB(e,t,n={}){Gz.create+=1;let r=nB(t,n);return eB($z().enumerableKind?nB(r,e):tB(r,e))}function iB(e){return qz(e)}function aB(e){return iB(e)&&Xz(e,`~optional`)}function oB(e){return Zz(e).filter(t=>!aB(e[t]))}function sB(e,t={}){let n=oB(e);return rB({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}var cB;(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`})(cB||={}),Array.from({length:256}).map((e,t)=>BigInt(t));var lB=new Float64Array(1);new DataView(lB.buffer),new Uint8Array(lB.buffer),new TextEncoder;var uB=`-?(?:0|[1-9][0-9]*)`,dB=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function fB(e){return rB({"~kind":`String`},{type:`string`},e)}var pB=`^${uB}$`;`${dB}`;function mB(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var hB=[...mB(97,122),...mB(65,90)],gB=[`0`,...mB(49,57)];[...gB],[...hB,...gB],[...gB],new RegExp(pB);var _B=class{#e=new Map;#t;constructor(e=8){this.#t=e}push(e,t){let n=this.#e.get(e)??[];if(n.length>=this.#t)throw new kF({namespace:`execute`,operation:`images`,cause:{kind:`Unavailable`,message:`Image collector cap reached for this execution (max ${String(this.#t)} images). Process images one at a time or write them to files.`}});let r=`img_${String(n.length)}`;return n.push(Object.freeze({...t})),this.#e.set(e,n),r}drain(e){let t=this.#e.get(e);return t===void 0?[]:(this.#e.delete(e),t)}dispose(e){this.#e.delete(e)}},vB=8192,yB=vB*4,bB=new TextEncoder,xB=()=>new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!1}),SB=class e{wake;#e={stdout:{decoder:xB(),pending:new Uint8Array},stderr:{decoder:xB(),pending:new Uint8Array}};#t=xB();#n=Array.from({length:vB},()=>void 0);#r=0;#i=0;#a=0;#o=0;#s=0;#c=0;#l=!1;#u=!1;constructor(e){this.wake=e}static make(){return rb({capacity:1,strategy:`dropping`}).pipe(S(t=>new e(t)))}write(e,t){if(this.#u||t.length===0)return;let n=this.#e[e];this.#c+=t.length;for(let e=0;e<t.length;e+=yB){let r=t.subarray(e,e+yB),i=n.decoder.decode(r,{stream:!0}),a=new Uint8Array(n.pending.length+r.length);a.set(n.pending),a.set(r,n.pending.length);let o=this.#f(a);n.pending=a.slice(a.length-o),this.#h(i,a.length-o,a)}this.#l=!0,ob(this.wake,void 0)}#d(e,t){let n=this.#t.decode(e.subarray(0,t),{stream:!0});return this.#t.decode(),n}#f(e){for(let t=1;t<=Math.min(3,e.length);t++){let n=e.subarray(e.length-t);if(this.#d(n,n.length).length===0)return t}return 0}#p(){let e=this.#n[this.#r];if(e===void 0)throw Error(`Missing output ring entry`);this.#n[this.#r]=void 0,this.#r=(this.#r+1)%vB,this.#i--,this.#a-=e.textBytes,this.#o-=e.newlines,this.#s+=e.rawBytes}#m(e,t,n){let r=e.raw;if(r===null){this.#p();return}let i=e=>{let i=this.#d(r,e);return bB.encode(i).length>=t&&i.split(`
28
- `).length-1>=n},a=Math.min(r.length,Math.max(4,t));for(;a<r.length&&!i(a);)a=Math.min(r.length,a*2);let o=0;for(;o<a;){let e=Math.floor((o+a)/2);i(e)?a=e:o=e+1}let s=this.#d(r,o);if(s.length===e.text.length){this.#p();return}let c=o-this.#f(r.subarray(0,o)),l=bB.encode(s).length,u=s.split(`
29
- `).length-1;e.raw=r.slice(c),e.text=this.#d(e.raw,e.raw.length),e.rawBytes-=c,e.textBytes-=l,e.newlines-=u,this.#a-=l,this.#o-=u,this.#s+=c}#h(e,t,n){if(e.length===0)return;let r={text:e,raw:n,rawBytes:t,textBytes:bB.encode(e).length,newlines:e.split(`
30
- `).length-1};for(this.#i===vB&&this.#p(),this.#n[(this.#r+this.#i)%vB]=r,this.#i++,this.#a+=r.textBytes,this.#o+=r.newlines;this.#a>vB||this.#o>=200;){let e=this.#n[this.#r];if(e===void 0)throw Error(`Missing output ring entry`);let t=Math.max(0,this.#a-vB),n=Math.max(0,this.#o-199);e.textBytes<=t||e.newlines<n?this.#p():this.#m(e,t,n)}}snapshot(){let e=``;for(let t=0;t<this.#i;t++){let n=this.#n[(this.#r+t)%vB];if(n===void 0)throw Error(`Missing output ring entry`);e+=n.text}return{tail:e,droppedBytes:this.#s,totalBytes:this.#c}}#g(){if(!this.#l)return;this.#l=!1;let{tail:e,...t}=this.snapshot();return{type:`update`,result:{isError:!1,content:[{type:`text`,text:e}],data:t}}}finish(){if(!this.#u){this.#u=!0;for(let e of[this.#e.stdout,this.#e.stderr]){let t=e.decoder.decode();this.#h(t,e.pending.length,null),e.pending=new Uint8Array,t.length>0&&(this.#l=!0)}return this.#g()}}get updates(){return iS(this.wake).pipe(sS(()=>Qr(`100 millis`).pipe(S(()=>this.#u?void 0:this.#g()))),mS(e=>e!==void 0))}dispose(){this.#u=!0,this.#n.fill(void 0),this.#r=this.#i=this.#a=this.#o=0,this.#c=this.#s=0,this.#l=!1;for(let e of[this.#e.stdout,this.#e.stderr])e.decoder.decode(),e.pending=new Uint8Array}},CB=B({code:R}),wB='Inside execute, call forage.search, forage.list or forage.describe to discover operations and inspect their inputs. forage is available only there, not as a separate tool. Run async JavaScript in the sandbox. Each call is a fresh sandbox, not a REPL: nothing survives between calls, so redefine helpers or persist state to a file. Never shadow injected module names with local bindings. Find operations with await forage.search({ query }) using one short keyword such as read or shell, or page them all with forage.list({limit:50}), optionally by namespace, until nextCursor is null. Inspect input with await forage.describe({ path }) before calling; describe known paths directly. Call an operation as await env.<path>({ ... }) with the exact dotted path, for example await env.computers.local.exec({ command: "pwd" }); a bare computers.local.exec is not defined. Put multiline shell commands in a template literal. Code is JavaScript first, so double each backslash the shell needs (`\\\\(` passes `\\(`; `\\(` becomes `(`). For file edits, prefer Files operations when available. Explicitly return the final value. Before treating a shell or process result as success, check status, exitCode and stderr.';function TB(e,t,n,r){let i={module:e.grantKey,operation:e.name,access:e.operation.access,confirm:e.operation.confirm};return async a=>await jR(n,{sessionId:r},i,a,t.signal)??await e.operation.invoke(a,t)}function EB(e,t,n,r){let i=0,a=new Map;for(let o of e){let e=o.namespace,s=o.name,c=a.get(e)??new Map;c.set(s,e=>TB(o,Object.freeze({...t,operationOrdinal:i++}),n,r)(e)),a.set(e,c)}return Object.freeze(Object.fromEntries([...a].map(([e,t])=>[e,Object.freeze(Object.fromEntries(t))])))}function DB(e,t){let n=e.safeParse(t);if(!n.success)throw new _F(n.error.issues);return n.data}function OB(e){return Object.freeze({list:t=>Promise.resolve().then(()=>e.list(DB($N,t))),describe:t=>Promise.resolve().then(()=>e.describe(DB(QN,t))),search:t=>Promise.resolve().then(()=>e.search(DB(ZN,t)))})}function kB(e,t,n,r,i){return Object.freeze({...EB(e,n,r,i),forage:OB(t)})}function AB(e,t,n,r,i,a,o,s){let c=n.execution??wz(void 0),l=new _B,u=(u,d,f,p,m)=>Pz({executionId:u,toolCallId:p,output:m,images:Object.freeze({push:e=>l.push(u,e)}),code:d,callerSignal:f,policy:c,sandbox:n,backingWork:r,createBindings:n=>kB(e,t,Object.freeze({...n,toolCallCode:d}),s,o),modules:i,namespacePaths:a,sessionId:o}),f=(e,t)=>rn(()=>{let n=jv();return u(n,e,t).pipe(ri(Qt(()=>{l.dispose(n)})))}),p=(e,t,n)=>rn(()=>{let r=jv(),i=()=>l.drain(r);return u(r,e,void 0,t,n).pipe(d({onSuccess:e=>O(jB({text:e.text,isError:!1},i())),onFailure:e=>{let t=i();return e instanceof DF&&t.length>0?O(jB({text:MF(e),isError:!0},t)):bn(MB(e))}}),ri(Qt(()=>{l.dispose(r)})))}),m={replay:`unsafe`,descriptor:{name:`execute`,description:wB,parameters:sB({code:fB()},{additionalProperties:!1})},prepare:e=>Ih(CB)(e.arguments).pipe(S(({code:t})=>({execute:()=>oS(En(function*(){let n=yield*SB.make();yield*Oe(()=>Qt(()=>{n.dispose()}));let r=yield*Ci(p(t,e.id,{write:(e,t)=>{n.write(e,t)}}),{startImmediately:!0});return pS(n.updates,Gx(Pb(r)).pipe(cS(e=>{let t=n.finish();return uS(nS(t===void 0?[]:[t]),Gx(e))})),{haltStrategy:`right`}).pipe(_S(e=>e.type===`result`))}))})),jt(()=>({message:`Invalid execute arguments`})))};return Object.freeze({effectTool:m,execute:f})}function jB(e,t){let n=t.map(e=>({type:`image`,data:e.data,mimeType:e.mimeType})),r=[{type:`text`,text:e.text},...n];return t.length===0?{type:`result`,result:{content:r,isError:e.isError}}:{type:`result`,result:{content:r,data:{images:t.map(e=>({bytes:e.bytes,mimeType:e.mimeType,path:e.path}))},isError:e.isError}}}function MB(e){let t={_tag:`MuleError`,phase:`tool`,message:FF(e)?MF(e):e.message};return e instanceof SF?{...t,cause:e}:t}function NB(e,t){return e<t?-1:+(e>t)}var PB=128,FB=A(()=>k().min(1).max(160)),IB=A(()=>E({version:k().min(1).max(160),modules:Ze(Jt())})),LB=1e3;function RB(e){if(e.length>PB)throw new mF(`Capability source count exceeds bound`);let t=[...e].sort((e,t)=>NB(e.id,t.id)),n=new Set;for(let e of t){if(!FB.safeParse(e.id).success)throw new mF(`Capability source id must be non-empty and bounded`);if(n.has(e.id))throw new mF(`Duplicate capability source id: ${e.id}`);n.add(e.id)}return t}function zB(e){if(e>LB)throw new mF(`Candidate module count exceeds bound`)}function BB(e,t){let n=IB.safeParse(e);if(!n.success)throw new mF(`Capability source snapshot must have a non-empty bounded version`);zB(t+n.data.modules.length)}function VB(e,t,n,r,i){return ti(a=>En(function*(){let o=t=>Rn({try:()=>t.release(),catch:()=>new gF(e.id,`release`)}).pipe(Vn(e=>Qt(()=>{n.push(e)}))),s=yield*fi({try:()=>{let t=new AbortController;return{controller:t,outcome:e.acquire(i===void 0?{signal:t.signal,invalidate:r}:{signal:t.signal,invalidate:r,session:i}).then(e=>ss(e),()=>ls(new gF(e.id,`acquire`)))}},catch:()=>new gF(e.id,`acquire`)});yield*Os(t,Le(()=>s.outcome).pipe(j(e=>fs(e)?o(e.value):ar)));let c=yield*a(Le(()=>s.outcome)).pipe(de(()=>Qt(()=>{s.controller.abort()})));return ps(c)?yield*Br(c.cause):c.value}))}function HB(e){return En(function*(){let t=yield*fi({try:()=>RB(e.sources),catch:e=>e instanceof mF?e:new mF(`Capability sources are invalid`)});yield*fi({try:()=>{zB(e.modules.length)},catch:e=>e instanceof mF?e:new mF(`Static capability modules are invalid`)});let n=yield*Ts(),r=[],i=!1,a=[...e.modules],o=[];return yield*En(function*(){for(let s of t){let t=yield*VB(s,n,r,()=>{i=!0},e.session);yield*fi({try:()=>{BB(t.snapshot,a.length)},catch:e=>e instanceof mF?e:new mF(`Capability source snapshot is invalid`)}),a.push(...t.snapshot.modules),o.push({id:s.id,version:t.snapshot.version})}let s=e.precompiled??(yield*fi({try:()=>mz(a,o),catch:e=>e instanceof mF?e:new mF(`Capability compilation failed`)})),c=e.backingWork.createGroup(),l=AB(s.operations,s.catalog,e.sandbox,c,s.moduleAliases,s.namespacePaths,e.session?.sessionId??null,e.access),u=!1;return Object.freeze({compiled:s,executeDoor:l,isStale:()=>i,close:()=>En(function*(){u||(u=!0,yield*c.awaitIdle,yield*As(n,ds));let e=r[0];e!==void 0&&(yield*bn(e))})})}).pipe(Xe(e=>fs(e)?ar:As(n,e)))})}var UB=2;function WB(e){return En(function*(){for(let t=0;t<UB;t+=1){let t=yield*HB(e);if(!t.isStale())return t;yield*t.close()}return yield*bn(new gF(void 0,`stale`))})}function GB(e,t,n){return ti(r=>r(e.take(1)).pipe(j(()=>Qt(t).pipe(ri(e.release(1)))),j(n)))}function KB(e,t){return Pr(e.candidate.close().pipe(d({onFailure:t=>xs(e.settled,t).pipe(we(bn(t))),onSuccess:()=>Ss(e.settled,void 0).pipe(we(Qt(()=>{t.delete(e)})))})))}function qB(e,t){return e.runCleanup?KB(e.installed,t):ys(e.installed.settled)}function JB(e,t){return qr(e.map(e=>qB(e,t).pipe(sr)),{concurrency:`unbounded`}).pipe(j(e=>{let t=e.find(ps);return t===void 0?ar:Br(t.cause)}))}function YB(e){return En(function*(){let t=yield*Wb(1),n=yield*fi({try:()=>wz(e.execution),catch:e=>e instanceof mF?e:new mF(`Execution policy is invalid`)}),r=yield*Tz(n.capacity),i=Object.freeze({execute:e.sandbox.execute,adapter:e.sandbox.adapter,buildSha:e.sandbox.buildSha,onFailure:e.onSandboxFailure,execution:n}),a=e.modules.length===0&&e.sources.length>0?void 0:yield*fi({try:()=>mz(e.modules),catch:e=>e instanceof mF?e:new mF(`Capability compilation failed`)}),o=yield*fi({try:()=>Object.freeze(e.tools.map(t=>PR(t,e.access,{sessionId:e.session?.sessionId??null}))),catch:e=>e instanceof mF?e:new mF(`Direct tool labels are invalid`)}),s,c=new Set,l=!1;if(e.sources.length===0&&a!==void 0){let t={candidate:yield*WB({...e,sandbox:i,backingWork:r,precompiled:a}),settled:yield*vs(),leases:0,retired:!1,closing:!1};s=t,c.add(t)}let u=()=>GB(t,()=>(l=!0,[...c].map(e=>{e.retired=!0;let t=e.leases===0&&!e.closing;return t&&(e.closing=!0),{installed:e,runCleanup:t}})),e=>JB(e,c));return yield*Oe(()=>u().pipe(Ce)),Object.freeze({acquire:()=>t.withPermits(1)(En(function*(){if(l)return yield*bn(new hF);if(s===void 0||s.candidate.isStale()){let t=yield*WB({...e,sandbox:i,backingWork:r}),n=s,a={candidate:t,settled:yield*vs(),leases:0,retired:!1,closing:!1};s=a,c.add(a),n!==void 0&&(n.retired=!0,n.leases===0&&!n.closing&&(n.closing=!0,yield*KB(n,c)))}let n=s;n.leases+=1;let a,u=()=>GB(t,()=>{if(a!==void 0)return a?{installed:n,runCleanup:!1}:void 0;if(--n.leases,a=n.retired&&n.leases===0&&!n.closing,a)return n.closing=!0,{installed:n,runCleanup:!0}},e=>e===void 0?ar:qB(e,c));return yield*Oe(()=>u().pipe(Ce)),Object.freeze({revision:n.candidate.compiled.revision,catalog:n.candidate.compiled.catalog,executeDoor:n.candidate.executeDoor,effectExecuteTool:n.candidate.executeDoor.effectTool,tools:o,release:u})})),close:u})})}function XB(e){return Object.freeze({adapter:e.adapter??`promise`,buildSha:e.buildSha,execute:(t,n)=>Pr(Rn({try:()=>e.execute(t,n),catch:IF}))})}async function ZB(e,t){let n=await ye(e,t);if(fs(n))return n.value;let r=ns(n.cause);if(ct(r))throw r.value;if(Qo(n.cause))throw t?.signal?.reason instanceof Error?t.signal.reason:new DOMException(`The operation was aborted`,`AbortError`);let i=es(n.cause);throw i instanceof Error?i:Error(`Effect failed without an Error cause`)}async function QB(e){let t=await ZB(Ts()),n=e.onSandboxFailure;try{let r=await ZB(YB({modules:e.modules??[],sources:e.sources??[],session:e.session,execution:e.execution,sandbox:XB(e.sandbox),onSandboxFailure:n===void 0?void 0:e=>Le(()=>n(e)),tools:e.tools??[],access:e.access??{}}).pipe(Ds(t))),i=async e=>{let t=await ZB(Ts());try{let n=await ZB(r.acquire().pipe(Ds(t)),e?.signal===void 0?void 0:{signal:e.signal}),i;return Object.freeze({revision:n.revision,catalog:n.catalog,executeTool:n.effectExecuteTool,tools:n.tools,release:()=>(i??=ZB(n.release().pipe(ri(As(t,ds)))),i)})}catch(e){throw await ZB(As(t,ds)),e}},a;return Object.freeze({acquire:i,close:()=>(a??=ZB(r.close().pipe(ri(As(t,ds)))),a)})}catch(e){throw await ZB(As(t,ds)),e}}var $B=og(()=>ig([Yh,Zh,Cg,R,ng(V($B)),Wh($h(R,$B))])),eV=R.check(Fg(1),K(256)),tV=R.check(Fg(1),K(128)),nV=B({kind:L(`sandbox_failure`),ref:eV,executionId:eV,adapter:tV,buildSha:U(tV),tag:H([`SourceInvalid`,`GuestThrew`,`DeadlineExceeded`,`SandboxBusy`,`Cancelled`,`DispatchLost`,`SandboxCrashed`,`BadResponse`,`ResultTooLarge`,`ResultNotJson`,`CapabilityFailed`,`Unknown`]),fields:$h(R,$B),healthAlert:Zh});function rV(e){return WR(e)}function iV(e){return GR(e)}Object.freeze({module:iV,operation:rV,make:QB,gate:QR,grantAs:ZR});var aV=r_,oV=4096,sV=new TextEncoder,cV=aV.check(vg(e=>sV.encode(JSON.stringify(e)).byteLength<=oV));P(cV),new TextEncoder;var lV=200,uV={onExcessProperty:`error`},dV=new TextEncoder,fV=G.pipe(W(jg(0))),pV=R.pipe(W(Fg(1)),W(vg(e=>dV.encode(e).byteLength<=256)));P(B({limit:F(G.pipe(W(Ng({minimum:1,maximum:lV})))),after:F(R)}),uV);var mV=Vg(tg([fV,pV]));P(mV),Vh(mV),P(B({session_id:pV,last_activity_at:fV,state:H([`needs_you`,`running`,`errored`,`done`]),bytes:G.pipe(W(jg(0)))}),uV),Rh(B({extension_id:R,value_json:R})),Rh(Vg(zM)),Rh(BM),Vh(Vg(zM));var hV=R.check(Fg(1),K(256)),gV=262144,_V=R.check(vg(e=>new TextEncoder().encode(e).byteLength<=gV,{message:`Mail content must be at most ${String(gV)} UTF-8 bytes`})),vV=B({kind:L(`agent`),agentId:hV,sessionId:hV}),yV=B({kind:L(`agent`),agentId:hV,sessionId:F(hV)}),bV=B({kind:L(`system`),systemId:L(`hub`)}),xV=B({itemId:hV,kind:R.check(Fg(1),K(64)),summary:R.check(Fg(1),K(200))}),SV=B({commandId:hV,outcome:H([`completed`,`failed`,`interrupted`,`cancelled`,`outcome_unknown`]),diagnostic:F(R.check(Fg(1),K(200))),waitingOnYou:F(V(xV).check(Fg(1),K(8)))}),CV=H([`recipient_offline`,`recipient_left`]),wV=B({outcome:L(`undeliverable`),reason:CV}),TV=B({outcome:L(`accepted`),commandId:hV});ig([SV,wV,TV]);var EV=ig([SV,TV,B({outcome:L(`undeliverable`),reason:L(`recipient_left`)})]),DV=`[redacted]`,OV=/\b(bearer|basic)\s+[^\s"',;]+/giu,kV=/\b((?:api[_-]?key|access[_-]?token|refresh[_-]?token|token|secret|password|authorization)["']?\s*[:=]\s*["']?)(?!(?:bearer|basic)\s)[^\s"',;&]+/giu,AV=/[A-Za-z0-9][\w-]{23,}/gu;function jV(e){return e.replace(OV,`$1 ${DV}`).replace(kV,`$1${DV}`).replace(AV,e=>/\d/u.test(e)&&/[A-Za-z]/u.test(e)?DV:e)}function MV(e){let t=jV(e.replace(/[\p{Cc}\p{Zl}\p{Zp}\s]+/gu,` `).trim()).slice(0,200).trimEnd();return t.length===0?void 0:t}var NV={key:hV,to:yV,replyTo:V(vV),content:_V,createdAt:z.check(jg(0)),meta:F(r_)},PV=ig([B({...NV,from:vV,reply:F(EV)}),B({...NV,from:bV,reply:B({outcome:L(`undeliverable`),reason:L(`recipient_offline`)})})]),FV=B({jobId:hV,sessionId:hV,commandFactId:hV,recovery:I(B({maxRecoveries:G.check(jg(0)),windowMs:F(G.check(Ag(0)))}))});B({work:B({sessionId:hV,commandFactId:hV}),mail:I(PV)}),B({work:FV,delivery:H([`steer`,`followUp`]),mail:I(PV)}),Rh(B({mail_key:R,agent_id:R,reply_to_json:Vg(V(vV))})),Vh(Vg(V(vV))),Rh(B({agent_id:R,sender_session_id:R,name:R})),Rh(LM),Rh(B({work_id:R}));var IV=new TextEncoder;new TextDecoder;var LV=B({v:L(1),generation:R.pipe(W(Fg(1)),W(K(128)),W(vg(e=>IV.encode(e).byteLength<=128))),sequence:G.pipe(W(Ag(0)),W(Mg(2**53-1)))}),RV={onExcessProperty:`error`};P(LV,RV),P(Vg(LV),RV);var zV=R.check(Fg(1),K(256)),BV=ig([B({agentId:zV,sessionId:zV,...SV.fields}),B({agentId:zV,sessionId:F(zV),...wV.fields})]),VV={onExcessProperty:`error`},HV=new TextEncoder,UV=e=>R.pipe(W(Fg(1)),W(vg(t=>HV.encode(t).byteLength<=e))),WV=UV(256),GV=UV(4096),KV=R.pipe(W(xg(/^[0-9a-f]{64}$/u))),qV=og(()=>ig([R,z,Zh,Yh,V(qV),$h(R,qV)])),JV=B({type:L(`text`),text:R,textSignature:F(R)}),YV=B({type:L(`thinking`),thinking:R,thinkingSignature:F(R),redacted:F(Zh)}),XV=B({type:L(`image`),data:R,mimeType:R}),ZV=B({type:L(`toolCall`),id:R,name:R,arguments:$h(R,qV),thoughtSignature:F(R),namespace:F(R),argumentsError:F(R)}),QV=B({input:z,output:z,cacheRead:z,cacheWrite:z,cacheWrite1h:F(z),reasoning:F(z),totalTokens:z,cost:B({input:z,output:z,cacheRead:z,cacheWrite:z,total:z,totalFromProvider:F(Zh)})}),$V=B({role:L(`user`),content:ig([R,ng(V(ig([JV,XV])))]),timestamp:z}),eH=B({role:L(`user`),content:R,timestamp:z}),tH=B({name:R,description:R,parameters:$h(R,qV),constrainedSampling:F(ig([L(!1),B({type:L(`json_schema`),strict:H([`prefer`,`require`])}),B({type:L(`grammar`),variants:B({openai_lark:F(R),openai_regex:F(R)})})]))}),nH=ig([B({role:L(`system`),content:ig([R,ng(V(JV))]),sections:F($h(R,ig([R,Yh]))),toolsAdded:F(ng(V(tH))),toolsRemoved:F(ng(V(B({name:R})))),timestamp:z}),$V,B({role:L(`assistant`),content:ng(V(ig([JV,YV,ZV]))),api:R,provider:R,model:R,responseModel:F(R),responseId:F(R),diagnostics:F(ng(V(B({type:R,timestamp:z,error:F(B({name:F(R),message:R,stack:F(R),code:F(ig([R,z]))})),details:F($h(R,qV))})))),usage:QV,stopReason:H([`pending`,`stop`,`length`,`toolUse`,`error`,`aborted`,`deferred`]),deferred:F(B({provider:R,modelId:R,api:R,id:R,expiresAt:F(z),pollAfterMs:F(z),data:F(qV)})),errorMessage:F(R),providerError:F(R),modelFailure:F(Wz),rawStopReason:F(R),providerThinkingLevel:F(R),endTurn:F(Zh),timestamp:z,durationMs:F(z)}),B({role:L(`toolResult`),toolCallId:R,toolName:R,content:ng(V(ig([JV,XV]))),usage:F(QV),isError:Zh,timestamp:z,durationMs:F(z)})]),rH=H([`run`,`turn`,`message`,`tool_call`,`tool_result`,`terminal`]),iH=og(()=>B({kind:rH,value:WV,parent:I(iH)})),aH=ig([B({type:L(`auto_retry_start`),run:iH,attempt:z,maxAttempts:z,delayMs:z,dueAt:G.check(jg(0)),errorMessage:R}),B({type:L(`auto_retry_attempt`),run:iH,attempt:z}),B({type:L(`auto_retry_end`),run:iH,attempt:z,success:Zh,finalError:F(R)})]),oH=B({core:KV,extensions:V(tg([WV,R.pipe(W(xg(/^sha256:[0-9a-f]{64}$/u)))])).pipe(W(K(128)))}),sH=B({content:ng(V(ig([JV,XV]))),usage:I(QV),isError:Zh,terminate:I(Zh)}),cH={workId:WV},lH=98304,uH=H([`manual`,`threshold`,`overflow`]),dH=ig([B({...cH,kind:L(`sandbox_failure`),event:nV}),B({kind:L(`document`),workId:Yh,extensionId:WV,name:WV,valueJson:R}),B({kind:L(`model_preference`),workId:Yh,preference:U(YM)}),B({...cH,kind:L(`command`),meta:F(cV),reply:F(BV),delivery:F(H([`steer`,`followUp`])),requestId:WV,targetWorkId:F(WV),receiptId:WV,message:$V,contract:oH}),B({...cH,kind:L(`command`),work:L(`compact`),instructions:F(hN),meta:F(cV),requestId:WV,receiptId:WV,timestamp:G.check(jg(0)),contract:oH}),B({kind:L(`operator`),workId:Yh,requestId:WV,author:H([`operator`,`party`]),meta:F(cV),message:eH}),B({...cH,kind:L(`cancellation`),requestId:WV,receiptId:WV,targetWorkId:WV,meta:F(cV)}),B({...cH,kind:L(`model_selection`),provider:WV,model:WV,catalogRevision:WV,definitionRevision:WV,selectionPolicyRevision:WV}),B({...cH,kind:L(`run_started`),run:iH,contract:oH}),B({...cH,kind:L(`turn_started`),run:iH,turn:iH}),B({...cH,kind:L(`model_prompt`),run:iH,turn:iH,attempt:z.pipe(W(Pg()),W(Ag(0))),contract:oH,systemPrompt:R.pipe(W(vg(e=>HV.encode(e).byteLength<=1048576)))}),B({...cH,kind:L(`message_start`),run:iH,turn:iH,message:iH,role:H([`assistant`,`system`,`toolResult`,`user`]),partial:F(B({text:R.pipe(W(vg(e=>HV.encode(e).byteLength<=lH))),offset:z.pipe(W(Pg()),W(jg(0)))}))}),B({...cH,kind:L(`message`),data:F(qV),run:iH,turn:iH,message:iH,value:nH}),B({...cH,kind:L(`tool_intent`),replay:H([`safe`,`unsafe`]).pipe(hg(O(`unsafe`))),contract:oH,run:iH,turn:iH,toolCall:iH,call:ZV}),B({...cH,kind:L(`tool_outcome`),data:F(qV),run:iH,turn:iH,toolCall:iH,call:ZV,result:sH}),B({...cH,kind:L(`live_retry`),event:aH}),B({...cH,kind:L(`compaction`),head:WV,model:tg([$V]),data:B({reason:F(uH),resumesRun:Zh,tokensBefore:z,tokensAfter:F(z),usage:QV,contextRevision:WV,receipt:F(GV),details:F(B({readFiles:V(R),modifiedFiles:V(R)}))})}),B({...cH,kind:L(`compaction_checkpoint`),trigger:uH,resumesRun:Zh,head:WV,contextRevision:WV,summary:R,tokensBefore:z,usage:QV,details:B({readFiles:V(R),modifiedFiles:V(R)})}),B({...cH,kind:L(`compaction_notice`),trigger:uH,result:L(`nothing_to_compact`),diagnostic:F(R.check(K(200)))}),B({...cH,kind:L(`compaction_notice`),trigger:uH,result:L(`failed`),usage:F(QV),diagnostic:F(R.check(K(200)))}),B({...cH,kind:L(`compaction_notice`),trigger:uH,result:L(`stale`),usage:F(QV)}),B({...cH,kind:L(`compaction_notice`),trigger:uH,result:L(`insufficient`),usage:F(QV)}),B({...cH,kind:L(`run_terminal`),run:iH,terminal:iH,diagnostic:F(R.check(K(200))),outcome:H([`completed`,`cancelled`,`failed`])}),B({...cH,kind:L(`work_terminal`),diagnostic:F(R),outcome:H([`completed`,`interrupted`,`cancelled`,`failed`])})]);e_(dH);var fH=Vg(dH),pH=Vg(Jh);P(fH,VV),Vh(pH),Rh(fH,VV);var mH=Vg(qV);Vh(mH),Rh(mH),Jv({family:`session`,version:1,kinds:{session:{prefix:`session`},work:{prefix:`session_work`},fact:{prefix:`session_fact`},receipt:{prefix:`session_receipt`}}});var hH=R.pipe(W(Fg(1))),gH=G.pipe(W(jg(0)));B({value_json:R}),B({state_version:G.pipe(W(jg(1))),revision:hH}),B({status:H([`running`,`stopped`]),reason:U(R),stopped_at:U(gH),revision:hH}),B({extension_id:hH,key:hH,job_id:hH}),B({collection:hH,key:hH,value_json:R}),B({sequence:gH}),B({extension_id:R,name:R,initial_json:R,fork:H([`inherit-at-fork-point`,`current`,`fresh`]),max_bytes:G.pipe(W(Ag(0)))}),Fh(R);var _H=$h(R.check(Fg(1),K(160)),H([`none`,`read`,`write`])).check(vg(e=>Object.keys(e).length<=256));P(B({version:G.check(jg(0),Mg(2**53-1)),grants:_H}),{onExcessProperty:`error`}),P(Vg(_H)),Vh(Vg(_H)),P(B({version:G,grants_json:R}));var vH={onExcessProperty:`error`},yH=new TextEncoder,bH=R.pipe(W(Fg(1)),W(vg(e=>yH.encode(e).byteLength<=256))),xH=G.pipe(W(jg(0))),SH=H([0,1,2]),CH=H([`needs_you`,`running`,`errored`,`done`]),wH=H([`completed`,`failed`,`cancelled`,`outcome_unknown`,`interrupted`]),TH=B({session_id:bH,title:U(R),created_at:xH,last_activity_at:xH,settled_at:U(xH),state:CH,tier:SH});P(TH,vH),P(TH.mapFields(bh({revision:xH})),vH),P(B({revision:xH}),vH),P(B({outcome:U(wH)}),vH);var EH=Vg(tg([SH,xH,bH]));P(EH),Vh(EH);var DH={onExcessProperty:`error`},OH=B({id:R,timestamp:z,data_json:R}),kH=Vg(B({kind:L(`compaction`),workId:R,resumesRun:F(Zh),trigger:F(H([`manual`,`threshold`,`overflow`])),tokensAfter:F(z),firstKeptEntryId:R,summary:R,tokensBefore:z,usage:QV,contextRevision:R,details:F(B({readFiles:V(R),modifiedFiles:V(R)}))}));P(OH,DH),P(kH,DH),P(B({data_json:R}),DH);var AH=R.pipe(W(Fg(1))),jH=G.pipe(W(jg(0)));B({name:R}),B({sql:R}),B({extension_id:AH,key:AH,due_at:jH}),B({extension_id:AH}),B({seq:jH}),B({count:jH}),B({data_json:R}),B({version:G});var MH={onExcessProperty:`error`},NH=new TextEncoder,PH=R.pipe(W(Fg(1)),W(vg(e=>NH.encode(e).byteLength<=256))),FH=G.pipe(W(Ag(0))),IH=G.pipe(W(jg(0))),LH=B({id:PH,leaf_id:U(PH)}),RH=B({session_id:PH}),zH=B({id:PH,leaf_id:U(PH),created_at:IH,updated_at:IH,metadata_json:U(R)}),BH=Vg(B({title:vN}));P(BH,MH),Vh(BH);var VH=B({id:PH}),HH=B({version:G,protocol:R}),UH=B({name:PH}),WH=B({id:PH,session_id:PH,parent_id:U(PH),sequence:FH,type:R,role:U(H([`user`,`assistant`,`tool_result`])),state:H([`complete`,`streaming`]),request_id:U(PH),work_id:U(PH),data_json:R,timestamp:IH,completed_at:U(IH),damaged:H([0,1])}),GH=B({id:PH,session_id:PH,sequence:FH,request_id:PH,work_id:PH,data_json:R,timestamp:IH,origin_kind:H([`user`,`extension`]),origin_id:U(PH),origin_correlation:U(PH)}),KH=B({kind:L(`extension`),extensionId:PH,correlation:U(PH)}),qH=ig([B({kind:L(`user`)}),KH]);P(qH,MH),e_(qH);var JH=B({next_sequence:FH}),YH=B({present:L(1)});P(RH,MH),P(zH,MH),P(VH,MH),P(HH,MH),P(UH,MH),P(B({candidate_id:U(PH),path_count:G.pipe(W(Ag(0))),root_count:G.pipe(W(jg(0))),missing_parent_count:G.pipe(W(jg(0))),leaf_state:H([`complete`,`streaming`])}),MH),P(WH,MH),P(GH,MH),P(JH,MH),P(YH,MH);function XH(e){return`${[`id`,`session_id`,`parent_id`,`sequence`,`type`,`role`,`state`,`request_id`,`work_id`,`data_json`,`timestamp`,`completed_at`].map(t=>`${e}.${t}`).join(`, `)},
26
+ `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,`Unterminated template`)},gR.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return`
27
+ `;case 114:return`\r`;case 120:return String.fromCharCode(this.readHexChar(2));case 117:return EI(this.readCodePoint());case 116:return` `;case 98:return`\b`;case 118:return`\v`;case 102:return`\f`;case 13:this.input.charCodeAt(this.pos)===10&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),``;case 56:case 57:if(this.strict&&this.invalidStringToken(this.pos-1,`Invalid escape sequence`),e){var n=this.pos-1;this.invalidStringToken(n,`Invalid escape sequence in template string`)}default:if(t>=48&&t<=55){var r=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(r,8);return i>255&&(r=r.slice(0,-1),i=parseInt(r,8)),this.pos+=r.length-1,t=this.input.charCodeAt(this.pos),(r!==`0`||t===56||t===57)&&(this.strict||e)&&this.invalidStringToken(this.pos-1-r.length,e?`Octal literal in template string`:`Octal literal in strict mode`),String.fromCharCode(i)}return hI(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},gR.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},gR.readWord1=function(){this.containsEsc=!1;for(var e=``,t=!0,n=this.pos,r=this.options.ecmaVersion>=6;this.pos<this.input.length;){var i=this.fullCharCodeAtPos();if(oI(i,r))this.pos+=i<=65535?1:2;else if(i===92){this.containsEsc=!0,e+=this.input.slice(n,this.pos);var a=this.pos;this.input.charCodeAt(++this.pos)!==117&&this.invalidStringToken(this.pos,`Expecting Unicode escape sequence \\uXXXX`),++this.pos;var o=this.readCodePoint();(t?aI:oI)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=EI(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},gR.readWord=function(){var e=this.readWord1(),t=X.name;return this.keywords.test(e)&&(t=dI[e]),this.finishToken(t,e)},eL.acorn={Parser:eL,version:`8.18.0`,defaultOptions:jI,Position:OI,SourceLocation:kI,getLineInfo:AI,Node:wL,TokenType:sI,tokTypes:X,keywordTypes:dI,TokContext:mL,tokContexts:hL,isIdentifierChar:oI,isIdentifierStart:aI,Token:hR,isNewLine:hI,lineBreak:pI,lineBreakG:mI,nonASCIIwhitespace:_I};function bR(e,t){return eL.parse(e,t)}A(()=>Ke(`ok`,[pe({ok:gt(!0),value:Jt()}),pe({ok:gt(!1),error:pe({kind:gt(`guest_threw`),name:k().max(80),message:k().max(512),transportMessage:k().max(512).optional()})})]));var xR=A(()=>k().regex(/^[A-Za-z][A-Za-z0-9_]*$/u)),SR=xR.refine(e=>{if(e===`env`)return!1;try{return bR(`let ${e};`,{ecmaVersion:`latest`,sourceType:`module`}),!0}catch(e){if(!(e instanceof SyntaxError))throw e;return!1}},`Invalid sandbox transport alias`);A(()=>Ht(SR,Ze(xR).min(1))),A(()=>Ht(SR,Ze(k().regex(/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/u))));var CR=H([`read`,`write`]),wR=Zh,TR=B({access:I(CR),confirm:I(wR)}),ER=H([`none`,`read`,`write`]),DR=P(TR),OR=P(ER);function kR(e){let t=DR({access:e.access,confirm:e.confirm});if(x(t))throw new gF(`Access labels must be access: "read" | "write" and confirm: boolean`);return{access:t.success.access??`write`,confirm:t.success.confirm??!1}}function AR(e,t){let n=`${t.module}.${t.operation}`;switch(e){case`not-granted`:return`${n} is not granted to this Agent.`;case`read-only`:return`${n} changes something, and this Agent has read-only access to ${t.module}.`;case`confirmation-unavailable`:return`${n} needs a person's approval, and no one can be asked here.`;case`declined`:return`${n} was not approved.`}}function jR(e,t){return Object.freeze({refused:!0,module:t.module,operation:t.operation,reason:e,message:AR(e,t)})}function MR(e,t,n){let r=e.sessionGrants?.(t),i=r!==void 0&&Object.hasOwn(r,n)?r:e.grants;if(i===void 0||!Object.hasOwn(i,n))return e.required?.includes(n)===!0?`none`:e.defaultGrant??`write`;let a=OR(i[n]);return Oi(a)?a.success:`none`}async function NR(e,t,n,r,i){let a=await PR(e,t,n,r,i);return a!==void 0&&e.onRefused?.(a,t),a}async function PR(e,t,n,r,i){await e.beforeCall?.(i),i.throwIfAborted();let a=FR(e,t,n);if(a!==void 0)return a;if(!(!n.confirm&&(e.confirmWrites!==!0||n.access===`read`)))return e.confirm===void 0?jR(`confirmation-unavailable`,n):await e.confirm({module:n.module,operation:n.operation,access:n.access,sessionId:t.sessionId,input:r},i)?(await e.beforeCall?.(i),i.throwIfAborted(),FR(e,t,n)):jR(`declined`,n)}function FR(e,t,n){let r=MR(e,t,n.module);if(r===`none`)return jR(`not-granted`,n);if(r===`read`&&n.access!==`read`)return jR(`read-only`,n)}function IR(e,t,n){let r={module:e.module,operation:e.descriptor.name,...kR(e)};return{...e,prepare:i=>Rn({try:e=>NR(t,n,r,i.arguments,e),catch:()=>({message:`Access check failed`})}).pipe(j(t=>t===void 0?e.prepare(i):O({execute:()=>Qx({type:`result`,result:{content:[{type:`text`,text:JSON.stringify(t)}],isError:!1}})})))}}var LR=Il();async function RR(e){let t=await ye(e);if(fs(t))return{value:t.value};let n=ts(t.cause);if(x(n))throw es(t.cause);return{issues:LR(n.success.issue).issues}}function zR(e){let t=n_(e),n=Ph(t)[`~standard`].jsonSchema,r=Ih(t),i=zh(t);return Object.freeze({description:{"~standard":{jsonSchema:{input:n.input,output:n.input}}},decode:e=>RR(r(e)),encode:e=>RR(i(e))})}function BR(e){let t=async t=>e[`~standard`].validate(t);return Object.freeze({description:e,decode:t,encode:t})}function VR(e){return Uh(e)?zR(e):BR(e)}var HR=Symbol(`mycelium.operation`),UR=Symbol(`mycelium.module`),WR=new WeakMap,GR=new WeakMap;function KR(e){let t=Object.freeze({[HR]:!0}),n=VR(e.input),r=e.output===void 0?void 0:VR(e.output),i={replay:e.replay??`unsafe`,...kR(e),input:n.description,invoke:async(t,i)=>{let a=await n.decode(t);if(a.issues!==void 0)throw new yF(a.issues);let o=await e.execute(a.value,i);if(r===void 0)return o;let s=await r.encode(o);if(s.issues!==void 0)throw new OF({reason:`Capability output failed its declared schema`,rawCause:new bF(s.issues)});return s.value}};e.description!==void 0&&(i.description=e.description),r!==void 0&&(i.output=r.description);let a=Object.freeze(i);return WR.set(t,a),t}function qR(e){let t=Ze(xR).safeParse(e.namespace??[]);if(!t.success)throw new gF(`Invalid module namespace`);let n=Object.freeze({[UR]:!0}),r={id:e.id,grantKey:e.id,name:e.name??e.id,namespace:Object.freeze(t.data),operations:Object.freeze({...e.operations})};e.description!==void 0&&(r.description=e.description);let i=Object.freeze(r);return GR.set(n,i),n}function JR(e){return GR.has(e)}function YR(e){return WR.get(e)}function XR(e){return GR.get(e)}function ZR(e,t,n){let r=XR(e);if(r===void 0)throw new gF(`Unknown module registration`);let i={};for(let[e,a]of Object.entries(r.operations)){let r=n===``?e:`${n}.${e}`;if(JR(a)){let n=XR(a);if(n===void 0)throw new gF(`Unknown child module registration`);i[e]=ZR(a,t,[r,...n.namespace].join(`.`));continue}let o=YR(a);if(o===void 0)throw new gF(`Unknown operation registration: ${e}`);let s=Object.freeze({[HR]:!0});WR.set(s,Object.freeze({...o,invoke:async(e,n)=>{let i=await t({operation:r,context:n});return i.kind===`refuse`?i.value:await o.invoke(e,n)}})),i[e]=s}return QR(qR(r.description===void 0?{id:r.id,name:r.name,namespace:r.namespace,operations:i}:{id:r.id,name:r.name,namespace:r.namespace,description:r.description,operations:i}),r.grantKey)}function QR(e,t){let n=XR(e);if(n===void 0)throw new gF(`Unknown module registration`);let r=Object.freeze({[UR]:!0});return GR.set(r,Object.freeze({...n,grantKey:t})),r}function $R(e,t){if(t.length===0||t.length>160)throw new gF(`Grant key must be non-empty and bounded`);return QR(e,t)}function ez(e,t){return ZR(e,t,``)}function tz(e,t){return e<t?-1:+(e>t)}function nz(e){return e instanceof Error?e.message:`Capability declarations could not be compiled`}var rz=160;function iz(e){if(e.length===0||e.length>rz)throw new gF(`Module id must be non-empty and bounded`)}function az(e){if(!e.split(`.`).every(e=>xR.safeParse(e).success))throw new gF(`Operation key must be a path segment or a dotted relative path`)}function oz(e){let t=e.replace(/[^A-Za-z0-9_]/g,`_`);return/^[A-Za-z]/.test(t)?t:`module_${t}`}function sz(e){let t=oz(e);return SR.safeParse(t).success?t:`module_${t}`}function cz(e,t){let n=new Set([`forage`,`env`]),r=new Map;for(let i of e){let e=t===`logical`?i.namespace:[],a=t===`logical`?oz(i.name):sz(i.name),o=t=>[...e,t].join(`.`),s=a,c=2;for(;n.has(o(s));)s=`${a}_${String(c)}`,c+=1;n.add(o(s)),r.set(i.id,s)}return r}var lz=14695981039346656037n,uz=1099511628211n,dz=18446744073709551615n;function fz(e,t){let n=e,r=BigInt(t.length);for(let e=0;e<8;e+=1)n=(n^r&255n)*uz&dz,r>>=8n;for(let e=0;e<t.length;e+=1){let r=t.charCodeAt(e);n=(n^BigInt(r&255))*uz&dz,n=(n^BigInt(r>>>8&255))*uz&dz}return n}function pz(e,t,n){let r=fz(lz,e),i=[...t.entries()].sort(([e],[t])=>tz(e,t));for(let[e,t]of i)r=fz(r,e),r=fz(r,t);let a=[...n].sort((e,t)=>tz(e.id,t.id));for(let e of a)r=fz(r,e.id),r=fz(r,e.version);return`installed-${r.toString(16).padStart(16,`0`)}`}function mz(){return[dF,uF,fF]}function hz(e,t,n,r,i,a=[]){return Object.entries(t.operations).flatMap(([t,o])=>{if(az(t),JR(o)){let s=XR(o);if(s===void 0)throw new gF(`Unknown child module registration`);return hz(e,s,n,[...r,t,...s.namespace],s.description??i,[...a,t,...s.namespace])}let s=YR(o);if(s===void 0)throw new gF(`Unknown operation registration: ${[...r,t].join(`.`)}`);return[Object.freeze({grantKey:e,path:[...r,t].join(`.`),namespace:n,name:[...a,t].join(`.`),moduleDescription:i,operation:s})]})}function gz(e,t=[]){let n=e.map(e=>{let t=XR(e);if(t===void 0)throw new gF(`Unknown module registration`);return iz(t.id),t}).sort((e,t)=>tz(e.id,t.id)),r=new Set;for(let e of n){if(r.has(e.id))throw new gF(`Duplicate module id: ${e.id}`);r.add(e.id)}let i=cz(n,`transport`),a=cz(n,`logical`),o=Object.freeze(Object.fromEntries(n.map(e=>{let t=i.get(e.id);if(t===void 0)throw new gF(`Missing module alias: ${e.id}`);let n=a.get(e.id);if(n===void 0)throw new gF(`Missing logical alias: ${e.id}`);return[t,Object.freeze([...e.namespace,n])]}))),s=n.flatMap(e=>{let t=i.get(e.id);if(t===void 0)throw new gF(`Missing module alias: ${e.id}`);let n=o[t];if(n===void 0)throw new gF(`Missing namespace path: ${e.id}`);return hz(e.grantKey,e,t,n,e.description)}).sort((e,t)=>tz(e.path,t.path)),c=new Set(s.map(e=>e.path));if(c.size!==s.length)throw new gF(`Duplicate operation path`);for(let e of mz()){if(c.has(e.path))throw new gF(`Reserved intrinsic path: ${e.path}`);c.add(e.path)}for(let e of c){let t=e.split(`.`);for(let n=1;n<t.length;n+=1)if(c.has(t.slice(0,n).join(`.`)))throw new gF(`Operation conflicts with namespace: ${e}`)}let l;try{l=oF({revision:`prepared-content-stamp`,operations:[...s.map(({path:e,moduleDescription:t,operation:n})=>{let r={path:e,input:n.input};return n.description!==void 0&&(r.description=n.description),n.output!==void 0&&(r.output=n.output),t!==void 0&&(r.instructions=t),r}),...mz()]})}catch(e){throw new gF(nz(e))}let u=pz(l.stamp(),i,t),d=Object.freeze({revision:u,search:l.search,describe:l.describe,list:l.list,stamp:l.stamp}),f=Object.freeze(Object.fromEntries([...i.entries()].map(([e,t])=>[t,e])));return Object.freeze({revision:u,catalog:d,operations:Object.freeze(s),moduleAliases:f,namespacePaths:o})}function _z(){return null}var vz=be(),yz=A(()=>en([Dt(),k(),cr(),Lt()])),bz=A(()=>Ht(k(),Jt())),xz=A(()=>KF.extend({timeoutMs:Lt().int().min(1).max(9e5).optional(),abortGraceMs:Lt().int().min(1).max(3e4).optional()}).optional()),Sz=64,Cz=262144,wz=new TextEncoder,Tz=e=>{e(O(void 0))};function Ez(e){let t=xz.safeParse(e);if(!t.success)throw new gF(`Execution policy is invalid`);let n=t.data?.timeoutMs??18e4;return Object.freeze({timeoutMs:n,abortGraceMs:t.data?.abortGraceMs??5e3,...qF({sandboxCapacity:t.data?.sandboxCapacity,admissionWaitMs:t.data?.admissionWaitMs??n},(t.data?.sandboxCapacity,void 0))})}function Dz(e){return En(function*(){let t=yield*Wb(e);return Object.freeze({createGroup:()=>{let e=0,n=new Set,r=ut(t=>e===0?(t(O(void 0)),Qt(()=>void 0)):(n.add(t),Qt(()=>n.delete(t))));return Object.freeze({start:r=>ti(i=>Qt(()=>{e+=1}).pipe(we(Xn(i(t.withPermits(1)(r)).pipe(ri(Qt(()=>{if(--e,e===0){let e=[...n];n.clear(),e.forEach(Tz)}}))))))),awaitIdle:r})}})})}function Oz(e,t=0){if(t>Sz)throw Error(`JSON value exceeds the nesting bound`);let n=yz.safeParse(e);if(n.success)return n.data;if(Array.isArray(e))return e.map(e=>Oz(e,t+1));let r=bz.safeParse(e);if(!r.success)throw r.error;return Object.fromEntries(Object.entries(r.data).filter(([,e])=>e!==void 0).map(([e,n])=>[e,Oz(n,t+1)]))}function kz(e){return vz.parse(Oz(e))}function Az(e){let t=JSON.stringify(kz(e)),n=wz.encode(t).byteLength;if(n>Cz)throw new kF({size:n});return Object.freeze({text:t})}function jz(e,t){return Object.freeze(Object.fromEntries(Object.entries(e).map(([e,n])=>[e,Object.freeze(Object.fromEntries(Object.entries(n).map(([n,r])=>[n,async i=>{t();try{return kz(await r(i))}catch(t){throw LF(t)?t:t instanceof dP?new jF({namespace:e,operation:n,cause:{kind:`Forage`,message:t.message},rawCause:t}):t instanceof yF?new jF({namespace:e,operation:n,cause:{kind:`InvalidInput`,message:`Invalid operation input: ${et({issues:t.issues})}; use forage.describe`},rawCause:t}):t}}])))])))}function Mz(e){return ut(t=>{let n=t.bind(void 0,ar);return e.aborted?n():e.addEventListener(`abort`,n,{once:!0}),Qt(e.removeEventListener.bind(e,`abort`,n))})}function Nz(e,t){if(e===void 0)return()=>void 0;let n=t.bind(void 0);return e.aborted?(n(),()=>void 0):(e.addEventListener(`abort`,n,{once:!0}),e.removeEventListener.bind(e,`abort`,n))}function Pz(e,t,n){return e===`deadline_exceeded`?new CF({limitMs:t,elapsedMs:n??0}):new TF({by:`caller`})}function Fz(e){return Ms.pipe(S(t=>t-e))}function Iz(e){return Ms.pipe(j(t=>rn(()=>{let r=e.executionId,i=new AbortController,a=t,s={kind:`waiting`},c,l=e=>{c===void 0&&s.kind!==`refused`&&(c=e,i.abort())},u=t=>{let n=new wF({capacity:e.policy.capacity,waitedMs:Math.max(0,t-a)});return s={kind:`refused`,failure:n},n},d=()=>{if(i.signal.aborted)throw Pz(c,e.policy.timeoutMs)},f=Nz(e.callerSignal,()=>{l(`cancelled`)}),p=t+e.policy.timeoutMs,m={executionId:r,deadlineAt:p,signal:i.signal,images:e.images};e.toolCallId!==void 0&&Object.assign(m,{toolCallId:e.toolCallId}),e.output!==void 0&&Object.assign(m,{output:e.output});let h=Object.freeze(m),g=rn(()=>Ms.pipe(j(o=>s.kind===`refused`?bn(s.failure):(o>=p&&l(`deadline_exceeded`),i.signal.aborted?Fz(t).pipe(j(t=>bn(Pz(c,e.policy.timeoutMs,t)))):o>=a+e.policy.waitMs?bn(u(o)):(s={kind:`admitted`},e.sandbox.execute(Object.freeze({executionId:r,code:e.code,timeoutMs:e.policy.timeoutMs,bindings:jz(e.createBindings(h),d),modules:e.modules,namespacePaths:e.namespacePaths,sessionId:e.sessionId}),i.signal).pipe(n(e=>Qo(e)?Br(e):bn(RF(es(e)))))))))),_=t=>Ib(t).pipe(o({duration:e.policy.abortGraceMs,orElse:()=>bn(c===`deadline_exceeded`?new CF({limitMs:e.policy.timeoutMs,elapsedMs:e.policy.timeoutMs,acknowledged:!1}):new TF({by:`caller`,acknowledged:!1}))})),v,y=!1,b=i=>(y=!0,Fz(t).pipe(j(t=>{let a=RF(i),o=a instanceof CF?new CF({limitMs:a.limitMs,elapsedMs:t,acknowledged:a.acknowledged}):a,s=NF(o,r),c=Ht(k(),be()).parse(BF(o));c.ref=r;let l={kind:`sandbox_failure`,ref:r,executionId:r,adapter:e.sandbox.adapter??`effect`,buildSha:e.sandbox.buildSha??_z(),tag:s._tag,fields:c,healthAlert:s._tag===`Unknown`},u=rn(()=>e.sandbox.onFailure?.(l)??ar);return Et(`sandbox_failure`,l).pipe($t({executionId:r,ref:r,adapter:l.adapter,tag:l.tag,buildSha:l.buildSha}),we(s._tag===`Unknown`?Ec(Dc(Tc(`sandbox_unknown`),{adapter:l.adapter}),1).pipe(we(Et(`sandbox_health_alert`).pipe($t({ref:r,adapter:l.adapter})))):ar),we(u.pipe(n(e=>Et(`sandbox_failure_record_failed`,e)))),qt(s))})));return En(function*(){if(i.signal.aborted){let n=yield*Fz(t);return yield*bn(Pz(c,e.policy.timeoutMs,n))}a=yield*Ms,v=yield*e.backingWork.start(g);let n=yield*Ms,r=Qr(Math.max(0,a+e.policy.waitMs-n)).pipe(we(Ms),j(e=>s.kind===`admitted`?fr:s.kind===`refused`?O({kind:`busy`,failure:s.failure}):i.signal.aborted?O({kind:`cancelled`}):e>=p?(l(`deadline_exceeded`),O({kind:`deadline`})):O({kind:`busy`,failure:u(e)}))),o=yield*Hi(Pb(v).pipe(S(e=>Object.freeze({kind:`settled`,exit:e}))),Hi(Qr(Math.max(0,p-n)).pipe(we(Qt(()=>(l(`deadline_exceeded`),Object.freeze({kind:`deadline`}))))),Hi(Mz(i.signal).pipe(qt(Object.freeze({kind:`cancelled`}))),r))),d=s.kind===`refused`?s.failure:o.kind===`busy`?o.failure:void 0;if(d!==void 0)return yield*_(v).pipe(we(bn(d)));if(o.kind===`settled`&&c===void 0)return yield*yr(o.exit,{onFailure:Br,onSuccess:e=>fi({try:()=>Az(e),catch:t=>LF(t)?t:new AF({kind:zF(e),rawCause:t})})});o.kind===`deadline`&&l(`deadline_exceeded`);let f=yield*Fz(t);return yield*_(v).pipe(we(bn(Pz(c,e.policy.timeoutMs,f))))}).pipe(de(()=>(l(`cancelled`),(v===void 0?ar:Ib(v).pipe(mt(e.policy.abortGraceMs),an)).pipe(we(rn(()=>y?ar:b(new TF({by:`operator`})).pipe(an))))))).pipe(Vn(e=>b(e).pipe(j(bn))),ri(Qt(f)))})))}var Lz=og(()=>ig([Xh,Yh,Zh,z,R,Kg,gg(AbortSignal),V(Lz),Rz])),Rz=$h(R,Lz),zz=new Map([[`openai`,`OpenAI`],[`openai-codex`,`OpenAI`],[`anthropic`,`Anthropic`],[`cloudflare-workers-ai`,`Cloudflare Workers AI`]]),Bz=$h(R,r_);Rh(B({samplingParams:F(Bz),samplingParamsByThinkingLevel:F(B({off:F(Bz),minimal:F(Bz),low:F(Bz),medium:F(Bz),high:F(Bz),xhigh:F(Bz),max:F(Bz)}))}));var Vz=`modulepreload`,Hz=function(e){return`/`+e},Uz={},Wz=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Hz(t,n),t=s(t),t in Uz)return;Uz[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Vz,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},Gz=B({error:B({code:I(R),type:I(R)})});Lh(B({type:L(`response.failed`),response:Gz})),Lh(Vg(Gz)),Lh(B({type:L(`error`),status:I(z.check(Pg(),Ng({minimum:100,maximum:599}))),code:I(R),error:I(Gz.fields.error)})),Rh(gg(Uint8Array)),Lh(Hg.check(Ng({minimum:0,maximum:60}))),Lh(Hg.check(Pg(),Ng({minimum:0,maximum:864e10}))),Lh(H([`five_hour`,`seven_day`,`seven_day_opus`,`seven_day_sonnet`])),Lh(L(`rejected`)),Lh(L(`0`)),Lh($g),Lh(B({type:L(`error`),error:B({type:L(`overloaded_error`)})}));var Kz=B({provider:R,cause:ig([ig([B({code:L(`usage-limit-reached`),cause:F(L(`quota`)),resetAt:F(z),limit:F(H([`five_hour`,`seven_day`,`seven_day_opus`,`seven_day_sonnet`]))}),B({code:L(`rate-limit`),retryAfterMs:F(z)}),B({code:L(`overloaded`)}),B({code:L(`provider_unavailable`),status:F(z)}),B({code:L(`provider_rejected`),status:z})]),B({code:H([`setup_required`,`tools_unsupported`,`request_failed`])})])}),qz={assign:0,create:0,clone:0,discard:0,update:0};function Jz(e){return Xz(e,null)}function Yz(e){return Xz(typeof e,`object`)&&!Jz(e)}function Xz(e,t){return e===t}function Zz(e){return Xz(e,`__proto__`)||Xz(e,`constructor`)||Xz(e,`prototype`)}function Qz(e,t){return Zz(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function $z(e){return Object.getOwnPropertyNames(e)}var eB={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function tB(){return eB}function nB(e){return tB().immutableTypes?Object.freeze(e):e}function rB(e,t){for(let n of Object.keys(t))Object.defineProperty(e,n,{configurable:!0,writable:!0,enumerable:!1,value:t[n]});return e}function iB(e,t){return{...e,...t}}function aB(e,t,n={}){qz.create+=1;let r=iB(t,n);return nB(tB().enumerableKind?iB(r,e):rB(r,e))}function oB(e){return Yz(e)}function sB(e){return oB(e)&&Qz(e,`~optional`)}function cB(e){return $z(e).filter(t=>!sB(e[t]))}function lB(e,t={}){let n=cB(e);return aB({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}var uB;(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`})(uB||={}),Array.from({length:256}).map((e,t)=>BigInt(t));var dB=new Float64Array(1);new DataView(dB.buffer),new Uint8Array(dB.buffer),new TextEncoder;var fB=`-?(?:0|[1-9][0-9]*)`,pB=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function mB(e){return aB({"~kind":`String`},{type:`string`},e)}var hB=`^${fB}$`;`${pB}`;function gB(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var _B=[...gB(97,122),...gB(65,90)],vB=[`0`,...gB(49,57)];[...vB],[..._B,...vB],[...vB],new RegExp(hB);var yB=class{#e=new Map;#t;constructor(e=8){this.#t=e}push(e,t){let n=this.#e.get(e)??[];if(n.length>=this.#t)throw new jF({namespace:`execute`,operation:`images`,cause:{kind:`Unavailable`,message:`Image collector cap reached for this execution (max ${String(this.#t)} images). Process images one at a time or write them to files.`}});let r=`img_${String(n.length)}`;return n.push(Object.freeze({...t})),this.#e.set(e,n),r}drain(e){let t=this.#e.get(e);return t===void 0?[]:(this.#e.delete(e),t)}dispose(e){this.#e.delete(e)}},bB=8192,xB=bB*4,SB=new TextEncoder,CB=()=>new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!1}),wB=class e{wake;#e={stdout:{decoder:CB(),pending:new Uint8Array},stderr:{decoder:CB(),pending:new Uint8Array}};#t=CB();#n=Array.from({length:bB},()=>void 0);#r=0;#i=0;#a=0;#o=0;#s=0;#c=0;#l=!1;#u=!1;constructor(e){this.wake=e}static make(){return rb({capacity:1,strategy:`dropping`}).pipe(S(t=>new e(t)))}write(e,t){if(this.#u||t.length===0)return;let n=this.#e[e];this.#c+=t.length;for(let e=0;e<t.length;e+=xB){let r=t.subarray(e,e+xB),i=n.decoder.decode(r,{stream:!0}),a=new Uint8Array(n.pending.length+r.length);a.set(n.pending),a.set(r,n.pending.length);let o=this.#f(a);n.pending=a.slice(a.length-o),this.#h(i,a.length-o,a)}this.#l=!0,ob(this.wake,void 0)}#d(e,t){let n=this.#t.decode(e.subarray(0,t),{stream:!0});return this.#t.decode(),n}#f(e){for(let t=1;t<=Math.min(3,e.length);t++){let n=e.subarray(e.length-t);if(this.#d(n,n.length).length===0)return t}return 0}#p(){let e=this.#n[this.#r];if(e===void 0)throw Error(`Missing output ring entry`);this.#n[this.#r]=void 0,this.#r=(this.#r+1)%bB,this.#i--,this.#a-=e.textBytes,this.#o-=e.newlines,this.#s+=e.rawBytes}#m(e,t,n){let r=e.raw;if(r===null){this.#p();return}let i=e=>{let i=this.#d(r,e);return SB.encode(i).length>=t&&i.split(`
28
+ `).length-1>=n},a=Math.min(r.length,Math.max(4,t));for(;a<r.length&&!i(a);)a=Math.min(r.length,a*2);let o=0;for(;o<a;){let e=Math.floor((o+a)/2);i(e)?a=e:o=e+1}let s=this.#d(r,o);if(s.length===e.text.length){this.#p();return}let c=o-this.#f(r.subarray(0,o)),l=SB.encode(s).length,u=s.split(`
29
+ `).length-1;e.raw=r.slice(c),e.text=this.#d(e.raw,e.raw.length),e.rawBytes-=c,e.textBytes-=l,e.newlines-=u,this.#a-=l,this.#o-=u,this.#s+=c}#h(e,t,n){if(e.length===0)return;let r={text:e,raw:n,rawBytes:t,textBytes:SB.encode(e).length,newlines:e.split(`
30
+ `).length-1};for(this.#i===bB&&this.#p(),this.#n[(this.#r+this.#i)%bB]=r,this.#i++,this.#a+=r.textBytes,this.#o+=r.newlines;this.#a>bB||this.#o>=200;){let e=this.#n[this.#r];if(e===void 0)throw Error(`Missing output ring entry`);let t=Math.max(0,this.#a-bB),n=Math.max(0,this.#o-199);e.textBytes<=t||e.newlines<n?this.#p():this.#m(e,t,n)}}snapshot(){let e=``;for(let t=0;t<this.#i;t++){let n=this.#n[(this.#r+t)%bB];if(n===void 0)throw Error(`Missing output ring entry`);e+=n.text}return{tail:e,droppedBytes:this.#s,totalBytes:this.#c}}#g(){if(!this.#l)return;this.#l=!1;let{tail:e,...t}=this.snapshot();return{type:`update`,result:{isError:!1,content:[{type:`text`,text:e}],data:t}}}finish(){if(!this.#u){this.#u=!0;for(let e of[this.#e.stdout,this.#e.stderr]){let t=e.decoder.decode();this.#h(t,e.pending.length,null),e.pending=new Uint8Array,t.length>0&&(this.#l=!0)}return this.#g()}}get updates(){return iS(this.wake).pipe(sS(()=>Qr(`100 millis`).pipe(S(()=>this.#u?void 0:this.#g()))),mS(e=>e!==void 0))}dispose(){this.#u=!0,this.#n.fill(void 0),this.#r=this.#i=this.#a=this.#o=0,this.#c=this.#s=0,this.#l=!1;for(let e of[this.#e.stdout,this.#e.stderr])e.decoder.decode(),e.pending=new Uint8Array}},TB=B({code:R}),EB='Inside execute, call forage.search, forage.list or forage.describe to discover operations and inspect their inputs. forage is available only there, not as a separate tool. Run async JavaScript in the sandbox. Each call is a fresh sandbox, not a REPL: nothing survives between calls, so redefine helpers or persist state to a file. Never shadow injected module names with local bindings. Find operations with await forage.search({ query }) using one short keyword such as read or shell, or page them all with forage.list({limit:50}), optionally by namespace, until nextCursor is null. Inspect input with await forage.describe({ path }) before calling; describe known paths directly. Call an operation as await env.<path>({ ... }) with the exact dotted path, for example await env.computers.local.exec({ command: "pwd" }); a bare computers.local.exec is not defined. Put multiline shell commands in a template literal. Code is JavaScript first, so double each backslash the shell needs (`\\\\(` passes `\\(`; `\\(` becomes `(`). For file edits, prefer Files operations when available. Explicitly return the final value. Before treating a shell or process result as success, check status, exitCode and stderr.';function DB(e,t,n,r){let i={module:e.grantKey,operation:e.name,access:e.operation.access,confirm:e.operation.confirm};return async a=>await NR(n,{sessionId:r},i,a,t.signal)??await e.operation.invoke(a,t)}function OB(e,t,n,r){let i=0,a=new Map;for(let o of e){let e=o.namespace,s=o.name,c=a.get(e)??new Map;c.set(s,e=>DB(o,Object.freeze({...t,operationOrdinal:i++}),n,r)(e)),a.set(e,c)}return Object.freeze(Object.fromEntries([...a].map(([e,t])=>[e,Object.freeze(Object.fromEntries(t))])))}function kB(e,t){let n=e.safeParse(t);if(!n.success)throw new yF(n.error.issues);return n.data}function AB(e){return Object.freeze({list:t=>Promise.resolve().then(()=>e.list(kB(tP,t))),describe:t=>Promise.resolve().then(()=>e.describe(kB(eP,t))),search:t=>Promise.resolve().then(()=>e.search(kB($N,t)))})}function jB(e,t,n,r,i){return Object.freeze({...OB(e,n,r,i),forage:AB(t)})}function MB(e,t,n,r,i,a,o,s){let c=n.execution??Ez(void 0),l=new yB,u=(u,d,f,p,m)=>Iz({executionId:u,toolCallId:p,output:m,images:Object.freeze({push:e=>l.push(u,e)}),code:d,callerSignal:f,policy:c,sandbox:n,backingWork:r,createBindings:n=>jB(e,t,Object.freeze({...n,toolCallCode:d}),s,o),modules:i,namespacePaths:a,sessionId:o}),f=(e,t)=>rn(()=>{let n=jv();return u(n,e,t).pipe(ri(Qt(()=>{l.dispose(n)})))}),p=(e,t,n)=>rn(()=>{let r=jv(),i=()=>l.drain(r);return u(r,e,void 0,t,n).pipe(d({onSuccess:e=>O(NB({text:e.text,isError:!1},i())),onFailure:e=>{let t=i();return e instanceof kF&&t.length>0?O(NB({text:PF(e),isError:!0},t)):bn(PB(e))}}),ri(Qt(()=>{l.dispose(r)})))}),m={replay:`unsafe`,descriptor:{name:`execute`,description:EB,parameters:lB({code:mB()},{additionalProperties:!1})},prepare:e=>Ih(TB)(e.arguments).pipe(S(({code:t})=>({execute:()=>oS(En(function*(){let n=yield*wB.make();yield*Oe(()=>Qt(()=>{n.dispose()}));let r=yield*Ci(p(t,e.id,{write:(e,t)=>{n.write(e,t)}}),{startImmediately:!0});return pS(n.updates,Gx(Pb(r)).pipe(cS(e=>{let t=n.finish();return uS(nS(t===void 0?[]:[t]),Gx(e))})),{haltStrategy:`right`}).pipe(_S(e=>e.type===`result`))}))})),jt(()=>({message:`Invalid execute arguments`})))};return Object.freeze({effectTool:m,execute:f})}function NB(e,t){let n=t.map(e=>({type:`image`,data:e.data,mimeType:e.mimeType})),r=[{type:`text`,text:e.text},...n];return t.length===0?{type:`result`,result:{content:r,isError:e.isError}}:{type:`result`,result:{content:r,data:{images:t.map(e=>({bytes:e.bytes,mimeType:e.mimeType,path:e.path}))},isError:e.isError}}}function PB(e){let t={_tag:`MuleError`,phase:`tool`,message:LF(e)?PF(e):e.message};return e instanceof wF?{...t,cause:e}:t}function FB(e,t){return e<t?-1:+(e>t)}var IB=128,LB=A(()=>k().min(1).max(160)),RB=A(()=>E({version:k().min(1).max(160),modules:Ze(Jt())})),zB=1e3;function BB(e){if(e.length>IB)throw new gF(`Capability source count exceeds bound`);let t=[...e].sort((e,t)=>FB(e.id,t.id)),n=new Set;for(let e of t){if(!LB.safeParse(e.id).success)throw new gF(`Capability source id must be non-empty and bounded`);if(n.has(e.id))throw new gF(`Duplicate capability source id: ${e.id}`);n.add(e.id)}return t}function VB(e){if(e>zB)throw new gF(`Candidate module count exceeds bound`)}function HB(e,t){let n=RB.safeParse(e);if(!n.success)throw new gF(`Capability source snapshot must have a non-empty bounded version`);VB(t+n.data.modules.length)}function UB(e,t,n,r,i){return ti(a=>En(function*(){let o=t=>Rn({try:()=>t.release(),catch:()=>new vF(e.id,`release`)}).pipe(Vn(e=>Qt(()=>{n.push(e)}))),s=yield*fi({try:()=>{let t=new AbortController;return{controller:t,outcome:e.acquire(i===void 0?{signal:t.signal,invalidate:r}:{signal:t.signal,invalidate:r,session:i}).then(e=>ss(e),()=>ls(new vF(e.id,`acquire`)))}},catch:()=>new vF(e.id,`acquire`)});yield*Os(t,Le(()=>s.outcome).pipe(j(e=>fs(e)?o(e.value):ar)));let c=yield*a(Le(()=>s.outcome)).pipe(de(()=>Qt(()=>{s.controller.abort()})));return ps(c)?yield*Br(c.cause):c.value}))}function WB(e){return En(function*(){let t=yield*fi({try:()=>BB(e.sources),catch:e=>e instanceof gF?e:new gF(`Capability sources are invalid`)});yield*fi({try:()=>{VB(e.modules.length)},catch:e=>e instanceof gF?e:new gF(`Static capability modules are invalid`)});let n=yield*Ts(),r=[],i=!1,a=[...e.modules],o=[];return yield*En(function*(){for(let s of t){let t=yield*UB(s,n,r,()=>{i=!0},e.session);yield*fi({try:()=>{HB(t.snapshot,a.length)},catch:e=>e instanceof gF?e:new gF(`Capability source snapshot is invalid`)}),a.push(...t.snapshot.modules),o.push({id:s.id,version:t.snapshot.version})}let s=e.precompiled??(yield*fi({try:()=>gz(a,o),catch:e=>e instanceof gF?e:new gF(`Capability compilation failed`)})),c=e.backingWork.createGroup(),l=MB(s.operations,s.catalog,e.sandbox,c,s.moduleAliases,s.namespacePaths,e.session?.sessionId??null,e.access),u=!1;return Object.freeze({compiled:s,executeDoor:l,isStale:()=>i,close:()=>En(function*(){u||(u=!0,yield*c.awaitIdle,yield*As(n,ds));let e=r[0];e!==void 0&&(yield*bn(e))})})}).pipe(Xe(e=>fs(e)?ar:As(n,e)))})}var GB=2;function KB(e){return En(function*(){for(let t=0;t<GB;t+=1){let t=yield*WB(e);if(!t.isStale())return t;yield*t.close()}return yield*bn(new vF(void 0,`stale`))})}function qB(e,t,n){return ti(r=>r(e.take(1)).pipe(j(()=>Qt(t).pipe(ri(e.release(1)))),j(n)))}function JB(e,t){return Pr(e.candidate.close().pipe(d({onFailure:t=>xs(e.settled,t).pipe(we(bn(t))),onSuccess:()=>Ss(e.settled,void 0).pipe(we(Qt(()=>{t.delete(e)})))})))}function YB(e,t){return e.runCleanup?JB(e.installed,t):ys(e.installed.settled)}function XB(e,t){return qr(e.map(e=>YB(e,t).pipe(sr)),{concurrency:`unbounded`}).pipe(j(e=>{let t=e.find(ps);return t===void 0?ar:Br(t.cause)}))}function ZB(e){return En(function*(){let t=yield*Wb(1),n=yield*fi({try:()=>Ez(e.execution),catch:e=>e instanceof gF?e:new gF(`Execution policy is invalid`)}),r=yield*Dz(n.capacity),i=Object.freeze({execute:e.sandbox.execute,adapter:e.sandbox.adapter,buildSha:e.sandbox.buildSha,onFailure:e.onSandboxFailure,execution:n}),a=e.modules.length===0&&e.sources.length>0?void 0:yield*fi({try:()=>gz(e.modules),catch:e=>e instanceof gF?e:new gF(`Capability compilation failed`)}),o=yield*fi({try:()=>Object.freeze(e.tools.map(t=>IR(t,e.access,{sessionId:e.session?.sessionId??null}))),catch:e=>e instanceof gF?e:new gF(`Direct tool labels are invalid`)}),s,c=new Set,l=!1;if(e.sources.length===0&&a!==void 0){let t={candidate:yield*KB({...e,sandbox:i,backingWork:r,precompiled:a}),settled:yield*vs(),leases:0,retired:!1,closing:!1};s=t,c.add(t)}let u=()=>qB(t,()=>(l=!0,[...c].map(e=>{e.retired=!0;let t=e.leases===0&&!e.closing;return t&&(e.closing=!0),{installed:e,runCleanup:t}})),e=>XB(e,c));return yield*Oe(()=>u().pipe(Ce)),Object.freeze({acquire:()=>t.withPermits(1)(En(function*(){if(l)return yield*bn(new _F);if(s===void 0||s.candidate.isStale()){let t=yield*KB({...e,sandbox:i,backingWork:r}),n=s,a={candidate:t,settled:yield*vs(),leases:0,retired:!1,closing:!1};s=a,c.add(a),n!==void 0&&(n.retired=!0,n.leases===0&&!n.closing&&(n.closing=!0,yield*JB(n,c)))}let n=s;n.leases+=1;let a,u=()=>qB(t,()=>{if(a!==void 0)return a?{installed:n,runCleanup:!1}:void 0;if(--n.leases,a=n.retired&&n.leases===0&&!n.closing,a)return n.closing=!0,{installed:n,runCleanup:!0}},e=>e===void 0?ar:YB(e,c));return yield*Oe(()=>u().pipe(Ce)),Object.freeze({revision:n.candidate.compiled.revision,catalog:n.candidate.compiled.catalog,executeDoor:n.candidate.executeDoor,effectExecuteTool:n.candidate.executeDoor.effectTool,tools:o,release:u})})),close:u})})}function QB(e){return Object.freeze({adapter:e.adapter??`promise`,buildSha:e.buildSha,execute:(t,n)=>Pr(Rn({try:()=>e.execute(t,n),catch:RF}))})}async function $B(e,t){let n=await ye(e,t);if(fs(n))return n.value;let r=ns(n.cause);if(ct(r))throw r.value;if(Qo(n.cause))throw t?.signal?.reason instanceof Error?t.signal.reason:new DOMException(`The operation was aborted`,`AbortError`);let i=es(n.cause);throw i instanceof Error?i:Error(`Effect failed without an Error cause`)}async function eV(e){let t=await $B(Ts()),n=e.onSandboxFailure;try{let r=await $B(ZB({modules:e.modules??[],sources:e.sources??[],session:e.session,execution:e.execution,sandbox:QB(e.sandbox),onSandboxFailure:n===void 0?void 0:e=>Le(()=>n(e)),tools:e.tools??[],access:e.access??{}}).pipe(Ds(t))),i=async e=>{let t=await $B(Ts());try{let n=await $B(r.acquire().pipe(Ds(t)),e?.signal===void 0?void 0:{signal:e.signal}),i;return Object.freeze({revision:n.revision,catalog:n.catalog,executeTool:n.effectExecuteTool,tools:n.tools,release:()=>(i??=$B(n.release().pipe(ri(As(t,ds)))),i)})}catch(e){throw await $B(As(t,ds)),e}},a;return Object.freeze({acquire:i,close:()=>(a??=$B(r.close().pipe(ri(As(t,ds)))),a)})}catch(e){throw await $B(As(t,ds)),e}}var tV=og(()=>ig([Yh,Zh,Cg,R,ng(V(tV)),Wh($h(R,tV))])),nV=R.check(Fg(1),K(256)),rV=R.check(Fg(1),K(128)),iV=B({kind:L(`sandbox_failure`),ref:nV,executionId:nV,adapter:rV,buildSha:U(rV),tag:H([`SourceInvalid`,`GuestThrew`,`DeadlineExceeded`,`SandboxBusy`,`Cancelled`,`DispatchLost`,`SandboxCrashed`,`BadResponse`,`ResultTooLarge`,`ResultNotJson`,`CapabilityFailed`,`Unknown`]),fields:$h(R,tV),healthAlert:Zh});function aV(e){return KR(e)}function oV(e){return qR(e)}Object.freeze({module:oV,operation:aV,make:eV,gate:ez,grantAs:$R});var sV=r_,cV=4096,lV=new TextEncoder,uV=sV.check(vg(e=>lV.encode(JSON.stringify(e)).byteLength<=cV));P(uV),new TextEncoder;var dV=200,fV={onExcessProperty:`error`},pV=new TextEncoder,mV=G.pipe(W(jg(0))),hV=R.pipe(W(Fg(1)),W(vg(e=>pV.encode(e).byteLength<=256)));P(B({limit:F(G.pipe(W(Ng({minimum:1,maximum:dV})))),after:F(R)}),fV);var gV=Vg(tg([mV,hV]));P(gV),Vh(gV),P(B({session_id:hV,last_activity_at:mV,state:H([`needs_you`,`running`,`errored`,`done`]),bytes:G.pipe(W(jg(0)))}),fV),Rh(B({extension_id:R,value_json:R})),Rh(Vg(VM)),Rh(HM),Vh(Vg(VM));var _V=R.check(Fg(1),K(256)),vV=262144,yV=R.check(vg(e=>new TextEncoder().encode(e).byteLength<=vV,{message:`Mail content must be at most ${String(vV)} UTF-8 bytes`})),bV=B({kind:L(`agent`),agentId:_V,sessionId:_V}),xV=B({kind:L(`agent`),agentId:_V,sessionId:F(_V)}),SV=B({kind:L(`system`),systemId:L(`hub`)}),CV=B({itemId:_V,kind:R.check(Fg(1),K(64)),summary:R.check(Fg(1),K(200))}),wV=B({commandId:_V,outcome:H([`completed`,`failed`,`interrupted`,`cancelled`,`outcome_unknown`]),diagnostic:F(R.check(Fg(1),K(200))),waitingOnYou:F(V(CV).check(Fg(1),K(8)))}),TV=H([`recipient_offline`,`recipient_left`]),EV=B({outcome:L(`undeliverable`),reason:TV}),DV=B({outcome:L(`accepted`),commandId:_V});ig([wV,EV,DV]);var OV=ig([wV,DV,B({outcome:L(`undeliverable`),reason:L(`recipient_left`)})]),kV=`[redacted]`,AV=/\b(bearer|basic)\s+[^\s"',;]+/giu,jV=/\b((?:api[_-]?key|access[_-]?token|refresh[_-]?token|token|secret|password|authorization)["']?\s*[:=]\s*["']?)(?!(?:bearer|basic)\s)[^\s"',;&]+/giu,MV=/[A-Za-z0-9][\w-]{23,}/gu;function NV(e){return e.replace(AV,`$1 ${kV}`).replace(jV,`$1${kV}`).replace(MV,e=>/\d/u.test(e)&&/[A-Za-z]/u.test(e)?kV:e)}function PV(e){let t=NV(e.replace(/[\p{Cc}\p{Zl}\p{Zp}\s]+/gu,` `).trim()).slice(0,200).trimEnd();return t.length===0?void 0:t}var FV={key:_V,to:xV,replyTo:V(bV),content:yV,createdAt:z.check(jg(0)),meta:F(r_)},IV=ig([B({...FV,from:bV,reply:F(OV)}),B({...FV,from:SV,reply:B({outcome:L(`undeliverable`),reason:L(`recipient_offline`)})})]),LV=B({jobId:_V,sessionId:_V,commandFactId:_V,recovery:I(B({maxRecoveries:G.check(jg(0)),windowMs:F(G.check(Ag(0)))}))});B({work:B({sessionId:_V,commandFactId:_V}),mail:I(IV)}),B({work:LV,delivery:H([`steer`,`followUp`]),mail:I(IV)}),Rh(B({mail_key:R,agent_id:R,reply_to_json:Vg(V(bV))})),Vh(Vg(V(bV))),Rh(B({agent_id:R,sender_session_id:R,name:R})),Rh(zM),Rh(B({work_id:R}));var RV=new TextEncoder;new TextDecoder;var zV=B({v:L(1),generation:R.pipe(W(Fg(1)),W(K(128)),W(vg(e=>RV.encode(e).byteLength<=128))),sequence:G.pipe(W(Ag(0)),W(Mg(2**53-1)))}),BV={onExcessProperty:`error`};P(zV,BV),P(Vg(zV),BV);var VV=R.check(Fg(1),K(256)),HV=ig([B({agentId:VV,sessionId:VV,...wV.fields}),B({agentId:VV,sessionId:F(VV),...EV.fields})]),UV={onExcessProperty:`error`},WV=new TextEncoder,GV=e=>R.pipe(W(Fg(1)),W(vg(t=>WV.encode(t).byteLength<=e))),KV=GV(256),qV=GV(4096),JV=R.pipe(W(xg(/^[0-9a-f]{64}$/u))),YV=og(()=>ig([R,z,Zh,Yh,V(YV),$h(R,YV)])),XV=B({type:L(`text`),text:R,textSignature:F(R)}),ZV=B({type:L(`thinking`),thinking:R,thinkingSignature:F(R),redacted:F(Zh)}),QV=B({type:L(`image`),data:R,mimeType:R}),$V=B({type:L(`toolCall`),id:R,name:R,arguments:$h(R,YV),thoughtSignature:F(R),namespace:F(R),argumentsError:F(R)}),eH=B({input:z,output:z,cacheRead:z,cacheWrite:z,cacheWrite1h:F(z),reasoning:F(z),totalTokens:z,cost:B({input:z,output:z,cacheRead:z,cacheWrite:z,total:z,totalFromProvider:F(Zh)})}),tH=B({role:L(`user`),content:ig([R,ng(V(ig([XV,QV])))]),timestamp:z}),nH=B({role:L(`user`),content:R,timestamp:z}),rH=B({name:R,description:R,parameters:$h(R,YV),constrainedSampling:F(ig([L(!1),B({type:L(`json_schema`),strict:H([`prefer`,`require`])}),B({type:L(`grammar`),variants:B({openai_lark:F(R),openai_regex:F(R)})})]))}),iH=ig([B({role:L(`system`),content:ig([R,ng(V(XV))]),sections:F($h(R,ig([R,Yh]))),toolsAdded:F(ng(V(rH))),toolsRemoved:F(ng(V(B({name:R})))),timestamp:z}),tH,B({role:L(`assistant`),content:ng(V(ig([XV,ZV,$V]))),api:R,provider:R,model:R,responseModel:F(R),responseId:F(R),diagnostics:F(ng(V(B({type:R,timestamp:z,error:F(B({name:F(R),message:R,stack:F(R),code:F(ig([R,z]))})),details:F($h(R,YV))})))),usage:eH,stopReason:H([`pending`,`stop`,`length`,`toolUse`,`error`,`aborted`,`deferred`]),deferred:F(B({provider:R,modelId:R,api:R,id:R,expiresAt:F(z),pollAfterMs:F(z),data:F(YV)})),errorMessage:F(R),providerError:F(R),modelFailure:F(Kz),rawStopReason:F(R),providerThinkingLevel:F(R),endTurn:F(Zh),timestamp:z,durationMs:F(z)}),B({role:L(`toolResult`),toolCallId:R,toolName:R,content:ng(V(ig([XV,QV]))),usage:F(eH),isError:Zh,timestamp:z,durationMs:F(z)})]),aH=H([`run`,`turn`,`message`,`tool_call`,`tool_result`,`terminal`]),oH=og(()=>B({kind:aH,value:KV,parent:I(oH)})),sH=ig([B({type:L(`auto_retry_start`),run:oH,attempt:z,maxAttempts:z,delayMs:z,dueAt:G.check(jg(0)),errorMessage:R}),B({type:L(`auto_retry_attempt`),run:oH,attempt:z}),B({type:L(`auto_retry_end`),run:oH,attempt:z,success:Zh,finalError:F(R)})]),cH=B({core:JV,extensions:V(tg([KV,R.pipe(W(xg(/^sha256:[0-9a-f]{64}$/u)))])).pipe(W(K(128)))}),lH=B({content:ng(V(ig([XV,QV]))),usage:I(eH),isError:Zh,terminate:I(Zh)}),uH={workId:KV},dH=98304,fH=H([`manual`,`threshold`,`overflow`]),pH=ig([B({...uH,kind:L(`sandbox_failure`),event:iV}),B({kind:L(`document`),workId:Yh,extensionId:KV,name:KV,valueJson:R}),B({kind:L(`model_preference`),workId:Yh,preference:U(ZM)}),B({...uH,kind:L(`command`),meta:F(uV),reply:F(HV),delivery:F(H([`steer`,`followUp`])),requestId:KV,targetWorkId:F(KV),receiptId:KV,message:tH,contract:cH}),B({...uH,kind:L(`command`),work:L(`compact`),instructions:F(_N),meta:F(uV),requestId:KV,receiptId:KV,timestamp:G.check(jg(0)),contract:cH}),B({kind:L(`operator`),workId:Yh,requestId:KV,author:H([`operator`,`party`]),meta:F(uV),message:nH}),B({...uH,kind:L(`cancellation`),requestId:KV,receiptId:KV,targetWorkId:KV,meta:F(uV)}),B({...uH,kind:L(`model_selection`),provider:KV,model:KV,catalogRevision:KV,definitionRevision:KV,selectionPolicyRevision:KV}),B({...uH,kind:L(`run_started`),run:oH,contract:cH}),B({...uH,kind:L(`turn_started`),run:oH,turn:oH}),B({...uH,kind:L(`model_prompt`),run:oH,turn:oH,attempt:z.pipe(W(Pg()),W(Ag(0))),contract:cH,systemPrompt:R.pipe(W(vg(e=>WV.encode(e).byteLength<=1048576)))}),B({...uH,kind:L(`message_start`),run:oH,turn:oH,message:oH,role:H([`assistant`,`system`,`toolResult`,`user`]),partial:F(B({text:R.pipe(W(vg(e=>WV.encode(e).byteLength<=dH))),offset:z.pipe(W(Pg()),W(jg(0)))}))}),B({...uH,kind:L(`message`),data:F(YV),run:oH,turn:oH,message:oH,value:iH}),B({...uH,kind:L(`tool_intent`),replay:H([`safe`,`unsafe`]).pipe(hg(O(`unsafe`))),contract:cH,run:oH,turn:oH,toolCall:oH,call:$V}),B({...uH,kind:L(`tool_outcome`),data:F(YV),run:oH,turn:oH,toolCall:oH,call:$V,result:lH}),B({...uH,kind:L(`live_retry`),event:sH}),B({...uH,kind:L(`compaction`),head:KV,model:tg([tH]),data:B({reason:F(fH),resumesRun:Zh,tokensBefore:z,tokensAfter:F(z),usage:eH,contextRevision:KV,receipt:F(qV),details:F(B({readFiles:V(R),modifiedFiles:V(R)}))})}),B({...uH,kind:L(`compaction_checkpoint`),trigger:fH,resumesRun:Zh,head:KV,contextRevision:KV,summary:R,tokensBefore:z,usage:eH,details:B({readFiles:V(R),modifiedFiles:V(R)})}),B({...uH,kind:L(`compaction_notice`),trigger:fH,result:L(`nothing_to_compact`),diagnostic:F(R.check(K(200)))}),B({...uH,kind:L(`compaction_notice`),trigger:fH,result:L(`failed`),usage:F(eH),diagnostic:F(R.check(K(200)))}),B({...uH,kind:L(`compaction_notice`),trigger:fH,result:L(`stale`),usage:F(eH)}),B({...uH,kind:L(`compaction_notice`),trigger:fH,result:L(`insufficient`),usage:F(eH)}),B({...uH,kind:L(`run_terminal`),run:oH,terminal:oH,diagnostic:F(R.check(K(200))),outcome:H([`completed`,`cancelled`,`failed`])}),B({...uH,kind:L(`work_terminal`),diagnostic:F(R),outcome:H([`completed`,`interrupted`,`cancelled`,`failed`])})]);e_(pH);var mH=Vg(pH),hH=Vg(Jh);P(mH,UV),Vh(hH),Rh(mH,UV);var gH=Vg(YV);Vh(gH),Rh(gH),Jv({family:`session`,version:1,kinds:{session:{prefix:`session`},work:{prefix:`session_work`},fact:{prefix:`session_fact`},receipt:{prefix:`session_receipt`}}});var _H=R.pipe(W(Fg(1))),vH=G.pipe(W(jg(0)));B({value_json:R}),B({state_version:G.pipe(W(jg(1))),revision:_H}),B({status:H([`running`,`stopped`]),reason:U(R),stopped_at:U(vH),revision:_H}),B({extension_id:_H,key:_H,job_id:_H}),B({collection:_H,key:_H,value_json:R}),B({sequence:vH}),B({extension_id:R,name:R,initial_json:R,fork:H([`inherit-at-fork-point`,`current`,`fresh`]),max_bytes:G.pipe(W(Ag(0)))}),Fh(R);var yH=$h(R.check(Fg(1),K(160)),H([`none`,`read`,`write`])).check(vg(e=>Object.keys(e).length<=256));P(B({version:G.check(jg(0),Mg(2**53-1)),grants:yH}),{onExcessProperty:`error`}),P(Vg(yH)),Vh(Vg(yH)),P(B({version:G,grants_json:R}));var bH={onExcessProperty:`error`},xH=new TextEncoder,SH=R.pipe(W(Fg(1)),W(vg(e=>xH.encode(e).byteLength<=256))),CH=G.pipe(W(jg(0))),wH=H([0,1,2]),TH=H([`needs_you`,`running`,`errored`,`done`]),EH=H([`completed`,`failed`,`cancelled`,`outcome_unknown`,`interrupted`]),DH=B({session_id:SH,title:U(R),created_at:CH,last_activity_at:CH,settled_at:U(CH),state:TH,tier:wH});P(DH,bH),P(DH.mapFields(bh({revision:CH})),bH),P(B({revision:CH}),bH),P(B({outcome:U(EH)}),bH);var OH=Vg(tg([wH,CH,SH]));P(OH),Vh(OH);var kH={onExcessProperty:`error`},AH=B({id:R,timestamp:z,data_json:R}),jH=Vg(B({kind:L(`compaction`),workId:R,resumesRun:F(Zh),trigger:F(H([`manual`,`threshold`,`overflow`])),tokensAfter:F(z),firstKeptEntryId:R,summary:R,tokensBefore:z,usage:eH,contextRevision:R,details:F(B({readFiles:V(R),modifiedFiles:V(R)}))}));P(AH,kH),P(jH,kH),P(B({data_json:R}),kH);var MH=R.pipe(W(Fg(1))),NH=G.pipe(W(jg(0)));B({name:R}),B({sql:R}),B({extension_id:MH,key:MH,due_at:NH}),B({extension_id:MH}),B({seq:NH}),B({count:NH}),B({data_json:R}),B({version:G});var PH={onExcessProperty:`error`},FH=new TextEncoder,IH=R.pipe(W(Fg(1)),W(vg(e=>FH.encode(e).byteLength<=256))),LH=G.pipe(W(Ag(0))),RH=G.pipe(W(jg(0))),zH=B({id:IH,leaf_id:U(IH)}),BH=B({session_id:IH}),VH=B({id:IH,leaf_id:U(IH),created_at:RH,updated_at:RH,metadata_json:U(R)}),HH=Vg(B({title:bN}));P(HH,PH),Vh(HH);var UH=B({id:IH}),WH=B({version:G,protocol:R}),GH=B({name:IH}),KH=B({id:IH,session_id:IH,parent_id:U(IH),sequence:LH,type:R,role:U(H([`user`,`assistant`,`tool_result`])),state:H([`complete`,`streaming`]),request_id:U(IH),work_id:U(IH),data_json:R,timestamp:RH,completed_at:U(RH),damaged:H([0,1])}),qH=B({id:IH,session_id:IH,sequence:LH,request_id:IH,work_id:IH,data_json:R,timestamp:RH,origin_kind:H([`user`,`extension`]),origin_id:U(IH),origin_correlation:U(IH)}),JH=B({kind:L(`extension`),extensionId:IH,correlation:U(IH)}),YH=ig([B({kind:L(`user`)}),JH]);P(YH,PH),e_(YH);var XH=B({next_sequence:LH}),ZH=B({present:L(1)});P(BH,PH),P(VH,PH),P(UH,PH),P(WH,PH),P(GH,PH),P(B({candidate_id:U(IH),path_count:G.pipe(W(Ag(0))),root_count:G.pipe(W(jg(0))),missing_parent_count:G.pipe(W(jg(0))),leaf_state:H([`complete`,`streaming`])}),PH),P(KH,PH),P(qH,PH),P(XH,PH),P(ZH,PH);function QH(e){return`${[`id`,`session_id`,`parent_id`,`sequence`,`type`,`role`,`state`,`request_id`,`work_id`,`data_json`,`timestamp`,`completed_at`].map(t=>`${e}.${t}`).join(`, `)},
31
31
  EXISTS (SELECT 1 FROM session_lineage_damage AS damage
32
- WHERE damage.session_id = ${e}.session_id) AS damaged`}XH(`session_entries`),P(B({id:PH,sequence:FH}),MH),P(B({...LH.fields,damaged:H([0,1])}),MH),Rh(B({identity:U(R)})),Rh(B({total:G.check(jg(0))})),P(B({installed:G.pipe(W(jg(0)))}),MH),P(B({session_id:R}),MH),P(B({damaged:G.pipe(W(Ag(0))),first:R}),MH),P(B({id:PH,parent_id:U(R),sequence:FH,state:H([`complete`,`streaming`])}),MH);var ZH=G.pipe(W(jg(0)));P(B({length:ZH,root_id:U(PH),root_parent_id:U(R),broken:ZH,newest_id:U(PH),newest_sequence:U(FH)}),MH),P(B({sequence:FH}),MH),P(B({work_id:PH}),MH),P(B({work_id:PH,diagnostic:R}),MH),P(B({state:H([`complete`,`streaming`]),newest_sequence:FH,root_id:U(PH),root_parent_id:U(R)}),MH),P(B({sizes:Vg(V(tg([FH,ZH]))),deepest_parent:U(R),deepest_sequence:U(FH)}),MH),P(B({oldest:U(FH),newest:U(FH)}),MH);var QH=H([0,1]);P(B({id:PH,parent_id:U(R),sequence:FH,target:QH,continues:QH}),MH);function $H(e){return`CASE WHEN ${e}.type = 'compaction' AND ${e}.state != 'streaming'
33
- THEN json_extract(${e}.data_json, '$.head') END`}`${$H(`session_entries`)}${$H(`parent`)}`,P(B({session_id:R,work_id:R,timestamp:z,diagnostic:U(R)}),MH),new TextEncoder,Object.freeze({kind:`reset`}),new TextEncoder,P(B({droppedBytes:G.check(jg(0)),totalBytes:G.check(jg(0))}),{onExcessProperty:`error`}),Object.freeze({admitNew:()=>{}});var eU=KH.mapFields(({extensionId:e,correlation:t})=>({extensionId:e,correlation:t})),tU=B({requestId:F(R),meta:F(cV),data:F(aV),origin:F(eU),id:R,sequence:G.check(Ag(0)),commandId:U(R),value:nH}),nU=H([`manual`,`threshold`,`overflow`]),rU=B({queue:ig([B({state:L(`idle`)}),B({state:L(`queued`),commandId:zg,runningWork:U(B({phase:H([`thinking`,`streaming`,`running_tool`,`waiting_on_you`,`cancelling`])}))}),B({state:L(`running`),commandId:zg})]),cancellationRequested:Zh,retry:U(B({attempt:G.check(Ag(0)),maxAttempts:G.check(Ag(0)),delayMs:G.check(jg(0)),errorMessage:R,scheduledAt:G.check(jg(0))})),activeTool:U(R),lastModelChoiceSequence:U(G.check(Ag(0))),compaction:U(B({trigger:nU}))}),iU=R,aU=$h(R,ig([B({status:L(`running`),revision:iU,value:aV,catalog:F(aV)}),B({status:L(`stopped`),revision:iU,reason:R})])),oU=B({id:R,version:R,revision:iU,status:H([`running`,`stopped`]),reason:U(R),stoppedAt:U(z)}),sU=B({commandId:R,outcome:H([`completed`,`cancelled`,`failed`,`interrupted`]),sequence:G.check(Ag(0)),diagnostic:U(R),meta:F(cV)}),cU=B({id:R,sequence:G.check(Ag(0)),at:G.check(jg(0)),tokensBefore:z,tokensAfter:U(z),trigger:U(nU)}),lU=B({id:R,sequence:G.check(Ag(0)),at:G.check(jg(0)),trigger:nU,result:H([`nothing_to_compact`,`failed`,`stale`,`insufficient`]),diagnostic:U(R)}),uU=R.check(vg(e=>new TextEncoder().encode(e).byteLength<=65536)),dU=B({messageId:R,revision:G.check(jg(0)),text:uU,thinking:uU,textOffset:G.check(jg(0)),thinkingOffset:G.check(jg(0)),textTruncated:Zh,thinkingTruncated:Zh}),fU=B({commandId:R,requestId:R,meta:F(cV),origin:F(eU),text:R,images:F(V(rN)),delivery:H([`steer`,`followUp`])}),pU=V(B({toolCallId:R,revision:G.check(jg(0)),tail:R.check(vg(e=>new TextEncoder().encode(e).byteLength<=8192&&e.split(`
34
- `).length<=200)),droppedBytes:G.check(jg(0)),totalBytes:G.check(jg(0))})).check(K(4)),mU=B({total:G.check(jg(0)),prompts:V(fU),hasMore:Zh}),hU=B({tokens:G.check(jg(0)),window:U(G.check(Ag(0)))}),gU=B({parent:F(LM),sessionId:R,cursor:U(R),hasMore:Zh,oldestCursor:F(U(R)),messages:V(tU),terminals:V(sU),sandboxFailures:F(V(nV)),compactions:F(V(cU)),compactionNotices:F(V(lU)),pending:mU,activity:rU,progress:U(dU),toolOutput:pU,extensions:aU,attention:VM,context:F(hU)}),_U=ig([B({kind:L(`heartbeat`)}),B({kind:L(`activity`),activity:rU}),B({kind:L(`tool_output`),toolOutput:pU,activity:rU}),B({kind:L(`update`),delivery:H([`replay`,`live`]),cursor:U(R),messages:V(tU),terminals:V(sU),sandboxFailures:F(V(nV)),compactions:F(V(cU)),compactionNotices:F(V(lU)),pending:mU,activity:rU,extensions:aU,attention:VM,context:F(hU)}),B({kind:L(`progress`),progress:B({messageId:R,revision:G.check(jg(0)),text:B({offset:G.check(jg(0)),append:uU}),thinking:B({offset:G.check(jg(0)),append:uU})}),activity:rU}),B({kind:L(`reset`),reason:L(`history_unavailable`),cursor:U(R),baseline:gU})]),vU=B({status:L(`accepted`),commandId:R,sessionId:F(R)});Rh(Vg(ig([vU,B({status:L(`held`),reason:L(`recipient_offline`),message:L(`waiting: recipient offline`)})])),{onExcessProperty:`error`});var yU=B({status:L(`unknown`)}),bU=Rh(Vg(ig([vU,yU])));function xU(e){return bU(e)}var SU=ig([vU,yU,B({status:L(`too_late`),commandId:R})]),CU=B({sessionId:R}),wU=Rh(Vg(gU),{onExcessProperty:`error`}),TU=Rh(Vg(_U),{onExcessProperty:`error`}),EU=Rh(Vg(vU)),DU=Rh(Vg(SU)),OU=Rh(Vg(CU)),kU=Rh(Vg(GM)),AU=Rh(Vg(oU)),jU=Rh(Vg(V(oU))),MU=Rh(Vg(aV));function NU(e){return AU(e)}function PU(e){return jU(e)}function FU(e){return MU(e)}function IU(e){return EU(e)}function LU(e){return DU(e)}function RU(e){return Rh(Vg(U(fU)))(e)}function zU(e){return OU(e)}var BU=B({acceptedSender:U(R),delegator:U(R),terminal:sU,content:R,usage:V(B({provider:R,model:R,usage:QV})),toolCalls:G.check(jg(0)),waitingOnYou:V(B({itemId:R,kind:R,summary:R})).check(K(8))});function VU(e){return Rh(Vg(U(BU)))(e)??void 0}function HU(e){return wU(e)}function UU(e){return TU(e)}function WU(e){let t=kU(e);return new KM(t.boundary,t.cause,t.message,t.requestId)}var GU=Rh(Vg(B({sessions:V(ig([B({sessionId:zg,createdAt:z,lastActivityAt:z,settledAt:F(z),title:R,state:H([`needs_you`,`running`,`errored`,`done`])}),B({sessionId:zg,state:L(`unavailable`)})])),next:I(zg)})));function KU(e){let t=GU(e);return{sessions:t.sessions,next:t.next}}var qU=Rh(Vg(B({sessionId:zg}))),JU=Rh(Vg(B({deleted:Zh})));function YU(e){return JU(e).deleted}function XU(e){return qU(e).sessionId}function ZU(e,t){return ye(e,t).then(e=>{if(fs(e))return e.value;let t=Ue(ns(e.cause))??es(e.cause);return Promise.reject(t instanceof Error?t:Error(String(t)))})}function QU(e){let t=bS(e);return Object.freeze({[Symbol.asyncIterator]:()=>{let e=t[Symbol.asyncIterator]();return{next:()=>e.next(),return:()=>e.return?.()??Promise.resolve({done:!0,value:void 0})}}})}function $U(e,t){function n(e){return ZU(t.command(e))}return Object.freeze({address:e,command:n,withdraw:e=>ZU(t.withdraw(e)),abort:()=>ZU(t.abort),send:(e,n)=>ZU(t.send(e,n)),cancel:e=>ZU(t.cancel(e)),latestPending:()=>ZU(t.latestPending),modelPreference:Object.freeze({read:()=>ZU(t.modelPreference.read),set:e=>ZU(t.modelPreference.set(e))}),extension:e=>{let n=t.extension(e);return Object.freeze({call:(e,t,r)=>ZU(n.call(e,t,r))})},read:e=>ZU(t.read(e)),readSettlement:(e,n)=>ZU(t.readSettlement(e,n?.timeoutMs),n),subscribe:e=>QU(t.subscribe(e)),watch:e=>ZU(t.watch(e)).then(e=>Object.freeze({snapshot:e.snapshot,changes:QU(e.changes),close:()=>ZU(e.close)}))})}function eW(e,t){let n=t??`local:${jv()}`;return Object.freeze({createSession:t=>ZU(e.createSession(t)),deleteSession:t=>ZU(e.deleteSession(t)),listSessions:t=>ZU(e.listSessions(t)),extensions:Object.freeze({list:()=>ZU(e.extensions.list),resume:t=>ZU(e.extensions.resume(t)),call:(t,n,r)=>ZU(e.extensions.call(t,n,r))}),session:t=>$U(`${n}/sessions/${encodeURIComponent(t)}`,e.session(t)),close:()=>ZU(e.close)})}function tW(e=`Remote Shiitake operation is unavailable`){return new KM(`runtime`,`unavailable`,e)}function nW(e){return new KM(`runtime`,`invalid`,e)}function rW(){return new KM(`runtime`,`closed`,`Shiitake client is closed`)}var iW=2,aW=Rh(R);function oW(e){if(!(e instanceof MessageEvent))throw nW(`Session stream event is invalid`);return aW(e.data)}function sW(e){return e.kind===`source-error`?bn(tW(`Session stream is unavailable`)):e.kind===`snapshot`?fi({try:()=>({kind:`snapshot`,value:HU(oW(e.event))}),catch:()=>nW(`Session snapshot is invalid`)}):e.kind===`frame`?fi({try:()=>({kind:`frame`,value:UU(oW(e.event))}),catch:()=>nW(`Session frame is invalid`)}):fi({try:()=>WU(oW(e.event)),catch:()=>nW(`Session runtime error is invalid`)}).pipe(j(bn))}function cW(e,t){return Qt(()=>{e.closed||(e.closed=!0,t.delete(e),e.source.close())})}function lW(e,t,n,r){return Xx(t=>fe(fi({try:()=>{let i={source:new(r??EventSource)(e),closed:!1},a=(e,r)=>{ob(t,{kind:e,event:r})||(lb(t,Xo(tW(`Session stream client fell behind`))),Kt(cW(i,n)))};return i.source.addEventListener(`snapshot`,e=>{a(`snapshot`,e)}),i.source.addEventListener(`frame`,e=>{a(`frame`,e)}),i.source.addEventListener(`runtime-error`,e=>{a(`runtime-error`,e)}),i.source.addEventListener(`error`,e=>{i.source.readyState===iW&&a(`source-error`,e)}),n.add(i),i},catch:()=>tW(`Session stream could not open`)}),e=>cW(e,n)),{bufferSize:256,strategy:`dropping`}).pipe(sS(sW),lS({duration:PM,orElse:()=>eS(tW(`Session feed is connected but silent; the service may be busy`))}),vS(t.await))}function uW(e,t){return`${e}/sessions/${encodeURIComponent(t)}`}function dW(e,t,n=!1){let r=new URLSearchParams({mode:`subscribe`});return t!==void 0&&r.set(`after`,t),n&&r.set(`includeSandboxFailures`,`true`),`${e}?${r.toString()}`}function fW(e,t,n,r){return lW(e,t,n,r).pipe(sS(e=>e.kind===`frame`?O(e.value):bn(nW(`Session subscription received a snapshot`))))}function pW(e,t,n,r,i,a){return En(function*(){yield*n;let o=yield*Bb(!1),s=yield*Ts();yield*Qt(()=>t.add(s)),yield*Os(s,Qt(()=>{t.delete(s)}));let c=yield*sr(lW(e,r,i,a).pipe(hS(Vx()),Ds(s)));if(ps(c))return yield*As(s,c),yield*Br(c.cause);let[l,u]=c.value;if(Ye(l)||l.value.kind!==`snapshot`){let e=nW(`Session stream did not begin with a snapshot`);return yield*As(s,ls(e)),yield*bn(e)}let d=u.pipe(sS(e=>e.kind===`frame`?O(e.value):O({kind:`reset`,reason:`history_unavailable`,cursor:e.value.cursor,baseline:e.value})),vS(o.await),gS(e=>o.isOpen()&&Qo(e)?Zx:tS(e)));return Object.freeze({snapshot:l.value.value,changes:d,close:o.open.pipe(we(As(s,ds)))})})}function mW(e,t,n){return Rn({try:async t=>{let n=await e(t);return{response:n,body:await n.text()}},catch:()=>tW(`${n} request failed`)}).pipe(j(({response:e,body:r})=>e.ok?fi({try:()=>t(r),catch:()=>nW(`${n} response is invalid`)}):fi({try:()=>WU(r),catch:()=>nW(`${n} error response is invalid`)}).pipe(j(bn))))}function hW(e){let t=e.baseUrl.replace(/\/+$/u,``),n=e.fetch??globalThis.fetch,r=new Set,i=new Set,a=zb(!1),o=!1,s=rn(()=>o?bn(rW()):ar),c=(e,t,n)=>Hi(mW(e,t,n),a.await.pipe(we(bn(rW())))),l=(e,t)=>s.pipe(we(c(r=>n(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:r}),FU,`Extension command`)));return Object.freeze({createSession:e=>s.pipe(j(()=>{let r=MN({requestId:e});return c(e=>n(`${t}/sessions`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({requestId:r}),signal:e}),XU,`Session creation`)})),deleteSession:e=>s.pipe(j(()=>{let r=AN(e);return c(e=>n(`${t}/sessions/${encodeURIComponent(r)}`,{method:`DELETE`,signal:e}),YU,`Session deletion`)})),listSessions:e=>s.pipe(j(()=>{let r=new URLSearchParams;e!==void 0&&r.set(`after`,jN(e));let i=r.size===0?``:`?${r.toString()}`;return c(e=>n(`${t}/sessions${i}`,{signal:e}),KU,`Session discovery`)})),extensions:Object.freeze({list:s.pipe(we(c(e=>n(`${t}/extensions`,{signal:e}),PU,`Extension list`))),resume:e=>s.pipe(we(c(r=>n(`${t}/extensions/${encodeURIComponent(e)}/resume`,{method:`POST`,signal:r}),NU,`Extension resume`))),call:(e,n,r)=>l(`${t}/extensions/${encodeURIComponent(e)}/commands/${encodeURIComponent(n)}`,r)}),session:o=>{let u=AN(o),d=uW(t,u),f=`${d}/events`;function p(e){return s.pipe(we(c(t=>n(`${d}/command`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({command:e}),signal:t}),e.type===`prompt`||e.type===`compact`?IU:e.type===`cancel`?LU:e.type===`fork`?zU:()=>void 0,`Command`)))}return Object.freeze({command:p,withdraw:e=>s.pipe(we(c(t=>n(`${d}/withdraw`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({requestId:e}),signal:t}),xU,`Request withdrawal`))),abort:p({type:`abort`}),send:(e,t)=>Qt(()=>t?.requestId??jv()).pipe(j(n=>{let r={type:`prompt`,delivery:t?.delivery??`steer`,requestId:n,text:e};return p(t?.images===void 0?r:{...r,images:t.images}).pipe(jt(e=>e.requestId===n?e:new KM(e.boundary,e.cause,e.message,n)))})),cancel:e=>p({type:`cancel`,...e}),latestPending:s.pipe(we(c(e=>n(`${d}/pending/latest`,{signal:e}),RU,`Newest pending prompt`))),modelPreference:Object.freeze({read:s.pipe(we(c(e=>n(`${d}/model-preference`,{signal:e}),ZM,`Model preference read`))),set:e=>s.pipe(we(c(t=>n(`${d}/model-preference`,{signal:t,method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),()=>void 0,`Model preference set`)))}),extension:e=>Object.freeze({call:(t,n)=>l(`${d}/extensions/${encodeURIComponent(e)}/commands/${encodeURIComponent(t)}`,n)}),read:e=>s.pipe(we(fi({try:()=>NN(e),catch:e=>e instanceof KM?e:nW(`Read options are invalid`)})),j(({limit:e,before:t,includeSandboxFailures:r})=>{let i=new URLSearchParams({limit:String(e)});return t!==void 0&&i.set(`before`,t),r===!0&&i.set(`includeSandboxFailures`,`true`),c(e=>n(`${d}?${i.toString()}`,{signal:e}),HU,`Session read`)})),readSettlement:(e,t=0)=>s.pipe(we(c(r=>n(`${d}/settlement?${new URLSearchParams({commandId:e,timeoutMs:String(t)}).toString()}`,{signal:r}),VU,`Command settlement`))),subscribe:t=>oS(s.pipe(we(fi({try:()=>PN(t),catch:e=>e instanceof KM?e:nW(`Subscribe options are invalid`)})),S(({after:t,includeSandboxFailures:n})=>fW(dW(f,t,n===!0),a,i,e.eventSource)))),watch:t=>pW(t?.includeSandboxFailures===!0?`${f}?includeSandboxFailures=true`:f,r,s,a,i,e.eventSource)})},close:rn(()=>o?ar:(o=!0,a.open.pipe(we(Kr([...r],e=>As(e,ds),{discard:!0})),we(Kr([...i],e=>cW(e,i),{discard:!0})))))})}function gW(e){return eW(hW(e),e.baseUrl.replace(/\/+$/u,``))}P(aV);function _W(e,t){if(t===void 0)return{status:`unavailable`};if(t.status===`stopped`)return{status:`stopped`,reason:t.reason};if(t.value===null||e.projection===null)return{status:`running`,value:null};let n=P(e.projection.schema)(t.value);return n._tag===`Success`?{status:`running`,value:n.success}:{status:`stopped`,reason:`Extension projection does not match this client`}}function vW(e,t){let n=e?.messageId===t.messageId?e:null;if(n!==null&&n.revision>=t.revision)return e;let r=n===null?0:n.textOffset+n.text.length,i=n===null?0:n.thinkingOffset+n.thinking.length;return t.text.offset>r||t.thinking.offset>i?e:{messageId:t.messageId,revision:t.revision,text:(n?.text??``)+t.text.append.slice(Math.max(0,r-t.text.offset)),thinking:(n?.thinking??``)+t.thinking.append.slice(Math.max(0,i-t.thinking.offset)),textOffset:n?.textOffset??0,thinkingOffset:n?.thinkingOffset??0,textTruncated:n?.textTruncated??!1,thinkingTruncated:n?.thinkingTruncated??!1}}var yW=R.pipe(W(Fg(1)),W(K(128)),W(xg(/^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$/u))),bW=R.pipe(W(Fg(1)),W(K(64)),W(xg(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u))),xW=yW.pipe(cg(`ExtensionId`));R.pipe(W(xg(/^sha256:[0-9a-f]{64}$/u)),cg(`ExtensionRevision`)),R.pipe(W(xg(/^sha256:[0-9a-f]{64}$/u)),cg(`ExtensionFingerprint`));var SW=class extends Go(`ExtensionHookError`){};function CW(e){return rn(()=>{let t=e();return Pi(t)?t:Rn({try:()=>Promise.resolve(t),catch:e=>new SW({cause:e})})})}var wW=G.check(jg(0)),TW=G.check(Ag(0)),EW=B({id:SS,label:xS,input:I($h(R,r_)),awaiting:F(L(`question`))}),DW=B({...wS.fields,actions:I(V(EW).check(K(8)))}),OW=wS.check(vg(e=>e.open===void 0,{message:`Client chips are display only`})),kW=B({...DW.fields,inspection:F(B({commandId:SS,title:xS,rows:V(OW).check(K(200))}))}),AW=B({id:SS,order:z.check(wg()),row:OW,compact:I(xS)}),jW=B({id:SS,sequence:TW,at:wW,commandId:U(R),afterSequence:F(wW),rows:V(DW).check(K(200))}).check(vg(e=>e.id===String(e.sequence),{message:`Client event identity must equal its sequence`}),vg(e=>e.afterSequence===void 0||e.commandId===null,{message:`A client event cannot have both command and position anchors`})),MW=e=>new Set(e).size===e.length,NW=B({chips:V(AW).check(K(4)),panel:V(kW).check(K(16)),timeline:B({cells:V(jW).check(K(32)),omitted:wW}),waiting:U(B({summary:xS,cancel:EW}))}).check(vg(e=>e.chips.length+e.panel.reduce((e,t)=>e+1+(t.inspection?.rows.length??0),0)+e.timeline.cells.reduce((e,t)=>e+t.rows.length,0)<=200,{message:`Client contribution exceeds 200 rows`}),vg(e=>MW(e.chips.map(e=>e.id))&&MW(e.panel.map(e=>e.id))&&e.panel.every(e=>MW((e.inspection?.rows??[]).map(e=>e.id)))&&MW(e.timeline.cells.map(e=>e.id))&&e.timeline.cells.every(e=>MW(e.rows.map(e=>e.id))),{message:`Client contribution contains duplicate identities`})),PW=Rh(B({protocol:L(`shiitake.client/v1`),id:xW,promptPresentation:F(L(`footer`)),attach:F(Eh(e=>Rt(e))),contribute:F(Eh(e=>Rt(e)))}).check(vg(e=>e.attach!==void 0||e.contribute!==void 0,{message:`Client entry requires attach or contribute`})),{onExcessProperty:`error`});function FW(e,t){if(t.contribute!==void 0&&e.projection===null)throw Error(`Client contribution requires a projection`);let n={protocol:`shiitake.client/v1`,id:e.id};t.promptPresentation!==void 0&&Object.assign(n,{promptPresentation:t.promptPresentation});let r=t.attach,i=t.contribute;return r!==void 0&&Object.assign(n,{attach:e=>CW(()=>r(e))}),i!==void 0&&Object.assign(n,{contribute:t=>i(_W(e,t))}),Object.freeze(PW(n))}var IW=`whistle.catalog/v1`,LW=128,RW=16,zW=E({protocol:gt(IW),commands:Ze(ca).max(LW)}).strict().transform(e=>{let t=new Set;for(let n of e.commands){if(t.has(n.id))throw Error(`Catalog command ${n.id} is repeated`);t.add(n.id)}return Object.freeze({protocol:IW,commands:Object.freeze(e.commands)})}),BW=e=>zW.parse(e),VW=Ke(`type`,[E({type:gt(`done`),notice:ba.optional(),result:qi.optional()}).strict(),E({type:gt(`prompt`),prompt:ya,notice:ba.optional(),next:E({arguments:Ji,answer:k().min(1).max(120)}).strict()}).strict()]).transform(e=>Object.freeze(e)),HW=e=>VW.parse(e);function UW(e){return e.text===void 0?{selected:e.selected}:{selected:e.selected,text:e.text}}function WW(e,t){if(t.arguments!==void 0)try{return Xi(t.arguments)}catch{throw new Ta(`invalid_arguments`,`${e.title}: arguments must be an object`)}let n=e.action?.presentation,r=t.interaction;if(r===void 0||n===void 0)return{};if(n.type===`choice`){let t=n.options;return r.prompt({type:`choice`,message:e.title,options:t.map((e,t)=>{let n={value:String(t),label:e.label};return e.description===void 0?n:{...n,description:e.description}})}).then(e=>Xi(t[Number(e)]?.value))}if(n.type===`confirmation`){let e={type:`confirmation`,message:n.message};return n.confirmLabel!==void 0&&(e.confirmLabel=n.confirmLabel),n.cancelLabel!==void 0&&(e.cancelLabel=n.cancelLabel),r.prompt(e).then(e=>e?{}:void 0)}return{}}function GW(e,t){return e.commands.map(e=>{let{availability:n,...r}=e,i={id:r.id,title:r.title,category:r.category,handler:async n=>{let r=n.signal??new AbortController().signal,i=n.interaction,a=await WW(e,n);if(a===void 0)return{cancelled:!0};let o=new Map;for(let n=0;n<RW;n+=1){r.throwIfAborted();let n=a,s=o,c=async()=>{let a={...n};try{if(i!==void 0)for(let[e,t]of s)Object.defineProperty(a,e,{value:await i.prompt(t),enumerable:!0,configurable:!0});let n=HW(await t(e.id,a,r)),o=new Map;if(n.type===`done`)return{reply:n,secrets:o};let c={...n.next.arguments};for(let[e,t]of s)e!==n.next.answer&&Object.hasOwn(c,e)&&o.set(e,t),Reflect.deleteProperty(c,e);return n.prompt.type===`text`&&n.prompt.secret===!0&&(o.set(n.next.answer,n.prompt),Reflect.deleteProperty(c,n.next.answer)),{reply:{...n,next:{...n.next,arguments:c}},secrets:o}}finally{for(let e of s.keys())Reflect.deleteProperty(a,e)}},{reply:l,secrets:u}=i===void 0?await c():await i.run(c);if(l.notice!==void 0&&i?.notify(l.notice),l.type===`done`)return l.result;if(i===void 0)throw new Ta(`interaction_required`,`${e.title} needs a person to answer: ${l.prompt.message}`);if(o=u,l.prompt.type===`text`&&l.prompt.secret===!0){a=l.next.arguments;continue}let d=l.prompt.type===`decision`?UW(await i.prompt(l.prompt)):await i.prompt(l.prompt);a={...l.next.arguments,[l.next.answer]:d}}throw new Ta(`flow_too_long`,`${e.title} asked too many questions.`)}};return r.description!==void 0&&(i.description=r.description),r.projections!==void 0&&(i.projections=r.projections),r.action!==void 0&&(i.action=r.action),n!==void 0&&(i.availability=()=>n),i})}var KW=Rh(NW,{onExcessProperty:`error`});function qW(e){return[...e.panel.flatMap(e=>e.actions??[]),...e.timeline.cells.flatMap(e=>e.rows.flatMap(e=>e.actions??[])),...e.waiting===null?[]:[e.waiting.cancel]]}function JW(e,t){let n=qW(e),r=e.panel.flatMap(e=>e.inspection===void 0?[]:[e.inspection]);if(n.length===0&&r.length===0)return;if(t?.status!==`running`||t.catalog===void 0)throw Error(`Client row actions require a running advertised catalog`);let i=BW(t.catalog),a=new Set(i.commands.map(e=>e.id));for(let e of r)if(!a.has(e.commandId))throw Error(`Client inspection ${e.commandId} is not advertised by its entry`);for(let e of n)if(!a.has(e.id))throw Error(`Client row action ${e.id} is not advertised by its entry`)}function YW(e,t){try{let n=KW(e(t));return JW(n,t),{status:`admitted`,value:n}}catch(e){return{status:`failed`,error:e instanceof Error?e:Error(`Client contribution failed`,{cause:e})}}}function XW(e,t){let n=e.map(e=>PW(e));if(new Set(n.map(e=>e.id)).size!==n.length)throw Error(`Duplicate client contribution entry`);let r=new Map,i=new Map,a=new Map,o=new Set,s=[],c=!1;return{snapshot:()=>s,subscribe:e=>c?()=>void 0:(o.add(e),()=>{o.delete(e)}),update:e=>{if(c)return;let l=!1;for(let o of n){if(o.contribute===void 0)continue;let n=e[o.id];if(r.has(o.id)&&r.get(o.id)===n)continue;r.set(o.id,n),i.delete(o.id),l=!0;let s=YW(o.contribute,n);if(s.status===`admitted`)i.set(o.id,{entryId:o.id,value:s.value}),a.delete(o.id);else{let{error:e}=s,n=`${e.name}: ${e.message}`;a.get(o.id)!==n&&t(o.id,e),a.set(o.id,n)}}if(l){s=n.flatMap(e=>{let t=i.get(e.id);return t===void 0?[]:[t]});for(let e of o)e()}},dispose:()=>{c=!0,r.clear(),a.clear(),i.clear(),s=[];for(let e of o)e();o.clear()}}}function ZW(e){let t=new Set,n={title:e.title,status:`working`,links:[],retryable:!1},r,i,a=0,o,s=e=>{n={...n,...e};for(let e of t)e()},c=()=>n.message?.type===`progress`?n.message:{type:`progress`,message:e.title},l=t=>{i=void 0,o=void 0,t.status===`failed`?s({status:`failed`,failure:t.message,prompt:void 0,retryable:!1}):s({status:t.status===`handled`?`done`:`cancelled`,prompt:void 0,retryable:!1}),e.onEnd?.(t)};return{snapshot:()=>n,subscribe:e=>(t.add(e),()=>{t.delete(e)}),begin:()=>{r?.abort();let t=new AbortController;r=t;let u=t.signal;i=void 0,o=void 0,n={title:e.title,status:`working`,links:[],retryable:!1},s({});let d=()=>r===t&&!u.aborted,f=!1;return{interaction:{signal:u,run:async e=>{for(;;){u.throwIfAborted();try{return await e()}catch(e){if(!d()||!f)throw e;await new Promise((t,n)=>{let r=()=>{o=void 0,n(Error(`Interaction cancelled`,{cause:u.reason}))},i=()=>{!d()||o!==i||(o=void 0,u.removeEventListener(`abort`,r),s({status:`working`,message:c(),failure:void 0,retryable:!1,handoff:void 0}),t())};u.addEventListener(`abort`,r,{once:!0}),o=i,s({status:`failed`,failure:e instanceof Error?e.message:`Operation failed`,prompt:void 0,retryable:!0})})}}},prompt:(e,t)=>{let n=t?.signal===void 0?u:AbortSignal.any([u,t.signal]);n.throwIfAborted();let r=xa(e);f=!0;let o=wa(e),c=Promise.withResolvers(),l=++a,p=()=>{i?.sequence===l&&(i=void 0,d()&&s({status:`working`,prompt:void 0})),c.reject(n.reason)};return n.addEventListener(`abort`,p,{once:!0}),i={sequence:l,request:r,resolve:e=>{let t=o(e);return t.kind!==`invalid`&&(n.removeEventListener(`abort`,p),c.resolve(t.value),!0)}},s({status:`prompting`,prompt:{sequence:l,request:r}}),c.promise},notify:e=>{if(r!==t)return;let i=Sa(e);if(u.aborted){(i.type===`info`||i.type===`success`)&&s({closing:i});return}(i.type===`handoff`||i.type===`progress`)&&(f=!0),i.type===`handoff`?s({handoff:i}):s({message:i,links:i.type===`info`?i.links??[]:n.links})}},settle:e=>{r===t&&(r=void 0,l(u.aborted?{status:`cancelled`}:e))}}},retry:()=>o?.(),answer:(e,t)=>{let n=i;return n?.sequence!==e||!n.resolve(t)?!1:(i=void 0,s({status:`working`,message:c(),prompt:void 0}),!0)},cancel:()=>{if(r!==void 0){s({prompt:void 0}),r.abort(Error(`Interaction cancelled`));return}n.status===`failed`&&l({status:`cancelled`})}}}function QW(){let e={awaiting:{items:[],later:new Set,forced:!1,requests:0}},t=0,n,r=new Set,i=new Set,a=e=>{for(let t of i)t(e)},o=e=>{e.type===`info`&&a({variant:`info`,message:e.message})},s=t=>{e=t;for(let e of r)e()},c=t=>{s({...e,awaiting:{...e.awaiting,...t}})},l=t=>{let{items:n,later:r}=e.awaiting;n.some(e=>e.key===t)&&c({items:n.filter(e=>e.key!==t),later:new Set([...r].filter(e=>e!==t)),forced:!1})},u=t=>(c({items:[...e.awaiting.items.filter(({key:e})=>e!==t.key),t]}),()=>{l(t.key)}),d=t=>{e.open?.key===t&&s({...e,open:void 0})},f=({title:r})=>{let i=++t,a=!1,c=!1,l=ZW({title:r,onEnd:t=>{n=t.status,f?.();let r=l.snapshot().message;if(!a){t.status===`failed`?s({...e,notice:{tone:`error`,message:t.message}}):r!==void 0&&o(r);return}if(t.status===`handled`&&c&&r!==void 0&&r.type!==`progress`)return;let u=l.snapshot().closing;t.status===`cancelled`&&u!==void 0&&o(u),t.status===`handled`&&r!==void 0&&o(r),t.status!==`failed`&&d(i)}}),f,p=l.subscribe(()=>{let t=l.snapshot();if(t.retryable&&(c=!0),f===void 0&&t.prompt?.request.type===`decision`){a&&(a=!1,d(i)),f=u({key:`interaction:${String(i)}`,kind:`question`,arrivedAt:Date.now(),host:l});return}if(f!==void 0||a||t.prompt===void 0&&t.handoff===void 0&&t.message?.type!==`progress`)return;a=!0;let n=e.open;s({...e,open:{key:i,host:l},notice:void 0}),n?.host.cancel()}),m=l.begin();return{interaction:m.interaction,settle:e=>{p(),m.settle(e)}}};return{snapshot:()=>e,subscribe:e=>(r.add(e),()=>{r.delete(e)}),close:()=>{let t=e.open;t!==void 0&&(s({...e,open:void 0}),t.host.cancel())},inspect:t=>{s({...e,inspection:t})},report:t=>{n=void 0,s({...e,notice:t})},toast:a,subscribeToasts:e=>(i.add(e),()=>{i.delete(e)}),attach:e=>e(f),lastEnd:()=>n,awaiting:{add:u,remove:l,later:t=>{e.awaiting.items.some(e=>e.key===t)&&c({later:new Set([...e.awaiting.later,t]),forced:!1})},focus:()=>{let{items:t,later:n,requests:r}=e.awaiting,i=[...t].sort((e,t)=>e.arrivedAt-t.arrivedAt).find(e=>n.has(e.key));c({later:i===void 0?n:new Set([...n].filter(e=>e!==i.key)),forced:t.length>0,requests:r+1})}}}}function $W(e){return`init`in e}function eG(e){return typeof e.write==`function`}function tG(e){return!!e.onMount}function nG(e){return`v`in e||`e`in e}function rG(e){if(`e`in e)throw e.e;return e.v}function iG(e){return typeof e?.then==`function`}function aG(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function oG(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function sG(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function cG(e){return!!e.INTERNAL_onInit}var lG=(e,t,n,...r)=>n.read(...r),uG=(e,t,n,...r)=>n.write(...r),dG=(e,t,n)=>n.INTERNAL_onInit(t),fG=(e,t,n,r)=>n.onMount?.call(n,r),pG=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),cG(n)&&s(e,t,n)}return a},mG=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},hG=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of sG(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},gG=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(nG(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},ee=r=>{var i;if(r===n){let n=u(e,t,r);if(!nG(n)){if($W(r))g(e,t,r,r.init);else throw Error(`no atom init`)}return rG(n)}let o=p(e,t,r);try{return rG(o)}finally{S.delete(r),y.d.set(r,o.n),iG(y.v)&&oG(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},te,ne,re={get signal(){return te||=new AbortController,te.signal},get setSelf(){return!ne&&eG(n)&&(ne=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),ne}},ie=y.n,T=o.get(n)===ie;try{let i=l(e,t,n,ee,re);if(g(e,t,n,i),iG(i)){_(e,t,i,()=>te?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){if(aG(e))throw e;return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==ie&&T&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},_G=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of sG(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},vG=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>rG(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!$W(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},yG=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},bG=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),eG(n)&&tG(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},xG=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},SG=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(iG(r))for(let a of o.d.keys())oG(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,iG(c)&&a(e,t,c))},CG=(e,t,n)=>{let r=e[14];return rG(r(e,t,n))},wG=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},TG=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},EG=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},DG=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},OG=new WeakMap;function kG(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,void 0,new WeakMap,EG,DG,[0]].map((t,n)=>e[n]||t);OG.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var AG=0;function $(e,t){let n=`atom${++AG}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=jG,r.write=MG),t&&(r.write=t),r}function jG(e){return e(this)}function MG(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}function NG(){return kG()}var PG=$(new yv),FG=(e,t,n)=>e?.suspense&&IG(t),IG=(e,t)=>e.isPending&&!0,LG=({result:e,throwOnError:t,query:n})=>e.isError&&!e.isFetching&&RG(t,[e.error,n]);function RG(e,t){return typeof e==`function`?e(...t):!!e}var zG=e=>e.suspense&&typeof e.staleTime!=`number`?{...e,staleTime:1e3}:e;function BG(e,t,n=e=>e(PG)){let r=$(0),i=$(n),a=$(()=>new WeakMap),o=$(t=>{let n=t(i),r=e(t),o=n.defaultQueryOptions(r),s=t(a).get(n);return o._optimisticResults=`optimistic`,s&&s.setOptions(o),zG(o)}),s=$(e=>{let n=e(i),r=e(o),s=e(a),c=s.get(n);if(c)return c;let l=new t(n,r);return s.set(n,l),l}),c=$(e=>{let t=e(s),n=e(o),r=$(t.getOptimisticResult(n));return r.onMount=e=>{let n=t.subscribe(W_.batchCalls(e));return()=>{t.getCurrentResult().isError&&t.getCurrentQuery().reset(),n()}},r});return $(e=>{e(r);let t=e(s),n=e(o),i=e(e(c));if(FG(n,i))return t.fetchOptimistic(n);if(LG({result:i,query:t.getCurrentQuery(),throwOnError:n.throwOnError}))throw i.error;return i},(e,t)=>{t(r,e=>e+1)})}function VG(e,t=e=>e(PG)){return BG(e,ov,t)}function HG(e,t=e=>e(PG)){return BG(e,fv,t)}function UG(e,t=e=>e(PG)){let n=Symbol(),r=$(n=>{let r=t(n),i=e(n);return r.defaultMutationOptions(i)}),i=$(()=>new WeakMap),a=$(e=>{let a=e(r),o=t(e),s=e(i),c=s.get(o);if(c)return c[n]=!0,c.setOptions(a),delete c[n],c;let l=new _v(o,a);return s.set(o,l),l}),o=$(e=>{let t=e(a),n=$(t.getCurrentResult());return n.onMount=e=>(t.subscribe(W_.batchCalls(e)),()=>{t.reset()}),n}),s=$(e=>{let t=e(a);return(e,n)=>{t.mutate(e,n).catch(WG)}});return $(e=>{let t=e(a),n=e(e(o)),r=e(s);if(n.isError&&RG(t.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:r,mutateAsync:n.mutate}})}function WG(){}var GG=160;function KG(e,t){return e.replace(/\s+/gu,` `).trim().slice(0,t)}function qG(e){return MV(AM(e).replace(/[\p{Cc}\u200b\u200e\u200f\u061c\u202a-\u202e\u2066-\u2069\u2060\ufeff]/gu,e=>/\s/u.test(e)?` `:``))}function JG({activity:e,terminals:t}){let n;for(let e of t)(n===void 0||e.sequence>n.sequence)&&(n=e);if(n===void 0)return{kind:`idle`};if(e.lastModelChoiceSequence!==null&&e.lastModelChoiceSequence>n.sequence)return{kind:`waiting_for_you`};if(n.outcome===`failed`||n.outcome===`interrupted`){let e=n.outcome===`interrupted`?`Run was interrupted`:`Run failed without a diagnostic`;return{kind:`error`,cause:qG(n.diagnostic??e)??e}}return{kind:`waiting_for_you`}}function YG(e){let{activity:t,progress:n}=e,{queue:r}=t;return r.state===`idle`?JG(e):t.cancellationRequested?{kind:`cancelling`}:r.state===`queued`?{kind:`queued`,queuedCommandId:r.commandId,runningWork:r.runningWork}:t.compaction===null?t.retry===null?t.activeTool===null?{kind:n===null||n.text===``?`thinking`:`responding`}:{kind:`running_tool`,tool:t.activeTool}:{kind:`retrying`,attempt:t.retry.attempt,maxAttempts:t.retry.maxAttempts,cause:KG(t.retry.errorMessage,GG),nextRetryAt:t.retry.scheduledAt+t.retry.delayMs}:{kind:`compacting`,trigger:t.compaction.trigger}}function XG(e,t){return e===null||t===null?e===t:e.phase===t.phase}function ZG(e,t){return e.kind===t.kind?e.kind===`queued`&&t.kind===`queued`?e.queuedCommandId===t.queuedCommandId&&XG(e.runningWork,t.runningWork):e.kind===`running_tool`&&t.kind===`running_tool`?e.tool===t.tool:e.kind===`compacting`&&t.kind===`compacting`?e.trigger===t.trigger:e.kind===`retrying`&&t.kind===`retrying`?e.attempt===t.attempt&&e.maxAttempts===t.maxAttempts&&e.cause===t.cause&&e.nextRetryAt===t.nextRetryAt:e.kind===`error`&&t.kind===`error`?e.cause===t.cause:!0:!1}function QG(e){switch(e.kind){case`cancelling`:case`queued`:case`retrying`:return e.kind;case`responding`:return`streaming`;case`thinking`:case`running_tool`:case`compacting`:return`thinking`;case`idle`:case`waiting_for_you`:case`error`:return`idle`}}var $G=new WeakMap;function eK(e){let t=$G.get(e);if(t!==void 0)return t;let n=new Set(e.map(({id:e})=>e));return $G.set(e,n),n}function tK(e,t){if(t.length===0)return e;let n=new Set(e.map(({id:e})=>e)),r=t.filter(({id:e})=>!n.has(e));return r.length===0?e:[...e,...r].sort((e,t)=>e.sequence-t.sequence)}function nK(e,t){return tK(e,t)}function rK(e,t){return e===null||eK(t).has(e.messageId)?null:e}function iK(e,t){let n=[],r=new Map;for(let i of[...e,...t])r.get(i.commandId)===void 0&&(r.set(i.commandId,n.length),n.push(i));return n.length===e.length&&n.every((t,n)=>t===e[n])?e:n}function aK(e,t){return tK(e,t)}function oK(e,t){return tK(e,t)}function sK(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return e.extensionId===r?.extensionId&&e.id===r.id&&e.kind===r.kind&&e.summary===r.summary&&e.since===r.since&&e.expiresAt===r.expiresAt})}function cK(e,t){return e.total===t.total&&e.hasMore===t.hasMore&&e.prompts.length===t.prompts.length&&e.prompts.every((e,n)=>{let r=t.prompts[n];return r!==void 0&&e.commandId===r.commandId&&e.delivery===r.delivery&&e.text===r.text})}function lK(e,t){return e===t||e.queue.state===t.queue.state&&(e.queue.state===`idle`||t.queue.state===`idle`||e.queue.commandId===t.queue.commandId&&(e.queue.state!==`queued`||t.queue.state!==`queued`||XG(e.queue.runningWork,t.queue.runningWork)))&&e.cancellationRequested===t.cancellationRequested&&e.activeTool===t.activeTool&&e.lastModelChoiceSequence===t.lastModelChoiceSequence&&(e.retry===t.retry||e.retry!==null&&t.retry!==null&&e.retry.attempt===t.retry.attempt&&e.retry.maxAttempts===t.retry.maxAttempts&&e.retry.delayMs===t.retry.delayMs&&e.retry.errorMessage===t.retry.errorMessage&&e.retry.scheduledAt===t.retry.scheduledAt)&&(e.compaction===t.compaction||e.compaction!==null&&t.compaction!==null&&e.compaction.trigger===t.compaction.trigger)}function uK(e,t){return e===t||JSON.stringify(e)===JSON.stringify(t)}function dK(e,t){if(t.kind===`heartbeat`)return e;if(t.kind===`reset`)return{...t.baseline,terminals:iK([],t.baseline.terminals),compactions:aK([],t.baseline.compactions??[]),compactionNotices:oK([],t.baseline.compactionNotices??[])};if(t.kind===`activity`)return lK(e.activity,t.activity)?e:{...e,activity:t.activity};if(t.kind===`tool_output`){let n=new Set(e.messages.flatMap(e=>e.value.role===`toolResult`?[e.value.toolCallId]:[])),r=t.toolOutput.filter(e=>!n.has(e.toolCallId)).map(t=>{let n=e.toolOutput.find(e=>e.toolCallId===t.toolCallId);return n!==void 0&&n.revision>t.revision?n:t});return{...e,activity:t.activity,toolOutput:r}}if(t.kind===`progress`){let n=eK(e.messages).has(t.progress.messageId),r=e.progress,i=r!==null&&r.messageId===t.progress.messageId,a=i&&r.revision>t.progress.revision;if(n||a)return e;let o=lK(e.activity,t.activity)?e.activity:t.activity;return i&&r.revision===t.progress.revision?o===e.activity?e:{...e,activity:o}:{...e,progress:vW(e.progress,t.progress),activity:o}}let n=cK(e.pending,t.pending)?e.pending:t.pending,r=nK(e.messages,t.messages),i=new Set(r.flatMap(e=>e.value.role===`toolResult`?[e.value.toolCallId]:[])),a=e.toolOutput.filter(e=>t.activity.queue.state!==`idle`&&!i.has(e.toolCallId)),o=iK(e.terminals,t.terminals),s=e.compactions??[],c=aK(s,t.compactions??[]),l=e.compactionNotices??[],u=oK(l,t.compactionNotices??[]),d=t.activity.queue.state===`idle`?null:rK(e.progress,r),f=t.context===void 0||e.context?.tokens===t.context.tokens&&e.context.window===t.context.window?e.context:t.context;if(r===e.messages&&o===e.terminals&&c===s&&u===l&&d===e.progress&&a.length===e.toolOutput.length&&n===e.pending&&uK(t.extensions,e.extensions)&&sK(t.attention,e.attention)&&t.cursor===e.cursor&&lK(t.activity,e.activity)&&f===e.context)return e;let p={...e,cursor:t.cursor,messages:r,terminals:o,compactions:c,compactionNotices:u,progress:d,toolOutput:a,activity:lK(e.activity,t.activity)?e.activity:t.activity,pending:n,attention:sK(t.attention,e.attention)?e.attention:t.attention,extensions:uK(t.extensions,e.extensions)?e.extensions:t.extensions};return f===void 0?p:{...p,context:f}}var fK=Ht(k(),be());function pK(e){return e!==void 0&&/[^\s\p{Cf}]/u.test(e)}function mK(e){return e.text.trim()!==``||pK(e.thinking)}function hK(e){let t;for(e.type===`ExpressionStatement`?t=e.expression:e.type===`ReturnStatement`?t=e.argument:e.type===`VariableDeclaration`&&(t=e.declarations[0]?.init);t?.type===`AwaitExpression`;)t=t.argument;return t?.type===`CallExpression`?t:void 0}var gK=k();function _K(e){if(e?.type===`Literal`){let t=gK.safeParse(e.value);return t.success?t.data:void 0}if(e?.type===`TemplateLiteral`&&e.quasis.length===1)return e.quasis[0]?.value.cooked??void 0}function vK(e){return e.type===`Identifier`?e.name:_K(e)}function yK(e){let t;try{t=vR(e,{ecmaVersion:`latest`,allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0})}catch(e){if(e instanceof SyntaxError)return;throw e}for(let e of t.body){let n=hK(e);if(n===void 0)continue;let{callee:r}=n;if(r.type!==`MemberExpression`||r.computed||r.property.type!==`Identifier`)continue;let i=n.arguments[0];if(i?.type===`ObjectExpression`){for(let e of i.properties)if(e.type===`Property`&&!e.computed&&vK(e.key)===`command`){let n=_K(e.value);if(n!==void 0)return{tool:r.property.name,command:n,alone:t.body.length===1}}}}}var bK=[[`*** Add File: `,`add`],[`*** Delete File: `,`delete`],[`*** Update File: `,`update`]],xK=/^\*\*\* Move to: (.+)$/u;function SK(e){if(e.startsWith(`+`))return{kind:`add`,text:e.slice(1)};if(e.startsWith(`-`))return{kind:`remove`,text:e.slice(1)};if(e.startsWith(` `))return{kind:`context`,text:e.slice(1)}}function CK(e){let t=[],n;for(let r of e.split(`
35
- `)){let e=bK.find(([e])=>r.startsWith(e));if(e!==void 0){let[i,a]=e;n={operation:a,path:r.slice(i.length).trim(),hunks:[]},t.push(n);continue}if(n===void 0)continue;let i=xK.exec(r);if(i!==null){n.moveTo=(i[1]??``).trim();continue}if(r.startsWith(`@@`)){let e=r.slice(2).trim();n.hunks.push(e===``?{lines:[]}:{context:e,lines:[]});continue}let a=SK(r);if(a===void 0)continue;let o=n.hunks.at(-1)??{lines:[]};n.hunks.length===0&&n.hunks.push(o),o.lines.push(a)}return t}var wK=131072,TK=524288,EK=new TextEncoder,DK=A(()=>k().min(1).max(4096).refine(e=>!e.includes(`\0`),`Path cannot contain null bytes`));function OK(e=0){return k().min(e).refine(e=>EK.encode(e).byteLength<=wK,`Text exceeds the ${String(wK)}-byte Files bound`)}A(()=>pe({path:DK,offset:Lt().int().min(0).default(0),limit:Lt().int().min(4).max(wK).default(wK)}));var kK=A(()=>pe({computerId:k().min(1).max(256),path:DK.refine(e=>e.startsWith(`/`),`Computer file paths must be absolute`)})),AK=St([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]),jK=A(()=>pe({path:DK,image:pe({mimeType:AK,data:mr(),bytes:Lt().int().min(1).max(TK)}),file:kK.exactOptional()})),MK=A(()=>pe({path:DK,content:OK(),offset:Lt().int().min(0),nextOffset:Lt().int().min(0).nullable(),truncated:cr(),file:kK.exactOptional()})),NK=A(()=>pe({path:DK,image:pe({ref:k().min(1).max(32),mimeType:AK,bytes:Lt().int().min(1).max(TK)})}));A(()=>en([MK,NK]));var PK=A(()=>en([MK,jK])),FK=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends FK{};function IK(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function LK(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function RK(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function zK(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function BK(e,t){return RK(e,t,``)}function VK(e,t){return zK(e,t,``)}function HK(e,t){return t.slice(0,UK(e,t))}function UK(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function WK(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function GK(e,t){if(t)return qK(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function KK(e,t){if(t)return qK(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function qK(e,t){if(!t)return[KK(e),GK(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=WK(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var JK=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,YK=RegExp(`[${JK}]+|\\s+|[^${JK}]`,`ug`);new class extends FK{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=WK(e,r)}else n=e.match(YK)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&XK(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&XK(n,i,r,null,t.intlSegmenter),e}};function XK(e,t,n,r,i){if(t&&n){let[a,o]=qK(t.value,i),[s,c]=qK(n.value,i);if(e){let r=IK(a,s);e.value=zK(e.value,s,r),t.value=BK(t.value,r),n.value=BK(n.value,r)}if(r){let e=LK(o,c);r.value=RK(r.value,c,e),t.value=VK(t.value,e),n.value=VK(n.value,e)}}else if(n){if(e){let e=KK(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=KK(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=KK(r.value,i),[a,o]=qK(t.value,i),s=IK(n,a);t.value=BK(t.value,s);let c=LK(BK(n,s),o);t.value=VK(t.value,c),r.value=RK(r.value,n,c),e.value=zK(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=KK(r.value,i),n=HK(GK(t.value,i),e);t.value=VK(t.value,n)}else if(e){let n=HK(GK(e.value,i),KK(t.value,i));t.value=BK(t.value,n)}}new class extends FK{tokenize(e){let t=RegExp(`(\\r?\\n)|[${JK}]+|[^\\S\\n\\r]+|[^${JK}]`,`ug`);return e.match(t)||[]}};var ZK=new class extends FK{constructor(){super(...arguments),this.tokenize=$K}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
32
+ WHERE damage.session_id = ${e}.session_id) AS damaged`}QH(`session_entries`),P(B({id:IH,sequence:LH}),PH),P(B({...zH.fields,damaged:H([0,1])}),PH),Rh(B({identity:U(R)})),Rh(B({total:G.check(jg(0))})),P(B({installed:G.pipe(W(jg(0)))}),PH),P(B({session_id:R}),PH),P(B({damaged:G.pipe(W(Ag(0))),first:R}),PH),P(B({id:IH,parent_id:U(R),sequence:LH,state:H([`complete`,`streaming`])}),PH);var $H=G.pipe(W(jg(0)));P(B({length:$H,root_id:U(IH),root_parent_id:U(R),broken:$H,newest_id:U(IH),newest_sequence:U(LH)}),PH),P(B({sequence:LH}),PH),P(B({work_id:IH}),PH),P(B({work_id:IH,diagnostic:R}),PH),P(B({state:H([`complete`,`streaming`]),newest_sequence:LH,root_id:U(IH),root_parent_id:U(R)}),PH),P(B({sizes:Vg(V(tg([LH,$H]))),deepest_parent:U(R),deepest_sequence:U(LH)}),PH),P(B({oldest:U(LH),newest:U(LH)}),PH);var eU=H([0,1]);P(B({id:IH,parent_id:U(R),sequence:LH,target:eU,continues:eU}),PH);function tU(e){return`CASE WHEN ${e}.type = 'compaction' AND ${e}.state != 'streaming'
33
+ THEN json_extract(${e}.data_json, '$.head') END`}`${tU(`session_entries`)}${tU(`parent`)}`,P(B({session_id:R,work_id:R,timestamp:z,diagnostic:U(R)}),PH),new TextEncoder,Object.freeze({kind:`reset`}),new TextEncoder,P(B({droppedBytes:G.check(jg(0)),totalBytes:G.check(jg(0))}),{onExcessProperty:`error`}),Object.freeze({admitNew:()=>{}});var nU=JH.mapFields(({extensionId:e,correlation:t})=>({extensionId:e,correlation:t})),rU=B({requestId:F(R),meta:F(uV),data:F(sV),origin:F(nU),id:R,sequence:G.check(Ag(0)),commandId:U(R),value:iH}),iU=H([`manual`,`threshold`,`overflow`]),aU=B({queue:ig([B({state:L(`idle`)}),B({state:L(`queued`),commandId:zg,runningWork:U(B({phase:H([`thinking`,`streaming`,`running_tool`,`waiting_on_you`,`cancelling`])}))}),B({state:L(`running`),commandId:zg})]),cancellationRequested:Zh,retry:U(B({attempt:G.check(Ag(0)),maxAttempts:G.check(Ag(0)),delayMs:G.check(jg(0)),errorMessage:R,scheduledAt:G.check(jg(0))})),activeTool:U(R),lastModelChoiceSequence:U(G.check(Ag(0))),compaction:U(B({trigger:iU}))}),oU=R,sU=$h(R,ig([B({status:L(`running`),revision:oU,value:sV,catalog:F(sV)}),B({status:L(`stopped`),revision:oU,reason:R})])),cU=B({id:R,version:R,revision:oU,status:H([`running`,`stopped`]),reason:U(R),stoppedAt:U(z)}),lU=B({commandId:R,outcome:H([`completed`,`cancelled`,`failed`,`interrupted`]),sequence:G.check(Ag(0)),diagnostic:U(R),meta:F(uV)}),uU=B({id:R,sequence:G.check(Ag(0)),at:G.check(jg(0)),tokensBefore:z,tokensAfter:U(z),trigger:U(iU)}),dU=B({id:R,sequence:G.check(Ag(0)),at:G.check(jg(0)),trigger:iU,result:H([`nothing_to_compact`,`failed`,`stale`,`insufficient`]),diagnostic:U(R)}),fU=R.check(vg(e=>new TextEncoder().encode(e).byteLength<=65536)),pU=B({messageId:R,revision:G.check(jg(0)),text:fU,thinking:fU,textOffset:G.check(jg(0)),thinkingOffset:G.check(jg(0)),textTruncated:Zh,thinkingTruncated:Zh}),mU=B({commandId:R,requestId:R,meta:F(uV),origin:F(nU),text:R,images:F(V(aN)),delivery:H([`steer`,`followUp`])}),hU=V(B({toolCallId:R,revision:G.check(jg(0)),tail:R.check(vg(e=>new TextEncoder().encode(e).byteLength<=8192&&e.split(`
34
+ `).length<=200)),droppedBytes:G.check(jg(0)),totalBytes:G.check(jg(0))})).check(K(4)),gU=B({total:G.check(jg(0)),prompts:V(mU),hasMore:Zh}),_U=B({tokens:G.check(jg(0)),window:U(G.check(Ag(0)))}),vU=B({parent:F(zM),sessionId:R,cursor:U(R),hasMore:Zh,oldestCursor:F(U(R)),messages:V(rU),terminals:V(lU),sandboxFailures:F(V(iV)),compactions:F(V(uU)),compactionNotices:F(V(dU)),pending:gU,activity:aU,progress:U(pU),toolOutput:hU,extensions:sU,attention:UM,context:F(_U)}),yU=ig([B({kind:L(`heartbeat`)}),B({kind:L(`activity`),activity:aU}),B({kind:L(`tool_output`),toolOutput:hU,activity:aU}),B({kind:L(`update`),delivery:H([`replay`,`live`]),cursor:U(R),messages:V(rU),terminals:V(lU),sandboxFailures:F(V(iV)),compactions:F(V(uU)),compactionNotices:F(V(dU)),pending:gU,activity:aU,extensions:sU,attention:UM,context:F(_U)}),B({kind:L(`progress`),progress:B({messageId:R,revision:G.check(jg(0)),text:B({offset:G.check(jg(0)),append:fU}),thinking:B({offset:G.check(jg(0)),append:fU})}),activity:aU}),B({kind:L(`reset`),reason:L(`history_unavailable`),cursor:U(R),baseline:vU})]),bU=B({status:L(`accepted`),commandId:R,sessionId:F(R)});Rh(Vg(ig([bU,B({status:L(`held`),reason:L(`recipient_offline`),message:L(`waiting: recipient offline`)})])),{onExcessProperty:`error`});var xU=B({status:L(`unknown`)}),SU=Rh(Vg(ig([bU,xU])));function CU(e){return SU(e)}var wU=ig([bU,xU,B({status:L(`too_late`),commandId:R})]),TU=B({sessionId:R}),EU=Rh(Vg(vU),{onExcessProperty:`error`}),DU=Rh(Vg(yU),{onExcessProperty:`error`}),OU=Rh(Vg(bU)),kU=Rh(Vg(wU)),AU=Rh(Vg(TU)),jU=Rh(Vg(qM)),MU=Rh(Vg(cU)),NU=Rh(Vg(V(cU))),PU=Rh(Vg(sV));function FU(e){return MU(e)}function IU(e){return NU(e)}function LU(e){return PU(e)}function RU(e){return OU(e)}function zU(e){return kU(e)}function BU(e){return Rh(Vg(U(mU)))(e)}function VU(e){return AU(e)}var HU=B({acceptedSender:U(R),delegator:U(R),terminal:lU,content:R,usage:V(B({provider:R,model:R,usage:eH})),toolCalls:G.check(jg(0)),waitingOnYou:V(B({itemId:R,kind:R,summary:R})).check(K(8))});function UU(e){return Rh(Vg(U(HU)))(e)??void 0}function WU(e){return EU(e)}function GU(e){return DU(e)}function KU(e){let t=jU(e);return new JM(t.boundary,t.cause,t.message,t.requestId)}var qU=Rh(Vg(B({sessions:V(ig([B({sessionId:zg,createdAt:z,lastActivityAt:z,settledAt:F(z),title:R,state:H([`needs_you`,`running`,`errored`,`done`])}),B({sessionId:zg,state:L(`unavailable`)})])),next:I(zg)})));function JU(e){let t=qU(e);return{sessions:t.sessions,next:t.next}}var YU=Rh(Vg(B({sessionId:zg}))),XU=Rh(Vg(B({deleted:Zh})));function ZU(e){return XU(e).deleted}function QU(e){return YU(e).sessionId}function $U(e,t){return ye(e,t).then(e=>{if(fs(e))return e.value;let t=Ue(ns(e.cause))??es(e.cause);return Promise.reject(t instanceof Error?t:Error(String(t)))})}function eW(e){let t=bS(e);return Object.freeze({[Symbol.asyncIterator]:()=>{let e=t[Symbol.asyncIterator]();return{next:()=>e.next(),return:()=>e.return?.()??Promise.resolve({done:!0,value:void 0})}}})}function tW(e,t){function n(e){return $U(t.command(e))}return Object.freeze({address:e,command:n,withdraw:e=>$U(t.withdraw(e)),abort:()=>$U(t.abort),send:(e,n)=>$U(t.send(e,n)),cancel:e=>$U(t.cancel(e)),latestPending:()=>$U(t.latestPending),modelPreference:Object.freeze({read:()=>$U(t.modelPreference.read),set:e=>$U(t.modelPreference.set(e))}),extension:e=>{let n=t.extension(e);return Object.freeze({call:(e,t,r)=>$U(n.call(e,t,r))})},read:e=>$U(t.read(e)),readSettlement:(e,n)=>$U(t.readSettlement(e,n?.timeoutMs),n),subscribe:e=>eW(t.subscribe(e)),watch:e=>$U(t.watch(e)).then(e=>Object.freeze({snapshot:e.snapshot,changes:eW(e.changes),close:()=>$U(e.close)}))})}function nW(e,t){let n=t??`local:${jv()}`;return Object.freeze({createSession:t=>$U(e.createSession(t)),deleteSession:t=>$U(e.deleteSession(t)),listSessions:t=>$U(e.listSessions(t)),extensions:Object.freeze({list:()=>$U(e.extensions.list),resume:t=>$U(e.extensions.resume(t)),call:(t,n,r)=>$U(e.extensions.call(t,n,r))}),session:t=>tW(`${n}/sessions/${encodeURIComponent(t)}`,e.session(t)),close:()=>$U(e.close)})}function rW(e=`Remote Shiitake operation is unavailable`){return new JM(`runtime`,`unavailable`,e)}function iW(e){return new JM(`runtime`,`invalid`,e)}function aW(){return new JM(`runtime`,`closed`,`Shiitake client is closed`)}var oW=2,sW=Rh(R);function cW(e){if(!(e instanceof MessageEvent))throw iW(`Session stream event is invalid`);return sW(e.data)}function lW(e){return e.kind===`source-error`?bn(rW(`Session stream is unavailable`)):e.kind===`snapshot`?fi({try:()=>({kind:`snapshot`,value:WU(cW(e.event))}),catch:()=>iW(`Session snapshot is invalid`)}):e.kind===`frame`?fi({try:()=>({kind:`frame`,value:GU(cW(e.event))}),catch:()=>iW(`Session frame is invalid`)}):fi({try:()=>KU(cW(e.event)),catch:()=>iW(`Session runtime error is invalid`)}).pipe(j(bn))}function uW(e,t){return Qt(()=>{e.closed||(e.closed=!0,t.delete(e),e.source.close())})}function dW(e,t,n,r){return Xx(t=>fe(fi({try:()=>{let i={source:new(r??EventSource)(e),closed:!1},a=(e,r)=>{ob(t,{kind:e,event:r})||(lb(t,Xo(rW(`Session stream client fell behind`))),Kt(uW(i,n)))};return i.source.addEventListener(`snapshot`,e=>{a(`snapshot`,e)}),i.source.addEventListener(`frame`,e=>{a(`frame`,e)}),i.source.addEventListener(`runtime-error`,e=>{a(`runtime-error`,e)}),i.source.addEventListener(`error`,e=>{i.source.readyState===oW&&a(`source-error`,e)}),n.add(i),i},catch:()=>rW(`Session stream could not open`)}),e=>uW(e,n)),{bufferSize:256,strategy:`dropping`}).pipe(sS(lW),lS({duration:IM,orElse:()=>eS(rW(`Session feed is connected but silent; the service may be busy`))}),vS(t.await))}function fW(e,t){return`${e}/sessions/${encodeURIComponent(t)}`}function pW(e,t,n=!1){let r=new URLSearchParams({mode:`subscribe`});return t!==void 0&&r.set(`after`,t),n&&r.set(`includeSandboxFailures`,`true`),`${e}?${r.toString()}`}function mW(e,t,n,r){return dW(e,t,n,r).pipe(sS(e=>e.kind===`frame`?O(e.value):bn(iW(`Session subscription received a snapshot`))))}function hW(e,t,n,r,i,a){return En(function*(){yield*n;let o=yield*Bb(!1),s=yield*Ts();yield*Qt(()=>t.add(s)),yield*Os(s,Qt(()=>{t.delete(s)}));let c=yield*sr(dW(e,r,i,a).pipe(hS(Vx()),Ds(s)));if(ps(c))return yield*As(s,c),yield*Br(c.cause);let[l,u]=c.value;if(Ye(l)||l.value.kind!==`snapshot`){let e=iW(`Session stream did not begin with a snapshot`);return yield*As(s,ls(e)),yield*bn(e)}let d=u.pipe(sS(e=>e.kind===`frame`?O(e.value):O({kind:`reset`,reason:`history_unavailable`,cursor:e.value.cursor,baseline:e.value})),vS(o.await),gS(e=>o.isOpen()&&Qo(e)?Zx:tS(e)));return Object.freeze({snapshot:l.value.value,changes:d,close:o.open.pipe(we(As(s,ds)))})})}function gW(e,t,n){return Rn({try:async t=>{let n=await e(t);return{response:n,body:await n.text()}},catch:()=>rW(`${n} request failed`)}).pipe(j(({response:e,body:r})=>e.ok?fi({try:()=>t(r),catch:()=>iW(`${n} response is invalid`)}):fi({try:()=>KU(r),catch:()=>iW(`${n} error response is invalid`)}).pipe(j(bn))))}function _W(e){let t=e.baseUrl.replace(/\/+$/u,``),n=e.fetch??globalThis.fetch,r=new Set,i=new Set,a=zb(!1),o=!1,s=rn(()=>o?bn(aW()):ar),c=(e,t,n)=>Hi(gW(e,t,n),a.await.pipe(we(bn(aW())))),l=(e,t)=>s.pipe(we(c(r=>n(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:r}),LU,`Extension command`)));return Object.freeze({createSession:e=>s.pipe(j(()=>{let r=PN({requestId:e});return c(e=>n(`${t}/sessions`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({requestId:r}),signal:e}),QU,`Session creation`)})),deleteSession:e=>s.pipe(j(()=>{let r=MN(e);return c(e=>n(`${t}/sessions/${encodeURIComponent(r)}`,{method:`DELETE`,signal:e}),ZU,`Session deletion`)})),listSessions:e=>s.pipe(j(()=>{let r=new URLSearchParams;e!==void 0&&r.set(`after`,NN(e));let i=r.size===0?``:`?${r.toString()}`;return c(e=>n(`${t}/sessions${i}`,{signal:e}),JU,`Session discovery`)})),extensions:Object.freeze({list:s.pipe(we(c(e=>n(`${t}/extensions`,{signal:e}),IU,`Extension list`))),resume:e=>s.pipe(we(c(r=>n(`${t}/extensions/${encodeURIComponent(e)}/resume`,{method:`POST`,signal:r}),FU,`Extension resume`))),call:(e,n,r)=>l(`${t}/extensions/${encodeURIComponent(e)}/commands/${encodeURIComponent(n)}`,r)}),session:o=>{let u=MN(o),d=fW(t,u),f=`${d}/events`;function p(e){return s.pipe(we(c(t=>n(`${d}/command`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({command:e}),signal:t}),e.type===`prompt`||e.type===`compact`?RU:e.type===`cancel`?zU:e.type===`fork`?VU:()=>void 0,`Command`)))}return Object.freeze({command:p,withdraw:e=>s.pipe(we(c(t=>n(`${d}/withdraw`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({requestId:e}),signal:t}),CU,`Request withdrawal`))),abort:p({type:`abort`}),send:(e,t)=>Qt(()=>t?.requestId??jv()).pipe(j(n=>{let r={type:`prompt`,delivery:t?.delivery??`steer`,requestId:n,text:e};return p(t?.images===void 0?r:{...r,images:t.images}).pipe(jt(e=>e.requestId===n?e:new JM(e.boundary,e.cause,e.message,n)))})),cancel:e=>p({type:`cancel`,...e}),latestPending:s.pipe(we(c(e=>n(`${d}/pending/latest`,{signal:e}),BU,`Newest pending prompt`))),modelPreference:Object.freeze({read:s.pipe(we(c(e=>n(`${d}/model-preference`,{signal:e}),$M,`Model preference read`))),set:e=>s.pipe(we(c(t=>n(`${d}/model-preference`,{signal:t,method:`PUT`,headers:{"Content-Type":`application/json`},body:JSON.stringify(e)}),()=>void 0,`Model preference set`)))}),extension:e=>Object.freeze({call:(t,n)=>l(`${d}/extensions/${encodeURIComponent(e)}/commands/${encodeURIComponent(t)}`,n)}),read:e=>s.pipe(we(fi({try:()=>FN(e),catch:e=>e instanceof JM?e:iW(`Read options are invalid`)})),j(({limit:e,before:t,includeSandboxFailures:r})=>{let i=new URLSearchParams({limit:String(e)});return t!==void 0&&i.set(`before`,t),r===!0&&i.set(`includeSandboxFailures`,`true`),c(e=>n(`${d}?${i.toString()}`,{signal:e}),WU,`Session read`)})),readSettlement:(e,t=0)=>s.pipe(we(c(r=>n(`${d}/settlement?${new URLSearchParams({commandId:e,timeoutMs:String(t)}).toString()}`,{signal:r}),UU,`Command settlement`))),subscribe:t=>oS(s.pipe(we(fi({try:()=>IN(t),catch:e=>e instanceof JM?e:iW(`Subscribe options are invalid`)})),S(({after:t,includeSandboxFailures:n})=>mW(pW(f,t,n===!0),a,i,e.eventSource)))),watch:t=>hW(t?.includeSandboxFailures===!0?`${f}?includeSandboxFailures=true`:f,r,s,a,i,e.eventSource)})},close:rn(()=>o?ar:(o=!0,a.open.pipe(we(Kr([...r],e=>As(e,ds),{discard:!0})),we(Kr([...i],e=>uW(e,i),{discard:!0})))))})}function vW(e){return nW(_W(e),e.baseUrl.replace(/\/+$/u,``))}P(sV);function yW(e,t){if(t===void 0)return{status:`unavailable`};if(t.status===`stopped`)return{status:`stopped`,reason:t.reason};if(t.value===null||e.projection===null)return{status:`running`,value:null};let n=P(e.projection.schema)(t.value);return n._tag===`Success`?{status:`running`,value:n.success}:{status:`stopped`,reason:`Extension projection does not match this client`}}function bW(e,t){let n=e?.messageId===t.messageId?e:null;if(n!==null&&n.revision>=t.revision)return e;let r=n===null?0:n.textOffset+n.text.length,i=n===null?0:n.thinkingOffset+n.thinking.length;return t.text.offset>r||t.thinking.offset>i?e:{messageId:t.messageId,revision:t.revision,text:(n?.text??``)+t.text.append.slice(Math.max(0,r-t.text.offset)),thinking:(n?.thinking??``)+t.thinking.append.slice(Math.max(0,i-t.thinking.offset)),textOffset:n?.textOffset??0,thinkingOffset:n?.thinkingOffset??0,textTruncated:n?.textTruncated??!1,thinkingTruncated:n?.thinkingTruncated??!1}}var xW=R.pipe(W(Fg(1)),W(K(128)),W(xg(/^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$/u))),SW=R.pipe(W(Fg(1)),W(K(64)),W(xg(/^(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)\.(?:0|[1-9]\d*)(?:-[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?(?:\+[0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*)?$/u))),CW=xW.pipe(cg(`ExtensionId`));R.pipe(W(xg(/^sha256:[0-9a-f]{64}$/u)),cg(`ExtensionRevision`)),R.pipe(W(xg(/^sha256:[0-9a-f]{64}$/u)),cg(`ExtensionFingerprint`));var wW=class extends Go(`ExtensionHookError`){};function TW(e){return rn(()=>{let t=e();return Pi(t)?t:Rn({try:()=>Promise.resolve(t),catch:e=>new wW({cause:e})})})}var EW=G.check(jg(0)),DW=G.check(Ag(0)),OW=B({id:SS,label:xS,input:I($h(R,r_)),awaiting:F(L(`question`))}),kW=B({...wS.fields,actions:I(V(OW).check(K(8)))}),AW=wS.check(vg(e=>e.open===void 0,{message:`Client chips are display only`})),jW=B({...kW.fields,inspection:F(B({commandId:SS,title:xS,rows:V(AW).check(K(200))}))}),MW=B({id:SS,order:z.check(wg()),row:AW,compact:I(xS)}),NW=B({id:SS,sequence:DW,at:EW,commandId:U(R),afterSequence:F(EW),rows:V(kW).check(K(200))}).check(vg(e=>e.id===String(e.sequence),{message:`Client event identity must equal its sequence`}),vg(e=>e.afterSequence===void 0||e.commandId===null,{message:`A client event cannot have both command and position anchors`})),PW=e=>new Set(e).size===e.length,FW=B({chips:V(MW).check(K(4)),panel:V(jW).check(K(16)),timeline:B({cells:V(NW).check(K(32)),omitted:EW}),waiting:U(B({summary:xS,cancel:OW}))}).check(vg(e=>e.chips.length+e.panel.reduce((e,t)=>e+1+(t.inspection?.rows.length??0),0)+e.timeline.cells.reduce((e,t)=>e+t.rows.length,0)<=200,{message:`Client contribution exceeds 200 rows`}),vg(e=>PW(e.chips.map(e=>e.id))&&PW(e.panel.map(e=>e.id))&&e.panel.every(e=>PW((e.inspection?.rows??[]).map(e=>e.id)))&&PW(e.timeline.cells.map(e=>e.id))&&e.timeline.cells.every(e=>PW(e.rows.map(e=>e.id))),{message:`Client contribution contains duplicate identities`})),IW=Rh(B({protocol:L(`shiitake.client/v1`),id:CW,promptPresentation:F(L(`footer`)),attach:F(Eh(e=>Rt(e))),contribute:F(Eh(e=>Rt(e)))}).check(vg(e=>e.attach!==void 0||e.contribute!==void 0,{message:`Client entry requires attach or contribute`})),{onExcessProperty:`error`});function LW(e,t){if(t.contribute!==void 0&&e.projection===null)throw Error(`Client contribution requires a projection`);let n={protocol:`shiitake.client/v1`,id:e.id};t.promptPresentation!==void 0&&Object.assign(n,{promptPresentation:t.promptPresentation});let r=t.attach,i=t.contribute;return r!==void 0&&Object.assign(n,{attach:e=>TW(()=>r(e))}),i!==void 0&&Object.assign(n,{contribute:t=>i(yW(e,t))}),Object.freeze(IW(n))}var RW=`whistle.catalog/v1`,zW=128,BW=16,VW=E({protocol:gt(RW),commands:Ze(ca).max(zW)}).strict().transform(e=>{let t=new Set;for(let n of e.commands){if(t.has(n.id))throw Error(`Catalog command ${n.id} is repeated`);t.add(n.id)}return Object.freeze({protocol:RW,commands:Object.freeze(e.commands)})}),HW=e=>VW.parse(e),UW=Ke(`type`,[E({type:gt(`done`),notice:ba.optional(),result:qi.optional()}).strict(),E({type:gt(`prompt`),prompt:ya,notice:ba.optional(),next:E({arguments:Ji,answer:k().min(1).max(120)}).strict()}).strict()]).transform(e=>Object.freeze(e)),WW=e=>UW.parse(e);function GW(e){return e.text===void 0?{selected:e.selected}:{selected:e.selected,text:e.text}}function KW(e,t){if(t.arguments!==void 0)try{return Xi(t.arguments)}catch{throw new Ta(`invalid_arguments`,`${e.title}: arguments must be an object`)}let n=e.action?.presentation,r=t.interaction;if(r===void 0||n===void 0)return{};if(n.type===`choice`){let t=n.options;return r.prompt({type:`choice`,message:e.title,options:t.map((e,t)=>{let n={value:String(t),label:e.label};return e.description===void 0?n:{...n,description:e.description}})}).then(e=>Xi(t[Number(e)]?.value))}if(n.type===`confirmation`){let e={type:`confirmation`,message:n.message};return n.confirmLabel!==void 0&&(e.confirmLabel=n.confirmLabel),n.cancelLabel!==void 0&&(e.cancelLabel=n.cancelLabel),r.prompt(e).then(e=>e?{}:void 0)}return{}}function qW(e,t){return e.commands.map(e=>{let{availability:n,...r}=e,i={id:r.id,title:r.title,category:r.category,handler:async n=>{let r=n.signal??new AbortController().signal,i=n.interaction,a=await KW(e,n);if(a===void 0)return{cancelled:!0};let o=new Map;for(let n=0;n<BW;n+=1){r.throwIfAborted();let n=a,s=o,c=async()=>{let a={...n};try{if(i!==void 0)for(let[e,t]of s)Object.defineProperty(a,e,{value:await i.prompt(t),enumerable:!0,configurable:!0});let n=WW(await t(e.id,a,r)),o=new Map;if(n.type===`done`)return{reply:n,secrets:o};let c={...n.next.arguments};for(let[e,t]of s)e!==n.next.answer&&Object.hasOwn(c,e)&&o.set(e,t),Reflect.deleteProperty(c,e);return n.prompt.type===`text`&&n.prompt.secret===!0&&(o.set(n.next.answer,n.prompt),Reflect.deleteProperty(c,n.next.answer)),{reply:{...n,next:{...n.next,arguments:c}},secrets:o}}finally{for(let e of s.keys())Reflect.deleteProperty(a,e)}},{reply:l,secrets:u}=i===void 0?await c():await i.run(c);if(l.notice!==void 0&&i?.notify(l.notice),l.type===`done`)return l.result;if(i===void 0)throw new Ta(`interaction_required`,`${e.title} needs a person to answer: ${l.prompt.message}`);if(o=u,l.prompt.type===`text`&&l.prompt.secret===!0){a=l.next.arguments;continue}let d=l.prompt.type===`decision`?GW(await i.prompt(l.prompt)):await i.prompt(l.prompt);a={...l.next.arguments,[l.next.answer]:d}}throw new Ta(`flow_too_long`,`${e.title} asked too many questions.`)}};return r.description!==void 0&&(i.description=r.description),r.projections!==void 0&&(i.projections=r.projections),r.action!==void 0&&(i.action=r.action),n!==void 0&&(i.availability=()=>n),i})}var JW=Rh(FW,{onExcessProperty:`error`});function YW(e){return[...e.panel.flatMap(e=>e.actions??[]),...e.timeline.cells.flatMap(e=>e.rows.flatMap(e=>e.actions??[])),...e.waiting===null?[]:[e.waiting.cancel]]}function XW(e,t){let n=YW(e),r=e.panel.flatMap(e=>e.inspection===void 0?[]:[e.inspection]);if(n.length===0&&r.length===0)return;if(t?.status!==`running`||t.catalog===void 0)throw Error(`Client row actions require a running advertised catalog`);let i=HW(t.catalog),a=new Set(i.commands.map(e=>e.id));for(let e of r)if(!a.has(e.commandId))throw Error(`Client inspection ${e.commandId} is not advertised by its entry`);for(let e of n)if(!a.has(e.id))throw Error(`Client row action ${e.id} is not advertised by its entry`)}function ZW(e,t){try{let n=JW(e(t));return XW(n,t),{status:`admitted`,value:n}}catch(e){return{status:`failed`,error:e instanceof Error?e:Error(`Client contribution failed`,{cause:e})}}}function QW(e,t){let n=e.map(e=>IW(e));if(new Set(n.map(e=>e.id)).size!==n.length)throw Error(`Duplicate client contribution entry`);let r=new Map,i=new Map,a=new Map,o=new Set,s=[],c=!1;return{snapshot:()=>s,subscribe:e=>c?()=>void 0:(o.add(e),()=>{o.delete(e)}),update:e=>{if(c)return;let l=!1;for(let o of n){if(o.contribute===void 0)continue;let n=e[o.id];if(r.has(o.id)&&r.get(o.id)===n)continue;r.set(o.id,n),i.delete(o.id),l=!0;let s=ZW(o.contribute,n);if(s.status===`admitted`)i.set(o.id,{entryId:o.id,value:s.value}),a.delete(o.id);else{let{error:e}=s,n=`${e.name}: ${e.message}`;a.get(o.id)!==n&&t(o.id,e),a.set(o.id,n)}}if(l){s=n.flatMap(e=>{let t=i.get(e.id);return t===void 0?[]:[t]});for(let e of o)e()}},dispose:()=>{c=!0,r.clear(),a.clear(),i.clear(),s=[];for(let e of o)e();o.clear()}}}function $W(e){let t=new Set,n={title:e.title,status:`working`,links:[],retryable:!1},r,i,a=0,o,s=e=>{n={...n,...e};for(let e of t)e()},c=()=>n.message?.type===`progress`?n.message:{type:`progress`,message:e.title},l=t=>{i=void 0,o=void 0,t.status===`failed`?s({status:`failed`,failure:t.message,prompt:void 0,retryable:!1}):s({status:t.status===`handled`?`done`:`cancelled`,prompt:void 0,retryable:!1}),e.onEnd?.(t)};return{snapshot:()=>n,subscribe:e=>(t.add(e),()=>{t.delete(e)}),begin:()=>{r?.abort();let t=new AbortController;r=t;let u=t.signal;i=void 0,o=void 0,n={title:e.title,status:`working`,links:[],retryable:!1},s({});let d=()=>r===t&&!u.aborted,f=!1;return{interaction:{signal:u,run:async e=>{for(;;){u.throwIfAborted();try{return await e()}catch(e){if(!d()||!f)throw e;await new Promise((t,n)=>{let r=()=>{o=void 0,n(Error(`Interaction cancelled`,{cause:u.reason}))},i=()=>{!d()||o!==i||(o=void 0,u.removeEventListener(`abort`,r),s({status:`working`,message:c(),failure:void 0,retryable:!1,handoff:void 0}),t())};u.addEventListener(`abort`,r,{once:!0}),o=i,s({status:`failed`,failure:e instanceof Error?e.message:`Operation failed`,prompt:void 0,retryable:!0})})}}},prompt:(e,t)=>{let n=t?.signal===void 0?u:AbortSignal.any([u,t.signal]);n.throwIfAborted();let r=xa(e);f=!0;let o=wa(e),c=Promise.withResolvers(),l=++a,p=()=>{i?.sequence===l&&(i=void 0,d()&&s({status:`working`,prompt:void 0})),c.reject(n.reason)};return n.addEventListener(`abort`,p,{once:!0}),i={sequence:l,request:r,resolve:e=>{let t=o(e);return t.kind!==`invalid`&&(n.removeEventListener(`abort`,p),c.resolve(t.value),!0)}},s({status:`prompting`,prompt:{sequence:l,request:r}}),c.promise},notify:e=>{if(r!==t)return;let i=Sa(e);if(u.aborted){(i.type===`info`||i.type===`success`)&&s({closing:i});return}(i.type===`handoff`||i.type===`progress`)&&(f=!0),i.type===`handoff`?s({handoff:i}):s({message:i,links:i.type===`info`?i.links??[]:n.links})}},settle:e=>{r===t&&(r=void 0,l(u.aborted?{status:`cancelled`}:e))}}},retry:()=>o?.(),answer:(e,t)=>{let n=i;return n?.sequence!==e||!n.resolve(t)?!1:(i=void 0,s({status:`working`,message:c(),prompt:void 0}),!0)},cancel:()=>{if(r!==void 0){s({prompt:void 0}),r.abort(Error(`Interaction cancelled`));return}n.status===`failed`&&l({status:`cancelled`})}}}function eG(){let e={awaiting:{items:[],later:new Set,forced:!1,requests:0}},t=0,n,r=new Set,i=new Set,a=e=>{for(let t of i)t(e)},o=e=>{e.type===`info`&&a({variant:`info`,message:e.message})},s=t=>{e=t;for(let e of r)e()},c=t=>{s({...e,awaiting:{...e.awaiting,...t}})},l=t=>{let{items:n,later:r}=e.awaiting;n.some(e=>e.key===t)&&c({items:n.filter(e=>e.key!==t),later:new Set([...r].filter(e=>e!==t)),forced:!1})},u=t=>(c({items:[...e.awaiting.items.filter(({key:e})=>e!==t.key),t]}),()=>{l(t.key)}),d=t=>{e.open?.key===t&&s({...e,open:void 0})},f=({title:r})=>{let i=++t,a=!1,c=!1,l=$W({title:r,onEnd:t=>{n=t.status,f?.();let r=l.snapshot().message;if(!a){t.status===`failed`?s({...e,notice:{tone:`error`,message:t.message}}):r!==void 0&&o(r);return}if(t.status===`handled`&&c&&r!==void 0&&r.type!==`progress`)return;let u=l.snapshot().closing;t.status===`cancelled`&&u!==void 0&&o(u),t.status===`handled`&&r!==void 0&&o(r),t.status!==`failed`&&d(i)}}),f,p=l.subscribe(()=>{let t=l.snapshot();if(t.retryable&&(c=!0),f===void 0&&t.prompt?.request.type===`decision`){a&&(a=!1,d(i)),f=u({key:`interaction:${String(i)}`,kind:`question`,arrivedAt:Date.now(),host:l});return}if(f!==void 0||a||t.prompt===void 0&&t.handoff===void 0&&t.message?.type!==`progress`)return;a=!0;let n=e.open;s({...e,open:{key:i,host:l},notice:void 0}),n?.host.cancel()}),m=l.begin();return{interaction:m.interaction,settle:e=>{p(),m.settle(e)}}};return{snapshot:()=>e,subscribe:e=>(r.add(e),()=>{r.delete(e)}),close:()=>{let t=e.open;t!==void 0&&(s({...e,open:void 0}),t.host.cancel())},inspect:t=>{s({...e,inspection:t})},report:t=>{n=void 0,s({...e,notice:t})},toast:a,subscribeToasts:e=>(i.add(e),()=>{i.delete(e)}),attach:e=>e(f),lastEnd:()=>n,awaiting:{add:u,remove:l,later:t=>{e.awaiting.items.some(e=>e.key===t)&&c({later:new Set([...e.awaiting.later,t]),forced:!1})},focus:()=>{let{items:t,later:n,requests:r}=e.awaiting,i=[...t].sort((e,t)=>e.arrivedAt-t.arrivedAt).find(e=>n.has(e.key));c({later:i===void 0?n:new Set([...n].filter(e=>e!==i.key)),forced:t.length>0,requests:r+1})}}}}function tG(e){return`init`in e}function nG(e){return typeof e.write==`function`}function rG(e){return!!e.onMount}function iG(e){return`v`in e||`e`in e}function aG(e){if(`e`in e)throw e.e;return e.v}function oG(e){return typeof e?.then==`function`}function sG(e){if(!(e instanceof Error))return!1;let t=e.name,n=e.message.toLowerCase();return(t===`RangeError`||t===`InternalError`)&&(n.includes(`call stack`)||n.includes(`too much recursion`)||n.includes(`stack overflow`))}function cG(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function lG(e,t,n){let r=n.get(e)?.t,i=t.p;if(!r?.size)return i;if(!i.size)return r;let a=new Set(r);for(let e of i)a.add(e);return a}function uG(e){return!!e.INTERNAL_onInit}var dG=(e,t,n,...r)=>n.read(...r),fG=(e,t,n,...r)=>n.write(...r),pG=(e,t,n)=>n.INTERNAL_onInit(t),mG=(e,t,n,r)=>n.onMount?.call(n,r),hG=(e,t,n)=>{var r;let i=e[0],a=i.get(n);if(!a){let o=e[6],s=e[9];a={d:new Map,p:new Set,n:0},i.set(n,a),(r=o.i)==null||r.call(o,n),uG(n)&&s(e,t,n)}return a},gG=(e,t)=>{let n=e[1],r=e[3],i=e[4],a=e[5],o=e[6],s=e[13];if(!o.f&&!r.size&&!i.size&&!a.size)return;let c=[],l=e=>{try{e()}catch(e){c.push(e)}};do{o.f&&l(o.f);let c=new Set;for(let e of r){let t=n.get(e)?.l;if(t)for(let e of t)c.add(e)}r.clear();for(let e of a)c.add(e);a.clear();for(let e of i)c.add(e);i.clear();for(let e of c)l(e);r.size&&s(e,t)}while(r.size||a.size||i.size);if(c.length)throw AggregateError(c)},_G=(e,t)=>{let n=e[1],r=e[2],i=e[3],a=e[11],o=e[14],s=e[17];if(!i.size)return;let c=[],l=[],u=new WeakSet,d=new WeakSet,f=[],p=[];for(let n of i)f.push(n),p.push(a(e,t,n));for(;f.length;){let i=f.length-1,o=f[i],s=p[i];if(d.has(o)){f.pop(),p.pop();continue}if(u.has(o)){r.get(o)===s.n&&(c.push(o),l.push(s)),d.add(o),f.pop(),p.pop();continue}u.add(o);for(let r of lG(o,s,n))u.has(r)||(f.push(r),p.push(a(e,t,r)))}for(let n=c.length-1;n>=0;--n){let a=c[n],u=l[n],d=!1;for(let e of u.d.keys())if(e!==a&&i.has(e)){d=!0;break}d&&(r.set(a,u.n),o(e,t,a),s(e,t,a)),r.delete(a)}},vG=(e,t,n)=>{var r,i;let a=e[1],o=e[2],s=e[3],c=e[6],l=e[7],u=e[11],d=e[12],f=e[13],p=e[14],m=e[16],h=e[17],g=e[20],_=e[26],v=e[28],y=u(e,t,n),b=v[0];if(iG(y)){if(a.has(n)&&o.get(n)!==y.n||y.m===b)return y.m=b,y;let r=!1;for(let[n,i]of y.d)if(p(e,t,n).n!==i){r=!0;break}if(!r)return y.m=b,y}let x=!0,S=new Set(y.d.keys()),C=()=>{for(let e of S)y.d.delete(e)},w=()=>{if(a.has(n)){let r=!s.size;h(e,t,n),r&&(f(e,t),d(e,t))}},ee=r=>{var i;if(r===n){let n=u(e,t,r);if(!iG(n)){if(tG(r))g(e,t,r,r.init);else throw Error(`no atom init`)}return aG(n)}let o=p(e,t,r);try{return aG(o)}finally{S.delete(r),y.d.set(r,o.n),oG(y.v)&&cG(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},te,ne,re={get signal(){return te||=new AbortController,te.signal},get setSelf(){return!ne&&nG(n)&&(ne=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),ne}},ie=y.n,T=o.get(n)===ie;try{let i=l(e,t,n,ee,re);if(g(e,t,n,i),oG(i)){_(e,t,i,()=>te?.abort());let n=()=>{C(),w()};i.then(n,n)}else C();return(r=c.r)==null||r.call(c,n),y.m=b,y}catch(e){if(sG(e))throw e;return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==ie&&T&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},yG=(e,t,n)=>{let r=e[1],i=e[2],a=e[11],o=[n];for(;o.length;){let n=o.pop(),s=a(e,t,n);for(let c of lG(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},bG=(e,t,n,r)=>{let i=e[3],a=e[6],o=e[8],s=e[11],c=e[12],l=e[13],u=e[14],d=e[15],f=e[16],p=e[17],m=e[20],h=e[28],g=!0,_=n=>aG(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!tG(r))throw Error(`atom not writable`);let n=_.n,s=o[0];m(e,t,r,s),p(e,t,r),n!==_.n&&(++h[0],i.add(r),d(e,t,r),(u=a.c)==null||u.call(a,r));return}return f(e,t,r,o)}finally{g||(l(e,t),c(e,t))}};try{return o(e,t,n,_,v,...r)}finally{g=!1}},xG=(e,t,n)=>{var r;let i=e[1],a=e[3],o=e[6],s=e[11],c=e[15],l=e[18],u=e[19],d=s(e,t,n),f=i.get(n);if(f&&d.d.size>0){for(let[i,u]of d.d)if(!f.d.has(i)){let d=s(e,t,i);l(e,t,i).t.add(n),f.d.add(i),u!==d.n&&(a.add(i),c(e,t,i),(r=o.c)==null||r.call(o,i))}for(let r of f.d)d.d.has(r)||(f.d.delete(r),u(e,t,r)?.t.delete(n))}},SG=(e,t,n)=>{var r;let i=e[1],a=e[4],o=e[6],s=e[10],c=e[11],l=e[12],u=e[13],d=e[14],f=e[16],p=e[18],m=c(e,t,n),h=i.get(n);if(!h){d(e,t,n);for(let r of m.d.keys())p(e,t,r).t.add(n);h={l:new Set,d:new Set(m.d.keys()),t:new Set},i.set(n,h),nG(n)&&rG(n)&&a.add(()=>{let r=!0,i=(...i)=>{try{return f(e,t,n,i)}finally{r||(u(e,t),l(e,t))}};try{let a=s(e,t,n,i);a&&(h.u=()=>{r=!0;try{a()}finally{r=!1}})}finally{r=!1}}),(r=o.m)==null||r.call(o,n)}return h},CG=(e,t,n)=>{var r;let i=e[1],a=e[5],o=e[6],s=e[11],c=e[19],l=s(e,t,n),u=i.get(n);if(!u||u.l.size)return u;let d=!1;for(let e of u.t)if(i.get(e)?.d.has(n)){d=!0;break}if(!d){u.u&&a.add(u.u),u=void 0,i.delete(n);for(let r of l.d.keys())c(e,t,r)?.t.delete(n);(r=o.u)==null||r.call(o,n);return}return u},wG=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(oG(r))for(let a of o.d.keys())cG(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,oG(c)&&a(e,t,c))},TG=(e,t,n)=>{let r=e[14];return aG(r(e,t,n))},EG=(e,t,n,...r)=>{let i=e[3],a=e[12],o=e[13],s=e[16],c=i.size;try{return s(e,t,n,r)}finally{i.size!==c&&(o(e,t),a(e,t))}},DG=(e,t,n,r)=>{let i=e[12],a=e[13],o=e[18],s=e[19],c=o(e,t,n).l;return c.add(r),a(e,t),i(e,t),()=>{c.delete(r),s(e,t,n),a(e,t),i(e,t)}},OG=(e,t,n,r)=>{let i=e[25],a=i.get(n);if(!a){a=new Set,i.set(n,a);let e=()=>i.delete(n);n.then(e,e)}a.add(r)},kG=(e,t,n)=>{e[25].get(n)?.forEach(e=>e())},AG=new WeakMap;function jG(...e){let t={get(e){return r(n,t,e)},set(e,...r){return i(n,t,e,...r)},sub(e,r){return a(n,t,e,r)}},n=[new WeakMap,new WeakMap,new WeakMap,new Set,new Set,new Set,{},dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,void 0,new WeakMap,OG,kG,[0]].map((t,n)=>e[n]||t);AG.set(t,Object.freeze(n));let r=n[21],i=n[22],a=n[23];return t}var MG=0;function $(e,t){let n=`atom${++MG}`,r={toString(){return n}};return typeof e==`function`?r.read=e:(r.init=e,r.read=NG,r.write=PG),t&&(r.write=t),r}function NG(e){return e(this)}function PG(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}function FG(){return jG()}var IG=$(new yv),LG=(e,t,n)=>e?.suspense&&RG(t),RG=(e,t)=>e.isPending&&!0,zG=({result:e,throwOnError:t,query:n})=>e.isError&&!e.isFetching&&BG(t,[e.error,n]);function BG(e,t){return typeof e==`function`?e(...t):!!e}var VG=e=>e.suspense&&typeof e.staleTime!=`number`?{...e,staleTime:1e3}:e;function HG(e,t,n=e=>e(IG)){let r=$(0),i=$(n),a=$(()=>new WeakMap),o=$(t=>{let n=t(i),r=e(t),o=n.defaultQueryOptions(r),s=t(a).get(n);return o._optimisticResults=`optimistic`,s&&s.setOptions(o),VG(o)}),s=$(e=>{let n=e(i),r=e(o),s=e(a),c=s.get(n);if(c)return c;let l=new t(n,r);return s.set(n,l),l}),c=$(e=>{let t=e(s),n=e(o),r=$(t.getOptimisticResult(n));return r.onMount=e=>{let n=t.subscribe(W_.batchCalls(e));return()=>{t.getCurrentResult().isError&&t.getCurrentQuery().reset(),n()}},r});return $(e=>{e(r);let t=e(s),n=e(o),i=e(e(c));if(LG(n,i))return t.fetchOptimistic(n);if(zG({result:i,query:t.getCurrentQuery(),throwOnError:n.throwOnError}))throw i.error;return i},(e,t)=>{t(r,e=>e+1)})}function UG(e,t=e=>e(IG)){return HG(e,ov,t)}function WG(e,t=e=>e(IG)){return HG(e,fv,t)}function GG(e,t=e=>e(IG)){let n=Symbol(),r=$(n=>{let r=t(n),i=e(n);return r.defaultMutationOptions(i)}),i=$(()=>new WeakMap),a=$(e=>{let a=e(r),o=t(e),s=e(i),c=s.get(o);if(c)return c[n]=!0,c.setOptions(a),delete c[n],c;let l=new _v(o,a);return s.set(o,l),l}),o=$(e=>{let t=e(a),n=$(t.getCurrentResult());return n.onMount=e=>(t.subscribe(W_.batchCalls(e)),()=>{t.reset()}),n}),s=$(e=>{let t=e(a);return(e,n)=>{t.mutate(e,n).catch(KG)}});return $(e=>{let t=e(a),n=e(e(o)),r=e(s);if(n.isError&&BG(t.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:r,mutateAsync:n.mutate}})}function KG(){}var qG=160;function JG(e,t){return e.replace(/\s+/gu,` `).trim().slice(0,t)}function YG(e){return PV(MM(e).replace(/[\p{Cc}\u200b\u200e\u200f\u061c\u202a-\u202e\u2066-\u2069\u2060\ufeff]/gu,e=>/\s/u.test(e)?` `:``))}function XG({activity:e,terminals:t}){let n;for(let e of t)(n===void 0||e.sequence>n.sequence)&&(n=e);if(n===void 0)return{kind:`idle`};if(e.lastModelChoiceSequence!==null&&e.lastModelChoiceSequence>n.sequence)return{kind:`waiting_for_you`};if(n.outcome===`failed`||n.outcome===`interrupted`){let e=n.outcome===`interrupted`?`Run was interrupted`:`Run failed without a diagnostic`;return{kind:`error`,cause:YG(n.diagnostic??e)??e}}return{kind:`waiting_for_you`}}function ZG(e){let{activity:t,progress:n}=e,{queue:r}=t;return r.state===`idle`?XG(e):t.cancellationRequested?{kind:`cancelling`}:r.state===`queued`?{kind:`queued`,queuedCommandId:r.commandId,runningWork:r.runningWork}:t.compaction===null?t.retry===null?t.activeTool===null?{kind:n===null||n.text===``?`thinking`:`responding`}:{kind:`running_tool`,tool:t.activeTool}:{kind:`retrying`,attempt:t.retry.attempt,maxAttempts:t.retry.maxAttempts,cause:JG(t.retry.errorMessage,qG),nextRetryAt:t.retry.scheduledAt+t.retry.delayMs}:{kind:`compacting`,trigger:t.compaction.trigger}}function QG(e,t){return e===null||t===null?e===t:e.phase===t.phase}function $G(e,t){return e.kind===t.kind?e.kind===`queued`&&t.kind===`queued`?e.queuedCommandId===t.queuedCommandId&&QG(e.runningWork,t.runningWork):e.kind===`running_tool`&&t.kind===`running_tool`?e.tool===t.tool:e.kind===`compacting`&&t.kind===`compacting`?e.trigger===t.trigger:e.kind===`retrying`&&t.kind===`retrying`?e.attempt===t.attempt&&e.maxAttempts===t.maxAttempts&&e.cause===t.cause&&e.nextRetryAt===t.nextRetryAt:e.kind===`error`&&t.kind===`error`?e.cause===t.cause:!0:!1}function eK(e){switch(e.kind){case`cancelling`:case`queued`:case`retrying`:return e.kind;case`responding`:return`streaming`;case`thinking`:case`running_tool`:case`compacting`:return`thinking`;case`idle`:case`waiting_for_you`:case`error`:return`idle`}}var tK=new WeakMap;function nK(e){let t=tK.get(e);if(t!==void 0)return t;let n=new Set(e.map(({id:e})=>e));return tK.set(e,n),n}function rK(e,t){if(t.length===0)return e;let n=new Set(e.map(({id:e})=>e)),r=t.filter(({id:e})=>!n.has(e));return r.length===0?e:[...e,...r].sort((e,t)=>e.sequence-t.sequence)}function iK(e,t){return rK(e,t)}function aK(e,t){return e===null||nK(t).has(e.messageId)?null:e}function oK(e,t){let n=[],r=new Map;for(let i of[...e,...t])r.get(i.commandId)===void 0&&(r.set(i.commandId,n.length),n.push(i));return n.length===e.length&&n.every((t,n)=>t===e[n])?e:n}function sK(e,t){return rK(e,t)}function cK(e,t){return rK(e,t)}function lK(e,t){return e.length===t.length&&e.every((e,n)=>{let r=t[n];return e.extensionId===r?.extensionId&&e.id===r.id&&e.kind===r.kind&&e.summary===r.summary&&e.since===r.since&&e.expiresAt===r.expiresAt})}function uK(e,t){return e.total===t.total&&e.hasMore===t.hasMore&&e.prompts.length===t.prompts.length&&e.prompts.every((e,n)=>{let r=t.prompts[n];return r!==void 0&&e.commandId===r.commandId&&e.delivery===r.delivery&&e.text===r.text})}function dK(e,t){return e===t||e.queue.state===t.queue.state&&(e.queue.state===`idle`||t.queue.state===`idle`||e.queue.commandId===t.queue.commandId&&(e.queue.state!==`queued`||t.queue.state!==`queued`||QG(e.queue.runningWork,t.queue.runningWork)))&&e.cancellationRequested===t.cancellationRequested&&e.activeTool===t.activeTool&&e.lastModelChoiceSequence===t.lastModelChoiceSequence&&(e.retry===t.retry||e.retry!==null&&t.retry!==null&&e.retry.attempt===t.retry.attempt&&e.retry.maxAttempts===t.retry.maxAttempts&&e.retry.delayMs===t.retry.delayMs&&e.retry.errorMessage===t.retry.errorMessage&&e.retry.scheduledAt===t.retry.scheduledAt)&&(e.compaction===t.compaction||e.compaction!==null&&t.compaction!==null&&e.compaction.trigger===t.compaction.trigger)}function fK(e,t){return e===t||JSON.stringify(e)===JSON.stringify(t)}function pK(e,t){if(t.kind===`heartbeat`)return e;if(t.kind===`reset`)return{...t.baseline,terminals:oK([],t.baseline.terminals),compactions:sK([],t.baseline.compactions??[]),compactionNotices:cK([],t.baseline.compactionNotices??[])};if(t.kind===`activity`)return dK(e.activity,t.activity)?e:{...e,activity:t.activity};if(t.kind===`tool_output`){let n=new Set(e.messages.flatMap(e=>e.value.role===`toolResult`?[e.value.toolCallId]:[])),r=t.toolOutput.filter(e=>!n.has(e.toolCallId)).map(t=>{let n=e.toolOutput.find(e=>e.toolCallId===t.toolCallId);return n!==void 0&&n.revision>t.revision?n:t});return{...e,activity:t.activity,toolOutput:r}}if(t.kind===`progress`){let n=nK(e.messages).has(t.progress.messageId),r=e.progress,i=r!==null&&r.messageId===t.progress.messageId,a=i&&r.revision>t.progress.revision;if(n||a)return e;let o=dK(e.activity,t.activity)?e.activity:t.activity;return i&&r.revision===t.progress.revision?o===e.activity?e:{...e,activity:o}:{...e,progress:bW(e.progress,t.progress),activity:o}}let n=uK(e.pending,t.pending)?e.pending:t.pending,r=iK(e.messages,t.messages),i=new Set(r.flatMap(e=>e.value.role===`toolResult`?[e.value.toolCallId]:[])),a=e.toolOutput.filter(e=>t.activity.queue.state!==`idle`&&!i.has(e.toolCallId)),o=oK(e.terminals,t.terminals),s=e.compactions??[],c=sK(s,t.compactions??[]),l=e.compactionNotices??[],u=cK(l,t.compactionNotices??[]),d=t.activity.queue.state===`idle`?null:aK(e.progress,r),f=t.context===void 0||e.context?.tokens===t.context.tokens&&e.context.window===t.context.window?e.context:t.context;if(r===e.messages&&o===e.terminals&&c===s&&u===l&&d===e.progress&&a.length===e.toolOutput.length&&n===e.pending&&fK(t.extensions,e.extensions)&&lK(t.attention,e.attention)&&t.cursor===e.cursor&&dK(t.activity,e.activity)&&f===e.context)return e;let p={...e,cursor:t.cursor,messages:r,terminals:o,compactions:c,compactionNotices:u,progress:d,toolOutput:a,activity:dK(e.activity,t.activity)?e.activity:t.activity,pending:n,attention:lK(t.attention,e.attention)?e.attention:t.attention,extensions:fK(t.extensions,e.extensions)?e.extensions:t.extensions};return f===void 0?p:{...p,context:f}}var mK=Ht(k(),be());function hK(e){return e!==void 0&&/[^\s\p{Cf}]/u.test(e)}function gK(e){return e.text.trim()!==``||hK(e.thinking)}function _K(e){let t;for(e.type===`ExpressionStatement`?t=e.expression:e.type===`ReturnStatement`?t=e.argument:e.type===`VariableDeclaration`&&(t=e.declarations[0]?.init);t?.type===`AwaitExpression`;)t=t.argument;return t?.type===`CallExpression`?t:void 0}var vK=k();function yK(e){if(e?.type===`Literal`){let t=vK.safeParse(e.value);return t.success?t.data:void 0}if(e?.type===`TemplateLiteral`&&e.quasis.length===1)return e.quasis[0]?.value.cooked??void 0}function bK(e){return e.type===`Identifier`?e.name:yK(e)}function xK(e){let t;try{t=bR(e,{ecmaVersion:`latest`,allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0})}catch(e){if(e instanceof SyntaxError)return;throw e}for(let e of t.body){let n=_K(e);if(n===void 0)continue;let{callee:r}=n;if(r.type!==`MemberExpression`||r.computed||r.property.type!==`Identifier`)continue;let i=n.arguments[0];if(i?.type===`ObjectExpression`){for(let e of i.properties)if(e.type===`Property`&&!e.computed&&bK(e.key)===`command`){let n=yK(e.value);if(n!==void 0)return{tool:r.property.name,command:n,alone:t.body.length===1}}}}}var SK=[[`*** Add File: `,`add`],[`*** Delete File: `,`delete`],[`*** Update File: `,`update`]],CK=/^\*\*\* Move to: (.+)$/u;function wK(e){if(e.startsWith(`+`))return{kind:`add`,text:e.slice(1)};if(e.startsWith(`-`))return{kind:`remove`,text:e.slice(1)};if(e.startsWith(` `))return{kind:`context`,text:e.slice(1)}}function TK(e){let t=[],n;for(let r of e.split(`
35
+ `)){let e=SK.find(([e])=>r.startsWith(e));if(e!==void 0){let[i,a]=e;n={operation:a,path:r.slice(i.length).trim(),hunks:[]},t.push(n);continue}if(n===void 0)continue;let i=CK.exec(r);if(i!==null){n.moveTo=(i[1]??``).trim();continue}if(r.startsWith(`@@`)){let e=r.slice(2).trim();n.hunks.push(e===``?{lines:[]}:{context:e,lines:[]});continue}let a=wK(r);if(a===void 0)continue;let o=n.hunks.at(-1)??{lines:[]};n.hunks.length===0&&n.hunks.push(o),o.lines.push(a)}return t}var EK=131072,DK=524288,OK=new TextEncoder,kK=A(()=>k().min(1).max(4096).refine(e=>!e.includes(`\0`),`Path cannot contain null bytes`));function AK(e=0){return k().min(e).refine(e=>OK.encode(e).byteLength<=EK,`Text exceeds the ${String(EK)}-byte Files bound`)}A(()=>pe({path:kK,offset:Lt().int().min(0).default(0),limit:Lt().int().min(4).max(EK).default(EK)}));var jK=A(()=>pe({computerId:k().min(1).max(256),path:kK.refine(e=>e.startsWith(`/`),`Computer file paths must be absolute`)})),MK=St([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]),NK=A(()=>pe({path:kK,image:pe({mimeType:MK,data:mr(),bytes:Lt().int().min(1).max(DK)}),file:jK.exactOptional()})),PK=A(()=>pe({path:kK,content:AK(),offset:Lt().int().min(0),nextOffset:Lt().int().min(0).nullable(),truncated:cr(),file:jK.exactOptional()})),FK=A(()=>pe({path:kK,image:pe({ref:k().min(1).max(32),mimeType:MK,bytes:Lt().int().min(1).max(DK)})}));A(()=>en([PK,FK]));var IK=A(()=>en([PK,NK])),LK=class{diff(e,t,n={}){let r;typeof n==`function`?(r=n,n={}):`callback`in n&&(r=n.callback);let i=this.castInput(e,n),a=this.castInput(t,n),o=this.removeEmpty(this.tokenize(i,n)),s=this.removeEmpty(this.tokenize(a,n));return this.diffWithOptionsObj(o,s,n,r)}diffWithOptionsObj(e,t,n,r){let i=e=>{if(e=this.postProcess(e,n),r){setTimeout(function(){r(e)},0);return}return e},a=t.length,o=e.length,s=1,c=a+o;n.maxEditLength!=null&&(c=Math.min(c,n.maxEditLength));let l=n.timeout??1/0,u=Date.now()+l,d=[{oldPos:-1,lastComponent:void 0}],f=this.extractCommon(d[0],t,e,0,n);if(d[0].oldPos+1>=o&&f+1>=a)return i(this.buildValues(d[0].lastComponent,t,e));let p=-1/0,m=1/0,h=()=>{for(let r=Math.max(p,-s);r<=Math.min(m,s);r+=2){let s,c=d[r-1],l=d[r+1];c&&(d[r-1]=void 0);let u=!1;if(l){let e=l.oldPos-r;u=l&&0<=e&&e<a}let h=c&&c.oldPos+1<o;if(!u&&!h){d[r]=void 0;continue}if(s=!h||u&&c.oldPos<l.oldPos?this.addToPath(l,!0,!1,0,n):this.addToPath(c,!1,!0,1,n),f=this.extractCommon(s,t,e,r,n),s.oldPos+1>=o&&f+1>=a)return i(this.buildValues(s.lastComponent,t,e))||!0;d[r]=s,s.oldPos+1>=o&&(m=Math.min(m,r-1)),f+1>=a&&(p=Math.max(p,r+1))}s++};if(r)(function e(){setTimeout(function(){if(s>c||Date.now()>u)return r(void 0);h()||e()},0)})();else for(;s<=c&&Date.now()<=u;){let e=h();if(e)return e}}addToPath(e,t,n,r,i){let a=e.lastComponent;return a&&!i.oneChangePerToken&&a.added===t&&a.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:a.count+1,added:t,removed:n,previousComponent:a.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:a}}}extractCommon(e,t,n,r,i){let a=t.length,o=n.length,s=e.oldPos,c=s-r,l=0;for(;c+1<a&&s+1<o&&this.equals(n[s+1],t[c+1],i);)c++,s++,l++,i.oneChangePerToken&&(e.lastComponent={count:1,previousComponent:e.lastComponent,added:!1,removed:!1});return l&&!i.oneChangePerToken&&(e.lastComponent={count:l,previousComponent:e.lastComponent,added:!1,removed:!1}),e.oldPos=s,c}equals(e,t,n){return n.comparator?n.comparator(e,t):e===t||!!n.ignoreCase&&e.toLowerCase()===t.toLowerCase()}removeEmpty(e){let t=[];for(let n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t}castInput(e,t){return e}tokenize(e,t){return Array.from(e)}join(e){return e.join(``)}postProcess(e,t){return e}get useLongestToken(){return!1}buildValues(e,t,n){let r=[],i;for(;e;)r.push(e),i=e.previousComponent,delete e.previousComponent,e=i;r.reverse();let a=r.length,o=0,s=0,c=0;for(;o<a;o++){let e=r[o];if(e.removed)e.value=this.join(n.slice(c,c+e.count)),c+=e.count;else{if(!e.added&&this.useLongestToken){let r=t.slice(s,s+e.count);r=r.map(function(e,t){let r=n[c+t];return r.length>e.length?r:e}),e.value=this.join(r)}else e.value=this.join(t.slice(s,s+e.count));s+=e.count,e.added||(c+=e.count)}}return r}};new class extends LK{};function RK(e,t){let n;for(n=0;n<e.length&&n<t.length;n++)if(e[n]!=t[n])return e.slice(0,n);return e.slice(0,n)}function zK(e,t){let n;if(!e||!t||e[e.length-1]!=t[t.length-1])return``;for(n=0;n<e.length&&n<t.length;n++)if(e[e.length-(n+1)]!=t[t.length-(n+1)])return e.slice(-n);return e.slice(-n)}function BK(e,t,n){if(e.slice(0,t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't start with prefix ${JSON.stringify(t)}; this is a bug`);return n+e.slice(t.length)}function VK(e,t,n){if(!t)return e+n;if(e.slice(-t.length)!=t)throw Error(`string ${JSON.stringify(e)} doesn't end with suffix ${JSON.stringify(t)}; this is a bug`);return e.slice(0,-t.length)+n}function HK(e,t){return BK(e,t,``)}function UK(e,t){return VK(e,t,``)}function WK(e,t){return t.slice(0,GK(e,t))}function GK(e,t){let n=0;e.length>t.length&&(n=e.length-t.length);let r=t.length;e.length<t.length&&(r=e.length);let i=Array(r),a=0;i[0]=0;for(let e=1;e<r;e++){for(t[e]==t[a]?i[e]=i[a]:i[e]=a;a>0&&t[e]!=t[a];)a=i[a];t[e]==t[a]&&a++}a=0;for(let r=n;r<e.length;r++){for(;a>0&&e[r]!=t[a];)a=i[a];e[r]==t[a]&&a++}return a}function KK(e,t){let n=[];for(let r of Array.from(t.segment(e))){let e=r.segment;n.length&&/\s/.test(n[n.length-1])&&/\s/.test(e)?n[n.length-1]+=e:n.push(e)}return n}function qK(e,t){if(t)return YK(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function JK(e,t){if(t)return YK(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function YK(e,t){if(!t)return[JK(e),qK(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=KK(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var XK=`a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}`,ZK=RegExp(`[${XK}]+|\\s+|[^${XK}]`,`ug`);new class extends LK{equals(e,t,n){return n.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e.trim()===t.trim()}tokenize(e,t={}){let n;if(t.intlSegmenter){let r=t.intlSegmenter;if(r.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);n=KK(e,r)}else n=e.match(ZK)||[];let r=[],i=null;return n.forEach(e=>{/\s/.test(e)?i==null?r.push(e):r.push(r.pop()+e):i!=null&&/\s/.test(i)?r[r.length-1]==i?r.push(r.pop()+e):r.push(i+e):r.push(e),i=e}),r}join(e){return e.map((e,t)=>t==0?e:e.replace(/^\s+/,``)).join(``)}postProcess(e,t){if(!e||t.oneChangePerToken)return e;let n=null,r=null,i=null;return e.forEach(e=>{e.added?r=e:e.removed?i=e:((r||i)&&QK(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&QK(n,i,r,null,t.intlSegmenter),e}};function QK(e,t,n,r,i){if(t&&n){let[a,o]=YK(t.value,i),[s,c]=YK(n.value,i);if(e){let r=RK(a,s);e.value=VK(e.value,s,r),t.value=HK(t.value,r),n.value=HK(n.value,r)}if(r){let e=zK(o,c);r.value=BK(r.value,c,e),t.value=UK(t.value,e),n.value=UK(n.value,e)}}else if(n){if(e){let e=JK(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=JK(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=JK(r.value,i),[a,o]=YK(t.value,i),s=RK(n,a);t.value=HK(t.value,s);let c=zK(HK(n,s),o);t.value=UK(t.value,c),r.value=BK(r.value,n,c),e.value=VK(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=JK(r.value,i),n=WK(qK(t.value,i),e);t.value=UK(t.value,n)}else if(e){let n=WK(qK(e.value,i),JK(t.value,i));t.value=HK(t.value,n)}}new class extends LK{tokenize(e){let t=RegExp(`(\\r?\\n)|[${XK}]+|[^\\S\\n\\r]+|[^${XK}]`,`ug`);return e.match(t)||[]}};var $K=new class extends LK{constructor(){super(...arguments),this.tokenize=tq}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
36
36
  `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
37
37
  `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
38
38
  `)&&(e=e.slice(0,-1)),t.endsWith(`
39
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function QK(e,t,n){return ZK.diff(e,t,n)}function $K(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
40
- `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function eq(e){return e==`.`||e==`!`||e==`?`}new class extends FK{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(eq(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends FK{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends FK{constructor(){super(...arguments),this.tokenize=$K}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(tq(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function tq(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=tq(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=tq(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends FK{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function nq(e){let t=e.split(/\n/),n=[],r=0;function i(){let e={};for(n.push(e);r<t.length;){let n=t[r];if(/^(---|\+\+\+|@@)\s/.test(n))break;let i=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(n);i&&(e.index=n.substring(i[0].length).trim()),r++}for(a(e),a(e),e.hunks=[];r<t.length;){let n=t[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(n))break;if(/^@@/.test(n))e.hunks.push(o());else if(n)throw Error(`Unknown line `+(r+1)+` `+JSON.stringify(n));else r++}}function a(e){let n=/^(---|\+\+\+)\s+/.exec(t[r]);if(n){let i=n[1],a=t[r].substring(3).trim().split(` `,2),o=(a[1]||``).trim(),s=a[0].replace(/\\\\/g,`\\`);s.startsWith(`"`)&&s.endsWith(`"`)&&(s=s.substr(1,s.length-2)),i===`---`?(e.oldFileName=s,e.oldHeader=o):(e.newFileName=s,e.newHeader=o),r++}}function o(){let e=r,n=t[r++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),i={oldStart:+n[1],oldLines:n[2]===void 0?1:+n[2],newStart:+n[3],newLines:n[4]===void 0?1:+n[4],lines:[]};i.oldLines===0&&(i.oldStart+=1),i.newLines===0&&(i.newStart+=1);let a=0,o=0;for(;r<t.length&&(o<i.oldLines||a<i.newLines||t[r]?.startsWith(`\\`));r++){let n=t[r].length==0&&r!=t.length-1?` `:t[r][0];if(n===`+`||n===`-`||n===` `||n===`\\`)i.lines.push(t[r]),n===`+`?a++:n===`-`?o++:n===` `&&(a++,o++);else throw Error(`Hunk at line ${e+1} contained invalid line ${t[r]}`)}if(!a&&i.newLines===1&&(i.newLines=0),!o&&i.oldLines===1&&(i.oldLines=0),a!==i.newLines)throw Error(`Added line count did not match for hunk at line `+(e+1));if(o!==i.oldLines)throw Error(`Removed line count did not match for hunk at line `+(e+1));return i}for(;r<t.length;)i();return n}var rq={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function iq(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;QK(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(QK(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||oq(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
41
- `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function aq(e,t){if(t||=rq,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>aq(e,t)).join(`
39
+ `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function eq(e,t,n){return $K.diff(e,t,n)}function tq(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
40
+ `));let n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let e=0;e<r.length;e++){let i=r[e];e%2&&!t.newlineIsToken?n[n.length-1]+=i:n.push(i)}return n}function nq(e){return e==`.`||e==`!`||e==`?`}new class extends LK{tokenize(e){let t=[],n=0;for(let r=0;r<e.length;r++){if(r==e.length-1){t.push(e.slice(n));break}if(nq(e[r])&&e[r+1].match(/\s/)){for(t.push(e.slice(n,r+1)),r=n=r+1;e[r+1]?.match(/\s/);)r++;t.push(e.slice(n,r+1)),n=r+1}}return t}},new class extends LK{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends LK{constructor(){super(...arguments),this.tokenize=tq}get useLongestToken(){return!0}castInput(e,t){let{undefinedReplacement:n,stringifyReplacer:r=(e,t)=>t===void 0?n:t}=t;return typeof e==`string`?e:JSON.stringify(rq(e,null,null,r),null,` `)}equals(e,t,n){return super.equals(e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`),n)}};function rq(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i===void 0?``:i,e));let a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];let o;if(Object.prototype.toString.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=rq(e[a],t,n,r,String(a));return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),typeof e==`object`&&e){t.push(e),o={},n.push(o);let i=[],s;for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&i.push(s);for(i.sort(),a=0;a<i.length;a+=1)s=i[a],o[s]=rq(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends LK{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function iq(e){let t=e.split(/\n/),n=[],r=0;function i(){let e={};for(n.push(e);r<t.length;){let n=t[r];if(/^(---|\+\+\+|@@)\s/.test(n))break;let i=/^(?:Index:|diff(?: -r \w+)+)\s+/.exec(n);i&&(e.index=n.substring(i[0].length).trim()),r++}for(a(e),a(e),e.hunks=[];r<t.length;){let n=t[r];if(/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/.test(n))break;if(/^@@/.test(n))e.hunks.push(o());else if(n)throw Error(`Unknown line `+(r+1)+` `+JSON.stringify(n));else r++}}function a(e){let n=/^(---|\+\+\+)\s+/.exec(t[r]);if(n){let i=n[1],a=t[r].substring(3).trim().split(` `,2),o=(a[1]||``).trim(),s=a[0].replace(/\\\\/g,`\\`);s.startsWith(`"`)&&s.endsWith(`"`)&&(s=s.substr(1,s.length-2)),i===`---`?(e.oldFileName=s,e.oldHeader=o):(e.newFileName=s,e.newHeader=o),r++}}function o(){let e=r,n=t[r++].split(/@@ -(\d+)(?:,(\d+))? \+(\d+)(?:,(\d+))? @@/),i={oldStart:+n[1],oldLines:n[2]===void 0?1:+n[2],newStart:+n[3],newLines:n[4]===void 0?1:+n[4],lines:[]};i.oldLines===0&&(i.oldStart+=1),i.newLines===0&&(i.newStart+=1);let a=0,o=0;for(;r<t.length&&(o<i.oldLines||a<i.newLines||t[r]?.startsWith(`\\`));r++){let n=t[r].length==0&&r!=t.length-1?` `:t[r][0];if(n===`+`||n===`-`||n===` `||n===`\\`)i.lines.push(t[r]),n===`+`?a++:n===`-`?o++:n===` `&&(a++,o++);else throw Error(`Hunk at line ${e+1} contained invalid line ${t[r]}`)}if(!a&&i.newLines===1&&(i.newLines=0),!o&&i.oldLines===1&&(i.oldLines=0),a!==i.newLines)throw Error(`Added line count did not match for hunk at line `+(e+1));if(o!==i.oldLines)throw Error(`Removed line count did not match for hunk at line `+(e+1));return i}for(;r<t.length;)i();return n}var aq={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function oq(e,t,n,r,i,a,o){let s;s=o?typeof o==`function`?{callback:o}:o:{},s.context===void 0&&(s.context=4);let c=s.context;if(s.newlineIsToken)throw Error(`newlineIsToken may not be used with patch-generation functions, only with diffing functions`);if(s.callback){let{callback:e}=s;eq(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(eq(n,r,s));function l(n){if(!n)return;n.push({value:``,lines:[]});function r(e){return e.map(function(e){return` `+e})}let o=[],s=0,l=0,u=[],d=1,f=1;for(let e=0;e<n.length;e++){let t=n[e],i=t.lines||cq(t.value);if(t.lines=i,t.added||t.removed){if(!s){let t=n[e-1];s=d,l=f,t&&(u=c>0?r(t.lines.slice(-c)):[],s-=u.length,l-=u.length)}for(let e of i)u.push((t.added?`+`:`-`)+e);t.added?f+=i.length:d+=i.length}else{if(s){if(i.length<=c*2&&e<n.length-2)for(let e of r(i))u.push(e);else{let e=Math.min(i.length,c);for(let t of r(i.slice(0,e)))u.push(t);let t={oldStart:s,oldLines:d-s+e,newStart:l,newLines:f-l+e,lines:u};o.push(t),s=0,l=0,u=[]}}d+=i.length,f+=i.length}}for(let e of o)for(let t=0;t<e.lines.length;t++)e.lines[t].endsWith(`
41
+ `)?e.lines[t]=e.lines[t].slice(0,-1):(e.lines.splice(t+1,0,`\`),t++);return{oldFileName:e,newFileName:t,oldHeader:i,newHeader:a,hunks:o}}}function sq(e,t){if(t||=aq,Array.isArray(e)){if(e.length>1&&!t.includeFileHeaders)throw Error(`Cannot omit file headers on a multi-file patch. (The result would be unparseable; how would a tool trying to apply the patch know which changes are to which file?)`);return e.map(e=>sq(e,t)).join(`
42
42
  `)}let n=[];t.includeIndex&&e.oldFileName==e.newFileName&&n.push(`Index: `+e.oldFileName),t.includeUnderline&&n.push(`===================================================================`),t.includeFileHeaders&&(n.push(`--- `+e.oldFileName+(e.oldHeader===void 0?``:` `+e.oldHeader)),n.push(`+++ `+e.newFileName+(e.newHeader===void 0?``:` `+e.newHeader)));for(let t=0;t<e.hunks.length;t++){let r=e.hunks[t];r.oldLines===0&&--r.oldStart,r.newLines===0&&--r.newStart,n.push(`@@ -`+r.oldStart+`,`+r.oldLines+` +`+r.newStart+`,`+r.newLines+` @@`);for(let e of r.lines)n.push(e)}return n.join(`
43
43
  `)+`
44
- `}function oq(e){let t=e.endsWith(`
44
+ `}function cq(e){let t=e.endsWith(`
45
45
  `),n=e.split(`
46
46
  `).map(e=>e+`
47
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}var sq=512,cq=256,lq=100;`${String(TK/1024)}`,new TextEncoder;var uq=Lt().int().min(1).max(cq).default(lq),dq=k().min(1).max(sq);A(()=>pe({path:DK.default(`.`),limit:uq})),A(()=>pe({path:DK.default(`.`),pattern:dq,limit:uq})),A(()=>pe({path:DK.default(`.`),pattern:dq,include:dq.optional(),regex:cr().default(!1),ignoreCase:cr().default(!1),limit:uq}));var fq=A(()=>pe({path:DK,type:St([`file`,`directory`,`symlink`]).exactOptional(),line:Lt().int().positive().exactOptional(),text:k().exactOptional()}));A(()=>pe({path:DK,results:Ze(fq).max(cq),truncated:St([`limit`,`scan`]).nullable()})),A(()=>pe({path:DK,oldText:OK(1),newText:OK()}));var pq=A(()=>pe({path:DK,bytes:Lt().int().nonnegative(),diff:k(),firstChangedLine:Lt().int().positive().nullable(),unifiedPatch:k().nullable(),unifiedPatchBytes:Lt().int().nonnegative(),unifiedPatchAddedLines:Lt().int().nonnegative(),unifiedPatchRemovedLines:Lt().int().nonnegative(),unifiedPatchTruncated:cr()})),mq=A(()=>pe({status:gt(`failed`),error:pe({kind:St([`not-found`,`ambiguous`,`file-too-large`,`partial-character`,`not-text`,`unchanged`,`conflict`,`read-only`]),path:DK,message:k()})}));en([pq,mq]);var hq=`Search skips .git and gitignored paths.`;`${hq}`,`${hq}`,`${hq}`;function gq(e,t){console.error(JSON.stringify({event:`parakeet_operation_failed`,operation:e,causeKind:t instanceof Error?`error`:`non_error`}),Yc(t))}function _q(e,t=!1){return e===`error`?t?`neutral`:`error`:e===`unknown`?`neutral`:e===`running`?`info`:`success`}var vq={code:`computer`,command:`run`,edit:`write`,other:`working`,read:`read`,search:`search`};function yq(e){if(e===``)return[];let t=Array.from(e);return t.filter(e=>e===`�`).length>t.length/2?[`[binary output, ${String(new TextEncoder().encode(e).byteLength)} bytes]`]:AM(e).replace(/\r\n/gu,`
47
+ `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}var lq=512,uq=256,dq=100;`${String(DK/1024)}`,new TextEncoder;var fq=Lt().int().min(1).max(uq).default(dq),pq=k().min(1).max(lq);A(()=>pe({path:kK.default(`.`),limit:fq})),A(()=>pe({path:kK.default(`.`),pattern:pq,limit:fq})),A(()=>pe({path:kK.default(`.`),pattern:pq,include:pq.optional(),regex:cr().default(!1),ignoreCase:cr().default(!1),limit:fq}));var mq=A(()=>pe({path:kK,type:St([`file`,`directory`,`symlink`]).exactOptional(),line:Lt().int().positive().exactOptional(),text:k().exactOptional()}));A(()=>pe({path:kK,results:Ze(mq).max(uq),truncated:St([`limit`,`scan`]).nullable()})),A(()=>pe({path:kK,oldText:AK(1),newText:AK()}));var hq=A(()=>pe({path:kK,bytes:Lt().int().nonnegative(),diff:k(),firstChangedLine:Lt().int().positive().nullable(),unifiedPatch:k().nullable(),unifiedPatchBytes:Lt().int().nonnegative(),unifiedPatchAddedLines:Lt().int().nonnegative(),unifiedPatchRemovedLines:Lt().int().nonnegative(),unifiedPatchTruncated:cr()})),gq=A(()=>pe({status:gt(`failed`),error:pe({kind:St([`not-found`,`ambiguous`,`file-too-large`,`partial-character`,`not-text`,`unchanged`,`conflict`,`read-only`]),path:kK,message:k()})}));en([hq,gq]);var _q=`Search skips .git and gitignored paths.`;`${_q}`,`${_q}`,`${_q}`;function vq(e,t){console.error(JSON.stringify({event:`parakeet_operation_failed`,operation:e,causeKind:t instanceof Error?`error`:`non_error`}),Yc(t))}function yq(e,t=!1){return e===`error`?t?`neutral`:`error`:e===`unknown`?`neutral`:e===`running`?`info`:`success`}var bq={code:`computer`,command:`run`,edit:`write`,other:`working`,read:`read`,search:`search`};function xq(e){if(e===``)return[];let t=Array.from(e);return t.filter(e=>e===`�`).length>t.length/2?[`[binary output, ${String(new TextEncoder().encode(e).byteLength)} bytes]`]:MM(e).replace(/\r\n/gu,`
48
48
  `).replace(/\n$/u,``).split(`
49
- `).map(e=>jM(e.slice(e.lastIndexOf(`\r`)+1)))}function bq(e,t){let n=e.live;return n===void 0?[]:t?[...n.droppedBytes===0?[]:[`… ${String(Math.ceil(n.droppedBytes/1024))} KiB earlier`],...n.lines]:n.lines.slice(-6)}var xq=40,Sq=6,Cq=400,wq=72,Tq=new Map([[`apply_patch`,`edit`],[`bash`,`command`],[`edit`,`edit`],[`execute`,`code`],[`glob`,`search`],[`grep`,`search`],[`list`,`search`],[`ls`,`search`],[`read`,`read`],[`write`,`edit`]]),Eq={code:[`Ran script`,`Running script`],command:[`Ran`,`Running`],edit:[`Updated`,`Updating`],other:[`Called`,`Calling`],read:[`Read`,`Reading`],search:[`Searched`,`Searching`]},Dq=zi({path:k()}),Oq=zi({file_path:k()}),kq=zi({command:k()}),Aq=zi({code:k()}),jq=zi({patch:k()}),Mq=zi({pattern:k()}),Nq=zi({oldText:k(),newText:k()}),Pq=zi({content:k()}),Fq=k(),Iq=zi({content:k(),offset:Lt().int().min(0).optional()}),Lq=zi({matches:Ze(zi({path:k(),line:Lt().int(),text:k()}))}),Rq=zi({stdout:k().optional(),stderr:k().optional(),exitCode:Lt().int().nullable().optional()}).refine(e=>e.stdout!==void 0||e.stderr!==void 0||e.exitCode!==void 0),zq=pe({path:k(),bytes:Lt().int().nonnegative(),diff:k(),firstChangedLine:Lt().int().positive().nullable(),unifiedPatch:k().nullable(),unifiedPatchBytes:Lt().int().nonnegative(),unifiedPatchAddedLines:Lt().int().nonnegative(),unifiedPatchRemovedLines:Lt().int().nonnegative(),unifiedPatchTruncated:cr()}),Bq=/^(.+?:\d+)[:-]\s?(.*)$/u;function Vq(e){return Tq.get(e)??`other`}function Hq(e){return e.replace(/\/(?:home|Users)\/[^/\s"'`]+/gu,`~`)}function Uq(e){let t=e.split(`
50
- `).map(e=>e.trim()).find(e=>e!==``)??``;return t.length>wq?`${t.slice(0,71)}…`:t}function Wq(e){return e.slice(0,Cq)}function Gq(e){return Wq(AM(e).replace(/\n$/u,``).split(`
51
- `))}function Kq(e){let t=Dq.safeParse(e);if(t.success)return t.data.path;let n=Oq.safeParse(e);return n.success?n.data.file_path:void 0}function qq(e){try{return{kind:`parsed`,value:JSON.parse(e)}}catch(e){return{kind:`invalid`,cause:e}}}function Jq(e){if(e===void 0)return{kind:`none`};let t=e.content.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
52
- `);if(t.trim()===``)return{kind:`none`};let n=qq(t);if(n.kind===`invalid`)return{kind:`text`,text:t};let r=n.value,i=Fq.safeParse(r);if(i.success)return{kind:`text`,text:i.data};let a=be().safeParse(r);return a.success?{kind:`json`,value:a.data}:{kind:`text`,text:t}}function Yq(e,t){let n=t===void 0||t===0;return{kind:`excerpt`,lines:Gq(e).map((e,t)=>n?{number:t+1,text:e}:{text:e}),preview:12}}function Xq(e){return{kind:`matches`,matches:Gq(e).filter(e=>e.trim()!==``).map(e=>{let t=Bq.exec(e);return t===null?{location:``,text:e}:{location:t[1]??``,text:t[2]??``}}),preview:12}}function Zq(e,t){let n=[];if(e!==void 0&&e.trim()!==``)for(let t of Gq(e))n.push({stream:`stdout`,text:t});if(t!==void 0&&t.trim()!==``)for(let e of Gq(t))n.push({stream:`stderr`,text:e});return n.length===0?void 0:{kind:`output`,lines:Wq(n),preview:12}}function Qq(e,t){return{kind:`text`,label:t,language:`json`,lines:Gq(JSON.stringify(e,null,2)),preview:12}}function $q(e,t){if(e.kind===`none`)return{sections:[]};if(e.kind===`text`){if(t===`read`)return{sections:[Yq(e.text,void 0)]};if(t===`search`)return{sections:[Xq(e.text)]};if(t===`command`){let t=Zq(e.text,void 0);return{failure:Uq(e.text),sections:t===void 0?[]:[t]}}return{failure:Uq(e.text),sections:[{kind:`text`,lines:Gq(e.text),preview:12}]}}let n=Iq.safeParse(e.value);if(n.success)return{sections:[Yq(n.data.content,n.data.offset)]};let r=Lq.safeParse(e.value);if(r.success)return{sections:[{kind:`matches`,matches:Wq(r.data.matches).map(e=>({location:`${e.path}:${String(e.line)}`,text:AM(e.text)})),preview:12}]};let i=mq.safeParse(e.value);if(i.success)return{failure:i.data.error.message,sections:[{kind:`text`,lines:[i.data.error.message],preview:12}]};let a=zq.safeParse(e.value);if(a.success){let{unifiedPatch:e,unifiedPatchBytes:t,unifiedPatchTruncated:n}=a.data;if(n&&e===null)return{sections:[{kind:`text`,lines:[`Diff omitted (${String(t)} bytes, ${String(a.data.unifiedPatchAddedLines)} added, ${String(a.data.unifiedPatchRemovedLines)} removed).`],preview:12}]};if(!n&&e!==null&&t<=65536&&new TextEncoder().encode(e).byteLength===t)try{let t=nq(e),n=t[0];if(t.length===1&&n?.oldFileName===a.data.path&&n.newFileName===a.data.path)return{sections:[nJ([{operation:`update`,path:a.data.path,moveTo:void 0,lineNumbers:!0,unified:e,hunks:n.hunks.map(e=>({header:`-${String(e.oldStart)},${String(e.oldLines)} +${String(e.newStart)},${String(e.newLines)}`,lines:e.lines.flatMap(e=>{let t=aJ.get(e.charAt(0));return t===void 0?[]:[{kind:t,text:e.slice(1)}]})}))}])]}}catch(e){gq(`render tool patch`,e)}}let o=Rq.safeParse(e.value);if(o.success){let{stdout:e,stderr:t,exitCode:n}=o.data,r=Zq(e,t),i=n!=null&&n!==0;return{exitCode:i?n:void 0,failure:t!==void 0&&t.trim()!==``?Uq(AM(t)):i?`Exited with code ${String(n)}`:void 0,sections:r===void 0?[]:[r]}}return{sections:[Qq(e.value)]}}var eJ={add:`Add`,delete:`Delete`,update:`Update`};function tJ(e){let t=e.length>1;return e.flatMap(e=>[...t?[{kind:`file`,text:`${eJ[e.operation]} ${e.path??``}${e.moveTo===void 0?``:` → ${e.moveTo}`}`}]:[],...e.hunks.flatMap(e=>[...e.header===void 0?[]:[{kind:`hunk`,text:e.header}],...e.lines])])}function nJ(e){return{kind:`diff`,files:e,lines:Wq(tJ(e)),preview:xq}}var rJ={add:`+`,context:` `,remove:`-`};function iJ(e){return e.map(e=>{let t=1,n=1,r=e.hunks.map(e=>{let r=t=>e.lines.filter(e=>e.kind===t).length,i=r(`context`)+r(`remove`),a=r(`context`)+r(`add`),o={oldStart:t,oldLines:i,newStart:n,newLines:a,lines:e.lines.map(e=>`${rJ[e.kind]}${e.text}`)};return t+=i,n+=a,o}),i={oldFileName:e.path,newFileName:e.moveTo??e.path,oldHeader:void 0,newHeader:void 0,hunks:r};return{hunks:e.hunks.map(e=>({header:e.context,lines:e.lines})),lineNumbers:!1,moveTo:e.moveTo,operation:e.operation,path:e.path,unified:i.hunks.length===0?``:aq(i)}})}var aJ=new Map([[`+`,`add`],[`-`,`remove`],[` `,`context`]]);function oJ(e,t,n){let r=e??`file`,i=iq(r,r,t,n,``,``,{context:3});return{lineNumbers:!0,unified:aq(i),hunks:i.hunks.map(e=>({header:`-${String(e.oldStart)},${String(e.oldLines)} +${String(e.newStart)},${String(e.newLines)}`,lines:e.lines.flatMap(e=>{let t=aJ.get(e.charAt(0));return t===void 0?[]:[{kind:t,text:e.slice(1)}]})})),operation:t===``?`add`:`update`,path:e}}function sJ(e,t){let n=jq.safeParse(e.args);if(n.success){let t=CK(n.data.patch),r=[...new Set(t.flatMap(e=>e.path?[e.path]:[]))];return{get input(){return[nJ(iJ(t))]},label:r.length<=1?r[0]??e.name:`${r[0]??``} +${String(r.length-1)}`,paths:r}}let r={label:t??e.name,paths:t===void 0?[]:[t]},i=Nq.safeParse(e.args);if(i.success)return{...r,get input(){return[nJ([oJ(t,i.data.oldText,i.data.newText)])]}};let a=Pq.safeParse(e.args);return{...r,get input(){return a.success?[nJ([oJ(t,``,a.data.content)])]:[]}}}function cJ(e){return{get input(){return Object.keys(e.args).length===0?[]:[Qq(e.args,`Arguments`)]},label:e.name,paths:[]}}function lJ(e,t){let n=Kq(e.args);switch(t){case`code`:{let t=Aq.safeParse(e.args);if(!t.success)return cJ(e);let n={kind:`script`,lines:Gq(t.data.code),preview:Sq},r=yK(t.data.code);return r===void 0?{get input(){return[n]},label:Uq(Hq(t.data.code)),paths:[]}:{get input(){return[{kind:`command`,lines:Gq(r.command),preview:Sq},...r.alone?[]:[n]]},label:Uq(Hq(r.command)),paths:[],verbs:[`Ran ${r.tool}:`,`Running ${r.tool}:`]}}case`command`:{let t=kq.safeParse(e.args);return t.success?{get input(){return[{kind:`command`,lines:Gq(t.data.command),preview:Sq}]},label:Uq(t.data.command),paths:[]}:cJ(e)}case`edit`:return sJ(e,n);case`read`:return{input:[],label:n??e.name,paths:n===void 0?[]:[n]};case`search`:{let t=Mq.safeParse(e.args);return{input:[],label:Uq(t.success?n===void 0?t.data.pattern:`${t.data.pattern} in ${n}`:n??`.`),paths:[]}}case`other`:return cJ(e)}}function uJ(e){if(e.status!==`completed`)return;let t=Jq(e.result);if(t.kind!==`json`)return;let n=pe({name:k().min(1).max(256),avatar:zy}).safeParse(t.value);if(!n.success)return;if(e.name===`self.rename`)return n.data;if(e.name!==`execute`)return;let r=Aq.safeParse(e.args);if(r.success)try{let e=vR(r.data.code,{ecmaVersion:`latest`,allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0});if(e.body.length!==1)return;let t=e.body[0];if(t?.type!==`ReturnStatement`)return;let i=t.argument?.type===`AwaitExpression`?t.argument.argument:t.argument;if(i?.type!==`CallExpression`)return;let a=i.callee;if(a.type!==`MemberExpression`||a.computed||a.property.type!==`Identifier`||a.property.name!==`rename`)return;let o=a.object;return o.type!==`MemberExpression`||o.computed||o.property.type!==`Identifier`||o.property.name!==`self`||o.object.type!==`Identifier`||o.object.name!==`env`?void 0:n.data}catch(e){if(e instanceof SyntaxError)return;throw e}}function dJ(e,t=!1){let n=Vq(e.name),r=lJ(e,n),i=uJ(e),a=i===void 0?r:{...r,label:Uq(i.name),verbs:[`Renamed itself to`,`Renaming itself to`]},[o,s]=a.verbs??Eq[n],c=e.status===`completed`?Jq(e.result):void 0,l=c?.kind===`json`&&mq.safeParse(c.value).success,u,d=()=>{if(u!==void 0)return u;let t=$q(Jq(e.result),n),r=e.status===`error`||l,i=r?t.failure??`The tool reported an error.`:void 0,o=e=>{if(e.kind===`text`&&e.lines.length===1)return e.lines[0];if(e.kind===`output`&&e.lines.length===1)return e.lines[0]?.text},s=i===void 0?void 0:t.sections.find(e=>Uq(o(e)??``)===i),c=s===void 0?i:o(s)?.trim()??i,d=t.sections.some(e=>e.kind===`diff`),f=(n===`edit`&&!r&&!d?[]:t.sections).filter(e=>e!==s);return u={error:c,exitCode:t.exitCode,sections:[...n===`edit`&&d?[]:a.input,...f]},u},f=e.status===`error`||l;return{activeVerb:s,durationMs:e.startedAt===void 0||e.result===void 0?void 0:Math.max(0,e.result.timestamp-e.startedAt),get error(){return f?d().error:void 0},get exitCode(){return d().exitCode},id:e.id,identity:i,kind:n,label:a.label,name:e.name,live:e.status===`running`?e.live:void 0,paths:a.paths,recovered:f&&t,get sections(){return d().sections},status:f?`error`:e.status,verb:o}}function fJ(e){if(e<1e3)return`${String(Math.round(e))}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;let t=Math.round(e/1e3);return`${String(Math.floor(t/60))}m ${String(t%60)}s`}function pJ(e,t){return t.length===0?e:e.map(e=>{if(e.kind!==`tool_group`)return e;let n=e.tools.map(e=>{let n=t.find(t=>t.toolCallId===e.id);return e.status!==`running`||n===void 0?e:{...e,live:{lines:yq(n.tail),droppedBytes:n.droppedBytes,revision:n.revision}}});if(n.every((t,n)=>t===e.tools[n]))return e;let r=e.calls.map((t,r)=>{let i=n[r];return i===void 0||i===e.tools[r]?t:dJ(i)});return{...e,tools:n,calls:r,active:r.find(t=>t.id===e.active?.id)}})}var mJ={code:[`ran`,`script`,`scripts`],command:[`ran`,`command`,`commands`],edit:[`edited`,`file`,`files`],other:[`called`,`tool`,`tools`],read:[`read`,`file`,`files`],search:[`searched`,`pattern`,`patterns`]};function hJ(e){let t=new Map;for(let n of e){let e=t.get(n.kind)??{calls:0,paths:new Set};e.calls+=1;for(let t of n.paths)e.paths.add(t);t.set(n.kind,e)}let n=[...t].map(([e,t])=>{let[n,r,i]=mJ[e],a=(e===`read`||e===`edit`)&&t.paths.size>0?t.paths.size:t.calls;return`${n} ${String(a)} ${a===1?r:i}`}).join(`, `);return n.charAt(0).toUpperCase()+n.slice(1)}function gJ(e){return e.some(e=>e.status===`running`)?`running`:e.some(e=>e.status===`error`&&e.recovered!==!0)?`error`:e.some(e=>e.status===`unknown`)?`unknown`:`completed`}function _J(e){let t,n;for(let r of e)r.startedAt!==void 0&&(t=Math.min(t??r.startedAt,r.startedAt)),r.result!==void 0&&(n=Math.max(n??r.result.timestamp,r.result.timestamp));return t===void 0||n===void 0?void 0:Math.max(0,n-t)}function vJ(e,t){let n=e[t];if(n?.status!==`error`)return!1;let r=e.slice(t+1).find(e=>e.kind===n.kind&&e.status!==`error`);return r?.status===`completed`?n.kind===`code`||r.label===n.label||r.paths.some(e=>n.paths.includes(e)):!1}function yJ(e){let t=e.map(e=>dJ(e)),n=e.map((e,n)=>{let r=t[n];return r!==void 0&&vJ(t,n)?dJ(e,!0):r??dJ(e)}),r=gJ(n);return{active:[...n].reverse().find(e=>e.status===`running`),calls:n,durationMs:r===`running`?void 0:_J(e),failedCount:n.filter(e=>e.status===`error`&&e.recovered!==!0).length,id:`tools:${e[0].id}`,kind:`tool_group`,recoveredCount:n.filter(e=>e.recovered===!0).length,status:r,summary:n.length===1&&n[0]!==void 0?`${n[0].verb} ${n[0].label}`:hJ(n),tools:e}}function bJ(e,t=new Set){let n=[],r=[],i=[],a=()=>{let[e,...t]=r;e!==void 0&&n.push(yJ([e,...t])),n.push(...i),r=[],i=[]};for(let o of e){if(t.has(o.id)&&a(),o.kind===`tool`){r.push(o);continue}if(o.kind===`assistant_message`&&!mK(o)&&r.length>0){i.push(o);continue}a(),n.push(o)}return a(),n}var xJ=Object.freeze({mode:`default`,overrides:new Map});function SJ(e){return e.status!==`completed`}function CJ(e,t){return t?e.calls:e.calls.slice(-3)}function wJ(e){return e.status===`error`&&e.recovered!==!0}function TJ(e,t,n){let r=e.overrides.get(t);return r===void 0?e.mode==="default"?n:e.mode===`expanded`:r}function EJ(e,t,n){let r=new Map(e.overrides);return r.set(t,!TJ(e,t,n)),{...e,overrides:r}}function DJ(e,t,n){return[...e.map(e=>({sequence:e.sequence,tie:1,kind:`message`,message:e})),...t.map(e=>({sequence:e.sequence,tie:0,kind:`marker`,marker:e})),...n.map(e=>({sequence:e.sequence,tie:2,kind:`notice`,notice:e}))].sort((e,t)=>e.sequence-t.sequence||e.tie-t.tie)}var OJ=()=>void 0;function kJ(e,t){return t===void 0?e:{...e,requestId:t}}function AJ(e){return Array.isArray(e)?e.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
53
- `):e}function jJ(e,t){return{args:fK.parse(e.arguments),id:e.id,kind:`tool`,name:e.name,startedAt:t,status:`unknown`}}function MJ(e){let t={id:e.messageId,kind:`assistant_message`,pending:!0,text:`${e.textTruncated?`…`:``}${e.text}`};return e.thinking===``?t:{...t,thinking:`${e.thinkingTruncated?`…`:``}${e.thinking}`}}function NJ(e){let t=[],n=[],r=[];for(let i of e.content)i.type===`text`&&t.push(i.text),i.type===`thinking`&&i.redacted!==!0&&n.push(i.thinking),i.type===`toolCall`&&r.push(jJ(i,e.timestamp));return{text:t,thinking:n,tools:r}}function PJ(e,t,n){if(n.text.length===0&&n.thinking.length===0&&n.tools.length>0)return;let r={id:e,isError:t.stopReason===`error`||t.stopReason===`aborted`,kind:`assistant_message`,pending:!1,at:t.timestamp,text:n.text.length===0?t.stopReason===`error`?t.errorMessage??`This run couldn’t finish.`:t.stopReason===`aborted`?`The run was cancelled.`:``:n.text.join(``),...t.stopReason===`error`&&t.modelFailure!==void 0&&{modelFailure:t.modelFailure},usage:{cost:t.usage.cost.total,tokens:t.usage.totalTokens}},i=t.stopReason===`error`&&t.providerError!==void 0?{...r,text:t.errorMessage??`This run couldn’t finish.`,providerError:t.providerError}:r,a=t.stopReason===`error`&&t.providerError!==void 0&&n.text.length>0?{...i,errorDetail:n.text.join(``).slice(0,160)}:i;return n.thinking.length===0?a:{...a,thinking:n.thinking.join(`
54
- `)}}function FJ(e,t){let n=[],r=new Map;for(let i of e){let e=n.at(-1);!t.has(i.id)&&i.kind===`assistant_message`&&i.isError&&e?.kind===`assistant_message`&&e.isError&&i.providerError===void 0==(e.providerError===void 0)&&i.modelFailure?.provider===e.modelFailure?.provider&&i.modelFailure?.cause.code===e.modelFailure?.cause.code&&i.text===e.text&&i.errorDetail===e.errorDetail&&i.thinking===e.thinking&&i.author?.id===e.author?.id&&i.author?.name===e.author?.name?(n[n.length-1]={...e,repeatCount:(e.repeatCount??1)+1,...i.providerError!==void 0&&{providerError:i.providerError},...i.modelFailure!==void 0&&{modelFailure:i.modelFailure}},r.set(i.id,e.id)):n.push(i)}return{items:n,aliases:r}}function IJ(e,t,n){let r=NJ(t),i=PJ(e,t,r);return{items:i===void 0?r.tools:[{...i,author:n},...r.tools],model:{model:t.model,provider:t.provider},usage:{cost:t.usage.cost.total,tokens:t.usage.totalTokens}}}function LJ(e,t,n){for(let r of n.items)r.kind===`tool`&&t.set(r.id,e.length),e.push(r)}function RJ(e,t,n,r){let i=t.get(n.toolCallId);if(i===void 0)return;let a=e[i];a?.kind===`tool`&&(e[i]={...a,result:n,data:r,status:n.isError?`error`:`completed`})}function zJ(e,t=[],n,r=MM,i=OJ,a=[],o=[],s=()=>!0){let c=[],l=new Map,u=new Set,d=new Map,f=new Map,p,m=0,h=0;for(let n of DJ(e,t,a)){if(n.kind===`marker`){d.set(n.marker.id,n.sequence),c.push({id:n.marker.id,kind:`compaction_divider`,at:n.marker.at,tokensBefore:n.marker.tokensBefore,tokensAfter:n.marker.tokensAfter});continue}if(n.kind===`notice`){d.set(n.notice.id,n.sequence),c.push({id:n.notice.id,kind:`compaction_notice`,at:n.notice.at,trigger:n.notice.trigger,result:n.notice.result,diagnostic:n.notice.diagnostic});continue}let e=n.message,t=e.value;e.commandId!==null&&u.add(e.commandId);let a=c.length;switch(t.role){case`user`:{let n=e.commandId??e.id,a={id:e.id,kind:`user_message`,commandId:n,status:`confirmed`,at:t.timestamp,text:AJ(t.content),author:r(e.meta),origin:e.origin};c.push(kJ(a,e.requestId??i(n)));break}case`assistant`:{let n=IJ(e.id,t,r(e.meta));p=n.model,m+=n.usage.tokens,h+=n.usage.cost,LJ(c,l,n);break}case`toolResult`:if(RJ(c,l,t,e.data),e.commandId!==null){let n=f.get(t.toolCallId)??new Set;n.add(e.commandId),f.set(t.toolCallId,n)}}for(let e of c.slice(a))d.set(e.id,n.sequence);if(e.commandId!==null)for(let t of c.slice(a))f.set(t.id,new Set([e.commandId]))}let g=n?.queue;if(g?.state===`running`&&n?.activeTool!==null){let e=!1,t=-1;for(let r=0;r<c.length;r++){let i=c[r];i?.kind===`user_message`&&(e=i.commandId===g.commandId,e&&(t=-1)),e&&i?.kind===`tool`&&i.status===`unknown`&&i.name===n?.activeTool&&(t=r)}let r=c[t];r?.kind===`tool`&&(c[t]={...r,status:`running`})}let _=new Set,v=0;for(let e of c){let t=d.get(e.id);t!==void 0&&(o.some(e=>v<=e&&e<t)&&_.add(e.id),v=t)}let y=bJ(c,_),b=new Map;for(let e of y){if(e.kind===`assistant_message`&&!mK(e))continue;let t=e.kind===`tool_group`?e.tools:[e];for(let n of t)for(let t of f.get(n.id)??[])b.set(t,e.id)}let x=new Map;for(let e of o){let t=null;for(let n of y)s(n)&&(n.kind===`assistant_message`&&!mK(n)||(n.kind===`tool_group`?n.tools:[n]).some(t=>{let n=d.get(t.id);return n!==void 0&&n<=e})&&(t=n.id));x.set(e,t)}let S=FJ(y,_);for(let[e,t]of b)b.set(e,S.aliases.get(t)??t);for(let[e,t]of x)t!==null&&x.set(e,S.aliases.get(t)??t);let C={commandAnchors:b,positionAnchors:x,completedMessageIds:eK(e),items:S.items,commandIds:u,requestIds:new Set(e.flatMap(e=>e.requestId===void 0?[]:[e.requestId]))};return p===void 0?C:{...C,model:p,usage:{cost:h,tokens:m}}}function BJ(e,t,n,r=[],i=MM){let a=t===null||e.completedMessageIds.has(t.messageId)||t.text===``&&t.thinking===``?void 0:t;if(r.length===0&&a===void 0&&n.length===0)return[];let o=[],s=new Set(n.map(({commandId:e})=>e));for(let t of n){if(e.commandIds.has(t.commandId))continue;let n={id:t.commandId,kind:`user_message`,commandId:t.commandId,status:`queued`,delivery:t.delivery,text:t.text,origin:t.origin,author:i(t.meta)};o.push(kJ(n,t.requestId))}for(let t of r){if(e.requestIds.has(t.requestId)||n.some(e=>e.requestId===t.requestId)||t.commandId!==void 0&&(s.has(t.commandId)||e.commandIds.has(t.commandId)))continue;let r={id:t.requestId,kind:`user_message`,requestId:t.requestId,status:t.status===`failed`?`failed`:t.status===`accepted`?`accepted`:t.status===`queued-local`?`queued`:`pending`,delivery:t.delivery,text:t.content},i=t.commandId===void 0?r:{...r,commandId:t.commandId},a=t.error===void 0?i:{...i,error:t.error};o.push(a)}return[...a===void 0?[]:[MJ(a)],...o.filter(e=>e.status!==`failed`&&e.delivery===`steer`),...o.filter(e=>e.status!==`failed`&&e.delivery===`followUp`),...o.filter(e=>e.status===`failed`)]}var VJ=Object.freeze({observation:`connecting`,snapshot:void 0,lastReplyAt:void 0,latestPrompt:void 0}),HJ=200,UJ=400;function WJ(e,t){for(let t of e.slice().reverse()){if(t.value.role!==`user`||t.commandId===null)continue;let e=t.value.content,n=Array.isArray(e)?e.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
55
- `):e,r=Array.isArray(e)?e.filter(e=>e.type===`image`):[];return{commandId:t.commandId,text:n,images:r.length===0?void 0:r}}return t}async function*GJ(e,t){yield{kind:`opening`};let n=await e.watch({limit:HJ}),r,i=()=>(r??=n.close(),r),a=()=>{i().catch(e=>{gq(`close aborted Session watch`,e)})};t.addEventListener(`abort`,a,{once:!0});try{if(t.aborted)return;let r=n.snapshot;yield{kind:`snapshot`,value:r};let i=aS(n.changes,e=>e).pipe(lS({duration:PM,orElse:()=>eS(Error(`Session feed is connected but silent; the service may be busy`))}),bS);for await(let t of i)r=dK(r,t),r.messages.length>UJ?(r=await e.read({limit:HJ}),yield{kind:`snapshot`,value:r}):yield{kind:`frame`,value:t,snapshot:r};throw Error(`Session watch ended; current activity is unavailable`)}catch(e){if(!t.aborted)throw e}finally{t.removeEventListener(`abort`,a),await i()}}function KJ(e,t){if(t.kind===`opening`)return{...e,observation:`connecting`};if(t.kind===`snapshot`)return{observation:`live`,snapshot:t.value,lastReplyAt:Date.now(),latestPrompt:WJ(t.value.messages,e.latestPrompt)};let n=t.snapshot;return{observation:`live`,snapshot:n,lastReplyAt:Date.now(),latestPrompt:t.value.kind===`reset`||t.value.kind===`update`&&t.value.messages.some(e=>e.value.role===`user`)?WJ(n.messages,e.latestPrompt):e.latestPrompt}}function qJ(e){return xv({queryKey:[`shiitake-session`,e.address],queryFn:bv({streamFn:({signal:t})=>GJ(e,t),reducer:KJ,initialValue:VJ,refetchMode:`append`}),refetchOnMount:`always`,retry:!1,staleTime:1/0})}function JJ(e,t,n){e.setQueryData(qJ(t).queryKey,{observation:`connecting`,snapshot:n,lastReplyAt:void 0,latestPrompt:WJ(n.messages)})}function YJ(e,t=null){let n={before:t,newerBefore:[],newerOverflow:!1};return Sv({queryKey:[`shiitake-session-history`,e.address],initialPageParam:n,queryFn:async({pageParam:t,signal:n})=>{if(t.before===null)throw Error(`Session has no older history cursor`);let r=await e.read({before:t.before,limit:100});return n.throwIfAborted(),r},getNextPageParam:(e,t,n)=>{if(e.oldestCursor===null||e.oldestCursor===void 0)return;let r=n.before===null?n.newerBefore:[...n.newerBefore,n.before];return{before:e.oldestCursor,newerBefore:r.slice(-2048),newerOverflow:n.newerOverflow||r.length>2048}},getPreviousPageParam:(e,t,n)=>{let r=n.newerBefore.at(-1);return r===void 0?void 0:{before:r,newerBefore:n.newerBefore.slice(0,-1),newerOverflow:n.newerOverflow}},select:e=>({pages:e.pages,newerOverflow:e.pageParams[0]?.newerOverflow??!1}),maxPages:4,enabled:!1,retry:!1,staleTime:1/0})}function XJ(e,t=/Mac|iPhone|iPad/u.test(globalThis.navigator.userAgent)){if(e.startsWith(`<leader>`)){let t=e.replaceAll(`<leader>`,`Ctrl K `).trimEnd();return e.endsWith(` `)?`${t} Space`:t}return e.split(` `).map(e=>e.split(`+`).map(e=>e===`mod`?t?`⌘`:`Ctrl`:e===`escape`?`Esc`:e.length===1?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)).join(e===`ctrl+k`||e===`mod+k`?` `:`+`)).join(` `)}function ZJ(e){let t=new Map;for(let n of e.bindings)t.set(n.commandId,[...t.get(n.commandId)??[],XJ(n.binding)]);return e.slash.map(e=>({alias:e.alias,commandId:e.commandId,command:e.command,title:e.title,description:e.description,category:e.category,order:e.order,grammar:e.arguments,consumesDraft:e.consumesDraft,keys:t.get(e.commandId)??[],availability:e.availability}))}function QJ(e){let t=new Map;for(let n of e.bindings){let e=t.get(n.commandId);t.set(n.commandId,{commandId:n.commandId,command:n.command,keys:e===void 0?XJ(n.binding):`${e.keys}, ${XJ(n.binding)}`,title:n.title,description:[n.description,...n.availability.status===`unavailable`?[n.availability.reason]:[]].filter(e=>e!==void 0).join(` · `)||void 0,order:e?.order??n.order})}return[...t.values()]}function $J(e){let t=e.grammar?.words?.map(({word:e})=>e)??[];return e.grammar===void 0?`/${e.alias} takes no arguments.`:e.grammar.text===void 0?`Use /${e.alias} ${t.join(` or `)}.`:`Use /${e.alias} ${e.grammar.hint}.`}function eY(e,t){if(!t.startsWith(`/`))return{kind:`prompt`};let n=/^\/(\S*)(?:\s+([\s\S]*))?$/u.exec(t.trimEnd()),r=n?.[1]??``,i=(n?.[2]??``).trim(),a=e.find(e=>e.alias===r);if(a===void 0)return{kind:`invalid`,message:`Unsupported command: /${r}. Use /help for available commands.`};if(i.length===0)return{kind:`command`,command:a};let o=a.grammar,s=o?.words?.find(e=>e.word===i);return s===void 0?o?.text===void 0?{kind:`invalid`,message:$J(a)}:{kind:`command`,command:a,arguments:{...o.text.arguments,[o.text.field]:i},requestIdField:o.text.requestIdField}:{kind:`command`,command:a,arguments:s.arguments}}function tY(e,t){let n=e.toLocaleLowerCase(),r=t.toLocaleLowerCase();if(r.length===0)return{tier:0,spread:0,indices:[]};let i=e=>Array.from({length:r.length},(t,n)=>e+n);if(n.startsWith(r))return{tier:0,spread:n.length-r.length,indices:i(0)};let a=n.search(RegExp(`[-_\\s]${r.replaceAll(/[.*+?^${}()|[\]\\]/gu,`\\$&`)}`,`u`));if(a>=0)return{tier:1,spread:a,indices:i(a+1)};let o=n.indexOf(r);if(o>=0)return{tier:2,spread:o,indices:i(o)};let s=[],c=0;for(let e of r){let t=n.indexOf(e,c);if(t<0)return;s.push(t),c=t+1}let l=s[0]??0;return{tier:3,spread:(s.at(-1)??0)-l-r.length+1,indices:s}}function nY(e,t,n,r){return e.map(e=>({entry:e,match:tY(t(e),n)})).filter(e=>e.match!==void 0).sort((e,n)=>e.match.tier-n.match.tier||e.match.spread-n.match.spread||r(e.entry)-r(n.entry)||t(e.entry).localeCompare(t(n.entry))).map(({entry:e,match:t})=>({entry:e,indices:t.indices}))}var rY=[`help`,`login`,`model`];function iY(e,t,n={}){if(!t.startsWith(`/`)||t.includes(`
56
- `))return{kind:`none`};let r=t.search(/\s/u);if(r<0){let r=t.slice(1);return{kind:`commands`,query:r,items:nY(e.filter(e=>e.availability.status===`available`&&(r.length===0?e.category===(n.idleCategory??`Conversation`)||rY.includes(e.alias):e.category!==`Advanced`||e.alias.toLocaleLowerCase().startsWith(r.toLocaleLowerCase()))),e=>e.alias,r,e=>{let t=rY.indexOf(e.alias);return r.length===0&&t>=0?t-rY.length:e.order}).map(({entry:e,indices:t})=>({command:e,label:`/${e.alias}`,matches:t.map(e=>e+1),insert:e.grammar===void 0?`/${e.alias}`:`/${e.alias} `}))}}let i=t.slice(1,r),a=e.find(e=>e.alias===i);if(a?.grammar===void 0||a.availability.status!==`available`)return{kind:`none`};let o=t.slice(r).trimStart(),s=(o.includes(` `)?[]:a.grammar.words??[]).filter(e=>e.word.toLocaleLowerCase().startsWith(o.toLocaleLowerCase())).map(e=>({word:e,label:e.word,matches:Array.from({length:o.length},(e,t)=>t),insert:`/${i} ${e.word}`}));return{kind:`arguments`,command:a,query:o,hint:`/${i} ${a.grammar.hint}`,items:s}}var aY=new WeakMap;function oY(e){return e.status===`handled`&&zi({cancelled:gt(!0)}).safeParse(e.result).success}async function sY(e,t,n,r,i){let a=eY(ZJ(t.snapshot()),e);if(a.kind===`prompt`){n();return}if(a.kind===`invalid`)return{status:`failed`,error:{code:`invalid_arguments`,message:a.message}};let{command:o,requestIdField:s}=a;if(o.consumesDraft&&o.availability.status===`available`&&i?.(),a.arguments===void 0)return t.execute(o.command,{origin:r});if(s===void 0)return t.execute(o.command,{origin:r,arguments:a.arguments});let c=aY.get(t)??new Map;aY.set(t,c);let l=c.get(o.commandId);if(l?.draft===e&&l.running!==void 0)return l.running;let u={draft:e,requestId:l?.draft===e?l.requestId:jv()};c.set(o.commandId,u);let d=t.execute(o.command,{origin:r,arguments:{...a.arguments,[s]:u.requestId}}).then(e=>c.get(o.commandId)===u?(u.running=void 0,e.status===`handled`&&!oY(e)&&c.delete(o.commandId),e):e);return u.running=d,d}var cY=5e3,lY=`Too late: that message already started`;function uY(e){return e instanceof Error?e.message:`Could not recall queued message`}function dY(e){let t={kind:`idle`},n=e.recovery===void 0?void 0:{prompt:e.recovery},r=!1,i=()=>r,a,o,s=n=>{t=n,e.onState(n)};async function c(t,r){if(n===void 0){let a=await e.session.latestPending();if(!r.active||i()||e.emptyDraftRevision()!==t)return{kind:`ignored`};if(a===null)return{kind:`empty`};e.reserve(a),n={prompt:a}}let a=n,o=a.result??await e.session.cancel({commandId:a.prompt.commandId,onlyIfPending:!0});return!i()&&n===a&&(a.result=o),{kind:`decided`,target:a,result:o}}async function l(){let r=e.emptyDraftRevision();if(i()||t.kind===`recalling`||r===void 0)return`ignored`;if(o!==void 0)return`uncertain`;s({kind:`recalling`});let l={active:!0},u=new Promise(e=>{a=()=>{e({kind:`ignored`})}}),d,f=new Promise(e=>{d=setTimeout(()=>{l.active=!1,e({kind:`uncertain`,message:`Recall is unconfirmed. Press Up on an empty composer to retry.`})},cY)});o=c(r,l).catch(e=>({kind:`uncertain`,message:uY(e)})).finally(()=>{o=void 0});let p=await Promise.race([o,f,u]);if(l.active=!1,clearTimeout(d),a=void 0,i())return`ignored`;if(p.kind===`ignored`||p.kind===`empty`)return s({kind:`idle`}),p.kind;if(p.kind===`uncertain`)return s(p),`uncertain`;if(p.result.status===`too_late`){try{e.forget()}catch(e){return s({kind:`uncertain`,message:uY(e)}),`uncertain`}return n=void 0,s({kind:`too_late`,message:lY}),`too_late`}try{if(e.restore(p.target.prompt,r))return n=void 0,s({kind:`restored`}),`restored`;s({kind:`uncertain`,message:`Message recalled. Clear the composer and press Up to restore it.`})}catch(e){s({kind:`uncertain`,message:uY(e)})}return`uncertain`}return{get state(){return t},recall:l,dispose:()=>{r=!0,a?.()}}}var fY=Ze(E({type:gt(`image`),data:k(),mimeType:k()})).readonly(),pY=St([`steer`,`followUp`]),mY=E({commandId:k(),requestId:k(),text:k(),images:fY.optional(),delivery:pY}),hY=E({status:St([`queued-local`,`admitting`]),requestId:k().min(1),content:k(),submittedDraft:k(),delivery:pY,images:fY.optional(),restoreDraft:cr()}),gY=E({draft:k(),images:fY.optional(),delivery:pY.optional(),recall:mY.optional(),pending:Ze(hY).max(32)});function _Y(e,t){let n=`fungi.parakeet.drafts.v2:${e}`,r=!0;return{read(){if(t===void 0)return{draft:``,pending:[]};if(r){r=!1;try{t.removeItem(`fungi.parakeet.drafts.v1:${e}`)}catch(e){gq(`discard obsolete draft journal`,e)}}try{let e=t.getItem(n);return e===null?{draft:``,pending:[]}:gY.parse(JSON.parse(e))}catch(e){return gq(`read saved draft`,e),{draft:``,pending:[]}}},write(e){if(t===void 0)throw Error(`Durable draft storage is unavailable`);t.setItem(n,JSON.stringify(e))}}}var vY=Object.freeze([]),yY=Object.freeze([]),bY=Object.freeze([]),xY=Object.freeze([]),SY=Object.freeze([]),CY=Object.freeze({}),wY=Object.freeze({total:0,hasMore:!1,prompts:Object.freeze([])}),TY=Object.freeze({status:`connecting`}),EY=Object.freeze({status:`live`}),DY=32;function OY(e){return e instanceof Error&&e.message.trim().length>0?e.message:`Prompt admission failed`}function kY(e){let t,n=new Promise((e,n)=>{t=setTimeout(()=>{n(Error(`Request recovery timed out`))},1e4)});return Promise.race([e,n]).finally(()=>{clearTimeout(t)})}function AY(e){return(e instanceof Error&&e.message.trim().length>0?e.message.trim():`Session history is unavailable`).slice(0,500)}function jY(e,t,n){if(e===void 0)return`connecting`;let r=YG(e),i=QG(r);return i===`idle`?n!==void 0||r.kind===`error`?`error`:t.some(({status:e})=>e===`accepted`||e===`queued-local`)?`queued`:t.some(({status:e})=>e===`admitting`)?`sending`:i:i}function MY(e){if(e===void 0)return;let t;for(let n of e)n.value.role===`user`&&n.commandId!==null&&(t===void 0||n.sequence>t.sequence)&&(t={commandId:n.commandId,sequence:n.sequence});return t?.commandId}function NY(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>{let n=r[t];return e.data===n?.data&&e.mimeType===n.mimeType})}function PY(e){if(e!==void 0)return{status:`available`,storage:e};try{let e=globalThis.localStorage;return e===void 0?{status:`unavailable`,cause:Error(`Browser draft storage is unavailable`)}:{status:`available`,storage:e}}catch(e){return{status:`unavailable`,cause:e}}}function FY(e,t,n,r,i,a,o,s,c){let l=_Y(a,i.status===`available`?i.storage:void 0),u=l.read(),d=!1,f=new Map,p=new Map;for(let e of u.pending)e.status===`admitting`&&p.set(e.requestId,`Closed before confirmation`);let m=new Set,h=VG(()=>qJ(e),()=>t),g=$(e=>e(h).data?.snapshot),_=$(e=>e(h).data?.lastReplyAt),v=$(void 0),y=$(e=>(e(v)??e(g))?.oldestCursor??null),b=HG(t=>YJ(e,t(y)),()=>t),x=$(e=>{let t=e(b);return t.data===void 0?e(y)!==null:t.hasNextPage}),S=$(e=>e(b).isFetching),C=$(e=>{let t=e(b);return t.hasPreviousPage||t.data?.newerOverflow===!0}),w=$(null,e=>{!e(x)||e(S)||e(b).fetchNextPage({cancelRefetch:!1,throwOnError:!0}).catch(e=>{e instanceof J_||gq(`read older Session history`,e)})}),ee=$(null,(n,r)=>{r(v,void 0),t.resetQueries({queryKey:YJ(e).queryKey,exact:!0})}),te=$(null,(e,t)=>{let n=e(b);if(!n.isFetching){if(!n.hasPreviousPage){e(C)&&t(ee);return}n.fetchPreviousPage({cancelRefetch:!1,throwOnError:!0}).catch(e=>{e instanceof J_||gq(`read newer Session history`,e)})}}),ne=$(null,(e,t)=>{e(v)===void 0&&t(v,e(g))}),re=$(e=>{let t=e(b),n=e(g)?.messages??vY,r=t.data?.pages.flatMap(e=>e.messages)??vY,i=e(v)?.messages??vY;return r.length===0?i.length===0?n:nK(i,n):e(C)?r:nK(nK(r,i),n)}),ie=$(e=>{let t=e(b),n=e(g)?.compactions??yY,r=t.data?.pages.flatMap(e=>e.compactions??yY)??yY,i=e(v)?.compactions??yY;return r.length===0?i.length===0?n:aK(i,n):e(C)?r:aK(aK(r,i),n)}),T=$(e=>{let t=e(b),n=e(g)?.compactionNotices??bY,r=t.data?.pages.flatMap(e=>e.compactionNotices??bY)??bY,i=e(v)?.compactionNotices??bY;return r.length===0?i.length===0?n:oK(i,n):e(C)?r:oK(oK(r,i),n)}),ae=$(e=>e(h).data?.latestPrompt?.commandId??MY(e(re))),oe=$(e=>e(g)?.pending??wY),se=$(new Set),ce=$(void 0),le=$(e=>{let t=e(oe),n=e(se),r=t.prompts.filter(({commandId:e})=>!n.has(e));return r.length===t.prompts.length?t:{...t,prompts:r,total:t.total-(t.prompts.length-r.length)}}),ue=$(null,(e,t)=>{let n=e(se),r=new Set(e(oe).prompts.map(({commandId:e})=>e)),i=new Set([...n].filter(t=>t===e(ce)||r.has(t)));i.size!==n.size&&t(se,i)}),de=$(e=>e(g)?.extensions??CY),fe,pe=$(e=>{let t=e(h),n=e(g)?.activity;if(t.isError||t.data?.observation!==`live`||n?.queue.state!==`running`||n.activeTool===null){fe=void 0;return}return fe?.queue.state===`running`&&fe.queue.commandId===n.queue.commandId&&fe.activeTool===n.activeTool||(fe=n),fe}),me=$(new Map),he=$(e=>{let t=e(me);return e=>t.get(e)}),ge=$(e=>{let t=e(re),r=e(ie),i=e(T),a=[...t.map(e=>e.sequence),...r.map(e=>e.sequence),...i.map(e=>e.sequence)],c=Math.min(...a),l=Math.max(...a),u=e(o).flatMap(({value:t})=>t.timeline.cells.flatMap(({afterSequence:t})=>t===void 0||e(x)&&t<c||e(C)&&t>l?[]:[t]));return zJ(t,r,e(pe),n,e(he),i,u,s)}),_e=$(u.draft),E=$(u.images),D=$(u.delivery),ve=$(u.recall),ye=$({kind:`idle`}),be,xe=$(0),Se=$(u.pending),Ce=$(null,(e,t,n)=>{i.status!==`unavailable`&&l.write({draft:n?.draft??e(_e),images:n?.draftPayload===void 0?e(E):n.draftPayload.images,delivery:n?.draftPayload===void 0?e(D):n.draftPayload.delivery,recall:n?.recall===null?void 0:n?.recall??e(ve),pending:(n?.admissions??e(Se)).flatMap(({status:e,requestId:t,content:n,submittedDraft:r,delivery:i,images:a,restoreDraft:o})=>e===`admitting`||e===`queued-local`?[{status:e,requestId:t,content:n,submittedDraft:r,delivery:i,images:a,restoreDraft:o}]:[])})}),we=$(null,(t,n)=>t(ce)===void 0?(be??=dY({session:{latestPending:()=>e.latestPending(),cancel:t=>e.command({type:`cancel`,...t})},recovery:t(ve),emptyDraftRevision:()=>t(_e)===``&&(t(E)?.length??0)===0?t(xe):void 0,reserve:e=>{n(Ce,{recall:e}),n(ve,e)},forget:()=>{n(Ce,{recall:null}),n(ve,void 0)},restore:(e,r)=>t(xe)!==r||t(_e)!==``||(t(E)?.length??0)!==0?!1:(n(Ce,{draft:e.text,draftPayload:{images:e.images,delivery:e.delivery},recall:null}),n(ve,void 0),n(E,e.images),n(D,e.delivery),n(_e,e.text),n(xe,e=>e+1),!0),onState:e=>{n(ye,e),(e.kind===`too_late`||e.kind===`uncertain`)&&r.toast({variant:`warning`,message:e.message})}}),be.recall()):Promise.resolve(`ignored`)),Te=$(void 0),Ee=$(null,(e,t)=>{if(!d)return{status:`failed`,reason:`Conversation is no longer mounted`};if(i.status===`unavailable`)return{status:`failed`,reason:`Durable draft storage is unavailable`};try{return t(Ce),{status:`saved`}}catch(e){return{status:`failed`,reason:OY(e)}}}),De=$(e=>new Set([...e(ge).commandIds,...e(oe).prompts.map(({commandId:e})=>e),...e(g)?.terminals.map(({commandId:e})=>e)??[]])),O=$(e=>{let t=e(De);return e(Se).filter(e=>e.status===`failed`||e.commandId===void 0||!t.has(e.commandId))}),Oe=$(null,(e,t)=>{let n=e(De),r=new Map([...e(re).flatMap(({id:e,requestId:t,commandId:n})=>t===void 0?[]:[[t,n??e]]),...e(oe).prompts.map(({requestId:e,commandId:t})=>[e,t])]);for(let n of e(Se)){let e=r.get(n.requestId);e!==void 0&&t(me,t=>new Map(t).set(e,n.requestId))}t(Se,e=>{let i=e.filter(({requestId:e,status:t,commandId:i})=>!r.has(e)&&(t!==`accepted`||i===void 0||!n.has(i)));if(i.length!==e.length)try{t(Ce,{admissions:i})}catch(e){gq(`save reconciled draft`,e)}return i.length===e.length?e:i})}),k=$(void 0),ke=$(null,(e,t,n)=>{try{t(Ce,{draft:n})}catch(e){gq(`save current draft`,e),r.toast({variant:`error`,message:`Draft not saved: ${OY(e)}`})}e(_e)!==n&&t(xe,e=>e+1),t(_e,n),t(k,void 0)}),Ae=$(null,(e,t,n)=>{let i=n===void 0||n.length===0?void 0:n;try{t(Ce,{draftPayload:{images:i,delivery:e(D)}})}catch(e){gq(`save draft images`,e),r.toast({variant:`error`,message:`Images not saved: ${OY(e)}`})}t(E,i),t(xe,e=>e+1),t(k,void 0)}),je=$(null,(e,t,n)=>{e(xe)===n.revision&&e(_e)===n.draft&&(t(Ce,{draft:``}),t(_e,``))}),Me=UG(()=>({mutationFn:t=>e.command({type:`cancel`,commandId:t})}),()=>t),Ne,A=$(null,(t,n,i)=>{if(!d||t(ye).kind===`recalling`)return Promise.resolve();if(Ne!==void 0)return Ne;if(t(se).has(i)||!t(oe).prompts.some(e=>e.commandId===i))return Promise.resolve();n(se,new Set(t(se)).add(i)),n(ce,i);let a=()=>{let e=new Set(t(se));e.delete(i),n(se,e)},o=Promise.resolve().then(()=>e.command({type:`cancel`,commandId:i,onlyIfPending:!0})).then(e=>{d&&e.status===`too_late`&&(a(),r.toast({variant:`warning`,message:`Couldn't remove that message: it is no longer pending.`}))},()=>{d&&(a(),r.toast({variant:`warning`,message:`Cancellation unconfirmed. That message may still run. Try again or reconnect.`}))}).finally(()=>{Ne=void 0,d&&(n(ce,void 0),n(ue))});return Ne=o,o}),Pe=$(e=>{if(e(C))return[];let t=e(g),r=e(le);return BJ(e(ge),t?.progress??null,r.prompts,e(O),n)}),Fe=$(e=>{let t=e(ge),n={pendingHasMore:e(oe).hasMore,queued:e(le),cancellingQueued:e(ce)!==void 0||e(ye).kind===`recalling`,positionAnchors:t.positionAnchors,commandAnchors:t.commandAnchors,hasMoreHistory:e(x),hasNewerHistory:e(C),loadingOlderHistory:e(S),settled:pJ(t.items,e(pe)===void 0?[]:e(g)?.toolOutput??[]),tail:e(Pe)};return t.model===void 0||t.usage===void 0?n:{...n,model:t.model,usage:t.usage}}),Ie=$(e=>{let t=e(O),n=e(g),r=e(oe),i=e(Se).find(({requestId:t})=>t===e(Te)),a=r.prompts.length>0||t.some(({status:e})=>e!==`failed`);if(i?.status===`failed`&&n!==void 0&&QG(YG(n))===`idle`&&!a)return`admission`;if(i?.status===`admitting`||i?.status===`accepted`&&!e(ge).commandIds.has(i.commandId??``)&&!r.prompts.some(({commandId:e})=>e===i.commandId)&&!n?.terminals.some(({commandId:e})=>e===i.commandId)||a)return;let o=e(ae),s=n?.terminals.find(({commandId:e})=>e===o)?.outcome;return s===`completed`?void 0:s}),Le=$(e=>{let t=e(h);return t.isError?{status:`unavailable`,reason:t.error instanceof Error&&t.error.message.trim().length>0?t.error.message:`Session history is unavailable`}:t.data?.observation===`live`?EY:TY}),Re=$(e=>e(Le).status===`unavailable`?`disconnected`:e(Le).status===`connecting`?`connecting`:jY(e(g),e(O),e(Ie))),ze=$(e=>e(g)?.context),Be=$(e=>{let t=e(g)?.activity.queue;return t?.state===`idle`?void 0:t?.commandId}),Ve,He=$(e=>{let t=e(Le);if(t.status===`unavailable`)return{kind:`disconnected`,cause:t.reason};if(t.status===`connecting`)return{kind:`connecting`};if(e(Ie)===`admission`)return{kind:`error`,cause:([...e(Se)].reverse().find(e=>e.status===`failed`)?.error??`Prompt admission failed`).slice(0,200)};let n=e(g);if(n===void 0)return{kind:`connecting`};let r=YG(n);return Ve!==void 0&&ZG(Ve,r)?Ve:(Ve=r,r)}),Ue=$(null,(t,n,{admission:i,consumeDraft:a})=>{try{n(Ce,a?{draft:``,draftPayload:{}}:{draft:t(_e)})}catch(e){gq(`save pending draft before send`,e),n(Se,e=>e.filter(({requestId:e})=>e!==i.requestId)),r.toast({variant:`error`,message:`Not sent: ${OY(e)}`});return}if(a&&(n(E,void 0),n(D,void 0),n(ke,``)),i.status===`queued-local`)return;let o={type:`prompt`,text:i.content,requestId:i.requestId,delivery:i.delivery};e.command(i.images===void 0?o:{...o,images:i.images}).then(e=>{if(!(!d||!t(Se).some(({requestId:e,status:t})=>e===i.requestId&&t===`admitting`))){if(e.status===`recorded`){n(Se,e=>e.filter(e=>e.requestId!==i.requestId)),n(Ce);return}n(me,t=>new Map(t).set(e.commandId,i.requestId)),n(Se,t=>t.map(t=>t.requestId===i.requestId?{requestId:t.requestId,content:t.content,images:t.images,submittedDraft:t.submittedDraft,restoreDraft:t.restoreDraft,delivery:t.delivery,commandId:e.commandId,status:`accepted`}:t)),n(Oe),n(Ce)}}).catch(e=>{if(d){if(e instanceof KM&&e.cause===`secret_in_prompt`){n(We,i);return}p.set(i.requestId,OY(e)),n(Ge)}})}),We=$(null,(e,t,n)=>{let i=e(Se);if(!i.some(({requestId:e,status:t})=>e===n.requestId&&t===`admitting`))return;let a=i.filter(({requestId:e})=>e!==n.requestId),o=e(_e),s=n.restoreDraft?o===``?n.submittedDraft:`${o}\n\n${n.submittedDraft}`:o,l=n.restoreDraft?[...e(E)??[],...n.images??[]]:e(E);try{t(Ce,{draft:s,draftPayload:{images:l,delivery:e(D)},admissions:a})}catch(e){gq(`restore draft after secret refusal`,e)}t(E,l),t(Se,a),t(ke,s);let u={variant:`error`,message:`Not sent: this message contains a key or password. Nothing was saved.`},d=c();r.toast(d===void 0?u:{...u,action:d})}),Ge=$(null,(t,n)=>{if(d)for(let i of t(Se)){let a=p.get(i.requestId);i.status!==`admitting`||a===void 0||m.has(i.requestId)||(m.add(i.requestId),kY(e.withdraw(i.requestId)).then(e=>{if(!d||!t(Se).some(({requestId:e,status:t})=>e===i.requestId&&t===`admitting`))return;if(e.status===`accepted`){n(me,t=>new Map(t).set(e.commandId,i.requestId)),n(Se,t=>t.map(t=>t.requestId===i.requestId?{...t,status:`accepted`,commandId:e.commandId}:t)),n(Ce),n(Oe);return}let o=t(_e),s=i.restoreDraft?o===``?i.submittedDraft:`${o}\n\n${i.submittedDraft}`:o,c=t(Se).map(e=>e.requestId===i.requestId?{...e,status:`failed`,error:a}:e),l=i.restoreDraft?[...t(E)??[],...i.images??[]]:t(E);n(Ce,{draft:s,draftPayload:{images:l,delivery:t(D)},admissions:c}),n(E,l),n(Se,c),n(ke,s),r.toast({variant:`error`,message:`Not sent: ${a}`})}).catch(e=>{d&&r.toast({variant:`error`,message:`Send outcome unconfirmed; draft saved: ${OY(e)}`})}).finally(()=>{m.delete(i.requestId)}))}}),Ke=$(null,(e,t)=>{let n=e(Le).status,r=e(Se);if(n===`live`){e(k)===`offline_queue_full`&&t(k,void 0);let n=r.find(({status:e})=>e===`queued-local`);if(n!==void 0){let e={...n,status:`admitting`};t(Se,t=>t.map(t=>t.requestId===n.requestId?e:t)),t(Ue,{admission:e,consumeDraft:!1})}}for(let[e,t]of f)r.some(({requestId:t,status:n})=>t===e&&n===`admitting`)||(clearTimeout(t),f.delete(e),p.delete(e));for(let e of r)e.status===`admitting`&&(n===`unavailable`&&p.set(e.requestId,`Disconnected`),f.has(e.requestId)||f.set(e.requestId,setTimeout(()=>{p.set(e.requestId,`Send confirmation timed out`),t(Ge)},3e4)));(n===`live`||n===`unavailable`)&&t(Ge)}),qe=$(null,(e,t)=>(d=!0,t(ye,{kind:`idle`}),t(Ke),()=>{d=!1,be?.dispose(),be=void 0;for(let e of f.values())clearTimeout(e);f.clear()})),Je=$(null,(e,t,n=`steer`)=>{let r=e(_e),i=r;if(e(ye).kind===`recalling`||i.trim()===``&&(e(E)?.length??0)===0)return;let a=e(O),o=a.filter(({status:e})=>e!==`failed`),s=e(Le).status!==`live`;if(s&&o.some(({status:e})=>e===`queued-local`)){t(k,`offline_queue_full`);return}if(o.length>=DY){t(k,`queue_full`);return}let c={content:i,delivery:e(D)??n,images:e(E),requestId:jv(),submittedDraft:r,restoreDraft:!0,status:s?`queued-local`:`admitting`};t(Se,[...a,c]),t(Te,c.requestId),t(k,void 0),t(Ue,{admission:c,consumeDraft:!0})}),Ye=$(null,async(e,t,n)=>{let r={draft:e(_e),revision:e(xe)},i=await n(r.draft,()=>{t(je,r)});return i?.status===`handled`&&!oY(i)&&t(je,r),i}),Xe=$(null,(e,t)=>{let n=e(O);if(e(Ie)===`interrupted`||e(Ie)===`failed`){let r=e(g),i=e(ae),a=e(h).data?.latestPrompt;if(r===void 0||a===void 0||a.commandId!==i)return;let o=a.text,s=e(_e)===o&&NY(e(E),a.images);if(n.filter(({status:e})=>e!==`failed`).length>=DY){t(k,`queue_full`);return}let c={content:o,images:a.images,delivery:`followUp`,requestId:jv(),submittedDraft:o,restoreDraft:s,status:`admitting`};t(Se,[...e(Se),c]),t(Te,c.requestId),t(k,void 0),t(Ue,{admission:c,consumeDraft:s});return}let r=n.filter(e=>e.status===`failed`).at(-1);if(r===void 0)return;if(n.filter(({status:e})=>e!==`failed`).length>=DY){t(k,`queue_full`);return}let i=e(_e)===r.submittedDraft&&NY(e(E),r.images),a={content:r.content,delivery:r.delivery,images:r.images,requestId:jv(),submittedDraft:r.submittedDraft,restoreDraft:i,status:`admitting`};t(Se,e=>e.map(e=>e.requestId===r.requestId?a:e)),t(Te,a.requestId),t(k,void 0),t(Ue,{admission:a,consumeDraft:i})}),Ze=$(null,(e,t,n)=>{let r=e(Se),i=r.filter(e=>e.requestId!==n||e.status!==`failed`);i.length!==r.length&&(t(Se,i),e(Te)===n&&t(Te,i.at(-1)?.requestId))}),Qe,$e=$(null,e=>{if(Qe!==void 0)return Qe;let t=e(g)?.activity.queue;if(t?.state!==`running`)return Promise.resolve();let n=e(Me).mutateAsync(t.commandId).then(()=>void 0).finally(()=>{Qe===n&&(Qe=void 0)});return Qe=n,n}),et;return{cancelQueuedAtom:A,reconcileQueuedCancellationAtom:ue,abortAtom:Me,draftImagesAtom:E,recallStateAtom:ye,recallAtom:we,commandIdAtom:Be,contextAtom:ze,admissionErrorAtom:k,admissionsAtom:O,cancelAtom:$e,checkpointDraftAtom:Ee,draftAtom:_e,dismissFailedAtom:Ze,extensionsAtom:de,failureAtom:Ie,jumpToLatestAtom:ee,loadOlderHistoryAtom:w,loadNewerHistoryAtom:te,lastReplyAtAtom:_,observationAtom:Le,observedCommandIdsAtom:De,rawAdmissionsAtom:Se,maintainRecoveryAtom:Ke,mountRecoveryAtom:qe,pinVisibleHistoryAtom:ne,queryAtom:h,reconcileAdmissionsAtom:Oe,reconnectAtom:$(null,n=>{let r=n(Le);if(r.status!==`unavailable`)return Promise.resolve({kind:`nothing_to_reconnect`,state:r.status===`live`?`connected`:`connecting`});if(et!==void 0)return et;let i=t.getQueryCache().find({queryKey:qJ(e).queryKey});if(i===void 0)return Promise.resolve({kind:`failed`,cause:`Session observation is unavailable`});let a=i.state.dataUpdateCount,o=i.state.errorUpdateCount;return et=new Promise(r=>{let s=()=>void 0,c=!1,l=e=>{c||(c=!0,s(),clearTimeout(d),r(e))},u=()=>{if(i.state.dataUpdateCount>a&&t.getQueryData(qJ(e).queryKey)?.observation===`live`){l({kind:`reconnected`});return}i.state.errorUpdateCount>o&&l({kind:`failed`,cause:AY(i.state.error)})};s=t.getQueryCache().subscribe(e=>{e.query===i&&u()});let d=setTimeout(()=>{i.cancel({revert:!0}).then(()=>{let e=`Session history did not reopen within 10 seconds`;i.setState({status:`error`,error:Error(e)}),l({kind:`failed`,cause:e})})},1e4);n(h).refetch({cancelRefetch:!0}).catch(e=>{l({kind:`failed`,cause:AY(e)})}),u()}).finally(()=>{et=void 0}),et}),retryAtom:Xe,setDraftAtom:ke,setImagesAtom:Ae,sendAtom:Je,snapshotAtom:g,statusAtom:Re,viewStateAtom:He,submitCommandAtom:Ye,timelineAtom:Fe}}var IY=(0,M.createContext)(null);function LY(){let e=(0,M.useContext)(IY);if(e===null)throw Error(`Parakeet hooks require a ParakeetProvider`);return e}function RY(e){let{keySettings:t}=LY();(0,M.useEffect)(()=>{if(e!==void 0)return t.current=e,()=>{t.current===e&&(t.current=void 0)}},[t,e])}function zY(e){let{store:t}=LY(),n=(0,M.useCallback)(n=>t.sub(e,n),[e,t]),r=(0,M.useCallback)(()=>t.get(e),[e,t]);return(0,M.useSyncExternalStore)(n,r,r)}function BY(e){let{store:t}=LY();return(0,M.useCallback)((...n)=>t.set(e,...n),[e,t])}function VY({children:e,session:t,clients:n=xY,interactionStore:r,authorOf:i=MM,onToast:a,draftStorage:o,draftIdentity:s}){let c=c_(),l=(0,M.useMemo)(()=>PY(o),[o]),u=s===void 0?t.address:JSON.stringify([s.agentId,s.sessionId]),d=(0,M.useMemo)(()=>new Set(n.filter(e=>e.promptPresentation===`footer`).map(e=>e.id)),[n]),f=(0,M.useMemo)(()=>{let e=r??QW(),n=$(SY),a={current:void 0},o=e=>e.kind!==`user_message`||e.origin===void 0||!d.has(e.origin.extensionId);return{atoms:FY(t,c,i,e,l,u,n,o,()=>a.current),session:t,store:NG(),contributions:n,interactions:e,shown:o,keySettings:a}},[c,t,r,i,d,l,u]);return(0,M.useEffect)(()=>{let e=()=>{f.store.set(f.atoms.maintainRecoveryAtom)},t=f.store.sub(f.atoms.observationAtom,e),n=f.store.sub(f.atoms.rawAdmissionsAtom,e),r=f.store.set(f.atoms.mountRecoveryAtom);return()=>{r(),t(),n()}},[f]),(0,M.useEffect)(()=>{if(a!==void 0)return f.interactions.subscribeToasts(a)},[f,a]),(0,M.useEffect)(()=>{l.status===`unavailable`&&gq(`acquire draft storage`,l.cause)},[l]),(0,M.useEffect)(()=>{let e=()=>{f.store.set(f.atoms.reconcileQueuedCancellationAtom)},t=f.store.sub(f.atoms.snapshotAtom,e);return e(),t},[f]),(0,M.useEffect)(()=>{let e=()=>{f.store.set(f.atoms.reconcileAdmissionsAtom)},t=f.store.sub(f.atoms.observedCommandIdsAtom,e);return e(),()=>{t()}},[f]),(0,M.useEffect)(()=>{let e=XW(n,(e,t)=>{gq(`client contribution ${e}`,t),f.interactions.report({tone:`error`,message:t.message})}),t=e.subscribe(()=>{f.store.set(f.contributions,e.snapshot())}),r=()=>{e.update(f.store.get(f.atoms.extensionsAtom))},i=f.store.sub(f.atoms.extensionsAtom,r);return r(),()=>{i(),e.dispose(),t()}},[n,f]),(0,q.jsx)(IY.Provider,{value:f,children:e})}function HY(){let{atoms:e}=LY(),t=zY(e.timelineAtom),n=BY(e.loadOlderHistoryAtom),r=BY(e.loadNewerHistoryAtom),i=BY(e.jumpToLatestAtom),a=BY(e.pinVisibleHistoryAtom),o=BY(e.cancelQueuedAtom),{shown:s}=LY(),c=(0,M.useMemo)(()=>t.settled.filter(s),[t.settled,s]),l=(0,M.useMemo)(()=>t.tail.filter(s),[t.tail,s]),u=(0,M.useMemo)(()=>({...t,settled:c,tail:l}),[t,c,l]),d=u.settled.length+u.tail.length===0&&t.settled.length+t.tail.length>0&&t.hasMoreHistory&&!t.loadingOlderHistory,f=`${t.settled[0]?.id??``}:${String(t.settled.length)}`,p=(0,M.useRef)(void 0);return(0,M.useEffect)(()=>{!d||p.current===f||(p.current=f,n())},[d,f,n]),(0,M.useMemo)(()=>({...u,cancelQueued:o,jumpToLatest:i,loadNewerHistory:r,loadOlderHistory:n,pinVisibleHistory:a}),[u,o,i,r,n,a])}function UY(){let{atoms:e}=LY(),t=zY(e.draftAtom),n=zY(e.draftImagesAtom),r=zY(e.recallStateAtom),i=BY(e.recallAtom),a=zY(e.failureAtom),o=zY(e.admissionErrorAtom),s=BY(e.setDraftAtom),c=BY(e.setImagesAtom),l=BY(e.checkpointDraftAtom),u=BY(e.sendAtom),d=BY(e.submitCommandAtom),f=BY(e.retryAtom),p=(0,M.useCallback)(()=>{f()},[f]),m=BY(e.dismissFailedAtom),h=BY(e.cancelAtom);return(0,M.useMemo)(()=>({admissionError:o,cancel:h,checkpointDraft:l,draft:t,images:n,recall:i,recallState:r,dismissFailed:m,failure:a,retry:p,send:u,setDraft:s,setImages:c,submitCommand:d}),[o,h,l,t,n,i,r,m,a,p,u,s,c,d])}function WY(){let{atoms:e}=LY();return BY(e.dismissFailedAtom)}function GY(){return LY().session}function KY(){return zY(LY().atoms.extensionsAtom)}function qY(){let{atoms:e}=LY(),t=zY(e.commandIdAtom),n=zY(e.statusAtom),r=zY(e.viewStateAtom),i=zY(e.observationAtom),a=BY(e.reconnectAtom),o=zY(e.contextAtom);return(0,M.useMemo)(()=>({commandId:t,context:o,observation:i,reconnect:a,status:n,viewState:r}),[t,o,i,a,n,r])}function JY(){return zY(LY().contributions)}function YY(){return LY().interactions}var XY={neutral:`alert-neutral`,primary:`alert-primary`,secondary:`alert-secondary`,accent:`alert-accent`,success:`alert-success`,info:`alert-info`,warning:`alert-warning`,error:`alert-error`},ZY=(0,M.forwardRef)(function({action:e,children:t,className:n,description:r,title:i,tone:a=`neutral`,...o},s){return(0,q.jsxs)(`div`,{...o,className:Y(`alert caps-alert`,XY[a],n),"data-tone":a,role:o.role??`alert`,ref:s,children:[(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i?(0,q.jsx)(`h3`,{className:`font-semibold`,children:i}):null,r?(0,q.jsx)(`p`,{className:`text-sm`,children:r}):null,t]}),e?(0,q.jsx)(`div`,{className:`shrink-0`,children:e}):null]})}),QY={2:`h2`,3:`h3`,4:`h4`};function $Y(e,t){let{reduced:n}=t,r=e&&!n,i=fT(t,600),[a,o]=(0,M.useState)(r);return(0,M.useEffect)(()=>{if(o(r),!r)return;let e=globalThis.setTimeout(()=>{o(!1)},i);return()=>{globalThis.clearTimeout(e)}},[r,i]),a}var eX=(0,q.jsx)(VT,{decorative:!0,pace:`idle`,size:`md`,tone:`primary`,variant:`wander`}),tX=(0,M.forwardRef)(function({actions:e,secondaryAction:t,className:n,description:r,headingLevel:i=2,primaryAction:a,suggestions:o,thinking:s=!1,title:c,visual:l,renderVisual:u,variant:d=`plain`,...f},p){let m=(0,M.useId)(),h=(0,M.useRef)(null),g=dT(h),_=$Y(d===`speech`,g)&&!s,v=QY[i],y=l??(d===`panel`?`blobs`:void 0),b=u?u({speaking:_,thinking:s}):y===`blobs`?eX:y,x=`${m}-reason`,S=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(v,{ref:h,className:`empty-state-title`,id:f[`aria-labelledby`]?void 0:m,children:c}),(0,q.jsx)(`p`,{children:r}),a?(0,q.jsxs)(`div`,{className:`empty-state-primary`,children:[(0,q.jsxs)(`div`,{className:`empty-state-action-row`,children:[(0,q.jsx)(WT,{"aria-describedby":a.disabled&&a.disabledReason?x:void 0,disabled:a.disabled,loading:a.pending===!0,onClick:a.onSelect,variant:`primary`,children:a.label}),t]}),a.disabled&&a.disabledReason?(0,q.jsx)(`span`,{className:`empty-state-reason`,id:x,children:a.disabledReason}):null]}):null,o&&o.length>0?(0,q.jsx)(`ul`,{"aria-label":`Try one of these`,className:`empty-state-suggestions`,children:o.map((e,t)=>(0,q.jsx)(`li`,{children:(0,q.jsx)(WT,{disabled:e.disabled,loading:e.pending===!0,size:`sm`,variant:`outline`,onClick:e.onSelect,children:e.label})},`${String(t)}:${e.label}`))}):null,e?(0,q.jsx)(`div`,{className:`empty-state-actions`,children:e}):null]});return(0,q.jsxs)(`section`,{...f,"aria-labelledby":f[`aria-labelledby`]??m,className:Y(`empty-state`,d!==`plain`&&`empty-state-${d}`,n),ref:p,children:[b?(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`empty-state-visual`,children:b}):null,d===`speech`?(0,q.jsx)(`div`,{className:`empty-state-bubble`,children:S}):S]})});function nX({available:e,cause:t,className:n,fix:r,need:i,secondary:a,variant:o,visual:s,waitingFor:c=`setup`,...l}){let u=r.pending===!0,d=u?`Waiting for ${c}…`:r.label,f=e?(0,q.jsxs)(q.Fragment,{children:[t,` `,(0,q.jsx)(`span`,{className:`caps-setup-notice-available`,children:e})]}):t;return o===`panel`?(0,q.jsx)(tX,{...l,actions:a?(0,q.jsx)(WT,{size:`sm`,variant:`ghost`,onClick:a.onSelect,children:a.label}):void 0,className:Y(`caps-setup-notice`,n),"data-variant":`panel`,description:f,primaryAction:{label:d,onSelect:r.onSelect,pending:u},title:i,variant:`panel`,visual:s??(0,q.jsx)(wM,{className:`caps-setup-notice-dot`,glyph:`dot`,tone:`warning`})}):(0,q.jsx)(`div`,{className:`caps-setup-notice-frame`,children:(0,q.jsx)(ZY,{...l,action:(0,q.jsxs)(`span`,{className:`caps-setup-notice-actions`,children:[a?(0,q.jsx)(WT,{size:`sm`,variant:`ghost`,onClick:a.onSelect,children:a.label}):null,(0,q.jsx)(WT,{loading:u,size:`sm`,variant:`outline`,onClick:r.onSelect,children:d})]}),className:Y(`caps-setup-notice`,n),"data-variant":o,description:f,role:`status`,title:(0,q.jsxs)(`span`,{className:`caps-setup-notice-title`,children:[(0,q.jsx)(wM,{glyph:`dot`,tone:`warning`}),i]}),tone:`warning`})})}var rX=M.createContext(void 0);function iX(e){let t=M.useContext(rX);if(!e&&t===void 0)throw Error(QT(27));return t}var aX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=iX(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return jE(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:nD,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),oX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=iX(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=rO({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,EO(lD,e.nativeEvent))}return jE(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),sX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=iX(),c=TO(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),jE(`p`,e,{ref:t,props:[{id:c},o]})}),cX=M.createContext(void 0);function lX(){let e=M.useContext(cX);if(e===void 0)throw Error(QT(26));return e}var uX=`--nested-dialogs`,dX=`data-nested-dialog-open`,fX={...tD,...HE,nestedDialogOpen(e){return e?{[dX]:``}:null}},pX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=iX(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);lX(),zO({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?YA(c.context.popupRef):o,w=g>0,ee=c.useStateSetter(`popupElement`),te=jE(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...JA,hidden:!m,onKeyDown(e){zj.has(e.key)&&e.stopPropagation()},style:{[uX]:g}},s],ref:[t,c.context.popupRef,ee],stateAttributesMapping:fX});return(0,q.jsx)(VA,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:te})}),mX=M.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=iX(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,q.jsx)(cX.Provider,{value:n,children:(0,q.jsxs)(CA,{ref:t,...r,children:[a&&o===!0&&(0,q.jsx)(Vj,{ref:i.context.internalBackdropRef,inert:Bj(!s)}),e.children]})}):null});function hX({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=M.useState(0),[d,f]=M.useState(0),p=l===0,m=GA(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=QO(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||XO(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return Qj(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{!e.select(`open`)&&!e.select(`mounted`)||(u(t),f(n))}),ZD(()=>{!r&&!i&&(u(0),f(0))},[r,i]),ZD(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),oj(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var gX={...Lj,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},_X=class extends Oj{constructor(e,t,n){let r=new cj,i=vX(e,r,t,n);super(i,yX(r),gX)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(ej(this.state,e,t.trigger)))}};function vX(e,t,n,r=!1){return{...jj(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function yX(e){return{popupRef:M.createRef(),backdropRef:M.createRef(),internalBackdropRef:M.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function bX(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=iX(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=XA((e,t)=>new _X({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);sj(b,x),ij(b);let{forceUnmount:w}=aj(x,b);M.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,EO(vD))}),[w,b]);let ee=x||S||u!=null;return(0,q.jsxs)(rX.Provider,{value:b,children:[u&&(0,q.jsx)(ZA,{handle:u,store:b}),ee&&(0,q.jsx)(hX,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var xX=yj(function(e){return bX(`dialog`,e)}),SX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=iX(),c=TO(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),jE(`h2`,e,{ref:t,props:[{id:c},o]})}),CX=bj(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=iX(!0),f=Rj(l)??d;if(!f)throw Error(QT(79));let p=TO(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=M.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=rj(p,_,f,{payload:c}),{getButtonProps:b,buttonRef:x}=rO({disabled:a,native:o}),S=HA(m),C=tM(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),w={disabled:a,open:h},ee=f.useState(`triggerProps`,y);return jE(`button`,e,{state:w,ref:[x,t,v,_],props:[S.reference,ee,C,{[hA]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,b],stateAttributesMapping:$E})}),wX=(0,M.createContext)(null);function TX({children:e,interactionOwner:t=`local`,modal:n=!0,onOpenChange:r,...i}){return(0,q.jsx)(wX.Provider,{value:{interactionOwner:t,modal:n},children:(0,q.jsx)(xX,{...i,modal:n,onOpenChange:(e,n)=>{if(t===`host`&&!e&&n.reason===`escape-key`){n.cancel(),n.allowPropagation();return}r?.(e,n)},children:e})})}function EX(){let e=(0,M.useContext)(wX);if(!e)throw Error(`Dialog parts must be used inside <Dialog>`);return e}var DX=(0,M.forwardRef)(function({className:e,type:t=`button`,...n},r){return(0,q.jsx)(CX,{...n,className:t=>Y(`btn`,sT(e,t)),ref:r,type:t})}),OX=(0,M.forwardRef)(function({container:e,...t},n){let r=uM(`dialog`);return e==null&&r===null?null:(0,q.jsx)(mX,{...t,container:e??r,ref:n})}),kX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(aX,{...t,ref:n,className:t=>Y(`caps-dialog-backdrop fixed inset-0 bg-black/40`,sT(e,t))})}),AX=(0,M.forwardRef)(function({className:e,finalFocus:t,size:n=`default`,...r},i){let a=EX();return(0,q.jsx)(pX,{...r,"data-size":n,className:t=>Y(`caps-dialog-popup overflow-y-auto overscroll-contain rounded-box bg-base-100 p-lg text-base-content shadow-xl`,n===`fill`?`fixed inset-0 h-full w-full max-w-none`:`caps-dialog-popup-default`,sT(e,t)),finalFocus:a.interactionOwner===`host`?!1:t??!0,ref:i})}),jX=(0,M.forwardRef)(function({container:e,keepMounted:t=!0,forceBackdrop:n=!1,className:r,size:i=`default`,...a},o){let{modal:s}=EX();return(0,q.jsxs)(OX,{container:e,keepMounted:t,children:[s===!0?(0,q.jsx)(kX,{forceRender:n}):null,(0,q.jsx)(AX,{...a,size:i,className:e=>Y(i==="default"&&`fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2`,sT(r,e)),ref:o})]})});function MX({className:e,...t}){return(0,q.jsx)(`div`,{...t,className:Y(`flex justify-end gap-sm`,e)})}function NX({className:e,...t}){return(0,q.jsx)(`div`,{...t,className:Y(`flex flex-col gap-sm`,e)})}var PX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(SX,{...t,className:t=>Y(`text-lg font-semibold`,sT(e,t)),ref:n})}),FX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(sX,{...t,className:t=>Y(`text-sm text-base-content`,sT(e,t)),ref:n})}),IX=(0,M.forwardRef)(function({className:e,type:t=`button`,...n},r){return(0,q.jsx)(oX,{...n,className:t=>Y(`btn btn-ghost`,sT(e,t)),ref:r,type:t})}),LX=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),RX=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),zX={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},BX=(0,M.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,M.createElement)(`svg`,{ref:c,...zX,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:RX(`lucide`,i),...s},[...o.map(([e,t])=>(0,M.createElement)(e,t)),...Array.isArray(a)?a:[a]])),VX=(e,t)=>{let n=(0,M.forwardRef)(({className:n,...r},i)=>(0,M.createElement)(BX,{ref:i,iconNode:t,className:RX(`lucide-${LX(e)}`,n),...r}));return n.displayName=`${e}`,n},HX=VX(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),UX=VX(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),WX=VX(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),GX=VX(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),KX=VX(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function qX(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function JX(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function YX(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var XX=(e,t)=>Math.abs(e-t)<1.01,ZX=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},QX,$X=()=>{if(QX!==void 0)return QX;if(typeof navigator>`u`)return QX=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return QX=!0;let e=navigator.maxTouchPoints;return QX=navigator.platform===`MacIntel`&&e!==void 0&&e>0},eZ=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},tZ=e=>e,nZ=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},rZ=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(eZ(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(eZ(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},iZ={passive:!0},aZ=typeof window>`u`||`onscrollend`in window,oZ=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&aZ,o=0,s=a?null:ZX(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,iZ),a&&r.addEventListener(`scrollend`,u,iZ),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},sZ=(e,t)=>oZ(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),cZ=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},lZ=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},uZ=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:tZ,rangeExtractor:nZ,onChange:()=>{},measureElement:cZ,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=Math.max(0,e.start+t);n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=JX(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!$X()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,iZ),e.addEventListener(`touchend`,n,iZ),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&($X()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=JX(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=JX(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._flatMeasurements;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e,this._flatMeasurements=a}let o;if(u===0)o=t+n;else{let e=u-1;o=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t),n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=o,a[t*2+1]=i,o+=i+s}let c=qX(e,a,r);return this.measurementsCache=c,c}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=JX(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=pZ(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=JX(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(!this.isIndexInRange(e))return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f)}},this.getVirtualItems=JX(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return YX(t[dZ(0,t.length-1,r?e=>n[e*2]:e=>YX(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){return e===0?!1:$X()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=e,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&XX(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},dZ=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function fZ(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function pZ(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=fZ(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=dZ(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var mZ=typeof document<`u`?M.useLayoutEffect:M.useEffect;function hZ({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=M.useReducer(e=>e+1,0)[1],a=M.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},s=e=>{let t=a.current;if(!t.enabled||!t.container)return;o(e);let n=!!e.options.horizontal,r=t.mode===`transform`,i=n?`left`:`top`,s=e.options.scrollMargin,c=e.getVirtualItems();for(let a of c){let o=a.start-s,c=e.elementsCache.get(a.key);c&&t.lastPositions.get(c)!==o&&(t.lastPositions.set(c,o),r?c.style.transform=n?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:c.style[i]=`${o}px`)}},c={...r,onChange:(t,n)=>{var o;let c=a.current,l=!0;if(c.enabled){s(t);let e=t.range,n=c.prevRange;l=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,l&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}l&&(e&&n?(0,sy.flushSync)(i):i()),(o=r.onChange)==null||o.call(r,t,n)}},[l]=M.useState(()=>{let e=new uZ(c);return Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return l.setOptions(c),mZ(()=>l._didMount(),[]),mZ(()=>(o(l),l._willUpdate())),mZ(()=>{s(l)}),l}function gZ(e){return hZ({observeElementRect:rZ,observeElementOffset:sZ,scrollToFn:lZ,...e})}var _Z=$S({keyCode:iC(229)});function vZ(e){return e.nativeEvent.isComposing||ie(_Z,e.nativeEvent).success}var yZ=(0,M.forwardRef)(function({className:e,invalid:t,...n},r){return(0,q.jsx)(`textarea`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Y(`textarea textarea-bordered w-full`,t&&`textarea-error`,e),ref:r})}),bZ={unchecked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,checked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,mixed:`M3.4 6 L6 6 L8.6 6`},xZ={blurStdDeviation:.22,alphaSlope:18,alphaIntercept:-8};function SZ({state:e}){let t=`caps-checkbox-${(0,M.useId)().replaceAll(`:`,``)}`,n=(0,M.useRef)(null),r=(0,M.useRef)(e).current,i=(0,M.useRef)(e),a=xT();return(0,M.useLayoutEffect)(()=>{if(!n.current)return;let t=e!==`unchecked`,r=i.current!==`unchecked`,o=a||i.current===e;i.current=e;let s=uT(n.current),c=mM(s,{ease:`inCubic`,duration:160}),l=nr(n.current,{d:{to:bZ[e],...o?fM:mM(s,{ease:`outCubic`,duration:200})},"stroke-dashoffset":{to:+!t,...o?fM:t?mM(s,{ease:`inOutSine`,duration:260}):c},"stroke-width":o?{to:t?2.4:0,duration:0}:t&&!r?[{to:2.2,...mM(s,{ease:`outCubic`,duration:65})},{to:2.4,delay:fT(s,120),...pM(s,{bounce:.35,duration:220})}]:{to:t?2.4:0,...c}});return()=>{l.cancel()}},[e,a]),(0,q.jsxs)(`svg`,{className:`caps-checkbox-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsx)(DT,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,q.jsx)(OT,{id:`${t}-shadow`}),(0,q.jsx)(kT,{id:`${t}-inset`}),(0,q.jsx)(jT,{id:`${t}-goo`,values:xZ}),(0,q.jsxs)(`filter`,{id:`${t}-relief`,x:`-25%`,y:`-25%`,width:`150%`,height:`150%`,colorInterpolationFilters:`sRGB`,children:[(0,q.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.28`,result:`relief`}),(0,q.jsx)(`feSpecularLighting`,{in:`relief`,surfaceScale:`1.2`,specularConstant:`0.55`,specularExponent:`18`,lightingColor:`color-mix(in srgb, var(--color-white) calc(var(--depth) * 100%), var(--color-black))`,result:`light`,children:(0,q.jsx)(`feDistantLight`,{azimuth:`225`,elevation:`55`})}),(0,q.jsx)(`feComposite`,{in:`light`,in2:`SourceAlpha`,operator:`in`,result:`clipped-light`}),(0,q.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`clipped-light`,mode:`screen`})]}),(0,q.jsx)(`mask`,{id:`${t}-contour`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`12`,height:`12`,style:{maskType:`alpha`},children:(0,q.jsx)(`path`,{ref:n,d:bZ[r],fill:`none`,stroke:`var(--color-white)`,strokeWidth:r===`unchecked`?0:2.4,pathLength:`1`,strokeDasharray:`1`,strokeDashoffset:+(r===`unchecked`),strokeLinecap:`round`,strokeLinejoin:`round`,filter:e===`mixed`?void 0:`url(#${t}-goo)`})}),(0,q.jsx)(`clipPath`,{id:`${t}-well`,children:(0,q.jsx)(`rect`,{x:`1`,y:`1`,width:`10`,height:`10`,rx:`2.5`})})]}),(0,q.jsx)(`rect`,{className:`caps-checkbox-track`,x:`0.5`,y:`0.5`,width:`11`,height:`11`,rx:`3`,filter:`url(#${t}-inset)`}),(0,q.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,q.jsx)(`g`,{filter:`url(#${t}-shadow)`,children:(0,q.jsx)(`g`,{filter:`url(#${t}-relief)`,children:(0,q.jsx)(`g`,{mask:`url(#${t}-contour)`,children:(0,q.jsx)(`rect`,{x:`0`,y:`0`,width:`12`,height:`12`,fill:`url(#${t}-surface)`})})})})})]})}var CZ=(0,M.forwardRef)(function({className:e,appearance:t,indicator:n,invalid:r,indeterminate:i=!1,checked:a,defaultChecked:o=!1,onChange:s,...c},l){let u=(0,M.useRef)(null),[d,f]=(0,M.useState)(o),p=a??d,m=i?`mixed`:p?`checked`:`unchecked`;return(0,M.useImperativeHandle)(l,()=>{if(!u.current)throw Error(`Checkbox input is not mounted`);return u.current},[]),(0,M.useLayoutEffect)(()=>{u.current&&(u.current.indeterminate=i)},[i]),(0,M.useEffect)(()=>{let e=u.current?.form;if(!e||a!==void 0)return;let t=e=>{queueMicrotask(()=>{!e.defaultPrevented&&u.current&&f(o)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[a,o,c.form]),(0,q.jsxs)(`span`,{className:`caps-checkbox`,"data-appearance":t===`compact`?t:void 0,"data-state":m,"data-custom-indicator":n!==void 0||void 0,children:[(0,q.jsx)(`input`,{...c,checked:p,"aria-checked":i?`mixed`:p,"aria-invalid":r?!0:c[`aria-invalid`]===!1?void 0:c[`aria-invalid`],className:Y(`caps-checkbox-input`,e),onChange:e=>{a===void 0&&f(e.target.checked),s?.(e),e.currentTarget.indeterminate=i},ref:u,type:`checkbox`}),n===void 0?(0,q.jsx)(SZ,{state:m}):n]})}),wZ=(0,M.forwardRef)(function({className:e,invalid:t,...n},r){return(0,q.jsx)(`input`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Y(`input caps-input w-full`,e),ref:r})});(0,M.forwardRef)(function({leading:e,className:t,...n},r){return(0,q.jsxs)(`span`,{className:`caps-search-input`,"data-leading":e?`true`:void 0,children:[e?(0,q.jsx)(`span`,{className:`caps-search-leading`,"aria-hidden":`true`,children:e}):null,(0,q.jsx)(wZ,{...n,type:`search`,className:t,ref:r})]})});function TZ({getKey:e,isDisabled:t=()=>!1,items:n,getFallbackKey:r}){let i=(0,M.useMemo)(()=>{let r=n.map(e);if(r.some(e=>!e))throw Error(`Selectable items require non-empty keys`);if(new Set(r).size!==r.length)throw Error(`Selectable items require unique keys`);return n.filter(e=>!t(e))},[e,t,n]),[a,o]=(0,M.useState)(null),s=r?.(i)??null,c=a!==null&&i.some(t=>e(t)===a)?a:s!==null&&i.some(t=>e(t)===s)?s:null;(0,M.useEffect)(()=>{a!==null&&!i.some(t=>e(t)===a)&&o(null)},[a,i,e]);let l=i.find(t=>e(t)===c),u=l?i.findIndex(t=>e(t)===c):-1;return{activeIndex:u,activeItem:l,activeKey:c,enabledItems:i,move:(t,n)=>{if(i.length===0)return;let r=n?n===`start`?0:i.length-1:u<0?t>0?0:i.length-1:(u+t+i.length)%i.length,a=i[r];a&&o(e(a))},setActiveKey:o}}var EZ=(0,M.forwardRef)(function({className:e,density:t=`regular`,...n},r){return(0,q.jsx)(`ul`,{...n,className:Y(`list`,t===`compact`&&`list-sm`,e),ref:r})}),DZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`li`,{...t,className:Y(`list-row`,e),ref:n})});(0,M.forwardRef)(function({className:e,icon:t,label:n,children:r,...i},a){return(0,q.jsxs)(`li`,{...i,className:Y(`list-row caps-fact`,e),ref:a,children:[(0,q.jsxs)(`span`,{className:`caps-fact-label`,children:[t?(0,q.jsx)(`span`,{className:`caps-fact-icon`,"aria-hidden":`true`,children:t}):null,n]}),(0,q.jsx)(`span`,{className:`caps-fact-value`,children:r})]})});var OZ=(0,M.forwardRef)(function({aside:e,children:t,className:n,level:r=2,...i},a){return(0,q.jsxs)(r===3?`h3`:`h2`,{...i,className:Y(`caps-data-list-heading`,n),ref:a,children:[(0,q.jsx)(`span`,{children:t}),e===void 0?null:(0,q.jsx)(`span`,{className:`caps-data-list-heading-aside`,children:e})]})}),kZ=(0,M.forwardRef)(function({children:e,className:t,optional:n,required:r,...i},a){return(0,q.jsxs)(`label`,{...i,className:Y(`label caps-label cursor-pointer justify-start gap-sm text-sm font-semibold text-base-content`,t),ref:a,children:[e,r?(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`text-error`,children:`*`}):null,n&&!r?(0,q.jsx)(`span`,{className:`caps-label-optional`,children:`Optional`}):null]})}),AZ=(0,M.forwardRef)(function({children:e,className:t,...n},r){return(0,q.jsx)(`div`,{...n,className:Y(`caps-input-group join flex w-full items-stretch [&>*]:join-item [&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>.btn]:shrink-0 [&>.input]:min-w-0 [&>.input]:flex-1 [&>.select]:min-w-0 [&>.select]:flex-1`,t),ref:r,children:M.Children.map(e,e=>(0,M.isValidElement)(e)?(0,M.cloneElement)(e,{className:Y(`join-item caps-input-group-control`,e.props.className)}):e)})}),jZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,className:Y(`join-item flex items-center border border-base-300 bg-base-200 px-md text-sm text-base-content`,e),ref:n})});function MZ(e){let t=e.parentElement;if(!t||e.previousElementSibling===null)return 0;let n=getComputedStyle(t);if(!(n.display.includes(`grid`)||n.display.includes(`flex`)&&n.flexDirection.startsWith(`column`)))return 0;let r=Number.parseFloat(n.rowGap);return Number.isFinite(r)?r:0}(0,M.forwardRef)(function({show:e,appear:t=!1,children:n,className:r,...i},a){let o=(0,M.useRef)(null);(0,M.useImperativeHandle)(a,()=>o.current);let s=xT(),[c,l]=(0,M.useState)(e),u=(0,M.useRef)(!0);return e&&!c&&l(!0),(0,M.useLayoutEffect)(()=>{let n=o.current,r=u.current;if(u.current=!1,!n||r&&!t)return;if(!gT(n)){e||l(!1);return}let i=uT(n),a=`translateY(${String(i.distance)}px)`,c=hT(i,i.ease),d=n.getBoundingClientRect().height,f=MZ(n),p=(e,t)=>{n.style.overflow=`clip`;let r=e=>({height:`${String(e)}px`,marginBlockStart:`${String(e===0?-f:0)}px`}),a=n.animate([r(e),r(t)],{duration:i.normal,easing:c}),o=()=>{n.style.removeProperty(`overflow`)};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a};if(e){let e=[n.animate([{opacity:0,transform:a},{opacity:1,transform:`none`}],{duration:i.normal,easing:c})];return!s&&d>0&&e.push(p(0,d)),()=>{for(let t of e)t.cancel()}}let m=n.animate([{opacity:1,transform:`none`},{opacity:0,transform:a}],{duration:i.fast,easing:hT(i,i.easeExit),fill:`forwards`}),h=!s&&d>0?p(d,0):m;return h!==m&&h.effect?.updateTiming({fill:`forwards`}),h.addEventListener(`finish`,()=>{l(!1)}),()=>{m.cancel(),h.cancel()}},[e,t,s]),c?(0,q.jsx)(`div`,{...i,ref:o,className:Y(`caps-presence`,r),"data-present":e,"aria-hidden":!e||void 0,children:n}):null});var NZ=(0,M.forwardRef)(function({open:e,children:t,className:n,...r},i){return(0,q.jsx)(`div`,{...r,ref:i,className:Y(`caps-collapse`,n),"data-open":e,"aria-hidden":!e||void 0,children:(0,q.jsx)(`div`,{className:`caps-collapse-clip`,children:t})})});(0,M.forwardRef)(function({swapKey:e,anchor:t=`start`,children:n,className:r,...i},a){let o=(0,M.useRef)(null);(0,M.useImperativeHandle)(a,()=>o.current);let s=xT(),[c,l]=(0,M.useState)({key:e,content:n}),[u,d]=(0,M.useState)([]);c.key===e?c.content!==n&&l({key:e,content:n}):(d([...u.filter(t=>t.key!==e&&t.key!==c.key),c]),l({key:e,content:n}));let f=(0,M.useRef)(null);return(0,M.useLayoutEffect)(()=>{let e=o.current;if(!e||!(`ResizeObserver`in globalThis))return;f.current=e.getBoundingClientRect();let t=new ResizeObserver(()=>{e.getAnimations().length===0&&(f.current=e.getBoundingClientRect())});return t.observe(e),()=>{t.disconnect()}},[]),(0,M.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=[...e.querySelectorAll(`:scope > [data-swap-leaving]`)],n=e.querySelector(`:scope > [data-swap-current]`);if(n===null||t.length===0)return;if(!gT(e)){d([]);return}let r=f.current,i=e.getBoundingClientRect(),a=uT(e),c=[n.animate([{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(a.distance/2)}px)`},{opacity:1,filter:`blur(0px)`,transform:`none`}],{duration:a.normal,easing:hT(a,a.ease)})];for(let e of t){let t=e.animate([{opacity:1,filter:`blur(0px)`,transform:`none`},{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(-a.distance/2)}px)`}],{duration:a.fast,easing:hT(a,a.easeExit),fill:`forwards`}),n=e.dataset.swapLeaving;t.onfinish=()=>{d(e=>e.filter(e=>e.key!==n))},c.push(t)}let l=r!==null&&(Math.abs(r.height-i.height)>.5||Math.abs(r.width-i.width)>.5);return!s&&l&&c.push(e.animate([{width:`${String(r.width)}px`,height:`${String(r.height)}px`},{width:`${String(i.width)}px`,height:`${String(i.height)}px`}],{duration:a.normal,easing:hT(a,a.ease)})),()=>{for(let e of c)e.cancel()}},[e,s]),(0,q.jsx)(`div`,{...i,ref:o,className:Y(`caps-swap`,r),"data-anchor":t,children:[...u.map(e=>(0,q.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-leaving":e.key,"aria-hidden":`true`,children:e.content},e.key)),(0,q.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-current":``,children:n},e)]})});function PZ({children:e,...t}){let[n,r]=(0,M.useState)(e);return e&&e!==n&&r(e),(0,q.jsx)(NZ,{...t,className:Y(`caps-field-error-reveal`,t.className),open:!!e,children:(0,q.jsx)(`div`,{className:`caps-field-error`,role:`alert`,"aria-hidden":!e,children:n})})}function FZ({children:e,divider:t=!0,error:n,layout:r=`end`,status:i,...a}){return(0,q.jsxs)(`footer`,{...a,className:Y(`caps-form-footer`,a.className),"data-divider":t,"data-layout":r,children:[(0,q.jsx)(PZ,{children:n}),(0,q.jsxs)(`div`,{className:`caps-form-footer-row`,children:[i?(0,q.jsx)(`div`,{className:`caps-form-footer-status`,role:`status`,children:i}):null,(0,q.jsx)(`div`,{className:`caps-form-footer-actions`,children:e})]})]})}var IZ=(0,M.forwardRef)(function({busy:e=!1,children:t,className:n,layout:r,...i},a){return(0,q.jsx)(`form`,{...i,"aria-busy":e||void 0,className:Y(`caps-form`,n),"data-layout":r,ref:a,children:(0,q.jsx)(`fieldset`,{className:`caps-form-body`,disabled:e,children:t})})}),LZ={2:`h2`,3:`h3`,4:`h4`},RZ=(0,M.forwardRef)(function({children:e,className:t,description:n,layout:r,level:i=3,title:a,...o},s){let c=(0,M.useId)(),l=LZ[i];return(0,q.jsxs)(`section`,{...o,"aria-labelledby":`${c}-title`,className:Y(`caps-form-section`,t),"data-layout":r,ref:s,children:[(0,q.jsxs)(`header`,{className:`caps-form-section-copy`,children:[(0,q.jsx)(l,{className:`caps-form-section-title`,id:`${c}-title`,children:a}),n?(0,q.jsx)(`p`,{className:`caps-form-section-description`,children:n}):null]}),(0,q.jsx)(`div`,{className:`caps-form-section-fields`,children:e})]})}),zZ=(0,M.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,layout:a,legend:o,legendTitle:s,...c},l){let u=(0,M.useId)(),d=[n?`${u}-description`:c[`aria-describedby`],r?`${u}-error`:null].filter(Boolean).join(` `)||void 0;return(0,q.jsxs)(`fieldset`,{...c,"aria-describedby":d,"aria-invalid":r?!0:c[`aria-invalid`],className:Y(`caps-fieldset`,t),"data-layout":a,ref:l,children:[(0,q.jsxs)(`legend`,{className:`caps-fieldset-legend`,title:s,children:[i?(0,q.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}):null,o]}),n?(0,q.jsx)(`p`,{className:`caps-fieldset-description`,id:`${u}-description`,children:n}):null,(0,q.jsx)(`div`,{className:`caps-fieldset-fields`,children:e}),r===void 0?null:(0,q.jsx)(PZ,{id:`${u}-error`,children:r})]})});function BZ(e){let t=[];return M.Children.forEach(e.props.children,e=>{(0,M.isValidElement)(e)&&e.type!==jZ&&t.push(e)}),t[0]??null}var VZ=(0,M.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,label:a,labelTitle:o,optional:s,orientation:c=`vertical`,readout:l=!1,required:u,...d},f){let p=(0,M.useId)(),m=(0,M.isValidElement)(e)?e:null,h=m?.type===AZ,g=h?BZ(m):m,_=g?.props.id??p,v=`${_}-description`,y=`${_}-error`,b=[g?.props[`aria-describedby`],n?v:null,r?y:null].filter(Boolean).join(` `)||void 0,x=u===!0||g?.props.required,S=r?!0:g?.props[`aria-invalid`],C=u===!0||g?.props[`aria-required`],w={id:_};x!==void 0&&(w.required=x),b!==void 0&&(w[`aria-describedby`]=b),S!==void 0&&(w[`aria-invalid`]=S),C!==void 0&&(w[`aria-required`]=C);let ee=m&&g&&!l?h?(0,M.cloneElement)(m,void 0,M.Children.map(m.props.children,e=>e===g?(0,M.cloneElement)(g,w):e)):(0,M.cloneElement)(m,w):e,te=a?(0,q.jsx)(kZ,{htmlFor:l?void 0:_,title:o,className:c===`inline`?`font-normal`:void 0,...u===void 0?{}:{required:u},...s===void 0?{}:{optional:s},children:a}):null,ne=a||n?(0,q.jsxs)(`div`,{className:`caps-field-copy`,children:[te,n?(0,q.jsx)(`p`,{className:`caps-field-description`,id:v,children:n}):null]}):null,re=i?(0,q.jsxs)(`div`,{className:`caps-field-lead`,children:[(0,q.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}),ne]}):ne;return(0,q.jsxs)(`div`,{...d,className:Y(`caps-field`,t),"data-orientation":c,ref:f,children:[c===`horizontal`?(0,q.jsxs)(`div`,{className:`caps-field-row`,children:[re,ee]}):c===`inline`?(0,q.jsxs)(`div`,{className:`caps-field-row`,children:[ee,re]}):(0,q.jsxs)(q.Fragment,{children:[re,ee]}),(0,q.jsx)(PZ,{id:y,children:r})]})});function HZ(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}var UZ=`M 9.86 38.14 A 20 20 0 1 1 38.14 38.14`,WZ=6,GZ=new Map([[`ArrowUp`,1],[`ArrowDown`,-1],[`PageUp`,10],[`PageDown`,-10]]),KZ=(0,M.forwardRef)(function({className:e,decrementLabel:t=`Decrease`,defaultValue:n=null,disabled:r,incrementLabel:i=`Increase`,invalid:a,max:o,min:s,onBlur:c,onKeyDown:l,onValueChange:u,step:d=1,unit:f,value:p,wrap:m=!1,...h},g){let[_,v]=(0,M.useState)(n),[y,b]=(0,M.useState)(null),x=p===void 0?_:p,S=HZ(d),C=e=>{let t=Number(e.toFixed(S));return s!==void 0&&t<s?s:o!==void 0&&t>o?o:t},w=e=>{let t=e===null?null:C(e);v(t),b(null),t!==x&&u?.(t)},ee=()=>{if(y===null)return;let e=Number(y);w(y.trim()===``||!Number.isFinite(e)?null:e)},te=e=>{let t=(x??s??0)+e*d;if(m&&s!==void 0&&o!==void 0){if(t>o){w(s);return}if(t<s){w(o);return}}w(t)},ne=s!==void 0&&x!==null&&x<=s,re=o!==void 0&&x!==null&&x>=o,ie=r===!0,T=(0,M.useRef)(null),ae=s!==void 0&&o!==void 0&&o>s?((x??s)-s)/(o-s):null,oe=e=>{ie||(e.currentTarget.setPointerCapture(e.pointerId),T.current={y:e.clientY,value:x??s??0})},se=e=>{if(!T.current)return;let t=Math.trunc((T.current.y-e.clientY)/WZ),n=C(T.current.value+t*d);n!==x&&w(n)},ce=()=>{T.current=null};return(0,q.jsxs)(`span`,{className:Y(`caps-number-field`,e),"data-at-max":re||void 0,"data-at-min":ne||void 0,"data-disabled":ie||void 0,"data-wrap":m||void 0,children:[ae===null?null:(0,q.jsxs)(`svg`,{className:`caps-number-field-dial`,viewBox:`0 0 48 48`,"aria-hidden":`true`,focusable:`false`,onPointerDown:oe,onPointerMove:se,onPointerUp:ce,onPointerCancel:ce,children:[(0,q.jsx)(`path`,{className:`caps-number-field-dial-track`,d:UZ,pathLength:100}),(0,q.jsx)(`path`,{className:`caps-number-field-dial-level`,d:UZ,pathLength:100,strokeDasharray:`${String(Math.max(.5,ae*100))} 100`})]}),(0,q.jsx)(WT,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-decrement`,"aria-label":t,"aria-controls":h.id,tabIndex:-1,disabled:ie||ne&&!m,onClick:()=>{te(-1)},children:(0,q.jsx)(WX,{"aria-hidden":`true`})}),(0,q.jsxs)(`span`,{className:`caps-number-field-readout`,children:[(0,q.jsx)(`input`,{...h,"aria-invalid":a?!0:h[`aria-invalid`]===!1?void 0:h[`aria-invalid`],className:`input caps-input caps-number-field-input`,disabled:r,inputMode:h.inputMode??(S>0?`decimal`:`numeric`),max:o,min:s,onBlur:e=>{ee(),c?.(e)},onChange:e=>{b(e.target.value)},onKeyDown:e=>{if(l?.(e),e.defaultPrevented)return;let t=GZ.get(e.key);t===void 0?e.key===`Home`&&s!==void 0?(e.preventDefault(),w(s)):e.key===`End`&&o!==void 0?(e.preventDefault(),w(o)):e.key===`Enter`&&ee():(e.preventDefault(),te(t))},ref:g,step:d,type:`number`,value:y??(x===null?``:String(x))}),f?(0,q.jsx)(`span`,{className:`caps-number-field-unit`,"aria-hidden":`true`,children:f}):null]}),(0,q.jsx)(WT,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-increment`,"aria-label":i,"aria-controls":h.id,tabIndex:-1,disabled:ie||re&&!m,onClick:()=>{te(1)},children:(0,q.jsx)(GX,{"aria-hidden":`true`})})]})}),qZ=(0,M.forwardRef)(function({className:e,size:t=`md`,depth:n=`shallow`,placement:r=`standalone`,...i},a){return(0,q.jsx)(`div`,{...i,ref:a,"data-surface-size":t,"data-surface-depth":n,"data-surface-placement":r,className:Y(`caps-surface`,e)})}),JZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,ref:n,className:Y(`caps-screen`,e)})}),YZ=(0,M.forwardRef)(function({children:e,className:t,depth:n=`deep`,fit:r=`content`,density:i=`normal`,...a},o){let s=r===`fill`;return(0,q.jsx)(qZ,{...a,className:Y(t,s&&`flex min-h-0 flex-1`),depth:n,ref:o,children:(0,q.jsx)(`div`,{className:Y(`caps-display-gasket`,s&&`flex min-h-0 min-w-0 flex-1`),"data-display-density":i,children:(0,q.jsx)(JZ,{className:Y(s&&`flex min-h-0 min-w-0 flex-1 overflow-hidden`),children:e})})})});(0,M.forwardRef)(function({className:e,icon:t,status:n,title:r,...i},a){return(0,q.jsxs)(`header`,{...i,className:Y(`caps-screen-header`,e),ref:a,children:[t?(0,q.jsx)(`span`,{className:`caps-screen-header-icon`,"aria-hidden":`true`,children:t}):null,(0,q.jsx)(`span`,{className:`caps-screen-header-title`,children:r}),n?(0,q.jsx)(`span`,{className:`caps-screen-header-status`,children:n}):null]})}),(0,M.forwardRef)(function({appearance:e,className:t,...n},r){return(0,q.jsx)(`div`,{...n,className:Y(`caps-screen-cells`,t),"data-appearance":e===`compact`?e:void 0,ref:r})}),(0,M.forwardRef)(function({children:e,className:t,legend:n,readout:r,icon:i,appearance:a,wide:o=!1,...s},c){return(0,q.jsxs)(`div`,{...s,className:Y(`caps-screen-cell`,t),"data-wide":o||void 0,"data-appearance":a===`compact`?a:void 0,ref:c,children:[i?(0,q.jsx)(`span`,{className:`caps-screen-cell-icon`,children:i}):null,n?(0,q.jsx)(`span`,{className:`caps-screen-cell-legend`,children:n}):null,r?(0,q.jsx)(`span`,{className:`caps-screen-cell-readout`,children:r}):null,a===`compact`?(0,q.jsx)(`div`,{className:`caps-screen-cell-controls`,children:e}):e]})});var XZ=FC(`card caps-card`,{variants:{variant:{surface:`caps-card-surface`,outline:`caps-card-outline`,interactive:`caps-card-interactive`,game:`caps-card-game caps-card-interactive`,fit:`caps-card-fit`},density:{regular:``,compact:`caps-card-compact`}},defaultVariants:{variant:`surface`,density:`regular`}}),ZZ=(0,M.forwardRef)(function({className:e,density:t,featured:n=!1,state:r,variant:i,...a},o){return(0,q.jsx)(`div`,{...a,className:Y(XZ({density:t,variant:i}),n&&`caps-card-featured`,e),"data-state":r,ref:o})});(0,M.forwardRef)(function({className:e,density:t,variant:n,width:r=`default`,...i},a){return(0,q.jsx)(`main`,{className:`caps-centered-card-stage`,children:(0,q.jsx)(ZZ,{...i,className:Y(`caps-centered-card`,r===`wide`&&`caps-centered-card-wide`,e),ref:a,variant:n??`surface`,...t?{density:t}:{}})})});var QZ=(0,M.forwardRef)(function({alignment:e=`start`,className:t,...n},r){return(0,q.jsx)(`div`,{...n,className:Y(`caps-card-header`,e===`center`&&`caps-card-header-centered`,t),ref:r})}),$Z=(0,M.forwardRef)(function({className:e,level:t=3,...n},r){return(0,q.jsx)(t===2?`h2`:`h3`,{...n,className:Y(`caps-card-title`,e),ref:r})});(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`p`,{...t,className:Y(`caps-card-description`,e),ref:n})});var eQ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,className:Y(`caps-card-content`,e),ref:n})}),tQ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,className:Y(`caps-card-footer`,e),ref:n})}),nQ={coral:`var(--stipe-art-coral, #ff6558)`,blue:`var(--stipe-art-blue, #43a6f2)`,mint:`var(--stipe-art-mint, #63cfaa)`,grape:`var(--stipe-art-grape, #a66cc1)`,yellow:`var(--stipe-art-yellow, #ffd05d)`,cream:`var(--stipe-art-cream, #fff4de)`,ink:`var(--stipe-art-ink, #242c28)`,graphite:`var(--stipe-art-graphite, #49423f)`,inkcap:`var(--stipe-art-inkcap, #80499d)`},rQ=`light-dark(var(--stipe-sketch-ink, #242c28), var(--stipe-art-cream, #fff4de))`,iQ=`var(--color-base-100, light-dark(#fff4de, #242c28))`;function aQ({transform:e,fill:t=rQ}){return(0,q.jsx)(`path`,{transform:e,style:{fill:t},d:`M-1.264-9.479C-2.098-8.643-1.802-1.057-.907-.332.47.782 1.6-.446 1.618-3.075 1.623-3.888 1.691-5.398 1.77-6.429 1.979-9.202 1.596-10 .055-10-.588-10-.843-9.9-1.264-9.479Z`})}function oQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(aQ,{transform:`translate(25.4 19.8) rotate(-39) scale(.95 .76)`}),(0,q.jsx)(aQ,{transform:`translate(32.1 17.8) scale(.96 .95)`}),(0,q.jsx)(aQ,{transform:`translate(38.8 19.9) rotate(39) scale(.95 .77)`})]})}function sQ(){return(0,q.jsxs)(`g`,{style:{fill:nQ.blue},children:[(0,q.jsx)(`path`,{d:`M10.574 .604C9.804 1.375 9.867-.885 9.961 22.81 10.054 47.202 9.722 45.378 14.193 45.94 25.813 47.399 38.465 52.211 44.662 57.532 47.653 60.097 48.082 59.411 47.967 52.242L47.734 19.335C47.734 17.523 47.13 16.616 45.964 15.076 40.604 8.018 30.127 2.767 16.804 .462 13.045-.184 11.326-.148 10.574 .604Z`}),(0,q.jsx)(`path`,{d:`M81.571 .746C71.063 2.665 62.221 6.713 56.562 12.199 54.242 14.45 52 17.356 52.115 19.335L52.033 52.628C51.927 59.934 51.979 59.994 55.74 57.091 62.423 51.931 71.272 48.541 84.103 46.221 90.625 45.039 89.967 47.631 90.145 22.432 90.326-3.079 91.148-1 81.571 .746Z`}),(0,q.jsx)(`path`,{d:`M1.906 12.692C.1 13.42 .151 12.804 .151 33.825 .151 54.097 .163 54.302 1.447 55.498 2.71 56.674 3.384 56.81 7.937 56.816 20.943 56.834 30.647 58.293 38.776 61.45 45.964 64.242 46.435 61.924 39.526 57.773 32.296 53.429 26.656 51.544 14.943 49.553 5.958 48.027 6.535 49.414 6.408 29.003 6.32 14.74 6.263 13.103 5.816 12.764 5.254 12.335 2.9 12.293 1.906 12.692Z`}),(0,q.jsx)(`path`,{d:`M94.326 12.858C93.656 13.326 93.656 13.326 93.653 28.492 93.653 48.882 93.997 48.063 84.743 49.556 73.574 51.36 64.45 54.695 57.801 59.405 54.082 62.039 55.384 63.864 59.722 62.1 68.897 58.372 76.363 57.115 90.03 56.994 100.405 56.903 99.489 58.976 99.773 34.976 100.018 14.142 100.006 13.958 98.399 12.979 97.236 12.269 95.251 12.208 94.326 12.858Z`})]})}function cQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:nQ.cream},d:`M-8.572-25.123C-21.412-23.39-33.235-17.39-44.235-7.027-51.235-.433-51.251 .358-44.524 6.749-20.77 29.316 10.23 31.893 36.364 13.487 41.043 10.187 48.193 3.551 49.235 1.524 50.358-.642 49.471-2.102 43.738-7.497 29.257-21.128 9.968-27.631-8.572-25.123Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.ink},d:`M-6.225-16.807C-17.727-13.267-21.176 4.433-12.08 13.257-1.118 23.898 16.829 16.102 17.032 .604 17.209-12.412 6.219-20.642-6.225-16.807Z`})]})}function lQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:nQ.mint},d:`M540 342C520 340 497 355 477 374C450 399 440 421 456 444C465 458 480 462 492 464C503 466 500 477 494 486C487 500 508 496 522 478L530 468C557 468 578 464 591 451C601 442 599 429 585 427C572 425 556 432 547 418C538 403 550 390 568 385C579 382 589 380 584 368C576 352 557 341 540 342Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.coral},d:`M589 396C614 380 659 381 683 392C709 404 721 428 710 451C704 464 693 472 685 479C680 487 684 498 689 503C695 514 684 513 675 507C667 502 662 497 657 491C637 496 610 495 594 486C584 480 583 469 595 464C607 460 622 454 622 441C622 428 612 423 597 420C580 417 578 407 589 396Z`})]})}function uQ({fill:e}){return(0,q.jsx)(`path`,{style:{fill:e},d:`M44.648 .288C26.645 1.615 13.263 8.266 5.942 19.529-4.299 35.277-.917 57.684 13.224 67.784 16.958 70.452 16.936 71.742 13.064 77.665 11.28 80.391 10.895 81.565 11.341 82.914 13.163 88.435 25.022 86.396 36.307 78.62L38.681 76.986 41.294 77.335C45.371 77.878 59.645 77.789 64.125 77.191 89.213 73.837 100.562 61.427 99.92 38.044 99.18 11.1 79.587-2.285 44.648 .288Z`})}function dQ({onFigure:e=!1}){return(0,q.jsxs)(`g`,{style:{fill:e?iQ:nQ.ink},children:[(0,q.jsx)(`rect`,{x:`-15`,y:`-11`,width:`10`,height:`22`,rx:`5`}),(0,q.jsx)(`rect`,{x:`5`,y:`-11`,width:`10`,height:`22`,rx:`5`})]})}function fQ(){return(0,q.jsx)(`path`,{style:{fill:nQ.cream},d:`M18.125 .621C.039 1.574-2.575 4.791 2.264 20.133 17.454 68.284 77.345 69.396 96.119 21.875 100.749 10.154 100.318 4.348 94.605 1.513 91.981 .21 37.878-.421 18.125 .621Z`})}function pQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:nQ.yellow},d:`M31.42 5.279C29.108 5.983 28.068 6.993 25.817 10.732 24.033 13.687 24.027 13.762 25.58 14.265 30.375 15.821 36.711 20.506 39.938 24.885 42.077 27.788 41.835 27.806 45.281 24.463 48.633 21.213 49.164 20.185 48.982 17.325 48.812 14.643 48.174 13.872 42.68 9.741 36.737 5.273 34.439 4.361 31.42 5.279Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.yellow},d:`M22.538 16.207C22.093 16.652 19.732 20.231 13.309 30.196 10.737 34.188 10.723 33.911 13.589 35.351 16.461 36.798 19.778 39.28 21.825 41.523L22.6 42.37Q23.34 43.186 24.05 42.538L24.711 41.933C31.278 35.937 38.928 28.484 38.928 28.083 38.928 24.656 24.521 14.219 22.538 16.207Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.cream},d:`M8.89 38.053C8.203 39.566 6.598 44.473 6.598 45.056 6.598 45.137 6.887 45.125 7.236 45.036 9.655 44.404 13.526 47.475 13.526 50.027 13.526 51.132 13.361 51.164 16.187 49.49 21.421 46.387 21.966 45.665 20.575 43.659 19.002 41.387 14.975 38.238 11.909 36.881 9.799 35.949 9.854 35.926 8.89 38.053Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.graphite},d:`M6.598 45.056C5.732 46.866 5.155 49.464 6.309 50.907 8.041 53.505 10.928 52.639 13.526 50.907 13.526 48.021 9.978 44.404 7.236 45.036Z`})]})}function mQ(){return(0,q.jsx)(`path`,{style:{fill:nQ.coral},d:`M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z`})}function hQ({transform:e}){return(0,q.jsx)(`path`,{style:{fill:nQ.mint},transform:e,d:`M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z`})}function gQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{fillRule:`evenodd`,style:{fill:rQ},d:`M25.3 17.69C14.8 19.34 10.66 20.18 9.05 20.99 5.51 22.78 4.2 27.21 6.71 28.9 7.47 29.42 8.48 29.4 10.25 28.84 12.41 28.15 12.56 27.57 11.02 25.85 10 24.71 10.53 23.62 11.79 24.27 13.9 25.36 15.02 28.98 15.63 36.66 16.18 43.48 17.33 47.43 19.69 50.49 22.76 54.48 27.69 55.73 30.31 53.19 33 50.57 31.24 46.04 28.44 48.38 26.29 50.17 26.16 47.08 28.3 45.14 29.61 43.95 30.78 43.58 38.92 41.75 39.45 41.63 39.41 41.52 38.39 40.01 36.87 37.78 36.04 35.22 34.72 28.69 33.37 22 32.04 19.3 29.5 18.07 28.69 17.68 26.59 17.49 25.3 17.69M24.11 26.51C18.61 27.67 18.16 27.82 17.98 28.55 17.64 29.91 18.54 30.44 20.51 30.05 25.4 29.08 30.11 28.03 30.49 27.83 31.65 27.23 31 25.33 29.66 25.4 29.5 25.4 27 25.91 24.11 26.51M29.2 31.42C28.64 31.54 26.23 32.07 23.85 32.58 20.01 33.41 19.48 33.57 19.15 33.96 18.67 34.5 18.66 35.05 19.12 35.63 19.61 36.26 19.86 36.23 26.05 34.88 29.05 34.23 31.53 33.7 31.57 33.7 31.82 33.7 32.34 32.88 32.34 32.5 32.34 31.25 31.37 30.92 29.2 31.42M29.79 37.19C28.81 37.41 26.45 37.94 24.53 38.37 22.62 38.8 20.84 39.23 20.58 39.33 19.61 39.71 19.35 40.62 19.98 41.41 20.48 42.05 21 41.99 27.59 40.5 33.85 39.09 34.21 38.91 33.45 37.44 33.02 36.61 32.51 36.58 29.79 37.19M45.41 41.95C44.89 42.09 41.61 42.89 38.12 43.73 30.94 45.45 29.81 45.84 31.05 46.15 33.2 46.69 34.11 50.18 32.77 52.76 32.23 53.79 32.23 54.03 32.76 54.16 33.34 54.31 45.35 51.3 46.72 50.67 50.19 49.06 51.76 45.01 49.79 42.76 48.8 41.64 47.46 41.39 45.41 41.95`}),(0,q.jsx)(`path`,{style:{fill:nQ.grape},d:`M48.21 10.15C47.92 10.41 47.5 11.27 46.96 12.74 45.52 16.61 45.24 16.99 43.01 18.15 39.18 20.15 39.05 20.99 42.28 22.73 45.37 24.39 45.68 24.79 47.12 28.95 48.3 32.32 49.28 32.2 50.65 28.52 52.23 24.25 52.26 24.22 55.2 22.56 57.53 21.24 57.79 21 57.79 20.16 57.79 19.49 57.55 19.31 55.01 18.06 52.16 16.66 52.2 16.72 50.31 11.56 49.7 9.89 49.03 9.44 48.21 10.15M32.59 13.92C31.78 14.73 32.28 15.89 33.58 16.22 35.07 16.6 36.19 17.1 37.17 17.84 38.42 18.77 39.23 18.86 39.79 18.15 39.99 17.9 40.15 17.53 40.15 17.32 40.15 15.29 33.99 12.52 32.59 13.92M42.48 34.38C40.96 35.96 40.65 36.88 41.39 37.57 42.2 38.33 43.36 37.74 44.55 35.95 45.2 34.97 45.22 34.35 44.62 33.88 43.89 33.31 43.41 33.42 42.48 34.38`}),(0,q.jsx)(`path`,{style:{fill:nQ.yellow},d:`M40.75 25.96C39.69 27.07 38.11 30.69 38.11 31.98 38.11 32.66 38.55 33.19 39.12 33.19 39.8 33.19 40.24 32.73 40.58 31.66 40.95 30.46 41.65 29.09 42.42 28.01 43.77 26.14 42.29 24.32 40.75 25.96M54.85 27.67C54.71 27.81 54.47 28.32 54.31 28.82 53.67 30.76 53.19 31.37 51.67 32.13 50.25 32.85 50.34 33.36 52.04 34.21 53.25 34.82 53.57 35.23 54.24 37.01 54.98 38.98 55.47 39.08 56.03 37.37 56.7 35.32 57.08 34.81 58.64 33.87 60.18 32.95 60.14 32.65 58.38 31.78 57.02 31.11 56.68 30.66 56.02 28.65 55.69 27.64 55.25 27.27 54.85 27.67`})]})}function _Q(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{fillRule:`evenodd`,style:{fill:rQ},d:`M42.24 14.07C41.52 14.24 40.53 14.54 35.06 16.26 33.33 16.8 31.2 17.47 30.34 17.74 29.47 18.01 27.86 18.52 26.75 18.88 25.64 19.23 24.03 19.74 23.16 20.01 20.16 20.94 19.45 21.4 18.97 22.71 18.71 23.44 18.45 26.33 17.83 35.41 17.64 38.25 17.44 41.03 17.41 41.58 17.32 42.77 17.24 42.69 18.79 42.84L20.01 42.95 21.98 39.97C24.69 35.88 24.85 35.82 27.05 37.9 27.9 38.7 28.43 39.08 28.61 39.02 28.76 38.96 28.91 38.91 28.94 38.91 28.98 38.91 29.38 38.38 29.84 37.73 30.3 37.08 31.47 35.48 32.43 34.17 33.4 32.86 34.86 30.85 35.67 29.71 36.49 28.56 37.5 27.29 37.91 26.88 39.73 25.07 41.01 26.43 43.32 32.67 43.76 33.84 44.3 35.28 44.52 35.86 44.74 36.44 44.97 37.28 45.04 37.74 45.19 38.71 45.17 38.71 46.63 38.03 47.69 37.53 47.77 37.46 47.68 37.02 47.58 36.52 46.97 30.64 46.79 28.41 46.73 27.69 46.62 26.43 46.53 25.61 46.44 24.79 46.24 22.87 46.09 21.32 45.61 16.44 45.5 15.66 45.22 15.12 44.72 14.15 43.59 13.76 42.24 14.07M29.38 22.45C26.04 23.47 24.49 27.62 26.6 29.91 29.17 32.7 34.15 30.16 34.16 26.05 34.16 23.38 31.9 21.68 29.38 22.45M46.7 41.5C39.3 44.23 28.33 46.04 20.1 45.88L17.21 45.82 17.16 46.88C17.08 48.22 17.33 49.03 18.01 49.68 18.73 50.37 19.73 50.35 23.77 49.53 25.46 49.19 29.12 48.47 31.91 47.93 46.31 45.14 46.9 44.99 47.57 43.91 47.95 43.3 48.25 41.29 47.99 41.15 47.91 41.11 47.33 41.26 46.7 41.5`}),(0,q.jsx)(`path`,{style:{fill:nQ.coral},d:`M29.72 22.45C25.84 23.34 24.28 28.36 27.25 30.42 29.34 31.88 32.91 30.43 33.83 27.75 34.92 24.55 32.75 21.76 29.72 22.45`}),(0,q.jsx)(`path`,{style:{fill:nQ.mint},d:`M12.96 14.29C12.87 14.41 12.7 15.03 12.58 15.68 12.37 16.82 11.59 18.26 11.18 18.26 11.08 18.26 10.88 18.46 10.72 18.7 10.36 19.25 10.59 19.58 11.45 19.74 12.18 19.88 13.08 20.63 13.54 21.49 14.23 22.76 14.75 22.53 15.15 20.79 15.39 19.71 15.51 19.51 16.4 18.66 17.54 17.58 17.51 17.36 16.18 16.85 15.16 16.47 14.84 16.19 14.14 15.1 13.56 14.2 13.22 13.96 12.96 14.29M49.04 24.13C48.56 24.86 48.91 25.31 50.59 26.09 53.89 27.64 54.85 29.82 53.45 32.6 52.01 35.43 46.84 38.54 40.51 40.39 39.73 40.62 38.88 40.89 38.62 40.99 37.24 41.52 30.85 42.64 27.54 42.93 20.72 43.52 13.63 42.49 10.57 40.46 5.81 37.3 7.51 32.32 14.74 28.24 15.84 27.61 16.17 27.1 15.9 26.4 15.66 25.78 15.35 25.84 13.19 26.94 6 30.61 2.97 35.32 4.95 39.74 7.86 46.21 22.78 47.8 40.05 43.46 51.97 40.47 58.57 36.38 59.47 31.43 60.09 27.97 57.74 25.34 52.93 24.12 50.6 23.53 49.43 23.54 49.04 24.13`}),(0,q.jsx)(`path`,{style:{fill:nQ.grape},d:`M34.82 8.91C33.48 10.04 34.21 12.14 35.94 12.14 37.29 12.14 38.18 10.99 37.77 9.77 37.36 8.53 35.81 8.08 34.82 8.91M53.15 43.16C53 43.28 52.74 43.86 52.57 44.45 52.18 45.78 51.76 46.32 50.64 46.93 49.52 47.53 49.45 47.89 50.33 48.34 51.34 48.85 52.24 49.95 52.56 51.04 53.13 53.01 53.6 53 54.21 50.99 54.61 49.69 55.13 48.93 55.91 48.54 57.17 47.91 57.23 47.51 56.15 46.96 55.23 46.49 54.67 45.76 54.23 44.44 53.8 43.15 53.54 42.84 53.15 43.16M24.18 53.18C22.45 53.9 22.87 56.59 24.71 56.59 26.79 56.59 27.2 53.67 25.2 53.09 24.89 53.01 24.51 53.04 24.18 53.18`}),(0,q.jsx)(`path`,{style:{fill:nQ.yellow},d:`M51.76 11.04C51.21 12.77 50.56 13.61 49.24 14.34 48.6 14.69 48.72 15.07 49.59 15.48 50.54 15.93 51.11 16.69 51.62 18.22 52.06 19.57 52.26 19.54 52.79 18.08 53.29 16.69 53.87 15.91 54.86 15.31 55.76 14.77 55.77 14.48 54.92 14.02 53.91 13.46 53.5 12.99 52.89 11.66 52.23 10.21 52.06 10.12 51.76 11.04M11.06 48.22C10.99 48.35 10.71 48.88 10.46 49.41 9.95 50.48 9.45 50.99 8.59 51.33 7.89 51.61 7.85 52.1 8.52 52.37 9.51 52.79 10.3 53.85 10.89 55.58 11.09 56.18 11.48 55.88 11.87 54.84 12.24 53.87 13.33 52.56 13.79 52.56 14 52.56 14.5 52.06 14.5 51.85 14.5 51.77 14.19 51.54 13.81 51.34 12.98 50.92 12.36 50.14 11.93 48.99 11.6 48.09 11.31 47.83 11.06 48.22`})]})}function vQ(){return(0,q.jsxs)(`g`,{transform:`translate(2 8) scale(.114) translate(-125 -122)`,children:[(0,q.jsx)(`path`,{style:{fill:nQ.coral},d:`M278 155 482 123C517 117 527 135 530 167L542 309Q543 329 561 341L631 404Q649 419 646 444 645 465 623 472L407 521Q374 531 345 519L156 436Q115 418 128 375L221 191Q238 163 278 155Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.ink},d:`M317 183 461 161Q493 155 497 188L504 288Q508 320 478 326L318 356Q289 362 286 331L281 226Q278 194 317 183Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.cream},d:`M304 386 553 340Q562 337 570 346L631 404Q649 419 646 444Q645 448 629 452L411 483Q382 492 367 474Z`}),(0,q.jsxs)(`g`,{style:{fill:nQ.cream},children:[(0,q.jsx)(`rect`,{x:`319`,y:`236`,width:`26`,height:`59`,rx:`13`}),(0,q.jsx)(`rect`,{x:`364`,y:`229`,width:`26`,height:`59`,rx:`13`})]}),(0,q.jsxs)(`g`,{style:{fill:nQ.ink},transform:`rotate(-11 470 411)`,children:[(0,q.jsx)(`rect`,{x:`369`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`444`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`518`,y:`380`,width:`57`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`392`,y:`421`,width:`58`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`462`,y:`421`,width:`65`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`539`,y:`421`,width:`58`,height:`25`,rx:`13`})]})]})}function yQ(){return(0,q.jsxs)(`g`,{transform:`translate(3 10) scale(.114) translate(-760 -140)`,children:[(0,q.jsx)(`path`,{style:{fill:nQ.blue},d:`M1226 153C1257 153 1273 195 1267 231Q1263 265 1237 268L1176 270V215C1176 178 1195 153 1226 153Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.blue},d:`M824 376Q908 372 871 400C842 427 866 442 902 450L1113 480Q1188 479 1199 392C1207 447 1204 497 1163 511Q1134 521 1097 516C1055 510 991 507 957 507S869 511 826 512C781 513 758 483 760 441Q760 385 824 376Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.cream},d:`M824 376 857 184Q864 133 911 141C1039 169 1124 151 1226 153Q1179 159 1184 241L1199 377C1202 434 1174 482 1117 480L902 450C864 445 849 429 871 400Q908 372 824 376Z`}),(0,q.jsxs)(`g`,{style:{fill:nQ.coral},children:[(0,q.jsx)(`path`,{d:`M982 198C1008 190 1030 197 1028 220L1023 265Q1020 295 1000 279C981 261 951 223 963 210Q970 202 982 198Z`}),(0,q.jsx)(`path`,{d:`M1063 220C1077 215 1100 237 1102 251Q1107 267 1084 282L1063 295Q1037 307 1040 278L1045 245Q1049 224 1063 220Z`}),(0,q.jsx)(`path`,{d:`M911 252C925 240 939 254 957 269L978 291Q995 311 961 316C938 318 907 316 898 308Q884 296 911 252Z`}),(0,q.jsx)(`path`,{d:`M1106 289Q1127 281 1134 304C1142 327 1146 352 1125 350Q1097 348 1073 335C1051 324 1072 311 1084 302Z`}),(0,q.jsx)(`path`,{d:`M927 338C946 334 972 334 985 343Q1004 353 984 384C970 408 957 418 940 403C922 389 896 356 913 345Z`}),(0,q.jsx)(`path`,{d:`M1010 375Q1025 363 1037 384C1049 407 1064 438 1044 442Q1025 448 1002 436C984 428 991 410 997 393Z`}),(0,q.jsx)(`path`,{d:`M1068 357C1084 359 1110 376 1120 389Q1130 402 1107 419C1090 432 1082 418 1073 401C1062 383 1043 355 1068 357Z`}),(0,q.jsx)(`path`,{d:`M1018 311C1037 312 1050 334 1034 343C1018 351 998 337 1005 320Q1009 311 1018 311Z`})]})]})}function bQ(){return(0,q.jsxs)(`g`,{transform:`translate(2 7) scale(.11) translate(-1380 -96)`,children:[(0,q.jsx)(`path`,{style:{fill:nQ.inkcap},d:`M1384 276C1394 238 1445 200 1497 158C1547 119 1604 97 1647 97C1690 97 1720 109 1745 138C1772 170 1791 184 1833 194C1870 201 1919 220 1922 257C1923 307 1891 339 1853 336C1801 335 1767 299 1701 294C1666 291 1620 294 1642 303Q1670 307 1675 333C1681 367 1697 389 1717 413C1735 434 1738 443 1719 464C1700 485 1692 502 1686 520Q1682 541 1653 541L1626 541Q1598 541 1594 519C1590 495 1578 474 1563 458C1545 440 1544 429 1559 410C1585 377 1608 337 1572 326C1554 320 1529 333 1506 340C1461 356 1428 357 1402 340Q1371 319 1384 276Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.cream},d:`M1634 362Q1641 346 1649 362C1660 390 1676 404 1705 424Q1721 435 1704 453C1685 475 1677 490 1671 513Q1670 526 1653 525L1626 525Q1611 525 1610 513C1606 492 1592 465 1575 449Q1562 437 1577 424C1604 404 1620 390 1634 362Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.inkcap},d:`M1634 456A18 18 0 1 1 1648 456V492Q1648 500 1641 500T1634 492Z`}),(0,q.jsx)(`path`,{style:{fill:nQ.inkcap},d:`M1780 391Q1786 386 1793 396C1810 420 1828 444 1827 467C1826 508 1768 510 1753 480C1741 456 1762 413 1780 391Z`})]})}var{coral:xQ,blue:SQ,mint:CQ,grape:wQ,yellow:TQ,cream:EQ,ink:DQ}=nQ,OQ={bonsai:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,stroke:CQ,strokeWidth:`3.7`,strokeLinecap:`round`,d:`M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2`}),(0,q.jsx)(`path`,{fill:CQ,d:`M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z`}),(0,q.jsx)(`circle`,{fill:SQ,cx:`31.5`,cy:`10.7`,r:`4.8`}),(0,q.jsx)(`circle`,{fill:wQ,cx:`16.6`,cy:`18.3`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:TQ,cx:`47.9`,cy:`17.7`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:TQ,cx:`12.8`,cy:`31.5`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:SQ,cx:`50.9`,cy:`32.1`,r:`4.6`}),(0,q.jsx)(`path`,{fill:xQ,d:`M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z`}),(0,q.jsx)(`rect`,{fill:xQ,x:`14`,y:`43`,width:`35.5`,height:`4.6`,rx:`2.3`})]}),computer:(0,q.jsx)(vQ,{}),prints:(0,q.jsx)(yQ,{}),inkcap:(0,q.jsx)(bQ,{}),vishnu:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{fill:xQ},d:`M6 37C6 21 17.5 9 32 9s26 12 26 28c0 2.2-1.8 4-4 4H10c-2.2 0-4-1.8-4-4Z`}),(0,q.jsx)(`circle`,{style:{fill:EQ},cx:`19`,cy:`25`,r:`4`}),(0,q.jsx)(`circle`,{style:{fill:EQ},cx:`33`,cy:`19.5`,r:`4.8`}),(0,q.jsx)(`circle`,{style:{fill:EQ},cx:`46`,cy:`28`,r:`3.4`}),(0,q.jsx)(`rect`,{style:{fill:SQ},x:`13`,y:`39`,width:`38`,height:`18`,rx:`9`}),(0,q.jsx)(`rect`,{style:{fill:EQ},x:`18.5`,y:`46.2`,width:`10`,height:`3.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{style:{fill:EQ},x:`21.7`,y:`43`,width:`3.6`,height:`10`,rx:`1.8`}),(0,q.jsx)(`circle`,{style:{fill:TQ},cx:`39`,cy:`50.5`,r:`2.7`}),(0,q.jsx)(`circle`,{style:{fill:EQ},cx:`45`,cy:`45.5`,r:`2.7`})]}),generateText:(0,q.jsx)(gQ,{}),generateMedia:(0,q.jsx)(_Q,{}),buyApps:(0,q.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,q.jsx)(`circle`,{fill:TQ,cx:`32`,cy:`20`,r:`12`}),(0,q.jsx)(`circle`,{stroke:EQ,strokeWidth:`4`,cx:`32`,cy:`20`,r:`6`}),(0,q.jsx)(aQ,{fill:TQ,transform:`translate(15.5 12) rotate(-60) scale(1.1 .85)`}),(0,q.jsx)(aQ,{fill:TQ,transform:`translate(48.5 12) rotate(60) scale(1.1 .85)`}),(0,q.jsx)(`path`,{fill:SQ,d:`M10 35H54L50 53Q49 58 44 58H20Q15 58 14 53Z`}),(0,q.jsx)(`rect`,{fill:xQ,x:`5`,y:`27`,width:`54`,height:`10`,rx:`5`}),(0,q.jsxs)(`g`,{fill:EQ,children:[(0,q.jsx)(`rect`,{x:`20`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,q.jsx)(`rect`,{x:`29.5`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,q.jsx)(`rect`,{x:`39`,y:`41`,width:`5`,height:`11`,rx:`2.5`})]})]}),browseBazaar:(0,q.jsxs)(`g`,{transform:`rotate(-5 32 32)`,children:[(0,q.jsx)(`rect`,{fill:SQ,x:`10`,y:`14`,width:`44`,height:`38`,rx:`6`}),(0,q.jsx)(`rect`,{fill:SQ,x:`5`,y:`47`,width:`54`,height:`12`,rx:`6`}),(0,q.jsx)(`rect`,{fill:EQ,x:`12`,y:`50.5`,width:`40`,height:`4.5`,rx:`2.25`}),(0,q.jsx)(`rect`,{fill:xQ,x:`2`,y:`4`,width:`60`,height:`9`,rx:`4.5`}),(0,q.jsx)(`path`,{fill:xQ,d:`M3 9H14.6V18A5.8 5.8 0 0 1 3 18Z`}),(0,q.jsx)(`path`,{fill:EQ,d:`M14.6 9H26.2V18A5.8 5.8 0 0 1 14.6 18Z`}),(0,q.jsx)(`path`,{fill:xQ,d:`M26.2 9H37.8V18A5.8 5.8 0 0 1 26.2 18Z`}),(0,q.jsx)(`path`,{fill:EQ,d:`M37.8 9H49.4V18A5.8 5.8 0 0 1 37.8 18Z`}),(0,q.jsx)(`path`,{fill:xQ,d:`M49.4 9H61V18A5.8 5.8 0 0 1 49.4 18Z`}),(0,q.jsx)(`g`,{transform:`translate(32 36.5) scale(.34)`,children:(0,q.jsx)(cQ,{})})]}),agent:(0,q.jsxs)(`g`,{transform:`translate(32 33) scale(2.02) translate(-47.2 -41.8)`,children:[(0,q.jsx)(`path`,{fill:SQ,d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,q.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,q.jsx)(dQ,{})})]}),list:(0,q.jsxs)(`g`,{transform:`rotate(-7 32 32)`,children:[(0,q.jsx)(`path`,{style:{fill:SQ},d:`M12 13Q6 13 6 19V50Q6 57 13 57H47Q53 57 53 50V20Q53 13 47 13Z`}),(0,q.jsx)(`path`,{style:{fill:EQ},d:`M19 7H39Q42 7 44 9L55 20Q57 22 57 26V44Q57 50 51 50H19Q13 50 13 44V13Q13 7 19 7Z`}),(0,q.jsx)(`path`,{style:{fill:xQ},d:`M39 7V18Q39 24 45 24H57Q57 22 55 20L44 9Q42 7 39 7Z`}),(0,q.jsxs)(`g`,{style:{fill:xQ},children:[(0,q.jsx)(`circle`,{cx:`22`,cy:`21`,r:`3`}),(0,q.jsx)(`circle`,{cx:`22`,cy:`31`,r:`3`}),(0,q.jsx)(`circle`,{cx:`22`,cy:`41`,r:`3`})]}),(0,q.jsx)(`path`,{style:{stroke:SQ},strokeWidth:`5`,strokeLinecap:`round`,d:`M31 21H32M31 31H46M31 41H42`})]}),chat:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`g`,{transform:`translate(3 11) scale(.22) translate(-449 -327)`,children:(0,q.jsx)(lQ,{})}),(0,q.jsx)(aQ,{transform:`translate(38.2 18) rotate(16) scale(.95 .6)`}),(0,q.jsx)(aQ,{transform:`translate(44.4 20.5) rotate(47) scale(.95 .6)`})]}),read:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`g`,{transform:`translate(4 20.5) scale(.56)`,children:(0,q.jsx)(sQ,{})}),(0,q.jsx)(`g`,{transform:`translate(32 38.6) scale(.3164)`,children:(0,q.jsx)(cQ,{})}),(0,q.jsx)(oQ,{})]}),readConversations:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(.9) translate(-32 -32)`,children:[(0,q.jsx)(`g`,{transform:`translate(4 7.88) scale(.56)`,children:(0,q.jsx)(uQ,{fill:SQ})}),(0,q.jsx)(`g`,{transform:`translate(32.2 30.3) scale(.352)`,children:(0,q.jsx)(cQ,{})})]}),listAgents:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(1.04) translate(-32 -32)`,children:[(0,q.jsx)(`path`,{style:{fill:rQ},d:`M32.059 10.146C23.878 10.646 18.949 14.844 18.925 21.331 18.912 24.856 20.167 27.259 22.274 27.74 24.437 28.233 26.097 29.061 27.481 30.337 28.275 31.068 28.328 31.096 29.352 31.306 31.161 31.677 31.653 32.094 32.115 33.651 32.392 34.582 32.557 34.868 32.915 35.041 33.919 35.523 35.864 33.733 36.539 31.706L36.775 30.997 38.008 30.681C42.663 29.489 45.29 26.142 45.468 21.176 45.734 13.784 40.673 9.62 32.059 10.146Z`}),(0,q.jsx)(`g`,{transform:`translate(32.4 21.2) scale(.39)`,children:(0,q.jsx)(dQ,{onFigure:!0})}),(0,q.jsx)(`path`,{style:{fill:xQ},d:`M14.375 27.586C8.014 28.591 4.363 32.396 4.355 38.027 4.347 43.93 8.071 47.469 15.239 48.368L16.828 48.568 17.873 49.568C19.854 51.464 22.469 52.496 23.691 51.864 24.384 51.506 24.431 51.044 23.924 49.606 23.337 47.943 23.479 47.492 24.749 46.977 32.756 43.73 32.643 31.899 24.573 28.49 22.238 27.504 17.535 27.087 14.375 27.586Z`}),(0,q.jsx)(`g`,{transform:`translate(17.6 37.7) scale(.38 .36)`,children:(0,q.jsx)(dQ,{})}),(0,q.jsx)(`path`,{style:{fill:SQ},d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,q.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,q.jsx)(dQ,{})})]}),createAgents:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,q.jsx)(`path`,{style:{fill:rQ},d:`M20.436 24.499C13.35 25.216 7.504 28.799 5.442 33.687 3.114 39.208 4.438 45.791 8.593 49.358 10.446 50.949 10.34 50.831 10.34 51.301 10.34 51.796 10.106 52.294 9.281 53.558 7.191 56.76 12.108 56.905 16.701 53.777 17.517 53.221 17.715 53.135 18.015 53.201 20.013 53.639 25.739 53.051 28.595 52.113 35.47 49.857 39.129 44.162 37.83 37.738C37 31 33 26 26.717 24.428L24.075 24.413C22.623 24.405 20.985 24.444 20.436 24.499Z`}),(0,q.jsx)(`g`,{transform:`translate(21.9 40) scale(.46 .43)`,children:(0,q.jsx)(dQ,{onFigure:!0})}),(0,q.jsx)(`path`,{style:{fill:CQ},d:`M37.987 15.734C32.277 16.627 28.675 20.713 28.92 26.022 29.062 29.118 30.627 31.606 33.331 33.036 34.675 33.747 34.761 34.018 34.237 35.923 33.376 39.051 36.878 38.551 39.174 35.218 39.574 34.637 39.65 34.583 40.058 34.583 46.203 34.583 50.414 30.91 50.424 25.543 50.435 18.989 44.932 14.649 37.987 15.734Z`}),(0,q.jsx)(`g`,{transform:`translate(38.9 24.9) scale(.31)`,children:(0,q.jsx)(dQ,{})}),(0,q.jsx)(aQ,{fill:TQ,transform:`translate(48.1 15.7) rotate(31) scale(1.25 .85)`}),(0,q.jsx)(aQ,{fill:TQ,transform:`translate(52.2 19.8) rotate(70) scale(1.25 .85)`})]}),sendPrompts:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,q.jsx)(`g`,{transform:`translate(4 13.2) scale(.412 .436)`,children:(0,q.jsx)(uQ,{fill:xQ})}),(0,q.jsx)(`g`,{transform:`translate(17.1 28.7) scale(.19)`,children:(0,q.jsx)(fQ,{})}),(0,q.jsx)(aQ,{fill:CQ,transform:`translate(48.1 26.4) rotate(65) scale(1.7 1.28)`}),(0,q.jsx)(aQ,{fill:CQ,transform:`translate(48.4 33.8) rotate(110) scale(1.7 1.28)`})]}),write:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(pQ,{}),(0,q.jsx)(mQ,{})]}),run:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{style:{fill:SQ},x:`6`,y:`9`,width:`52`,height:`43`,rx:`7`}),(0,q.jsx)(`path`,{style:{stroke:EQ},strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m17 22 9 8-9 8m17 0h12`})]}),stop:(0,q.jsx)(`rect`,{style:{fill:xQ},x:`12`,y:`12`,width:`40`,height:`40`,rx:`9`}),connected:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,style:{stroke:SQ},strokeWidth:`12`,strokeLinecap:`round`,d:`M34 37Q43 21 26 20H18Q3 20 6 37q2 10 15 9`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:xQ},strokeWidth:`12`,strokeLinecap:`round`,d:`M29 33Q20 50 38 53h8q16-1 12-17-2-11-14-10`}),(0,q.jsx)(`path`,{style:{stroke:TQ},strokeWidth:`4`,strokeLinecap:`round`,d:`m27 4 2 6m10-5-2 7m12 0-5 4`})]}),working:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`ellipse`,{style:{fill:CQ},cx:`23`,cy:`14`,rx:`13`,ry:`8`,transform:`rotate(-30 23 14)`}),(0,q.jsx)(`ellipse`,{style:{fill:TQ},cx:`48`,cy:`36`,rx:`13`,ry:`8`,transform:`rotate(35 48 36)`}),(0,q.jsx)(`ellipse`,{style:{fill:wQ},cx:`22`,cy:`48`,rx:`13`,ry:`8`,transform:`rotate(45 22 48)`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:rQ},strokeWidth:`3`,strokeLinecap:`round`,d:`M42 8q13 2 13 13M43 55q-5 5-12 4M5 39q-5-9 1-17`})]}),complete:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{fill:CQ},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:DQ},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m23 29 7 7 13-15`}),(0,q.jsx)(`path`,{style:{stroke:rQ},strokeWidth:`3`,strokeLinecap:`round`,d:`m4 8 5 6m48-4 5-5M2 24l6 1`})]}),installApps:(0,q.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,q.jsx)(`rect`,{style:{fill:SQ},x:`9`,y:`26`,width:`46`,height:`32`,rx:`10`}),(0,q.jsx)(`rect`,{style:{fill:EQ},x:`17`,y:`33`,width:`30`,height:`18`,rx:`5`}),(0,q.jsx)(`path`,{style:{fill:CQ},d:`M22 38h8v8h-8z`}),(0,q.jsx)(`path`,{style:{fill:wQ},d:`M34 38h8v8h-8z`}),(0,q.jsx)(`path`,{style:{stroke:xQ},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M32 4v17m-8-7 8 8 8-8`})]}),restricted:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,style:{stroke:xQ},strokeWidth:`9`,strokeLinecap:`round`,d:`M16 23V19q0-17 16-17t16 17v4`}),(0,q.jsx)(`rect`,{style:{fill:xQ},x:`8`,y:`26`,width:`48`,height:`36`,rx:`9`}),(0,q.jsx)(`path`,{style:{fill:EQ},d:`M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z`})]}),error:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{fill:xQ},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:EQ},strokeWidth:`7`,strokeLinecap:`round`,d:`M32 18v15`}),(0,q.jsx)(`circle`,{style:{fill:EQ},cx:`32`,cy:`45`,r:`4`})]}),trellis:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`g`,{fill:TQ,children:[(0,q.jsx)(`rect`,{x:`17.25`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,q.jsx)(`rect`,{x:`42.95`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,q.jsx)(`rect`,{x:`30.4`,y:`18`,width:`3.2`,height:`26`}),(0,q.jsx)(`rect`,{x:`14.8`,y:`15.75`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,q.jsx)(`rect`,{x:`14.8`,y:`28.85`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,q.jsx)(`rect`,{x:`14.8`,y:`42.55`,width:`34.4`,height:`3.1`,rx:`1.55`})]}),(0,q.jsx)(`path`,{fill:`none`,stroke:CQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8`}),(0,q.jsx)(`path`,{fill:`none`,stroke:CQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2`}),(0,q.jsx)(hQ,{transform:`translate(32.1 14.1) rotate(45) scale(0.45 0.86)`}),(0,q.jsx)(hQ,{transform:`translate(32.2 14.7) rotate(-60) scale(0.42 0.58)`}),(0,q.jsx)(hQ,{transform:`translate(34.8 28.3) rotate(65) scale(0.38 0.8)`}),(0,q.jsx)(hQ,{transform:`translate(28.2 33.1) rotate(-51) scale(0.5 0.57)`}),(0,q.jsx)(hQ,{transform:`translate(28.6 53.3) rotate(-48) scale(0.47 0.6)`}),(0,q.jsx)(`circle`,{fill:xQ,cx:`31.9`,cy:`18.8`,r:`4`}),(0,q.jsx)(`circle`,{fill:SQ,cx:`32`,cy:`32.3`,r:`4`}),(0,q.jsx)(`circle`,{fill:wQ,cx:`32`,cy:`44.2`,r:`4`})]}),games:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:SQ,d:`M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z`}),(0,q.jsx)(`ellipse`,{fill:EQ,cx:`26.8`,cy:`37.9`,rx:`9.1`,ry:`5.6`}),(0,q.jsx)(`ellipse`,{fill:DQ,cx:`27`,cy:`37.6`,rx:`4.7`,ry:`2.2`}),(0,q.jsx)(`path`,{fill:DQ,d:`M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z`}),(0,q.jsx)(`circle`,{fill:xQ,cx:`27.1`,cy:`18.3`,r:`12.4`}),(0,q.jsx)(`circle`,{fill:EQ,cx:`22.6`,cy:`14.3`,r:`3.05`}),(0,q.jsx)(`ellipse`,{fill:TQ,cx:`45.1`,cy:`37.2`,rx:`5.6`,ry:`3.95`}),(0,q.jsx)(`ellipse`,{fill:EQ,cx:`40.1`,cy:`46.6`,rx:`6.2`,ry:`4.4`})]}),oyster:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:wQ,d:`M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z`}),(0,q.jsx)(`circle`,{fill:EQ,cx:`34.9`,cy:`41.9`,r:`11.3`}),(0,q.jsxs)(`g`,{fill:DQ,children:[(0,q.jsx)(`rect`,{x:`29.9`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`}),(0,q.jsx)(`rect`,{x:`36.7`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`})]}),(0,q.jsx)(`path`,{fill:wQ,d:`M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z`}),(0,q.jsx)(`path`,{fill:`none`,stroke:TQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1`})]}),tourtois:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:EQ,x:`11.07`,y:`35.73`,width:`26.8`,height:`9.7`,rx:`3.25`,transform:`rotate(-5 24.47 40.58)`}),(0,q.jsx)(`path`,{fill:TQ,d:`M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z`}),(0,q.jsx)(`path`,{fill:xQ,d:`M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z`}),(0,q.jsx)(`path`,{fill:SQ,d:`M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z`}),(0,q.jsx)(`path`,{fill:EQ,d:`M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z`}),(0,q.jsxs)(`g`,{fill:EQ,children:[(0,q.jsx)(`circle`,{cx:`14.7`,cy:`18.45`,r:`1`}),(0,q.jsx)(`circle`,{cx:`17.6`,cy:`17.65`,r:`1`}),(0,q.jsx)(`circle`,{cx:`20.5`,cy:`16.85`,r:`1`}),(0,q.jsx)(`circle`,{cx:`17.9`,cy:`22.2`,r:`1`}),(0,q.jsx)(`circle`,{cx:`21`,cy:`21.5`,r:`1`}),(0,q.jsx)(`circle`,{cx:`24.1`,cy:`20.75`,r:`1`}),(0,q.jsx)(`circle`,{cx:`28.2`,cy:`25.3`,r:`1`})]}),(0,q.jsx)(`circle`,{fill:xQ,cx:`21.7`,cy:`26.6`,r:`1`}),(0,q.jsx)(`circle`,{fill:TQ,cx:`24.9`,cy:`25.9`,r:`1.05`}),(0,q.jsxs)(`g`,{fill:CQ,children:[(0,q.jsx)(`ellipse`,{cx:`8.8`,cy:`36.6`,rx:`3.6`,ry:`1.9`,transform:`rotate(22 8.8 36.6)`}),(0,q.jsx)(`path`,{d:`M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5L12 41Z`}),(0,q.jsx)(`path`,{d:`M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z`})]}),(0,q.jsx)(`ellipse`,{fill:CQ,cx:`46.4`,cy:`30.6`,rx:`8.1`,ry:`8.3`}),(0,q.jsxs)(`g`,{fill:DQ,children:[(0,q.jsx)(`rect`,{x:`45.05`,y:`26.95`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 46.2 29.3)`}),(0,q.jsx)(`rect`,{x:`49.25`,y:`26.4`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 50.4 28.7)`})]}),(0,q.jsx)(`path`,{fill:xQ,d:`M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z`,transform:`rotate(-8 48.9 33.5)`}),(0,q.jsx)(`path`,{fill:`none`,stroke:TQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7`})]}),allApps:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:xQ,x:`7`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 18.6 18.6)`}),(0,q.jsx)(`rect`,{fill:SQ,x:`33.9`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 45.5 18.6)`}),(0,q.jsx)(`rect`,{fill:CQ,x:`7`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 18.6 45.5)`}),(0,q.jsx)(`rect`,{fill:TQ,x:`33.9`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 45.5 45.5)`})]}),search:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,stroke:SQ,strokeWidth:`6.5`,d:`M37 37.5 43 43.5`}),(0,q.jsx)(`path`,{fill:`none`,stroke:xQ,strokeWidth:`12.6`,strokeLinecap:`round`,d:`M44.2 43.8 51.4 51.8`}),(0,q.jsx)(`path`,{fill:`none`,stroke:TQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M47.2 42.4 52.8 47.8`}),(0,q.jsx)(`ellipse`,{fill:SQ,cx:`25.6`,cy:`24.6`,rx:`19.25`,ry:`18.6`}),(0,q.jsx)(`ellipse`,{fill:EQ,cx:`25.2`,cy:`24.1`,rx:`14.2`,ry:`13.6`})]}),browser:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:xQ,x:`5.9`,y:`6.15`,width:`52.2`,height:`51.7`,rx:`5.5`}),(0,q.jsx)(`path`,{fill:EQ,d:`M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z`}),(0,q.jsx)(`circle`,{fill:TQ,cx:`12.2`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:SQ,cx:`18.6`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:wQ,cx:`25.1`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:CQ,cx:`32`,cy:`34.9`,r:`14.5`}),(0,q.jsxs)(`g`,{fill:`none`,stroke:EQ,strokeWidth:`3`,children:[(0,q.jsx)(`ellipse`,{cx:`32`,cy:`34.9`,rx:`7.7`,ry:`13.3`}),(0,q.jsx)(`path`,{d:`M17.5 34.9H46.5`})]})]}),internet:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`ellipse`,{fill:`none`,stroke:TQ,strokeWidth:`4.4`,cx:`32.2`,cy:`30.2`,rx:`25.6`,ry:`8.1`,transform:`rotate(-20.8 32.2 30.2)`}),(0,q.jsx)(`circle`,{fill:SQ,cx:`32`,cy:`32`,r:`21.1`}),(0,q.jsxs)(`g`,{fill:`none`,stroke:EQ,strokeWidth:`3`,children:[(0,q.jsx)(`ellipse`,{cx:`32`,cy:`31.8`,rx:`12.2`,ry:`18.7`}),(0,q.jsx)(`path`,{d:`M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39`})]}),(0,q.jsx)(`path`,{fill:`none`,stroke:TQ,strokeWidth:`4.4`,d:`M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2`,transform:`rotate(-20.8 32.2 30.2)`})]}),members:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`circle`,{fill:SQ,cx:`41.9`,cy:`22.85`,r:`12.2`}),(0,q.jsx)(`path`,{fill:SQ,d:`M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z`}),(0,q.jsx)(`circle`,{fill:xQ,cx:`22.95`,cy:`27.6`,r:`12.85`}),(0,q.jsx)(`path`,{fill:xQ,d:`M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z`}),(0,q.jsxs)(`g`,{fill:DQ,children:[(0,q.jsx)(`circle`,{cx:`18.3`,cy:`28`,r:`1.6`}),(0,q.jsx)(`circle`,{cx:`27.9`,cy:`28`,r:`1.6`}),(0,q.jsx)(`circle`,{cx:`39.1`,cy:`23.05`,r:`1.55`}),(0,q.jsx)(`circle`,{cx:`47.25`,cy:`23.05`,r:`1.55`})]})]}),sell:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:TQ,d:`M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z`}),(0,q.jsx)(`ellipse`,{fill:EQ,cx:`21.9`,cy:`40.8`,rx:`13.2`,ry:`3.6`}),(0,q.jsxs)(`g`,{transform:`rotate(-3 22.5 30) translate(0.5 0)`,children:[(0,q.jsx)(`path`,{fill:TQ,d:`M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z`}),(0,q.jsx)(`ellipse`,{fill:EQ,cx:`23.7`,cy:`26.55`,rx:`13.05`,ry:`4.4`})]}),(0,q.jsxs)(`g`,{transform:`translate(46.3 40.3) rotate(-25)`,children:[(0,q.jsx)(`path`,{fill:xQ,d:`M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z`}),(0,q.jsx)(`circle`,{fill:EQ,cx:`0`,cy:`-10.7`,r:`2.2`})]}),(0,q.jsx)(aQ,{fill:TQ,transform:`translate(38.2 18.6) scale(1.1 .86)`}),(0,q.jsx)(aQ,{fill:TQ,transform:`translate(42.8 21.2) rotate(45) scale(1.1 .85)`})]}),schedule:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:EQ,x:`6`,y:`11`,width:`47.6`,height:`44`,rx:`6`}),(0,q.jsx)(`path`,{fill:xQ,d:`M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z`}),(0,q.jsxs)(`g`,{fill:EQ,children:[(0,q.jsx)(`circle`,{cx:`16.1`,cy:`16.15`,r:`3.4`}),(0,q.jsx)(`circle`,{cx:`43.4`,cy:`16.15`,r:`3.4`})]}),(0,q.jsxs)(`g`,{fill:SQ,children:[(0,q.jsx)(`rect`,{x:`13.6`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`}),(0,q.jsx)(`rect`,{x:`40.9`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`})]}),(0,q.jsxs)(`g`,{fill:CQ,children:[(0,q.jsx)(`rect`,{x:`11.1`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`20.7`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`30.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`20.7`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`30.4`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`11.1`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`30.4`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,q.jsxs)(`g`,{fill:wQ,children:[(0,q.jsx)(`rect`,{x:`40.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`11.1`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`20.7`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,q.jsx)(`circle`,{fill:TQ,cx:`45.5`,cy:`45.6`,r:`12.2`}),(0,q.jsx)(`path`,{fill:`none`,stroke:DQ,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M45.1 39.3V46.2L51.3 49.8`}),(0,q.jsx)(`circle`,{fill:DQ,cx:`45.1`,cy:`46.2`,r:`2.5`})]}),loop:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{stroke:xQ},strokeWidth:`6`,strokeLinecap:`round`,d:`M47.5 14.5C43 11 37.5 9 32 9 19.5 9 9 19.5 9 32S19.5 55 32 55 55 44.5 55 32`}),(0,q.jsx)(`path`,{style:{fill:xQ},d:`M53.5 21.5Q54.5 20 55 22L58 33Q58.5 35 56.5 34.5L48.5 32.5Q47 32 48 30.5Z`}),(0,q.jsx)(`g`,{transform:`translate(18 21) scale(.28)`,children:(0,q.jsx)(uQ,{fill:SQ})}),(0,q.jsxs)(`g`,{style:{fill:EQ},children:[(0,q.jsx)(`rect`,{x:`25`,y:`27.5`,width:`14`,height:`3`,rx:`1.5`}),(0,q.jsx)(`rect`,{x:`25`,y:`33.5`,width:`9`,height:`3`,rx:`1.5`})]})]}),fungi:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`ellipse`,{fill:EQ,cx:`33.5`,cy:`43.6`,rx:`18.6`,ry:`14.4`,transform:`rotate(-6 33.5 43.6)`}),(0,q.jsx)(`path`,{fill:xQ,d:`M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z`}),(0,q.jsxs)(`g`,{fill:EQ,children:[(0,q.jsx)(`ellipse`,{cx:`29`,cy:`15.7`,rx:`8.7`,ry:`6.3`,transform:`rotate(-15.5 29 15.7)`}),(0,q.jsx)(`ellipse`,{cx:`50.8`,cy:`20.1`,rx:`6.5`,ry:`3.5`,transform:`rotate(51.6 50.8 20.1)`}),(0,q.jsx)(`ellipse`,{cx:`13`,cy:`26.8`,rx:`4.2`,ry:`3.3`,transform:`rotate(-54.5 13 26.8)`})]}),(0,q.jsxs)(`g`,{fill:DQ,transform:`translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)`,children:[(0,q.jsx)(`rect`,{x:`31.85`,y:`35.9`,width:`3.75`,height:`5.25`,rx:`1.85`}),(0,q.jsx)(`path`,{d:`M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z`}),(0,q.jsx)(`path`,{d:`M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z`})]})]})};function kQ({name:e,size:t}){return(0,q.jsx)(`svg`,{viewBox:`0 0 64 64`,width:t,height:t,fill:`none`,stroke:`none`,"aria-hidden":`true`,focusable:`false`,"data-sigil":e,children:OQ[e]})}function AQ(e){let t=2166136261;for(let n of e)t^=n.codePointAt(0)??0,t=Math.imul(t,16777619)>>>0;return t}var jQ=[`primary`,`secondary`,`accent`,`info`,`success`,`warning`];function MQ(e){return jQ[AQ(e)%jQ.length]??`primary`}var NQ=(0,M.forwardRef)(function({className:e,name:t,seed:n,size:r=`default`,subject:i=`actor`,variant:a=`initial`,...o},s){let c=Array.from(t.trim())[0]?.toLocaleUpperCase()??`?`;return(0,q.jsx)(`span`,{"aria-hidden":`true`,...o,className:Y(`caps-monogram`,e),"data-subject":i===`actor`?void 0:i,"data-size":r==="default"?void 0:r,"data-tone":MQ(n??t),ref:s,children:a===`specimen`?(0,q.jsx)(`svg`,{viewBox:`0 0 48 48`,width:`80%`,height:`80%`,fill:`none`,"aria-hidden":`true`,children:(0,q.jsxs)(`g`,{transform:`rotate(${String((n??t).split(``).reduce((e,t)=>e+(t.codePointAt(0)??0),0)%360)} 24 24)`,stroke:`currentColor`,strokeWidth:`1.5`,children:[Array.from({length:20},(e,t)=>(0,q.jsx)(`path`,{d:`M24 19 Q19 12 24 5`,transform:`rotate(${String(t*18)} 24 24)`},t)),(0,q.jsx)(`circle`,{cx:`24`,cy:`24`,r:`5`})]})}):c})}),PQ=(0,M.createContext)(null),FQ=(0,M.createContext)(void 0);function IQ(e){let t=(0,M.useContext)(FQ);return e??t}var LQ=(0,M.forwardRef)(function({service:e,src:t,activity:n,expression:r,appearance:i,renderStyle:a,performance:o,timeMs:s,paused:c=!1,onState:l,...u},d){let f=IQ(s),p=f!==void 0,m=(0,M.useContext)(PQ),h=e??m;if(!h)throw Error(`Sprite needs a configured SpriteProvider or service`);let g=(0,M.useRef)(null),_=(0,M.useRef)(null),v=(0,M.useRef)(l);return v.current=l,(0,M.useImperativeHandle)(d,()=>{if(!g.current)throw Error(`Sprite host is not mounted`);return g.current}),(0,M.useEffect)(()=>{if(!g.current)return;let e=h.mount(g.current),t=e.subscribe(e=>{g.current&&(g.current.dataset.spriteStatus=e.status),v.current?.(e)});return _.current=e,()=>{t(),e.dispose().catch(e=>{console.error(`Sprite cleanup failed`,e)}),_.current=null}},[h]),(0,M.useEffect)(()=>{let e=_.current;if(!e)return;let s={src:t};n!==void 0&&(s={...s,activity:n}),r!==void 0&&(s={...s,expression:r}),i!==void 0&&(s={...s,appearance:i}),a!==void 0&&(s={...s,renderStyle:a}),o!==void 0&&(s={...s,performance:o}),f!==void 0&&(s={...s,timeMs:f}),e.set(s)},[h,t,n,r,i,a,o,f]),(0,M.useEffect)(()=>{_.current?.pause(c||p)},[h,c,p]),(0,q.jsx)(`div`,{...u,ref:g})});function RQ(e){return{src:{local:e.character},appearance:e.appearance,expression:e.expression,renderStyle:e.renderStyle}}function zQ(e){for(let[t,n]of Object.entries({maxBytes:e.maxBytes,maxTotalBytes:e.maxTotalBytes,maxRequests:e.maxRequests}))if(!Number.isSafeInteger(n)||n<=0)throw Error(`Avatar ${t} must be a positive safe integer`);let t=new Set(e.allowedOrigins.map(e=>new URL(e).origin)),n=e.fetch??globalThis.fetch;return()=>{let r=0,i=0;return async(a,o,s=e.baseURL)=>{let c=new URL(a,s);if(![`http:`,`https:`].includes(c.protocol)||!t.has(c.origin)||c.username||c.password)throw Error(`Avatar asset is not admitted: ${c.origin}`);if(i+=1,i>e.maxRequests)throw Error(`Avatar asset request limit reached`);let l=await n(c.href,{signal:o,redirect:`error`});if(!l.ok)throw Error(`Avatar asset request failed: ${String(l.status)}`);let u=Number(l.headers.get(`content-length`));if(u>e.maxBytes||u>e.maxTotalBytes-r)throw await l.body?.cancel(),Error(`Avatar asset exceeds the byte limit`);let d=l.body?.getReader();if(!d)throw Error(`Avatar asset has no response body`);let f=[],p=0;try{for(;;){o.throwIfAborted();let t=await d.read();if(t.done)break;if(p+=t.value.byteLength,p>e.maxBytes)throw Error(`Avatar asset exceeds the byte limit`);if(t.value.byteLength>e.maxTotalBytes-r)throw Error(`Avatar selection exceeds the total byte limit`);r+=t.value.byteLength,f.push(t.value)}}catch(e){let t=await d.cancel().then(()=>({kind:`cancelled`}),e=>({kind:`failed`,error:e instanceof Error?e:Error(String(e))}));throw t.kind===`failed`?AggregateError([e,t.error],`Avatar asset read and cancellation failed`,{cause:e}):e}finally{d.releaseLock()}let m=new Uint8Array(p),h=0;for(let e of f)m.set(e,h),h+=e.byteLength;return{url:c.href,bytes:m,contentType:l.headers.get(`content-type`)??`application/octet-stream`}}}}var BQ=(e,t)=>{let n=jr.safeParse(e);return n.success?{kind:`local`,key:n.data.local}:{kind:`remote`,url:new URL(k().parse(e),t).href}},VQ=e=>e instanceof Error?e:Error(String(e),{cause:e}),HQ=e=>ps(e)?VQ(es(e.cause)):Error(`Unexpected Sprite success`);function UQ(e){let t=e.maxPixels??4194304;if(!Number.isSafeInteger(t)||t<=0)throw Error(`Sprite pixel limit must be a positive safe integer`);let n=e.assets??{baseURL:`https://sprite.invalid/`,allowedOrigins:[],maxBytes:1,maxTotalBytes:1,maxRequests:1},r=zQ(n),i=new WeakSet,a=new WeakMap,o=e=>{let t=BQ(e,n.baseURL);return t.kind===`remote`?t.url:`local:${t.key}`};return{mount(s){if(i.has(s))throw Error(`A Sprite already owns this target`);i.add(s);let c=Kt(Ts()),l=new Set,u={status:`empty`},d,f,p=0,m=!1,h,g,_,v=!1,y=!1,b=s.ownerDocument.defaultView?.matchMedia(`(prefers-reduced-motion: reduce)`),x=e=>{if(!(v&&e.status!==`destroyed`)){u=e;for(let t of l)try{t(e)}catch(e){console.error(`Sprite state observer failed`,e)}}},S=e=>{f?.controller.abort(),f?.holder.remove(),x({status:`error`,error:e}),ee().catch(t=>{x({status:`error`,error:AggregateError([e,t],`Avatar failed and cleanup also failed`)})})},C=Py(s),w=()=>{let e=y||s.ownerDocument.hidden||b?.matches===!0;C.still(e);try{f?.native?.pause(e)}catch(e){S(VQ(e))}};Kt(Os(c,Qt(()=>{s.ownerDocument.removeEventListener(`visibilitychange`,w),b?.removeEventListener(`change`,w),C.dispose()}))),s.ownerDocument.addEventListener(`visibilitychange`,w),b?.addEventListener(`change`,w);let ee=async()=>{if(g)return g;let e=f;if(!e)return;f=void 0,e.controller.abort(),e.holder.remove();let t=ye(As(e.scope,ds)).then(e=>{if(ps(e))throw HQ(e)});g=t;try{await t}finally{g===t&&(g=void 0)}},te=e=>{let t=e.native,n=e.document,r=d;if(!t||!n||!r||f!==e)return;let i=r.activity??`idle`,a=r.expression??t.expressions[0]??null,o,s;try{o=Vt(n.controls,r.appearance),s=cy.parse(r.renderStyle??`plain`)}catch(e){let t=VQ(e);u.status===`ready`?u.updateError?.message!==t.message&&x({...u,updateError:t}):S(t);return}let c={requestedActivity:i,requestedExpression:a,activity:t.activities.includes(i)?i:`idle`,expression:a!==null&&t.expressions.includes(a)?a:t.expressions[0]??null,appearance:o,renderStyle:s,fallback:!t.activities.includes(i)||a!==null&&!t.expressions.includes(a)},l=r.performance===void 0?c:{...c,performance:r.performance};r.timeMs!==void 0&&(l={...l,timeMs:r.timeMs});let p=JSON.stringify([l.activity,l.expression,l.appearance,l.timeMs]);if(C.set(s,e.holder),p!==e.appliedKey||r.performance!==e.appliedPerformance||u.status!==`ready`||u.presentation.renderStyle!==s||u.updateError!==void 0||u.presentation.requestedActivity!==i||u.presentation.requestedExpression!==a)try{if((p!==e.appliedKey||r.performance!==e.appliedPerformance)&&t.set(l),e.appliedKey=p,e.appliedPerformance=r.performance,w(),f===e){let t={status:`ready`,document:n,presentation:l};x(e.progress===void 0?t:{...t,progress:e.progress})}}catch(e){S(VQ(e))}},ne=async(i,a,o)=>{let c=r(),l=Kt(Ts()),d=new AbortController,m=s.ownerDocument.createElement(`div`);m.style.cssText=`width:100%;height:100%;position:relative`;let h={key:a,scope:l,controller:d,holder:m};f=h,Kt(Os(l,Qt(()=>{m.remove()}))),s.append(m);let g=En(function*(){let r,a,o=n.baseURL,s=BQ(i.src,n.baseURL);if(s.kind===`remote`){let t=yield*Rn({try:()=>c(s.url,d.signal),catch:VQ});o=t.url,r=ui.parse(JSON.parse(new TextDecoder().decode(t.bytes)));let n=e.renderers&&Object.hasOwn(e.renderers,r.renderer)?e.renderers[r.renderer]:void 0;if(!n)throw Error(`Renderer is not installed: ${r.renderer}`);a=(yield*Rn({try:n,catch:VQ})).default}else{let t=s.key,n=e.characters&&Object.hasOwn(e.characters,t)?e.characters[t]:void 0;if(!n)throw Error(`Character is not installed: ${t}`);let i=yield*Rn({try:n,catch:VQ});r=ui.parse(i.document),a=i.render}d.signal.throwIfAborted();let l=yield*a({target:m,document:r,signal:d.signal,maxPixels:t,reportError:e=>{f===h&&!d.signal.aborted&&S(e)},reportProgress:e=>{f!==h||d.signal.aborted||(h.progress=e,u.status===`ready`&&x({...u,progress:e}))},assetURL:e=>En(function*(){let t=yield*Rn({try:()=>c(e,d.signal,o),catch:VQ});return yield*fe(Qt(()=>URL.createObjectURL(new Blob([t.bytes],{type:t.contentType}))),e=>Qt(()=>{URL.revokeObjectURL(e)}))})});if(!l.activities.includes(`idle`))throw Error(`Character has no idle fallback`);return l.pause(!0),{native:l,document:r}}).pipe(Ds(l)),_=await ye(g,{signal:d.signal});if(!(v||o!==p||f!==h)){if(ps(_)){let e=HQ(_);try{await ee(),x({status:`error`,error:e})}catch(t){x({status:`error`,error:AggregateError([e,t],`Avatar load and cleanup failed`)})}return}h.native=_.value.native,h.document=_.value.document,te(h)}},re=async()=>{let e=e=>v||e!==p;for(;m&&!v;){m=!1;let t=p;if(await ee(),e(t)||!d)continue;let n=await a.get(s);if(n?.kind===`failed`)throw n.error;e(t)||(x({status:`loading`}),await ne(d,o(d.src),t))}},ie=()=>{m=!0,f?.controller.abort(),f?.holder.remove(),!h&&(h=re().catch(e=>{x({status:`error`,error:VQ(e)})}).finally(()=>{h=void 0,m&&!v&&ie()}))};return{get state(){return u},subscribe(e){return l.add(e),()=>l.delete(e)},set(e){if(v)throw Error(`Sprite is destroyed`);d=e;let t=o(e.src);f?.key===t&&u.status===`ready`?te(f):(f?.key!==t||u.status===`error`)&&(p+=1,ie())},pause(e){if(v)throw Error(`Sprite is destroyed`);y=e,w()},dispose(){return _||(v=!0,p+=1,i.delete(s),f?.controller.abort(),f?.holder.remove(),x({status:`destroyed`}),_=(async()=>{await h,await ee();let e=await ye(As(c,ds));if(ps(e))throw HQ(e)})(),a.set(s,_.then(()=>({kind:`closed`}),e=>({kind:`failed`,error:VQ(e)}))),_)}}}}}var WQ=UQ({characters:{mushroom:async()=>(await Hz(async()=>{let{default:e}=await import(`./mushroom-Czy5e_rO.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4]))).default,cat:async()=>(await Hz(async()=>{let{default:e}=await import(`./cat-YC0YT2iN.js`);return{default:e}},__vite__mapDeps([5,1,2,3,4,6,7,8]))).default,burger:async()=>(await Hz(async()=>{let{default:e}=await import(`./burger-Dsdp_Hx3.js`);return{default:e}},__vite__mapDeps([9,1,2,3,4,6,7,8]))).default}}),GQ=(0,M.memo)(function({activity:e=`idle`,avatar:t,className:n,name:r,size:i=24,timeMs:a}){let o=IQ(a),[s,c]=(0,M.useState)(!1),l=(0,M.useMemo)(()=>RQ(t),[t]);return(0,q.jsxs)(`span`,{"aria-hidden":`true`,className:`relative inline-block shrink-0 ${n??``}`,"data-agent-head":s?`ready`:`loading`,style:{height:i,width:i},children:[s?null:(0,q.jsx)(NQ,{className:`absolute inset-0`,name:r,seed:r}),(0,q.jsx)(LQ,{activity:e,...o===void 0?{}:{timeMs:o},appearance:l.appearance,className:`absolute inset-0`,expression:l.expression,onState:e=>{c(e.status===`ready`)},paused:o!==void 0||e===`idle`,renderStyle:l.renderStyle,service:WQ,src:l.src})]})});function KQ(e,t){e!==null&&e.showToast({message:t.message,tone:t.variant}).catch(e=>{console.error(`Chat toast failed`,e)})}export{ZY as $,Zh as $a,kT as $i,nA as $n,Mu as $o,zD as $r,KM as $t,CZ as A,ob as Aa,oD as Ai,ej as An,Vg as Ao,KO as Ar,pK as At,TX as B,yv as Ba,FE as Bi,VA as Bn,Fg as Bo,OO as Br,xW as Bt,jZ as C,US as Ca,cD as Ci,fj as Cn,Eh as Co,rk as Cr,Xi as Cs,fJ as Ct,DZ as D,bS as Da,sD as Di,nj as Dn,P as Do,QO as Dr,gq as Dt,OZ as E,Xx as Ea,rD as Ei,ZA as En,Lh as Eo,XO as Er,_q as Et,KX as F,Jv as Fa,eD as Fi,sj as Fn,Ag as Fo,RO as Fr,VW as Ft,MX as G,m_ as Ga,pE as Gi,kA as Gn,sg as Go,_O as Gr,Hz as Gt,IX as H,ov as Ha,vE as Hi,MA as Hn,vg as Ho,DO as Hr,gW as Ht,GX as I,jv as Ia,$E as Ii,rj as In,jg as Io,FO as Ir,GW as It,OX as J,I_ as Ja,eE as Ji,SA as Jn,hg as Jo,nO as Jr,WR as Jt,NX as K,T_ as Ka,dE as Ki,TA as Kn,t_ as Ko,hO as Kr,Lz as Kt,UX as L,Ev as La,HE as Li,KA as Ln,Pg as Lo,NO as Lr,BW as Lt,vZ as M,zy as Ma,iD as Mi,aj as Mn,Fh as Mo,VO as Mr,YG as Mt,gZ as N,Uy as Na,tD as Ni,oj as Nn,Ng as No,HO as Nr,$ as Nt,TZ as O,ub as Oa,mD as Oi,tj as On,Rh as Oo,qO as Or,PK as Ot,cZ as P,oy as Pa,nD as Pi,XA as Pn,wg as Po,zO as Pr,ZW as Pt,tX as Q,V as Qa,MT as Qi,_A as Qn,Fu as Qo,JD as Qr,JM as Qt,HX as R,xv as Ra,zE as Ri,GA as Rn,Mg as Ro,jO as Rr,HW as Rt,AZ as S,eC as Sa,vD as Si,bj as Sn,W as So,nk as Sr,Qi as Ss,CJ as St,EZ as T,LS as Ta,fD as Ti,JA as Tn,Ih as To,ZO as Tr,Wi as Ts,bq as Tt,jX as U,W_ as Ua,gE as Ui,AA as Un,I as Uo,TO as Ur,MV as Ut,kX as V,_v as Va,jE as Vi,jA as Vn,xg as Vo,EO as Vr,bW as Vt,FX as W,B_ as Wa,fE as Wi,OA as Wn,F as Wo,yO as Wr,aV as Wt,DX as X,c_ as Xa,WT as Xi,mA as Xn,Op as Xo,$D as Xr,YM as Xt,PX as Y,l_ as Ya,QT as Yi,hA as Yn,nm as Yo,tO as Yr,QR as Yt,nX as Z,o_ as Za,VT as Zi,gA as Zn,zu as Zo,ZD as Zr,XM as Zt,zZ as _,cC as _a,hD as _i,Rj as _n,Xh as _o,dk as _r,nc as _s,TJ as _t,LQ as a,uT as aa,UD as ai,wM as an,H as ao,Sk as ar,Ou as as,YY as at,RZ as b,oC as ba,dD as bi,Oj as bn,Jh as bo,ik as br,Da as bs,wJ as bt,eQ as c,Y as ca,FD as ci,dM as cn,Yh as co,xk as cr,Zf as cs,qY as ct,$Z as d,_C as da,RD as di,nM as dn,$h as do,gk as dr,xu as ds,iY as dt,OT as ea,ID as ei,RM as en,Cg as eo,eA as er,Nu as es,VY as et,YZ as f,uC as fa,OD as fi,tM as fn,R as fo,hk as fr,El as fs,QJ as ft,PZ as g,iC as ga,yD as gi,zj as gn,Kg as go,ok as gr,Vs as gs,zJ as gt,VZ as h,qS as ha,LD as hi,Bj as hn,tg as ho,uk as hr,lc as hs,qJ as ht,RQ as i,hT as ia,BD as ii,TM as in,L as io,Ck as ir,Au as is,KY as it,yZ as j,Fy as ja,aD as ji,ij as jn,gg as jo,UO as jr,QG as jt,wZ as k,sb as ka,gD as ki,YA as kn,Vh as ko,GO as kr,mK as kt,tQ as l,sT as la,TD as li,uM as ln,U as lo,Ek as lr,Xf as ls,HY as lt,qZ as m,nC as ma,AD as mi,Vj as mn,Wg as mo,pk as mr,dc as ms,JJ as mt,GQ as n,ST as na,WD as ni,NM as nn,r_ as no,Jk as nr,ju as ns,UY as nt,kQ as o,dT as oa,VD as oi,mM as on,qh as oo,wk as or,Lu as os,RY as ot,JZ as p,ZS as pa,kD as pi,Qj as pn,B as po,mk as pr,Yc as ps,ZJ as pt,AX as q,E_ as qa,tE as qi,CA as qn,Nh as qo,rO as qr,GR as qt,WQ as r,gT as ra,xD as ri,DM as rn,i_ as ro,Yk as rr,Iu as rs,WY as rt,ZZ as s,xT as sa,SD as si,pM as sn,zg as so,Ok as sr,Yf as ss,GY as st,KQ as t,DT as ta,CD as ti,LM as tn,G as to,Qk as tr,Du as ts,JY as tt,QZ as u,FC as ua,ED as ui,oM as un,z as uo,bk as ur,Mf as us,sY as ut,IZ as v,GS as va,lD as vi,jj as vn,ag as vo,lk as vr,Go as vs,xJ as vt,kZ as w,IS as wa,pD as wi,cj as wn,Th as wo,YO as wr,Yi as ws,vq as wt,KZ as x,fC as xa,uD as xi,yj as xn,cg as xo,tk as xr,la as xs,SJ as xt,FZ as y,$S as ya,_D as yi,Lj as yn,ig as yo,fk as yr,Ta as ys,EJ as yt,VX as z,bv as za,RE as zi,HA as zn,K as zo,MO as zr,FW as zt};
49
+ `).map(e=>NM(e.slice(e.lastIndexOf(`\r`)+1)))}function Sq(e,t){let n=e.live;return n===void 0?[]:t?[...n.droppedBytes===0?[]:[`… ${String(Math.ceil(n.droppedBytes/1024))} KiB earlier`],...n.lines]:n.lines.slice(-6)}var Cq=40,wq=6,Tq=400,Eq=72,Dq=new Map([[`apply_patch`,`edit`],[`bash`,`command`],[`edit`,`edit`],[`execute`,`code`],[`glob`,`search`],[`grep`,`search`],[`list`,`search`],[`ls`,`search`],[`read`,`read`],[`write`,`edit`]]),Oq={code:[`Ran script`,`Running script`],command:[`Ran`,`Running`],edit:[`Updated`,`Updating`],other:[`Called`,`Calling`],read:[`Read`,`Reading`],search:[`Searched`,`Searching`]},kq=zi({path:k()}),Aq=zi({file_path:k()}),jq=zi({command:k()}),Mq=zi({code:k()}),Nq=zi({patch:k()}),Pq=zi({pattern:k()}),Fq=zi({oldText:k(),newText:k()}),Iq=zi({content:k()}),Lq=k(),Rq=zi({content:k(),offset:Lt().int().min(0).optional()}),zq=zi({matches:Ze(zi({path:k(),line:Lt().int(),text:k()}))}),Bq=zi({stdout:k().optional(),stderr:k().optional(),exitCode:Lt().int().nullable().optional()}).refine(e=>e.stdout!==void 0||e.stderr!==void 0||e.exitCode!==void 0),Vq=pe({path:k(),bytes:Lt().int().nonnegative(),diff:k(),firstChangedLine:Lt().int().positive().nullable(),unifiedPatch:k().nullable(),unifiedPatchBytes:Lt().int().nonnegative(),unifiedPatchAddedLines:Lt().int().nonnegative(),unifiedPatchRemovedLines:Lt().int().nonnegative(),unifiedPatchTruncated:cr()}),Hq=/^(.+?:\d+)[:-]\s?(.*)$/u;function Uq(e){return Dq.get(e)??`other`}function Wq(e){return e.replace(/\/(?:home|Users)\/[^/\s"'`]+/gu,`~`)}function Gq(e){let t=e.split(`
50
+ `).map(e=>e.trim()).find(e=>e!==``)??``;return t.length>Eq?`${t.slice(0,71)}…`:t}function Kq(e){return e.slice(0,Tq)}function qq(e){return Kq(MM(e).replace(/\n$/u,``).split(`
51
+ `))}function Jq(e){let t=kq.safeParse(e);if(t.success)return t.data.path;let n=Aq.safeParse(e);return n.success?n.data.file_path:void 0}function Yq(e){try{return{kind:`parsed`,value:JSON.parse(e)}}catch(e){return{kind:`invalid`,cause:e}}}function Xq(e){if(e===void 0)return{kind:`none`};let t=e.content.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
52
+ `);if(t.trim()===``)return{kind:`none`};let n=Yq(t);if(n.kind===`invalid`)return{kind:`text`,text:t};let r=n.value,i=Lq.safeParse(r);if(i.success)return{kind:`text`,text:i.data};let a=be().safeParse(r);return a.success?{kind:`json`,value:a.data}:{kind:`text`,text:t}}function Zq(e,t){let n=t===void 0||t===0;return{kind:`excerpt`,lines:qq(e).map((e,t)=>n?{number:t+1,text:e}:{text:e}),preview:12}}function Qq(e){return{kind:`matches`,matches:qq(e).filter(e=>e.trim()!==``).map(e=>{let t=Hq.exec(e);return t===null?{location:``,text:e}:{location:t[1]??``,text:t[2]??``}}),preview:12}}function $q(e,t){let n=[];if(e!==void 0&&e.trim()!==``)for(let t of qq(e))n.push({stream:`stdout`,text:t});if(t!==void 0&&t.trim()!==``)for(let e of qq(t))n.push({stream:`stderr`,text:e});return n.length===0?void 0:{kind:`output`,lines:Kq(n),preview:12}}function eJ(e,t){return{kind:`text`,label:t,language:`json`,lines:qq(JSON.stringify(e,null,2)),preview:12}}function tJ(e,t){if(e.kind===`none`)return{sections:[]};if(e.kind===`text`){if(t===`read`)return{sections:[Zq(e.text,void 0)]};if(t===`search`)return{sections:[Qq(e.text)]};if(t===`command`){let t=$q(e.text,void 0);return{failure:Gq(e.text),sections:t===void 0?[]:[t]}}return{failure:Gq(e.text),sections:[{kind:`text`,lines:qq(e.text),preview:12}]}}let n=Rq.safeParse(e.value);if(n.success)return{sections:[Zq(n.data.content,n.data.offset)]};let r=zq.safeParse(e.value);if(r.success)return{sections:[{kind:`matches`,matches:Kq(r.data.matches).map(e=>({location:`${e.path}:${String(e.line)}`,text:MM(e.text)})),preview:12}]};let i=gq.safeParse(e.value);if(i.success)return{failure:i.data.error.message,sections:[{kind:`text`,lines:[i.data.error.message],preview:12}]};let a=Vq.safeParse(e.value);if(a.success){let{unifiedPatch:e,unifiedPatchBytes:t,unifiedPatchTruncated:n}=a.data;if(n&&e===null)return{sections:[{kind:`text`,lines:[`Diff omitted (${String(t)} bytes, ${String(a.data.unifiedPatchAddedLines)} added, ${String(a.data.unifiedPatchRemovedLines)} removed).`],preview:12}]};if(!n&&e!==null&&t<=65536&&new TextEncoder().encode(e).byteLength===t)try{let t=iq(e),n=t[0];if(t.length===1&&n?.oldFileName===a.data.path&&n.newFileName===a.data.path)return{sections:[iJ([{operation:`update`,path:a.data.path,moveTo:void 0,lineNumbers:!0,unified:e,hunks:n.hunks.map(e=>({header:`-${String(e.oldStart)},${String(e.oldLines)} +${String(e.newStart)},${String(e.newLines)}`,lines:e.lines.flatMap(e=>{let t=sJ.get(e.charAt(0));return t===void 0?[]:[{kind:t,text:e.slice(1)}]})}))}])]}}catch(e){vq(`render tool patch`,e)}}let o=Bq.safeParse(e.value);if(o.success){let{stdout:e,stderr:t,exitCode:n}=o.data,r=$q(e,t),i=n!=null&&n!==0;return{exitCode:i?n:void 0,failure:t!==void 0&&t.trim()!==``?Gq(MM(t)):i?`Exited with code ${String(n)}`:void 0,sections:r===void 0?[]:[r]}}return{sections:[eJ(e.value)]}}var nJ={add:`Add`,delete:`Delete`,update:`Update`};function rJ(e){let t=e.length>1;return e.flatMap(e=>[...t?[{kind:`file`,text:`${nJ[e.operation]} ${e.path??``}${e.moveTo===void 0?``:` → ${e.moveTo}`}`}]:[],...e.hunks.flatMap(e=>[...e.header===void 0?[]:[{kind:`hunk`,text:e.header}],...e.lines])])}function iJ(e){return{kind:`diff`,files:e,lines:Kq(rJ(e)),preview:Cq}}var aJ={add:`+`,context:` `,remove:`-`};function oJ(e){return e.map(e=>{let t=1,n=1,r=e.hunks.map(e=>{let r=t=>e.lines.filter(e=>e.kind===t).length,i=r(`context`)+r(`remove`),a=r(`context`)+r(`add`),o={oldStart:t,oldLines:i,newStart:n,newLines:a,lines:e.lines.map(e=>`${aJ[e.kind]}${e.text}`)};return t+=i,n+=a,o}),i={oldFileName:e.path,newFileName:e.moveTo??e.path,oldHeader:void 0,newHeader:void 0,hunks:r};return{hunks:e.hunks.map(e=>({header:e.context,lines:e.lines})),lineNumbers:!1,moveTo:e.moveTo,operation:e.operation,path:e.path,unified:i.hunks.length===0?``:sq(i)}})}var sJ=new Map([[`+`,`add`],[`-`,`remove`],[` `,`context`]]);function cJ(e,t,n){let r=e??`file`,i=oq(r,r,t,n,``,``,{context:3});return{lineNumbers:!0,unified:sq(i),hunks:i.hunks.map(e=>({header:`-${String(e.oldStart)},${String(e.oldLines)} +${String(e.newStart)},${String(e.newLines)}`,lines:e.lines.flatMap(e=>{let t=sJ.get(e.charAt(0));return t===void 0?[]:[{kind:t,text:e.slice(1)}]})})),operation:t===``?`add`:`update`,path:e}}function lJ(e,t){let n=Nq.safeParse(e.args);if(n.success){let t=TK(n.data.patch),r=[...new Set(t.flatMap(e=>e.path?[e.path]:[]))];return{get input(){return[iJ(oJ(t))]},label:r.length<=1?r[0]??e.name:`${r[0]??``} +${String(r.length-1)}`,paths:r}}let r={label:t??e.name,paths:t===void 0?[]:[t]},i=Fq.safeParse(e.args);if(i.success)return{...r,get input(){return[iJ([cJ(t,i.data.oldText,i.data.newText)])]}};let a=Iq.safeParse(e.args);return{...r,get input(){return a.success?[iJ([cJ(t,``,a.data.content)])]:[]}}}function uJ(e){return{get input(){return Object.keys(e.args).length===0?[]:[eJ(e.args,`Arguments`)]},label:e.name,paths:[]}}function dJ(e,t){let n=Jq(e.args);switch(t){case`code`:{let t=Mq.safeParse(e.args);if(!t.success)return uJ(e);let n={kind:`script`,lines:qq(t.data.code),preview:wq},r=xK(t.data.code);return r===void 0?{get input(){return[n]},label:Gq(Wq(t.data.code)),paths:[]}:{get input(){return[{kind:`command`,lines:qq(r.command),preview:wq},...r.alone?[]:[n]]},label:Gq(Wq(r.command)),paths:[],verbs:[`Ran ${r.tool}:`,`Running ${r.tool}:`]}}case`command`:{let t=jq.safeParse(e.args);return t.success?{get input(){return[{kind:`command`,lines:qq(t.data.command),preview:wq}]},label:Gq(t.data.command),paths:[]}:uJ(e)}case`edit`:return lJ(e,n);case`read`:return{input:[],label:n??e.name,paths:n===void 0?[]:[n]};case`search`:{let t=Pq.safeParse(e.args);return{input:[],label:Gq(t.success?n===void 0?t.data.pattern:`${t.data.pattern} in ${n}`:n??`.`),paths:[]}}case`other`:return uJ(e)}}function fJ(e){if(e.status!==`completed`)return;let t=Xq(e.result);if(t.kind!==`json`)return;let n=pe({name:k().min(1).max(256),avatar:zy}).safeParse(t.value);if(!n.success)return;if(e.name===`self.rename`)return n.data;if(e.name!==`execute`)return;let r=Mq.safeParse(e.args);if(r.success)try{let e=bR(r.data.code,{ecmaVersion:`latest`,allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0});if(e.body.length!==1)return;let t=e.body[0];if(t?.type!==`ReturnStatement`)return;let i=t.argument?.type===`AwaitExpression`?t.argument.argument:t.argument;if(i?.type!==`CallExpression`)return;let a=i.callee;if(a.type!==`MemberExpression`||a.computed||a.property.type!==`Identifier`||a.property.name!==`rename`)return;let o=a.object;return o.type!==`MemberExpression`||o.computed||o.property.type!==`Identifier`||o.property.name!==`self`||o.object.type!==`Identifier`||o.object.name!==`env`?void 0:n.data}catch(e){if(e instanceof SyntaxError)return;throw e}}function pJ(e,t=!1){let n=Uq(e.name),r=dJ(e,n),i=fJ(e),a=i===void 0?r:{...r,label:Gq(i.name),verbs:[`Renamed itself to`,`Renaming itself to`]},[o,s]=a.verbs??Oq[n],c=e.status===`completed`?Xq(e.result):void 0,l=c?.kind===`json`&&gq.safeParse(c.value).success,u,d=()=>{if(u!==void 0)return u;let t=tJ(Xq(e.result),n),r=e.status===`error`||l,i=r?t.failure??`The tool reported an error.`:void 0,o=e=>{if(e.kind===`text`&&e.lines.length===1)return e.lines[0];if(e.kind===`output`&&e.lines.length===1)return e.lines[0]?.text},s=i===void 0?void 0:t.sections.find(e=>Gq(o(e)??``)===i),c=s===void 0?i:o(s)?.trim()??i,d=t.sections.some(e=>e.kind===`diff`),f=(n===`edit`&&!r&&!d?[]:t.sections).filter(e=>e!==s);return u={error:c,exitCode:t.exitCode,sections:[...n===`edit`&&d?[]:a.input,...f]},u},f=e.status===`error`||l;return{activeVerb:s,durationMs:e.startedAt===void 0||e.result===void 0?void 0:Math.max(0,e.result.timestamp-e.startedAt),get error(){return f?d().error:void 0},get exitCode(){return d().exitCode},id:e.id,identity:i,kind:n,label:a.label,name:e.name,live:e.status===`running`?e.live:void 0,paths:a.paths,recovered:f&&t,get sections(){return d().sections},status:f?`error`:e.status,verb:o}}function mJ(e){if(e<1e3)return`${String(Math.round(e))}ms`;if(e<6e4)return`${(e/1e3).toFixed(1)}s`;let t=Math.round(e/1e3);return`${String(Math.floor(t/60))}m ${String(t%60)}s`}function hJ(e,t){return t.length===0?e:e.map(e=>{if(e.kind!==`tool_group`)return e;let n=e.tools.map(e=>{let n=t.find(t=>t.toolCallId===e.id);return e.status!==`running`||n===void 0?e:{...e,live:{lines:xq(n.tail),droppedBytes:n.droppedBytes,revision:n.revision}}});if(n.every((t,n)=>t===e.tools[n]))return e;let r=e.calls.map((t,r)=>{let i=n[r];return i===void 0||i===e.tools[r]?t:pJ(i)});return{...e,tools:n,calls:r,active:r.find(t=>t.id===e.active?.id)}})}var gJ={code:[`ran`,`script`,`scripts`],command:[`ran`,`command`,`commands`],edit:[`edited`,`file`,`files`],other:[`called`,`tool`,`tools`],read:[`read`,`file`,`files`],search:[`searched`,`pattern`,`patterns`]};function _J(e){let t=new Map;for(let n of e){let e=t.get(n.kind)??{calls:0,paths:new Set};e.calls+=1;for(let t of n.paths)e.paths.add(t);t.set(n.kind,e)}let n=[...t].map(([e,t])=>{let[n,r,i]=gJ[e],a=(e===`read`||e===`edit`)&&t.paths.size>0?t.paths.size:t.calls;return`${n} ${String(a)} ${a===1?r:i}`}).join(`, `);return n.charAt(0).toUpperCase()+n.slice(1)}function vJ(e){return e.some(e=>e.status===`running`)?`running`:e.some(e=>e.status===`error`&&e.recovered!==!0)?`error`:e.some(e=>e.status===`unknown`)?`unknown`:`completed`}function yJ(e){let t,n;for(let r of e)r.startedAt!==void 0&&(t=Math.min(t??r.startedAt,r.startedAt)),r.result!==void 0&&(n=Math.max(n??r.result.timestamp,r.result.timestamp));return t===void 0||n===void 0?void 0:Math.max(0,n-t)}function bJ(e,t){let n=e[t];if(n?.status!==`error`)return!1;let r=e.slice(t+1).find(e=>e.kind===n.kind&&e.status!==`error`);return r?.status===`completed`?n.kind===`code`||r.label===n.label||r.paths.some(e=>n.paths.includes(e)):!1}function xJ(e){let t=e.map(e=>pJ(e)),n=e.map((e,n)=>{let r=t[n];return r!==void 0&&bJ(t,n)?pJ(e,!0):r??pJ(e)}),r=vJ(n);return{active:[...n].reverse().find(e=>e.status===`running`),calls:n,durationMs:r===`running`?void 0:yJ(e),failedCount:n.filter(e=>e.status===`error`&&e.recovered!==!0).length,id:`tools:${e[0].id}`,kind:`tool_group`,recoveredCount:n.filter(e=>e.recovered===!0).length,status:r,summary:n.length===1&&n[0]!==void 0?`${n[0].verb} ${n[0].label}`:_J(n),tools:e}}function SJ(e,t=new Set){let n=[],r=[],i=[],a=()=>{let[e,...t]=r;e!==void 0&&n.push(xJ([e,...t])),n.push(...i),r=[],i=[]};for(let o of e){if(t.has(o.id)&&a(),o.kind===`tool`){r.push(o);continue}if(o.kind===`assistant_message`&&!gK(o)&&r.length>0){i.push(o);continue}a(),n.push(o)}return a(),n}var CJ=Object.freeze({mode:`default`,overrides:new Map});function wJ(e){return e.status!==`completed`}function TJ(e,t){return t?e.calls:e.calls.slice(-3)}function EJ(e){return e.status===`error`&&e.recovered!==!0}function DJ(e,t,n){let r=e.overrides.get(t);return r===void 0?e.mode==="default"?n:e.mode===`expanded`:r}function OJ(e,t,n){let r=new Map(e.overrides);return r.set(t,!DJ(e,t,n)),{...e,overrides:r}}function kJ(e,t,n){return[...e.map(e=>({sequence:e.sequence,tie:1,kind:`message`,message:e})),...t.map(e=>({sequence:e.sequence,tie:0,kind:`marker`,marker:e})),...n.map(e=>({sequence:e.sequence,tie:2,kind:`notice`,notice:e}))].sort((e,t)=>e.sequence-t.sequence||e.tie-t.tie)}var AJ=()=>void 0;function jJ(e,t){return t===void 0?e:{...e,requestId:t}}function MJ(e){return Array.isArray(e)?e.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
53
+ `):e}function NJ(e,t){return{args:mK.parse(e.arguments),id:e.id,kind:`tool`,name:e.name,startedAt:t,status:`unknown`}}function PJ(e){let t={id:e.messageId,kind:`assistant_message`,pending:!0,text:`${e.textTruncated?`…`:``}${e.text}`};return e.thinking===``?t:{...t,thinking:`${e.thinkingTruncated?`…`:``}${e.thinking}`}}function FJ(e){let t=[],n=[],r=[];for(let i of e.content)i.type===`text`&&t.push(i.text),i.type===`thinking`&&i.redacted!==!0&&n.push(i.thinking),i.type===`toolCall`&&r.push(NJ(i,e.timestamp));return{text:t,thinking:n,tools:r}}function IJ(e,t,n){if(n.text.length===0&&n.thinking.length===0&&n.tools.length>0)return;let r={id:e,isError:t.stopReason===`error`||t.stopReason===`aborted`,kind:`assistant_message`,pending:!1,at:t.timestamp,text:n.text.length===0?t.stopReason===`error`?t.errorMessage??`This run couldn’t finish.`:t.stopReason===`aborted`?`The run was cancelled.`:``:n.text.join(``),...t.stopReason===`error`&&t.modelFailure!==void 0&&{modelFailure:t.modelFailure},usage:{cost:t.usage.cost.total,tokens:t.usage.totalTokens}},i=t.stopReason===`error`&&t.providerError!==void 0?{...r,text:t.errorMessage??`This run couldn’t finish.`,providerError:t.providerError}:r,a=t.stopReason===`error`&&t.providerError!==void 0&&n.text.length>0?{...i,errorDetail:n.text.join(``).slice(0,160)}:i;return n.thinking.length===0?a:{...a,thinking:n.thinking.join(`
54
+ `)}}function LJ(e,t){let n=[],r=new Map;for(let i of e){let e=n.at(-1);!t.has(i.id)&&i.kind===`assistant_message`&&i.isError&&e?.kind===`assistant_message`&&e.isError&&i.providerError===void 0==(e.providerError===void 0)&&i.modelFailure?.provider===e.modelFailure?.provider&&i.modelFailure?.cause.code===e.modelFailure?.cause.code&&i.text===e.text&&i.errorDetail===e.errorDetail&&i.thinking===e.thinking&&i.author?.id===e.author?.id&&i.author?.name===e.author?.name?(n[n.length-1]={...e,repeatCount:(e.repeatCount??1)+1,...i.providerError!==void 0&&{providerError:i.providerError},...i.modelFailure!==void 0&&{modelFailure:i.modelFailure}},r.set(i.id,e.id)):n.push(i)}return{items:n,aliases:r}}function RJ(e,t,n){let r=FJ(t),i=IJ(e,t,r);return{items:i===void 0?r.tools:[{...i,author:n},...r.tools],model:{model:t.model,provider:t.provider},usage:{cost:t.usage.cost.total,tokens:t.usage.totalTokens}}}function zJ(e,t,n){for(let r of n.items)r.kind===`tool`&&t.set(r.id,e.length),e.push(r)}function BJ(e,t,n,r){let i=t.get(n.toolCallId);if(i===void 0)return;let a=e[i];a?.kind===`tool`&&(e[i]={...a,result:n,data:r,status:n.isError?`error`:`completed`})}function VJ(e,t=[],n,r=PM,i=AJ,a=[],o=[],s=()=>!0){let c=[],l=new Map,u=new Set,d=new Map,f=new Map,p,m=0,h=0;for(let n of kJ(e,t,a)){if(n.kind===`marker`){d.set(n.marker.id,n.sequence),c.push({id:n.marker.id,kind:`compaction_divider`,at:n.marker.at,tokensBefore:n.marker.tokensBefore,tokensAfter:n.marker.tokensAfter});continue}if(n.kind===`notice`){d.set(n.notice.id,n.sequence),c.push({id:n.notice.id,kind:`compaction_notice`,at:n.notice.at,trigger:n.notice.trigger,result:n.notice.result,diagnostic:n.notice.diagnostic});continue}let e=n.message,t=e.value;e.commandId!==null&&u.add(e.commandId);let a=c.length;switch(t.role){case`user`:{let n=e.commandId??e.id,a={id:e.id,kind:`user_message`,commandId:n,status:`confirmed`,at:t.timestamp,text:MJ(t.content),author:r(e.meta),origin:e.origin};c.push(jJ(a,e.requestId??i(n)));break}case`assistant`:{let n=RJ(e.id,t,r(e.meta));p=n.model,m+=n.usage.tokens,h+=n.usage.cost,zJ(c,l,n);break}case`toolResult`:if(BJ(c,l,t,e.data),e.commandId!==null){let n=f.get(t.toolCallId)??new Set;n.add(e.commandId),f.set(t.toolCallId,n)}}for(let e of c.slice(a))d.set(e.id,n.sequence);if(e.commandId!==null)for(let t of c.slice(a))f.set(t.id,new Set([e.commandId]))}let g=n?.queue;if(g?.state===`running`&&n?.activeTool!==null){let e=!1,t=-1;for(let r=0;r<c.length;r++){let i=c[r];i?.kind===`user_message`&&(e=i.commandId===g.commandId,e&&(t=-1)),e&&i?.kind===`tool`&&i.status===`unknown`&&i.name===n?.activeTool&&(t=r)}let r=c[t];r?.kind===`tool`&&(c[t]={...r,status:`running`})}let _=new Set,v=0;for(let e of c){let t=d.get(e.id);t!==void 0&&(o.some(e=>v<=e&&e<t)&&_.add(e.id),v=t)}let y=SJ(c,_),b=new Map;for(let e of y){if(e.kind===`assistant_message`&&!gK(e))continue;let t=e.kind===`tool_group`?e.tools:[e];for(let n of t)for(let t of f.get(n.id)??[])b.set(t,e.id)}let x=new Map;for(let e of o){let t=null;for(let n of y)s(n)&&(n.kind===`assistant_message`&&!gK(n)||(n.kind===`tool_group`?n.tools:[n]).some(t=>{let n=d.get(t.id);return n!==void 0&&n<=e})&&(t=n.id));x.set(e,t)}let S=LJ(y,_);for(let[e,t]of b)b.set(e,S.aliases.get(t)??t);for(let[e,t]of x)t!==null&&x.set(e,S.aliases.get(t)??t);let C={commandAnchors:b,positionAnchors:x,completedMessageIds:nK(e),items:S.items,commandIds:u,requestIds:new Set(e.flatMap(e=>e.requestId===void 0?[]:[e.requestId]))};return p===void 0?C:{...C,model:p,usage:{cost:h,tokens:m}}}function HJ(e,t,n,r=[],i=PM){let a=t===null||e.completedMessageIds.has(t.messageId)||t.text===``&&t.thinking===``?void 0:t;if(r.length===0&&a===void 0&&n.length===0)return[];let o=[],s=new Set(n.map(({commandId:e})=>e));for(let t of n){if(e.commandIds.has(t.commandId))continue;let n={id:t.commandId,kind:`user_message`,commandId:t.commandId,status:`queued`,delivery:t.delivery,text:t.text,origin:t.origin,author:i(t.meta)};o.push(jJ(n,t.requestId))}for(let t of r){if(e.requestIds.has(t.requestId)||n.some(e=>e.requestId===t.requestId)||t.commandId!==void 0&&(s.has(t.commandId)||e.commandIds.has(t.commandId)))continue;let r={id:t.requestId,kind:`user_message`,requestId:t.requestId,status:t.status===`failed`?`failed`:t.status===`accepted`?`accepted`:t.status===`queued-local`?`queued`:`pending`,delivery:t.delivery,text:t.content},i=t.commandId===void 0?r:{...r,commandId:t.commandId},a=t.error===void 0?i:{...i,error:t.error};o.push(a)}return[...a===void 0?[]:[PJ(a)],...o.filter(e=>e.status!==`failed`&&e.delivery===`steer`),...o.filter(e=>e.status!==`failed`&&e.delivery===`followUp`),...o.filter(e=>e.status===`failed`)]}var UJ=Object.freeze({observation:`connecting`,snapshot:void 0,lastReplyAt:void 0,latestPrompt:void 0}),WJ=200,GJ=400;function KJ(e,t){for(let t of e.slice().reverse()){if(t.value.role!==`user`||t.commandId===null)continue;let e=t.value.content,n=Array.isArray(e)?e.flatMap(e=>e.type===`text`?[e.text]:[]).join(`
55
+ `):e,r=Array.isArray(e)?e.filter(e=>e.type===`image`):[];return{commandId:t.commandId,text:n,images:r.length===0?void 0:r}}return t}async function*qJ(e,t){yield{kind:`opening`};let n=await e.watch({limit:WJ}),r,i=()=>(r??=n.close(),r),a=()=>{i().catch(e=>{vq(`close aborted Session watch`,e)})};t.addEventListener(`abort`,a,{once:!0});try{if(t.aborted)return;let r=n.snapshot;yield{kind:`snapshot`,value:r};let i=aS(n.changes,e=>e).pipe(lS({duration:IM,orElse:()=>eS(Error(`Session feed is connected but silent; the service may be busy`))}),bS);for await(let t of i)r=pK(r,t),r.messages.length>GJ?(r=await e.read({limit:WJ}),yield{kind:`snapshot`,value:r}):yield{kind:`frame`,value:t,snapshot:r};throw Error(`Session watch ended; current activity is unavailable`)}catch(e){if(!t.aborted)throw e}finally{t.removeEventListener(`abort`,a),await i()}}function JJ(e,t){if(t.kind===`opening`)return{...e,observation:`connecting`};if(t.kind===`snapshot`)return{observation:`live`,snapshot:t.value,lastReplyAt:Date.now(),latestPrompt:KJ(t.value.messages,e.latestPrompt)};let n=t.snapshot;return{observation:`live`,snapshot:n,lastReplyAt:Date.now(),latestPrompt:t.value.kind===`reset`||t.value.kind===`update`&&t.value.messages.some(e=>e.value.role===`user`)?KJ(n.messages,e.latestPrompt):e.latestPrompt}}function YJ(e){return xv({queryKey:[`shiitake-session`,e.address],queryFn:bv({streamFn:({signal:t})=>qJ(e,t),reducer:JJ,initialValue:UJ,refetchMode:`append`}),refetchOnMount:`always`,retry:!1,staleTime:1/0})}function XJ(e,t,n){e.setQueryData(YJ(t).queryKey,{observation:`connecting`,snapshot:n,lastReplyAt:void 0,latestPrompt:KJ(n.messages)})}function ZJ(e,t=null){let n={before:t,newerBefore:[],newerOverflow:!1};return Sv({queryKey:[`shiitake-session-history`,e.address],initialPageParam:n,queryFn:async({pageParam:t,signal:n})=>{if(t.before===null)throw Error(`Session has no older history cursor`);let r=await e.read({before:t.before,limit:100});return n.throwIfAborted(),r},getNextPageParam:(e,t,n)=>{if(e.oldestCursor===null||e.oldestCursor===void 0)return;let r=n.before===null?n.newerBefore:[...n.newerBefore,n.before];return{before:e.oldestCursor,newerBefore:r.slice(-2048),newerOverflow:n.newerOverflow||r.length>2048}},getPreviousPageParam:(e,t,n)=>{let r=n.newerBefore.at(-1);return r===void 0?void 0:{before:r,newerBefore:n.newerBefore.slice(0,-1),newerOverflow:n.newerOverflow}},select:e=>({pages:e.pages,newerOverflow:e.pageParams[0]?.newerOverflow??!1}),maxPages:4,enabled:!1,retry:!1,staleTime:1/0})}function QJ(e,t=/Mac|iPhone|iPad/u.test(globalThis.navigator.userAgent)){if(e.startsWith(`<leader>`)){let t=e.replaceAll(`<leader>`,`Ctrl K `).trimEnd();return e.endsWith(` `)?`${t} Space`:t}return e.split(` `).map(e=>e.split(`+`).map(e=>e===`mod`?t?`⌘`:`Ctrl`:e===`escape`?`Esc`:e.length===1?e.toUpperCase():e.charAt(0).toUpperCase()+e.slice(1)).join(e===`ctrl+k`||e===`mod+k`?` `:`+`)).join(` `)}function $J(e){let t=new Map;for(let n of e.bindings)t.set(n.commandId,[...t.get(n.commandId)??[],QJ(n.binding)]);return e.slash.map(e=>({alias:e.alias,commandId:e.commandId,command:e.command,title:e.title,description:e.description,category:e.category,order:e.order,grammar:e.arguments,consumesDraft:e.consumesDraft,keys:t.get(e.commandId)??[],availability:e.availability}))}function eY(e){let t=new Map;for(let n of e.bindings){let e=t.get(n.commandId);t.set(n.commandId,{commandId:n.commandId,command:n.command,keys:e===void 0?QJ(n.binding):`${e.keys}, ${QJ(n.binding)}`,title:n.title,description:[n.description,...n.availability.status===`unavailable`?[n.availability.reason]:[]].filter(e=>e!==void 0).join(` · `)||void 0,order:e?.order??n.order})}return[...t.values()]}function tY(e){let t=e.grammar?.words?.map(({word:e})=>e)??[];return e.grammar===void 0?`/${e.alias} takes no arguments.`:e.grammar.text===void 0?`Use /${e.alias} ${t.join(` or `)}.`:`Use /${e.alias} ${e.grammar.hint}.`}function nY(e,t){if(!t.startsWith(`/`))return{kind:`prompt`};let n=/^\/(\S*)(?:\s+([\s\S]*))?$/u.exec(t.trimEnd()),r=n?.[1]??``,i=(n?.[2]??``).trim(),a=e.find(e=>e.alias===r);if(a===void 0)return{kind:`invalid`,message:`Unsupported command: /${r}. Use /help for available commands.`};if(i.length===0)return{kind:`command`,command:a};let o=a.grammar,s=o?.words?.find(e=>e.word===i);return s===void 0?o?.text===void 0?{kind:`invalid`,message:tY(a)}:{kind:`command`,command:a,arguments:{...o.text.arguments,[o.text.field]:i},requestIdField:o.text.requestIdField}:{kind:`command`,command:a,arguments:s.arguments}}function rY(e,t){let n=e.toLocaleLowerCase(),r=t.toLocaleLowerCase();if(r.length===0)return{tier:0,spread:0,indices:[]};let i=e=>Array.from({length:r.length},(t,n)=>e+n);if(n.startsWith(r))return{tier:0,spread:n.length-r.length,indices:i(0)};let a=n.search(RegExp(`[-_\\s]${r.replaceAll(/[.*+?^${}()|[\]\\]/gu,`\\$&`)}`,`u`));if(a>=0)return{tier:1,spread:a,indices:i(a+1)};let o=n.indexOf(r);if(o>=0)return{tier:2,spread:o,indices:i(o)};let s=[],c=0;for(let e of r){let t=n.indexOf(e,c);if(t<0)return;s.push(t),c=t+1}let l=s[0]??0;return{tier:3,spread:(s.at(-1)??0)-l-r.length+1,indices:s}}function iY(e,t,n,r){return e.map(e=>({entry:e,match:rY(t(e),n)})).filter(e=>e.match!==void 0).sort((e,n)=>e.match.tier-n.match.tier||e.match.spread-n.match.spread||r(e.entry)-r(n.entry)||t(e.entry).localeCompare(t(n.entry))).map(({entry:e,match:t})=>({entry:e,indices:t.indices}))}var aY=[`help`,`login`,`model`];function oY(e,t,n={}){if(!t.startsWith(`/`)||t.includes(`
56
+ `))return{kind:`none`};let r=t.search(/\s/u);if(r<0){let r=t.slice(1);return{kind:`commands`,query:r,items:iY(e.filter(e=>e.availability.status===`available`&&(r.length===0?e.category===(n.idleCategory??`Conversation`)||aY.includes(e.alias):e.category!==`Advanced`||e.alias.toLocaleLowerCase().startsWith(r.toLocaleLowerCase()))),e=>e.alias,r,e=>{let t=aY.indexOf(e.alias);return r.length===0&&t>=0?t-aY.length:e.order}).map(({entry:e,indices:t})=>({command:e,label:`/${e.alias}`,matches:t.map(e=>e+1),insert:e.grammar===void 0?`/${e.alias}`:`/${e.alias} `}))}}let i=t.slice(1,r),a=e.find(e=>e.alias===i);if(a?.grammar===void 0||a.availability.status!==`available`)return{kind:`none`};let o=t.slice(r).trimStart(),s=(o.includes(` `)?[]:a.grammar.words??[]).filter(e=>e.word.toLocaleLowerCase().startsWith(o.toLocaleLowerCase())).map(e=>({word:e,label:e.word,matches:Array.from({length:o.length},(e,t)=>t),insert:`/${i} ${e.word}`}));return{kind:`arguments`,command:a,query:o,hint:`/${i} ${a.grammar.hint}`,items:s}}var sY=new WeakMap;function cY(e){return e.status===`handled`&&zi({cancelled:gt(!0)}).safeParse(e.result).success}async function lY(e,t,n,r,i){let a=nY($J(t.snapshot()),e);if(a.kind===`prompt`){n();return}if(a.kind===`invalid`)return{status:`failed`,error:{code:`invalid_arguments`,message:a.message}};let{command:o,requestIdField:s}=a;if(o.consumesDraft&&o.availability.status===`available`&&i?.(),a.arguments===void 0)return t.execute(o.command,{origin:r});if(s===void 0)return t.execute(o.command,{origin:r,arguments:a.arguments});let c=sY.get(t)??new Map;sY.set(t,c);let l=c.get(o.commandId);if(l?.draft===e&&l.running!==void 0)return l.running;let u={draft:e,requestId:l?.draft===e?l.requestId:jv()};c.set(o.commandId,u);let d=t.execute(o.command,{origin:r,arguments:{...a.arguments,[s]:u.requestId}}).then(e=>c.get(o.commandId)===u?(u.running=void 0,e.status===`handled`&&!cY(e)&&c.delete(o.commandId),e):e);return u.running=d,d}var uY=5e3,dY=`Too late: that message already started`;function fY(e){return e instanceof Error?e.message:`Could not recall queued message`}function pY(e){let t={kind:`idle`},n=e.recovery===void 0?void 0:{prompt:e.recovery},r=!1,i=()=>r,a,o,s=n=>{t=n,e.onState(n)};async function c(t,r){if(n===void 0){let a=await e.session.latestPending();if(!r.active||i()||e.emptyDraftRevision()!==t)return{kind:`ignored`};if(a===null)return{kind:`empty`};e.reserve(a),n={prompt:a}}let a=n,o=a.result??await e.session.cancel({commandId:a.prompt.commandId,onlyIfPending:!0});return!i()&&n===a&&(a.result=o),{kind:`decided`,target:a,result:o}}async function l(){let r=e.emptyDraftRevision();if(i()||t.kind===`recalling`||r===void 0)return`ignored`;if(o!==void 0)return`uncertain`;s({kind:`recalling`});let l={active:!0},u=new Promise(e=>{a=()=>{e({kind:`ignored`})}}),d,f=new Promise(e=>{d=setTimeout(()=>{l.active=!1,e({kind:`uncertain`,message:`Recall is unconfirmed. Press Up on an empty composer to retry.`})},uY)});o=c(r,l).catch(e=>({kind:`uncertain`,message:fY(e)})).finally(()=>{o=void 0});let p=await Promise.race([o,f,u]);if(l.active=!1,clearTimeout(d),a=void 0,i())return`ignored`;if(p.kind===`ignored`||p.kind===`empty`)return s({kind:`idle`}),p.kind;if(p.kind===`uncertain`)return s(p),`uncertain`;if(p.result.status===`too_late`){try{e.forget()}catch(e){return s({kind:`uncertain`,message:fY(e)}),`uncertain`}return n=void 0,s({kind:`too_late`,message:dY}),`too_late`}try{if(e.restore(p.target.prompt,r))return n=void 0,s({kind:`restored`}),`restored`;s({kind:`uncertain`,message:`Message recalled. Clear the composer and press Up to restore it.`})}catch(e){s({kind:`uncertain`,message:fY(e)})}return`uncertain`}return{get state(){return t},recall:l,dispose:()=>{r=!0,a?.()}}}var mY=Ze(E({type:gt(`image`),data:k(),mimeType:k()})).readonly(),hY=St([`steer`,`followUp`]),gY=E({commandId:k(),requestId:k(),text:k(),images:mY.optional(),delivery:hY}),_Y=E({status:St([`queued-local`,`admitting`]),requestId:k().min(1),content:k(),submittedDraft:k(),delivery:hY,images:mY.optional(),restoreDraft:cr()}),vY=E({draft:k(),images:mY.optional(),delivery:hY.optional(),recall:gY.optional(),pending:Ze(_Y).max(32)});function yY(e,t){let n=`fungi.parakeet.drafts.v2:${e}`,r=!0;return{read(){if(t===void 0)return{draft:``,pending:[]};if(r){r=!1;try{t.removeItem(`fungi.parakeet.drafts.v1:${e}`)}catch(e){vq(`discard obsolete draft journal`,e)}}try{let e=t.getItem(n);return e===null?{draft:``,pending:[]}:vY.parse(JSON.parse(e))}catch(e){return vq(`read saved draft`,e),{draft:``,pending:[]}}},write(e){if(t===void 0)throw Error(`Durable draft storage is unavailable`);t.setItem(n,JSON.stringify(e))}}}var bY=Object.freeze([]),xY=Object.freeze([]),SY=Object.freeze([]),CY=Object.freeze([]),wY=Object.freeze([]),TY=Object.freeze({}),EY=Object.freeze({total:0,hasMore:!1,prompts:Object.freeze([])}),DY=Object.freeze({status:`connecting`}),OY=Object.freeze({status:`live`}),kY=32;function AY(e){return e instanceof Error&&e.message.trim().length>0?e.message:`Prompt admission failed`}function jY(e){let t,n=new Promise((e,n)=>{t=setTimeout(()=>{n(Error(`Request recovery timed out`))},1e4)});return Promise.race([e,n]).finally(()=>{clearTimeout(t)})}function MY(e){return(e instanceof Error&&e.message.trim().length>0?e.message.trim():`Session history is unavailable`).slice(0,500)}function NY(e,t,n){if(e===void 0)return`connecting`;let r=ZG(e),i=eK(r);return i===`idle`?n!==void 0||r.kind===`error`?`error`:t.some(({status:e})=>e===`accepted`||e===`queued-local`)?`queued`:t.some(({status:e})=>e===`admitting`)?`sending`:i:i}function PY(e){if(e===void 0)return;let t;for(let n of e)n.value.role===`user`&&n.commandId!==null&&(t===void 0||n.sequence>t.sequence)&&(t={commandId:n.commandId,sequence:n.sequence});return t?.commandId}function FY(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>{let n=r[t];return e.data===n?.data&&e.mimeType===n.mimeType})}function IY(e){if(e!==void 0)return{status:`available`,storage:e};try{let e=globalThis.localStorage;return e===void 0?{status:`unavailable`,cause:Error(`Browser draft storage is unavailable`)}:{status:`available`,storage:e}}catch(e){return{status:`unavailable`,cause:e}}}function LY(e,t,n,r,i,a,o,s,c){let l=yY(a,i.status===`available`?i.storage:void 0),u=l.read(),d=!1,f=new Map,p=new Map;for(let e of u.pending)e.status===`admitting`&&p.set(e.requestId,`Closed before confirmation`);let m=new Set,h=UG(()=>YJ(e),()=>t),g=$(e=>e(h).data?.snapshot),_=$(e=>e(h).data?.lastReplyAt),v=$(void 0),y=$(e=>(e(v)??e(g))?.oldestCursor??null),b=WG(t=>ZJ(e,t(y)),()=>t),x=$(e=>{let t=e(b);return t.data===void 0?e(y)!==null:t.hasNextPage}),S=$(e=>e(b).isFetching),C=$(e=>{let t=e(b);return t.hasPreviousPage||t.data?.newerOverflow===!0}),w=$(null,e=>{!e(x)||e(S)||e(b).fetchNextPage({cancelRefetch:!1,throwOnError:!0}).catch(e=>{e instanceof J_||vq(`read older Session history`,e)})}),ee=$(null,(n,r)=>{r(v,void 0),t.resetQueries({queryKey:ZJ(e).queryKey,exact:!0})}),te=$(null,(e,t)=>{let n=e(b);if(!n.isFetching){if(!n.hasPreviousPage){e(C)&&t(ee);return}n.fetchPreviousPage({cancelRefetch:!1,throwOnError:!0}).catch(e=>{e instanceof J_||vq(`read newer Session history`,e)})}}),ne=$(null,(e,t)=>{e(v)===void 0&&t(v,e(g))}),re=$(e=>{let t=e(b),n=e(g)?.messages??bY,r=t.data?.pages.flatMap(e=>e.messages)??bY,i=e(v)?.messages??bY;return r.length===0?i.length===0?n:iK(i,n):e(C)?r:iK(iK(r,i),n)}),ie=$(e=>{let t=e(b),n=e(g)?.compactions??xY,r=t.data?.pages.flatMap(e=>e.compactions??xY)??xY,i=e(v)?.compactions??xY;return r.length===0?i.length===0?n:sK(i,n):e(C)?r:sK(sK(r,i),n)}),T=$(e=>{let t=e(b),n=e(g)?.compactionNotices??SY,r=t.data?.pages.flatMap(e=>e.compactionNotices??SY)??SY,i=e(v)?.compactionNotices??SY;return r.length===0?i.length===0?n:cK(i,n):e(C)?r:cK(cK(r,i),n)}),ae=$(e=>e(h).data?.latestPrompt?.commandId??PY(e(re))),oe=$(e=>e(g)?.pending??EY),se=$(new Set),ce=$(void 0),le=$(e=>{let t=e(oe),n=e(se),r=t.prompts.filter(({commandId:e})=>!n.has(e));return r.length===t.prompts.length?t:{...t,prompts:r,total:t.total-(t.prompts.length-r.length)}}),ue=$(null,(e,t)=>{let n=e(se),r=new Set(e(oe).prompts.map(({commandId:e})=>e)),i=new Set([...n].filter(t=>t===e(ce)||r.has(t)));i.size!==n.size&&t(se,i)}),de=$(e=>e(g)?.extensions??TY),fe,pe=$(e=>{let t=e(h),n=e(g)?.activity;if(t.isError||t.data?.observation!==`live`||n?.queue.state!==`running`||n.activeTool===null){fe=void 0;return}return fe?.queue.state===`running`&&fe.queue.commandId===n.queue.commandId&&fe.activeTool===n.activeTool||(fe=n),fe}),me=$(new Map),he=$(e=>{let t=e(me);return e=>t.get(e)}),ge=$(e=>{let t=e(re),r=e(ie),i=e(T),a=[...t.map(e=>e.sequence),...r.map(e=>e.sequence),...i.map(e=>e.sequence)],c=Math.min(...a),l=Math.max(...a),u=e(o).flatMap(({value:t})=>t.timeline.cells.flatMap(({afterSequence:t})=>t===void 0||e(x)&&t<c||e(C)&&t>l?[]:[t]));return VJ(t,r,e(pe),n,e(he),i,u,s)}),_e=$(u.draft),E=$(u.images),D=$(u.delivery),ve=$(u.recall),ye=$({kind:`idle`}),be,xe=$(0),Se=$(u.pending),Ce=$(null,(e,t,n)=>{i.status!==`unavailable`&&l.write({draft:n?.draft??e(_e),images:n?.draftPayload===void 0?e(E):n.draftPayload.images,delivery:n?.draftPayload===void 0?e(D):n.draftPayload.delivery,recall:n?.recall===null?void 0:n?.recall??e(ve),pending:(n?.admissions??e(Se)).flatMap(({status:e,requestId:t,content:n,submittedDraft:r,delivery:i,images:a,restoreDraft:o})=>e===`admitting`||e===`queued-local`?[{status:e,requestId:t,content:n,submittedDraft:r,delivery:i,images:a,restoreDraft:o}]:[])})}),we=$(null,(t,n)=>t(ce)===void 0?(be??=pY({session:{latestPending:()=>e.latestPending(),cancel:t=>e.command({type:`cancel`,...t})},recovery:t(ve),emptyDraftRevision:()=>t(_e)===``&&(t(E)?.length??0)===0?t(xe):void 0,reserve:e=>{n(Ce,{recall:e}),n(ve,e)},forget:()=>{n(Ce,{recall:null}),n(ve,void 0)},restore:(e,r)=>t(xe)!==r||t(_e)!==``||(t(E)?.length??0)!==0?!1:(n(Ce,{draft:e.text,draftPayload:{images:e.images,delivery:e.delivery},recall:null}),n(ve,void 0),n(E,e.images),n(D,e.delivery),n(_e,e.text),n(xe,e=>e+1),!0),onState:e=>{n(ye,e),(e.kind===`too_late`||e.kind===`uncertain`)&&r.toast({variant:`warning`,message:e.message})}}),be.recall()):Promise.resolve(`ignored`)),Te=$(void 0),Ee=$(null,(e,t)=>{if(!d)return{status:`failed`,reason:`Conversation is no longer mounted`};if(i.status===`unavailable`)return{status:`failed`,reason:`Durable draft storage is unavailable`};try{return t(Ce),{status:`saved`}}catch(e){return{status:`failed`,reason:AY(e)}}}),De=$(e=>new Set([...e(ge).commandIds,...e(oe).prompts.map(({commandId:e})=>e),...e(g)?.terminals.map(({commandId:e})=>e)??[]])),O=$(e=>{let t=e(De);return e(Se).filter(e=>e.status===`failed`||e.commandId===void 0||!t.has(e.commandId))}),Oe=$(null,(e,t)=>{let n=e(De),r=new Map([...e(re).flatMap(({id:e,requestId:t,commandId:n})=>t===void 0?[]:[[t,n??e]]),...e(oe).prompts.map(({requestId:e,commandId:t})=>[e,t])]);for(let n of e(Se)){let e=r.get(n.requestId);e!==void 0&&t(me,t=>new Map(t).set(e,n.requestId))}t(Se,e=>{let i=e.filter(({requestId:e,status:t,commandId:i})=>!r.has(e)&&(t!==`accepted`||i===void 0||!n.has(i)));if(i.length!==e.length)try{t(Ce,{admissions:i})}catch(e){vq(`save reconciled draft`,e)}return i.length===e.length?e:i})}),k=$(void 0),ke=$(null,(e,t,n)=>{try{t(Ce,{draft:n})}catch(e){vq(`save current draft`,e),r.toast({variant:`error`,message:`Draft not saved: ${AY(e)}`})}e(_e)!==n&&t(xe,e=>e+1),t(_e,n),t(k,void 0)}),Ae=$(null,(e,t,n)=>{let i=n===void 0||n.length===0?void 0:n;try{t(Ce,{draftPayload:{images:i,delivery:e(D)}})}catch(e){vq(`save draft images`,e),r.toast({variant:`error`,message:`Images not saved: ${AY(e)}`})}t(E,i),t(xe,e=>e+1),t(k,void 0)}),je=$(null,(e,t,n)=>{e(xe)===n.revision&&e(_e)===n.draft&&(t(Ce,{draft:``}),t(_e,``))}),Me=GG(()=>({mutationFn:t=>e.command({type:`cancel`,commandId:t})}),()=>t),Ne,A=$(null,(t,n,i)=>{if(!d||t(ye).kind===`recalling`)return Promise.resolve();if(Ne!==void 0)return Ne;if(t(se).has(i)||!t(oe).prompts.some(e=>e.commandId===i))return Promise.resolve();n(se,new Set(t(se)).add(i)),n(ce,i);let a=()=>{let e=new Set(t(se));e.delete(i),n(se,e)},o=Promise.resolve().then(()=>e.command({type:`cancel`,commandId:i,onlyIfPending:!0})).then(e=>{d&&e.status===`too_late`&&(a(),r.toast({variant:`warning`,message:`Couldn't remove that message: it is no longer pending.`}))},()=>{d&&(a(),r.toast({variant:`warning`,message:`Cancellation unconfirmed. That message may still run. Try again or reconnect.`}))}).finally(()=>{Ne=void 0,d&&(n(ce,void 0),n(ue))});return Ne=o,o}),Pe=$(e=>{if(e(C))return[];let t=e(g),r=e(le);return HJ(e(ge),t?.progress??null,r.prompts,e(O),n)}),Fe=$(e=>{let t=e(ge),n={pendingHasMore:e(oe).hasMore,queued:e(le),cancellingQueued:e(ce)!==void 0||e(ye).kind===`recalling`,positionAnchors:t.positionAnchors,commandAnchors:t.commandAnchors,hasMoreHistory:e(x),hasNewerHistory:e(C),loadingOlderHistory:e(S),settled:hJ(t.items,e(pe)===void 0?[]:e(g)?.toolOutput??[]),tail:e(Pe)};return t.model===void 0||t.usage===void 0?n:{...n,model:t.model,usage:t.usage}}),Ie=$(e=>{let t=e(O),n=e(g),r=e(oe),i=e(Se).find(({requestId:t})=>t===e(Te)),a=r.prompts.length>0||t.some(({status:e})=>e!==`failed`);if(i?.status===`failed`&&n!==void 0&&eK(ZG(n))===`idle`&&!a)return`admission`;if(i?.status===`admitting`||i?.status===`accepted`&&!e(ge).commandIds.has(i.commandId??``)&&!r.prompts.some(({commandId:e})=>e===i.commandId)&&!n?.terminals.some(({commandId:e})=>e===i.commandId)||a)return;let o=e(ae),s=n?.terminals.find(({commandId:e})=>e===o)?.outcome;return s===`completed`?void 0:s}),Le=$(e=>{let t=e(h);return t.isError?{status:`unavailable`,reason:t.error instanceof Error&&t.error.message.trim().length>0?t.error.message:`Session history is unavailable`}:t.data?.observation===`live`?OY:DY}),Re=$(e=>e(Le).status===`unavailable`?`disconnected`:e(Le).status===`connecting`?`connecting`:NY(e(g),e(O),e(Ie))),ze=$(e=>e(g)?.context),Be=$(e=>{let t=e(g)?.activity.queue;return t?.state===`idle`?void 0:t?.commandId}),Ve,He=$(e=>{let t=e(Le);if(t.status===`unavailable`)return{kind:`disconnected`,cause:t.reason};if(t.status===`connecting`)return{kind:`connecting`};if(e(Ie)===`admission`)return{kind:`error`,cause:([...e(Se)].reverse().find(e=>e.status===`failed`)?.error??`Prompt admission failed`).slice(0,200)};let n=e(g);if(n===void 0)return{kind:`connecting`};let r=ZG(n);return Ve!==void 0&&$G(Ve,r)?Ve:(Ve=r,r)}),Ue=$(null,(t,n,{admission:i,consumeDraft:a})=>{try{n(Ce,a?{draft:``,draftPayload:{}}:{draft:t(_e)})}catch(e){vq(`save pending draft before send`,e),n(Se,e=>e.filter(({requestId:e})=>e!==i.requestId)),r.toast({variant:`error`,message:`Not sent: ${AY(e)}`});return}if(a&&(n(E,void 0),n(D,void 0),n(ke,``)),i.status===`queued-local`)return;let o={type:`prompt`,text:i.content,requestId:i.requestId,delivery:i.delivery};e.command(i.images===void 0?o:{...o,images:i.images}).then(e=>{if(!(!d||!t(Se).some(({requestId:e,status:t})=>e===i.requestId&&t===`admitting`))){if(e.status===`recorded`){n(Se,e=>e.filter(e=>e.requestId!==i.requestId)),n(Ce);return}n(me,t=>new Map(t).set(e.commandId,i.requestId)),n(Se,t=>t.map(t=>t.requestId===i.requestId?{requestId:t.requestId,content:t.content,images:t.images,submittedDraft:t.submittedDraft,restoreDraft:t.restoreDraft,delivery:t.delivery,commandId:e.commandId,status:`accepted`}:t)),n(Oe),n(Ce)}}).catch(e=>{if(d){if(e instanceof JM&&e.cause===`secret_in_prompt`){n(We,i);return}p.set(i.requestId,AY(e)),n(Ge)}})}),We=$(null,(e,t,n)=>{let i=e(Se);if(!i.some(({requestId:e,status:t})=>e===n.requestId&&t===`admitting`))return;let a=i.filter(({requestId:e})=>e!==n.requestId),o=e(_e),s=n.restoreDraft?o===``?n.submittedDraft:`${o}\n\n${n.submittedDraft}`:o,l=n.restoreDraft?[...e(E)??[],...n.images??[]]:e(E);try{t(Ce,{draft:s,draftPayload:{images:l,delivery:e(D)},admissions:a})}catch(e){vq(`restore draft after secret refusal`,e)}t(E,l),t(Se,a),t(ke,s);let u={variant:`error`,message:`Not sent: this message contains a key or password. Nothing was saved.`},d=c();r.toast(d===void 0?u:{...u,action:d})}),Ge=$(null,(t,n)=>{if(d)for(let i of t(Se)){let a=p.get(i.requestId);i.status!==`admitting`||a===void 0||m.has(i.requestId)||(m.add(i.requestId),jY(e.withdraw(i.requestId)).then(e=>{if(!d||!t(Se).some(({requestId:e,status:t})=>e===i.requestId&&t===`admitting`))return;if(e.status===`accepted`){n(me,t=>new Map(t).set(e.commandId,i.requestId)),n(Se,t=>t.map(t=>t.requestId===i.requestId?{...t,status:`accepted`,commandId:e.commandId}:t)),n(Ce),n(Oe);return}let o=t(_e),s=i.restoreDraft?o===``?i.submittedDraft:`${o}\n\n${i.submittedDraft}`:o,c=t(Se).map(e=>e.requestId===i.requestId?{...e,status:`failed`,error:a}:e),l=i.restoreDraft?[...t(E)??[],...i.images??[]]:t(E);n(Ce,{draft:s,draftPayload:{images:l,delivery:t(D)},admissions:c}),n(E,l),n(Se,c),n(ke,s),r.toast({variant:`error`,message:`Not sent: ${a}`})}).catch(e=>{d&&r.toast({variant:`error`,message:`Send outcome unconfirmed; draft saved: ${AY(e)}`})}).finally(()=>{m.delete(i.requestId)}))}}),Ke=$(null,(e,t)=>{let n=e(Le).status,r=e(Se);if(n===`live`){e(k)===`offline_queue_full`&&t(k,void 0);let n=r.find(({status:e})=>e===`queued-local`);if(n!==void 0){let e={...n,status:`admitting`};t(Se,t=>t.map(t=>t.requestId===n.requestId?e:t)),t(Ue,{admission:e,consumeDraft:!1})}}for(let[e,t]of f)r.some(({requestId:t,status:n})=>t===e&&n===`admitting`)||(clearTimeout(t),f.delete(e),p.delete(e));for(let e of r)e.status===`admitting`&&(n===`unavailable`&&p.set(e.requestId,`Disconnected`),f.has(e.requestId)||f.set(e.requestId,setTimeout(()=>{p.set(e.requestId,`Send confirmation timed out`),t(Ge)},3e4)));(n===`live`||n===`unavailable`)&&t(Ge)}),qe=$(null,(e,t)=>(d=!0,t(ye,{kind:`idle`}),t(Ke),()=>{d=!1,be?.dispose(),be=void 0;for(let e of f.values())clearTimeout(e);f.clear()})),Je=$(null,(e,t,n=`steer`)=>{let r=e(_e),i=r;if(e(ye).kind===`recalling`||i.trim()===``&&(e(E)?.length??0)===0)return;let a=e(O),o=a.filter(({status:e})=>e!==`failed`),s=e(Le).status!==`live`;if(s&&o.some(({status:e})=>e===`queued-local`)){t(k,`offline_queue_full`);return}if(o.length>=kY){t(k,`queue_full`);return}let c={content:i,delivery:e(D)??n,images:e(E),requestId:jv(),submittedDraft:r,restoreDraft:!0,status:s?`queued-local`:`admitting`};t(Se,[...a,c]),t(Te,c.requestId),t(k,void 0),t(Ue,{admission:c,consumeDraft:!0})}),Ye=$(null,async(e,t,n)=>{let r={draft:e(_e),revision:e(xe)},i=await n(r.draft,()=>{t(je,r)});return i?.status===`handled`&&!cY(i)&&t(je,r),i}),Xe=$(null,(e,t)=>{let n=e(O);if(e(Ie)===`interrupted`||e(Ie)===`failed`){let r=e(g),i=e(ae),a=e(h).data?.latestPrompt;if(r===void 0||a===void 0||a.commandId!==i)return;let o=a.text,s=e(_e)===o&&FY(e(E),a.images);if(n.filter(({status:e})=>e!==`failed`).length>=kY){t(k,`queue_full`);return}let c={content:o,images:a.images,delivery:`followUp`,requestId:jv(),submittedDraft:o,restoreDraft:s,status:`admitting`};t(Se,[...e(Se),c]),t(Te,c.requestId),t(k,void 0),t(Ue,{admission:c,consumeDraft:s});return}let r=n.filter(e=>e.status===`failed`).at(-1);if(r===void 0)return;if(n.filter(({status:e})=>e!==`failed`).length>=kY){t(k,`queue_full`);return}let i=e(_e)===r.submittedDraft&&FY(e(E),r.images),a={content:r.content,delivery:r.delivery,images:r.images,requestId:jv(),submittedDraft:r.submittedDraft,restoreDraft:i,status:`admitting`};t(Se,e=>e.map(e=>e.requestId===r.requestId?a:e)),t(Te,a.requestId),t(k,void 0),t(Ue,{admission:a,consumeDraft:i})}),Ze=$(null,(e,t,n)=>{let r=e(Se),i=r.filter(e=>e.requestId!==n||e.status!==`failed`);i.length!==r.length&&(t(Se,i),e(Te)===n&&t(Te,i.at(-1)?.requestId))}),Qe,$e=$(null,e=>{if(Qe!==void 0)return Qe;let t=e(g)?.activity.queue;if(t?.state!==`running`)return Promise.resolve();let n=e(Me).mutateAsync(t.commandId).then(()=>void 0).finally(()=>{Qe===n&&(Qe=void 0)});return Qe=n,n}),et;return{cancelQueuedAtom:A,reconcileQueuedCancellationAtom:ue,abortAtom:Me,draftImagesAtom:E,recallStateAtom:ye,recallAtom:we,commandIdAtom:Be,contextAtom:ze,admissionErrorAtom:k,admissionsAtom:O,cancelAtom:$e,checkpointDraftAtom:Ee,draftAtom:_e,dismissFailedAtom:Ze,extensionsAtom:de,failureAtom:Ie,jumpToLatestAtom:ee,loadOlderHistoryAtom:w,loadNewerHistoryAtom:te,lastReplyAtAtom:_,observationAtom:Le,observedCommandIdsAtom:De,rawAdmissionsAtom:Se,maintainRecoveryAtom:Ke,mountRecoveryAtom:qe,pinVisibleHistoryAtom:ne,queryAtom:h,reconcileAdmissionsAtom:Oe,reconnectAtom:$(null,n=>{let r=n(Le);if(r.status!==`unavailable`)return Promise.resolve({kind:`nothing_to_reconnect`,state:r.status===`live`?`connected`:`connecting`});if(et!==void 0)return et;let i=t.getQueryCache().find({queryKey:YJ(e).queryKey});if(i===void 0)return Promise.resolve({kind:`failed`,cause:`Session observation is unavailable`});let a=i.state.dataUpdateCount,o=i.state.errorUpdateCount;return et=new Promise(r=>{let s=()=>void 0,c=!1,l=e=>{c||(c=!0,s(),clearTimeout(d),r(e))},u=()=>{if(i.state.dataUpdateCount>a&&t.getQueryData(YJ(e).queryKey)?.observation===`live`){l({kind:`reconnected`});return}i.state.errorUpdateCount>o&&l({kind:`failed`,cause:MY(i.state.error)})};s=t.getQueryCache().subscribe(e=>{e.query===i&&u()});let d=setTimeout(()=>{i.cancel({revert:!0}).then(()=>{let e=`Session history did not reopen within 10 seconds`;i.setState({status:`error`,error:Error(e)}),l({kind:`failed`,cause:e})})},1e4);n(h).refetch({cancelRefetch:!0}).catch(e=>{l({kind:`failed`,cause:MY(e)})}),u()}).finally(()=>{et=void 0}),et}),retryAtom:Xe,setDraftAtom:ke,setImagesAtom:Ae,sendAtom:Je,snapshotAtom:g,statusAtom:Re,viewStateAtom:He,submitCommandAtom:Ye,timelineAtom:Fe}}var RY=(0,M.createContext)(null);function zY(){let e=(0,M.useContext)(RY);if(e===null)throw Error(`Parakeet hooks require a ParakeetProvider`);return e}function BY(e){let{keySettings:t}=zY();(0,M.useEffect)(()=>{if(e!==void 0)return t.current=e,()=>{t.current===e&&(t.current=void 0)}},[t,e])}function VY(e){let{store:t}=zY(),n=(0,M.useCallback)(n=>t.sub(e,n),[e,t]),r=(0,M.useCallback)(()=>t.get(e),[e,t]);return(0,M.useSyncExternalStore)(n,r,r)}function HY(e){let{store:t}=zY();return(0,M.useCallback)((...n)=>t.set(e,...n),[e,t])}function UY({children:e,session:t,clients:n=CY,interactionStore:r,authorOf:i=PM,onToast:a,draftStorage:o,draftIdentity:s}){let c=c_(),l=(0,M.useMemo)(()=>IY(o),[o]),u=s===void 0?t.address:JSON.stringify([s.agentId,s.sessionId]),d=(0,M.useMemo)(()=>new Set(n.filter(e=>e.promptPresentation===`footer`).map(e=>e.id)),[n]),f=(0,M.useMemo)(()=>{let e=r??eG(),n=$(wY),a={current:void 0},o=e=>e.kind!==`user_message`||e.origin===void 0||!d.has(e.origin.extensionId);return{atoms:LY(t,c,i,e,l,u,n,o,()=>a.current),session:t,store:FG(),contributions:n,interactions:e,shown:o,keySettings:a}},[c,t,r,i,d,l,u]);return(0,M.useEffect)(()=>{let e=()=>{f.store.set(f.atoms.maintainRecoveryAtom)},t=f.store.sub(f.atoms.observationAtom,e),n=f.store.sub(f.atoms.rawAdmissionsAtom,e),r=f.store.set(f.atoms.mountRecoveryAtom);return()=>{r(),t(),n()}},[f]),(0,M.useEffect)(()=>{if(a!==void 0)return f.interactions.subscribeToasts(a)},[f,a]),(0,M.useEffect)(()=>{l.status===`unavailable`&&vq(`acquire draft storage`,l.cause)},[l]),(0,M.useEffect)(()=>{let e=()=>{f.store.set(f.atoms.reconcileQueuedCancellationAtom)},t=f.store.sub(f.atoms.snapshotAtom,e);return e(),t},[f]),(0,M.useEffect)(()=>{let e=()=>{f.store.set(f.atoms.reconcileAdmissionsAtom)},t=f.store.sub(f.atoms.observedCommandIdsAtom,e);return e(),()=>{t()}},[f]),(0,M.useEffect)(()=>{let e=QW(n,(e,t)=>{vq(`client contribution ${e}`,t),f.interactions.report({tone:`error`,message:t.message})}),t=e.subscribe(()=>{f.store.set(f.contributions,e.snapshot())}),r=()=>{e.update(f.store.get(f.atoms.extensionsAtom))},i=f.store.sub(f.atoms.extensionsAtom,r);return r(),()=>{i(),e.dispose(),t()}},[n,f]),(0,q.jsx)(RY.Provider,{value:f,children:e})}function WY(){let{atoms:e}=zY(),t=VY(e.timelineAtom),n=HY(e.loadOlderHistoryAtom),r=HY(e.loadNewerHistoryAtom),i=HY(e.jumpToLatestAtom),a=HY(e.pinVisibleHistoryAtom),o=HY(e.cancelQueuedAtom),{shown:s}=zY(),c=(0,M.useMemo)(()=>t.settled.filter(s),[t.settled,s]),l=(0,M.useMemo)(()=>t.tail.filter(s),[t.tail,s]),u=(0,M.useMemo)(()=>({...t,settled:c,tail:l}),[t,c,l]),d=u.settled.length+u.tail.length===0&&t.settled.length+t.tail.length>0&&t.hasMoreHistory&&!t.loadingOlderHistory,f=`${t.settled[0]?.id??``}:${String(t.settled.length)}`,p=(0,M.useRef)(void 0);return(0,M.useEffect)(()=>{!d||p.current===f||(p.current=f,n())},[d,f,n]),(0,M.useMemo)(()=>({...u,cancelQueued:o,jumpToLatest:i,loadNewerHistory:r,loadOlderHistory:n,pinVisibleHistory:a}),[u,o,i,r,n,a])}function GY(){let{atoms:e}=zY(),t=VY(e.draftAtom),n=VY(e.draftImagesAtom),r=VY(e.recallStateAtom),i=HY(e.recallAtom),a=VY(e.failureAtom),o=VY(e.admissionErrorAtom),s=HY(e.setDraftAtom),c=HY(e.setImagesAtom),l=HY(e.checkpointDraftAtom),u=HY(e.sendAtom),d=HY(e.submitCommandAtom),f=HY(e.retryAtom),p=(0,M.useCallback)(()=>{f()},[f]),m=HY(e.dismissFailedAtom),h=HY(e.cancelAtom);return(0,M.useMemo)(()=>({admissionError:o,cancel:h,checkpointDraft:l,draft:t,images:n,recall:i,recallState:r,dismissFailed:m,failure:a,retry:p,send:u,setDraft:s,setImages:c,submitCommand:d}),[o,h,l,t,n,i,r,m,a,p,u,s,c,d])}function KY(){let{atoms:e}=zY();return HY(e.dismissFailedAtom)}function qY(){return zY().session}function JY(){return VY(zY().atoms.extensionsAtom)}function YY(){let{atoms:e}=zY(),t=VY(e.commandIdAtom),n=VY(e.statusAtom),r=VY(e.viewStateAtom),i=VY(e.observationAtom),a=HY(e.reconnectAtom),o=VY(e.contextAtom);return(0,M.useMemo)(()=>({commandId:t,context:o,observation:i,reconnect:a,status:n,viewState:r}),[t,o,i,a,n,r])}function XY(){return VY(zY().contributions)}function ZY(){return zY().interactions}var QY={neutral:`alert-neutral`,primary:`alert-primary`,secondary:`alert-secondary`,accent:`alert-accent`,success:`alert-success`,info:`alert-info`,warning:`alert-warning`,error:`alert-error`},$Y=(0,M.forwardRef)(function({action:e,children:t,className:n,description:r,title:i,tone:a=`neutral`,...o},s){return(0,q.jsxs)(`div`,{...o,className:Y(`alert caps-alert`,QY[a],n),"data-tone":a,role:o.role??`alert`,ref:s,children:[(0,q.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[i?(0,q.jsx)(`h3`,{className:`font-semibold`,children:i}):null,r?(0,q.jsx)(`p`,{className:`text-sm`,children:r}):null,t]}),e?(0,q.jsx)(`div`,{className:`shrink-0`,children:e}):null]})}),eX={2:`h2`,3:`h3`,4:`h4`};function tX(e,t){let{reduced:n}=t,r=e&&!n,i=mT(t,600),[a,o]=(0,M.useState)(r);return(0,M.useEffect)(()=>{if(o(r),!r)return;let e=globalThis.setTimeout(()=>{o(!1)},i);return()=>{globalThis.clearTimeout(e)}},[r,i]),a}var nX=(0,q.jsx)(UT,{decorative:!0,pace:`idle`,size:`md`,tone:`primary`,variant:`wander`}),rX=(0,M.forwardRef)(function({actions:e,secondaryAction:t,className:n,description:r,headingLevel:i=2,primaryAction:a,suggestions:o,thinking:s=!1,title:c,visual:l,renderVisual:u,variant:d=`plain`,...f},p){let m=(0,M.useId)(),h=(0,M.useRef)(null),g=pT(h),_=tX(d===`speech`,g)&&!s,v=eX[i],y=l??(d===`panel`?`blobs`:void 0),b=u?u({speaking:_,thinking:s}):y===`blobs`?nX:y,x=`${m}-reason`,S=(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(v,{ref:h,className:`empty-state-title`,id:f[`aria-labelledby`]?void 0:m,children:c}),(0,q.jsx)(`p`,{children:r}),a?(0,q.jsxs)(`div`,{className:`empty-state-primary`,children:[(0,q.jsxs)(`div`,{className:`empty-state-action-row`,children:[(0,q.jsx)(KT,{"aria-describedby":a.disabled&&a.disabledReason?x:void 0,disabled:a.disabled,loading:a.pending===!0,onClick:a.onSelect,variant:`primary`,children:a.label}),t]}),a.disabled&&a.disabledReason?(0,q.jsx)(`span`,{className:`empty-state-reason`,id:x,children:a.disabledReason}):null]}):null,o&&o.length>0?(0,q.jsx)(`ul`,{"aria-label":`Try one of these`,className:`empty-state-suggestions`,children:o.map((e,t)=>(0,q.jsx)(`li`,{children:(0,q.jsx)(KT,{disabled:e.disabled,loading:e.pending===!0,size:`sm`,variant:`outline`,onClick:e.onSelect,children:e.label})},`${String(t)}:${e.label}`))}):null,e?(0,q.jsx)(`div`,{className:`empty-state-actions`,children:e}):null]});return(0,q.jsxs)(`section`,{...f,"aria-labelledby":f[`aria-labelledby`]??m,className:Y(`empty-state`,d!==`plain`&&`empty-state-${d}`,n),ref:p,children:[b?(0,q.jsx)(`div`,{"aria-hidden":`true`,className:`empty-state-visual`,children:b}):null,d===`speech`?(0,q.jsx)(`div`,{className:`empty-state-bubble`,children:S}):S]})});function iX({available:e,cause:t,className:n,fix:r,need:i,secondary:a,variant:o,visual:s,waitingFor:c=`setup`,...l}){let u=r.pending===!0,d=u?`Waiting for ${c}…`:r.label,f=e?(0,q.jsxs)(q.Fragment,{children:[t,` `,(0,q.jsx)(`span`,{className:`caps-setup-notice-available`,children:e})]}):t;return o===`panel`?(0,q.jsx)(rX,{...l,actions:a?(0,q.jsx)(KT,{size:`sm`,variant:`ghost`,onClick:a.onSelect,children:a.label}):void 0,className:Y(`caps-setup-notice`,n),"data-variant":`panel`,description:f,primaryAction:{label:d,onSelect:r.onSelect,pending:u},title:i,variant:`panel`,visual:s??(0,q.jsx)(EM,{className:`caps-setup-notice-dot`,glyph:`dot`,tone:`warning`})}):(0,q.jsx)(`div`,{className:`caps-setup-notice-frame`,children:(0,q.jsx)($Y,{...l,action:(0,q.jsxs)(`span`,{className:`caps-setup-notice-actions`,children:[a?(0,q.jsx)(KT,{size:`sm`,variant:`ghost`,onClick:a.onSelect,children:a.label}):null,(0,q.jsx)(KT,{loading:u,size:`sm`,variant:`outline`,onClick:r.onSelect,children:d})]}),className:Y(`caps-setup-notice`,n),"data-variant":o,description:f,role:`status`,title:(0,q.jsxs)(`span`,{className:`caps-setup-notice-title`,children:[(0,q.jsx)(EM,{glyph:`dot`,tone:`warning`}),i]}),tone:`warning`})})}var aX=M.createContext(void 0);function oX(e){let t=M.useContext(aX);if(!e&&t===void 0)throw Error(eE(27));return t}var sX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=oX(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return NE(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:iD,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),cX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=oX(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=aO({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,OO(dD,e.nativeEvent))}return NE(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),lX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=oX(),c=DO(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),NE(`p`,e,{ref:t,props:[{id:c},o]})}),uX=M.createContext(void 0);function dX(){let e=M.useContext(uX);if(e===void 0)throw Error(eE(26));return e}var fX=`--nested-dialogs`,pX=`data-nested-dialog-open`,mX={...rD,...WE,nestedDialogOpen(e){return e?{[pX]:``}:null}},hX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=oX(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);dX(),VO({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?ZA(c.context.popupRef):o,w=g>0,ee=c.useStateSetter(`popupElement`),te=NE(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...XA,hidden:!m,onKeyDown(e){Vj.has(e.key)&&e.stopPropagation()},style:{[fX]:g}},s],ref:[t,c.context.popupRef,ee],stateAttributesMapping:mX});return(0,q.jsx)(UA,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:te})}),gX=M.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=oX(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,q.jsx)(uX.Provider,{value:n,children:(0,q.jsxs)(TA,{ref:t,...r,children:[a&&o===!0&&(0,q.jsx)(Uj,{ref:i.context.internalBackdropRef,inert:Hj(!s)}),e.children]})}):null});function _X({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=M.useState(0),[d,f]=M.useState(0),p=l===0,m=qA(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=ek(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||QO(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return eM(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{!e.select(`open`)&&!e.select(`mounted`)||(u(t),f(n))}),$D(()=>{!r&&!i&&(u(0),f(0))},[r,i]),$D(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),cj(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var vX={...zj,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},yX=class extends Aj{constructor(e,t,n){let r=new uj,i=bX(e,r,t,n);super(i,xX(r),vX)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(nj(this.state,e,t.trigger)))}};function bX(e,t,n,r=!1){return{...Nj(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function xX(e){return{popupRef:M.createRef(),backdropRef:M.createRef(),internalBackdropRef:M.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function SX(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=oX(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=QA((e,t)=>new yX({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);lj(b,x),oj(b);let{forceUnmount:w}=sj(x,b);M.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,OO(bD))}),[w,b]);let ee=x||S||u!=null;return(0,q.jsxs)(aX.Provider,{value:b,children:[u&&(0,q.jsx)($A,{handle:u,store:b}),ee&&(0,q.jsx)(_X,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var CX=xj(function(e){return SX(`dialog`,e)}),wX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=oX(),c=DO(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),NE(`h2`,e,{ref:t,props:[{id:c},o]})}),TX=Sj(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=oX(!0),f=Bj(l)??d;if(!f)throw Error(eE(79));let p=DO(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=M.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=aj(p,_,f,{payload:c}),{getButtonProps:b,buttonRef:x}=aO({disabled:a,native:o}),S=WA(m),C=rM(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),w={disabled:a,open:h},ee=f.useState(`triggerProps`,y);return NE(`button`,e,{state:w,ref:[x,t,v,_],props:[S.reference,ee,C,{[_A]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,b],stateAttributesMapping:tD})}),EX=(0,M.createContext)(null);function DX({children:e,interactionOwner:t=`local`,modal:n=!0,onOpenChange:r,...i}){return(0,q.jsx)(EX.Provider,{value:{interactionOwner:t,modal:n},children:(0,q.jsx)(CX,{...i,modal:n,onOpenChange:(e,n)=>{if(t===`host`&&!e&&n.reason===`escape-key`){n.cancel(),n.allowPropagation();return}r?.(e,n)},children:e})})}function OX(){let e=(0,M.useContext)(EX);if(!e)throw Error(`Dialog parts must be used inside <Dialog>`);return e}var kX=(0,M.forwardRef)(function({className:e,type:t=`button`,...n},r){return(0,q.jsx)(TX,{...n,className:t=>Y(`btn`,sT(e,t)),ref:r,type:t})}),AX=(0,M.forwardRef)(function({container:e,...t},n){let r=fM(`dialog`);return e==null&&r===null?null:(0,q.jsx)(gX,{...t,container:e??r,ref:n})}),jX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(sX,{...t,ref:n,className:t=>Y(`caps-dialog-backdrop fixed inset-0 bg-black/40`,sT(e,t))})}),MX=(0,M.forwardRef)(function({className:e,finalFocus:t,size:n=`default`,...r},i){let a=OX();return(0,q.jsx)(hX,{...r,"data-size":n,className:t=>Y(`caps-dialog-popup overflow-y-auto overscroll-contain rounded-box bg-base-100 p-lg text-base-content shadow-xl`,n===`fill`?`fixed inset-0 h-full w-full max-w-none`:`caps-dialog-popup-default`,sT(e,t)),finalFocus:a.interactionOwner===`host`?!1:t??!0,ref:i})}),NX=(0,M.forwardRef)(function({container:e,keepMounted:t=!0,forceBackdrop:n=!1,className:r,size:i=`default`,...a},o){let{modal:s}=OX();return(0,q.jsxs)(AX,{container:e,keepMounted:t,children:[s===!0?(0,q.jsx)(jX,{forceRender:n}):null,(0,q.jsx)(MX,{...a,size:i,className:e=>Y(i==="default"&&`fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2`,sT(r,e)),ref:o})]})});function PX({className:e,...t}){return(0,q.jsx)(`div`,{...t,className:Y(`flex justify-end gap-sm`,e)})}function FX({className:e,...t}){return(0,q.jsx)(`div`,{...t,className:Y(`flex flex-col gap-sm`,e)})}var IX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(wX,{...t,className:t=>Y(`text-lg font-semibold`,sT(e,t)),ref:n})}),LX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(lX,{...t,className:t=>Y(`text-sm text-base-content`,sT(e,t)),ref:n})}),RX=(0,M.forwardRef)(function({className:e,type:t=`button`,...n},r){return(0,q.jsx)(cX,{...n,className:t=>Y(`btn btn-ghost`,sT(e,t)),ref:r,type:t})}),zX=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),BX=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),VX={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},HX=(0,M.forwardRef)(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>(0,M.createElement)(`svg`,{ref:c,...VX,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:BX(`lucide`,i),...s},[...o.map(([e,t])=>(0,M.createElement)(e,t)),...Array.isArray(a)?a:[a]])),UX=(e,t)=>{let n=(0,M.forwardRef)(({className:n,...r},i)=>(0,M.createElement)(HX,{ref:i,iconNode:t,className:BX(`lucide-${zX(e)}`,n),...r}));return n.displayName=`${e}`,n},WX=UX(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),GX=UX(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),KX=UX(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),qX=UX(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),JX=UX(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function YX(e,t,n){let r=Array(e);return new Proxy(r,{get(r,i,a){if(typeof i==`string`){let a=i.charCodeAt(0);if(a>=48&&a<=57){let a=+i;if(Number.isInteger(a)&&a>=0&&a<e){let e=r[a];if(!e){let i=t[a*2];e=r[a]={index:a,key:n(a),start:i,size:t[a*2+1],end:i+t[a*2+1],lane:0}}return e}}if(i===`length`)return e}return Reflect.get(r,i,a)}})}function XX(e,t,n){let r=n.initialDeps??[],i,a=!0;function o(){let o=e();return o.length!==r.length||o.some((e,t)=>r[t]!==e)?(r=o,i=t(...o),n?.onChange&&!(a&&n.skipInitialOnChange)&&n.onChange(i),a=!1,i):i}return o.updateDeps=e=>{r=e},o}function ZX(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var QX=(e,t)=>Math.abs(e-t)<1.01,$X=(e,t,n)=>{let r;return Object.assign(function(...i){e.clearTimeout(r),r=e.setTimeout(()=>t.apply(this,i),n)},{cancel:()=>{e.clearTimeout(r)}})},eZ,tZ=()=>{if(eZ!==void 0)return eZ;if(typeof navigator>`u`)return eZ=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return eZ=!0;let e=navigator.maxTouchPoints;return eZ=navigator.platform===`MacIntel`&&e!==void 0&&e>0},nZ=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},rZ=e=>e,iZ=e=>{let t=Math.max(e.startIndex-e.overscan,0),n=Math.min(e.endIndex+e.overscan,e.count-1)-t+1,r=Array(n);for(let e=0;e<n;e++)r[e]=t+e;return r},aZ=(e,t)=>{let n=e.scrollElement;if(!n)return;let r=e.targetWindow;if(!r)return;let i=e=>{let{width:n,height:r}=e;t({width:Math.round(n),height:Math.round(r)})};if(i(nZ(n)),!r.ResizeObserver)return()=>{};let a=new r.ResizeObserver(t=>{let r=()=>{let e=t[0];if(e?.borderBoxSize){let t=e.borderBoxSize[0];if(t){i({width:t.inlineSize,height:t.blockSize});return}}i(nZ(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},oZ={passive:!0},sZ=typeof window>`u`||`onscrollend`in window,cZ=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&sZ,o=0,s=a?null:$X(i,()=>t(o,!1),e.options.isScrollingResetDelay),c=e=>()=>{o=n(r),s?.(),t(o,e)},l=c(!0),u=c(!1);return r.addEventListener(`scroll`,l,oZ),a&&r.addEventListener(`scrollend`,u,oZ),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},lZ=(e,t)=>cZ(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),uZ=(e,t,n)=>{if(n.options.useCachedMeasurements){let t=n.indexFromElement(e),r=n.options.getItemKey(t);return n.itemSizeCache.get(r)??n.options.estimateSize(t)}if(t?.borderBoxSize){let e=t.borderBoxSize[0];if(e)return Math.round(e[n.options.horizontal?`inlineSize`:`blockSize`])}if(!t){let t=n.indexFromElement(e),r=n.options.getItemKey(t),i=n.itemSizeCache.get(r);if(i!==void 0)return i}return e[n.options.horizontal?`offsetWidth`:`offsetHeight`]},dZ=(e,{adjustments:t=0,behavior:n},r)=>{var i,a;(a=(i=r.scrollElement)?.scrollTo)==null||a.call(i,{[r.options.horizontal?`left`:`top`]:e+t,behavior:n})},fZ=class{constructor(e){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var e;return((e=this.targetWindow?.performance)?.now)?.call(e)??Date.now()},this.observer=(()=>{let e=null,t=()=>e||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:e=new this.targetWindow.ResizeObserver(e=>{e.forEach(e=>{let t=()=>{let t=e.target,n=this.indexFromElement(t);if(!t.isConnected){this.observer.unobserve(t);for(let[e,n]of this.elementsCache)if(n===t){this.elementsCache.delete(e);break}return}this.isIndexInRange(n)&&this.shouldMeasureDuringScroll(n)&&this.resizeItem(n,this.options.measureElement(t,e,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(t):t()})}));return{disconnect:()=>{var n;(n=t())==null||n.disconnect(),e=null},observe:e=>t()?.observe(e,{box:`border-box`}),unobserve:e=>t()?.unobserve(e)}})(),this.range=null,this.setOptions=e=>{let t={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:rZ,rangeExtractor:iZ,onChange:()=>{},measureElement:uZ,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:`data-index`,initialMeasurementsCache:[],lanes:1,anchorTo:`start`,followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:`estimate`,useCachedMeasurements:!1};for(let n in e){let r=e[n];r!==void 0&&(t[n]=r)}let n=this.options,r=null,i=null,a=!1;if(n!==void 0&&n.enabled&&t.enabled&&t.anchorTo===`end`&&this.scrollElement!==null){let e=n.count,o=t.count,s=this.getMeasurements(),c=e>0?s[0]?.key??n.getItemKey(0):null,l=e>0?s[e-1]?.key??n.getItemKey(e-1):null;if(o!==e||e>0&&o>0&&(t.getItemKey(0)!==c||t.getItemKey(o-1)!==l)){a=!0;let c=e>0?this.getVirtualItemForOffset(this.getScrollOffset())??s[0]:null;c&&(r=[c.key,this.getScrollOffset()-c.start]);let u=t.followOnAppend===!0?`auto`:t.followOnAppend||null;u&&o>e&&this.isAtEnd(n.scrollEndThreshold)&&(e===0||t.getItemKey(o-1)!==l)&&(i=u)}}this.options=t,a&&(this.pendingMin=0,this.itemSizeCacheVersion++);let o=!1,s=0;if(r&&this.scrollOffset!==null){let[e,t]=r,n=this.getMeasurements(),{count:i,getItemKey:a}=this.options,c=0;for(;c<i&&a(c)!==e;)c++;if(c<i){let e=n[c];if(e){let n=Math.max(0,e.start+t);n!==this.scrollOffset&&(s=n-this.scrollOffset,this.scrollOffset=n,o=!0)}}}(o||i)&&(this.pendingScrollAnchor=[o?r[0]:null,o?r[1]:0,i,s])},this.notify=e=>{var t,n;(n=(t=this.options).onChange)==null||n.call(t,this,e)},this.maybeNotify=XX(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),e=>{this.notify(e)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(e=>e()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this.isScrolling=!1,this.scrollDirection=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{let e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.targetWindow=this.scrollElement&&`ownerDocument`in this.scrollElement?this.scrollElement.ownerDocument.defaultView:this.scrollElement?.window??null,this.elementsCache.forEach(e=>{this.observer.observe(e)}),this.unsubs.push(this.options.observeElementRect(this,e=>{this.scrollRect=e,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(e,t)=>{if(t&&this._intendedScrollOffset===null&&e===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(e-this._intendedScrollOffset)<1.5&&(e=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;let n=this.getScrollOffset();this.scrollDirection=t?n===e?this.scrollDirection:n<e?`forward`:`backward`:null,this.scrollOffset=e,this.isScrolling=t,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),`addEventListener`in this.scrollElement){let e=this.scrollElement,t=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},n=()=>{this._iosTouching=!1,!(!tZ()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,oZ),e.addEventListener(`touchend`,n,oZ),this.unsubs.push(()=>{e.removeEventListener(`touchstart`,t),e.removeEventListener(`touchend`,n),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}let t=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,t&&this.scrollElement&&this.options.enabled){let[e,n,r,i]=t;e!==null&&!r&&(tZ()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?i!==0&&(this._iosDeferredAdjustment+=i):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),r&&this.scrollToEnd({behavior:r})}},this._flushIosDeferredIfReady=()=>{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;let e=this.getScrollOffset(),t=this.getMaxScrollOffset();if(e<0||e>t)return;if(this._iosDeferredAdjustment<0&&e>=t-1){this._iosDeferredAdjustment=0;return}let n=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(e,{adjustments:this.scrollAdjustments+=n,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?`width`:`height`]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset==`function`?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=XX(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(e,t,n,r,i,a,o,s)=>(this.prevLanes!==void 0&&this.prevLanes!==a&&(this.lanesChangedFlag=!0),this.prevLanes=a,this.pendingMin=null,{count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s}),{key:!1}),this.isIndexInRange=e=>e>=0&&e<this.options.count,this.getMeasurements=XX(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:e,paddingStart:t,scrollMargin:n,getItemKey:r,enabled:i,lanes:a,laneAssignmentMode:o,gap:s},c)=>{let l=this.itemSizeCache;if(!i)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>e)for(let t of this.laneAssignments.keys())t>=e&&this.laneAssignments.delete(t);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(e=>{this.itemSizeCache.set(e.key,e.size)}));let u=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===e&&(this.lanesSettling=!1),a===1){let i=e*2,a=this._flatMeasurements;if(!a||a.length<i){let e=new Float64Array(i);a&&u>0&&e.set(a.subarray(0,u*2)),a=e,this._flatMeasurements=a}let o;if(u===0)o=t+n;else{let e=u-1;o=a[e*2]+a[e*2+1]+s}for(let t=u;t<e;t++){let e=r(t),n=l.get(e),i=typeof n==`number`?n:this.options.estimateSize(t);a[t*2]=o,a[t*2+1]=i,o+=i+s}let c=YX(e,a,r);return this.measurementsCache=c,c}let d=this.measurementsCache.slice(0,u),f=Array(a).fill(void 0),p=new Float64Array(a),m=0;for(let e=0;e<u;e++){let t=d[e];t&&(f[t.lane]===void 0&&m++,f[t.lane]=e,p[t.lane]=t.end)}for(let i=u;i<e;i++){let e=r(i),c=this.laneAssignments.get(i),u,h,g=o===`estimate`||l.has(e);if(c!==void 0&&this.options.lanes>1){u=c;let e=f[u],r=e===void 0?void 0:d[e];h=r?r.end+s:t+n}else if(m===a){let e=0,t=p[0],n=f[0];for(let r=1;r<a;r++){let i=p[r];(i<t||i===t&&f[r]<n)&&(e=r,t=i,n=f[r])}u=e,h=t+s,g&&this.laneAssignments.set(i,u)}else u=i%this.options.lanes,h=t+n,g&&this.laneAssignments.set(i,u);let _=l.get(e),v=typeof _==`number`?_:this.options.estimateSize(i),y=h+v;d[i]={index:i,start:h,size:v,end:y,key:e,lane:u},f[u]===void 0&&m++,f[u]=i,p[u]=y}return this.measurementsCache=d,d},{key:!1,debug:()=>this.options.debug}),this.calculateRange=XX(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=hZ(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=XX(()=>{let e=null,t=null,n=this.calculateRange();return n&&(e=n.startIndex,t=n.endIndex),this.maybeNotify.updateDeps([this.isScrolling,e,t]),[this.options.rangeExtractor,this.options.overscan,this.options.count,e,t]},(e,t,n,r,i)=>r===null||i===null?[]:e({startIndex:r,endIndex:i,overscan:t,count:n}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=e=>{let t=this.options.indexAttribute,n=e.getAttribute(t);return n?parseInt(n,10):(console.warn(`Missing attribute name '${t}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=e=>{if(!this.scrollState||this.scrollState.behavior!==`smooth`)return!0;let t=this.scrollState.index??this.getVirtualItemForOffset(this.scrollState.lastTargetOffset)?.index;if(t!==void 0&&this.range){let n=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),r=Math.max(0,t-n),i=Math.min(this.options.count-1,t+n);return e>=r&&e<=i}return!0},this.measureElement=e=>{if(!e){this.elementsCache.forEach((e,t)=>{e.isConnected||(this.observer.unobserve(e),this.elementsCache.delete(t))});return}let t=this.indexFromElement(e);if(!this.isIndexInRange(t))return;let n=this.options.getItemKey(t),r=this.elementsCache.get(n);r!==e&&(r&&this.observer.unobserve(r),this.observer.observe(e),this.elementsCache.set(n,e)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(t)&&this.resizeItem(t,this.options.measureElement(e,void 0,this))},this.resizeItem=(e,t)=>{if(!this.isIndexInRange(e))return;let n,r,i,a=this._flatMeasurements;if(this.options.lanes===1&&a!==null)i=this.options.getItemKey(e),r=a[e*2],n=a[e*2+1];else{let t=this.measurementsCache[e];if(!t)return;i=t.key,r=t.start,n=t.size}let o=this.itemSizeCache.get(i)??n,s=t-o;if(s!==0){let a=this.options.anchorTo===`end`&&this.scrollState?.behavior!==`smooth`&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,c=a?this.getTotalSize():0,l=this.getScrollOffset()+this.scrollAdjustments,u=this.itemSizeCache.has(i)?r+o<=l&&this.scrollDirection!==`backward`:r<l,d=this.scrollState?.behavior!==`smooth`&&(this.shouldAdjustScrollPositionOnItemSizeChange===void 0?u:this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[e]??{index:e,key:i,start:r,size:n,end:r+n,lane:0},s,this));(this.pendingMin===null||e<this.pendingMin)&&(this.pendingMin=e),this.itemSizeCache.set(i,t),this.itemSizeCacheVersion++;let f=!1;a?f=this.applyScrollAdjustment(this.getTotalSize()-c):d&&(f=this.applyScrollAdjustment(s)),this.notify(f)}},this.getVirtualItems=XX(()=>[this.getVirtualIndexes(),this.getMeasurements()],(e,t)=>{let n=[];for(let r=0,i=e.length;r<i;r++){let i=t[e[r]];n.push(i)}return n},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=e=>{let t=this.getMeasurements();if(t.length===0)return;let n=this._flatMeasurements,r=this.options.lanes===1&&n!=null;return ZX(t[pZ(0,t.length-1,r?e=>n[e*2]:e=>ZX(t[e]).start,e)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if(`scrollHeight`in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{let e=this.scrollElement.document.documentElement;return this.options.horizontal?e.scrollWidth-this.scrollElement.innerWidth:e.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(e=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=e,this.getOffsetForAlignment=(e,t,n=0)=>{if(!this.scrollElement)return 0;let r=this.getSize(),i=this.getScrollOffset();t===`auto`&&(t=e>=i+r?`end`:`start`),t===`center`?e+=(n-r)/2:t===`end`&&(e-=r);let a=this.getMaxScrollOffset();return Math.max(Math.min(a,e),0)},this.getOffsetForIndex=(e,t=`auto`)=>{e=Math.max(0,Math.min(e,this.options.count-1));let n=this.getSize(),r=this.getScrollOffset(),i=this.measurementsCache[e];if(!i)return;if(t===`auto`){if(i.end>=r+n-this.options.scrollPaddingEnd)t=`end`;else if(i.start<=r+this.options.scrollPaddingStart)t=`start`;else return[r,t]}if(t===`end`&&e===this.options.count-1)return[this.getMaxScrollOffset(),t];let a=t===`end`?i.end+this.options.scrollPaddingEnd:i.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(a,t,i.size),t]},this.scrollToOffset=(e,{align:t=`start`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0;let r=this.getOffsetForAlignment(e,t),i=this.now();this.scrollState={index:null,align:t,behavior:n,startedAt:i,lastTargetOffset:r,stableFrames:0},this._scrollToOffset(r,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollToIndex=(e,{align:t=`auto`,behavior:n=`auto`}={})=>{this._iosDeferredAdjustment=0,e=Math.max(0,Math.min(e,this.options.count-1));let r=this.getOffsetForIndex(e,t);if(!r)return;let[i,a]=r,o=this.now();this.scrollState={index:e,align:a,behavior:n,startedAt:o,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:n}),this.scheduleScrollReconcile()},this.scrollBy=(e,{behavior:t=`auto`}={})=>{let n=this.getScrollOffset()+e,r=this.now();this.scrollState={index:null,align:`start`,behavior:t,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:t}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:e=`auto`}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:`end`,behavior:e});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:e})},this.getTotalSize=()=>{let e=this.getMeasurements(),t;if(e.length===0)t=this.options.paddingStart;else if(this.options.lanes===1){let n=e.length-1,r=this._flatMeasurements;t=r==null?e[n]?.end??0:r[n*2]+r[n*2+1]}else{let n=Array(this.options.lanes).fill(null),r=e.length-1;for(;r>=0&&n.some(e=>e===null);){let t=e[r];n[t.lane]===null&&(n[t.lane]=t.end),r--}t=Math.max(...n.filter(e=>e!==null))}return Math.max(t-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{let e=[];if(this.itemSizeCache.size===0)return e;let t=this.getMeasurements();for(let n of t)n&&this.itemSizeCache.has(n.key)&&e.push({index:n.index,key:n.key,start:n.start,size:n.size,end:n.end,lane:n.lane});return e},this._scrollToOffset=(e,{adjustments:t,behavior:n})=>{this._intendedScrollOffset=e+(t??0),this.options.scrollToFn(e,{behavior:n,adjustments:t},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(e)}applyScrollAdjustment(e,t){return e===0?!1:tZ()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=e,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=e,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId??=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()})}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}let e=this.scrollState.index==null?void 0:this.getOffsetForIndex(this.scrollState.index,this.scrollState.align),t=e?e[0]:this.scrollState.lastTargetOffset,n=t!==this.scrollState.lastTargetOffset;if(!n&&QX(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=1){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:`auto`}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,n){let e=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),r=this.scrollState.behavior===`smooth`&&n>e;this.scrollState.lastTargetOffset=t,r||(this.scrollState.behavior=`auto`),this._scrollToOffset(t,{adjustments:void 0,behavior:r?`smooth`:`auto`})}this.scheduleScrollReconcile()}},pZ=(e,t,n,r)=>{for(;e<=t;){let i=(e+t)/2|0,a=n(i);if(a<r)e=i+1;else if(a>r)t=i-1;else return i}return e>0?e-1:0};function mZ(e,t,n){let r=0;for(;r<=t;){let i=(r+t)/2|0,a=e[i*2];if(a<n)r=i+1;else if(a>n)t=i-1;else return i}return r>0?r-1:0}function hZ(e,t,n,r,i){let a=e.length-1;if(e.length<=r)return{startIndex:0,endIndex:a};if(r===1&&i!==null){let e=mZ(i,a,n),r=e,o=n+t;for(;r<a&&i[r*2]+i[r*2+1]<o;)r++;return{startIndex:e,endIndex:r}}let o=pZ(0,a,t=>e[t].start,n),s=o;if(r===1)for(;s<a&&e[s].end<n+t;)s++;else if(r>1){let i=Array(r).fill(0);for(;s<a&&i.some(e=>e<n+t);){let t=e[s];i[t.lane]=t.end,s++}let c=Array(r).fill(n+t);for(;o>=0&&c.some(e=>e>=n);){let t=e[o];c[t.lane]=t.start,o--}o=Math.max(0,o-o%r),s=Math.min(a,s+(r-1-s%r))}return{startIndex:o,endIndex:s}}var gZ=typeof document<`u`?M.useLayoutEffect:M.useEffect;function _Z({useFlushSync:e=!0,directDomUpdates:t=!1,directDomUpdatesMode:n=`transform`,...r}){let i=M.useReducer(e=>e+1,0)[1],a=M.useRef({enabled:t,mode:n,container:null,lastSize:null,lastPositions:new WeakMap,prevRange:null});a.current.enabled=t,a.current.mode=n;let o=e=>{let t=a.current;if(!t.enabled||!t.container)return;let n=e.getTotalSize();if(n!==t.lastSize){t.lastSize=n;let r=e.options.horizontal?`width`:`height`;t.container.style[r]=`${n}px`}},s=e=>{let t=a.current;if(!t.enabled||!t.container)return;o(e);let n=!!e.options.horizontal,r=t.mode===`transform`,i=n?`left`:`top`,s=e.options.scrollMargin,c=e.getVirtualItems();for(let a of c){let o=a.start-s,c=e.elementsCache.get(a.key);c&&t.lastPositions.get(c)!==o&&(t.lastPositions.set(c,o),r?c.style.transform=n?`translate3d(${o}px, 0, 0)`:`translate3d(0, ${o}px, 0)`:c.style[i]=`${o}px`)}},c={...r,onChange:(t,n)=>{var o;let c=a.current,l=!0;if(c.enabled){s(t);let e=t.range,n=c.prevRange;l=!n||n.isScrolling!==t.isScrolling||n.startIndex!==e?.startIndex||n.endIndex!==e?.endIndex,l&&(c.prevRange=e?{startIndex:e.startIndex,endIndex:e.endIndex,isScrolling:t.isScrolling}:null)}l&&(e&&n?(0,sy.flushSync)(i):i()),(o=r.onChange)==null||o.call(r,t,n)}},[l]=M.useState(()=>{let e=new fZ(c);return Object.assign(e,{containerRef:t=>{let n=a.current;if(n.container=t,n.lastSize=null,t&&n.enabled){let r=e.getTotalSize();n.lastSize=r;let i=e.options.horizontal?`width`:`height`;t.style[i]=`${r}px`}}})});return l.setOptions(c),gZ(()=>l._didMount(),[]),gZ(()=>(o(l),l._willUpdate())),gZ(()=>{s(l)}),l}function vZ(e){return _Z({observeElementRect:aZ,observeElementOffset:lZ,scrollToFn:dZ,...e})}var yZ=$S({keyCode:iC(229)});function bZ(e){return e.nativeEvent.isComposing||ie(yZ,e.nativeEvent).success}var xZ=(0,M.forwardRef)(function({className:e,invalid:t,...n},r){return(0,q.jsx)(`textarea`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Y(`textarea textarea-bordered w-full`,t&&`textarea-error`,e),ref:r})}),SZ={unchecked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,checked:`M3.25 5.9 L5.1 7.9 L8.8 3.8`,mixed:`M3.4 6 L6 6 L8.6 6`},CZ={blurStdDeviation:.22,alphaSlope:18,alphaIntercept:-8};function wZ({state:e}){let t=`caps-checkbox-${(0,M.useId)().replaceAll(`:`,``)}`,n=(0,M.useRef)(null),r=(0,M.useRef)(e).current,i=(0,M.useRef)(e),a=CT();return(0,M.useLayoutEffect)(()=>{if(!n.current)return;let t=e!==`unchecked`,r=i.current!==`unchecked`,o=a||i.current===e;i.current=e;let s=uT(n.current),c=gM(s,{ease:`inCubic`,duration:160}),l=nr(n.current,{d:{to:SZ[e],...o?mM:gM(s,{ease:`outCubic`,duration:200})},"stroke-dashoffset":{to:+!t,...o?mM:t?gM(s,{ease:`inOutSine`,duration:260}):c},"stroke-width":o?{to:t?2.4:0,duration:0}:t&&!r?[{to:2.2,...gM(s,{ease:`outCubic`,duration:65})},{to:2.4,delay:mT(s,120),...hM(s,{bounce:.35,duration:220})}]:{to:t?2.4:0,...c}});return()=>{l.cancel()}},[e,a]),(0,q.jsxs)(`svg`,{className:`caps-checkbox-visual`,width:`24`,height:`24`,viewBox:`0 0 12 12`,"aria-hidden":`true`,focusable:`false`,children:[(0,q.jsxs)(`defs`,{children:[(0,q.jsx)(kT,{id:`${t}-surface`,transform:`matrix(1 0 0 1 6 6)`}),(0,q.jsx)(AT,{id:`${t}-shadow`}),(0,q.jsx)(jT,{id:`${t}-inset`}),(0,q.jsx)(NT,{id:`${t}-goo`,values:CZ}),(0,q.jsxs)(`filter`,{id:`${t}-relief`,x:`-25%`,y:`-25%`,width:`150%`,height:`150%`,colorInterpolationFilters:`sRGB`,children:[(0,q.jsx)(`feGaussianBlur`,{in:`SourceAlpha`,stdDeviation:`0.28`,result:`relief`}),(0,q.jsx)(`feSpecularLighting`,{in:`relief`,surfaceScale:`1.2`,specularConstant:`0.55`,specularExponent:`18`,lightingColor:`color-mix(in srgb, var(--color-white) calc(var(--depth) * 100%), var(--color-black))`,result:`light`,children:(0,q.jsx)(`feDistantLight`,{azimuth:`225`,elevation:`55`})}),(0,q.jsx)(`feComposite`,{in:`light`,in2:`SourceAlpha`,operator:`in`,result:`clipped-light`}),(0,q.jsx)(`feBlend`,{in:`SourceGraphic`,in2:`clipped-light`,mode:`screen`})]}),(0,q.jsx)(`mask`,{id:`${t}-contour`,maskUnits:`userSpaceOnUse`,x:`0`,y:`0`,width:`12`,height:`12`,style:{maskType:`alpha`},children:(0,q.jsx)(`path`,{ref:n,d:SZ[r],fill:`none`,stroke:`var(--color-white)`,strokeWidth:r===`unchecked`?0:2.4,pathLength:`1`,strokeDasharray:`1`,strokeDashoffset:+(r===`unchecked`),strokeLinecap:`round`,strokeLinejoin:`round`,filter:e===`mixed`?void 0:`url(#${t}-goo)`})}),(0,q.jsx)(`clipPath`,{id:`${t}-well`,children:(0,q.jsx)(`rect`,{x:`1`,y:`1`,width:`10`,height:`10`,rx:`2.5`})})]}),(0,q.jsx)(`rect`,{className:`caps-checkbox-track`,x:`0.5`,y:`0.5`,width:`11`,height:`11`,rx:`3`,filter:`url(#${t}-inset)`}),(0,q.jsx)(`g`,{clipPath:`url(#${t}-well)`,children:(0,q.jsx)(`g`,{filter:`url(#${t}-shadow)`,children:(0,q.jsx)(`g`,{filter:`url(#${t}-relief)`,children:(0,q.jsx)(`g`,{mask:`url(#${t}-contour)`,children:(0,q.jsx)(`rect`,{x:`0`,y:`0`,width:`12`,height:`12`,fill:`url(#${t}-surface)`})})})})})]})}var TZ=(0,M.forwardRef)(function({className:e,appearance:t,indicator:n,invalid:r,indeterminate:i=!1,checked:a,defaultChecked:o=!1,onChange:s,...c},l){let u=(0,M.useRef)(null),[d,f]=(0,M.useState)(o),p=a??d,m=i?`mixed`:p?`checked`:`unchecked`;return(0,M.useImperativeHandle)(l,()=>{if(!u.current)throw Error(`Checkbox input is not mounted`);return u.current},[]),(0,M.useLayoutEffect)(()=>{u.current&&(u.current.indeterminate=i)},[i]),(0,M.useEffect)(()=>{let e=u.current?.form;if(!e||a!==void 0)return;let t=e=>{queueMicrotask(()=>{!e.defaultPrevented&&u.current&&f(o)})};return e.addEventListener(`reset`,t),()=>{e.removeEventListener(`reset`,t)}},[a,o,c.form]),(0,q.jsxs)(`span`,{className:`caps-checkbox`,"data-appearance":t===`compact`?t:void 0,"data-state":m,"data-custom-indicator":n!==void 0||void 0,children:[(0,q.jsx)(`input`,{...c,checked:p,"aria-checked":i?`mixed`:p,"aria-invalid":r?!0:c[`aria-invalid`]===!1?void 0:c[`aria-invalid`],className:Y(`caps-checkbox-input`,e),onChange:e=>{a===void 0&&f(e.target.checked),s?.(e),e.currentTarget.indeterminate=i},ref:u,type:`checkbox`}),n===void 0?(0,q.jsx)(wZ,{state:m}):n]})}),EZ=(0,M.forwardRef)(function({className:e,invalid:t,...n},r){return(0,q.jsx)(`input`,{...n,"aria-invalid":t?!0:n[`aria-invalid`]===!1?void 0:n[`aria-invalid`],className:Y(`input caps-input w-full`,e),ref:r})});(0,M.forwardRef)(function({leading:e,className:t,...n},r){return(0,q.jsxs)(`span`,{className:`caps-search-input`,"data-leading":e?`true`:void 0,children:[e?(0,q.jsx)(`span`,{className:`caps-search-leading`,"aria-hidden":`true`,children:e}):null,(0,q.jsx)(EZ,{...n,type:`search`,className:t,ref:r})]})});function DZ({getKey:e,isDisabled:t=()=>!1,items:n,getFallbackKey:r}){let i=(0,M.useMemo)(()=>{let r=n.map(e);if(r.some(e=>!e))throw Error(`Selectable items require non-empty keys`);if(new Set(r).size!==r.length)throw Error(`Selectable items require unique keys`);return n.filter(e=>!t(e))},[e,t,n]),[a,o]=(0,M.useState)(null),s=r?.(i)??null,c=a!==null&&i.some(t=>e(t)===a)?a:s!==null&&i.some(t=>e(t)===s)?s:null;(0,M.useEffect)(()=>{a!==null&&!i.some(t=>e(t)===a)&&o(null)},[a,i,e]);let l=i.find(t=>e(t)===c),u=l?i.findIndex(t=>e(t)===c):-1;return{activeIndex:u,activeItem:l,activeKey:c,enabledItems:i,move:(t,n)=>{if(i.length===0)return;let r=n?n===`start`?0:i.length-1:u<0?t>0?0:i.length-1:(u+t+i.length)%i.length,a=i[r];a&&o(e(a))},setActiveKey:o}}var OZ=(0,M.forwardRef)(function({className:e,density:t=`regular`,...n},r){return(0,q.jsx)(`ul`,{...n,className:Y(`list`,t===`compact`&&`list-sm`,e),ref:r})}),kZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`li`,{...t,className:Y(`list-row`,e),ref:n})});(0,M.forwardRef)(function({className:e,icon:t,label:n,children:r,...i},a){return(0,q.jsxs)(`li`,{...i,className:Y(`list-row caps-fact`,e),ref:a,children:[(0,q.jsxs)(`span`,{className:`caps-fact-label`,children:[t?(0,q.jsx)(`span`,{className:`caps-fact-icon`,"aria-hidden":`true`,children:t}):null,n]}),(0,q.jsx)(`span`,{className:`caps-fact-value`,children:r})]})});var AZ=(0,M.forwardRef)(function({aside:e,children:t,className:n,level:r=2,...i},a){return(0,q.jsxs)(r===3?`h3`:`h2`,{...i,className:Y(`caps-data-list-heading`,n),ref:a,children:[(0,q.jsx)(`span`,{children:t}),e===void 0?null:(0,q.jsx)(`span`,{className:`caps-data-list-heading-aside`,children:e})]})}),jZ=(0,M.forwardRef)(function({children:e,className:t,optional:n,required:r,...i},a){return(0,q.jsxs)(`label`,{...i,className:Y(`label caps-label cursor-pointer justify-start gap-sm text-sm font-semibold text-base-content`,t),ref:a,children:[e,r?(0,q.jsx)(`span`,{"aria-hidden":`true`,className:`text-error`,children:`*`}):null,n&&!r?(0,q.jsx)(`span`,{className:`caps-label-optional`,children:`Optional`}):null]})}),MZ=(0,M.forwardRef)(function({children:e,className:t,...n},r){return(0,q.jsx)(`div`,{...n,className:Y(`caps-input-group join flex w-full items-stretch [&>*]:join-item [&>*:first-child]:rounded-e-none [&>*:last-child]:rounded-s-none [&>*:not(:first-child):not(:last-child)]:rounded-none [&>.btn]:shrink-0 [&>.input]:min-w-0 [&>.input]:flex-1 [&>.select]:min-w-0 [&>.select]:flex-1`,t),ref:r,children:M.Children.map(e,e=>(0,M.isValidElement)(e)?(0,M.cloneElement)(e,{className:Y(`join-item caps-input-group-control`,e.props.className)}):e)})}),NZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,className:Y(`join-item flex items-center border border-base-300 bg-base-200 px-md text-sm text-base-content`,e),ref:n})});function PZ(e){let t=e.parentElement;if(!t||e.previousElementSibling===null)return 0;let n=getComputedStyle(t);if(!(n.display.includes(`grid`)||n.display.includes(`flex`)&&n.flexDirection.startsWith(`column`)))return 0;let r=Number.parseFloat(n.rowGap);return Number.isFinite(r)?r:0}(0,M.forwardRef)(function({show:e,appear:t=!1,children:n,className:r,...i},a){let o=(0,M.useRef)(null);(0,M.useImperativeHandle)(a,()=>o.current);let s=CT(),[c,l]=(0,M.useState)(e),u=(0,M.useRef)(!0);return e&&!c&&l(!0),(0,M.useLayoutEffect)(()=>{let n=o.current,r=u.current;if(u.current=!1,!n||r&&!t)return;if(!vT(n)){e||l(!1);return}let i=uT(n),a=`translateY(${String(i.distance)}px)`,c=_T(i,i.ease),d=n.getBoundingClientRect().height,f=PZ(n),p=(e,t)=>{n.style.overflow=`clip`;let r=e=>({height:`${String(e)}px`,marginBlockStart:`${String(e===0?-f:0)}px`}),a=n.animate([r(e),r(t)],{duration:i.normal,easing:c}),o=()=>{n.style.removeProperty(`overflow`)};return a.addEventListener(`finish`,o),a.addEventListener(`cancel`,o),a};if(e){let e=[n.animate([{opacity:0,transform:a},{opacity:1,transform:`none`}],{duration:i.normal,easing:c})];return!s&&d>0&&e.push(p(0,d)),()=>{for(let t of e)t.cancel()}}let m=n.animate([{opacity:1,transform:`none`},{opacity:0,transform:a}],{duration:i.fast,easing:_T(i,i.easeExit),fill:`forwards`}),h=!s&&d>0?p(d,0):m;return h!==m&&h.effect?.updateTiming({fill:`forwards`}),h.addEventListener(`finish`,()=>{l(!1)}),()=>{m.cancel(),h.cancel()}},[e,t,s]),c?(0,q.jsx)(`div`,{...i,ref:o,className:Y(`caps-presence`,r),"data-present":e,"aria-hidden":!e||void 0,children:n}):null});var FZ=(0,M.forwardRef)(function({open:e,children:t,className:n,...r},i){return(0,q.jsx)(`div`,{...r,ref:i,className:Y(`caps-collapse`,n),"data-open":e,"aria-hidden":!e||void 0,children:(0,q.jsx)(`div`,{className:`caps-collapse-clip`,children:t})})});(0,M.forwardRef)(function({swapKey:e,anchor:t=`start`,children:n,className:r,...i},a){let o=(0,M.useRef)(null);(0,M.useImperativeHandle)(a,()=>o.current);let s=CT(),[c,l]=(0,M.useState)({key:e,content:n}),[u,d]=(0,M.useState)([]);c.key===e?c.content!==n&&l({key:e,content:n}):(d([...u.filter(t=>t.key!==e&&t.key!==c.key),c]),l({key:e,content:n}));let f=(0,M.useRef)(null);return(0,M.useLayoutEffect)(()=>{let e=o.current;if(!e||!(`ResizeObserver`in globalThis))return;f.current=e.getBoundingClientRect();let t=new ResizeObserver(()=>{e.getAnimations().length===0&&(f.current=e.getBoundingClientRect())});return t.observe(e),()=>{t.disconnect()}},[]),(0,M.useLayoutEffect)(()=>{let e=o.current;if(!e)return;let t=[...e.querySelectorAll(`:scope > [data-swap-leaving]`)],n=e.querySelector(`:scope > [data-swap-current]`);if(n===null||t.length===0)return;if(!vT(e)){d([]);return}let r=f.current,i=e.getBoundingClientRect(),a=uT(e),c=[n.animate([{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(a.distance/2)}px)`},{opacity:1,filter:`blur(0px)`,transform:`none`}],{duration:a.normal,easing:_T(a,a.ease)})];for(let e of t){let t=e.animate([{opacity:1,filter:`blur(0px)`,transform:`none`},{opacity:0,filter:`blur(${String(a.blur)}px)`,transform:`translateY(${String(-a.distance/2)}px)`}],{duration:a.fast,easing:_T(a,a.easeExit),fill:`forwards`}),n=e.dataset.swapLeaving;t.onfinish=()=>{d(e=>e.filter(e=>e.key!==n))},c.push(t)}let l=r!==null&&(Math.abs(r.height-i.height)>.5||Math.abs(r.width-i.width)>.5);return!s&&l&&c.push(e.animate([{width:`${String(r.width)}px`,height:`${String(r.height)}px`},{width:`${String(i.width)}px`,height:`${String(i.height)}px`}],{duration:a.normal,easing:_T(a,a.ease)})),()=>{for(let e of c)e.cancel()}},[e,s]),(0,q.jsx)(`div`,{...i,ref:o,className:Y(`caps-swap`,r),"data-anchor":t,children:[...u.map(e=>(0,q.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-leaving":e.key,"aria-hidden":`true`,children:e.content},e.key)),(0,q.jsx)(`div`,{className:`caps-swap-layer`,"data-swap-current":``,children:n},e)]})});function IZ({children:e,...t}){let[n,r]=(0,M.useState)(e);return e&&e!==n&&r(e),(0,q.jsx)(FZ,{...t,className:Y(`caps-field-error-reveal`,t.className),open:!!e,children:(0,q.jsx)(`div`,{className:`caps-field-error`,role:`alert`,"aria-hidden":!e,children:n})})}function LZ({children:e,divider:t=!0,error:n,layout:r=`end`,status:i,...a}){return(0,q.jsxs)(`footer`,{...a,className:Y(`caps-form-footer`,a.className),"data-divider":t,"data-layout":r,children:[(0,q.jsx)(IZ,{children:n}),(0,q.jsxs)(`div`,{className:`caps-form-footer-row`,children:[i?(0,q.jsx)(`div`,{className:`caps-form-footer-status`,role:`status`,children:i}):null,(0,q.jsx)(`div`,{className:`caps-form-footer-actions`,children:e})]})]})}var RZ=(0,M.forwardRef)(function({busy:e=!1,children:t,className:n,layout:r,...i},a){return(0,q.jsx)(`form`,{...i,"aria-busy":e||void 0,className:Y(`caps-form`,n),"data-layout":r,ref:a,children:(0,q.jsx)(`fieldset`,{className:`caps-form-body`,disabled:e,children:t})})}),zZ={2:`h2`,3:`h3`,4:`h4`},BZ=(0,M.forwardRef)(function({children:e,className:t,description:n,layout:r,level:i=3,title:a,...o},s){let c=(0,M.useId)(),l=zZ[i];return(0,q.jsxs)(`section`,{...o,"aria-labelledby":`${c}-title`,className:Y(`caps-form-section`,t),"data-layout":r,ref:s,children:[(0,q.jsxs)(`header`,{className:`caps-form-section-copy`,children:[(0,q.jsx)(l,{className:`caps-form-section-title`,id:`${c}-title`,children:a}),n?(0,q.jsx)(`p`,{className:`caps-form-section-description`,children:n}):null]}),(0,q.jsx)(`div`,{className:`caps-form-section-fields`,children:e})]})}),VZ=(0,M.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,layout:a,legend:o,legendTitle:s,...c},l){let u=(0,M.useId)(),d=[n?`${u}-description`:c[`aria-describedby`],r?`${u}-error`:null].filter(Boolean).join(` `)||void 0;return(0,q.jsxs)(`fieldset`,{...c,"aria-describedby":d,"aria-invalid":r?!0:c[`aria-invalid`],className:Y(`caps-fieldset`,t),"data-layout":a,ref:l,children:[(0,q.jsxs)(`legend`,{className:`caps-fieldset-legend`,title:s,children:[i?(0,q.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}):null,o]}),n?(0,q.jsx)(`p`,{className:`caps-fieldset-description`,id:`${u}-description`,children:n}):null,(0,q.jsx)(`div`,{className:`caps-fieldset-fields`,children:e}),r===void 0?null:(0,q.jsx)(IZ,{id:`${u}-error`,children:r})]})});function HZ(e){let t=[];return M.Children.forEach(e.props.children,e=>{(0,M.isValidElement)(e)&&e.type!==NZ&&t.push(e)}),t[0]??null}var UZ=(0,M.forwardRef)(function({children:e,className:t,description:n,error:r,icon:i,label:a,labelTitle:o,optional:s,orientation:c=`vertical`,readout:l=!1,required:u,...d},f){let p=(0,M.useId)(),m=(0,M.isValidElement)(e)?e:null,h=m?.type===MZ,g=h?HZ(m):m,_=g?.props.id??p,v=`${_}-description`,y=`${_}-error`,b=[g?.props[`aria-describedby`],n?v:null,r?y:null].filter(Boolean).join(` `)||void 0,x=u===!0||g?.props.required,S=r?!0:g?.props[`aria-invalid`],C=u===!0||g?.props[`aria-required`],w={id:_};x!==void 0&&(w.required=x),b!==void 0&&(w[`aria-describedby`]=b),S!==void 0&&(w[`aria-invalid`]=S),C!==void 0&&(w[`aria-required`]=C);let ee=m&&g&&!l?h?(0,M.cloneElement)(m,void 0,M.Children.map(m.props.children,e=>e===g?(0,M.cloneElement)(g,w):e)):(0,M.cloneElement)(m,w):e,te=a?(0,q.jsx)(jZ,{htmlFor:l?void 0:_,title:o,className:c===`inline`?`font-normal`:void 0,...u===void 0?{}:{required:u},...s===void 0?{}:{optional:s},children:a}):null,ne=a||n?(0,q.jsxs)(`div`,{className:`caps-field-copy`,children:[te,n?(0,q.jsx)(`p`,{className:`caps-field-description`,id:v,children:n}):null]}):null,re=i?(0,q.jsxs)(`div`,{className:`caps-field-lead`,children:[(0,q.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}),ne]}):ne;return(0,q.jsxs)(`div`,{...d,className:Y(`caps-field`,t),"data-orientation":c,ref:f,children:[c===`horizontal`?(0,q.jsxs)(`div`,{className:`caps-field-row`,children:[re,ee]}):c===`inline`?(0,q.jsxs)(`div`,{className:`caps-field-row`,children:[ee,re]}):(0,q.jsxs)(q.Fragment,{children:[re,ee]}),(0,q.jsx)(IZ,{id:y,children:r})]})});function WZ(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}var GZ=`M 9.86 38.14 A 20 20 0 1 1 38.14 38.14`,KZ=6,qZ=new Map([[`ArrowUp`,1],[`ArrowDown`,-1],[`PageUp`,10],[`PageDown`,-10]]),JZ=(0,M.forwardRef)(function({className:e,decrementLabel:t=`Decrease`,defaultValue:n=null,disabled:r,incrementLabel:i=`Increase`,invalid:a,max:o,min:s,onBlur:c,onKeyDown:l,onValueChange:u,step:d=1,unit:f,value:p,wrap:m=!1,...h},g){let[_,v]=(0,M.useState)(n),[y,b]=(0,M.useState)(null),x=p===void 0?_:p,S=WZ(d),C=e=>{let t=Number(e.toFixed(S));return s!==void 0&&t<s?s:o!==void 0&&t>o?o:t},w=e=>{let t=e===null?null:C(e);v(t),b(null),t!==x&&u?.(t)},ee=()=>{if(y===null)return;let e=Number(y);w(y.trim()===``||!Number.isFinite(e)?null:e)},te=e=>{let t=(x??s??0)+e*d;if(m&&s!==void 0&&o!==void 0){if(t>o){w(s);return}if(t<s){w(o);return}}w(t)},ne=s!==void 0&&x!==null&&x<=s,re=o!==void 0&&x!==null&&x>=o,ie=r===!0,T=(0,M.useRef)(null),ae=s!==void 0&&o!==void 0&&o>s?((x??s)-s)/(o-s):null,oe=e=>{ie||(e.currentTarget.setPointerCapture(e.pointerId),T.current={y:e.clientY,value:x??s??0})},se=e=>{if(!T.current)return;let t=Math.trunc((T.current.y-e.clientY)/KZ),n=C(T.current.value+t*d);n!==x&&w(n)},ce=()=>{T.current=null};return(0,q.jsxs)(`span`,{className:Y(`caps-number-field`,e),"data-at-max":re||void 0,"data-at-min":ne||void 0,"data-disabled":ie||void 0,"data-wrap":m||void 0,children:[ae===null?null:(0,q.jsxs)(`svg`,{className:`caps-number-field-dial`,viewBox:`0 0 48 48`,"aria-hidden":`true`,focusable:`false`,onPointerDown:oe,onPointerMove:se,onPointerUp:ce,onPointerCancel:ce,children:[(0,q.jsx)(`path`,{className:`caps-number-field-dial-track`,d:GZ,pathLength:100}),(0,q.jsx)(`path`,{className:`caps-number-field-dial-level`,d:GZ,pathLength:100,strokeDasharray:`${String(Math.max(.5,ae*100))} 100`})]}),(0,q.jsx)(KT,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-decrement`,"aria-label":t,"aria-controls":h.id,tabIndex:-1,disabled:ie||ne&&!m,onClick:()=>{te(-1)},children:(0,q.jsx)(KX,{"aria-hidden":`true`})}),(0,q.jsxs)(`span`,{className:`caps-number-field-readout`,children:[(0,q.jsx)(`input`,{...h,"aria-invalid":a?!0:h[`aria-invalid`]===!1?void 0:h[`aria-invalid`],className:`input caps-input caps-number-field-input`,disabled:r,inputMode:h.inputMode??(S>0?`decimal`:`numeric`),max:o,min:s,onBlur:e=>{ee(),c?.(e)},onChange:e=>{b(e.target.value)},onKeyDown:e=>{if(l?.(e),e.defaultPrevented)return;let t=qZ.get(e.key);t===void 0?e.key===`Home`&&s!==void 0?(e.preventDefault(),w(s)):e.key===`End`&&o!==void 0?(e.preventDefault(),w(o)):e.key===`Enter`&&ee():(e.preventDefault(),te(t))},ref:g,step:d,type:`number`,value:y??(x===null?``:String(x))}),f?(0,q.jsx)(`span`,{className:`caps-number-field-unit`,"aria-hidden":`true`,children:f}):null]}),(0,q.jsx)(KT,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-increment`,"aria-label":i,"aria-controls":h.id,tabIndex:-1,disabled:ie||re&&!m,onClick:()=>{te(1)},children:(0,q.jsx)(qX,{"aria-hidden":`true`})})]})}),YZ=(0,M.forwardRef)(function({className:e,size:t=`md`,depth:n=`shallow`,placement:r=`standalone`,...i},a){return(0,q.jsx)(`div`,{...i,ref:a,"data-surface-size":t,"data-surface-depth":n,"data-surface-placement":r,className:Y(`caps-surface`,e)})}),XZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,ref:n,className:Y(`caps-screen`,e)})}),ZZ=(0,M.forwardRef)(function({children:e,className:t,depth:n=`deep`,fit:r=`content`,density:i=`normal`,...a},o){let s=r===`fill`;return(0,q.jsx)(YZ,{...a,className:Y(t,s&&`flex min-h-0 flex-1`),depth:n,ref:o,children:(0,q.jsx)(`div`,{className:Y(`caps-display-gasket`,s&&`flex min-h-0 min-w-0 flex-1`),"data-display-density":i,children:(0,q.jsx)(XZ,{className:Y(s&&`flex min-h-0 min-w-0 flex-1 overflow-hidden`),children:e})})})});(0,M.forwardRef)(function({className:e,icon:t,status:n,title:r,...i},a){return(0,q.jsxs)(`header`,{...i,className:Y(`caps-screen-header`,e),ref:a,children:[t?(0,q.jsx)(`span`,{className:`caps-screen-header-icon`,"aria-hidden":`true`,children:t}):null,(0,q.jsx)(`span`,{className:`caps-screen-header-title`,children:r}),n?(0,q.jsx)(`span`,{className:`caps-screen-header-status`,children:n}):null]})}),(0,M.forwardRef)(function({appearance:e,className:t,...n},r){return(0,q.jsx)(`div`,{...n,className:Y(`caps-screen-cells`,t),"data-appearance":e===`compact`?e:void 0,ref:r})}),(0,M.forwardRef)(function({children:e,className:t,legend:n,readout:r,icon:i,appearance:a,wide:o=!1,...s},c){return(0,q.jsxs)(`div`,{...s,className:Y(`caps-screen-cell`,t),"data-wide":o||void 0,"data-appearance":a===`compact`?a:void 0,ref:c,children:[i?(0,q.jsx)(`span`,{className:`caps-screen-cell-icon`,children:i}):null,n?(0,q.jsx)(`span`,{className:`caps-screen-cell-legend`,children:n}):null,r?(0,q.jsx)(`span`,{className:`caps-screen-cell-readout`,children:r}):null,a===`compact`?(0,q.jsx)(`div`,{className:`caps-screen-cell-controls`,children:e}):e]})});var QZ=FC(`card caps-card`,{variants:{variant:{surface:`caps-card-surface`,outline:`caps-card-outline`,interactive:`caps-card-interactive`,game:`caps-card-game caps-card-interactive`,fit:`caps-card-fit`},density:{regular:``,compact:`caps-card-compact`}},defaultVariants:{variant:`surface`,density:`regular`}}),$Z=(0,M.forwardRef)(function({className:e,density:t,featured:n=!1,state:r,variant:i,...a},o){return(0,q.jsx)(`div`,{...a,className:Y(QZ({density:t,variant:i}),n&&`caps-card-featured`,e),"data-state":r,ref:o})});(0,M.forwardRef)(function({className:e,density:t,variant:n,width:r=`default`,...i},a){return(0,q.jsx)(`main`,{className:`caps-centered-card-stage`,children:(0,q.jsx)($Z,{...i,className:Y(`caps-centered-card`,r===`wide`&&`caps-centered-card-wide`,e),ref:a,variant:n??`surface`,...t?{density:t}:{}})})});var eQ=(0,M.forwardRef)(function({alignment:e=`start`,className:t,...n},r){return(0,q.jsx)(`div`,{...n,className:Y(`caps-card-header`,e===`center`&&`caps-card-header-centered`,t),ref:r})}),tQ=(0,M.forwardRef)(function({className:e,level:t=3,...n},r){return(0,q.jsx)(t===2?`h2`:`h3`,{...n,className:Y(`caps-card-title`,e),ref:r})});(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`p`,{...t,className:Y(`caps-card-description`,e),ref:n})});var nQ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,className:Y(`caps-card-content`,e),ref:n})}),rQ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,className:Y(`caps-card-footer`,e),ref:n})}),iQ={coral:`var(--stipe-art-coral, #ff6558)`,blue:`var(--stipe-art-blue, #43a6f2)`,mint:`var(--stipe-art-mint, #63cfaa)`,grape:`var(--stipe-art-grape, #a66cc1)`,yellow:`var(--stipe-art-yellow, #ffd05d)`,cream:`var(--stipe-art-cream, #fff4de)`,ink:`var(--stipe-art-ink, #242c28)`,graphite:`var(--stipe-art-graphite, #49423f)`,inkcap:`var(--stipe-art-inkcap, #80499d)`},aQ=`light-dark(var(--stipe-sketch-ink, #242c28), var(--stipe-art-cream, #fff4de))`,oQ=`var(--color-base-100, light-dark(#fff4de, #242c28))`;function sQ({transform:e,fill:t=aQ}){return(0,q.jsx)(`path`,{transform:e,style:{fill:t},d:`M-1.264-9.479C-2.098-8.643-1.802-1.057-.907-.332.47.782 1.6-.446 1.618-3.075 1.623-3.888 1.691-5.398 1.77-6.429 1.979-9.202 1.596-10 .055-10-.588-10-.843-9.9-1.264-9.479Z`})}function cQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(sQ,{transform:`translate(25.4 19.8) rotate(-39) scale(.95 .76)`}),(0,q.jsx)(sQ,{transform:`translate(32.1 17.8) scale(.96 .95)`}),(0,q.jsx)(sQ,{transform:`translate(38.8 19.9) rotate(39) scale(.95 .77)`})]})}function lQ(){return(0,q.jsxs)(`g`,{style:{fill:iQ.blue},children:[(0,q.jsx)(`path`,{d:`M10.574 .604C9.804 1.375 9.867-.885 9.961 22.81 10.054 47.202 9.722 45.378 14.193 45.94 25.813 47.399 38.465 52.211 44.662 57.532 47.653 60.097 48.082 59.411 47.967 52.242L47.734 19.335C47.734 17.523 47.13 16.616 45.964 15.076 40.604 8.018 30.127 2.767 16.804 .462 13.045-.184 11.326-.148 10.574 .604Z`}),(0,q.jsx)(`path`,{d:`M81.571 .746C71.063 2.665 62.221 6.713 56.562 12.199 54.242 14.45 52 17.356 52.115 19.335L52.033 52.628C51.927 59.934 51.979 59.994 55.74 57.091 62.423 51.931 71.272 48.541 84.103 46.221 90.625 45.039 89.967 47.631 90.145 22.432 90.326-3.079 91.148-1 81.571 .746Z`}),(0,q.jsx)(`path`,{d:`M1.906 12.692C.1 13.42 .151 12.804 .151 33.825 .151 54.097 .163 54.302 1.447 55.498 2.71 56.674 3.384 56.81 7.937 56.816 20.943 56.834 30.647 58.293 38.776 61.45 45.964 64.242 46.435 61.924 39.526 57.773 32.296 53.429 26.656 51.544 14.943 49.553 5.958 48.027 6.535 49.414 6.408 29.003 6.32 14.74 6.263 13.103 5.816 12.764 5.254 12.335 2.9 12.293 1.906 12.692Z`}),(0,q.jsx)(`path`,{d:`M94.326 12.858C93.656 13.326 93.656 13.326 93.653 28.492 93.653 48.882 93.997 48.063 84.743 49.556 73.574 51.36 64.45 54.695 57.801 59.405 54.082 62.039 55.384 63.864 59.722 62.1 68.897 58.372 76.363 57.115 90.03 56.994 100.405 56.903 99.489 58.976 99.773 34.976 100.018 14.142 100.006 13.958 98.399 12.979 97.236 12.269 95.251 12.208 94.326 12.858Z`})]})}function uQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:iQ.cream},d:`M-8.572-25.123C-21.412-23.39-33.235-17.39-44.235-7.027-51.235-.433-51.251 .358-44.524 6.749-20.77 29.316 10.23 31.893 36.364 13.487 41.043 10.187 48.193 3.551 49.235 1.524 50.358-.642 49.471-2.102 43.738-7.497 29.257-21.128 9.968-27.631-8.572-25.123Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.ink},d:`M-6.225-16.807C-17.727-13.267-21.176 4.433-12.08 13.257-1.118 23.898 16.829 16.102 17.032 .604 17.209-12.412 6.219-20.642-6.225-16.807Z`})]})}function dQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:iQ.mint},d:`M540 342C520 340 497 355 477 374C450 399 440 421 456 444C465 458 480 462 492 464C503 466 500 477 494 486C487 500 508 496 522 478L530 468C557 468 578 464 591 451C601 442 599 429 585 427C572 425 556 432 547 418C538 403 550 390 568 385C579 382 589 380 584 368C576 352 557 341 540 342Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.coral},d:`M589 396C614 380 659 381 683 392C709 404 721 428 710 451C704 464 693 472 685 479C680 487 684 498 689 503C695 514 684 513 675 507C667 502 662 497 657 491C637 496 610 495 594 486C584 480 583 469 595 464C607 460 622 454 622 441C622 428 612 423 597 420C580 417 578 407 589 396Z`})]})}function fQ({fill:e}){return(0,q.jsx)(`path`,{style:{fill:e},d:`M44.648 .288C26.645 1.615 13.263 8.266 5.942 19.529-4.299 35.277-.917 57.684 13.224 67.784 16.958 70.452 16.936 71.742 13.064 77.665 11.28 80.391 10.895 81.565 11.341 82.914 13.163 88.435 25.022 86.396 36.307 78.62L38.681 76.986 41.294 77.335C45.371 77.878 59.645 77.789 64.125 77.191 89.213 73.837 100.562 61.427 99.92 38.044 99.18 11.1 79.587-2.285 44.648 .288Z`})}function pQ({onFigure:e=!1}){return(0,q.jsxs)(`g`,{style:{fill:e?oQ:iQ.ink},children:[(0,q.jsx)(`rect`,{x:`-15`,y:`-11`,width:`10`,height:`22`,rx:`5`}),(0,q.jsx)(`rect`,{x:`5`,y:`-11`,width:`10`,height:`22`,rx:`5`})]})}function mQ(){return(0,q.jsx)(`path`,{style:{fill:iQ.cream},d:`M18.125 .621C.039 1.574-2.575 4.791 2.264 20.133 17.454 68.284 77.345 69.396 96.119 21.875 100.749 10.154 100.318 4.348 94.605 1.513 91.981 .21 37.878-.421 18.125 .621Z`})}function hQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:iQ.yellow},d:`M31.42 5.279C29.108 5.983 28.068 6.993 25.817 10.732 24.033 13.687 24.027 13.762 25.58 14.265 30.375 15.821 36.711 20.506 39.938 24.885 42.077 27.788 41.835 27.806 45.281 24.463 48.633 21.213 49.164 20.185 48.982 17.325 48.812 14.643 48.174 13.872 42.68 9.741 36.737 5.273 34.439 4.361 31.42 5.279Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.yellow},d:`M22.538 16.207C22.093 16.652 19.732 20.231 13.309 30.196 10.737 34.188 10.723 33.911 13.589 35.351 16.461 36.798 19.778 39.28 21.825 41.523L22.6 42.37Q23.34 43.186 24.05 42.538L24.711 41.933C31.278 35.937 38.928 28.484 38.928 28.083 38.928 24.656 24.521 14.219 22.538 16.207Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.cream},d:`M8.89 38.053C8.203 39.566 6.598 44.473 6.598 45.056 6.598 45.137 6.887 45.125 7.236 45.036 9.655 44.404 13.526 47.475 13.526 50.027 13.526 51.132 13.361 51.164 16.187 49.49 21.421 46.387 21.966 45.665 20.575 43.659 19.002 41.387 14.975 38.238 11.909 36.881 9.799 35.949 9.854 35.926 8.89 38.053Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.graphite},d:`M6.598 45.056C5.732 46.866 5.155 49.464 6.309 50.907 8.041 53.505 10.928 52.639 13.526 50.907 13.526 48.021 9.978 44.404 7.236 45.036Z`})]})}function gQ(){return(0,q.jsx)(`path`,{style:{fill:iQ.coral},d:`M40.804 40.625C38.238 41.462 37.291 41.953 31.169 45.625 15.743 54.871 8.047 56.158 5.879 49.856 5.501 48.754 5.501 48.754 4.843 50.913 1.673 61.302 12.377 61.671 30.386 51.796 39.649 46.719 41.142 46.647 40.81 51.291 40.565 54.775 41.168 56.135 43.486 57.31 49.556 60.387 62.035 54.816 59.605 50.116 58.502 47.983 56.1 47.882 52.163 49.799 47.082 52.273 45.983 51.652 47.998 47.449 50.89 41.416 47.686 38.376 40.804 40.625Z`})}function _Q({transform:e}){return(0,q.jsx)(`path`,{style:{fill:iQ.mint},transform:e,d:`M0 0C3 -2 5 -5 5 -8 5 -10.5 3 -12 0 -12S-5 -10.5 -5 -8C-5 -5 -3 -2 0 0Z`})}function vQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{fillRule:`evenodd`,style:{fill:aQ},d:`M25.3 17.69C14.8 19.34 10.66 20.18 9.05 20.99 5.51 22.78 4.2 27.21 6.71 28.9 7.47 29.42 8.48 29.4 10.25 28.84 12.41 28.15 12.56 27.57 11.02 25.85 10 24.71 10.53 23.62 11.79 24.27 13.9 25.36 15.02 28.98 15.63 36.66 16.18 43.48 17.33 47.43 19.69 50.49 22.76 54.48 27.69 55.73 30.31 53.19 33 50.57 31.24 46.04 28.44 48.38 26.29 50.17 26.16 47.08 28.3 45.14 29.61 43.95 30.78 43.58 38.92 41.75 39.45 41.63 39.41 41.52 38.39 40.01 36.87 37.78 36.04 35.22 34.72 28.69 33.37 22 32.04 19.3 29.5 18.07 28.69 17.68 26.59 17.49 25.3 17.69M24.11 26.51C18.61 27.67 18.16 27.82 17.98 28.55 17.64 29.91 18.54 30.44 20.51 30.05 25.4 29.08 30.11 28.03 30.49 27.83 31.65 27.23 31 25.33 29.66 25.4 29.5 25.4 27 25.91 24.11 26.51M29.2 31.42C28.64 31.54 26.23 32.07 23.85 32.58 20.01 33.41 19.48 33.57 19.15 33.96 18.67 34.5 18.66 35.05 19.12 35.63 19.61 36.26 19.86 36.23 26.05 34.88 29.05 34.23 31.53 33.7 31.57 33.7 31.82 33.7 32.34 32.88 32.34 32.5 32.34 31.25 31.37 30.92 29.2 31.42M29.79 37.19C28.81 37.41 26.45 37.94 24.53 38.37 22.62 38.8 20.84 39.23 20.58 39.33 19.61 39.71 19.35 40.62 19.98 41.41 20.48 42.05 21 41.99 27.59 40.5 33.85 39.09 34.21 38.91 33.45 37.44 33.02 36.61 32.51 36.58 29.79 37.19M45.41 41.95C44.89 42.09 41.61 42.89 38.12 43.73 30.94 45.45 29.81 45.84 31.05 46.15 33.2 46.69 34.11 50.18 32.77 52.76 32.23 53.79 32.23 54.03 32.76 54.16 33.34 54.31 45.35 51.3 46.72 50.67 50.19 49.06 51.76 45.01 49.79 42.76 48.8 41.64 47.46 41.39 45.41 41.95`}),(0,q.jsx)(`path`,{style:{fill:iQ.grape},d:`M48.21 10.15C47.92 10.41 47.5 11.27 46.96 12.74 45.52 16.61 45.24 16.99 43.01 18.15 39.18 20.15 39.05 20.99 42.28 22.73 45.37 24.39 45.68 24.79 47.12 28.95 48.3 32.32 49.28 32.2 50.65 28.52 52.23 24.25 52.26 24.22 55.2 22.56 57.53 21.24 57.79 21 57.79 20.16 57.79 19.49 57.55 19.31 55.01 18.06 52.16 16.66 52.2 16.72 50.31 11.56 49.7 9.89 49.03 9.44 48.21 10.15M32.59 13.92C31.78 14.73 32.28 15.89 33.58 16.22 35.07 16.6 36.19 17.1 37.17 17.84 38.42 18.77 39.23 18.86 39.79 18.15 39.99 17.9 40.15 17.53 40.15 17.32 40.15 15.29 33.99 12.52 32.59 13.92M42.48 34.38C40.96 35.96 40.65 36.88 41.39 37.57 42.2 38.33 43.36 37.74 44.55 35.95 45.2 34.97 45.22 34.35 44.62 33.88 43.89 33.31 43.41 33.42 42.48 34.38`}),(0,q.jsx)(`path`,{style:{fill:iQ.yellow},d:`M40.75 25.96C39.69 27.07 38.11 30.69 38.11 31.98 38.11 32.66 38.55 33.19 39.12 33.19 39.8 33.19 40.24 32.73 40.58 31.66 40.95 30.46 41.65 29.09 42.42 28.01 43.77 26.14 42.29 24.32 40.75 25.96M54.85 27.67C54.71 27.81 54.47 28.32 54.31 28.82 53.67 30.76 53.19 31.37 51.67 32.13 50.25 32.85 50.34 33.36 52.04 34.21 53.25 34.82 53.57 35.23 54.24 37.01 54.98 38.98 55.47 39.08 56.03 37.37 56.7 35.32 57.08 34.81 58.64 33.87 60.18 32.95 60.14 32.65 58.38 31.78 57.02 31.11 56.68 30.66 56.02 28.65 55.69 27.64 55.25 27.27 54.85 27.67`})]})}function yQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{fillRule:`evenodd`,style:{fill:aQ},d:`M42.24 14.07C41.52 14.24 40.53 14.54 35.06 16.26 33.33 16.8 31.2 17.47 30.34 17.74 29.47 18.01 27.86 18.52 26.75 18.88 25.64 19.23 24.03 19.74 23.16 20.01 20.16 20.94 19.45 21.4 18.97 22.71 18.71 23.44 18.45 26.33 17.83 35.41 17.64 38.25 17.44 41.03 17.41 41.58 17.32 42.77 17.24 42.69 18.79 42.84L20.01 42.95 21.98 39.97C24.69 35.88 24.85 35.82 27.05 37.9 27.9 38.7 28.43 39.08 28.61 39.02 28.76 38.96 28.91 38.91 28.94 38.91 28.98 38.91 29.38 38.38 29.84 37.73 30.3 37.08 31.47 35.48 32.43 34.17 33.4 32.86 34.86 30.85 35.67 29.71 36.49 28.56 37.5 27.29 37.91 26.88 39.73 25.07 41.01 26.43 43.32 32.67 43.76 33.84 44.3 35.28 44.52 35.86 44.74 36.44 44.97 37.28 45.04 37.74 45.19 38.71 45.17 38.71 46.63 38.03 47.69 37.53 47.77 37.46 47.68 37.02 47.58 36.52 46.97 30.64 46.79 28.41 46.73 27.69 46.62 26.43 46.53 25.61 46.44 24.79 46.24 22.87 46.09 21.32 45.61 16.44 45.5 15.66 45.22 15.12 44.72 14.15 43.59 13.76 42.24 14.07M29.38 22.45C26.04 23.47 24.49 27.62 26.6 29.91 29.17 32.7 34.15 30.16 34.16 26.05 34.16 23.38 31.9 21.68 29.38 22.45M46.7 41.5C39.3 44.23 28.33 46.04 20.1 45.88L17.21 45.82 17.16 46.88C17.08 48.22 17.33 49.03 18.01 49.68 18.73 50.37 19.73 50.35 23.77 49.53 25.46 49.19 29.12 48.47 31.91 47.93 46.31 45.14 46.9 44.99 47.57 43.91 47.95 43.3 48.25 41.29 47.99 41.15 47.91 41.11 47.33 41.26 46.7 41.5`}),(0,q.jsx)(`path`,{style:{fill:iQ.coral},d:`M29.72 22.45C25.84 23.34 24.28 28.36 27.25 30.42 29.34 31.88 32.91 30.43 33.83 27.75 34.92 24.55 32.75 21.76 29.72 22.45`}),(0,q.jsx)(`path`,{style:{fill:iQ.mint},d:`M12.96 14.29C12.87 14.41 12.7 15.03 12.58 15.68 12.37 16.82 11.59 18.26 11.18 18.26 11.08 18.26 10.88 18.46 10.72 18.7 10.36 19.25 10.59 19.58 11.45 19.74 12.18 19.88 13.08 20.63 13.54 21.49 14.23 22.76 14.75 22.53 15.15 20.79 15.39 19.71 15.51 19.51 16.4 18.66 17.54 17.58 17.51 17.36 16.18 16.85 15.16 16.47 14.84 16.19 14.14 15.1 13.56 14.2 13.22 13.96 12.96 14.29M49.04 24.13C48.56 24.86 48.91 25.31 50.59 26.09 53.89 27.64 54.85 29.82 53.45 32.6 52.01 35.43 46.84 38.54 40.51 40.39 39.73 40.62 38.88 40.89 38.62 40.99 37.24 41.52 30.85 42.64 27.54 42.93 20.72 43.52 13.63 42.49 10.57 40.46 5.81 37.3 7.51 32.32 14.74 28.24 15.84 27.61 16.17 27.1 15.9 26.4 15.66 25.78 15.35 25.84 13.19 26.94 6 30.61 2.97 35.32 4.95 39.74 7.86 46.21 22.78 47.8 40.05 43.46 51.97 40.47 58.57 36.38 59.47 31.43 60.09 27.97 57.74 25.34 52.93 24.12 50.6 23.53 49.43 23.54 49.04 24.13`}),(0,q.jsx)(`path`,{style:{fill:iQ.grape},d:`M34.82 8.91C33.48 10.04 34.21 12.14 35.94 12.14 37.29 12.14 38.18 10.99 37.77 9.77 37.36 8.53 35.81 8.08 34.82 8.91M53.15 43.16C53 43.28 52.74 43.86 52.57 44.45 52.18 45.78 51.76 46.32 50.64 46.93 49.52 47.53 49.45 47.89 50.33 48.34 51.34 48.85 52.24 49.95 52.56 51.04 53.13 53.01 53.6 53 54.21 50.99 54.61 49.69 55.13 48.93 55.91 48.54 57.17 47.91 57.23 47.51 56.15 46.96 55.23 46.49 54.67 45.76 54.23 44.44 53.8 43.15 53.54 42.84 53.15 43.16M24.18 53.18C22.45 53.9 22.87 56.59 24.71 56.59 26.79 56.59 27.2 53.67 25.2 53.09 24.89 53.01 24.51 53.04 24.18 53.18`}),(0,q.jsx)(`path`,{style:{fill:iQ.yellow},d:`M51.76 11.04C51.21 12.77 50.56 13.61 49.24 14.34 48.6 14.69 48.72 15.07 49.59 15.48 50.54 15.93 51.11 16.69 51.62 18.22 52.06 19.57 52.26 19.54 52.79 18.08 53.29 16.69 53.87 15.91 54.86 15.31 55.76 14.77 55.77 14.48 54.92 14.02 53.91 13.46 53.5 12.99 52.89 11.66 52.23 10.21 52.06 10.12 51.76 11.04M11.06 48.22C10.99 48.35 10.71 48.88 10.46 49.41 9.95 50.48 9.45 50.99 8.59 51.33 7.89 51.61 7.85 52.1 8.52 52.37 9.51 52.79 10.3 53.85 10.89 55.58 11.09 56.18 11.48 55.88 11.87 54.84 12.24 53.87 13.33 52.56 13.79 52.56 14 52.56 14.5 52.06 14.5 51.85 14.5 51.77 14.19 51.54 13.81 51.34 12.98 50.92 12.36 50.14 11.93 48.99 11.6 48.09 11.31 47.83 11.06 48.22`})]})}function bQ(){return(0,q.jsxs)(`g`,{transform:`translate(2 8) scale(.114) translate(-125 -122)`,children:[(0,q.jsx)(`path`,{style:{fill:iQ.coral},d:`M278 155 482 123C517 117 527 135 530 167L542 309Q543 329 561 341L631 404Q649 419 646 444 645 465 623 472L407 521Q374 531 345 519L156 436Q115 418 128 375L221 191Q238 163 278 155Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.ink},d:`M317 183 461 161Q493 155 497 188L504 288Q508 320 478 326L318 356Q289 362 286 331L281 226Q278 194 317 183Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.cream},d:`M304 386 553 340Q562 337 570 346L631 404Q649 419 646 444Q645 448 629 452L411 483Q382 492 367 474Z`}),(0,q.jsxs)(`g`,{style:{fill:iQ.cream},children:[(0,q.jsx)(`rect`,{x:`319`,y:`236`,width:`26`,height:`59`,rx:`13`}),(0,q.jsx)(`rect`,{x:`364`,y:`229`,width:`26`,height:`59`,rx:`13`})]}),(0,q.jsxs)(`g`,{style:{fill:iQ.ink},transform:`rotate(-11 470 411)`,children:[(0,q.jsx)(`rect`,{x:`369`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`444`,y:`380`,width:`61`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`518`,y:`380`,width:`57`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`392`,y:`421`,width:`58`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`462`,y:`421`,width:`65`,height:`25`,rx:`13`}),(0,q.jsx)(`rect`,{x:`539`,y:`421`,width:`58`,height:`25`,rx:`13`})]})]})}function xQ(){return(0,q.jsxs)(`g`,{transform:`translate(3 10) scale(.114) translate(-760 -140)`,children:[(0,q.jsx)(`path`,{style:{fill:iQ.blue},d:`M1226 153C1257 153 1273 195 1267 231Q1263 265 1237 268L1176 270V215C1176 178 1195 153 1226 153Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.blue},d:`M824 376Q908 372 871 400C842 427 866 442 902 450L1113 480Q1188 479 1199 392C1207 447 1204 497 1163 511Q1134 521 1097 516C1055 510 991 507 957 507S869 511 826 512C781 513 758 483 760 441Q760 385 824 376Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.cream},d:`M824 376 857 184Q864 133 911 141C1039 169 1124 151 1226 153Q1179 159 1184 241L1199 377C1202 434 1174 482 1117 480L902 450C864 445 849 429 871 400Q908 372 824 376Z`}),(0,q.jsxs)(`g`,{style:{fill:iQ.coral},children:[(0,q.jsx)(`path`,{d:`M982 198C1008 190 1030 197 1028 220L1023 265Q1020 295 1000 279C981 261 951 223 963 210Q970 202 982 198Z`}),(0,q.jsx)(`path`,{d:`M1063 220C1077 215 1100 237 1102 251Q1107 267 1084 282L1063 295Q1037 307 1040 278L1045 245Q1049 224 1063 220Z`}),(0,q.jsx)(`path`,{d:`M911 252C925 240 939 254 957 269L978 291Q995 311 961 316C938 318 907 316 898 308Q884 296 911 252Z`}),(0,q.jsx)(`path`,{d:`M1106 289Q1127 281 1134 304C1142 327 1146 352 1125 350Q1097 348 1073 335C1051 324 1072 311 1084 302Z`}),(0,q.jsx)(`path`,{d:`M927 338C946 334 972 334 985 343Q1004 353 984 384C970 408 957 418 940 403C922 389 896 356 913 345Z`}),(0,q.jsx)(`path`,{d:`M1010 375Q1025 363 1037 384C1049 407 1064 438 1044 442Q1025 448 1002 436C984 428 991 410 997 393Z`}),(0,q.jsx)(`path`,{d:`M1068 357C1084 359 1110 376 1120 389Q1130 402 1107 419C1090 432 1082 418 1073 401C1062 383 1043 355 1068 357Z`}),(0,q.jsx)(`path`,{d:`M1018 311C1037 312 1050 334 1034 343C1018 351 998 337 1005 320Q1009 311 1018 311Z`})]})]})}function SQ(){return(0,q.jsxs)(`g`,{transform:`translate(2 7) scale(.11) translate(-1380 -96)`,children:[(0,q.jsx)(`path`,{style:{fill:iQ.inkcap},d:`M1384 276C1394 238 1445 200 1497 158C1547 119 1604 97 1647 97C1690 97 1720 109 1745 138C1772 170 1791 184 1833 194C1870 201 1919 220 1922 257C1923 307 1891 339 1853 336C1801 335 1767 299 1701 294C1666 291 1620 294 1642 303Q1670 307 1675 333C1681 367 1697 389 1717 413C1735 434 1738 443 1719 464C1700 485 1692 502 1686 520Q1682 541 1653 541L1626 541Q1598 541 1594 519C1590 495 1578 474 1563 458C1545 440 1544 429 1559 410C1585 377 1608 337 1572 326C1554 320 1529 333 1506 340C1461 356 1428 357 1402 340Q1371 319 1384 276Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.cream},d:`M1634 362Q1641 346 1649 362C1660 390 1676 404 1705 424Q1721 435 1704 453C1685 475 1677 490 1671 513Q1670 526 1653 525L1626 525Q1611 525 1610 513C1606 492 1592 465 1575 449Q1562 437 1577 424C1604 404 1620 390 1634 362Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.inkcap},d:`M1634 456A18 18 0 1 1 1648 456V492Q1648 500 1641 500T1634 492Z`}),(0,q.jsx)(`path`,{style:{fill:iQ.inkcap},d:`M1780 391Q1786 386 1793 396C1810 420 1828 444 1827 467C1826 508 1768 510 1753 480C1741 456 1762 413 1780 391Z`})]})}var{coral:CQ,blue:wQ,mint:TQ,grape:EQ,yellow:DQ,cream:OQ,ink:kQ}=iQ,AQ={bonsai:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,stroke:TQ,strokeWidth:`3.7`,strokeLinecap:`round`,d:`M35 27.5C36 25 35.5 22.5 34 21S31.5 17.5 31.5 14M36 27C40 26.8 43 26 45 24S47 20.5 47.5 18.5M30.5 31C32.5 26.5 30.5 24.6 26.5 24 22 23.5 18.5 21.6 16.8 18.5M29 37C26.5 34.5 25 33.7 21.5 33.2S15.5 32 13 31.6M36 39.5C38 38 40 37.5 42 36.5S47 34 51 32.2`}),(0,q.jsx)(`path`,{fill:TQ,d:`M25.5 43.5C28 40.5 28 37 27.5 33 27.3 29.5 29.5 27 33.5 26.3L37.5 26V29.5C35 29.8 34.2 31.5 34.3 34 34.5 37.5 37 39.5 41 43.5Z`}),(0,q.jsx)(`circle`,{fill:wQ,cx:`31.5`,cy:`10.7`,r:`4.8`}),(0,q.jsx)(`circle`,{fill:EQ,cx:`16.6`,cy:`18.3`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:DQ,cx:`47.9`,cy:`17.7`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:DQ,cx:`12.8`,cy:`31.5`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:wQ,cx:`50.9`,cy:`32.1`,r:`4.6`}),(0,q.jsx)(`path`,{fill:CQ,d:`M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z`}),(0,q.jsx)(`rect`,{fill:CQ,x:`14`,y:`43`,width:`35.5`,height:`4.6`,rx:`2.3`})]}),computer:(0,q.jsx)(bQ,{}),prints:(0,q.jsx)(xQ,{}),inkcap:(0,q.jsx)(SQ,{}),vishnu:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{fill:CQ},d:`M6 37C6 21 17.5 9 32 9s26 12 26 28c0 2.2-1.8 4-4 4H10c-2.2 0-4-1.8-4-4Z`}),(0,q.jsx)(`circle`,{style:{fill:OQ},cx:`19`,cy:`25`,r:`4`}),(0,q.jsx)(`circle`,{style:{fill:OQ},cx:`33`,cy:`19.5`,r:`4.8`}),(0,q.jsx)(`circle`,{style:{fill:OQ},cx:`46`,cy:`28`,r:`3.4`}),(0,q.jsx)(`rect`,{style:{fill:wQ},x:`13`,y:`39`,width:`38`,height:`18`,rx:`9`}),(0,q.jsx)(`rect`,{style:{fill:OQ},x:`18.5`,y:`46.2`,width:`10`,height:`3.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{style:{fill:OQ},x:`21.7`,y:`43`,width:`3.6`,height:`10`,rx:`1.8`}),(0,q.jsx)(`circle`,{style:{fill:DQ},cx:`39`,cy:`50.5`,r:`2.7`}),(0,q.jsx)(`circle`,{style:{fill:OQ},cx:`45`,cy:`45.5`,r:`2.7`})]}),generateText:(0,q.jsx)(vQ,{}),generateMedia:(0,q.jsx)(yQ,{}),buyApps:(0,q.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,q.jsx)(`circle`,{fill:DQ,cx:`32`,cy:`20`,r:`12`}),(0,q.jsx)(`circle`,{stroke:OQ,strokeWidth:`4`,cx:`32`,cy:`20`,r:`6`}),(0,q.jsx)(sQ,{fill:DQ,transform:`translate(15.5 12) rotate(-60) scale(1.1 .85)`}),(0,q.jsx)(sQ,{fill:DQ,transform:`translate(48.5 12) rotate(60) scale(1.1 .85)`}),(0,q.jsx)(`path`,{fill:wQ,d:`M10 35H54L50 53Q49 58 44 58H20Q15 58 14 53Z`}),(0,q.jsx)(`rect`,{fill:CQ,x:`5`,y:`27`,width:`54`,height:`10`,rx:`5`}),(0,q.jsxs)(`g`,{fill:OQ,children:[(0,q.jsx)(`rect`,{x:`20`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,q.jsx)(`rect`,{x:`29.5`,y:`41`,width:`5`,height:`11`,rx:`2.5`}),(0,q.jsx)(`rect`,{x:`39`,y:`41`,width:`5`,height:`11`,rx:`2.5`})]})]}),browseBazaar:(0,q.jsxs)(`g`,{transform:`rotate(-5 32 32)`,children:[(0,q.jsx)(`rect`,{fill:wQ,x:`10`,y:`14`,width:`44`,height:`38`,rx:`6`}),(0,q.jsx)(`rect`,{fill:wQ,x:`5`,y:`47`,width:`54`,height:`12`,rx:`6`}),(0,q.jsx)(`rect`,{fill:OQ,x:`12`,y:`50.5`,width:`40`,height:`4.5`,rx:`2.25`}),(0,q.jsx)(`rect`,{fill:CQ,x:`2`,y:`4`,width:`60`,height:`9`,rx:`4.5`}),(0,q.jsx)(`path`,{fill:CQ,d:`M3 9H14.6V18A5.8 5.8 0 0 1 3 18Z`}),(0,q.jsx)(`path`,{fill:OQ,d:`M14.6 9H26.2V18A5.8 5.8 0 0 1 14.6 18Z`}),(0,q.jsx)(`path`,{fill:CQ,d:`M26.2 9H37.8V18A5.8 5.8 0 0 1 26.2 18Z`}),(0,q.jsx)(`path`,{fill:OQ,d:`M37.8 9H49.4V18A5.8 5.8 0 0 1 37.8 18Z`}),(0,q.jsx)(`path`,{fill:CQ,d:`M49.4 9H61V18A5.8 5.8 0 0 1 49.4 18Z`}),(0,q.jsx)(`g`,{transform:`translate(32 36.5) scale(.34)`,children:(0,q.jsx)(uQ,{})})]}),agent:(0,q.jsxs)(`g`,{transform:`translate(32 33) scale(2.02) translate(-47.2 -41.8)`,children:[(0,q.jsx)(`path`,{fill:wQ,d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,q.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,q.jsx)(pQ,{})})]}),list:(0,q.jsxs)(`g`,{transform:`rotate(-7 32 32)`,children:[(0,q.jsx)(`path`,{style:{fill:wQ},d:`M12 13Q6 13 6 19V50Q6 57 13 57H47Q53 57 53 50V20Q53 13 47 13Z`}),(0,q.jsx)(`path`,{style:{fill:OQ},d:`M19 7H39Q42 7 44 9L55 20Q57 22 57 26V44Q57 50 51 50H19Q13 50 13 44V13Q13 7 19 7Z`}),(0,q.jsx)(`path`,{style:{fill:CQ},d:`M39 7V18Q39 24 45 24H57Q57 22 55 20L44 9Q42 7 39 7Z`}),(0,q.jsxs)(`g`,{style:{fill:CQ},children:[(0,q.jsx)(`circle`,{cx:`22`,cy:`21`,r:`3`}),(0,q.jsx)(`circle`,{cx:`22`,cy:`31`,r:`3`}),(0,q.jsx)(`circle`,{cx:`22`,cy:`41`,r:`3`})]}),(0,q.jsx)(`path`,{style:{stroke:wQ},strokeWidth:`5`,strokeLinecap:`round`,d:`M31 21H32M31 31H46M31 41H42`})]}),chat:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`g`,{transform:`translate(3 11) scale(.22) translate(-449 -327)`,children:(0,q.jsx)(dQ,{})}),(0,q.jsx)(sQ,{transform:`translate(38.2 18) rotate(16) scale(.95 .6)`}),(0,q.jsx)(sQ,{transform:`translate(44.4 20.5) rotate(47) scale(.95 .6)`})]}),read:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`g`,{transform:`translate(4 20.5) scale(.56)`,children:(0,q.jsx)(lQ,{})}),(0,q.jsx)(`g`,{transform:`translate(32 38.6) scale(.3164)`,children:(0,q.jsx)(uQ,{})}),(0,q.jsx)(cQ,{})]}),readConversations:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(.9) translate(-32 -32)`,children:[(0,q.jsx)(`g`,{transform:`translate(4 7.88) scale(.56)`,children:(0,q.jsx)(fQ,{fill:wQ})}),(0,q.jsx)(`g`,{transform:`translate(32.2 30.3) scale(.352)`,children:(0,q.jsx)(uQ,{})})]}),listAgents:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(1.04) translate(-32 -32)`,children:[(0,q.jsx)(`path`,{style:{fill:aQ},d:`M32.059 10.146C23.878 10.646 18.949 14.844 18.925 21.331 18.912 24.856 20.167 27.259 22.274 27.74 24.437 28.233 26.097 29.061 27.481 30.337 28.275 31.068 28.328 31.096 29.352 31.306 31.161 31.677 31.653 32.094 32.115 33.651 32.392 34.582 32.557 34.868 32.915 35.041 33.919 35.523 35.864 33.733 36.539 31.706L36.775 30.997 38.008 30.681C42.663 29.489 45.29 26.142 45.468 21.176 45.734 13.784 40.673 9.62 32.059 10.146Z`}),(0,q.jsx)(`g`,{transform:`translate(32.4 21.2) scale(.39)`,children:(0,q.jsx)(pQ,{onFigure:!0})}),(0,q.jsx)(`path`,{style:{fill:CQ},d:`M14.375 27.586C8.014 28.591 4.363 32.396 4.355 38.027 4.347 43.93 8.071 47.469 15.239 48.368L16.828 48.568 17.873 49.568C19.854 51.464 22.469 52.496 23.691 51.864 24.384 51.506 24.431 51.044 23.924 49.606 23.337 47.943 23.479 47.492 24.749 46.977 32.756 43.73 32.643 31.899 24.573 28.49 22.238 27.504 17.535 27.087 14.375 27.586Z`}),(0,q.jsx)(`g`,{transform:`translate(17.6 37.7) scale(.38 .36)`,children:(0,q.jsx)(pQ,{})}),(0,q.jsx)(`path`,{style:{fill:wQ},d:`M46.666 29.533C39.623 30.116 34.627 34.849 34.603 40.96 34.585 45.387 36.412 47.971 40.602 49.445 42.036 49.95 42.076 50.049 41.491 51.666 40.968 53.111 41.167 53.761 42.201 53.988 43.463 54.265 46.679 52.293 47.929 50.475 48.134 50.178 48.268 50.13 49.332 49.977 56.938 48.882 60.956 43.889 59.582 37.237 58.622 32.59 53.42 29.07 48.034 29.424 47.904 29.432 47.289 29.482 46.666 29.533Z`}),(0,q.jsx)(`g`,{transform:`translate(47.3 40) scale(.36 .34)`,children:(0,q.jsx)(pQ,{})})]}),createAgents:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,q.jsx)(`path`,{style:{fill:aQ},d:`M20.436 24.499C13.35 25.216 7.504 28.799 5.442 33.687 3.114 39.208 4.438 45.791 8.593 49.358 10.446 50.949 10.34 50.831 10.34 51.301 10.34 51.796 10.106 52.294 9.281 53.558 7.191 56.76 12.108 56.905 16.701 53.777 17.517 53.221 17.715 53.135 18.015 53.201 20.013 53.639 25.739 53.051 28.595 52.113 35.47 49.857 39.129 44.162 37.83 37.738C37 31 33 26 26.717 24.428L24.075 24.413C22.623 24.405 20.985 24.444 20.436 24.499Z`}),(0,q.jsx)(`g`,{transform:`translate(21.9 40) scale(.46 .43)`,children:(0,q.jsx)(pQ,{onFigure:!0})}),(0,q.jsx)(`path`,{style:{fill:TQ},d:`M37.987 15.734C32.277 16.627 28.675 20.713 28.92 26.022 29.062 29.118 30.627 31.606 33.331 33.036 34.675 33.747 34.761 34.018 34.237 35.923 33.376 39.051 36.878 38.551 39.174 35.218 39.574 34.637 39.65 34.583 40.058 34.583 46.203 34.583 50.414 30.91 50.424 25.543 50.435 18.989 44.932 14.649 37.987 15.734Z`}),(0,q.jsx)(`g`,{transform:`translate(38.9 24.9) scale(.31)`,children:(0,q.jsx)(pQ,{})}),(0,q.jsx)(sQ,{fill:DQ,transform:`translate(48.1 15.7) rotate(31) scale(1.25 .85)`}),(0,q.jsx)(sQ,{fill:DQ,transform:`translate(52.2 19.8) rotate(70) scale(1.25 .85)`})]}),sendPrompts:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,q.jsx)(`g`,{transform:`translate(4 13.2) scale(.412 .436)`,children:(0,q.jsx)(fQ,{fill:CQ})}),(0,q.jsx)(`g`,{transform:`translate(17.1 28.7) scale(.19)`,children:(0,q.jsx)(mQ,{})}),(0,q.jsx)(sQ,{fill:TQ,transform:`translate(48.1 26.4) rotate(65) scale(1.7 1.28)`}),(0,q.jsx)(sQ,{fill:TQ,transform:`translate(48.4 33.8) rotate(110) scale(1.7 1.28)`})]}),write:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(hQ,{}),(0,q.jsx)(gQ,{})]}),run:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{style:{fill:wQ},x:`6`,y:`9`,width:`52`,height:`43`,rx:`7`}),(0,q.jsx)(`path`,{style:{stroke:OQ},strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m17 22 9 8-9 8m17 0h12`})]}),stop:(0,q.jsx)(`rect`,{style:{fill:CQ},x:`12`,y:`12`,width:`40`,height:`40`,rx:`9`}),connected:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,style:{stroke:wQ},strokeWidth:`12`,strokeLinecap:`round`,d:`M34 37Q43 21 26 20H18Q3 20 6 37q2 10 15 9`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:CQ},strokeWidth:`12`,strokeLinecap:`round`,d:`M29 33Q20 50 38 53h8q16-1 12-17-2-11-14-10`}),(0,q.jsx)(`path`,{style:{stroke:DQ},strokeWidth:`4`,strokeLinecap:`round`,d:`m27 4 2 6m10-5-2 7m12 0-5 4`})]}),working:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`ellipse`,{style:{fill:TQ},cx:`23`,cy:`14`,rx:`13`,ry:`8`,transform:`rotate(-30 23 14)`}),(0,q.jsx)(`ellipse`,{style:{fill:DQ},cx:`48`,cy:`36`,rx:`13`,ry:`8`,transform:`rotate(35 48 36)`}),(0,q.jsx)(`ellipse`,{style:{fill:EQ},cx:`22`,cy:`48`,rx:`13`,ry:`8`,transform:`rotate(45 22 48)`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:aQ},strokeWidth:`3`,strokeLinecap:`round`,d:`M42 8q13 2 13 13M43 55q-5 5-12 4M5 39q-5-9 1-17`})]}),complete:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{fill:TQ},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:kQ},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m23 29 7 7 13-15`}),(0,q.jsx)(`path`,{style:{stroke:aQ},strokeWidth:`3`,strokeLinecap:`round`,d:`m4 8 5 6m48-4 5-5M2 24l6 1`})]}),installApps:(0,q.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,q.jsx)(`rect`,{style:{fill:wQ},x:`9`,y:`26`,width:`46`,height:`32`,rx:`10`}),(0,q.jsx)(`rect`,{style:{fill:OQ},x:`17`,y:`33`,width:`30`,height:`18`,rx:`5`}),(0,q.jsx)(`path`,{style:{fill:TQ},d:`M22 38h8v8h-8z`}),(0,q.jsx)(`path`,{style:{fill:EQ},d:`M34 38h8v8h-8z`}),(0,q.jsx)(`path`,{style:{stroke:CQ},strokeWidth:`6`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M32 4v17m-8-7 8 8 8-8`})]}),restricted:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,style:{stroke:CQ},strokeWidth:`9`,strokeLinecap:`round`,d:`M16 23V19q0-17 16-17t16 17v4`}),(0,q.jsx)(`rect`,{style:{fill:CQ},x:`8`,y:`26`,width:`48`,height:`36`,rx:`9`}),(0,q.jsx)(`path`,{style:{fill:OQ},d:`M32 34a7 7 0 0 0-4 13v7h8v-7a7 7 0 0 0-4-13Z`})]}),error:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{fill:CQ},d:`M32 6q5-8 10 0 9-3 10 6 9 2 5 11 8 6 0 12 3 9-6 11-1 9-10 6-6 8-12 0-9 3-11-6-9-2-6-11-8-6 0-12-3-9 6-11 1-9 10-6Z`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:OQ},strokeWidth:`7`,strokeLinecap:`round`,d:`M32 18v15`}),(0,q.jsx)(`circle`,{style:{fill:OQ},cx:`32`,cy:`45`,r:`4`})]}),trellis:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`g`,{fill:DQ,children:[(0,q.jsx)(`rect`,{x:`17.25`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,q.jsx)(`rect`,{x:`42.95`,y:`9`,width:`3.9`,height:`49.2`,rx:`1.95`}),(0,q.jsx)(`rect`,{x:`30.4`,y:`18`,width:`3.2`,height:`26`}),(0,q.jsx)(`rect`,{x:`14.8`,y:`15.75`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,q.jsx)(`rect`,{x:`14.8`,y:`28.85`,width:`34.4`,height:`3.1`,rx:`1.55`}),(0,q.jsx)(`rect`,{x:`14.8`,y:`42.55`,width:`34.4`,height:`3.1`,rx:`1.55`})]}),(0,q.jsx)(`path`,{fill:`none`,stroke:TQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M21.9 56.1C31.5 54.4 32.9 47 32.1 45.8`}),(0,q.jsx)(`path`,{fill:`none`,stroke:TQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M32 44.2C28.7 41.8 25.2 35.7 32 32.3 38.8 28 38.9 24 31.9 18.8 32.4 16.3 32.8 14.7 34.5 12.2`}),(0,q.jsx)(_Q,{transform:`translate(32.1 14.1) rotate(45) scale(0.45 0.86)`}),(0,q.jsx)(_Q,{transform:`translate(32.2 14.7) rotate(-60) scale(0.42 0.58)`}),(0,q.jsx)(_Q,{transform:`translate(34.8 28.3) rotate(65) scale(0.38 0.8)`}),(0,q.jsx)(_Q,{transform:`translate(28.2 33.1) rotate(-51) scale(0.5 0.57)`}),(0,q.jsx)(_Q,{transform:`translate(28.6 53.3) rotate(-48) scale(0.47 0.6)`}),(0,q.jsx)(`circle`,{fill:CQ,cx:`31.9`,cy:`18.8`,r:`4`}),(0,q.jsx)(`circle`,{fill:wQ,cx:`32`,cy:`32.3`,r:`4`}),(0,q.jsx)(`circle`,{fill:EQ,cx:`32`,cy:`44.2`,r:`4`})]}),games:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:wQ,d:`M18.5 28.5H45.5C49.5 29.5 53 32 54 35 55 37.5 56.8 45.5 56.6 48 56.5 53 52.5 57.5 47 58H15C9.5 56.5 6.6 51 7.6 45.5 8.6 39.5 9.3 35 10.5 33 12 31 14.5 29.5 18.5 28.5Z`}),(0,q.jsx)(`ellipse`,{fill:OQ,cx:`26.8`,cy:`37.9`,rx:`9.1`,ry:`5.6`}),(0,q.jsx)(`ellipse`,{fill:kQ,cx:`27`,cy:`37.6`,rx:`4.7`,ry:`2.2`}),(0,q.jsx)(`path`,{fill:kQ,d:`M23.1 26V35.4A4 4.2 0 0 0 31.1 35.4V26Z`}),(0,q.jsx)(`circle`,{fill:CQ,cx:`27.1`,cy:`18.3`,r:`12.4`}),(0,q.jsx)(`circle`,{fill:OQ,cx:`22.6`,cy:`14.3`,r:`3.05`}),(0,q.jsx)(`ellipse`,{fill:DQ,cx:`45.1`,cy:`37.2`,rx:`5.6`,ry:`3.95`}),(0,q.jsx)(`ellipse`,{fill:OQ,cx:`40.1`,cy:`46.6`,rx:`6.2`,ry:`4.4`})]}),oyster:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:EQ,d:`M35.5 6C33.7 6.3 32.3 7.6 31.4 9.4 30.9 10.3 30.4 10.3 29.5 10 25.5 9 20.6 11.6 19.6 15.9 19.4 16.6 19 17 18 17.1 14.5 17.6 12 20.6 12.1 24.2 12.2 25.4 12 25.9 11.5 26.5 7.5 30 10.5 34.5 17.5 34.4 15.3 32.6 16 31 19 29 26 24 37 19.5 43.5 19 46 19 46 22 43 25.5 46.5 23.5 51.5 18.5 53.5 15 55 11 50 7 45 9 43.8 9.4 43.3 9.2 42.5 8 40.7 6.3 38 5.6 35.5 6Z`}),(0,q.jsx)(`circle`,{fill:OQ,cx:`34.9`,cy:`41.9`,r:`11.3`}),(0,q.jsxs)(`g`,{fill:kQ,children:[(0,q.jsx)(`rect`,{x:`29.9`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`}),(0,q.jsx)(`rect`,{x:`36.7`,y:`33.2`,width:`3.2`,height:`5.6`,rx:`1.6`})]}),(0,q.jsx)(`path`,{fill:EQ,d:`M49.5 39C47.9 39.3 46.5 40 46.1 41.6 45.8 43.2 45.5 43.5 44 43.5 38.5 43.5 35 48 39 49.5 40 50 39.5 50.5 38 51 35.5 52.5 32.5 52 30 51 29 50.5 28.5 50 29.5 50 33 47.5 30 43.5 24.5 43.5 23.3 43.5 22.9 43.3 22.5 43 20.5 40.5 19 40 17.5 39.5 13 39.5 13 44 17 47.5 18.3 48.4 18.6 48.7 19 49.5 20.5 53 23 55 26 55 26.8 55 27 55.3 27.5 56 31 58.5 36.5 58.5 40 56 40.8 55.2 41.2 55 42 55 45 55 47.5 53 49 49.5 49.6 48.5 50 48 50.5 47.5 56 43.5 55 38.5 49.5 39Z`}),(0,q.jsx)(`path`,{fill:`none`,stroke:DQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M46.6 31.8 49.2 27.8 M49.4 35.5 52.8 33.7 M21.5 32.5 22.9 33.5 M19.3 37.5 21.1 38.1`})]}),tourtois:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:OQ,x:`11.07`,y:`35.73`,width:`26.8`,height:`9.7`,rx:`3.25`,transform:`rotate(-5 24.47 40.58)`}),(0,q.jsx)(`path`,{fill:DQ,d:`M14.8 16C19 14.6 23 13.5 26.5 12.6 28.4 12.1 29.6 13.4 30.1 15.3L31.6 21 17.4 37.6C13.8 38.2 10.6 37.8 10.1 35.4L9.2 27.8C9.1 26.1 10.1 24.7 11.6 24.1 11.4 22.4 11.4 20.6 11.8 19.1 12.3 17.4 13.3 16.5 14.8 16Z`}),(0,q.jsx)(`path`,{fill:CQ,d:`M14.0 24.1Q13.3 21.2 16.2 20.4L30.7 16.2Q33.6 15.4 34.6 18.2L36.0 22.7Q37.0 25.5 34.7 27.4L20.2 39.7Q17.9 41.6 17.2 38.7Z`}),(0,q.jsx)(`path`,{fill:wQ,d:`M21 23.4 35.5 20.6C37.3 20.2 38.6 21 38.9 22.6L40 34.5C40.1 36.2 39.1 37.3 37.5 37.7 32.6 39.9 26 41 21 41 16 41 12.2 40.2 11 38.8 10.4 37.6 10.8 36.4 12.4 37L19.6 38.4 18.4 27C18.2 25.2 19.3 23.7 21 23.4Z`}),(0,q.jsx)(`path`,{fill:OQ,d:`M22.8 29.6 34.8 26.9C36.2 26.6 37 27.3 37.2 28.6L37.9 33C38.1 34.2 37.5 35 36.3 35.3L24.3 37.8C23 38.1 22.3 37.5 22.1 36.3L21.3 31.6C21.1 30.6 21.7 29.8 22.8 29.6Z`}),(0,q.jsxs)(`g`,{fill:OQ,children:[(0,q.jsx)(`circle`,{cx:`14.7`,cy:`18.45`,r:`1`}),(0,q.jsx)(`circle`,{cx:`17.6`,cy:`17.65`,r:`1`}),(0,q.jsx)(`circle`,{cx:`20.5`,cy:`16.85`,r:`1`}),(0,q.jsx)(`circle`,{cx:`17.9`,cy:`22.2`,r:`1`}),(0,q.jsx)(`circle`,{cx:`21`,cy:`21.5`,r:`1`}),(0,q.jsx)(`circle`,{cx:`24.1`,cy:`20.75`,r:`1`}),(0,q.jsx)(`circle`,{cx:`28.2`,cy:`25.3`,r:`1`})]}),(0,q.jsx)(`circle`,{fill:CQ,cx:`21.7`,cy:`26.6`,r:`1`}),(0,q.jsx)(`circle`,{fill:DQ,cx:`24.9`,cy:`25.9`,r:`1.05`}),(0,q.jsxs)(`g`,{fill:TQ,children:[(0,q.jsx)(`ellipse`,{cx:`8.8`,cy:`36.6`,rx:`3.6`,ry:`1.9`,transform:`rotate(22 8.8 36.6)`}),(0,q.jsx)(`path`,{d:`M12 41C10 41.5 7.5 44.5 7 46.5 7 48 8.5 49.5 10.5 50 12.5 50.5 13.5 50 15 48 15.5 47 16.5 47.5 19 50 22 49.5 22 46.5 22 45.5 20.5 45.5 17 45 16.5 44.5 16.5 44 16.5 42 13.5 40.5L12 41Z`}),(0,q.jsx)(`path`,{d:`M40 33C39 38 36 42 34.5 41.5 32.5 40.5 29.5 42 28.5 44 26 49 27.5 51.5 32.5 51 36 51 37 50 36 46.5 36 45 37 44.5 38 44.5 38.5 45.5 40.5 49 43.5 50 46.5 47.5 47.5 46.5 46 43.5 44 42 43 41.5 43.5 40.5 44.5 39.5 46 38 47 37.5L47 33Z`})]}),(0,q.jsx)(`ellipse`,{fill:TQ,cx:`46.4`,cy:`30.6`,rx:`8.1`,ry:`8.3`}),(0,q.jsxs)(`g`,{fill:kQ,children:[(0,q.jsx)(`rect`,{x:`45.05`,y:`26.95`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 46.2 29.3)`}),(0,q.jsx)(`rect`,{x:`49.25`,y:`26.4`,width:`2.25`,height:`4.6`,rx:`1.1`,transform:`rotate(-6 50.4 28.7)`})]}),(0,q.jsx)(`path`,{fill:CQ,d:`M46.8 32.2H51C51 34.3 50 35.4 48.9 35.4S46.8 34.3 46.8 32.2Z`,transform:`rotate(-8 48.9 33.5)`}),(0,q.jsx)(`path`,{fill:`none`,stroke:DQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M50.9 17.7 50.5 19.7 M55.2 20.1 53.4 21.9 M56.5 24.5 55.7 24.7`})]}),allApps:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:CQ,x:`7`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 18.6 18.6)`}),(0,q.jsx)(`rect`,{fill:wQ,x:`33.9`,y:`7.25`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 45.5 18.6)`}),(0,q.jsx)(`rect`,{fill:TQ,x:`7`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(6.2 18.6 45.5)`}),(0,q.jsx)(`rect`,{fill:DQ,x:`33.9`,y:`34.15`,width:`23.2`,height:`22.7`,rx:`4.6`,transform:`rotate(-6.2 45.5 45.5)`})]}),search:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,stroke:wQ,strokeWidth:`6.5`,d:`M37 37.5 43 43.5`}),(0,q.jsx)(`path`,{fill:`none`,stroke:CQ,strokeWidth:`12.6`,strokeLinecap:`round`,d:`M44.2 43.8 51.4 51.8`}),(0,q.jsx)(`path`,{fill:`none`,stroke:DQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M47.2 42.4 52.8 47.8`}),(0,q.jsx)(`ellipse`,{fill:wQ,cx:`25.6`,cy:`24.6`,rx:`19.25`,ry:`18.6`}),(0,q.jsx)(`ellipse`,{fill:OQ,cx:`25.2`,cy:`24.1`,rx:`14.2`,ry:`13.6`})]}),browser:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:CQ,x:`5.9`,y:`6.15`,width:`52.2`,height:`51.7`,rx:`5.5`}),(0,q.jsx)(`path`,{fill:OQ,d:`M10 16.5H29.4C30.3 16.1 31 14.4 31.8 12.5 32.5 10.9 33.2 10 34.5 10H52.2C53.4 10 54 10.7 54 12V16.5C55.2 16.5 56 17.1 56 18.3V52.4C56 53.7 55.1 54.6 53.8 54.6H10.2C8.9 54.6 8 53.7 8 52.4V18.2C8 17.1 8.7 16.5 10 16.5Z`}),(0,q.jsx)(`circle`,{fill:DQ,cx:`12.2`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:wQ,cx:`18.6`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:EQ,cx:`25.1`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:TQ,cx:`32`,cy:`34.9`,r:`14.5`}),(0,q.jsxs)(`g`,{fill:`none`,stroke:OQ,strokeWidth:`3`,children:[(0,q.jsx)(`ellipse`,{cx:`32`,cy:`34.9`,rx:`7.7`,ry:`13.3`}),(0,q.jsx)(`path`,{d:`M17.5 34.9H46.5`})]})]}),internet:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`ellipse`,{fill:`none`,stroke:DQ,strokeWidth:`4.4`,cx:`32.2`,cy:`30.2`,rx:`25.6`,ry:`8.1`,transform:`rotate(-20.8 32.2 30.2)`}),(0,q.jsx)(`circle`,{fill:wQ,cx:`32`,cy:`32`,r:`21.1`}),(0,q.jsxs)(`g`,{fill:`none`,stroke:OQ,strokeWidth:`3`,children:[(0,q.jsx)(`ellipse`,{cx:`32`,cy:`31.8`,rx:`12.2`,ry:`18.7`}),(0,q.jsx)(`path`,{d:`M32 13.1V50.5M15 20.4Q32 29 49 20.4M12.5 39Q32 44.6 51.5 39`})]}),(0,q.jsx)(`path`,{fill:`none`,stroke:DQ,strokeWidth:`4.4`,d:`M6.6 30.2A25.6 8.1 0 0 0 57.8 30.2`,transform:`rotate(-20.8 32.2 30.2)`})]}),members:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`circle`,{fill:wQ,cx:`41.9`,cy:`22.85`,r:`12.2`}),(0,q.jsx)(`path`,{fill:wQ,d:`M36 34C33.8 34.8 32.2 35.8 31 37 37.5 39.5 40.5 43.5 40.5 49.5V53.5H54.5C57 53.5 58 51 58 47.5 58 40 55 35.5 49 34Z`}),(0,q.jsx)(`circle`,{fill:CQ,cx:`22.95`,cy:`27.6`,r:`12.85`}),(0,q.jsx)(`path`,{fill:CQ,d:`M15.5 38C10.5 39 7.5 42.5 6.5 47 5.5 50.5 6 53.5 8.5 53.5H38.5C42 52 40 43 36 40 34.5 39 32 38 31 38Z`}),(0,q.jsxs)(`g`,{fill:kQ,children:[(0,q.jsx)(`circle`,{cx:`18.3`,cy:`28`,r:`1.6`}),(0,q.jsx)(`circle`,{cx:`27.9`,cy:`28`,r:`1.6`}),(0,q.jsx)(`circle`,{cx:`39.1`,cy:`23.05`,r:`1.55`}),(0,q.jsx)(`circle`,{cx:`47.25`,cy:`23.05`,r:`1.55`})]})]}),sell:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:DQ,d:`M6.4 41.2V48.4C6.4 51.4 13.2 54 21.8 54S37.2 51.4 37.2 48.4V41.2C37.2 37.8 30.4 35 21.8 35S6.4 37.8 6.4 41.2Z`}),(0,q.jsx)(`ellipse`,{fill:OQ,cx:`21.9`,cy:`40.8`,rx:`13.2`,ry:`3.6`}),(0,q.jsxs)(`g`,{transform:`rotate(-3 22.5 30) translate(0.5 0)`,children:[(0,q.jsx)(`path`,{fill:DQ,d:`M7.5 26V34C7.5 37.3 14.2 40 22.5 40S37.5 37.3 37.5 34V26C37.5 22.7 30.8 20 22.5 20S7.5 22.7 7.5 26Z`}),(0,q.jsx)(`ellipse`,{fill:OQ,cx:`23.7`,cy:`26.55`,rx:`13.05`,ry:`4.4`})]}),(0,q.jsxs)(`g`,{transform:`translate(46.3 40.3) rotate(-25)`,children:[(0,q.jsx)(`path`,{fill:CQ,d:`M-8.5-10Q-8.5-12-7-13L-1.5-16.3Q0-17.2 1.5-16.3L7-13Q8.5-12 8.5-10V9Q8.5 12 5.5 12H-5.5Q-8.5 12-8.5 9Z`}),(0,q.jsx)(`circle`,{fill:OQ,cx:`0`,cy:`-10.7`,r:`2.2`})]}),(0,q.jsx)(sQ,{fill:DQ,transform:`translate(38.2 18.6) scale(1.1 .86)`}),(0,q.jsx)(sQ,{fill:DQ,transform:`translate(42.8 21.2) rotate(45) scale(1.1 .85)`})]}),schedule:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:OQ,x:`6`,y:`11`,width:`47.6`,height:`44`,rx:`6`}),(0,q.jsx)(`path`,{fill:CQ,d:`M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z`}),(0,q.jsxs)(`g`,{fill:OQ,children:[(0,q.jsx)(`circle`,{cx:`16.1`,cy:`16.15`,r:`3.4`}),(0,q.jsx)(`circle`,{cx:`43.4`,cy:`16.15`,r:`3.4`})]}),(0,q.jsxs)(`g`,{fill:wQ,children:[(0,q.jsx)(`rect`,{x:`13.6`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`}),(0,q.jsx)(`rect`,{x:`40.9`,y:`6`,width:`5`,height:`11.2`,rx:`2.5`})]}),(0,q.jsxs)(`g`,{fill:TQ,children:[(0,q.jsx)(`rect`,{x:`11.1`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`20.7`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`30.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`20.7`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`30.4`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`11.1`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`30.4`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,q.jsxs)(`g`,{fill:EQ,children:[(0,q.jsx)(`rect`,{x:`40.4`,y:`25.1`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`11.1`,y:`33.9`,width:`6.9`,height:`6.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{x:`20.7`,y:`42.7`,width:`6.9`,height:`6.6`,rx:`1.8`})]}),(0,q.jsx)(`circle`,{fill:DQ,cx:`45.5`,cy:`45.6`,r:`12.2`}),(0,q.jsx)(`path`,{fill:`none`,stroke:kQ,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`M45.1 39.3V46.2L51.3 49.8`}),(0,q.jsx)(`circle`,{fill:kQ,cx:`45.1`,cy:`46.2`,r:`2.5`})]}),loop:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{stroke:CQ},strokeWidth:`6`,strokeLinecap:`round`,d:`M47.5 14.5C43 11 37.5 9 32 9 19.5 9 9 19.5 9 32S19.5 55 32 55 55 44.5 55 32`}),(0,q.jsx)(`path`,{style:{fill:CQ},d:`M53.5 21.5Q54.5 20 55 22L58 33Q58.5 35 56.5 34.5L48.5 32.5Q47 32 48 30.5Z`}),(0,q.jsx)(`g`,{transform:`translate(18 21) scale(.28)`,children:(0,q.jsx)(fQ,{fill:wQ})}),(0,q.jsxs)(`g`,{style:{fill:OQ},children:[(0,q.jsx)(`rect`,{x:`25`,y:`27.5`,width:`14`,height:`3`,rx:`1.5`}),(0,q.jsx)(`rect`,{x:`25`,y:`33.5`,width:`9`,height:`3`,rx:`1.5`})]})]}),fungi:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`ellipse`,{fill:OQ,cx:`33.5`,cy:`43.6`,rx:`18.6`,ry:`14.4`,transform:`rotate(-6 33.5 43.6)`}),(0,q.jsx)(`path`,{fill:CQ,d:`M29.5 6.5C22 7.5 16 11 11 18.5 4 29 4.6 39.6 13.5 42.2 24 45 44 40.5 54 34.6 57.6 32.6 58.6 29.2 57.5 25 56.5 20 53 16 48.5 13 43.5 8 37 5.5 29.5 6.5Z`}),(0,q.jsxs)(`g`,{fill:OQ,children:[(0,q.jsx)(`ellipse`,{cx:`29`,cy:`15.7`,rx:`8.7`,ry:`6.3`,transform:`rotate(-15.5 29 15.7)`}),(0,q.jsx)(`ellipse`,{cx:`50.8`,cy:`20.1`,rx:`6.5`,ry:`3.5`,transform:`rotate(51.6 50.8 20.1)`}),(0,q.jsx)(`ellipse`,{cx:`13`,cy:`26.8`,rx:`4.2`,ry:`3.3`,transform:`rotate(-54.5 13 26.8)`})]}),(0,q.jsxs)(`g`,{fill:kQ,transform:`translate(26.6 46.6) scale(1.1) translate(-33.7 -38.5)`,children:[(0,q.jsx)(`rect`,{x:`31.85`,y:`35.9`,width:`3.75`,height:`5.25`,rx:`1.85`}),(0,q.jsx)(`path`,{d:`M 47.4 34.3 C 46 35 44.6 35.8 43.5 36.7 42.9 37.2 43.2 38.3 44 38.4 45.2 38.6 46.5 38.6 47.7 38.4 48.4 38.3 48.3 37.3 47.6 37.3 46.6 37.4 45.7 37.4 45 37.3 45.9 36.7 46.9 36.1 48 35.6 48.7 35.3 48.2 34 47.4 34.3 Z`}),(0,q.jsx)(`path`,{d:`M 37.4 41.1 C 38.6 44.3 42.6 44.3 43.6 40.5 43.7 40 43.1 39.8 42.9 40.3 41.9 42.8 39.1 42.9 38.3 40.7 38.1 40.2 37.3 40.5 37.4 41.1 Z`})]})]})};function jQ({name:e,size:t}){return(0,q.jsx)(`svg`,{viewBox:`0 0 64 64`,width:t,height:t,fill:`none`,stroke:`none`,"aria-hidden":`true`,focusable:`false`,"data-sigil":e,children:AQ[e]})}function MQ(e){let t=2166136261;for(let n of e)t^=n.codePointAt(0)??0,t=Math.imul(t,16777619)>>>0;return t}var NQ=[`primary`,`secondary`,`accent`,`info`,`success`,`warning`];function PQ(e){return NQ[MQ(e)%NQ.length]??`primary`}var FQ=(0,M.forwardRef)(function({className:e,name:t,seed:n,size:r=`default`,subject:i=`actor`,variant:a=`initial`,...o},s){let c=Array.from(t.trim())[0]?.toLocaleUpperCase()??`?`;return(0,q.jsx)(`span`,{"aria-hidden":`true`,...o,className:Y(`caps-monogram`,e),"data-subject":i===`actor`?void 0:i,"data-size":r==="default"?void 0:r,"data-tone":PQ(n??t),ref:s,children:a===`specimen`?(0,q.jsx)(`svg`,{viewBox:`0 0 48 48`,width:`80%`,height:`80%`,fill:`none`,"aria-hidden":`true`,children:(0,q.jsxs)(`g`,{transform:`rotate(${String((n??t).split(``).reduce((e,t)=>e+(t.codePointAt(0)??0),0)%360)} 24 24)`,stroke:`currentColor`,strokeWidth:`1.5`,children:[Array.from({length:20},(e,t)=>(0,q.jsx)(`path`,{d:`M24 19 Q19 12 24 5`,transform:`rotate(${String(t*18)} 24 24)`},t)),(0,q.jsx)(`circle`,{cx:`24`,cy:`24`,r:`5`})]})}):c})}),IQ=(0,M.createContext)(null),LQ=(0,M.createContext)(void 0);function RQ(e){let t=(0,M.useContext)(LQ);return e??t}var zQ=(0,M.forwardRef)(function({service:e,src:t,activity:n,expression:r,appearance:i,renderStyle:a,performance:o,timeMs:s,paused:c=!1,onState:l,...u},d){let f=RQ(s),p=f!==void 0,m=(0,M.useContext)(IQ),h=e??m;if(!h)throw Error(`Sprite needs a configured SpriteProvider or service`);let g=(0,M.useRef)(null),_=(0,M.useRef)(null),v=(0,M.useRef)(l);return v.current=l,(0,M.useImperativeHandle)(d,()=>{if(!g.current)throw Error(`Sprite host is not mounted`);return g.current}),(0,M.useEffect)(()=>{if(!g.current)return;let e=h.mount(g.current),t=e.subscribe(e=>{g.current&&(g.current.dataset.spriteStatus=e.status),v.current?.(e)});return _.current=e,()=>{t(),e.dispose().catch(e=>{console.error(`Sprite cleanup failed`,e)}),_.current=null}},[h]),(0,M.useEffect)(()=>{let e=_.current;if(!e)return;let s={src:t};n!==void 0&&(s={...s,activity:n}),r!==void 0&&(s={...s,expression:r}),i!==void 0&&(s={...s,appearance:i}),a!==void 0&&(s={...s,renderStyle:a}),o!==void 0&&(s={...s,performance:o}),f!==void 0&&(s={...s,timeMs:f}),e.set(s)},[h,t,n,r,i,a,o,f]),(0,M.useEffect)(()=>{_.current?.pause(c||p)},[h,c,p]),(0,q.jsx)(`div`,{...u,ref:g})});function BQ(e){return{src:{local:e.character},appearance:e.appearance,expression:e.expression,renderStyle:e.renderStyle}}function VQ(e){for(let[t,n]of Object.entries({maxBytes:e.maxBytes,maxTotalBytes:e.maxTotalBytes,maxRequests:e.maxRequests}))if(!Number.isSafeInteger(n)||n<=0)throw Error(`Avatar ${t} must be a positive safe integer`);let t=new Set(e.allowedOrigins.map(e=>new URL(e).origin)),n=e.fetch??globalThis.fetch;return()=>{let r=0,i=0;return async(a,o,s=e.baseURL)=>{let c=new URL(a,s);if(![`http:`,`https:`].includes(c.protocol)||!t.has(c.origin)||c.username||c.password)throw Error(`Avatar asset is not admitted: ${c.origin}`);if(i+=1,i>e.maxRequests)throw Error(`Avatar asset request limit reached`);let l=await n(c.href,{signal:o,redirect:`error`});if(!l.ok)throw Error(`Avatar asset request failed: ${String(l.status)}`);let u=Number(l.headers.get(`content-length`));if(u>e.maxBytes||u>e.maxTotalBytes-r)throw await l.body?.cancel(),Error(`Avatar asset exceeds the byte limit`);let d=l.body?.getReader();if(!d)throw Error(`Avatar asset has no response body`);let f=[],p=0;try{for(;;){o.throwIfAborted();let t=await d.read();if(t.done)break;if(p+=t.value.byteLength,p>e.maxBytes)throw Error(`Avatar asset exceeds the byte limit`);if(t.value.byteLength>e.maxTotalBytes-r)throw Error(`Avatar selection exceeds the total byte limit`);r+=t.value.byteLength,f.push(t.value)}}catch(e){let t=await d.cancel().then(()=>({kind:`cancelled`}),e=>({kind:`failed`,error:e instanceof Error?e:Error(String(e))}));throw t.kind===`failed`?AggregateError([e,t.error],`Avatar asset read and cancellation failed`,{cause:e}):e}finally{d.releaseLock()}let m=new Uint8Array(p),h=0;for(let e of f)m.set(e,h),h+=e.byteLength;return{url:c.href,bytes:m,contentType:l.headers.get(`content-type`)??`application/octet-stream`}}}}var HQ=(e,t)=>{let n=jr.safeParse(e);return n.success?{kind:`local`,key:n.data.local}:{kind:`remote`,url:new URL(k().parse(e),t).href}},UQ=e=>e instanceof Error?e:Error(String(e),{cause:e}),WQ=e=>ps(e)?UQ(es(e.cause)):Error(`Unexpected Sprite success`);function GQ(e){let t=e.maxPixels??4194304;if(!Number.isSafeInteger(t)||t<=0)throw Error(`Sprite pixel limit must be a positive safe integer`);let n=e.assets??{baseURL:`https://sprite.invalid/`,allowedOrigins:[],maxBytes:1,maxTotalBytes:1,maxRequests:1},r=VQ(n),i=new WeakSet,a=new WeakMap,o=e=>{let t=HQ(e,n.baseURL);return t.kind===`remote`?t.url:`local:${t.key}`};return{mount(s){if(i.has(s))throw Error(`A Sprite already owns this target`);i.add(s);let c=Kt(Ts()),l=new Set,u={status:`empty`},d,f,p=0,m=!1,h,g,_,v=!1,y=!1,b=s.ownerDocument.defaultView?.matchMedia(`(prefers-reduced-motion: reduce)`),x=e=>{if(!(v&&e.status!==`destroyed`)){u=e;for(let t of l)try{t(e)}catch(e){console.error(`Sprite state observer failed`,e)}}},S=e=>{f?.controller.abort(),f?.holder.remove(),x({status:`error`,error:e}),ee().catch(t=>{x({status:`error`,error:AggregateError([e,t],`Avatar failed and cleanup also failed`)})})},C=Py(s),w=()=>{let e=y||s.ownerDocument.hidden||b?.matches===!0;C.still(e);try{f?.native?.pause(e)}catch(e){S(UQ(e))}};Kt(Os(c,Qt(()=>{s.ownerDocument.removeEventListener(`visibilitychange`,w),b?.removeEventListener(`change`,w),C.dispose()}))),s.ownerDocument.addEventListener(`visibilitychange`,w),b?.addEventListener(`change`,w);let ee=async()=>{if(g)return g;let e=f;if(!e)return;f=void 0,e.controller.abort(),e.holder.remove();let t=ye(As(e.scope,ds)).then(e=>{if(ps(e))throw WQ(e)});g=t;try{await t}finally{g===t&&(g=void 0)}},te=e=>{let t=e.native,n=e.document,r=d;if(!t||!n||!r||f!==e)return;let i=r.activity??`idle`,a=r.expression??t.expressions[0]??null,o,s;try{o=Vt(n.controls,r.appearance),s=cy.parse(r.renderStyle??`plain`)}catch(e){let t=UQ(e);u.status===`ready`?u.updateError?.message!==t.message&&x({...u,updateError:t}):S(t);return}let c={requestedActivity:i,requestedExpression:a,activity:t.activities.includes(i)?i:`idle`,expression:a!==null&&t.expressions.includes(a)?a:t.expressions[0]??null,appearance:o,renderStyle:s,fallback:!t.activities.includes(i)||a!==null&&!t.expressions.includes(a)},l=r.performance===void 0?c:{...c,performance:r.performance};r.timeMs!==void 0&&(l={...l,timeMs:r.timeMs});let p=JSON.stringify([l.activity,l.expression,l.appearance,l.timeMs]);if(C.set(s,e.holder),p!==e.appliedKey||r.performance!==e.appliedPerformance||u.status!==`ready`||u.presentation.renderStyle!==s||u.updateError!==void 0||u.presentation.requestedActivity!==i||u.presentation.requestedExpression!==a)try{if((p!==e.appliedKey||r.performance!==e.appliedPerformance)&&t.set(l),e.appliedKey=p,e.appliedPerformance=r.performance,w(),f===e){let t={status:`ready`,document:n,presentation:l};x(e.progress===void 0?t:{...t,progress:e.progress})}}catch(e){S(UQ(e))}},ne=async(i,a,o)=>{let c=r(),l=Kt(Ts()),d=new AbortController,m=s.ownerDocument.createElement(`div`);m.style.cssText=`width:100%;height:100%;position:relative`;let h={key:a,scope:l,controller:d,holder:m};f=h,Kt(Os(l,Qt(()=>{m.remove()}))),s.append(m);let g=En(function*(){let r,a,o=n.baseURL,s=HQ(i.src,n.baseURL);if(s.kind===`remote`){let t=yield*Rn({try:()=>c(s.url,d.signal),catch:UQ});o=t.url,r=ui.parse(JSON.parse(new TextDecoder().decode(t.bytes)));let n=e.renderers&&Object.hasOwn(e.renderers,r.renderer)?e.renderers[r.renderer]:void 0;if(!n)throw Error(`Renderer is not installed: ${r.renderer}`);a=(yield*Rn({try:n,catch:UQ})).default}else{let t=s.key,n=e.characters&&Object.hasOwn(e.characters,t)?e.characters[t]:void 0;if(!n)throw Error(`Character is not installed: ${t}`);let i=yield*Rn({try:n,catch:UQ});r=ui.parse(i.document),a=i.render}d.signal.throwIfAborted();let l=yield*a({target:m,document:r,signal:d.signal,maxPixels:t,reportError:e=>{f===h&&!d.signal.aborted&&S(e)},reportProgress:e=>{f!==h||d.signal.aborted||(h.progress=e,u.status===`ready`&&x({...u,progress:e}))},assetURL:e=>En(function*(){let t=yield*Rn({try:()=>c(e,d.signal,o),catch:UQ});return yield*fe(Qt(()=>URL.createObjectURL(new Blob([t.bytes],{type:t.contentType}))),e=>Qt(()=>{URL.revokeObjectURL(e)}))})});if(!l.activities.includes(`idle`))throw Error(`Character has no idle fallback`);return l.pause(!0),{native:l,document:r}}).pipe(Ds(l)),_=await ye(g,{signal:d.signal});if(!(v||o!==p||f!==h)){if(ps(_)){let e=WQ(_);try{await ee(),x({status:`error`,error:e})}catch(t){x({status:`error`,error:AggregateError([e,t],`Avatar load and cleanup failed`)})}return}h.native=_.value.native,h.document=_.value.document,te(h)}},re=async()=>{let e=e=>v||e!==p;for(;m&&!v;){m=!1;let t=p;if(await ee(),e(t)||!d)continue;let n=await a.get(s);if(n?.kind===`failed`)throw n.error;e(t)||(x({status:`loading`}),await ne(d,o(d.src),t))}},ie=()=>{m=!0,f?.controller.abort(),f?.holder.remove(),!h&&(h=re().catch(e=>{x({status:`error`,error:UQ(e)})}).finally(()=>{h=void 0,m&&!v&&ie()}))};return{get state(){return u},subscribe(e){return l.add(e),()=>l.delete(e)},set(e){if(v)throw Error(`Sprite is destroyed`);d=e;let t=o(e.src);f?.key===t&&u.status===`ready`?te(f):(f?.key!==t||u.status===`error`)&&(p+=1,ie())},pause(e){if(v)throw Error(`Sprite is destroyed`);y=e,w()},dispose(){return _||(v=!0,p+=1,i.delete(s),f?.controller.abort(),f?.holder.remove(),x({status:`destroyed`}),_=(async()=>{await h,await ee();let e=await ye(As(c,ds));if(ps(e))throw WQ(e)})(),a.set(s,_.then(()=>({kind:`closed`}),e=>({kind:`failed`,error:UQ(e)}))),_)}}}}}var KQ=GQ({characters:{mushroom:async()=>(await Wz(async()=>{let{default:e}=await import(`./mushroom-Czy5e_rO.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4]))).default,cat:async()=>(await Wz(async()=>{let{default:e}=await import(`./cat-CsQptK53.js`);return{default:e}},__vite__mapDeps([5,1,2,3,4,6,7,8]))).default,burger:async()=>(await Wz(async()=>{let{default:e}=await import(`./burger-DHwVN0-y.js`);return{default:e}},__vite__mapDeps([9,1,2,3,4,6,7,8]))).default}}),qQ=(0,M.memo)(function({activity:e=`idle`,avatar:t,className:n,name:r,size:i=24,timeMs:a}){let o=RQ(a),[s,c]=(0,M.useState)(!1),l=(0,M.useMemo)(()=>BQ(t),[t]);return(0,q.jsxs)(`span`,{"aria-hidden":`true`,className:`relative inline-block shrink-0 ${n??``}`,"data-agent-head":s?`ready`:`loading`,style:{height:i,width:i},children:[s?null:(0,q.jsx)(FQ,{className:`absolute inset-0`,name:r,seed:r}),(0,q.jsx)(zQ,{activity:e,...o===void 0?{}:{timeMs:o},appearance:l.appearance,className:`absolute inset-0`,expression:l.expression,onState:e=>{c(e.status===`ready`)},paused:o!==void 0||e===`idle`,renderStyle:l.renderStyle,service:KQ,src:l.src})]})});function JQ(e,t){e!==null&&e.showToast({message:t.message,tone:t.variant}).catch(e=>{console.error(`Chat toast failed`,e)})}export{$Y as $,Zh as $a,jT as $i,iA as $n,Mu as $o,VD as $r,JM as $t,TZ as A,ob as Aa,cD as Ai,nj as An,Vg as Ao,JO as Ar,hK as At,DX as B,yv as Ba,LE as Bi,UA as Bn,Fg as Bo,AO as Br,CW as Bt,NZ as C,US as Ca,uD as Ci,mj as Cn,Eh as Co,ak as Cr,Xi as Cs,mJ as Ct,kZ as D,bS as Da,lD as Di,ij as Dn,P as Do,ek as Dr,vq as Dt,AZ as E,Xx as Ea,aD as Ei,$A as En,Lh as Eo,QO as Er,yq as Et,JX as F,Jv as Fa,nD as Fi,lj as Fn,Ag as Fo,BO as Fr,UW as Ft,PX as G,m_ as Ga,hE as Gi,jA as Gn,sg as Go,yO as Gr,Wz as Gt,RX as H,ov as Ha,bE as Hi,PA as Hn,vg as Ho,kO as Hr,vW as Ht,qX as I,jv as Ia,tD as Ii,aj as In,jg as Io,LO as Ir,qW as It,AX as J,I_ as Ja,nE as Ji,wA as Jn,hg as Jo,iO as Jr,KR as Jt,FX as K,T_ as Ka,pE as Ki,DA as Kn,t_ as Ko,_O as Kr,zz as Kt,GX as L,Ev as La,WE as Li,JA as Ln,Pg as Lo,FO as Lr,HW as Lt,bZ as M,zy as Ma,oD as Mi,sj as Mn,Fh as Mo,UO as Mr,ZG as Mt,vZ as N,Uy as Na,rD as Ni,cj as Nn,Ng as No,WO as Nr,$ as Nt,DZ as O,ub as Oa,gD as Oi,rj as On,Rh as Oo,YO as Or,IK as Ot,uZ as P,oy as Pa,iD as Pi,QA as Pn,wg as Po,VO as Pr,$W as Pt,rX as Q,V as Qa,PT as Qi,yA as Qn,Fu as Qo,XD as Qr,XM as Qt,WX as R,xv as Ra,VE as Ri,qA as Rn,Mg as Ro,NO as Rr,WW as Rt,MZ as S,eC as Sa,bD as Si,Sj as Sn,W as So,ik as Sr,Qi as Ss,TJ as St,OZ as T,LS as Ta,mD as Ti,XA as Tn,Ih as To,$O as Tr,Wi as Ts,Sq as Tt,NX as U,W_ as Ua,vE as Ui,MA as Un,I as Uo,DO as Ur,PV as Ut,jX as V,_v as Va,NE as Vi,NA as Vn,xg as Vo,OO as Vr,SW as Vt,LX as W,B_ as Wa,mE as Wi,AA as Wn,F as Wo,xO as Wr,sV as Wt,kX as X,c_ as Xa,KT as Xi,gA as Xn,Op as Xo,tO as Xr,ZM as Xt,IX as Y,l_ as Ya,eE as Yi,_A as Yn,nm as Yo,rO as Yr,ez as Yt,iX as Z,o_ as Za,UT as Zi,vA as Zn,zu as Zo,$D as Zr,QM as Zt,VZ as _,cC as _a,_D as _i,Bj as _n,Xh as _o,pk as _r,nc as _s,DJ as _t,zQ as a,uT as aa,GD as ai,EM as an,H as ao,wk as ar,Ou as as,ZY as at,BZ as b,oC as ba,pD as bi,Aj as bn,Jh as bo,ok as br,Da as bs,EJ as bt,nQ as c,Y as ca,LD as ci,pM as cn,Yh as co,Ck as cr,Zf as cs,YY as ct,tQ as d,_C as da,BD as di,iM as dn,$h as do,vk as dr,xu as ds,oY as dt,AT as ea,RD as ei,BM as en,Cg as eo,nA as er,Nu as es,UY as et,ZZ as f,uC as fa,AD as fi,rM as fn,R as fo,_k as fr,El as fs,eY as ft,IZ as g,iC as ga,xD as gi,Vj as gn,Kg as go,ck as gr,Vs as gs,VJ as gt,UZ as h,qS as ha,zD as hi,Hj as hn,tg as ho,fk as hr,lc as hs,YJ as ht,BQ as i,_T as ia,HD as ii,DM as in,L as io,Tk as ir,Au as is,JY as it,xZ as j,Fy as ja,sD as ji,oj as jn,gg as jo,GO as jr,eK as jt,EZ as k,sb as ka,vD as ki,ZA as kn,Vh as ko,qO as kr,gK as kt,rQ as l,sT as la,DD as li,fM as ln,U as lo,Ok as lr,Xf as ls,WY as lt,YZ as m,nC as ma,MD as mi,Uj as mn,Wg as mo,hk as mr,dc as ms,XJ as mt,qQ as n,wT as na,KD as ni,FM as nn,r_ as no,Xk as nr,ju as ns,GY as nt,jQ as o,pT as oa,UD as oi,gM as on,qh as oo,Ek as or,Lu as os,BY as ot,XZ as p,ZS as pa,jD as pi,eM as pn,B as po,gk as pr,Yc as ps,$J as pt,MX as q,E_ as qa,rE as qi,TA as qn,Nh as qo,aO as qr,qR as qt,KQ as r,vT as ra,CD as ri,kM as rn,i_ as ro,Zk as rr,Iu as rs,KY as rt,$Z as s,CT as sa,wD as si,hM as sn,zg as so,Ak as sr,Yf as ss,qY as st,JQ as t,kT as ta,TD as ti,zM as tn,G as to,eA as tr,Du as ts,XY as tt,eQ as u,FC as ua,OD as ui,cM as un,z as uo,Sk as ur,Mf as us,lY as ut,RZ as v,GS as va,dD as vi,Nj as vn,ag as vo,dk as vr,Go as vs,CJ as vt,jZ as w,IS as wa,hD as wi,uj as wn,Th as wo,ZO as wr,Yi as ws,bq as wt,JZ as x,fC as xa,fD as xi,xj as xn,cg as xo,rk as xr,la as xs,wJ as xt,LZ as y,$S as ya,yD as yi,zj as yn,ig as yo,mk as yr,Ta as ys,OJ as yt,UX as z,bv as za,BE as zi,WA as zn,K as zo,PO as zr,LW as zt};