@fungi.computer/grove 0.22.4 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,56 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mushroom-CXyBHPQt.js","assets/document-DZTTyAQ6.js","assets/renderer-HJftscjc.js","assets/rolldown-runtime-CbXtAM7H.js","assets/document-Cfd1McDA.js","assets/cat-mAkMN0vn.js","assets/base-face-9ObbS-xX.js","assets/index-CoFq1Nxd.js","assets/index-CNv2vz-v.css","assets/burger-OT5yDfeg.js"])))=>i.map(i=>d[i]);
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,Ar 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,Ci as y,Cn as b,Co as x,Ct as S,Da as C,Di as w,Dn as ee,Do as T,Dr as te,Dt as ne,Ea as re,Ei as E,En as ie,Eo as ae,Et as oe,F as se,Fa as D,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 O,Ha as _e,Hi as ve,Hn as ye,Hr as be,Ht as xe,Ii as Se,In as Ce,It as we,J as Te,Ji as Ee,Jn as De,Jr as Oe,Jt as k,K as ke,Ki as Ae,Kn as je,Kt as Me,L as Ne,La as Pe,Li as Fe,Ln as Ie,Lt as Le,M as Re,Ma as ze,Mi as Be,Mn as Ve,Mr as He,Mt as Ue,N as We,Na as Ge,Ni as Ke,Nn as qe,Nr as Je,Nt as Ye,Oa as Xe,On as Ze,Or as Qe,Ot as $e,P as et,Pa as tt,Pi as nt,Pn as rt,Pt as it,Q as at,Qa as ot,Qi as st,Qn as ct,Qr as lt,Qt as ut,R as dt,Ra as ft,Ri as pt,Rn as mt,Rr as ht,Rt as gt,S as _t,Sa as vt,Si as yt,Sn as bt,So as xt,Sr as St,St as Ct,Ta as wt,Ti as Tt,Tn as Et,To as Dt,Tr as Ot,Tt as kt,Ua as At,Ui as jt,Un as Mt,Ur as Nt,Ut as Pt,V as Ft,Vi as It,Vn as Lt,Vr as Rt,Vt as zt,W as Bt,Wa as Vt,Wi as Ht,Wn as Ut,Wt,X as Gt,Xi as Kt,Xn as qt,Xr as Jt,Xt as Yt,Y as Xt,Yn as Zt,Yr as Qt,Yt as $t,Z as en,Za as tn,Zi as nn,Zn as rn,Zr as an,Zt as on,_ as sn,_a as cn,_i as ln,_n as un,_o as dn,_r as fn,_t as pn,ai as mn,an as hn,ao as gn,ar as _n,at as vn,b as yn,bi as bn,bn as xn,bo as Sn,br as Cn,bt as wn,ci as Tn,cn as En,co as Dn,cr as On,ct as A,di as kn,dn as An,do as jn,dr as Mn,dt as Nn,ea as Pn,ei as Fn,en as In,eo as Ln,er as Rn,et as zn,fi as Bn,fn as Vn,fo as Hn,ft as Un,ga as Wn,gi as Gn,gn as Kn,go as qn,gr as Jn,gt as Yn,h as Xn,ha as Zn,hn as Qn,ho as $n,ht as er,i as tr,ii as nr,in as rr,io as ir,it as ar,ja as or,ji as sr,jn as cr,jt as lr,k as ur,ka as dr,ki as fr,kn as pr,kr as mr,kt as hr,li as gr,ln as _r,lo as vr,lr as yr,lt as br,m as xr,mi as Sr,mn as Cr,mo as wr,mr as Tr,mt as Er,n as Dr,ni as Or,nn as kr,no as Ar,nt as jr,oi as Mr,on as Nr,oo as Pr,or as Fr,ot as Ir,p as Lr,pa as Rr,pi as zr,pn as Br,po as Vr,pr as Hr,pt as Ur,q as Wr,qa as Gr,qi as Kr,qn as qr,qr as Jr,qt as Yr,ri as Xr,rn as Zr,rr as Qr,rt as $r,si as ei,sn as ti,so as ni,sr as ri,st as ii,t as ai,ta as oi,ti as si,tn as ci,tr as li,tt as ui,ui as di,un as fi,uo as pi,ur as mi,ut as hi,v as gi,va as _i,vn as vi,vo as yi,vr as bi,vt as xi,wa as Si,wi as Ci,wn as wi,wo as Ti,wr as Ei,wt as Di,x as Oi,xa as ki,xn as Ai,xo as ji,xr as Mi,xt as Ni,ya as Pi,yi as Fi,yn as Ii,yo as Li,yt as Ri,za as j,zi,zn as Bi,zr as Vi,zt as Hi}from"./document-DZTTyAQ6.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 T(e,n){return{$$typeof:t,type:e.type,key:n,ref:e.ref,props:e.props,_owner:e._owner}}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function E(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ie(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===``?`.`+E(c,0):a,x(o)?(i=``,e!=null&&(i=e.replace(re,`$&/`)+`/`),ie(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=T(o,i+(!o.key||c&&c.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+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+E(s,l);c+=ie(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+E(s,l++),c+=ie(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 ae(e,t,n){if(e==null)return e;var r=[],i=0;return ie(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function oe(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 se={current:null},D={transition:null},ce={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:D,ReactCurrentOwner:C};function le(){throw Error(`act(...) is not supported in production builds of React.`)}e.Children={map:ae,forEach:function(e,t,n){ae(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return ae(e,function(){t++}),t},toArray:function(e){return ae(e,function(e){return e})||[]},only:function(e){if(!te(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=ce,e.act=le,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=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:oe}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},e.unstable_act=le,e.useCallback=function(e,t){return se.current.useCallback(e,t)},e.useContext=function(e){return se.current.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e){return se.current.useDeferredValue(e)},e.useEffect=function(e,t){return se.current.useEffect(e,t)},e.useId=function(){return se.current.useId()},e.useImperativeHandle=function(e,t,n){return se.current.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return se.current.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return se.current.useLayoutEffect(e,t)},e.useMemo=function(e,t){return se.current.useMemo(e,t)},e.useReducer=function(e,t,n){return se.current.useReducer(e,t,n)},e.useRef=function(e){return se.current.useRef(e)},e.useState=function(e){return se.current.useState(e)},e.useSyncExternalStore=function(e,t,n){return se.current.useSyncExternalStore(e,t,n)},e.useTransition=function(){return se.current.useTransition()},e.version=`18.3.1`})),Wi=t(((e,t)=>{t.exports=Ui()})),M=e(Wi(),1),Gi=dr(),Ki=s(()=>re(`status`,[D({status:or(`available`)}).strict(),D({status:or(`unavailable`),reason:j()}).strict()])),qi=Gi,Ji=s(()=>Pe(j(),qi)),Yi=e=>qi.parse(e),Xi=e=>Ji.parse(e),Zi=s(()=>D({code:j().min(1).max(160),message:j().min(1).max(512),details:qi.optional()}).strict()),Qi=e=>Zi.parse(e),$i=Ji,ea=s(()=>j().refine(e=>e.trim().length>0)),ta=Ki,na=s(()=>_e([D({type:or(`action`)}).strict(),D({type:or(`custom`),data:Ji}).strict(),D({type:or(`choice`),options:ki(D({value:qi,label:ea,description:ea.optional()}))}).strict(),D({type:or(`form`),submitLabel:ea.optional()}).strict(),D({type:or(`confirmation`),message:ea,confirmLabel:ea.optional(),cancelLabel:ea.optional()}).strict()])),ra=s(()=>D({inputSchema:$i.optional(),outputSchema:$i.optional(),presentation:na.optional()}).strict()),ia=s(()=>tt().int().refine(e=>Number.isSafeInteger(e))),aa=s(()=>D({hint:ea.pipe(j().max(120)),words:ki(D({word:j().regex(/^\S{1,64}$/u),description:ea.pipe(j().max(512)).optional(),arguments:Ji}).strict()).max(32).optional(),text:D({field:ea.pipe(j().max(120)),arguments:Ji,requestIdField:ea.pipe(j().max(120)).optional()}).strict().optional()}).strict().refine(e=>e.words!==void 0||e.text!==void 0,`slash arguments need words or text`)),oa=s(()=>D({order:ia.optional()}).strict()),sa=s(()=>D({bindings:D({order:ia.optional(),values:ki(ea).max(16)}).strict().optional(),agent:D({keybind:ea.optional(),order:ia.optional()}).strict().optional(),help:oa.optional(),menu:oa.optional(),palette:oa.optional(),slash:D({aliases:ki(ea).max(16),consumesDraft:Si().optional(),order:ia.optional(),arguments:aa.optional()}).strict().optional()}).strict()),ca=s(()=>D({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=s(()=>D({inputSchema:$i.optional(),outputSchema:$i.optional()}).strict()),da=j().min(1).brand(),fa=s(()=>D({commandId:da,command:D({namespace:j(),id:j()}).strict(),sourceId:j(),scope:j().optional(),title:j(),category:j(),description:j().optional(),order:tt(),availability:Ki,action:ua.optional(),keybind:j().optional()}).strict());ki(fa);var pa=8192,ma=ea.pipe(j().max(pa)),ha=ea.pipe(j().max(60)),ga=Vt({protocol:/^https?$/u}),_a=D({label:ma,value:ma}).strict(),va={summary:ma.optional(),facts:ki(_a).max(4).optional(),body:ma.optional(),bodyLabel:ma.optional(),details:ki(_a).max(24).optional()},ya=re(`type`,[D({type:or(`choice`),message:ha,...va,current:ma.optional(),collapsedGroup:ma.optional(),options:ki(D({value:ma,label:ma,description:ma.optional(),group:ma.optional(),destructive:or(!0).optional()}).strict()).min(1).max(256)}).strict(),D({type:or(`text`),message:ha,...va,placeholder:ma.optional(),secret:Si().optional()}).strict(),D({type:or(`confirmation`),message:ha,...va,confirmLabel:ma.optional(),cancelLabel:ma.optional(),destructive:or(!0).optional()}).strict(),D({type:or(`decision`),message:ha,...va,options:ki(D({value:ma,label:ma,description:ma.optional(),destructive:or(!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:Si().optional(),other:D({label:ma,placeholder:ma.optional(),maxLength:tt().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=s(()=>re(`type`,[D({type:or(`info`),message:ma,links:ki(D({url:ga,label:ma.optional()}).strict()).max(16).optional()}).strict(),D({type:or(`progress`),message:ma}).strict(),D({type:or(`handoff`),url:ga,code:ma.optional(),message:ma.optional()}).strict(),D({type:or(`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 D({selected:ki(j()).max(t.options.length),text:C(ea.pipe(j().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),Si()),text:e=>(ya.options[1].parse(e),j().max(pa)),choice:e=>{let t=ya.options[0].parse(e);return j().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,[Ke](){let e=Fo(this);return fr(Be(String(e.value)),sr(e.scale))},[w](e){return Oo(e)&&Bo(this,e)===0},toString(){return`BigDecimal(${Ho(this)})`},toJSON(){return{_id:`BigDecimal`,value:String(this.value),scale:this.scale}},[zr](){return this.toJSON()},pipe(){return oi(this,arguments)}},Oo=e=>nt(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 Vi(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=Oe,Ko=`~effect/encoding/EncodingError`,qo=class extends Go(`EncodingError`){[Ko]=Ko},Jo=ei,Yo=lt,Xo=an,Zo=Jt,Qo=Ve,$o=Vn,es=Cr,ts=Ze,ns=pr,rs=Br,is=mn,as=a,os=ti;Fr()(`effect/Cause/StackTrace`),Fr()(`effect/Cause/InterruptorStackTrace`);var ss=nr,cs=Xr,ls=Or,us=si,ds=bt,fs=Ai,ps=xn,ms=vi,hs={"~effect/Deferred":{_A:Kt,_E:Kt},pipe(){return oi(this,arguments)}},gs=function(){this.resumes=void 0,this.effect=void 0};gs.prototype=hs;var _s=()=>new gs,vs=()=>Zt(()=>_s()),ys=e=>fi(t=>e.effect?t(e.effect):(e.resumes??=[],e.resumes.push(t),Zt(()=>{let n=e.resumes;if(n===void 0)return;let r=n.indexOf(t);r>=0&&n.splice(r,1)}))),bs=Ee(2,(e,t)=>Zt(()=>Cs(e,t))),xs=Ee(2,(e,t)=>bs(e,Or(t))),Ss=Ee(2,(e,t)=>bs(e,nr(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=Mt,Es=Ut,Ds=mt,Os=h,ks=ye,As=Lt,js=Nr,Ms=Kn,Ns=`~effect/DateTime`,Ps=`~effect/DateTime/TimeZone`,Fs={[Ns]:Ns,pipe(){return oi(this,arguments)},[zr](){return this.toString()},toJSON(){return Ks(this).toJSON()}},Is={...Fs,_tag:`Utc`,[Ke](){return sr(this.epochMilliseconds)},[w](e){return Rs(e)&&e._tag===`Utc`&&this.epochMilliseconds===e.epochMilliseconds},toString(){return`DateTime.Utc(${Ks(this).toJSON()})`}};({...Fs});var Ls={[Ps]:Ps,[zr](){return this.toString()}};({...Ls}),{...Ls};var Rs=e=>nt(e,Ns),zs=e=>e._tag===`Utc`,Bs=e=>{let t=Object.create(Is);return t.epochMilliseconds=e,Object.defineProperty(t,"partsUtc",{value:void 0,enumerable:!1,writable:!0}),t},Vs=e=>{let t=e.getTime();if(Number.isNaN(t))throw new os(`Invalid date`);return Bs(t)},Hs=e=>{if(Rs(e))return e;if(e instanceof Date)return Vs(e);if(typeof e==`object`){if(`epochMilliseconds`in e)return Vs(new Date(e.epochMilliseconds));let t=new Date(0);return qs(t,e),Vs(t)}return typeof e==`string`&&!Us(e)?Vs(new Date(e+`Z`)):Vs(new Date(e))},Us=e=>/Z|GMT|[+-]\d{2}$|[+-]\d{2}:?\d{2}$|\]$/.test(e),Ws=u(Hs),Gs=e=>Bs(e.epochMilliseconds),Ks=e=>new Date(e.epochMilliseconds),qs=(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)},Js=e=>Ks(e).toISOString();globalThis.String;var Ys=e=>e.trim(),Xs=Ee(2,(e,t)=>An(e,ec,e=>t(e))),Zs=e=>e.reasons.some(Qs),Qs=e=>e._tag===`Fail`&&is(e.error),$s=e=>{let t,n=!1;for(let r of e.reasons)Qs(r)?t??=r.error:r._tag!==`Interrupt`&&(n=!0);return t===void 0?bi(e):n?bi(Yo(e.reasons.filter(e=>!Qs(e)))):Ei(t)},ec=e=>{let t=$s(e);return Cn(t)?t:Ei(t.success.value)},tc=e=>{let t=$s(e);return Cn(t)?cs(t.failure):ss(t.success.value)},nc=_n(`effect/Metric/CurrentMetricAttributes`,{defaultValue:()=>({})}),rc=_n(`effect/Metric/MetricRegistry`,{defaultValue:()=>new Map}),ic=`~effect/Metric`,ac=class{[ic]=ic;#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=yr(e,nc);t!==this.#e&&(this.#e=t,this.#t=fc(this,mc(this.attributes,t)));let n=yr(e,rc),r=n.get(this.#t);return me(r)&&(r={id:this.id,type:this.type,description:this.description,attributes:Object.keys(t).length>0?mc(this.attributes,t):this.attributes,hooks:this.createHooks()},n.set(this.#t,r)),r.hooks}pipe(){return oi(this,arguments)}},oc=BigInt(0),sc=class extends ac{type=`Counter`;#e;#t;constructor(e,t){super(e,t?.description,hc(t?.attributes)),this.#e=t?.bigint??!1,this.#t=t?.incremental??!1}createHooks(){let e=this.#e?oc:0,t=this.#t?this.#e?e=>e>=oc:e=>e>=0:e=>!0;return pc(()=>({count:e,incremental:this.#t}),n=>{t(n)&&(e+=n)})}},cc=class extends ac{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()}},lc=(e,t)=>new sc(e,t),uc=Ee(2,(e,t)=>Qn(n=>Zt(()=>e.updateUnsafe(t,n)))),dc=Ee(2,(e,t)=>{let n=gc(t);return new cc(e,t=>e.valueUnsafe(n(t)),(t,r)=>e.updateUnsafe(t,n(r)),(t,r)=>e.modifyUnsafe(t,n(r)))});function fc(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 pc(e,t,n){return{get:e,update:t,modify:n??t}}function mc(e,t){return{...hc(e),...hc(t)}}function hc(e){return zi(e)&&Array.isArray(e)?e.reduce((e,[t,n])=>(Fi(e,t,n),e),{}):e}function gc(e){let t,n={};return r=>{let i=yr(r,nc);return i!==t&&(t=i,n=mc(i,e)),ri(r,nc,n)}}var _c=Rs,vc=zs,yc=Hs,bc=Ws,xc=Gs;Fr()(`effect/DateTime/CurrentTimeZone`);var Sc=Js,Cc=e=>Tc(typeof e==`string`?Ec.encode(e):e),wc=e=>{let t=Dc(e),n=t.length;if(n%4!=0)return bi(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 bi(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=N(t.charCodeAt(e))<<18|N(t.charCodeAt(e+1))<<12|N(t.charCodeAt(e+2))<<6|N(t.charCodeAt(e+3));r[i]=n>>16,r[i+1]=n>>8&255,r[i+2]=n&255}return Ei(r)}catch(e){return bi(new qo({kind:`Decode`,module:`Base64`,input:t,message:e instanceof Error?e.message:`Invalid input`}))}},Tc=e=>{let t=e.length,n=``,r;for(r=2;r<t;r+=3)n+=Oc[e[r-2]>>2],n+=Oc[(e[r-2]&3)<<4|e[r-1]>>4],n+=Oc[(e[r-1]&15)<<2|e[r]>>6],n+=Oc[e[r]&63];return r===t+1&&(n+=Oc[e[r-2]>>2],n+=Oc[(e[r-2]&3)<<4],n+=`==`),r===t&&(n+=Oc[e[r-2]>>2],n+=Oc[(e[r-2]&3)<<4|e[r-1]>>4],n+=Oc[(e[r-1]&15)<<2],n+=`=`),n},Ec=new TextEncoder,Dc=e=>e.replace(/[\n\r]/g,``),Oc=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,kc=new Uint8Array(123).fill(255);for(let e=0;e<64;e++)kc[Oc.charCodeAt(e)]=e;kc[61]=0;var N=e=>{if(e>=kc.length||kc[e]===255)throw TypeError(`Invalid character ${String.fromCharCode(e)}`);return kc[e]};Go(`CookiesError`),{...Bn},{...Bn};var Ac=new WeakMap,jc=`~effect/Redacted`,Mc=e=>nt(e,jc),Nc=(e,t)=>{let n=Object.create(Pc);return t?.label&&(n.label=t.label),Ac.set(n,e),n},Pc={[jc]:{_A:e=>e},label:void 0,...Jr,toJSON(){return this.toString()},toString(){return`<redacted${Ht(this.label)?`:`+this.label:``}>`},[Ke](){return c(Ac.get(this))},[w](e){return Mc(e)&&Ci(Ac.get(this),Ac.get(e))}};({...Jr});function Fc(e){return e.checks?e.checks[e.checks.length-1].annotations:e.annotations}function Ic(e){return t=>Fc(t)?.[e]}var Lc=`~structural`,Rc=`~identifier`,zc=`~sentinels`,Bc=`~constructor`,Vc=[`title`,`description`,`default`,`examples`,`readOnly`,`writeOnly`,`format`,`contentEncoding`,`contentMediaType`,`contentSchema`],Hc=Ic(`identifier`),Uc=Ic(Rc),Wc=Ic(`title`),Gc=Ic(`description`),Kc=nn(e=>{let t=Fc(e)?.identifier;return typeof t==`string`?t:e.getExpected(Kc)}),qc=new Set([zc,Lc,`representation`,`arbitraryConstraint`,`toJsonSchema`,`toCode`,`toEquivalence`,`toFormatter`,`toCodec`,`toCodecJson`,`toCodecStringTree`,`toCodecIso`,`toCodecArbitrary`]),Jc=Symbol(),Yc=ss,Xc=Yc(Jc),Zc=Yc(Jc),Qc=e=>e===Jc?Je():ue(e),$c=e=>e._tag===`None`?Xc:Yc(e.value),el=`~effect/SchemaIssue/Issue`;function tl(e){return nt(e,el)&&e[el]===el}function nl(e){return Object.hasOwn(e,`input`)}var rl=class{[el]=el;constructor(e,t){t?.reportInput===!0&&e!==Jc&&(this.input=e)}},il=class extends rl{_tag=`Filter`;filter;issue;constructor(e,t,n,r){super(n,r),this.filter=e,this.issue=t}},al=class extends rl{_tag=`Encoding`;ast;issue;constructor(e,t,n,r){super(n,r),this.ast=e,this.issue=t}},ol=class extends rl{_tag=`Pointer`;path;issue;constructor(e,t){super(),this.path=e,this.issue=t}},sl=class extends rl{_tag=`MissingKey`;annotations;constructor(e){super(),this.annotations=e}},cl=class extends rl{_tag=`UnexpectedKey`;ast;constructor(e,t,n){super(t,n),this.ast=e}},ll=class extends rl{_tag=`Composite`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},ul=class extends rl{_tag=`InvalidType`;ast;constructor(e,t,n){super(t,n),this.ast=e}},dl=class extends rl{_tag=`InvalidValue`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},fl=class extends rl{_tag=`Forbidden`;annotations;constructor(e,t,n){super(t,n),this.annotations=e}},pl=class extends rl{_tag=`AnyOf`;ast;issues;constructor(e,t,n,r){super(n,r),this.ast=e,this.issues=t}},ml=class extends rl{_tag=`OneOf`;ast;successes;constructor(e,t,n,r){super(n,r),this.ast=e,this.successes=t}};function hl(e,t,n){if(tl(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 ol(e.path,r)}function gl(e,t,n){if(e!==void 0)return typeof e==`boolean`?e?void 0:new dl(void 0,t,n):hl(e,t,n)}function _l(e,t,n,r){return Array.isArray(t)?Tr(t)?t.length===1?hl(t[0],n,r):new ll(e,Jn(t,e=>hl(e,n,r)),n,r):void 0:gl(t,n,r)}var vl=e=>{let t=kl(e);if(t!==void 0)return t;switch(e._tag){case`InvalidType`:return Cl(Kc(e.ast),e);case`InvalidValue`:{let t=Sl(e);if(t!==void 0)return Cl(t,e);let n=xl(e);return n===void 0?`Expected a valid value`:`Invalid data ${n}`}case`MissingKey`:return`Missing key`;case`UnexpectedKey`:{let t=xl(e);return t===void 0?`Expected no excess property`:`Unexpected key with value ${t}`}case`Forbidden`:return`Forbidden operation`;case`OneOf`:{let t=xl(e);return t===void 0?`Expected exactly one member to match`:`Expected exactly one member to match the input ${t}`}}},yl=e=>kl(e.issue)??kl(e);function bl(e){return t=>({issues:wl(t,[],e?.leafHook??vl,e?.checkHook??yl)})}function xl(e){return nl(e)?Sr(e.input):void 0}function Sl(e){let t=e.annotations?.expected;return typeof t==`string`?t:void 0}function Cl(e,t){let n=xl(t);return n===void 0?`Expected ${e}`:`Expected ${e}, got ${n}`}function wl(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 wl(e.issue,t,n,r);let a=Sl(e.issue);return[{path:t,message:a===void 0?Cl(Tl(e.filter),e):Cl(a,e.issue)}]}case`Encoding`:return wl(e.issue,t,n,r);case`Pointer`:return wl(e.issue,[...t,...e.path],n,r);case`Composite`:return e.issues.flatMap(e=>wl(e,t,n,r));case`AnyOf`:return e.issues.length===0?[{path:t,message:kl(e)??Cl(Kc(e.ast),e)}]:e.issues.flatMap(e=>wl(e,t,n,r));default:return[{path:t,message:n(e)}]}}function Tl(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=>Tl(e)).join(` & `)}}function El(){return e=>Ol(e,``)}var Dl=El();function Ol(e,t){let n;switch(e._tag){case`Filter`:{let r=yl(e);if(r!==void 0)n=r;else{if(e.issue._tag!==`InvalidValue`)return Ol(e.issue,t);let r=Sl(e.issue);n=r===void 0?Cl(Tl(e.filter),e):Cl(r,e.issue)}break}case`Encoding`:return Ol(e.issue,t);case`Pointer`:return Ol(e.issue,t+Gn(e.path));case`Composite`:case`AnyOf`:if(e._tag===`Composite`||e.issues.length>0)return e.issues.map(e=>Ol(e,t)).join(`
3
- `);n=kl(e)??Cl(Kc(e.ast),e);break;default:n=vl(e)}return t?`${n}\n at ${t}`:n}function kl(e){if(e._tag===`Pointer`)return;if(e._tag===`Encoding`)return kl(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 Al(e){let t;for(let n of e.reasons){if(!Jo(n)||!tl(n.error))return;t??=n.error}return t}function jl(e,t){let n=Al(e);if(n===void 0)throw Error(t,{cause:e});return n}var Ml=e=>Object.assign(Object.create(Pn),e);function Nl(e){return Vl((t,n)=>vn(e(t,n)))}function Pl(e){return Nl((t,n)=>{let r={message:e(t)};return mr(t)?new fl(r,t.value,n):new fl(r)})}var Fl=Pl(()=>`Encoding is not supported`),Il=Ml({_tag:`Passthrough`});function Ll(){return Il}function Rl(e){return Ml({_tag:`Transform`,transform:e})}function zl(e){return Ml({_tag:`TransformEffect`,transform:e})}function Bl(e){return Ml({_tag:`TransformOptional`,transform:e})}function Vl(e){return Ml({_tag:`TransformOptionalEffect`,transform:e})}function Hl(){return Bl(()=>Je())}function Ul(e){return Vl(t=>{let n=Ot(t,zi);return mr(n)?k(n):Di(e,ue)})}function Wl(){return Rl(globalThis.String)}function Gl(){return Rl(globalThis.Number)}function Kl(){return Rl(Ys)}function ql(e){return zl((t,n)=>ci({try:()=>JSON.parse(t,e?.reviver),catch:()=>new dl({expected:`a valid JSON string`},t,n)}))}function Jl(e){return zl((t,n)=>ci({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 Yl(){return Rl(Cc)}function Xl(){return zl((e,t)=>oe(Ri(wc(e)),()=>new dl({expected:`a valid Base64 string`},e,t)))}var Zl=class extends r{_tag=`Middleware`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new Zl(this.encode,this.decode)}},Ql=`~effect/SchemaTransformation/Transformation`,$l=class extends r{[Ql]=Ql;_tag=`Transformation`;decode;encode;constructor(e,t){super(),this.decode=e,this.encode=t}flip(){return new $l(this.encode,this.decode)}};function eu(e){return nt(e,Ql)&&e[Ql]===Ql}var tu=e=>eu(e)?e:new $l(e.decode,e.encode);function nu(e){return new $l(zl(e.decode),zl(e.encode))}function ru(){return new $l(Kl(),Ll())}var iu=new $l(Ll(),Ll());function au(){return iu}var ou=new $l(Gl(),Wl()),su=new $l(Xl(),Yl());function cu(e){return new $l(ql(e??{}),Jl(e))}function lu(e){return t=>t._tag===e}var uu=lu(`Declaration`),du=lu(`Null`),fu=lu(`Undefined`),pu=lu(`Never`),mu=lu(`String`),hu=lu(`Number`),gu=lu(`Boolean`),_u=lu(`Literal`),vu=lu(`UniqueSymbol`),yu=lu(`Arrays`),bu=lu(`Objects`),xu=lu(`Union`),Su=lu(`Suspend`),Cu=class{to;transformation;constructor(e,t){this.to=e,this.transformation=t}},wu={},Tu=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}},Eu=`~effect/Schema`,Du=class{[Eu]=Eu;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}>`}},Ou=class extends Du{_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===Jc?Xc:(e??=this.run(this.typeParameters))(t,this,n)}_rebuild(e,t,n,r,i){let a=$d(this.typeParameters,e);return a===this.typeParameters&&t===this.checks&&n===this.encodingChecks&&r===this.run&&i===this.encodingRun?this:new Ou(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>`}},ku=new class extends Du{_tag=`Null`;getParser(){return bf(this,null)}getExpected(){return`null`}},Au=class extends Du{_tag=`Undefined`;getParser(){return bf(this,void 0)}toCodecJson(){return Vd(this,[ju])}getExpected(){return`undefined`}},ju=new Cu(ku,new $l(Rl(()=>void 0),Rl(()=>null))),Mu=new Au,Nu=new class extends Du{_tag=`Never`;getParser(){return xf(this,Fe)}getExpected(){return`never`}},Pu=new class extends Du{_tag=`Unknown`;getParser(){return xf(this,Ae)}getExpected(){return`unknown`}},Fu=class extends Du{_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 ${Sr(e)}`);this.literal=e}getParser(){return bf(this,this.literal)}matchPart(e,t){return e===globalThis.String(this.literal)?this.literal:void 0}toCodecJson(){return typeof this.literal==`bigint`?Iu(this):this}toCodecStringTree(){return typeof this.literal==`string`?this:Iu(this)}getExpected(){return typeof this.literal==`string`?JSON.stringify(this.literal):globalThis.String(this.literal)}};function Iu(e){let t=globalThis.String(e.literal);return Vd(e,[new Cu(new Fu(t),new $l(Rl(()=>e.literal),Rl(()=>t)))])}var Lu=new class extends Du{_tag=`String`;getParser(){return xf(this,Ht)}matchPart(e,t){let n=this.checks;return n&&!t.disableChecks&&jf(n,e,void 0,this,t)?void 0:e}getExpected(){return`string`}},Ru=class extends Du{_tag=`Number`;getParser(){return xf(this,m)}matchKey(e,t){return this._match(Ef,e,t)}matchPart(e,t){return this._match(Tf,e,t)}_match(e,t,n){if(!e.test(t))return;let r=globalThis.Number(t);return n.disableChecks||!this.checks?r:jf(this.checks,r,void 0,this,n)?void 0:r}toCodecJson(){return this.checks&&(zu(this.checks,`effect/schema/isFinite`)||zu(this.checks,`effect/schema/isInt`))?this:Vd(this,[Id])}toCodecStringTree(){return this.toCodecJson()===this?Vd(this,[kf]):Vd(this,[Af])}getExpected(){return`number`}};function zu(e,t){return e.some(e=>e.annotations?.representation?.id===t||e._tag===`FilterGroup`&&zu(e.checks,t))}var Bu=new Ru,Vu=new class extends Du{_tag=`Boolean`;getParser(){return xf(this,ce)}getExpected(){return`boolean`}},Hu=class extends Du{_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(uf(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(uf(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 cl(n,t[o],i),a=new ol([o],r);if(i.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return vn(new ll(n,[a],t,i))}return e.issues?vn(new ll(n,e.issues,t,i)):Yc(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:Bi(t.concurrency),f=d===1?Gu(i,e,0,u):Ku(i,e,{concurrency:d,end:u});if(!f)return c(i);if(un(f))return br(f,()=>c(i));let p=!0;return $t(()=>p?(p=!1,A(f,()=>c(i))):l(e,t))};return(e,a)=>{if(e===Jc)return Xc;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)):vn(new ul(n,e,a))}catch(e){return jr(e)}}}_rebuild(e,t,n){let r=$d(this.elements,e),i=$d(this.rest,e);return r===this.elements&&i===this.rest&&t===this.checks&&n===this.encodingChecks?this:new Hu(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 Uu(e,t,n,r){if(n._tag===`Failure`)return qu(e,e.ast,r,n);let i=n===Zc?t:n[Qt];if(i!==Jc)e.output[r]=i;else{let t=e.getParser(e.tailThreshold,r);if(uf(t.ast))return;let n=new ol([r],new sl(t.ast.context?.annotations));if(e.options.errors===`all`)e.issues?e.issues.push(n):e.issues=[n];else return ls(new ll(e.ast,[n],e.input,e.options))}}var Wu={onItem(e,t,n){let r=n<e.len?t:Jc;return e.getParser(e.tailThreshold,n).parser(r,e.options)},step:Uu},Gu=rt()(Wu),Ku=qe()(Wu),qu=(e,t,n,r)=>{if(r.cause.reasons.length===0)return r;let i=Al(r.cause);if(i===void 0)return cs($o(r.cause,r=>new ll(t,[new ol([n],r)],e.input,e.options)));let a=new ol([n],i);if(e.options.errors===`all`)e.issues?e.issues.push(a):e.issues=[a];else return ls(new ll(t,[a],e.input,e.options))},Ju=`[+-]?\\d*\\.?\\d+(?:[Ee][+-]?\\d+)?`;function Yu(e,t,n=wu){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(Sf(gf(t)))}var Xu=class{name;type;constructor(e,t){this.name=e,this.type=t}};function Zu(e){switch(e._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return e.types.every(Zu);default:return!1}}function Qu(e){let t=Ud(e);switch(t._tag){case`String`:case`Number`:case`Symbol`:case`TemplateLiteral`:return!0;case`Union`:return t.types.every(Qu);default:return!1}}function $u(e){return Zu(e)&&Qu(e)}var ed=class{parameter;type;constructor(e,t){if(!$u(e))throw Error(`Invalid index signature parameter ${e._tag}`);if(this.parameter=e,this.type=t,uf(t)&&!yf(t))throw Error("Cannot use `Schema.optionalKey` with index signatures, use `Schema.optional` instead.")}},td=class extends Du{_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 xf(n,pt);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(Sf(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 qu(t,n,i,s)??ds;let c=s===Zc?o:s[Qt];if(a!==Jc&&c!==Jc){if(r&&(e.has(i)||e.has(typeof a==`number`?globalThis.String(a):a)))return ds;Fi(t.out,a,c)}return ds},c=(e,r,i,a)=>{if(!a){let t=i.parserKey(r,e.options);if(!un(t))return A(ar(t),t=>c(e,r,i,t));a=t}if(a._tag===`Failure`)return qu(e,n,r,a)??ds;let o=a===Zc?r:a[Qt],s=e.input[r],l=i.parserValue(s,e.options);return un(l)?t(e,r,o,s,l):A(ar(l),n=>t(e,r,o,s,n))},l=(e,n,r)=>{let i=e.input[n],a=r.parserValue(i,e.options);return un(a)?t(e,n,n,i,a):A(ar(a),r=>t(e,n,n,i,r))},u=i?qe()({onItem:(e,[t,n])=>n.is.parameter===Lu?l(e,t,n):c(e,t,n),step:(e,t,n)=>n._tag===`Failure`?n:void 0}):void 0;return Un(function*(t,d){if(t===Jc)return Jc;if(!(typeof t==`object`&&t&&!Array.isArray(t)))return yield*vn(new ul(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:Bi(d.concurrency),v=i&&g?n.indexSignatures.map(e=>Yu(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 cl(n,f[a],d),r=new ol([a],e);if(h){m.issues?m.issues.push(r):m.issues=[r];continue}return yield*vn(new ll(n,[r],t,d))}}}if(r){let e=_===1?id(m,a):ad(m,a,{concurrency:_});e&&(yield*e)}if(i&&_===1)for(let e=0;e<i;e++){let t=o[e],n=t.is.parameter===Lu?l:c,r=v?.[e]??(t.is.parameter===Lu?Object.keys(f):Yu(f,t.is.parameter,d));for(let e=0;e<r.length;e++){let i=n(m,r[e],t);if(!un(i))yield*i;else if(i._tag===`Failure`)return yield*i}}else if(u){let e=Mn();for(let t=0;t<i;t++){let n=o[t],r=v?.[t]??(n.is.parameter===Lu?Object.keys(f):Yu(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*vn(new ll(n,m.issues,t,d)):p})};if(i)return c();let l,u=(e,t,n)=>{let r=a[t];return A(ar(n),n=>{let i=nd(e,r,n);if(i)return i;let o=()=>Yc(e.out),s=id(e,a.slice(t+1));return s?br(s,o):o()})};return(e,t)=>{if(e===Jc)return Xc;if(t.errors===`all`||t.onExcessProperty!==void 0||t.concurrency!==void 0&&Bi(t.concurrency)!==1)return(l??=c())(e,t);if(!(typeof e==`object`&&e&&!Array.isArray(e)))return vn(new ul(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=vd(i,s),l=c?i[s]:Jc,d=n.parser(l,t);if(!un(d))return u(o,e,d);if(d===Zc){c&&Fi(a,s,l);continue}let f=nd(o,n,d);if(f)return f}}catch(e){return jr(e)}return Yc(a)}}_rebuild(e,t,n,r){let i=$d(this.propertySignatures,t=>{let n=e(t.type);return n===t.type?t:new Xu(t.name,n)}),a=$d(this.indexSignatures,n=>{let r=t(n.parameter),i=e(n.type);return r===n.parameter&&i===n.type?n:new ed(r,i)});return i===this.propertySignatures&&a===this.indexSignatures&&n===this.checks&&r===this.encodingChecks?this:new td(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 nd(e,t,n){if(n._tag===`Failure`)return qu(e,e.ast,t.name,n);if(n===Zc)return;let r=n[Qt];if(r!==Jc){Fi(e.out,t.name,r);return}if(delete e.out[t.name],!uf(t.type)){let n=new ol([t.name],new sl(t.type.context?.annotations));if(e.options.errors===`all`){e.issues?e.issues.push(n):e.issues=[n];return}return ls(new ll(e.ast,[n],e.input,e.options))}}var rd={onItem(e,t){if(!vd(e.input,t.name))return t.parser(Jc,e.options);let n=e.input[t.name];return Fi(e.out,t.name,n),t.parser(n,e.options)},step:nd},id=rt()(rd),ad=qe()(rd);function od(e,t){return e?t?[...e,...t]:e:t}function sd(e,t,n){return new td(Reflect.ownKeys(e).map(t=>new Xu(t,e[t].ast)),[],n,t)}function cd(e){return e.ast}function ld(e,t=void 0){return new Hu(!1,e.map(e=>e.ast),[],void 0,t)}function ud(e,t,n){return new bd(e.map(cd),t,void 0,n)}function dd(e){if(e.encoding)throw Error(`mutable does not support encodings`);return new Hu(!0,e.elements,e.rest,e.annotations,e.checks,void 0,e.context,e.encodingChecks)}var fd=st(e=>{for(;;){if(Su(e))return Pu;let t=e.encoding;if(!t)return e.recur?.(fd,Kt)??e;if(t.some(e=>e.transformation._tag===`Middleware`&&e.transformation.decode!==Kt))return Pu;e=t[t.length-1].to}});function pd(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(pd)));default:return[`null`,`undefined`,`string`,`number`,`boolean`,`symbol`,`bigint`,`object`,`array`,`function`]}}function md(e){switch(e._tag){default:return[];case`Declaration`:{let t=e.annotations?.[zc];return Array.isArray(t)?t:[]}case`Objects`:return e.propertySignatures.flatMap(e=>{let t=e.type;if(!uf(t)){if(_u(t))return[{key:e.name,literal:t.literal}];if(vu(t))return[{key:e.name,literal:t.symbol}]}return[]});case`Arrays`:return e.elements.flatMap((e,t)=>{if(!uf(e)){if(_u(e))return[{key:t,literal:e.literal}];if(vu(e))return[{key:t,literal:e.symbol}]}return[]});case`Union`:{if(e.types.length===0)return[];let t=e.types.map(e=>md(fd(e)));return t[0].filter(e=>t.every(t=>t.some(t=>t.key===e.key&&t.literal===e.literal)))}case`Suspend`:return md(e.thunk())}}var hd=new WeakMap,gd=Object.freeze([]),_d=e=>e===null?`null`:Array.isArray(e)?`array`:typeof e,vd=(e,t)=>t===`__proto__`?Object.hasOwn(e,t):t in e;function yd(e){let t=hd.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=fd(c);if(pu(l))continue;if(_u(l)||vu(l)){a??=new Map;let e=_u(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=md(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=pd(l);for(let n of e)(i[n]??=[]).push(t)}}let c={},l=e=>c[e]??=Object.freeze(i?.[e]??gd);if(o&&a)a.forEach(Object.freeze),t=e=>a.get(e)??gd;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(ve(e)){let n=vd(e,r)?e[r]:void 0;if(n!==void 0)return a.get(n)??gd;if(t)return o}return gd}}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=_d(t);if(!ve(t))return l(a);let o=new Set(i?.[a]),s;if(e){let[n,[i]]=e,c=vd(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=vd(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=vd(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(_d(e));return a?t.filter(t=>s[t]===void 0||s[t]===e):t};return hd.set(e,t),t}var bd=class extends Du{_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===Jc)return Xc;let i=(o??=yd(n.types))(e,r);if(i.length===0)return vn(new pl(n,[],e,t));if(i.length===1){let r=a(i[0])(e,t);return r._tag===`Success`?r:un(r)?xd(n,r.cause,e,t):Sd(n,r,e,t)}return Cd(n,a,i,e,t)}}_rebuild(e,t,n){let r=$d(this.types,e);return r===this.types&&t===this.checks&&n===this.encodingChecks?this:new bd(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=gf(t);switch(n._tag){case`Arrays`:{let t=n.elements.filter(_u);if(t.length>0)return`${Dd(n.isMutable)}[ ${t.map(t=>e(t)+Od(t.context?.isOptional)).join(`, `)}, ... ]`;break}case`Objects`:{let t=n.propertySignatures.filter(e=>_u(e.type));if(t.length>0)return`{ ${t.map(t=>`${Dd(t.type.context?.isMutable)}${ln(t.name)}${Od(t.type.context?.isOptional)}: ${e(t.type)}`).join(`, `)}, ... }`;break}}return e(n)});return Array.from(new Set(n)).join(` | `)}};function xd(e,t,n,r){let i=Al(t);return i?ls(new pl(e,[i],n,r)):cs(t)}function Sd(e,t,r,i){return n(t,t=>xd(e,t,r,i))}function Cd(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=Td(a,n);if(!o)return a.out?a.out:vn(new pl(e,a.issues??[],r,i));if(un(o))return wd(o,a);let s=!0;return $t(()=>s?(s=!1,wd(o,a)):Cd(e,t,n,r,i))}function wd(e,t){return br(e,e=>t.out===Zc?k(t.input):t.out?t.out:vn(new pl(t.ast,t.issues??[],t.input,t.options)))}var Td=rt()({onItem(e,t){return e.parser(t)(e.input,e.options)},step(e,t,n){if(n._tag===`Failure`){let t=Al(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 ml(e.ast,e.successes,e.input,e.options));if(e.out=n,e.successes)e.successes.push(e.ast.types[t]);else return ds}}}),Ed=new bd([new Fu(`Infinity`),new Fu(`-Infinity`),new Fu(`NaN`)]);function Dd(e){return e?``:`readonly `}function Od(e){return e?`?`:``}var kd=class extends Du{_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 kd(()=>e(this.thunk()),this.annotations,void 0,void 0,this.context)}getExpected(e){return e(this.thunk())}},Ad=class extends r{_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 Ad(this.run,{...this.annotations,...e},this.aborted)}abort(){return new Ad(this.run,this.annotations,!0)}and(e,t){return new jd([this,e],t)}},jd=class extends r{_tag=`FilterGroup`;checks;annotations;constructor(e,t=void 0){super(),this.checks=e,this.annotations=t}annotate(e){return new jd(this.checks,{...this.annotations,...e})}and(e,t){return new jd([this,e],t)}};function Md(e,t,n=!1){return new Ad((t,n,r)=>_l(n,e(t,n,r),t,r),t,n)}function Nd(e,t){return new Ad((t,n,r)=>e(t)?void 0:new dl(void 0,t,r),t,!0)}function Pd(e){return Md(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 Fd=Kd(Bu,[Pd()]),Id=new Cu(new bd([Fd,Ed]),new $l(Gl(),Rl(e=>globalThis.Number.isFinite(e)?e:globalThis.String(e))));function Ld(e,t){let n=new globalThis.RegExp(e),r={source:n.source,flags:n.flags};return Md(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 Rd=new WeakMap;function zd(e,t){let n=Object.assign(Object.create(Object.getPrototypeOf(e)),e,t);return Reflect.ownKeys(t).every(e=>e===`context`||e===`encoding`)&&Rd.set(n,Bd(e)),n}function Bd(e){let t=Rd.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 Rd.set(e,n),n}function Vd(e,t){return e.encoding===t?e:zd(e,{encoding:t})}function Hd(e,t){if(e.context===t)return e;let n=Bd(e);return n.context===t&&n.encoding===e.encoding?n:zd(e,{context:t})}function Ud(e){return e.encoding?Ud(e.encoding[e.encoding.length-1].to):e}function Wd(e,t){if(e.checks){let n=e.checks[e.checks.length-1];return Gd(e,mi(e.checks.slice(0,-1),n.annotate(t)))}return zd(e,{annotations:{...e.annotations,...t}})}function Gd(e,t){if(e._tag===`Suspend`&&t)throw Error(`Cannot add checks to Suspend`);return e.checks===t?e:zd(e,{checks:t})}function Kd(e,t){return Gd(e,od(e.checks,t))}function qd(e,t){let n=t(e.to);return n===e.to?e:new Cu(n,e.transformation)}function Jd(e,t){let n=e,r=n[n.length-1],i=qd(r,t);return i===r?e:mi(e.slice(0,e.length-1),i)}function Yd(e){return t=>t.encoding?Vd(t,Jd(t.encoding,e)):t}function Xd(e,t){return Yd(e=>Hd(e,t))(e)}function Zd(e,t){function n(r){if(r.encoding){let e=r.encoding[r.encoding.length-1];return t?.stopAt?.(e)?r:Vd(r,Jd(r.encoding,n))}return e(r)}return st(n)}function Qd(e,t,n){let r=new Cu(e,t);return Vd(n,n.encoding?[...n.encoding,r]:[r])}function $d(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 ef(e,t){return Hd(e,e.context?new Tu(e.context.isOptional,e.context.isMutable,e.context.constructorDefault,{...e.context.annotations,...t}):new Tu(!1,!1,void 0,t))}var tf=st(e=>nf(Hd(e,e.context?e.context.isOptional===!1?new Tu(!0,e.context.isMutable,e.context.constructorDefault,e.context.annotations):e.context:new Tu(!0,!1)))),nf=Yd(tf),rf=nn(e=>tf(new bd([e,Mu]))),af=st(e=>of(Hd(e,e.context?e.context.isMutable===!1?new Tu(e.context.isOptional,!0,e.context.constructorDefault,e.context.annotations):e.context:new Tu(!1,!0)))),of=Yd(af);function sf(e,t,n){return Qd(e,n,t)}function cf(e){let t=[],n=[];function r(e){switch(e._tag){case`Literal`:jt(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 lf(e,t){let{literals:n,parameters:r}=cf(e);return new td(n.map(e=>new Xu(e,t)),r.map(e=>new ed(e,t)))}function uf(e){return e.context?.isOptional??!1}function df(e){return e.context?.isMutable??!1}function ff(e){return e.annotations?.[`~structural`]===!0||e._tag===`FilterGroup`&&e.checks.every(ff)}function pf(e){function t(e){return ff(e)?[e]:e._tag===`FilterGroup`?e.checks.flatMap(t):[]}let n=e.flatMap(t);return Hr(n)?n:void 0}function mf(e){let t=!0;function n(e){return t=t&&!e.encoding&&!Su(e),t&&`recur`in e&&e.recur(n),e}return`recur`in e&&e.recur(n),t}var hf=st(e=>{let t=Bd(e);if(t!==e){let n=hf(t);return n===t&&e.encoding===void 0?e:Hd(n,e.context)}let n=`recur`in e?e.recur(hf):e;if(`encodingChecks`in n&&n.encodingChecks){let t=mf(e)?n.encodingChecks:yu(n)||bu(n)||uu(n)&&n.typeParameters.length>0?pf(n.encodingChecks):void 0;return zd(n,{encodingChecks:void 0,checks:od(n.checks,t)})}return n}),gf=st(e=>hf(vf(e)));function _f(e,t){let n=t,r=n.length,i=n[r-1],a=[new Cu(vf(Vd(e,void 0)),n[0].transformation.flip())];for(let e=1;e<r;e++)a.unshift(new Cu(vf(n[e-1].to),n[e].transformation.flip()));let o=vf(i.to);return o.encoding?Vd(o,[...o.encoding,...a]):Vd(o,a)}var vf=nn(e=>{if(e.encoding)return _f(e,e.encoding);let t=Bd(e);if(t!==e){let n=vf(t);return n===t?e:Hd(n,e.context)}return`flip`in e?e.flip(vf):`recur`in e?e.recur(vf):e});function yf(e){switch(e._tag){case`Undefined`:return!0;case`Union`:return e.types.some(yf);default:return!1}}function bf(e,t){let n=t===0?Zc:Yc(t);return(r,i)=>r===Jc?Xc:r===t?n:vn(new ul(e,r,i))}function xf(e,t){return(n,r)=>n===Jc?Xc:t(n)?Zc:vn(new ul(e,n,r))}var Sf=Zd(e=>{switch(e._tag){default:return e;case`Number`:return e.toCodecStringTree();case`Union`:return e.recur(Sf)}}),Cf=Zd(e=>{switch(e._tag){default:return e;case`Symbol`:case`UniqueSymbol`:return e.toCodecStringTree();case`Union`:return e.recur(Cf)}}),wf=`[\\s\\S]*?`,Tf=new globalThis.RegExp(`^${Ju}$`),Ef=new globalThis.RegExp(`^(?:${Ju}|Infinity|-Infinity|NaN)$`);function Df(e){return Ld(Tf,{expected:`a string representing a finite number`,representation:{id:`effect/schema/isStringFinite`,payload:null},toJsonSchema:()=>({pattern:Tf.source}),...e})}var Of=Kd(Lu,[Df()]),kf=new Cu(Of,ou),Af=new Cu(new bd([Of,Ed]),ou);function jf(e,t,n,r,i){for(let a=0;a<e.length;a++){let o=e[a];if(o._tag===`FilterGroup`){if(n=jf(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 il(o,e,t,i);if(n?n.push(r):n=[r],i.errors!==`all`||o.aborted)return n}}}return n}function Mf(e){if(!uu(e))return;let t=e.annotations?.[Bc];return Se(t)?t(e.typeParameters):void 0}var Nf=Fc,Pf=Wc,Ff=Gc;function If(e){return e===null||typeof e==`string`||typeof e==`boolean`||typeof e==`number`&&globalThis.Number.isFinite(e)}function Lf(e){return e===void 0||typeof e==`string`}function Rf(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 zf(e){return Rf(e,If)}var Bf=new Ou([],()=>(e,t,n)=>zf(e)?Zc:vn(new ul(t,e,n)),{representation:{id:`effect/schema/Json`,payload:null},expected:`JSON value`,toCodecJson:()=>void 0,toCodecStringTree:()=>Wf}),Vf=new Cu(Bf,au()),Hf=new Cu(new bd([new Hu(!1,[],[Bf]),new td([],[new ed(Lu,Bf)])]),au());function Uf(e){return Rf(e,Lf)}var Wf=new Cu(new Ou([],()=>(e,t,n)=>Uf(e)?Zc:vn(new ul(t,e,n)),{expected:`StringTree`,toCodecStringTree:()=>void 0}),au()),Gf=(e,t,n)=>e===Zc?n(t):br(e,n);function Kf(e){if(e._tag===`Middleware`)return(t,n,r)=>qf(t===Zc?e.decode(Yc(Qc(n)),r):e.decode(Di(t,Qc),r));let t=e.decode;switch(t._tag){case`Passthrough`:return(e,t)=>e===Zc?Yc(t):e;case`Transform`:{let e=e=>e===Jc?Xc:Yc(t.transform(e));return(t,n)=>Gf(t,n,e)}case`TransformOptional`:{let e=e=>$c(t.transform(Qc(e)));return(t,n)=>Gf(t,n,e)}case`TransformEffect`:return(e,n,r)=>Gf(e,n,e=>e===Jc?Xc:t.transform(e,r));case`TransformOptionalEffect`:return(e,n,r)=>Gf(e,n,e=>qf(t.transform(Qc(e),r)))}}var qf=e=>br(e,$c),Jf=(e,t,r,i)=>n(i,n=>ii(()=>$o(n,n=>new al(e,n,t,r))));function Yf(e,t){let n=Kf(e.link.transformation),r;return(i,a)=>{if(i===Jc)return Xc;if(e.isConstructed(i))return Zc;let o=(r??=t(e.link.to))(i,a);return n(o,i,a)}}function Xf(e,t){let n=e.context.constructorDefault;return(r,i)=>{if(r!==Jc&&r!==void 0)return t(r,i);let a=n;if(un(a)&&a._tag===`Success`){let e=t(a[Qt],i);return e===Zc?a:e}return br(Jf(e,r,i,a),e=>{let n=t(e,i);return n===Zc?Yc(e):n})}}function Zf(e,t){let n=t(e);return e.context?.constructorDefault===void 0?n:Xf(e,n)}function Qf(e,t,n,r,i){if(e._tag===`Declaration`)for(let n of e.typeParameters)t(n);let a=n?Mf(e):void 0,o=a?Yf(a,t):r??e.getParser(t,n),s=e.checks,c=e.encoding,l=c?.map(e=>Kf(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(un(r)){if(r._tag===`Success`){let i=r===Zc?t:r[Qt];if(t!==Jc&&i!==Jc){let i=jf(u,t,void 0,e,n);i&&(r=vn(new ll(e,i,t,n)))}}}else r=A(r,r=>{if(t!==Jc&&r!==Jc){let r=jf(u,t,void 0,e,n);if(r)return vn(new ll(e,r,t,n))}return k(r)})}if(s&&!n.disableChecks){if(un(r)){if(r._tag===`Success`){let i=r===Zc?t:r[Qt];if(i===Jc)return r;let a=jf(s,i,void 0,e,n);a&&(r=vn(new ll(e,a,i,n)))}}else r=A(r,t=>{if(t!==Jc){let r=jf(s,t,void 0,e,n);if(r)return vn(new ll(e,r,t,n))}return k(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[Qt],o=t(a,r)):o=br(o,e=>{let n=t(e,r);return n===Zc?Yc(e):n})}if(o._tag===`Success`){let e=o[Qt],t=p(e,r);return t===Zc?o:t}return o=Jf(e,n,r,o),br(o,e=>{let t=p(e,r);return t===Zc?Yc(e):t})}:p}var $f=Symbol(),ep=new WeakMap,tp=e=>ap(e).parser,np=e=>ap(e).makeEffect,rp=e=>Zf(e,np),ip=class{ast;constructor(e){this.ast=e}get decodeEffect(){return this.cachedDecodeEffect??=Qf(this.ast,tp)}get parser(){return this.decodeEffect}get makeEffect(){return this.cachedMakeEffect??=Qf(this.ast,np,rp)}};function ap(e){let t=ep.get(e);if(t!==void 0)return t;let n=new ip(e);return ep.set(e,n),n}function op(e){let t=e.ast,n;return(e,r)=>(n??=bp(Dp,hf(t)))(e,r?.disableChecks?r?.parseOptions?{...r.parseOptions,disableChecks:!0}:{disableChecks:!0}:r?.parseOptions)}function sp(e){let t=op(e);return(e,n)=>{let r=O(t(e,n));return fs(r)?ue(r.value):(jl(r.cause,`Option adapter can only return none for schema issues`),Je())}}function cp(e){return Tp(hf(e.ast))}function lp(e){return dp(e.ast)}function up(e){{let t=xp(vp(e));return e=>{let n=t(e,wu);return fs(n)?!0:(jl(n.cause,`Type guard adapter can only return false for schema issues`),!1)}}}function dp(e){let t=hf(e),n=e=>(n=up(t),n(e));return e=>n(e)}function fp(e,t){let n=vp(e.ast);return t===void 0?n:(e,r)=>n(e,gp(t,r))}function pp(e,t){return Sp(fp(e,t))}function mp(e,t){return Cp(fp(e,t))}function hp(e,t){let n=vp(vf(e.ast));return t===void 0?n:(e,r)=>n(e,gp(t,r))}var gp=(e,t)=>t?{...e,...t}:e,_p=e=>e===Jc?vn(new dl):k(e);function vp(e){return bp(Ep,e)}function yp(e,t){return e===Zc?k(t):un(e)?e[Qt]===Jc?_p(Jc):e:br(e,_p)}function bp(e,t){let n;return(r,i)=>{let a=(n??=e(t))(r,i??wu);return a===Zc?k(r):un(a)?a[Qt]===Jc?_p(Jc):a:br(a,_p)}}function xp(e){return(t,n)=>O(e(t,n))}function Sp(e){let t=xp(e);return(e,n)=>{let r=t(e,n);return fs(r)?ue(r.value):(jl(r.cause,`Option adapter can only return none for schema issues`),Je())}}function Cp(e){let t=xp(e);return(e,n)=>{let r=t(e,n);return fs(r)?Ei(r.value):bi(jl(r.cause,`Result adapter can only return schema issues`))}}function wp(e,t){let n=O(e);if(fs(n))return n.value;let r=jl(n.cause,t);throw Error(`Schema validation failed`,{cause:r})}function Tp(e){let t,n;return(r,i)=>{t??=ap(e);let a=i?.disableChecks?i.parseOptions?{...i.parseOptions,disableChecks:!0}:{disableChecks:!0}:i?.parseOptions??wu,o=t.make;if(o!==void 0&&r!==Jc){let e;try{e=o(r,a)}catch(e){throw jl(Zo(e),`Constructor adapter can only throw schema issues`),e}if(e!==$f&&e!==Jc)return e}return wp(yp((n??=t.makeEffect)(r,a),r),`Constructor adapter can only throw schema issues`)}}var Ep=e=>ap(e).parser,Dp=e=>ap(e).makeEffect,Op=`~effect/Schema/Schema`,kp=Symbol(),Ap={[Op]:Op,get make(){let e=cp(this);return Object.defineProperty(this,"make",{value:e,enumerable:!0}),e},get makeEffect(){let e=op(this);return Object.defineProperty(this,"makeEffect",{value:e,enumerable:!0}),e},get makeOption(){let e=sp(this);return Object.defineProperty(this,"makeOption",{value:e,enumerable:!0}),e},pipe(){return oi(this,arguments)},annotate(e){return this.rebuild(Wd(this.ast,e))},annotateKey(e){return this.rebuild(ef(this.ast,e))},check(...e){return this.rebuild(Kd(this.ast,e))},rebuild(e){return jp(e,this[kp])}};function jp(e,t){function n(){}let r=Object.setPrototypeOf(n,Ap);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[kp]=t,r.ast=e,r}function Mp(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function Np(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function Pp(e){return encodeURI(Mp(e)).replace(/#/g,`%23`)}function Fp(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 Ip(e){let t=Fp(e);return t===void 0?void 0:t.length===0?[]:t.slice(1).split(`/`).map(Np)}function Lp(e){return e.reduce((e,t)=>`${e}/${Pp(t)}`,`#`)}var Rp=`http://json-schema.org/draft-07/schema#`;function zp(e,t){return e===t||e===(t.endsWith(`#`)?t.slice(0,-1):`${t}#`)}function Bp(e){return{dialect:`draft-07`,...Qp(e,um)}}function Vp(e,t){return n(e,!1,!0);function n(e,r,i=!1){if(!It(e))return e;let a=r||!i&&Zp(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=Wp(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)}Fi(o,t,i)}return t(o,a),o}}function Hp(e,t){return Vp(e,e=>{Up(e,t)})}function Up(e,t){typeof e.$ref==`string`&&Fi(e,`$ref`,t(e.$ref,`$ref`)),typeof e.$dynamicRef==`string`&&Fi(e,`$dynamicRef`,t(e.$dynamicRef,`$dynamicRef`))}function Wp(e,t){if(!It(e))return;let n={};for(let r of Object.keys(e))Fi(n,r,t(e[r],r));return n}function Gp(e,t,n){let r=new Map,i=[],a=Kp;function o(e,n=[],r=[]){return n.length===0&&t?.trackIds&&(a=Jp(It(e)?u(e):void 0,Kp)??Kp),l(e,n,r,{sourceRoot:[],targetRoot:[],uri:a})}function s(){for(let[e,t,n]of i){let i=t,a=qp(t,n);if(a!==void 0){let e=Ip(a.hash);if(a.hash=``,e!==void 0){let n=r.get(Xp(a.href,e));n!==void 0&&(i=Yp(t,n))}}Fi(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(!It(n))return n;let s=o,c=u(n);if(r.length>0&&t?.trackIds&&Zp(c)){let e=Jp(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 It(e)?Wp(e,(e,i)=>l(e,[...r,t,i],[...a,n,i],s)):e},reference(e,t){typeof t==`string`?i.push([e,t,f]):Fi(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(Xp(n.uri,e.slice(n.sourceRoot.length)),t.slice(n.targetRoot.length))}}var Kp=`https://effect.invalid/.json-schema/`;function qp(e,t){return URL.canParse(e,t)?new URL(e,t):void 0}function Jp(e,t){if(typeof e!=`string`)return;let n=qp(e,t);if(n!==void 0)return n.hash=``,n.href}function Yp(e,t){let n=e.indexOf(`#`);return n===-1&&t.length===0?e:`${n===-1?e:e.slice(0,n)}${Lp(t)}`}function Xp(e,t){return`${e}\u0000${JSON.stringify(t)}`}function Zp(e){return typeof e==`string`&&e.length>0&&e[0]!==`#`}function Qp(e,t,n){return Gp(t,{...n,trackIds:!0},t=>({schema:t(e.schema),definitions:Wp(e.definitions,(e,n)=>t(e,[`$defs`,n],[`definitions`,n]))}))}var $p=new Set([`properties`,`patternProperties`]),em=new Set([`allOf`,`anyOf`,`oneOf`]),tm=new Set([`not`,`additionalProperties`,`propertyNames`,`contains`,`if`,`then`,`else`,`contentSchema`]);function nm(e,t,n,r,i,a=$p){let o;if(a.has(t))o=r.schemaMap(n,t);else if(em.has(t))o=r.schemaArray(n,t);else if(i.has(t))o=r.schema(n,t);else return!1;return Fi(e,t,o),!0}var rm=[`$anchor`,`$defs`,`$dynamicAnchor`,`$dynamicRef`,`$vocabulary`,`contentSchema`,`dependentRequired`,`dependentSchemas`,`maxContains`,`minContains`,`prefixItems`,`unevaluatedItems`,`unevaluatedProperties`];[...rm],[...rm];var im=/^[A-Za-z_][-A-Za-z0-9._]*$/,am=/^[A-Za-z][-A-Za-z0-9._:]*$/;function om(e,t,n){throw Error(`Cannot convert JSON Schema keyword "${e}" to ${t}: ${n}`)}function sm(e,t,n,r){for(let i of t)Object.hasOwn(e,i)&&om(i,n,`it is not active in ${r} but would become active in the target`)}var cm=[`additionalItems`,`definitions`,`dependencies`];function lm(e,t,n,r,i){n.isDocumentRoot?Fi(e,`$schema`,zp(t,`https://json-schema.org/draft/2020-12/schema`)?r:t):zp(t,`https://json-schema.org/draft/2020-12/schema`)||om(`$schema`,i,`an embedded resource cannot declare a different dialect`)}function um(e,t){sm(e,cm,`Draft-07`,`Draft 2020-12`);let n={},r,i,a;for(let o of Object.keys(e)){let s=e[o];if(!nm(n,o,s,t,tm))switch(o){case`$ref`:r=s;break;case`$schema`:lm(n,s,t,Rp,`Draft-07`);break;case`$id`:case`$anchor`:break;case`$defs`:Fi(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`:om(o,`Draft-07`,`the target dialect has no equivalent`);case`required`:if(Array.isArray(s)&&s.length===0)break;Fi(n,o,s);break;default:Fi(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)&&om(`minContains/maxContains`,`Draft-07`,`contains cardinality cannot be represented`),Object.hasOwn(e,`minContains`)&&Fi(n,`minContains`,t)}else Object.hasOwn(e,`minContains`)&&Fi(n,`minContains`,e.minContains),Object.hasOwn(e,`maxContains`)&&Fi(n,`maxContains`,e.maxContains);return pm(e,n,t,`draft-07`),hm(e,n,`$id`,`Draft-07`),fm(n,r,t),n}function dm(e,t,n,r){if(t===void 0){n!==void 0&&Fi(e,`items`,r.schema(n,`items`));return}Fi(e,`items`,r.schemaArray(t,`prefixItems`,`items`)),n!==void 0&&Fi(e,`additionalItems`,r.schema(n,`items`,`additionalItems`))}function fm(e,t,n){if(t!==void 0){if(typeof t==`string`&&Object.keys(e).length>0){let r={};n.reference(r,t),mm(e,r)}else n.reference(e,t)}}function pm(e,t,n,r){let i=It(e.dependentRequired)?e.dependentRequired:void 0,a=It(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||Fi(o,e,t):t===void 0||c?Fi(o,e,n.schemaAt(s,[`dependentSchemas`,e],[`dependencies`,e])):Fi(o,e,{allOf:[n.schemaAt(s,[`dependentSchemas`,e],[`dependencies`,e,`allOf`,`0`]),{required:t}]})}Object.keys(o).length>0&&Fi(t,`dependencies`,o)}function mm(e,t){Array.isArray(e.allOf)?e.allOf.push(t):Fi(e,`allOf`,[t])}function hm(e,t,n,r){let i=e.$id,a=e.$anchor;if(a===void 0){i!==void 0&&Fi(t,n,i);return}(typeof a!=`string`||!im.test(a))&&om(`$anchor`,r,`the anchor is not valid`),am.test(a)||om(`$anchor`,r,`the anchor cannot be represented as a plain-name fragment identifier`),i===void 0?Fi(t,n,`#${a}`):om(`$anchor`,r,`it cannot be combined with the schema $id`)}function gm(e){return jp(_m(e.ast),{schema:e})}var _m=Zd(e=>{let t=Sm(e,_m),n=e.context;return t===e||n===void 0?t:Xd(t,vm(n))});function vm(e){return e.constructorDefault===void 0?e:new Tu(e.isOptional,e.isMutable,void 0,e.annotations)}function ym(e){if(e.propertySignatures.some(e=>typeof e.name!=`string`))throw new globalThis.Error(`Objects property names must be strings`,{cause:e})}function bm(e){return t=>{let n=[...t].sort((t,n)=>e(gf(t))-e(gf(n)));return n.some((e,n)=>e!==t[n])?n:t}}var xm=bm(e=>{switch(e._tag){case`BigInt`:case`Symbol`:case`UniqueSymbol`:return 0;default:return 1}});function Sm(e,t){switch(e._tag){case`Declaration`:{let n=e.annotations?.toCodecJson??e.annotations?.toCodec;if(!Se(n))return Vd(e,[Vf]);let r=n(e.typeParameters.map(e=>jp(gf(e))));return r===void 0?e:Vd(e,[qd(r,t)])}case`Unknown`:return Vd(e,[Vf]);case`ObjectKeyword`:return Vd(e,[Hf]);case`Undefined`:case`Void`:case`Literal`:case`Number`:return e.toCodecJson();case`UniqueSymbol`:case`Symbol`:case`BigInt`:return e.toCodecStringTree();case`Objects`:return ym(e),e.recur(t,Cf);case`Union`:{let n=xm(e.types);return n===e.types?e.recur(t):new bd(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 Cm=e=>e.replace(/[/\\^$*+?.()|[\]{}]/g,`\\$&`);function wm(e,t){return t.length>0&&(e+=`\n at ${Gn(t)}`),Error(e)}function Tm(e){return`#/$defs/${Pp(e)}`}var Em=new Set([...qc,Rc,...Vc]);function Dm(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;zf(o)&&(n.default=o);let s=e.examples;Array.isArray(s)&&zf(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(zf(p)&&(n.contentSchema=p),t?.includeAnnotationKey!==void 0)for(let[r,i]of Object.entries(e))Em.has(r)||!t.includeAnnotationKey(r)||zf(i)&&Fi(n,r,i);return Object.keys(n).length===0?void 0:n}function Om(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=Om(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 km(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 Am=`|type|format|pattern|multipleOf|minimum|maximum|exclusiveMinimum|exclusiveMaximum|minLength|maxLength|minItems|maxItems|uniqueItems|minProperties|maxProperties|propertyNames|`;function jm(e,t){return Object.keys(e).every(e=>t.includes(`|${e}|`))}function Mm(e,t){return typeof e.$ref!=`string`&&t.every(t=>!Object.hasOwn(e,t))}var Nm=`|title|description|default|examples|readOnly|writeOnly|`,Pm=Am+Nm;function Fm(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=km(e);if(i!==void 0||a){let r=Om(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:jm(r.schema,Nm)&&Mm(o,s)?{...o,...r.schema}:Fm(o,r.schema,n)}}if(n&&Mm(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 Im(e,t=new Set){return typeof e==`boolean`?e:t.has(e)?!0:(t.add(e),e.every(e=>Im(e,t)))}function Lm(e){return Array.isArray(e)}function Rm(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=Jn(e,(e,n)=>v(e,t[n],[]));for(let[e,t]of s.values())if(!Im(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=>Ci(i.get(e)[0],o));l===void 0?s===void 0?c.set(r,[e]):s.push(e):a.set(e,l)}let d=Jn(u,h),f={};for(let e of l)a.has(e)||Fi(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 wm(`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 Hp(e,e=>{let t=Fp(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(Np(t.slice(7,n<0?void 0:n)));return r===void 0?e:e.replace(/^#(?:\/|%2f).*?(?:\/|%2f).*?(?=\/|%2f|$)/i,Tm(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[Rc]: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=Lm(s);c&&i.push(!1);let l=c?s[0]:s,u=Dm(a,r),d=u===void 0?l:{...l,...u},f=u===void 0?Am:Pm;return[d,e._tag===`Filter`&&jm(d,f)&&(u===void 0||jm(u,Nm))?!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=Dm(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:Tm(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=Dm(e.annotations,r);c!==void 0&&(s={...s,...c});for(let n=0;n<e.checks.length;n++){let r=typeof s.type==`string`&&zm(s.type)?s.type:void 0,i=_(e.checks[n],r,[...t,`checks`,n],a);i!==void 0&&(s=Fm(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 wm(`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(Vm).join(``)}$`};case`Arrays`:{if(e.rest.length>1)throw wm(`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=Dm(e.annotations,r);return s===void 0?o:p(Fm(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 wm(`Invalid schema representation document`,[...t,`propertySignatures`,i,`name`]);let c=s.name,l=v(s.type,[...t,`propertySignatures`,i,`type`],n),u=Dm(s.annotations,r);Fi(a,c,u===void 0?l:p(Fm(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);Ci(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];Fi(s,e,t===void 0?a:t===!1||a===!1?!1:p(Fm(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=Bm(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 wm(`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 Im(n)&&r.type===`string`&&typeof r.pattern==`string`&&jm(r,`|type|pattern|title|description|default|examples|readOnly|writeOnly|`)?[r.pattern]:void 0}case`TemplateLiteral`:return e.checks.length===0?[`^${e.parts.map(Vm).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 wm(`Invalid schema representation document`,t)}}}function zm(e){return e===`string`||e===`number`||e===`boolean`||e===`array`||e===`object`||e===`null`||e===`integer`}function Bm(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 Vm(e){switch(e._tag){case`Literal`:return Cm(globalThis.String(e.literal));case`String`:return wf;case`Number`:return Ju;case`TemplateLiteral`:return e.parts.map(Vm).join(``);case`Union`:return`(?:${e.types.map(Vm).join(`|`)})`;default:throw wm(`Invalid schema representation document`,[])}}function Hm(e,t){let n=Rm([e.representation],[[`representation`]],e.references,t);return{dialect:n.dialect,schema:n.schemas[0],definitions:n.definitions}}var Um=({identifier:e})=>e;function Wm(e){return e===void 0?void 0:{annotations:e}}function Gm(e,t){let{references:n,representations:r}=Km([e],t);return{representation:r[0],references:n}}function Km(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??Um;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:Jn(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:Wd(e,{identifier:n}):Uc(e)===r?e:Wd(e,{[Rc]:r})}function u(e,t){if(!Object.hasOwn(n,e)&&!i.has(e)){i.add(e);let r=h(t);i.delete(e),Fi(n,e,r)}return{_tag:`Reference`,$ref:e}}function d(e){let t=Ud(e),n=Bd(t),r=Hc(t),i=r===void 0?(t===e?void 0:Hc(e))??Uc(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(hf(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,...Wm(e.annotations)};case`Literal`:return{_tag:`Literal`,literal:e.literal,checks:t,...Wm(e.annotations)};case`UniqueSymbol`:return{_tag:`UniqueSymbol`,symbol:e.symbol,checks:t,...Wm(e.annotations)};case`Enum`:return{_tag:`Enum`,enums:e.enums,checks:t,...Wm(e.annotations)};case`TemplateLiteral`:return{_tag:`TemplateLiteral`,parts:e.parts.map(e=>m(e)),checks:t,...Wm(e.annotations)};case`Arrays`:return{_tag:`Arrays`,elements:e.elements.map(e=>{let t=Ud(e),n=t.context?.annotations;return{isOptional:uf(t),type:m(e),...Wm(n)}}),rest:e.rest.map(e=>m(e)),checks:t,...Wm(e.annotations)};case`Objects`:return{_tag:`Objects`,propertySignatures:e.propertySignatures.map(e=>{let t=Ud(e.type),n=t.context?.annotations;return{name:e.name,type:m(e.type),isOptional:uf(t),isMutable:df(t),...Wm(n)}}),indexSignatures:e.indexSignatures.map(e=>({parameter:m(e.parameter),type:m(e.type)})),checks:t,...Wm(e.annotations)};case`Union`:return{_tag:`Union`,types:e.types.map(e=>m(e)),...e.options===void 0?{}:{options:e.options},checks:t,...Wm(e.annotations)};case`Suspend`:return{_tag:`Suspend`,checks:[],thunk:m(e.thunk()),...Wm(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:Jn(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(hf(e)))};return{...r===void 0?void 0:{representation:r},...Object.keys(n).length===0?void 0:{annotations:n}}}}function qm(e){return fs(e)?e.value:{issues:[{message:rs(e.cause)}]}}function Jm(e,t){let n=fp(e),r={errors:`all`,...t?.parseOptions},i=bl(t),a=e=>{let t=new ct(`sync`),a=_(ne(n(e,r),{onFailure:i,onSuccess:e=>({value:e})}),{scheduler:t});a.currentDispatcher?.flush();let o=a.pollUnsafe();return o?qm(o):new Promise(e=>{a.addObserver(t=>{e(qm(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 Ym(e){return Hm(Gm(_m(e)))}function Xm(e,t){let n=Ym(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=Bp(n),t=e.schema;return Object.keys(e.definitions).length>0&&(t.definitions=e.definitions),t}throw new globalThis.Error(`Unsupported target: ${t}`)}function Zm(e){let t={input(t){return Xm(e.ast,t.target)},output(t){return Xm(hf(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 Qm=nn(e=>$m(e));function $m(e){let t=Fc(e)?.toEquivalence;if(t)return t(uu(e)?e.typeParameters.map($m):[]);switch(e._tag){case`Never`:return y();case`Declaration`:return eh(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 Ci;case`Arrays`:{let t=e.elements.map($m),n=e.rest.map($m),[r,...i]=n,a=i.length;return yt((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 Ci;let t=e.propertySignatures.map(e=>$m(e.type)),n=e.indexSignatures.map(e=>$m(e.type));return yt((r,i)=>{if(!It(r)||!It(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(uf(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=Yu(r,a.parameter),s=Yu(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=hf(e).types,n=yd(t),r=t.map((t,n)=>[dp(t),$m(e.types[n])]);return yt((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 yt((n,r)=>(t??=Qm(e.thunk()))(n,r))}}}function eh(e){let t=e.annotations?.representation;if(t===void 0)return Ci;switch(t.id){case`effect/schema/Option`:{let[t]=th(e);return(e,n)=>e._tag===n._tag&&(e._tag===`None`||t(e.value,n.value))}case`effect/schema/Result`:{let[t,n]=th(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]=th(e);return nh(t,n)}case`effect/schema/Cause`:{let[t,n]=th(e);return rh(t,n)}case`effect/schema/Exit`:{let[t,n,r]=th(e),i=rh(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]=th(e);return Tt(t,n)}case`effect/schema/ReadonlySet`:return E(th(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 Ci}}function th(e){return e.typeParameters.map($m)}function nh(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 rh(e,t){let n=bn(nh(e,t));return(e,t)=>n(e.reasons,t.reasons)}var ih=Ee(2,(e,t)=>({...e,...t})),ah=e=>e,oh=`~effect/Schema/SchemaError`;function sh(e){return nt(e,`~effect/Schema/SchemaError`)&&e[`~effect/Schema/SchemaError`]===`~effect/Schema/SchemaError`}var ch=Op;function lh(){return(e,t,n)=>Eh(new Ou(e.map(cd),e=>t(e.map(e=>Eh(e))),n))}function uh(e,t){return lh()([],()=>(t,n,r)=>e(t)?k(t):vn(new ul(n,t,r)),t)}var dh=class extends Go(`SchemaError`){[oh]=oh;constructor(e){let t=di();kn(0);try{super({issue:e})}finally{kn(t)}}get message(){return Dl(this.issue)}toString(){return`SchemaError(${this.message})`}};function fh(e){return sh(e)}function ph(e){return un(e)?mh(e):n(e,e=>ii(()=>$o(e,e=>new dh(e))))}function mh(e){return fs(e)?e:cs($o(e.cause,e=>new dh(e)))}function hh(e,t){let n;for(let r of e.reasons){if(!Jo(r)||!fh(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 gh(e){let t=O(e);if(fs(t))return t.value;throw hh(t.cause,`Sync adapter can only throw schema errors`)}function _h(e,t){return Jm(e,t)}function vh(e){return Zm(e)}var yh=lp;function bh(e,t){let n=fp(e,t);return(e,t)=>ph(n(e,t))}var xh=pp;function P(e,t){let n=mp(e,t);return(e,t)=>St(n(e,t),e=>new dh(e))}function Sh(e,t){let n=bh(e,t);return(e,t)=>gh(n(e,t))}function Ch(e,t){let n=hp(e,t);return(e,t)=>ph(n(e,t))}function wh(e,t){let n=Ch(e,t);return(e,t)=>gh(n(e,t))}var Th=wh,Eh=jp;function Dh(e){return nt(e,ch)&&e[ch]===ch}var F=ah(e=>Eh(tf(e.ast),{schema:e})),I=ah(e=>{let t=Uh(e);return Eh(rf(e.ast),{schema:t})}),Oh=ah(e=>Eh(af(e.ast),{schema:e})),kh=ah(e=>Eh(hf(e.ast),{schema:e})),Ah=ah(e=>Eh(gf(e.ast),{schema:e}));function L(e){let t=Eh(new Fu(e),{literal:e,transform(n){return t.pipe(qh(L(n),{decode:Rl(()=>n),encode:Rl(()=>e)}))}});return t}var jh=Eh(Nu),Mh=Eh(Pu),Nh=Eh(ku),Ph=Eh(Mu),R=Eh(Lu),z=Eh(Bu),Fh=Eh(Vu);function Ih(e,t){return Eh(e,{fields:t,mapFields(e,t){let n=e(this.fields);return Ih(sd(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function B(e){return Ih(sd(e,void 0),e)}function Lh(e,t){return Eh(lf(e.ast,t.ast),{key:e,value:t})}function Rh(e,t){return Eh(e,{elements:t,mapElements(e,t){let n=e(this.elements);return Rh(ld(n,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function zh(e){return Rh(ld(e),e)}var V=ah(e=>Eh(new Hu(!1,[],[e.ast]),{value:e})),Bh=ah(e=>Eh(dd(e.ast),{schema:e}));function Vh(e,t){return Eh(e,{members:t,mapMembers(e,t){let n=e(this.members);return Vh(ud(n,this.ast.options,t?.unsafePreserveChecks?this.ast.checks:void 0),n)}})}function Hh(e,t){return Vh(ud(e,t,void 0),e)}function H(e){let t=e.map(L);return Eh(ud(t,void 0,void 0),{literals:e,members:t,mapMembers(e){return Hh(e(this.members))},pick(e){return H(e)},transform(e){return Hh(t.map((t,n)=>t.transform(e[n])))}})}var U=ah(e=>Hh([e,Nh])),Uh=ah(e=>Hh([e,Ph]));function Wh(e){return Eh(new kd(()=>e().ast))}function W(...e){return t=>t.check(...e)}function Gh(e,t){return n=>Eh(Kd(n.ast,[Nd(e,t)]),{schema:n})}function Kh(e){return t=>Eh(t.ast,{schema:t,identifier:e})}function qh(e,t){return n=>Eh(sf(n.ast,e.ast,t?tu(t):au()),{from:n,to:e})}function Jh(){return(e,t)=>tg()(e,{decode:t,encode:Fl})}function Yh(e,t){return n=>t?qh(n,t)(e):qh(n)(e)}function Xh(e){return n(e,e=>ii(()=>$o(e,e=>e.issue)))}function Zh(e,t){let n=t?.encodingStrategy===`omit`?Hl():Ll();return t=>F(Ah(t)).pipe(qh(t,{decode:Ul(Xh(e)),encode:n}))}function Qh(e,t){let n=t?.encodingStrategy===`omit`?Hl():Ll();return t=>I(Ah(t)).pipe(qh(t,{decode:Ul(Xh(e)),encode:n}))}function $h(e,t){return n=>kh(n).pipe(Qh(e,t),Yh(I(n)))}function eg(e,t){return uh(t=>t instanceof e,t)}function tg(){return(e,t)=>new Cu(e.ast,tu(t))}var ng=Md,rg=`^\\S[\\s\\S]*\\S$|^\\S$|^$`;function ig(e){let t=new globalThis.RegExp(rg);return ng(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:rg,flags:``}]},...e})}function ag(e,t){let n=e.source,r=e.flags,i=/^[dg]*uy?$/.test(r),a=r===``?`new RegExp(${Sr(n)})`:`new RegExp(${Sr(n)}, ${Sr(r)})`;return Ld(e,{toJsonSchema:()=>i?{pattern:r.endsWith(`y`)?`^(?:${n})`:n}:[{},!0],toCode:()=>({runtime:`Schema.isPattern(${a})`}),...t})}function og(e){let t=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;return ag(t,{expected:`a base64 encoded string`,representation:{id:`effect/schema/isBase64`,payload:null},toJsonSchema:()=>({pattern:t.source}),toCode:()=>({runtime:`Schema.isBase64()`}),...e})}var sg=Eh(Fd),cg=Pd;function lg(e){let t=g(e.order),n=e.formatter??Sr;return(r,i)=>ng(e=>t(e,r),{expected:`a value greater than ${n(r)}`,arbitraryConstraint:{order:e.order,minimum:r,exclusiveMinimum:!0},...e.annotate?.(r),...i})}function ug(e){let t=Rt(e.order),n=e.formatter??Sr;return(r,i)=>ng(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=Nt(e.order),n=e.formatter??Sr;return(r,i)=>ng(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 fg(e){let t=Rt(e.order),n=g(e.order),r=Nt(e.order),i=be(e.order),a=e.formatter??Sr;return(o,s)=>{let c=o.exclusiveMinimum?n:t,l=o.exclusiveMaximum?i:r;return ng(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 pg(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${Sr(e)}`);return e}var mg=lg({order:ht,annotate:e=>({representation:{id:`effect/schema/isGreaterThan`,payload:{exclusiveMinimum:pg(e)}},toJsonSchema:()=>({exclusiveMinimum:e}),toCode:()=>({runtime:`Schema.isGreaterThan(${Sr(e)})`})})}),hg=ug({order:ht,annotate:e=>({representation:{id:`effect/schema/isGreaterThanOrEqualTo`,payload:{minimum:pg(e)}},toJsonSchema:()=>({minimum:e}),toCode:()=>({runtime:`Schema.isGreaterThanOrEqualTo(${Sr(e)})`})})}),gg=dg({order:ht,annotate:e=>({representation:{id:`effect/schema/isLessThanOrEqualTo`,payload:{maximum:pg(e)}},toJsonSchema:()=>({maximum:e}),toCode:()=>({runtime:`Schema.isLessThanOrEqualTo(${Sr(e)})`})})}),_g=fg({order:ht,annotate:e=>{let t=e.exclusiveMinimum?!0:void 0,n=e.exclusiveMaximum?!0:void 0;return{representation:{id:`effect/schema/isBetween`,payload:{minimum:pg(e.minimum),maximum:pg(e.maximum),...t&&{exclusiveMinimum:t},...n&&{exclusiveMaximum:n}}},toJsonSchema:()=>({[t?`exclusiveMinimum`:`minimum`]:e.minimum,[n?`exclusiveMaximum`:`maximum`]:e.maximum}),toCode:()=>({runtime:`Schema.isBetween({ minimum: ${Sr(e.minimum)}, maximum: ${Sr(e.maximum)}, exclusiveMinimum: ${Sr(t)}, exclusiveMaximum: ${Sr(n)} })`})}}});function vg(e){return ng(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(vg());function yg(e,t){return e=Sg(e),bg(e,Math.ceil(e/2),t)}function bg(e,t,n){return ng(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})`}),[Lc]:!0,arbitraryConstraint:{minLength:e},...n})}function xg(e){return bg(1,1,e)}function K(e,t){return e=Sg(e),ng(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})`}),[Lc]:!0,arbitraryConstraint:{maxLength:e},...t})}function Sg(e){if(!globalThis.Number.isFinite(e))throw new globalThis.RangeError(`Expected a finite number, got ${e}`);return Math.max(0,Math.floor(e))}var Cg=R.check(xg());globalThis.RegExp,globalThis.URL;var wg=R.annotate({expected:`a string that will be decoded as JSON`,contentMediaType:`application/json`});function Tg(e,t){return wg.pipe(qh(e,cu(t)))}globalThis.File,globalThis.FormData,globalThis.URLSearchParams;var Eg=R.annotate({expected:`a string that will be decoded as a number`}).pipe(qh(z,ou)),Dg=R.check(ig()),Og=R.annotate({expected:`a string that will be decoded as a trimmed string`}).pipe(qh(Dg,ru())),kg=R.annotate({expected:`a base64 encoded string that will be decoded as Uint8Array`,format:`byte`,contentEncoding:`base64`}),Ag=eg(globalThis.Uint8Array,{representation:{id:`effect/schema/Uint8Array`,payload:null},toCode:()=>({runtime:`Schema.Uint8Array`,Type:`globalThis.Uint8Array`}),expected:`Uint8Array`,toCodecJson:()=>tg()(kg,su)}),jg=nu({decode:(e,t)=>He(bc(e),{onNone:()=>vn(new dl({expected:`a valid UTC DateTime string`},e,t)),onSome:e=>k(xc(e))}),encode:e=>k(Sc(e))}),Mg=-864e13,Ng=864e13;function Pg(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 Fg(e,t){return G.check(_g({minimum:e,maximum:t}))}var Ig=uh(e=>_c(e)&&vc(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]=Pg(e,Mg,Ng);return Jh()(Fg(t,n),Rl(yc))},toCodecJson:()=>tg()(R,jg),toFormatter:()=>e=>e.toString()}),Lg=R.annotate({expected:`a string that will be decoded as a DateTime.Utc`}).pipe(qh(Ig,jg));function Rg(e){return Qm(e.ast)}function zg(e,t){return Hm(Gm(_m(e.ast),t),t)}var Bg=gm,Vg=Eh(Wd(Bf,{toCode:()=>({runtime:`Schema.Json`,Type:`Schema.Json`})})),Hg=Lh(R,Vg),Ug=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})),Wg=t(((e,t)=>{t.exports=Ug()})),q=Wg(),Gg=M.createContext(void 0),Kg=e=>{let t=M.useContext(Gg);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},qg=({client:e,children:t})=>(M.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,q.jsx)(Gg.Provider,{value:e,children:t})),Jg={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Yg=new class{#e=Jg;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 Xg(e){setTimeout(e,0)}var Zg=typeof window>`u`||`Deno`in globalThis;function Qg(){}function $g(e,t){return typeof e==`function`?e(t):e}function e_(e){return typeof e==`number`&&e>=0&&e!==1/0}function t_(e,t){return Math.max(e+(t||0)-Date.now(),0)}function n_(e,t){return typeof e==`function`?e(t):e}function r_(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==a_(o,t.options))return!1}else if(!s_(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 i_(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(o_(t.options.mutationKey)!==o_(a))return!1}else if(!s_(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function a_(e,t){return(t?.queryKeyHashFn||o_)(e)}function o_(e){return JSON.stringify(e,(e,t)=>f_(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function s_(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(!s_(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!s_(e[r],t[r]))return!1;return!0}return!1}var c_=Object.prototype.hasOwnProperty;function l_(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=d_(e)&&d_(t);if(!r&&!(f_(e)&&f_(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:c_.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=l_(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function u_(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 f_(e){if(!p_(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!p_(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function p_(e){return Object.prototype.toString.call(e)===`[object Object]`}function m_(e){return new Promise(t=>{Yg.setTimeout(t,e)})}function h_(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:l_(e,t)}function g_(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function __(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var v_=Symbol();function y_(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===v_?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function b_(e,t){return typeof e==`function`?e(...t):!!e}function x_(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 S_=()=>Zg,C_=()=>S_(),w_=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(){}},T_=new class extends w_{#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`}},E_=Xg;function D_(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=E_,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 O_=D_(),k_=new class extends w_{#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 A_(e){return Math.min(1e3*2**e,3e4)}function j_(e){return(e??`online`)!==`online`||k_.isOnline()}var M_=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function N_(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(Qg);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new M_(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>T_.isFocused()&&(e.networkMode===`always`||k_.isOnline())&&e.canRun(),p=()=>j_(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??(C_()?0:3),a=e.retryDelay??A_,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),m_(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 P_=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),e_(this.gcTime)&&(this.#e=Yg.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(C_()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Yg.clearTimeout(this.#e),this.#e=void 0)}};function F_(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=>{x_(e,()=>t.signal,()=>n=!0)},u=y_(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?__:g_;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?L_:I_,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:I_(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 I_(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 L_(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}function R_(e,t){return t?I_(e,t)!=null:!1}function z_(e,t){return!t||!e.getPreviousPageParam?!1:L_(e,t)!=null}var B_=class extends P_{#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=U_(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=U_(this.options);e.data!==void 0&&(this.setState(H_(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=h_(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(Qg).catch(Qg):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=>n_(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===v_||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>n_(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:!t_(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=y_(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`?F_(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=N_({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof M_&&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 M_){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,...V_(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...H_(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),O_.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function V_(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:j_(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function H_(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function U_(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 W_=class extends w_{#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),K_(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return q_(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return q_(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 n_(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&&!u_(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&J_(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||n_(this.options.enabled,this.#t)!==n_(t.enabled,this.#t)||n_(this.options.staleTime,this.#t)!==n_(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||n_(this.options.enabled,this.#t)!==n_(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 u_(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(Qg)),t}#h(e){return!C_()&&n_(this.options.enabled,this.#t)!==!1&&e_(e)}#g(){this.#b();let e=n_(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=t_(this.#r.dataUpdatedAt,e)+1;this.#u=Yg.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=Yg.setInterval(()=>{(this.options.refetchIntervalInBackground||T_.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(Yg.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(Yg.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&&K_(e,t),o=i&&J_(e,n,t,r);(a||o)&&(l={...l,...V_(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=h_(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=h_(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:Y_(e,t),refetch:this.refetch,isEnabled:n_(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),u_(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)})})();O_.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 G_(e,t){return n_(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||n_(t.retryOnMount,e)!==!1)}function K_(e,t){return G_(e,t)||e.state.data!==void 0&&q_(e,t,t.refetchOnMount)}function q_(e,t,n){if(n_(t.enabled,e)!==!1&&n_(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Y_(e,t)}return!1}function J_(e,t,n,r){return(e!==t||n_(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Y_(e,n)}function Y_(e,t){return n_(t.enabled,e)!==!1&&e.isStaleByTime(n_(t.staleTime,e))}var X_=class extends W_{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:R_(t,n.data),hasPreviousPage:z_(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},Z_=class extends P_{#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||Q_(),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=N_({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),O_.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Q_(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var $_=class extends w_{#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 Z_({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=ev(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=ev(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=ev(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=ev(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){O_.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=>i_(t,e))}findAll(e={}){return this.getAll().filter(t=>i_(e,t))}notify(e){O_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return O_.batch(()=>Promise.all(e.map(e=>e.continue().catch(Qg))))}};function ev(e){return e.options.scope?.id}var tv=class extends w_{#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),u_(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&o_(t.mutationKey)!==o_(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??Q_();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){O_.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)})})}},nv=class extends w_{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??a_(r,t),a=this.get(i);return a||(a=new B_({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(){O_.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=>r_(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>r_(e,t)):t}notify(e){O_.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){O_.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){O_.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},rv=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new nv,this.#t=e.mutationCache||new $_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=T_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=k_.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(n_(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=$g(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return O_.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;O_.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return O_.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=O_.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Qg).catch(Qg)}invalidateQueries(e,t={}){return O_.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=O_.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(Qg)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Qg)}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(n_(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(n_(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Qg).catch(Qg)}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(Qg).catch(Qg)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return k_.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(o_(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{s_(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(o_(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{s_(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||=a_(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===v_&&(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 iv({streamFn:e,refetchMode:t=`reset`,reducer:n=(e,t)=>g_(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(x_({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 av(e){return e}function ov(e){return e}var sv=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,ae(x);else{var t=n(l);t!==null&&oe(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&&!te());){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&&oe(b,g.startTime-i),u=!1}return u}finally{d=null,f=a,p=!1}}var S=!1,C=null,w=-1,ee=5,T=-1;function te(){return!(e.unstable_now()-T<ee)}function ne(){if(C!==null){var t=e.unstable_now();T=t;var n=!0;try{n=C(!0,t)}finally{n?re():(S=!1,C=null)}}else S=!1}var re;if(typeof v==`function`)re=function(){v(ne)};else if(typeof MessageChannel<`u`){var E=new MessageChannel,ie=E.port2;E.port1.onmessage=ne,re=function(){ie.postMessage(null)}}else re=function(){g(ne,0)};function ae(e){C=e,S||(S=!0,re())}function oe(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,ae(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,oe(b,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ae(x))),r},e.unstable_shouldYield=te,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),cv=t(((e,t)=>{t.exports=sv()})),lv=t((e=>{var t=Wi(),n=cv();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`),T=Symbol.for(`react.profiler`),te=Symbol.for(`react.provider`),ne=Symbol.for(`react.context`),re=Symbol.for(`react.forward_ref`),E=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.offscreen`),D=Symbol.iterator;function ce(e){return typeof e!=`object`||!e?null:(e=D&&e[D]||e[`@@iterator`],typeof e==`function`?e:null)}var le=Object.assign,ue;function de(e){if(ue===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ue=t&&t[1]||``}return`
4
- `+ue+e}var fe=!1;function pe(e,t){if(!e||fe)return``;fe=!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(`
5
- `),a=r.stack.split(`
6
- `),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(o!==1||s!==1)do if(o--,s--,0>s||i[o]!==a[s]){var c=`
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{fe=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:``)?de(e):``}function me(e){switch(e.tag){case 5:return de(e.type);case 16:return de(`Lazy`);case 13:return de(`Suspense`);case 19:return de(`SuspenseList`);case 0:case 2:case 15:return e=pe(e.type,!1),e;case 11:return e=pe(e.type.render,!1),e;case 1:return e=pe(e.type,!0),e;default:return``}}function he(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 T:return`Profiler`;case ee:return`StrictMode`;case E:return`Suspense`;case ie:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case ne:return(e.displayName||`Context`)+`.Consumer`;case te:return(e._context.displayName||`Context`)+`.Provider`;case re:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?he(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}function ge(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 he(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 O(e){switch(typeof e){case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function _e(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function ve(e){var t=_e(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 ye(e){e._valueTracker||=ve(e)}function be(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=_e(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function xe(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 Se(e,t){var n=t.checked;return le({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Ce(e,t){var n=t.defaultValue==null?``:t.defaultValue,r=t.checked==null?t.defaultChecked:t.checked;n=O(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 we(e,t){t=t.checked,t!=null&&b(e,`checked`,t,!1)}function Te(e,t){we(e,t);var n=O(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`)?De(e,t.type,n):t.hasOwnProperty(`defaultValue`)&&De(e,t.type,O(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ee(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 De(e,t,n){(t!==`number`||xe(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=``+O(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 le({},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:O(n)}}function je(e,t){var n=O(t.value),r=O(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 Pe(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 Fe,Ie=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(Fe||=document.createElement(`div`),Fe.innerHTML=`<svg>`+t.valueOf().toString()+`</svg>`,t=Fe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Le(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Re={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},ze=[`Webkit`,`ms`,`Moz`,`O`];Object.keys(Re).forEach(function(e){ze.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Re[t]=Re[e]})});function Be(e,t,n){return t==null||typeof t==`boolean`||t===``?``:n||typeof t!=`number`||t===0||Re.hasOwnProperty(e)&&Re[e]?(``+t).trim():t+`px`}function Ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=n.indexOf(`--`)===0,i=Be(n,t[n],r);n===`float`&&(n=`cssFloat`),r?e.setProperty(n,i):e[n]=i}}var He=le({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 Ue(e,t){if(t){if(He[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 We(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 Ge=null;function Ke(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qe=null,Je=null,Ye=null;function Xe(e){if(e=Yi(e)){if(typeof qe!=`function`)throw Error(r(280));var t=e.stateNode;t&&(t=Zi(t),qe(e.stateNode,e.type,t))}}function Ze(e){Je?Ye?Ye.push(e):Ye=[e]:Je=e}function Qe(){if(Je){var e=Je,t=Ye;if(Ye=Je=null,Xe(e),t)for(e=0;e<t.length;e++)Xe(t[e])}}function $e(e,t){return e(t)}function et(){}var tt=!1;function nt(e,t,n){if(tt)return e(t,n);tt=!0;try{return $e(e,t,n)}finally{tt=!1,(Je!==null||Ye!==null)&&(et(),Qe())}}function rt(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 it=!1;if(c)try{var at={};Object.defineProperty(at,"passive",{get:function(){it=!0}}),window.addEventListener(`test`,at,at),window.removeEventListener(`test`,at,at)}catch{it=!1}function ot(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 st=!1,ct=null,lt=!1,ut=null,dt={onError:function(e){st=!0,ct=e}};function ft(e,t,n,r,i,a,o,s,c){st=!1,ct=null,ot.apply(dt,arguments)}function pt(e,t,n,i,a,o,s,c,l){if(ft.apply(this,arguments),st){if(st){var u=ct;st=!1,ct=null}else throw Error(r(198));lt||(lt=!0,ut=u)}}function mt(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 ht(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 gt(e){if(mt(e)!==e)throw Error(r(188))}function _t(e){var t=e.alternate;if(!t){if(t=mt(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 gt(a),e;if(o===i)return gt(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 vt(e){return e=_t(e),e===null?null:yt(e)}function yt(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=yt(e);if(t!==null)return t;e=e.sibling}return null}var bt=n.unstable_scheduleCallback,xt=n.unstable_cancelCallback,St=n.unstable_shouldYield,Ct=n.unstable_requestPaint,wt=n.unstable_now,Tt=n.unstable_getCurrentPriorityLevel,Et=n.unstable_ImmediatePriority,Dt=n.unstable_UserBlockingPriority,Ot=n.unstable_NormalPriority,kt=n.unstable_LowPriority,At=n.unstable_IdlePriority,jt=null,Mt=null;function Nt(e){if(Mt&&typeof Mt.onCommitFiberRoot==`function`)try{Mt.onCommitFiberRoot(jt,e,void 0,(e.current.flags&128)==128)}catch{}}var Pt=Math.clz32?Math.clz32:Lt,Ft=Math.log,It=Math.LN2;function Lt(e){return e>>>=0,e===0?32:31-(Ft(e)/It|0)|0}var Rt=64,zt=4194304;function Bt(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 Vt(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=Bt(a))):r=Bt(s)}else o=n&~i,o===0?a!==0&&(r=Bt(a)):r=Bt(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-Pt(t),i=1<<n,r|=e[n],t&=~i;return r}function Ht(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 Ut(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-Pt(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ht(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}}function Wt(e){return e=e.pendingLanes&-1073741825,e===0?e&1073741824?1073741824:0:e}function Gt(){var e=Rt;return Rt<<=1,!(Rt&4194240)&&(Rt=64),e}function Kt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qt(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Pt(t),e[t]=n}function Jt(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-Pt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}function Yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Pt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Xt=0;function Zt(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Qt,$t,en,tn,nn,rn=!1,an=[],on=null,sn=null,cn=null,ln=new Map,un=new Map,dn=[],fn=`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 pn(e,t){switch(e){case`focusin`:case`focusout`:on=null;break;case`dragenter`:case`dragleave`:sn=null;break;case`mouseover`:case`mouseout`:cn=null;break;case`pointerover`:case`pointerout`:ln.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:un.delete(t.pointerId)}}function mn(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&&$t(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function hn(e,t,n,r,i){switch(t){case`focusin`:return on=mn(on,e,t,n,r,i),!0;case`dragenter`:return sn=mn(sn,e,t,n,r,i),!0;case`mouseover`:return cn=mn(cn,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return ln.set(a,mn(ln.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,un.set(a,mn(un.get(a)||null,e,t,n,r,i)),!0}return!1}function gn(e){var t=Ji(e.target);if(t!==null){var n=mt(t);if(n!==null){if(t=n.tag,t===13){if(t=ht(n),t!==null){e.blockedOn=t,nn(e.priority,function(){en(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 _n(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=On(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);Ge=r,n.target.dispatchEvent(r),Ge=null}else return t=Yi(n),t!==null&&$t(t),e.blockedOn=n,!1;t.shift()}return!0}function vn(e,t,n){_n(e)&&n.delete(t)}function yn(){rn=!1,on!==null&&_n(on)&&(on=null),sn!==null&&_n(sn)&&(sn=null),cn!==null&&_n(cn)&&(cn=null),ln.forEach(vn),un.forEach(vn)}function bn(e,t){e.blockedOn===t&&(e.blockedOn=null,rn||(rn=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,yn)))}function xn(e){function t(t){return bn(t,e)}if(0<an.length){bn(an[0],e);for(var n=1;n<an.length;n++){var r=an[n];r.blockedOn===e&&(r.blockedOn=null)}}for(on!==null&&bn(on,e),sn!==null&&bn(sn,e),cn!==null&&bn(cn,e),ln.forEach(t),un.forEach(t),n=0;n<dn.length;n++)r=dn[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<dn.length&&(n=dn[0],n.blockedOn===null);)gn(n),n.blockedOn===null&&dn.shift()}var Sn=x.ReactCurrentBatchConfig,Cn=!0;function wn(e,t,n,r){var i=Xt,a=Sn.transition;Sn.transition=null;try{Xt=1,En(e,t,n,r)}finally{Xt=i,Sn.transition=a}}function Tn(e,t,n,r){var i=Xt,a=Sn.transition;Sn.transition=null;try{Xt=4,En(e,t,n,r)}finally{Xt=i,Sn.transition=a}}function En(e,t,n,r){if(Cn){var i=On(e,t,n,r);if(i===null)xi(e,t,r,Dn,n),pn(e,r);else if(hn(i,e,t,n,r))r.stopPropagation();else if(pn(e,r),t&4&&-1<fn.indexOf(e)){for(;i!==null;){var a=Yi(i);if(a!==null&&Qt(a),a=On(e,t,n,r),a===null&&xi(e,t,r,Dn,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else xi(e,t,r,null,n)}}var Dn=null;function On(e,t,n,r){if(Dn=null,e=Ke(r),e=Ji(e),e!==null){if(t=mt(e),t===null)e=null;else if(n=t.tag,n===13){if(e=ht(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 Dn=e,null}function A(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(Tt()){case Et:return 1;case Dt:return 4;case Ot:case kt:return 16;case At:return 536870912;default:return 16}default:return 16}}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;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 jn=i.slice(e,1<r?1-r:void 0)}function Nn(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 Pn(){return!0}function Fn(){return!1}function In(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)?Pn:Fn,this.isPropagationStopped=Fn,this}return le(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=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=le({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=le({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,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!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(le({},Wn,{dataTransfer:0})),qn=In(le({},zn,{relatedTarget:0})),Jn=In(le({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(le({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(le({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={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`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(le({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(le({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(le({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),ar=In(le({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),or=In(le({},Wn,{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})),sr=[9,13,27,32],cr=c&&`CompositionEvent`in window,lr=null;c&&`documentMode`in document&&(lr=document.documentMode);var ur=c&&`TextEvent`in window&&!lr,dr=c&&(!cr||lr&&8<lr&&11>=lr),fr=` `,pr=!1;function mr(e,t){switch(e){case`keyup`:return sr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function hr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var gr=!1;function _r(e,t){switch(e){case`compositionend`:return hr(t);case`keypress`:return t.which===32?(pr=!0,fr):null;case`textInput`:return e=t.data,e===fr&&pr?null:e;default:return null}}function vr(e,t){if(gr)return e===`compositionend`||!cr&&mr(e,t)?(e=Mn(),jn=An=kn=null,gr=!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 dr&&t.locale!==`ko`?null:t.data;default:return null}}var yr={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 br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!yr[e.type]:t===`textarea`}function xr(e,t,n,r){Ze(r),t=Ci(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Sr=null,Cr=null;function wr(e){hi(e,0)}function Tr(e){if(be(Xi(e)))return e}function Er(e,t){if(e===`change`)return t}var Dr=!1;if(c){var Or;if(c){var kr=`oninput`in document;if(!kr){var Ar=document.createElement(`div`);Ar.setAttribute(`oninput`,`return;`),kr=typeof Ar.oninput==`function`}Or=kr}else Or=!1;Dr=Or&&(!document.documentMode||9<document.documentMode)}function jr(){Sr&&(Sr.detachEvent(`onpropertychange`,Mr),Cr=Sr=null)}function Mr(e){if(e.propertyName===`value`&&Tr(Cr)){var t=[];xr(t,Cr,e,Ke(e)),nt(wr,t)}}function Nr(e,t,n){e===`focusin`?(jr(),Sr=t,Cr=n,Sr.attachEvent(`onpropertychange`,Mr)):e===`focusout`&&jr()}function Pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Tr(Cr)}function Fr(e,t){if(e===`click`)return Tr(t)}function Ir(e,t){if(e===`input`||e===`change`)return Tr(t)}function Lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Rr=typeof Object.is==`function`?Object.is:Lr;function zr(e,t){if(Rr(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)||!Rr(e[i],t[i]))return!1}return!0}function Br(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vr(e,t){var n=Br(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=Br(n)}}function Hr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ur(){for(var e=window,t=xe();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=xe(e.document)}return t}function Wr(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 Gr(e){var t=Ur(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Hr(n.ownerDocument.documentElement,n)){if(r!==null&&Wr(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=Vr(n,a);var o=Vr(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 Kr=c&&`documentMode`in document&&11>=document.documentMode,qr=null,Jr=null,Yr=null,Xr=!1;function Zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xr||qr==null||qr!==xe(r)||(r=qr,`selectionStart`in r&&Wr(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}),Yr&&zr(Yr,r)||(Yr=r,r=Ci(Jr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=qr)))}function Qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var $r={animationend:Qr(`Animation`,`AnimationEnd`),animationiteration:Qr(`Animation`,`AnimationIteration`),animationstart:Qr(`Animation`,`AnimationStart`),transitionend:Qr(`Transition`,`TransitionEnd`)},ei={},ti={};c&&(ti=document.createElement(`div`).style,`AnimationEvent`in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),`TransitionEvent`in window||delete $r.transitionend.transition);function ni(e){if(ei[e])return ei[e];if(!$r[e])return e;var t=$r[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ti)return ei[e]=t[n];return e}var ri=ni(`animationend`),ii=ni(`animationiteration`),ai=ni(`animationstart`),oi=ni(`transitionend`),si=new Map,ci=`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 li(e,t){si.set(e,t),o(t,[e])}for(var ui=0;ui<ci.length;ui++){var di=ci[ui];li(di.toLowerCase(),`on`+(di[0].toUpperCase()+di.slice(1)))}li(ri,`onAnimationEnd`),li(ii,`onAnimationIteration`),li(ai,`onAnimationStart`),li(`dblclick`,`onDoubleClick`),li(`focusin`,`onFocus`),li(`focusout`,`onBlur`),li(oi,`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 fi=`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(` `),pi=new Set(`cancel close invalid load scroll toggle`.split(` `).concat(fi));function mi(e,t,n){var r=e.type||`unknown-event`;e.currentTarget=n,pt(r,t,void 0,e),e.currentTarget=null}function hi(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;mi(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;mi(i,s,l),a=c}}}if(lt)throw e=ut,lt=!1,ut=null,e}function gi(e,t){var n=t[Gi];n===void 0&&(n=t[Gi]=new Set);var r=e+`__bubble`;n.has(r)||(bi(t,e,2,!1),n.add(r))}function _i(e,t,n){var r=0;t&&(r|=4),bi(n,e,r,t)}var vi=`_reactListening`+Math.random().toString(36).slice(2);function yi(e){if(!e[vi]){e[vi]=!0,i.forEach(function(t){t!==`selectionchange`&&(pi.has(t)||_i(t,!1,e),_i(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vi]||(t[vi]=!0,_i(`selectionchange`,!1,t))}}function bi(e,t,n,r){switch(A(t)){case 1:var i=wn;break;case 4:i=Tn;break;default:i=En}n=i.bind(null,t,n,e),i=void 0,!it||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 xi(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}nt(function(){var r=a,i=Ke(n),o=[];a:{var s=si.get(e);if(s!==void 0){var c=Rn,l=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:c=nr;break;case`focusin`:l=`focus`,c=qn;break;case`focusout`:l=`blur`,c=qn;break;case`beforeblur`:case`afterblur`:c=qn;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=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=ir;break;case ri:case ii:case ai:c=Jn;break;case oi:c=ar;break;case`scroll`:c=Bn;break;case`wheel`:c=or;break;case`copy`:case`cut`:case`paste`:c=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=rr}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=rt(p,f),h!=null&&u.push(Si(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!==Ge&&(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=mt(l),l!==d||l.tag!==5&&l.tag!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=Gn,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=rr,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=wi(m))p++;for(m=0,h=f;h;h=wi(h))m++;for(;0<p-m;)u=wi(u),p--;for(;0<m-p;)f=wi(f),m--;for(;p--;){if(u===f||f!==null&&u===f.alternate)break b;u=wi(u),f=wi(f)}u=null}else u=null;c!==null&&Ti(o,s,c,u,!1),l!==null&&d!==null&&Ti(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=Er;else if(br(s)){if(Dr)g=Ir;else{g=Pr;var _=Nr}}else(c=s.nodeName)&&c.toLowerCase()===`input`&&(s.type===`checkbox`||s.type===`radio`)&&(g=Fr);if(g&&=g(e,r)){xr(o,g,n,i);break a}_&&_(e,s,r),e===`focusout`&&(_=s._wrapperState)&&_.controlled&&s.type===`number`&&De(s,`number`,s.value)}switch(_=r?Xi(r):window,e){case`focusin`:(br(_)||_.contentEditable===`true`)&&(qr=_,Jr=r,Yr=null);break;case`focusout`:Yr=Jr=qr=null;break;case`mousedown`:Xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Xr=!1,Zr(o,n,i);break;case`selectionchange`:if(Kr)break;case`keydown`:case`keyup`:Zr(o,n,i)}var v;if(cr)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 gr?mr(e,n)&&(y=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(y=`onCompositionStart`);y&&(dr&&n.locale!==`ko`&&(gr||y!==`onCompositionStart`?y===`onCompositionEnd`&&gr&&(v=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,gr=!0)),_=Ci(r,y),0<_.length&&(y=new Xn(y,e,null,n,i),o.push({event:y,listeners:_}),v?y.data=v:(v=hr(n),v!==null&&(y.data=v)))),(v=ur?_r(e,n):vr(e,n))&&(r=Ci(r,`onBeforeInput`),0<r.length&&(i=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:i,listeners:r}),i.data=v))}hi(o,t)})}function Si(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ci(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;i.tag===5&&a!==null&&(i=a,a=rt(e,n),a!=null&&r.unshift(Si(e,a,i)),a=rt(e,t),a!=null&&r.push(Si(e,a,i))),e=e.return}return r}function wi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Ti(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=rt(n,a),c!=null&&o.unshift(Si(n,c,s))):i||(c=rt(n,a),c!=null&&o.push(Si(n,c,s)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Ei=/\r\n?/g,Di=/\u0000|\uFFFD/g;function Oi(e){return(typeof e==`string`?e:``+e).replace(Ei,`
8
- `).replace(Di,``)}function ki(e,t,n){if(t=Oi(t),Oi(e)!==t&&n)throw Error(r(425))}function Ai(){}var ji=null,Mi=null;function Ni(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 Pi=typeof setTimeout==`function`?setTimeout:void 0,Fi=typeof clearTimeout==`function`?clearTimeout:void 0,Ii=typeof Promise==`function`?Promise:void 0,Li=typeof queueMicrotask==`function`?queueMicrotask:Ii===void 0?Pi:function(e){return Ii.resolve(null).then(e).catch(Ri)};function Ri(e){setTimeout(function(){throw e})}function j(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),xn(t);return}r--}else n!==`$`&&n!==`$?`&&n!==`$!`||r++}n=i}while(n);xn(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,ge(e)||`Unknown`,a));return le({},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=Xt;try{var n=ma;for(Xt=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)),bt(Et,ya),t}finally{Xt=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-Pt(r)-1;r&=~(1<<i),n+=1;var a=32-Pt(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Da=1<<32-Pt(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`&&!Ni(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===oe&&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 oe:var r=t._init;return f(e,r(t._payload),n)}if(Oe(t)||ce(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 oe:return i=n._init,p(e,t,i(n._payload),r)}if(Oe(n)||ce(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 oe:var a=r._init;return m(e,t,n,a(r._payload),i)}if(Oe(r)||ce(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=ce(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===oe&&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 oe:return l=i._init,_(e,r,l(i._payload),o)}if(Oe(i))return h(e,r,i,o);if(ce(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,Yt(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=le({},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:Pe(null,``);break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pe(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=Pe(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(!Rr(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,Rr(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);Rr(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=!Rr(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!Rr(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?(Rr(n,t)||(n=Gt(),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=Xt;Xt=n!==0&&4>n?n:4,e(!0);var r=Io.transition;Io.transition={};try{e(!1),t()}finally{Xt=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,Rr(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,Yt(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-Pt(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=le({},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:le({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Fs={isMounted:function(e){return(e=e._reactInternals)?mt(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?!zr(n,r)||!zr(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+=me(r),r=r.return;while(r);var i=n}catch(e){i=`
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?zr: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(zr(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=Se(e,i),r=Se(e,r),o=[];break;case`select`:i=le({},i,{value:void 0}),r=le({},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=Ai)}Ue(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`&&gi(`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`:gi(`cancel`,i),gi(`close`,i);break;case`iframe`:case`object`:case`embed`:gi(`load`,i);break;case`video`:case`audio`:for(o=0;o<fi.length;o++)gi(fi[o],i);break;case`source`:gi(`error`,i);break;case`img`:case`image`:case`link`:gi(`error`,i),gi(`load`,i);break;case`details`:gi(`toggle`,i);break;case`input`:Ce(i,s),gi(`invalid`,i);break;case`select`:i._wrapperState={wasMultiple:!!s.multiple},gi(`invalid`,i);break;case`textarea`:Ae(i,s),gi(`invalid`,i)}for(var c in Ue(n,s),o=null,s)if(s.hasOwnProperty(c)){var l=s[c];c===`children`?typeof l==`string`?i.textContent!==l&&(!0!==s.suppressHydrationWarning&&ki(i.textContent,l,e),o=[`children`,l]):typeof l==`number`&&i.textContent!==``+l&&(!0!==s.suppressHydrationWarning&&ki(i.textContent,l,e),o=[`children`,``+l]):a.hasOwnProperty(c)&&l!=null&&c===`onScroll`&&gi(`scroll`,i)}switch(n){case`input`:ye(i),Ee(i,s,!0);break;case`textarea`:ye(i),Me(i);break;case`select`:case`option`:break;default:typeof s.onClick==`function`&&(i.onclick=Ai)}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=We(n,i),n){case`dialog`:gi(`cancel`,e),gi(`close`,e),o=i;break;case`iframe`:case`object`:case`embed`:gi(`load`,e),o=i;break;case`video`:case`audio`:for(o=0;o<fi.length;o++)gi(fi[o],e);o=i;break;case`source`:gi(`error`,e),o=i;break;case`img`:case`image`:case`link`:gi(`error`,e),gi(`load`,e),o=i;break;case`details`:gi(`toggle`,e),o=i;break;case`input`:Ce(e,i),o=Se(e,i),gi(`invalid`,e);break;case`option`:o=i;break;case`select`:e._wrapperState={wasMultiple:!!i.multiple},o=le({},i,{value:void 0}),gi(`invalid`,e);break;case`textarea`:Ae(e,i),o=ke(e,i),gi(`invalid`,e);break;default:o=i}for(s in Ue(n,o),l=o,l)if(l.hasOwnProperty(s)){var u=l[s];s===`style`?Ve(e,u):s===`dangerouslySetInnerHTML`?(u=u?u.__html:void 0,u!=null&&Ie(e,u)):s===`children`?typeof u==`string`?(n!==`textarea`||u!==``)&&Le(e,u):typeof u==`number`&&Le(e,``+u):s!==`suppressContentEditableWarning`&&s!==`suppressHydrationWarning`&&s!==`autoFocus`&&(a.hasOwnProperty(s)?u!=null&&s===`onScroll`&&gi(`scroll`,e):u!=null&&b(e,s,u,c))}switch(n){case`input`:ye(e),Ee(e,i,!1);break;case`textarea`:ye(e),Me(e);break;case`option`:i.value!=null&&e.setAttribute(`value`,``+O(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=Ai)}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:ki(i.nodeValue,n,!!(e.mode&1));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&ki(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&&yi(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&&wt()>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*wt()-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=wt(),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(ji=Cn,e=Ur(),Wr(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(Mi={focusedElem:e,selectionRange:n},Cn=!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=Ai));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(Mt&&typeof Mt.onCommitFiberUnmount==`function`)try{Mt.onCommitFiberUnmount(jt,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?j(e.parentNode,n):e.nodeType===1&&j(e,n),xn(e)):j(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{Le(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&&we(a,o),We(c,s);var u=We(c,o);for(s=0;s<l.length;s+=2){var d=l[s],f=l[s+1];d===`style`?Ve(a,f):d===`dangerouslySetInnerHTML`?Ie(a,f):d===`children`?Le(a,f):b(a,d,f,u)}switch(c){case`input`:Te(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{xn(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=wt())),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=Be(`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&&(Le(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&&xn(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?wt():kl===-1?kl=wt():kl}function Ml(e){return e.mode&1?al&2&&cl!==0?cl&-cl:Ka.transition===null?(e=Xt,e===0?(e=window.event,e=e===void 0?16:A(e.type),e):e):(Al===0&&(Al=Gt()),Al):1}function Nl(e,t,n,i){if(50<Dl)throw Dl=0,Ol=null,Error(r(185));qt(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=wt()+500,ha&&ya()))}function Pl(e,t){var n=e.callbackNode;Ut(e,t);var r=Vt(e,e===ol?cl:0);if(r===0)n!==null&&xt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&xt(n),t===1)e.tag===0?va(Bl.bind(null,e)):_a(Bl.bind(null,e)),Li(function(){!(al&6)&&ya()}),n=null;else{switch(Zt(r)){case 1:n=Et;break;case 4:n=Dt;break;case 16:n=Ot;break;case 536870912:n=At;break;default:n=Ot}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=Vt(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=wt()+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=Wt(e),a!==0&&(i=a,t=Il(e,a))),t===1)throw n=fl,Wl(e,0),zl(e,i),Pl(e,wt()),n;if(t===6)zl(e,i);else{if(a=e.current.alternate,!(i&30)&&!Rl(a)&&(t=Jl(e,i),t===2&&(o=Wt(e),o!==0&&(i=o,t=Il(e,o))),t===1))throw n=fl,Wl(e,0),zl(e,i),Pl(e,wt()),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-wt(),10<t)){if(Vt(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){jl(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Pi($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-Pt(i);o=1<<s,s=t[s],s>a&&(a=s),i&=~o}if(i=a,i=wt()-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=Pi($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,wt()),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(!Rr(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-Pt(t),r=1<<n;e[n]=-1,t&=~r}}function Bl(e){if(al&6)throw Error(r(327));tu();var t=Vt(e,0);if(!(t&1))return Pl(e,wt()),null;var n=Jl(e,t);if(e.tag!==0&&n===2){var i=Wt(e);i!==0&&(t=i,n=Il(e,i))}if(n===1)throw n=fl,Wl(e,0),zl(e,t),Pl(e,wt()),n;if(n===6)throw Error(r(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,$l(e,_l,bl),Pl(e,wt()),null}function Vl(e,t){var n=al;al|=1;try{return e(t)}finally{al=n,al===0&&(yl=wt()+500,ha&&ya())}}function Hl(e){Tl!==null&&Tl.tag===0&&!(al&6)&&tu();var t=al;al|=1;var n=il.transition,r=Xt;try{if(il.transition=null,Xt=1,e)return e()}finally{Xt=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,Fi(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&&!St();)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=Xt,i=il.transition;try{il.transition=null,Xt=1,eu(e,t,n,r)}finally{il.transition=i,Xt=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(Jt(e,o),e===ol&&(sl=ol=null,cl=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||wl||(wl=!0,lu(Ot,function(){return tu(),null})),o=!!(n.flags&15990),n.subtreeFlags&15990||o){o=il.transition,il.transition=null;var s=Xt;Xt=1;var c=al;al|=4,rl.current=null,Nc(e,n),Jc(n,e),Gr(Mi),Cn=!!ji,Mi=ji=null,e.current=n,Xc(n,e,a),Ct(),al=c,Xt=s,il.transition=o}else e.current=n;if(wl&&(wl=!1,Tl=e,El=a),o=e.pendingLanes,o===0&&(Cl=null),Nt(n.stateNode,i),Pl(e,wt()),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=Zt(El),t=il.transition,n=Xt;try{if(il.transition=null,Xt=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(),Mt&&typeof Mt.onPostCommitFiberRoot==`function`)try{Mt.onPostCommitFiberRoot(jt,e)}catch{}i=!0}return i}finally{Xt=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&&(qt(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&&(qt(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>wt()-vl?Wl(e,0):hl|=n),Pl(e,t)}function au(e,t){t===0&&(e.mode&1?(t=zt,zt<<=1,!(zt&130023424)&&(zt=4194304)):t=1);var n=jl();e=fo(e,t),e!==null&&(qt(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,Ni(i,a)?s=null:o!==null&&Ni(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(Rr(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 bt(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===re)return 11;if(e===ae)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 T:return e=du(12,n,t,a|2),e.elementType=T,e.lanes=o,e;case E:return e=du(13,n,t,a),e.elementType=E,e.lanes=o,e;case ie:return e=du(19,n,t,a),e.elementType=ie,e.lanes=o,e;case se:return _u(n,a,o,t);default:if(typeof e==`object`&&e)switch(e.$$typeof){case te:s=10;break a;case ne:s=9;break a;case re:s=11;break a;case ae:s=14;break a;case oe: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=se,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=Kt(0),this.expirationTimes=Kt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kt(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(mt(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,qt(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=tn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<dn.length&&t!==0&&t<dn[n].priority;n++);dn.splice(n,0,e),n===0&&gn(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,yi(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,yi(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)}Qt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Bt(t.pendingLanes);n!==0&&(Yt(t,n|1),Pl(t,wt()),!(al&6)&&(yl=wt()+500,ya()))}break;case 13:Hl(function(){var t=fo(e,1);t!==null&&Nl(t,e,1,jl())}),Ou(e,1)}},$t=function(e){if(e.tag===13){var t=fo(e,134217728);t!==null&&Nl(t,e,134217728,jl()),Ou(e,134217728)}},en=function(e){if(e.tag===13){var t=Ml(e),n=fo(e,t);n!==null&&Nl(n,e,t,jl()),Ou(e,t)}},tn=function(){return Xt},nn=function(e,t){var n=Xt;try{return Xt=e,t()}finally{Xt=n}},qe=function(e,t,n){switch(t){case`input`:if(Te(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));be(i),Te(i,a)}}}break;case`textarea`:je(e,n);break;case`select`:t=n.value,t!=null&&k(e,!!n.multiple,t,!1)}},$e=Vl,et=Hl;var Ru={usingClientEntryPoint:!1,Events:[Yi,Xi,Zi,Ze,Qe,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=vt(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{jt=Vu.inject(Bu),Mt=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,yi(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=vt(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,yi(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`})),uv=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=lv()})),dv=e=>crypto.getRandomValues(new Uint8Array(e)),fv=(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}}},pv=(e,t=21)=>fv(e,t|0,dv),mv=`abcdefghijklmnopqrstuvwxyz0123456789`;function hv(e=21){if(e===1/0||e===-1/0)throw RangeError(`nanoid length must be finite`);return pv(mv,e)()}var gv=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,_v=/^[a-z][a-z0-9]*(?:_[a-z][a-z0-9]*)*$/,vv=j().min(1).max(64).regex(gv),yv=j().min(1).max(64).regex(gv),bv=j().min(1).max(32).regex(_v),xv=D({prefix:bv}),Sv=D({family:vv,version:or(1),kinds:Pe(yv,xv)}).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)}}),Cv=j(),wv=/^[a-z0-9]+$/,Tv=new TextEncoder;function Ev(e){return e===32||e>=9&&e<=13}function Dv(e){let t=0,n=e.length;for(;t<n&&Ev(e.charCodeAt(t));)t+=1;for(;n>t&&Ev(e.charCodeAt(n-1));)--n;return e.slice(t,n).replace(/[A-Z]/g,e=>String.fromCharCode(e.charCodeAt(0)+32))}function Ov(e){let t=`${e.prefix}_`;function n(e){if(!e.startsWith(t))return!1;let n=e.slice(t.length);return n.length===21&&wv.test(n)}let r=s(()=>wt(e=>{let t=Cv.safeParse(e);return t.success&&n(t.data)}));function i(i){let a,o=i,s=Tv.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(Dv(o))?`non_canonical`:`grammar`;return{ok:!1,error:{code:`invalid_id`,family:e.family,kind:e.kind,version:1,reason:a}}}let a=s(()=>Cv.transform((e,t)=>{let n=i(e);return n.ok?n.value:(t.addIssue({code:`custom`,message:n.error.reason}),T)}));function o(){let n;try{n=hv(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 kv=Pe(j(),D({family:j(),kind:j(),version:or(1),generate:Wn(),schema:cn(Rr),parse:Wn(),is:Wn()})),Av=class extends Error{name=`CairnDefinitionError`;code=`invalid_definition`;constructor(){super(`Cairn identifier family definition is invalid`)}},jv=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 Mv(e){let t;try{t=Sv.safeParse(e)}catch{throw new Av}if(!t.success)throw new Av;let n=t.data,r={};for(let[t,i]of Object.entries(n.kinds)){let a=i.prefix;r[t]=Ov({family:e.family,kind:t,prefix:a,entropyUnavailable:()=>new jv({family:n.family,kind:t})})}let i=wt(e=>{let t=kv.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 Av;return i.data}var Nv=[];for(let e=0;e<256;++e)Nv.push((e+256).toString(16).slice(1));function Pv(e,t=0){return(Nv[e[t+0]]+Nv[e[t+1]]+Nv[e[t+2]]+Nv[e[t+3]]+`-`+Nv[e[t+4]]+Nv[e[t+5]]+`-`+Nv[e[t+6]]+Nv[e[t+7]]+`-`+Nv[e[t+8]]+Nv[e[t+9]]+`-`+Nv[e[t+10]]+Nv[e[t+11]]+Nv[e[t+12]]+Nv[e[t+13]]+Nv[e[t+14]]+Nv[e[t+15]]).toLowerCase()}var Fv,Iv=new Uint8Array(16);function Lv(){if(!Fv){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Fv=crypto.getRandomValues.bind(crypto)}return Fv(Iv)}var Rv={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function zv(e,t,n){if(Rv.randomUUID&&!t&&!e)return Rv.randomUUID();e||={};let r=e.random??e.rng?.()??Lv();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 Pv(r)}var Bv=pe({version:`v7`}),Vv=j().regex(/^replay_[a-f0-9]{64}$/);wt(e=>Vv.safeParse(e).success);var Hv=pe({version:`v4`});wt(e=>Bv.safeParse(e).success);var Uv=wt(e=>Hv.safeParse(e).success);function Wv(){return Uv.parse(zv())}var Gv=e(uv(),1),Kv=Zn([`plain`,`pencil`,`manga`,`riso`,`halftone`,`blueprint`,`crt`,`watercolor`]),qv={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}),Jv=(e,t,n=1)=>J(`feFlood`,{style:`flood-color: ${e}`,"flood-opacity":n,result:t}),Yv=(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})],Xv=(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}),Zv=(e,t)=>Xv(`-0.333 -0.333 -0.333 1 0`,e,t),Qv=(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`}),Xv(`${String(n)} ${String(n)} ${String(n)} ${String(r)} 0`,`${t}Edges`,t)],$v=(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`}),Xv(`${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`}),Xv(`0 0 0 1 0`,`${t}Ring`,`${t}Outline`),ty(t,`${t}Inner`,`${t}Outline`)],ey=(e,t,n)=>J(`feComponentTransfer`,{in:e,result:n},J(`feFuncA`,{type:`discrete`,tableValues:t})),ty=(e,...t)=>J(`feMerge`,{result:e},...t.map(e=>J(`feMergeNode`,{in:e}))),ny=(e,t,n,r=1)=>[Jv(e,`${n}Flood`,r),J(`feComposite`,{in:`${n}Flood`,in2:t,operator:`in`,result:n})],ry={x:`0%`,y:`0%`,width:`100%`,height:`100%`},iy={x:`-8%`,y:`-8%`,width:`116%`,height:`116%`},ay={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},oy=e=>({region:iy,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`}),...Qv(`drawn`,`line`,e.line,e.outline),Zv(`drawn`,`dark`),...Yv(`<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`}),...Yv(`<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`}),Xv(e.tooth,`tooth`,`toothMask`),Xv(`0 0 0 6 -4.6`,`dark`,`solid`),ty(`graphiteRaw`,`solid`,`shadeA`,`shadeB`,`line`),J(`feComposite`,{in:`graphiteRaw`,in2:`toothMask`,operator:`in`,result:`graphite`}),...ny(qv.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]}]}}),sy={region:iy,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`}),...ny(qv.paper,`SourceAlpha`,`paperFill`),Zv(`drawn`,`dark`),...Yv(`<circle cx='2.5' cy='2.5' r='1.15' fill='black'/>`,5,`dots`),ey(`dark`,`0 1 1 0`,`midTone`),J(`feComposite`,{in:`dots`,in2:`midTone`,operator:`in`,result:`tone`}),ey(`dark`,`0 0 0 1`,`solid`),Xv(`3 -3 0 0 -0.35`,`drawn`,`satRG`),Xv(`-3 3 0 0 -0.35`,`drawn`,`satGR`),Xv(`0 3 -3 0 -0.35`,`drawn`,`satGB`),Xv(`0 -3 3 0 -0.35`,`drawn`,`satBG`),ty(`saturation`,`satRG`,`satGR`,`satGB`,`satBG`),ey(`saturation`,`0 1`,`accentMask`),...ny(qv.accent,`accentMask`,`accentFill`),...$v(`drawn`,`edge`,2,2.2),J(`feMorphology`,{in:`edge`,operator:`dilate`,radius:.25,result:`stroke`}),ty(`inkRaw`,`tone`,`solid`,`stroke`),...ny(qv.ink,`inkRaw`,`ink`),ty(`manga`,`paperFill`,`accentFill`,`ink`)],boil:{intervalMs:180,tracks:[{name:`brush`,attribute:`seed`,frames:[2,4,6]}]}},cy={region:iy,primitives:[Xv(`-0.55 -0.55 -0.55 1.65 0`,`SourceGraphic`,`dark`),J(`feTurbulence`,{type:`fractalNoise`,baseFrequency:.85,numOctaves:1,seed:7,result:`grain`}),Xv(`0 0 0 -0.9 1.35`,`grain`,`grainMask`),J(`feComposite`,{in:`dark`,in2:`grainMask`,operator:`in`,result:`firstMask`}),...ny(qv.risoFirst,`firstMask`,`firstInk`,.92),Xv(`0 -1.9 0 1.9 0`,`SourceGraphic`,`secondMask`),...ny(qv.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]}]}},ly={region:iy,primitives:[Xv(`-0.5 -0.5 -0.5 1.65 0`,`SourceGraphic`,`value`),Xv(`0 0 0 0.16 0`,`SourceGraphic`,`floor`),ty(`dark`,`floor`,`value`),...Yv(`<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`}),...ny(qv.ink,`dots`,`halftone`)]},uy={region:ry,primitives:[Jv(qv.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`}),...Yv(`<path d='M0 0.5h16M0.5 0v16' stroke='black' stroke-width='1' stroke-opacity='0.22'/>`,16,`grid`),...ny(qv.blueprintLine,`grid`,`gridLines`),...ny(qv.blueprintLine,`SourceAlpha`,`wash`,.12),...$v(`drawn`,`edge`,3,1.2),J(`feMorphology`,{in:`edge`,operator:`dilate`,radius:.3,result:`stroke`}),...ny(qv.blueprintLine,`stroke`,`lines`),ty(`blueprint`,`ground`,`gridLines`,`wash`,`lines`)],boil:{intervalMs:200,tracks:[{name:`hand`,attribute:`seed`,frames:[4,5,6]}]}},dy={region:ry,primitives:[Jv(qv.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`}),...ny(qv.phosphor,`trace`,`glow`),J(`feGaussianBlur`,{in:`glow`,stdDeviation:2.5,result:`bloom`}),...Yv(`<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`}),...ny(qv.screen,`scanRoll`,`scanlines`,.6),ty(`crt`,`ground`,`bloom`,`glow`,`scanlines`)],boil:{intervalMs:120,tracks:[{name:`roll`,attribute:`dy`,frames:[0,1,2]}]}},fy={region:iy,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`}),Xv(`0 0 0 -0.8 1.5`,`tooth`,`toothMask`),Zv(`SourceGraphic`,`dark`),Xv(`0 0 0 5 -3.8`,`dark`,`keyMask`),...ny(qv.ink,`keyMask`,`key`,.9),ty(`paint`,`thin`,`rim`,`key`),J(`feComposite`,{in:`paint`,in2:`toothMask`,operator:`in`})]},py=oy(ay),my={manga:sy,riso:cy,halftone:ly,blueprint:uy,crt:dy,watercolor:fy},hy=e=>e===`pencil`?py:my[e],gy=`http://www.w3.org/2000/svg`,_y=(e,t)=>{let n=e.createElementNS(gy,t.tag);for(let[e,r]of Object.entries(t.attributes))n.setAttribute(e,String(r));for(let r of t.children)n.append(_y(e,r));return n};function vy(e){let t=`sprite-style-${Wv()}`,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=hy(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=hy(r),l=`${t}-${r}`,u=n.createElementNS(gy,`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(_y(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 yy=[`mushroom`,`cat`,`burger`];Zn([`shift`,`keep`]);var by=j().regex(/^#[0-9a-f]{6}$/i),xy=_e([by,tt(),Si()]),Sy=16,Cy=ft({v:or(1),character:Zn(yy),appearance:Pe(j().min(1),xy).refine(e=>Object.keys(e).length<=Sy,{message:`Avatar appearance cannot exceed ${String(Sy)} keys`}),expression:j().min(1),renderStyle:Kv});function wy(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 Ty(e){let t=2166136261;for(let n of e)t^=n.codePointAt(0)??0,t=Math.imul(t,16777619)>>>0;return t}function Ey(e){let t=Ty(e)%360;return{cap:wy(t,68,72),capSpot:wy(t,70,92)}}function Dy(e){return{v:1,character:`mushroom`,appearance:Ey(e),expression:`normal`,renderStyle:`plain`}}var Oy=Symbol.for(`effect/MutableList/Empty`),ky=()=>({head:void 0,tail:void 0,length:0}),Ay=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})},jy=()=>({array:[],mutable:!0,offset:0,next:void 0}),My=(e,t)=>{e.tail?e.tail.mutable||(e.tail.next=jy(),e.tail=e.tail.next):e.head=e.tail=jy(),e.tail.array.push(t),e.length++},Ny=e=>{e.head=e.tail=void 0,e.length=0},Py=(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 Ny(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?Ny(e):Ay(e),n;i=i.next}return Ny(e),n},Fy=e=>{if(!e.head)return Oy;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:Ny(e):Ay(e),t},Iy=`~effect/Queue`,Ly=`~effect/Queue/Enqueue`,Ry=`~effect/Queue/Dequeue`,zy={_A:Kt,_E:Kt},By={[Iy]:zy,[Ly]:zy,[Ry]:zy,...Jr,toJSON(){return{_id:`effect/Queue`,state:this.state._tag,size:tb(this)}}},Vy=e=>gr(t=>{let n=Object.create(By);return n.dispatcher=t.currentDispatcher,n.capacity=e?.capacity??1/0,n.strategy=e?.strategy??`suspend`,n.messages=ky(),n.scheduleRunning=!1,n.state={_tag:`Open`,takers:new Set,offers:new Set,awaiters:new Set},je(n)}),Hy=e=>Vy({capacity:e}),Uy=Ee(2,(e,t)=>De(()=>Wy(e,t)?rb:e.state._tag===`Open`&&e.strategy===`suspend`?fb(e,t):nb)),Wy=(e,t)=>e.state._tag===`Open`?e.messages.length>=e.capacity?e.strategy===`sliding`?(Fy(e.messages),My(e.messages,t),!0):e.capacity<=0&&e.state.takers.size>0&&(My(e.messages,t),ob(e),!0):(My(e.messages,t),sb(e),!0):!1,Gy=Ee(2,(e,t)=>Ky(e,an(t))),Ky=Ee(2,(e,t)=>Zt(()=>qy(e,t))),qy=(e,t)=>{if(e.state._tag!==`Open`)return!1;let n=Xr(t),r=b(n,ib);return e.state.offers.size===0&&e.messages.length===0?(_b(e,r),!0):(e.state={...e.state,_tag:`Closing`,exit:r},sb(e),!0)},Jy=e=>qy(e,an(ge())),Yy=e=>Zt(()=>Xy(e)),Xy=e=>{if(e.state._tag===`Done`)return!1;Ny(e.messages);let t=e.state.offers;_b(e,e.state._tag===`Open`?ab:e.state.exit);for(let e of t)mb(e);return!0},Zy=e=>Qy(e,1,1/0),Qy=Ee(3,(e,t,n)=>(t=Co(t),n=Co(n),lb(()=>cb(e,t,n)??En(db(e,()=>ub(e,t)),Qy(e,t,n))))),$y=e=>lb(()=>eb(e)??En(db(e,()=>ub(e,1)),$y(e))),eb=e=>{if(e.state._tag===`Done`)return e.state.exit;if(e.messages.length>0){let t=Fy(e.messages);return gb(e),nr(t)}if(e.capacity<=0&&e.state.offers.size>0){let t=hb(e.state.offers);return gb(e),nr(t)}},tb=e=>e.state._tag===`Done`?0:e.messages.length,nb=nr(!1),rb=nr(!0),ib=Or(ge()),ab=Ii(),ob=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(bt),e.messages.length===0))break}},sb=e=>{e.scheduleRunning||e.state._tag===`Done`||e.state.takers.size===0||(e.scheduleRunning=!0,e.dispatcher.scheduleTask(()=>{e.scheduleRunning=!1,ob(e)},0))},cb=(e,t,n)=>{if(e.state._tag===`Done`)return e.state.exit;if(n<=0||t<=0)return nr([]);if(!ub(e,t))return;let r=e.messages.length>0?Py(e.messages,n):[hb(e.state.offers)];return gb(e),nr(r)},lb=Tn({op:`QueueTake`,[Fn](e){let t=this[Qt]();return Mr(t)?t[Fn](e):t}}),ub=(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)=>fi(n=>{if(e.state._tag===`Done`)return n(e.state.exit);if(t())return n(bt);let r={ready:t,resume:n};return e.state.takers.add(r),Zt(()=>{e.state._tag!==`Done`&&e.state.takers.delete(r)})}),fb=(e,t)=>fi(n=>Wy(e,t)?n(rb):pb(e,{_tag:`Single`,message:t,resume:n})),pb=(e,t)=>{if(e.state._tag!==`Open`)return mb(t);let n=e.state.offers;return n.add(t),Zt(()=>{e.state._tag!==`Done`&&(n.delete(t),e.state._tag===`Closing`&&n.size===0&&e.messages.length===0&&_b(e,e.state.exit))})},mb=e=>e._tag===`Single`?e.resume(nb):e.resume(nr(e.remaining.slice(e.offset))),hb=e=>{let t=e.values().next().value;if(t._tag===`Single`)return e.delete(t),t.resume(rb),t.message;let n=t.remaining[t.offset++];return t.offset===t.remaining.length&&(e.delete(t),t.resume(nr([]))),n},gb=e=>{if(e.state._tag===`Done`)return Zs(e.state.exit.cause);if(e.state.offers.size===0)return e.state._tag===`Closing`&&e.messages.length===0&&(_b(e,e.state.exit),Zs(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`)My(e.messages,t.message),e.state.offers.delete(t),t.resume(rb);else{for(;t.offset<t.remaining.length;t.offset++){if(n===0)return!1;My(e.messages,t.remaining[t.offset]),n--}e.state.offers.delete(t),t.resume(nr([]))}let r=e.state;if(r._tag===`Done`)return Zs(r.exit.cause)}return!1},_b=(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()},vb=wi,yb=ie,bb=Et,xb=cr,Sb=ee,Cb=Ce,wb=le,Tb=e=>new Db(e),Eb=(e,t,n)=>fi(r=>{if(e.free>=t)return r(n);let i=()=>{e.free<t||(e.waiters.delete(i),r(n))};return e.waiters.add(i),Zt(()=>{e.waiters.delete(i)})}),Db=class{waiters=new Set;taken=0;permits;constructor(e){this.permits=e}get free(){return this.permits-this.taken}take(e){let t=De(()=>this.free<e?Eb(this,e,t):(this.taken+=e,je(e)));return t}takeIfAvailable(e){return De(()=>this.free<e?je(!1):(this.taken+=e,je(!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 gr(t=>(this.permits=e,this.free<0||this.releaseUnsafe(t,0),rn))}release(e){return gr(t=>je(this.releaseUnsafe(t,e)))}get releaseAll(){return gr(e=>je(this.releaseUnsafe(e,this.taken)))}withPermits(e){return t=>qt(n=>{let r=De(()=>{if(this.free<e){let t=Eb(this,e,rn);return l(n(t),()=>r)}return this.taken+=e,Ie(n(t),()=>{this.releaseUnsafe(cr(),e)},!0)});return r})}withPermit=this.withPermits(1);withPermitsIfAvailable(e){return t=>qt(n=>this.free<e?qr:(this.taken+=e,Ie(n(_r(t)),()=>{this.releaseUnsafe(cr(),e)},!0)))}},Ob=e=>Zt(()=>new Db(e)),kb=`~effect/Channel`,Ab=e=>nt(e,kb),jb={[kb]:{_Env:Kt,_InErr:Kt,_InElem:Kt,_OutErr:Kt,_OutElem:Kt},pipe(){return oi(this,arguments)}},Mb=e=>{let t=Object.create(jb);return t.transform=(t,r)=>n(e(t,r),e=>k(Ir(e))),t},Nb=(e,t)=>Mb((n,r)=>A(Ib(e)(n,r),e=>t(e,r))),Pb=e=>Mb((t,n)=>e),Fb=e=>Mb(Nn(function*(t,n){let r=ks(n),i=e=>As(r,tc(e)),a=yield*Ue(e(t,n,r),i);return Ue(a,i)})),Ib=e=>e.transform,Lb=4096,Rb=(e,t,r)=>Vy({capacity:r?.bufferSize,strategy:r?.strategy}).pipe(on(t=>Os(e,Yy(t))),on(r=>Ds(t(r),e).pipe(n(e=>Ky(r,e)),pn(e)))),zb=(e,t)=>Mb((n,r)=>S(Rb(r,e,t),Zy)),Bb=e=>Mb((t,n)=>$t(()=>Ib(e())(t,n))),Vb=e=>Pb(Yt(()=>{let t=e();return $t(()=>{let e=t.next();return e.done?as(e.value):k(e.value)})})),Hb=(e,t=Lb)=>{let n=wo(t);return Pb(Yt(()=>{let t=e(),r=Je();return $t(()=>{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=ue(n.value);break}e.push(n.value)}return k(e)})}))},Ub=(e,t=Lb)=>Hb(()=>e[Symbol.iterator](),t),Wb=e=>Jb(k(e)),Gb=Pb(k(as())),Kb=e=>Pb(k(vn(e))),qb=e=>Pb(Ir(e)),Jb=e=>Pb(Yt(()=>{let t=!1;return $t(()=>t?as():(t=!0,e))})),Yb=e=>Pb(k(Zy(e))),Xb=(e,t)=>Mb(Nn(function*(n,r){let i=e[Symbol.asyncIterator]();return i.return&&(yield*Os(r,Le(()=>i.return()))),A(In({try:()=>i.next(),catch:t}),e=>e.done?as(e.value):k(e.value))})),Zb=(e,t)=>Qb(Xb(e,t),fn),Qb=Ee(2,(e,t)=>Nb(e,e=>Yt(()=>{let n=0;return S(e,e=>t(e,n++))}))),$b=e=>e===void 0||e!==`unbounded`&&e<=1,ex=Ee(e=>Ab(e[0]),(e,t,n)=>$b(n?.concurrency)?tx(e,t):nx(e,t,n)),tx=(e,t)=>Mb((n,r)=>{let i=0;return S(Ib(e)(n,r),A(e=>t(e,i++)))}),nx=(e,t,r)=>Fb(Nn(function*(i,a,o){let s=0,c=yield*Ib(e)(i,a),l=r.concurrency===`unbounded`?2**53-1:r.concurrency,u=yield*Hy(0);yield*Os(o,Yy(u));let d=zt(yield*ui()),f=Sb(o);if(r.unordered){let e=Tb(l),r=Kr(e.release(1)),i=$e({onFailure:e=>A(Ky(u,e),r),onSuccess:e=>A(Uy(u,e),r)});yield*e.take(1).pipe(A(()=>c),A(e=>{let n=s++;return f(d(i($t(()=>t(e,n))))),rr}),Er({disableYield:!0}),n(t=>e.withPermits(l-1)(Ky(u,t))),pn(o))}else{let e=yield*Hy(l-2);yield*Os(o,Yy(e)),yield*$y(e).pipe(hi,A(e=>Uy(u,e)),Er({disableYield:!0}),n(e=>Ky(u,e)),pn(o));let r,i=e=>{e._tag!==`Success`&&(r=e.cause,qy(u,e.cause))};yield*c.pipe(A(n=>{if(r)return Ir(r);let a=s++,o=d($t(()=>t(n,a)));return f(o),o.addObserver(i),Uy(e,yb(o))}),Er({disableYield:!0}),n(t=>Uy(e,cs(t)).pipe(Te(Ky(e,t)))),pn(o))}return $y(u)})),rx=Ee(e=>Ab(e[0]),(e,t,n)=>$b(n?.concurrency)?ix(e,t):ax(e,t,n)),ix=(e,t)=>Mb((n,r)=>S(Ib(e)(n,r),e=>{let i,a,o=A(e,e=>(a??=ks(r),br(Ib(t(e))(n,a),e=>(i=s(e),i)))),s=Xs(e=>{if(i=void 0,a.state._tag===`Empty`)return o;let t=As(a,ds);return a=void 0,A(t,()=>o)});return $t(()=>i??o)})),ax=(e,t,n)=>e.pipe(Qb(t),ux(n)),ox=e=>rx(e,Kt),sx=e=>Nb(e,e=>{let t,n=0,r=$t(function r(){if(t===void 0)return A(e,e=>{switch(e.length){case 0:return r();case 1:return k(e[0]);default:return t=e,k(e[n++])}});let i=t[n++];return n>=t.length&&(t=void 0,n=0),k(i)});return k(r)}),cx=Ee(2,(e,t)=>Nb(e,e=>k(A(e,function n(r){let i=[];for(let e=0;e<r.length;e++)t(r[e])&&i.push(r[e]);return Tr(i)?k(i):A(e,n)})))),lx=Ee(2,(e,t)=>Mb((r,i)=>{let a=ks(i);return S(Ib(e)(r,a),e=>{let o=e.pipe(n(e=>{if(Zs(e))return Ir(e);let n=a;return a=ks(i),As(n,cs(e)).pipe(Te(Ib(t(e))(r,a)),A(e=>(o=e,e)))}));return $t(()=>o)})})),ux=Ee(2,(e,{bufferSize:t=16,concurrency:r,switch:i=!1})=>Fb(Nn(function*(a,o,s){let c=r===`unbounded`?2**53-1:Math.max(1,r),l=i?void 0:Tb(c),u=yield*wb(!0),d=new Set,f=yield*Hy(t);yield*Os(s,Yy(f));let p=yield*Ib(e)(a,o);return yield*wn(function*(){for(;;){let e;l&&(d.size<c?yield*l.take(1):(e=yield*er(p),yield*Hi(l.take(1),Te(yb(e),lr))));let t=e===void 0?yield*p:yield*yb(e),n=ks(s),r=yield*Ib(t)(a,n);for(;d.size>=c;){let e=To(d);d.delete(e),d.size===0&&(yield*u.open),yield*bb(e)}let i=yield*r.pipe(on(()=>hn),A(e=>Uy(f,e)),Er({disableYield:!0}),Ue(Nn(function*(e){let t=tc(e),r=yield*ar(As(n,t));if(!d.has(i))return;let a=ms([t,r]);ps(a)&&(yield*Ky(f,a.cause)),d.delete(i),l&&(yield*l.release(1)),d.size===0&&(yield*u.open)})),er);u.closeUnsafe(),d.add(i)}}).pipe(n(e=>{let t=$s(e);return Mi(t)?u.whenOpen(Ky(f,e)):Ky(f,e)}),pn(s)),$y(f)}))),dx=Ee(e=>Ab(e[0])&&Ab(e[1]),(e,t,n)=>Fb(Nn(function*(r,i,a){let o=n?.haltStrategy??`both`,s=yield*Hy(0);yield*Os(a,Yy(s));let c=0;function l(e,t){if(c++,!Zs(t))return Ky(s,t);switch(o){case`both`:return c===2?Ky(s,t):rr;case`left`:case`right`:return e===o?Ky(s,t):rr;case`either`:return Ky(s,t)}}let u=(e,t,n)=>Ib(t)(r,n).pipe(A(e=>e.pipe(A(e=>Uy(s,e)),Er)),Ue(t=>it(tc(t),e=>As(n,e)).pipe($e({onFailure:t=>l(e,t),onSuccess:()=>l(e,t)}))),pn(a));return yield*u(`left`,e,ks(a)),yield*u(`right`,t,ks(a)),$y(s)}))),fx=e=>Mb((t,n)=>{let r;return k($t(()=>r||e.pipe(Ds(n),A(e=>Ib(e)(t,n)),A(e=>r=e))))}),px=Ee(2,(e,t)=>dx(e,Pb(k(A(t,as))),{haltStrategy:`either`})),mx=Nn(function*(e){let t=Tb(1),n=yield*ui(),r=yr(n,ws);return(yield*Ib(e)(as(),r)).pipe(gt(n),t.withPermits(1))},n(e=>k(Ir(e)))),hx=(e,t)=>Ib(e)(as(),t),gx=`~effect/Stream`,_x={_R:Kt,_E:Kt,_A:Kt},vx=function(e){this.channel=e};vx.prototype={[gx]:_x,pipe(){return oi(this,arguments)}};var yx=e=>new vx(e),bx=`~effect/Sink`,xx={_A:Kt,_In:Kt,_L:Kt,_E:Kt,_R:Kt},Sx={[bx]:xx,pipe(){return oi(this,arguments)}},Cx=e=>{let t=Object.create(Sx);return t.transform=e,t},wx=((e,t,n)=>Cx(r=>{let i=e(),a;return t(i)?r.pipe(A(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 rr}),Er({disableYield:!0}),Xs(()=>k([i,a]))):k([i])}))(Je,Qe,(e,t)=>ue(t)),Tx=()=>wx,Ex=`~effect/Stream`,Dx=e=>nt(e,Ex),Ox=yx,kx=e=>Ox(Jb(S(e,fn))),Ax=e=>jx(k(A(e,()=>as()))),jx=e=>Ox(Pb(e)),Mx=(e,t)=>Ox(Mb((n,r)=>A(hx(e.channel,r),e=>t(e,r)))),Nx=e=>e.channel,Px=(e,t)=>Ox(zb(e,t)),Fx=Ox(Gb),Ix=e=>Ox(Wb(fn(e))),Lx=e=>Ox(Bb(()=>e().channel)),Rx=e=>Ox(Kb(e)),zx=e=>Ox(qb(e)),Bx=(e,t)=>Array.isArray(e)&&t?.chunkSize===void 0?Vx(e):Ox(Ub(e,t?.chunkSize)),Vx=e=>Tr(e)?Ox(Wb(e)):Fx,Hx=e=>Ox(Yb(e)),Ux=(e,t)=>Ox(Zb(e,t)),Wx=e=>Ox(fx(S(e,Nx))),Gx=Ee(e=>Dx(e[0]),(e,t,n)=>e.channel.pipe(sx,ex(t,n),Qb(fn),Ox)),Kx=Ee(e=>Dx(e[0]),(e,t,n)=>e.channel.pipe(sx,rx(e=>t(e).channel,n),Ox)),qx=Ee(2,(e,t)=>{let n=i(t.duration);if(!Rn(n))return e;if(li(n))return Lx(t.orElse);let r=Symbol();return eS(Lx(()=>{let t=xb().getRef(js),i=Qr(n),a,o=Cb(!1);return Zx(Mx(e,(e,n)=>$t(()=>(a=t.currentTimeMillisUnsafe()+i,o.openUnsafe(),e)).pipe(S(e=>(o.closeUnsafe(),a=void 0,e)),k)),Ax(wn(function*(){for(;;)if(yield*o.await,a!==void 0&&(yield*Yr(a-t.currentTimeMillisUnsafe()),a!==void 0&&!(a-t.currentTimeMillisUnsafe()>0)))return yield*jr(r)})),{haltStrategy:`left`})}),e=>e.reasons.find(e=>e._tag===`Die`&&e.defect===r)?t.orElse():zx(e))}),Jx=Ee(2,(e,t)=>{let n=Ox(ox(Vb(()=>Xx(e,t))));return Yx.set(n,[e,t]),n}),Yx=new WeakMap;function*Xx(e,t){let n=[t,e];for(;n.length>0;){let e=n.pop(),t=Yx.get(e);t===void 0?yield e.channel:n.push(t[1],t[0])}}var Zx=Ee(e=>Dx(e[0])&&Dx(e[1]),(e,t,n)=>Ox(dx(Nx(e),Nx(t),n))),Qx=Ee(2,(e,t)=>Ox(cx(Nx(e),t))),$x=Ee(2,Nn(function*(e,t){let r,i=yield*mx(e.channel),a=n(i,e=>(r=e,Ir(e))),[o,s]=yield*Me(e=>t.transform(a,e)),c=r?Fx:jx(k(i));return s&&(c=Jx(Vx(s),c)),[o,c]})),eS=Ee(2,(e,t)=>e.channel.pipe(lx(e=>t(e).channel),Ox)),tS=Ee(e=>Dx(e[0]),(e,t,n)=>Mx(e,(e,r)=>Yt(()=>{let r=0,i=!1;return A($t(()=>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 Tr(t)?k(t):as()}return k(e)})}))),nS=Ee(2,(e,t)=>Ox(px(e.channel,t))),rS=Ee(2,(e,t)=>({[Symbol.asyncIterator](){let n=Pt(t),r=zt(t),i=Es(),a,o,s,c,l=e=>{if(c)return c;let t=s;return c=n(Gt(Te(t?bb(t):rr,As(i,e)),{done:!0,value:void 0})),c},u=async e=>{try{await l(e)}catch(e){await n(Ct(`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??A(hx(e.channel,i),e=>(a=e,e)));s=t;let d=await n(vb(t));if(s===t&&(s=void 0),fs(d))return o=d.value[Symbol.iterator](),o.next();if(Zs(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}}}})),iS=e=>rS(e,On()),aS=R.pipe(W(yg(1)),W(K(4096))),oS=R.pipe(W(yg(1)),W(K(513))),sS=B({params:V(B({key:R.check(yg(1),K(64)),value:R.check(K(4096))})).check(K(16))}),cS=B({id:oS,title:aS,detail:I(R.pipe(W(K(1024)))),tone:I(H([`attention`,`running`,`error`,`settled`,`muted`])),status:I(B({label:aS,tone:H([`neutral`,`primary`,`secondary`,`accent`,`success`,`info`,`warning`,`error`])})),open:I(sS)}),lS=V(cS).pipe(W(K(200)));B({...cS.fields,media:I(B({path:aS,format:H([`fungi:image`,`fungi:video`])}))});var uS=e=>new Set(e).size===e.length,dS=R.pipe(W(K(256)),W(ng(e=>e.trim().length>0,{message:`Declared command text must not be blank`}))),fS=dS.pipe(W(K(64))),pS=V(B({key:fS,label:dS,kind:H([`computer`,`repository`,`branch`]),required:Fh,options:I(dS)}).check(ng(e=>e.kind!==`computer`||e.options===void 0,{message:`Computer options are host-owned`}))).check(K(4),ng(e=>uS(e.map(e=>e.key)),{message:`Gill parameter keys must be unique`})),mS=Hh([B({storage:dS}),B({binding:dS})]),hS=dS.pipe(W(ng(e=>!e.includes(`:`),{message:`Gill IDs are App-local`}))),gS=B({sizes:V(H([`S`,`M`,`L`])).check(yg(1),K(3),ng(uS,{message:`Desktop Gill sizes must be unique`}))}),_S=e=>B({id:hS,view:e,title:dS,source:dS,params:I(pS),watch:I(mS),desktop:I(gS)}),vS=_S(L(`rows`)),yS=B({id:hS,title:dS,view:L(`surface`),desktop:gS}),bS=Hh([vS,yS]),xS=Hh([_S(L(`rows`).pipe(Zh(k(`rows`)))),yS]),SS=Lh(fS,R.check(K(256))).check(ng(e=>Object.keys(e).length<=4,{message:`Gill placement supports at most four parameters`}));B({viewId:oS,params:I(SS),after:I(R.check(K(1024))),options:I(fS)}),B({id:oS,params:I(SS),after:I(R.check(K(1024))),options:I(fS)});var CS=Hh([B({viewId:oS,title:aS,state:L(`empty`),rows:zh([]),emptyText:I(R.pipe(W(yg(1)),W(K(120)))),action:I(B({kind:L(`open`)})),next:I(R.pipe(W(K(1024))))}),B({viewId:oS,title:aS,state:L(`error`),rows:zh([]),reason:I(H([`exec_isolation_required`,`params_required`,`disabled`])),error:R.pipe(W(yg(1)),W(K(512))),recovery:I(Hh([B({kind:L(`configure`),param:fS}),B({kind:L(`open`)})]))}),B({viewId:oS,title:aS,state:L(`full`),rows:lS.pipe(W(yg(1))),next:I(R.pipe(W(K(1024))))})]);Sh(CS,{onExcessProperty:`error`});var wS=B({options:V(B({value:R.check(K(256)),label:aS,detail:I(R.check(K(1024)))})).check(K(200)),next:I(R.check(K(1024)))});Sh(Hh([CS,wS]),{onExcessProperty:`error`}),Sh(wS,{onExcessProperty:`error`});var TS=ae(`ZodMiniType`,(e,t)=>{if(!e._zod)throw Error(`Uninitialized schema in ZodMiniType.`);qn.init(e,t),e.def=t,e.type=t.type,e.parse=(t,n)=>dn(e,t,n,{callee:e.parse}),e.safeParse=(t,n)=>Li(e,t,n),e.parseAsync=async(t,n)=>yi(e,t,n,{callee:e.parseAsync}),e.safeParseAsync=async(t,n)=>Sn(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)=>xt(e,t,n),e.brand=()=>e,e.register=((t,n)=>(t.add(e,n),e)),e.apply=t=>t(e)}),ES=ae(`ZodMiniString`,(e,t)=>{$n.init(e,t),TS.init(e,t)});function DS(e){return Ar(ES,e)}var OS=ae(`ZodMiniNumber`,(e,t)=>{jn.init(e,t),TS.init(e,t)});function kS(e){return ot(OS,e)}var AS=ae(`ZodMiniNumberFormat`,(e,t)=>{Hn.init(e,t),OS.init(e,t)});function jS(e){return Gr(AS,e)}var MS=ae(`ZodMiniNever`,(e,t)=>{vr.init(e,t),TS.init(e,t)});function NS(e){return tn(MS,e)}var PS=ae(`ZodMiniArray`,(e,t)=>{ir.init(e,t),TS.init(e,t)});function FS(e,t){return new PS({type:`array`,element:e,...Dt(t)})}var IS=ae(`ZodMiniObject`,(e,t)=>{Vr.init(e,t),TS.init(e,t),x(e,`shape`,()=>t.shape)});function LS(e,t){return new IS({type:`object`,shape:e??{},...Dt(t)})}function RS(e,t){return new IS({type:`object`,shape:e,catchall:NS(),...Dt(t)})}var zS=ae(`ZodMiniDiscriminatedUnion`,(e,t)=>{Pr.init(e,t),TS.init(e,t)});function BS(e,t,n){return new zS({type:`union`,options:t,discriminator:e,...Dt(n)})}var VS=ae(`ZodMiniLiteral`,(e,t)=>{Dn.init(e,t),TS.init(e,t)});function HS(e,t){return new VS({type:`literal`,values:Array.isArray(e)?e:[e],...Dt(t)})}var US=ae(`ZodMiniOptional`,(e,t)=>{wr.init(e,t),TS.init(e,t)});function WS(e){return new US({type:`optional`,innerType:e})}var GS=ae(`ZodMiniNullable`,(e,t)=>{pi.init(e,t),TS.init(e,t)});function KS(e){return new GS({type:`nullable`,innerType:e})}var qS=ae(`ZodMiniLazy`,(e,t)=>{ni.init(e,t),TS.init(e,t)});function JS(e){return new qS({type:`lazy`,getter:e})}var YS=ae(`ZodMiniCustom`,(e,t)=>{gn.init(e,t),TS.init(e,t)});function XS(e,t={}){return Ln(YS,e,t)}function ZS(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}function QS(...e){return t=>{let n=!1,r=e.map(e=>{let r=ZS(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():ZS(e[t],null)}}}}function $S(...e){return M.useCallback(QS(...e),e)}function eC(e){let t=M.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];cC(r)&&typeof fC==`function`&&(r=fC(r._payload)),M.Children.forEach(r,e=>{if(oC(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;cC(n)&&typeof fC==`function`&&(n=fC(n._payload)),a=rC(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?aC(a):void 0,l=$S(n,c);if(!a){if(r||r===0)throw Error(o?dC(e):uC(e));return r}let u=iC(i,a.props??{});return a.type!==M.Fragment&&(u.ref=n?l:c),M.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}var tC=eC(`Slot`),nC=Symbol.for(`radix.slottable`),rC=(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 iC(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 aC(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 oC(e){return M.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===nC}var sC=Symbol.for(`react.lazy`);function cC(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===sC&&`_payload`in e&&lC(e._payload)}function lC(e){return typeof e==`object`&&!!e&&`then`in e}var uC=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.`,fC=M.use,pC=Object.freeze({alphaIntercept:-9,alphaSlope:19,blurStdDeviation:1.5}),mC=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 hC(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=hC(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function gC(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=hC(e))&&(r&&(r+=` `),r+=t);return r}var _C=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,vC=gC,yC=(e,t)=>n=>{if(t?.variants==null)return vC(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=_C(t)||_C(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 vC(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)},bC=Object.defineProperty,xC=((e,t)=>{let n={};for(var r in e)bC(n,r,{get:e[r],enumerable:!0});return t||bC(n,Symbol.toStringTag,{value:`Module`}),n})({isAny:()=>FC,isAnyNonArbitrary:()=>BC,isArbitraryFamilyName:()=>rw,isArbitraryImage:()=>aw,isArbitraryLength:()=>ew,isArbitraryNumber:()=>tw,isArbitraryPosition:()=>iw,isArbitraryShadow:()=>ow,isArbitrarySize:()=>QC,isArbitraryValue:()=>$C,isArbitraryVariable:()=>sw,isArbitraryVariableFamilyName:()=>lw,isArbitraryVariableImage:()=>fw,isArbitraryVariableLength:()=>cw,isArbitraryVariablePosition:()=>uw,isArbitraryVariableShadow:()=>pw,isArbitraryVariableSize:()=>dw,isArbitraryVariableWeight:()=>mw,isArbitraryWeight:()=>nw,isFraction:()=>AC,isInteger:()=>MC,isNamedContainerQuery:()=>VC,isNumber:()=>jC,isPercent:()=>NC,isTshirtSize:()=>PC}),SC=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,CC=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wC=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,TC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,EC=/\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$/,DC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,OC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,kC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,AC=e=>wC.test(e),jC=e=>!!e&&!Number.isNaN(Number(e)),MC=e=>!!e&&Number.isInteger(Number(e)),NC=e=>e.endsWith(`%`)&&jC(e.slice(0,-1)),PC=e=>TC.test(e),FC=()=>!0,IC=e=>EC.test(e)&&!DC.test(e),LC=()=>!1,RC=e=>OC.test(e),zC=e=>kC.test(e),BC=e=>!$C(e)&&!sw(e),VC=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)),HC=(e,t,n)=>{let r=SC.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},UC=(e,t,n=!1)=>{let r=CC.exec(e);return r?r[1]?t(r[1]):n:!1},WC=e=>e===`position`||e===`percentage`,GC=e=>e===`image`||e===`url`,KC=e=>e===`length`||e===`size`||e===`bg-size`,qC=e=>e===`length`,JC=e=>e===`number`,YC=e=>e===`family-name`,XC=e=>e===`number`||e===`weight`,ZC=e=>e===`shadow`,QC=e=>HC(e,KC,LC),$C=e=>SC.test(e),ew=e=>HC(e,qC,IC),tw=e=>HC(e,JC,jC),nw=e=>HC(e,XC,FC),rw=e=>HC(e,YC,LC),iw=e=>HC(e,WC,LC),aw=e=>HC(e,GC,zC),ow=e=>HC(e,ZC,RC),sw=e=>CC.test(e),cw=e=>UC(e,qC),lw=e=>UC(e,YC),uw=e=>UC(e,WC),dw=e=>UC(e,KC),fw=e=>UC(e,GC),pw=e=>UC(e,ZC,!0),mw=e=>UC(e,XC,!0),hw=(e,t)=>{let n=Object.keys(e);return n.length===1&&n[0]===t&&typeof e[t]==`string`},gw=e=>typeof e==`function`&&e.isThemeGetter===!0,_w=e=>({...e,theme:{...e.theme},classGroups:{...e.classGroups},conflictingClassGroups:{...e.conflictingClassGroups},conflictingClassGroupModifiers:{...e.conflictingClassGroupModifiers},orderSensitiveModifiers:[...e.orderSensitiveModifiers],postfixLookupClassGroups:[...e.postfixLookupClassGroups??[]]}),vw=(e,t)=>{let n=_w(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},yw={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},bw=25,xw=()=>({names:[],idByName:new Map,impls:{},fnName:new Map,classifierFns:new Map}),Sw=(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},Cw=(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),Sw(e,n,t)}let n=t.$v,r=xC[n];if(yw[n]===void 0||!r)throw Error(`cn: unknown validator "${n}"`);return Sw(e,n,r)},ww=()=>({nextPart:new Map,validators:null,classGroupId:-1,lit:[]}),Tw=(e,t)=>e.theme[t]??[],Ew=(e,t,n)=>{let r=ww(),i=(e,t)=>{for(let n of t.split(`-`)){let t=e.nextPart.get(n);t||(t=ww(),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(gw(n)){for(let t of n(e.theme))a(t,r,o);return}(r.validators??=[]).push({validatorId:Cw(t,n),groupId:o});return}if(hw(n,`$t`)){for(let t of Tw(e,n.$t))a(t,r,o);return}if(hw(n,`$v`)){(r.validators??=[]).push({validatorId:Cw(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},Dw=e=>{let t=xw(),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=Ew(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),T=``,te=new Int32Array(S),ne=new Int32Array(S),re=[];{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,T+=t.label,re.push(y.get(t.oldTarget)),e++;te[t]=n.groupId,ne[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!==re[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=ne[n];r>=0&&(e[r]===-1&&(e[r]=t.length,t.push(d[r])),ne[n]=e[r])}d.length=0,d.push(...t)}let E=0;for(let e of d)E+=e.length;let ie=new Int32Array(E),ae=new Int32Array(E);{let e=0;for(let t of d)for(let[n,r]of t)ie[e]=n,ae[e]=r,e++}h.sort((e,t)=>e.anchor-t.anchor||e.gid-t.gid||(e.tail<t.tail?-1:1));let oe=[];for(let e of h){let t=oe[oe.length-1];t&&t.anchor===e.anchor&&t.gid===e.gid?t.tails.push(e.tail):oe.push({anchor:e.anchor,gid:e.gid,tails:[e.tail],set:-1})}let se=new Map,D=[];for(let e of oe){let t=e.tails.join(` `),n=se.get(t);n===void 0&&(n=D.length,se.set(t,n),D.push(e.tails)),e.set=n}for(let e of D.flat())if(e.includes(`|`)||e.includes(` `))throw Error(`cn compiler: tail contains delimiter: `+e);let ce=new Set(D.flat()).size;oe.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 le=n.length,ue=new Int32Array(le).fill(-1),de=0,fe=e=>(ue[e]===-1&&(ue[e]=de++),ue[e]);for(let e=0;e<ae.length;e++)ae[e]=fe(ae[e]);for(let e of oe)e.gid=fe(e.gid);for(let e=0;e<te.length;e++)te[e]>=0&&(te[e]=fe(te[e]));for(let e=0;e<le;e++)ue[e]===-1&&(ue[e]=de++);let pe=Array(le);for(let e=0;e<le;e++)pe[ue[e]]=n[e];let me=[],he=[],ge=[],O=[],_e=[];for(let t=0;t<le;t++){let n=pe[t],i=(e.conflictingClassGroups[n]??[]).map(e=>ue[r.get(e)]),a=(e.conflictingClassGroupModifiers[n]??[]).map(e=>ue[r.get(e)]);i.length&&(me.push(t),he.push(i.length),ge.push(...i));for(let e of a)O.push(t),_e.push(e)}let ve=(e.postfixLookupClassGroups??[]).map(e=>ue[r.get(e)]),ye=[],be=new Int32Array(ie.length);for(let e=0;e<ie.length;e++){let n=t.names[ie[e]],r=yw[n];if(r!==void 0)be[e]=r;else{let t=ye.indexOf(n);t===-1&&(t=ye.length,ye.push(n)),be[e]=bw+t}}let xe=new Map,Se=[],Ce=[],we=[];{let e=0;for(let t of d){let n=[];for(let r=0;r<t.length;r++)n.push(be[e++]);let r=n.join(`,`),i=xe.get(r);i===void 0&&(i=Se.length,xe.set(r,i),Se.push(n.length),Ce.push(...n)),we.push(i)}}let Te={};for(let e of ye)Te[e]=t.classifierFns.get(e);return{G:le,customNames:ye,impls:Te,edgeCounts:w,edgeLabelLen:ee,labelText:T,edgeTargetActual:re,nodeGroup:te,nodeVlist:ne,nodeCount:S,totalEdges:C,patCounts:Se,patOps:Ce,listPat:we,vlistGroup:ae,litEntries:h,sets:D,attachments:oe,uniqueTailCount:ce,adjGid:me,adjCnt:he,adjTgt:ge,patGid:O,patTgt:_e,postfixLookup:ve,orderSensitiveModifiers:e.orderSensitiveModifiers.join(` `),prefix:e.prefix}},Ow=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},kw=e=>{let t=Dw(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:Ow(t.edgeCounts),labelStart:Ow(t.edgeLabelLen),labelText:t.labelText,edgeTarget:Int32Array.from(t.edgeTargetActual),nodeGroup:t.nodeGroup,nodeVlist:t.nodeVlist,vlistPat:Ow(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:Ow(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}},Aw=`line`in Error(),jw=-1,Mw=-1,Nw=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Pw=(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},Fw=(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:T}=e,te=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)te[y[e]]=e;let ne=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>ne&&(ne=t)}let re=32;for(;re<2*(1+ne+S.length);)re<<=1;let E=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)E[e+1]=E[e]+u[f[e]+1]-u[f[e]];let ie=new Uint8Array(r);for(let e=0;e<w.length;e++)ie[w[e]]=1;let ae=i.length-1,oe=new Uint8Array(ae),se=0,D=!0;for(let e=0;e<m.length;e++){oe[m[e]]=1;let t=_[g[e]*2+1];t>se&&(se=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(D=!1)}let ce=1;for(;ce<m.length*2;)ce<<=1;let le=new Int32Array(ce).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Nw(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&ce-1;for(;le[n]!==-1;)n=n+1&ce-1;le[n]=e}let ue=(e,t,n,r)=>{let i=(Nw(t,n,r)^Math.imul(e,2654435761)|0)&ce-1,a=r-n;for(;;){let r=le[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&ce-1}},de=n.cacheSize??8192,fe=n.prefix??e.prefix??``,pe=fe===``?``:fe+`:`,me=pe.length,he=(ee??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ge=/\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$/,O=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,_e=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ve=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ye=0,be=-1,xe=-1,Se=-1,Ce=-1,we=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,Te=e=>/\s/.test(String.fromCharCode(e)),Ee=(e,t,n)=>{if(ye=0,be=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)ye=1;else if(r===40&&i===41)ye=2;else return;Se=t+1,Ce=n-1;let a=t+1;if(we(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!we(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(be=t+1,xe=a,Se=a+1)}},De=(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||!De(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&&De(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&De(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],Pe=(e,t,n,r)=>{if(e>=10){if(e>=25)return he[e-25](t.slice(n,r));let i=e-10;if(ye!==je[i])return!1;if(be>=0){for(let e of Me[i])if(De(t,be,xe,e))return!0;return!1}switch(Ne[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(Se,Ce);return ge.test(e)&&!O.test(e)}case 3:return ke(t.slice(Se,Ce));case 4:return ve.test(t.slice(Se,Ce));default:return _e.test(t.slice(Se,Ce))}}switch(e){case 0:return!0;case 1:return ye===0;case 2:return ye===1;case 3:return ye===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)}},Fe=new Set(typeof T==`string`?T.split(` `):T),Ie=(e,t,n,r,i,a)=>{let o=Nw(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},Le=new Map,Re=new Map,ze=2,Be=4096,Ve=(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||Fe.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=Re.get(s);return c===void 0&&Re.set(s,c=ze++),c},He=new Map,Ue=r,We=r+4096,Ge=()=>Ue++,Ke=2097152,qe=8192,Je=new Int32Array(qe),Ye=Array(qe).fill(null),Xe=new Int32Array(qe),Ze=new Int32Array(qe),Qe=new Uint8Array(qe),$e=0,et=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ye[e]!==null){if(Ye[e|1]===null)c=e|1;else if(!($e++&3))c=e|$e>>2&1;else return}Ye[c]=t.slice(n,r),Je[c]=i,Xe[c]=a,Ze[c]=o,Qe[c]=s},tt=()=>Ye.fill(null),nt=256,rt=[new Int32Array(nt),new Int32Array(nt),new Int32Array(nt),new Int32Array(nt)],[it,at,ot,st]=rt,ct=new Uint8Array(nt),lt=new Uint8Array(nt),ut=()=>{nt*=2,rt=rt.map(e=>{let t=new Int32Array(nt);return t.set(e),t}),[it,at,ot,st]=rt;let e=new Uint8Array(nt);e.set(ct),ct=e,lt=new Uint8Array(nt)},dt=64,ft=new Int32Array(dt),pt=new Int32Array(dt),mt=new Int32Array(r),ht=2048,gt=21,_t=new Float64Array(ht),vt=new Int32Array(ht),yt=0,bt=(e,t)=>{if(e===0&&t<r)return mt[t]===yt?1:(mt[t]=yt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>gt;for(;vt[i]===yt;){if(_t[i]===n)return 1;i=i+1&ht-1}return _t[i]=n,vt[i]=yt,0},xt=(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?jw:Ie(He,e,t+1,r,0,Ge)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=pt[t];if(r>n)continue;let i=ft[t],a=n-r;if(oe[i]===1&&a>0&&a<=se){let t=e.charCodeAt(r);if(D===!1||t!==91&&t!==40){let t=ue(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;Ee(e,r,n);let h=E[o]-c;for(let t=c;t<m;t++)if(Pe(d[t],e,r,n))return p[h+t]}return jw},St=e=>{let t=e.length,n=0,c=0,u=!1;(ze>Be||Le.size>Be)&&(Le=new Map,Re=new Map,ze=2,tt()),Ue>We&&(He=new Map,Ue=r,tt());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&Te(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&&Te(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===nt&&ut();let _=n++;it[_]=p,at[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15|0,y=v&8190;{let t=-1;if(Je[y]===v&&Ye[y]!==null&&Ye[y].length===g?t=y:Je[y|1]===v&&Ye[y|1]!==null&&Ye[y|1].length===g&&(t=y|1),t>=0){let n=Ye[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){ot[_]=Xe[t],st[_]=Ze[t],ct[_]=Qe[t];continue}}}let b=p;if(me!==0){if(h-p<=me||!e.startsWith(pe,p)){ot[_]=jw,et(y,e,p,h,v,jw,0,0);continue}b=p+me}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,T=ee,te=h,ne=!1,re=0;te>T&&e.charCodeAt(te-1)===33?(ne=!0,te--):te>T&&e.charCodeAt(T)===33&&(ne=!0,T++,re=1);let E=-1;w>ee&&(E=w+re,E>=te&&(E=-1));let ae=T;te-T>1&&e.charCodeAt(T)===45&&(ae=T+1);let se=0,D=0,ce=0,le=-1,ue=0;(l[0]>=0||oe[0]===1)&&(ft[0]=0,pt[0]=ae,ue=1);let de=Mw,fe=0;for(let t=ae;t<te;t++)if(t===E&&(de=D<ce?Mw:se,fe=ue),se!==Mw){let n=e.charCodeAt(t),r=-1;if(D<ce)o.charCodeAt(D)===n?(D++,D===ce&&(r=se=le)):se=Mw;else{let e=i[se],t=i[se+1],c=Mw;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]:(D=e+1,ce=a[i+1],le=s[i],c=se);break}}se=c}if(r>=0&&(l[r]>=0||oe[r]===1)&&t+1<te&&e.charCodeAt(t+1)===45){if(ue===dt){dt*=2;let e=new Int32Array(dt);e.set(ft),ft=e;let t=new Int32Array(dt);t.set(pt),pt=t}ft[ue]=r,pt[ue]=t+2,ue++}}E===te&&(de=D<ce?Mw:se,fe=ue);let he=D<ce?Mw:se,ge,O=!1;if(E>=0){if(O=!0,ge=xt(e,T,E,de,fe),ge!==jw&&ge<r&&ie[ge]){let t=xt(e,T,te,he,ue);t!==jw&&t!==ge&&(ge=t,O=!1)}else ge===jw&&(ge=xt(e,T,te,he,ue),O=!1)}else ge=xt(e,T,te,he,ue);let _e=0,ve=0;ge===jw?ot[_]=jw:(ve=+!!O,_e=b>=C?+!!ne:Ie(Le,e,b,C,+!!ne,e=>Ve(e,ne)),ot[_]=ge,ct[_]=ve,st[_]=_e),et(y,e,p,h,v,ge,_e,ve)}if(n===0)return``;if(n===1)return it[0]===0&&at[0]===t?e:e.slice(it[0],at[0]);if(n*re>ht){for(;n*re>ht;)ht<<=1,gt--;_t=new Float64Array(ht),vt=new Int32Array(ht)}if(ze>=Ke||Ue>=Ke)throw Error(`cn: too many distinct classes in one merge`);yt=yt+1|0,yt===0&&(mt.fill(0),vt.fill(0),yt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=ot[e];if(t===jw){lt[e]=1;continue}let n=st[e];if(bt(n,t)===1){lt[e]=0,f=!0;continue}if(lt[e]=1,t<r){let r=te[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)bt(n,x[e]);if(ct[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&bt(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!lt[m]){m++;continue}let t=it[m],r=at[m],i=m+1;for(;i<n&&lt[i]&&it[i]===r+1&&e.charCodeAt(r)===32;)r=at[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},Ct=16384,wt=new Int32Array(Ct*2),Tt=0,Et=1,Dt=Object.create(null),Ot=Object.create(null),kt=new Map,At=new Map,jt=0,Mt=0,Nt=()=>{Tt^=Ct,Et=Et+1|0,Mt=0},Pt=e=>{let t=Dt[e];if(t!==void 0)return t;let n=Pw(e,0,e.length),r=(n&16383)+Tt,i=wt[r]===(n^Et)||wt[r^Ct]===(n^Et-1);return i&&(t=Ot[e],t!==void 0)?(Dt[e]=t,t):(t=St(e),i?(Dt[e]=t,++jt>de&&(jt=0,Ot=Dt,Dt=Object.create(null),Nt())):(wt[r]=n^Et,++Mt>Ct&&Nt()),t)},Ft=e=>{let t=kt.get(e);if(t!==void 0)return t;let n=Pw(e,0,e.length),r=(n&16383)+Tt,i=wt[r]===(n^Et)||wt[r^Ct]===(n^Et-1);return i&&(t=At.get(e),t!==void 0)?(kt.set(e,t),t):(t=St(e),i?(kt.set(e,t),++jt>de&&(jt=0,At=kt,kt=new Map,Nt())):(wt[r]=n^Et,++Mt>Ct&&Nt()),t)},It=e=>{let t=Pw(e,0,e.length),n=(t&16383)+Tt;return wt[n]===(t^Et)||wt[n^Ct]===(t^Et-1)||(wt[n]=t^Et,++Mt>Ct&&Nt(),!1)},Lt=de===0?St:Aw?e=>{let t=kt.get(e);return t===void 0?Ft(e):t}:Pt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?Lt(arguments[0]):Lt(Rw.apply(null,arguments))},mergeString:Lt,seenBefore:de===0?()=>!1:It,mergeUncached:St}},Iw=(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:Iw(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},Lw=(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:Iw(i,t);a&&(n&&(n+=` `),n+=a)}return n},Rw=function(){return Lw(arguments,!1)},zw=(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]=Iw(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(Iw(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)}},Bw=`{"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"]}`,Vw=()=>JSON.parse(Bw),Hw=e=>`classGroups`in e&&`theme`in e&&`conflictingClassGroups`in e,Uw=e=>e===void 0?{config:Vw()}:typeof e==`function`?{config:e(Vw())}:Hw(e)?{config:e}:{config:vw(Vw(),e),cacheSize:e.cacheSize},Ww=e=>{let{config:t,cacheSize:n}=Uw(e),{tables:r,validatorImpls:i,prefix:a}=kw(t);return Fw(r,i,{cacheSize:n,prefix:a})},Y=(e=>{let t=null,n=()=>t??=Ww(e);return zw(e=>n().mergeString(e),{seenBefore:e=>n().seenBefore(e),mergeUncached:e=>n().mergeUncached(e)})})({extend:{theme:{spacing:[...mC]}}});function Gw(e,t){return typeof e==`function`?e(t):e}var Kw=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)`}),qw=`(prefers-reduced-motion: reduce)`;function Jw(e){let t=e.ownerDocument.defaultView;if(!t)return Kw;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?.(qw).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`,Kw.squish),fast:o(`fast`,Kw.fast),normal:o(`normal`,Kw.normal),slow:o(`slow`,Kw.slow),springDuration:o(`spring-duration`,Kw.springDuration),bounce:Math.min(1,s(`bounce`,Kw.bounce)),stretch:s(`stretch`,Kw.stretch),distance:s(`distance`,Kw.distance),stagger:a?0:i(`--stipe-motion-stagger`,Kw.stagger),blur:s(`blur`,Kw.blur),shake:s(`shake`,Kw.shake),steps:Math.floor(s(`steps`,Kw.steps)),fuse:r(`--stipe-motion-fuse`,Kw.fuse),pressDepth:a?0:r(`--stipe-press-depth`,Kw.pressDepth),pressScale:a?1:r(`--stipe-press-scale`,Kw.pressScale),ease:n.getPropertyValue(`--stipe-motion-ease`).trim()||Kw.ease,easeExit:n.getPropertyValue(`--stipe-motion-ease-exit`).trim()||Kw.easeExit}}function Yw(e){let[t,n]=(0,M.useState)(()=>({...Kw,reduced:!0}));return(0,M.useLayoutEffect)(()=>{let t=e.current,r=t?.ownerDocument.defaultView;if(!t||!r)return;let i=()=>{let e=Jw(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?.(qw);return o?.addEventListener(`change`,i),()=>{a.disconnect(),o?.removeEventListener(`change`,i)}},[e]),t}function Xw(e,t){return e.reduced?0:Math.round(t*e.normal/Kw.normal)}function Zw(e,t){if(e.reduced)return 0;let n=t*e.bounce/Kw.bounce;return Math.min(.9,Math.max(0,n))}function Qw(e,t){return e.reduced?0:Math.round(t*e.springDuration/Kw.springDuration)}function $w(e,t){return e.steps>0?`steps(${String(e.steps)}, end)`:t}function eT(e){return`animate`in e}var tT=globalThis;function nT(){return tT.matchMedia?.(qw).matches??!1}function rT(e){let t=tT.matchMedia?.(qw);return t?.addEventListener(`change`,e),()=>{t?.removeEventListener(`change`,e)}}function iT(){return!0}function aT(){return(0,M.useSyncExternalStore)(rT,nT,iT)}var oT=(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)(tC,{...n,className:i,ref:r}):(0,q.jsx)(`span`,{...n,className:i,ref:r})}),sT=dt*10,cT=class{constructor(e={}){let t=!ur(e.bounce)||!ur(e.duration);this.timeStep=.02,this.restThreshold=5e-4,this.restDuration=200,this.maxDuration=6e4,this.maxRestSteps=this.restDuration/this.timeStep/dt,this.maxIterations=this.maxDuration/this.timeStep/dt,this.bn=gi(Lr(e.bounce,.5),-1,1),this.pd=gi(Lr(e.duration,628),10*Ne.timeScale,sT*Ne.timeScale),this.m=gi(Lr(e.mass,1),1,sT),this.s=gi(Lr(e.stiffness,100),f,sT),this.d=gi(Lr(e.damping,10),f,sT),this.v=gi(Lr(e.velocity,0),-sT,sT),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||Ft,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?Oi(-a*t*n)*(1*yn(r*a)+i*et(r*a)):t===1?(1+i*a)*Oi(-a*n):((1+i)*Oi((-t*n+r)*a)+(1-i)*Oi((-t*n-r)*a))/2,1-a}calculateSDFromBD(){let e=Ne.timeScale===1?this.pd/dt:this.pd;this.m=1,this.v=0,this.s=Re(2*xr/e,2),this.d=this.bn>=0?(1-this.bn)*4*xr/e:4*xr/(e*(1+this.bn)),this.s=We(gi(this.s,f,sT),3),this.d=We(gi(this.d,f,300),3)}calculateBDFromSD(){let e=2*xr/se(this.s);this.pd=e*(Ne.timeScale===1?dt:1),this.bn=this.d/(2*se(this.s))<=1?1-this.d*e/(4*xr):4*xr/(this.d*e)-1,this.bn=We(gi(this.bn,-1,1),3),this.pd=We(gi(this.pd,10*Ne.timeScale,sT*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=gi(se(o/i),f,dt),l=this.zeta=a/(2*se(o*i));l<1?(this.wd=c*se(1-l*l),this.b=(l*c+-s)/this.wd):l===1?(this.wd=0,this.b=-s+c):(this.wd=c*se(l*l-1),this.b=(l*c+-s)/this.wd);let u=0,d=0,p=0;for(;d<=e&&p<=t;)Xn(1-this.solve(u))<n?d++:d=0,this.solverDuration=u,u+=r,p++;this.settlingDuration=We(this.solverDuration*dt,0)*Ne.timeScale}get bounce(){return this.bn}set bounce(e){this.bn=gi(Lr(e,1),-1,1),this.calculateSDFromBD(),this.compute()}get duration(){return this.pd}set duration(e){this.pd=gi(Lr(e,1),10*Ne.timeScale,sT*Ne.timeScale),this.calculateSDFromBD(),this.compute()}get stiffness(){return this.s}set stiffness(e){this.s=gi(Lr(e,100),f,sT),this.calculateBDFromSD(),this.compute()}get damping(){return this.d}set damping(e){this.d=gi(Lr(e,10),f,sT),this.calculateBDFromSD(),this.compute()}get mass(){return this.m}set mass(e){this.m=gi(Lr(e,1),1,sT),this.compute()}get velocity(){return this.v}set velocity(e){this.v=gi(Lr(e,0),-sT,sT),this.compute()}},lT=e=>new cT(e),uT=(e=10,t)=>{let n=t?sn:_t;return t=>n(gi(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 fT({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 pT({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 hT({id:e,values:t=pC}){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 gT(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 _T(e){let t=Math.max(0,Math.min(1,e));return t*t*(3-2*t)}function vT(e,t){let n=Math.max(0,Math.min(1,(t-(e-1)*.085)/.68));return Math.sin(n*Math.PI)**2}function yT(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=_T(n/.66)*Math.PI*2,o=Math.min(e,t*Math.PI/8)-Math.PI/2,s=_T((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+vT(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=vT(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 bT={line:1700,square:1900,donut:3e3,wander:4600,bloom:2800},xT=2;function ST({variant:e,pace:t=`working`}){let n=`caps-loader-${(0,M.useId)().replaceAll(`:`,``)}`,r=(0,M.useRef)(null),i=(0,M.useRef)(null),a=Yw(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?[tr(r.current,{opacity:[.55,1],duration:a.slow*10,ease:`inOutSine`,alternate:!0,loop:!0})]:[...r.current.querySelectorAll(`ellipse`)].map((n,r)=>tr(n,{keyframes:Array.from({length:48},(n,i)=>({...yT(e,r,(i+1)/48),duration:Xw(a,bT[e]*(t===`idle`?xT:1))/48})),ease:`linear`,loop:!0})),s=gT(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)(hT,{id:n,values:mT}),(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)(fT,{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`,{...yT(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 CT={sm:`caps-loader-sm`,md:`caps-loader-md`,lg:`caps-loader-lg`,fill:`caps-loader-fill`},wT={neutral:`text-base-content`,accent:`text-accent`,primary:`text-primary`,success:`text-success`,current:`text-current`},TT=(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`,CT[a],wT[c],n),"data-variant":o,"data-pace":s,role:r?void 0:`status`,ref:u,children:[(0,q.jsx)(ST,{variant:o,pace:s}),f?(0,q.jsx)(oT,{id:d,children:i}):null]})}),ET=`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`,DT=yC(`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 ${ET}`,ghost:`btn-ghost`,"ghost-destructive":`btn-ghost caps-button-ghost-destructive`,link:`btn-link ${ET}`},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`}}),OT=(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(DT({size:c,variant:l}),n),p=(0,M.useRef)(a).current,m=(0,M.useRef)(null);return(0,M.useImperativeHandle)(d,()=>m.current),kT(m,i,a),e?(0,q.jsx)(tC,{...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)(TT,{decorative:!0,size:`sm`,tone:`current`,variant:`wander`}):null,t]}):(0,q.jsx)(PT,{label:o,loading:i,onResultEnd:s,result:a,settled:p,children:t})})});function kT(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||!eT(o))return;let f=Jw(o);if(f.reduced)return;let p=o.animate([{width:`${String(u)}px`},{width:`${String(d)}px`}],{duration:f.normal,easing:$w(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 AT=1100;function jT(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:$w(t,`ease-out`)})}function MT(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:$w(t,`linear`)})}function NT(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:$w(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:$w(n,n.ease),fill:`backwards`})]}function PT({children:e,label:t,loading:n,onResultEnd:r,result:i,settled:a}){let o=(0,M.useRef)(null),s=aT(),[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)},AT);return()=>{clearTimeout(e)}}l(!1);let t=o.current;if(i!==`failed`||!t||!eT(t))return;let n=Jw(t);if(n.shake<=0)return;let r=MT(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||!eT(e)){c||d(!1);return}let r=Jw(e),i=c?NT(t,n,r):NT(n,t,r);if(c||i[0]?.addEventListener(`finish`,()=>{d(!1)}),c&&!r.reduced){i.push(jT(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:$w(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)(TT,{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 FT(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 IT=FT(`https://base-ui.com/production-error`,`Base UI`),LT={};function RT(e,t){let n=M.useRef(LT);return n.current===LT&&(n.current=e(t)),n}function zT(e,t,n,r){let i=RT(VT).current;return HT(i,e,t,n,r)&&WT(i,[e,t,n,r]),i.callback}function BT(e){let t=RT(VT).current;return UT(t,e)&&WT(t,e),t.callback}function VT(){return{callback:null,cleanup:null,refs:[]}}function HT(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function UT(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function WT(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 GT=18;function KT(e){return GT>=e}function qT(e){if(!M.isValidElement(e))return null;let t=e,n=t.props;return(KT(19)?n?.ref:t.ref)??null}function JT(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function YT(){}var XT=Object.freeze([]),ZT=Object.freeze({});function QT(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 $T(e,t){return typeof e==`function`?e(t):e}function eE(e,t){return typeof e==`function`?e(t):e}var tE={};function nE(e,t,n,r,i){if(!n&&!r&&!i&&!e)return iE(t);let a=iE(e);return t&&(a=aE(a,t)),n&&(a=aE(a,n)),r&&(a=aE(a,r)),i&&(a=aE(a,i)),a}function rE(e){if(e.length===0)return tE;if(e.length===1)return iE(e[0]);let t=iE(e[0]);for(let n=1;n<e.length;n+=1)t=aE(t,e[n]);return t}function iE(e){return lE(e)?{...e(tE)}:oE(e)}function aE(e,t){return lE(t)?t(e):sE(e,t)}function oE(e){let t={...e};for(let e in t){let n=t[e];cE(e,n)&&(t[e]=dE(n))}return t}function sE(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=JT(e.style,r);break;case`className`:e[n]=pE(e.className,r);break;default:e[n]=cE(n,r)?uE(e[n],r):r}}return e}function cE(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 lE(e){return typeof e==`function`}function uE(e,t){return t?e?(...n)=>{let r=n[0];if(mE(r)){let i=r;fE(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 mE(n)&&fE(n),e(...t)})}function fE(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function pE(e,t){return t?e?t+` `+e:t:e}function mE(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function hE(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=yE(r));let i=gE(t,n,r);if(n.enabled===!1)return null;let a=n.state??ZT;return bE(e,r,i,a)}function gE(e,t,n){let{className:r,style:i}=e,{state:a=ZT,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?$T(r,a):void 0,d=l?eE(i,a):void 0,f=l?QT(a,c):ZT,p=l&&s?_E(s):void 0,m=l?JT(f,p)??{}:ZT;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?BT([m.ref,qT(n),...o]):zT(m.ref,qT(n),o):zT(null,null)),l?(u!==void 0&&(m.className=pE(m.className,u)),d!==void 0&&(m.style=JT(m.style,d)),m):ZT}function _E(e){return Array.isArray(e)?rE(e):nE(void 0,e)}var vE=Symbol.for(`react.lazy`);function yE(e){if(e?.$$typeof!==vE)return e;let t=M.Children.toArray(e)[0];return M.isValidElement(t)?t:e}function bE(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=nE(n,t.props);return e.ref=n.ref,M.cloneElement(t,e)}return xE(e,n)}function xE(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 SE=`data-starting-style`,CE=`data-ending-style`,wE={[SE]:``},TE={[CE]:``},EE={transitionStatus(e){return e===`starting`?wE:e===`ending`?TE:null}},DE=`data-open`,OE=`data-closed`,kE=`data-anchor-hidden`,AE=`data-popup-open`,jE=`data-pressed`,ME={[AE]:``},NE={[AE]:``,[jE]:``},PE={[DE]:``},FE={[OE]:``},IE={[kE]:``},LE={open(e){return e?ME:null}},RE={open(e){return e?NE:null}},zE={open(e){return e?PE:FE},anchorHidden(e){return e?IE:null}},BE={...zE,...EE},VE=`none`,HE=`trigger-press`,UE=`trigger-hover`,WE=`trigger-focus`,GE=`outside-press`,KE=`item-press`,qE=`close-press`,JE=`focus-out`,YE=`escape-key`,XE=`list-navigation`,ZE=`keyboard`,QE=`pointer`,$E=`cancel-open`,eD=`sibling-open`,tD=`disabled`,nD=`imperative-action`;function rD({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 iD(){return typeof window<`u`}function aD(e){return cD(e)?(e.nodeName||``).toLowerCase():`#document`}function oD(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function sD(e){return((cD(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function cD(e){return iD()?e instanceof Node||e instanceof oD(e).Node:!1}function lD(e){return iD()?e instanceof Element||e instanceof oD(e).Element:!1}function uD(e){return iD()?e instanceof HTMLElement||e instanceof oD(e).HTMLElement:!1}function dD(e){return!iD()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof oD(e).ShadowRoot}function fD(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=CD(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function pD(e){return/^(table|td|th)$/.test(aD(e))}function mD(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var hD=/transform|translate|scale|rotate|perspective|filter/,gD=/paint|layout|strict|content/,_D=e=>!!e&&e!==`none`,vD;function yD(e){let t=lD(e)?CD(e):e;return _D(t.transform)||_D(t.translate)||_D(t.scale)||_D(t.rotate)||_D(t.perspective)||!xD()&&(_D(t.backdropFilter)||_D(t.filter))||hD.test(t.willChange||``)||gD.test(t.contain||``)}function bD(e){let t=TD(e);for(;uD(t)&&!SD(t);){if(yD(t))return t;if(mD(t))return null;t=TD(t)}return null}function xD(){return vD??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),vD}function SD(e){return/^(html|body|#document)$/.test(aD(e))}function CD(e){return oD(e).getComputedStyle(e)}function wD(e){return lD(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function TD(e){if(aD(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||dD(e)&&e.host||sD(e);return dD(t)?t.host:t}function ED(e){let t=TD(e);return SD(t)?(e.ownerDocument||e).body:uD(t)&&fD(t)?t:ED(t)}function DD(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ED(e),i=r===e.ownerDocument?.body,a=oD(r);if(i){let e=OD(a);return t.concat(a,a.visualViewport||[],fD(r)?r:[],e&&n?DD(e):[])}return t.concat(r,DD(r,[],n))}function OD(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var kD={...M},AD=kD.useInsertionEffect,jD=AD&&AD!==kD.useLayoutEffect?AD:e=>e();function MD(e){let t=RT(ND).current;return t.next=e,jD(t.effect),t.trampoline}function ND(){let e={next:void 0,callback:PD,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function PD(){}var FD=typeof document<`u`?M.useLayoutEffect:()=>{},ID=M.createContext(void 0);function LD(e=!1){let t=M.useContext(ID);if(t===void 0&&!e)throw Error(IT(16));return t}function RD(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 zD(e){return e?.ownerDocument||document}function BD(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(oD(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 VD(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=M.useRef(null),s=LD(!0),c=a??s!==void 0,{props:l}=RD({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=M.useCallback(()=>{let e=o.current;HD(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return FD(u,[u]),{getButtonProps:M.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return nE({onClick(e){if(t){e.preventDefault();return}n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(fE(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=HD(r),s=!i&&UD(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(),BD(r,e));return}if(!l||i||!d&&!u){n&&s&&d&&e.preventDefault();return}e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),BD(r,e)))},onKeyUp(e){if(!t){if(fE(e),a?.(e),e.target===e.currentTarget&&i&&c&&HD(e.currentTarget)&&e.key===` `){e.preventDefault();return}e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),BD(e.currentTarget,e))}},onPointerDown(e){if(t){e.preventDefault();return}s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:MD(e=>{o.current=e,u()})}}function HD(e){return uD(e)&&e.tagName===`BUTTON`}function UD(e){return uD(e)&&e.tagName===`A`&&!!e.href}function WD(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:GD,platform:KD,maxTouchPoints:qD}=WD(),JD=GD.toLowerCase(),YD=KD.toLowerCase(),XD=/^i(os$|p)/.test(YD)||YD===`macintel`&&qD>1,ZD=`android`,QD=YD===ZD||JD.includes(ZD),$D=!XD&&YD.startsWith(`mac`);YD.startsWith(`win`),!QD&&/^(linux|chrome os)/.test(YD);var eO=$D||XD,tO=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!tO&&JD.includes(`firefox`),!tO&&JD.includes(`chrom`);var nO=eO,rO=/jsdom|happydom/.test(JD);function iO(){let[,e]=M.useState({});return M.useCallback(()=>{e({})},[])}var aO=0;function oO(e,t=`mui`){let n=M.useRef(void 0),r=iO(),i=e??n.current;return M.useEffect(()=>{n.current??(aO+=1,n.current=`${t}-${aO}`,e??r())},[e,t,r]),i}var sO=kD.useId;function cO(e,t){if(sO!==void 0){let n=sO();return e??(t?`${t}-${n}`:n)}return oO(e,t)}function lO(e){return cO(e,`base-ui`)}function uO(e,t,n,r){let i=!1,a=!1,o=r??ZT;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??ZT;return{reason:e,event:t??new Event(`base-ui`),...r}}function fO(e){M.useEffect(e,XT)}var pO=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)}},hO=class e{static create(){return new e}static request(e){return mO.request(e)}static cancel(e){return mO.cancel(e)}currentId=pO;request(e){this.cancel(),this.currentId=mO.request(()=>{this.currentId=pO,e()})}cancel=()=>{this.currentId!==pO&&(mO.cancel(this.currentId),this.currentId=pO)};disposeEffect=()=>this.cancel};function gO(){let e=RT(hO.create).current;return fO(e.disposeEffect),e}function _O(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),FD(()=>{if(!e&&o&&i!==`ending`&&n){let e=hO.request(()=>{a(`ending`)});return()=>{hO.cancel(e)}}},[e,o,i,n]),FD(()=>{if(!e||t||i===void 0)return;let n=hO.request(()=>{a(void 0)});return()=>{hO.cancel(n)}},[t,e,i]),FD(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=hO.request(()=>{a(`idle`)});return()=>{hO.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function vO(e){return e==null?e:`current`in e?e.current:e}function yO(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var bO=null;function xO(e){if(!bO){let e=[];bO=e,queueMicrotask(()=>{bO=null,Gv.flushSync(()=>{for(let t of e)t()})})}bO.push(e)}function SO(e,t=!1,n=!1){let r=gO();return MD((i,a=null)=>{r.cancel();let o=vO(e);if(o==null)return;let s=o,c=()=>{if(!n){Gv.flushSync(i);return}xO(()=>{a?.aborted||i()})};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(yO(s).map(e=>e.finished.then(YT))).then(()=>{a?.aborted||c()},()=>{if(!a?.aborted){if(yO(s).some(e=>e.pending||e.playState!==`finished`)){l();return}c()}})}if(t){let e=SE;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 CO(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=MD(a),s=SO(r,n,i);M.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var wO=0,TO=class e{static create(){return new e}currentId=wO;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=wO,t()},e)}isStarted(){return this.currentId!==wO}clear=()=>{this.currentId!==wO&&(clearTimeout(this.currentId),this.currentId=wO)};disposeEffect=()=>this.clear};function EO(){let e=RT(TO.create).current;return fO(e.disposeEffect),e}function DO(e){e.preventDefault(),e.stopPropagation()}function OO(e){return`nativeEvent`in e}function kO(e){return e.pointerType===``&&e.isTrusted?!0:QD&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function AO(e){return rO?!1:!QD&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(QD||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function jO(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function MO(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}function NO(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function PO(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 FO(e,t){let n=e;for(;n;){if(lD(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(dD(n)?n.host:null)}return null}function IO(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var LO=`data-base-ui-focusable`,RO=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,zO=`ArrowLeft`,BO=`ArrowRight`,VO=`ArrowUp`,HO=`ArrowDown`,UO=`data-trigger-disabled`;function WO(e,t){if(!lD(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(UO);for(let[,e]of t.entries())if(PO(e,n))return!e.hasAttribute(UO);return!1}function GO(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 KO(e){return e.matches(`html,body`)}function qO(e){return uD(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function JO(e){return FO(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${RO}`)!=null}function YO(e){return e?e.getAttribute(`role`)===`combobox`&&qO(e):!1}function XO(e){if(!e||rO)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ZO(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function QO(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function $O(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function ek(e){let t=RT(tk,e).current;return t.next=e,FD(t.effect),t}function tk(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var nk={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},rk={...nk,position:`fixed`,margin:0,top:0,left:0};({...nk});var ik=M.forwardRef(function(e,t){let[n,r]=M.useState();FD(()=>{nO&&tO&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,q.jsx)(`span`,{...e,ref:t,style:rk,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function ak(e,t){return t<0||t>=e.length}function ok(e,t){return lk(e.current,{disabledIndices:t})}function sk(e,t){return lk(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ck(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>lk(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:ak(e,u)?-1:u,wrapped:d}}function lk(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&&uk(e,a,r));return a}function uk(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!fk(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 fk(e,t=e?CD(e):null){return!e||!e.isConnected||!t||dk(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var pk=`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 dD(n)?n.host:null}function hk(e){for(let t of Array.from(e.children))if(aD(t)===`summary`)return t;return null}function gk(e,t){let n=hk(t);return!!n&&(e===n||PO(n,e))}function _k(e){let t=e?aD(e):``;return e!=null&&e.matches(pk)&&(t!==`summary`||e.parentElement!=null&&aD(e.parentElement)===`details`&&hk(e.parentElement)===e)&&(t!==`details`||hk(e)==null)&&(t!==`input`||e.type!==`hidden`)}function vk(e){if(!_k(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=mk(t)){let n=t!==e,r=aD(t)===`slot`;if(t.hasAttribute(`inert`)||n&&aD(t)===`details`&&!t.open&&!gk(e,t)||t.hasAttribute(`hidden`)||!r&&!yk(t,n))return!1}return!0}function yk(e,t){let n=CD(e);return t?n.display!==`none`:fk(e,n)}function bk(e){let t=e.tabIndex;if(t<0){let t=aD(e);if(t===`details`||t===`audio`||t===`video`||uD(e)&&e.isContentEditable)return 0}return t}function xk(e){if(aD(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function Sk(e,t){let n=xk(e);if(!n)return!0;let r=t.find(e=>{let t=xk(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=xk(e);return t?.name===n.name&&t.form===n.form})===n}function Ck(e){if(uD(e)&&aD(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return uD(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function wk(e,t){Ck(e).forEach(e=>{_k(e)&&t.push(e),wk(e,t)})}function Tk(e,t,n){Ck(e).forEach(e=>{uD(e)&&e.matches(t)&&n.push(e),Tk(e,t,n)})}function Ek(e){return vk(e)&&bk(e)>=0}function Dk(e){let t=[];return wk(e,t),t.filter(vk)}function Ok(e){let t=Dk(e);return t.filter(e=>bk(e)>=0&&Sk(e,t))}function kk(e,t){let n=Ok(e),r=n.length;if(r===0)return;let i=NO(zD(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function Ak(e){return kk(zD(e).body,1)||e}function jk(e){return kk(zD(e).body,-1)||e}function Mk(e,t,n){if(!e)return null;let r=[];wk(zD(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(vk);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!PO(n,o)&&Ek(o)&&Sk(o,a))return o}return r[i]}function Nk(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!PO(n,r)}function Pk(e){Ok(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function Fk(e){let t=[];Tk(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 Ik(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Ik(e,t.id,n)])}function Lk(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 Rk(e){return`data-base-ui-${e}`}var zk=0;function Bk(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(zk);function a(){i&&!i()||e?.focus({preventScroll:n})}if(r)return a(),YT;let o=requestAnimationFrame(a);return zk=o,()=>{zk===o&&(cancelAnimationFrame(o),zk=0)}}var Vk=`data-base-ui-inert`,Hk=new WeakMap,Uk=new WeakSet,Wk=new WeakMap,Gk=0;function Kk(e){return e?dD(e)?e.host:Kk(e.parentNode):null}var qk=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=Kk(t);return e.contains(n)?n:null}).filter(e=>e!=null),Jk=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},Yk=(e,t,n)=>{let r=[],i=e=>{!e||n.has(e)||Array.from(e.children).forEach(e=>{aD(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function Xk(e,t,n,{mark:r=!0}){let i=qk(t,e),a=r?Yk(t,Jk(i),new Set(i)):[],o=[],s=[];if(n){let e=qk(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);Yk(t,Jk(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(Hk.get(e)||0)+1;Hk.set(e,r),o.push(e),r===1&&n&&Uk.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(Wk.get(e)||0)+1;Wk.set(e,t),s.push(e),t===1&&e.setAttribute(Vk,``)}),Gk+=1,()=>{o.forEach(e=>{let t=(Hk.get(e)||0)-1;Hk.set(e,t),t||(Uk.has(e)||e.removeAttribute(`aria-hidden`),Uk.delete(e))}),r&&s.forEach(e=>{let t=(Wk.get(e)||0)-1;Wk.set(e,t),t||e.removeAttribute(Vk)}),--Gk,Gk||(Hk=new WeakMap,Uk=new WeakSet,Wk=new WeakMap)}}function Zk(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=zD(e[0]).body;return Xk(e,i,n,{mark:r})}var Qk={style:{transition:`none`}},$k=`data-base-ui-click-trigger`,eA={fallbackAxisSide:`none`},tA={fallbackAxisSide:`end`},nA={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},rA=M.createContext(null),iA=()=>M.useContext(rA),aA=Rk(`portal`);function oA(e={}){let{ref:t,container:n,componentProps:r=ZT,elementProps:i}=e,a=cO(),o=iA()?.portalNode,[s,c]=M.useState(null),[l,u]=M.useState(null),d=MD(e=>{e!==null&&u(e)}),f=M.useRef(null);FD(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(cD(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=hE(`div`,r,{ref:[t,d],props:[{id:a,[aA]:``},i]}),m=s&&p?Gv.createPortal(p,s):null;return{node:l,nodeId:M.isValidElement(p)?p.props.id:void 0,subtree:m}}var sA=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}=oA({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&&Nk(e)&&(e.type===`focusin`?v.current&&=(Fk(l),!1):(Pk(l),v.current=!0))}return $O(QO(l,`focusin`,e,!0),QO(l,`focusout`,e,!0))},[l,y]),FD(()=>{!l||b!==!0||!v.current||(Fk(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)(rA.Provider,{value:S,children:[x&&l&&(0,q.jsx)(ik,{"data-type":`outside`,ref:f,onFocus:e=>{Nk(e,l)?m.current?.focus():jk(g?g.domReference:null)?.focus()}}),x&&l&&(0,q.jsx)(`span`,{role:s,"aria-owns":u,style:nA}),l&&Gv.createPortal(a,l),x&&l&&(0,q.jsx)(ik,{"data-type":`outside`,ref:p,onFocus:e=>{Nk(e,l)?h.current?.focus():(Ak(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,uO(`focus-out`,e.nativeEvent)))}})]})]})});function cA(){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 lA=class{nodesRef={current:[]};events=cA();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)}},uA=M.createContext(null),dA=M.createContext(null),fA=()=>M.useContext(uA)?.id||null,pA=e=>{let t=M.useContext(dA);return e??t};function mA(e){let t=cO(),n=pA(e),r=fA();return FD(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function hA(e){let{children:t,id:n}=e,r=fA();return(0,q.jsx)(uA.Provider,{value:M.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function gA(e){let{children:t,externalTree:n}=e,r=RT(()=>n??new lA).current;return(0,q.jsx)(dA.Provider,{value:r,children:t})}function _A(e,t){let n=oD(IO(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(kO(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var vA=20,yA=[];function bA(){yA=yA.filter(e=>e.deref()?.isConnected)}function xA(e){bA(),e&&aD(e)!==`body`&&(yA.push(new WeakRef(e)),yA.length>vA&&(yA=yA.slice(-20)))}function SA(){return bA(),yA[yA.length-1]?.deref()}function CA(e){return e?Ek(e)?e:Ok(e)[0]||e:null}function wA(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=Dk(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return Ek(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 TA(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=MD(()=>b.current.floatingContext?.nodeId),S=i===!1,C=YO(_)&&S,w=ek(i),ee=ek(a),T=ek(o),te=ek(u),ne=ek(g),re=pA(m),E=iA(),ie=M.useRef(!1),ae=M.useRef(!1),oe=M.useRef(!1),se=M.useRef(null),D=M.useRef(``),ce=M.useRef(``),le=M.useRef(null),ue=M.useRef(null),de=zT(le,p,E?.beforeInsideRef),fe=zT(ue,E?.afterInsideRef),pe=EO(),me=EO(),he=gO(),ge=E!=null,O=ZO(v),_e=MD((e=O)=>e?Ok(e):[]),ve=MD(()=>h?.().filter(e=>e!=null)??[]);M.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&PO(O,NO(zD(O)))&&_e().length===0&&!C&&DO(e)}return QO(zD(O),`keydown`,e)},[r,O,c,C,_e]),M.useEffect(()=>{if(r||!g)return;let e=zD(O);function t(){oe.current=!1}function n(e){let t=IO(e),n=ve(),r=PO(v,t)||PO(_,t)||PO(E?.portalNode,t)||n.some(e=>e===t||PO(e,t));oe.current=!r,ce.current=e.pointerType||`keyboard`,FO(t,`[data-base-ui-click-trigger]`)&&(ae.current=!0,me.start(0,()=>{ae.current=!1}))}function i(){ce.current=`keyboard`}return $O(QO(e,`pointerdown`,n,!0),QO(e,`pointerup`,t,!0),QO(e,`pointercancel`,t,!0),QO(e,`keydown`,i,!0),t)},[r,v,_,O,g,E,me,ve]),M.useEffect(()=>{if(r||!l)return;let e=zD(O);function n(){ae.current=!0,me.start(0,()=>{ae.current=!1})}function i(e){let t=IO(e);Ek(t)&&(se.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=IO(n);c&&r==null&&a!=null&&PO(v,a)&&xA(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ve(),p=r?.hasAttribute(Rk(`focus-guard`))&&[le.current,ue.current,E?.beforeInsideRef.current,E?.afterInsideRef.current,E?.beforeOutsideRef.current,E?.afterOutsideRef.current,vO(f),vO(d)].includes(r),m=!(PO(_,r)||PO(v,r)||PO(r,v)||PO(E?.portalNode,r)||u.some(e=>e===r||PO(e,r))||l.hasMatchingElement(e=>PO(e,r))||p||re&&(Ik(re.nodesRef.current,o).find(e=>PO(e.context?.elements.floating,r)||PO(e.context?.elements.domReference,r))||Lk(re.nodesRef.current,o).find(e=>[e.context?.elements.floating,ZO(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&O&&wA(O),s&&i!==_&&!fk(a)&&NO(e)===e.body){if(uD(O)&&(O.focus(),s===`popup`)){he.request(()=>{O.focus()});return}let e=_e(),t=se.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||O;uD(n)&&n.focus()}if(b.current.insideReactTree){b.current.insideReactTree=!1;return}(C||!c)&&r&&m&&!ae.current&&(C||r!==SA())&&(ie.current=!0,t.setOpen(!1,uO(JE,n)))})}function o(){oe.current||(b.current.insideReactTree=!0,pe.start(0,()=>{b.current.insideReactTree=!1}))}let u=uD(_)?_:null;if(!(!v&&!u))return $O(u&&QO(u,`focusout`,a),u&&QO(u,`pointerdown`,n),v&&QO(v,`focusin`,i),v&&QO(v,`focusout`,a),v&&E&&QO(v,`focusout`,o,!0))},[r,_,v,O,c,re,E,t,l,s,_e,C,x,b,pe,me,he,d,f,ve]),M.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(E?.portalNode?.querySelectorAll(`[${Rk(`portal`)}]`)||[]),t=(re?Lk(re.nodesRef.current,x()):[]).find(e=>YO(e.context?.elements.domReference||null))?.context?.elements.domReference,n=Zk([v,...e,le.current,ue.current,E?.beforeOutsideRef.current,E?.afterOutsideRef.current,...ve(),t,vO(f),vO(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=Zk([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,E,C,re,x,d,f,ve]),FD(()=>{if(!g||r||!uD(O))return;D.current=``,ce.current=``;let e=zD(O),t=NO(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(te.current||``):n;if(r===void 0||r===!1||PO(O,t))return;let i=null,a=()=>(i??=_e(O),i[0]||O),o;o=r===!0||r===null?a():vO(r),o||=a();let s=PO(O,NO(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&kO(c);Bk(o,{sync:l,preventScroll:o===O,shouldFocus(){if(!ne.current)return!1;if(s)return!0;let t=NO(e);return!(t!==o&&PO(O,t))}})})},[r,g,O,_e,w,te,ne,b]);let ye=M.useRef(null);FD(()=>{if(r||!O){ye.current=null;return}ye.current&&=(ye.current.cancelled=!0,null);let e=zD(O),t=NO(e),n=te.current==null;xA(t);function i(e){if(e.open||(D.current=_A(e.nativeEvent,ce.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(Rk(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(ie.current=!0),e.reason===`outside-press`){if(e.nested)ie.current=!1;else if(kO(e.nativeEvent)||AO(e.nativeEvent))ie.current=!1;else{let e=!1;zD(O).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?ie.current=!1:ie.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&&aD(t)!==`body`?t:null,s=n?o||a:a||o;return s||=SA()||null,typeof i==`boolean`?s:vO(i)||s||null}return()=>{y.off(`openchange`,i);let t=NO(e),n=ve(),r=PO(v,t)||n.some(e=>e===t||PO(e,t))||re&&Ik(re.nodesRef.current,x(),!1).some(e=>PO(e.context?.elements.floating,t)),o=ee.current,s=D.current,c=a(s),l={cancelled:!1};ye.current=l,queueMicrotask(()=>{ye.current===l&&(ye.current=null);let n=CA(c),i=T.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!ie.current&&uD(n)&&(!(!i&&n!==t&&t!==e.body)||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}ie.current=!1})}},[r,v,O,ee,T,te,y,re,_,x,ve]),FD(()=>{if(!tO||g||!v)return;let e=NO(zD(v));!uD(e)||!qO(e)||PO(v,e)&&e.blur()},[g,v]),FD(()=>{if(!(r||!E))return E.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{E.setFocusManagerState(null)}},[r,E,c,g,t,l,_]),FD(()=>{if(!(r||!O))return wA(O),()=>{queueMicrotask(bA)}},[r,O]);let be=!r&&(!c||!C)&&(ge||c);return(0,q.jsxs)(M.Fragment,{children:[be&&(0,q.jsx)(ik,{"data-type":`inside`,ref:de,onFocus:e=>{if(c){let e=_e();Bk(e[e.length-1])}else E?.portalNode&&(ie.current=!1,Nk(e,E.portalNode)?Ak(_)?.focus():vO(f??E.beforeOutsideRef)?.focus())}}),n,be&&(0,q.jsx)(ik,{"data-type":`inside`,ref:fe,onFocus:e=>{c?Bk(_e()[0]):E?.portalNode&&(l&&(ie.current=!0),Nk(e,E.portalNode)?jk(_)?.focus():vO(d??E.afterOutsideRef)?.focus())}})]})}function EA(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=HE}=t,l=e.context.dataRef,u=M.useRef(void 0),d=gO(),f=EO(),p=M.useMemo(()=>{function t(t,n,r,i){let a=uO(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=jO(e.pointerType,!0)&&AO(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||jO(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=IO(s),p=qO(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}jO(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}:ZT,[n,p])}function DA(){return!1}function OA(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function kA(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=DA,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=pA(c),m=MD(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=MD(()=>a),{escapeKey:v,outsidePress:y}=OA(s),b=M.useRef(!1),x=M.useRef(!1),S=M.useRef(!1),C=M.useRef(!1),w=M.useRef(!1),ee=M.useRef(``),T=M.useRef(null),te=EO(),ne=EO(),re=EO(),E=MD(()=>{ne.clear(),d.current.insideReactTree=!1}),ie=MD(e=>{let t=d.current.floatingContext?.nodeId;return(p?Ik(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),ae=MD(t=>GO(t,e.select(`floatingElement`))||GO(t,e.select(`domReferenceElement`))),oe=MD(t=>{o()&&e.setOpen(!1,uO(HE,t.nativeEvent))}),se=MD(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=OO(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&ie(`__escapeKeyBubbles`))return;let a=uO(YE,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),D=MD(()=>{d.current.insideReactTree=!0,ne.start(0,E)}),ce=MD(t=>{if(!l||!n||t.button!==0)return;let r=IO(t.nativeEvent);PO(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),le=MD(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(()=>E,[E]),M.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,ee.current=``,T.current=null),E;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new TO,i=zD(u);function a(){re.clear(),w.current=!0}function o(){w.current=!0,re.start(tO?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 ne(e){let t=d.current.floatingContext?.nodeId,n=p&&Ik(p.nodesRef.current,t).some(t=>GO(e,t.context?.elements.floating));return ae(e)||n}function oe(n){if(m(n)){n.type!==`click`&&!ae(n)&&(t.clear(),S.current=!1),E();return}if(d.current.insideReactTree){E();return}let r=IO(n),i=`[${Rk(`inert`)}]`,a=lD(r)?r.getRootNode():null,o=Array.from((dD(a)?a:zD(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>PO(e,r))))return;let c=lD(r)?r:null;for(;c&&!SD(c);){let e=TD(c);if(SD(e)||!lD(e))break;c=e}if(!(o.length&&lD(r)&&!KO(r)&&!PO(r,e.select(`floatingElement`))&&o.every(e=>!PO(c,e)))){if(uD(r)&&!(`touches`in n)){let e=SD(r),t=CD(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(!ne(n)){if(f()===`intentional`){if(n.detail!==0&&!kO(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}typeof h==`function`&&!h(n)||ie(`__outsidePressBubbles`)||(e.setOpen(!1,uO(GE,n)),E())}}}function D(t){f()!==`sloppy`||t.pointerType===`touch`||!e.select(`open`)||!n||ae(t)||oe(t)}function ce(t){if(f()!==`sloppy`||!e.select(`open`)||!n||ae(t))return;let r=t.touches[0];r&&(T.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},te.start(1e3,()=>{T.current&&(T.current.dismissOnTouchEnd=!1,T.current.dismissOnMouseDown=!1)}))}function le(e,t){let n=IO(e);if(!n)return;let r=QO(n,e.type,()=>{t(e),r()})}function ue(e){ee.current=`touch`,le(e,ce)}function de(e){te.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),ee.current=e.pointerType),!(e.type===`mousedown`&&T.current&&!T.current.dismissOnMouseDown)&&le(e,e=>{e.type===`pointerdown`?D(e):oe(e)})}function fe(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(!ne(e)){if(n){s();return}typeof h==`function`&&!h(e)||(t.clear(),S.current=!0,E())}}}function pe(e){if(f()!==`sloppy`||!T.current||ae(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-T.current.startX),r=Math.abs(t.clientY-T.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(T.current.dismissOnTouchEnd=!0),i>10&&(oe(e),te.clear(),T.current=null)}function me(e){le(e,pe)}function he(e){f()!==`sloppy`||!T.current||ae(e)||(T.current.dismissOnTouchEnd&&oe(e),te.clear(),T.current=null)}function ge(e){le(e,he)}let O=$O(r&&$O(QO(i,`keydown`,se),QO(i,`compositionstart`,a),QO(i,`compositionend`,o)),g&&$O(QO(i,`click`,de,!0),QO(i,`pointerdown`,de,!0),QO(i,`pointerup`,fe,!0),QO(i,`pointercancel`,fe,!0),QO(i,`mousedown`,de,!0),QO(i,`mouseup`,fe,!0),QO(i,`touchstart`,ue,{capture:!0,passive:!0}),QO(i,`touchmove`,me,{capture:!0,passive:!0}),QO(i,`touchend`,ge,{capture:!0,passive:!0})));return()=>{O(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,se,E,_,ie,ae,p,e,te,re]);let ue=M.useMemo(()=>({onKeyDown:se,onPointerDown:oe,onClick:oe}),[se,oe]),de=M.useMemo(()=>({onKeyDown:se,onPointerDown:le,onMouseDown:le,onClickCapture:D,onMouseDownCapture(e){D(),ce(e)},onPointerDownCapture(e){D(),ce(e)},onMouseUpCapture:D,onTouchEndCapture:D,onTouchMoveCapture:D}),[se,D,ce,le]);return M.useMemo(()=>n?{reference:ue,floating:de,trigger:ue}:{},[n,ue,de])}function AA(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),FD(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};lD(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 jA(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=MD(i),{mounted:c,setMounted:l,transitionStatus:u}=_O(t,!1,!1,o),d=!t&&r;FD(()=>{t&&s(!1)},[t,s]);let f=M.useRef(c),p=M.useRef(!1),m=iO(),h=()=>{f.current=!1,l(!1),a()};FD(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=MD(()=>{if(f.current){if(t){p.current=!0,m();return}h()}});return CO({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var MA={tabIndex:-1,[LO]:``};function NA(e){return t=>t!==`touch`||e.current}function PA(e,t=!1){let n=cO(),r=fA()!=null,i=RT(()=>e(n,r)).current;return AA({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function FA({handle:e,store:t}){return FD(()=>e.attachStore(t),[e,t]),null}function IA(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function LA(e,t){let n=M.useRef(null);return MD(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),IA(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),IA(t))})}function RA(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 zA(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function BA(e,t,n,r={}){let i=n.reason,a=i===UE,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=zA(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=RA(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?Gv.flushSync(l):l()}function VA(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=LA(e,n),o=MD(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=MD(e=>{a(e),e&&o(e)});return FD(()=>(s(t.current),()=>s(null)),[s,t,n,e]),FD(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function HA(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=M.useRef(null),i=e.useState(`open`);FD(()=>{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=uO(VE);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 UA(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=jA({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 RT(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function WA(e,t){e.useSyncedValues(t),FD(()=>()=>{e.update({activeTriggerProps:ZT,inactiveTriggerProps:ZT,popupProps:ZT})},[e])}function GA(e,t){FD(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),FD(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var KA=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}},qA=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})),JA=t(((e,t)=>{t.exports=qA()})),YA=t((e=>{var t=Wi(),n=JA();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}})),XA=t(((e,t)=>{t.exports=YA()})),ZA=JA(),QA=XA(),$A=[],ej=void 0;function tj(){return ej}function nj(e){$A.push(e)}function rj(e){let t=(t,n)=>{let r=RT(aj).current,i;try{ej=r;for(let e of $A)e.before(r);i=e(t,n);for(let e of $A)e.after(r);r.didInitialize=!0}finally{ej=void 0}return i};return t.displayName=e.displayName||e.name,t}function ij(e){return M.forwardRef(rj(e))}function aj(){return{didInitialize:!1}}var oj=KT(19)?lj:uj;function sj(e,t,n,r,i){return oj(e,t,n,r,i)}function cj(e,t,n,r,i){let a=M.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,ZA.useSyncExternalStore)(e.subscribe,a,a)}nj({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,ZA.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function lj(e,t,n,r,i){let a=tj();if(!a)return cj(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 uj(e,t,n,r,i){return(0,QA.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 sj(this,e,t,n,r)}},fj=class extends dj{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){M.useDebugValue(e);let n=this;FD(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;FD(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;FD(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){M.useDebugValue(e);let n=this,r=t!==void 0;FD(()=>{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),sj(this,this.selectors[e],t,n,r)}useContextCallback(e,t){M.useDebugValue(e);let n=MD(t??YT);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)}})}},pj={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 fj{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:cA(),nested:n,triggerElements:i},pj),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&MO(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 hj(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:ZT,inactiveTriggerProps:ZT,popupProps:ZT}}var gj=e=>e.triggerIdProp??e.activeTriggerId,_j=e=>e.openProp??e.open,vj=e=>(e.popupElement?.id??e.floatingId)||void 0;function yj(e,t){return t!==void 0&&_j(e)&&gj(e)===t}function bj(e,t){return yj(e,t)?!0:t!==void 0&&_j(e)&&gj(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var xj={open:_j,mounted:e=>e.mounted,transitionStatus:e=>_j(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:gj,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:vj,isTriggerActive:(e,t)=>t!==void 0&&gj(e)===t,isOpenedByTrigger:(e,t)=>yj(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&gj(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>bj(e,t)?vj(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function Sj(e){let t=M.useCallback(t=>e===void 0?YT:e.subscribeStore(t),[e]),n=M.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,ZA.useSyncExternalStore)(t,n,()=>e?.serverStore)}var Cj=new Set([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`,`Home`,`End`]);function wj(e){return KT(19)?e:e?`true`:void 0}var Tj=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}})}),Ej={},Dj={},Oj=``;function kj(e,t){return fD(e)?e:t}function Aj(e,t,n){return/hidden|clip/.test(e.getComputedStyle(kj(t,n)).overflowY)}function jj(e){if(typeof document>`u`)return!1;let t=zD(e);return oD(t).innerWidth-t.documentElement.clientWidth>0}function Mj(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=zD(e),n=t.documentElement,r=t.body,i=kj(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 Nj(e){let t=zD(e),n=t.documentElement,r=t.body,i=kj(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 Pj(e){let t=zD(e),n=t.documentElement,r=t.body,i=oD(n),a=0,o=0,s=!1,c=hO.create();if(tO&&(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,Ej={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},Oj=n.style.scrollBehavior,Dj={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=kj(n,r);if(s=Mj(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,Ej),Object.assign(r.style,Dj),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=Oj)}function d(){u(),c.request(l)}l();let f=QO(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Fj=new class{lockCount=0;restore=null;timeoutLock=TO.create();timeoutUnlock=TO.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=zD(e),n=t.documentElement,r=t.body,i=oD(n);if(Aj(i,n,r)){let t=new i.MutationObserver(()=>{Aj(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=XD||!jj(e);this.restore=a?Nj(e):Pj(e)}};function Ij(e=!0,t=null){FD(()=>{if(e)return Fj.acquire(t)},[e,t])}function Lj(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 Rj(e,t){let n=M.useRef(e),r=MD(t);FD(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function zj(e,t){let{onClick:n,onPointerDown:r}=Lj(MD((n,r)=>{(typeof e==`function`?e():e)||t(r||(XD?`touch`:``))}));return M.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function Bj(e){let[t,n]=M.useState(null),r=zj(e,n);return Rj(e,t=>{t&&!e&&n(null)}),M.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}var Vj=`data-glide-stand-in`;function Hj(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 Uj(e){return{transform:`translate(${String(e.x)}px, ${String(e.y)}px)`,width:`${String(e.width)}px`,height:`${String(e.height)}px`}}function Wj(e){let t=(0,M.useRef)(null);return(0,M.useCallback)(n=>{t.current?.(),t.current=n?Gj(n,e):null},[e])}function Gj(e,t){if(!eT(e))return()=>void 0;let n=e.ownerDocument,r=e.querySelector(t),i=r?Hj(e,r):null,a=null,o=null,s=new Set,c=()=>{for(let e of s)e.removeAttribute(Vj);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=Jw(e),u=Hj(e,t),d=o&&a?Hj(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(Vj,`measure`);let f=getComputedStyle(t),p=f.backgroundColor,m=f.borderRadius;for(let e of[t,n])e&&(e.setAttribute(Vj,``),s.add(e));let h=l();h.hidden=!1,h.style.backgroundColor=p,h.style.borderRadius=m;let g=h.animate([Uj(d),Uj(u)],{duration:r.normal,easing:$w(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 Kj=(0,M.createContext)(void 0),qj=(0,M.createContext)(null);function Jj(e){let t=(0,M.useContext)(qj);return t===null?Object.hasOwn(globalThis,`document`)?document.body:null:t[e]}function Yj(e){let t=(0,M.useContext)(Kj),n=(0,M.useRef)(e);n.current=e,(0,M.useEffect)(()=>t?.(()=>{n.current()}),[t])}var Xj=Object.freeze({ease:`linear`,duration:0});function Zj(e,t){let n=Qw(e,t.duration);return n<=0?Xj:e.steps>0?{ease:uT(e.steps),duration:n}:{ease:lT({bounce:Zw(e,t.bounce),duration:n}),duration:n}}function Qj(e,t){let n=Xw(e,t.duration);return{ease:e.steps>0?uT(e.steps):t.ease,duration:n}}var $j={dot:{y:-4,height:8,cy:0},pill:{y:-16,height:32,cy:0},bang:{y:-16,height:20,cy:12}};function eM({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)($j[t]).current,d=(0,M.useRef)(t===`dot`?1:4).current,f=(0,M.useRef)(+(t===`bang`)).current,p=(0,M.useRef)(t),m=Yw(s),{reduced:h}=m;return(0,M.useLayoutEffect)(()=>{if(!i.current||!a.current||!c.current||!l.current)return;let e=$j[t],n=h||p.current===t;p.current=t;let r=Jw(i.current),o=n?{duration:0}:Zj(r,{bounce:.3,duration:360}),s=tr(i.current,{y:e.y,height:e.height,...o}),u=tr(a.current,{cy:e.cy,...n?{duration:0}:{delay:Xw(r,35),...Zj(r,{bounce:.3,duration:420})}}),d=tr(c.current,{gradientTransform:`matrix(1 0 0 ${t===`dot`?`1`:`4`} 0 0)`,...o}),f=tr(l.current,{opacity:+(t===`bang`),...n?Xj:Qj(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`?tr(o.current,{opacity:[1,.45],...Qj(m,{ease:`inOutSine`,duration:750}),alternate:!0,loop:!0}):tr(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}},...Qj(m,{ease:`inOutSine`,duration:1e3}),loop:!0}),t=gT(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)(hT,{id:r,values:mT}),(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)(fT,{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 tM=.28;function nM(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?tM: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 rM=7.25;function iM({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)(nM(t,n)).current,p=(0,M.useRef)(t),m=aT();(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=nM(t,n),y=p.current;p.current=t;let b=Jw(e),x=m||y===t&&t!==`arc`,S=x?m?{ease:b.ease,duration:b.fast}:Xj:Qj(b,{ease:`outQuad`,duration:160}),C=(t===`check`||t===`cross`)&&!x,w=Qj(b,{ease:`inOutSine`,duration:220}),ee=[tr(r,{opacity:v.dashes,...S}),tr(c,{opacity:v.track*.28,...S}),tr(f,{opacity:v.arc,"stroke-dasharray":`${String(v.sweep)} 1`,...x?m?Xj:S:w}),tr(h,{r:v.disc*rM,...C?{delay:w.duration*.7,...Zj(b,{bounce:.35,duration:360})}:m?Xj:Qj(b,{ease:`inCubic`,duration:140})}),tr(g,{"stroke-dashoffset":1-v.tick,...C&&v.tick>0?{delay:w.duration*.7+b.fast,...Qj(b,{ease:`outCubic`,duration:240})}:Xj}),tr(_,{"stroke-dashoffset":1-v.cross,...C&&v.cross>0?{delay:w.duration*.7+b.fast,...Qj(b,{ease:`outCubic`,duration:240})}:Xj})];return t===`cross`&&C&&b.shake>0&&ee.push(tr(e,{translateX:[0,-b.shake,b.shake,-b.shake/2,0],delay:w.duration+b.fast,...Qj(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=Jw(i.current),t=tr(c.current,{rotate:[0,360],...Qj(e,{ease:`linear`,duration:900}),loop:!0}),n=gT(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*rM,fill:`url(#${r}-surface)`,mask:`url(#${r}-knock)`})]})}var aM=new Set([`ring`,`arc`,`check`,`cross`]);function oM(e){return aM.has(e)}var sM={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`},cM=(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:[oM(n)?(0,q.jsx)(iM,{className:sM[i],glyph:n,progress:s}):(0,q.jsx)(eM,{className:sM[i],glyph:n,motion:r}),t===void 0?null:(0,q.jsx)(`span`,{children:t})]})}),lM=(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)(cM,{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)(OT,{"aria-label":c,size:`sm`,variant:`outline`,onClick:s,children:l}):null,o?(0,q.jsx)(OT,{"aria-label":r,size:`sm`,variant:`ghost`,onClick:o,children:i}):null]}):null]})}),uM={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)(OT,{...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)]`,uM[n]),children:t})})});function fM({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 pM=fM();function mM(e){if(typeof e!=`string`)throw TypeError(`Expected a \`string\`, got \`${typeof e}\``);return!e.includes(`\x1B`)&&!e.includes(`›`)?e:e.replace(pM,``)}function hM(e){return mM(e).replace(/\r\n?/gu,`
11
- `).replace(/[\p{Cc}\u200b\u200e\u200f\u061c\u202a-\u202e\u2066-\u2069\u2060\ufeff]/gu,e=>e===`
12
- `||e===` `?e:``)}var gM=()=>void 0;function _M(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 vM=45e3,yM=Cg.check(K(256)),bM=G.check(hg(0)),xM=B({agentId:yM,sessionId:yM,name:yM}),SM=B({by:xM,reason:H([`escalated`,`sender_archived`,`sender_absent`]),note:F(R.check(K(1e3)))}),CM=B({id:yM,kind:Cg.check(K(64)),summary:Cg.check(K(200)),since:bM,expiresAt:I(bM),inbox:I(L(!1)),waitingOn:I(xM),escalated:I(SM)}),wM=CM.mapFields(e=>({...e,extensionId:yM})),TM=V(wM).check(K(64)),EM=H([`contract`,`extensions`,`instructions`,`model`,`runtime`,`store`,`tools`]),DM=H([`closed`,`conflict`,`incompatible`,`invalid`,`rejected`,`unavailable`,`state_reset_required`,`storage_pressure`,`archived`,`secret_in_prompt`]),OM=R.pipe(W(yg(1)),W(K(256))),kM=B({_tag:L(`ShiitakeError`),boundary:EM,cause:DM,message:R,requestId:F(OM)}),AM=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}},jM=R.pipe(W(yg(1)),W(K(256))),MM=[`minimal`,`low`,`medium`,`high`,`xhigh`,`max`],NM=B({providerId:jM,modelId:jM,reasoning:I(H(MM))}),PM=Sh(U(NM)),FM=Sh(Tg(U(NM))),IM=new TextEncoder;function LM(e){return R.check(yg(1),K(e),ng(t=>IM.encode(t).byteLength<=e))}var RM=/\p{Cs}/u,zM=LM(256).check(ng(e=>!RM.test(e))),BM=LM(262144),VM=B({type:L(`image`),data:R.check(yg(1),K(1048576),og()),mimeType:R.check(ng(e=>[`image/png`,`image/jpeg`,`image/gif`,`image/webp`].includes(e)))}),HM=V(VM).check(yg(1),K(8)),UM=H([`steer`,`followUp`]),WM=zM;P(B({commandId:zM,timeoutMs:G.check(hg(0),gg(3e4))}),{onExcessProperty:`error`}),P(B({commandId:zM,timeoutMs:Eg.check(vg(),_g({minimum:0,maximum:3e4}))}),{onExcessProperty:`error`});var GM=P(LM(512)),KM=B({requestId:zM}),qM=B({delivery:UM,requestId:zM,type:L(`prompt`),text:R.check(K(262144),ng(e=>IM.encode(e).byteLength<=262144)),images:F(HM)}).check(ng(e=>(e.text.length>0||(e.images?.length??0)>0)&&IM.encode(e.text).byteLength+(e.images??[]).reduce((e,t)=>e+t.data.length,0)<=1048576)),JM=B({type:L(`abort`)}),YM=B({commandId:zM,onlyIfPending:I(Fh),type:L(`cancel`)}),XM=B({type:L(`operator`),requestId:zM,author:H([`operator`,`party`]),text:BM}),ZM=B({type:L(`branch`),entryId:zM}),QM=B({type:L(`fork`),entryId:zM}),$M=R.check(yg(1),K(4096)),eN=B({type:L(`compact`),requestId:zM,instructions:F($M)}),tN=Hh([qM,eN]),nN=R.check(ng(e=>e.length>0&&e.trim()===e&&!/\p{Cc}/u.test(e)&&Array.from(e).length<=120)),rN=Hh([qM,JM,YM,ZM,QM,XM,eN,B({type:L(`title`),title:U(nN)})]),iN=B({command:rN}),aN=B({includeSandboxFailures:I(Fh),limit:I(G.check(_g({minimum:1,maximum:200}))),before:I(LM(512))}),oN=B({includeSandboxFailures:I(L(`true`)),limit:I(Eg.check(vg(),_g({minimum:1,maximum:200}))),before:I(LM(512))}),sN=B({includeSandboxFailures:I(Fh),after:I(R)}),cN=B({includeSandboxFailures:I(L(`true`)),mode:I(L(`subscribe`)),after:I(R),limit:I(Eg.check(vg(),_g({minimum:1,maximum:200})))}),lN={onExcessProperty:`error`},uN=P(WM,lN),dN=P(KM,lN);P(tN,lN),P(zM),P(rN,lN),P(iN,lN);var fN=P(Hh([aN,Ph]),lN);P(oN,lN);var pN=P(sN,lN);P(cN,lN);function mN(e){let t=uN(e);if(t._tag===`Failure`)throw new AM(`contract`,`invalid`,`Session id is invalid`);return t.success}function hN(e){let t=GM(e);if(t._tag===`Failure`)throw new AM(`contract`,`invalid`,`Session cursor is invalid`);return t.success}function gN(e){let t=dN(e);if(t._tag===`Failure`)throw new AM(`contract`,`invalid`,`Session creation request is invalid`);return t.success.requestId}function _N(e){let t=fN(e);if(t._tag===`Failure`)throw new AM(`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 vN(e){let t=pN(e);if(t._tag===`Failure`)throw new AM(`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 yN=dr();function bN(e){return e!==null&&!Array.isArray(e)&&typeof e==`object`}function xN(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 SN(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 CN(e){return e.split(/[^a-zA-Z0-9]+/).filter(e=>e.length>0)}var wN=new Set([`the`,`a`,`an`,`for`,`to`,`of`,`that`,`this`,`with`,`in`,`on`]);function TN(e){return wN.has(e)}function EN(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 DN(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 ON(e){return e.slice(e.indexOf(`.`)+1)}function kN(e){return e.slice(0,e.indexOf(`.`))}var AN=/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)+$/,jN=1e3,MN=221;function NN(e,t){if(t>16)return t;if(Array.isArray(e)){let n=t;for(let r of e)n=Math.max(n,NN(r,t+1));return n}if(!bN(e))return t;let n=t;for(let r of Object.values(e))n=Math.max(n,NN(r,t+1));return n}var PN=s(()=>Pe(j(),dr()).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`}),NN(e,0)>16&&t.addIssue({code:`custom`,message:`Sample exceeds the depth bound`})})),FN=s(()=>D({query:j().max(200),maxResults:tt().int().min(1).max(50).default(50)})),IN=s(()=>D({path:j().max(160),detail:Zn([`index`,`full`]).default(`full`),methods:ki(j().max(80)).max(50).optional()})),LN=D({cursor:j().max(400).optional(),limit:tt().int().min(1).max(50).default(50),namespace:j().min(1).max(160).regex(/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/).optional()}),RN=s(()=>D({path:j().max(160),capabilityNotes:j().max(500).optional()})),zN=D({path:j().max(160),description:j().max(1e3).optional(),score:tt().min(0).max(MN),matchReason:j().max(500).optional(),sample:PN.optional(),capabilityNotes:j().max(500).optional(),peers:ki(RN).max(1e3).optional()}),BN=s(()=>D({results:ki(zN).max(50),total:tt().int().min(0).max(jN),truncated:Si(),topScore:tt().min(0).max(MN),margin:tt().min(0).max(MN),catalogStamp:j().length(16).regex(/^[0-9a-f]{16}$/)})),VN=D({results:ki(zN).max(50),total:tt().int().min(0).max(jN),nextCursor:j().max(400).nullable(),catalogStamp:j().length(16).regex(/^[0-9a-f]{16}$/)}),HN=s(()=>D({path:j().max(160),description:j().max(1e3).optional(),types:j().max(2e4),inputSchema:dr().refine(e=>JSON.stringify(e).length<=2e4&&NN(e,0)<=16,`Input schema exceeds the description bounds`).optional(),kind:Zn([`module`,`operation`]),usage:j().max(300).optional()}));s(()=>D({code:Zn([`empty_query`,`empty_catalog`,`unknown_target`,`duplicate_operation`,`invalid_input`]),message:j().max(1e3)}));var UN=s(()=>D({"~standard":D({jsonSchema:D({input:cn(Function),output:cn(Function)})})})),WN=s(()=>wt(e=>UN.safeParse(e).success,`Expected a Standard JSON Schema`)),GN=s(()=>D({path:j().min(3).max(160).regex(AN),description:j().max(1e3).optional(),input:WN,output:WN.optional(),capabilityNotes:j().max(500).optional(),instructions:j().max(1e3).optional()})),KN=s(()=>D({revision:j().min(1).max(160),operations:ki(GN).max(jN)})),qN=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}}},JN=_e([ze({$ref:j().optional(),$defs:Pe(j(),At()).optional(),definitions:Pe(j(),At()).optional(),const:At().optional(),enum:ki(At()).optional(),oneOf:ki(At()).optional(),anyOf:ki(At()).optional(),allOf:ki(At()).optional(),type:_e([j(),ki(j())]).optional(),properties:Pe(j(),At()).optional(),additionalProperties:At().optional(),required:ki(j()).optional(),prefixItems:ki(At()).optional(),items:At().optional(),examples:ki(At()).optional(),default:At().optional()}),Si()]),YN=new WeakMap;function XN(e,t){let n=YN.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 qN(`invalid_input`,`Schema cannot be projected to JSON Schema`)}$N(i);let a={raw:i};return n===void 0&&(n={},YN.set(e,n)),n[t]=a,a}function ZN(e,t){return XN(e,t).raw}function QN(e,t){let n=XN(e,t);try{return n.text??=JSON.stringify(n.raw),n.text}catch{throw new qN(`invalid_input`,`Schema cannot be projected to JSON Schema`)}}function $N(e){let t=JN.safeParse(e);if(!t.success)throw new qN(`invalid_input`,`Schema cannot be projected to JSON Schema`);return t.data}var eP=256,tP=/^#\/(?:\$defs|definitions)\/([^/]+)$/u;function nP(e,t,n){let r=tP.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>eP)throw new qN(`invalid_input`,`Schema references expand more than ${String(eP)} times; flatten its shared definitions`);return iP($N(i),t,{definitions:n.definitions,expanding:new Set([...n.expanding,r]),budget:n.budget})}function rP(e,t){if(e===!0||e===!1)return!1;if(e.$ref!==void 0){let n=tP.exec(e.$ref)?.[1],r=n===void 0||t.expanding.has(n)?void 0:t.definitions[n];return n!==void 0&&r!==void 0&&rP($N(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 iP(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 nP(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=>iP($N(e),t+1,r)).join(` | `);if(e.anyOf)return e.anyOf.map(e=>iP($N(e),t+1,r)).join(` | `);if(e.allOf)return e.allOf.map(e=>{let n=$N(e),i=iP(n,t+1,r);return rP(n,r)?`(${i})`:i}).join(` & `);if(e.type===`object`||e.properties){let n=Object.entries(e.properties??{}).sort(([e],[t])=>xN(e,t));if(n.length===0){let n=e.additionalProperties;return n===!1?`Record<string, never>`:n&&n!==!0?`Record<string, ${iP($N(n),t+1,r)}>`:`Record<string, unknown>`}let i=new Set(e.required??[]);return`{
13
- ${n.map(([e,n])=>{let a=iP($N(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
- `)}
15
- ${` `.repeat(t)}}`}if(e.type===`array`){let n=e.items;if(e.prefixItems&&e.prefixItems.length>0){let i=e.prefixItems.map(e=>iP($N(e),t+1,r));return n!==void 0&&n!==!0&&!Array.isArray(n)&&i.push(`...${iP($N(n),t+1,r)}[]`),`[${i.join(`, `)}]`}if(n!==void 0&&Array.isArray(n))return`[${n.map(e=>iP($N(e),t+1,r)).join(`, `)}][]`;let i=n===void 0||$N(n),a=iP(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 aP(e,t=`input`){return iP($N(ZN(e,t)),0)}function oP(e){return e.replace(/[^A-Za-z0-9_$]/g,`_`)}function sP(e,t,n){let r=`(input: ${t}) => Promise<${n}>`;for(let t of e.split(`.`).reverse())r=`{ [${JSON.stringify(t)}]: ${r} }`;return r}function cP(e){return e.length===0?``:`export declare const env: ${e.map(e=>e.indexEnvironment).join(` & `)};`}function lP(e){let t=e.map(e=>e.types).join(`
16
-
17
- `);return e.length===0?t:`${t}\nexport declare const env: ${e.map(e=>e.environment).join(` & `)};`}var uP=new WeakMap;function dP(e){let t=uP.get(e);if(t!==void 0)return t;let n=oP(e.path.replace(/\./g,`$`)),r=aP(e.input,`input`),i=e.output?aP(e.output,`output`):`unknown`,a=Object.freeze({indexEnvironment:sP(e.path,r,i),environment:sP(e.path,`${n}_Input`,`${n}_Output`),types:`export type ${n}_Input = ${r};\nexport type ${n}_Output = ${i};`});return uP.set(e,a),a}function fP(e){let t=$N(ZN(e,`input`));if(t===!0||t===!1||!t.properties)return;let n={},r=!1,i=Object.entries(t.properties).sort(([e],[t])=>xN(e,t));for(let[e,t]of i){let i=$N(t);if(i===!0||i===!1)continue;let a=i.examples;if(a&&a.length>0){let t=yN.safeParse(a[0]);t.success&&(n[e]=t.data,r=!0)}else if(i.default!==void 0){let t=yN.safeParse(i.default);t.success&&(n[e]=t.data,r=!0)}}return r?n:void 0}function pP(e){return e&&e.length>0?e:void 0}function mP(e){let t=HN.safeParse(e);if(!t.success)throw new qN(`invalid_input`,`Description output exceeded its bounds`);return t.data}function hP(e,t){let n=e.find(e=>e.path===t.path);if(n){let e=`env.${n.path}`,t=yN.safeParse(ZN(n.input,`input`));if(!t.success)throw new qN(`invalid_input`,`Schema cannot be projected to JSON Schema`);let r={path:n.path,description:pP(n.description),types:lP([dP(n)]),kind:`operation`,inputSchema:t.data,usage:`await ${e}({ ... })`};if(r.types.length>2e4)throw new qN(`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)=>xN(e.path,t.path));if(i.length===0)throw new qN(`unknown_target`,`Unknown target: ${t.path}`);let a=i[0];if(!a)throw new qN(`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?cP(i.map(dP)):lP((o.length>0?o:i).map(dP)),s.length>2e4)throw new qN(`invalid_input`,`Description types exceed the bounded output`);return mP({path:t.path,description:pP(a.instructions),types:s,kind:`module`})}function gP(e){let t=QN(e.input,`input`),n=e.output?QN(e.output,`output`):``;return Object.freeze({...e,fingerprint:DN(t+`
18
- `+n),inputBytes:t.length,outputBytes:n.length,sample:fP(e.input)})}var _P={exact:14,startsWith:9,phrase:6,token:4,prefix:2,substring:2,includes:1},vP={path:12,namespace:8,method:10,description:5},yP=25,bP=10,xP=8,SP=20,CP=Math.max(yP,bP)+xP+SP,wP=1+Math.max(...Object.values(_P))*Math.max(...Object.values(vP))+CP;function TP(e){return DN([...e].sort((e,t)=>xN(e.path,t.path)).map(e=>JSON.stringify([e.path,e.description??null,e.capabilityNotes??null,e.instructions??null,e.fingerprint])).join(`
19
- `))}function EP(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=CN(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 DP(e,t,n){let r=SN(e),i=`none`,a=0,o=[];for(let e of n){let n=[e,...EN(e)],s=`none`;for(let e of n){let t=EP(r,e);if(t!==`none`){s=t;break}}if(s===`none`)continue;let c=_P[s]*vP[t];o.includes(e)||o.push(e),c>a&&(i=s,a=c)}return{level:i,score:a,matchedTokens:o}}function OP(e,t){let n=SN(e);return[t,...EN(t)].some(e=>n.includes(e))}function kP(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 AP(e){let t=BN.safeParse(e);if(!t.success)throw new qN(`invalid_input`,`Search output exceeded its bounds`);return t.data}function jP(e){return[ON(e.path),(e.description??``).trim().toLowerCase().replace(/\s+/g,` `),e.fingerprint].join(`\0`)}function MP(e){return AP({results:[],total:0,truncated:!1,topScore:0,margin:0,catalogStamp:e})}function NP(e,t,n){let r=kN(e.path),i=ON(e.path),a=e.description??``,o=[e.path,r,i,a],s=DP(e.path,`path`,t),c=DP(r,`namespace`,t),l=DP(i,`method`,t),u=DP(a,`description`,t),d=n.filter(e=>o.some(t=>OP(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?yP:f*bP,h=n[0];h&&o.some(e=>OP(e,h))&&(m+=xP),(s.level===`exact`||l.level===`exact`)&&(m+=SP);let g={path:e.path,score:d+(p+m)/wP};a&&(g.description=a);let _=kP([[`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:jP(e),pathScore:s.score}}function PP(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||xN(e.result.path,t.result.path)),r=t[0];if(!r)continue;let i=[],a=t.slice(1).sort((e,t)=>xN(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||xN(e.path,t.path))}function FP(e,t,n){let r=e.slice(0,t),i=r[0],a=r[1];return AP({results:r,total:e.length,truncated:e.length>t,topScore:i?.score??0,margin:i&&a?i.score-a.score:0,catalogStamp:n})}function IP(e,t,n=50,r){let i=Math.min(50,Math.max(1,Math.floor(n))),a=CN(SN(t)),o=a.filter(e=>!TN(e));if(o.length===0)return MP(r);let s=[];for(let t of e){let e=NP(t,a,o);e&&s.push(e)}return FP(PP(s),i,r)}var LP=ft({catalogStamp:VN.shape.catalogStamp,namespace:LN.shape.namespace.unwrap().nullable(),after:zN.shape.path});function RP(e,t,n){let r=LN.safeParse(n);if(!r.success)throw new qN(`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)=>xN(kN(e.path),kN(t.path))||xN(e.path,t.path)),s=0;if(i.cursor!==void 0){let e;try{e=LP.parse(JSON.parse(i.cursor))}catch(e){throw new qN(`invalid_input`,`Invalid listing cursor`,{cause:e})}if(e.catalogStamp!==t||e.namespace!==a)throw new qN(`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 qN(`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 VN.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 zP=1e6;function BP(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=BP(i,a):Ti(i)&&(a=BP(Object.values(i),a)),n=Math.max(n,a),n>16)return n}return n}function VP(e){let t=KN.safeParse(e);if(!t.success)throw new qN(`invalid_input`,t.error.message);if(t.data.operations.length===0)throw new qN(`empty_catalog`,`Catalog must contain an operation`);let n=[...t.data.operations].sort((e,t)=>xN(e.path,t.path)),r=new Set,i=[],a=0;for(let e of n){if(r.has(e.path))throw new qN(`duplicate_operation`,`Duplicate operation path: ${e.path}`);if(r.add(e.path),QN(e.input,`input`).length>2e4||BP(Object.values(ZN(e.input,`input`)))>16)throw new qN(`invalid_input`,`Schema projection is too large: ${e.path}`);if((e.output?QN(e.output,`output`).length:0)>2e4||e.output!==void 0&&BP(Object.values(ZN(e.output,`output`)))>16)throw new qN(`invalid_input`,`Schema output projection is too large: ${e.path}`);let t=gP(e),n=t.sample,o=n===void 0?0:JSON.stringify(n).length;if(n!==void 0&&(Object.keys(n).length>100||o>4e3||NN(n,0)>16))throw new qN(`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>zP)throw new qN(`invalid_input`,`Catalog metadata exceeds the bounded projection`)}return{revision:t.data.revision,operations:i}}function HP(e){let t=VP(e),n=Object.freeze(t.operations),r=TP(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=FN.safeParse(e);if(!t.success)throw new qN(`invalid_input`,t.error.message);if(t.data.query.trim().length===0)throw new qN(`empty_query`,`Search query must not be empty`);return IP(n,t.data.query,t.data.maxResults,r)},describe:e=>{let t=IN.safeParse(e);if(!t.success)throw new qN(`invalid_input`,t.error.message);if(t.data.path.trim().length===0)throw new qN(`empty_query`,`Description target must not be empty`);return hP(n,t.data)},list:e=>RP(i,r,e),stamp:()=>r})}var UP=s(()=>j().min(1).max(75).regex(/^[A-Za-z][A-Za-z0-9_]*$/)),WP=s(()=>Pe(j(),dr()));s(()=>_e([WP,Si()]));var GP=s(()=>D({tool:UP,title:j().max(120),description:j().max(1e3),input:Pe(j(),dr()),output:Pe(j(),dr()),call:Pe(j(),dr())}).catchall(dr()));s(()=>re(`kind`,[ft({kind:or(`unindexed`)}),ft({kind:or(`ready`),tools:ki(GP).max(100).refine(e=>new Set(e.map(e=>e.tool)).size===e.length,{message:`Tool family names must be distinct`})})]));var KP=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:FN,output:BN}),qP=Object.freeze({replay:`safe`,path:`forage.describe`,description:`Describe a capability`,input:IN,output:HN}),JP=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:LN,output:VN});Object.freeze({createCatalog:HP,forageSearchDefinition:KP,forageDescribeDefinition:qP,forageListDefinition:JP});var YP=`invalid_definition`,XP=`runtime_closed`,ZP=`source_failure`,QP=class extends Error{code=YP;constructor(e){super(e),this.name=`MyceliumDefinitionError`}},$P=class extends Error{code=XP;constructor(e=`Mycelium runtime is closed`){super(e),this.name=`MyceliumClosedError`}},eF=class extends Error{sourceId;phase;code=ZP;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`}},tF=class extends Error{issues;constructor(e){super(`Invalid operation input`),this.issues=e,this.name=`InvalidOperationInput`}},nF=class extends Error{issues;constructor(e){super(`Operation output failed its declared schema`),this.issues=e,this.name=`InvalidOperationOutput`}},rF=class extends Go(`SourceInvalid`){},iF=class extends Go(`GuestThrew`){},aF=class extends Go(`DeadlineExceeded`){},oF=class extends Go(`SandboxBusy`){code=`sandbox-busy`},sF=class extends Go(`Cancelled`){},cF=class extends Go(`DispatchLost`){},lF=class extends Go(`SandboxCrashed`){},uF=class extends Go(`BadResponse`){},dF=class extends Go(`ResultTooLarge`){},fF=class extends Go(`ResultNotJson`){},pF=class extends Go(`CapabilityFailed`){constructor(e){super(e),this.message=gF(this)}},mF=class extends Go(`Unknown`){};function hF(e,t){switch(e._tag){case`SourceInvalid`:return new rF({line:e.line,column:e.column,excerpt:e.excerpt,ref:t});case`GuestThrew`:return new iF({name:e.name,message:e.message,missingVariable:e.missingVariable,transportMessage:e.transportMessage,ref:t});case`DeadlineExceeded`:return new aF({limitMs:e.limitMs,elapsedMs:e.elapsedMs,acknowledged:e.acknowledged,ref:t});case`SandboxBusy`:return new oF({capacity:e.capacity,waitedMs:e.waitedMs,ref:t});case`Cancelled`:return new sF({by:e.by,acknowledged:e.acknowledged,ref:t});case`DispatchLost`:return new cF({elapsedMs:e.elapsedMs,transport:e.transport,errno:e.errno,rawCause:e.rawCause,ref:t});case`SandboxCrashed`:return new lF({exit:e.exit,errno:e.errno,rawCause:e.rawCause,ref:t});case`BadResponse`:return new uF({reason:e.reason,rawCause:e.rawCause,ref:t});case`ResultTooLarge`:return new dF({size:e.size,ref:t});case`ResultNotJson`:return new fF({kind:e.kind,rawCause:e.rawCause,ref:t});case`CapabilityFailed`:return new pF({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 gF(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 _F=s(()=>_e([cn(rF),cn(iF),cn(aF),cn(oF),cn(sF),cn(cF),cn(lF),cn(uF),cn(dF),cn(fF),cn(pF),cn(mF)])),vF=s(()=>At().pipe(_e([cn(Error).transform(e=>({kind:`error`,value:e})),_i().transform(e=>({kind:`null`,value:e})),Pi().transform(e=>({kind:`undefined`,value:e})),j().transform(e=>({kind:`string`,value:e})),Si().transform(e=>({kind:`boolean`,value:e})),_e([tt(),Ge(),or(1/0),or(-1/0)]).transform(e=>({kind:`number`,value:e})),v().transform(e=>({kind:`bigint`,value:e})),p().transform(e=>({kind:`symbol`,value:e})),cn(Function).transform(e=>({kind:`function`,value:e})),ki(At()).transform(e=>({kind:`array`,value:e})),_e([cn(Object),Pe(j(),At())]).transform(e=>({kind:`object`,value:e})),At().transform(()=>({kind:`opaque`}))])));function yF(e){return _F.safeParse(e).success}function bF(e){let t=_F.safeParse(e);return t.success?t.data:new mF({rawCause:e})}function xF(e){let t=vF.parse(e);switch(t.kind){case`error`:case`array`:case`null`:return`object`;default:return t.kind}}s(()=>dr().optional());function SF(e){return CF(e,new Set)}function CF(e,t){let n=vF.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=>CF(e,t));let e=Object.fromEntries(Object.entries(r).map(([e,n])=>[e,CF(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=CF(r.cause,t)),r instanceof AggregateError&&(e.errors=CF(r.errors,t))}return e}finally{t.delete(e)}}}}var wF=s(()=>D({name:or(`ReferenceError`),message:j().regex(/^[\p{ID_Start}_$][\p{ID_Continue}$]* is not defined$/u)}).transform(e=>({...e,missingVariable:e.message.slice(0,-15)})));s(()=>_e([wF,D({name:j(),message:j()})]).and(D({transportMessage:j().max(512).optional()})));var TF=s(()=>ft({v:or(1),kind:or(`sandbox_failure`),tag:Zn([`SourceInvalid`,`GuestThrew`,`DeadlineExceeded`,`SandboxBusy`,`Cancelled`,`DispatchLost`,`SandboxCrashed`,`BadResponse`,`ResultTooLarge`,`ResultNotJson`,`CapabilityFailed`,`Unknown`]),ref:j().min(1).max(32),message:j().max(160)})),EF=P(Tg(Mh)),DF=s(()=>j().transform((e,t)=>{let n=EF(e);return Cn(n)?(t.addIssue({code:`custom`,message:`Invalid sandbox transport JSON`}),T):n.success})).pipe(TF);ft({error:DF}),s(()=>At().pipe(_e([or(`Execution timed out`).transform(()=>({kind:`deadline`})),At().transform(e=>({kind:`bad_response`,rawCause:e}))])));var OF=ft({sandboxCapacity:Xe().positive().optional(),admissionWaitMs:Xe().min(1).max(9e5).optional()});function kF(e,t){let n=OF.safeParse(e??{}),r=Xe().positive().safeParse(t??2);if(!n.success||!r.success)throw new QP(`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 AF=[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],jF=[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],MF=`‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࢗ-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-᫝᫠-᫫ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‌‍‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・`,NF=`ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-࢏ࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚ౜ౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ೜-ೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲊᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-Ƛ꟱-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ`,PF={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`},FF=`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`,IF={5:FF,"5module":FF+` export import`,6:FF+` const class extends export import super`},LF=/^in(stanceof)?$/,RF=RegExp(`[`+NF+`]`),zF=RegExp(`[`+NF+MF+`]`);function BF(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 VF(e,t){return e<65?e===36:e<91?!0:e<97?e===95:e<123?!0:e<=65535?e>=170&&RF.test(String.fromCharCode(e)):t!==!1&&BF(e,jF)}function HF(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&&zF.test(String.fromCharCode(e)):t===!1?!1:BF(e,jF)||BF(e,AF)}var UF=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 WF(e,t){return new UF(e,{beforeExpr:!0,binop:t})}var GF={beforeExpr:!0},KF={startsExpr:!0},qF={};function JF(e,t){return t===void 0&&(t={}),t.keyword=e,qF[e]=new UF(e,t)}var X={num:new UF(`num`,KF),regexp:new UF(`regexp`,KF),string:new UF(`string`,KF),name:new UF(`name`,KF),privateId:new UF(`privateId`,KF),eof:new UF(`eof`),bracketL:new UF(`[`,{beforeExpr:!0,startsExpr:!0}),bracketR:new UF(`]`),braceL:new UF(`{`,{beforeExpr:!0,startsExpr:!0}),braceR:new UF(`}`),parenL:new UF(`(`,{beforeExpr:!0,startsExpr:!0}),parenR:new UF(`)`),comma:new UF(`,`,GF),semi:new UF(`;`,GF),colon:new UF(`:`,GF),dot:new UF(`.`),question:new UF(`?`,GF),questionDot:new UF(`?.`),arrow:new UF(`=>`,GF),template:new UF(`template`),invalidTemplate:new UF(`invalidTemplate`),ellipsis:new UF(`...`,GF),backQuote:new UF("`",KF),dollarBraceL:new UF("${",{beforeExpr:!0,startsExpr:!0}),eq:new UF(`=`,{beforeExpr:!0,isAssign:!0}),assign:new UF(`_=`,{beforeExpr:!0,isAssign:!0}),incDec:new UF(`++/--`,{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new UF(`!/~`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:WF(`||`,1),logicalAND:WF(`&&`,2),bitwiseOR:WF(`|`,3),bitwiseXOR:WF(`^`,4),bitwiseAND:WF(`&`,5),equality:WF(`==/!=/===/!==`,6),relational:WF(`</>/<=/>=`,7),bitShift:WF(`<</>>/>>>`,8),plusMin:new UF(`+/-`,{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:WF(`%`,10),star:WF(`*`,10),slash:WF(`/`,10),starstar:new UF(`**`,{beforeExpr:!0}),coalesce:WF(`??`,1),_break:JF(`break`),_case:JF(`case`,GF),_catch:JF(`catch`),_continue:JF(`continue`),_debugger:JF(`debugger`),_default:JF(`default`,GF),_do:JF(`do`,{isLoop:!0,beforeExpr:!0}),_else:JF(`else`,GF),_finally:JF(`finally`),_for:JF(`for`,{isLoop:!0}),_function:JF(`function`,KF),_if:JF(`if`),_return:JF(`return`,GF),_switch:JF(`switch`),_throw:JF(`throw`,GF),_try:JF(`try`),_var:JF(`var`),_const:JF(`const`),_while:JF(`while`,{isLoop:!0}),_with:JF(`with`),_new:JF(`new`,{beforeExpr:!0,startsExpr:!0}),_this:JF(`this`,KF),_super:JF(`super`,KF),_class:JF(`class`,KF),_extends:JF(`extends`,GF),_export:JF(`export`),_import:JF(`import`,KF),_null:JF(`null`,KF),_true:JF(`true`,KF),_false:JF(`false`,KF),_in:JF(`in`,{beforeExpr:!0,binop:7}),_instanceof:JF(`instanceof`,{beforeExpr:!0,binop:7}),_typeof:JF(`typeof`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:JF(`void`,{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:JF(`delete`,{beforeExpr:!0,prefix:!0,startsExpr:!0})},YF=/\r\n?|\n|\u2028|\u2029/,XF=new RegExp(YF.source,`g`);function ZF(e){return e===10||e===13||e===8232||e===8233}function QF(e,t,n){n===void 0&&(n=e.length);for(var r=t;r<n;r++){var i=e.charCodeAt(r);if(ZF(i))return r<n-1&&i===13&&e.charCodeAt(r+1)===10?r+2:r+1}return-1}var $F=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/,eI=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,tI=Object.prototype,nI=tI.hasOwnProperty,rI=tI.toString,iI=Object.hasOwn||(function(e,t){return nI.call(e,t)}),aI=Array.isArray||(function(e){return rI.call(e)===`[object Array]`}),oI=Object.create(null);function sI(e){return oI[e]||(oI[e]=RegExp(`^(?:`+e.replace(/ /g,`|`)+`)$`))}function cI(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10)+55296,(e&1023)+56320))}var lI=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,uI=function(e,t){this.line=e,this.column=t};uI.prototype.offset=function(e){return new uI(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 fI(e,t){for(var n=1,r=0;;){var i=QF(e,r,t);if(i<0)return new uI(n,t-r);++n,r=i}}var pI={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 hI(e){var t={};for(var n in pI)t[n]=e&&iI(e,n)?e[n]:pI[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),aI(t.onToken)){var r=t.onToken;t.onToken=function(e){return r.push(e)}}if(aI(t.onComment)&&(t.onComment=gI(t,t.onComment)),t.sourceType===`commonjs`&&t.allowAwaitOutsideFunction)throw Error(`Cannot use allowAwaitOutsideFunction with sourceType: commonjs`);return t}function gI(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 _I=1,vI=2,yI=4,bI=8,xI=16,SI=32,CI=64,wI=128,TI=256,EI=512,DI=1024,OI=_I|vI|TI;function kI(e,t){return vI|(e?yI:0)|(t?bI:0)}var AI=0,jI=1,MI=2,NI=3,PI=4,FI=5,II=function(e,t,n){this.options=e=hI(e),this.sourceFile=e.sourceFile,this.keywords=sI(IF[e.ecmaVersion>=6?6:e.sourceType===`module`?`5module`:5]);var r=``;e.allowReserved!==!0&&(r=PF[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3],e.sourceType===`module`&&(r+=` await`)),this.reservedWords=sI(r);var i=(r?r+` `:``)+PF.strict;this.reservedWordsStrict=sI(i),this.reservedWordsStrictBind=sI(i+` `+PF.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(YF).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`?vI:_I),this.regexpState=null,this.privateNameStack=[]},LI={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}};II.prototype.parse=function(){var e=this,t=this.options.program||this.startNode();return this.nextToken(),this.catchStackOverflow(function(){return e.parseTopLevel(t)})},LI.inFunction.get=function(){return(this.currentVarScope().flags&vI)>0},LI.inGenerator.get=function(){return(this.currentVarScope().flags&bI)>0},LI.inAsync.get=function(){return(this.currentVarScope().flags&yI)>0},LI.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(TI|EI))return!1;if(t&vI)return(t&yI)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},LI.allowReturn.get=function(){return!!(this.inFunction||this.options.allowReturnOutsideFunction&&this.currentVarScope().flags&_I)},LI.allowSuper.get=function(){return(this.currentThisScope().flags&CI)>0||this.options.allowSuperOutsideMethod},LI.allowDirectSuper.get=function(){return(this.currentThisScope().flags&wI)>0},LI.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},LI.allowNewDotTarget.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e].flags;if(t&(TI|EI)||t&vI&&!(t&xI))return!0}return!1},LI.allowUsing.get=function(){var e=this.currentScope().flags;return!(e&DI||!this.inModule&&e&_I)},LI.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&TI)>0},II.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},II.parse=function(e,t){return new this(t,e).parse()},II.parseExpressionAt=function(e,t,n){var r=new this(n,e,t);return r.nextToken(),r.parseExpression()},II.tokenizer=function(e,t){return new this(t,e)},Object.defineProperties(II.prototype,LI);var RI=II.prototype,zI=/^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;RI.strictDirective=function(e){if(this.options.ecmaVersion<5)return!1;for(;;){eI.lastIndex=e,e+=eI.exec(this.input)[0].length;var t=zI.exec(this.input.slice(e));if(!t)return!1;if((t[1]||t[2])===`use strict`){eI.lastIndex=e+t[0].length;var n=eI.exec(this.input),r=n.index+n[0].length,i=this.input.charAt(r);return i===`;`||i===`}`||YF.test(n[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(i)||i===`!`&&this.input.charAt(r+1)===`=`)}e+=t[0].length,eI.lastIndex=e,e+=eI.exec(this.input)[0].length,this.input[e]===`;`&&e++}},RI.eat=function(e){return this.type===e&&(this.next(),!0)},RI.isContextual=function(e){return this.type===X.name&&this.value===e&&!this.containsEsc},RI.eatContextual=function(e){return this.isContextual(e)?(this.next(),!0):!1},RI.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}},RI.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},RI.canInsertSemicolon=function(){return this.type===X.eof||this.type===X.braceR||YF.test(this.input.slice(this.lastTokEnd,this.start))},RI.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},RI.semicolon=function(){!this.eat(X.semi)&&!this.insertSemicolon()&&this.unexpected()},RI.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},RI.expect=function(e){this.eat(e)||this.unexpected()},RI.unexpected=function(e){this.raise(e??this.start,`Unexpected token`)};var BI=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};RI.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`)}},RI.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`)},RI.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`)},RI.isSimpleAssignTarget=function(e){return e.type===`ParenthesizedExpression`?this.isSimpleAssignTarget(e.expression):e.type===`Identifier`||e.type===`MemberExpression`};var Z=II.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 VI={kind:`loop`},HI={kind:`switch`};Z.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual(`let`))return!1;eI.lastIndex=this.pos;var t=eI.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(VF(r)){var i=n;do n+=r<=65535?1:2;while(HF(r=this.fullCharCodeAt(n)));if(r===92)return!0;var a=this.input.slice(i,n);if(!LF.test(a))return!0}return!1},Z.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual(`async`))return!1;eI.lastIndex=this.pos;var e=eI.exec(this.input),t=this.pos+e[0].length,n;return!YF.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)===`function`&&(t+8===this.input.length||!(HF(n=this.fullCharCodeAt(t+8))||n===92))},Z.isUsingKeyword=function(e,t){if(this.options.ecmaVersion<17||!this.isContextual(e?`await`:`using`))return!1;eI.lastIndex=this.pos;var n=eI.exec(this.input),r=this.pos+n[0].length;if(YF.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||HF(a=this.fullCharCodeAt(i))||a===92)return!1;eI.lastIndex=i;var o=eI.exec(this.input);if(r=i+o[0].length,o&&YF.test(this.input.slice(i,r)))return!1}var s=this.fullCharCodeAt(r);if(!VF(s)&&s!==92)return!1;var c=r;do r+=s<=65535?1:2;while(HF(s=this.fullCharCodeAt(r)));if(s===92)return!0;var l=this.input.slice(c,r);if(LF.test(l))return!1;if(t&&!e&&l===`of`){eI.lastIndex=r;var u=eI.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){eI.lastIndex=this.pos;var o=eI.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(VI),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(VI),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 BI,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,WI|(n?0:GI),!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(HI),this.enterScope(DI);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(),YF.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 UI=[];Z.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t=e.type===`Identifier`;return this.enterScope(t?SI:0),this.checkLValPattern(e,t?PI:MI),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(VI),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`?jI:MI,!1)};var WI=1,GI=2,KI=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&GI&&this.unexpected(),e.generator=this.eat(X.star)),this.options.ecmaVersion>=8&&(e.async=!!r),t&WI&&(e.id=t&KI&&this.type!==X.name?null:this.parseIdent(),e.id&&!(t&GI)&&this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?jI:MI:NI));var a=this.yieldPos,o=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(kI(e.async,e.generator)),t&WI||(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&WI?`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`&&qI(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&&JI(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&&JI(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 JI(e,`constructor`)?this.raise(e.key.start,`Classes can't have a field named 'constructor'`):e.static&&JI(e,`prototype`)&&this.raise(e.key.start,`Classes can't have a static field named 'prototype'`),this.eat(X.eq)?(this.enterScope(EI|CI),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(TI|CI);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,MI,!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];iI(t,o.name)||(i?i.used.push(o):this.raiseRecoverable(o.start,`Private field '#`+o.name+`' must be declared in an enclosing class`))}};function qI(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 JI(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,WI|KI,!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),iI(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=UI,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,MI),this.finishNode(e,`ImportSpecifier`)},Z.parseImportDefaultSpecifier=function(){var e=this.startNode();return e.local=this.parseIdent(),this.checkLValSimple(e.local,MI),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,MI),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;iI(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 lI.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 YI=II.prototype;YI.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},YI.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},YI.parseSpread=function(e){var t=this.startNode();return this.next(),t.argument=this.parseMaybeAssign(!1,e),this.finishNode(t,`SpreadElement`)},YI.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`)},YI.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()},YI.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},YI.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},YI.parseBindingListItem=function(e){return e},YI.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`)},YI.checkLValSimple=function(e,t,n){t===void 0&&(t=AI);var r=t!==AI;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===MI&&e.name===`let`&&this.raiseRecoverable(e.start,`let is disallowed as a lexically bound name`),n&&(iI(n,e.name)&&this.raiseRecoverable(e.start,`Argument name clash`),n[e.name]=!0),t!==FI&&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`)}},YI.checkLValPattern=function(e,t,n){switch(t===void 0&&(t=AI),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)}},YI.checkLValInnerPattern=function(e,t,n){switch(t===void 0&&(t=AI),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 XI=function(e,t,n,r,i){this.token=e,this.isExpr=!!t,this.preserveSpace=!!n,this.override=r,this.generator=!!i},ZI={b_stat:new XI(`{`,!1),b_expr:new XI(`{`,!0),b_tmpl:new XI("${",!1),p_stat:new XI(`(`,!1),p_expr:new XI(`(`,!0),q_tmpl:new XI("`",!0,!0,function(e){return e.tryReadTemplateToken()}),f_stat:new XI(`function`,!1),f_expr:new XI(`function`,!0),f_expr_gen:new XI(`function`,!0,!1,null,!0),f_gen:new XI(`function`,!1,!1,null,!0)},QI=II.prototype;QI.initialContext=function(){return[ZI.b_stat]},QI.curContext=function(){return this.context[this.context.length-1]},QI.braceIsBlock=function(e){var t=this.curContext();return t===ZI.f_expr||t===ZI.f_stat?!0:e===X.colon&&(t===ZI.b_stat||t===ZI.b_expr)?!t.isExpr:e===X._return||e===X.name&&this.exprAllowed?YF.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===ZI.b_stat:e===X._var||e===X._const||e===X.name?!1:!this.exprAllowed},QI.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},QI.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},QI.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===ZI.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)?ZI.b_stat:ZI.b_expr),this.exprAllowed=!0},X.dollarBraceL.updateContext=function(){this.context.push(ZI.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?ZI.p_stat:ZI.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()===ZI.p_stat)&&!(e===X._return&&YF.test(this.input.slice(this.lastTokEnd,this.start)))&&(e!==X.colon&&e!==X.braceL||this.curContext()!==ZI.b_stat)?this.context.push(ZI.f_expr):this.context.push(ZI.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()===ZI.q_tmpl?this.context.pop():this.context.push(ZI.q_tmpl),this.exprAllowed=!1},X.star.updateContext=function(e){if(e===X._function){var t=this.context.length-1;this.context[t]===ZI.f_expr?this.context[t]=ZI.f_expr_gen:this.context[t]=ZI.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 $I=II.prototype;$I.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}},$I.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})},$I.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 BI,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},$I.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},$I.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)},$I.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},$I.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`)},$I.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`&&eL(s.argument)?this.raiseRecoverable(s.start,`Deleting local variable in strict mode`):s.operator===`delete`&&tL(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 eL(e){return e.type===`Identifier`||e.type===`ParenthesizedExpression`&&eL(e.expression)}function tL(e){return e.type===`MemberExpression`&&e.property.type===`PrivateIdentifier`||e.type===`ChainExpression`&&tL(e.expression)||e.type===`ParenthesizedExpression`&&tL(e.expression)}$I.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},$I.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}},$I.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(X.arrow)},$I.parseSubscriptAsyncArrow=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!0,r)},$I.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 BI,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},$I.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(ZI.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(ZI.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()}},$I.parseExprAtomDefault=function(){this.unexpected()},$I.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()},$I.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`)},$I.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`)},$I.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`)},$I.parseParenExpression=function(){this.expect(X.parenL);var e=this.parseExpression();return this.expect(X.parenR),e},$I.shouldParseArrow=function(e){return!this.canInsertSemicolon()},$I.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 BI,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},$I.parseParenItem=function(e){return e},$I.parseParenArrowList=function(e,t,n,r){return this.parseArrowExpression(this.startNodeAt(e,t),n,!1,r)};var nL=[];$I.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):nL,this.finishNode(e,`NewExpression`)},$I.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
- `),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`)},$I.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`)},$I.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)&&!YF.test(this.input.slice(this.lastTokEnd,this.start))},$I.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`)},$I.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`)},$I.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`)},$I.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()},$I.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`)},$I.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},$I.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(kI(t,r.generator)|CI|(n?wI: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`)},$I.parseArrowExpression=function(e,t,n,r){var i=this.yieldPos,a=this.awaitPos,o=this.awaitIdentPos;return this.enterScope(kI(n,!1)|xI),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`)},$I.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,FI),e.body=this.parseBlock(!1,void 0,o&&!a),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=c}this.exitScope()},$I.isSimpleParamList=function(e){for(var t=0,n=e;t<n.length;t+=1)if(n[t].type!==`Identifier`)return!1;return!0},$I.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,jI,t?null:n)}},$I.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},$I.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&OI)&&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`))},$I.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},$I.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},$I.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},$I.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`)},$I.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 rL=II.prototype;rL.raise=function(e,t){var n=fI(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},rL.raiseRecoverable=rL.raise,rL.curPosition=function(){if(this.options.locations)return new uI(this.curLine,this.pos-this.lineStart)};var iL=II.prototype,aL=function(e){this.flags=e,this.var=[],this.lexical=[],this.functions=[]};iL.enterScope=function(e){this.scopeStack.push(new aL(e))},iL.exitScope=function(){this.scopeStack.pop()},iL.treatFunctionsAsVarInScope=function(e){return e.flags&vI||!this.inModule&&e.flags&_I},iL.declareName=function(e,t,n){var r=!1;if(t===MI){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&_I&&delete this.undefinedExports[e]}else if(t===PI)this.currentScope().lexical.push(e);else if(t===NI){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&SI&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){r=!0;break}if(s.var.push(e),this.inModule&&s.flags&_I&&delete this.undefinedExports[e],s.flags&OI)break}r&&this.raiseRecoverable(n,`Identifier '`+e+`' has already been declared`)},iL.checkLocalExport=function(e){this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1&&(this.undefinedExports[e.name]=e)},iL.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},iL.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(OI|EI|TI))return t}},iL.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&(OI|EI|TI)&&!(t.flags&xI))return t}};var oL=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])},sL=II.prototype;sL.startNode=function(){return new oL(this,this.start,this.startLoc)},sL.startNodeAt=function(e,t){return new oL(this,e,t)};function cL(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}sL.finishNode=function(e,t){return cL.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},sL.finishNodeAt=function(e,t,n,r){return cL.call(this,e,t,n,r)},sL.copyNode=function(e){var t=new oL(this,e.start,this.startLoc);for(var n in e)t[n]=e[n];return t};var lL=`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`,uL=`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=uL+` Extended_Pictographic`,fL=dL,pL=fL+` EBase EComp EMod EPres ExtPict`,mL=pL,hL={9:uL,10:dL,11:fL,12:pL,13:mL,14:mL},gL={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`},_L=`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`,vL=`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`,yL=vL+` Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd`,bL=yL+` Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho`,xL=bL+` Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi`,SL=xL+` Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith`,CL={9:vL,10:yL,11:bL,12:xL,13:SL,14:SL+` `+lL},wL={};function TL(e){var t=wL[e]={binary:sI(hL[e]+` `+_L),binaryOfStrings:sI(gL[e]),nonBinary:{General_Category:sI(_L),Script:sI(CL[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 EL=0,DL=[9,10,11,12,13,14];EL<DL.length;EL+=1){var OL=DL[EL];TL(OL)}var Q=II.prototype,kL=function(e,t){this.parent=e,this.base=t||this};kL.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},kL.prototype.sibling=function(){return new kL(this.parent,this.base)};var AL=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=wL[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};AL.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)},AL.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,`Invalid regular expression: /`+this.source+`/: `+e)},AL.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},AL.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},AL.prototype.current=function(e){return e===void 0&&(e=!1),this.at(this.pos,e)},AL.prototype.lookahead=function(e){return e===void 0&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},AL.prototype.advance=function(e){e===void 0&&(e=!1),this.pos=this.nextIndex(this.pos,e)},AL.prototype.eat=function(e,t){return t===void 0&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},AL.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 jL(e){for(var t in e)return!0;return!1}Q.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&jL(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 kL(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&&ML(n);)t+=cI(n),e.advance();return t};function ML(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 NL(t)?(e.lastIntValue=t,e.advance(),!0):!1};function NL(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&&!NL(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+=cI(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=cI(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),PL(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function PL(e){return VF(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),FL(r)?(e.lastIntValue=r,!0):(e.pos=t,!1)};function FL(e){return HF(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&&!qL(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 IL(t)?(e.lastIntValue=t%32,e.advance(),!0):!1};function IL(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)&&LL(e.lastIntValue))return!0;r&&e.raise(`Invalid unicode escape`),e.pos=n}return!1};function LL(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 RL=0,zL=1,BL=2;Q.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(VL(t))return e.lastIntValue=-1,e.advance(),zL;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===BL&&e.raise(`Invalid property name`),r;e.raise(`Invalid property name`)}return RL};function VL(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),zL}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var i=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,i)}return RL},Q.regexp_validateUnicodePropertyNameAndValue=function(e,t,n){iI(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 zL;if(e.switchV&&e.unicodeProperties.binaryOfStrings.test(t))return BL;e.raise(`Invalid property name`)},Q.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue=``;HL(t=e.current());)e.lastStringValue+=cI(t),e.advance();return e.lastStringValue!==``};function HL(e){return IL(e)||e===95}Q.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue=``;UL(t=e.current());)e.lastStringValue+=cI(t),e.advance();return e.lastStringValue!==``};function UL(e){return HL(e)||qL(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===BL&&e.raise(`Negated character class may contain strings`),!0}return!1},Q.regexp_classContents=function(e){return e.current()===93?zL:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),zL)},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||XL(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=zL,n;if(!this.regexp_eatClassSetRange(e)){if(n=this.regexp_eatClassSetOperand(e)){n===BL&&(t=BL);for(var r=e.pos;e.eatChars([38,38]);){if(e.current()!==38&&(n=this.regexp_eatClassSetOperand(e))){n!==BL&&(t=zL);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===BL&&(t=BL)}},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)?zL: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===BL&&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)===BL&&(t=BL);return t},Q.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return t===1?zL:BL},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()&&WL(n)||GL(n)?!1:(e.advance(),e.lastIntValue=n,!0)};function WL(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 GL(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 KL(t)?(e.lastIntValue=t,e.advance(),!0):!1};function KL(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 qL(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;qL(n=e.current());)e.lastIntValue=10*e.lastIntValue+(n-48),e.advance();return e.pos!==t};function qL(e){return e>=48&&e<=57}Q.regexp_eatHexDigits=function(e){var t=e.pos,n=0;for(e.lastIntValue=0;JL(n=e.current());)e.lastIntValue=16*e.lastIntValue+YL(n),e.advance();return e.pos!==t};function JL(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function YL(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 XL(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)};function XL(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(!JL(i))return e.pos=n,!1;e.lastIntValue=16*e.lastIntValue+YL(i),e.advance()}return!0};var ZL=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])},QL=II.prototype;QL.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 ZL(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},QL.getToken=function(){return this.next(),new ZL(this)},typeof Symbol<`u`&&(QL[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===X.eof,value:t}}}}),QL.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())},QL.readToken=function(e){return VF(e,this.options.ecmaVersion>=6)||e===92?this.readWord():this.getTokenFromCode(e)},QL.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},QL.fullCharCodeAtPos=function(){return this.fullCharCodeAt(this.pos)},QL.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=QF(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())},QL.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&&!ZF(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())},QL.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&&$F.test(String.fromCharCode(e)))++this.pos;else break loop}}},QL.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)},QL.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))},QL.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)},QL.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)},QL.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)},QL.readToken_caret=function(){return this.input.charCodeAt(this.pos+1)===61?this.finishOp(X.assign,2):this.finishOp(X.bitwiseXOR,1)},QL.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||YF.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)},QL.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))},QL.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)},QL.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)},QL.readToken_numberSign=function(){var e=this.options.ecmaVersion,t=35;if(e>=13&&(++this.pos,t=this.fullCharCodeAtPos(),VF(t,!0)||t===92))return this.finishToken(X.privateId,this.readWord1());this.raise(this.pos,`Unexpected character '`+cI(t)+`'`)},QL.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 '`+cI(e)+`'`)},QL.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)},QL.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(YF.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 AL(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})},QL.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 $L(e,t){return t?parseInt(e,8):parseFloat(e.replace(/_/g,``))}function eR(e){return typeof BigInt==`function`?BigInt(e.replace(/_/g,``)):null}QL.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=eR(this.input.slice(t,this.pos)),++this.pos):VF(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`),this.finishToken(X.num,n)},QL.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=eR(this.input.slice(t,this.pos));return++this.pos,VF(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`)),VF(this.fullCharCodeAtPos())&&this.raise(this.pos,`Identifier directly after number`);var a=$L(this.input.slice(t,this.pos),n);return this.finishToken(X.num,a)},QL.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},QL.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)):(ZF(r)&&this.raise(this.start,`Unterminated string constant`),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(X.string,t)};var tR={};QL.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e===tR)this.readInvalidTemplateToken();else throw e}this.inTemplateElement=!1},QL.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw tR;this.raise(e,t)},QL.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(ZF(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}},QL.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
- `&&++this.pos;case`
26
- `:case`\u2028`:case`\u2029`:++this.curLine,this.lineStart=this.pos+1}this.raise(this.start,`Unterminated template`)},QL.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 cI(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 ZF(t)?(this.options.locations&&(this.lineStart=this.pos,++this.curLine),``):String.fromCharCode(t)}},QL.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return n===null&&this.invalidStringToken(t,`Bad character escape sequence`),n},QL.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(HF(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?VF:HF)(o,r)||this.invalidStringToken(a,`Invalid Unicode escape`),e+=cI(o),n=this.pos}else break;t=!1}return e+this.input.slice(n,this.pos)},QL.readWord=function(){var e=this.readWord1(),t=X.name;return this.keywords.test(e)&&(t=qF[e]),this.finishToken(t,e)},II.acorn={Parser:II,version:`8.18.0`,defaultOptions:pI,Position:uI,SourceLocation:dI,getLineInfo:fI,Node:oL,TokenType:UF,tokTypes:X,keywordTypes:qF,TokContext:XI,tokContexts:ZI,isIdentifierChar:HF,isIdentifierStart:VF,Token:ZL,isNewLine:ZF,lineBreak:YF,lineBreakG:XF,nonASCIIwhitespace:$F};function nR(e,t){return II.parse(e,t)}s(()=>re(`ok`,[ft({ok:or(!0),value:At()}),ft({ok:or(!1),error:ft({kind:or(`guest_threw`),name:j().max(80),message:j().max(512),transportMessage:j().max(512).optional()})})]));var rR=s(()=>j().regex(/^[A-Za-z][A-Za-z0-9_]*$/u)),iR=rR.refine(e=>{if(e===`env`)return!1;try{return nR(`let ${e};`,{ecmaVersion:`latest`,sourceType:`module`}),!0}catch(e){if(!(e instanceof SyntaxError))throw e;return!1}},`Invalid sandbox transport alias`);s(()=>Pe(iR,ki(rR).min(1))),s(()=>Pe(iR,ki(j().regex(/^[A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)*$/u))));var aR=H([`read`,`write`]),oR=Fh,sR=B({access:I(aR),confirm:I(oR)}),cR=H([`none`,`read`,`write`]),lR=P(sR),uR=P(cR);function dR(e){let t=lR({access:e.access,confirm:e.confirm});if(Cn(t))throw new QP(`Access labels must be access: "read" | "write" and confirm: boolean`);return{access:t.success.access??`write`,confirm:t.success.confirm??!1}}function fR(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 pR(e,t){return Object.freeze({refused:!0,module:t.module,operation:t.operation,reason:e,message:fR(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=uR(i[n]);return Mi(a)?a.success:`none`}async function hR(e,t,n,r,i){let a=await gR(e,t,n,r,i);return a!==void 0&&e.onRefused?.(a,t),a}async function gR(e,t,n,r,i){await e.beforeCall?.(i),i.throwIfAborted();let a=_R(e,t,n);if(a!==void 0)return a;if(!(!n.confirm&&(e.confirmWrites!==!0||n.access===`read`)))return e.confirm===void 0?pR(`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(),_R(e,t,n)):pR(`declined`,n)}function _R(e,t,n){let r=mR(e,t,n.module);if(r===`none`)return pR(`not-granted`,n);if(r===`read`&&n.access!==`read`)return pR(`read-only`,n)}function vR(e,t,n){let r={module:e.module,operation:e.descriptor.name,...dR(e)};return{...e,prepare:i=>In({try:e=>hR(t,n,r,i.arguments,e),catch:()=>({message:`Access check failed`})}).pipe(A(t=>t===void 0?e.prepare(i):k({execute:()=>Ix({type:`result`,result:{content:[{type:`text`,text:JSON.stringify(t)}],isError:!1}})})))}}var yR=bl();async function bR(e){let t=await xe(e);if(fs(t))return{value:t.value};let n=ts(t.cause);if(Cn(n))throw es(t.cause);return{issues:yR(n.success.issue).issues}}function xR(e){let t=Bg(e),n=vh(t)[`~standard`].jsonSchema,r=bh(t),i=Ch(t);return Object.freeze({description:{"~standard":{jsonSchema:{input:n.input,output:n.input}}},decode:e=>bR(r(e)),encode:e=>bR(i(e))})}function SR(e){let t=async t=>e[`~standard`].validate(t);return Object.freeze({description:e,decode:t,encode:t})}function CR(e){return Dh(e)?xR(e):SR(e)}var wR=Symbol(`mycelium.operation`),TR=Symbol(`mycelium.module`),ER=new WeakMap,DR=new WeakMap;function OR(e){let t=Object.freeze({[wR]:!0}),n=CR(e.input),r=e.output===void 0?void 0:CR(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 tF(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 uF({reason:`Capability output failed its declared schema`,rawCause:new nF(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 ER.set(t,a),t}function kR(e){let t=ki(rR).safeParse(e.namespace??[]);if(!t.success)throw new QP(`Invalid module namespace`);let n=Object.freeze({[TR]:!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 DR.set(n,i),n}function AR(e){return DR.has(e)}function jR(e){return ER.get(e)}function MR(e){return DR.get(e)}function NR(e,t,n){let r=MR(e);if(r===void 0)throw new QP(`Unknown module registration`);let i={};for(let[e,a]of Object.entries(r.operations)){let r=n===``?e:`${n}.${e}`;if(AR(a)){let n=MR(a);if(n===void 0)throw new QP(`Unknown child module registration`);i[e]=NR(a,t,[r,...n.namespace].join(`.`));continue}let o=jR(a);if(o===void 0)throw new QP(`Unknown operation registration: ${e}`);let s=Object.freeze({[wR]:!0});ER.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 PR(kR(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 PR(e,t){let n=MR(e);if(n===void 0)throw new QP(`Unknown module registration`);let r=Object.freeze({[TR]:!0});return DR.set(r,Object.freeze({...n,grantKey:t})),r}function FR(e,t){if(t.length===0||t.length>160)throw new QP(`Grant key must be non-empty and bounded`);return PR(e,t)}function IR(e,t){return NR(e,t,``)}function LR(e,t){return e<t?-1:+(e>t)}function RR(e){return e instanceof Error?e.message:`Capability declarations could not be compiled`}var zR=160;function BR(e){if(e.length===0||e.length>zR)throw new QP(`Module id must be non-empty and bounded`)}function VR(e){if(!e.split(`.`).every(e=>rR.safeParse(e).success))throw new QP(`Operation key must be a path segment or a dotted relative path`)}function HR(e){let t=e.replace(/[^A-Za-z0-9_]/g,`_`);return/^[A-Za-z]/.test(t)?t:`module_${t}`}function UR(e){let t=HR(e);return iR.safeParse(t).success?t:`module_${t}`}function WR(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`?HR(i.name):UR(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 GR=14695981039346656037n,KR=1099511628211n,qR=18446744073709551615n;function JR(e,t){let n=e,r=BigInt(t.length);for(let e=0;e<8;e+=1)n=(n^r&255n)*KR&qR,r>>=8n;for(let e=0;e<t.length;e+=1){let r=t.charCodeAt(e);n=(n^BigInt(r&255))*KR&qR,n=(n^BigInt(r>>>8&255))*KR&qR}return n}function YR(e,t,n){let r=JR(GR,e),i=[...t.entries()].sort(([e],[t])=>LR(e,t));for(let[e,t]of i)r=JR(r,e),r=JR(r,t);let a=[...n].sort((e,t)=>LR(e.id,t.id));for(let e of a)r=JR(r,e.id),r=JR(r,e.version);return`installed-${r.toString(16).padStart(16,`0`)}`}function XR(){return[qP,KP,JP]}function ZR(e,t,n,r,i,a=[]){return Object.entries(t.operations).flatMap(([t,o])=>{if(VR(t),AR(o)){let s=MR(o);if(s===void 0)throw new QP(`Unknown child module registration`);return ZR(e,s,n,[...r,t,...s.namespace],s.description??i,[...a,t,...s.namespace])}let s=jR(o);if(s===void 0)throw new QP(`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 QR(e,t=[]){let n=e.map(e=>{let t=MR(e);if(t===void 0)throw new QP(`Unknown module registration`);return BR(t.id),t}).sort((e,t)=>LR(e.id,t.id)),r=new Set;for(let e of n){if(r.has(e.id))throw new QP(`Duplicate module id: ${e.id}`);r.add(e.id)}let i=WR(n,`transport`),a=WR(n,`logical`),o=Object.freeze(Object.fromEntries(n.map(e=>{let t=i.get(e.id);if(t===void 0)throw new QP(`Missing module alias: ${e.id}`);let n=a.get(e.id);if(n===void 0)throw new QP(`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 QP(`Missing module alias: ${e.id}`);let n=o[t];if(n===void 0)throw new QP(`Missing namespace path: ${e.id}`);return ZR(e.grantKey,e,t,n,e.description)}).sort((e,t)=>LR(e.path,t.path)),c=new Set(s.map(e=>e.path));if(c.size!==s.length)throw new QP(`Duplicate operation path`);for(let e of XR()){if(c.has(e.path))throw new QP(`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 QP(`Operation conflicts with namespace: ${e}`)}let l;try{l=HP({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}),...XR()]})}catch(e){throw new QP(RR(e))}let u=YR(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 $R(){return null}var ez=dr(),tz=s(()=>_e([_i(),j(),Si(),tt()])),nz=s(()=>Pe(j(),At())),rz=s(()=>OF.extend({timeoutMs:tt().int().min(1).max(9e5).optional(),abortGraceMs:tt().int().min(1).max(3e4).optional()}).optional()),iz=64,az=262144,oz=new TextEncoder,sz=e=>{e(k(void 0))};function cz(e){let t=rz.safeParse(e);if(!t.success)throw new QP(`Execution policy is invalid`);let n=t.data?.timeoutMs??18e4;return Object.freeze({timeoutMs:n,abortGraceMs:t.data?.abortGraceMs??5e3,...kF({sandboxCapacity:t.data?.sandboxCapacity,admissionWaitMs:t.data?.admissionWaitMs??n},(t.data?.sandboxCapacity,void 0))})}function lz(e){return wn(function*(){let t=yield*Ob(e);return Object.freeze({createGroup:()=>{let e=0,n=new Set,r=at(t=>e===0?(t(k(void 0)),Yt(()=>void 0)):(n.add(t),Yt(()=>n.delete(t))));return Object.freeze({start:r=>Zr(i=>Yt(()=>{e+=1}).pipe(Te(Yn(i(t.withPermits(1)(r)).pipe($r(Yt(()=>{if(--e,e===0){let e=[...n];n.clear(),e.forEach(sz)}}))))))),awaitIdle:r})}})})}function uz(e,t=0){if(t>iz)throw Error(`JSON value exceeds the nesting bound`);let n=tz.safeParse(e);if(n.success)return n.data;if(Array.isArray(e))return e.map(e=>uz(e,t+1));let r=nz.safeParse(e);if(!r.success)throw r.error;return Object.fromEntries(Object.entries(r.data).filter(([,e])=>e!==void 0).map(([e,n])=>[e,uz(n,t+1)]))}function dz(e){return ez.parse(uz(e))}function fz(e){let t=JSON.stringify(dz(e)),n=oz.encode(t).byteLength;if(n>az)throw new dF({size:n});return Object.freeze({text:t})}function pz(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 yF(t)?t:t instanceof qN?new pF({namespace:e,operation:n,cause:{kind:`Forage`,message:t.message},rawCause:t}):t instanceof tF?new pF({namespace:e,operation:n,cause:{kind:`InvalidInput`,message:`Invalid operation input: ${ji({issues:t.issues})}; use forage.describe`},rawCause:t}):t}}])))])))}function mz(e){return at(t=>{let n=t.bind(void 0,rr);return e.aborted?n():e.addEventListener(`abort`,n,{once:!0}),Yt(e.removeEventListener.bind(e,`abort`,n))})}function hz(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 gz(e,t,n){return e===`deadline_exceeded`?new aF({limitMs:t,elapsedMs:n??0}):new sF({by:`caller`})}function _z(e){return Ms.pipe(S(t=>t-e))}function vz(e){return Ms.pipe(A(t=>$t(()=>{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 oF({capacity:e.policy.capacity,waitedMs:Math.max(0,t-a)});return s={kind:`refused`,failure:n},n},d=()=>{if(i.signal.aborted)throw gz(c,e.policy.timeoutMs)},f=hz(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=$t(()=>Ms.pipe(A(o=>s.kind===`refused`?vn(s.failure):(o>=p&&l(`deadline_exceeded`),i.signal.aborted?_z(t).pipe(A(t=>vn(gz(c,e.policy.timeoutMs,t)))):o>=a+e.policy.waitMs?vn(u(o)):(s={kind:`admitted`},e.sandbox.execute(Object.freeze({executionId:r,code:e.code,timeoutMs:e.policy.timeoutMs,bindings:pz(e.createBindings(h),d),modules:e.modules,namespacePaths:e.namespacePaths,sessionId:e.sessionId}),i.signal).pipe(n(e=>Qo(e)?Ir(e):vn(bF(es(e)))))))))),_=t=>bb(t).pipe(o({duration:e.policy.abortGraceMs,orElse:()=>vn(c===`deadline_exceeded`?new aF({limitMs:e.policy.timeoutMs,elapsedMs:e.policy.timeoutMs,acknowledged:!1}):new sF({by:`caller`,acknowledged:!1}))})),v,y=!1,b=i=>(y=!0,_z(t).pipe(A(t=>{let a=bF(i),o=a instanceof aF?new aF({limitMs:a.limitMs,elapsedMs:t,acknowledged:a.acknowledged}):a,s=hF(o,r),c=Pe(j(),dr()).parse(SF(o));c.ref=r;let l={kind:`sandbox_failure`,ref:r,executionId:r,adapter:e.sandbox.adapter??`effect`,buildSha:e.sandbox.buildSha??$R(),tag:s._tag,fields:c,healthAlert:s._tag===`Unknown`},u=$t(()=>e.sandbox.onFailure?.(l)??rr);return Ct(`sandbox_failure`,l).pipe(Xt({executionId:r,ref:r,adapter:l.adapter,tag:l.tag,buildSha:l.buildSha}),Te(s._tag===`Unknown`?uc(dc(lc(`sandbox_unknown`),{adapter:l.adapter}),1).pipe(Te(Ct(`sandbox_health_alert`).pipe(Xt({ref:r,adapter:l.adapter})))):rr),Te(u.pipe(n(e=>Ct(`sandbox_failure_record_failed`,e)))),Gt(s))})));return wn(function*(){if(i.signal.aborted){let n=yield*_z(t);return yield*vn(gz(c,e.policy.timeoutMs,n))}a=yield*Ms,v=yield*e.backingWork.start(g);let n=yield*Ms,r=Yr(Math.max(0,a+e.policy.waitMs-n)).pipe(Te(Ms),A(e=>s.kind===`admitted`?lr:s.kind===`refused`?k({kind:`busy`,failure:s.failure}):i.signal.aborted?k({kind:`cancelled`}):e>=p?(l(`deadline_exceeded`),k({kind:`deadline`})):k({kind:`busy`,failure:u(e)}))),o=yield*Hi(vb(v).pipe(S(e=>Object.freeze({kind:`settled`,exit:e}))),Hi(Yr(Math.max(0,p-n)).pipe(Te(Yt(()=>(l(`deadline_exceeded`),Object.freeze({kind:`deadline`}))))),Hi(mz(i.signal).pipe(Gt(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(Te(vn(d)));if(o.kind===`settled`&&c===void 0)return yield*hr(o.exit,{onFailure:Ir,onSuccess:e=>ci({try:()=>fz(e),catch:t=>yF(t)?t:new fF({kind:xF(e),rawCause:t})})});o.kind===`deadline`&&l(`deadline_exceeded`);let f=yield*_z(t);return yield*_(v).pipe(Te(vn(gz(c,e.policy.timeoutMs,f))))}).pipe(de(()=>(l(`cancelled`),(v===void 0?rr:bb(v).pipe(ut(e.policy.abortGraceMs),en)).pipe(Te($t(()=>y?rr:b(new sF({by:`operator`})).pipe(en))))))).pipe(zn(e=>b(e).pipe(A(vn))),$r(Yt(f)))})))}var yz=Wh(()=>Hh([Ph,Nh,Fh,z,R,Ag,eg(AbortSignal),V(yz),bz])),bz=Lh(R,yz),xz=new Map([[`openai`,`OpenAI`],[`openai-codex`,`OpenAI`],[`anthropic`,`Anthropic`],[`cloudflare-workers-ai`,`Cloudflare Workers AI`]]),Sz=Lh(R,Vg);Sh(B({samplingParams:F(Sz),samplingParamsByThinkingLevel:F(B({off:F(Sz),minimal:F(Sz),low:F(Sz),medium:F(Sz),high:F(Sz),xhigh:F(Sz),max:F(Sz)}))}));var Cz=`modulepreload`,wz=function(e){return`/`+e},Tz={},Ez=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=wz(t,n),t=s(t),t in Tz)return;Tz[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`:Cz,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)})},Dz=B({error:B({code:I(R),type:I(R)})});xh(B({type:L(`response.failed`),response:Dz})),xh(Tg(Dz)),xh(B({type:L(`error`),status:I(z.check(vg(),_g({minimum:100,maximum:599}))),code:I(R),error:I(Dz.fields.error)})),Sh(eg(Uint8Array)),xh(Eg.check(_g({minimum:0,maximum:60}))),xh(Eg.check(vg(),_g({minimum:0,maximum:864e10}))),xh(H([`five_hour`,`seven_day`,`seven_day_opus`,`seven_day_sonnet`])),xh(L(`rejected`)),xh(L(`0`)),xh(Lg),xh(B({type:L(`error`),error:B({type:L(`overloaded_error`)})}));var Oz=B({provider:R,cause:Hh([Hh([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`])})])}),kz={assign:0,create:0,clone:0,discard:0,update:0};function Az(e){return Mz(e,null)}function jz(e){return Mz(typeof e,`object`)&&!Az(e)}function Mz(e,t){return e===t}function Nz(e){return Mz(e,`__proto__`)||Mz(e,`constructor`)||Mz(e,`prototype`)}function Pz(e,t){return Nz(t)?Object.prototype.hasOwnProperty.call(e,t):t in e}function Fz(e){return Object.getOwnPropertyNames(e)}var Iz={immutableTypes:!1,maxErrors:8,maxInstantiationCount:128,useAcceleration:!0,exactOptionalPropertyTypes:!1,enumerableKind:!1,correctiveParse:!1,unionPrioritySort:!0};function Lz(){return Iz}function Rz(e){return Lz().immutableTypes?Object.freeze(e):e}function zz(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 Bz(e,t){return{...e,...t}}function Vz(e,t,n={}){kz.create+=1;let r=Bz(t,n);return Rz(Lz().enumerableKind?Bz(r,e):zz(r,e))}function Hz(e){return jz(e)}function Uz(e){return Hz(e)&&Pz(e,`~optional`)}function Wz(e){return Fz(e).filter(t=>!Uz(e[t]))}function Gz(e,t={}){let n=Wz(e);return Vz({"~kind":`Object`},{type:`object`,...n.length>0?{required:n}:{},properties:e},t)}var Kz;(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`})(Kz||={}),Array.from({length:256}).map((e,t)=>BigInt(t));var qz=new Float64Array(1);new DataView(qz.buffer),new Uint8Array(qz.buffer),new TextEncoder;var Jz=`-?(?:0|[1-9][0-9]*)`,Yz=`-?(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?`;function Xz(e){return Vz({"~kind":`String`},{type:`string`},e)}var Zz=`^${Jz}$`;`${Yz}`;function Qz(e,t){return Array.from({length:t-e+1},(t,n)=>String.fromCharCode(e+n))}var $z=[...Qz(97,122),...Qz(65,90)],eB=[`0`,...Qz(49,57)];[...eB],[...$z,...eB],[...eB],new RegExp(Zz);var tB=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 pF({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)}},nB=8192,rB=nB*4,iB=new TextEncoder,aB=()=>new TextDecoder(`utf-8`,{ignoreBOM:!0,fatal:!1}),oB=class e{wake;#e={stdout:{decoder:aB(),pending:new Uint8Array},stderr:{decoder:aB(),pending:new Uint8Array}};#t=aB();#n=Array.from({length:nB},()=>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 Vy({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+=rB){let r=t.subarray(e,e+rB),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,Wy(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)%nB,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 iB.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=iB.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:iB.encode(e).length,newlines:e.split(`
30
- `).length-1};for(this.#i===nB&&this.#p(),this.#n[(this.#r+this.#i)%nB]=r,this.#i++,this.#a+=r.textBytes,this.#o+=r.newlines;this.#a>nB||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-nB),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)%nB];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 Hx(this.wake).pipe(Gx(()=>Yr(`100 millis`).pipe(S(()=>this.#u?void 0:this.#g()))),Qx(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}},sB=B({code:R}),cB='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 lB(e,t,n,r){let i={module:e.grantKey,operation:e.name,access:e.operation.access,confirm:e.operation.confirm};return async a=>await hR(n,{sessionId:r},i,a,t.signal)??await e.operation.invoke(a,t)}function uB(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=>lB(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 tF(n.error.issues);return n.data}function fB(e){return Object.freeze({list:t=>Promise.resolve().then(()=>e.list(dB(LN,t))),describe:t=>Promise.resolve().then(()=>e.describe(dB(IN,t))),search:t=>Promise.resolve().then(()=>e.search(dB(FN,t)))})}function pB(e,t,n,r,i){return Object.freeze({...uB(e,n,r,i),forage:fB(t)})}function mB(e,t,n,r,i,a,o,s){let c=n.execution??cz(void 0),l=new tB,u=(u,d,f,p,m)=>vz({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=>pB(e,t,Object.freeze({...n,toolCallCode:d}),s,o),modules:i,namespacePaths:a,sessionId:o}),f=(e,t)=>$t(()=>{let n=hv();return u(n,e,t).pipe($r(Yt(()=>{l.dispose(n)})))}),p=(e,t,n)=>$t(()=>{let r=hv(),i=()=>l.drain(r);return u(r,e,void 0,t,n).pipe(d({onSuccess:e=>k(hB({text:e.text,isError:!1},i())),onFailure:e=>{let t=i();return e instanceof dF&&t.length>0?k(hB({text:gF(e),isError:!0},t)):vn(gB(e))}}),$r(Yt(()=>{l.dispose(r)})))}),m={replay:`unsafe`,descriptor:{name:`execute`,description:cB,parameters:Gz({code:Xz()},{additionalProperties:!1})},prepare:e=>bh(sB)(e.arguments).pipe(S(({code:t})=>({execute:()=>Wx(wn(function*(){let n=yield*oB.make();yield*ke(()=>Yt(()=>{n.dispose()}));let r=yield*xi(p(t,e.id,{write:(e,t)=>{n.write(e,t)}}),{startImmediately:!0});return Zx(n.updates,kx(vb(r)).pipe(Kx(e=>{let t=n.finish();return Jx(Bx(t===void 0?[]:[t]),kx(e))})),{haltStrategy:`right`}).pipe(tS(e=>e.type===`result`))}))})),kt(()=>({message:`Invalid execute arguments`})))};return Object.freeze({effectTool:m,execute:f})}function hB(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 gB(e){let t={_tag:`MuleError`,phase:`tool`,message:yF(e)?gF(e):e.message};return e instanceof oF?{...t,cause:e}:t}function _B(e,t){return e<t?-1:+(e>t)}var vB=128,yB=s(()=>j().min(1).max(160)),bB=s(()=>D({version:j().min(1).max(160),modules:ki(At())})),xB=1e3;function SB(e){if(e.length>vB)throw new QP(`Capability source count exceeds bound`);let t=[...e].sort((e,t)=>_B(e.id,t.id)),n=new Set;for(let e of t){if(!yB.safeParse(e.id).success)throw new QP(`Capability source id must be non-empty and bounded`);if(n.has(e.id))throw new QP(`Duplicate capability source id: ${e.id}`);n.add(e.id)}return t}function CB(e){if(e>xB)throw new QP(`Candidate module count exceeds bound`)}function wB(e,t){let n=bB.safeParse(e);if(!n.success)throw new QP(`Capability source snapshot must have a non-empty bounded version`);CB(t+n.data.modules.length)}function TB(e,t,n,r,i){return Zr(a=>wn(function*(){let o=t=>In({try:()=>t.release(),catch:()=>new eF(e.id,`release`)}).pipe(zn(e=>Yt(()=>{n.push(e)}))),s=yield*ci({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 eF(e.id,`acquire`)))}},catch:()=>new eF(e.id,`acquire`)});yield*Os(t,Le(()=>s.outcome).pipe(A(e=>fs(e)?o(e.value):rr)));let c=yield*a(Le(()=>s.outcome)).pipe(de(()=>Yt(()=>{s.controller.abort()})));return ps(c)?yield*Ir(c.cause):c.value}))}function EB(e){return wn(function*(){let t=yield*ci({try:()=>SB(e.sources),catch:e=>e instanceof QP?e:new QP(`Capability sources are invalid`)});yield*ci({try:()=>{CB(e.modules.length)},catch:e=>e instanceof QP?e:new QP(`Static capability modules are invalid`)});let n=yield*Ts(),r=[],i=!1,a=[...e.modules],o=[];return yield*wn(function*(){for(let s of t){let t=yield*TB(s,n,r,()=>{i=!0},e.session);yield*ci({try:()=>{wB(t.snapshot,a.length)},catch:e=>e instanceof QP?e:new QP(`Capability source snapshot is invalid`)}),a.push(...t.snapshot.modules),o.push({id:s.id,version:t.snapshot.version})}let s=e.precompiled??(yield*ci({try:()=>QR(a,o),catch:e=>e instanceof QP?e:new QP(`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:()=>wn(function*(){u||(u=!0,yield*c.awaitIdle,yield*As(n,ds));let e=r[0];e!==void 0&&(yield*vn(e))})})}).pipe(Ye(e=>fs(e)?rr:As(n,e)))})}var DB=2;function OB(e){return wn(function*(){for(let t=0;t<DB;t+=1){let t=yield*EB(e);if(!t.isStale())return t;yield*t.close()}return yield*vn(new eF(void 0,`stale`))})}function kB(e,t,n){return Zr(r=>r(e.take(1)).pipe(A(()=>Yt(t).pipe($r(e.release(1)))),A(n)))}function AB(e,t){return kr(e.candidate.close().pipe(d({onFailure:t=>xs(e.settled,t).pipe(Te(vn(t))),onSuccess:()=>Ss(e.settled,void 0).pipe(Te(Yt(()=>{t.delete(e)})))})))}function jB(e,t){return e.runCleanup?AB(e.installed,t):ys(e.installed.settled)}function MB(e,t){return Wr(e.map(e=>jB(e,t).pipe(ar)),{concurrency:`unbounded`}).pipe(A(e=>{let t=e.find(ps);return t===void 0?rr:Ir(t.cause)}))}function NB(e){return wn(function*(){let t=yield*Ob(1),n=yield*ci({try:()=>cz(e.execution),catch:e=>e instanceof QP?e:new QP(`Execution policy is invalid`)}),r=yield*lz(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*ci({try:()=>QR(e.modules),catch:e=>e instanceof QP?e:new QP(`Capability compilation failed`)}),o=yield*ci({try:()=>Object.freeze(e.tools.map(t=>vR(t,e.access,{sessionId:e.session?.sessionId??null}))),catch:e=>e instanceof QP?e:new QP(`Direct tool labels are invalid`)}),s,c=new Set,l=!1;if(e.sources.length===0&&a!==void 0){let t={candidate:yield*OB({...e,sandbox:i,backingWork:r,precompiled:a}),settled:yield*vs(),leases:0,retired:!1,closing:!1};s=t,c.add(t)}let u=()=>kB(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=>MB(e,c));return yield*ke(()=>u().pipe(we)),Object.freeze({acquire:()=>t.withPermits(1)(wn(function*(){if(l)return yield*vn(new $P);if(s===void 0||s.candidate.isStale()){let t=yield*OB({...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*AB(n,c)))}let n=s;n.leases+=1;let a,u=()=>kB(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?rr:jB(e,c));return yield*ke(()=>u().pipe(we)),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 PB(e){return Object.freeze({adapter:e.adapter??`promise`,buildSha:e.buildSha,execute:(t,n)=>kr(In({try:()=>e.execute(t,n),catch:bF}))})}async function FB(e,t){let n=await xe(e,t);if(fs(n))return n.value;let r=ns(n.cause);if(mr(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 IB(e){let t=await FB(Ts()),n=e.onSandboxFailure;try{let r=await FB(NB({modules:e.modules??[],sources:e.sources??[],session:e.session,execution:e.execution,sandbox:PB(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 FB(Ts());try{let n=await FB(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??=FB(n.release().pipe($r(As(t,ds)))),i)})}catch(e){throw await FB(As(t,ds)),e}},a;return Object.freeze({acquire:i,close:()=>(a??=FB(r.close().pipe($r(As(t,ds)))),a)})}catch(e){throw await FB(As(t,ds)),e}}var LB=Wh(()=>Hh([Nh,Fh,sg,R,Bh(V(LB)),Oh(Lh(R,LB))])),RB=R.check(yg(1),K(256)),zB=R.check(yg(1),K(128)),BB=B({kind:L(`sandbox_failure`),ref:RB,executionId:RB,adapter:zB,buildSha:U(zB),tag:H([`SourceInvalid`,`GuestThrew`,`DeadlineExceeded`,`SandboxBusy`,`Cancelled`,`DispatchLost`,`SandboxCrashed`,`BadResponse`,`ResultTooLarge`,`ResultNotJson`,`CapabilityFailed`,`Unknown`]),fields:Lh(R,LB),healthAlert:Fh});function VB(e){return OR(e)}function HB(e){return kR(e)}Object.freeze({module:HB,operation:VB,make:IB,gate:IR,grantAs:FR});var UB=Vg,WB=4096,GB=new TextEncoder,KB=UB.check(ng(e=>GB.encode(JSON.stringify(e)).byteLength<=WB));P(KB),new TextEncoder;var qB=200,JB={onExcessProperty:`error`},YB=new TextEncoder,XB=G.pipe(W(hg(0))),ZB=R.pipe(W(yg(1)),W(ng(e=>YB.encode(e).byteLength<=256)));P(B({limit:F(G.pipe(W(_g({minimum:1,maximum:qB})))),after:F(R)}),JB);var QB=Tg(zh([XB,ZB]));P(QB),Th(QB),P(B({session_id:ZB,last_activity_at:XB,state:H([`needs_you`,`running`,`errored`,`done`]),bytes:G.pipe(W(hg(0)))}),JB),Sh(B({extension_id:R,value_json:R})),Sh(Tg(CM)),Sh(wM),Th(Tg(CM));var $B=R.check(yg(1),K(256)),eV=262144,tV=R.check(ng(e=>new TextEncoder().encode(e).byteLength<=eV,{message:`Mail content must be at most ${String(eV)} UTF-8 bytes`})),nV=B({kind:L(`agent`),agentId:$B,sessionId:$B}),rV=B({kind:L(`agent`),agentId:$B,sessionId:F($B)}),iV=B({kind:L(`system`),systemId:L(`hub`)}),aV=B({itemId:$B,kind:R.check(yg(1),K(64)),summary:R.check(yg(1),K(200))}),oV=B({commandId:$B,outcome:H([`completed`,`failed`,`interrupted`,`cancelled`,`outcome_unknown`]),diagnostic:F(R.check(yg(1),K(200))),waitingOnYou:F(V(aV).check(yg(1),K(8)))}),sV=H([`recipient_offline`,`recipient_left`]),cV=B({outcome:L(`undeliverable`),reason:sV}),lV=B({outcome:L(`accepted`),commandId:$B});Hh([oV,cV,lV]);var uV=Hh([oV,lV,B({outcome:L(`undeliverable`),reason:L(`recipient_left`)})]),dV=`[redacted]`,fV=/\b(bearer|basic)\s+[^\s"',;]+/giu,pV=/\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 hV(e){return e.replace(fV,`$1 ${dV}`).replace(pV,`$1${dV}`).replace(mV,e=>/\d/u.test(e)&&/[A-Za-z]/u.test(e)?dV:e)}function gV(e){let t=hV(e.replace(/[\p{Cc}\p{Zl}\p{Zp}\s]+/gu,` `).trim()).slice(0,200).trimEnd();return t.length===0?void 0:t}var _V={key:$B,to:rV,replyTo:V(nV),content:tV,createdAt:z.check(hg(0)),meta:F(Vg)},vV=Hh([B({..._V,from:nV,reply:F(uV)}),B({..._V,from:iV,reply:B({outcome:L(`undeliverable`),reason:L(`recipient_offline`)})})]),yV=B({jobId:$B,sessionId:$B,commandFactId:$B,recovery:I(B({maxRecoveries:G.check(hg(0)),windowMs:F(G.check(mg(0)))}))});B({work:B({sessionId:$B,commandFactId:$B}),mail:I(vV)}),B({work:yV,delivery:H([`steer`,`followUp`]),mail:I(vV)}),Sh(B({mail_key:R,agent_id:R,reply_to_json:Tg(V(nV))})),Th(Tg(V(nV))),Sh(B({agent_id:R,sender_session_id:R,name:R})),Sh(xM),Sh(B({work_id:R}));var bV=new TextEncoder;new TextDecoder;var xV=B({v:L(1),generation:R.pipe(W(yg(1)),W(K(128)),W(ng(e=>bV.encode(e).byteLength<=128))),sequence:G.pipe(W(mg(0)),W(gg(2**53-1)))}),SV={onExcessProperty:`error`};P(xV,SV),P(Tg(xV),SV);var CV=R.check(yg(1),K(256)),wV=Hh([B({agentId:CV,sessionId:CV,...oV.fields}),B({agentId:CV,sessionId:F(CV),...cV.fields})]),TV={onExcessProperty:`error`},EV=new TextEncoder,DV=e=>R.pipe(W(yg(1)),W(ng(t=>EV.encode(t).byteLength<=e))),OV=DV(256),kV=DV(4096),AV=R.pipe(W(ag(/^[0-9a-f]{64}$/u))),jV=Wh(()=>Hh([R,z,Fh,Nh,V(jV),Lh(R,jV)])),MV=B({type:L(`text`),text:R,textSignature:F(R)}),NV=B({type:L(`thinking`),thinking:R,thinkingSignature:F(R),redacted:F(Fh)}),PV=B({type:L(`image`),data:R,mimeType:R}),FV=B({type:L(`toolCall`),id:R,name:R,arguments:Lh(R,jV),thoughtSignature:F(R),namespace:F(R),argumentsError:F(R)}),IV=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(Fh)})}),LV=B({role:L(`user`),content:Hh([R,Bh(V(Hh([MV,PV])))]),timestamp:z}),RV=B({role:L(`user`),content:R,timestamp:z}),zV=B({name:R,description:R,parameters:Lh(R,jV),constrainedSampling:F(Hh([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)})})]))}),BV=Hh([B({role:L(`system`),content:Hh([R,Bh(V(MV))]),sections:F(Lh(R,Hh([R,Nh]))),toolsAdded:F(Bh(V(zV))),toolsRemoved:F(Bh(V(B({name:R})))),timestamp:z}),LV,B({role:L(`assistant`),content:Bh(V(Hh([MV,NV,FV]))),api:R,provider:R,model:R,responseModel:F(R),responseId:F(R),diagnostics:F(Bh(V(B({type:R,timestamp:z,error:F(B({name:F(R),message:R,stack:F(R),code:F(Hh([R,z]))})),details:F(Lh(R,jV))})))),usage:IV,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(jV)})),errorMessage:F(R),providerError:F(R),modelFailure:F(Oz),rawStopReason:F(R),providerThinkingLevel:F(R),endTurn:F(Fh),timestamp:z,durationMs:F(z)}),B({role:L(`toolResult`),toolCallId:R,toolName:R,content:Bh(V(Hh([MV,PV]))),usage:F(IV),isError:Fh,timestamp:z,durationMs:F(z)})]),VV=H([`run`,`turn`,`message`,`tool_call`,`tool_result`,`terminal`]),HV=Wh(()=>B({kind:VV,value:OV,parent:I(HV)})),UV=Hh([B({type:L(`auto_retry_start`),run:HV,attempt:z,maxAttempts:z,delayMs:z,dueAt:G.check(hg(0)),errorMessage:R}),B({type:L(`auto_retry_attempt`),run:HV,attempt:z}),B({type:L(`auto_retry_end`),run:HV,attempt:z,success:Fh,finalError:F(R)})]),WV=B({core:AV,extensions:V(zh([OV,R.pipe(W(ag(/^sha256:[0-9a-f]{64}$/u)))])).pipe(W(K(128)))}),GV=B({content:Bh(V(Hh([MV,PV]))),usage:I(IV),isError:Fh,terminate:I(Fh)}),KV={workId:OV},qV=98304,JV=H([`manual`,`threshold`,`overflow`]),YV=Hh([B({...KV,kind:L(`sandbox_failure`),event:BB}),B({kind:L(`document`),workId:Nh,extensionId:OV,name:OV,valueJson:R}),B({kind:L(`model_preference`),workId:Nh,preference:U(NM)}),B({...KV,kind:L(`command`),meta:F(KB),reply:F(wV),delivery:F(H([`steer`,`followUp`])),requestId:OV,targetWorkId:F(OV),receiptId:OV,message:LV,contract:WV}),B({...KV,kind:L(`command`),work:L(`compact`),instructions:F($M),meta:F(KB),requestId:OV,receiptId:OV,timestamp:G.check(hg(0)),contract:WV}),B({kind:L(`operator`),workId:Nh,requestId:OV,author:H([`operator`,`party`]),meta:F(KB),message:RV}),B({...KV,kind:L(`cancellation`),requestId:OV,receiptId:OV,targetWorkId:OV,meta:F(KB)}),B({...KV,kind:L(`model_selection`),provider:OV,model:OV,catalogRevision:OV,definitionRevision:OV,selectionPolicyRevision:OV}),B({...KV,kind:L(`run_started`),run:HV,contract:WV}),B({...KV,kind:L(`turn_started`),run:HV,turn:HV}),B({...KV,kind:L(`model_prompt`),run:HV,turn:HV,attempt:z.pipe(W(vg()),W(mg(0))),contract:WV,systemPrompt:R.pipe(W(ng(e=>EV.encode(e).byteLength<=1048576)))}),B({...KV,kind:L(`message_start`),run:HV,turn:HV,message:HV,role:H([`assistant`,`system`,`toolResult`,`user`]),partial:F(B({text:R.pipe(W(ng(e=>EV.encode(e).byteLength<=qV))),offset:z.pipe(W(vg()),W(hg(0)))}))}),B({...KV,kind:L(`message`),data:F(jV),run:HV,turn:HV,message:HV,value:BV}),B({...KV,kind:L(`tool_intent`),replay:H([`safe`,`unsafe`]).pipe($h(k(`unsafe`))),contract:WV,run:HV,turn:HV,toolCall:HV,call:FV}),B({...KV,kind:L(`tool_outcome`),data:F(jV),run:HV,turn:HV,toolCall:HV,call:FV,result:GV}),B({...KV,kind:L(`live_retry`),event:UV}),B({...KV,kind:L(`compaction`),head:OV,model:zh([LV]),data:B({reason:F(JV),resumesRun:Fh,tokensBefore:z,tokensAfter:F(z),usage:IV,contextRevision:OV,receipt:F(kV),details:F(B({readFiles:V(R),modifiedFiles:V(R)}))})}),B({...KV,kind:L(`compaction_checkpoint`),trigger:JV,resumesRun:Fh,head:OV,contextRevision:OV,summary:R,tokensBefore:z,usage:IV,details:B({readFiles:V(R),modifiedFiles:V(R)})}),B({...KV,kind:L(`compaction_notice`),trigger:JV,result:L(`nothing_to_compact`),diagnostic:F(R.check(K(200)))}),B({...KV,kind:L(`compaction_notice`),trigger:JV,result:L(`failed`),usage:F(IV),diagnostic:F(R.check(K(200)))}),B({...KV,kind:L(`compaction_notice`),trigger:JV,result:L(`stale`),usage:F(IV)}),B({...KV,kind:L(`compaction_notice`),trigger:JV,result:L(`insufficient`),usage:F(IV)}),B({...KV,kind:L(`run_terminal`),run:HV,terminal:HV,diagnostic:F(R.check(K(200))),outcome:H([`completed`,`cancelled`,`failed`])}),B({...KV,kind:L(`work_terminal`),diagnostic:F(R),outcome:H([`completed`,`interrupted`,`cancelled`,`failed`])})]);Rg(YV);var XV=Tg(YV),ZV=Tg(Mh);P(XV,TV),Th(ZV),Sh(XV,TV);var QV=Tg(jV);Th(QV),Sh(QV),Mv({family:`session`,version:1,kinds:{session:{prefix:`session`},work:{prefix:`session_work`},fact:{prefix:`session_fact`},receipt:{prefix:`session_receipt`}}});var $V=R.pipe(W(yg(1))),eH=G.pipe(W(hg(0)));B({value_json:R}),B({state_version:G.pipe(W(hg(1))),revision:$V}),B({status:H([`running`,`stopped`]),reason:U(R),stopped_at:U(eH),revision:$V}),B({extension_id:$V,key:$V,job_id:$V}),B({collection:$V,key:$V,value_json:R}),B({sequence:eH}),B({extension_id:R,name:R,initial_json:R,fork:H([`inherit-at-fork-point`,`current`,`fresh`]),max_bytes:G.pipe(W(mg(0)))}),yh(R);var tH=Lh(R.check(yg(1),K(160)),H([`none`,`read`,`write`])).check(ng(e=>Object.keys(e).length<=256));P(B({version:G.check(hg(0),gg(2**53-1)),grants:tH}),{onExcessProperty:`error`}),P(Tg(tH)),Th(Tg(tH)),P(B({version:G,grants_json:R}));var nH={onExcessProperty:`error`},rH=new TextEncoder,iH=R.pipe(W(yg(1)),W(ng(e=>rH.encode(e).byteLength<=256))),aH=G.pipe(W(hg(0))),oH=H([0,1,2]),sH=H([`needs_you`,`running`,`errored`,`done`]),cH=H([`completed`,`failed`,`cancelled`,`outcome_unknown`,`interrupted`]),lH=B({session_id:iH,title:U(R),created_at:aH,last_activity_at:aH,settled_at:U(aH),state:sH,tier:oH});P(lH,nH),P(lH.mapFields(ih({revision:aH})),nH),P(B({revision:aH}),nH),P(B({outcome:U(cH)}),nH);var uH=Tg(zh([oH,aH,iH]));P(uH),Th(uH);var dH={onExcessProperty:`error`},fH=B({id:R,timestamp:z,data_json:R}),pH=Tg(B({kind:L(`compaction`),workId:R,resumesRun:F(Fh),trigger:F(H([`manual`,`threshold`,`overflow`])),tokensAfter:F(z),firstKeptEntryId:R,summary:R,tokensBefore:z,usage:IV,contextRevision:R,details:F(B({readFiles:V(R),modifiedFiles:V(R)}))}));P(fH,dH),P(pH,dH),P(B({data_json:R}),dH);var mH=R.pipe(W(yg(1))),hH=G.pipe(W(hg(0)));B({name:R}),B({sql:R}),B({extension_id:mH,key:mH,due_at:hH}),B({extension_id:mH}),B({seq:hH}),B({count:hH}),B({data_json:R}),B({version:G});var gH={onExcessProperty:`error`},_H=new TextEncoder,vH=R.pipe(W(yg(1)),W(ng(e=>_H.encode(e).byteLength<=256))),yH=G.pipe(W(mg(0))),bH=G.pipe(W(hg(0))),xH=B({id:vH,leaf_id:U(vH)}),SH=B({session_id:vH}),CH=B({id:vH,leaf_id:U(vH),created_at:bH,updated_at:bH,metadata_json:U(R)}),wH=Tg(B({title:nN}));P(wH,gH),Th(wH);var TH=B({id:vH}),EH=B({version:G,protocol:R}),DH=B({name:vH}),OH=B({id:vH,session_id:vH,parent_id:U(vH),sequence:yH,type:R,role:U(H([`user`,`assistant`,`tool_result`])),state:H([`complete`,`streaming`]),request_id:U(vH),work_id:U(vH),data_json:R,timestamp:bH,completed_at:U(bH),damaged:H([0,1])}),kH=B({id:vH,session_id:vH,sequence:yH,request_id:vH,work_id:vH,data_json:R,timestamp:bH,origin_kind:H([`user`,`extension`]),origin_id:U(vH),origin_correlation:U(vH)}),AH=B({kind:L(`extension`),extensionId:vH,correlation:U(vH)}),jH=Hh([B({kind:L(`user`)}),AH]);P(jH,gH),Rg(jH);var MH=B({next_sequence:yH}),NH=B({present:L(1)});P(SH,gH),P(CH,gH),P(TH,gH),P(EH,gH),P(DH,gH),P(B({candidate_id:U(vH),path_count:G.pipe(W(mg(0))),root_count:G.pipe(W(hg(0))),missing_parent_count:G.pipe(W(hg(0))),leaf_state:H([`complete`,`streaming`])}),gH),P(OH,gH),P(kH,gH),P(MH,gH),P(NH,gH);function PH(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
- EXISTS (SELECT 1 FROM session_lineage_damage AS damage
32
- WHERE damage.session_id = ${e}.session_id) AS damaged`}PH(`session_entries`),P(B({id:vH,sequence:yH}),gH),P(B({...xH.fields,damaged:H([0,1])}),gH),Sh(B({identity:U(R)})),Sh(B({total:G.check(hg(0))})),P(B({installed:G.pipe(W(hg(0)))}),gH),P(B({session_id:R}),gH),P(B({damaged:G.pipe(W(mg(0))),first:R}),gH),P(B({id:vH,parent_id:U(R),sequence:yH,state:H([`complete`,`streaming`])}),gH);var FH=G.pipe(W(hg(0)));P(B({length:FH,root_id:U(vH),root_parent_id:U(R),broken:FH,newest_id:U(vH),newest_sequence:U(yH)}),gH),P(B({sequence:yH}),gH),P(B({work_id:vH}),gH),P(B({work_id:vH,diagnostic:R}),gH),P(B({state:H([`complete`,`streaming`]),newest_sequence:yH,root_id:U(vH),root_parent_id:U(R)}),gH),P(B({sizes:Tg(V(zh([yH,FH]))),deepest_parent:U(R),deepest_sequence:U(yH)}),gH),P(B({oldest:U(yH),newest:U(yH)}),gH);var IH=H([0,1]);P(B({id:vH,parent_id:U(R),sequence:yH,target:IH,continues:IH}),gH);function LH(e){return`CASE WHEN ${e}.type = 'compaction' AND ${e}.state != 'streaming'
33
- THEN json_extract(${e}.data_json, '$.head') END`}`${LH(`session_entries`)}${LH(`parent`)}`,P(B({session_id:R,work_id:R,timestamp:z,diagnostic:U(R)}),gH),new TextEncoder,Object.freeze({kind:`reset`}),new TextEncoder,P(B({droppedBytes:G.check(hg(0)),totalBytes:G.check(hg(0))}),{onExcessProperty:`error`}),Object.freeze({admitNew:()=>{}});var RH=AH.mapFields(({extensionId:e,correlation:t})=>({extensionId:e,correlation:t})),zH=B({requestId:F(R),meta:F(KB),data:F(UB),origin:F(RH),id:R,sequence:G.check(mg(0)),commandId:U(R),value:BV}),BH=H([`manual`,`threshold`,`overflow`]),VH=B({queue:Hh([B({state:L(`idle`)}),B({state:L(`queued`),commandId:Cg,runningWork:U(B({phase:H([`thinking`,`streaming`,`running_tool`,`waiting_on_you`,`cancelling`])}))}),B({state:L(`running`),commandId:Cg})]),cancellationRequested:Fh,retry:U(B({attempt:G.check(mg(0)),maxAttempts:G.check(mg(0)),delayMs:G.check(hg(0)),errorMessage:R,scheduledAt:G.check(hg(0))})),activeTool:U(R),lastModelChoiceSequence:U(G.check(mg(0))),compaction:U(B({trigger:BH}))}),HH=R,UH=Lh(R,Hh([B({status:L(`running`),revision:HH,value:UB,catalog:F(UB)}),B({status:L(`stopped`),revision:HH,reason:R})])),WH=B({id:R,version:R,revision:HH,status:H([`running`,`stopped`]),reason:U(R),stoppedAt:U(z)}),GH=B({commandId:R,outcome:H([`completed`,`cancelled`,`failed`,`interrupted`]),sequence:G.check(mg(0)),diagnostic:U(R),meta:F(KB)}),KH=B({id:R,sequence:G.check(mg(0)),at:G.check(hg(0)),tokensBefore:z,tokensAfter:U(z),trigger:U(BH)}),qH=B({id:R,sequence:G.check(mg(0)),at:G.check(hg(0)),trigger:BH,result:H([`nothing_to_compact`,`failed`,`stale`,`insufficient`]),diagnostic:U(R)}),JH=R.check(ng(e=>new TextEncoder().encode(e).byteLength<=65536)),YH=B({messageId:R,revision:G.check(hg(0)),text:JH,thinking:JH,textOffset:G.check(hg(0)),thinkingOffset:G.check(hg(0)),textTruncated:Fh,thinkingTruncated:Fh}),XH=B({commandId:R,requestId:R,meta:F(KB),origin:F(RH),text:R,images:F(V(VM)),delivery:H([`steer`,`followUp`])}),ZH=V(B({toolCallId:R,revision:G.check(hg(0)),tail:R.check(ng(e=>new TextEncoder().encode(e).byteLength<=8192&&e.split(`
34
- `).length<=200)),droppedBytes:G.check(hg(0)),totalBytes:G.check(hg(0))})).check(K(4)),QH=B({total:G.check(hg(0)),prompts:V(XH),hasMore:Fh}),$H=B({tokens:G.check(hg(0)),window:U(G.check(mg(0)))}),eU=B({parent:F(xM),sessionId:R,cursor:U(R),hasMore:Fh,oldestCursor:F(U(R)),messages:V(zH),terminals:V(GH),sandboxFailures:F(V(BB)),compactions:F(V(KH)),compactionNotices:F(V(qH)),pending:QH,activity:VH,progress:U(YH),toolOutput:ZH,extensions:UH,attention:TM,context:F($H)}),tU=Hh([B({kind:L(`heartbeat`)}),B({kind:L(`activity`),activity:VH}),B({kind:L(`tool_output`),toolOutput:ZH,activity:VH}),B({kind:L(`update`),delivery:H([`replay`,`live`]),cursor:U(R),messages:V(zH),terminals:V(GH),sandboxFailures:F(V(BB)),compactions:F(V(KH)),compactionNotices:F(V(qH)),pending:QH,activity:VH,extensions:UH,attention:TM,context:F($H)}),B({kind:L(`progress`),progress:B({messageId:R,revision:G.check(hg(0)),text:B({offset:G.check(hg(0)),append:JH}),thinking:B({offset:G.check(hg(0)),append:JH})}),activity:VH}),B({kind:L(`reset`),reason:L(`history_unavailable`),cursor:U(R),baseline:eU})]),nU=B({status:L(`accepted`),commandId:R,sessionId:F(R)});Sh(Tg(Hh([nU,B({status:L(`held`),reason:L(`recipient_offline`),message:L(`waiting: recipient offline`)})])),{onExcessProperty:`error`});var rU=B({status:L(`unknown`)}),iU=Sh(Tg(Hh([nU,rU])));function aU(e){return iU(e)}var oU=Hh([nU,rU,B({status:L(`too_late`),commandId:R})]),sU=B({sessionId:R}),cU=Sh(Tg(eU),{onExcessProperty:`error`}),lU=Sh(Tg(tU),{onExcessProperty:`error`}),uU=Sh(Tg(nU)),dU=Sh(Tg(oU)),fU=Sh(Tg(sU)),pU=Sh(Tg(kM)),mU=Sh(Tg(WH)),hU=Sh(Tg(V(WH))),gU=Sh(Tg(UB));function _U(e){return mU(e)}function vU(e){return hU(e)}function yU(e){return gU(e)}function bU(e){return uU(e)}function xU(e){return dU(e)}function SU(e){return Sh(Tg(U(XH)))(e)}function CU(e){return fU(e)}var wU=B({acceptedSender:U(R),delegator:U(R),terminal:GH,content:R,usage:V(B({provider:R,model:R,usage:IV})),toolCalls:G.check(hg(0)),waitingOnYou:V(B({itemId:R,kind:R,summary:R})).check(K(8))});function TU(e){return Sh(Tg(U(wU)))(e)??void 0}function EU(e){return cU(e)}function DU(e){return lU(e)}function OU(e){let t=pU(e);return new AM(t.boundary,t.cause,t.message,t.requestId)}var kU=Sh(Tg(B({sessions:V(Hh([B({sessionId:Cg,createdAt:z,lastActivityAt:z,settledAt:F(z),title:R,state:H([`needs_you`,`running`,`errored`,`done`])}),B({sessionId:Cg,state:L(`unavailable`)})])),next:I(Cg)})));function AU(e){let t=kU(e);return{sessions:t.sessions,next:t.next}}var jU=Sh(Tg(B({sessionId:Cg}))),MU=Sh(Tg(B({deleted:Fh})));function NU(e){return MU(e).deleted}function PU(e){return jU(e).sessionId}function FU(e,t){return xe(e,t).then(e=>{if(fs(e))return e.value;let t=te(ns(e.cause))??es(e.cause);return Promise.reject(t instanceof Error?t:Error(String(t)))})}function IU(e){let t=iS(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 LU(e,t){function n(e){return FU(t.command(e))}return Object.freeze({address:e,command:n,withdraw:e=>FU(t.withdraw(e)),abort:()=>FU(t.abort),send:(e,n)=>FU(t.send(e,n)),cancel:e=>FU(t.cancel(e)),latestPending:()=>FU(t.latestPending),modelPreference:Object.freeze({read:()=>FU(t.modelPreference.read),set:e=>FU(t.modelPreference.set(e))}),extension:e=>{let n=t.extension(e);return Object.freeze({call:(e,t,r)=>FU(n.call(e,t,r))})},read:e=>FU(t.read(e)),readSettlement:(e,n)=>FU(t.readSettlement(e,n?.timeoutMs),n),subscribe:e=>IU(t.subscribe(e)),watch:e=>FU(t.watch(e)).then(e=>Object.freeze({snapshot:e.snapshot,changes:IU(e.changes),close:()=>FU(e.close)}))})}function RU(e,t){let n=t??`local:${hv()}`;return Object.freeze({createSession:t=>FU(e.createSession(t)),deleteSession:t=>FU(e.deleteSession(t)),listSessions:t=>FU(e.listSessions(t)),extensions:Object.freeze({list:()=>FU(e.extensions.list),resume:t=>FU(e.extensions.resume(t)),call:(t,n,r)=>FU(e.extensions.call(t,n,r))}),session:t=>LU(`${n}/sessions/${encodeURIComponent(t)}`,e.session(t)),close:()=>FU(e.close)})}function zU(e=`Remote Shiitake operation is unavailable`){return new AM(`runtime`,`unavailable`,e)}function BU(e){return new AM(`runtime`,`invalid`,e)}function VU(){return new AM(`runtime`,`closed`,`Shiitake client is closed`)}var HU=2,UU=Sh(R);function WU(e){if(!(e instanceof MessageEvent))throw BU(`Session stream event is invalid`);return UU(e.data)}function GU(e){return e.kind===`source-error`?vn(zU(`Session stream is unavailable`)):e.kind===`snapshot`?ci({try:()=>({kind:`snapshot`,value:EU(WU(e.event))}),catch:()=>BU(`Session snapshot is invalid`)}):e.kind===`frame`?ci({try:()=>({kind:`frame`,value:DU(WU(e.event))}),catch:()=>BU(`Session frame is invalid`)}):ci({try:()=>OU(WU(e.event)),catch:()=>BU(`Session runtime error is invalid`)}).pipe(A(vn))}function KU(e,t){return Yt(()=>{e.closed||(e.closed=!0,t.delete(e),e.source.close())})}function qU(e,t,n,r){return Px(t=>fe(ci({try:()=>{let i={source:new(r??EventSource)(e),closed:!1},a=(e,r)=>{Wy(t,{kind:e,event:r})||(qy(t,Xo(zU(`Session stream client fell behind`))),Wt(KU(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===HU&&a(`source-error`,e)}),n.add(i),i},catch:()=>zU(`Session stream could not open`)}),e=>KU(e,n)),{bufferSize:256,strategy:`dropping`}).pipe(Gx(GU),qx({duration:vM,orElse:()=>Rx(zU(`Session feed is connected but silent; the service may be busy`))}),nS(t.await))}function JU(e,t){return`${e}/sessions/${encodeURIComponent(t)}`}function YU(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 XU(e,t,n,r){return qU(e,t,n,r).pipe(Gx(e=>e.kind===`frame`?k(e.value):vn(BU(`Session subscription received a snapshot`))))}function ZU(e,t,n,r,i,a){return wn(function*(){yield*n;let o=yield*wb(!1),s=yield*Ts();yield*Yt(()=>t.add(s)),yield*Os(s,Yt(()=>{t.delete(s)}));let c=yield*ar(qU(e,r,i,a).pipe($x(Tx()),Ds(s)));if(ps(c))return yield*As(s,c),yield*Ir(c.cause);let[l,u]=c.value;if(Qe(l)||l.value.kind!==`snapshot`){let e=BU(`Session stream did not begin with a snapshot`);return yield*As(s,ls(e)),yield*vn(e)}let d=u.pipe(Gx(e=>e.kind===`frame`?k(e.value):k({kind:`reset`,reason:`history_unavailable`,cursor:e.value.cursor,baseline:e.value})),nS(o.await),eS(e=>o.isOpen()&&Qo(e)?Fx:zx(e)));return Object.freeze({snapshot:l.value.value,changes:d,close:o.open.pipe(Te(As(s,ds)))})})}function QU(e,t,n){return In({try:async t=>{let n=await e(t);return{response:n,body:await n.text()}},catch:()=>zU(`${n} request failed`)}).pipe(A(({response:e,body:r})=>e.ok?ci({try:()=>t(r),catch:()=>BU(`${n} response is invalid`)}):ci({try:()=>OU(r),catch:()=>BU(`${n} error response is invalid`)}).pipe(A(vn))))}function $U(e){let t=e.baseUrl.replace(/\/+$/u,``),n=e.fetch??globalThis.fetch,r=new Set,i=new Set,a=Cb(!1),o=!1,s=$t(()=>o?vn(VU()):rr),c=(e,t,n)=>Hi(QU(e,t,n),a.await.pipe(Te(vn(VU())))),l=(e,t)=>s.pipe(Te(c(r=>n(e,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t),signal:r}),yU,`Extension command`)));return Object.freeze({createSession:e=>s.pipe(A(()=>{let r=gN({requestId:e});return c(e=>n(`${t}/sessions`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({requestId:r}),signal:e}),PU,`Session creation`)})),deleteSession:e=>s.pipe(A(()=>{let r=mN(e);return c(e=>n(`${t}/sessions/${encodeURIComponent(r)}`,{method:`DELETE`,signal:e}),NU,`Session deletion`)})),listSessions:e=>s.pipe(A(()=>{let r=new URLSearchParams;e!==void 0&&r.set(`after`,hN(e));let i=r.size===0?``:`?${r.toString()}`;return c(e=>n(`${t}/sessions${i}`,{signal:e}),AU,`Session discovery`)})),extensions:Object.freeze({list:s.pipe(Te(c(e=>n(`${t}/extensions`,{signal:e}),vU,`Extension list`))),resume:e=>s.pipe(Te(c(r=>n(`${t}/extensions/${encodeURIComponent(e)}/resume`,{method:`POST`,signal:r}),_U,`Extension resume`))),call:(e,n,r)=>l(`${t}/extensions/${encodeURIComponent(e)}/commands/${encodeURIComponent(n)}`,r)}),session:o=>{let u=mN(o),d=JU(t,u),f=`${d}/events`;function p(e){return s.pipe(Te(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`?bU:e.type===`cancel`?xU:e.type===`fork`?CU:()=>void 0,`Command`)))}return Object.freeze({command:p,withdraw:e=>s.pipe(Te(c(t=>n(`${d}/withdraw`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({requestId:e}),signal:t}),aU,`Request withdrawal`))),abort:p({type:`abort`}),send:(e,t)=>Yt(()=>t?.requestId??hv()).pipe(A(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(kt(e=>e.requestId===n?e:new AM(e.boundary,e.cause,e.message,n)))})),cancel:e=>p({type:`cancel`,...e}),latestPending:s.pipe(Te(c(e=>n(`${d}/pending/latest`,{signal:e}),SU,`Newest pending prompt`))),modelPreference:Object.freeze({read:s.pipe(Te(c(e=>n(`${d}/model-preference`,{signal:e}),FM,`Model preference read`))),set:e=>s.pipe(Te(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(Te(ci({try:()=>_N(e),catch:e=>e instanceof AM?e:BU(`Read options are invalid`)})),A(({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}),EU,`Session read`)})),readSettlement:(e,t=0)=>s.pipe(Te(c(r=>n(`${d}/settlement?${new URLSearchParams({commandId:e,timeoutMs:String(t)}).toString()}`,{signal:r}),TU,`Command settlement`))),subscribe:t=>Wx(s.pipe(Te(ci({try:()=>vN(t),catch:e=>e instanceof AM?e:BU(`Subscribe options are invalid`)})),S(({after:t,includeSandboxFailures:n})=>XU(YU(f,t,n===!0),a,i,e.eventSource)))),watch:t=>ZU(t?.includeSandboxFailures===!0?`${f}?includeSandboxFailures=true`:f,r,s,a,i,e.eventSource)})},close:$t(()=>o?rr:(o=!0,a.open.pipe(Te(Ur([...r],e=>As(e,ds),{discard:!0})),Te(Ur([...i],e=>KU(e,i),{discard:!0})))))})}function eW(e){return RU($U(e),e.baseUrl.replace(/\/+$/u,``))}P(UB);function tW(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 nW(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 rW=R.pipe(W(yg(1)),W(K(128)),W(ag(/^[a-z][a-z0-9]*(?:[-_.][a-z0-9]+)*$/u))),iW=R.pipe(W(yg(1)),W(K(64)),W(ag(/^(?: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))),aW=rW.pipe(Kh(`ExtensionId`));R.pipe(W(ag(/^sha256:[0-9a-f]{64}$/u)),Kh(`ExtensionRevision`)),R.pipe(W(ag(/^sha256:[0-9a-f]{64}$/u)),Kh(`ExtensionFingerprint`));var oW=class extends Go(`ExtensionHookError`){};function sW(e){return $t(()=>{let t=e();return Ni(t)?t:In({try:()=>Promise.resolve(t),catch:e=>new oW({cause:e})})})}var cW=G.check(hg(0)),lW=G.check(mg(0)),uW=B({id:oS,label:aS,input:I(Lh(R,Vg)),awaiting:F(L(`question`))}),dW=B({...cS.fields,actions:I(V(uW).check(K(8)))}),fW=cS.check(ng(e=>e.open===void 0,{message:`Client chips are display only`})),pW=B({...dW.fields,inspection:F(B({commandId:oS,title:aS,rows:V(fW).check(K(200))}))}),mW=B({id:oS,order:z.check(cg()),row:fW,compact:I(aS)}),hW=B({id:oS,sequence:lW,at:cW,commandId:U(R),afterSequence:F(cW),rows:V(dW).check(K(200))}).check(ng(e=>e.id===String(e.sequence),{message:`Client event identity must equal its sequence`}),ng(e=>e.afterSequence===void 0||e.commandId===null,{message:`A client event cannot have both command and position anchors`})),gW=e=>new Set(e).size===e.length,_W=B({chips:V(mW).check(K(4)),panel:V(pW).check(K(16)),timeline:B({cells:V(hW).check(K(32)),omitted:cW}),waiting:U(B({summary:aS,cancel:uW}))}).check(ng(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`}),ng(e=>gW(e.chips.map(e=>e.id))&&gW(e.panel.map(e=>e.id))&&e.panel.every(e=>gW((e.inspection?.rows??[]).map(e=>e.id)))&&gW(e.timeline.cells.map(e=>e.id))&&e.timeline.cells.every(e=>gW(e.rows.map(e=>e.id))),{message:`Client contribution contains duplicate identities`})),vW=Sh(B({protocol:L(`shiitake.client/v1`),id:aW,promptPresentation:F(L(`footer`)),attach:F(uh(e=>Se(e))),contribute:F(uh(e=>Se(e)))}).check(ng(e=>e.attach!==void 0||e.contribute!==void 0,{message:`Client entry requires attach or contribute`})),{onExcessProperty:`error`});function yW(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=>sW(()=>r(e))}),i!==void 0&&Object.assign(n,{contribute:t=>i(tW(e,t))}),Object.freeze(vW(n))}var bW=`whistle.catalog/v1`,xW=128,SW=16,CW=D({protocol:or(bW),commands:ki(ca).max(xW)}).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:bW,commands:Object.freeze(e.commands)})}),wW=e=>CW.parse(e),TW=re(`type`,[D({type:or(`done`),notice:ba.optional(),result:qi.optional()}).strict(),D({type:or(`prompt`),prompt:ya,notice:ba.optional(),next:D({arguments:Ji,answer:j().min(1).max(120)}).strict()}).strict()]).transform(e=>Object.freeze(e)),EW=e=>TW.parse(e);function DW(e){return e.text===void 0?{selected:e.selected}:{selected:e.selected,text:e.text}}function OW(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 kW(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 OW(e,n);if(a===void 0)return{cancelled:!0};let o=new Map;for(let n=0;n<SW;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=EW(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`?DW(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 AW=Sh(_W,{onExcessProperty:`error`});function jW(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 MW(e,t){let n=jW(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=wW(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 NW(e,t){try{let n=AW(e(t));return MW(n,t),{status:`admitted`,value:n}}catch(e){return{status:`failed`,error:e instanceof Error?e:Error(`Client contribution failed`,{cause:e})}}}function PW(e,t){let n=e.map(e=>vW(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=NW(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 FW(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 IW(){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=FW({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 LW(e){return`init`in e}function RW(e){return typeof e.write==`function`}function zW(e){return!!e.onMount}function BW(e){return`v`in e||`e`in e}function VW(e){if(`e`in e)throw e.e;return e.v}function HW(e){return typeof e?.then==`function`}function UW(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 WW(e,t,n){if(!n.p.has(e)){n.p.add(e);let r=()=>n.p.delete(e);t.then(r,r)}}function GW(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 KW(e){return!!e.INTERNAL_onInit}var qW=(e,t,n,...r)=>n.read(...r),JW=(e,t,n,...r)=>n.write(...r),YW=(e,t,n)=>n.INTERNAL_onInit(t),XW=(e,t,n,r)=>n.onMount?.call(n,r),ZW=(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),KW(n)&&s(e,t,n)}return a},QW=(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)},$W=(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 GW(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)}},eG=(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(BW(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(!BW(n)){if(LW(r))g(e,t,r,r.init);else throw Error(`no atom init`)}return VW(n)}let o=p(e,t,r);try{return VW(o)}finally{S.delete(r),y.d.set(r,o.n),HW(y.v)&&WW(n,y.v,o),a.has(n)&&((i=a.get(r))==null||i.t.add(n)),x||w()}},T,te,ne={get signal(){return T||=new AbortController,T.signal},get setSelf(){return!te&&RW(n)&&(te=(...r)=>{if(!x)try{return m(e,t,n,r)}finally{f(e,t),d(e,t)}}),te}},re=y.n,E=o.get(n)===re;try{let i=l(e,t,n,ee,ne);if(g(e,t,n,i),HW(i)){_(e,t,i,()=>T?.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(UW(e))throw e;return delete y.v,y.e=e,++y.n,y.m=b,y}finally{x=!1,y.n!==re&&E&&(o.set(n,y.n),s.add(n),(i=c.c)==null||i.call(c,n))}},tG=(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 GW(n,s,r)){let n=a(e,t,c);i.get(c)!==n.n&&(i.set(c,n.n),o.push(c))}}},nG=(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=>VW(u(e,t,n)),v=(r,...o)=>{var u;let _=s(e,t,r);try{if(r===n){if(!LW(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}},rG=(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))}},iG=(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),RW(n)&&zW(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},aG=(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},oG=(e,t,n,r)=>{let i=e[11],a=e[27],o=i(e,t,n),s=`v`in o,c=o.v;if(HW(r))for(let a of o.d.keys())WW(n,r,i(e,t,a));o.v=r,delete o.e,(!s||!Object.is(c,o.v))&&(++o.n,HW(c)&&a(e,t,c))},sG=(e,t,n)=>{let r=e[14];return VW(r(e,t,n))},cG=(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))}},lG=(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)}},uG=(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())},fG=new WeakMap;function pG(...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,{},qW,JW,YW,XW,ZW,QW,$W,eG,tG,nG,rG,iG,aG,oG,sG,cG,lG,void 0,new WeakMap,uG,dG,[0]].map((t,n)=>e[n]||t);fG.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=hG,r.write=gG),t&&(r.write=t),r}function hG(e){return e(this)}function gG(e,t,n){return t(this,typeof n==`function`?n(e(this)):n)}function _G(){return pG()}var vG=$(new rv),yG=(e,t,n)=>e?.suspense&&bG(t),bG=(e,t)=>e.isPending&&!0,xG=({result:e,throwOnError:t,query:n})=>e.isError&&!e.isFetching&&SG(t,[e.error,n]);function SG(e,t){return typeof e==`function`?e(...t):!!e}var CG=e=>e.suspense&&typeof e.staleTime!=`number`?{...e,staleTime:1e3}:e;function wG(e,t,n=e=>e(vG)){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),CG(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(O_.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(yG(n,i))return t.fetchOptimistic(n);if(xG({result:i,query:t.getCurrentQuery(),throwOnError:n.throwOnError}))throw i.error;return i},(e,t)=>{t(r,e=>e+1)})}function TG(e,t=e=>e(vG)){return wG(e,W_,t)}function EG(e,t=e=>e(vG)){return wG(e,X_,t)}function DG(e,t=e=>e(vG)){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 tv(o,a);return s.set(o,l),l}),o=$(e=>{let t=e(a),n=$(t.getCurrentResult());return n.onMount=e=>(t.subscribe(O_.batchCalls(e)),()=>{t.reset()}),n}),s=$(e=>{let t=e(a);return(e,n)=>{t.mutate(e,n).catch(OG)}});return $(e=>{let t=e(a),n=e(e(o)),r=e(s);if(n.isError&&SG(t.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:r,mutateAsync:n.mutate}})}function OG(){}var kG=160;function AG(e,t){return e.replace(/\s+/gu,` `).trim().slice(0,t)}function jG(e){return gV(mM(e).replace(/[\p{Cc}\u200b\u200e\u200f\u061c\u202a-\u202e\u2066-\u2069\u2060\ufeff]/gu,e=>/\s/u.test(e)?` `:``))}function MG({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:jG(n.diagnostic??e)??e}}return{kind:`waiting_for_you`}}function NG(e){let{activity:t,progress:n}=e,{queue:r}=t;return r.state===`idle`?MG(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:AG(t.retry.errorMessage,kG),nextRetryAt:t.retry.scheduledAt+t.retry.delayMs}:{kind:`compacting`,trigger:t.compaction.trigger}}function PG(e,t){return e===null||t===null?e===t:e.phase===t.phase}function FG(e,t){return e.kind===t.kind?e.kind===`queued`&&t.kind===`queued`?e.queuedCommandId===t.queuedCommandId&&PG(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 IG(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 LG=new WeakMap;function RG(e){let t=LG.get(e);if(t!==void 0)return t;let n=new Set(e.map(({id:e})=>e));return LG.set(e,n),n}function zG(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 BG(e,t){return zG(e,t)}function VG(e,t){return e===null||RG(t).has(e.messageId)?null:e}function HG(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 UG(e,t){return zG(e,t)}function WG(e,t){return zG(e,t)}function GG(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 KG(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 qG(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`||PG(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 JG(e,t){return e===t||JSON.stringify(e)===JSON.stringify(t)}function YG(e,t){if(t.kind===`heartbeat`)return e;if(t.kind===`reset`)return{...t.baseline,terminals:HG([],t.baseline.terminals),compactions:UG([],t.baseline.compactions??[]),compactionNotices:WG([],t.baseline.compactionNotices??[])};if(t.kind===`activity`)return qG(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=RG(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=qG(e.activity,t.activity)?e.activity:t.activity;return i&&r.revision===t.progress.revision?o===e.activity?e:{...e,activity:o}:{...e,progress:nW(e.progress,t.progress),activity:o}}let n=KG(e.pending,t.pending)?e.pending:t.pending,r=BG(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=HG(e.terminals,t.terminals),s=e.compactions??[],c=UG(s,t.compactions??[]),l=e.compactionNotices??[],u=WG(l,t.compactionNotices??[]),d=t.activity.queue.state===`idle`?null:VG(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&&JG(t.extensions,e.extensions)&&GG(t.attention,e.attention)&&t.cursor===e.cursor&&qG(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:qG(e.activity,t.activity)?e.activity:t.activity,pending:n,attention:GG(t.attention,e.attention)?e.attention:t.attention,extensions:JG(t.extensions,e.extensions)?e.extensions:t.extensions};return f===void 0?p:{...p,context:f}}var XG=Pe(j(),dr());function ZG(e){return e!==void 0&&/[^\s\p{Cf}]/u.test(e)}function QG(e){return e.text.trim()!==``||ZG(e.thinking)}function $G(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 eK=j();function tK(e){if(e?.type===`Literal`){let t=eK.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 nK(e){return e.type===`Identifier`?e.name:tK(e)}function rK(e){let t;try{t=nR(e,{ecmaVersion:`latest`,allowAwaitOutsideFunction:!0,allowReturnOutsideFunction:!0})}catch(e){if(e instanceof SyntaxError)return;throw e}for(let e of t.body){let n=$G(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&&nK(e.key)===`command`){let n=tK(e.value);if(n!==void 0)return{tool:r.property.name,command:n,alone:t.body.length===1}}}}}var iK=[[`*** Add File: `,`add`],[`*** Delete File: `,`delete`],[`*** Update File: `,`update`]],aK=/^\*\*\* Move to: (.+)$/u;function oK(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 sK(e){let t=[],n;for(let r of e.split(`
35
- `)){let e=iK.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=aK.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=oK(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 cK=131072,lK=524288,uK=new TextEncoder,dK=s(()=>j().min(1).max(4096).refine(e=>!e.includes(`\0`),`Path cannot contain null bytes`));function fK(e=0){return j().min(e).refine(e=>uK.encode(e).byteLength<=cK,`Text exceeds the ${String(cK)}-byte Files bound`)}s(()=>ft({path:dK,offset:tt().int().min(0).default(0),limit:tt().int().min(4).max(cK).default(cK)}));var pK=s(()=>ft({computerId:j().min(1).max(256),path:dK.refine(e=>e.startsWith(`/`),`Computer file paths must be absolute`)})),mK=Zn([`image/png`,`image/jpeg`,`image/gif`,`image/webp`]),hK=s(()=>ft({path:dK,image:ft({mimeType:mK,data:vt(),bytes:tt().int().min(1).max(lK)}),file:pK.exactOptional()})),gK=s(()=>ft({path:dK,content:fK(),offset:tt().int().min(0),nextOffset:tt().int().min(0).nullable(),truncated:Si(),file:pK.exactOptional()})),_K=s(()=>ft({path:dK,image:ft({ref:j().min(1).max(32),mimeType:mK,bytes:tt().int().min(1).max(lK)})}));s(()=>_e([gK,_K]));var vK=s(()=>_e([gK,hK])),yK=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 yK{};function bK(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 xK(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 SK(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 CK(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 wK(e,t){return SK(e,t,``)}function TK(e,t){return CK(e,t,``)}function EK(e,t){return t.slice(0,DK(e,t))}function DK(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 OK(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 kK(e,t){if(t)return jK(e,t)[1];let n;for(n=e.length-1;n>=0&&e[n].match(/\s/);n--);return e.substring(n+1)}function AK(e,t){if(t)return jK(e,t)[0];let n=e.match(/^\s*/);return n?n[0]:``}function jK(e,t){if(!t)return[AK(e),kK(e)];if(t.resolvedOptions().granularity!=`word`)throw Error(`The segmenter passed must have a granularity of "word"`);let n=OK(e,t),r=n[0],i=n[n.length-1];return[/\s/.test(r)?r:``,/\s/.test(i)?i:``]}var MK=`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}`,NK=RegExp(`[${MK}]+|\\s+|[^${MK}]`,`ug`);new class extends yK{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=OK(e,r)}else n=e.match(NK)||[];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)&&PK(n,i,r,e,t.intlSegmenter),n=e,r=null,i=null)}),(r||i)&&PK(n,i,r,null,t.intlSegmenter),e}};function PK(e,t,n,r,i){if(t&&n){let[a,o]=jK(t.value,i),[s,c]=jK(n.value,i);if(e){let r=bK(a,s);e.value=CK(e.value,s,r),t.value=wK(t.value,r),n.value=wK(n.value,r)}if(r){let e=xK(o,c);r.value=SK(r.value,c,e),t.value=TK(t.value,e),n.value=TK(n.value,e)}}else if(n){if(e){let e=AK(n.value,i);n.value=n.value.substring(e.length)}if(r){let e=AK(r.value,i);r.value=r.value.substring(e.length)}}else if(e&&r){let n=AK(r.value,i),[a,o]=jK(t.value,i),s=bK(n,a);t.value=wK(t.value,s);let c=xK(wK(n,s),o);t.value=TK(t.value,c),r.value=SK(r.value,n,c),e.value=CK(e.value,n,n.slice(0,n.length-c.length))}else if(r){let e=AK(r.value,i),n=EK(kK(t.value,i),e);t.value=TK(t.value,n)}else if(e){let n=EK(kK(e.value,i),AK(t.value,i));t.value=wK(t.value,n)}}new class extends yK{tokenize(e){let t=RegExp(`(\\r?\\n)|[${MK}]+|[^\\S\\n\\r]+|[^${MK}]`,`ug`);return e.match(t)||[]}};var FK=new class extends yK{constructor(){super(...arguments),this.tokenize=LK}equals(e,t,n){return n.ignoreWhitespace?((!n.newlineIsToken||!e.includes(`
36
- `))&&(e=e.trim()),(!n.newlineIsToken||!t.includes(`
37
- `))&&(t=t.trim())):n.ignoreNewlineAtEof&&!n.newlineIsToken&&(e.endsWith(`
38
- `)&&(e=e.slice(0,-1)),t.endsWith(`
39
- `)&&(t=t.slice(0,-1))),super.equals(e,t,n)}};function IK(e,t,n){return FK.diff(e,t,n)}function LK(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 RK(e){return e==`.`||e==`!`||e==`?`}new class extends yK{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(RK(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 yK{tokenize(e){return e.split(/([{}:;,]|\s+)/)}},new class extends yK{constructor(){super(...arguments),this.tokenize=LK}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(zK(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 zK(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]=zK(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]=zK(e[s],t,n,r,s);t.pop(),n.pop()}else o=e;return o}new class extends yK{tokenize(e){return e.slice()}join(e){return e}removeEmpty(e){return e}};function BK(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 VK={includeIndex:!0,includeUnderline:!0,includeFileHeaders:!0};function HK(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;IK(n,r,Object.assign(Object.assign({},s),{callback:t=>{let n=l(t);e(n)}}))}else return l(IK(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||WK(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 UK(e,t){if(t||=VK,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=>UK(e,t)).join(`
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
- `)+`
44
- `}function WK(e){let t=e.endsWith(`
45
- `),n=e.split(`
46
- `).map(e=>e+`
47
- `);return t?n.pop():n.push(n.pop().slice(0,-1)),n}var GK=512,KK=256,qK=100;`${String(lK/1024)}`,new TextEncoder;var JK=tt().int().min(1).max(KK).default(qK),YK=j().min(1).max(GK);s(()=>ft({path:dK.default(`.`),limit:JK})),s(()=>ft({path:dK.default(`.`),pattern:YK,limit:JK})),s(()=>ft({path:dK.default(`.`),pattern:YK,include:YK.optional(),regex:Si().default(!1),ignoreCase:Si().default(!1),limit:JK}));var XK=s(()=>ft({path:dK,type:Zn([`file`,`directory`,`symlink`]).exactOptional(),line:tt().int().positive().exactOptional(),text:j().exactOptional()}));s(()=>ft({path:dK,results:ki(XK).max(KK),truncated:Zn([`limit`,`scan`]).nullable()})),s(()=>ft({path:dK,oldText:fK(1),newText:fK()}));var ZK=s(()=>ft({path:dK,bytes:tt().int().nonnegative(),diff:j(),firstChangedLine:tt().int().positive().nullable(),unifiedPatch:j().nullable(),unifiedPatchBytes:tt().int().nonnegative(),unifiedPatchAddedLines:tt().int().nonnegative(),unifiedPatchRemovedLines:tt().int().nonnegative(),unifiedPatchTruncated:Si()})),QK=s(()=>ft({status:or(`failed`),error:ft({kind:Zn([`not-found`,`ambiguous`,`file-too-large`,`partial-character`,`not-text`,`unchanged`,`conflict`,`read-only`]),path:dK,message:j()})}));_e([ZK,QK]),new Intl.Segmenter(void 0,{granularity:`grapheme`});var $K=`Search skips .git and gitignored paths.`;`${$K}`,`${$K}`,`${$K}`;function eq(e,t){console.error(JSON.stringify({event:`parakeet_operation_failed`,operation:e,causeKind:t instanceof Error?`error`:`non_error`}),Nc(t))}function tq(e,t=!1){return e===`error`?t?`neutral`:`error`:e===`unknown`?`neutral`:e===`running`?`info`:`success`}var nq={code:`computer`,command:`run`,edit:`write`,other:`working`,read:`read`,search:`search`};function rq(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
- `).replace(/\n$/u,``).split(`
49
- `).map(e=>hM(e.slice(e.lastIndexOf(`\r`)+1)))}function iq(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 aq=40,oq=6,sq=400,cq=72,lq=new Map([[`apply_patch`,`edit`],[`bash`,`command`],[`edit`,`edit`],[`execute`,`code`],[`glob`,`search`],[`grep`,`search`],[`list`,`search`],[`ls`,`search`],[`read`,`read`],[`write`,`edit`]]),uq={code:[`Ran script`,`Running script`],command:[`Ran`,`Running`],edit:[`Updated`,`Updating`],other:[`Called`,`Calling`],read:[`Read`,`Reading`],search:[`Searched`,`Searching`]},dq=ze({path:j()}),fq=ze({file_path:j()}),pq=ze({command:j()}),mq=ze({code:j()}),hq=ze({patch:j()}),gq=ze({pattern:j()}),_q=ze({oldText:j(),newText:j()}),vq=ze({content:j()}),yq=j(),bq=ze({content:j(),offset:tt().int().min(0).optional()}),xq=ze({matches:ki(ze({path:j(),line:tt().int(),text:j()}))}),Sq=ze({stdout:j().optional(),stderr:j().optional(),exitCode:tt().int().nullable().optional()}).refine(e=>e.stdout!==void 0||e.stderr!==void 0||e.exitCode!==void 0),Cq=ft({path:j(),bytes:tt().int().nonnegative(),diff:j(),firstChangedLine:tt().int().positive().nullable(),unifiedPatch:j().nullable(),unifiedPatchBytes:tt().int().nonnegative(),unifiedPatchAddedLines:tt().int().nonnegative(),unifiedPatchRemovedLines:tt().int().nonnegative(),unifiedPatchTruncated:Si()}),wq=/^(.+?:\d+)[:-]\s?(.*)$/u;function Tq(e){return lq.get(e)??`other`}function Eq(e){return e.replace(/\/(?:home|Users)\/[^/\s"'`]+/gu,`~`)}function Dq(e){let t=e.split(`
50
- `).map(e=>e.trim()).find(e=>e!==``)??``;return t.length>cq?`${t.slice(0,71)}…`:t}function Oq(e){return e.slice(0,sq)}function kq(e){return Oq(mM(e).replace(/\n$/u,``).split(`
51
- `))}function Aq(e){let t=dq.safeParse(e);if(t.success)return t.data.path;let n=fq.safeParse(e);return n.success?n.data.file_path:void 0}function jq(e){try{return{kind:`parsed`,value:JSON.parse(e)}}catch(e){return{kind:`invalid`,cause:e}}}function Mq(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=jq(t);if(n.kind===`invalid`)return{kind:`text`,text:t};let r=n.value,i=yq.safeParse(r);if(i.success)return{kind:`text`,text:i.data};let a=dr().safeParse(r);return a.success?{kind:`json`,value:a.data}:{kind:`text`,text:t}}function Nq(e,t){let n=t===void 0||t===0;return{kind:`excerpt`,lines:kq(e).map((e,t)=>n?{number:t+1,text:e}:{text:e}),preview:12}}function Pq(e){return{kind:`matches`,matches:kq(e).filter(e=>e.trim()!==``).map(e=>{let t=wq.exec(e);return t===null?{location:``,text:e}:{location:t[1]??``,text:t[2]??``}}),preview:12}}function Fq(e,t){let n=[];if(e!==void 0&&e.trim()!==``)for(let t of kq(e))n.push({stream:`stdout`,text:t});if(t!==void 0&&t.trim()!==``)for(let e of kq(t))n.push({stream:`stderr`,text:e});return n.length===0?void 0:{kind:`output`,lines:Oq(n),preview:12}}function Iq(e,t){return{kind:`text`,label:t,language:`json`,lines:kq(JSON.stringify(e,null,2)),preview:12}}function Lq(e,t){if(e.kind===`none`)return{sections:[]};if(e.kind===`text`){if(t===`read`)return{sections:[Nq(e.text,void 0)]};if(t===`search`)return{sections:[Pq(e.text)]};if(t===`command`){let t=Fq(e.text,void 0);return{failure:Dq(e.text),sections:t===void 0?[]:[t]}}return{failure:Dq(e.text),sections:[{kind:`text`,lines:kq(e.text),preview:12}]}}let n=bq.safeParse(e.value);if(n.success)return{sections:[Nq(n.data.content,n.data.offset)]};let r=xq.safeParse(e.value);if(r.success)return{sections:[{kind:`matches`,matches:Oq(r.data.matches).map(e=>({location:`${e.path}:${String(e.line)}`,text:mM(e.text)})),preview:12}]};let i=QK.safeParse(e.value);if(i.success)return{failure:i.data.error.message,sections:[{kind:`text`,lines:[i.data.error.message],preview:12}]};let a=Cq.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=BK(e),n=t[0];if(t.length===1&&n?.oldFileName===a.data.path&&n.newFileName===a.data.path)return{sections:[Bq([{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=Uq.get(e.charAt(0));return t===void 0?[]:[{kind:t,text:e.slice(1)}]})}))}])]}}catch(e){eq(`render tool patch`,e)}}let o=Sq.safeParse(e.value);if(o.success){let{stdout:e,stderr:t,exitCode:n}=o.data,r=Fq(e,t),i=n!=null&&n!==0;return{exitCode:i?n:void 0,failure:t!==void 0&&t.trim()!==``?Dq(mM(t)):i?`Exited with code ${String(n)}`:void 0,sections:r===void 0?[]:[r]}}return{sections:[Iq(e.value)]}}var Rq={add:`Add`,delete:`Delete`,update:`Update`};function zq(e){let t=e.length>1;return e.flatMap(e=>[...t?[{kind:`file`,text:`${Rq[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 Bq(e){return{kind:`diff`,files:e,lines:Oq(zq(e)),preview:aq}}var Vq={add:`+`,context:` `,remove:`-`};function Hq(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=>`${Vq[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?``:UK(i)}})}var Uq=new Map([[`+`,`add`],[`-`,`remove`],[` `,`context`]]);function Wq(e,t,n){let r=e??`file`,i=HK(r,r,t,n,``,``,{context:3});return{lineNumbers:!0,unified:UK(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=Uq.get(e.charAt(0));return t===void 0?[]:[{kind:t,text:e.slice(1)}]})})),operation:t===``?`add`:`update`,path:e}}function Gq(e,t){let n=hq.safeParse(e.args);if(n.success){let t=sK(n.data.patch),r=[...new Set(t.flatMap(e=>e.path?[e.path]:[]))];return{get input(){return[Bq(Hq(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=_q.safeParse(e.args);if(i.success)return{...r,get input(){return[Bq([Wq(t,i.data.oldText,i.data.newText)])]}};let a=vq.safeParse(e.args);return{...r,get input(){return a.success?[Bq([Wq(t,``,a.data.content)])]:[]}}}function Kq(e){return{get input(){return Object.keys(e.args).length===0?[]:[Iq(e.args,`Arguments`)]},label:e.name,paths:[]}}function qq(e,t){let n=Aq(e.args);switch(t){case`code`:{let t=mq.safeParse(e.args);if(!t.success)return Kq(e);let n={kind:`script`,lines:kq(t.data.code),preview:oq},r=rK(t.data.code);return r===void 0?{get input(){return[n]},label:Dq(Eq(t.data.code)),paths:[]}:{get input(){return[{kind:`command`,lines:kq(r.command),preview:oq},...r.alone?[]:[n]]},label:Dq(Eq(r.command)),paths:[],verbs:[`Ran ${r.tool}:`,`Running ${r.tool}:`]}}case`command`:{let t=pq.safeParse(e.args);return t.success?{get input(){return[{kind:`command`,lines:kq(t.data.command),preview:oq}]},label:Dq(t.data.command),paths:[]}:Kq(e)}case`edit`:return Gq(e,n);case`read`:return{input:[],label:n??e.name,paths:n===void 0?[]:[n]};case`search`:{let t=gq.safeParse(e.args);return{input:[],label:Dq(t.success?n===void 0?t.data.pattern:`${t.data.pattern} in ${n}`:n??`.`),paths:[]}}case`other`:return Kq(e)}}function Jq(e){if(e.status!==`completed`)return;let t=Mq(e.result);if(t.kind!==`json`)return;let n=ft({name:j().min(1).max(256),avatar:Cy}).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=nR(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 Yq(e,t=!1){let n=Tq(e.name),r=qq(e,n),i=Jq(e),a=i===void 0?r:{...r,label:Dq(i.name),verbs:[`Renamed itself to`,`Renaming itself to`]},[o,s]=a.verbs??uq[n],c=e.status===`completed`?Mq(e.result):void 0,l=c?.kind===`json`&&QK.safeParse(c.value).success,u,d=()=>{if(u!==void 0)return u;let t=Lq(Mq(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=>Dq(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 Xq(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 Zq(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:rq(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:Yq(i)});return{...e,tools:n,calls:r,active:r.find(t=>t.id===e.active?.id)}})}var Qq={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 $q(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]=Qq[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 eJ(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 tJ(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 nJ(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 rJ(e){let t=e.map(e=>Yq(e)),n=e.map((e,n)=>{let r=t[n];return r!==void 0&&nJ(t,n)?Yq(e,!0):r??Yq(e)}),r=eJ(n);return{active:[...n].reverse().find(e=>e.status===`running`),calls:n,durationMs:r===`running`?void 0:tJ(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}`:$q(n),tools:e}}function iJ(e,t=new Set){let n=[],r=[],i=[],a=()=>{let[e,...t]=r;e!==void 0&&n.push(rJ([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`&&!QG(o)&&r.length>0){i.push(o);continue}a(),n.push(o)}return a(),n}var aJ=Object.freeze({mode:`default`,overrides:new Map});function oJ(e){return e.status!==`completed`}function sJ(e,t){return t?e.calls:e.calls.slice(-3)}function cJ(e){return e.status===`error`&&e.recovered!==!0}function lJ(e,t,n){let r=e.overrides.get(t);return r===void 0?e.mode==="default"?n:e.mode===`expanded`:r}function uJ(e,t,n){let r=new Map(e.overrides);return r.set(t,!lJ(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 fJ=()=>void 0;function pJ(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 hJ(e,t){return{args:XG.parse(e.arguments),id:e.id,kind:`tool`,name:e.name,startedAt:t,status:`unknown`}}function gJ(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 _J(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(hJ(i,e.timestamp));return{text:t,thinking:n,tools:r}}function vJ(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 yJ(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 bJ(e,t,n){let r=_J(t),i=vJ(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 xJ(e,t,n){for(let r of n.items)r.kind===`tool`&&t.set(r.id,e.length),e.push(r)}function SJ(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 CJ(e,t=[],n,r=gM,i=fJ,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:mJ(t.content),author:r(e.meta),origin:e.origin};c.push(pJ(a,e.requestId??i(n)));break}case`assistant`:{let n=bJ(e.id,t,r(e.meta));p=n.model,m+=n.usage.tokens,h+=n.usage.cost,xJ(c,l,n);break}case`toolResult`:if(SJ(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=iJ(c,_),b=new Map;for(let e of y){if(e.kind===`assistant_message`&&!QG(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`&&!QG(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=yJ(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:RG(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 wJ(e,t,n,r=[],i=gM){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(pJ(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?[]:[gJ(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 TJ=Object.freeze({observation:`connecting`,snapshot:void 0,lastReplyAt:void 0,latestPrompt:void 0}),EJ=200,DJ=400;function OJ(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*kJ(e,t){yield{kind:`opening`};let n=await e.watch({limit:EJ}),r,i=()=>(r??=n.close(),r),a=()=>{i().catch(e=>{eq(`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=Ux(n.changes,e=>e).pipe(qx({duration:vM,orElse:()=>Rx(Error(`Session feed is connected but silent; the service may be busy`))}),iS);for await(let t of i)r=YG(r,t),r.messages.length>DJ?(r=await e.read({limit:EJ}),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 AJ(e,t){if(t.kind===`opening`)return{...e,observation:`connecting`};if(t.kind===`snapshot`)return{observation:`live`,snapshot:t.value,lastReplyAt:Date.now(),latestPrompt:OJ(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`)?OJ(n.messages,e.latestPrompt):e.latestPrompt}}function jJ(e){return av({queryKey:[`shiitake-session`,e.address],queryFn:iv({streamFn:({signal:t})=>kJ(e,t),reducer:AJ,initialValue:TJ,refetchMode:`append`}),refetchOnMount:`always`,retry:!1,staleTime:1/0})}function MJ(e,t,n){e.setQueryData(jJ(t).queryKey,{observation:`connecting`,snapshot:n,lastReplyAt:void 0,latestPrompt:OJ(n.messages)})}function NJ(e,t=null){let n={before:t,newerBefore:[],newerOverflow:!1};return ov({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 PJ(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 FJ(e){let t=new Map;for(let n of e.bindings)t.set(n.commandId,[...t.get(n.commandId)??[],PJ(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 IJ(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?PJ(n.binding):`${e.keys}, ${PJ(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 LJ(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 RJ(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:LJ(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 zJ(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 BJ(e,t,n,r){return e.map(e=>({entry:e,match:zJ(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 VJ=[`help`,`login`,`model`];function HJ(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:BJ(e.filter(e=>e.availability.status===`available`&&(r.length===0?e.category===(n.idleCategory??`Conversation`)||VJ.includes(e.alias):e.category!==`Advanced`||e.alias.toLocaleLowerCase().startsWith(r.toLocaleLowerCase()))),e=>e.alias,r,e=>{let t=VJ.indexOf(e.alias);return r.length===0&&t>=0?t-VJ.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 UJ=new WeakMap;function WJ(e){return e.status===`handled`&&ze({cancelled:or(!0)}).safeParse(e.result).success}async function GJ(e,t,n,r,i){let a=RJ(FJ(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=UJ.get(t)??new Map;UJ.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:hv()};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`&&!WJ(e)&&c.delete(o.commandId),e):e);return u.running=d,d}var KJ=5e3,qJ=`Too late: that message already started`;function JJ(e){return e instanceof Error?e.message:`Could not recall queued message`}function YJ(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.`})},KJ)});o=c(r,l).catch(e=>({kind:`uncertain`,message:JJ(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:JJ(e)}),`uncertain`}return n=void 0,s({kind:`too_late`,message:qJ}),`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:JJ(e)})}return`uncertain`}return{get state(){return t},recall:l,dispose:()=>{r=!0,a?.()}}}var XJ=ki(D({type:or(`image`),data:j(),mimeType:j()})).readonly(),ZJ=Zn([`steer`,`followUp`]),QJ=D({commandId:j(),requestId:j(),text:j(),images:XJ.optional(),delivery:ZJ}),$J=D({status:Zn([`queued-local`,`admitting`]),requestId:j().min(1),content:j(),submittedDraft:j(),delivery:ZJ,images:XJ.optional(),restoreDraft:Si()}),eY=D({draft:j(),images:XJ.optional(),delivery:ZJ.optional(),recall:QJ.optional(),pending:ki($J).max(32)});function tY(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){eq(`discard obsolete draft journal`,e)}}try{let e=t.getItem(n);return e===null?{draft:``,pending:[]}:eY.parse(JSON.parse(e))}catch(e){return eq(`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 nY=Object.freeze([]),rY=Object.freeze([]),iY=Object.freeze([]),aY=Object.freeze([]),oY=Object.freeze([]),sY=Object.freeze({}),cY=Object.freeze({total:0,hasMore:!1,prompts:Object.freeze([])}),lY=Object.freeze({status:`connecting`}),uY=Object.freeze({status:`live`}),dY=32;function fY(e){return e instanceof Error&&e.message.trim().length>0?e.message:`Prompt admission failed`}function pY(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 hY(e,t,n){if(e===void 0)return`connecting`;let r=NG(e),i=IG(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 gY(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 _Y(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 vY(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 yY(e,t,n,r,i,a,o,s,c){let l=tY(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=TG(()=>jJ(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=EG(t=>NJ(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 M_||eq(`read older Session history`,e)})}),ee=$(null,(n,r)=>{r(v,void 0),t.resetQueries({queryKey:NJ(e).queryKey,exact:!0})}),T=$(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 M_||eq(`read newer Session history`,e)})}}),te=$(null,(e,t)=>{e(v)===void 0&&t(v,e(g))}),ne=$(e=>{let t=e(b),n=e(g)?.messages??nY,r=t.data?.pages.flatMap(e=>e.messages)??nY,i=e(v)?.messages??nY;return r.length===0?i.length===0?n:BG(i,n):e(C)?r:BG(BG(r,i),n)}),re=$(e=>{let t=e(b),n=e(g)?.compactions??rY,r=t.data?.pages.flatMap(e=>e.compactions??rY)??rY,i=e(v)?.compactions??rY;return r.length===0?i.length===0?n:UG(i,n):e(C)?r:UG(UG(r,i),n)}),E=$(e=>{let t=e(b),n=e(g)?.compactionNotices??iY,r=t.data?.pages.flatMap(e=>e.compactionNotices??iY)??iY,i=e(v)?.compactionNotices??iY;return r.length===0?i.length===0?n:WG(i,n):e(C)?r:WG(WG(r,i),n)}),ie=$(e=>e(h).data?.latestPrompt?.commandId??gY(e(ne))),ae=$(e=>e(g)?.pending??cY),oe=$(new Set),se=$(void 0),D=$(e=>{let t=e(ae),n=e(oe),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)}}),ce=$(null,(e,t)=>{let n=e(oe),r=new Set(e(ae).prompts.map(({commandId:e})=>e)),i=new Set([...n].filter(t=>t===e(se)||r.has(t)));i.size!==n.size&&t(oe,i)}),le=$(e=>e(g)?.extensions??sY),ue,de=$(e=>{let t=e(h),n=e(g)?.activity;if(t.isError||t.data?.observation!==`live`||n?.queue.state!==`running`||n.activeTool===null){ue=void 0;return}return ue?.queue.state===`running`&&ue.queue.commandId===n.queue.commandId&&ue.activeTool===n.activeTool||(ue=n),ue}),fe=$(new Map),pe=$(e=>{let t=e(fe);return e=>t.get(e)}),me=$(e=>{let t=e(ne),r=e(re),i=e(E),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 CJ(t,r,e(de),n,e(pe),i,u,s)}),he=$(u.draft),ge=$(u.images),O=$(u.delivery),_e=$(u.recall),ve=$({kind:`idle`}),ye,be=$(0),xe=$(u.pending),Se=$(null,(e,t,n)=>{i.status!==`unavailable`&&l.write({draft:n?.draft??e(he),images:n?.draftPayload===void 0?e(ge):n.draftPayload.images,delivery:n?.draftPayload===void 0?e(O):n.draftPayload.delivery,recall:n?.recall===null?void 0:n?.recall??e(_e),pending:(n?.admissions??e(xe)).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}]:[])})}),Ce=$(null,(t,n)=>t(se)===void 0?(ye??=YJ({session:{latestPending:()=>e.latestPending(),cancel:t=>e.command({type:`cancel`,...t})},recovery:t(_e),emptyDraftRevision:()=>t(he)===``&&(t(ge)?.length??0)===0?t(be):void 0,reserve:e=>{n(Se,{recall:e}),n(_e,e)},forget:()=>{n(Se,{recall:null}),n(_e,void 0)},restore:(e,r)=>t(be)!==r||t(he)!==``||(t(ge)?.length??0)!==0?!1:(n(Se,{draft:e.text,draftPayload:{images:e.images,delivery:e.delivery},recall:null}),n(_e,void 0),n(ge,e.images),n(O,e.delivery),n(he,e.text),n(be,e=>e+1),!0),onState:e=>{n(ve,e),(e.kind===`too_late`||e.kind===`uncertain`)&&r.toast({variant:`warning`,message:e.message})}}),ye.recall()):Promise.resolve(`ignored`)),we=$(void 0),Te=$(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(Se),{status:`saved`}}catch(e){return{status:`failed`,reason:fY(e)}}}),Ee=$(e=>new Set([...e(me).commandIds,...e(ae).prompts.map(({commandId:e})=>e),...e(g)?.terminals.map(({commandId:e})=>e)??[]])),De=$(e=>{let t=e(Ee);return e(xe).filter(e=>e.status===`failed`||e.commandId===void 0||!t.has(e.commandId))}),Oe=$(null,(e,t)=>{let n=e(Ee),r=new Map([...e(ne).flatMap(({id:e,requestId:t,commandId:n})=>t===void 0?[]:[[t,n??e]]),...e(ae).prompts.map(({requestId:e,commandId:t})=>[e,t])]);for(let n of e(xe)){let e=r.get(n.requestId);e!==void 0&&t(fe,t=>new Map(t).set(e,n.requestId))}t(xe,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(Se,{admissions:i})}catch(e){eq(`save reconciled draft`,e)}return i.length===e.length?e:i})}),k=$(void 0),ke=$(null,(e,t,n)=>{try{t(Se,{draft:n})}catch(e){eq(`save current draft`,e),r.toast({variant:`error`,message:`Draft not saved: ${fY(e)}`})}e(he)!==n&&t(be,e=>e+1),t(he,n),t(k,void 0)}),Ae=$(null,(e,t,n)=>{let i=n===void 0||n.length===0?void 0:n;try{t(Se,{draftPayload:{images:i,delivery:e(O)}})}catch(e){eq(`save draft images`,e),r.toast({variant:`error`,message:`Images not saved: ${fY(e)}`})}t(ge,i),t(be,e=>e+1),t(k,void 0)}),je=$(null,(e,t,n)=>{e(be)===n.revision&&e(he)===n.draft&&(t(Se,{draft:``}),t(he,``))}),Me=DG(()=>({mutationFn:t=>e.command({type:`cancel`,commandId:t})}),()=>t),Ne,Pe=$(null,(t,n,i)=>{if(!d||t(ve).kind===`recalling`)return Promise.resolve();if(Ne!==void 0)return Ne;if(t(oe).has(i)||!t(ae).prompts.some(e=>e.commandId===i))return Promise.resolve();n(oe,new Set(t(oe)).add(i)),n(se,i);let a=()=>{let e=new Set(t(oe));e.delete(i),n(oe,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(se,void 0),n(ce))});return Ne=o,o}),Fe=$(e=>{if(e(C))return[];let t=e(g),r=e(D);return wJ(e(me),t?.progress??null,r.prompts,e(De),n)}),Ie=$(e=>{let t=e(me),n={pendingHasMore:e(ae).hasMore,queued:e(D),cancellingQueued:e(se)!==void 0||e(ve).kind===`recalling`,positionAnchors:t.positionAnchors,commandAnchors:t.commandAnchors,hasMoreHistory:e(x),hasNewerHistory:e(C),loadingOlderHistory:e(S),settled:Zq(t.items,e(de)===void 0?[]:e(g)?.toolOutput??[]),tail:e(Fe)};return t.model===void 0||t.usage===void 0?n:{...n,model:t.model,usage:t.usage}}),Le=$(e=>{let t=e(De),n=e(g),r=e(ae),i=e(xe).find(({requestId:t})=>t===e(we)),a=r.prompts.length>0||t.some(({status:e})=>e!==`failed`);if(i?.status===`failed`&&n!==void 0&&IG(NG(n))===`idle`&&!a)return`admission`;if(i?.status===`admitting`||i?.status===`accepted`&&!e(me).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(ie),s=n?.terminals.find(({commandId:e})=>e===o)?.outcome;return s===`completed`?void 0:s}),Re=$(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`?uY:lY}),ze=$(e=>e(Re).status===`unavailable`?`disconnected`:e(Re).status===`connecting`?`connecting`:hY(e(g),e(De),e(Le))),Be=$(e=>e(g)?.context),Ve=$(e=>{let t=e(g)?.activity.queue;return t?.state===`idle`?void 0:t?.commandId}),He,Ue=$(e=>{let t=e(Re);if(t.status===`unavailable`)return{kind:`disconnected`,cause:t.reason};if(t.status===`connecting`)return{kind:`connecting`};if(e(Le)===`admission`)return{kind:`error`,cause:([...e(xe)].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=NG(n);return He!==void 0&&FG(He,r)?He:(He=r,r)}),We=$(null,(t,n,{admission:i,consumeDraft:a})=>{try{n(Se,a?{draft:``,draftPayload:{}}:{draft:t(he)})}catch(e){eq(`save pending draft before send`,e),n(xe,e=>e.filter(({requestId:e})=>e!==i.requestId)),r.toast({variant:`error`,message:`Not sent: ${fY(e)}`});return}if(a&&(n(ge,void 0),n(O,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(xe).some(({requestId:e,status:t})=>e===i.requestId&&t===`admitting`))){if(e.status===`recorded`){n(xe,e=>e.filter(e=>e.requestId!==i.requestId)),n(Se);return}n(fe,t=>new Map(t).set(e.commandId,i.requestId)),n(xe,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(Se)}}).catch(e=>{if(d){if(e instanceof AM&&e.cause===`secret_in_prompt`){n(Ge,i);return}p.set(i.requestId,fY(e)),n(Ke)}})}),Ge=$(null,(e,t,n)=>{let i=e(xe);if(!i.some(({requestId:e,status:t})=>e===n.requestId&&t===`admitting`))return;let a=i.filter(({requestId:e})=>e!==n.requestId),o=e(he),s=n.restoreDraft?o===``?n.submittedDraft:`${o}\n\n${n.submittedDraft}`:o,l=n.restoreDraft?[...e(ge)??[],...n.images??[]]:e(ge);try{t(Se,{draft:s,draftPayload:{images:l,delivery:e(O)},admissions:a})}catch(e){eq(`restore draft after secret refusal`,e)}t(ge,l),t(xe,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})}),Ke=$(null,(t,n)=>{if(d)for(let i of t(xe)){let a=p.get(i.requestId);i.status!==`admitting`||a===void 0||m.has(i.requestId)||(m.add(i.requestId),pY(e.withdraw(i.requestId)).then(e=>{if(!d||!t(xe).some(({requestId:e,status:t})=>e===i.requestId&&t===`admitting`))return;if(e.status===`accepted`){n(fe,t=>new Map(t).set(e.commandId,i.requestId)),n(xe,t=>t.map(t=>t.requestId===i.requestId?{...t,status:`accepted`,commandId:e.commandId}:t)),n(Se),n(Oe);return}let o=t(he),s=i.restoreDraft?o===``?i.submittedDraft:`${o}\n\n${i.submittedDraft}`:o,c=t(xe).map(e=>e.requestId===i.requestId?{...e,status:`failed`,error:a}:e),l=i.restoreDraft?[...t(ge)??[],...i.images??[]]:t(ge);n(Se,{draft:s,draftPayload:{images:l,delivery:t(O)},admissions:c}),n(ge,l),n(xe,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: ${fY(e)}`})}).finally(()=>{m.delete(i.requestId)}))}}),qe=$(null,(e,t)=>{let n=e(Re).status,r=e(xe);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(xe,t=>t.map(t=>t.requestId===n.requestId?e:t)),t(We,{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(Ke)},3e4)));(n===`live`||n===`unavailable`)&&t(Ke)}),Je=$(null,(e,t)=>(d=!0,t(ve,{kind:`idle`}),t(qe),()=>{d=!1,ye?.dispose(),ye=void 0;for(let e of f.values())clearTimeout(e);f.clear()})),Ye=$(null,(e,t,n=`steer`)=>{let r=e(he),i=r;if(e(ve).kind===`recalling`||i.trim()===``&&(e(ge)?.length??0)===0)return;let a=e(De),o=a.filter(({status:e})=>e!==`failed`),s=e(Re).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(O)??n,images:e(ge),requestId:hv(),submittedDraft:r,restoreDraft:!0,status:s?`queued-local`:`admitting`};t(xe,[...a,c]),t(we,c.requestId),t(k,void 0),t(We,{admission:c,consumeDraft:!0})}),Xe=$(null,async(e,t,n)=>{let r={draft:e(he),revision:e(be)},i=await n(r.draft,()=>{t(je,r)});return i?.status===`handled`&&!WJ(i)&&t(je,r),i}),Ze=$(null,(e,t)=>{let n=e(De);if(e(Le)===`interrupted`||e(Le)===`failed`){let r=e(g),i=e(ie),a=e(h).data?.latestPrompt;if(r===void 0||a===void 0||a.commandId!==i)return;let o=a.text,s=e(he)===o&&_Y(e(ge),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:hv(),submittedDraft:o,restoreDraft:s,status:`admitting`};t(xe,[...e(xe),c]),t(we,c.requestId),t(k,void 0),t(We,{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(he)===r.submittedDraft&&_Y(e(ge),r.images),a={content:r.content,delivery:r.delivery,images:r.images,requestId:hv(),submittedDraft:r.submittedDraft,restoreDraft:i,status:`admitting`};t(xe,e=>e.map(e=>e.requestId===r.requestId?a:e)),t(we,a.requestId),t(k,void 0),t(We,{admission:a,consumeDraft:i})}),Qe=$(null,(e,t,n)=>{let r=e(xe),i=r.filter(e=>e.requestId!==n||e.status!==`failed`);i.length!==r.length&&(t(xe,i),e(we)===n&&t(we,i.at(-1)?.requestId))}),$e,et=$(null,e=>{if($e!==void 0)return $e;let t=e(g)?.activity.queue;if(t?.state!==`running`)return Promise.resolve();let n=e(Me).mutateAsync(t.commandId).then(()=>void 0).finally(()=>{$e===n&&($e=void 0)});return $e=n,n}),tt;return{cancelQueuedAtom:Pe,reconcileQueuedCancellationAtom:ce,abortAtom:Me,draftImagesAtom:ge,recallStateAtom:ve,recallAtom:Ce,commandIdAtom:Ve,contextAtom:Be,admissionErrorAtom:k,admissionsAtom:De,cancelAtom:et,checkpointDraftAtom:Te,draftAtom:he,dismissFailedAtom:Qe,extensionsAtom:le,failureAtom:Le,jumpToLatestAtom:ee,loadOlderHistoryAtom:w,loadNewerHistoryAtom:T,lastReplyAtAtom:_,observationAtom:Re,observedCommandIdsAtom:Ee,rawAdmissionsAtom:xe,maintainRecoveryAtom:qe,mountRecoveryAtom:Je,pinVisibleHistoryAtom:te,queryAtom:h,reconcileAdmissionsAtom:Oe,reconnectAtom:$(null,n=>{let r=n(Re);if(r.status!==`unavailable`)return Promise.resolve({kind:`nothing_to_reconnect`,state:r.status===`live`?`connected`:`connecting`});if(tt!==void 0)return tt;let i=t.getQueryCache().find({queryKey:jJ(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 tt=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(jJ(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(()=>{tt=void 0}),tt}),retryAtom:Ze,setDraftAtom:ke,setImagesAtom:Ae,sendAtom:Ye,snapshotAtom:g,statusAtom:ze,viewStateAtom:Ue,submitCommandAtom:Xe,timelineAtom:Ie}}var bY=(0,M.createContext)(null);function xY(){let e=(0,M.useContext)(bY);if(e===null)throw Error(`Parakeet hooks require a ParakeetProvider`);return e}function SY(e){let{keySettings:t}=xY();(0,M.useEffect)(()=>{if(e!==void 0)return t.current=e,()=>{t.current===e&&(t.current=void 0)}},[t,e])}function CY(e){let{store:t}=xY(),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 wY(e){let{store:t}=xY();return(0,M.useCallback)((...n)=>t.set(e,...n),[e,t])}function TY({children:e,session:t,clients:n=aY,interactionStore:r,authorOf:i=gM,onToast:a,draftStorage:o,draftIdentity:s}){let c=Kg(),l=(0,M.useMemo)(()=>vY(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??IW(),n=$(oY),a={current:void 0},o=e=>e.kind!==`user_message`||e.origin===void 0||!d.has(e.origin.extensionId);return{atoms:yY(t,c,i,e,l,u,n,o,()=>a.current),session:t,store:_G(),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`&&eq(`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=PW(n,(e,t)=>{eq(`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)(bY.Provider,{value:f,children:e})}function EY(){let{atoms:e}=xY(),t=CY(e.timelineAtom),n=wY(e.loadOlderHistoryAtom),r=wY(e.loadNewerHistoryAtom),i=wY(e.jumpToLatestAtom),a=wY(e.pinVisibleHistoryAtom),o=wY(e.cancelQueuedAtom),{shown:s}=xY(),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 DY(){let{atoms:e}=xY(),t=CY(e.draftAtom),n=CY(e.draftImagesAtom),r=CY(e.recallStateAtom),i=wY(e.recallAtom),a=CY(e.failureAtom),o=CY(e.admissionErrorAtom),s=wY(e.setDraftAtom),c=wY(e.setImagesAtom),l=wY(e.checkpointDraftAtom),u=wY(e.sendAtom),d=wY(e.submitCommandAtom),f=wY(e.retryAtom),p=(0,M.useCallback)(()=>{f()},[f]),m=wY(e.dismissFailedAtom),h=wY(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 OY(){let{atoms:e}=xY();return wY(e.dismissFailedAtom)}function kY(){return xY().session}function AY(){return CY(xY().atoms.extensionsAtom)}function jY(){let{atoms:e}=xY(),t=CY(e.commandIdAtom),n=CY(e.statusAtom),r=CY(e.viewStateAtom),i=CY(e.observationAtom),a=wY(e.reconnectAtom),o=CY(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 MY(){return CY(xY().contributions)}function NY(){return xY().interactions}var PY={neutral:`alert-neutral`,primary:`alert-primary`,secondary:`alert-secondary`,accent:`alert-accent`,success:`alert-success`,info:`alert-info`,warning:`alert-warning`,error:`alert-error`},FY=(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`,PY[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]})}),IY={2:`h2`,3:`h3`,4:`h4`};function LY(e,t){let{reduced:n}=t,r=e&&!n,i=Xw(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 RY=(0,q.jsx)(TT,{decorative:!0,pace:`idle`,size:`md`,tone:`primary`,variant:`wander`}),zY=(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=Yw(h),_=LY(d===`speech`,g)&&!s,v=IY[i],y=l??(d===`panel`?`blobs`:void 0),b=u?u({speaking:_,thinking:s}):y===`blobs`?RY: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)(OT,{"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)(OT,{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 BY({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)(zY,{...l,actions:a?(0,q.jsx)(OT,{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)(cM,{className:`caps-setup-notice-dot`,glyph:`dot`,tone:`warning`})}):(0,q.jsx)(`div`,{className:`caps-setup-notice-frame`,children:(0,q.jsx)(FY,{...l,action:(0,q.jsxs)(`span`,{className:`caps-setup-notice-actions`,children:[a?(0,q.jsx)(OT,{size:`sm`,variant:`ghost`,onClick:a.onSelect,children:a.label}):null,(0,q.jsx)(OT,{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)(cM,{glyph:`dot`,tone:`warning`}),i]}),tone:`warning`})})}var VY=M.createContext(void 0);function HY(e){let t=M.useContext(VY);if(!e&&t===void 0)throw Error(IT(27));return t}var UY=M.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=HY(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return hE(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:BE,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),WY=M.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=HY(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=VD({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,uO(qE,e.nativeEvent))}return hE(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),GY=M.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=HY(),c=lO(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),hE(`p`,e,{ref:t,props:[{id:c},o]})}),KY=M.createContext(void 0);function qY(){let e=M.useContext(KY);if(e===void 0)throw Error(IT(26));return e}var JY=`--nested-dialogs`,YY=`data-nested-dialog-open`,XY={...zE,...EE,nestedDialogOpen(e){return e?{[YY]:``}:null}},ZY=M.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=HY(),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`);qY(),CO({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?NA(c.context.popupRef):o,w=g>0,ee=c.useStateSetter(`popupElement`),T=hE(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...MA,hidden:!m,onKeyDown(e){Cj.has(e.key)&&e.stopPropagation()},style:{[JY]:g}},s],ref:[t,c.context.popupRef,ee],stateAttributesMapping:XY});return(0,q.jsx)(TA,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:T})}),QY=M.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=HY(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,q.jsx)(KY.Provider,{value:n,children:(0,q.jsxs)(sA,{ref:t,...r,children:[a&&o===!0&&(0,q.jsx)(Tj,{ref:i.context.internalBackdropRef,inert:wj(!s)}),e.children]})}):null});function $Y({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=kA(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=IO(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||PO(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return Ij(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{!e.select(`open`)&&!e.select(`mounted`)||(u(t),f(n))}),FD(()=>{!r&&!i&&(u(0),f(0))},[r,i]),FD(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),WA(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var eX={...xj,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},tX=class extends fj{constructor(e,t,n){let r=new KA,i=nX(e,r,t,n);super(i,rX(r),eX)}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(RA(this.state,e,t.trigger)))}};function nX(e,t,n,r=!1){return{...hj(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 rX(e){return{popupRef:M.createRef(),backdropRef:M.createRef(),internalBackdropRef:M.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function iX(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=HY(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=PA((e,t)=>new tX({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`);GA(b,x),HA(b);let{forceUnmount:w}=UA(x,b);M.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,uO(nD))}),[w,b]);let ee=x||S||u!=null;return(0,q.jsxs)(VY.Provider,{value:b,children:[u&&(0,q.jsx)(FA,{handle:u,store:b}),ee&&(0,q.jsx)($Y,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var aX=rj(function(e){return iX(`dialog`,e)}),oX=M.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=HY(),c=lO(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),hE(`h2`,e,{ref:t,props:[{id:c},o]})}),sX=ij(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=HY(!0),f=Sj(l)??d;if(!f)throw Error(IT(79));let p=lO(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=M.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=VA(p,_,f,{payload:c}),{getButtonProps:b,buttonRef:x}=VD({disabled:a,native:o}),S=EA(m),C=zj(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),w={disabled:a,open:h},ee=f.useState(`triggerProps`,y);return hE(`button`,e,{state:w,ref:[x,t,v,_],props:[S.reference,ee,C,{[$k]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,b],stateAttributesMapping:LE})}),cX=(0,M.createContext)(null);function lX({children:e,interactionOwner:t=`local`,modal:n=!0,onOpenChange:r,...i}){return(0,q.jsx)(cX.Provider,{value:{interactionOwner:t,modal:n},children:(0,q.jsx)(aX,{...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 uX(){let e=(0,M.useContext)(cX);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)(sX,{...n,className:t=>Y(`btn`,Gw(e,t)),ref:r,type:t})}),fX=(0,M.forwardRef)(function({container:e,...t},n){let r=Jj(`dialog`);return e==null&&r===null?null:(0,q.jsx)(QY,{...t,container:e??r,ref:n})}),pX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(UY,{...t,ref:n,className:t=>Y(`caps-dialog-backdrop fixed inset-0 bg-black/40`,Gw(e,t))})}),mX=(0,M.forwardRef)(function({className:e,finalFocus:t,size:n=`default`,...r},i){let a=uX();return(0,q.jsx)(ZY,{...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`,Gw(e,t)),finalFocus:a.interactionOwner===`host`?!1:t??!0,ref:i})}),hX=(0,M.forwardRef)(function({container:e,keepMounted:t=!0,forceBackdrop:n=!1,className:r,size:i=`default`,...a},o){let{modal:s}=uX();return(0,q.jsxs)(fX,{container:e,keepMounted:t,children:[s===!0?(0,q.jsx)(pX,{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`,Gw(r,e)),ref:o})]})});function gX({className:e,...t}){return(0,q.jsx)(`div`,{...t,className:Y(`flex justify-end gap-sm`,e)})}function _X({className:e,...t}){return(0,q.jsx)(`div`,{...t,className:Y(`flex flex-col gap-sm`,e)})}var vX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(oX,{...t,className:t=>Y(`text-lg font-semibold`,Gw(e,t)),ref:n})}),yX=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(GY,{...t,className:t=>Y(`text-sm text-base-content`,Gw(e,t)),ref:n})}),bX=(0,M.forwardRef)(function({className:e,type:t=`button`,...n},r){return(0,q.jsx)(WY,{...n,className:t=>Y(`btn btn-ghost`,Gw(e,t)),ref:r,type:t})}),xX=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),SX=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),CX={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`},wX=(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,...CX,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:SX(`lucide`,i),...s},[...o.map(([e,t])=>(0,M.createElement)(e,t)),...Array.isArray(a)?a:[a]])),TX=(e,t)=>{let n=(0,M.forwardRef)(({className:n,...r},i)=>(0,M.createElement)(wX,{ref:i,iconNode:t,className:SX(`lucide-${xX(e)}`,n),...r}));return n.displayName=`${e}`,n},EX=TX(`Check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),DX=TX(`ChevronDown`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),OX=TX(`Minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),kX=TX(`Plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),AX=TX(`X`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function jX(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 MX(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 NX(e,t){if(e===void 0)throw Error(`Unexpected undefined${t?`: ${t}`:``}`);return e}var PX=(e,t)=>Math.abs(e-t)<1.01,FX=(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)}})},IX,LX=()=>{if(IX!==void 0)return IX;if(typeof navigator>`u`)return IX=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return IX=!0;let e=navigator.maxTouchPoints;return IX=navigator.platform===`MacIntel`&&e!==void 0&&e>0},RX=e=>{let{offsetWidth:t,offsetHeight:n}=e;return{width:t,height:n}},zX=e=>e,BX=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},VX=(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(RX(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(RX(n))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return a.observe(n,{box:`border-box`}),()=>{a.unobserve(n)}},HX={passive:!0},UX=typeof window>`u`||`onscrollend`in window,WX=(e,t,n)=>{let r=e.scrollElement;if(!r)return;let i=e.targetWindow;if(!i)return;let a=e.options.useScrollendEvent&&UX,o=0,s=a?null:FX(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,HX),a&&r.addEventListener(`scrollend`,u,HX),()=>{r.removeEventListener(`scroll`,l),a&&r.removeEventListener(`scrollend`,u),s?.cancel()}},GX=(e,t)=>WX(e,t,t=>{let{horizontal:n,isRtl:r}=e.options;return n?t.scrollLeft*(r&&-1||1):t.scrollTop}),KX=(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`]},qX=(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})},JX=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:zX,rangeExtractor:BX,onChange:()=>{},measureElement:KX,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=MX(()=>(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,!(!LX()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};e.addEventListener(`touchstart`,t,HX),e.addEventListener(`touchend`,n,HX),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&&(LX()&&(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=MX(()=>[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=MX(()=>[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=jX(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=MX(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(e,t,n,r)=>e.length===0||t===0?(this.range=null,null):(this.range=ZX(e,t,n,r,r===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=MX(()=>{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=MX(()=>[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 NX(t[YX(0,t.length-1,r?e=>n[e*2]:e=>NX(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:LX()&&(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&&PX(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()}},YX=(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 XX(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 ZX(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=XX(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=YX(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 QX=typeof document<`u`?M.useLayoutEffect:M.useEffect;function $X({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,Gv.flushSync)(i):i()),(o=r.onChange)==null||o.call(r,t,n)}},[l]=M.useState(()=>{let e=new JX(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),QX(()=>l._didMount(),[]),QX(()=>(o(l),l._willUpdate())),QX(()=>{s(l)}),l}function eZ(e){return $X({observeElementRect:VX,observeElementOffset:GX,scrollToFn:qX,...e})}var tZ=LS({keyCode:HS(229)});function nZ(e){return e.nativeEvent.isComposing||Li(tZ,e.nativeEvent).success}var rZ=(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})}),iZ={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`},aZ={blurStdDeviation:.22,alphaSlope:18,alphaIntercept:-8};function oZ({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=aT();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=Jw(n.current),c=Qj(s,{ease:`inCubic`,duration:160}),l=tr(n.current,{d:{to:iZ[e],...o?Xj:Qj(s,{ease:`outCubic`,duration:200})},"stroke-dashoffset":{to:+!t,...o?Xj:t?Qj(s,{ease:`inOutSine`,duration:260}):c},"stroke-width":o?{to:t?2.4:0,duration:0}:t&&!r?[{to:2.2,...Qj(s,{ease:`outCubic`,duration:65})},{to:2.4,delay:Xw(s,120),...Zj(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)(fT,{id:`${t}-shadow`}),(0,q.jsx)(pT,{id:`${t}-inset`}),(0,q.jsx)(hT,{id:`${t}-goo`,values:aZ}),(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:iZ[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 sZ=(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)(oZ,{state:m}):n]})}),cZ=(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)(cZ,{...n,type:`search`,className:t,ref:r})]})});function lZ({getKey:e,isDisabled:t=()=>!1,items:n}){let r=(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]),[i,a]=(0,M.useState)(null);(0,M.useEffect)(()=>{i!==null&&!r.some(t=>e(t)===i)&&a(null)},[i,r,e]);let o=r.find(t=>e(t)===i),s=o?r.findIndex(t=>e(t)===i):-1;return{activeIndex:s,activeItem:o,activeKey:i,enabledItems:r,move:(t,n)=>{if(r.length===0)return;let i=n?n===`start`?0:r.length-1:s<0?t>0?0:r.length-1:(s+t+r.length)%r.length,o=r[i];o&&a(e(o))},setActiveKey:a}}var uZ=(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 fZ=(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})]})}),pZ=(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)})}),hZ=(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 gZ(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=aT(),[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(!eT(n)){e||l(!1);return}let i=Jw(n),a=`translateY(${String(i.distance)}px)`,c=$w(i,i.ease),d=n.getBoundingClientRect().height,f=gZ(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:$w(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 _Z=(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=aT(),[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(!eT(e)){d([]);return}let r=f.current,i=e.getBoundingClientRect(),a=Jw(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:$w(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:$w(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:$w(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 vZ({children:e,...t}){let[n,r]=(0,M.useState)(e);return e&&e!==n&&r(e),(0,q.jsx)(_Z,{...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 yZ({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)(vZ,{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 bZ=(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})})}),xZ={2:`h2`,3:`h3`,4:`h4`},SZ=(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=xZ[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})]})}),CZ=(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)(vZ,{id:`${u}-error`,children:r})]})});function wZ(e){let t=[];return M.Children.forEach(e.props.children,e=>{(0,M.isValidElement)(e)&&e.type!==hZ&&t.push(e)}),t[0]??null}var TZ=(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?wZ(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,T=a?(0,q.jsx)(pZ,{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,te=a||n?(0,q.jsxs)(`div`,{className:`caps-field-copy`,children:[T,n?(0,q.jsx)(`p`,{className:`caps-field-description`,id:v,children:n}):null]}):null,ne=i?(0,q.jsxs)(`div`,{className:`caps-field-lead`,children:[(0,q.jsx)(`span`,{className:`caps-field-icon`,"aria-hidden":`true`,children:i}),te]}):te;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:[ne,ee]}):c===`inline`?(0,q.jsxs)(`div`,{className:`caps-field-row`,children:[ee,ne]}):(0,q.jsxs)(q.Fragment,{children:[ne,ee]}),(0,q.jsx)(vZ,{id:y,children:r})]})});function EZ(e){let t=String(e),n=t.indexOf(`.`);return n===-1?0:t.length-n-1}var DZ=`M 9.86 38.14 A 20 20 0 1 1 38.14 38.14`,OZ=6,kZ=new Map([[`ArrowUp`,1],[`ArrowDown`,-1],[`PageUp`,10],[`PageDown`,-10]]),AZ=(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=EZ(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)},T=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)},te=s!==void 0&&x!==null&&x<=s,ne=o!==void 0&&x!==null&&x>=o,re=r===!0,E=(0,M.useRef)(null),ie=s!==void 0&&o!==void 0&&o>s?((x??s)-s)/(o-s):null,ae=e=>{re||(e.currentTarget.setPointerCapture(e.pointerId),E.current={y:e.clientY,value:x??s??0})},oe=e=>{if(!E.current)return;let t=Math.trunc((E.current.y-e.clientY)/OZ),n=C(E.current.value+t*d);n!==x&&w(n)},se=()=>{E.current=null};return(0,q.jsxs)(`span`,{className:Y(`caps-number-field`,e),"data-at-max":ne||void 0,"data-at-min":te||void 0,"data-disabled":re||void 0,"data-wrap":m||void 0,children:[ie===null?null:(0,q.jsxs)(`svg`,{className:`caps-number-field-dial`,viewBox:`0 0 48 48`,"aria-hidden":`true`,focusable:`false`,onPointerDown:ae,onPointerMove:oe,onPointerUp:se,onPointerCancel:se,children:[(0,q.jsx)(`path`,{className:`caps-number-field-dial-track`,d:DZ,pathLength:100}),(0,q.jsx)(`path`,{className:`caps-number-field-dial-level`,d:DZ,pathLength:100,strokeDasharray:`${String(Math.max(.5,ie*100))} 100`})]}),(0,q.jsx)(OT,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-decrement`,"aria-label":t,"aria-controls":h.id,tabIndex:-1,disabled:re||te&&!m,onClick:()=>{T(-1)},children:(0,q.jsx)(OX,{"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=kZ.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(),T(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)(OT,{type:`button`,variant:`outline`,size:`icon`,className:`caps-number-field-increment`,"aria-label":i,"aria-controls":h.id,tabIndex:-1,disabled:re||ne&&!m,onClick:()=>{T(1)},children:(0,q.jsx)(kX,{"aria-hidden":`true`})})]})}),jZ=(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)})}),MZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,ref:n,className:Y(`caps-screen`,e)})}),NZ=(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)(jZ,{...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)(MZ,{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 PZ=yC(`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`}}),FZ=(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(PZ({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)(FZ,{...i,className:Y(`caps-centered-card`,r===`wide`&&`caps-centered-card-wide`,e),ref:a,variant:n??`surface`,...t?{density:t}:{}})})});var IZ=(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})}),LZ=(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 RZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,className:Y(`caps-card-content`,e),ref:n})}),zZ=(0,M.forwardRef)(function({className:e,...t},n){return(0,q.jsx)(`div`,{...t,className:Y(`caps-card-footer`,e),ref:n})}),BZ={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)`},VZ=`light-dark(var(--stipe-sketch-ink, #242c28), var(--stipe-art-cream, #fff4de))`,HZ=`var(--color-base-100, light-dark(#fff4de, #242c28))`;function UZ({transform:e,fill:t=VZ}){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 WZ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(UZ,{transform:`translate(25.4 19.8) rotate(-39) scale(.95 .76)`}),(0,q.jsx)(UZ,{transform:`translate(32.1 17.8) scale(.96 .95)`}),(0,q.jsx)(UZ,{transform:`translate(38.8 19.9) rotate(39) scale(.95 .77)`})]})}function GZ(){return(0,q.jsxs)(`g`,{style:{fill:BZ.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 KZ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:BZ.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:BZ.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 qZ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:BZ.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:BZ.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 JZ({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 YZ({onFigure:e=!1}){return(0,q.jsxs)(`g`,{style:{fill:e?HZ:BZ.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 XZ(){return(0,q.jsx)(`path`,{style:{fill:BZ.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 ZZ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{style:{fill:BZ.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:BZ.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:BZ.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:BZ.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 QZ(){return(0,q.jsx)(`path`,{style:{fill:BZ.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 $Z({transform:e}){return(0,q.jsx)(`path`,{style:{fill:BZ.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 eQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{fillRule:`evenodd`,style:{fill:VZ},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:BZ.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:BZ.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 tQ(){return(0,q.jsxs)(`g`,{children:[(0,q.jsx)(`path`,{fillRule:`evenodd`,style:{fill:VZ},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:BZ.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:BZ.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:BZ.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:BZ.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 nQ(){return(0,q.jsxs)(`g`,{transform:`translate(2 8) scale(.114) translate(-125 -122)`,children:[(0,q.jsx)(`path`,{style:{fill:BZ.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:BZ.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:BZ.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:BZ.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:BZ.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 rQ(){return(0,q.jsxs)(`g`,{transform:`translate(3 10) scale(.114) translate(-760 -140)`,children:[(0,q.jsx)(`path`,{style:{fill:BZ.blue},d:`M1226 153C1257 153 1273 195 1267 231Q1263 265 1237 268L1176 270V215C1176 178 1195 153 1226 153Z`}),(0,q.jsx)(`path`,{style:{fill:BZ.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:BZ.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:BZ.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 iQ(){return(0,q.jsxs)(`g`,{transform:`translate(2 7) scale(.11) translate(-1380 -96)`,children:[(0,q.jsx)(`path`,{style:{fill:BZ.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:BZ.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:BZ.inkcap},d:`M1634 456A18 18 0 1 1 1648 456V492Q1648 500 1641 500T1634 492Z`}),(0,q.jsx)(`path`,{style:{fill:BZ.inkcap},d:`M1780 391Q1786 386 1793 396C1810 420 1828 444 1827 467C1826 508 1768 510 1753 480C1741 456 1762 413 1780 391Z`})]})}var{coral:aQ,blue:oQ,mint:sQ,grape:cQ,yellow:lQ,cream:uQ,ink:dQ}=BZ,fQ={bonsai:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:`none`,stroke:sQ,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:sQ,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:oQ,cx:`31.5`,cy:`10.7`,r:`4.8`}),(0,q.jsx)(`circle`,{fill:cQ,cx:`16.6`,cy:`18.3`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:lQ,cx:`47.9`,cy:`17.7`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:lQ,cx:`12.8`,cy:`31.5`,r:`4.6`}),(0,q.jsx)(`circle`,{fill:oQ,cx:`50.9`,cy:`32.1`,r:`4.6`}),(0,q.jsx)(`path`,{fill:aQ,d:`M16 46H47.5C47.5 54 44 58 38 58H25.5C19.5 58 16 54 16 46Z`}),(0,q.jsx)(`rect`,{fill:aQ,x:`14`,y:`43`,width:`35.5`,height:`4.6`,rx:`2.3`})]}),computer:(0,q.jsx)(nQ,{}),prints:(0,q.jsx)(rQ,{}),inkcap:(0,q.jsx)(iQ,{}),vishnu:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{style:{fill:aQ},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:uQ},cx:`19`,cy:`25`,r:`4`}),(0,q.jsx)(`circle`,{style:{fill:uQ},cx:`33`,cy:`19.5`,r:`4.8`}),(0,q.jsx)(`circle`,{style:{fill:uQ},cx:`46`,cy:`28`,r:`3.4`}),(0,q.jsx)(`rect`,{style:{fill:oQ},x:`13`,y:`39`,width:`38`,height:`18`,rx:`9`}),(0,q.jsx)(`rect`,{style:{fill:uQ},x:`18.5`,y:`46.2`,width:`10`,height:`3.6`,rx:`1.8`}),(0,q.jsx)(`rect`,{style:{fill:uQ},x:`21.7`,y:`43`,width:`3.6`,height:`10`,rx:`1.8`}),(0,q.jsx)(`circle`,{style:{fill:lQ},cx:`39`,cy:`50.5`,r:`2.7`}),(0,q.jsx)(`circle`,{style:{fill:uQ},cx:`45`,cy:`45.5`,r:`2.7`})]}),generateText:(0,q.jsx)(eQ,{}),generateMedia:(0,q.jsx)(tQ,{}),buyApps:(0,q.jsxs)(`g`,{transform:`rotate(-6 32 32)`,children:[(0,q.jsx)(`circle`,{fill:lQ,cx:`32`,cy:`20`,r:`12`}),(0,q.jsx)(`circle`,{stroke:uQ,strokeWidth:`4`,cx:`32`,cy:`20`,r:`6`}),(0,q.jsx)(UZ,{fill:lQ,transform:`translate(15.5 12) rotate(-60) scale(1.1 .85)`}),(0,q.jsx)(UZ,{fill:lQ,transform:`translate(48.5 12) rotate(60) scale(1.1 .85)`}),(0,q.jsx)(`path`,{fill:oQ,d:`M10 35H54L50 53Q49 58 44 58H20Q15 58 14 53Z`}),(0,q.jsx)(`rect`,{fill:aQ,x:`5`,y:`27`,width:`54`,height:`10`,rx:`5`}),(0,q.jsxs)(`g`,{fill:uQ,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:oQ,x:`10`,y:`14`,width:`44`,height:`38`,rx:`6`}),(0,q.jsx)(`rect`,{fill:oQ,x:`5`,y:`47`,width:`54`,height:`12`,rx:`6`}),(0,q.jsx)(`rect`,{fill:uQ,x:`12`,y:`50.5`,width:`40`,height:`4.5`,rx:`2.25`}),(0,q.jsx)(`rect`,{fill:aQ,x:`2`,y:`4`,width:`60`,height:`9`,rx:`4.5`}),(0,q.jsx)(`path`,{fill:aQ,d:`M3 9H14.6V18A5.8 5.8 0 0 1 3 18Z`}),(0,q.jsx)(`path`,{fill:uQ,d:`M14.6 9H26.2V18A5.8 5.8 0 0 1 14.6 18Z`}),(0,q.jsx)(`path`,{fill:aQ,d:`M26.2 9H37.8V18A5.8 5.8 0 0 1 26.2 18Z`}),(0,q.jsx)(`path`,{fill:uQ,d:`M37.8 9H49.4V18A5.8 5.8 0 0 1 37.8 18Z`}),(0,q.jsx)(`path`,{fill:aQ,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)(KZ,{})})]}),agent:(0,q.jsxs)(`g`,{transform:`translate(32 33) scale(2.02) translate(-47.2 -41.8)`,children:[(0,q.jsx)(`path`,{fill:oQ,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)(YZ,{})})]}),list:(0,q.jsxs)(`g`,{transform:`rotate(-7 32 32)`,children:[(0,q.jsx)(`path`,{style:{fill:oQ},d:`M12 13Q6 13 6 19V50Q6 57 13 57H47Q53 57 53 50V20Q53 13 47 13Z`}),(0,q.jsx)(`path`,{style:{fill:uQ},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:aQ},d:`M39 7V18Q39 24 45 24H57Q57 22 55 20L44 9Q42 7 39 7Z`}),(0,q.jsxs)(`g`,{style:{fill:aQ},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:oQ},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)(qZ,{})}),(0,q.jsx)(UZ,{transform:`translate(38.2 18) rotate(16) scale(.95 .6)`}),(0,q.jsx)(UZ,{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)(GZ,{})}),(0,q.jsx)(`g`,{transform:`translate(32 38.6) scale(.3164)`,children:(0,q.jsx)(KZ,{})}),(0,q.jsx)(WZ,{})]}),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)(JZ,{fill:oQ})}),(0,q.jsx)(`g`,{transform:`translate(32.2 30.3) scale(.352)`,children:(0,q.jsx)(KZ,{})})]}),listAgents:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(1.04) translate(-32 -32)`,children:[(0,q.jsx)(`path`,{style:{fill:VZ},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)(YZ,{onFigure:!0})}),(0,q.jsx)(`path`,{style:{fill:aQ},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)(YZ,{})}),(0,q.jsx)(`path`,{style:{fill:oQ},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)(YZ,{})})]}),createAgents:(0,q.jsxs)(`g`,{transform:`translate(32 32) scale(1.08) translate(-32 -32)`,children:[(0,q.jsx)(`path`,{style:{fill:VZ},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)(YZ,{onFigure:!0})}),(0,q.jsx)(`path`,{style:{fill:sQ},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)(YZ,{})}),(0,q.jsx)(UZ,{fill:lQ,transform:`translate(48.1 15.7) rotate(31) scale(1.25 .85)`}),(0,q.jsx)(UZ,{fill:lQ,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)(JZ,{fill:aQ})}),(0,q.jsx)(`g`,{transform:`translate(17.1 28.7) scale(.19)`,children:(0,q.jsx)(XZ,{})}),(0,q.jsx)(UZ,{fill:sQ,transform:`translate(48.1 26.4) rotate(65) scale(1.7 1.28)`}),(0,q.jsx)(UZ,{fill:sQ,transform:`translate(48.4 33.8) rotate(110) scale(1.7 1.28)`})]}),write:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(ZZ,{}),(0,q.jsx)(QZ,{})]}),run:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{style:{fill:oQ},x:`6`,y:`9`,width:`52`,height:`43`,rx:`7`}),(0,q.jsx)(`path`,{style:{stroke:uQ},strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`,d:`m17 22 9 8-9 8m17 0h12`})]}),stop:(0,q.jsx)(`rect`,{style:{fill:aQ},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:oQ},strokeWidth:`12`,strokeLinecap:`round`,d:`M34 37Q43 21 26 20H18Q3 20 6 37q2 10 15 9`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:aQ},strokeWidth:`12`,strokeLinecap:`round`,d:`M29 33Q20 50 38 53h8q16-1 12-17-2-11-14-10`}),(0,q.jsx)(`path`,{style:{stroke:lQ},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:sQ},cx:`23`,cy:`14`,rx:`13`,ry:`8`,transform:`rotate(-30 23 14)`}),(0,q.jsx)(`ellipse`,{style:{fill:lQ},cx:`48`,cy:`36`,rx:`13`,ry:`8`,transform:`rotate(35 48 36)`}),(0,q.jsx)(`ellipse`,{style:{fill:cQ},cx:`22`,cy:`48`,rx:`13`,ry:`8`,transform:`rotate(45 22 48)`}),(0,q.jsx)(`path`,{fill:`none`,style:{stroke:VZ},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:sQ},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:VZ},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:oQ},x:`9`,y:`26`,width:`46`,height:`32`,rx:`10`}),(0,q.jsx)(`rect`,{style:{fill:uQ},x:`17`,y:`33`,width:`30`,height:`18`,rx:`5`}),(0,q.jsx)(`path`,{style:{fill:sQ},d:`M22 38h8v8h-8z`}),(0,q.jsx)(`path`,{style:{fill:cQ},d:`M34 38h8v8h-8z`}),(0,q.jsx)(`path`,{style:{stroke:aQ},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:aQ},strokeWidth:`9`,strokeLinecap:`round`,d:`M16 23V19q0-17 16-17t16 17v4`}),(0,q.jsx)(`rect`,{style:{fill:aQ},x:`8`,y:`26`,width:`48`,height:`36`,rx:`9`}),(0,q.jsx)(`path`,{style:{fill:uQ},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:aQ},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:uQ},strokeWidth:`7`,strokeLinecap:`round`,d:`M32 18v15`}),(0,q.jsx)(`circle`,{style:{fill:uQ},cx:`32`,cy:`45`,r:`4`})]}),trellis:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)(`g`,{fill:lQ,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:sQ,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:sQ,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)($Z,{transform:`translate(32.1 14.1) rotate(45) scale(0.45 0.86)`}),(0,q.jsx)($Z,{transform:`translate(32.2 14.7) rotate(-60) scale(0.42 0.58)`}),(0,q.jsx)($Z,{transform:`translate(34.8 28.3) rotate(65) scale(0.38 0.8)`}),(0,q.jsx)($Z,{transform:`translate(28.2 33.1) rotate(-51) scale(0.5 0.57)`}),(0,q.jsx)($Z,{transform:`translate(28.6 53.3) rotate(-48) scale(0.47 0.6)`}),(0,q.jsx)(`circle`,{fill:aQ,cx:`31.9`,cy:`18.8`,r:`4`}),(0,q.jsx)(`circle`,{fill:oQ,cx:`32`,cy:`32.3`,r:`4`}),(0,q.jsx)(`circle`,{fill:cQ,cx:`32`,cy:`44.2`,r:`4`})]}),games:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:oQ,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:uQ,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:aQ,cx:`27.1`,cy:`18.3`,r:`12.4`}),(0,q.jsx)(`circle`,{fill:uQ,cx:`22.6`,cy:`14.3`,r:`3.05`}),(0,q.jsx)(`ellipse`,{fill:lQ,cx:`45.1`,cy:`37.2`,rx:`5.6`,ry:`3.95`}),(0,q.jsx)(`ellipse`,{fill:uQ,cx:`40.1`,cy:`46.6`,rx:`6.2`,ry:`4.4`})]}),oyster:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`path`,{fill:cQ,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:uQ,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:cQ,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:lQ,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:uQ,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:lQ,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:aQ,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:oQ,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:uQ,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:uQ,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:aQ,cx:`21.7`,cy:`26.6`,r:`1`}),(0,q.jsx)(`circle`,{fill:lQ,cx:`24.9`,cy:`25.9`,r:`1.05`}),(0,q.jsxs)(`g`,{fill:sQ,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:sQ,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:aQ,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:lQ,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:aQ,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:oQ,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:sQ,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:lQ,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:oQ,strokeWidth:`6.5`,d:`M37 37.5 43 43.5`}),(0,q.jsx)(`path`,{fill:`none`,stroke:aQ,strokeWidth:`12.6`,strokeLinecap:`round`,d:`M44.2 43.8 51.4 51.8`}),(0,q.jsx)(`path`,{fill:`none`,stroke:lQ,strokeWidth:`3`,strokeLinecap:`round`,d:`M47.2 42.4 52.8 47.8`}),(0,q.jsx)(`ellipse`,{fill:oQ,cx:`25.6`,cy:`24.6`,rx:`19.25`,ry:`18.6`}),(0,q.jsx)(`ellipse`,{fill:uQ,cx:`25.2`,cy:`24.1`,rx:`14.2`,ry:`13.6`})]}),browser:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:aQ,x:`5.9`,y:`6.15`,width:`52.2`,height:`51.7`,rx:`5.5`}),(0,q.jsx)(`path`,{fill:uQ,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:lQ,cx:`12.2`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:oQ,cx:`18.6`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:cQ,cx:`25.1`,cy:`11.9`,r:`1.95`}),(0,q.jsx)(`circle`,{fill:sQ,cx:`32`,cy:`34.9`,r:`14.5`}),(0,q.jsxs)(`g`,{fill:`none`,stroke:uQ,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:lQ,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:oQ,cx:`32`,cy:`32`,r:`21.1`}),(0,q.jsxs)(`g`,{fill:`none`,stroke:uQ,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:lQ,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:oQ,cx:`41.9`,cy:`22.85`,r:`12.2`}),(0,q.jsx)(`path`,{fill:oQ,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:aQ,cx:`22.95`,cy:`27.6`,r:`12.85`}),(0,q.jsx)(`path`,{fill:aQ,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:lQ,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:uQ,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:lQ,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:uQ,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:aQ,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:uQ,cx:`0`,cy:`-10.7`,r:`2.2`})]}),(0,q.jsx)(UZ,{fill:lQ,transform:`translate(38.2 18.6) scale(1.1 .86)`}),(0,q.jsx)(UZ,{fill:lQ,transform:`translate(42.8 21.2) rotate(45) scale(1.1 .85)`})]}),schedule:(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`rect`,{fill:uQ,x:`6`,y:`11`,width:`47.6`,height:`44`,rx:`6`}),(0,q.jsx)(`path`,{fill:aQ,d:`M12 11H47.6Q53.6 11 53.6 17V21.5H6V17Q6 11 12 11Z`}),(0,q.jsxs)(`g`,{fill:uQ,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:oQ,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:sQ,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:cQ,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:lQ,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:aQ},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:aQ},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)(JZ,{fill:oQ})}),(0,q.jsxs)(`g`,{style:{fill:uQ},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:uQ,cx:`33.5`,cy:`43.6`,rx:`18.6`,ry:`14.4`,transform:`rotate(-6 33.5 43.6)`}),(0,q.jsx)(`path`,{fill:aQ,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:uQ,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 pQ({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:fQ[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 hQ=[`primary`,`secondary`,`accent`,`info`,`success`,`warning`];function gQ(e){return hQ[mQ(e)%hQ.length]??`primary`}var _Q=(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":gQ(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})}),vQ=(0,M.createContext)(null),yQ=(0,M.createContext)(void 0);function bQ(e){let t=(0,M.useContext)(yQ);return e??t}var xQ=(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=bQ(s),p=f!==void 0,m=(0,M.useContext)(vQ),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 SQ(e){return{src:{local:e.character},appearance:e.appearance,expression:e.expression,renderStyle:e.renderStyle}}function CQ(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 wQ=(e,t)=>{let n=Dr.safeParse(e);return n.success?{kind:`local`,key:n.data.local}:{kind:`remote`,url:new URL(j().parse(e),t).href}},TQ=e=>e instanceof Error?e:Error(String(e),{cause:e}),EQ=e=>ps(e)?TQ(es(e.cause)):Error(`Unexpected Sprite success`);function DQ(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=CQ(n),i=new WeakSet,a=new WeakMap,o=e=>{let t=wQ(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=Wt(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=vy(s),w=()=>{let e=y||s.ownerDocument.hidden||b?.matches===!0;C.still(e);try{f?.native?.pause(e)}catch(e){S(TQ(e))}};Wt(Os(c,Yt(()=>{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=xe(As(e.scope,ds)).then(e=>{if(ps(e))throw EQ(e)});g=t;try{await t}finally{g===t&&(g=void 0)}},T=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=Bt(n.controls,r.appearance),s=Kv.parse(r.renderStyle??`plain`)}catch(e){let t=TQ(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(TQ(e))}},te=async(i,a,o)=>{let c=r(),l=Wt(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,Wt(Os(l,Yt(()=>{m.remove()}))),s.append(m);let g=wn(function*(){let r,a,o=n.baseURL,s=wQ(i.src,n.baseURL);if(s.kind===`remote`){let t=yield*In({try:()=>c(s.url,d.signal),catch:TQ});o=t.url,r=ai.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*In({try:n,catch:TQ})).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*In({try:n,catch:TQ});r=ai.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=>wn(function*(){let t=yield*In({try:()=>c(e,d.signal,o),catch:TQ});return yield*fe(Yt(()=>URL.createObjectURL(new Blob([t.bytes],{type:t.contentType}))),e=>Yt(()=>{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 xe(g,{signal:d.signal});if(!(v||o!==p||f!==h)){if(ps(_)){let e=EQ(_);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,T(h)}},ne=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 te(d,o(d.src),t))}},re=()=>{m=!0,f?.controller.abort(),f?.holder.remove(),!h&&(h=ne().catch(e=>{x({status:`error`,error:TQ(e)})}).finally(()=>{h=void 0,m&&!v&&re()}))};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`?T(f):(f?.key!==t||u.status===`error`)&&(p+=1,re())},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 xe(As(c,ds));if(ps(e))throw EQ(e)})(),a.set(s,_.then(()=>({kind:`closed`}),e=>({kind:`failed`,error:TQ(e)}))),_)}}}}}var OQ=DQ({characters:{mushroom:async()=>(await Ez(async()=>{let{default:e}=await import(`./mushroom-CXyBHPQt.js`);return{default:e}},__vite__mapDeps([0,1,2,3,4]))).default,cat:async()=>(await Ez(async()=>{let{default:e}=await import(`./cat-mAkMN0vn.js`);return{default:e}},__vite__mapDeps([5,1,2,3,4,6,7,8]))).default,burger:async()=>(await Ez(async()=>{let{default:e}=await import(`./burger-OT5yDfeg.js`);return{default:e}},__vite__mapDeps([9,1,2,3,4,6,7,8]))).default}}),kQ=(0,M.memo)(function({activity:e=`idle`,avatar:t,className:n,name:r,size:i=24,timeMs:a}){let o=bQ(a),[s,c]=(0,M.useState)(!1),l=(0,M.useMemo)(()=>SQ(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)(_Q,{className:`absolute inset-0`,name:r,seed:r}),(0,q.jsx)(xQ,{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:OQ,src:l.src})]})});function AQ(e,t){e!==null&&e.showToast({message:t.message,tone:t.variant}).catch(e=>{console.error(`Chat toast failed`,e)})}export{FY as $,Fh as $a,pT as $i,Bk as $n,gu as $o,CD as $r,AM as $t,sZ as A,Wy as Aa,WE as Ai,RA as An,Tg as Ao,AO as Ar,ZG as At,lX as B,rv as Ba,yE as Bi,TA as Bn,yg as Bo,fO as Br,aW as Bt,hZ as C,DS as Ca,KE as Ci,XA as Cn,uh as Co,VO as Cr,Xq as Ct,dZ as D,iS as Da,GE as Di,BA as Dn,P as Do,IO as Dr,eq as Dt,fZ as E,Px as Ea,VE as Ei,FA as En,xh as Eo,PO as Er,tq as Et,AX as F,Mv as Fa,RE as Fi,GA as Fn,mg as Fo,SO as Fr,TW as Ft,gX as G,Qg as Ga,ZT as Gi,pA as Gn,Gh as Go,tO as Gr,Ez as Gt,bX as H,W_ as Ha,nE as Hi,gA as Hn,ng as Ho,dO as Hr,eW as Ht,kX as I,hv as Ia,LE as Ii,VA as In,hg as Io,yO as Ir,kW as It,fX as J,b_ as Ja,RT as Ji,oA as Jn,$h as Jo,BD as Jr,OR as Jt,_X as K,l_ as Ka,YT as Ki,lA as Kn,zg as Ko,$D as Kr,xz as Kt,DX as L,uv as La,EE as Li,AA as Ln,vg as Lo,_O as Lr,wW as Lt,nZ as M,Cy as Ma,HE as Mi,UA as Mn,yh as Mo,TO as Mr,NG as Mt,eZ as N,Dy as Na,zE as Ni,WA as Nn,_g as No,EO as Nr,$ as Nt,lZ as O,Jy as Oa,QE as Oi,zA as On,Sh as Oo,jO as Or,vK as Ot,KX as P,Wv as Pa,BE as Pi,PA as Pn,cg as Po,CO as Pr,FW as Pt,zY as Q,V as Qa,gT as Qi,tA as Qn,yu as Qo,MD as Qr,MM as Qt,EX as R,av as Ra,CE as Ri,kA as Rn,gg as Ro,hO as Rr,EW as Rt,mZ as S,RS as Sa,nD as Si,ij as Sn,W as So,BO as Sr,sJ as St,uZ as T,xS as Ta,XE as Ti,MA as Tn,bh as To,FO as Tr,iq as Tt,hX as U,O_ as Ua,eE as Ui,mA as Un,I as Uo,lO as Ur,gV as Ut,pX as V,tv as Va,hE as Vi,hA as Vn,ag as Vo,uO as Vr,iW as Vt,yX as W,w_ as Wa,XT as Wi,fA as Wn,F as Wo,rO as Wr,UB as Wt,dX as X,Kg as Xa,OT as Xi,Qk as Xn,fp as Xo,LD as Xr,NM as Xt,vX as Y,qg as Ya,IT as Yi,$k as Yn,Bp as Yo,zD as Yr,IR as Yt,BY as Z,Wg as Za,TT as Zi,eA as Zn,Cu as Zo,FD as Zr,PM as Zt,CZ as _,KS as _a,$E as _i,Sj as _n,Ph as _o,YO as _r,la as _s,lJ as _t,xQ as a,Jw as aa,DD as ai,cM as an,H as ao,ok as ar,fu as as,NY as at,SZ as b,WS as ba,YE as bi,fj as bn,Mh as bo,HO as br,Yi as bs,cJ as bt,RZ as c,Y as ca,yD as ci,Yj as cn,Nh as co,ak as cr,Ff as cs,jY as ct,LZ as d,tC as da,SD as di,Bj as dn,Lh as do,ek as dr,au as ds,HJ as dt,fT as ea,bD as ei,SM as en,sg as eo,Rk as er,_u as es,TY as et,NZ as f,JS as fa,fD as fi,zj as fn,R as fo,$O as fr,ul as fs,IJ as ft,vZ as g,HS as ga,rD as gi,Cj as gn,Ag as go,WO as gr,Da as gs,CJ as gt,TZ as h,jS as ha,xD as hi,wj as hn,zh as ho,JO as hr,Ta as hs,jJ as ht,SQ as i,$w as ia,wD as ii,lM as in,L as io,sk as ir,mu as is,AY as it,rZ as j,yy as ja,UE as ji,HA as jn,eg as jo,DO as jr,IG as jt,cZ as k,Gy as ka,eD as ki,NA as kn,Th as ko,kO as kr,QG as kt,zZ as l,Gw as la,lD as li,Jj as ln,U as lo,uk as lr,Pf as ls,EY as lt,jZ as m,BS as ma,mD as mi,Tj as mn,Og as mo,ZO as mr,Go as ms,MJ as mt,kQ as n,oT as na,OD as ni,_M as nn,Vg as no,Mk as nr,hu as ns,DY as nt,pQ as o,Yw as oa,TD as oi,Qj as on,jh as oo,ck as or,xu as os,SY as ot,MZ as p,FS as pa,pD as pi,Ij as pn,B as po,QO as pr,Nc as ps,FJ as pt,mX as q,u_ as qa,zT as qi,sA as qn,_h as qo,VD as qr,kR as qt,OQ as r,eT as ra,aD as ri,dM as rn,Hg as ro,Nk as rr,bu as rs,OY as rt,FZ as s,aT as sa,oD as si,Zj as sn,Cg as so,fk as sr,Nf as ss,kY as st,AQ as t,dT as ta,sD as ti,xM as tn,G as to,Ik as tr,du as ts,MY as tt,IZ as u,yC as ua,uD as ui,Wj as un,z as uo,ik as ur,gf as us,GJ as ut,bZ as v,kS as va,qE as vi,hj as vn,Uh as vo,qO as vr,Qi as vs,aJ as vt,pZ as w,bS as wa,ZE as wi,KA as wn,lh as wo,NO as wr,nq as wt,AZ as x,XS as xa,JE as xi,rj as xn,Kh as xo,zO as xr,Wi as xs,oJ as xt,yZ as y,LS as ya,tD as yi,xj as yn,Hh as yo,XO as yr,Xi as ys,uJ as yt,TX as z,iv as za,SE as zi,EA as zn,K as zo,gO as zr,yW as zt};